@fuzdev/fuz_ui 0.190.0 → 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.
Files changed (72) hide show
  1. package/dist/ContextmenuRootForSafariCompatibility.svelte +1 -1
  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/analysis_context.d.ts +2 -2
  6. package/dist/analysis_context.js +2 -2
  7. package/dist/contextmenu_state.svelte.d.ts +7 -7
  8. package/dist/contextmenu_state.svelte.js +7 -7
  9. package/dist/docs_helpers.svelte.d.ts +7 -5
  10. package/dist/docs_helpers.svelte.d.ts.map +1 -1
  11. package/dist/docs_helpers.svelte.js +7 -5
  12. package/dist/intersect.svelte.d.ts +1 -1
  13. package/dist/intersect.svelte.js +1 -1
  14. package/dist/library_analysis.d.ts +5 -5
  15. package/dist/library_analysis.js +5 -5
  16. package/dist/library_gen.d.ts +4 -4
  17. package/dist/library_gen.js +4 -4
  18. package/dist/library_generate.d.ts +2 -2
  19. package/dist/library_helpers.d.ts +8 -8
  20. package/dist/library_helpers.js +8 -8
  21. package/dist/library_pipeline.d.ts +5 -5
  22. package/dist/library_pipeline.js +5 -5
  23. package/dist/mdz.d.ts +1 -14
  24. package/dist/mdz.d.ts.map +1 -1
  25. package/dist/mdz.js +57 -156
  26. package/dist/mdz_helpers.d.ts +26 -2
  27. package/dist/mdz_helpers.d.ts.map +1 -1
  28. package/dist/mdz_helpers.js +59 -5
  29. package/dist/mdz_lexer.d.ts.map +1 -1
  30. package/dist/mdz_lexer.js +18 -9
  31. package/dist/mdz_to_svelte.d.ts +5 -5
  32. package/dist/mdz_to_svelte.d.ts.map +1 -1
  33. package/dist/mdz_to_svelte.js +5 -5
  34. package/dist/mdz_token_parser.js +4 -3
  35. package/dist/module_helpers.d.ts +8 -8
  36. package/dist/module_helpers.js +8 -8
  37. package/dist/package_helpers.d.ts +12 -12
  38. package/dist/package_helpers.js +12 -12
  39. package/dist/storage.d.ts +3 -3
  40. package/dist/storage.js +3 -3
  41. package/dist/svelte_helpers.d.ts +9 -9
  42. package/dist/svelte_helpers.js +9 -9
  43. package/dist/svelte_preprocess_mdz.d.ts +1 -1
  44. package/dist/svelte_preprocess_mdz.js +1 -1
  45. package/dist/ts_helpers.d.ts +19 -19
  46. package/dist/ts_helpers.js +19 -19
  47. package/dist/tsdoc_helpers.d.ts +5 -5
  48. package/dist/tsdoc_helpers.js +5 -5
  49. package/dist/tsdoc_mdz.js +1 -1
  50. package/package.json +4 -3
  51. package/src/lib/analysis_context.ts +2 -2
  52. package/src/lib/contextmenu_state.svelte.ts +7 -7
  53. package/src/lib/docs_helpers.svelte.ts +7 -5
  54. package/src/lib/intersect.svelte.ts +1 -1
  55. package/src/lib/library_analysis.ts +5 -5
  56. package/src/lib/library_gen.ts +4 -4
  57. package/src/lib/library_generate.ts +2 -2
  58. package/src/lib/library_helpers.ts +8 -8
  59. package/src/lib/library_pipeline.ts +5 -5
  60. package/src/lib/mdz.ts +63 -167
  61. package/src/lib/mdz_helpers.ts +60 -5
  62. package/src/lib/mdz_lexer.ts +20 -9
  63. package/src/lib/mdz_to_svelte.ts +6 -5
  64. package/src/lib/mdz_token_parser.ts +4 -3
  65. package/src/lib/module_helpers.ts +8 -8
  66. package/src/lib/package_helpers.ts +12 -12
  67. package/src/lib/storage.ts +3 -3
  68. package/src/lib/svelte_helpers.ts +9 -9
  69. package/src/lib/svelte_preprocess_mdz.ts +1 -1
  70. package/src/lib/ts_helpers.ts +19 -19
  71. package/src/lib/tsdoc_helpers.ts +5 -5
  72. package/src/lib/tsdoc_mdz.ts +1 -1
@@ -382,7 +382,7 @@
382
382
  * The critical fix is calling preventDefault() in the touchmove handler when tracking
383
383
  * a longpress with movement below threshold.
384
384
  *
385
- * @param el The Window or HTMLElement to attach touch listeners to
385
+ * @param el - the Window or HTMLElement to attach touch listeners to
386
386
  * @returns Cleanup function to remove all event listeners
387
387
  */
388
388
  const touch_event_attachment = (el: HTMLElement | Window) => {
@@ -2,7 +2,8 @@
2
2
  import Code from '@fuzdev/fuz_code/Code.svelte';
3
3
  import {resolve} from '$app/paths';
4
4
 
5
- import {type MdzNode, resolve_relative_path} from './mdz.js';
5
+ import type {MdzNode} from './mdz.js';
6
+ import {resolve_relative_path} from './mdz_helpers.js';
6
7
  import DocsLink from './DocsLink.svelte';
7
8
  import MdzNodeView from './MdzNodeView.svelte';
8
9
  import {
@@ -80,7 +81,7 @@
80
81
  {:else if node.type === 'Hr'}
81
82
  <hr />
82
83
  {:else if node.type === 'Heading'}
83
- <svelte:element this={`h${node.level}`}>
84
+ <svelte:element this={`h${node.level}`} id={node.id}>
84
85
  {@render render_children(node.children)}
85
86
  </svelte:element>
86
87
  {:else if node.type === 'Codeblock'}
@@ -1,4 +1,4 @@
1
- import { type MdzNode } from './mdz.js';
1
+ import type { MdzNode } from './mdz.js';
2
2
  import MdzNodeView from './MdzNodeView.svelte';
3
3
  type $$ComponentProps = {
4
4
  node: MdzNode;
@@ -1 +1 @@
1
- {"version":3,"file":"MdzNodeView.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdzNodeView.svelte"],"names":[],"mappings":"AAMA,OAAO,EAAC,KAAK,OAAO,EAAwB,MAAM,UAAU,CAAC;AAE7D,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAO9C,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAoGH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"MdzNodeView.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdzNodeView.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGtC,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAO9C,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAqGH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -187,8 +187,8 @@ export interface FormatDiagnosticOptions {
187
187
  /**
188
188
  * Format a diagnostic for display.
189
189
  *
190
- * @param diagnostic The diagnostic to format
191
- * @param options Formatting options
190
+ * @param diagnostic - the diagnostic to format
191
+ * @param options - formatting options
192
192
  * @returns Formatted string like './file.ts:10:5: error: message'
193
193
  */
194
194
  export declare const format_diagnostic: (diagnostic: Diagnostic, options?: FormatDiagnosticOptions) => string;
@@ -113,8 +113,8 @@ export class AnalysisContext {
113
113
  /**
114
114
  * Format a diagnostic for display.
115
115
  *
116
- * @param diagnostic The diagnostic to format
117
- * @param options Formatting options
116
+ * @param diagnostic - the diagnostic to format
117
+ * @param options - formatting options
118
118
  * @returns Formatted string like './file.ts:10:5: error: message'
119
119
  */
120
120
  export const format_diagnostic = (diagnostic, options) => {
@@ -108,7 +108,7 @@ export declare class ContextmenuState {
108
108
  }
109
109
  /**
110
110
  * Creates an attachment that sets up contextmenu behavior on an element.
111
- * @param params Contextmenu parameters or nullish to disable
111
+ * @param params - contextmenu parameters or nullish to disable
112
112
  */
113
113
  export declare const contextmenu_attachment: <T extends ContextmenuParams, U extends T | Array<T>>(params: U | null | undefined) => Attachment<HTMLElement | SVGElement>;
114
114
  export interface ContextmenuOpenOptions {
@@ -120,11 +120,11 @@ export interface ContextmenuOpenOptions {
120
120
  /**
121
121
  * Opens the contextmenu, if appropriate,
122
122
  * querying the menu items from the DOM starting at the event target.
123
- * @param target the leaf element from which to open the contextmenu
124
- * @param x the page X coordinate at which to open the contextmenu, typically the mouse `pageX`
125
- * @param y the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`
126
- * @param contextmenu the contextmenu store
127
- * @param options optional configuration for filtering entries and haptic feedback
123
+ * @param target - the leaf element from which to open the contextmenu
124
+ * @param x - the page X coordinate at which to open the contextmenu, typically the mouse `pageX`
125
+ * @param y - the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`
126
+ * @param contextmenu - the contextmenu store
127
+ * @param options - optional configuration for filtering entries and haptic feedback
128
128
  * @returns a boolean indicating if the menu was opened or not
129
129
  */
130
130
  export declare const contextmenu_open: (target: HTMLElement | SVGElement, x: number, y: number, contextmenu: ContextmenuState, options?: ContextmenuOpenOptions) => boolean;
@@ -146,7 +146,7 @@ export declare const contextmenu_dimensions_context: {
146
146
  * Registers a contextmenu root and warns if multiple non-scoped roots are detected.
147
147
  * Only active in development mode. Automatically handles cleanup on unmount.
148
148
  *
149
- * @param get_scoped Getter function that returns the current scoped value
149
+ * @param get_scoped - getter function that returns the current scoped value
150
150
  */
151
151
  export declare const contextmenu_check_global_root: (get_scoped: () => boolean) => void;
152
152
  //# sourceMappingURL=contextmenu_state.svelte.d.ts.map
@@ -298,7 +298,7 @@ const contextmenu_cache = new Map();
298
298
  let cache_key_counter = 0;
299
299
  /**
300
300
  * Creates an attachment that sets up contextmenu behavior on an element.
301
- * @param params Contextmenu parameters or nullish to disable
301
+ * @param params - contextmenu parameters or nullish to disable
302
302
  */
303
303
  export const contextmenu_attachment = (params) => (el) => {
304
304
  // TODO could clean up the dataset attr, maybe use a weakmap?
@@ -319,11 +319,11 @@ const CONTEXTMENU_OPEN_VIBRATE_DURATION = 17;
319
319
  /**
320
320
  * Opens the contextmenu, if appropriate,
321
321
  * querying the menu items from the DOM starting at the event target.
322
- * @param target the leaf element from which to open the contextmenu
323
- * @param x the page X coordinate at which to open the contextmenu, typically the mouse `pageX`
324
- * @param y the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`
325
- * @param contextmenu the contextmenu store
326
- * @param options optional configuration for filtering entries and haptic feedback
322
+ * @param target - the leaf element from which to open the contextmenu
323
+ * @param x - the page X coordinate at which to open the contextmenu, typically the mouse `pageX`
324
+ * @param y - the page Y coordinate at which to open the contextmenu, typically the mouse `pageY`
325
+ * @param contextmenu - the contextmenu store
326
+ * @param options - optional configuration for filtering entries and haptic feedback
327
327
  * @returns a boolean indicating if the menu was opened or not
328
328
  */
329
329
  export const contextmenu_open = (target, x, y, contextmenu, options) => {
@@ -401,7 +401,7 @@ const non_scoped_roots = new Set();
401
401
  * Registers a contextmenu root and warns if multiple non-scoped roots are detected.
402
402
  * Only active in development mode. Automatically handles cleanup on unmount.
403
403
  *
404
- * @param get_scoped Getter function that returns the current scoped value
404
+ * @param get_scoped - getter function that returns the current scoped value
405
405
  */
406
406
  export const contextmenu_check_global_root = (get_scoped) => {
407
407
  $effect(() => {
@@ -1,10 +1,12 @@
1
1
  import { SvelteMap, SvelteSet } from 'svelte/reactivity';
2
2
  /**
3
- * Convert a string to a URL-safe fragment identifier, preserving case for API declarations.
4
- * Only transforms spaces and special characters, keeping valid identifier characters intact.
5
- * Used for hash anchors in documentation.
6
- * @param str - The string to convert to a fragment
7
- * @returns A URL-safe fragment identifier
3
+ * Convert a string to a URL-safe fragment identifier, preserving case.
4
+ * Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
5
+ * this keeps the original casing so API declarations like `AsyncStatus`
6
+ * and `async_status` produce distinct fragment IDs.
7
+ * Used by the Tome documentation system for heading and section anchors.
8
+ * @param str - the string to convert to a fragment
9
+ * @returns a URL-safe fragment identifier with case preserved
8
10
  */
9
11
  export declare const docs_slugify: (str: string) => string;
10
12
  export declare const DOCS_PATH_DEFAULT = "/docs";
@@ -1 +1 @@
1
- {"version":3,"file":"docs_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/docs_helpers.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAKvD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,M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Q,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,WAAW,EACjB,KAAK,SAAI,EACT,SAAS,CAAC,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,GAClB,MAAM;IAkBT,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIxB;;;OAGG;IACH,mBAAmB,IAAI,MAAM;CAG7B"}
@@ -3,11 +3,13 @@ import { SvelteMap, SvelteSet } from 'svelte/reactivity';
3
3
  import { ensure_end, ensure_start } from '@fuzdev/fuz_util/string.js';
4
4
  import { create_context } from './context_helpers.js';
5
5
  /**
6
- * Convert a string to a URL-safe fragment identifier, preserving case for API declarations.
7
- * Only transforms spaces and special characters, keeping valid identifier characters intact.
8
- * Used for hash anchors in documentation.
9
- * @param str - The string to convert to a fragment
10
- * @returns A URL-safe fragment identifier
6
+ * Convert a string to a URL-safe fragment identifier, preserving case.
7
+ * Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
8
+ * this keeps the original casing so API declarations like `AsyncStatus`
9
+ * and `async_status` produce distinct fragment IDs.
10
+ * Used by the Tome documentation system for heading and section anchors.
11
+ * @param str - the string to convert to a fragment
12
+ * @returns a URL-safe fragment identifier with case preserved
11
13
  */
12
14
  export const docs_slugify = (str) => {
13
15
  return (str
@@ -26,7 +26,7 @@ export type IntersectParamsOrCallback = OnIntersect | IntersectParams;
26
26
  * Creates an attachment that observes element viewport intersection.
27
27
  * Uses the lazy function pattern to optimize reactivity:
28
28
  * callbacks can update without recreating the observer, preserving state.
29
- * @param get_params Function that returns callback, params object, or nullish to disable
29
+ * @param get_params - function that returns callback, params object, or nullish to disable
30
30
  */
31
31
  export declare const intersect: (get_params: () => IntersectParamsOrCallback | null | undefined) => Attachment<HTMLElement | SVGElement>;
32
32
  export type OnIntersect = (state: IntersectState) => void;
@@ -3,7 +3,7 @@ import { deep_equal } from '@fuzdev/fuz_util/deep_equal.js';
3
3
  * Creates an attachment that observes element viewport intersection.
4
4
  * Uses the lazy function pattern to optimize reactivity:
5
5
  * callbacks can update without recreating the observer, preserving state.
6
- * @param get_params Function that returns callback, params object, or nullish to disable
6
+ * @param get_params - function that returns callback, params object, or nullish to disable
7
7
  */
8
8
  export const intersect = (get_params) => (el) => {
9
9
  // State that persists across callback changes
@@ -101,11 +101,11 @@ export interface ModuleAnalysis {
101
101
  * only re-analyze changed files. The TypeScript program should include all files
102
102
  * for accurate type resolution, but only changed files need re-analysis.
103
103
  *
104
- * @param source_file The source file info with content and optional dependency data
105
- * @param program TypeScript program (used for type checking and source file lookup)
106
- * @param options Module source options for path extraction
107
- * @param ctx Analysis context for collecting diagnostics
108
- * @param log Optional logger for warnings
104
+ * @param source_file - the source file info with content and optional dependency data
105
+ * @param program - TypeScript program (used for type checking and source file lookup)
106
+ * @param options - module source options for path extraction
107
+ * @param ctx - analysis context for collecting diagnostics
108
+ * @param log - optional logger for warnings
109
109
  * @returns Module metadata and re-exports, or undefined if source file not found in program
110
110
  */
111
111
  export declare const library_analyze_module: (source_file: SourceFileInfo, program: ts.Program, options: ModuleSourceOptions, ctx: AnalysisContext, log?: Logger) => ModuleAnalysis | undefined;
@@ -60,11 +60,11 @@ import { module_extract_path, } from './module_helpers.js';
60
60
  * only re-analyze changed files. The TypeScript program should include all files
61
61
  * for accurate type resolution, but only changed files need re-analysis.
62
62
  *
63
- * @param source_file The source file info with content and optional dependency data
64
- * @param program TypeScript program (used for type checking and source file lookup)
65
- * @param options Module source options for path extraction
66
- * @param ctx Analysis context for collecting diagnostics
67
- * @param log Optional logger for warnings
63
+ * @param source_file - the source file info with content and optional dependency data
64
+ * @param program - TypeScript program (used for type checking and source file lookup)
65
+ * @param options - module source options for path extraction
66
+ * @param ctx - analysis context for collecting diagnostics
67
+ * @param log - optional logger for warnings
68
68
  * @returns Module metadata and re-exports, or undefined if source file not found in program
69
69
  */
70
70
  export const library_analyze_module = (source_file, program, options, ctx, log) => {
@@ -63,9 +63,9 @@ export declare const source_file_from_disknode: (disknode: Disknode) => SourceFi
63
63
  * have malformed paths or missing content). The filtering uses `module_is_source` which
64
64
  * checks `source_paths` to only include files in configured source directories.
65
65
  *
66
- * @param disknodes Iterator of Gro disknodes from filer
67
- * @param options Module source options for filtering
68
- * @param log Optional logger for status messages
66
+ * @param disknodes - iterator of Gro disknodes from filer
67
+ * @param options - module source options for filtering
68
+ * @param log - optional logger for status messages
69
69
  */
70
70
  export declare const library_collect_source_files_from_disknodes: (disknodes: Iterable<Disknode>, options: ModuleSourceOptions, log?: {
71
71
  info: (...args: Array<unknown>) => void;
@@ -89,7 +89,7 @@ export declare const library_collect_source_files_from_disknodes: (disknodes: It
89
89
  * export const gen = library_gen();
90
90
  * ```
91
91
  *
92
- * @param options Optional generation options
92
+ * @param options - optional generation options
93
93
  */
94
94
  export declare const library_gen: (options?: LibraryGenOptions) => Gen;
95
95
  //# sourceMappingURL=library_gen.d.ts.map
@@ -41,9 +41,9 @@ export const source_file_from_disknode = (disknode) => {
41
41
  * have malformed paths or missing content). The filtering uses `module_is_source` which
42
42
  * checks `source_paths` to only include files in configured source directories.
43
43
  *
44
- * @param disknodes Iterator of Gro disknodes from filer
45
- * @param options Module source options for filtering
46
- * @param log Optional logger for status messages
44
+ * @param disknodes - iterator of Gro disknodes from filer
45
+ * @param options - module source options for filtering
46
+ * @param log - optional logger for status messages
47
47
  */
48
48
  export const library_collect_source_files_from_disknodes = (disknodes, options, log) => {
49
49
  // Validate options early to fail fast on misconfiguration
@@ -87,7 +87,7 @@ export const library_collect_source_files_from_disknodes = (disknodes, options,
87
87
  * export const gen = library_gen();
88
88
  * ```
89
89
  *
90
- * @param options Optional generation options
90
+ * @param options - optional generation options
91
91
  */
92
92
  export const library_gen = (options) => {
93
93
  return {
@@ -30,8 +30,8 @@ import { type DuplicateInfo } from './library_pipeline.js';
30
30
  /**
31
31
  * Callback for handling duplicate declaration names.
32
32
  *
33
- * @param duplicates Map of declaration names to their occurrences across modules
34
- * @param log Logger for reporting
33
+ * @param duplicates - map of declaration names to their occurrences across modules
34
+ * @param log - logger for reporting
35
35
  */
36
36
  export type OnDuplicatesCallback = (duplicates: Map<string, Array<DuplicateInfo>>, log: {
37
37
  error: (...args: Array<unknown>) => void;
@@ -11,30 +11,30 @@
11
11
  /**
12
12
  * Build project-relative API documentation URL with hash anchor.
13
13
  *
14
- * @param declaration_name Name of the declaration to link to
14
+ * @param declaration_name - name of the declaration to link to
15
15
  * @returns URL path like '/docs/api#declaration_name'
16
16
  */
17
17
  export declare const url_api_declaration: (declaration_name: string) => string;
18
18
  /**
19
19
  * Build full API documentation URL with domain and hash anchor.
20
20
  *
21
- * @param homepage Package homepage URL
22
- * @param declaration_name Name of the declaration to link to
21
+ * @param homepage - package homepage URL
22
+ * @param declaration_name - name of the declaration to link to
23
23
  * @returns Full URL like 'https://example.com/docs/api#declaration_name'
24
24
  */
25
25
  export declare const url_api_declaration_full: (homepage: string, declaration_name: string) => string;
26
26
  /**
27
27
  * Build project-relative module documentation URL.
28
28
  *
29
- * @param module_path Module path (e.g., 'helpers.ts')
29
+ * @param module_path - module path (e.g., 'helpers.ts')
30
30
  * @returns URL path like '/docs/api/helpers.ts'
31
31
  */
32
32
  export declare const url_api_module: (module_path: string) => string;
33
33
  /**
34
34
  * Build package logo URL with favicon.png fallback.
35
35
  *
36
- * @param homepage_url Package homepage URL, or null
37
- * @param logo_path Optional custom logo path (defaults to 'favicon.png')
36
+ * @param homepage_url - package homepage URL, or null
37
+ * @param logo_path - optional custom logo path (defaults to 'favicon.png')
38
38
  * @returns Full URL to the logo, or null if no homepage
39
39
  */
40
40
  export declare const url_package_logo: (homepage_url: string | null, logo_path?: string) => string | null;
@@ -43,8 +43,8 @@ export declare const url_package_logo: (homepage_url: string | null, logo_path?:
43
43
  *
44
44
  * Uses SvelteKit's page state for the current origin by default.
45
45
  *
46
- * @param url Full URL to convert
47
- * @param origin Origin to strip (defaults to current page origin)
46
+ * @param url - full URL to convert
47
+ * @param origin - origin to strip (defaults to current page origin)
48
48
  * @returns Root-relative URL starting with '/'
49
49
  *
50
50
  * @example
@@ -14,30 +14,30 @@ import { DOCS_API_PATH, DOCS_PATH_DEFAULT } from './docs_helpers.svelte.js';
14
14
  /**
15
15
  * Build project-relative API documentation URL with hash anchor.
16
16
  *
17
- * @param declaration_name Name of the declaration to link to
17
+ * @param declaration_name - name of the declaration to link to
18
18
  * @returns URL path like '/docs/api#declaration_name'
19
19
  */
20
20
  export const url_api_declaration = (declaration_name) => `${DOCS_API_PATH}#${encodeURIComponent(declaration_name)}`;
21
21
  /**
22
22
  * Build full API documentation URL with domain and hash anchor.
23
23
  *
24
- * @param homepage Package homepage URL
25
- * @param declaration_name Name of the declaration to link to
24
+ * @param homepage - package homepage URL
25
+ * @param declaration_name - name of the declaration to link to
26
26
  * @returns Full URL like 'https://example.com/docs/api#declaration_name'
27
27
  */
28
28
  export const url_api_declaration_full = (homepage, declaration_name) => `${homepage}${DOCS_PATH_DEFAULT}/api#${encodeURIComponent(declaration_name)}`;
29
29
  /**
30
30
  * Build project-relative module documentation URL.
31
31
  *
32
- * @param module_path Module path (e.g., 'helpers.ts')
32
+ * @param module_path - module path (e.g., 'helpers.ts')
33
33
  * @returns URL path like '/docs/api/helpers.ts'
34
34
  */
35
35
  export const url_api_module = (module_path) => `${DOCS_API_PATH}/${module_path}`;
36
36
  /**
37
37
  * Build package logo URL with favicon.png fallback.
38
38
  *
39
- * @param homepage_url Package homepage URL, or null
40
- * @param logo_path Optional custom logo path (defaults to 'favicon.png')
39
+ * @param homepage_url - package homepage URL, or null
40
+ * @param logo_path - optional custom logo path (defaults to 'favicon.png')
41
41
  * @returns Full URL to the logo, or null if no homepage
42
42
  */
43
43
  export const url_package_logo = (homepage_url, logo_path) => {
@@ -51,8 +51,8 @@ export const url_package_logo = (homepage_url, logo_path) => {
51
51
  *
52
52
  * Uses SvelteKit's page state for the current origin by default.
53
53
  *
54
- * @param url Full URL to convert
55
- * @param origin Origin to strip (defaults to current page origin)
54
+ * @param url - full URL to convert
55
+ * @param origin - origin to strip (defaults to current page origin)
56
56
  * @returns Root-relative URL starting with '/'
57
57
  *
58
58
  * @example
@@ -87,8 +87,8 @@ export interface CollectedReExport {
87
87
  * // - helpers.ts foo declaration gets: also_exported_from: ['index.ts']
88
88
  * // - helpers.ts bar declaration gets: also_exported_from: ['index.ts']
89
89
  *
90
- * @param source_json The source JSON with all modules (will be mutated)
91
- * @param collected_re_exports Array of re-exports collected during phase 1
90
+ * @param source_json - the source JSON with all modules (will be mutated)
91
+ * @param collected_re_exports - array of re-exports collected during phase 1
92
92
  * @mutates source_json - adds `also_exported_from` to declarations
93
93
  */
94
94
  export declare const library_merge_re_exports: (source_json: SourceJson, collected_re_exports: Array<CollectedReExport>) => void;
@@ -101,9 +101,9 @@ export declare const library_merge_re_exports: (source_json: SourceJson, collect
101
101
  * File types are determined by `options.get_analyzer`. By default, `.ts`, `.js`, and `.svelte`
102
102
  * files are supported. Customize `get_analyzer` to support additional file types like `.svx`.
103
103
  *
104
- * @param files Iterable of source file info (from Gro filer, file system, or other source)
105
- * @param options Module source options for filtering
106
- * @param log Optional logger for status messages
104
+ * @param files - iterable of source file info (from Gro filer, file system, or other source)
105
+ * @param options - module source options for filtering
106
+ * @param log - optional logger for status messages
107
107
  */
108
108
  export declare const library_collect_source_files: (files: Iterable<SourceFileInfo>, options: ModuleSourceOptions, log?: Logger) => Array<SourceFileInfo>;
109
109
  //# sourceMappingURL=library_pipeline.d.ts.map
@@ -87,8 +87,8 @@ export const library_sort_modules = (modules) => {
87
87
  * // - helpers.ts foo declaration gets: also_exported_from: ['index.ts']
88
88
  * // - helpers.ts bar declaration gets: also_exported_from: ['index.ts']
89
89
  *
90
- * @param source_json The source JSON with all modules (will be mutated)
91
- * @param collected_re_exports Array of re-exports collected during phase 1
90
+ * @param source_json - the source JSON with all modules (will be mutated)
91
+ * @param collected_re_exports - array of re-exports collected during phase 1
92
92
  * @mutates source_json - adds `also_exported_from` to declarations
93
93
  */
94
94
  export const library_merge_re_exports = (source_json, collected_re_exports) => {
@@ -129,9 +129,9 @@ export const library_merge_re_exports = (source_json, collected_re_exports) => {
129
129
  * File types are determined by `options.get_analyzer`. By default, `.ts`, `.js`, and `.svelte`
130
130
  * files are supported. Customize `get_analyzer` to support additional file types like `.svx`.
131
131
  *
132
- * @param files Iterable of source file info (from Gro filer, file system, or other source)
133
- * @param options Module source options for filtering
134
- * @param log Optional logger for status messages
132
+ * @param files - iterable of source file info (from Gro filer, file system, or other source)
133
+ * @param options - module source options for filtering
134
+ * @param log - optional logger for status messages
135
135
  */
136
136
  export const library_collect_source_files = (files, options, log) => {
137
137
  // Validate options early to fail fast on misconfiguration
package/dist/mdz.d.ts CHANGED
@@ -79,6 +79,7 @@ export interface MdzHrNode extends MdzBaseNode {
79
79
  export interface MdzHeadingNode extends MdzBaseNode {
80
80
  type: 'Heading';
81
81
  level: 1 | 2 | 3 | 4 | 5 | 6;
82
+ id: string;
82
83
  children: Array<MdzNode>;
83
84
  }
84
85
  export interface MdzElementNode extends MdzBaseNode {
@@ -108,18 +109,4 @@ export declare class MdzParser {
108
109
  */
109
110
  parse(): Array<MdzNode>;
110
111
  }
111
- export declare const mdz_is_url: (s: string) => boolean;
112
- /**
113
- * Resolves a relative path (`./` or `../`) against a base path.
114
- * The base is treated as a directory regardless of trailing slash
115
- * (`'/docs/mdz'` and `'/docs/mdz/'` behave identically).
116
- * Handles embedded `.` and `..` segments within the reference
117
- * (e.g., `'./a/../b'` → navigates up then down).
118
- * Clamps at root — excess `..` segments stop at `/` rather than escaping.
119
- *
120
- * @param reference A relative path starting with `./` or `../`.
121
- * @param base An absolute base path (e.g., `'/docs/mdz/'`). Empty string is treated as root.
122
- * @returns An absolute resolved path (e.g., `'/docs/mdz/grammar'`).
123
- */
124
- export declare const resolve_relative_path: (reference: string, base: string) => string;
125
112
  //# sourceMappingURL=mdz.d.ts.map
package/dist/mdz.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version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