@fuzdev/fuz_ui 0.203.1 → 0.204.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/Alert.svelte +31 -17
- package/dist/Alert.svelte.d.ts +8 -2
- package/dist/Alert.svelte.d.ts.map +1 -1
- package/dist/Card.svelte +28 -10
- package/dist/Card.svelte.d.ts +7 -2
- package/dist/Card.svelte.d.ts.map +1 -1
- package/dist/CopyToClipboard.svelte +5 -1
- package/dist/CopyToClipboard.svelte.d.ts.map +1 -1
- package/dist/DocsLink.svelte +15 -4
- package/dist/DocsLink.svelte.d.ts +8 -1
- package/dist/DocsLink.svelte.d.ts.map +1 -1
- package/dist/DocsMenu.svelte +1 -1
- package/dist/DocsPageLinks.svelte +1 -1
- package/dist/EcosystemLinks.svelte +5 -2
- package/dist/EcosystemLinks.svelte.d.ts +2 -1
- package/dist/EcosystemLinks.svelte.d.ts.map +1 -1
- package/dist/EcosystemLinksPanel.svelte +4 -2
- package/dist/EcosystemLinksPanel.svelte.d.ts +2 -1
- package/dist/EcosystemLinksPanel.svelte.d.ts.map +1 -1
- package/dist/Hashlink.svelte +1 -1
- package/dist/ImgOrSvg.svelte +6 -5
- package/dist/ImgOrSvg.svelte.d.ts +2 -1
- package/dist/ImgOrSvg.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +5 -2
- package/dist/LibraryDetail.svelte.d.ts +3 -1
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/LibrarySummary.svelte +4 -2
- package/dist/LibrarySummary.svelte.d.ts +2 -1
- package/dist/LibrarySummary.svelte.d.ts.map +1 -1
- package/dist/PasteFromClipboard.svelte +3 -1
- package/dist/PasteFromClipboard.svelte.d.ts.map +1 -1
- package/dist/PendingButton.svelte +0 -2
- package/dist/PendingButton.svelte.d.ts.map +1 -1
- package/dist/StyleVariableButton.svelte +5 -1
- package/dist/StyleVariableButton.svelte.d.ts.map +1 -1
- package/dist/Svg.svelte +1 -1
- package/dist/TomeContent.svelte +5 -2
- package/dist/TomeContent.svelte.d.ts +2 -1
- package/dist/TomeContent.svelte.d.ts.map +1 -1
- package/dist/TypeLink.svelte +13 -4
- package/dist/TypeLink.svelte.d.ts +7 -1
- package/dist/TypeLink.svelte.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/Alert.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type {Snippet} from 'svelte';
|
|
3
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
|
+
import type {HTMLAttributes, SvelteHTMLElements} from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
import {alert_status_options, type AlertStatus} from './alert.js';
|
|
6
6
|
|
|
@@ -18,21 +18,28 @@
|
|
|
18
18
|
onclick,
|
|
19
19
|
disabled,
|
|
20
20
|
icon,
|
|
21
|
+
button_attrs,
|
|
22
|
+
div_attrs,
|
|
21
23
|
children,
|
|
22
24
|
...rest
|
|
23
|
-
}:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
}: // generic element attrs, the common denominator of the rendered roots -
|
|
26
|
+
// branch-specific attributes go in `button_attrs`/`div_attrs`
|
|
27
|
+
HTMLAttributes<HTMLElement> & {
|
|
28
|
+
status?: AlertStatus;
|
|
29
|
+
color?: string;
|
|
30
|
+
// TODO maybe an explicit `AlertButton` is better,
|
|
31
|
+
// or rethink the design because `role="alert"` can't be put on buttons -
|
|
32
|
+
// `disabled` and `button_attrs` only make sense when `onclick` is defined
|
|
33
|
+
/** Renders the alert as a `<button>` when provided. */
|
|
34
|
+
onclick?: (() => void) | undefined;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
icon?: string | Snippet<[icon: string]> | null | undefined; // TODO experimenting with this, gets complex in the impl
|
|
37
|
+
/** Button attributes, applied only when `onclick` renders the alert as a `<button>`. */
|
|
38
|
+
button_attrs?: SvelteHTMLElements['button'];
|
|
39
|
+
/** Div attributes, applied only when the alert renders as a `<div>` (no `onclick`). */
|
|
40
|
+
div_attrs?: SvelteHTMLElements['div'];
|
|
41
|
+
children: Snippet;
|
|
42
|
+
} = $props();
|
|
36
43
|
|
|
37
44
|
const options = $derived(alert_status_options[status]);
|
|
38
45
|
// TODO change this to use the hue and put transparency on the borders, or add a borderColor option
|
|
@@ -47,15 +54,22 @@
|
|
|
47
54
|
<button
|
|
48
55
|
type="button"
|
|
49
56
|
{...rest}
|
|
50
|
-
|
|
57
|
+
{...button_attrs}
|
|
58
|
+
class="alert {rest.class} {button_attrs?.class}"
|
|
51
59
|
style:--text_color={final_color}
|
|
52
60
|
{onclick}
|
|
53
|
-
{disabled}
|
|
61
|
+
disabled={disabled ?? button_attrs?.disabled}
|
|
54
62
|
>
|
|
55
63
|
{@render content()}
|
|
56
64
|
</button>
|
|
57
65
|
{:else}
|
|
58
|
-
<div
|
|
66
|
+
<div
|
|
67
|
+
role="alert"
|
|
68
|
+
{...rest}
|
|
69
|
+
{...div_attrs}
|
|
70
|
+
class="alert panel {rest.class} {div_attrs?.class}"
|
|
71
|
+
style:--text_color={final_color}
|
|
72
|
+
>
|
|
59
73
|
{@render content()}
|
|
60
74
|
</div>
|
|
61
75
|
{/if}
|
package/dist/Alert.svelte.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
+
import type { HTMLAttributes, SvelteHTMLElements } from 'svelte/elements';
|
|
3
3
|
import { type AlertStatus } from './alert.js';
|
|
4
|
-
type $$ComponentProps =
|
|
4
|
+
type $$ComponentProps = // generic element attrs, the common denominator of the rendered roots -
|
|
5
|
+
HTMLAttributes<HTMLElement> & {
|
|
5
6
|
status?: AlertStatus;
|
|
6
7
|
color?: string;
|
|
8
|
+
/** Renders the alert as a `<button>` when provided. */
|
|
7
9
|
onclick?: (() => void) | undefined;
|
|
8
10
|
disabled?: boolean;
|
|
9
11
|
icon?: string | Snippet<[icon: string]> | null | undefined;
|
|
12
|
+
/** Button attributes, applied only when `onclick` renders the alert as a `<button>`. */
|
|
13
|
+
button_attrs?: SvelteHTMLElements['button'];
|
|
14
|
+
/** Div attributes, applied only when the alert renders as a `<div>` (no `onclick`). */
|
|
15
|
+
div_attrs?: SvelteHTMLElements['div'];
|
|
10
16
|
children: Snippet;
|
|
11
17
|
};
|
|
12
18
|
declare const Alert: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Alert.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Alert.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAuB,KAAK,WAAW,EAAC,MAAM,YAAY,CAAC;AAEjE,KAAK,gBAAgB,GAErB,AAFyB,wEAAwE;AAEjG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,uDAAuD;IACvD,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,wFAAwF;IACxF,YAAY,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC5C,uFAAuF;IACvF,SAAS,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAkEH,QAAA,MAAM,KAAK,sDAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
|
package/dist/Card.svelte
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {page} from '$app/state';
|
|
3
|
+
import {DEV} from 'esm-env';
|
|
3
4
|
import type {Snippet} from 'svelte';
|
|
4
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
5
|
+
import type {HTMLAttributes, SvelteHTMLElements} from 'svelte/elements';
|
|
5
6
|
|
|
6
7
|
// TODO think through Alert+Card APIs together, one can be a button and the other a link atm
|
|
7
8
|
|
|
@@ -10,20 +11,37 @@
|
|
|
10
11
|
tag,
|
|
11
12
|
align = 'left',
|
|
12
13
|
icon,
|
|
14
|
+
a_attrs,
|
|
13
15
|
children,
|
|
14
16
|
...rest
|
|
15
|
-
}:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
}: // generic element attrs, the common denominator of the rendered roots -
|
|
18
|
+
// branch-specific attributes go in `a_attrs`
|
|
19
|
+
HTMLAttributes<HTMLElement> & {
|
|
20
|
+
/** Renders the card as an `<a>` when provided. */
|
|
21
|
+
href?: string | undefined;
|
|
22
|
+
tag?: string | undefined;
|
|
23
|
+
align?: 'left' | 'right' | 'above' | 'below';
|
|
24
|
+
icon?: string | Snippet;
|
|
25
|
+
/** Anchor attributes, applied only when `href` renders the card as an `<a>`. */
|
|
26
|
+
a_attrs?: SvelteHTMLElements['a'];
|
|
27
|
+
children: Snippet;
|
|
28
|
+
} = $props();
|
|
22
29
|
|
|
23
30
|
const link = $derived(!!href);
|
|
24
31
|
const selected = $derived(link && page.url.pathname === href);
|
|
25
32
|
const final_tag = $derived(tag ?? (link ? 'a' : 'div'));
|
|
26
|
-
const inferred_attrs = $derived(link ? {href} : undefined);
|
|
33
|
+
const inferred_attrs = $derived(link ? {...a_attrs, href} : undefined);
|
|
34
|
+
|
|
35
|
+
if (DEV) {
|
|
36
|
+
$effect(() => {
|
|
37
|
+
if (href && final_tag !== 'a') {
|
|
38
|
+
// eslint-disable-next-line no-console
|
|
39
|
+
console.error(
|
|
40
|
+
`Card received href "${href}" with tag "${final_tag}" - href renders only on an anchor`,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
27
45
|
|
|
28
46
|
const left = $derived(align === 'left');
|
|
29
47
|
const right = $derived(align === 'right');
|
|
@@ -37,7 +55,7 @@
|
|
|
37
55
|
this={final_tag}
|
|
38
56
|
{...rest}
|
|
39
57
|
{...inferred_attrs}
|
|
40
|
-
class="card {rest.class}"
|
|
58
|
+
class="card {rest.class} {inferred_attrs?.class}"
|
|
41
59
|
class:link
|
|
42
60
|
class:selected
|
|
43
61
|
class:left
|
package/dist/Card.svelte.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
-
type $$ComponentProps =
|
|
2
|
+
import type { HTMLAttributes, SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
type $$ComponentProps = // generic element attrs, the common denominator of the rendered roots -
|
|
4
|
+
HTMLAttributes<HTMLElement> & {
|
|
5
|
+
/** Renders the card as an `<a>` when provided. */
|
|
6
|
+
href?: string | undefined;
|
|
4
7
|
tag?: string | undefined;
|
|
5
8
|
align?: 'left' | 'right' | 'above' | 'below';
|
|
6
9
|
icon?: string | Snippet;
|
|
10
|
+
/** Anchor attributes, applied only when `href` renders the card as an `<a>`. */
|
|
11
|
+
a_attrs?: SvelteHTMLElements['a'];
|
|
7
12
|
children: Snippet;
|
|
8
13
|
};
|
|
9
14
|
declare const Card: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Card.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Card.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvE,KAAK,gBAAgB,GAErB,AAFyB,wEAAwE;AAEjG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC7B,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,gFAAgF;IAChF,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAsEH,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
allow_copying_empty_string,
|
|
18
18
|
icon_button = true,
|
|
19
19
|
oncopy,
|
|
20
|
+
onclick,
|
|
20
21
|
disabled: disabled_prop,
|
|
21
22
|
children,
|
|
22
23
|
...rest
|
|
@@ -70,7 +71,10 @@
|
|
|
70
71
|
class:copied
|
|
71
72
|
class:failed
|
|
72
73
|
class:color_c={failed}
|
|
73
|
-
onclick={
|
|
74
|
+
onclick={(e) => {
|
|
75
|
+
onclick?.(e); // before the internal handler, which is async
|
|
76
|
+
void copy(e);
|
|
77
|
+
}}
|
|
74
78
|
disabled={disabled_prop ?? (allow_copying_empty_string ? text === null : !text)}
|
|
75
79
|
>
|
|
76
80
|
{#if children}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/CopyToClipboard.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAMvD,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAC/E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD,CAAC;
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/CopyToClipboard.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAMvD,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAC/E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD,CAAC;AAsEH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
package/dist/DocsLink.svelte
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type {Snippet} from 'svelte';
|
|
3
|
+
import type {HTMLAttributes, SvelteHTMLElements} from 'svelte/elements';
|
|
4
|
+
import type {OmitStrict} from '@fuzdev/fuz_util/types.js';
|
|
3
5
|
|
|
4
6
|
import ModuleLink from './ModuleLink.svelte';
|
|
5
7
|
import DeclarationLink from './DeclarationLink.svelte';
|
|
@@ -11,12 +13,21 @@
|
|
|
11
13
|
reference,
|
|
12
14
|
hash,
|
|
13
15
|
display_text,
|
|
16
|
+
a_attrs,
|
|
17
|
+
code_attrs,
|
|
14
18
|
children: children_prop,
|
|
15
|
-
|
|
19
|
+
...rest
|
|
20
|
+
}: // generic element attrs, the common denominator of the rendered roots -
|
|
21
|
+
// assignable to the anchor rest of `DeclarationLink`/`ModuleLink` and exact for `<code>`
|
|
22
|
+
OmitStrict<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
16
23
|
reference: string;
|
|
17
24
|
/** URL fragment to append, with or without the `#`. */
|
|
18
25
|
hash?: string;
|
|
19
26
|
display_text?: string | null;
|
|
27
|
+
/** Anchor attributes, applied only when the reference resolves to a declaration or module link. */
|
|
28
|
+
a_attrs?: SvelteHTMLElements['a'];
|
|
29
|
+
/** Code attributes, applied only to the fallback `<code>` when the reference doesn't resolve. */
|
|
30
|
+
code_attrs?: SvelteHTMLElements['code'];
|
|
20
31
|
children?: Snippet<[Declaration | undefined, Module | undefined]>;
|
|
21
32
|
} = $props();
|
|
22
33
|
|
|
@@ -29,15 +40,15 @@
|
|
|
29
40
|
</script>
|
|
30
41
|
|
|
31
42
|
{#if declaration}
|
|
32
|
-
<DeclarationLink name={reference} {hash}>
|
|
43
|
+
<DeclarationLink {...rest} {...a_attrs} name={reference} {hash}>
|
|
33
44
|
{@render children()}
|
|
34
45
|
</DeclarationLink>
|
|
35
46
|
{:else if module}
|
|
36
|
-
<ModuleLink module_path={module.path} {hash}>
|
|
47
|
+
<ModuleLink {...rest} {...a_attrs} module_path={module.path} {hash}>
|
|
37
48
|
{@render children()}
|
|
38
49
|
</ModuleLink>
|
|
39
50
|
{:else}
|
|
40
|
-
<code>{@render children()}</code>
|
|
51
|
+
<code {...rest} {...code_attrs}>{@render children()}</code>
|
|
41
52
|
{/if}
|
|
42
53
|
|
|
43
54
|
{#snippet children()}{#if children_prop}{@render children_prop(
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes, SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
import type { OmitStrict } from '@fuzdev/fuz_util/types.js';
|
|
2
4
|
import type { Declaration } from './declaration.svelte.js';
|
|
3
5
|
import type { Module } from './module.svelte.js';
|
|
4
|
-
type $$ComponentProps =
|
|
6
|
+
type $$ComponentProps = // generic element attrs, the common denominator of the rendered roots -
|
|
7
|
+
OmitStrict<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
5
8
|
reference: string;
|
|
6
9
|
/** URL fragment to append, with or without the `#`. */
|
|
7
10
|
hash?: string;
|
|
8
11
|
display_text?: string | null;
|
|
12
|
+
/** Anchor attributes, applied only when the reference resolves to a declaration or module link. */
|
|
13
|
+
a_attrs?: SvelteHTMLElements['a'];
|
|
14
|
+
/** Code attributes, applied only to the fallback `<code>` when the reference doesn't resolve. */
|
|
15
|
+
code_attrs?: SvelteHTMLElements['code'];
|
|
9
16
|
children?: Snippet<[Declaration | undefined, Module | undefined]>;
|
|
10
17
|
};
|
|
11
18
|
declare const DocsLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocsLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"DocsLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAK1D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE9C,KAAK,gBAAgB,GAErB,AAFyB,wEAAwE;AAEjG,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,GAAG;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,mGAAmG;IACnG,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAClC,iGAAiG;IACjG,UAAU,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAClE,CAAC;AAiDH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
package/dist/DocsMenu.svelte
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
|
31
31
|
|
|
32
|
-
<DocsList {...rest} {expand_width} margin={false} class="docs-menu">
|
|
32
|
+
<DocsList {...rest} {expand_width} margin={false} class="docs-menu {rest.class}">
|
|
33
33
|
<ul class="unstyled">
|
|
34
34
|
{#each Object.entries(tomes_by_category) as [category, tomes] (category)}
|
|
35
35
|
<li class="category">
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
const hash = $derived(page.url.hash.slice(1));
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
|
-
<DocsList {...rest} {expand_width} class="docs-page-links">
|
|
23
|
+
<DocsList {...rest} {expand_width} class="docs-page-links {rest.class}">
|
|
24
24
|
<h4 class="mb_sm">on this page</h4>
|
|
25
25
|
{#if sidebar}
|
|
26
26
|
<div class="sidebar-wrapper">{@render content()}</div>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
|
+
|
|
2
4
|
import {FUZ_DEV_URL} from './constants.js';
|
|
3
5
|
|
|
4
6
|
const {
|
|
5
7
|
selected,
|
|
6
|
-
|
|
8
|
+
...rest
|
|
9
|
+
}: SvelteHTMLElements['ul'] & {
|
|
7
10
|
selected?: 'fuz.dev';
|
|
8
11
|
} = $props();
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
|
-
<ul>
|
|
14
|
+
<ul {...rest}>
|
|
12
15
|
<li>
|
|
13
16
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
14
17
|
<a rel="me" href={FUZ_DEV_URL} class:selected={selected === 'fuz.dev'}>fuz.dev</a>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcosystemLinks.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/EcosystemLinks.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EcosystemLinks.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/EcosystemLinks.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAIvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,IAAI,CAAC,GAAG;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AA2BH,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type {Snippet} from 'svelte';
|
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
4
|
|
|
4
5
|
import EcosystemLinks from './EcosystemLinks.svelte';
|
|
5
6
|
import ProjectLinks from './ProjectLinks.svelte';
|
|
6
7
|
|
|
7
8
|
const {
|
|
8
9
|
children,
|
|
9
|
-
|
|
10
|
+
...rest
|
|
11
|
+
}: SvelteHTMLElements['section'] & {
|
|
10
12
|
children?: Snippet;
|
|
11
13
|
} = $props();
|
|
12
14
|
</script>
|
|
13
15
|
|
|
14
|
-
<section class="panel p_lg">
|
|
16
|
+
<section {...rest} class="panel p_lg {rest.class}">
|
|
15
17
|
{#if children}
|
|
16
18
|
{@render children()}
|
|
17
19
|
{:else}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
type
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
type $$ComponentProps = SvelteHTMLElements['section'] & {
|
|
3
4
|
children?: Snippet;
|
|
4
5
|
};
|
|
5
6
|
declare const EcosystemLinksPanel: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EcosystemLinksPanel.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/EcosystemLinksPanel.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"EcosystemLinksPanel.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/EcosystemLinksPanel.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA8BH,QAAA,MAAM,mBAAmB,sDAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|
package/dist/Hashlink.svelte
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
const {fragment, children, ...rest}: SvelteHTMLElements['a'] & {fragment: string} = $props();
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
|
-
<a {...rest} class="hashlink {rest.class}" href="#{fragment}"
|
|
7
|
+
<a aria-label="hashlink" {...rest} class="hashlink {rest.class}" href="#{fragment}"
|
|
8
8
|
>{#if children}{@render children()}{:else}#{/if}</a
|
|
9
9
|
>
|
|
10
10
|
<span class="hashlink-scroll-target" id={fragment} aria-hidden="true"></span>
|
package/dist/ImgOrSvg.svelte
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
svg_attrs,
|
|
11
11
|
img_attrs,
|
|
12
12
|
...rest
|
|
13
|
-
}:
|
|
13
|
+
}: // the intersection makes rest shared attributes valid for whichever branch renders -
|
|
14
|
+
// branch-specific attributes go in `svg_attrs`/`img_attrs`
|
|
15
|
+
SvelteHTMLElements['img'] &
|
|
14
16
|
SvelteHTMLElements['svg'] & {
|
|
15
17
|
src: string;
|
|
16
18
|
label?: string;
|
|
@@ -28,7 +30,6 @@
|
|
|
28
30
|
height?: string;
|
|
29
31
|
svg_attrs?: SvelteHTMLElements['svg'];
|
|
30
32
|
img_attrs?: SvelteHTMLElements['img'];
|
|
31
|
-
/** Shared attributes for both img and svg. */
|
|
32
33
|
} = $props();
|
|
33
34
|
|
|
34
35
|
const final_width = $derived(width ?? size);
|
|
@@ -38,9 +39,9 @@
|
|
|
38
39
|
{#if src.endsWith('.svg')}
|
|
39
40
|
<svg
|
|
40
41
|
role="img"
|
|
41
|
-
{...rest
|
|
42
|
+
{...rest}
|
|
42
43
|
{...svg_attrs}
|
|
43
|
-
aria-label={label}
|
|
44
|
+
aria-label={label ?? svg_attrs?.['aria-label'] ?? rest['aria-label']}
|
|
44
45
|
style:width={final_width}
|
|
45
46
|
style:height={final_height}
|
|
46
47
|
>
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
{...rest}
|
|
52
53
|
{...img_attrs}
|
|
53
54
|
{src}
|
|
54
|
-
alt={label}
|
|
55
|
+
alt={label ?? img_attrs?.alt ?? rest.alt}
|
|
55
56
|
style:width={final_width}
|
|
56
57
|
style:height={final_height}
|
|
57
58
|
/>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
-
type $$ComponentProps =
|
|
2
|
+
type $$ComponentProps = // the intersection makes rest shared attributes valid for whichever branch renders -
|
|
3
|
+
SvelteHTMLElements['img'] & SvelteHTMLElements['svg'] & {
|
|
3
4
|
src: string;
|
|
4
5
|
label?: string;
|
|
5
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgOrSvg.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ImgOrSvg.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ImgOrSvg.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ImgOrSvg.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAErB,AAFyB,qFAAqF;AAE9G,kBAAkB,CAAC,KAAK,CAAC,GACxB,kBAAkB,CAAC,KAAK,CAAC,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;CACtC,CAAC;AA6BJ,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -10,7 +10,9 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
10
10
|
<script lang="ts">
|
|
11
11
|
import {page} from '$app/state';
|
|
12
12
|
import {format_url} from '@fuzdev/fuz_util/url.js';
|
|
13
|
+
import type {OmitStrict} from '@fuzdev/fuz_util/types.js';
|
|
13
14
|
import type {Snippet} from 'svelte';
|
|
15
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
14
16
|
|
|
15
17
|
import {library_context, type Library} from './library.svelte.js';
|
|
16
18
|
import ImgOrSvg from './ImgOrSvg.svelte';
|
|
@@ -28,7 +30,8 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
28
30
|
npm_url,
|
|
29
31
|
homepage_url,
|
|
30
32
|
children,
|
|
31
|
-
|
|
33
|
+
...rest
|
|
34
|
+
}: OmitStrict<SvelteHTMLElements['div'], 'children'> & {
|
|
32
35
|
library: Library;
|
|
33
36
|
/**
|
|
34
37
|
* Link the module/declaration index to the library's own deployed docs
|
|
@@ -57,7 +60,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
57
60
|
|
|
58
61
|
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
|
59
62
|
|
|
60
|
-
<div class="library-detail">
|
|
63
|
+
<div {...rest} class="library-detail {rest.class}">
|
|
61
64
|
<!-- TODO maybe continue this snippet pattern, or maybe simplify? -->
|
|
62
65
|
<div class="info">
|
|
63
66
|
<div class="display:flex flex:1">
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { OmitStrict } from '@fuzdev/fuz_util/types.js';
|
|
1
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
4
|
import { type Library } from './library.svelte.js';
|
|
3
|
-
type $$ComponentProps = {
|
|
5
|
+
type $$ComponentProps = OmitStrict<SvelteHTMLElements['div'], 'children'> & {
|
|
4
6
|
library: Library;
|
|
5
7
|
/**
|
|
6
8
|
* Link the module/declaration index to the library's own deployed docs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LibraryDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibraryDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"LibraryDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibraryDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAkB,KAAK,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAOjE,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;AAsKH;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {page} from '$app/state';
|
|
3
3
|
import type {Snippet} from 'svelte';
|
|
4
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
5
|
import {format_url} from '@fuzdev/fuz_util/url.js';
|
|
5
6
|
|
|
6
7
|
import type {Library} from './library.svelte.js';
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
npm_url,
|
|
16
17
|
homepage_url,
|
|
17
18
|
children,
|
|
18
|
-
|
|
19
|
+
...rest
|
|
20
|
+
}: SvelteHTMLElements['div'] & {
|
|
19
21
|
library: Library;
|
|
20
22
|
repo_name?: Snippet<[repo_name: string]>;
|
|
21
23
|
logo?: Snippet<[logo_url: string, logo_alt: string]>;
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
const {pkg_json} = $derived(library);
|
|
30
32
|
</script>
|
|
31
33
|
|
|
32
|
-
<div class="library-summary">
|
|
34
|
+
<div {...rest} class="library-summary {rest.class}">
|
|
33
35
|
<!-- TODO maybe continue this snippet pattern, or maybe simplify? -->
|
|
34
36
|
<header class="box mb_lg">
|
|
35
37
|
{#if repo_name}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
3
|
import type { Library } from './library.svelte.js';
|
|
3
|
-
type $$ComponentProps = {
|
|
4
|
+
type $$ComponentProps = SvelteHTMLElements['div'] & {
|
|
4
5
|
library: Library;
|
|
5
6
|
repo_name?: Snippet<[repo_name: string]>;
|
|
6
7
|
logo?: Snippet<[logo_url: string, logo_alt: string]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LibrarySummary.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibrarySummary.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"LibrarySummary.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/LibrarySummary.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGxD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAGhD,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;AA6GH,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
const {
|
|
7
7
|
onclipboardtext,
|
|
8
8
|
onerror,
|
|
9
|
+
onclick,
|
|
9
10
|
children,
|
|
10
11
|
...rest
|
|
11
12
|
}: SvelteHTMLElements['button'] & {
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
title="paste from clipboard"
|
|
22
23
|
{...rest}
|
|
23
24
|
class="paste-from-clipboard {rest.class}"
|
|
24
|
-
onclick={async () => {
|
|
25
|
+
onclick={async (e) => {
|
|
26
|
+
onclick?.(e); // before the await, so it stays in the user gesture context
|
|
25
27
|
try {
|
|
26
28
|
const text = await navigator.clipboard.readText();
|
|
27
29
|
onclipboardtext(text);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasteFromClipboard.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PasteFromClipboard.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC,CAAC;
|
|
1
|
+
{"version":3,"file":"PasteFromClipboard.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PasteFromClipboard.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC,CAAC;AA+BH,QAAA,MAAM,kBAAkB,sDAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
pending,
|
|
9
9
|
onclick,
|
|
10
10
|
running,
|
|
11
|
-
title: title_prop,
|
|
12
11
|
disabled: disabled_prop,
|
|
13
12
|
animation,
|
|
14
13
|
children,
|
|
@@ -33,7 +32,6 @@
|
|
|
33
32
|
{...rest}
|
|
34
33
|
class="pending-button {rest.class}"
|
|
35
34
|
disabled={disabled_prop ?? pending}
|
|
36
|
-
title={title_prop}
|
|
37
35
|
class:pending
|
|
38
36
|
{onclick}
|
|
39
37
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PendingButton.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PendingButton.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAGpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"PendingButton.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PendingButton.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAGpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AA2CH,QAAA,MAAM,aAAa;sBAxBQ,YAAY,KAAG,IAAI;MAwBa,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
name,
|
|
9
9
|
inline = false,
|
|
10
10
|
plain = true,
|
|
11
|
+
onclick,
|
|
11
12
|
children,
|
|
12
13
|
...rest
|
|
13
14
|
}: SvelteHTMLElements['button'] & {
|
|
@@ -32,7 +33,10 @@
|
|
|
32
33
|
{...rest}
|
|
33
34
|
class:inline
|
|
34
35
|
class:plain
|
|
35
|
-
onclick={() =>
|
|
36
|
+
onclick={(e) => {
|
|
37
|
+
selected_variable.value = variable;
|
|
38
|
+
onclick?.(e);
|
|
39
|
+
}}
|
|
36
40
|
>{#if children}{@render children()}{:else}<span class="font_family_mono">{name}</span
|
|
37
41
|
>{/if}</button
|
|
38
42
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleVariableButton.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/StyleVariableButton.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"StyleVariableButton.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/StyleVariableButton.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAoCH,QAAA,MAAM,mBAAmB,sDAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|
package/dist/Svg.svelte
CHANGED
package/dist/TomeContent.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type {Snippet} from 'svelte';
|
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
4
|
import {page} from '$app/state';
|
|
4
5
|
import {resolve} from '$app/paths';
|
|
5
6
|
|
|
@@ -13,7 +14,8 @@
|
|
|
13
14
|
docs_path = DOCS_PATH_DEFAULT,
|
|
14
15
|
header,
|
|
15
16
|
children,
|
|
16
|
-
|
|
17
|
+
...rest
|
|
18
|
+
}: SvelteHTMLElements['section'] & {
|
|
17
19
|
tome: Tome;
|
|
18
20
|
docs_path?: string;
|
|
19
21
|
header?: Snippet;
|
|
@@ -30,7 +32,8 @@
|
|
|
30
32
|
</script>
|
|
31
33
|
|
|
32
34
|
<section
|
|
33
|
-
|
|
35
|
+
{...rest}
|
|
36
|
+
class="tome-content width_atmost_md mb_xl9 {rest.class}"
|
|
34
37
|
{@attach intersect(() =>
|
|
35
38
|
at_root
|
|
36
39
|
? ({intersecting}) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
3
|
import { type Tome } from './tome.js';
|
|
3
|
-
type $$ComponentProps = {
|
|
4
|
+
type $$ComponentProps = SvelteHTMLElements['section'] & {
|
|
4
5
|
tome: Tome;
|
|
5
6
|
docs_path?: string;
|
|
6
7
|
header?: Snippet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TomeContent.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TomeContent.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"TomeContent.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TomeContent.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKxD,OAAO,EAAe,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAIjD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG;IACxD,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AA8DH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
package/dist/TypeLink.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Code from '@fuzdev/fuz_code/Code.svelte';
|
|
3
|
+
import type {HTMLAttributes, SvelteHTMLElements} from 'svelte/elements';
|
|
3
4
|
|
|
4
5
|
import DeclarationLink from './DeclarationLink.svelte';
|
|
5
6
|
import {library_context} from './library.svelte.js';
|
|
@@ -7,21 +8,29 @@
|
|
|
7
8
|
const {
|
|
8
9
|
type,
|
|
9
10
|
hash,
|
|
10
|
-
|
|
11
|
+
a_attrs,
|
|
12
|
+
code_attrs,
|
|
13
|
+
...rest
|
|
14
|
+
}: // generic element attrs, the common denominator of the rendered roots -
|
|
15
|
+
// assignable to the anchor rest of `DeclarationLink` and the code rest of `Code`
|
|
16
|
+
HTMLAttributes<HTMLElement> & {
|
|
11
17
|
type: string;
|
|
12
18
|
/** URL fragment to append, with or without the `#`. */
|
|
13
19
|
hash?: string;
|
|
20
|
+
/** Anchor attributes, applied only when the type resolves to a declaration link. */
|
|
21
|
+
a_attrs?: SvelteHTMLElements['a'];
|
|
22
|
+
/** Code attributes, applied only to the fallback `Code` when the type doesn't resolve. */
|
|
23
|
+
code_attrs?: SvelteHTMLElements['code'];
|
|
14
24
|
} = $props();
|
|
15
25
|
|
|
16
26
|
const get_library = library_context.get();
|
|
17
27
|
const library = $derived(get_library());
|
|
18
28
|
|
|
19
|
-
// TODO is not extensible
|
|
20
29
|
// TODO maybe better name?
|
|
21
30
|
</script>
|
|
22
31
|
|
|
23
32
|
{#if library.declaration_by_name.has(type)}
|
|
24
|
-
<DeclarationLink name={type} {hash} />
|
|
33
|
+
<DeclarationLink {...rest} {...a_attrs} name={type} {hash} />
|
|
25
34
|
{:else}
|
|
26
|
-
<Code lang="ts" content={type} inline />
|
|
35
|
+
<Code {...rest} {...code_attrs} lang="ts" content={type} inline />
|
|
27
36
|
{/if}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { HTMLAttributes, SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
+
type $$ComponentProps = // generic element attrs, the common denominator of the rendered roots -
|
|
3
|
+
HTMLAttributes<HTMLElement> & {
|
|
2
4
|
type: string;
|
|
3
5
|
/** URL fragment to append, with or without the `#`. */
|
|
4
6
|
hash?: string;
|
|
7
|
+
/** Anchor attributes, applied only when the type resolves to a declaration link. */
|
|
8
|
+
a_attrs?: SvelteHTMLElements['a'];
|
|
9
|
+
/** Code attributes, applied only to the fallback `Code` when the type doesn't resolve. */
|
|
10
|
+
code_attrs?: SvelteHTMLElements['code'];
|
|
5
11
|
};
|
|
6
12
|
declare const TypeLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
13
|
type TypeLink = ReturnType<typeof TypeLink>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TypeLink.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypeLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TypeLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvE,KAAK,gBAAgB,GAErB,AAFyB,wEAAwE;AAEjG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAClC,0FAA0F;IAC1F,UAAU,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AA8BH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|