@fuzdev/fuz_ui 0.183.1 โ†’ 0.184.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  <ul>
10
10
  <li>
11
11
  <a rel="me" href="https://www.fuz.dev/" class:selected={selected === 'fuz.dev'}>fuz.dev</a>
12
- - the Fuz project homepage{#if selected === 'fuz.dev'}, you are here{/if}
12
+ - the Fuz stack homepage{#if selected === 'fuz.dev'}, you are here{/if}
13
13
  </li>
14
14
  <li>
15
15
  GitHub as <a rel="me" href="https://github.com/fuzdev">@fuzdev</a>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import Svg, {type SvgData} from './Svg.svelte';
3
3
  import {
4
+ logo_fuz,
4
5
  logo_fuz_ui,
5
6
  logo_fuz_code,
6
7
  logo_fuz_blog,
@@ -9,6 +10,7 @@
9
10
  logo_fuz_template,
10
11
  logo_fuz_css,
11
12
  logo_fuz_util,
13
+ logo_gro,
12
14
  } from './logos.js';
13
15
 
14
16
  // TODO refactor
@@ -27,11 +29,13 @@
27
29
  {name: 'fuz_ui', url: 'https://ui.fuz.dev/', logo: logo_fuz_ui, description: 'Svelte UI library', glyph: '๐Ÿงถ', color_class: 'color_c_50'},
28
30
  {name: 'fuz_css', url: 'https://css.fuz.dev/', logo: logo_fuz_css, description: 'CSS framework and design system', glyph: '๐ŸŒฟ', color_class: 'color_b_50'},
29
31
  {name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a static web app and Node library template with TypeScript, Svelte, SvelteKit, Vite, esbuild, Fuz, and Gro', glyph: 'โ„', color_class: 'color_h_50'},
32
+ {name: 'fuz_docs', url: 'https://docs.fuz.dev/', logo: logo_fuz, description: 'AI-generated documentation and skills for the Fuz stack', glyph: 'โ„', color_class: 'color_i_50'},
30
33
  {name: 'fuz_code', url: 'https://code.fuz.dev/', logo: logo_fuz_code, description: 'syntax styling utilities and components for TypeScript, Svelte, SvelteKit', glyph: '๐ŸŽจ', color_class: 'color_g_50'},
31
34
  {name: 'fuz_blog', url: 'https://blog.fuz.dev/', logo: logo_fuz_blog, description: 'blog software from scratch with SvelteKit', glyph: '๐Ÿ–Š๏ธ', color_class: 'color_e_50'},
32
35
  {name: 'fuz_mastodon', url: 'https://mastodon.fuz.dev/', logo: logo_fuz_mastodon, description: 'Mastodon components and helpers for Svelte, SvelteKit, and Fuz', glyph: '๐Ÿฆฃ', color_class: 'color_d_50'},
33
36
  {name: 'fuz_gitops', url: 'https://gitops.fuz.dev/', logo: logo_fuz_gitops, description: 'a tool for managing many repos', glyph: '๐Ÿช„', color_class: 'color_a_50'},
34
37
  {name: 'fuz_util', url: 'https://util.fuz.dev/', logo: logo_fuz_util, description: 'utility belt for JS', glyph: '๐Ÿฆ•', color_class: 'color_f_50'},
38
+ {name: 'gro', url: 'https://github.com/fuzdev/gro', logo: logo_gro, description: 'task runner and toolkit extending SvelteKit', glyph: '๐ŸŒฐ', color_class: 'color_f_50'},
35
39
  ];
36
40
  </script>
37
41
 
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectLinks.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ProjectLinks.svelte"],"names":[],"mappings":"AAkEA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAA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D,iBAAiB,UAAgC;IACjD,cAAc,UAA+D;IAC7E,SAAS,UAAqD;IAC9D,YAAY,UAAuE;gBAEvE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe;CAI7D"}
@@ -22,7 +22,7 @@ export class Declaration {
22
22
  /**
23
23
  * API documentation URL.
24
24
  */
25
- url_api = $derived(`/docs/api/${this.module_path}#${this.name}`);
25
+ url_api = $derived(`/docs/api${this.library.url_prefix}/${this.module_path}#${this.name}`);
26
26
  /**
27
27
  * Generated TypeScript import statement.
28
28
  */
@@ -1,6 +1,10 @@
1
1
  import type { LibraryJson } from '@fuzdev/fuz_util/library_json.js';
2
2
  import { Declaration } from './declaration.svelte.js';
3
3
  import { Module } from './module.svelte.js';
4
+ /**
5
+ * Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
6
+ */
7
+ export declare const parse_library_url_prefix: (value: unknown) => string;
4
8
  /**
5
9
  * Rich runtime representation of a library.
6
10
  *
@@ -12,6 +16,12 @@ import { Module } from './module.svelte.js';
12
16
  */
13
17
  export declare class Library {
14
18
  readonly library_json: LibraryJson;
19
+ /**
20
+ * URL path prefix for multi-package documentation sites.
21
+ * Prepended to `/docs/api/` paths in `Module.url_api` and `Declaration.url_api`.
22
+ * Default `''` preserves single-package behavior.
23
+ */
24
+ readonly url_prefix: string;
15
25
  package_json: {
16
26
  [x: string]: unknown;
17
27
  name: string;
@@ -171,7 +181,7 @@ export declare class Library {
171
181
  * Declaration lookup map by name. Provides O(1) lookup.
172
182
  */
173
183
  declaration_map: Map<string, Declaration>;
174
- constructor(library_json: LibraryJson);
184
+ constructor(library_json: LibraryJson, url_prefix?: string);
175
185
  /**
176
186
  * Look up a declaration by name.
177
187
  */
@@ -1 +1 @@
1
- {"version":3,"file":"library.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CA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AC;CAGtD;AAED,eAAO,MAAM,eAAe;;;;CAA4B,CAAC"}
@@ -1,6 +1,15 @@
1
+ import { ensure_start, strip_end } from '@fuzdev/fuz_util/string.js';
1
2
  import { create_context } from './context_helpers.js';
2
3
  import { Declaration } from './declaration.svelte.js';
3
4
  import { Module } from './module.svelte.js';
5
+ /**
6
+ * Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
7
+ */
8
+ export const parse_library_url_prefix = (value) => {
9
+ if (!value || typeof value !== 'string')
10
+ return '';
11
+ return ensure_start(strip_end(value, '/'), '/');
12
+ };
4
13
  /**
5
14
  * Rich runtime representation of a library.
6
15
  *
@@ -12,6 +21,12 @@ import { Module } from './module.svelte.js';
12
21
  */
13
22
  export class Library {
14
23
  library_json = $state.raw();
24
+ /**
25
+ * URL path prefix for multi-package documentation sites.
26
+ * Prepended to `/docs/api/` paths in `Module.url_api` and `Declaration.url_api`.
27
+ * Default `''` preserves single-package behavior.
28
+ */
29
+ url_prefix;
15
30
  package_json = $derived(this.library_json.package_json);
16
31
  source_json = $derived(this.library_json.source_json);
17
32
  name = $derived(this.library_json.name);
@@ -50,8 +65,9 @@ export class Library {
50
65
  * Declaration lookup map by name. Provides O(1) lookup.
51
66
  */
52
67
  declaration_map = $derived(new Map(this.declarations.map((d) => [d.name, d])));
53
- constructor(library_json) {
68
+ constructor(library_json, url_prefix = '') {
54
69
  this.library_json = library_json;
70
+ this.url_prefix = parse_library_url_prefix(url_prefix);
55
71
  }
56
72
  /**
57
73
  * Look up a declaration by name.
@@ -1 +1 @@
1
- {"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAGjD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D;;OAEG;IACH,UAAU,uBAAyC;gBAEvC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU;IAKrD;;OAEG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAG9D"}
@@ -26,7 +26,7 @@ export class Module {
26
26
  /**
27
27
  * API documentation URL for this module.
28
28
  */
29
- url_api = $derived(`/docs/api/${this.path}`);
29
+ url_api = $derived(`/docs/api${this.library.url_prefix}/${this.path}`);
30
30
  /**
31
31
  * GitHub source URL.
32
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.183.1",
3
+ "version": "0.184.0",
4
4
  "description": "Svelte UI library",
5
5
  "motto": "friendly user zystem",
6
6
  "glyph": "๐Ÿงถ",
@@ -75,13 +75,12 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@changesets/changelog-git": "^0.2.1",
78
- "@fuzdev/fuz_code": "^0.45.0",
79
- "@fuzdev/fuz_css": "^0.49.1",
78
+ "@fuzdev/fuz_code": "^0.45.1",
79
+ "@fuzdev/fuz_css": "^0.51.0",
80
80
  "@fuzdev/fuz_util": "^0.50.1",
81
- "@fuzdev/gro": "^0.192.1",
81
+ "@fuzdev/gro": "^0.194.0",
82
82
  "@jridgewell/trace-mapping": "^0.3.31",
83
83
  "@ryanatkn/eslint-config": "^0.9.0",
84
- "@ryanatkn/gro": "^0.191.0",
85
84
  "@sveltejs/adapter-static": "^3.0.10",
86
85
  "@sveltejs/kit": "^2.50.1",
87
86
  "@sveltejs/package": "^2.5.7",
@@ -40,7 +40,7 @@ export class Declaration {
40
40
  /**
41
41
  * API documentation URL.
42
42
  */
43
- url_api = $derived(`/docs/api/${this.module_path}#${this.name}`);
43
+ url_api = $derived(`/docs/api${this.library.url_prefix}/${this.module_path}#${this.name}`);
44
44
 
45
45
  /**
46
46
  * Generated TypeScript import statement.
@@ -1,9 +1,18 @@
1
1
  import type {LibraryJson} from '@fuzdev/fuz_util/library_json.js';
2
+ import {ensure_start, strip_end} from '@fuzdev/fuz_util/string.js';
2
3
 
3
4
  import {create_context} from './context_helpers.js';
4
5
  import {Declaration} from './declaration.svelte.js';
5
6
  import {Module} from './module.svelte.js';
6
7
 
8
+ /**
9
+ * Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
10
+ */
11
+ export const parse_library_url_prefix = (value: unknown): string => {
12
+ if (!value || typeof value !== 'string') return '';
13
+ return ensure_start(strip_end(value, '/'), '/');
14
+ };
15
+
7
16
  /**
8
17
  * Rich runtime representation of a library.
9
18
  *
@@ -16,6 +25,13 @@ import {Module} from './module.svelte.js';
16
25
  export class Library {
17
26
  readonly library_json: LibraryJson = $state.raw()!;
18
27
 
28
+ /**
29
+ * URL path prefix for multi-package documentation sites.
30
+ * Prepended to `/docs/api/` paths in `Module.url_api` and `Declaration.url_api`.
31
+ * Default `''` preserves single-package behavior.
32
+ */
33
+ readonly url_prefix: string;
34
+
19
35
  package_json = $derived(this.library_json.package_json);
20
36
  source_json = $derived(this.library_json.source_json);
21
37
 
@@ -65,8 +81,9 @@ export class Library {
65
81
  */
66
82
  declaration_map = $derived(new Map(this.declarations.map((d) => [d.name, d])));
67
83
 
68
- constructor(library_json: LibraryJson) {
84
+ constructor(library_json: LibraryJson, url_prefix = '') {
69
85
  this.library_json = library_json;
86
+ this.url_prefix = parse_library_url_prefix(url_prefix);
70
87
  }
71
88
 
72
89
  /**
@@ -37,7 +37,7 @@ export class Module {
37
37
  /**
38
38
  * API documentation URL for this module.
39
39
  */
40
- url_api = $derived(`/docs/api/${this.path}`);
40
+ url_api = $derived(`/docs/api${this.library.url_prefix}/${this.path}`);
41
41
 
42
42
  /**
43
43
  * GitHub source URL.