@fuzdev/fuz_ui 0.189.1 → 0.191.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.
- package/dist/ContextmenuEntry.svelte +3 -3
- package/dist/ContextmenuLinkEntry.svelte +3 -3
- package/dist/ContextmenuRootForSafariCompatibility.svelte +1 -1
- package/dist/ContextmenuSubmenu.svelte +3 -3
- package/dist/DocsMenu.svelte +1 -1
- package/dist/DocsPageLinks.svelte +1 -1
- package/dist/DocsTertiaryNav.svelte +3 -3
- 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/analysis_context.d.ts +2 -2
- package/dist/analysis_context.js +2 -2
- 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 +5 -5
- package/dist/library_analysis.js +5 -5
- 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 +8 -8
- package/dist/library_helpers.js +8 -8
- package/dist/library_pipeline.d.ts +5 -5
- package/dist/library_pipeline.js +5 -5
- package/dist/mdz.d.ts +1 -14
- package/dist/mdz.d.ts.map +1 -1
- package/dist/mdz.js +57 -156
- 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 +8 -8
- package/dist/module_helpers.js +8 -8
- package/dist/package_helpers.d.ts +12 -12
- package/dist/package_helpers.js +12 -12
- package/dist/storage.d.ts +3 -3
- package/dist/storage.js +3 -3
- package/dist/svelte_helpers.d.ts +9 -9
- package/dist/svelte_helpers.js +9 -9
- package/dist/svelte_preprocess_mdz.d.ts +1 -1
- package/dist/svelte_preprocess_mdz.js +1 -1
- package/dist/ts_helpers.d.ts +19 -19
- package/dist/ts_helpers.js +19 -19
- package/dist/tsdoc_helpers.d.ts +5 -5
- package/dist/tsdoc_helpers.js +5 -5
- package/dist/tsdoc_mdz.js +1 -1
- package/package.json +7 -6
- package/src/lib/analysis_context.ts +2 -2
- 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 +5 -5
- package/src/lib/library_gen.ts +4 -4
- package/src/lib/library_generate.ts +2 -2
- package/src/lib/library_helpers.ts +8 -8
- package/src/lib/library_pipeline.ts +5 -5
- package/src/lib/mdz.ts +63 -167
- 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 +8 -8
- package/src/lib/package_helpers.ts +12 -12
- package/src/lib/storage.ts +3 -3
- package/src/lib/svelte_helpers.ts +9 -9
- package/src/lib/svelte_preprocess_mdz.ts +1 -1
- package/src/lib/ts_helpers.ts +19 -19
- package/src/lib/tsdoc_helpers.ts +5 -5
- 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,8 +305,8 @@ 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
|
|
308
|
+
* @param path - full absolute path to check
|
|
309
|
+
* @param options - module source options for filtering
|
|
310
310
|
* @returns True if the path is an analyzable source file
|
|
311
311
|
*
|
|
312
312
|
* @example
|
|
@@ -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,8 +254,8 @@ 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
|
|
257
|
+
* @param path - full absolute path to check
|
|
258
|
+
* @param options - module source options for filtering
|
|
259
259
|
* @returns True if the path is an analyzable source file
|
|
260
260
|
*
|
|
261
261
|
* @example
|
|
@@ -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,9 +24,9 @@ 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
|
|
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
30
|
* @returns Full GitHub URL to the file on the main branch
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
@@ -45,8 +45,8 @@ 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
|
|
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
50
|
* @returns Organization URL, or null if repo_url doesn't end with repo_name
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
@@ -59,7 +59,7 @@ 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
|
|
62
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
63
63
|
* @returns Owner name, or null if not a valid GitHub URL
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
@@ -78,7 +78,7 @@ 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
|
|
81
|
+
* @param package_name - package name (can be scoped like '@org/package')
|
|
82
82
|
* @returns Full npm package page URL
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
@@ -96,14 +96,14 @@ 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
|
|
99
|
+
* @param package_json - the package.json object to check
|
|
100
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
|
|
106
|
+
* @param name - package name (can be scoped like '@org/package')
|
|
107
107
|
* @returns Repository name without scope
|
|
108
108
|
* @throws Error if scoped package name is malformed
|
|
109
109
|
*
|
|
@@ -126,7 +126,7 @@ 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
|
|
129
|
+
* @param repository - the repository field from package.json
|
|
130
130
|
* @returns Clean repository URL, or null if not provided
|
|
131
131
|
*
|
|
132
132
|
* @example
|
|
@@ -151,8 +151,8 @@ 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
|
|
154
|
+
* @param homepage_url - package homepage URL
|
|
155
|
+
* @param filename - filename in .well-known directory
|
|
156
156
|
* @returns Full URL to the .well-known file
|
|
157
157
|
*
|
|
158
158
|
* @example
|
package/dist/package_helpers.js
CHANGED
|
@@ -24,9 +24,9 @@ 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
|
|
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
30
|
* @returns Full GitHub URL to the file on the main branch
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
@@ -49,8 +49,8 @@ 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
|
|
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
54
|
* @returns Organization URL, or null if repo_url doesn't end with repo_name
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
@@ -65,7 +65,7 @@ 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
|
|
68
|
+
* @param repo_url - repository URL (e.g., 'https://github.com/owner/repo')
|
|
69
69
|
* @returns Owner name, or null if not a valid GitHub URL
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
@@ -90,7 +90,7 @@ export const repo_url_github_owner = (repo_url) => {
|
|
|
90
90
|
/**
|
|
91
91
|
* Build npm package URL.
|
|
92
92
|
*
|
|
93
|
-
* @param package_name
|
|
93
|
+
* @param package_name - package name (can be scoped like '@org/package')
|
|
94
94
|
* @returns Full npm package page URL
|
|
95
95
|
*
|
|
96
96
|
* @example
|
|
@@ -108,7 +108,7 @@ 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
|
|
111
|
+
* @param package_json - the package.json object to check
|
|
112
112
|
* @returns True if the package appears to be published
|
|
113
113
|
*/
|
|
114
114
|
export const package_is_published = (package_json) => {
|
|
@@ -117,7 +117,7 @@ export const package_is_published = (package_json) => {
|
|
|
117
117
|
/**
|
|
118
118
|
* Extract repository name without scope from package name.
|
|
119
119
|
*
|
|
120
|
-
* @param name
|
|
120
|
+
* @param name - package name (can be scoped like '@org/package')
|
|
121
121
|
* @returns Repository name without scope
|
|
122
122
|
* @throws Error if scoped package name is malformed
|
|
123
123
|
*
|
|
@@ -149,7 +149,7 @@ 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
|
|
152
|
+
* @param repository - the repository field from package.json
|
|
153
153
|
* @returns Clean repository URL, or null if not provided
|
|
154
154
|
*
|
|
155
155
|
* @example
|
|
@@ -181,8 +181,8 @@ 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
|
|
184
|
+
* @param homepage_url - package homepage URL
|
|
185
|
+
* @param filename - filename in .well-known directory
|
|
186
186
|
* @returns Full URL to the .well-known file
|
|
187
187
|
*
|
|
188
188
|
* @example
|
package/dist/storage.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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
|
|
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
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;
|
package/dist/storage.js
CHANGED
|
@@ -17,9 +17,9 @@ 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
|
|
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
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) => {
|
package/dist/svelte_helpers.d.ts
CHANGED
|
@@ -43,11 +43,11 @@ 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
|
|
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
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;
|
|
@@ -61,10 +61,10 @@ 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
|
|
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
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;
|
package/dist/svelte_helpers.js
CHANGED
|
@@ -53,11 +53,11 @@ 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
|
|
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
61
|
* @returns Module analysis matching ModuleAnalysis structure
|
|
62
62
|
*/
|
|
63
63
|
export const svelte_analyze_module = (source_file, module_path, checker, options, ctx) => {
|
|
@@ -86,10 +86,10 @@ 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
|
|
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
93
|
* @returns Component declaration and optional module-level comment
|
|
94
94
|
*/
|
|
95
95
|
export const svelte_analyze_file = (source_file, module_path, checker, ctx) => {
|
|
@@ -58,7 +58,7 @@ export interface SveltePreprocessMdzOptions {
|
|
|
58
58
|
/**
|
|
59
59
|
* Creates a Svelte preprocessor that compiles static `Mdz` content at build time.
|
|
60
60
|
*
|
|
61
|
-
* @param options
|
|
61
|
+
* @param options - configuration for component/element resolution and file filtering
|
|
62
62
|
* @returns A Svelte `PreprocessorGroup` for use in `svelte.config.js`.
|
|
63
63
|
*/
|
|
64
64
|
export declare const svelte_preprocess_mdz: (options?: SveltePreprocessMdzOptions) => PreprocessorGroup;
|
|
@@ -24,7 +24,7 @@ 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
|
|
27
|
+
* @param options - configuration for component/element resolution and file filtering
|
|
28
28
|
* @returns A Svelte `PreprocessorGroup` for use in `svelte.config.js`.
|
|
29
29
|
*/
|
|
30
30
|
export const svelte_preprocess_mdz = (options = {}) => {
|
package/dist/ts_helpers.d.ts
CHANGED
|
@@ -46,8 +46,8 @@ export interface ModuleExportsAnalysis {
|
|
|
46
46
|
/**
|
|
47
47
|
* Create TypeScript program for analysis.
|
|
48
48
|
*
|
|
49
|
-
* @param options
|
|
50
|
-
* @param log
|
|
49
|
+
* @param options - configuration options for program creation
|
|
50
|
+
* @param log - optional logger for info messages
|
|
51
51
|
* @returns The program and type checker
|
|
52
52
|
* @throws Error if tsconfig.json is not found
|
|
53
53
|
*/
|
|
@@ -61,12 +61,12 @@ 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
|
|
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
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;
|
|
@@ -83,10 +83,10 @@ 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
|
|
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
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;
|
|
@@ -97,10 +97,10 @@ 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
|
|
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
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;
|
|
@@ -130,9 +130,9 @@ 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
|
|
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
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<{
|
package/dist/ts_helpers.js
CHANGED
|
@@ -11,8 +11,8 @@ 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
|
|
14
|
+
* @param options - configuration options for program creation
|
|
15
|
+
* @param log - optional logger for info messages
|
|
16
16
|
* @returns The program and type checker
|
|
17
17
|
* @throws Error if tsconfig.json is not found
|
|
18
18
|
*/
|
|
@@ -42,12 +42,12 @@ 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
|
|
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
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) => {
|
|
@@ -78,10 +78,10 @@ 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
|
|
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
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) => {
|
|
@@ -180,10 +180,10 @@ 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
|
|
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
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) => {
|
|
@@ -325,9 +325,9 @@ 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
|
|
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
331
|
* @returns Array of parameter info objects
|
|
332
332
|
*/
|
|
333
333
|
export const ts_extract_signature_parameters = (sig, checker, tsdoc_params) => {
|
package/dist/tsdoc_helpers.d.ts
CHANGED
|
@@ -83,8 +83,8 @@ export interface TsdocParsedComment {
|
|
|
83
83
|
* - `@since` - version information
|
|
84
84
|
* - `@mutates` - mutation documentation (non-standard)
|
|
85
85
|
*
|
|
86
|
-
* @param node
|
|
87
|
-
* @param source_file
|
|
86
|
+
* @param node - the TypeScript node to extract JSDoc from
|
|
87
|
+
* @param source_file - source file (used for extracting full ` @see` tag text)
|
|
88
88
|
*/
|
|
89
89
|
export declare const tsdoc_parse: (node: ts.Node, source_file: ts.SourceFile) => TsdocParsedComment | undefined;
|
|
90
90
|
/**
|
|
@@ -93,8 +93,8 @@ export declare const tsdoc_parse: (node: ts.Node, source_file: ts.SourceFile) =>
|
|
|
93
93
|
* Consolidates the common pattern of assigning TSDoc fields to declarations,
|
|
94
94
|
* with conditional assignment for array fields (only if non-empty).
|
|
95
95
|
*
|
|
96
|
-
* @param declaration declaration object to update
|
|
97
|
-
* @param tsdoc parsed TSDoc comment (if available)
|
|
96
|
+
* @param declaration - declaration object to update
|
|
97
|
+
* @param tsdoc - parsed TSDoc comment (if available)
|
|
98
98
|
* @mutates declaration - adds doc_comment, deprecated_message, examples, see_also, throws, since fields
|
|
99
99
|
*/
|
|
100
100
|
export declare const tsdoc_apply_to_declaration: (declaration: DeclarationJson, tsdoc: TsdocParsedComment | undefined) => void;
|
|
@@ -103,7 +103,7 @@ export declare const tsdoc_apply_to_declaration: (declaration: DeclarationJson,
|
|
|
103
103
|
*
|
|
104
104
|
* Transforms `/** ... *\/` style comments into clean text.
|
|
105
105
|
*
|
|
106
|
-
* @param comment_text
|
|
106
|
+
* @param comment_text - the raw comment text including `/**` and `*\/` markers
|
|
107
107
|
* @returns Cleaned comment text, or undefined if empty after cleaning
|
|
108
108
|
*/
|
|
109
109
|
export declare const tsdoc_clean_comment: (comment_text: string) => string | undefined;
|
package/dist/tsdoc_helpers.js
CHANGED
|
@@ -54,8 +54,8 @@ import ts from 'typescript';
|
|
|
54
54
|
* - `@since` - version information
|
|
55
55
|
* - `@mutates` - mutation documentation (non-standard)
|
|
56
56
|
*
|
|
57
|
-
* @param node
|
|
58
|
-
* @param source_file
|
|
57
|
+
* @param node - the TypeScript node to extract JSDoc from
|
|
58
|
+
* @param source_file - source file (used for extracting full ` @see` tag text)
|
|
59
59
|
*/
|
|
60
60
|
export const tsdoc_parse = (node, source_file) => {
|
|
61
61
|
const tsdoc_comments = ts.getJSDocCommentsAndTags(node);
|
|
@@ -154,8 +154,8 @@ export const tsdoc_parse = (node, source_file) => {
|
|
|
154
154
|
* Consolidates the common pattern of assigning TSDoc fields to declarations,
|
|
155
155
|
* with conditional assignment for array fields (only if non-empty).
|
|
156
156
|
*
|
|
157
|
-
* @param declaration declaration object to update
|
|
158
|
-
* @param tsdoc parsed TSDoc comment (if available)
|
|
157
|
+
* @param declaration - declaration object to update
|
|
158
|
+
* @param tsdoc - parsed TSDoc comment (if available)
|
|
159
159
|
* @mutates declaration - adds doc_comment, deprecated_message, examples, see_also, throws, since fields
|
|
160
160
|
*/
|
|
161
161
|
export const tsdoc_apply_to_declaration = (declaration, tsdoc) => {
|
|
@@ -182,7 +182,7 @@ export const tsdoc_apply_to_declaration = (declaration, tsdoc) => {
|
|
|
182
182
|
*
|
|
183
183
|
* Transforms `/** ... *\/` style comments into clean text.
|
|
184
184
|
*
|
|
185
|
-
* @param comment_text
|
|
185
|
+
* @param comment_text - the raw comment text including `/**` and `*\/` markers
|
|
186
186
|
* @returns Cleaned comment text, or undefined if empty after cleaning
|
|
187
187
|
*/
|
|
188
188
|
export const tsdoc_clean_comment = (comment_text) => {
|
package/dist/tsdoc_mdz.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import { mdz_is_url } from './
|
|
10
|
+
import { mdz_is_url } from './mdz_helpers.js';
|
|
11
11
|
/** Format a reference as mdz: URLs pass through, identifiers get backticks. */
|
|
12
12
|
const format_reference = (ref) => (mdz_is_url(ref) ? ref : `\`${ref}\``);
|
|
13
13
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.191.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"fixtures:update": "gro src/test/fixtures/update",
|
|
29
29
|
"preview": "vite preview",
|
|
30
30
|
"deploy": "gro deploy",
|
|
31
|
-
"
|
|
31
|
+
"benchmark": "gro run src/benchmarks/mdz.benchmark.ts",
|
|
32
|
+
"benchmark:save": "gro run src/benchmarks/mdz.benchmark.ts --save"
|
|
32
33
|
},
|
|
33
34
|
"type": "module",
|
|
34
35
|
"engines": {
|
|
@@ -80,14 +81,14 @@
|
|
|
80
81
|
"devDependencies": {
|
|
81
82
|
"@changesets/changelog-git": "^0.2.1",
|
|
82
83
|
"@fuzdev/fuz_code": "^0.45.1",
|
|
83
|
-
"@fuzdev/fuz_css": "^0.
|
|
84
|
-
"@fuzdev/fuz_util": "^0.
|
|
84
|
+
"@fuzdev/fuz_css": "^0.56.0",
|
|
85
|
+
"@fuzdev/fuz_util": "^0.55.0",
|
|
85
86
|
"@fuzdev/gro": "^0.197.0",
|
|
86
87
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
87
88
|
"@ryanatkn/eslint-config": "^0.10.1",
|
|
88
89
|
"@sveltejs/acorn-typescript": "^1.0.9",
|
|
89
90
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
90
|
-
"@sveltejs/kit": "^2.
|
|
91
|
+
"@sveltejs/kit": "^2.55.0",
|
|
91
92
|
"@sveltejs/package": "^2.5.7",
|
|
92
93
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
93
94
|
"@types/estree": "^1.0.8",
|
|
@@ -100,7 +101,7 @@
|
|
|
100
101
|
"magic-string": "^0.30.21",
|
|
101
102
|
"prettier": "^3.7.4",
|
|
102
103
|
"prettier-plugin-svelte": "^3.4.1",
|
|
103
|
-
"svelte": "^5.53.
|
|
104
|
+
"svelte": "^5.53.12",
|
|
104
105
|
"svelte-check": "^4.4.5",
|
|
105
106
|
"svelte2tsx": "^0.7.47",
|
|
106
107
|
"tslib": "^2.8.1",
|
|
@@ -225,8 +225,8 @@ export interface FormatDiagnosticOptions {
|
|
|
225
225
|
/**
|
|
226
226
|
* Format a diagnostic for display.
|
|
227
227
|
*
|
|
228
|
-
* @param diagnostic
|
|
229
|
-
* @param options
|
|
228
|
+
* @param diagnostic - the diagnostic to format
|
|
229
|
+
* @param options - formatting options
|
|
230
230
|
* @returns Formatted string like './file.ts:10:5: error: message'
|
|
231
231
|
*/
|
|
232
232
|
export const format_diagnostic = (
|