@fuzdev/fuz_ui 0.190.0 → 0.191.1
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.
- package/dist/ContextmenuRootForSafariCompatibility.svelte +2 -2
- package/dist/MdzNodeView.svelte +3 -2
- package/dist/MdzNodeView.svelte.d.ts +1 -1
- package/dist/MdzNodeView.svelte.d.ts.map +1 -1
- package/dist/ProjectLinks.svelte +4 -2
- package/dist/ProjectLinks.svelte.d.ts.map +1 -1
- package/dist/analysis_context.d.ts +3 -3
- package/dist/analysis_context.js +3 -3
- package/dist/contextmenu_state.svelte.d.ts +7 -7
- package/dist/contextmenu_state.svelte.js +7 -7
- package/dist/docs_helpers.svelte.d.ts +7 -5
- package/dist/docs_helpers.svelte.d.ts.map +1 -1
- package/dist/docs_helpers.svelte.js +7 -5
- package/dist/intersect.svelte.d.ts +1 -1
- package/dist/intersect.svelte.js +1 -1
- package/dist/library_analysis.d.ts +6 -6
- package/dist/library_analysis.js +6 -6
- package/dist/library_gen.d.ts +4 -4
- package/dist/library_gen.js +4 -4
- package/dist/library_generate.d.ts +2 -2
- package/dist/library_helpers.d.ts +11 -11
- package/dist/library_helpers.js +11 -11
- package/dist/library_pipeline.d.ts +5 -5
- package/dist/library_pipeline.js +5 -5
- package/dist/logos.d.ts +7 -0
- package/dist/logos.d.ts.map +1 -1
- package/dist/logos.js +5 -0
- package/dist/mdz.d.ts +1 -14
- package/dist/mdz.d.ts.map +1 -1
- package/dist/mdz.js +64 -163
- package/dist/mdz_helpers.d.ts +26 -2
- package/dist/mdz_helpers.d.ts.map +1 -1
- package/dist/mdz_helpers.js +59 -5
- package/dist/mdz_lexer.d.ts.map +1 -1
- package/dist/mdz_lexer.js +18 -9
- package/dist/mdz_to_svelte.d.ts +5 -5
- package/dist/mdz_to_svelte.d.ts.map +1 -1
- package/dist/mdz_to_svelte.js +5 -5
- package/dist/mdz_token_parser.js +4 -3
- package/dist/module_helpers.d.ts +9 -9
- package/dist/module_helpers.js +9 -9
- package/dist/package_helpers.d.ts +20 -20
- package/dist/package_helpers.js +20 -20
- package/dist/storage.d.ts +4 -4
- package/dist/storage.js +4 -4
- package/dist/svelte_helpers.d.ts +13 -13
- package/dist/svelte_helpers.js +13 -13
- package/dist/svelte_preprocess_mdz.d.ts +2 -2
- package/dist/svelte_preprocess_mdz.js +2 -2
- package/dist/tome.d.ts +1 -1
- package/dist/tome.js +1 -1
- package/dist/ts_helpers.d.ts +24 -24
- package/dist/ts_helpers.js +24 -24
- package/dist/tsdoc_helpers.d.ts +6 -6
- package/dist/tsdoc_helpers.js +6 -6
- package/dist/tsdoc_mdz.js +1 -1
- package/package.json +8 -7
- package/src/lib/analysis_context.ts +3 -3
- package/src/lib/contextmenu_state.svelte.ts +7 -7
- package/src/lib/docs_helpers.svelte.ts +7 -5
- package/src/lib/intersect.svelte.ts +1 -1
- package/src/lib/library_analysis.ts +6 -6
- package/src/lib/library_gen.ts +4 -4
- package/src/lib/library_generate.ts +2 -2
- package/src/lib/library_helpers.ts +11 -11
- package/src/lib/library_pipeline.ts +5 -5
- package/src/lib/logos.ts +6 -0
- package/src/lib/mdz.ts +73 -177
- package/src/lib/mdz_helpers.ts +60 -5
- package/src/lib/mdz_lexer.ts +20 -9
- package/src/lib/mdz_to_svelte.ts +6 -5
- package/src/lib/mdz_token_parser.ts +4 -3
- package/src/lib/module_helpers.ts +9 -9
- package/src/lib/package_helpers.ts +20 -20
- package/src/lib/storage.ts +4 -4
- package/src/lib/svelte_helpers.ts +13 -13
- package/src/lib/svelte_preprocess_mdz.ts +2 -2
- package/src/lib/tome.ts +1 -1
- package/src/lib/ts_helpers.ts +24 -24
- package/src/lib/tsdoc_helpers.ts +6 -6
- package/src/lib/tsdoc_mdz.ts +1 -1
package/dist/module_helpers.d.ts
CHANGED
|
@@ -159,8 +159,8 @@ export declare const MODULE_SOURCE_PARTIAL: ModuleSourcePartial;
|
|
|
159
159
|
/**
|
|
160
160
|
* Create complete source options from project root and optional overrides.
|
|
161
161
|
*
|
|
162
|
-
* @param project_root
|
|
163
|
-
* @param overrides
|
|
162
|
+
* @param project_root - absolute path to project root (typically `process.cwd()`)
|
|
163
|
+
* @param overrides - optional overrides for default options
|
|
164
164
|
*
|
|
165
165
|
* @example
|
|
166
166
|
* ```ts
|
|
@@ -243,8 +243,8 @@ export declare const module_get_source_root: (options: ModuleSourceOptions) => s
|
|
|
243
243
|
*
|
|
244
244
|
* Uses proper path semantics: strips `project_root/source_root/` prefix.
|
|
245
245
|
*
|
|
246
|
-
* @param source_id
|
|
247
|
-
* @param options
|
|
246
|
+
* @param source_id - absolute path to the source file
|
|
247
|
+
* @param options - module source options for path extraction
|
|
248
248
|
*
|
|
249
249
|
* @example
|
|
250
250
|
* ```ts
|
|
@@ -305,9 +305,9 @@ export declare const module_is_test: (path: string) => boolean;
|
|
|
305
305
|
* `project_root/source_path/`. No heuristics needed - nested directories
|
|
306
306
|
* are correctly excluded by the prefix check.
|
|
307
307
|
*
|
|
308
|
-
* @param path
|
|
309
|
-
* @param options
|
|
310
|
-
* @returns
|
|
308
|
+
* @param path - full absolute path to check
|
|
309
|
+
* @param options - module source options for filtering
|
|
310
|
+
* @returns true if the path is an analyzable source file
|
|
311
311
|
*
|
|
312
312
|
* @example
|
|
313
313
|
* ```ts
|
|
@@ -324,8 +324,8 @@ export declare const module_is_source: (path: string, options: ModuleSourceOptio
|
|
|
324
324
|
* Filters to only include source modules (excludes external packages, node_modules, tests).
|
|
325
325
|
* Returns sorted arrays of module paths (relative to source_root) for deterministic output.
|
|
326
326
|
*
|
|
327
|
-
* @param source_file
|
|
328
|
-
* @param options
|
|
327
|
+
* @param source_file - the source file info to extract dependencies from
|
|
328
|
+
* @param options - module source options for filtering and path extraction
|
|
329
329
|
*/
|
|
330
330
|
export declare const module_extract_dependencies: (source_file: SourceFileInfo, options: ModuleSourceOptions) => {
|
|
331
331
|
dependencies: Array<string>;
|
package/dist/module_helpers.js
CHANGED
|
@@ -36,8 +36,8 @@ export const MODULE_SOURCE_PARTIAL = {
|
|
|
36
36
|
/**
|
|
37
37
|
* Create complete source options from project root and optional overrides.
|
|
38
38
|
*
|
|
39
|
-
* @param project_root
|
|
40
|
-
* @param overrides
|
|
39
|
+
* @param project_root - absolute path to project root (typically `process.cwd()`)
|
|
40
|
+
* @param overrides - optional overrides for default options
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```ts
|
|
@@ -183,8 +183,8 @@ export const module_get_source_root = (options) => {
|
|
|
183
183
|
*
|
|
184
184
|
* Uses proper path semantics: strips `project_root/source_root/` prefix.
|
|
185
185
|
*
|
|
186
|
-
* @param source_id
|
|
187
|
-
* @param options
|
|
186
|
+
* @param source_id - absolute path to the source file
|
|
187
|
+
* @param options - module source options for path extraction
|
|
188
188
|
*
|
|
189
189
|
* @example
|
|
190
190
|
* ```ts
|
|
@@ -254,9 +254,9 @@ export const module_is_test = (path) => path.endsWith('.test.ts');
|
|
|
254
254
|
* `project_root/source_path/`. No heuristics needed - nested directories
|
|
255
255
|
* are correctly excluded by the prefix check.
|
|
256
256
|
*
|
|
257
|
-
* @param path
|
|
258
|
-
* @param options
|
|
259
|
-
* @returns
|
|
257
|
+
* @param path - full absolute path to check
|
|
258
|
+
* @param options - module source options for filtering
|
|
259
|
+
* @returns true if the path is an analyzable source file
|
|
260
260
|
*
|
|
261
261
|
* @example
|
|
262
262
|
* ```ts
|
|
@@ -288,8 +288,8 @@ export const module_is_source = (path, options) => {
|
|
|
288
288
|
* Filters to only include source modules (excludes external packages, node_modules, tests).
|
|
289
289
|
* Returns sorted arrays of module paths (relative to source_root) for deterministic output.
|
|
290
290
|
*
|
|
291
|
-
* @param source_file
|
|
292
|
-
* @param options
|
|
291
|
+
* @param source_file - the source file info to extract dependencies from
|
|
292
|
+
* @param options - module source options for filtering and path extraction
|
|
293
293
|
*/
|
|
294
294
|
export const module_extract_dependencies = (source_file, options) => {
|
|
295
295
|
const dependencies = [];
|
|
@@ -24,10 +24,10 @@ import type { PackageJson } from '@fuzdev/fuz_util/package_json.js';
|
|
|
24
24
|
/**
|
|
25
25
|
* Build GitHub file URL for a repository.
|
|
26
26
|
*
|
|
27
|
-
* @param repo_url
|
|
28
|
-
* @param file_path
|
|
29
|
-
* @param line
|
|
30
|
-
* @returns
|
|
27
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
28
|
+
* @param file_path - path to the file (leading './' is stripped)
|
|
29
|
+
* @param line - optional line number for deep linking
|
|
30
|
+
* @returns full GitHub URL to the file on the main branch
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```ts
|
|
@@ -45,9 +45,9 @@ export declare const url_github_file: (repo_url: string, file_path: string, line
|
|
|
45
45
|
/**
|
|
46
46
|
* Build GitHub organization URL from repo URL and repo name.
|
|
47
47
|
*
|
|
48
|
-
* @param repo_url
|
|
49
|
-
* @param repo_name
|
|
50
|
-
* @returns
|
|
48
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
49
|
+
* @param repo_name - repository name to strip from the URL
|
|
50
|
+
* @returns organization URL, or null if repo_url doesn't end with repo_name
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```ts
|
|
@@ -59,8 +59,8 @@ export declare const url_github_org: (repo_url: string, repo_name: string) => st
|
|
|
59
59
|
/**
|
|
60
60
|
* Extract GitHub owner/org name from repository URL.
|
|
61
61
|
*
|
|
62
|
-
* @param repo_url
|
|
63
|
-
* @returns
|
|
62
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
63
|
+
* @returns owner name, or null if not a valid GitHub URL
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
66
|
* ```ts
|
|
@@ -78,8 +78,8 @@ export declare const repo_url_github_owner: (repo_url: string) => string | null;
|
|
|
78
78
|
/**
|
|
79
79
|
* Build npm package URL.
|
|
80
80
|
*
|
|
81
|
-
* @param package_name
|
|
82
|
-
* @returns
|
|
81
|
+
* @param package_name - package name (can be scoped like '@org/package')
|
|
82
|
+
* @returns full npm package page URL
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
85
|
* ```ts
|
|
@@ -96,15 +96,15 @@ export declare const url_npm_package: (package_name: string) => string;
|
|
|
96
96
|
* - It has exports defined
|
|
97
97
|
* - Its version is not the initial '0.0.1'
|
|
98
98
|
*
|
|
99
|
-
* @param package_json
|
|
100
|
-
* @returns
|
|
99
|
+
* @param package_json - the package.json object to check
|
|
100
|
+
* @returns `true` if the package appears to be published
|
|
101
101
|
*/
|
|
102
102
|
export declare const package_is_published: (package_json: PackageJson) => boolean;
|
|
103
103
|
/**
|
|
104
104
|
* Extract repository name without scope from package name.
|
|
105
105
|
*
|
|
106
|
-
* @param name
|
|
107
|
-
* @returns
|
|
106
|
+
* @param name - package name (can be scoped like '@org/package')
|
|
107
|
+
* @returns repository name without scope
|
|
108
108
|
* @throws Error if scoped package name is malformed
|
|
109
109
|
*
|
|
110
110
|
* @example
|
|
@@ -126,8 +126,8 @@ export declare const repo_name_parse: (name: string) => string;
|
|
|
126
126
|
* Handles both string format and object format with `url` property.
|
|
127
127
|
* Strips common prefixes ('git+') and suffixes ('.git', '/').
|
|
128
128
|
*
|
|
129
|
-
* @param repository
|
|
130
|
-
* @returns
|
|
129
|
+
* @param repository - the repository field from package.json
|
|
130
|
+
* @returns clean repository URL, or null if not provided
|
|
131
131
|
*
|
|
132
132
|
* @example
|
|
133
133
|
* ```ts
|
|
@@ -151,9 +151,9 @@ export declare const repo_url_parse: (repository: PackageJson["repository"]) =>
|
|
|
151
151
|
/**
|
|
152
152
|
* Build .well-known URL for package metadata files.
|
|
153
153
|
*
|
|
154
|
-
* @param homepage_url
|
|
155
|
-
* @param filename
|
|
156
|
-
* @returns
|
|
154
|
+
* @param homepage_url - package homepage URL
|
|
155
|
+
* @param filename - filename in .well-known directory
|
|
156
|
+
* @returns full URL to the .well-known file
|
|
157
157
|
*
|
|
158
158
|
* @example
|
|
159
159
|
* ```ts
|
package/dist/package_helpers.js
CHANGED
|
@@ -24,10 +24,10 @@ import { ensure_end, strip_end, strip_start } from '@fuzdev/fuz_util/string.js';
|
|
|
24
24
|
/**
|
|
25
25
|
* Build GitHub file URL for a repository.
|
|
26
26
|
*
|
|
27
|
-
* @param repo_url
|
|
28
|
-
* @param file_path
|
|
29
|
-
* @param line
|
|
30
|
-
* @returns
|
|
27
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
28
|
+
* @param file_path - path to the file (leading './' is stripped)
|
|
29
|
+
* @param line - optional line number for deep linking
|
|
30
|
+
* @returns full GitHub URL to the file on the main branch
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```ts
|
|
@@ -49,9 +49,9 @@ export const url_github_file = (repo_url, file_path, line) => {
|
|
|
49
49
|
/**
|
|
50
50
|
* Build GitHub organization URL from repo URL and repo name.
|
|
51
51
|
*
|
|
52
|
-
* @param repo_url
|
|
53
|
-
* @param repo_name
|
|
54
|
-
* @returns
|
|
52
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
53
|
+
* @param repo_name - repository name to strip from the URL
|
|
54
|
+
* @returns organization URL, or null if repo_url doesn't end with repo_name
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
57
|
* ```ts
|
|
@@ -65,8 +65,8 @@ export const url_github_org = (repo_url, repo_name) => {
|
|
|
65
65
|
/**
|
|
66
66
|
* Extract GitHub owner/org name from repository URL.
|
|
67
67
|
*
|
|
68
|
-
* @param repo_url
|
|
69
|
-
* @returns
|
|
68
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
69
|
+
* @returns owner name, or null if not a valid GitHub URL
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
@@ -90,8 +90,8 @@ export const repo_url_github_owner = (repo_url) => {
|
|
|
90
90
|
/**
|
|
91
91
|
* Build npm package URL.
|
|
92
92
|
*
|
|
93
|
-
* @param package_name
|
|
94
|
-
* @returns
|
|
93
|
+
* @param package_name - package name (can be scoped like '@org/package')
|
|
94
|
+
* @returns full npm package page URL
|
|
95
95
|
*
|
|
96
96
|
* @example
|
|
97
97
|
* ```ts
|
|
@@ -108,8 +108,8 @@ export const url_npm_package = (package_name) => 'https://www.npmjs.com/package/
|
|
|
108
108
|
* - It has exports defined
|
|
109
109
|
* - Its version is not the initial '0.0.1'
|
|
110
110
|
*
|
|
111
|
-
* @param package_json
|
|
112
|
-
* @returns
|
|
111
|
+
* @param package_json - the package.json object to check
|
|
112
|
+
* @returns `true` if the package appears to be published
|
|
113
113
|
*/
|
|
114
114
|
export const package_is_published = (package_json) => {
|
|
115
115
|
return !package_json.private && !!package_json.exports && package_json.version !== '0.0.1';
|
|
@@ -117,8 +117,8 @@ export const package_is_published = (package_json) => {
|
|
|
117
117
|
/**
|
|
118
118
|
* Extract repository name without scope from package name.
|
|
119
119
|
*
|
|
120
|
-
* @param name
|
|
121
|
-
* @returns
|
|
120
|
+
* @param name - package name (can be scoped like '@org/package')
|
|
121
|
+
* @returns repository name without scope
|
|
122
122
|
* @throws Error if scoped package name is malformed
|
|
123
123
|
*
|
|
124
124
|
* @example
|
|
@@ -149,8 +149,8 @@ export const repo_name_parse = (name) => {
|
|
|
149
149
|
* Handles both string format and object format with `url` property.
|
|
150
150
|
* Strips common prefixes ('git+') and suffixes ('.git', '/').
|
|
151
151
|
*
|
|
152
|
-
* @param repository
|
|
153
|
-
* @returns
|
|
152
|
+
* @param repository - the repository field from package.json
|
|
153
|
+
* @returns clean repository URL, or null if not provided
|
|
154
154
|
*
|
|
155
155
|
* @example
|
|
156
156
|
* ```ts
|
|
@@ -181,9 +181,9 @@ export const repo_url_parse = (repository) => {
|
|
|
181
181
|
/**
|
|
182
182
|
* Build .well-known URL for package metadata files.
|
|
183
183
|
*
|
|
184
|
-
* @param homepage_url
|
|
185
|
-
* @param filename
|
|
186
|
-
* @returns
|
|
184
|
+
* @param homepage_url - package homepage URL
|
|
185
|
+
* @param filename - filename in .well-known directory
|
|
186
|
+
* @returns full URL to the .well-known file
|
|
187
187
|
*
|
|
188
188
|
* @example
|
|
189
189
|
* ```ts
|
package/dist/storage.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
export declare const save_to_storage: (key: string, value: any, is_json?: boolean) => void;
|
|
5
5
|
/**
|
|
6
6
|
* Utility function to load a value from `localStorage` with optional parsing
|
|
7
|
-
* @param key
|
|
8
|
-
* @param is_json
|
|
9
|
-
* @param parse_fn
|
|
10
|
-
* @returns
|
|
7
|
+
* @param key - the localStorage key
|
|
8
|
+
* @param is_json - whether to parse the value as JSON
|
|
9
|
+
* @param parse_fn - optional custom parsing function to transform the value
|
|
10
|
+
* @returns the parsed value or null if not found or parsing fails
|
|
11
11
|
*/
|
|
12
12
|
export declare const load_from_storage: <T>(key: string, is_json?: boolean, parse_fn?: (value: unknown) => T | null) => T | null;
|
|
13
13
|
//# sourceMappingURL=storage.d.ts.map
|
package/dist/storage.js
CHANGED
|
@@ -17,10 +17,10 @@ export const save_to_storage = (key, value, is_json = false) => {
|
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Utility function to load a value from `localStorage` with optional parsing
|
|
20
|
-
* @param key
|
|
21
|
-
* @param is_json
|
|
22
|
-
* @param parse_fn
|
|
23
|
-
* @returns
|
|
20
|
+
* @param key - the localStorage key
|
|
21
|
+
* @param is_json - whether to parse the value as JSON
|
|
22
|
+
* @param parse_fn - optional custom parsing function to transform the value
|
|
23
|
+
* @returns the parsed value or null if not found or parsing fails
|
|
24
24
|
*/
|
|
25
25
|
export const load_from_storage = (key, is_json = false, parse_fn) => {
|
|
26
26
|
if (!BROWSER)
|
package/dist/svelte_helpers.d.ts
CHANGED
|
@@ -43,12 +43,12 @@ export interface SvelteFileAnalysis {
|
|
|
43
43
|
* Returns raw analysis data matching `ModuleAnalysis` structure.
|
|
44
44
|
* Consumer decides filtering policy (Svelte components are never nodocs).
|
|
45
45
|
*
|
|
46
|
-
* @param source_file
|
|
47
|
-
* @param module_path
|
|
48
|
-
* @param checker TypeScript type checker
|
|
49
|
-
* @param options
|
|
50
|
-
* @param ctx
|
|
51
|
-
* @returns
|
|
46
|
+
* @param source_file - the source file info (from Gro filer, file system, or other source)
|
|
47
|
+
* @param module_path - the module path (relative to source root)
|
|
48
|
+
* @param checker - TypeScript type checker
|
|
49
|
+
* @param options - module source options for path extraction
|
|
50
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
51
|
+
* @returns module analysis matching `ModuleAnalysis` structure
|
|
52
52
|
*/
|
|
53
53
|
export declare const svelte_analyze_module: (source_file: SourceFileInfo, module_path: string, checker: ts.TypeChecker, options: ModuleSourceOptions, ctx: AnalysisContext) => ModuleAnalysis;
|
|
54
54
|
/**
|
|
@@ -61,11 +61,11 @@ export declare const svelte_analyze_module: (source_file: SourceFileInfo, module
|
|
|
61
61
|
*
|
|
62
62
|
* Suitable for use in documentation generators, build tools, and analysis.
|
|
63
63
|
*
|
|
64
|
-
* @param source_file
|
|
65
|
-
* @param module_path
|
|
66
|
-
* @param checker TypeScript type checker for type resolution
|
|
67
|
-
* @param ctx
|
|
68
|
-
* @returns
|
|
64
|
+
* @param source_file - source file info with path and content
|
|
65
|
+
* @param module_path - module path relative to source root (e.g., 'Alert.svelte')
|
|
66
|
+
* @param checker - TypeScript type checker for type resolution
|
|
67
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
68
|
+
* @returns component declaration and optional module-level comment
|
|
69
69
|
*/
|
|
70
70
|
export declare const svelte_analyze_file: (source_file: SourceFileInfo, module_path: string, checker: ts.TypeChecker, ctx: AnalysisContext) => SvelteFileAnalysis;
|
|
71
71
|
/**
|
|
@@ -85,8 +85,8 @@ export declare const svelte_extract_script_content: (svelte_source: string) => s
|
|
|
85
85
|
* Requires `@module` tag to identify module comments. The tag line is stripped
|
|
86
86
|
* from the output.
|
|
87
87
|
*
|
|
88
|
-
* @param script_content -
|
|
89
|
-
* @returns
|
|
88
|
+
* @param script_content - the content of the `<script>` tag
|
|
89
|
+
* @returns the cleaned module comment text, or undefined if none found
|
|
90
90
|
*/
|
|
91
91
|
export declare const svelte_extract_module_comment: (script_content: string) => string | undefined;
|
|
92
92
|
//# sourceMappingURL=svelte_helpers.d.ts.map
|
package/dist/svelte_helpers.js
CHANGED
|
@@ -53,12 +53,12 @@ const svelte_assert_version = () => {
|
|
|
53
53
|
* Returns raw analysis data matching `ModuleAnalysis` structure.
|
|
54
54
|
* Consumer decides filtering policy (Svelte components are never nodocs).
|
|
55
55
|
*
|
|
56
|
-
* @param source_file
|
|
57
|
-
* @param module_path
|
|
58
|
-
* @param checker TypeScript type checker
|
|
59
|
-
* @param options
|
|
60
|
-
* @param ctx
|
|
61
|
-
* @returns
|
|
56
|
+
* @param source_file - the source file info (from Gro filer, file system, or other source)
|
|
57
|
+
* @param module_path - the module path (relative to source root)
|
|
58
|
+
* @param checker - TypeScript type checker
|
|
59
|
+
* @param options - module source options for path extraction
|
|
60
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
61
|
+
* @returns module analysis matching `ModuleAnalysis` structure
|
|
62
62
|
*/
|
|
63
63
|
export const svelte_analyze_module = (source_file, module_path, checker, options, ctx) => {
|
|
64
64
|
// Use the existing helper for core analysis
|
|
@@ -86,11 +86,11 @@ export const svelte_analyze_module = (source_file, module_path, checker, options
|
|
|
86
86
|
*
|
|
87
87
|
* Suitable for use in documentation generators, build tools, and analysis.
|
|
88
88
|
*
|
|
89
|
-
* @param source_file
|
|
90
|
-
* @param module_path
|
|
91
|
-
* @param checker TypeScript type checker for type resolution
|
|
92
|
-
* @param ctx
|
|
93
|
-
* @returns
|
|
89
|
+
* @param source_file - source file info with path and content
|
|
90
|
+
* @param module_path - module path relative to source root (e.g., 'Alert.svelte')
|
|
91
|
+
* @param checker - TypeScript type checker for type resolution
|
|
92
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
93
|
+
* @returns component declaration and optional module-level comment
|
|
94
94
|
*/
|
|
95
95
|
export const svelte_analyze_file = (source_file, module_path, checker, ctx) => {
|
|
96
96
|
svelte_assert_version();
|
|
@@ -172,8 +172,8 @@ export const svelte_extract_script_content = (svelte_source) => {
|
|
|
172
172
|
* Requires `@module` tag to identify module comments. The tag line is stripped
|
|
173
173
|
* from the output.
|
|
174
174
|
*
|
|
175
|
-
* @param script_content -
|
|
176
|
-
* @returns
|
|
175
|
+
* @param script_content - the content of the `<script>` tag
|
|
176
|
+
* @returns the cleaned module comment text, or undefined if none found
|
|
177
177
|
*/
|
|
178
178
|
export const svelte_extract_module_comment = (script_content) => {
|
|
179
179
|
// Parse the script content as TypeScript and reuse the shared extraction logic
|
|
@@ -58,8 +58,8 @@ export interface SveltePreprocessMdzOptions {
|
|
|
58
58
|
/**
|
|
59
59
|
* Creates a Svelte preprocessor that compiles static `Mdz` content at build time.
|
|
60
60
|
*
|
|
61
|
-
* @param options
|
|
62
|
-
* @returns
|
|
61
|
+
* @param options - configuration for component/element resolution and file filtering
|
|
62
|
+
* @returns a Svelte `PreprocessorGroup` for use in `svelte.config.js`
|
|
63
63
|
*/
|
|
64
64
|
export declare const svelte_preprocess_mdz: (options?: SveltePreprocessMdzOptions) => PreprocessorGroup;
|
|
65
65
|
//# sourceMappingURL=svelte_preprocess_mdz.d.ts.map
|
|
@@ -24,8 +24,8 @@ const PRECOMPILED_NAME = 'MdzPrecompiled';
|
|
|
24
24
|
/**
|
|
25
25
|
* Creates a Svelte preprocessor that compiles static `Mdz` content at build time.
|
|
26
26
|
*
|
|
27
|
-
* @param options
|
|
28
|
-
* @returns
|
|
27
|
+
* @param options - configuration for component/element resolution and file filtering
|
|
28
|
+
* @returns a Svelte `PreprocessorGroup` for use in `svelte.config.js`
|
|
29
29
|
*/
|
|
30
30
|
export const svelte_preprocess_mdz = (options = {}) => {
|
|
31
31
|
const { exclude = [], components = {}, elements: elements_array = [], component_imports = ['@fuzdev/fuz_ui/Mdz.svelte'], compiled_component_import = '@fuzdev/fuz_ui/MdzPrecompiled.svelte', on_error = process.env.CI === 'true' ? 'throw' : 'log', } = options;
|
package/dist/tome.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const Tome: z.ZodObject<{
|
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type Tome = z.infer<typeof Tome>;
|
|
12
12
|
/**
|
|
13
|
-
* @param hash - URL fragment to append, with or without the
|
|
13
|
+
* @param hash - URL fragment to append, with or without the `#`
|
|
14
14
|
*/
|
|
15
15
|
export declare const to_tome_pathname: (item: Tome | string, docs_path?: string, hash?: string) => string;
|
|
16
16
|
export declare const tomes_context: {
|
package/dist/tome.js
CHANGED
|
@@ -13,7 +13,7 @@ export const Tome = z.object({
|
|
|
13
13
|
related_declarations: z.array(z.string()),
|
|
14
14
|
});
|
|
15
15
|
/**
|
|
16
|
-
* @param hash - URL fragment to append, with or without the
|
|
16
|
+
* @param hash - URL fragment to append, with or without the `#`
|
|
17
17
|
*/
|
|
18
18
|
export const to_tome_pathname = (item, docs_path = DOCS_PATH_DEFAULT, hash) => {
|
|
19
19
|
const name = typeof item === 'string' ? item : item.name;
|
package/dist/ts_helpers.d.ts
CHANGED
|
@@ -46,9 +46,9 @@ export interface ModuleExportsAnalysis {
|
|
|
46
46
|
/**
|
|
47
47
|
* Create TypeScript program for analysis.
|
|
48
48
|
*
|
|
49
|
-
* @param options
|
|
50
|
-
* @param log
|
|
51
|
-
* @returns
|
|
49
|
+
* @param options - configuration options for program creation
|
|
50
|
+
* @param log - optional logger for info messages
|
|
51
|
+
* @returns the program and type checker
|
|
52
52
|
* @throws Error if tsconfig.json is not found
|
|
53
53
|
*/
|
|
54
54
|
export declare const ts_create_program: (options?: TsProgramOptions, log?: Logger) => TsProgram;
|
|
@@ -61,13 +61,13 @@ export declare const ts_create_program: (options?: TsProgramOptions, log?: Logge
|
|
|
61
61
|
* This is a high-level function suitable for building documentation or library metadata.
|
|
62
62
|
* For lower-level analysis, use `ts_analyze_module_exports` directly.
|
|
63
63
|
*
|
|
64
|
-
* @param source_file_info
|
|
65
|
-
* @param ts_source_file TypeScript source file from the program
|
|
66
|
-
* @param module_path
|
|
67
|
-
* @param checker TypeScript type checker
|
|
68
|
-
* @param options
|
|
69
|
-
* @param ctx
|
|
70
|
-
* @returns
|
|
64
|
+
* @param source_file_info - the source file info (from Gro filer, file system, or other source)
|
|
65
|
+
* @param ts_source_file - TypeScript source file from the program
|
|
66
|
+
* @param module_path - the module path (relative to source root)
|
|
67
|
+
* @param checker - TypeScript type checker
|
|
68
|
+
* @param options - module source options for path extraction
|
|
69
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
70
|
+
* @returns module metadata and re-export information
|
|
71
71
|
*/
|
|
72
72
|
export declare const ts_analyze_module: (source_file_info: SourceFileInfo, ts_source_file: ts.SourceFile, module_path: string, checker: ts.TypeChecker, options: ModuleSourceOptions, ctx: AnalysisContext) => ModuleAnalysis;
|
|
73
73
|
/**
|
|
@@ -83,11 +83,11 @@ export declare const ts_analyze_module: (source_file_info: SourceFileInfo, ts_so
|
|
|
83
83
|
* suitable for building documentation, API explorers, or analysis tools.
|
|
84
84
|
* For standard SvelteKit library layouts, use `module_create_source_options(process.cwd())`.
|
|
85
85
|
*
|
|
86
|
-
* @param source_file
|
|
87
|
-
* @param checker
|
|
88
|
-
* @param options
|
|
89
|
-
* @param ctx
|
|
90
|
-
* @returns
|
|
86
|
+
* @param source_file - the TypeScript source file to analyze
|
|
87
|
+
* @param checker - the TypeScript type checker
|
|
88
|
+
* @param options - module source options for path extraction in re-exports
|
|
89
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
90
|
+
* @returns module comment, declarations, re-exports, and star exports
|
|
91
91
|
*/
|
|
92
92
|
export declare const ts_analyze_module_exports: (source_file: ts.SourceFile, checker: ts.TypeChecker, options: ModuleSourceOptions, ctx: AnalysisContext) => ModuleExportsAnalysis;
|
|
93
93
|
/**
|
|
@@ -97,11 +97,11 @@ export declare const ts_analyze_module_exports: (source_file: ts.SourceFile, che
|
|
|
97
97
|
* type analysis to produce complete declaration metadata. Suitable for use
|
|
98
98
|
* in documentation generators, IDE integrations, and other tooling.
|
|
99
99
|
*
|
|
100
|
-
* @param symbol
|
|
101
|
-
* @param source_file
|
|
102
|
-
* @param checker
|
|
103
|
-
* @param ctx
|
|
104
|
-
* @returns
|
|
100
|
+
* @param symbol - the TypeScript symbol to analyze
|
|
101
|
+
* @param source_file - the source file containing the symbol
|
|
102
|
+
* @param checker - the TypeScript type checker
|
|
103
|
+
* @param ctx - optional analysis context for collecting diagnostics
|
|
104
|
+
* @returns complete declaration metadata including docs, types, and parameters, plus nodocs flag
|
|
105
105
|
*/
|
|
106
106
|
export declare const ts_analyze_declaration: (symbol: ts.Symbol, source_file: ts.SourceFile, checker: ts.TypeChecker, ctx: AnalysisContext) => DeclarationAnalysis;
|
|
107
107
|
/**
|
|
@@ -130,10 +130,10 @@ export declare const ts_infer_declaration_kind: (symbol: ts.Symbol, node: ts.Nod
|
|
|
130
130
|
* Shared helper for extracting parameter information from both standalone functions
|
|
131
131
|
* and class methods/constructors.
|
|
132
132
|
*
|
|
133
|
-
* @param sig
|
|
134
|
-
* @param checker TypeScript type checker for type resolution
|
|
135
|
-
* @param tsdoc_params
|
|
136
|
-
* @returns
|
|
133
|
+
* @param sig - the TypeScript signature to extract parameters from
|
|
134
|
+
* @param checker - TypeScript type checker for type resolution
|
|
135
|
+
* @param tsdoc_params - map of parameter names to TSDoc descriptions (from tsdoc.params)
|
|
136
|
+
* @returns array of parameter info objects
|
|
137
137
|
*/
|
|
138
138
|
export declare const ts_extract_signature_parameters: (sig: ts.Signature, checker: ts.TypeChecker, tsdoc_params: Map<string, string> | undefined) => Array<{
|
|
139
139
|
name: string;
|
package/dist/ts_helpers.js
CHANGED
|
@@ -11,9 +11,9 @@ import { module_extract_dependencies, module_extract_path, module_is_source, } f
|
|
|
11
11
|
/**
|
|
12
12
|
* Create TypeScript program for analysis.
|
|
13
13
|
*
|
|
14
|
-
* @param options
|
|
15
|
-
* @param log
|
|
16
|
-
* @returns
|
|
14
|
+
* @param options - configuration options for program creation
|
|
15
|
+
* @param log - optional logger for info messages
|
|
16
|
+
* @returns the program and type checker
|
|
17
17
|
* @throws Error if tsconfig.json is not found
|
|
18
18
|
*/
|
|
19
19
|
export const ts_create_program = (options, log) => {
|
|
@@ -42,13 +42,13 @@ export const ts_create_program = (options, log) => {
|
|
|
42
42
|
* This is a high-level function suitable for building documentation or library metadata.
|
|
43
43
|
* For lower-level analysis, use `ts_analyze_module_exports` directly.
|
|
44
44
|
*
|
|
45
|
-
* @param source_file_info
|
|
46
|
-
* @param ts_source_file TypeScript source file from the program
|
|
47
|
-
* @param module_path
|
|
48
|
-
* @param checker TypeScript type checker
|
|
49
|
-
* @param options
|
|
50
|
-
* @param ctx
|
|
51
|
-
* @returns
|
|
45
|
+
* @param source_file_info - the source file info (from Gro filer, file system, or other source)
|
|
46
|
+
* @param ts_source_file - TypeScript source file from the program
|
|
47
|
+
* @param module_path - the module path (relative to source root)
|
|
48
|
+
* @param checker - TypeScript type checker
|
|
49
|
+
* @param options - module source options for path extraction
|
|
50
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
51
|
+
* @returns module metadata and re-export information
|
|
52
52
|
*/
|
|
53
53
|
export const ts_analyze_module = (source_file_info, ts_source_file, module_path, checker, options, ctx) => {
|
|
54
54
|
// Use the mid-level helper for core analysis
|
|
@@ -78,11 +78,11 @@ export const ts_analyze_module = (source_file_info, ts_source_file, module_path,
|
|
|
78
78
|
* suitable for building documentation, API explorers, or analysis tools.
|
|
79
79
|
* For standard SvelteKit library layouts, use `module_create_source_options(process.cwd())`.
|
|
80
80
|
*
|
|
81
|
-
* @param source_file
|
|
82
|
-
* @param checker
|
|
83
|
-
* @param options
|
|
84
|
-
* @param ctx
|
|
85
|
-
* @returns
|
|
81
|
+
* @param source_file - the TypeScript source file to analyze
|
|
82
|
+
* @param checker - the TypeScript type checker
|
|
83
|
+
* @param options - module source options for path extraction in re-exports
|
|
84
|
+
* @param ctx - analysis context for collecting diagnostics
|
|
85
|
+
* @returns module comment, declarations, re-exports, and star exports
|
|
86
86
|
*/
|
|
87
87
|
export const ts_analyze_module_exports = (source_file, checker, options, ctx) => {
|
|
88
88
|
const declarations = [];
|
|
@@ -180,11 +180,11 @@ export const ts_analyze_module_exports = (source_file, checker, options, ctx) =>
|
|
|
180
180
|
* type analysis to produce complete declaration metadata. Suitable for use
|
|
181
181
|
* in documentation generators, IDE integrations, and other tooling.
|
|
182
182
|
*
|
|
183
|
-
* @param symbol
|
|
184
|
-
* @param source_file
|
|
185
|
-
* @param checker
|
|
186
|
-
* @param ctx
|
|
187
|
-
* @returns
|
|
183
|
+
* @param symbol - the TypeScript symbol to analyze
|
|
184
|
+
* @param source_file - the source file containing the symbol
|
|
185
|
+
* @param checker - the TypeScript type checker
|
|
186
|
+
* @param ctx - optional analysis context for collecting diagnostics
|
|
187
|
+
* @returns complete declaration metadata including docs, types, and parameters, plus nodocs flag
|
|
188
188
|
*/
|
|
189
189
|
export const ts_analyze_declaration = (symbol, source_file, checker, ctx) => {
|
|
190
190
|
const name = symbol.name;
|
|
@@ -325,10 +325,10 @@ export const ts_infer_declaration_kind = (symbol, node) => {
|
|
|
325
325
|
* Shared helper for extracting parameter information from both standalone functions
|
|
326
326
|
* and class methods/constructors.
|
|
327
327
|
*
|
|
328
|
-
* @param sig
|
|
329
|
-
* @param checker TypeScript type checker for type resolution
|
|
330
|
-
* @param tsdoc_params
|
|
331
|
-
* @returns
|
|
328
|
+
* @param sig - the TypeScript signature to extract parameters from
|
|
329
|
+
* @param checker - TypeScript type checker for type resolution
|
|
330
|
+
* @param tsdoc_params - map of parameter names to TSDoc descriptions (from tsdoc.params)
|
|
331
|
+
* @returns array of parameter info objects
|
|
332
332
|
*/
|
|
333
333
|
export const ts_extract_signature_parameters = (sig, checker, tsdoc_params) => {
|
|
334
334
|
return sig.parameters.map((param) => {
|