Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
22.x
20.x
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
}
},
"[svelte]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
Expand Down
25 changes: 25 additions & 0 deletions platforms/metagram/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*storybook.log
1 change: 1 addition & 0 deletions platforms/metagram/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions platforms/metagram/.prettierignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
15 changes: 15 additions & 0 deletions platforms/metagram/.prettierrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to package.json instead as we have it in that in other projects, the key is just straight up "prettier" instead

}
]
}
24 changes: 24 additions & 0 deletions platforms/metagram/.storybook/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';

import { join, dirname } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure compatibility in ESM by creating a require function.

require.resolve isn’t available in native ESM contexts. Wrap it via createRequire from the module package:

- function getAbsolutePath(value: string): string {- return dirname(require.resolve(join(value, 'package.json')));- }+ import { createRequire } from 'module';++ const require = createRequire(import.meta.url);++ function getAbsolutePath(value: string): string {+ return dirname(require.resolve(join(value, 'package.json')));+ }
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}
import{createRequire}from'module';
constrequire=createRequire(import.meta.url);
functiongetAbsolutePath(value: string): string{
returndirname(require.resolve(join(value,'package.json')));
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-svelte-csf'),
getAbsolutePath('@chromatic-com/storybook')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
15 changes: 15 additions & 0 deletions platforms/metagram/.storybook/preview.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/svelte';
import '../src/app.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
38 changes: 38 additions & 0 deletions platforms/metagram/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
42 changes: 42 additions & 0 deletions platforms/metagram/eslint.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser }
},
rules: {},
overrides: [
{
files: ['*.svelte'],
rules: { 'no-undef': 'off' }
}
]
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);
4 changes: 4 additions & 0 deletions platforms/metagram/messages/en.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from en!"
}
4 changes: 4 additions & 0 deletions platforms/metagram/messages/es.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"hello_world": "Hello, {name} from es!"
}
55 changes: 55 additions & 0 deletions platforms/metagram/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
{
"name": "metagram",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@chromatic-com/storybook": "^3",
"@eslint/compat": "^1.2.5",
"@eslint/js": "^9.18.0",
"@hugeicons/core-free-icons": "^1.0.13",
"@hugeicons/svelte": "^1.0.2",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/addon-svelte-csf": "^5.0.0-next.0",
"@storybook/blocks": "^8.6.12",
"@storybook/svelte": "^8.6.12",
"@storybook/sveltekit": "^8.6.12",
"@storybook/test": "^8.6.12",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"clsx": "^2.1.1",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^3.0.0",
"globals": "^16.0.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"storybook": "^8.6.12",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^6.2.6"
},
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove invalid dependencies

The dependencies section contains two unusual entries: "-" (version 0.0.1) and "D" (version 1.0.0). These appear to be typographical errors or artifacts that should be removed.

 "dependencies": {
-	"-": "^0.0.1",-	"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
}
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"-": "^0.0.1",
"D": "^1.0.0",
"tailwind-merge": "^3.0.2"
"dependencies": {
"tailwind-merge": "^3.0.2"
}

}
}
1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
cache

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions platforms/metagram/project.inlang/cache/plugins/ygx0uiahq6uw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions platforms/metagram/project.inlang/project_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1lExt3FnvpxOpPeeZE
12 changes: 12 additions & 0 deletions platforms/metagram/project.inlang/settings.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "../messages/{locale}.json"
},
"baseLocale": "en",
"locales": ["en", "es"]
}
Comment on lines +1 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been removed, pl merge from main

52 changes: 52 additions & 0 deletions platforms/metagram/src/app.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
@import 'tailwindcss';

@font-face {
font-family: 'Geist', sans-serif;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Tailwind’s @tailwind directives instead of @import

The line @import 'tailwindcss'; may not pull in the full base, components, and utilities. Replace it with the official Tailwind directives:

-@import 'tailwindcss';+@tailwind base;+@tailwind components;+@tailwind utilities;
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@import'tailwindcss';
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family:'Geist', sans-serif;
font-style: normal;
font-weight:700;
font-display: swap;
src:url('/fonts/Geist-VariableFont_wght.ttf') format('truetype');
}


@layer base {
h1 {
@apply font-geist text-xl/[1] font-semibold;
}
h2 {
@apply font-geist text-lg/[1] font-medium;
}
h3 {
@apply font-geist text-base/[1] font-normal;
}
p {
@apply font-geist text-[15px]/[1] font-normal;
}
Comment on lines +11 to +23

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you seem to be readding files that already exist

.small {
@apply font-geist text-sm/[1] font-normal;
}
.subtext {
@apply font-geist text-xs/[1] font-normal;
}
}

@theme {
/* fonts */
--font-geist: 'Geist', sans-serif;

/* colors */
--color-black: #1f1f1f;
--color-black-800: #4c4c4c;
--color-black-600: #797979;
--color-black-400: #a9a9a9;
--color-black-200: #d2d2d2;

--color-grey: #f5f5f5;

--color-brand-burnt-orange: #da4a11;
--color-brand-gradient: linear-gradient(
91.82deg,
#4d44ef -36.17%,
#f35b5b 57.95%,
#f7a428 152.07%
);
}
13 changes: 13 additions & 0 deletions platforms/metagram/src/app.d.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespaceApp{
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export{};
12 changes: 12 additions & 0 deletions platforms/metagram/src/app.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add <title> and meta description for SEO & accessibility.
Right now the <head> is missing a <title> tag and a <meta name="description">. I recommend:

 <head>
<meta charset="utf-8" />
+ <title>Metagram</title>+ <meta name="description" content="Metagram – a SvelteKit-powered social feed demo" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
…

This ensures each page has a meaningful title and description.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<metacharset="utf-8" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<head>
<metacharset="utf-8" />
<title>Metagram</title>
<metaname="description" content="Metagram – a SvelteKit-powered social feed demo" />
<linkrel="icon" href="%sveltekit.assets%/favicon.png" />
<metaname="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%

</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions platforms/metagram/src/lib/icons/Comment.svelte
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
<script lang="ts">
import type { ISvgProps } from './../types';

let { size = '20px', color = '#A5A5A5', ...restProps }: ISvgProps = $props();
</script>

<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...restProps}
>
<path
d="M11.8088 16.6834C15.2946 16.4614 18.0713 13.7626 18.2998 10.3747C18.3445 9.71168 18.3445 9.02503 18.2998 8.36203C18.0713 4.97406 15.2946 2.27536 11.8088 2.05329C10.6195 1.97754 9.37796 1.9777 8.19112 2.05329C4.70528 2.27536 1.92863 4.97406 1.70016 8.36203C1.65545 9.02503 1.65545 9.71168 1.70016 10.3747C1.78337 11.6086 2.35282 12.7511 3.02322 13.7158C3.41247 14.3912 3.15557 15.2342 2.75013 15.9705C2.4578 16.5014 2.31163 16.7668 2.42899 16.9586C2.54636 17.1503 2.80851 17.1565 3.33282 17.1687C4.36968 17.1929 5.06886 16.9112 5.62386 16.519C5.93862 16.2965 6.09602 16.1853 6.20449 16.1725C6.31296 16.1597 6.52643 16.244 6.9533 16.4125C7.33696 16.5639 7.78242 16.6574 8.19112 16.6834C9.37796 16.759 10.6195 16.7592 11.8088 16.6834Z"
stroke={color}
stroke-width="1.25"
stroke-linejoin="round"
/>
<path
d="M9.99607 9.58331H10.0036M13.3257 9.58331H13.3332M6.6665 9.58331H6.67398"
stroke={color}
stroke-width="1.66667"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
Loading