@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.
Files changed (81) hide show
  1. package/dist/ContextmenuRootForSafariCompatibility.svelte +2 -2
  2. package/dist/MdzNodeView.svelte +3 -2
  3. package/dist/MdzNodeView.svelte.d.ts +1 -1
  4. package/dist/MdzNodeView.svelte.d.ts.map +1 -1
  5. package/dist/ProjectLinks.svelte +4 -2
  6. package/dist/ProjectLinks.svelte.d.ts.map +1 -1
  7. package/dist/analysis_context.d.ts +3 -3
  8. package/dist/analysis_context.js +3 -3
  9. package/dist/contextmenu_state.svelte.d.ts +7 -7
  10. package/dist/contextmenu_state.svelte.js +7 -7
  11. package/dist/docs_helpers.svelte.d.ts +7 -5
  12. package/dist/docs_helpers.svelte.d.ts.map +1 -1
  13. package/dist/docs_helpers.svelte.js +7 -5
  14. package/dist/intersect.svelte.d.ts +1 -1
  15. package/dist/intersect.svelte.js +1 -1
  16. package/dist/library_analysis.d.ts +6 -6
  17. package/dist/library_analysis.js +6 -6
  18. package/dist/library_gen.d.ts +4 -4
  19. package/dist/library_gen.js +4 -4
  20. package/dist/library_generate.d.ts +2 -2
  21. package/dist/library_helpers.d.ts +11 -11
  22. package/dist/library_helpers.js +11 -11
  23. package/dist/library_pipeline.d.ts +5 -5
  24. package/dist/library_pipeline.js +5 -5
  25. package/dist/logos.d.ts +7 -0
  26. package/dist/logos.d.ts.map +1 -1
  27. package/dist/logos.js +5 -0
  28. package/dist/mdz.d.ts +1 -14
  29. package/dist/mdz.d.ts.map +1 -1
  30. package/dist/mdz.js +64 -163
  31. package/dist/mdz_helpers.d.ts +26 -2
  32. package/dist/mdz_helpers.d.ts.map +1 -1
  33. package/dist/mdz_helpers.js +59 -5
  34. package/dist/mdz_lexer.d.ts.map +1 -1
  35. package/dist/mdz_lexer.js +18 -9
  36. package/dist/mdz_to_svelte.d.ts +5 -5
  37. package/dist/mdz_to_svelte.d.ts.map +1 -1
  38. package/dist/mdz_to_svelte.js +5 -5
  39. package/dist/mdz_token_parser.js +4 -3
  40. package/dist/module_helpers.d.ts +9 -9
  41. package/dist/module_helpers.js +9 -9
  42. package/dist/package_helpers.d.ts +20 -20
  43. package/dist/package_helpers.js +20 -20
  44. package/dist/storage.d.ts +4 -4
  45. package/dist/storage.js +4 -4
  46. package/dist/svelte_helpers.d.ts +13 -13
  47. package/dist/svelte_helpers.js +13 -13
  48. package/dist/svelte_preprocess_mdz.d.ts +2 -2
  49. package/dist/svelte_preprocess_mdz.js +2 -2
  50. package/dist/tome.d.ts +1 -1
  51. package/dist/tome.js +1 -1
  52. package/dist/ts_helpers.d.ts +24 -24
  53. package/dist/ts_helpers.js +24 -24
  54. package/dist/tsdoc_helpers.d.ts +6 -6
  55. package/dist/tsdoc_helpers.js +6 -6
  56. package/dist/tsdoc_mdz.js +1 -1
  57. package/package.json +8 -7
  58. package/src/lib/analysis_context.ts +3 -3
  59. package/src/lib/contextmenu_state.svelte.ts +7 -7
  60. package/src/lib/docs_helpers.svelte.ts +7 -5
  61. package/src/lib/intersect.svelte.ts +1 -1
  62. package/src/lib/library_analysis.ts +6 -6
  63. package/src/lib/library_gen.ts +4 -4
  64. package/src/lib/library_generate.ts +2 -2
  65. package/src/lib/library_helpers.ts +11 -11
  66. package/src/lib/library_pipeline.ts +5 -5
  67. package/src/lib/logos.ts +6 -0
  68. package/src/lib/mdz.ts +73 -177
  69. package/src/lib/mdz_helpers.ts +60 -5
  70. package/src/lib/mdz_lexer.ts +20 -9
  71. package/src/lib/mdz_to_svelte.ts +6 -5
  72. package/src/lib/mdz_token_parser.ts +4 -3
  73. package/src/lib/module_helpers.ts +9 -9
  74. package/src/lib/package_helpers.ts +20 -20
  75. package/src/lib/storage.ts +4 -4
  76. package/src/lib/svelte_helpers.ts +13 -13
  77. package/src/lib/svelte_preprocess_mdz.ts +2 -2
  78. package/src/lib/tome.ts +1 -1
  79. package/src/lib/ts_helpers.ts +24 -24
  80. package/src/lib/tsdoc_helpers.ts +6 -6
  81. package/src/lib/tsdoc_mdz.ts +1 -1
@@ -83,8 +83,8 @@ export interface TsdocParsedComment {
83
83
  * - `@since` - version information
84
84
  * - `@mutates` - mutation documentation (non-standard)
85
85
  *
86
- * @param node The TypeScript node to extract JSDoc from
87
- * @param source_file Source file (used for extracting full` @see` tag text)
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,8 +103,8 @@ 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 The raw comment text including `/**` and `*\/` markers
107
- * @returns Cleaned comment text, or undefined if empty after cleaning
106
+ * @param comment_text - the raw comment text including `/**` and `*\/` markers
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;
110
110
  //# sourceMappingURL=tsdoc_helpers.d.ts.map
@@ -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 The TypeScript node to extract JSDoc from
58
- * @param source_file Source file (used for extracting full` @see` tag text)
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,8 +182,8 @@ export const tsdoc_apply_to_declaration = (declaration, tsdoc) => {
182
182
  *
183
183
  * Transforms `/** ... *\/` style comments into clean text.
184
184
  *
185
- * @param comment_text The raw comment text including `/**` and `*\/` markers
186
- * @returns Cleaned comment text, or undefined if empty after cleaning
185
+ * @param comment_text - the raw comment text including `/**` and `*\/` markers
186
+ * @returns cleaned comment text, or undefined if empty after cleaning
187
187
  */
188
188
  export const tsdoc_clean_comment = (comment_text) => {
189
189
  const text = 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 './mdz.js';
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.190.0",
3
+ "version": "0.191.1",
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
- "benchmark_mdz": "gro run src/benchmarks/mdz.benchmark.ts"
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,8 +81,8 @@
80
81
  "devDependencies": {
81
82
  "@changesets/changelog-git": "^0.2.1",
82
83
  "@fuzdev/fuz_code": "^0.45.1",
83
- "@fuzdev/fuz_css": "^0.56.0",
84
- "@fuzdev/fuz_util": "^0.54.0",
84
+ "@fuzdev/fuz_css": "^0.57.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",
@@ -99,10 +100,10 @@
99
100
  "jsdom": "^27.2.0",
100
101
  "magic-string": "^0.30.21",
101
102
  "prettier": "^3.7.4",
102
- "prettier-plugin-svelte": "^3.4.1",
103
- "svelte": "^5.53.12",
103
+ "prettier-plugin-svelte": "^3.5.1",
104
+ "svelte": "^5.54.0",
104
105
  "svelte-check": "^4.4.5",
105
- "svelte2tsx": "^0.7.47",
106
+ "svelte2tsx": "^0.7.52",
106
107
  "tslib": "^2.8.1",
107
108
  "typescript": "^5.9.3",
108
109
  "typescript-eslint": "^8.48.1",
@@ -225,9 +225,9 @@ export interface FormatDiagnosticOptions {
225
225
  /**
226
226
  * Format a diagnostic for display.
227
227
  *
228
- * @param diagnostic The diagnostic to format
229
- * @param options Formatting options
230
- * @returns Formatted string like './file.ts:10:5: error: message'
228
+ * @param diagnostic - the diagnostic to format
229
+ * @param options - formatting options
230
+ * @returns formatted string like './file.ts:10:5: error: message'
231
231
  */
232
232
  export const format_diagnostic = (
233
233
  diagnostic: Diagnostic,
@@ -344,7 +344,7 @@ let cache_key_counter = 0;
344
344
 
345
345
  /**
346
346
  * Creates an attachment that sets up contextmenu behavior on an element.
347
- * @param params Contextmenu parameters or nullish to disable
347
+ * @param params - contextmenu parameters or nullish to disable
348
348
  */
349
349
  export const contextmenu_attachment =
350
350
  <T extends ContextmenuParams, U extends T | Array<T>>(
@@ -380,11 +380,11 @@ export interface ContextmenuOpenOptions {
380
380
  /**
381
381
  * Opens the contextmenu, if appropriate,
382
382
  * querying the menu items from the DOM starting at the event target.
383
- * @param target the leaf element from which to open the contextmenu
384
- * @param x the page X coordinate at which to open the contextmenu, typically the mouse `pageX`
385
- * @param y the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`
386
- * @param contextmenu the contextmenu store
387
- * @param options optional configuration for filtering entries and haptic feedback
383
+ * @param target - the leaf element from which to open the contextmenu
384
+ * @param x - the page X coordinate at which to open the contextmenu, typically the mouse `pageX`
385
+ * @param y - the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`
386
+ * @param contextmenu - the contextmenu store
387
+ * @param options - optional configuration for filtering entries and haptic feedback
388
388
  * @returns a boolean indicating if the menu was opened or not
389
389
  */
390
390
  export const contextmenu_open = (
@@ -487,7 +487,7 @@ const non_scoped_roots: Set<symbol> = new Set();
487
487
  * Registers a contextmenu root and warns if multiple non-scoped roots are detected.
488
488
  * Only active in development mode. Automatically handles cleanup on unmount.
489
489
  *
490
- * @param get_scoped Getter function that returns the current scoped value
490
+ * @param get_scoped - getter function that returns the current scoped value
491
491
  */
492
492
  export const contextmenu_check_global_root = (get_scoped: () => boolean): void => {
493
493
  $effect(() => {
@@ -5,11 +5,13 @@ import {ensure_end, ensure_start} from '@fuzdev/fuz_util/string.js';
5
5
  import {create_context} from './context_helpers.js';
6
6
 
7
7
  /**
8
- * Convert a string to a URL-safe fragment identifier, preserving case for API declarations.
9
- * Only transforms spaces and special characters, keeping valid identifier characters intact.
10
- * Used for hash anchors in documentation.
11
- * @param str - The string to convert to a fragment
12
- * @returns A URL-safe fragment identifier
8
+ * Convert a string to a URL-safe fragment identifier, preserving case.
9
+ * Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
10
+ * this keeps the original casing so API declarations like `AsyncStatus`
11
+ * and `async_status` produce distinct fragment IDs.
12
+ * Used by the Tome documentation system for heading and section anchors.
13
+ * @param str - the string to convert to a fragment
14
+ * @returns a URL-safe fragment identifier with case preserved
13
15
  */
14
16
  export const docs_slugify = (str: string): string => {
15
17
  return (
@@ -30,7 +30,7 @@ export type IntersectParamsOrCallback = OnIntersect | IntersectParams;
30
30
  * Creates an attachment that observes element viewport intersection.
31
31
  * Uses the lazy function pattern to optimize reactivity:
32
32
  * callbacks can update without recreating the observer, preserving state.
33
- * @param get_params Function that returns callback, params object, or nullish to disable
33
+ * @param get_params - function that returns callback, params object, or nullish to disable
34
34
  */
35
35
  export const intersect =
36
36
  (
@@ -113,12 +113,12 @@ export interface ModuleAnalysis {
113
113
  * only re-analyze changed files. The TypeScript program should include all files
114
114
  * for accurate type resolution, but only changed files need re-analysis.
115
115
  *
116
- * @param source_file The source file info with content and optional dependency data
117
- * @param program TypeScript program (used for type checking and source file lookup)
118
- * @param options Module source options for path extraction
119
- * @param ctx Analysis context for collecting diagnostics
120
- * @param log Optional logger for warnings
121
- * @returns Module metadata and re-exports, or undefined if source file not found in program
116
+ * @param source_file - the source file info with content and optional dependency data
117
+ * @param program - TypeScript program (used for type checking and source file lookup)
118
+ * @param options - module source options for path extraction
119
+ * @param ctx - analysis context for collecting diagnostics
120
+ * @param log - optional logger for warnings
121
+ * @returns module metadata and re-exports, or undefined if source file not found in program
122
122
  */
123
123
  export const library_analyze_module = (
124
124
  source_file: SourceFileInfo,
@@ -89,9 +89,9 @@ export const source_file_from_disknode = (disknode: Disknode): SourceFileInfo =>
89
89
  * have malformed paths or missing content). The filtering uses `module_is_source` which
90
90
  * checks `source_paths` to only include files in configured source directories.
91
91
  *
92
- * @param disknodes Iterator of Gro disknodes from filer
93
- * @param options Module source options for filtering
94
- * @param log Optional logger for status messages
92
+ * @param disknodes - iterator of Gro disknodes from filer
93
+ * @param options - module source options for filtering
94
+ * @param log - optional logger for status messages
95
95
  */
96
96
  export const library_collect_source_files_from_disknodes = (
97
97
  disknodes: Iterable<Disknode>,
@@ -146,7 +146,7 @@ export const library_collect_source_files_from_disknodes = (
146
146
  * export const gen = library_gen();
147
147
  * ```
148
148
  *
149
- * @param options Optional generation options
149
+ * @param options - optional generation options
150
150
  */
151
151
  export const library_gen = (options?: LibraryGenOptions): Gen => {
152
152
  return {
@@ -43,8 +43,8 @@ import {AnalysisContext, format_diagnostic} from './analysis_context.js';
43
43
  /**
44
44
  * Callback for handling duplicate declaration names.
45
45
  *
46
- * @param duplicates Map of declaration names to their occurrences across modules
47
- * @param log Logger for reporting
46
+ * @param duplicates - map of declaration names to their occurrences across modules
47
+ * @param log - logger for reporting
48
48
  */
49
49
  export type OnDuplicatesCallback = (
50
50
  duplicates: Map<string, Array<DuplicateInfo>>,
@@ -17,7 +17,7 @@ import {DOCS_API_PATH, DOCS_PATH_DEFAULT} from './docs_helpers.svelte.js';
17
17
  /**
18
18
  * Build project-relative API documentation URL with hash anchor.
19
19
  *
20
- * @param declaration_name Name of the declaration to link to
20
+ * @param declaration_name - name of the declaration to link to
21
21
  * @returns URL path like '/docs/api#declaration_name'
22
22
  */
23
23
  export const url_api_declaration = (declaration_name: string): string =>
@@ -26,9 +26,9 @@ export const url_api_declaration = (declaration_name: string): string =>
26
26
  /**
27
27
  * Build full API documentation URL with domain and hash anchor.
28
28
  *
29
- * @param homepage Package homepage URL
30
- * @param declaration_name Name of the declaration to link to
31
- * @returns Full URL like 'https://example.com/docs/api#declaration_name'
29
+ * @param homepage - package homepage URL
30
+ * @param declaration_name - name of the declaration to link to
31
+ * @returns full URL like 'https://example.com/docs/api#declaration_name'
32
32
  */
33
33
  export const url_api_declaration_full = (homepage: string, declaration_name: string): string =>
34
34
  `${homepage}${DOCS_PATH_DEFAULT}/api#${encodeURIComponent(declaration_name)}`;
@@ -36,7 +36,7 @@ export const url_api_declaration_full = (homepage: string, declaration_name: str
36
36
  /**
37
37
  * Build project-relative module documentation URL.
38
38
  *
39
- * @param module_path Module path (e.g., 'helpers.ts')
39
+ * @param module_path - module path (e.g., 'helpers.ts')
40
40
  * @returns URL path like '/docs/api/helpers.ts'
41
41
  */
42
42
  export const url_api_module = (module_path: string): string => `${DOCS_API_PATH}/${module_path}`;
@@ -44,9 +44,9 @@ export const url_api_module = (module_path: string): string => `${DOCS_API_PATH}
44
44
  /**
45
45
  * Build package logo URL with favicon.png fallback.
46
46
  *
47
- * @param homepage_url Package homepage URL, or null
48
- * @param logo_path Optional custom logo path (defaults to 'favicon.png')
49
- * @returns Full URL to the logo, or null if no homepage
47
+ * @param homepage_url - package homepage URL, or null
48
+ * @param logo_path - optional custom logo path (defaults to 'favicon.png')
49
+ * @returns full URL to the logo, or null if no homepage
50
50
  */
51
51
  export const url_package_logo = (
52
52
  homepage_url: string | null,
@@ -62,9 +62,9 @@ export const url_package_logo = (
62
62
  *
63
63
  * Uses SvelteKit's page state for the current origin by default.
64
64
  *
65
- * @param url Full URL to convert
66
- * @param origin Origin to strip (defaults to current page origin)
67
- * @returns Root-relative URL starting with '/'
65
+ * @param url - full URL to convert
66
+ * @param origin - origin to strip (defaults to current page origin)
67
+ * @returns root-relative URL starting with '/'
68
68
  *
69
69
  * @example
70
70
  * // Assuming page.url.origin is 'https://example.com'
@@ -130,8 +130,8 @@ export interface CollectedReExport {
130
130
  * // - helpers.ts foo declaration gets: also_exported_from: ['index.ts']
131
131
  * // - helpers.ts bar declaration gets: also_exported_from: ['index.ts']
132
132
  *
133
- * @param source_json The source JSON with all modules (will be mutated)
134
- * @param collected_re_exports Array of re-exports collected during phase 1
133
+ * @param source_json - the source JSON with all modules (will be mutated)
134
+ * @param collected_re_exports - array of re-exports collected during phase 1
135
135
  * @mutates source_json - adds `also_exported_from` to declarations
136
136
  */
137
137
  export const library_merge_re_exports = (
@@ -180,9 +180,9 @@ export const library_merge_re_exports = (
180
180
  * File types are determined by `options.get_analyzer`. By default, `.ts`, `.js`, and `.svelte`
181
181
  * files are supported. Customize `get_analyzer` to support additional file types like `.svx`.
182
182
  *
183
- * @param files Iterable of source file info (from Gro filer, file system, or other source)
184
- * @param options Module source options for filtering
185
- * @param log Optional logger for status messages
183
+ * @param files - iterable of source file info (from Gro filer, file system, or other source)
184
+ * @param options - module source options for filtering
185
+ * @param log - optional logger for status messages
186
186
  */
187
187
  export const library_collect_source_files = (
188
188
  files: Iterable<SourceFileInfo>,
package/src/lib/logos.ts CHANGED
@@ -100,6 +100,12 @@ export const logo_fuz_gitops = {
100
100
  paths: logo_fuz.paths,
101
101
  } satisfies SvgData;
102
102
 
103
+ export const logo_fuz_docs = {
104
+ label: 'a friendly cyan spider facing you',
105
+ fill: '#1ec3d2',
106
+ paths: logo_fuz.paths,
107
+ } satisfies SvgData;
108
+
103
109
  export const logo_fuz_template = {
104
110
  label: 'a friendly orange pixelated spider facing you',
105
111
  fill: '#f4672f',