@fuzdev/fuz_ui 0.193.1 → 0.195.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.
Files changed (86) hide show
  1. package/dist/DeclarationDetail.svelte +139 -64
  2. package/dist/DeclarationDetail.svelte.d.ts +9 -0
  3. package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
  4. package/dist/LibraryDetail.svelte +14 -10
  5. package/dist/LibraryDetail.svelte.d.ts +7 -0
  6. package/dist/LibraryDetail.svelte.d.ts.map +1 -1
  7. package/dist/Spiders.svelte +4 -2
  8. package/dist/Spiders.svelte.d.ts +2 -1
  9. package/dist/Spiders.svelte.d.ts.map +1 -1
  10. package/dist/StyleVariableButton.svelte +1 -1
  11. package/dist/contextmenu_state.svelte.d.ts +14 -14
  12. package/dist/contextmenu_state.svelte.d.ts.map +1 -1
  13. package/dist/contextmenu_state.svelte.js +3 -3
  14. package/dist/declaration.svelte.d.ts +233 -25
  15. package/dist/declaration.svelte.d.ts.map +1 -1
  16. package/dist/declaration.svelte.js +71 -23
  17. package/dist/docs_helpers.svelte.d.ts +5 -5
  18. package/dist/docs_helpers.svelte.d.ts.map +1 -1
  19. package/dist/docs_helpers.svelte.js +1 -1
  20. package/dist/library.svelte.d.ts +5 -5
  21. package/dist/library.svelte.d.ts.map +1 -1
  22. package/dist/library.svelte.js +2 -2
  23. package/dist/library_gen.d.ts +24 -17
  24. package/dist/library_gen.d.ts.map +1 -1
  25. package/dist/library_gen.js +52 -32
  26. package/dist/library_output.d.ts +5 -4
  27. package/dist/library_output.d.ts.map +1 -1
  28. package/dist/library_output.js +11 -8
  29. package/dist/mdz_components.d.ts +16 -16
  30. package/dist/mdz_components.d.ts.map +1 -1
  31. package/dist/module.svelte.d.ts +21 -7
  32. package/dist/module.svelte.d.ts.map +1 -1
  33. package/dist/module.svelte.js +26 -11
  34. package/dist/style_variable_helpers.svelte.d.ts +4 -4
  35. package/dist/style_variable_helpers.svelte.d.ts.map +1 -1
  36. package/dist/style_variable_helpers.svelte.js +1 -1
  37. package/dist/tome.d.ts +10 -10
  38. package/dist/tome.d.ts.map +1 -1
  39. package/dist/tome.js +2 -2
  40. package/dist/tsdoc_mdz.d.ts +6 -1
  41. package/dist/tsdoc_mdz.d.ts.map +1 -1
  42. package/dist/tsdoc_mdz.js +23 -2
  43. package/package.json +11 -9
  44. package/src/lib/contextmenu_state.svelte.ts +6 -6
  45. package/src/lib/declaration.svelte.ts +90 -35
  46. package/src/lib/docs_helpers.svelte.ts +2 -2
  47. package/src/lib/library.svelte.ts +3 -3
  48. package/src/lib/library_gen.ts +65 -42
  49. package/src/lib/library_output.ts +11 -8
  50. package/src/lib/mdz_components.ts +18 -18
  51. package/src/lib/module.svelte.ts +29 -16
  52. package/src/lib/style_variable_helpers.svelte.ts +2 -2
  53. package/src/lib/tome.ts +4 -4
  54. package/src/lib/tsdoc_mdz.ts +25 -2
  55. package/dist/analysis_context.d.ts +0 -199
  56. package/dist/analysis_context.d.ts.map +0 -1
  57. package/dist/analysis_context.js +0 -138
  58. package/dist/library_analysis.d.ts +0 -112
  59. package/dist/library_analysis.d.ts.map +0 -1
  60. package/dist/library_analysis.js +0 -106
  61. package/dist/library_generate.d.ts +0 -94
  62. package/dist/library_generate.d.ts.map +0 -1
  63. package/dist/library_generate.js +0 -147
  64. package/dist/library_pipeline.d.ts +0 -113
  65. package/dist/library_pipeline.d.ts.map +0 -1
  66. package/dist/library_pipeline.js +0 -160
  67. package/dist/module_helpers.d.ts +0 -334
  68. package/dist/module_helpers.d.ts.map +0 -1
  69. package/dist/module_helpers.js +0 -317
  70. package/dist/svelte_helpers.d.ts +0 -92
  71. package/dist/svelte_helpers.d.ts.map +0 -1
  72. package/dist/svelte_helpers.js +0 -367
  73. package/dist/ts_helpers.d.ts +0 -181
  74. package/dist/ts_helpers.d.ts.map +0 -1
  75. package/dist/ts_helpers.js +0 -674
  76. package/dist/tsdoc_helpers.d.ts +0 -119
  77. package/dist/tsdoc_helpers.d.ts.map +0 -1
  78. package/dist/tsdoc_helpers.js +0 -207
  79. package/src/lib/analysis_context.ts +0 -254
  80. package/src/lib/library_analysis.ts +0 -168
  81. package/src/lib/library_generate.ts +0 -215
  82. package/src/lib/library_pipeline.ts +0 -221
  83. package/src/lib/module_helpers.ts +0 -501
  84. package/src/lib/svelte_helpers.ts +0 -539
  85. package/src/lib/ts_helpers.ts +0 -862
  86. package/src/lib/tsdoc_helpers.ts +0 -246
@@ -1,18 +1,26 @@
1
- import { type DeclarationJson } from '@fuzdev/fuz_util/source_json.js';
1
+ import type { DeclarationJsonInput } 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.
5
+ *
6
+ * Wraps svelte-docinfo's `DeclarationJson` discriminated union (on `kind`)
7
+ * with Svelte 5 reactive derivations and computed URLs.
8
+ * Kind-specific fields are accessed via the `field()` helper since
9
+ * not all fields exist on all variants.
10
+ *
11
+ * @see {@link https://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library
12
+ * @see `DeclarationDetail.svelte` for the rendering component
5
13
  */
6
14
  export declare class Declaration {
7
15
  readonly module: Module;
8
- readonly declaration_json: DeclarationJson;
16
+ readonly declaration_json: DeclarationJsonInput;
9
17
  library: import("./library.svelte.ts").Library;
10
18
  /**
11
19
  * Module path where this declaration is defined.
12
20
  */
13
21
  module_path: string;
14
22
  name: string;
15
- kind: "function" | "class" | "type" | "json" | "variable" | "constructor" | "component" | "css";
23
+ kind: "function" | "class" | "type" | "variable" | "component" | "interface" | "enum" | "snippet" | "namespace";
16
24
  /**
17
25
  * GitHub source URL with line number.
18
26
  */
@@ -37,57 +45,257 @@ export declare class Declaration {
37
45
  doc_comment: string | undefined;
38
46
  deprecated_message: string | undefined;
39
47
  parameters: {
40
- [x: string]: unknown;
41
48
  name: string;
42
49
  type: string;
43
50
  optional?: boolean | undefined;
51
+ rest?: boolean | undefined;
44
52
  description?: string | undefined;
45
- default_value?: string | undefined;
53
+ defaultValue?: string | undefined;
46
54
  }[] | undefined;
47
55
  props: {
48
- [x: string]: unknown;
49
56
  name: string;
50
57
  type: string;
51
- optional?: boolean | undefined;
52
- description?: string | undefined;
53
- default_value?: string | undefined;
54
- bindable?: boolean | undefined;
55
58
  examples?: string[] | undefined;
56
- deprecated_message?: string | undefined;
57
- see_also?: string[] | undefined;
59
+ deprecatedMessage?: string | undefined;
60
+ seeAlso?: string[] | undefined;
58
61
  throws?: {
59
- [x: string]: unknown;
60
62
  description: string;
61
63
  type?: string | undefined;
62
64
  }[] | undefined;
63
65
  since?: string | undefined;
66
+ optional?: boolean | undefined;
67
+ description?: string | undefined;
68
+ defaultValue?: string | undefined;
69
+ bindable?: boolean | undefined;
70
+ parameters?: {
71
+ name: string;
72
+ type: string;
73
+ optional?: boolean | undefined;
74
+ rest?: boolean | undefined;
75
+ description?: string | undefined;
76
+ defaultValue?: string | undefined;
77
+ }[] | undefined;
64
78
  }[] | undefined;
65
79
  return_type: string | undefined;
66
80
  return_description: string | undefined;
67
81
  generic_params: {
68
- [x: string]: unknown;
69
82
  name: string;
70
83
  constraint?: string | undefined;
71
- default_type?: string | undefined;
72
- }[] | undefined;
73
- extends: string[] | undefined;
74
- implements: string[] | undefined;
84
+ defaultType?: string | undefined;
85
+ }[];
86
+ extends_type: string | string[] | undefined;
87
+ implements_types: string[] | undefined;
75
88
  throws: {
76
- [x: string]: unknown;
77
89
  description: string;
78
90
  type?: string | undefined;
79
- }[] | undefined;
91
+ }[];
80
92
  since: string | undefined;
81
- examples: string[] | undefined;
82
- see_also: string[] | undefined;
83
- members: Array<DeclarationJson> | undefined;
84
- properties: Array<DeclarationJson> | undefined;
93
+ examples: string[];
94
+ see_also: string[];
95
+ /**
96
+ * Nested members for classes, interfaces, types, and enums.
97
+ */
98
+ members: ({
99
+ kind: "function";
100
+ name: string;
101
+ optional?: boolean | undefined;
102
+ returnType?: string | undefined;
103
+ returnDescription?: string | undefined;
104
+ parameters?: {
105
+ name: string;
106
+ type: string;
107
+ optional?: boolean | undefined;
108
+ rest?: boolean | undefined;
109
+ description?: string | undefined;
110
+ defaultValue?: string | undefined;
111
+ }[] | undefined;
112
+ overloads?: {
113
+ typeSignature: string;
114
+ parameters?: {
115
+ name: string;
116
+ type: string;
117
+ optional?: boolean | undefined;
118
+ rest?: boolean | undefined;
119
+ description?: string | undefined;
120
+ defaultValue?: string | undefined;
121
+ }[] | undefined;
122
+ returnType?: string | undefined;
123
+ genericParams?: {
124
+ name: string;
125
+ constraint?: string | undefined;
126
+ defaultType?: string | undefined;
127
+ }[] | undefined;
128
+ docComment?: string | undefined;
129
+ returnDescription?: string | undefined;
130
+ }[] | undefined;
131
+ mutates?: Record<string, string> | undefined;
132
+ partial?: boolean | undefined;
133
+ examples?: string[] | undefined;
134
+ deprecatedMessage?: string | undefined;
135
+ seeAlso?: string[] | undefined;
136
+ throws?: {
137
+ description: string;
138
+ type?: string | undefined;
139
+ }[] | undefined;
140
+ since?: string | undefined;
141
+ docComment?: string | undefined;
142
+ typeSignature?: string | undefined;
143
+ modifiers?: ("public" | "protected" | "readonly" | "static" | "abstract" | "getter" | "setter")[] | undefined;
144
+ sourceLine?: number | undefined;
145
+ genericParams?: {
146
+ name: string;
147
+ constraint?: string | undefined;
148
+ defaultType?: string | undefined;
149
+ }[] | undefined;
150
+ } | {
151
+ kind: "variable";
152
+ name: string;
153
+ optional?: boolean | undefined;
154
+ reactivity?: "$state" | "$state.raw" | "$derived" | "$derived.by" | undefined;
155
+ defaultValue?: string | undefined;
156
+ mutates?: Record<string, string> | undefined;
157
+ partial?: boolean | undefined;
158
+ examples?: string[] | undefined;
159
+ deprecatedMessage?: string | undefined;
160
+ seeAlso?: string[] | undefined;
161
+ throws?: {
162
+ description: string;
163
+ type?: string | undefined;
164
+ }[] | undefined;
165
+ since?: string | undefined;
166
+ docComment?: string | undefined;
167
+ typeSignature?: string | undefined;
168
+ modifiers?: ("public" | "protected" | "readonly" | "static" | "abstract" | "getter" | "setter")[] | undefined;
169
+ sourceLine?: number | undefined;
170
+ genericParams?: {
171
+ name: string;
172
+ constraint?: string | undefined;
173
+ defaultType?: string | undefined;
174
+ }[] | undefined;
175
+ } | {
176
+ kind: "constructor";
177
+ name: "constructor" | "(construct)";
178
+ parameters?: {
179
+ name: string;
180
+ type: string;
181
+ optional?: boolean | undefined;
182
+ rest?: boolean | undefined;
183
+ description?: string | undefined;
184
+ defaultValue?: string | undefined;
185
+ }[] | undefined;
186
+ overloads?: {
187
+ typeSignature: string;
188
+ parameters?: {
189
+ name: string;
190
+ type: string;
191
+ optional?: boolean | undefined;
192
+ rest?: boolean | undefined;
193
+ description?: string | undefined;
194
+ defaultValue?: string | undefined;
195
+ }[] | undefined;
196
+ returnType?: string | undefined;
197
+ genericParams?: {
198
+ name: string;
199
+ constraint?: string | undefined;
200
+ defaultType?: string | undefined;
201
+ }[] | undefined;
202
+ docComment?: string | undefined;
203
+ returnDescription?: string | undefined;
204
+ }[] | undefined;
205
+ mutates?: Record<string, string> | undefined;
206
+ partial?: boolean | undefined;
207
+ examples?: string[] | undefined;
208
+ deprecatedMessage?: string | undefined;
209
+ seeAlso?: string[] | undefined;
210
+ throws?: {
211
+ description: string;
212
+ type?: string | undefined;
213
+ }[] | undefined;
214
+ since?: string | undefined;
215
+ docComment?: string | undefined;
216
+ typeSignature?: string | undefined;
217
+ modifiers?: ("public" | "protected" | "readonly" | "static" | "abstract" | "getter" | "setter")[] | undefined;
218
+ sourceLine?: number | undefined;
219
+ genericParams?: {
220
+ name: string;
221
+ constraint?: string | undefined;
222
+ defaultType?: string | undefined;
223
+ }[] | undefined;
224
+ })[] | undefined;
225
+ /**
226
+ * Intersection types whose properties are external (filtered out of props/members).
227
+ * Present on `component` and `type` kinds.
228
+ */
229
+ intersects: string[] | undefined;
230
+ /**
231
+ * Whether a component accepts children via props or template usage.
232
+ * Present on `component` kind only.
233
+ */
234
+ accepts_children: boolean | undefined;
235
+ /**
236
+ * Function overload signatures when multiple public overloads exist.
237
+ * Present on `function` and `snippet` kinds, and on function/constructor members.
238
+ */
239
+ overloads: {
240
+ typeSignature: string;
241
+ parameters?: {
242
+ name: string;
243
+ type: string;
244
+ optional?: boolean | undefined;
245
+ rest?: boolean | undefined;
246
+ description?: string | undefined;
247
+ defaultValue?: string | undefined;
248
+ }[] | undefined;
249
+ returnType?: string | undefined;
250
+ genericParams?: {
251
+ name: string;
252
+ constraint?: string | undefined;
253
+ defaultType?: string | undefined;
254
+ }[] | undefined;
255
+ docComment?: string | undefined;
256
+ returnDescription?: string | undefined;
257
+ }[] | undefined;
258
+ /**
259
+ * Re-export alias info when this declaration is a renamed re-export.
260
+ */
261
+ alias_of: {
262
+ module: string;
263
+ name: string;
264
+ } | {
265
+ module: string;
266
+ name: string;
267
+ } | {
268
+ module: string;
269
+ name: string;
270
+ } | {
271
+ module: string;
272
+ name: string;
273
+ } | {
274
+ module: string;
275
+ name: string;
276
+ } | {
277
+ module: string;
278
+ name: string;
279
+ } | {
280
+ module: string;
281
+ name: string;
282
+ } | {
283
+ module: string;
284
+ name: string;
285
+ } | {
286
+ module: string;
287
+ name: string;
288
+ } | undefined;
289
+ /**
290
+ * Mutation documentation from `@mutates` tags, mapping parameter names to descriptions.
291
+ */
292
+ mutates: Record<string, string> | undefined;
85
293
  has_examples: boolean;
86
294
  is_deprecated: boolean;
87
295
  has_documentation: boolean;
88
296
  has_parameters: boolean;
89
297
  has_props: boolean;
90
298
  has_generics: boolean;
91
- constructor(module: Module, declaration_json: DeclarationJson);
299
+ constructor(module: Module, declaration_json: DeclarationJsonInput);
92
300
  }
93
301
  //# sourceMappingURL=declaration.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/declaration.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,eAAe,EAGpB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,oBAA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S,UAAqD;IAC9D,YAAY,UAA4C;gBAE5C,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,oBAAoB;CAIlE"}
@@ -1,8 +1,23 @@
1
- import { declaration_generate_import, declaration_get_display_name, } from '@fuzdev/fuz_util/source_json.js';
1
+ import { generateImport, getDisplayName } from 'svelte-docinfo/declaration-helpers.js';
2
2
  import { url_github_file } from './package_helpers.js';
3
- /* eslint-disable @typescript-eslint/no-deprecated */
3
+ // `library.json` is serialized with svelte-docinfo's `compactReplacer`, which
4
+ // strips empty default arrays — so the on-disk data is the `*Input` shape
5
+ // (defaulted arrays optional), not the parsed `*Json` shape. Typing it as
6
+ // input makes TypeScript force a guard on every defaulted-array read.
7
+ //
8
+ // Helper to access kind-specific fields on the discriminated union.
9
+ // At runtime the field is present or undefined; TypeScript needs the cast.
10
+ const field = (decl, key) => decl[key];
4
11
  /**
5
12
  * Rich runtime representation of an exported declaration.
13
+ *
14
+ * Wraps svelte-docinfo's `DeclarationJson` discriminated union (on `kind`)
15
+ * with Svelte 5 reactive derivations and computed URLs.
16
+ * Kind-specific fields are accessed via the `field()` helper since
17
+ * not all fields exist on all variants.
18
+ *
19
+ * @see {@link https://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library
20
+ * @see `DeclarationDetail.svelte` for the rendering component
6
21
  */
7
22
  export class Declaration {
8
23
  module = $state.raw();
@@ -17,8 +32,8 @@ export class Declaration {
17
32
  /**
18
33
  * GitHub source URL with line number.
19
34
  */
20
- url_github = $derived(this.library.repo_url && this.declaration_json.source_line
21
- ? url_github_file(this.library.repo_url, `src/lib/${this.module_path}`, this.declaration_json.source_line)
35
+ url_github = $derived(this.library.repo_url && this.declaration_json.sourceLine
36
+ ? url_github_file(this.library.repo_url, `src/lib/${this.module_path}`, this.declaration_json.sourceLine)
22
37
  : undefined);
23
38
  /**
24
39
  * API documentation URL.
@@ -27,7 +42,10 @@ export class Declaration {
27
42
  /**
28
43
  * Generated TypeScript import statement.
29
44
  */
30
- import_statement = $derived(declaration_generate_import(this.declaration_json, this.module_path, this.library.package_json.name));
45
+ import_statement = $derived(
46
+ // `generateImport` reads only `name`/`kind`/path, none of the defaulted
47
+ // arrays, so asserting the parsed shape here is sound.
48
+ generateImport(this.declaration_json, this.module_path, this.library.package_json.name));
31
49
  /**
32
50
  * Public documentation link (if homepage_url is available).
33
51
  */
@@ -37,29 +55,59 @@ export class Declaration {
37
55
  /**
38
56
  * Display name with generic parameters.
39
57
  */
40
- display_name = $derived(declaration_get_display_name(this.declaration_json));
41
- type_signature = $derived(this.declaration_json.type_signature);
42
- doc_comment = $derived(this.declaration_json.doc_comment);
43
- deprecated_message = $derived(this.declaration_json.deprecated_message);
44
- parameters = $derived(this.declaration_json.parameters);
45
- props = $derived(this.declaration_json.props);
46
- return_type = $derived(this.declaration_json.return_type);
47
- return_description = $derived(this.declaration_json.return_description);
48
- generic_params = $derived(this.declaration_json.generic_params);
49
- extends = $derived(this.declaration_json.extends);
50
- implements = $derived(this.declaration_json.implements);
51
- throws = $derived(this.declaration_json.throws);
58
+ // `getDisplayName` reads `genericParams` unguarded, so feed it the defaulted
59
+ // value rather than the raw (possibly-absent) input field.
60
+ display_name = $derived(getDisplayName({
61
+ ...this.declaration_json,
62
+ genericParams: this.declaration_json.genericParams ?? [],
63
+ }));
64
+ type_signature = $derived(this.declaration_json.typeSignature);
65
+ doc_comment = $derived(this.declaration_json.docComment);
66
+ deprecated_message = $derived(this.declaration_json.deprecatedMessage);
67
+ parameters = $derived(field(this.declaration_json, 'parameters'));
68
+ props = $derived(field(this.declaration_json, 'props'));
69
+ return_type = $derived(field(this.declaration_json, 'returnType'));
70
+ return_description = $derived(field(this.declaration_json, 'returnDescription'));
71
+ generic_params = $derived(this.declaration_json.genericParams ?? []);
72
+ extends_type = $derived(field(this.declaration_json, 'extends'));
73
+ implements_types = $derived(field(this.declaration_json, 'implements'));
74
+ throws = $derived(this.declaration_json.throws ?? []);
52
75
  since = $derived(this.declaration_json.since);
53
- examples = $derived(this.declaration_json.examples);
54
- see_also = $derived(this.declaration_json.see_also);
55
- members = $derived(this.declaration_json.members);
56
- properties = $derived(this.declaration_json.properties);
57
- has_examples = $derived(!!(this.examples && this.examples.length > 0));
76
+ examples = $derived(this.declaration_json.examples ?? []);
77
+ see_also = $derived(this.declaration_json.seeAlso ?? []);
78
+ /**
79
+ * Nested members for classes, interfaces, types, and enums.
80
+ */
81
+ members = $derived(field(this.declaration_json, 'members'));
82
+ /**
83
+ * Intersection types whose properties are external (filtered out of props/members).
84
+ * Present on `component` and `type` kinds.
85
+ */
86
+ intersects = $derived(field(this.declaration_json, 'intersects'));
87
+ /**
88
+ * Whether a component accepts children via props or template usage.
89
+ * Present on `component` kind only.
90
+ */
91
+ accepts_children = $derived(field(this.declaration_json, 'acceptsChildren'));
92
+ /**
93
+ * Function overload signatures when multiple public overloads exist.
94
+ * Present on `function` and `snippet` kinds, and on function/constructor members.
95
+ */
96
+ overloads = $derived(field(this.declaration_json, 'overloads'));
97
+ /**
98
+ * Re-export alias info when this declaration is a renamed re-export.
99
+ */
100
+ alias_of = $derived(this.declaration_json.aliasOf);
101
+ /**
102
+ * Mutation documentation from `@mutates` tags, mapping parameter names to descriptions.
103
+ */
104
+ mutates = $derived(this.declaration_json.mutates);
105
+ has_examples = $derived(this.examples.length > 0);
58
106
  is_deprecated = $derived(!!this.deprecated_message);
59
107
  has_documentation = $derived(!!this.doc_comment);
60
108
  has_parameters = $derived(!!(this.parameters && this.parameters.length > 0));
61
109
  has_props = $derived(!!(this.props && this.props.length > 0));
62
- has_generics = $derived(!!(this.generic_params && this.generic_params.length > 0));
110
+ has_generics = $derived(this.generic_params.length > 0);
63
111
  constructor(module, declaration_json) {
64
112
  this.module = module;
65
113
  this.declaration_json = declaration_json;
@@ -1,4 +1,9 @@
1
1
  import { SvelteMap, SvelteSet } from 'svelte/reactivity';
2
+ export declare const docs_links_context: {
3
+ get: (error_message?: string) => DocsLinks;
4
+ get_maybe: () => DocsLinks | undefined;
5
+ set: (value: DocsLinks) => DocsLinks;
6
+ };
2
7
  /**
3
8
  * Convert a string to a URL-safe fragment identifier, preserving case.
4
9
  * Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
@@ -17,11 +22,6 @@ export declare const to_docs_path_info: (path_slug: string, pathname: string, ro
17
22
  path_is_selected: boolean;
18
23
  path_segment: string | undefined;
19
24
  };
20
- export declare const docs_links_context: {
21
- get: (error_message?: string) => DocsLinks;
22
- get_maybe: () => DocsLinks | undefined;
23
- set: (value: DocsLinks) => DocsLinks;
24
- };
25
25
  export type DocsLinkTag = 'h2' | 'h3' | 'h4';
26
26
  export interface DocsLinkInfo {
27
27
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"docs_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/docs_helpers.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAKvD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAY1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,SAAS,QAAmB,CAAC;AAC1C,eAAO,MAAM,aAAa,QAAqB,CAAC;AAEhD,eAAO,MAAM,iBAAiB,GAC7B,WAAW,MAAM,EACjB,UAAU,MAAM,EAChB,kBAA6B,KAC3B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;CAK5E,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAA8B,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,E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CAAC;IAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;CAK5E,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,WAAW,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,qBAAa,SAAS;;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAmB;IAgBlE,UAAU,iBA4BP;IAEH,QAAQ,CAAC,kBAAkB,EAAE,SAAS,CAAC,MAAM,CAAC,CAAmB;gBAErD,SAAS,SAAoB;IAIzC,GAAG,CACF,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,WAAW,EACjB,KAAK,SAAI,EACT,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,GAClB,MAAM;IAkBT,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIxB;;;OAGG;IACH,mBAAmB,IAAI,MAAM;CAG7B"}
@@ -2,6 +2,7 @@ import { resolve } from '$app/paths';
2
2
  import { SvelteMap, SvelteSet } from 'svelte/reactivity';
3
3
  import { ensure_end, ensure_start } from '@fuzdev/fuz_util/string.js';
4
4
  import { create_context } from './context_helpers.js';
5
+ export const docs_links_context = create_context();
5
6
  /**
6
7
  * Convert a string to a URL-safe fragment identifier, preserving case.
7
8
  * Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
@@ -31,7 +32,6 @@ export const to_docs_path_info = (path_slug, pathname, root_path = DOCS_PATH_DEF
31
32
  const path_is_selected = path_segment === path_slug; // messy but works
32
33
  return { path, path_is_selected, path_segment };
33
34
  };
34
- export const docs_links_context = create_context();
35
35
  export class DocsLinks {
36
36
  root_path;
37
37
  links = new SvelteMap();
@@ -1,6 +1,11 @@
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
+ export declare const library_context: {
5
+ get: (error_message?: string) => Library;
6
+ get_maybe: () => Library | undefined;
7
+ set: (value: Library) => Library;
8
+ };
4
9
  /**
5
10
  * Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
6
11
  */
@@ -207,9 +212,4 @@ export declare class Library {
207
212
  */
208
213
  search_declarations(query: string): Array<Declaration>;
209
214
  }
210
- export declare const library_context: {
211
- get: (error_message?: string) => Library;
212
- get_maybe: () => Library | undefined;
213
- set: (value: Library) => Library;
214
- };
215
215
  //# sourceMappingURL=library.svelte.d.ts.map
@@ -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,CAAC;AAIlE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,MAGzD,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,OAAO;IACnB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAiB;IAEnD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAW5D;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC;CAGtD"}
@@ -2,6 +2,7 @@ import { ensure_start, strip_end } from '@fuzdev/fuz_util/string.js';
2
2
  import { create_context } from './context_helpers.js';
3
3
  import { Declaration } from './declaration.svelte.js';
4
4
  import { Module } from './module.svelte.js';
5
+ export const library_context = create_context();
5
6
  /**
6
7
  * Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
7
8
  */
@@ -51,7 +52,7 @@ export class Library {
51
52
  * All modules as rich `Module` instances.
52
53
  */
53
54
  modules = $derived(this.source_json.modules
54
- ? this.source_json.modules.map((module_json) => new Module(this, module_json))
55
+ ? this.source_json.modules.map((module_json) => new Module(this, module_json)) // TODO: remove cast when fuz_util SourceJson uses svelte-docinfo types
55
56
  : []);
56
57
  /**
57
58
  * All modules sorted alphabetically by path.
@@ -94,7 +95,6 @@ export class Library {
94
95
  return library_search_declarations(this.declarations, query);
95
96
  }
96
97
  }
97
- export const library_context = create_context();
98
98
  /**
99
99
  * Search declarations by query string with multi-term AND logic.
100
100
  */
@@ -1,22 +1,21 @@
1
1
  /**
2
2
  * Gro-specific library metadata generation.
3
3
  *
4
- * This module provides Gro integration for library generation. It wraps the generic
5
- * `library_generate` function with Gro's `Gen` interface and provides adapters for
6
- * converting Gro's `Disknode` to the build-tool agnostic `SourceFileInfo`.
4
+ * This module provides Gro integration for library generation. It uses svelte-docinfo's
5
+ * pure analysis (`analyze`) and wraps the results with fuz_ui's opinionated
6
+ * LibraryJson format (GitHub/npm metadata).
7
7
  *
8
- * For build-tool agnostic usage, see `library_generate.ts`.
8
+ * For build-tool agnostic usage, see `svelte-docinfo`.
9
9
  *
10
- * @see `library_generate.ts` for the generic generation entry point
11
- * @see `library_pipeline.ts` for pipeline helpers
12
- * @see `library_output.ts` for output file generation
10
+ * @see svelte-docinfo/analyze.js for the generic analysis entry point
11
+ * @see svelte-docinfo/postprocess.js for post-processing helpers
12
+ * @see library_output.js for output file generation
13
13
  *
14
14
  * @module
15
15
  */
16
16
  import type { Gen } from '@fuzdev/gro';
17
17
  import type { Disknode } from '@fuzdev/gro/disknode.js';
18
- import { type SourceFileInfo, type ModuleSourceOptions, type ModuleSourcePartial } from './module_helpers.js';
19
- import { type OnDuplicatesCallback } from './library_generate.js';
18
+ import { type ModuleSourceOptions, type OnDuplicatesCallback, type SourceFileInfo, type SourceOptionsDefaults } from 'svelte-docinfo';
20
19
  /** Options for Gro library generation. */
21
20
  export interface LibraryGenOptions {
22
21
  /**
@@ -26,17 +25,17 @@ export interface LibraryGenOptions {
26
25
  * merged with defaults. The `project_root` is automatically set to
27
26
  * `process.cwd()` if not provided.
28
27
  */
29
- source?: ModuleSourceOptions | Partial<ModuleSourcePartial>;
28
+ source?: ModuleSourceOptions | Partial<SourceOptionsDefaults>;
30
29
  /**
31
30
  * Callback invoked when duplicate declaration names are found.
32
31
  *
33
32
  * Consumers decide how to handle duplicates: throw, warn, or ignore.
34
- * Use `library_throw_on_duplicates` for strict flat namespace enforcement.
33
+ * Use `throwOnDuplicates` for strict flat namespace enforcement.
35
34
  *
36
35
  * @example
37
36
  * ```ts
38
37
  * // Throw on duplicates (strict flat namespace)
39
- * library_gen({ on_duplicates: library_throw_on_duplicates });
38
+ * library_gen({ on_duplicates: throwOnDuplicates });
40
39
  *
41
40
  * // Warn but continue
42
41
  * library_gen({
@@ -53,7 +52,13 @@ export interface LibraryGenOptions {
53
52
  /**
54
53
  * Convert Gro's `Disknode` to the build-tool agnostic `SourceFileInfo` interface.
55
54
  *
56
- * Use this when you want to analyze files using Gro's filer directly.
55
+ * Use this when you want to analyze files using Gro's filer directly. The
56
+ * `dependencies` field is populated from the filer's forward-edge graph — the
57
+ * svelte-docinfo session honors it as pre-resolved input and skips its own
58
+ * lex+resolve pass for these files, avoiding duplicate work the filer already did.
59
+ *
60
+ * Reverse edges (`dependents`) are not threaded through — svelte-docinfo
61
+ * computes them internally from the forward edges of the owned set.
57
62
  *
58
63
  * @throws Error if disknode has no content (should be loaded by Gro filer)
59
64
  */
@@ -62,7 +67,7 @@ export declare const source_file_from_disknode: (disknode: Disknode) => SourceFi
62
67
  * Collect source files from Gro disknodes, filtering BEFORE conversion to `SourceFileInfo`.
63
68
  *
64
69
  * This avoids errors from files outside source directories (like test fixtures that may
65
- * have malformed paths or missing content). The filtering uses `module_is_source` which
70
+ * have malformed paths or missing content). The filtering uses `isSource` which
66
71
  * checks `source_paths` to only include files in configured source directories.
67
72
  *
68
73
  * @param disknodes - iterator of Gro disknodes from filer
@@ -78,10 +83,12 @@ export declare const library_collect_source_files_from_disknodes: (disknodes: It
78
83
  *
79
84
  * This is the Gro-specific entry point. It handles:
80
85
  * - Reading files from Gro's filer
81
- * - Loading `package.json` via Gro utilities
82
- * - Returning output in Gro's `Gen` format
86
+ * - Loading package.json via Gro utilities
87
+ * - Analyzing source with svelte-docinfo (pure analysis)
88
+ * - Wrapping with LibraryJson (GitHub/npm metadata)
89
+ * - Returning output in Gro's Gen format
83
90
  *
84
- * For build-tool agnostic usage, use `library_generate` directly.
91
+ * For build-tool agnostic usage, use `analyze` directly.
85
92
  *
86
93
  * Usage in a `.gen.ts` file:
87
94
  *
@@ -1 +1 @@
1
- {"version":3,"file":"library_gen.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library_gen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAErC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAmB,KAAK,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAElF,0CAA0C;AA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