diff --git a/.gitignore b/.gitignore index bdef460f..5117c8d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,15 @@ # Deps -node_modules +node_modules/ # Output -/.svelte-kit -/build -/dist -/dist_* -/target -/.gro -/.zzz +.svelte-kit/ +build/ +dist/ +dist_*/ +target/ +.gro/ +.fuz/ +.zzz/ # Env .env* diff --git a/CLAUDE.md b/CLAUDE.md index 82afa1ba..0a380343 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,6 +6,16 @@ A modernized fork of PrismJS optimized for runtime syntax highlighting. See [README.md](./README.md). +## Gro commands + +```bash +gro check # typecheck, test, lint, format check (run before committing) +gro typecheck # typecheck only (faster iteration) +gro test # run tests with vitest +gro gen # regenerate .gen files +gro build # build the package for production +``` + ## Commands ```bash @@ -48,8 +58,8 @@ The system uses regex-based tokenization inherited from PrismJS, maintaining com #### Themes -- `src/lib/theme.css` - CSS classes for HTML mode (requires Fuz CSS or theme_variables.css) -- `src/lib/theme_variables.css` - CSS variable definitions for non-Fuz CSS users +- `src/lib/theme.css` - CSS classes for HTML mode (requires fuz_css or theme_variables.css) +- `src/lib/theme_variables.css` - CSS variable definitions for non-fuz_css users ## How It Works @@ -142,10 +152,12 @@ An experimental alternative component (`CodeHighlight.svelte`) is available that for browsers that implement it. This is not recommended for general use due to limited browser support. **Components:** + - `src/lib/CodeHighlight.svelte` - Hybrid component supporting both HTML and range modes with auto-detection - `src/lib/highlight_manager.ts` - Manages CSS Custom Highlights per element **Theme:** + - `src/lib/theme_highlight.css` - CSS with both `.token_*` classes and `::highlight()` pseudo-elements #### Range Highlighting Implementation @@ -203,7 +215,7 @@ Results show relative performance (% of fastest) for each language and content s ## Color Variables -Theme uses CSS variables from Fuz CSS: +Theme uses CSS variables from fuz_css: - `--color_a` - Keywords, tags - `--color_b` - Strings, selectors diff --git a/README.md b/README.md index ae2dcdcb..fe02e188 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ but there are two optional dependencies: based on [`prism-svelte`](https://github.com/pngwn/prism-svelte) and a [Svelte component](src/lib/Code.svelte) for convenient usage. - The [default theme](src/lib/theme.css) integrates - with my CSS library [Fuz CSS](https://github.com/fuzdev/fuz_css) for colors that adapt to the user's runtime `color-scheme` preference. - Non-Fuz CSS users should import [theme_variables.css](src/lib/theme_variables.css) + with my CSS library [fuz_css](https://github.com/fuzdev/fuz_css) for colors that adapt to the user's runtime `color-scheme` preference. + Non-fuz_css users should import [theme_variables.css](src/lib/theme_variables.css) or otherwise define those variables. Compared to [Shiki](https://github.com/shikijs/shiki), @@ -79,14 +79,14 @@ import '@fuzdev/fuz_code/theme.css'; ``` The primary themes (currently just [one](src/lib/theme.css)) have a dependency -on my CSS library [Fuz CSS](https://github.com/fuzdev/fuz_css) +on my CSS library [fuz_css](https://github.com/fuzdev/fuz_css) for [color-scheme](https://css.fuz.dev/docs/themes) awareness. -See the [Fuz CSS docs](https://css.fuz.dev/) for its usage. +See the [fuz_css docs](https://css.fuz.dev/) for its usage. -If you're not using Fuz CSS, import `theme_variables.css` alongside `theme.css`: +If you're not using fuz_css, import `theme_variables.css` alongside `theme.css`: ```ts -// Without Fuz CSS: +// Without fuz_css: import '@fuzdev/fuz_code/theme.css'; import '@fuzdev/fuz_code/theme_variables.css'; ``` @@ -96,9 +96,9 @@ import '@fuzdev/fuz_code/theme_variables.css'; - [@fuzdev/fuz_code/syntax_styler_global.js](src/lib/syntax_styler_global.ts) - pre-configured instance with all grammars - [@fuzdev/fuz_code/syntax_styler.js](src/lib/syntax_styler.ts) - base class for custom grammars - [@fuzdev/fuz_code/theme.css](src/lib/theme.css) - - default theme that depends on [Fuz CSS](https://github.com/fuzdev/fuz_css) + default theme that depends on [fuz_css](https://github.com/fuzdev/fuz_css) - [@fuzdev/fuz_code/theme_variables.css](src/lib/theme_variables.css) - - CSS variables for non-Fuz CSS users + CSS variables for non-fuz_css users - [@fuzdev/fuz_code/Code.svelte](src/lib/Code.svelte) - Svelte component for syntax highlighting with HTML generation diff --git a/package-lock.json b/package-lock.json index b69eebd0..f3731ce1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,16 +10,17 @@ "license": "MIT", "devDependencies": { "@changesets/changelog-git": "^0.2.1", - "@fuzdev/fuz_css": "^0.43.0", - "@fuzdev/fuz_ui": "^0.177.0", - "@fuzdev/fuz_util": "^0.45.1", + "@fuzdev/fuz_css": "^0.44.1", + "@fuzdev/fuz_ui": "^0.178.2", + "@fuzdev/fuz_util": "^0.45.3", "@ryanatkn/eslint-config": "^0.9.0", - "@ryanatkn/gro": "^0.184.0", + "@ryanatkn/gro": "^0.186.0", "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.49.1", "@sveltejs/package": "^2.5.7", "@sveltejs/vite-plugin-svelte": "^6.2.1", "@types/node": "^24.10.1", + "@webref/css": "^8.2.0", "eslint": "^9.39.1", "eslint-plugin-svelte": "^3.13.1", "esm-env": "^1.2.2", @@ -39,7 +40,7 @@ "url": "https://www.ryanatkn.com/funding" }, "peerDependencies": { - "@fuzdev/fuz_css": ">=0.41.0", + "@fuzdev/fuz_css": ">=0.44.1", "svelte": "^5" }, "peerDependenciesMeta": { @@ -69,9 +70,9 @@ "license": "MIT" }, "node_modules/@emnapi/core": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", - "integrity": "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.8.1.tgz", + "integrity": "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==", "dev": true, "license": "MIT", "optional": true, @@ -81,9 +82,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", - "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", + "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", "dev": true, "license": "MIT", "optional": true, @@ -728,9 +729,9 @@ } }, "node_modules/@fuzdev/fuz_css": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@fuzdev/fuz_css/-/fuz_css-0.43.0.tgz", - "integrity": "sha512-wEQzeuniCq0t4db4qIuoQftfQ7KHeWEBGlkRo4Kk6N+dAT7ke3e2Q6Ji4t1ofgeb12kHLwZP0wTOuGVCBfF2tA==", + "version": "0.44.1", + "resolved": "https://registry.npmjs.org/@fuzdev/fuz_css/-/fuz_css-0.44.1.tgz", + "integrity": "sha512-WZ+Tws9/QeRx1FH+oSY6ZIZJ8PAnvfMMuzXXG27+YY+/Yj06mGdQRX8ct4ANp9l2Ll1sJJkA6NnVvQsIfbL9dw==", "dev": true, "license": "MIT", "engines": { @@ -740,18 +741,34 @@ "url": "https://www.ryanatkn.com/funding" }, "peerDependencies": { - "@fuzdev/fuz_util": ">=0.42.0" + "@fuzdev/fuz_util": ">=0.45.3", + "@sveltejs/acorn-typescript": "^1", + "@webref/css": "^8", + "acorn-jsx": "^5", + "zimmerframe": "^1" }, "peerDependenciesMeta": { "@fuzdev/fuz_util": { "optional": true + }, + "@sveltejs/acorn-typescript": { + "optional": true + }, + "@webref/css": { + "optional": true + }, + "acorn-jsx": { + "optional": true + }, + "zimmerframe": { + "optional": true } } }, "node_modules/@fuzdev/fuz_ui": { - "version": "0.177.0", - "resolved": "https://registry.npmjs.org/@fuzdev/fuz_ui/-/fuz_ui-0.177.0.tgz", - "integrity": "sha512-b9LEzjL78NHtEI0yDOCTz/XyUjm/sdrCDSQ4jNHOtpANOF8cRijemldXWcfs9UEoexnIK8wDg8WV4OnpD5Hvqw==", + "version": "0.178.2", + "resolved": "https://registry.npmjs.org/@fuzdev/fuz_ui/-/fuz_ui-0.178.2.tgz", + "integrity": "sha512-DPUx9JWGQNOXABULwgf53rAVo/KS7/3R5FnNPYhJRhROGZ1wtmSMbdyTIILC6ojILSs97Ys+jG73RZkN5E0tRA==", "dev": true, "license": "MIT", "engines": { @@ -761,11 +778,11 @@ "url": "https://www.ryanatkn.com/funding" }, "peerDependencies": { - "@fuzdev/fuz_code": ">=0.37.0", - "@fuzdev/fuz_css": ">=0.40.0", - "@fuzdev/fuz_util": ">=0.42.0", + "@fuzdev/fuz_code": ">=0.39.0", + "@fuzdev/fuz_css": ">=0.44.1", + "@fuzdev/fuz_util": ">=0.45.3", "@jridgewell/trace-mapping": "^0.3", - "@ryanatkn/gro": ">=0.183.0", + "@ryanatkn/gro": ">=0.186.0", "@sveltejs/kit": "^2.47.3", "esm-env": "^1", "svelte": "^5", @@ -788,9 +805,9 @@ } }, "node_modules/@fuzdev/fuz_util": { - "version": "0.45.1", - "resolved": "https://registry.npmjs.org/@fuzdev/fuz_util/-/fuz_util-0.45.1.tgz", - "integrity": "sha512-szJ6FPXkeuNzoqxXwiC1q9xMiWZM37wiCyGdFLVVBq8FxwIpG1MAup/ZFyQC22QLg8sdybCbPadWiaYYUhhtUA==", + "version": "0.45.3", + "resolved": "https://registry.npmjs.org/@fuzdev/fuz_util/-/fuz_util-0.45.3.tgz", + "integrity": "sha512-N0xaUwFxGG1FuEkcVqB4t8Gqs2ReCVmmQf1kI7gErGuyKV9mRycHSFWFyT7/hQ9K4/0epsZj4cejj5fYIjkG/Q==", "dev": true, "license": "MIT", "engines": { @@ -933,9 +950,9 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.0.tgz", - "integrity": "sha512-Fq6DJW+Bb5jaWE69/qOE0D1TUN9+6uWhCeZpdnSBk14pjLcCWR7Q8n49PTSPHazM37JqrsdpEthXy2xn6jWWiA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz", + "integrity": "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==", "dev": true, "license": "MIT", "optional": true, @@ -943,6 +960,10 @@ "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1", "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" } }, "node_modules/@oxc-parser/binding-android-arm64": { @@ -1519,9 +1540,9 @@ } }, "node_modules/@ryanatkn/gro": { - "version": "0.184.0", - "resolved": "https://registry.npmjs.org/@ryanatkn/gro/-/gro-0.184.0.tgz", - "integrity": "sha512-J8Us3xspyjVBCuOG36+4X9qZiH5ydrjRRSN9Pfwk+xNgJsH5v11GXTl9PLkKvHJVHJ8qb4KFX/XA1k8bAmIM5g==", + "version": "0.186.0", + "resolved": "https://registry.npmjs.org/@ryanatkn/gro/-/gro-0.186.0.tgz", + "integrity": "sha512-Yq/KtVKUpcYarJ9Xuh7OGJoDf9OYCZtRAeVSgIfv54gt2O13J+TMDp9ESnXc5Ohfs4t2QvyCeEmLEL0mW6PSpQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1530,8 +1551,8 @@ "esm-env": "^1.2.2", "mri": "^1.2.0", "oxc-parser": "^0.99.0", - "prettier": "^3.6.2", - "prettier-plugin-svelte": "^3.4.0", + "prettier": "^3.7.4", + "prettier-plugin-svelte": "^3.4.1", "ts-blank-space": "^0.6.2", "tslib": "^2.8.1", "zod": "^4.1.13" @@ -1549,7 +1570,7 @@ "vitest": "^3 || ^4" }, "peerDependencies": { - "@fuzdev/fuz_util": ">=0.42.0", + "@fuzdev/fuz_util": ">=0.45.3", "@sveltejs/kit": "^2", "esbuild": "^0.27.0", "svelte": "^5", @@ -2181,6 +2202,16 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/@webref/css": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@webref/css/-/css-8.2.0.tgz", + "integrity": "sha512-BSTwlyJwR2LotmT6GTmO5WIPPORr+4lU39vDBWNVEFnLo9w3XYCuHU4lmmd8OY5Zj9ykadg6pfJ/1cFHxzyr3w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "css-tree": "^3.1.0" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -2407,6 +2438,21 @@ "node": ">= 8" } }, + "node_modules/css-tree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", + "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "mdn-data": "2.12.2", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -3120,6 +3166,14 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/mdn-data": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", + "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", + "dev": true, + "license": "CC0-1.0", + "peer": true + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", diff --git a/package.json b/package.json index 5588136b..05419520 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "node": ">=22.15" }, "peerDependencies": { - "@fuzdev/fuz_css": ">=0.41.0", + "@fuzdev/fuz_css": ">=0.44.1", "svelte": "^5" }, "peerDependenciesMeta": { @@ -45,16 +45,17 @@ }, "devDependencies": { "@changesets/changelog-git": "^0.2.1", - "@fuzdev/fuz_css": "^0.43.0", - "@fuzdev/fuz_ui": "^0.177.0", - "@fuzdev/fuz_util": "^0.45.1", + "@fuzdev/fuz_css": "^0.44.1", + "@fuzdev/fuz_ui": "^0.178.2", + "@fuzdev/fuz_util": "^0.45.3", "@ryanatkn/eslint-config": "^0.9.0", - "@ryanatkn/gro": "^0.184.0", + "@ryanatkn/gro": "^0.186.0", "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.49.1", "@sveltejs/package": "^2.5.7", "@sveltejs/vite-plugin-svelte": "^6.2.1", "@types/node": "^24.10.1", + "@webref/css": "^8.2.0", "eslint": "^9.39.1", "eslint-plugin-svelte": "^3.13.1", "esm-env": "^1.2.2", diff --git a/src/lib/Code.svelte b/src/lib/Code.svelte index e6cc2bc7..58082d1c 100644 --- a/src/lib/Code.svelte +++ b/src/lib/Code.svelte @@ -136,7 +136,7 @@ > diff --git a/src/lib/theme_variables.css b/src/lib/theme_variables.css index 354851c6..6b1e3a47 100644 --- a/src/lib/theme_variables.css +++ b/src/lib/theme_variables.css @@ -1,7 +1,7 @@ /* -CSS variables for syntax highlighting when not using Fuz CSS. -Import this alongside theme.css if you're not using Fuz CSS. +CSS variables for syntax highlighting when not using fuz_css. +Import this alongside theme.css if you're not using fuz_css. */ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index aa625b0b..31514b6a 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -12,8 +12,8 @@ const library = library_context.get(); -
-
+
+
diff --git a/src/routes/CodeTome.svelte b/src/routes/CodeTome.svelte index edbed664..d9e6a43c 100644 --- a/src/routes/CodeTome.svelte +++ b/src/routes/CodeTome.svelte @@ -41,7 +41,7 @@ import '@fuzdev/fuz_code/theme.css'; // add this"

Dependencies

- By default fuz_code depends on Fuz CSS to provide + By default fuz_code depends on fuz_css to provide color-schema-aware color variables. If you're not using it, import theme_variables.css or bring your own:

@@ -49,7 +49,7 @@ import '@fuzdev/fuz_code/theme.css'; // add this" lang="ts" content="// +layout.svelte import '@fuzdev/fuz_code/theme.css'; -import '@fuzdev/fuz_code/theme_variables.css'; // also this if not using Fuz CSS" +import '@fuzdev/fuz_code/theme_variables.css'; // also this if not using fuz_css" />
diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index 5dd36089..b349b1d1 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -8,15 +8,15 @@ const library = library_context.get(); -
+

{library.repo_name}

{library.package_json.glyph}
-
-
+
+
diff --git a/src/routes/benchmark/+page.svelte b/src/routes/benchmark/+page.svelte index 21fb82d2..d8efbb3b 100644 --- a/src/routes/benchmark/+page.svelte +++ b/src/routes/benchmark/+page.svelte @@ -81,10 +81,10 @@ }; -
+

benchmark

- chromium --js-flags="--expose-gc" + chromium --js-flags="--expose-gc"

diff --git a/src/routes/fuz.css b/src/routes/fuz.css index eecaa019..9dd85384 100644 --- a/src/routes/fuz.css +++ b/src/routes/fuz.css @@ -6,58 +6,38 @@ align-items: center; justify-content: center; } - /* can be used to override the direction of a `.box` */ .row { display: flex; flex-direction: row; align-items: center; } - .ellipsis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } - -.width_upto_sm { - width: 100%; - max-width: var(--distance_sm); -} - -.width_upto_md { - width: 100%; - max-width: var(--distance_md); -} - -.width_upto_lg { - width: 100%; - max-width: var(--distance_lg); -} - -/* A pane is a box floating over the page, like for dialogs. - By default it's opaque, resetting the background to the initial depth. */ +/* A pane is a box floating over the page, like for dialogs. By default it's opaque, resetting the background to the initial depth. */ .pane { background-color: var(--pane_bg, var(--bg)); box-shadow: var( --pane_shadow, - /* TODO this is terrible, maybe add all the variables? should be culled anyway? */ var(--shadow_bottom_md) color-mix(in hsl, var(--shadow_color) var(--shadow_alpha_3), transparent) ); border-radius: var(--border_radius_xs); } - /* A panel is a box embedded into the page, useful for visually isolating content. */ .panel { border-radius: var(--border_radius_xs); background-color: var(--panel_bg, var(--fg_1)); } - -/* TODO other button variants? */ -/* TODO this is slightly strange that it doesn't use --icon_size */ -/* These are used as modifiers to buttons, and so they use `:where` so they cascade. */ +/* +TODO other button variants? +TODO this is slightly strange that it doesn't use --icon_size. +These are used as modifiers to buttons. +*/ .icon_button { width: var(--input_height); height: var(--input_height); @@ -68,7 +48,6 @@ font-weight: 900; padding: 0; } - /* TODO maybe this belongs with the reset, like `selected`? or does `selected` belong here? */ .plain:not(:hover) { --border_color: transparent; @@ -79,7 +58,6 @@ .plain:active { --border_color: transparent; } - .menu_item { --border_radius: 0; --border_color: var(--border_color_3); @@ -137,7 +115,6 @@ text-overflow: ellipsis; line-height: var(--line_height_lg); /* prevents the bottom of g's and others from being cut off */ } - .chip { font-weight: 500; padding-left: var(--space_xs); @@ -148,37 +125,6 @@ a.chip { font-weight: 600; } - -.position_relative { - position: relative; -} -.position_absolute { - position: absolute; -} -.position_sticky { - position: sticky; -} -.display_block { - display: block; -} -.display_inline_block { - display: inline-block; -} -.display_flex { - display: flex; -} -.flex_1 { - flex: 1; -} -.flex_wrap_wrap { - flex-wrap: wrap; -} -.justify_content_center { - justify-content: center; -} -.justify_content_space_between { - justify-content: space-between; -} .font_size_sm { font-size: var(--font_size_sm); --font_size: var(--font_size_sm); @@ -199,18 +145,6 @@ a.chip { font-size: var(--font_size_xl2); --font_size: var(--font_size_xl2); } -.text_align_center { - text-align: center; -} -.word_break_break_all { - word-break: break-all; -} -.white_space_pre { - white-space: pre; -} -.white_space_pre_wrap { - white-space: pre-wrap; -} .text_color_3 { color: var(--text_color_3); } @@ -255,17 +189,17 @@ a.chip { box-shadow: var(--shadow_inset_xs) color-mix(in hsl, var(--shadow_color) var(--shadow_alpha, var(--shadow_alpha_1)), transparent); } -.width_100 { +.width_atmost_sm { width: 100%; + max-width: var(--distance_sm); } -.height_100 { - height: 100%; -} -.top_0 { - top: 0; +.width_atmost_md { + width: 100%; + max-width: var(--distance_md); } -.right_0 { - right: 0; +.width_atmost_lg { + width: 100%; + max-width: var(--distance_lg); } .p_md { padding: var(--space_md); @@ -383,13 +317,62 @@ a.chip { .gap_xl3 { gap: var(--space_xl3); } -.font_weight_400 { +.display\:block { + display: block; +} +.display\:flex { + display: flex; +} +.flex-wrap\:wrap { + flex-wrap: wrap; +} +.flex\:1 { + flex: 1; +} +.font-weight\:400 { font-weight: 400; - --font_weight: 400; } -.font_weight_500 { +.font-weight\:500 { font-weight: 500; - --font_weight: 500; +} +.height\:100\% { + height: 100%; +} +.justify-content\:center { + justify-content: center; +} +.justify-content\:space-between { + justify-content: space-between; +} +.position\:absolute { + position: absolute; +} +.position\:relative { + position: relative; +} +.position\:sticky { + position: sticky; +} +.right\:0 { + right: 0; +} +.text-align\:center { + text-align: center; +} +.top\:0 { + top: 0; +} +.white-space\:pre { + white-space: pre; +} +.white-space\:pre-wrap { + white-space: pre-wrap; +} +.width\:100\% { + width: 100%; +} +.word-break\:break-all { + word-break: break-all; } /* generated by src/routes/fuz.gen.css.ts */ diff --git a/src/routes/library.json b/src/routes/library.json index 7cd772d4..6d06c5e3 100644 --- a/src/routes/library.json +++ b/src/routes/library.json @@ -43,7 +43,7 @@ "node": ">=22.15" }, "peerDependencies": { - "@fuzdev/fuz_css": ">=0.41.0", + "@fuzdev/fuz_css": ">=0.44.1", "svelte": "^5" }, "peerDependenciesMeta": { @@ -56,16 +56,17 @@ }, "devDependencies": { "@changesets/changelog-git": "^0.2.1", - "@fuzdev/fuz_css": "^0.43.0", - "@fuzdev/fuz_ui": "^0.177.0", - "@fuzdev/fuz_util": "^0.45.1", + "@fuzdev/fuz_css": "^0.44.1", + "@fuzdev/fuz_ui": "^0.178.2", + "@fuzdev/fuz_util": "^0.45.3", "@ryanatkn/eslint-config": "^0.9.0", - "@ryanatkn/gro": "^0.184.0", + "@ryanatkn/gro": "^0.186.0", "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.49.1", "@sveltejs/package": "^2.5.7", "@sveltejs/vite-plugin-svelte": "^6.2.1", "@types/node": "^24.10.1", + "@webref/css": "^8.2.0", "eslint": "^9.39.1", "eslint-plugin-svelte": "^3.13.1", "esm-env": "^1.2.2", diff --git a/src/routes/samples/+page.svelte b/src/routes/samples/+page.svelte index eec11ed2..2a47ea04 100644 --- a/src/routes/samples/+page.svelte +++ b/src/routes/samples/+page.svelte @@ -9,15 +9,15 @@ import Footer from '$routes/Footer.svelte'; -
+
🎨
-

HTML rendering (default)

+

HTML rendering (default)

{#each Object.values(samples) as sample (sample.name)}
-

{sample.lang}

+

{sample.lang}

{/each} @@ -37,9 +37,9 @@
-

CSS Custom Highlight API (experimental)

+

CSS Custom Highlight API (experimental)