From 6eb949f3a903fb556eefdde4d415b8b28e0c1bad Mon Sep 17 00:00:00 2001 From: Ryan Atkinson Date: Wed, 17 Jun 2026 13:21:37 -0400 Subject: [PATCH 1/2] wip --- .prettierignore | 1 - CLAUDE.md | 2 +- package-lock.json | 52 ++++++++----------- package.json | 21 +------- src/lib/Alert.svelte | 9 ++-- src/lib/Breadcrumb.svelte | 3 +- src/lib/Card.svelte | 3 +- src/lib/ContextmenuSubmenu.svelte | 4 +- src/lib/DeclarationDetail.svelte | 8 ++- src/lib/Docs.svelte | 4 +- src/lib/DocsLink.svelte | 3 +- src/lib/DocsSecondaryNav.svelte | 4 +- src/lib/DocsTertiaryNav.svelte | 4 +- src/lib/ImgOrSvg.svelte | 3 +- src/lib/ThemeRoot.svelte | 3 +- src/lib/TypeLink.svelte | 3 +- src/lib/csp.ts | 8 ++- src/lib/library.svelte.ts | 4 +- src/lib/vite_plugin_pkg_json.ts | 4 +- src/routes/docs/Breadcrumb/+page.svelte | 4 +- src/routes/docs/Contextmenu/Discussion.svelte | 14 ++--- .../docs/Contextmenu/ExampleBasic.svelte | 4 +- .../Contextmenu/ExampleCustomInstance.svelte | 8 +-- .../ExampleDisableDefaultBehaviors.svelte | 8 +-- .../docs/Contextmenu/ExampleSelectText.svelte | 8 +-- .../docs/Contextmenu/Introduction.svelte | 13 ++--- src/routes/docs/Details/+page.svelte | 4 +- src/routes/docs/Dialog/+page.svelte | 41 ++++++++------- src/routes/docs/Docs/+page.svelte | 17 +++--- src/routes/docs/Library/+page.svelte | 11 ++-- src/routes/docs/LibraryDetail/+page.svelte | 15 +++--- src/routes/docs/LibrarySummary/+page.svelte | 4 +- src/routes/docs/PendingAnimation/+page.svelte | 30 ++++++++--- src/routes/docs/Svg/+page.svelte | 3 +- src/routes/docs/ThemeRoot/+page.svelte | 45 ++++++++-------- src/routes/docs/csp/+page.svelte | 23 ++++---- src/routes/docs/intersect/+page.svelte | 8 +-- .../docs/vite_plugin_pkg_json/+page.svelte | 12 ++--- src/test/csp.fallback.test.ts | 8 ++- svelte.config.js | 4 +- tsconfig.json | 4 +- 41 files changed, 226 insertions(+), 205 deletions(-) delete mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 3cffb59b9..000000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -src/test/fixtures/**/*.json diff --git a/CLAUDE.md b/CLAUDE.md index fd79aef4c..ae89399ee 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -282,7 +282,7 @@ contexts for navigation. - TypeScript strict mode - Svelte 5 with runes API -- Prettier with tabs, 100 char width +- tsv with tabs, 100 char width - Node >= 22.15 - Tests in `src/test/` (not co-located) diff --git a/package-lock.json b/package-lock.json index f32ae97a4..2a78c6fcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@fuzdev/fuz_code": "^0.46.1", "@fuzdev/fuz_css": "^0.63.2", "@fuzdev/fuz_util": "^0.65.1", - "@fuzdev/gro": "^0.205.1", + "@fuzdev/gro": "^0.206.0", "@fuzdev/mdz": "^0.1.0", "@ryanatkn/eslint-config": "^0.12.1", "@sveltejs/adapter-static": "^3.0.10", @@ -27,8 +27,6 @@ "eslint-plugin-svelte": "^3.19.0", "esm-env": "^1.2.2", "jsdom": "^29.1.1", - "prettier": "^3.7.4", - "prettier-plugin-svelte": "^3.5.1", "svelte": "^5.56.3", "svelte-check": "^4.6.0", "svelte-docinfo": "^0.5.1", @@ -1134,18 +1132,17 @@ } }, "node_modules/@fuzdev/gro": { - "version": "0.205.1", - "resolved": "https://registry.npmjs.org/@fuzdev/gro/-/gro-0.205.1.tgz", - "integrity": "sha512-o5WBXWSH/UlN1BsDnpBNIi0WHR7lj7UFGltH/JctSP7oSB2ojvmoXD5OLCEeVdRVcDaSQKl48xcXKUwHKqVSmQ==", + "version": "0.206.0", + "resolved": "https://registry.npmjs.org/@fuzdev/gro/-/gro-0.206.0.tgz", + "integrity": "sha512-11nkTAEWDOvkgzynRChQS+bj3tc7R0NduB+eHLXzXZJqz66nc/oop8Ttvz0UkjTBPX/zzgtU8QuDDNyA7buf5A==", "dev": true, "license": "MIT", "dependencies": { + "@fuzdev/tsv_wasm": "^0.1.0", "chokidar": "^5.0.0", "dotenv": "^17.2.3", "esm-env": "^1.2.2", "oxc-parser": "^0.99.0", - "prettier": "^3.7.4", - "prettier-plugin-svelte": "^3.5.1", "ts-blank-space": "^0.6.2", "tslib": "^2.8.1" }, @@ -1216,6 +1213,22 @@ } } }, + "node_modules/@fuzdev/tsv_wasm": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@fuzdev/tsv_wasm/-/tsv_wasm-0.1.0.tgz", + "integrity": "sha512-hlZxdL1c5jiMyLnMv3NWONxNR64JChNekxlsKEJxXvgr/bmcRsgF1XuyabOTtppW9C+9HUvCpklJgJeU4aZbKw==", + "dev": true, + "license": "MIT", + "bin": { + "tsv": "cli.js" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://www.ryanatkn.com/funding" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "dev": true, @@ -3770,29 +3783,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prettier": { - "version": "3.7.4", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-plugin-svelte": { - "version": "3.5.1", - "dev": true, - "license": "MIT", - "peerDependencies": { - "prettier": "^3.0.0", - "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" - } - }, "node_modules/punycode": { "version": "2.3.1", "dev": true, diff --git a/package.json b/package.json index 9bab0004f..e4c224c35 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@fuzdev/fuz_code": "^0.46.1", "@fuzdev/fuz_css": "^0.63.2", "@fuzdev/fuz_util": "^0.65.1", - "@fuzdev/gro": "^0.205.1", + "@fuzdev/gro": "^0.206.0", "@fuzdev/mdz": "^0.1.0", "@ryanatkn/eslint-config": "^0.12.1", "@sveltejs/adapter-static": "^3.0.10", @@ -79,8 +79,6 @@ "eslint-plugin-svelte": "^3.19.0", "esm-env": "^1.2.2", "jsdom": "^29.1.1", - "prettier": "^3.7.4", - "prettier-plugin-svelte": "^3.5.1", "svelte": "^5.56.3", "svelte-check": "^4.6.0", "svelte-docinfo": "^0.5.1", @@ -91,23 +89,6 @@ "vitest": "^4.0.15", "zod": "^4.3.6" }, - "prettier": { - "plugins": [ - "prettier-plugin-svelte" - ], - "useTabs": true, - "printWidth": 100, - "singleQuote": true, - "bracketSpacing": false, - "overrides": [ - { - "files": "package.json", - "options": { - "useTabs": false - } - } - ] - }, "sideEffects": [ "**/*.css" ], diff --git a/src/lib/Alert.svelte b/src/lib/Alert.svelte index 89d08b1e7..5a659b13d 100644 --- a/src/lib/Alert.svelte +++ b/src/lib/Alert.svelte @@ -22,8 +22,7 @@ div_attrs, children, ...rest - }: // generic element attrs, the common denominator of the rendered roots - - // branch-specific attributes go in `button_attrs`/`div_attrs` + }: // generic element attrs, the common denominator of the rendered roots - // branch-specific attributes go in `button_attrs`/`div_attrs` HTMLAttributes & { status?: AlertStatus; color?: string; @@ -33,7 +32,11 @@ /** Renders the alert as a ` {@render custom_close_button_example()}

- is optional. Pass children directly for full control of - the surface: + is optional. Pass children directly for full control + of the surface:

- By default the dialog is centered. Pass align="top" to anchor it near the top of the - page and grow downward, which avoids the jumpiness of a centered dialog whose content changes height. - Add and remove items in the demo to compare: + By default the dialog is centered. Pass align="top" to anchor it near the top of + the page and grow downward, which avoids the jumpiness of a centered dialog whose content + changes height. Add and remove items in the demo to compare:

Clicking outside the content closes the dialog by default. Pass - dismissable={'{false}'} to disable click-outside (Escape and your own buttons - still close it): + dismissable={'{false}'} to disable click-outside (Escape and your own + buttons still close it):

close {/snippet}

- The close button in the top-right is custom: it spreads attrs to extend the default - behavior. + The close button in the top-right is custom: it spreads attrs to extend the + default behavior.

{@render custom_close_button_example()} @@ -327,7 +329,8 @@ - new stuff appears {#if selected_align === 'top'}gracefully{:else if selected_align === 'center'}ungracefully{/if} + new stuff appears {#if selected_align === 'top'}gracefully{:else if selected_align === + 'center'}ungracefully{/if}

{/each} diff --git a/src/routes/docs/Docs/+page.svelte b/src/routes/docs/Docs/+page.svelte index 6a8df3c55..cdc96e4da 100644 --- a/src/routes/docs/Docs/+page.svelte +++ b/src/routes/docs/Docs/+page.svelte @@ -17,17 +17,18 @@

- is the top-level component behind fuz_ui's docs system, which is - used to construct this page, and all of the other /docs pages in the Fuz stack. - It has a three-column responsive layout with managed navigation and uses ordinary SvelteKit - patterns: it takes an array of s and renders the current page - as children, so it lives in a + is the top-level component behind fuz_ui's docs system, which + is used to construct this page, and all of the other /docs pages in the Fuz + stack. It has a three-column responsive layout with managed navigation and uses ordinary + SvelteKit patterns: it takes an array of s and renders the + current page as children, so it lives in a +layout.svelte wrapping your docs routes.

- It requires two contexts: site_context (a for - components like ) set once at the root layout (typically the - root, anywhere up the tree works), and + It requires two contexts: site_context (a for components like ) set once at the root layout (typically + the root, anywhere up the tree works), and library_context (a ) set in the docs layout:

- Set it into library_context at the docs layout. reads it for - navigation, and and render - it: + Set it into library_context at the docs layout. reads it + for navigation, and and render it:

as described above. See for the surrounding layout, and - / for the components that render - it. + / for the components that + render it.

diff --git a/src/routes/docs/LibraryDetail/+page.svelte b/src/routes/docs/LibraryDetail/+page.svelte index ca1eae2bc..298c5f9e2 100644 --- a/src/routes/docs/LibraryDetail/+page.svelte +++ b/src/routes/docs/LibraryDetail/+page.svelte @@ -20,19 +20,20 @@

- renders the full metadata for a library and its repo, including - its module and declaration index. See the for how to construct one from + renders the full metadata for a library and its repo, + including its module and declaration index. See the for how to + construct one from and virtual:svelte-docinfo:

`} />

- It projects its library prop into for its - subtree, so the module and declaration links resolve against the rendered library even when it differs - from the site's own. When rendering a foreign library, pass - links_full so the links point at the library's deployed docs instead of site-local - paths: + It projects its library prop into for + its subtree, so the module and declaration links resolve against the rendered library even + when it differs from the site's own. When rendering a foreign library, pass + links_full so the links point at the library's deployed docs instead of + site-local paths:

`} />
diff --git a/src/routes/docs/LibrarySummary/+page.svelte b/src/routes/docs/LibrarySummary/+page.svelte index 6cc1d9096..a35beedb2 100644 --- a/src/routes/docs/LibrarySummary/+page.svelte +++ b/src/routes/docs/LibrarySummary/+page.svelte @@ -20,8 +20,8 @@

- renders a compact card for a library and its repo. See - the Library for how to construct one from renders a compact card for a library and its repo. + See the Library for how to construct one from and virtual:svelte-docinfo: diff --git a/src/routes/docs/PendingAnimation/+page.svelte b/src/routes/docs/PendingAnimation/+page.svelte index c9a602142..895ca8670 100644 --- a/src/routes/docs/PendingAnimation/+page.svelte +++ b/src/routes/docs/PendingAnimation/+page.svelte @@ -44,21 +44,30 @@

Set size with custom properties:

`} + content={``} />

Set size with classes:

`} + content={``} />

Size is inherited by default:

`} + content={`
`} />
@@ -68,7 +77,10 @@ With inline `} + content={``} />

with @@ -83,7 +95,10 @@ + content={` {${turtle_slot}} `} /> @@ -145,7 +160,10 @@ `} + content={``} />

- Set --text_color on the component or a parent, for svgs that have no default fill: + Set --text_color on the component or a parent, for svgs that have no default + fill:

`} diff --git a/src/routes/docs/ThemeRoot/+page.svelte b/src/routes/docs/ThemeRoot/+page.svelte index ff9050530..f597222ca 100644 --- a/src/routes/docs/ThemeRoot/+page.svelte +++ b/src/routes/docs/ThemeRoot/+page.svelte @@ -44,8 +44,8 @@ and custom themes based on fuz_css style variables, which use CSS custom properties. - is a singleton component that's mounted at the top-level of - the page: + is a singleton component that's mounted at the top-level + of the page:

\n\n\t{@render children()}\n`} /> @@ -72,8 +72,8 @@ {#snippet summary()}Why nested children?{/snippet}