@fuzdev/fuz_ui 0.219.0 → 0.221.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Card.svelte +7 -0
- package/dist/Card.svelte.d.ts +5 -0
- package/dist/Card.svelte.d.ts.map +1 -1
- package/dist/ContextmenuMenu.svelte +16 -8
- package/dist/ContextmenuMenu.svelte.d.ts +14 -0
- package/dist/ContextmenuMenu.svelte.d.ts.map +1 -1
- package/dist/DeclarationDetail.svelte +73 -1
- package/dist/DeclarationDetail.svelte.d.ts +2 -1
- package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
- package/dist/Dialog.svelte +16 -15
- package/dist/Dialog.svelte.d.ts +14 -0
- package/dist/Dialog.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +1 -0
- package/dist/LibraryDetail.svelte.d.ts +1 -0
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/LibrarySummary.svelte +5 -0
- package/dist/LibrarySummary.svelte.d.ts +1 -0
- package/dist/LibrarySummary.svelte.d.ts.map +1 -1
- package/dist/PendingAnimation.svelte +9 -0
- package/dist/PendingAnimation.svelte.d.ts +7 -0
- package/dist/PendingAnimation.svelte.d.ts.map +1 -1
- package/dist/Sparkline.svelte +17 -21
- package/dist/Sparkline.svelte.d.ts +15 -0
- package/dist/Sparkline.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.d.ts +9 -1
- package/dist/declaration.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.js +10 -0
- package/dist/helpers.d.ts +10 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +34 -0
- package/dist/logos.d.ts +8 -0
- package/dist/logos.d.ts.map +1 -1
- package/dist/logos.js +10 -0
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js +2 -1
- package/package.json +13 -13
- package/src/lib/declaration.svelte.ts +15 -0
- package/src/lib/helpers.ts +31 -0
- package/src/lib/logos.ts +11 -0
- package/src/lib/projects.ts +2 -0
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';
|
package/dist/Card.svelte.d.ts
CHANGED
|
@@ -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,AAFwB,uEAAuE;AAE/F,cAAc,CAAC,WAAW,CAAC,GAAG;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,qBAAqB,GAAG,SAAS,CAAC;IAC9C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAC/B,gFAAgF;IAChF,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;
|
|
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,AAFwB,uEAAuE;AAE/F,cAAc,CAAC,WAAW,CAAC,GAAG;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,qBAAqB,GAAG,SAAS,CAAC;IAC9C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAC/B,gFAAgF;IAChF,OAAO,CAAC,EAAE,kBAAkB,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;
|
|
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;AAI5E,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtD,OAAO,EA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AAO,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,
|
|
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,20 @@ 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 or an
|
|
46
|
+
// `@property` rule, which only distinguishes anything when the list also
|
|
47
|
+
// has `@cssprop`-documented ones
|
|
48
|
+
const css_property_chips_shown = $derived.by(() => {
|
|
49
|
+
const css_properties = declaration.css_custom_properties;
|
|
50
|
+
if (!css_properties) return false;
|
|
51
|
+
return css_properties.some((p) => p.documented) && css_properties.some((p) => !p.documented);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// a documented `default` (the tag's claim) and the style's `fallback` are
|
|
55
|
+
// shown as one row when they agree, as the analyzer compares them
|
|
56
|
+
const css_values_agree = (a: string, b: string): boolean =>
|
|
57
|
+
a.replace(/\s+/g, ' ').trim() === b.replace(/\s+/g, ' ').trim();
|
|
58
|
+
|
|
43
59
|
// render mdz inline `code` as API-linking `DocsLink` and fenced blocks as syntax-highlighted
|
|
44
60
|
// `Code`, matching the rest of the docs — the injection mdz core leaves open
|
|
45
61
|
mdz_set_context_with_fallback(mdz_code_context, () => DocsLink);
|
|
@@ -318,6 +334,62 @@ including parameters, props, members, overloads, external types, and more.
|
|
|
318
334
|
</section>
|
|
319
335
|
{/if}
|
|
320
336
|
|
|
337
|
+
<!-- CSS custom properties (for Svelte components): the styling API a
|
|
338
|
+
consumer sets on the component or an ancestor; `documented` entries come
|
|
339
|
+
from `@cssprop` tags and arrive first, the rest are inferred from `var()`
|
|
340
|
+
fallbacks and `@property` rules in the component's styles, marked only when
|
|
341
|
+
the list mixes both -->
|
|
342
|
+
{#if declaration.css_custom_properties?.length}
|
|
343
|
+
<section>
|
|
344
|
+
<h4>CSS custom properties</h4>
|
|
345
|
+
{#if css_property_chips_shown}
|
|
346
|
+
<p>
|
|
347
|
+
Properties marked <span class="chip">inferred</span> are found by their <code>var()</code>
|
|
348
|
+
fallback or <code>@property</code> rule, not documented with <code>@cssprop</code>.
|
|
349
|
+
</p>
|
|
350
|
+
{/if}
|
|
351
|
+
{#each declaration.css_custom_properties as css_property (css_property.name)}
|
|
352
|
+
<section>
|
|
353
|
+
<div class="row gap_md">
|
|
354
|
+
<h5><code>{css_property.name}</code></h5>
|
|
355
|
+
{#if css_property_chips_shown && !css_property.documented}
|
|
356
|
+
<span class="chip">inferred</span>
|
|
357
|
+
{/if}
|
|
358
|
+
</div>
|
|
359
|
+
{#if css_property.description}
|
|
360
|
+
<Mdz content={css_property.description} />
|
|
361
|
+
{/if}
|
|
362
|
+
{#if css_property.syntax}
|
|
363
|
+
<div class="row gap_md mb_sm">
|
|
364
|
+
<strong>syntax</strong>
|
|
365
|
+
<code>{css_property.syntax}</code>
|
|
366
|
+
</div>
|
|
367
|
+
{/if}
|
|
368
|
+
{#if css_property.default !== undefined}
|
|
369
|
+
<div class="row gap_md">
|
|
370
|
+
<strong>default</strong>
|
|
371
|
+
<Code lang="css" content={dedent_css_fallback(css_property.default)} wrap />
|
|
372
|
+
</div>
|
|
373
|
+
{/if}
|
|
374
|
+
{#if css_property.fallback !== undefined &&
|
|
375
|
+
(css_property.default === undefined ||
|
|
376
|
+
!css_values_agree(css_property.default, css_property.fallback))
|
|
377
|
+
}
|
|
378
|
+
<div class="row gap_md">
|
|
379
|
+
<strong>fallback</strong>
|
|
380
|
+
{#if css_property.fallback}
|
|
381
|
+
<Code lang="css" content={dedent_css_fallback(css_property.fallback)} wrap />
|
|
382
|
+
{:else}
|
|
383
|
+
<!-- `var(--a,)`, a fallback of nothing -->
|
|
384
|
+
<span>empty</span>
|
|
385
|
+
{/if}
|
|
386
|
+
</div>
|
|
387
|
+
{/if}
|
|
388
|
+
</section>
|
|
389
|
+
{/each}
|
|
390
|
+
</section>
|
|
391
|
+
{/if}
|
|
392
|
+
|
|
321
393
|
<!-- overloads -->
|
|
322
394
|
{#if declaration.overloads?.length}
|
|
323
395
|
<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,
|
|
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;
|
|
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;AA+kBvD;;;;;;;;;GASG;AACH,QAAA,MAAM,iBAAiB,sDAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
package/dist/Dialog.svelte
CHANGED
|
@@ -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',
|
package/dist/Dialog.svelte.d.ts
CHANGED
|
@@ -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,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAElF,KAAK,gBAAgB,GAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG;IACrF;;;;;;;;OAQG;IACH,IAAI,CAAC,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;
|
|
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,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAElF,KAAK,gBAAgB,GAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG;IACrF;;;;;;;;OAQG;IACH,IAAI,CAAC,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,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,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
|
|
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,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,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"}
|
|
@@ -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;
|
|
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;
|
|
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"}
|
package/dist/Sparkline.svelte
CHANGED
|
@@ -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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
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,14 @@ 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 or register with `@property`, plus any its doc comment
|
|
110
|
+
* documents with `@cssprop` tags (`documented`), the documented ones first.
|
|
111
|
+
* A documented entry carries the tag's `default` beside the style's
|
|
112
|
+
* `fallback`. Present on `component` kind only.
|
|
113
|
+
*/
|
|
114
|
+
get css_custom_properties(): Array<ComponentCssPropertyJsonInput> | undefined;
|
|
107
115
|
/**
|
|
108
116
|
* Whether a component accepts children via props or template usage.
|
|
109
117
|
* 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,oBA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AAqB,IAAI,KAAK,CAAC,6BAA6B,CAAC,GAAG,SAAS,CAK5E;IAED;;;OAGG;IACH,IAAI,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAE1C;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,KAAK,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAEpD;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAE9C;IAED;;;;OAIG;IACH,IAAI,kBAAkB,IAAI,oBAAoB,CAAC,kBAAkB,CAAC,CAEjE;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAE7C;IAED;;;;OAIG;IACH,IAAI,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAEzC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAEvC;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;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,16 @@ 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 or register with `@property`, plus any its doc comment
|
|
199
|
+
* documents with `@cssprop` tags (`documented`), the documented ones first.
|
|
200
|
+
* A documented entry carries the tag's `default` beside the style's
|
|
201
|
+
* `fallback`. Present on `component` kind only.
|
|
202
|
+
*/
|
|
203
|
+
get css_custom_properties() {
|
|
204
|
+
return field(this.declaration_json, 'cssCustomProperties');
|
|
205
|
+
}
|
|
196
206
|
/**
|
|
197
207
|
* Whether a component accepts children via props or template usage.
|
|
198
208
|
* 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
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -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
|
+
};
|
package/dist/logos.d.ts
CHANGED
|
@@ -69,6 +69,14 @@ export declare const logo_svelte_docinfo: {
|
|
|
69
69
|
d: string;
|
|
70
70
|
}[];
|
|
71
71
|
};
|
|
72
|
+
export declare const logo_mdz: {
|
|
73
|
+
label: string;
|
|
74
|
+
fill: string;
|
|
75
|
+
paths: {
|
|
76
|
+
'fill-rule': "evenodd";
|
|
77
|
+
d: string;
|
|
78
|
+
}[];
|
|
79
|
+
};
|
|
72
80
|
export declare const logo_fuz_template: {
|
|
73
81
|
label: string;
|
|
74
82
|
fill: string;
|
package/dist/logos.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/logos.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,QAAQ;;;;;;CAgCF,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;CAIN,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;;CAKN,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;CAIL,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,cAAc;;;;;;CAIR,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,mBAAmB;;;;;;CAQb,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;CAQX,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAwBP,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAQP,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;;;;CAWL,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC"}
|
|
1
|
+
{"version":3,"file":"logos.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/logos.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,QAAQ;;;;;;CAgCF,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;CAIN,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;;CAKN,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;CAIL,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,cAAc;;;;;;CAIR,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,mBAAmB;;;;;;CAQb,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;;CASF,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;CAQX,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAwBP,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAQP,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;;;;CAWL,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC"}
|
package/dist/logos.js
CHANGED
|
@@ -104,6 +104,16 @@ export const logo_svelte_docinfo = {
|
|
|
104
104
|
}
|
|
105
105
|
]
|
|
106
106
|
};
|
|
107
|
+
export const logo_mdz = {
|
|
108
|
+
label: 'a purple pen nib hovering over an inkwell with a glint of light',
|
|
109
|
+
fill: '#8866cc',
|
|
110
|
+
paths: [
|
|
111
|
+
{
|
|
112
|
+
'fill-rule': 'evenodd',
|
|
113
|
+
d: 'M36.05 40.56H61.35Q64.27 40.56 64.27 43.48V48.35H59.4V56.13L71.08 56.13Q80.81 56.13 82.76 65.86Q86.26 76.56 86.65 87.27Q87.62 97 77.89 97H19.51Q9.78 97 10.76 87.27Q11.14 76.56 14.65 65.86Q16.59 56.13 26.32 56.13L38 56.13V48.35H33.13V43.48Q33.13 40.56 36.05 40.56ZM23.04 64.89Q17.76 76.56 19.37 89.21L24.23 89.21Q22.55 77.54 26.71 65.86ZM53.57 35.7L64.72 12.36L79.22 2.99L90.22 16.12L78.49 28.77ZM67.95 22.37L55.4 32.9L56.64 34.37L69.2 23.85ZM67.78 21.25a2.99 2.99 0 1 1 6 0a2.99 2.99 0 1 1 -6 0Z'
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
};
|
|
107
117
|
export const logo_fuz_template = {
|
|
108
118
|
label: 'a friendly orange pixelated spider facing you',
|
|
109
119
|
fill: '#f4672f',
|
package/dist/projects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAmBxC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,WAAW,CAc5C,CAAC"}
|
package/dist/projects.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
// TODO when fuz.dev is ready
|
|
3
3
|
// logo_fuz,
|
|
4
|
-
logo_fuz_ui, logo_fuz_code, logo_fuz_blog, logo_fuz_repos, logo_fuz_template, logo_fuz_css, logo_fuz_util, logo_fuz_host, logo_gro, logo_svelte_docinfo, logo_fuz_app, logo_tsv } from './logos.js';
|
|
4
|
+
logo_fuz_ui, logo_fuz_code, logo_mdz, logo_fuz_blog, logo_fuz_repos, logo_fuz_template, logo_fuz_css, logo_fuz_util, logo_fuz_host, logo_gro, logo_svelte_docinfo, logo_fuz_app, logo_tsv } from './logos.js';
|
|
5
5
|
// TODO ideally this wouldn't duplicate metadata like descriptions, but adding fuz_repos to this repo is heavy
|
|
6
6
|
// prettier-ignore
|
|
7
7
|
export const project_items = [
|
|
@@ -11,6 +11,7 @@ export const project_items = [
|
|
|
11
11
|
{ name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a web app template with TypeScript + SvelteKit + optional Rust for the fuz-stack', glyph: '❄', color_class: 'color_h_50' },
|
|
12
12
|
{ name: 'fuz_blog', url: 'https://blog.fuz.dev/', logo: logo_fuz_blog, description: 'blog software from scratch with SvelteKit', glyph: '🖊️', color_class: 'color_e_50' },
|
|
13
13
|
{ name: 'fuz_code', url: 'https://code.fuz.dev/', logo: logo_fuz_code, description: 'syntax styling utilities and components for TypeScript, Svelte, Markdown, and more', glyph: '🎨', color_class: 'color_g_50' },
|
|
14
|
+
{ name: 'mdz', url: 'https://mdz.fuz.dev/', logo: logo_mdz, description: 'a strict markdown dialect built for streaming, Svelte authoring, docs websites, and untrusted content', glyph: '📝', color_class: 'color_d_50' },
|
|
14
15
|
{ name: 'fuz_repos', url: 'https://repos.fuz.dev/', logo: logo_fuz_repos, description: 'a tool for managing many repos', glyph: '🪄', color_class: 'color_a_50' },
|
|
15
16
|
{ name: 'svelte-docinfo', url: 'https://svelte-docinfo.fuz.dev/', logo: logo_svelte_docinfo, description: 'static analysis for TypeScript and Svelte', glyph: '📜', color_class: 'color_i_50' },
|
|
16
17
|
{ name: 'fuz_util', url: 'https://util.fuz.dev/', logo: logo_fuz_util, description: 'utility belt for JS', glyph: '🦕', color_class: 'color_f_50' },
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.221.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
7
7
|
"logo": "logo.svg",
|
|
8
|
-
"logo_alt": "a friendly
|
|
8
|
+
"logo_alt": "a friendly red spider facing you",
|
|
9
9
|
"license": "0BSD",
|
|
10
10
|
"homepage": "https://ui.fuz.dev/",
|
|
11
11
|
"author": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"node": ">=24.14"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@fuzdev/fuz_code": ">=0.
|
|
41
|
-
"@fuzdev/fuz_css": ">=0.
|
|
42
|
-
"@fuzdev/fuz_util": ">=0.
|
|
43
|
-
"@fuzdev/gro": ">=0.
|
|
44
|
-
"@fuzdev/mdz": ">=0.
|
|
40
|
+
"@fuzdev/fuz_code": ">=0.56.0",
|
|
41
|
+
"@fuzdev/fuz_css": ">=0.72.0",
|
|
42
|
+
"@fuzdev/fuz_util": ">=0.79.0",
|
|
43
|
+
"@fuzdev/gro": ">=0.223.0",
|
|
44
|
+
"@fuzdev/mdz": ">=0.7.0",
|
|
45
45
|
"@sveltejs/kit": "^3",
|
|
46
46
|
"esm-env": "^1",
|
|
47
47
|
"svelte": "^5"
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@changesets/changelog-git": "^0.2.1",
|
|
65
65
|
"@fuzdev/blake3-wasm": "^0.2.0",
|
|
66
|
-
"@fuzdev/fuz_code": "^0.
|
|
67
|
-
"@fuzdev/fuz_css": "^0.
|
|
66
|
+
"@fuzdev/fuz_code": "^0.56.0",
|
|
67
|
+
"@fuzdev/fuz_css": "^0.72.0",
|
|
68
68
|
"@fuzdev/fuz_schema": "^0.5.0",
|
|
69
|
-
"@fuzdev/fuz_util": "^0.
|
|
70
|
-
"@fuzdev/gro": "^0.
|
|
71
|
-
"@fuzdev/mdz": "^0.
|
|
69
|
+
"@fuzdev/fuz_util": "^0.79.0",
|
|
70
|
+
"@fuzdev/gro": "^0.223.0",
|
|
71
|
+
"@fuzdev/mdz": "^0.7.0",
|
|
72
72
|
"@ryanatkn/eslint-config": "^0.13.1",
|
|
73
73
|
"@sveltejs/adapter-static": "^4.0.0",
|
|
74
74
|
"@sveltejs/kit": "^3.0.1",
|
|
@@ -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.
|
|
85
|
+
"svelte-docinfo": "^0.17.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,20 @@ 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 or register with `@property`, plus any its doc comment
|
|
258
|
+
* documents with `@cssprop` tags (`documented`), the documented ones first.
|
|
259
|
+
* A documented entry carries the tag's `default` beside the style's
|
|
260
|
+
* `fallback`. Present on `component` kind only.
|
|
261
|
+
*/
|
|
262
|
+
get css_custom_properties(): Array<ComponentCssPropertyJsonInput> | undefined {
|
|
263
|
+
return field<Array<ComponentCssPropertyJsonInput>>(
|
|
264
|
+
this.declaration_json,
|
|
265
|
+
'cssCustomProperties'
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
254
269
|
/**
|
|
255
270
|
* Whether a component accepts children via props or template usage.
|
|
256
271
|
* Present on `component` kind only.
|
package/src/lib/helpers.ts
CHANGED
|
@@ -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
|
+
};
|
package/src/lib/logos.ts
CHANGED
|
@@ -118,6 +118,17 @@ export const logo_svelte_docinfo = {
|
|
|
118
118
|
]
|
|
119
119
|
} satisfies SvgData;
|
|
120
120
|
|
|
121
|
+
export const logo_mdz = {
|
|
122
|
+
label: 'a purple pen nib hovering over an inkwell with a glint of light',
|
|
123
|
+
fill: '#8866cc',
|
|
124
|
+
paths: [
|
|
125
|
+
{
|
|
126
|
+
'fill-rule': 'evenodd',
|
|
127
|
+
d: 'M36.05 40.56H61.35Q64.27 40.56 64.27 43.48V48.35H59.4V56.13L71.08 56.13Q80.81 56.13 82.76 65.86Q86.26 76.56 86.65 87.27Q87.62 97 77.89 97H19.51Q9.78 97 10.76 87.27Q11.14 76.56 14.65 65.86Q16.59 56.13 26.32 56.13L38 56.13V48.35H33.13V43.48Q33.13 40.56 36.05 40.56ZM23.04 64.89Q17.76 76.56 19.37 89.21L24.23 89.21Q22.55 77.54 26.71 65.86ZM53.57 35.7L64.72 12.36L79.22 2.99L90.22 16.12L78.49 28.77ZM67.95 22.37L55.4 32.9L56.64 34.37L69.2 23.85ZM67.78 21.25a2.99 2.99 0 1 1 6 0a2.99 2.99 0 1 1 -6 0Z'
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
} satisfies SvgData;
|
|
131
|
+
|
|
121
132
|
export const logo_fuz_template = {
|
|
122
133
|
label: 'a friendly orange pixelated spider facing you',
|
|
123
134
|
fill: '#f4672f',
|
package/src/lib/projects.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
// logo_fuz,
|
|
5
5
|
logo_fuz_ui,
|
|
6
6
|
logo_fuz_code,
|
|
7
|
+
logo_mdz,
|
|
7
8
|
logo_fuz_blog,
|
|
8
9
|
logo_fuz_repos,
|
|
9
10
|
logo_fuz_template,
|
|
@@ -37,6 +38,7 @@ export const project_items: Array<ProjectItem> = [
|
|
|
37
38
|
{name: 'fuz_template', url: 'https://template.fuz.dev/', logo: logo_fuz_template, description: 'a web app template with TypeScript + SvelteKit + optional Rust for the fuz-stack', glyph: '❄', color_class: 'color_h_50'},
|
|
38
39
|
{name: 'fuz_blog', url: 'https://blog.fuz.dev/', logo: logo_fuz_blog, description: 'blog software from scratch with SvelteKit', glyph: '🖊️', color_class: 'color_e_50'},
|
|
39
40
|
{name: 'fuz_code', url: 'https://code.fuz.dev/', logo: logo_fuz_code, description: 'syntax styling utilities and components for TypeScript, Svelte, Markdown, and more', glyph: '🎨', color_class: 'color_g_50'},
|
|
41
|
+
{name: 'mdz', url: 'https://mdz.fuz.dev/', logo: logo_mdz, description: 'a strict markdown dialect built for streaming, Svelte authoring, docs websites, and untrusted content', glyph: '📝', color_class: 'color_d_50'},
|
|
40
42
|
{name: 'fuz_repos', url: 'https://repos.fuz.dev/', logo: logo_fuz_repos, description: 'a tool for managing many repos', glyph: '🪄', color_class: 'color_a_50'},
|
|
41
43
|
{name: 'svelte-docinfo', url: 'https://svelte-docinfo.fuz.dev/', logo: logo_svelte_docinfo, description: 'static analysis for TypeScript and Svelte', glyph: '📜', color_class: 'color_i_50'},
|
|
42
44
|
{name: 'fuz_util', url: 'https://util.fuz.dev/', logo: logo_fuz_util, description: 'utility belt for JS', glyph: '🦕', color_class: 'color_f_50'},
|