diff --git a/apps/www/.eslintrc.cjs b/apps/www/.eslintrc.cjs index f5112d1a8..995adaaa6 100644 --- a/apps/www/.eslintrc.cjs +++ b/apps/www/.eslintrc.cjs @@ -32,8 +32,7 @@ module.exports = { "warn", { argsIgnorePattern: "^_", - varsIgnorePattern: - "^\\$\\$(Props|Events|Slots|Generic)$" + varsIgnorePattern: "^\\$\\$(Props|Events|Slots|Generic)$" } ] } diff --git a/apps/www/.prettierrc b/apps/www/.prettierrc index da415eaa8..9c0b01620 100644 --- a/apps/www/.prettierrc +++ b/apps/www/.prettierrc @@ -2,7 +2,7 @@ "useTabs": true, "singleQuote": false, "trailingComma": "none", - "printWidth": 80, + "printWidth": 100, "endOfLine": "lf", "plugins": ["prettier-plugin-svelte"], "pluginSearchDirs": false, diff --git a/apps/www/mdsvex.config.js b/apps/www/mdsvex.config.js index c77b35774..375da47dd 100644 --- a/apps/www/mdsvex.config.js +++ b/apps/www/mdsvex.config.js @@ -17,10 +17,7 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url)); /** @type {import('mdsvex').MdsvexOptions} */ export const mdsvexOptions = { extensions: [".md"], - layout: path.resolve( - __dirname, - "./src/lib/components/docs/mdsvex/mdsvex.svelte" - ), + layout: path.resolve(__dirname, "./src/lib/components/docs/mdsvex/mdsvex.svelte"), smartypants: { quotes: false, ellipses: false, @@ -45,10 +42,7 @@ export const mdsvexOptions = { const match = codeEl.data?.meta.match(regex); if (match) { node.__event__ = match ? match[1] : null; - codeEl.data.meta = codeEl.data.meta.replace( - regex, - "" - ); + codeEl.data.meta = codeEl.data.meta.replace(regex, ""); } } @@ -63,10 +57,7 @@ export const mdsvexOptions = { rehypePrettyCode, { theme: JSON.parse( - fs.readFileSync( - path.resolve(__dirname, "./other/themes/dark.json"), - "utf-8" - ) + fs.readFileSync(path.resolve(__dirname, "./other/themes/dark.json"), "utf-8") ), onVisitLine(node) { if (node.children.length === 0) { @@ -102,10 +93,7 @@ export function rehypeComponentExample() { return async (tree) => { const nameRegex = /name="([^"]+)"/; visit(tree, (node, index, parent) => { - if ( - node?.type === "raw" && - node?.value?.startsWith(" { - if ( - node?.type === "element" && - node?.tagName === "Components.pre" - ) { + if (node?.type === "element" && node?.tagName === "Components.pre") { node.tagName = "pre"; } diff --git a/apps/www/other/rehype-component-example.ts b/apps/www/other/rehype-component-example.ts index d8018be5b..50342e308 100644 --- a/apps/www/other/rehype-component-example.ts +++ b/apps/www/other/rehype-component-example.ts @@ -11,10 +11,7 @@ export function rehypeComponentExample() { return async (tree) => { const nameRegex = /name="([^"]+)"/; visit(tree, (node, index, parent) => { - if ( - node?.type === "raw" && - node?.value?.startsWith(" `../src/lib/registry/${style.name}/${file}` - ); + const resolveFiles = item.files.map((file) => `../src/lib/registry/${style.name}/${file}`); const type = item.type.split(":")[1]; index += ` @@ -113,18 +111,13 @@ for (const style of styles) { // Build registry/styles/index.json. // ---------------------------------------------------------------------------- const stylesJson = JSON.stringify(styles, null, 2); -fs.writeFileSync( - path.join(REGISTRY_PATH, "styles/index.json"), - stylesJson, - "utf8" -); +fs.writeFileSync(path.join(REGISTRY_PATH, "styles/index.json"), stylesJson, "utf8"); // ---------------------------------------------------------------------------- // Build registry/index.json. // ---------------------------------------------------------------------------- const names = result.data.filter( - (item) => - item.type === "components:ui" && !REGISTRY_IGNORE.includes(item.name) + (item) => item.type === "components:ui" && !REGISTRY_IGNORE.includes(item.name) ); const registryJson = JSON.stringify(names, null, 2); rimraf.sync(path.join(REGISTRY_PATH, "index.json")); @@ -150,14 +143,8 @@ for (const [color, value] of Object.entries(colors)) { if (Array.isArray(value)) { colorsData[color] = value.map((item) => ({ ...item, - rgbChannel: item.rgb.replace( - /^rgb\((\d+),(\d+),(\d+)\)$/, - "$1 $2 $3" - ), - hslChannel: item.hsl.replace( - /^hsl\(([\d.]+),([\d.]+%),([\d.]+%)\)$/, - "$1 $2 $3" - ) + rgbChannel: item.rgb.replace(/^rgb\((\d+),(\d+),(\d+)\)$/, "$1 $2 $3"), + hslChannel: item.hsl.replace(/^hsl\(([\d.]+),([\d.]+%),([\d.]+%)\)$/, "$1 $2 $3") })); continue; } @@ -165,14 +152,8 @@ for (const [color, value] of Object.entries(colors)) { if (typeof value === "object") { colorsData[color] = { ...value, - rgbChannel: value.rgb.replace( - /^rgb\((\d+),(\d+),(\d+)\)$/, - "$1 $2 $3" - ), - hslChannel: value.hsl.replace( - /^hsl\(([\d.]+),([\d.]+%),([\d.]+%)\)$/, - "$1 $2 $3" - ) + rgbChannel: value.rgb.replace(/^rgb\((\d+),(\d+),(\d+)\)$/, "$1 $2 $3"), + hslChannel: value.hsl.replace(/^hsl\(([\d.]+),([\d.]+%),([\d.]+%)\)$/, "$1 $2 $3") }; continue; } @@ -281,17 +262,12 @@ for (const baseColor of ["slate", "gray", "zinc", "neutral", "stone", "lime"]) { base["cssVars"][mode] = {}; for (const [key, value] of Object.entries(values)) { if (typeof value === "string") { - const resolvedColor = value.replace( - /{{base}}-/g, - `${baseColor}-` - ); + const resolvedColor = value.replace(/{{base}}-/g, `${baseColor}-`); base["inlineColors"][mode][key] = resolvedColor; const [resolvedBase, scale] = resolvedColor.split("-"); const color = scale - ? colorsData[resolvedBase].find( - (item: any) => item.scale === parseInt(scale) - ) + ? colorsData[resolvedBase].find((item: any) => item.scale === parseInt(scale)) : colorsData[resolvedBase]; if (color) { base["cssVars"][mode][key] = color.hslChannel; @@ -391,10 +367,6 @@ for (const theme of themes) { ); } -fs.writeFileSync( - path.join(REGISTRY_PATH, `themes.css`), - themeCSS.join("\n"), - "utf8" -); +fs.writeFileSync(path.join(REGISTRY_PATH, `themes.css`), themeCSS.join("\n"), "utf8"); console.log("✅ Done!"); diff --git a/apps/www/scripts/registry.ts b/apps/www/scripts/registry.ts index 09c6d2949..ffc22ab1d 100644 --- a/apps/www/scripts/registry.ts +++ b/apps/www/scripts/registry.ts @@ -68,8 +68,9 @@ async function crawlExample(rootPath: string) { if (dirent.isFile() && dirent.name.endsWith(".svelte")) { const [name] = dirent.name.split(".svelte"); const file_path = join("example", dirent.name); - const { dependencies, registryDependencies } = - await getDependencies(join(rootPath, dirent.name)); + const { dependencies, registryDependencies } = await getDependencies( + join(rootPath, dirent.name) + ); exampleRegistry.push({ name, @@ -116,13 +117,9 @@ async function buildUIRegistry(componentPath: string, componentName: string) { const deps = await getDependencies(join(componentPath, dirent.name)); deps.dependencies.forEach((dep) => dependencies.add(dep)); - REQUIRED_COMPONENT_DEPS.get(componentName)?.forEach((dep) => - dependencies.add(dep) - ); + REQUIRED_COMPONENT_DEPS.get(componentName)?.forEach((dep) => dependencies.add(dep)); - deps.registryDependencies.forEach((dep) => - registryDependencies.add(dep) - ); + deps.registryDependencies.forEach((dep) => registryDependencies.add(dep)); } return { diff --git a/apps/www/src/app.html b/apps/www/src/app.html index 1ff64d6c3..deb457759 100644 --- a/apps/www/src/app.html +++ b/apps/www/src/app.html @@ -11,10 +11,7 @@ data-sveltekit-preload-data="hover" class="min-h-screen bg-background antialiased font-sans" > -
+
%sveltekit.body%
diff --git a/apps/www/src/lib/components/docs/announcement.svelte b/apps/www/src/lib/components/docs/announcement.svelte index d921b3d2b..2b0437271 100644 --- a/apps/www/src/lib/components/docs/announcement.svelte +++ b/apps/www/src/lib/components/docs/announcement.svelte @@ -17,8 +17,6 @@ > 🎉 {" "} New components and more. - + diff --git a/apps/www/src/lib/components/docs/charts/bar.svelte b/apps/www/src/lib/components/docs/charts/bar.svelte index fb4e51642..8999edcd4 100644 --- a/apps/www/src/lib/components/docs/charts/bar.svelte +++ b/apps/www/src/lib/components/docs/charts/bar.svelte @@ -90,8 +90,7 @@ x="57" y="-4" fill="#888888" - text-anchor="end" - >${tick}${tick} {/each} @@ -112,9 +111,7 @@ fill="#888888" text-anchor="middle" >{width > 380 - ? point.name - : formatMobile(point.name)}{width > 380 ? point.name : formatMobile(point.name)} diff --git a/apps/www/src/lib/components/docs/code-block-wrapper.svelte b/apps/www/src/lib/components/docs/code-block-wrapper.svelte index e6af4220a..8b265c8a8 100644 --- a/apps/www/src/lib/components/docs/code-block-wrapper.svelte +++ b/apps/www/src/lib/components/docs/code-block-wrapper.svelte @@ -27,11 +27,7 @@ )} > - diff --git a/apps/www/src/lib/components/docs/command-menu.svelte b/apps/www/src/lib/components/docs/command-menu.svelte index c0e50ec67..fa440e0ea 100644 --- a/apps/www/src/lib/components/docs/command-menu.svelte +++ b/apps/www/src/lib/components/docs/command-menu.svelte @@ -77,9 +77,7 @@ navItem.href && goto(navItem.href); })} > -
+
{navItem.title} @@ -89,24 +87,15 @@ {/each} - runCommand(() => setMode("light"))} - > + runCommand(() => setMode("light"))}> Light - runCommand(() => setMode("dark"))} - > + runCommand(() => setMode("dark"))}> Dark - runCommand(() => resetMode())} - > + runCommand(() => resetMode())}> System diff --git a/apps/www/src/lib/components/docs/component-example.svelte b/apps/www/src/lib/components/docs/component-example.svelte index f4af43d8b..5f961ff2a 100644 --- a/apps/www/src/lib/components/docs/component-example.svelte +++ b/apps/www/src/lib/components/docs/component-example.svelte @@ -13,15 +13,10 @@ export let align: "start" | "center" | "end" = "center"; -
+
- + -
+
diff --git a/apps/www/src/lib/components/docs/component-preview.svelte b/apps/www/src/lib/components/docs/component-preview.svelte index 6fad1fce5..25f74f010 100644 --- a/apps/www/src/lib/components/docs/component-preview.svelte +++ b/apps/www/src/lib/components/docs/component-preview.svelte @@ -24,15 +24,10 @@ export let style = ""; -
+
- + {#await component} -
- +
+ Loading...
{:then Component} diff --git a/apps/www/src/lib/components/docs/dashboard/dashboard-page.svelte b/apps/www/src/lib/components/docs/dashboard/dashboard-page.svelte index 0d4142640..3531454ee 100644 --- a/apps/www/src/lib/components/docs/dashboard/dashboard-page.svelte +++ b/apps/www/src/lib/components/docs/dashboard/dashboard-page.svelte @@ -1,22 +1,9 @@ @@ -61,12 +48,9 @@ Overview - Analytics + Analytics Reports - Notifications + Notifications
@@ -74,64 +58,48 @@ - Total Revenue + Total Revenue
$45,231.89
-

- +20.1% from last month -

+

+20.1% from last month

- Subscriptions + Subscriptions
+2350
-

- +180.1% from last month -

+

+180.1% from last month

- Sales + Sales
+12,234
-

- +19% from last month -

+

+19% from last month

- Active Now + Active Now
+573
-

- +201 since last hour -

+

+201 since last hour

@@ -147,9 +115,7 @@ Recent Sales - - You made 265 sales this month. - + You made 265 sales this month. diff --git a/apps/www/src/lib/components/docs/dashboard/main-nav.svelte b/apps/www/src/lib/components/docs/dashboard/main-nav.svelte index 0772d8ff3..6d57474fa 100644 --- a/apps/www/src/lib/components/docs/dashboard/main-nav.svelte +++ b/apps/www/src/lib/components/docs/dashboard/main-nav.svelte @@ -6,10 +6,7 @@
- + JL @@ -34,9 +32,7 @@

Isabella Nguyen

-

- isabella.nguyen@email.com -

+

isabella.nguyen@email.com

+$299.00
diff --git a/apps/www/src/lib/components/docs/dashboard/search.svelte b/apps/www/src/lib/components/docs/dashboard/search.svelte index 9eee6902f..3775becac 100644 --- a/apps/www/src/lib/components/docs/dashboard/search.svelte +++ b/apps/www/src/lib/components/docs/dashboard/search.svelte @@ -3,9 +3,5 @@
- +
diff --git a/apps/www/src/lib/components/docs/dashboard/team-switcher.svelte b/apps/www/src/lib/components/docs/dashboard/team-switcher.svelte index 640cafc55..c9619f31c 100644 --- a/apps/www/src/lib/components/docs/dashboard/team-switcher.svelte +++ b/apps/www/src/lib/components/docs/dashboard/team-switcher.svelte @@ -104,8 +104,7 @@ @@ -159,9 +158,7 @@ Pro - - - $9/month per user - + $9/month per user @@ -169,9 +166,7 @@
- + diff --git a/apps/www/src/lib/components/docs/dashboard/user-nav.svelte b/apps/www/src/lib/components/docs/dashboard/user-nav.svelte index d57418662..306516696 100644 --- a/apps/www/src/lib/components/docs/dashboard/user-nav.svelte +++ b/apps/www/src/lib/components/docs/dashboard/user-nav.svelte @@ -6,11 +6,7 @@ - - setMode("light")}> - Light - - setMode("dark")}> - Dark - - resetMode()}> - System - + setMode("light")}>Light + setMode("dark")}>Dark + resetMode()}>System diff --git a/apps/www/src/lib/components/docs/nav/main-nav.svelte b/apps/www/src/lib/components/docs/nav/main-nav.svelte index 0cc9a306c..ee2dff55e 100644 --- a/apps/www/src/lib/components/docs/nav/main-nav.svelte +++ b/apps/www/src/lib/components/docs/nav/main-nav.svelte @@ -17,9 +17,7 @@ href="/docs" class={cn( "transition-colors hover:text-foreground/80", - $page.url.pathname === "/docs" - ? "text-foreground" - : "text-foreground/60" + $page.url.pathname === "/docs" ? "text-foreground" : "text-foreground/60" )} > Docs @@ -39,9 +37,7 @@ href="/themes" class={cn( "transition-colors hover:text-foreground/80", - $page.url.pathname.startsWith("/themes") - ? "text-foreground" - : "text-foreground/60" + $page.url.pathname.startsWith("/themes") ? "text-foreground" : "text-foreground/60" )} > Themes diff --git a/apps/www/src/lib/components/docs/nav/mobile-link.svelte b/apps/www/src/lib/components/docs/nav/mobile-link.svelte index 8b8f1e2d3..3c1a85ca6 100644 --- a/apps/www/src/lib/components/docs/nav/mobile-link.svelte +++ b/apps/www/src/lib/components/docs/nav/mobile-link.svelte @@ -11,10 +11,7 @@ (open = false)} {...$$restProps} > diff --git a/apps/www/src/lib/components/docs/nav/mobile-nav.svelte b/apps/www/src/lib/components/docs/nav/mobile-nav.svelte index 2b38b18b8..4d273dc96 100644 --- a/apps/www/src/lib/components/docs/nav/mobile-nav.svelte +++ b/apps/www/src/lib/components/docs/nav/mobile-nav.svelte @@ -29,11 +29,7 @@
{#each docsConfig.mainNav as navItem, index (navItem + index.toString())} {#if navItem.href} - + {navItem.title} {/if} diff --git a/apps/www/src/lib/components/docs/page-header/page-header-description.svelte b/apps/www/src/lib/components/docs/page-header/page-header-description.svelte index b860b4fcc..215e32347 100644 --- a/apps/www/src/lib/components/docs/page-header/page-header-description.svelte +++ b/apps/www/src/lib/components/docs/page-header/page-header-description.svelte @@ -9,10 +9,7 @@

{#if balanced} diff --git a/apps/www/src/lib/components/docs/site-footer.svelte b/apps/www/src/lib/components/docs/site-footer.svelte index 191f6803e..401713ffa 100644 --- a/apps/www/src/lib/components/docs/site-footer.svelte +++ b/apps/www/src/lib/components/docs/site-footer.svelte @@ -3,15 +3,9 @@