@fuzdev/fuz_ui 0.218.0 → 0.220.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 (39) hide show
  1. package/dist/ApiModule.svelte +43 -2
  2. package/dist/ApiModule.svelte.d.ts.map +1 -1
  3. package/dist/Card.svelte +7 -0
  4. package/dist/Card.svelte.d.ts +5 -0
  5. package/dist/Card.svelte.d.ts.map +1 -1
  6. package/dist/ContextmenuMenu.svelte +16 -8
  7. package/dist/ContextmenuMenu.svelte.d.ts +14 -0
  8. package/dist/ContextmenuMenu.svelte.d.ts.map +1 -1
  9. package/dist/DeclarationDetail.svelte +57 -1
  10. package/dist/DeclarationDetail.svelte.d.ts +2 -1
  11. package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
  12. package/dist/Dialog.svelte +16 -15
  13. package/dist/Dialog.svelte.d.ts +14 -0
  14. package/dist/Dialog.svelte.d.ts.map +1 -1
  15. package/dist/LibraryDetail.svelte +1 -0
  16. package/dist/LibraryDetail.svelte.d.ts +1 -0
  17. package/dist/LibraryDetail.svelte.d.ts.map +1 -1
  18. package/dist/LibrarySummary.svelte +5 -0
  19. package/dist/LibrarySummary.svelte.d.ts +1 -0
  20. package/dist/LibrarySummary.svelte.d.ts.map +1 -1
  21. package/dist/PendingAnimation.svelte +9 -0
  22. package/dist/PendingAnimation.svelte.d.ts +7 -0
  23. package/dist/PendingAnimation.svelte.d.ts.map +1 -1
  24. package/dist/Sparkline.svelte +17 -21
  25. package/dist/Sparkline.svelte.d.ts +15 -0
  26. package/dist/Sparkline.svelte.d.ts.map +1 -1
  27. package/dist/declaration.svelte.d.ts +8 -1
  28. package/dist/declaration.svelte.d.ts.map +1 -1
  29. package/dist/declaration.svelte.js +9 -0
  30. package/dist/helpers.d.ts +10 -0
  31. package/dist/helpers.d.ts.map +1 -1
  32. package/dist/helpers.js +34 -0
  33. package/dist/module.svelte.d.ts +21 -1
  34. package/dist/module.svelte.d.ts.map +1 -1
  35. package/dist/module.svelte.js +43 -2
  36. package/package.json +3 -3
  37. package/src/lib/declaration.svelte.ts +14 -0
  38. package/src/lib/helpers.ts +31 -0
  39. package/src/lib/module.svelte.ts +52 -2
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import Code from '@fuzdev/fuz_code/Code.svelte';
3
3
  import Mdz from '@fuzdev/mdz/Mdz.svelte';
4
+ import { mdz_from_tsdoc } from '@fuzdev/mdz/tsdoc_mdz.ts';
4
5
  import {
5
6
  mdz_code_context,
6
7
  mdz_codeblock_context,
@@ -8,6 +9,7 @@
8
9
  } from '@fuzdev/mdz/mdz_contexts.ts';
9
10
 
10
11
  import { set_library_context_with_fallback, type Library } from './library.svelte.js';
12
+ import type { Module } from './module.svelte.js';
11
13
  import { tome_get_by_slug, type Tome } from './tome.js';
12
14
  import TomeContent from './TomeContent.svelte';
13
15
  import TomeSection from './TomeSection.svelte';
@@ -70,6 +72,20 @@
70
72
  const source_url = $derived(module?.url_github);
71
73
  </script>
72
74
 
75
+ <!-- Marker chips from the module comment, shared by the module page and directory listings. -->
76
+ {#snippet doc_chips(m: Module)}
77
+ {#if m.is_deprecated || m.is_internal}
78
+ <p class="row gap_md flex-wrap:wrap">
79
+ {#if m.is_deprecated}
80
+ <span class="chip">⚠️ deprecated</span>
81
+ {/if}
82
+ {#if m.is_internal}
83
+ <span class="chip">internal</span>
84
+ {/if}
85
+ </p>
86
+ {/if}
87
+ {/snippet}
88
+
73
89
  <svelte:head>
74
90
  <title>{module_name} - API docs - {library.pkg_json.name}</title>
75
91
  </svelte:head>
@@ -92,6 +108,7 @@
92
108
  {#each directory_modules as child_module (child_module.path)}
93
109
  <li>
94
110
  <h3><ModuleLink module_path={child_module.path} /></h3>
111
+ {@render doc_chips(child_module)}
95
112
  {#if child_module.module_comment}
96
113
  <Mdz content={child_module.module_comment} />
97
114
  {/if}
@@ -101,9 +118,33 @@
101
118
  </section>
102
119
  {/if}
103
120
  {:else}
104
- {#if module.module_comment}
121
+ <!-- module comment: mirrors the compact `doc_extras` form in `DeclarationDetail` -->
122
+ {#if module.has_module_doc}
105
123
  <section>
106
- <Mdz content={module.module_comment} />
124
+ {@render doc_chips(module)}
125
+ {#if module.deprecated_message}
126
+ <p>{module.deprecated_message}</p>
127
+ {/if}
128
+ {#if module.internal_message}
129
+ <p>{module.internal_message}</p>
130
+ {/if}
131
+ {#if module.module_comment}
132
+ <Mdz content={module.module_comment} />
133
+ {/if}
134
+ {#if module.since}
135
+ <p><strong>since</strong> {module.since}</p>
136
+ {/if}
137
+ {#each module.examples as example (example)}
138
+ <Mdz content={example} />
139
+ {/each}
140
+ {#if module.see_also.length}
141
+ <p><strong>see also</strong></p>
142
+ <ul>
143
+ {#each module.see_also as ref (ref)}
144
+ <li><Mdz content={mdz_from_tsdoc(ref)} /></li>
145
+ {/each}
146
+ </ul>
147
+ {/if}
107
148
  </section>
108
149
  {/if}
109
150
  {#if source_url}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiModule.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ApiModule.svelte"],"names":[],"mappings":"AAWA,OAAO,EAAqC,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAWvD,KAAK,gBAAgB,GAAI;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ,CAAC;AAgMH,QAAA,MAAM,SAAS,sDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"ApiModule.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ApiModule.svelte"],"names":[],"mappings":"AAYA,OAAO,EAAqC,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEtF,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAWvD,KAAK,gBAAgB,GAAI;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ,CAAC;AAyOH,QAAA,MAAM,SAAS,sDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
package/dist/Card.svelte CHANGED
@@ -1,3 +1,10 @@
1
+ <!--
2
+ @component
3
+
4
+ @cssprop --card_width - width of the card
5
+ @cssprop --border_radius - corner radius of the card
6
+ @cssprop --shadow - box shadow of a linked card in every state, replacing its default inset shadows
7
+ -->
1
8
  <script lang="ts">
2
9
  import { page } from '$app/state';
3
10
  import { DEV } from 'esm-env';
@@ -25,6 +25,11 @@ HTMLAttributes<HTMLElement> & {
25
25
  a_attrs?: SvelteHTMLElements['a'];
26
26
  children: Snippet;
27
27
  };
28
+ /**
29
+ * @cssprop --card_width - width of the card
30
+ * @cssprop --border_radius - corner radius of the card
31
+ * @cssprop --shadow - box shadow of a linked card in every state, replacing its default inset shadows
32
+ */
28
33
  declare const Card: import("svelte").Component<$$ComponentProps, {}, "">;
29
34
  type Card = ReturnType<typeof Card>;
30
35
  export default Card;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Card.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIzE,KAAK,gBAAgB,GAEpB,AA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,CAAC,GAAG,CAAC,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAuEJ;;;;GAIG;AACH,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
@@ -1,3 +1,19 @@
1
+ <!--
2
+ @component
3
+
4
+ The menu surface shared by `ContextmenuRoot.svelte` and
5
+ `ContextmenuRootForSafariCompatibility.svelte`. Owns everything that happens while
6
+ the menu is open - positioning, keyboard navigation, dismissal on outside presses,
7
+ popover top-layer promotion, and entry rendering - while the roots own gesture
8
+ detection, i.e. how the menu opens. Holds no gesture state of its own; the
9
+ `open_guard` it consults is owned and armed by the root.
10
+
11
+ @cssprop --contextmenu_z_index - stacking order of the menu in browsers without the Popover API
12
+ @cssprop --contextmenu_border_width - width of the menu's border
13
+ @cssprop --contextmenu_border_style - style of the menu's border
14
+ @cssprop --contextmenu_border_color - color of the menu's border
15
+ @cssprop --contextmenu_border_radius - corner radius of the menu
16
+ -->
1
17
  <script module lang="ts">
2
18
  // The default entry snippets are shared by `ContextmenuRoot.svelte`
3
19
  // and `ContextmenuRootForSafariCompatibility.svelte`.
@@ -5,14 +21,6 @@
5
21
  </script>
6
22
 
7
23
  <script lang="ts">
8
- /**
9
- * The menu surface shared by `ContextmenuRoot.svelte` and
10
- * `ContextmenuRootForSafariCompatibility.svelte`. Owns everything that happens
11
- * while the menu is open - positioning, keyboard navigation, dismissal on
12
- * outside presses, popover top-layer promotion, and entry rendering - while
13
- * the roots own gesture detection, i.e. how the menu opens. Holds no gesture
14
- * state of its own; the `open_guard` it consults is owned and armed by the root.
15
- */
16
24
  import { swallow } from '@fuzdev/fuz_util/dom.ts';
17
25
  import type { ComponentProps, Snippet } from 'svelte';
18
26
 
@@ -35,6 +35,20 @@ type $$ComponentProps = {
35
35
  declare const link_entry_default: (props: ComponentProps<typeof ContextmenuLinkEntry>) => ReturnType<import("svelte").Snippet>;
36
36
  declare const text_entry_default: (props: ComponentProps<typeof ContextmenuTextEntry>) => ReturnType<import("svelte").Snippet>;
37
37
  declare const separator_entry_default: (props: ComponentProps<typeof ContextmenuSeparator>) => ReturnType<import("svelte").Snippet>;
38
+ /**
39
+ * The menu surface shared by `ContextmenuRoot.svelte` and
40
+ * `ContextmenuRootForSafariCompatibility.svelte`. Owns everything that happens while
41
+ * the menu is open - positioning, keyboard navigation, dismissal on outside presses,
42
+ * popover top-layer promotion, and entry rendering - while the roots own gesture
43
+ * detection, i.e. how the menu opens. Holds no gesture state of its own; the
44
+ * `open_guard` it consults is owned and armed by the root.
45
+ *
46
+ * @cssprop --contextmenu_z_index - stacking order of the menu in browsers without the Popover API
47
+ * @cssprop --contextmenu_border_width - width of the menu's border
48
+ * @cssprop --contextmenu_border_style - style of the menu's border
49
+ * @cssprop --contextmenu_border_color - color of the menu's border
50
+ * @cssprop --contextmenu_border_radius - corner radius of the menu
51
+ */
38
52
  declare const ContextmenuMenu: import("svelte").Component<$$ComponentProps, {}, "el">;
39
53
  type ContextmenuMenu = ReturnType<typeof ContextmenuMenu>;
40
54
  export default ContextmenuMenu;
@@ -1 +1 @@
1
- {"version":3,"file":"ContextmenuMenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuMenu.svelte"],"names":[],"mappings":"AAKC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC;AAY5E,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtD,OAAO,EAEL,KAAK,gBAAgB,EACrB,MAAM,+BAA+B,CAAC;AACxC,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AACjE,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AACjE,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAOL,KAAK,oBAAoB,EACzB,MAAM,0BAA0B,CAAC;AAElC,KAAK,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;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
@@ -4,7 +4,8 @@
4
4
  Renders the full detail view for an exported declaration.
5
5
  Handles all svelte-docinfo declaration kinds (function, class, interface,
6
6
  type, variable, enum, component, snippet) and their kind-specific fields
7
- including parameters, props, members, overloads, external types, and more.
7
+ including parameters, props, CSS custom properties, members, overloads,
8
+ external types, and more.
8
9
 
9
10
  @see `declaration.svelte.ts` for the `Declaration` wrapper class
10
11
  @see {@link https://github.com/fuzdev/svelte-docinfo svelte-docinfo} for the analysis library
@@ -25,6 +26,7 @@ including parameters, props, members, overloads, external types, and more.
25
26
  import TypeJsonView from './TypeJsonView.svelte';
26
27
  import ModuleLink from './ModuleLink.svelte';
27
28
  import DocsLink from './DocsLink.svelte';
29
+ import { dedent_css_fallback } from './helpers.js';
28
30
 
29
31
  const { declaration }: { declaration: Declaration } = $props();
30
32
 
@@ -40,6 +42,14 @@ including parameters, props, members, overloads, external types, and more.
40
42
  return filtered.length ? filtered : undefined;
41
43
  });
42
44
 
45
+ // the "inferred" chip marks entries found by a `var()` fallback, which only
46
+ // distinguishes anything when the list also has `@cssprop`-documented ones
47
+ const css_property_chips_shown = $derived.by(() => {
48
+ const css_properties = declaration.css_custom_properties;
49
+ if (!css_properties) return false;
50
+ return css_properties.some((p) => p.documented) && css_properties.some((p) => !p.documented);
51
+ });
52
+
43
53
  // render mdz inline `code` as API-linking `DocsLink` and fenced blocks as syntax-highlighted
44
54
  // `Code`, matching the rest of the docs — the injection mdz core leaves open
45
55
  mdz_set_context_with_fallback(mdz_code_context, () => DocsLink);
@@ -318,6 +328,52 @@ including parameters, props, members, overloads, external types, and more.
318
328
  </section>
319
329
  {/if}
320
330
 
331
+ <!-- CSS custom properties (for Svelte components): the styling API a
332
+ consumer sets on the component or an ancestor; `documented` entries come
333
+ from `@cssprop` tags and arrive first, the rest are inferred from `var()`
334
+ fallbacks in the component's styles, marked only when the list mixes both -->
335
+ {#if declaration.css_custom_properties?.length}
336
+ <section>
337
+ <h4>CSS custom properties</h4>
338
+ {#if css_property_chips_shown}
339
+ <p>
340
+ Properties marked <span class="chip">inferred</span> are found by their <code>var()</code>
341
+ fallback, not documented with <code>@cssprop</code>.
342
+ </p>
343
+ {/if}
344
+ {#each declaration.css_custom_properties as css_property (css_property.name)}
345
+ <section>
346
+ <div class="row gap_md">
347
+ <h5><code>{css_property.name}</code></h5>
348
+ {#if css_property_chips_shown && !css_property.documented}
349
+ <span class="chip">inferred</span>
350
+ {/if}
351
+ </div>
352
+ {#if css_property.description}
353
+ <Mdz content={css_property.description} />
354
+ {/if}
355
+ {#if css_property.syntax}
356
+ <div class="row gap_md mb_sm">
357
+ <strong>syntax</strong>
358
+ <code>{css_property.syntax}</code>
359
+ </div>
360
+ {/if}
361
+ {#if css_property.fallback !== undefined}
362
+ <div class="row gap_md">
363
+ <strong>fallback</strong>
364
+ {#if css_property.fallback}
365
+ <Code lang="css" content={dedent_css_fallback(css_property.fallback)} wrap />
366
+ {:else}
367
+ <!-- `var(--a,)`, a fallback of nothing -->
368
+ <span>empty</span>
369
+ {/if}
370
+ </div>
371
+ {/if}
372
+ </section>
373
+ {/each}
374
+ </section>
375
+ {/if}
376
+
321
377
  <!-- overloads -->
322
378
  {#if declaration.overloads?.length}
323
379
  <section>
@@ -6,7 +6,8 @@ type $$ComponentProps = {
6
6
  * Renders the full detail view for an exported declaration.
7
7
  * Handles all svelte-docinfo declaration kinds (function, class, interface,
8
8
  * type, variable, enum, component, snippet) and their kind-specific fields
9
- * including parameters, props, members, overloads, external types, and more.
9
+ * including parameters, props, CSS custom properties, members, overloads,
10
+ * external types, and more.
10
11
  *
11
12
  * @see `declaration.svelte.ts` for the `Declaration` wrapper class
12
13
  * @see {@link https://github.com/fuzdev/svelte-docinfo svelte-docinfo} for the analysis library
@@ -1 +1 @@
1
- {"version":3,"file":"DeclarationDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationDetail.svelte"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmB1D,KAAK,gBAAgB,GAAI;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC;AA6gBvD;;;;;;;;GAQG;AACH,QAAA,MAAM,iBAAiB,sDAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"DeclarationDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationDetail.svelte"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAoB1D,KAAK,gBAAgB,GAAI;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC;AAikBvD;;;;;;;;;GASG;AACH,QAAA,MAAM,iBAAiB,sDAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
@@ -1,3 +1,19 @@
1
+ <!--
2
+ @component
3
+
4
+ Renders a native `<dialog>` opened with `showModal()`, which puts it in the top
5
+ layer. The top layer escapes ancestor stacking/overflow contexts (so no `Teleport`
6
+ is needed), traps focus, makes the rest of the page inert, closes on Escape, and
7
+ restores focus to the previously focused element on close -- all natively. The dim
8
+ background is the native `::backdrop`.
9
+
10
+ We render a full-viewport overlay inside the dialog rather than a content-sized
11
+ box, to preserve the scrolling and `align="top"` behaviors. The content surface
12
+ itself is the consumer's -- pair this with `DialogContent` for the default `.pane`
13
+ card and gutter, or render your own surface in `children`.
14
+
15
+ @cssprop --backdrop_color - color of the overlay behind the dialog's content, fuz_css's global token by default
16
+ -->
1
17
  <script lang="ts">
2
18
  import type { Snippet } from 'svelte';
3
19
  import type { SvelteHTMLElements } from 'svelte/elements';
@@ -6,21 +22,6 @@
6
22
 
7
23
  import { dialog_context, type DialogContext, type DialogAlign } from './dialog.js';
8
24
 
9
- /**
10
- * This component renders a native `<dialog>` opened with `showModal()`, which
11
- * puts it in the top layer. The top layer escapes ancestor stacking/overflow
12
- * contexts (so no `Teleport` is needed), traps focus, makes the rest of the page
13
- * inert, closes on Escape, and restores focus to the previously focused element
14
- * on close -- all natively. The dim background is the native `::backdrop`.
15
- *
16
- * We render a full-viewport overlay inside the dialog rather than a content-sized
17
- * box, to preserve the scrolling and `align="top"` behaviors. The content
18
- * surface itself is the consumer's -- pair this with `DialogContent` for the
19
- * default `.pane` card and gutter, or render your own surface in `children`.
20
- *
21
- * @module
22
- */
23
-
24
25
  const {
25
26
  show = true,
26
27
  align = 'center',
@@ -55,6 +55,20 @@ type $$ComponentProps = Omit<SvelteHTMLElements['dialog'], 'children' | 'onclose
55
55
  */
56
56
  children: Snippet<[dialog: DialogContext]>;
57
57
  };
58
+ /**
59
+ * Renders a native `<dialog>` opened with `showModal()`, which puts it in the top
60
+ * layer. The top layer escapes ancestor stacking/overflow contexts (so no `Teleport`
61
+ * is needed), traps focus, makes the rest of the page inert, closes on Escape, and
62
+ * restores focus to the previously focused element on close -- all natively. The dim
63
+ * background is the native `::backdrop`.
64
+ *
65
+ * We render a full-viewport overlay inside the dialog rather than a content-sized
66
+ * box, to preserve the scrolling and `align="top"` behaviors. The content surface
67
+ * itself is the consumer's -- pair this with `DialogContent` for the default `.pane`
68
+ * card and gutter, or render your own surface in `children`.
69
+ *
70
+ * @cssprop --backdrop_color - color of the overlay behind the dialog's content, fuz_css's global token by default
71
+ */
58
72
  declare const Dialog: import("svelte").Component<$$ComponentProps, {}, "">;
59
73
  type Dialog = ReturnType<typeof Dialog>;
60
74
  export default Dialog;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Dialog.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,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C,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;CAC3C,CAAC;AAwGH;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,MAAM,sDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -6,6 +6,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
6
6
 
7
7
  @see `library.svelte.ts` for the `Library` wrapper class
8
8
  @see {@link https://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library
9
+ @cssprop --max_width - maximum width of the detail
9
10
  -->
10
11
  <script lang="ts">
11
12
  import { page } from '$app/state';
@@ -23,6 +23,7 @@ type $$ComponentProps = OmitStrict<SvelteHTMLElements['div'], 'children'> & {
23
23
  *
24
24
  * @see `library.svelte.ts` for the `Library` wrapper class
25
25
  * @see {@link https://github.com/ryanatkn/svelte-docinfo svelte-docinfo} for the analysis library
26
+ * @cssprop --max_width - maximum width of the detail
26
27
  */
27
28
  declare const LibraryDetail: import("svelte").Component<$$ComponentProps, {}, "">;
28
29
  type LibraryDetail = ReturnType<typeof LibraryDetail>;
@@ -1 +1 @@
1
- {"version":3,"file":"LibraryDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibraryDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,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EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAOnE,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC5E,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;CACvC,CAAC;AAgLH;;;;;;;GAOG;AACH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -1,3 +1,8 @@
1
+ <!--
2
+ @component
3
+
4
+ @cssprop --max_width - maximum width of the summary
5
+ -->
1
6
  <script lang="ts">
2
7
  import { page } from '$app/state';
3
8
  import type { Snippet } from 'svelte';
@@ -11,6 +11,7 @@ type $$ComponentProps = SvelteHTMLElements['div'] & {
11
11
  homepage_url?: Snippet<[homepage_url: string]>;
12
12
  children?: Snippet;
13
13
  };
14
+ /** @cssprop --max_width - maximum width of the summary */
14
15
  declare const LibrarySummary: import("svelte").Component<$$ComponentProps, {}, "">;
15
16
  type LibrarySummary = ReturnType<typeof LibrarySummary>;
16
17
  export default LibrarySummary;
@@ -1 +1 @@
1
- {"version":3,"file":"LibrarySummary.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibrarySummary.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGlD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA+GH,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"LibrarySummary.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibrarySummary.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGlD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAgHH,0DAA0D;AAC1D,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -1,3 +1,12 @@
1
+ <!--
2
+ @component
3
+
4
+ @cssprop --font_size - size of the dots, inherited by default
5
+ @cssprop --scale_x - horizontal scale of a dot at rest, growing to 1 mid-cycle
6
+ @cssprop --scale_y - vertical scale of a dot at rest, growing to 1 mid-cycle
7
+ @cssprop --scale_z - depth scale of a dot at rest, growing to 1 mid-cycle
8
+ @cssprop --animation_duration - length of one animation cycle
9
+ -->
1
10
  <script lang="ts">
2
11
  import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
3
12
  import type { Snippet } from 'svelte';
@@ -7,6 +7,13 @@ type $$ComponentProps = OmitStrict<SvelteHTMLElements['span'], 'children'> & {
7
7
  item_attrs?: SvelteHTMLElements['span'];
8
8
  children?: Snippet<[index: number]>;
9
9
  };
10
+ /**
11
+ * @cssprop --font_size - size of the dots, inherited by default
12
+ * @cssprop --scale_x - horizontal scale of a dot at rest, growing to 1 mid-cycle
13
+ * @cssprop --scale_y - vertical scale of a dot at rest, growing to 1 mid-cycle
14
+ * @cssprop --scale_z - depth scale of a dot at rest, growing to 1 mid-cycle
15
+ * @cssprop --animation_duration - length of one animation cycle
16
+ */
10
17
  declare const PendingAnimation: import("svelte").Component<$$ComponentProps, {}, "">;
11
18
  type PendingAnimation = ReturnType<typeof PendingAnimation>;
12
19
  export default PendingAnimation;
@@ -1 +1 @@
1
- {"version":3,"file":"PendingAnimation.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PendingAnimation.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;CACpC,CAAC;AAoCH,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"PendingAnimation.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PendingAnimation.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;CACpC,CAAC;AAqCH;;;;;;GAMG;AACH,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
@@ -1,30 +1,26 @@
1
+ <!--
2
+ @component
3
+
4
+ Renders values as a small inline SVG line graph.
5
+
6
+ Designed for comparable small multiples: pass a shared `max` so a set of
7
+ sparklines renders at the same vertical scale instead of each stretching to fit.
8
+ The stroke uses `currentColor`, so color it by setting `color` on the component or
9
+ a parent (e.g. a fuz_css `color_*` class). Each point's stroke alpha scales with
10
+ its value, from `alpha_floor` at 0 up to 1 at `max`, de-emphasizing quiet stretches.
11
+
12
+ `scale` controls only the geometry: the nonlinear options compress the top of the
13
+ range so small values stay legible under a large shared `max`, while the alpha
14
+ fade keeps tracking the linear ratio so it still encodes true magnitude.
15
+
16
+ @cssprop --sparkline_bg - background behind the line, a light wash of `currentColor` by default
17
+ -->
1
18
  <script lang="ts">
2
19
  import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
3
20
  import type { SvelteHTMLElements } from 'svelte/elements';
4
21
 
5
22
  import { sparkline_geometry, type SparklineScale } from './sparkline.js';
6
23
 
7
- /**
8
- * Renders values as a small inline SVG line graph.
9
- *
10
- * Designed for comparable small multiples: pass a shared `max` so a set of
11
- * sparklines renders at the same vertical scale instead of each stretching
12
- * to fit. The stroke uses `currentColor`, so color it by setting `color` on
13
- * the component or a parent (e.g. a fuz_css `color_*` class). Each point's
14
- * stroke alpha scales with its value, from `alpha_floor` at 0 up to 1 at
15
- * `max`, de-emphasizing quiet stretches.
16
- *
17
- * `scale` controls only the geometry: the nonlinear options compress the
18
- * top of the range so small values stay legible under a large shared
19
- * `max`, while the alpha fade keeps tracking the linear ratio so it still
20
- * encodes true magnitude.
21
- *
22
- * The background is a light wash of `currentColor`, overridable with the
23
- * `--sparkline_bg` custom property.
24
- *
25
- * @module
26
- */
27
-
28
24
  const {
29
25
  values,
30
26
  max,
@@ -36,6 +36,21 @@ type $$ComponentProps = OmitStrict<SvelteHTMLElements['svg'], 'values' | 'width'
36
36
  */
37
37
  label?: string;
38
38
  };
39
+ /**
40
+ * Renders values as a small inline SVG line graph.
41
+ *
42
+ * Designed for comparable small multiples: pass a shared `max` so a set of
43
+ * sparklines renders at the same vertical scale instead of each stretching to fit.
44
+ * The stroke uses `currentColor`, so color it by setting `color` on the component or
45
+ * a parent (e.g. a fuz_css `color_*` class). Each point's stroke alpha scales with
46
+ * its value, from `alpha_floor` at 0 up to 1 at `max`, de-emphasizing quiet stretches.
47
+ *
48
+ * `scale` controls only the geometry: the nonlinear options compress the top of the
49
+ * range so small values stay legible under a large shared `max`, while the alpha
50
+ * fade keeps tracking the linear ratio so it still encodes true magnitude.
51
+ *
52
+ * @cssprop --sparkline_bg - background behind the line, a light wash of `currentColor` by default
53
+ */
39
54
  declare const Sparkline: import("svelte").Component<$$ComponentProps, {}, "">;
40
55
  type Sparkline = ReturnType<typeof Sparkline>;
41
56
  export default Sparkline;
@@ -1 +1 @@
1
- {"version":3,"file":"Sparkline.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Sparkline.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAExE,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,GAAG;IACzG,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAoEH,QAAA,MAAM,SAAS,sDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Sparkline.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Sparkline.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAExE,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,GAAG;IACzG,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAgDH;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,SAAS,sDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { DeclarationJsonInput, MemberJsonInput, ParameterJsonInput, ComponentPropJsonInput, OverloadJsonInput, Reactivity, TypeJson } from 'svelte-docinfo/types.js';
1
+ import type { DeclarationJsonInput, MemberJsonInput, ParameterJsonInput, ComponentPropJsonInput, ComponentCssPropertyJsonInput, OverloadJsonInput, Reactivity, TypeJson } from 'svelte-docinfo/types.js';
2
2
  import type { Module } from './module.svelte.js';
3
3
  /**
4
4
  * Rich runtime representation of an exported declaration.
@@ -104,6 +104,13 @@ export declare class Declaration {
104
104
  * Present on `type` and `interface` kinds.
105
105
  */
106
106
  get merged_value(): boolean | undefined;
107
+ /**
108
+ * The component's styling API: CSS custom properties its styles read with
109
+ * a `var()` fallback, plus any its doc comment documents with `@cssprop`
110
+ * tags (`documented`), the documented ones first.
111
+ * Present on `component` kind only.
112
+ */
113
+ get css_custom_properties(): Array<ComponentCssPropertyJsonInput> | undefined;
107
114
  /**
108
115
  * Whether a component accepts children via props or template usage.
109
116
  * Present on `component` kind only.
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/declaration.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAcjD;;;;;;;;;;;;GAYG;AACH,qBAAa,WAAW;;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAiB;IACxC,QAAQ,CAAC,gBAAgB,EAAE,oBAAoB,CAAiB;IAEhE,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,CAE/B;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAEvC;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAQnC;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAID;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAS7B;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAIrC;IAID;;OAEG;IACH,IAAI,YAAY,IAAI,MAAM,CAOzB;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,QAAQ,GAAG,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IAGD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAGD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,cAAc,IAAI,OAAO,CAG5B;IAED,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;gBAEW,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,oBAAoB;CAIlE"}
@@ -193,6 +193,15 @@ export class Declaration {
193
193
  get merged_value() {
194
194
  return field(this.declaration_json, 'mergedValue');
195
195
  }
196
+ /**
197
+ * The component's styling API: CSS custom properties its styles read with
198
+ * a `var()` fallback, plus any its doc comment documents with `@cssprop`
199
+ * tags (`documented`), the documented ones first.
200
+ * Present on `component` kind only.
201
+ */
202
+ get css_custom_properties() {
203
+ return field(this.declaration_json, 'cssCustomProperties');
204
+ }
196
205
  /**
197
206
  * Whether a component accepts children via props or template usage.
198
207
  * Present on `component` kind only.
package/dist/helpers.d.ts CHANGED
@@ -1,2 +1,12 @@
1
1
  export declare const render_value_to_string: (value: unknown) => string;
2
+ /**
3
+ * Strips the whitespace prefix that a CSS custom property's multi-line
4
+ * `fallback` shares across its continuation lines, so a value broken over
5
+ * several stylesheet lines renders without the stylesheet's indentation.
6
+ * Line endings normalize to `\n`, and whitespace-only lines become empty.
7
+ *
8
+ * @param fallback - the verbatim fallback source text
9
+ * @returns the fallback with its continuation lines dedented
10
+ */
11
+ export declare const dedent_css_fallback: (fallback: string) => string;
2
12
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,MASvD,CAAC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,MASvD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,KAAG,MAoBtD,CAAC"}
package/dist/helpers.js CHANGED
@@ -14,3 +14,37 @@ export const render_value_to_string = (value) => {
14
14
  return JSON.stringify(value);
15
15
  return value + ''; // eslint-disable-line @typescript-eslint/no-base-to-string
16
16
  };
17
+ /**
18
+ * Strips the whitespace prefix that a CSS custom property's multi-line
19
+ * `fallback` shares across its continuation lines, so a value broken over
20
+ * several stylesheet lines renders without the stylesheet's indentation.
21
+ * Line endings normalize to `\n`, and whitespace-only lines become empty.
22
+ *
23
+ * @param fallback - the verbatim fallback source text
24
+ * @returns the fallback with its continuation lines dedented
25
+ */
26
+ export const dedent_css_fallback = (fallback) => {
27
+ const lines = fallback.split(/\r?\n/);
28
+ if (lines.length === 1)
29
+ return fallback;
30
+ // svelte-docinfo trims the fallback, so the first line's original column is
31
+ // lost — it stays as-is, and only the continuation lines are compared
32
+ let prefix;
33
+ for (let i = 1; i < lines.length; i++) {
34
+ const line = lines[i];
35
+ if (!line.trim())
36
+ continue;
37
+ const leading = /^[ \t]*/.exec(line)[0];
38
+ if (prefix === undefined) {
39
+ prefix = leading;
40
+ }
41
+ else {
42
+ let j = 0;
43
+ while (j < prefix.length && j < leading.length && prefix[j] === leading[j])
44
+ j++;
45
+ prefix = prefix.slice(0, j);
46
+ }
47
+ }
48
+ const width = prefix?.length ?? 0;
49
+ return lines.map((line, i) => (i === 0 ? line : line.trim() ? line.slice(width) : '')).join('\n');
50
+ };
@@ -33,7 +33,22 @@ export declare class Module {
33
33
  * Import-style path with ./ prefix.
34
34
  */
35
35
  get path_import(): string;
36
+ /**
37
+ * Prose of the `@module` comment, tag lines removed. Absent for a tag-only
38
+ * comment, whose tags still populate the doc fields below.
39
+ */
36
40
  get module_comment(): string | undefined;
41
+ get deprecated_message(): string | undefined;
42
+ /**
43
+ * Internal-API marker from the module comment's `@internal` tag. Presence
44
+ * means the tag was written; an empty string is a bare tag.
45
+ */
46
+ get internal_message(): string | undefined;
47
+ get since(): string | undefined;
48
+ get examples(): NonNullable<ModuleJsonInput['examples']>;
49
+ get see_also(): NonNullable<ModuleJsonInput['seeAlso']>;
50
+ get is_deprecated(): boolean;
51
+ get is_internal(): boolean;
37
52
  /**
38
53
  * Array of `Declaration` instances. Filters out default exports.
39
54
  */
@@ -58,7 +73,12 @@ export declare class Module {
58
73
  * filter in `declarations`).
59
74
  */
60
75
  get has_declarations(): boolean;
61
- get has_module_comment(): boolean;
76
+ /**
77
+ * Whether the module comment documents anything — prose or any doc field.
78
+ * A tag-only comment (just `@see`, say) has no `module_comment` but still
79
+ * counts.
80
+ */
81
+ get has_module_doc(): boolean;
62
82
  /**
63
83
  * Modules this imports (paths relative to src/lib).
64
84
  */
@@ -1 +1 @@
1
- {"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EACzB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAwBnD;;;;;;;;;;;GAWG;AACH,qBAAa,MAAM;;IAClB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAK1C,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAiB;IAEtD;;;;;;;;;;OAUG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAID;;OAEG;IACH,IAAI,YAAY,IAAI,KAAK,CAAC,WAAW,CAAC,CAIrC;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED;;;;;OAKG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EAAE,eAAe;IAK1D;;OAEG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAG9D"}
@@ -57,9 +57,40 @@ export class Module {
57
57
  get path_import() {
58
58
  return './' + this.path;
59
59
  }
60
+ /**
61
+ * Prose of the `@module` comment, tag lines removed. Absent for a tag-only
62
+ * comment, whose tags still populate the doc fields below.
63
+ */
60
64
  get module_comment() {
61
65
  return this.module_json.moduleComment;
62
66
  }
67
+ get deprecated_message() {
68
+ return this.module_json.deprecatedMessage;
69
+ }
70
+ /**
71
+ * Internal-API marker from the module comment's `@internal` tag. Presence
72
+ * means the tag was written; an empty string is a bare tag.
73
+ */
74
+ get internal_message() {
75
+ return this.module_json.internalMessage;
76
+ }
77
+ get since() {
78
+ return this.module_json.since;
79
+ }
80
+ get examples() {
81
+ return this.module_json.examples ?? EMPTY_ARRAY;
82
+ }
83
+ get see_also() {
84
+ return this.module_json.seeAlso ?? EMPTY_ARRAY;
85
+ }
86
+ // presence, not truthiness — a bare `@deprecated` (no message text) arrives as `''`
87
+ get is_deprecated() {
88
+ return this.deprecated_message !== undefined;
89
+ }
90
+ // presence, not truthiness — a bare `@internal` (no message text) arrives as `''`
91
+ get is_internal() {
92
+ return this.internal_message !== undefined;
93
+ }
63
94
  #declarations;
64
95
  /**
65
96
  * Array of `Declaration` instances. Filters out default exports.
@@ -99,8 +130,18 @@ export class Module {
99
130
  get has_declarations() {
100
131
  return this.declarations.length > 0;
101
132
  }
102
- get has_module_comment() {
103
- return !!this.module_comment;
133
+ /**
134
+ * Whether the module comment documents anything — prose or any doc field.
135
+ * A tag-only comment (just `@see`, say) has no `module_comment` but still
136
+ * counts.
137
+ */
138
+ get has_module_doc() {
139
+ return (!!this.module_comment ||
140
+ this.is_deprecated ||
141
+ this.is_internal ||
142
+ !!this.since ||
143
+ this.examples.length > 0 ||
144
+ this.see_also.length > 0);
104
145
  }
105
146
  /**
106
147
  * Modules this imports (paths relative to src/lib).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.218.0",
3
+ "version": "0.220.0",
4
4
  "description": "Svelte UI library",
5
5
  "tagline": "friendly user zystem",
6
6
  "glyph": "🧶",
@@ -64,7 +64,7 @@
64
64
  "@changesets/changelog-git": "^0.2.1",
65
65
  "@fuzdev/blake3-wasm": "^0.2.0",
66
66
  "@fuzdev/fuz_code": "^0.54.0",
67
- "@fuzdev/fuz_css": "^0.70.0",
67
+ "@fuzdev/fuz_css": "^0.71.0",
68
68
  "@fuzdev/fuz_schema": "^0.5.0",
69
69
  "@fuzdev/fuz_util": "^0.77.0",
70
70
  "@fuzdev/gro": "^0.220.0",
@@ -82,7 +82,7 @@
82
82
  "jsdom": "^29.1.1",
83
83
  "svelte": "^5.57.2",
84
84
  "svelte-check": "^4.7.6",
85
- "svelte-docinfo": "^0.13.0",
85
+ "svelte-docinfo": "^0.16.0",
86
86
  "tslib": "^2.8.1",
87
87
  "typescript": "^6.0.3",
88
88
  "typescript-eslint": "^8.71.1",
@@ -4,6 +4,7 @@ import type {
4
4
  MemberJsonInput,
5
5
  ParameterJsonInput,
6
6
  ComponentPropJsonInput,
7
+ ComponentCssPropertyJsonInput,
7
8
  OverloadJsonInput,
8
9
  Reactivity,
9
10
  TypeJson
@@ -251,6 +252,19 @@ export class Declaration {
251
252
  return field<boolean>(this.declaration_json, 'mergedValue');
252
253
  }
253
254
 
255
+ /**
256
+ * The component's styling API: CSS custom properties its styles read with
257
+ * a `var()` fallback, plus any its doc comment documents with `@cssprop`
258
+ * tags (`documented`), the documented ones first.
259
+ * Present on `component` kind only.
260
+ */
261
+ get css_custom_properties(): Array<ComponentCssPropertyJsonInput> | undefined {
262
+ return field<Array<ComponentCssPropertyJsonInput>>(
263
+ this.declaration_json,
264
+ 'cssCustomProperties'
265
+ );
266
+ }
267
+
254
268
  /**
255
269
  * Whether a component accepts children via props or template usage.
256
270
  * Present on `component` kind only.
@@ -8,3 +8,34 @@ export const render_value_to_string = (value: unknown): string => {
8
8
  if (type === 'object') return JSON.stringify(value);
9
9
  return value + ''; // eslint-disable-line @typescript-eslint/no-base-to-string
10
10
  };
11
+
12
+ /**
13
+ * Strips the whitespace prefix that a CSS custom property's multi-line
14
+ * `fallback` shares across its continuation lines, so a value broken over
15
+ * several stylesheet lines renders without the stylesheet's indentation.
16
+ * Line endings normalize to `\n`, and whitespace-only lines become empty.
17
+ *
18
+ * @param fallback - the verbatim fallback source text
19
+ * @returns the fallback with its continuation lines dedented
20
+ */
21
+ export const dedent_css_fallback = (fallback: string): string => {
22
+ const lines = fallback.split(/\r?\n/);
23
+ if (lines.length === 1) return fallback;
24
+ // svelte-docinfo trims the fallback, so the first line's original column is
25
+ // lost — it stays as-is, and only the continuation lines are compared
26
+ let prefix: string | undefined;
27
+ for (let i = 1; i < lines.length; i++) {
28
+ const line = lines[i]!;
29
+ if (!line.trim()) continue;
30
+ const leading = /^[ \t]*/.exec(line)![0];
31
+ if (prefix === undefined) {
32
+ prefix = leading;
33
+ } else {
34
+ let j = 0;
35
+ while (j < prefix.length && j < leading.length && prefix[j] === leading[j]) j++;
36
+ prefix = prefix.slice(0, j);
37
+ }
38
+ }
39
+ const width = prefix?.length ?? 0;
40
+ return lines.map((line, i) => (i === 0 ? line : line.trim() ? line.slice(width) : '')).join('\n');
41
+ };
@@ -72,10 +72,48 @@ export class Module {
72
72
  return './' + this.path;
73
73
  }
74
74
 
75
+ /**
76
+ * Prose of the `@module` comment, tag lines removed. Absent for a tag-only
77
+ * comment, whose tags still populate the doc fields below.
78
+ */
75
79
  get module_comment(): string | undefined {
76
80
  return this.module_json.moduleComment;
77
81
  }
78
82
 
83
+ get deprecated_message(): string | undefined {
84
+ return this.module_json.deprecatedMessage;
85
+ }
86
+
87
+ /**
88
+ * Internal-API marker from the module comment's `@internal` tag. Presence
89
+ * means the tag was written; an empty string is a bare tag.
90
+ */
91
+ get internal_message(): string | undefined {
92
+ return this.module_json.internalMessage;
93
+ }
94
+
95
+ get since(): string | undefined {
96
+ return this.module_json.since;
97
+ }
98
+
99
+ get examples(): NonNullable<ModuleJsonInput['examples']> {
100
+ return this.module_json.examples ?? EMPTY_ARRAY;
101
+ }
102
+
103
+ get see_also(): NonNullable<ModuleJsonInput['seeAlso']> {
104
+ return this.module_json.seeAlso ?? EMPTY_ARRAY;
105
+ }
106
+
107
+ // presence, not truthiness — a bare `@deprecated` (no message text) arrives as `''`
108
+ get is_deprecated(): boolean {
109
+ return this.deprecated_message !== undefined;
110
+ }
111
+
112
+ // presence, not truthiness — a bare `@internal` (no message text) arrives as `''`
113
+ get is_internal(): boolean {
114
+ return this.internal_message !== undefined;
115
+ }
116
+
79
117
  #declarations: Array<Declaration> | undefined;
80
118
 
81
119
  /**
@@ -121,8 +159,20 @@ export class Module {
121
159
  return this.declarations.length > 0;
122
160
  }
123
161
 
124
- get has_module_comment(): boolean {
125
- return !!this.module_comment;
162
+ /**
163
+ * Whether the module comment documents anything — prose or any doc field.
164
+ * A tag-only comment (just `@see`, say) has no `module_comment` but still
165
+ * counts.
166
+ */
167
+ get has_module_doc(): boolean {
168
+ return (
169
+ !!this.module_comment ||
170
+ this.is_deprecated ||
171
+ this.is_internal ||
172
+ !!this.since ||
173
+ this.examples.length > 0 ||
174
+ this.see_also.length > 0
175
+ );
126
176
  }
127
177
 
128
178
  /**