@fuzdev/fuz_ui 0.196.0 → 0.197.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/README.md +2 -2
- package/dist/Breadcrumb.svelte +15 -1
- package/dist/Breadcrumb.svelte.d.ts +4 -0
- package/dist/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/Contextmenu.svelte +3 -1
- package/dist/Contextmenu.svelte.d.ts.map +1 -1
- package/dist/Docs.svelte +8 -21
- package/dist/Docs.svelte.d.ts +0 -3
- package/dist/Docs.svelte.d.ts.map +1 -1
- package/dist/DocsFooter.svelte +19 -10
- package/dist/DocsFooter.svelte.d.ts +7 -2
- package/dist/DocsFooter.svelte.d.ts.map +1 -1
- package/dist/DocsPrimaryNav.svelte +1 -12
- package/dist/DocsPrimaryNav.svelte.d.ts +0 -3
- package/dist/DocsPrimaryNav.svelte.d.ts.map +1 -1
- package/dist/DocsSearch.svelte +1 -1
- package/dist/EcosystemLinks.svelte +4 -1
- package/dist/EcosystemLinks.svelte.d.ts.map +1 -1
- package/dist/ProjectLinks.svelte +2 -1
- package/dist/ProjectLinks.svelte.d.ts.map +1 -1
- package/dist/Svg.svelte +2 -24
- package/dist/Svg.svelte.d.ts +1 -23
- package/dist/Svg.svelte.d.ts.map +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/site.svelte.d.ts +34 -0
- package/dist/site.svelte.d.ts.map +1 -0
- package/dist/site.svelte.js +18 -0
- package/dist/svg.d.ts +25 -0
- package/dist/svg.d.ts.map +1 -0
- package/dist/svg.js +1 -0
- package/package.json +7 -7
- package/src/lib/constants.ts +5 -0
- package/src/lib/logos.ts +1 -1
- package/src/lib/mdz_lexer.ts +2 -2
- package/src/lib/mdz_token_parser.ts +1 -1
- package/src/lib/site.svelte.ts +39 -0
- package/src/lib/storage.ts +1 -1
- package/src/lib/svg.ts +23 -0
package/README.md
CHANGED
|
@@ -55,8 +55,8 @@ import '@fuzdev/fuz_css/style.css';
|
|
|
55
55
|
// and import a fuz_css theme:
|
|
56
56
|
import '@fuzdev/fuz_css/theme.css'; // or bring your own
|
|
57
57
|
|
|
58
|
-
//
|
|
59
|
-
import '
|
|
58
|
+
// the fuz_css Vite plugin exposes the generated utility classes as a virtual module:
|
|
59
|
+
import 'virtual:fuz.css';
|
|
60
60
|
|
|
61
61
|
// then import Fuz Svelte components:
|
|
62
62
|
import ThemeRoot from '@fuzdev/fuz_ui/ThemeRoot.svelte';
|
package/dist/Breadcrumb.svelte
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
import {strip_start, ensure_end} from '@fuzdev/fuz_util/string.js';
|
|
7
7
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
8
8
|
|
|
9
|
+
import Svg from './Svg.svelte';
|
|
10
|
+
import {site_context} from './site.svelte.js';
|
|
11
|
+
|
|
9
12
|
const {
|
|
10
13
|
path,
|
|
11
14
|
selected_path,
|
|
@@ -29,9 +32,17 @@
|
|
|
29
32
|
*/
|
|
30
33
|
base_path?: string;
|
|
31
34
|
separator?: Snippet;
|
|
35
|
+
/**
|
|
36
|
+
* Content of the root link. Defaults to the `site_context` icon rendered as
|
|
37
|
+
* an `Svg`, then the `site_context` glyph, then `•`.
|
|
38
|
+
*/
|
|
32
39
|
children?: Snippet;
|
|
33
40
|
} = $props();
|
|
34
41
|
|
|
42
|
+
const site = site_context.get_maybe();
|
|
43
|
+
const icon_data = $derived(site?.icon ?? null);
|
|
44
|
+
const glyph_text = $derived(site?.glyph ?? null);
|
|
45
|
+
|
|
35
46
|
const final_base_path = $derived(base_path ?? resolve('/').slice(0, -1));
|
|
36
47
|
|
|
37
48
|
const final_path = $derived(path ?? strip_start(page.url.pathname, final_base_path));
|
|
@@ -51,7 +62,10 @@
|
|
|
51
62
|
<div {...rest} class="breadcrumb {rest.class}">
|
|
52
63
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
53
64
|
<a href={root_path} class:selected={root_path === final_base_path + final_selected_path}
|
|
54
|
-
>{#if children}{@render children()}{:else
|
|
65
|
+
>{#if children}{@render children()}{:else if icon_data}<Svg
|
|
66
|
+
data={icon_data}
|
|
67
|
+
size="1em"
|
|
68
|
+
/>{:else if glyph_text}{glyph_text}{:else}•{/if}</a
|
|
55
69
|
>{#each path_pieces as path_piece (path_piece)}{#if path_piece.type === 'piece'}<!-- eslint-disable-next-line svelte/no-navigation-without-resolve --><a
|
|
56
70
|
href={final_base_path + path_piece.path}
|
|
57
71
|
class:selected={path_piece.path === final_selected_path}>{path_piece.name}</a
|
|
@@ -16,6 +16,10 @@ type $$ComponentProps = SvelteHTMLElements['div'] & {
|
|
|
16
16
|
*/
|
|
17
17
|
base_path?: string;
|
|
18
18
|
separator?: Snippet;
|
|
19
|
+
/**
|
|
20
|
+
* Content of the root link. Defaults to the `site_context` icon rendered as
|
|
21
|
+
* an `Svg`, then the `site_context` glyph, then `•`.
|
|
22
|
+
*/
|
|
19
23
|
children?: Snippet;
|
|
20
24
|
};
|
|
21
25
|
declare const Breadcrumb: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Breadcrumb.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumb.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Breadcrumb.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IACpD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAkDH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
package/dist/Contextmenu.svelte
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import {contextmenu_attachment} from './contextmenu_state.svelte.js';
|
|
6
6
|
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
|
|
8
|
+
|
|
7
9
|
const {
|
|
8
|
-
tag = 'span' as
|
|
10
|
+
tag = 'span' as any, // TODO why is casting needed?
|
|
9
11
|
entries,
|
|
10
12
|
children,
|
|
11
13
|
...rest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contextmenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Contextmenu.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGxD,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;;cAOnC,CAAC;iBACE,OAAO;kBACN,OAAO;;;;;;
|
|
1
|
+
{"version":3,"file":"Contextmenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Contextmenu.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGxD,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;;cAOnC,CAAC;iBACE,OAAO;kBACN,OAAO;;;;;;EAoBsG;AACzH,cAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC7C,KAAK,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,MAAM,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,KAAK,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,QAAQ;IACR,OAAO;CACV;AAED,UAAU,qBAAqB;IAC3B,KAAK,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;KAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACpZ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACnJ,YAAY,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CACjE;AACD,QAAA,MAAM,WAAW,EAAE,qBAAmC,CAAC;AACrC,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,eAAe,WAAW,CAAC"}
|
package/dist/Docs.svelte
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import {innerWidth} from 'svelte/reactivity/window';
|
|
5
5
|
import {page} from '$app/state';
|
|
6
6
|
|
|
7
|
-
import type {Library} from './library.svelte.js';
|
|
8
7
|
import Breadcrumb from './Breadcrumb.svelte';
|
|
9
8
|
import {Tome, tomes_context} from './tome.js';
|
|
10
9
|
import DocsPrimaryNav from './DocsPrimaryNav.svelte';
|
|
@@ -12,20 +11,20 @@
|
|
|
12
11
|
import DocsTertiaryNav from './DocsTertiaryNav.svelte';
|
|
13
12
|
import Dialog from './Dialog.svelte';
|
|
14
13
|
import DocsFooter from './DocsFooter.svelte';
|
|
14
|
+
import {site_context} from './site.svelte.js';
|
|
15
|
+
import {FUZ_DEV_URL} from './constants.js';
|
|
15
16
|
import {DocsLinks, docs_links_context} from './docs_helpers.svelte.js';
|
|
16
17
|
|
|
17
18
|
const {
|
|
18
19
|
tomes,
|
|
19
|
-
library,
|
|
20
|
-
breadcrumb_children,
|
|
21
20
|
children,
|
|
22
21
|
}: {
|
|
23
22
|
tomes: Array<Tome>;
|
|
24
|
-
library: Library;
|
|
25
|
-
breadcrumb_children?: Snippet<[is_primary_nav: boolean]>;
|
|
26
23
|
children: Snippet;
|
|
27
24
|
} = $props();
|
|
28
25
|
|
|
26
|
+
const site = site_context.get('`Docs` requires `site_context`; set it in your root layout');
|
|
27
|
+
|
|
29
28
|
// TODO this API is messy, inconsistent usage of props/context
|
|
30
29
|
const tomes_by_slug = $derived(new Map(tomes.map((t) => [t.slug, t])));
|
|
31
30
|
tomes_context.set(() => tomes_by_slug);
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
<svelte:window onhashchange={() => (show_secondary_nav_dialog = false)} />
|
|
52
51
|
|
|
53
52
|
<div class="docs" style:--docs_menu_width={docs_menu_width}>
|
|
54
|
-
<DocsPrimaryNav
|
|
53
|
+
<DocsPrimaryNav>
|
|
55
54
|
<div class="nav-dialog-toggle">
|
|
56
55
|
<button class="plain" type="button" onclick={() => toggle_secondary_nav_dialog()}>menu</button
|
|
57
56
|
>
|
|
@@ -72,15 +71,9 @@
|
|
|
72
71
|
<DocsTertiaryNav {tomes} {tomes_by_slug} />
|
|
73
72
|
{/if}
|
|
74
73
|
<section class="box">
|
|
75
|
-
<DocsFooter {
|
|
74
|
+
<DocsFooter repo_url={site.repo_url} root_url={FUZ_DEV_URL}>
|
|
76
75
|
<div class="mb_xl5">
|
|
77
|
-
<Breadcrumb
|
|
78
|
-
{#if breadcrumb_children}
|
|
79
|
-
{@render breadcrumb_children(false)}
|
|
80
|
-
{:else}
|
|
81
|
-
{library.package_json.glyph ?? '🏠'}
|
|
82
|
-
{/if}
|
|
83
|
-
</Breadcrumb>
|
|
76
|
+
<Breadcrumb />
|
|
84
77
|
</div>
|
|
85
78
|
</DocsFooter>
|
|
86
79
|
</section>
|
|
@@ -92,13 +85,7 @@
|
|
|
92
85
|
<Dialog onclose={() => (show_secondary_nav_dialog = false)}>
|
|
93
86
|
<div class="pane" style:--docs_menu_width={docs_menu_width}>
|
|
94
87
|
<div class="p_xl pb_0">
|
|
95
|
-
<Breadcrumb
|
|
96
|
-
{#if breadcrumb_children}
|
|
97
|
-
{@render breadcrumb_children(false)}
|
|
98
|
-
{:else}
|
|
99
|
-
{library.package_json.glyph ?? '🏠'}
|
|
100
|
-
{/if}
|
|
101
|
-
</Breadcrumb>
|
|
88
|
+
<Breadcrumb />
|
|
102
89
|
</div>
|
|
103
90
|
<div class="px_lg pb_xl">
|
|
104
91
|
<DocsSecondaryNav {tomes} sidebar={false} />
|
package/dist/Docs.svelte.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { Library } from './library.svelte.js';
|
|
3
2
|
import { Tome } from './tome.js';
|
|
4
3
|
type $$ComponentProps = {
|
|
5
4
|
tomes: Array<Tome>;
|
|
6
|
-
library: Library;
|
|
7
|
-
breadcrumb_children?: Snippet<[is_primary_nav: boolean]>;
|
|
8
5
|
children: Snippet;
|
|
9
6
|
};
|
|
10
7
|
declare const Docs: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Docs.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Docs.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"Docs.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Docs.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAMpC,OAAO,EAAC,IAAI,EAAgB,MAAM,WAAW,CAAC;AAU7C,KAAK,gBAAgB,GAAI;IACxB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAkGH,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
package/dist/DocsFooter.svelte
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
import type {Snippet} from 'svelte';
|
|
4
4
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
5
5
|
|
|
6
|
-
import type {Library} from './library.svelte.js';
|
|
7
6
|
import Svg from './Svg.svelte';
|
|
8
7
|
import {logo_github} from './logos.js';
|
|
9
8
|
|
|
10
9
|
const {
|
|
11
|
-
|
|
10
|
+
repo_url,
|
|
12
11
|
root_url = null,
|
|
13
12
|
logo,
|
|
14
13
|
logo_header,
|
|
@@ -16,8 +15,14 @@
|
|
|
16
15
|
children,
|
|
17
16
|
...rest
|
|
18
17
|
}: SvelteHTMLElements['footer'] & {
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Link target for the logo, e.g. the project's source repository.
|
|
20
|
+
*/
|
|
21
|
+
repo_url?: Url | null;
|
|
20
22
|
root_url?: Url | null;
|
|
23
|
+
/**
|
|
24
|
+
* Overrides the default GitHub logo mark, e.g. for repos hosted elsewhere.
|
|
25
|
+
*/
|
|
21
26
|
logo?: Snippet;
|
|
22
27
|
logo_header?: Snippet;
|
|
23
28
|
logo_footer?: Snippet;
|
|
@@ -28,13 +33,12 @@
|
|
|
28
33
|
{@render children?.()}
|
|
29
34
|
<div class="logo box panel p_lg shadow_inset_xs">
|
|
30
35
|
{@render logo_header?.()}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
>
|
|
36
|
+
{#if repo_url}
|
|
37
|
+
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
38
|
+
<a href={repo_url} rel="me" title="source code">{@render logo_mark()}</a>
|
|
39
|
+
{:else}
|
|
40
|
+
{@render logo_mark()}
|
|
41
|
+
{/if}
|
|
38
42
|
{@render logo_footer?.()}
|
|
39
43
|
</div>
|
|
40
44
|
{#if root_url}
|
|
@@ -45,6 +49,11 @@
|
|
|
45
49
|
{/if}
|
|
46
50
|
</footer>
|
|
47
51
|
|
|
52
|
+
{#snippet logo_mark()}{#if logo}{@render logo()}{:else}<Svg
|
|
53
|
+
data={logo_github}
|
|
54
|
+
size="var(--icon_size_lg)"
|
|
55
|
+
/>{/if}{/snippet}
|
|
56
|
+
|
|
48
57
|
<style>
|
|
49
58
|
/* TODO probably extract */
|
|
50
59
|
.logo a {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { type Url } from '@fuzdev/fuz_util/url.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
4
|
-
import type { Library } from './library.svelte.js';
|
|
5
4
|
type $$ComponentProps = SvelteHTMLElements['footer'] & {
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Link target for the logo, e.g. the project's source repository.
|
|
7
|
+
*/
|
|
8
|
+
repo_url?: Url | null;
|
|
7
9
|
root_url?: Url | null;
|
|
10
|
+
/**
|
|
11
|
+
* Overrides the default GitHub logo mark, e.g. for repos hosted elsewhere.
|
|
12
|
+
*/
|
|
8
13
|
logo?: Snippet;
|
|
9
14
|
logo_header?: Snippet;
|
|
10
15
|
logo_footer?: Snippet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocsFooter.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsFooter.svelte"],"names":[],"mappings":"AAGA,OAAO,EAAa,KAAK,GAAG,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DocsFooter.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsFooter.svelte"],"names":[],"mappings":"AAGA,OAAO,EAAa,KAAK,GAAG,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA8CH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -4,17 +4,12 @@
|
|
|
4
4
|
import {scrollY} from 'svelte/reactivity/window';
|
|
5
5
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
6
6
|
|
|
7
|
-
import type {Library} from './library.svelte.js';
|
|
8
7
|
import Breadcrumb from './Breadcrumb.svelte';
|
|
9
8
|
|
|
10
9
|
const {
|
|
11
|
-
library,
|
|
12
|
-
breadcrumb_children,
|
|
13
10
|
children,
|
|
14
11
|
...rest
|
|
15
12
|
}: SvelteHTMLElements['div'] & {
|
|
16
|
-
library: Library;
|
|
17
|
-
breadcrumb_children?: Snippet<[is_primary_nav: boolean]>;
|
|
18
13
|
children?: Snippet;
|
|
19
14
|
} = $props();
|
|
20
15
|
|
|
@@ -29,13 +24,7 @@
|
|
|
29
24
|
<div class="background" aria-hidden="true"></div>
|
|
30
25
|
<div class="content">
|
|
31
26
|
<nav aria-label="Primary nav">
|
|
32
|
-
<Breadcrumb
|
|
33
|
-
{#if breadcrumb_children}
|
|
34
|
-
{@render breadcrumb_children(true)}
|
|
35
|
-
{:else}
|
|
36
|
-
{library.package_json.glyph ?? '🏠'}
|
|
37
|
-
{/if}
|
|
38
|
-
</Breadcrumb>
|
|
27
|
+
<Breadcrumb />
|
|
39
28
|
</nav>
|
|
40
29
|
{@render children?.()}
|
|
41
30
|
</div>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
-
import type { Library } from './library.svelte.js';
|
|
4
3
|
type $$ComponentProps = SvelteHTMLElements['div'] & {
|
|
5
|
-
library: Library;
|
|
6
|
-
breadcrumb_children?: Snippet<[is_primary_nav: boolean]>;
|
|
7
4
|
children?: Snippet;
|
|
8
5
|
};
|
|
9
6
|
declare const DocsPrimaryNav: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocsPrimaryNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsPrimaryNav.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DocsPrimaryNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsPrimaryNav.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAIvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAoCH,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
package/dist/DocsSearch.svelte
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
declaration_count,
|
|
8
8
|
filtered_module_count,
|
|
9
9
|
filtered_declaration_count,
|
|
10
|
-
search_query = $bindable(),
|
|
10
|
+
search_query = $bindable(), // eslint-disable-line @typescript-eslint/no-useless-default-assignment
|
|
11
11
|
...rest
|
|
12
12
|
}: SvelteHTMLElements['input'] & {
|
|
13
13
|
placeholder?: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import {FUZ_DEV_URL} from './constants.js';
|
|
3
|
+
|
|
2
4
|
const {
|
|
3
5
|
selected,
|
|
4
6
|
}: {
|
|
@@ -8,7 +10,8 @@
|
|
|
8
10
|
|
|
9
11
|
<ul>
|
|
10
12
|
<li>
|
|
11
|
-
|
|
13
|
+
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
14
|
+
<a rel="me" href={FUZ_DEV_URL} class:selected={selected === 'fuz.dev'}>fuz.dev</a>
|
|
12
15
|
- the Fuz stack homepage{#if selected === 'fuz.dev'}, you are here{/if}
|
|
13
16
|
</li>
|
|
14
17
|
<li>
|
|
@@ -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":"AAKC,KAAK,gBAAgB,GAAI;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAwBH,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
package/dist/ProjectLinks.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectLinks.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ProjectLinks.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectLinks.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ProjectLinks.svelte"],"names":[],"mappings":"AA4EA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,YAAY;;kBAA+E,CAAC;AAChF,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAe,YAAY,CAAC"}
|
package/dist/Svg.svelte
CHANGED
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
<script lang="ts"
|
|
1
|
+
<script lang="ts">
|
|
2
2
|
import {ensure_end} from '@fuzdev/fuz_util/string.js';
|
|
3
3
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Raw svg markup string that's inserted unsafely as a child of the `svg` element.
|
|
8
|
-
* This is an escape hatch for non-`path` markup -
|
|
9
|
-
* generally, you should instead use the `paths` property to avoid security/CSP implications.
|
|
10
|
-
*/
|
|
11
|
-
raw?: string | null;
|
|
12
|
-
/**
|
|
13
|
-
* List of svg `path` attribute objects. The `d` attribute is required.
|
|
14
|
-
*/
|
|
15
|
-
paths?: Array<{d: string} & SvelteHTMLElements['path']> | null;
|
|
16
|
-
attrs?: SvelteHTMLElements['svg'] | null;
|
|
17
|
-
fill?: string | null;
|
|
18
|
-
width?: string | null;
|
|
19
|
-
height?: string | null;
|
|
20
|
-
label?: string | null;
|
|
21
|
-
/**
|
|
22
|
-
* Defaults to `"0 0 100 100"`.
|
|
23
|
-
*/
|
|
24
|
-
viewBox?: string | null;
|
|
25
|
-
}
|
|
26
|
-
</script>
|
|
5
|
+
import type {SvgData} from './svg.js';
|
|
27
6
|
|
|
28
|
-
<script lang="ts">
|
|
29
7
|
const {
|
|
30
8
|
data,
|
|
31
9
|
fill,
|
package/dist/Svg.svelte.d.ts
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Raw svg markup string that's inserted unsafely as a child of the `svg` element.
|
|
5
|
-
* This is an escape hatch for non-`path` markup -
|
|
6
|
-
* generally, you should instead use the `paths` property to avoid security/CSP implications.
|
|
7
|
-
*/
|
|
8
|
-
raw?: string | null;
|
|
9
|
-
/**
|
|
10
|
-
* List of svg `path` attribute objects. The `d` attribute is required.
|
|
11
|
-
*/
|
|
12
|
-
paths?: Array<{
|
|
13
|
-
d: string;
|
|
14
|
-
} & SvelteHTMLElements['path']> | null;
|
|
15
|
-
attrs?: SvelteHTMLElements['svg'] | null;
|
|
16
|
-
fill?: string | null;
|
|
17
|
-
width?: string | null;
|
|
18
|
-
height?: string | null;
|
|
19
|
-
label?: string | null;
|
|
20
|
-
/**
|
|
21
|
-
* Defaults to `"0 0 100 100"`.
|
|
22
|
-
*/
|
|
23
|
-
viewBox?: string | null;
|
|
24
|
-
}
|
|
2
|
+
import type { SvgData } from './svg.js';
|
|
25
3
|
type $$ComponentProps = SvelteHTMLElements['svg'] & {
|
|
26
4
|
data: SvgData;
|
|
27
5
|
/**
|
package/dist/Svg.svelte.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Svg.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Svg.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Svg.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Svg.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAErC,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG;IACpD,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA8CH,QAAA,MAAM,GAAG,sDAAwC,CAAC;AAClD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAClC,eAAe,GAAG,CAAC"}
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,WAAW,yBAAyB,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
// TODO the 60px is a hack, need `--docs_primary_nav_height` exported or :root values from Fuz -- the --space_lg also needs to be kept in sync
|
|
2
2
|
// see also the same issue in fuz_css
|
|
3
3
|
export const MAIN_HEADER_MARGIN_TOP = 'calc(60px + var(--space_lg))';
|
|
4
|
+
/**
|
|
5
|
+
* The Fuz ecosystem home url, e.g. for `DocsFooter`'s `root_url`.
|
|
6
|
+
*/
|
|
7
|
+
export const FUZ_DEV_URL = 'https://www.fuz.dev/';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Url } from '@fuzdev/fuz_util/url.js';
|
|
2
|
+
import type { SvgData } from './svg.js';
|
|
3
|
+
export interface SiteStateOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The site's icon, e.g. a logo from `logos.ts`.
|
|
6
|
+
*/
|
|
7
|
+
icon?: SvgData | null;
|
|
8
|
+
/**
|
|
9
|
+
* The site's glyph, a single unicode character identifying the project.
|
|
10
|
+
*/
|
|
11
|
+
glyph?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* The site's source repository url, e.g. for `DocsFooter` links.
|
|
14
|
+
*/
|
|
15
|
+
repo_url?: Url | null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Light site-identity values for app chrome - the icon, glyph, and repo url used
|
|
19
|
+
* by components like `Breadcrumb` and `DocsFooter`. Set once per app at the root
|
|
20
|
+
* layout. Distinct from `library_context`, which carries the heavy
|
|
21
|
+
* module/declaration metadata that only docs and API pages need.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SiteState {
|
|
24
|
+
icon: SvgData | null;
|
|
25
|
+
glyph: string | null;
|
|
26
|
+
repo_url: Url | null;
|
|
27
|
+
constructor(options?: SiteStateOptions);
|
|
28
|
+
}
|
|
29
|
+
export declare const site_context: {
|
|
30
|
+
get: (error_message?: string) => SiteState;
|
|
31
|
+
get_maybe: () => SiteState | undefined;
|
|
32
|
+
set: (value: SiteState) => SiteState;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=site.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/site.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACrB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAoB;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAoB;IACxC,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAoB;gBAE5B,OAAO,GAAE,gBAAqB;CAK1C;AAED,eAAO,MAAM,YAAY;;;;CAA8B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { create_context } from './context_helpers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Light site-identity values for app chrome - the icon, glyph, and repo url used
|
|
4
|
+
* by components like `Breadcrumb` and `DocsFooter`. Set once per app at the root
|
|
5
|
+
* layout. Distinct from `library_context`, which carries the heavy
|
|
6
|
+
* module/declaration metadata that only docs and API pages need.
|
|
7
|
+
*/
|
|
8
|
+
export class SiteState {
|
|
9
|
+
icon = $state.raw(null);
|
|
10
|
+
glyph = $state.raw(null);
|
|
11
|
+
repo_url = $state.raw(null);
|
|
12
|
+
constructor(options = {}) {
|
|
13
|
+
this.icon = options.icon ?? null;
|
|
14
|
+
this.glyph = options.glyph ?? null;
|
|
15
|
+
this.repo_url = options.repo_url ?? null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export const site_context = create_context();
|
package/dist/svg.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
|
+
export interface SvgData {
|
|
3
|
+
/**
|
|
4
|
+
* Raw svg markup string that's inserted unsafely as a child of the `svg` element.
|
|
5
|
+
* This is an escape hatch for non-`path` markup -
|
|
6
|
+
* generally, you should instead use the `paths` property to avoid security/CSP implications.
|
|
7
|
+
*/
|
|
8
|
+
raw?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* List of svg `path` attribute objects. The `d` attribute is required.
|
|
11
|
+
*/
|
|
12
|
+
paths?: Array<{
|
|
13
|
+
d: string;
|
|
14
|
+
} & SvelteHTMLElements['path']> | null;
|
|
15
|
+
attrs?: SvelteHTMLElements['svg'] | null;
|
|
16
|
+
fill?: string | null;
|
|
17
|
+
width?: string | null;
|
|
18
|
+
height?: string | null;
|
|
19
|
+
label?: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Defaults to `"0 0 100 100"`.
|
|
22
|
+
*/
|
|
23
|
+
viewBox?: string | null;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/svg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExD,MAAM,WAAW,OAAO;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/D,KAAK,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
|
package/dist/svg.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.197.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@changesets/changelog-git": "^0.2.1",
|
|
83
|
-
"@fuzdev/blake3_wasm": "^0.1.
|
|
83
|
+
"@fuzdev/blake3_wasm": "^0.1.1",
|
|
84
84
|
"@fuzdev/fuz_code": "^0.45.1",
|
|
85
|
-
"@fuzdev/fuz_css": "^0.
|
|
85
|
+
"@fuzdev/fuz_css": "^0.61.1",
|
|
86
86
|
"@fuzdev/fuz_util": "^0.63.0",
|
|
87
87
|
"@fuzdev/gro": "^0.200.0",
|
|
88
88
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
@@ -95,20 +95,20 @@
|
|
|
95
95
|
"@types/estree": "^1.0.8",
|
|
96
96
|
"@types/node": "^24.10.1",
|
|
97
97
|
"@webref/css": "^8.2.0",
|
|
98
|
-
"eslint": "^9.39.
|
|
99
|
-
"eslint-plugin-svelte": "^3.
|
|
98
|
+
"eslint": "^9.39.4",
|
|
99
|
+
"eslint-plugin-svelte": "^3.19.0",
|
|
100
100
|
"esm-env": "^1.2.2",
|
|
101
101
|
"jsdom": "^27.2.0",
|
|
102
102
|
"magic-string": "^0.30.21",
|
|
103
103
|
"prettier": "^3.7.4",
|
|
104
104
|
"prettier-plugin-svelte": "^3.5.1",
|
|
105
|
-
"svelte": "^5.
|
|
105
|
+
"svelte": "^5.56.0",
|
|
106
106
|
"svelte-check": "^4.4.8",
|
|
107
107
|
"svelte-docinfo": "^0.2.0",
|
|
108
108
|
"svelte2tsx": "^0.7.55",
|
|
109
109
|
"tslib": "^2.8.1",
|
|
110
110
|
"typescript": "^5.9.3",
|
|
111
|
-
"typescript-eslint": "^8.
|
|
111
|
+
"typescript-eslint": "^8.60.0",
|
|
112
112
|
"vite": "^7.3.1",
|
|
113
113
|
"vitest": "^4.0.15",
|
|
114
114
|
"zimmerframe": "^1.1.4",
|
package/src/lib/constants.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
// TODO the 60px is a hack, need `--docs_primary_nav_height` exported or :root values from Fuz -- the --space_lg also needs to be kept in sync
|
|
2
2
|
// see also the same issue in fuz_css
|
|
3
3
|
export const MAIN_HEADER_MARGIN_TOP = 'calc(60px + var(--space_lg))';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Fuz ecosystem home url, e.g. for `DocsFooter`'s `root_url`.
|
|
7
|
+
*/
|
|
8
|
+
export const FUZ_DEV_URL = 'https://www.fuz.dev/';
|
package/src/lib/logos.ts
CHANGED
package/src/lib/mdz_lexer.ts
CHANGED
|
@@ -603,7 +603,7 @@ export class MdzLexer {
|
|
|
603
603
|
const open_type = kind === 'italic' ? 'italic_open' : 'strikethrough_open';
|
|
604
604
|
const close_type = kind === 'italic' ? 'italic_close' : 'strikethrough_close';
|
|
605
605
|
const open_token_index = this.#tokens.length;
|
|
606
|
-
this.#tokens.push({type: open_type, start, end: this.#index}
|
|
606
|
+
this.#tokens.push({type: open_type, start, end: this.#index});
|
|
607
607
|
|
|
608
608
|
// Set search boundary for nested parsers
|
|
609
609
|
const saved_max = this.#max_search_index;
|
|
@@ -634,7 +634,7 @@ export class MdzLexer {
|
|
|
634
634
|
type: close_type,
|
|
635
635
|
start: close_index,
|
|
636
636
|
end: close_index + 1,
|
|
637
|
-
}
|
|
637
|
+
});
|
|
638
638
|
this.#index = close_index + 1;
|
|
639
639
|
} else {
|
|
640
640
|
// Convert opening to text
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type {Url} from '@fuzdev/fuz_util/url.js';
|
|
2
|
+
|
|
3
|
+
import {create_context} from './context_helpers.js';
|
|
4
|
+
import type {SvgData} from './svg.js';
|
|
5
|
+
|
|
6
|
+
export interface SiteStateOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The site's icon, e.g. a logo from `logos.ts`.
|
|
9
|
+
*/
|
|
10
|
+
icon?: SvgData | null;
|
|
11
|
+
/**
|
|
12
|
+
* The site's glyph, a single unicode character identifying the project.
|
|
13
|
+
*/
|
|
14
|
+
glyph?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The site's source repository url, e.g. for `DocsFooter` links.
|
|
17
|
+
*/
|
|
18
|
+
repo_url?: Url | null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Light site-identity values for app chrome - the icon, glyph, and repo url used
|
|
23
|
+
* by components like `Breadcrumb` and `DocsFooter`. Set once per app at the root
|
|
24
|
+
* layout. Distinct from `library_context`, which carries the heavy
|
|
25
|
+
* module/declaration metadata that only docs and API pages need.
|
|
26
|
+
*/
|
|
27
|
+
export class SiteState {
|
|
28
|
+
icon: SvgData | null = $state.raw(null);
|
|
29
|
+
glyph: string | null = $state.raw(null);
|
|
30
|
+
repo_url: Url | null = $state.raw(null);
|
|
31
|
+
|
|
32
|
+
constructor(options: SiteStateOptions = {}) {
|
|
33
|
+
this.icon = options.icon ?? null;
|
|
34
|
+
this.glyph = options.glyph ?? null;
|
|
35
|
+
this.repo_url = options.repo_url ?? null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const site_context = create_context<SiteState>();
|
package/src/lib/storage.ts
CHANGED
package/src/lib/svg.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
2
|
+
|
|
3
|
+
export interface SvgData {
|
|
4
|
+
/**
|
|
5
|
+
* Raw svg markup string that's inserted unsafely as a child of the `svg` element.
|
|
6
|
+
* This is an escape hatch for non-`path` markup -
|
|
7
|
+
* generally, you should instead use the `paths` property to avoid security/CSP implications.
|
|
8
|
+
*/
|
|
9
|
+
raw?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* List of svg `path` attribute objects. The `d` attribute is required.
|
|
12
|
+
*/
|
|
13
|
+
paths?: Array<{d: string} & SvelteHTMLElements['path']> | null;
|
|
14
|
+
attrs?: SvelteHTMLElements['svg'] | null;
|
|
15
|
+
fill?: string | null;
|
|
16
|
+
width?: string | null;
|
|
17
|
+
height?: string | null;
|
|
18
|
+
label?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Defaults to `"0 0 100 100"`.
|
|
21
|
+
*/
|
|
22
|
+
viewBox?: string | null;
|
|
23
|
+
}
|