@fuzdev/fuz_ui 0.206.9 → 0.208.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.
@@ -1 +1 @@
1
- {"version":3,"file":"api_search.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/api_search.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACR,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KACxB,CAAC;IACF,YAAY,EAAE;QACb,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QACxB,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;KAC7B,CAAC;CACF;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,KAAG,cA+CpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gCAAgC,GAC5C,cAAc,KAAK,CAAC,WAAW,CAAC,KAC9B,sBAwCF,CAAC"}
1
+ {"version":3,"file":"api_search.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/api_search.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,qBAAa,cAAc;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,KAAK,EAAE,MAAM,CAAc;IAE3B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAkD;IAEjF,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAQrC;IAEH,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAgD;IAEzF,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC,WAAW,CAAC,CAM/C;gBAES,OAAO,EAAE,OAAO;CAG5B;AAED;;GAEG;AACH,qBAAa,sBAAsB;IAClC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE1C,KAAK,EAAE,MAAM,CAAc;IAE3B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAmBlC;gBAES,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC;CAG5C"}
@@ -1,65 +1,45 @@
1
1
  /**
2
- * Creates unified search state for the API index page (modules and declarations).
2
+ * Unified search state for the API index page (modules and declarations).
3
3
  */
4
- export const create_api_search = (library) => {
5
- let query = $state.raw('');
6
- // Module filtering
7
- const all_modules = $derived(library.modules_sorted);
8
- const filtered_modules = $derived.by(() => {
9
- if (!query.trim())
10
- return all_modules;
11
- const terms = query.trim().toLowerCase().split(/\s+/);
12
- return all_modules.filter((m) => {
4
+ export class ApiSearchState {
5
+ library;
6
+ query = $state('');
7
+ modules = $derived.by(() => this.library.modules_sorted);
8
+ modules_filtered = $derived.by(() => {
9
+ if (!this.query.trim())
10
+ return this.modules;
11
+ const terms = this.query.trim().toLowerCase().split(/\s+/);
12
+ return this.modules.filter((m) => {
13
13
  const path_lower = m.path.toLowerCase();
14
14
  const comment_lower = m.module_comment?.toLowerCase() ?? '';
15
15
  return terms.every((term) => path_lower.includes(term) || comment_lower.includes(term));
16
16
  });
17
17
  });
18
- // Declaration filtering
19
- const all_declarations = $derived(library.declarations);
20
- const filtered_declarations = $derived.by(() => {
21
- const items = query.trim() ? library.search_declarations(query) : all_declarations;
18
+ declarations = $derived.by(() => this.library.declarations);
19
+ declarations_filtered = $derived.by(() => {
20
+ const items = this.query.trim()
21
+ ? this.library.search_declarations(this.query)
22
+ : this.declarations;
22
23
  // spread before sort — `items` may be the shared source array
23
24
  return [...items].sort((a, b) => a.name.localeCompare(b.name));
24
25
  });
25
- return {
26
- get query() {
27
- return query;
28
- },
29
- set query(v) {
30
- query = v;
31
- },
32
- modules: {
33
- get all() {
34
- return all_modules;
35
- },
36
- get filtered() {
37
- return filtered_modules;
38
- }
39
- },
40
- declarations: {
41
- get all() {
42
- return all_declarations;
43
- },
44
- get filtered() {
45
- return filtered_declarations;
46
- }
47
- }
48
- };
49
- };
26
+ constructor(library) {
27
+ this.library = library;
28
+ }
29
+ }
50
30
  /**
51
- * Creates search state for module-specific declaration lists.
31
+ * Search state for a module-specific declaration list.
52
32
  */
53
- export const create_module_declaration_search = (declarations) => {
54
- let query = $state.raw('');
55
- const all = $derived(declarations);
56
- const filtered = $derived.by(() => {
57
- const trimmed_query = query.trim();
58
- // spread before sort — `all` is the shared source array
33
+ export class DeclarationSearchState {
34
+ declarations;
35
+ query = $state('');
36
+ filtered = $derived.by(() => {
37
+ const trimmed_query = this.query.trim();
38
+ // spread before sort — `declarations` is the shared source array
59
39
  if (!trimmed_query)
60
- return [...all].sort((a, b) => a.name.localeCompare(b.name));
40
+ return [...this.declarations].sort((a, b) => a.name.localeCompare(b.name));
61
41
  const terms = trimmed_query.toLowerCase().split(/\s+/);
62
- const items = all.filter((d) => {
42
+ const items = this.declarations.filter((d) => {
63
43
  const name_lower = d.name.toLowerCase();
64
44
  const kind_lower = d.kind.toLowerCase();
65
45
  const module_path_lower = d.module_path.toLowerCase();
@@ -67,18 +47,7 @@ export const create_module_declaration_search = (declarations) => {
67
47
  });
68
48
  return items.sort((a, b) => a.name.localeCompare(b.name));
69
49
  });
70
- return {
71
- get query() {
72
- return query;
73
- },
74
- set query(v) {
75
- query = v;
76
- },
77
- get all() {
78
- return all;
79
- },
80
- get filtered() {
81
- return filtered;
82
- }
83
- };
84
- };
50
+ constructor(declarations) {
51
+ this.declarations = declarations;
52
+ }
53
+ }
package/dist/csp.d.ts CHANGED
@@ -83,7 +83,25 @@ export declare const create_csp_directives: (options?: CreateCspDirectivesOption
83
83
  export type CspDirective = keyof CspDirectives;
84
84
  export declare const parse_csp_directive: (directive: unknown) => CspDirective | null;
85
85
  export type CspDirectiveValue<T extends CspDirective> = Defined<CspDirectives[T]>;
86
- export declare const COLOR_SCHEME_SCRIPT_HASH = "sha256-QOxqn7EUzb3ydF9SALJoJGWSvywW9R0AfTDSenB83Z8=";
86
+ /**
87
+ * The exact body of the color-scheme loader `<script>` in `app.html`, the inline script
88
+ * `COLOR_SCHEME_SCRIPT_HASH` admits.
89
+ *
90
+ * The loader has to run before first paint to avoid a flash of the wrong scheme, so it is inline
91
+ * rather than a render-blocking `src`, and CSP admits it by hash. That makes its bytes
92
+ * load-bearing: whitespace, quoting, and trailing commas all move the hash, so a formatter that
93
+ * reflows `app.html` breaks the theme on every cold load with nothing but a console violation to
94
+ * show for it. Consumers can guard their own `app.html` against this constant.
95
+ */
96
+ export declare const COLOR_SCHEME_SCRIPT = "\n\t\t\tdocument.documentElement.classList.add(\n\t\t\t\t((c) =>\n\t\t\t\t\tc === 'dark' || (c !== 'light' && matchMedia('(prefers-color-scheme:dark)').matches)\n\t\t\t\t\t\t? 'dark'\n\t\t\t\t\t\t: 'light')(localStorage.getItem('fuz:color-scheme'))\n\t\t\t);\n\t\t";
97
+ /**
98
+ * The `sha256-` CSP source for `COLOR_SCHEME_SCRIPT`, carried by the `script-src` and
99
+ * `script-src-elem` defaults so the loader runs under the library CSP.
100
+ *
101
+ * Regenerate after any edit to `COLOR_SCHEME_SCRIPT` — `src/test/csp.color_scheme.test.ts`
102
+ * reports the expected value when the two disagree.
103
+ */
104
+ export declare const COLOR_SCHEME_SCRIPT_HASH = "sha256-CkhymyixntvSTuePGizI3BFtnRFlWWg95YBmBOCFxfY=";
87
105
  /**
88
106
  * The library CSP directive defaults — directives enabled out of the box.
89
107
  * Prioritizes safety but loosens around media and styles, relying on defense-in-depth.
package/dist/csp.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"csp.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/csp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAIzD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;KACnC,CAAC,IAAI,YAAY,IAAI,aAAa,CAAC,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;CACjG,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,OAAO,4BAA4B,CAAC,CAAC;IAEhE;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE;SACV,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI;KACjD,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAS,0BAA+B,KAAG,aA+HhF,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,mBAAmB,GAAI,WAAW,OAAO,KAAG,YAAY,GAAG,IAGhE,CAAC;AAET,MAAM,M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E,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC;IAChD,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,2BAA2B,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9C,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,kBAAkB,GAAG,GAAG,GAAG,MAAM,CAAC,CAAC;IACpE,OAAO,CAAC,EAAE,KAAK,CACZ,yCAAyC,GACzC,aAAa,GACb,cAAc,GACd,wBAAwB,GACxB,oBAAoB,GACpB,cAAc,GACd,gCAAgC,GAChC,oBAAoB,GACpB,mBAAmB,GACnB,eAAe,GACf,yCAAyC,GACzC,sBAAsB,GACtB,yCAAyC,CAC3C,CAAC;CACF"}
package/dist/csp.js CHANGED
@@ -152,7 +152,32 @@ const for_each_directive = (source, source_label, fn) => {
152
152
  fn(directive, value);
153
153
  }
154
154
  };
155
- export const COLOR_SCHEME_SCRIPT_HASH = 'sha256-QOxqn7EUzb3ydF9SALJoJGWSvywW9R0AfTDSenB83Z8=';
155
+ /**
156
+ * The exact body of the color-scheme loader `<script>` in `app.html`, the inline script
157
+ * `COLOR_SCHEME_SCRIPT_HASH` admits.
158
+ *
159
+ * The loader has to run before first paint to avoid a flash of the wrong scheme, so it is inline
160
+ * rather than a render-blocking `src`, and CSP admits it by hash. That makes its bytes
161
+ * load-bearing: whitespace, quoting, and trailing commas all move the hash, so a formatter that
162
+ * reflows `app.html` breaks the theme on every cold load with nothing but a console violation to
163
+ * show for it. Consumers can guard their own `app.html` against this constant.
164
+ */
165
+ export const COLOR_SCHEME_SCRIPT = `
166
+ document.documentElement.classList.add(
167
+ ((c) =>
168
+ c === 'dark' || (c !== 'light' && matchMedia('(prefers-color-scheme:dark)').matches)
169
+ ? 'dark'
170
+ : 'light')(localStorage.getItem('fuz:color-scheme'))
171
+ );
172
+ `;
173
+ /**
174
+ * The `sha256-` CSP source for `COLOR_SCHEME_SCRIPT`, carried by the `script-src` and
175
+ * `script-src-elem` defaults so the loader runs under the library CSP.
176
+ *
177
+ * Regenerate after any edit to `COLOR_SCHEME_SCRIPT` — `src/test/csp.color_scheme.test.ts`
178
+ * reports the expected value when the two disagree.
179
+ */
180
+ export const COLOR_SCHEME_SCRIPT_HASH = 'sha256-CkhymyixntvSTuePGizI3BFtnRFlWWg95YBmBOCFxfY=';
156
181
  /**
157
182
  * The library CSP directive defaults — directives enabled out of the box.
158
183
  * Prioritizes safety but loosens around media and styles, relying on defense-in-depth.
@@ -1,4 +1,4 @@
1
- import type { DeclarationJsonInput, MemberJsonInput, ParameterJsonInput, ComponentPropJsonInput, OverloadJsonInput, Reactivity } from 'svelte-docinfo/types.js';
1
+ import type { DeclarationJsonInput, MemberJsonInput, ParameterJsonInput, ComponentPropJsonInput, OverloadJsonInput, Reactivity, TypeJson } from 'svelte-docinfo/types.js';
2
2
  import type { Module } from './module.svelte.js';
3
3
  /**
4
4
  * Rich runtime representation of an exported declaration.
@@ -10,7 +10,7 @@ import type { Module } from './module.svelte.js';
10
10
  * Computed properties are plain getters rather than `$derived` — see
11
11
  * `Library` for why.
12
12
  *
13
- * @see {@link https://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library
13
+ * @see {@link https://github.com/fuzdev/svelte-docinfo svelte-docinfo} for the analysis library
14
14
  * @see `DeclarationDetail.svelte` for the rendering component
15
15
  */
16
16
  export declare class Declaration {
@@ -45,14 +45,40 @@ export declare class Declaration {
45
45
  */
46
46
  get display_name(): string;
47
47
  get type_signature(): string | undefined;
48
+ /**
49
+ * Structured type tree beside `type_signature`, absent when the flat string
50
+ * is the whole story. Present on `variable` and `type` kinds only.
51
+ */
52
+ get type_info(): TypeJson | undefined;
53
+ /**
54
+ * `type_info` prepared for rendering at the declaration itself. A type
55
+ * alias's tree carries the alias's own name at the root
56
+ * (`type A = 'a' | 'b'` → `{kind: 'union', alias: 'A', members: [...]}`),
57
+ * which `typeJsonToTokens` collapses to the bare name — right where `A` is
58
+ * composed into another type, circular at `A`'s own declaration. Strips
59
+ * that self-alias so the root expands into its members; every other tree
60
+ * passes through unchanged.
61
+ */
62
+ get type_info_expanded(): TypeJson | undefined;
63
+ /**
64
+ * Default value documented via `@default`; the authoritative initializer
65
+ * (when human-readable) is in `type_signature`. Present on `variable` kind
66
+ * only — parameters, props, and members carry their own.
67
+ */
68
+ get default_value(): string | undefined;
48
69
  get doc_comment(): string | undefined;
49
70
  get deprecated_message(): string | undefined;
50
71
  get parameters(): Array<ParameterJsonInput> | undefined;
51
72
  get props(): Array<ComponentPropJsonInput> | undefined;
52
73
  get return_type(): string | undefined;
74
+ /**
75
+ * Structured return type beside `return_type`, absent when the flat string
76
+ * is the whole story. Present on `function` kind only.
77
+ */
78
+ get return_type_info(): TypeJson | undefined;
53
79
  get return_description(): string | undefined;
54
80
  get generic_params(): NonNullable<DeclarationJsonInput['genericParams']>;
55
- get extends_type(): string | Array<string> | undefined;
81
+ get extends_types(): Array<string> | undefined;
56
82
  get implements_types(): Array<string> | undefined;
57
83
  get throws(): NonNullable<DeclarationJsonInput['throws']>;
58
84
  get since(): string | undefined;
@@ -63,10 +89,21 @@ export declare class Declaration {
63
89
  */
64
90
  get members(): Array<MemberJsonInput> | undefined;
65
91
  /**
66
- * Intersection types whose properties are external (filtered out of props/members).
67
- * Present on `component` and `type` kinds.
92
+ * External types whose contributions are filtered out of props/members —
93
+ * the attribute bags a component forwards, however the author composed
94
+ * them (intersection, heritage clause, bare or indexed-access reference).
95
+ * On `interface`/`class` kinds it records the external reach of the
96
+ * heritage chain, whose contributions members (own-only) never enumerate.
97
+ * Present on `component`, `type`, `interface`, and `class` kinds.
98
+ */
99
+ get external_types(): Array<string> | undefined;
100
+ /**
101
+ * Whether the exported name also carries a value meaning — a merged
102
+ * value+type symbol like `const Foo = z.strictObject({...})` beside
103
+ * `type Foo = z.infer<typeof Foo>`, where the type wins the declaration slot.
104
+ * Present on `type` and `interface` kinds.
68
105
  */
69
- get intersects(): Array<string> | undefined;
106
+ get merged_value(): boolean | undefined;
70
107
  /**
71
108
  * Whether a component accepts children via props or template usage.
72
109
  * Present on `component` kind only.
@@ -91,6 +128,12 @@ export declare class Declaration {
91
128
  * Mutation documentation from `@mutates` tags, mapping parameter names to descriptions.
92
129
  */
93
130
  get mutates(): DeclarationJsonInput['mutates'];
131
+ /**
132
+ * Internal-API marker from the `@internal` tag. Presence means the tag was
133
+ * written; an empty string is a bare tag with no trailing prose. A marker,
134
+ * not an exclusion — the declaration stays documented.
135
+ */
136
+ get internal_message(): string | undefined;
94
137
  /**
95
138
  * Svelte reactivity flavor (`$state`, `$state.raw`, `$derived`, `$derived.by`)
96
139
  * when this variable is initialized with a value-producing rune.
@@ -99,6 +142,7 @@ export declare class Declaration {
99
142
  get reactivity(): Reactivity | undefined;
100
143
  get has_examples(): boolean;
101
144
  get is_deprecated(): boolean;
145
+ get is_internal(): boolean;
102
146
  get has_documentation(): boolean;
103
147
  get has_parameters(): boolean;
104
148
  get has_props(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/declaration.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAcjD;;;;;;;;;;;;GAYG;AACH,qBAAa,WAAW;;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAiB;IACxC,QAAQ,CAAC,gBAAgB,EAAE,oBAAoB,CAAiB;IAEhE,IAAI,OAA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Y,IAAI,OAAO,CAE1B;IAGD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAGD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,cAAc,IAAI,OAAO,CAG5B;IAED,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;gBAEW,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,oBAAoB;CAIlE"}
@@ -20,7 +20,7 @@ const field = (decl, key) => decl[key];
20
20
  * Computed properties are plain getters rather than `$derived` — see
21
21
  * `Library` for why.
22
22
  *
23
- * @see {@link https://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library
23
+ * @see {@link https://github.com/fuzdev/svelte-docinfo svelte-docinfo} for the analysis library
24
24
  * @see `DeclarationDetail.svelte` for the rendering component
25
25
  */
26
26
  export class Declaration {
@@ -60,8 +60,9 @@ export class Declaration {
60
60
  * Generated TypeScript import statement.
61
61
  */
62
62
  get import_statement() {
63
- // `generateImport` reads only `name`/`kind`/path, none of the defaulted
64
- // arrays, so asserting the parsed shape here is sound.
63
+ // `generateImport` reads only `name`/`kind`/`mergedValue`/path, none of
64
+ // the defaulted arrays, and treats an absent `mergedValue` as the stripped
65
+ // `false`, so asserting the parsed shape here is sound.
65
66
  return (this.#import_statement ??= generateImport(this.declaration_json, this.module_path, this.library.pkg_json.name));
66
67
  }
67
68
  /**
@@ -87,6 +88,39 @@ export class Declaration {
87
88
  get type_signature() {
88
89
  return this.declaration_json.typeSignature;
89
90
  }
91
+ /**
92
+ * Structured type tree beside `type_signature`, absent when the flat string
93
+ * is the whole story. Present on `variable` and `type` kinds only.
94
+ */
95
+ get type_info() {
96
+ return field(this.declaration_json, 'typeInfo');
97
+ }
98
+ /**
99
+ * `type_info` prepared for rendering at the declaration itself. A type
100
+ * alias's tree carries the alias's own name at the root
101
+ * (`type A = 'a' | 'b'` → `{kind: 'union', alias: 'A', members: [...]}`),
102
+ * which `typeJsonToTokens` collapses to the bare name — right where `A` is
103
+ * composed into another type, circular at `A`'s own declaration. Strips
104
+ * that self-alias so the root expands into its members; every other tree
105
+ * passes through unchanged.
106
+ */
107
+ get type_info_expanded() {
108
+ const type_info = this.type_info;
109
+ if (type_info &&
110
+ (type_info.kind === 'union' || type_info.kind === 'intersection') &&
111
+ type_info.alias === this.name) {
112
+ return { ...type_info, alias: undefined };
113
+ }
114
+ return type_info;
115
+ }
116
+ /**
117
+ * Default value documented via `@default`; the authoritative initializer
118
+ * (when human-readable) is in `type_signature`. Present on `variable` kind
119
+ * only — parameters, props, and members carry their own.
120
+ */
121
+ get default_value() {
122
+ return field(this.declaration_json, 'defaultValue');
123
+ }
90
124
  get doc_comment() {
91
125
  return this.declaration_json.docComment;
92
126
  }
@@ -102,13 +136,20 @@ export class Declaration {
102
136
  get return_type() {
103
137
  return field(this.declaration_json, 'returnType');
104
138
  }
139
+ /**
140
+ * Structured return type beside `return_type`, absent when the flat string
141
+ * is the whole story. Present on `function` kind only.
142
+ */
143
+ get return_type_info() {
144
+ return field(this.declaration_json, 'returnTypeInfo');
145
+ }
105
146
  get return_description() {
106
147
  return field(this.declaration_json, 'returnDescription');
107
148
  }
108
149
  get generic_params() {
109
150
  return this.declaration_json.genericParams ?? EMPTY_ARRAY;
110
151
  }
111
- get extends_type() {
152
+ get extends_types() {
112
153
  return field(this.declaration_json, 'extends');
113
154
  }
114
155
  get implements_types() {
@@ -133,11 +174,24 @@ export class Declaration {
133
174
  return field(this.declaration_json, 'members');
134
175
  }
135
176
  /**
136
- * Intersection types whose properties are external (filtered out of props/members).
137
- * Present on `component` and `type` kinds.
177
+ * External types whose contributions are filtered out of props/members —
178
+ * the attribute bags a component forwards, however the author composed
179
+ * them (intersection, heritage clause, bare or indexed-access reference).
180
+ * On `interface`/`class` kinds it records the external reach of the
181
+ * heritage chain, whose contributions members (own-only) never enumerate.
182
+ * Present on `component`, `type`, `interface`, and `class` kinds.
183
+ */
184
+ get external_types() {
185
+ return field(this.declaration_json, 'externalTypes');
186
+ }
187
+ /**
188
+ * Whether the exported name also carries a value meaning — a merged
189
+ * value+type symbol like `const Foo = z.strictObject({...})` beside
190
+ * `type Foo = z.infer<typeof Foo>`, where the type wins the declaration slot.
191
+ * Present on `type` and `interface` kinds.
138
192
  */
139
- get intersects() {
140
- return field(this.declaration_json, 'intersects');
193
+ get merged_value() {
194
+ return field(this.declaration_json, 'mergedValue');
141
195
  }
142
196
  /**
143
197
  * Whether a component accepts children via props or template usage.
@@ -173,6 +227,14 @@ export class Declaration {
173
227
  get mutates() {
174
228
  return this.declaration_json.mutates;
175
229
  }
230
+ /**
231
+ * Internal-API marker from the `@internal` tag. Presence means the tag was
232
+ * written; an empty string is a bare tag with no trailing prose. A marker,
233
+ * not an exclusion — the declaration stays documented.
234
+ */
235
+ get internal_message() {
236
+ return this.declaration_json.internalMessage;
237
+ }
176
238
  /**
177
239
  * Svelte reactivity flavor (`$state`, `$state.raw`, `$derived`, `$derived.by`)
178
240
  * when this variable is initialized with a value-producing rune.
@@ -188,6 +250,10 @@ export class Declaration {
188
250
  get is_deprecated() {
189
251
  return this.deprecated_message !== undefined;
190
252
  }
253
+ // presence, not truthiness — a bare `@internal` (no message text) arrives as `''`
254
+ get is_internal() {
255
+ return this.internal_message !== undefined;
256
+ }
191
257
  get has_documentation() {
192
258
  return !!this.doc_comment;
193
259
  }
@@ -1 +1 @@
1
- {"version":3,"file":"project_stats_data.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/project_stats_data.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,eAAO,MAAM,kBAAkB,EAAE,oBAmdhC,CAAC"}
1
+ {"version":3,"file":"project_stats_data.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/project_stats_data.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,eAAO,MAAM,kBAAkB,EAAE,oBA0dhC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  // generated by src/lib/project_stats_update.task.ts — do not edit directly, run `gro project_stats_update`
2
2
  export const project_stats_data = {
3
- generated_at: '2026-08-11T15:59:58.575Z',
4
- end_date: '2026-08-11',
3
+ generated_at: '2026-08-31T17:42:38.471Z',
4
+ end_date: '2026-08-31',
5
5
  projects: [
6
6
  {
7
7
  name: 'fuz_app',
@@ -11,7 +11,8 @@ export const project_stats_data = {
11
11
  6, 5, 1, 18, 19, 30, 9, 4, 3, 1, 0, 0, 0, 0, 0, 0, 0, 5, 6, 0, 2, 11, 7, 7, 0, 6, 4, 4, 6, 2,
12
12
  0, 0, 0, 0, 0, 9, 3, 13, 4, 11, 2, 1, 4, 4, 1, 0, 1, 0, 5, 0, 0, 0, 2, 7, 6, 10, 4, 0, 0, 0,
13
13
  6, 5, 5, 6, 12, 4, 1, 1, 0, 1, 0, 0, 0, 7, 1, 0, 1, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
14
- 0, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 12, 6, 0, 0, 0
14
+ 0, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 12, 6, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0,
15
+ 0, 0, 0, 0, 0, 0, 1, 0, 9, 6, 0
15
16
  ]
16
17
  },
17
18
  {
@@ -45,7 +46,8 @@ export const project_stats_data = {
45
46
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
46
47
  1, 3, 7, 0, 0, 0, 1, 2, 2, 2, 0, 1, 1, 1, 1, 2, 0, 6, 3, 1, 0, 0, 0, 5, 0, 2, 0, 0, 0, 0, 0,
47
48
  2, 1, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
189
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
190
+ 0, 0, 0, 0, 0, 0, 0, 0, 0
187
191
  ]
188
192
  },
189
193
  {
@@ -224,7 +228,7 @@ export const project_stats_data = {
224
228
  0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 1, 0, 3, 0, 0, 0,
225
229
  0, 1, 2, 0, 4, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
226
230
  5, 0, 0, 0, 4, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
227
- 0
231
+ 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
228
232
  ]
229
233
  },
230
234
  {
@@ -263,7 +267,8 @@ export const project_stats_data = {
263
267
  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
264
268
  0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0,
265
269
  2, 3, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
266
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
270
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
271
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
267
272
  ]
268
273
  },
269
274
  {
@@ -302,8 +307,8 @@ export const project_stats_data = {
302
307
  0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 3, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0,
303
308
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 12, 0, 1,
304
309
  0, 3, 3, 0, 5, 0, 0, 1, 0, 2, 4, 1, 4, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
305
- 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
306
- 0, 0, 0, 0, 0, 0, 0, 0, 0
310
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
311
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
307
312
  ]
308
313
  },
309
314
  {
@@ -312,7 +317,8 @@ export const project_stats_data = {
312
317
  daily_counts: [
313
318
  11, 8, 0, 1, 0, 5, 2, 4, 2, 0, 1, 0, 2, 13, 5, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
314
319
  0, 1, 0, 0, 0, 8, 1, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
315
- 0, 0, 0, 1, 4, 2, 0, 2, 3, 1, 4, 13, 8, 2
320
+ 0, 0, 0, 1, 4, 2, 0, 2, 3, 1, 4, 13, 8, 7, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
321
+ 0, 0, 0
316
322
  ]
317
323
  },
318
324
  {
@@ -363,7 +369,7 @@ export const project_stats_data = {
363
369
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 1, 0, 0, 0, 0, 1, 3, 2, 0, 0, 0, 9, 0, 1, 0, 5,
364
370
  5, 4, 3, 0, 0, 1, 0, 1, 2, 0, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 0,
365
371
  0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
366
- 0, 0, 1, 0, 0, 0, 0
372
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
367
373
  ]
368
374
  },
369
375
  {
@@ -452,8 +458,8 @@ export const project_stats_data = {
452
458
  2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
453
459
  0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 3, 1, 0, 0, 1, 0, 0, 0, 0, 0, 5, 5, 0, 0, 2, 8, 2, 2, 0, 0,
454
460
  0, 0, 1, 2, 1, 3, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
455
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
456
- 0, 0
461
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
462
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
457
463
  ]
458
464
  },
459
465
  {
@@ -462,7 +468,8 @@ export const project_stats_data = {
462
468
  daily_counts: [
463
469
  3, 11, 8, 16, 12, 14, 6, 14, 11, 4, 10, 21, 26, 11, 15, 22, 20, 13, 28, 16, 32, 19, 22, 27,
464
470
  28, 4, 28, 27, 16, 12, 31, 20, 19, 24, 17, 13, 16, 13, 15, 13, 16, 17, 8, 13, 1, 14, 18, 5,
465
- 8, 30, 9, 4, 23, 9, 11, 7, 9, 6, 15, 17, 6
471
+ 8, 30, 9, 4, 23, 9, 11, 7, 9, 6, 15, 17, 12, 13, 19, 23, 17, 22, 11, 19, 16, 11, 11, 4, 13,
472
+ 8, 6, 10, 9, 11, 7, 13, 0
466
473
  ]
467
474
  }
468
475
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.206.9",
3
+ "version": "0.208.0",
4
4
  "description": "Svelte UI library",
5
5
  "tagline": "friendly user zystem",
6
6
  "glyph": "🧶",
@@ -65,7 +65,7 @@
65
65
  "@fuzdev/blake3_wasm": "^0.1.1",
66
66
  "@fuzdev/fuz_code": "^0.48.0",
67
67
  "@fuzdev/fuz_css": "^0.63.2",
68
- "@fuzdev/fuz_util": "^0.65.2",
68
+ "@fuzdev/fuz_util": "^0.68.0",
69
69
  "@fuzdev/gro": "^0.209.0",
70
70
  "@fuzdev/mdz": "^0.3.0",
71
71
  "@ryanatkn/eslint-config": "^0.12.2",
@@ -81,7 +81,7 @@
81
81
  "jsdom": "^29.1.1",
82
82
  "svelte": "^5.56.4",
83
83
  "svelte-check": "^4.7.2",
84
- "svelte-docinfo": "^0.5.4",
84
+ "svelte-docinfo": "^0.7.0",
85
85
  "tslib": "^2.8.1",
86
86
  "typescript": "^5.9.3",
87
87
  "typescript-eslint": "^8.60.0",