@fuzdev/fuz_ui 0.177.0 โ 0.178.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 +9 -9
- package/dist/ApiDeclarationList.svelte +1 -1
- package/dist/ApiIndex.svelte +1 -1
- package/dist/ContextmenuRoot.svelte +2 -2
- package/dist/ContextmenuRootForSafariCompatibility.svelte +2 -2
- package/dist/DeclarationDetail.svelte +7 -7
- package/dist/DeclarationLink.svelte +5 -1
- package/dist/DeclarationLink.svelte.d.ts +2 -0
- package/dist/DeclarationLink.svelte.d.ts.map +1 -1
- package/dist/DocsContent.svelte +1 -1
- package/dist/DocsLink.svelte +5 -2
- package/dist/DocsLink.svelte.d.ts +2 -0
- package/dist/DocsLink.svelte.d.ts.map +1 -1
- package/dist/DocsPageLinks.svelte +1 -1
- package/dist/DocsSearch.svelte +2 -2
- package/dist/GithubLink.svelte +8 -5
- package/dist/GithubLink.svelte.d.ts +2 -0
- package/dist/GithubLink.svelte.d.ts.map +1 -1
- package/dist/Glyph.svelte +1 -1
- package/dist/ImgOrSvg.svelte +1 -1
- package/dist/LibraryDetail.svelte +1 -1
- package/dist/LibrarySummary.svelte +1 -1
- package/dist/MdnLink.svelte +9 -5
- package/dist/MdnLink.svelte.d.ts +2 -0
- package/dist/MdnLink.svelte.d.ts.map +1 -1
- package/dist/Mdz.svelte +1 -2
- package/dist/ModuleLink.svelte +5 -1
- package/dist/ModuleLink.svelte.d.ts +2 -0
- package/dist/ModuleLink.svelte.d.ts.map +1 -1
- package/dist/PendingAnimation.svelte +3 -4
- package/dist/PendingAnimation.svelte.d.ts.map +1 -1
- package/dist/ProjectLinks.svelte +2 -2
- package/dist/Svg.svelte +11 -3
- package/dist/Svg.svelte.d.ts.map +1 -1
- package/dist/TomeContent.svelte +3 -3
- package/dist/TomeLink.svelte +6 -1
- package/dist/TomeLink.svelte.d.ts +1 -0
- package/dist/TomeLink.svelte.d.ts.map +1 -1
- package/dist/TomeSectionHeader.svelte +3 -3
- package/dist/TypeLink.svelte +10 -3
- package/dist/TypeLink.svelte.d.ts +2 -0
- package/dist/TypeLink.svelte.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/contextmenu_helpers.d.ts.map +1 -1
- package/dist/contextmenu_helpers.js +6 -8
- package/dist/library.svelte.d.ts +1 -0
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/library_analysis.d.ts +1 -1
- package/dist/library_analysis.js +1 -1
- package/dist/library_gen.d.ts.map +1 -1
- package/dist/library_gen.js +1 -0
- package/dist/logos.js +1 -1
- package/dist/module_helpers.d.ts +2 -2
- package/dist/module_helpers.js +1 -1
- package/dist/tome.d.ts +3 -0
- package/dist/tome.d.ts.map +1 -1
- package/dist/tome.js +5 -1
- package/package.json +5 -4
- package/src/lib/constants.ts +1 -1
- package/src/lib/contextmenu_helpers.ts +3 -5
- package/src/lib/library_analysis.ts +1 -1
- package/src/lib/library_gen.ts +1 -0
- package/src/lib/logos.ts +1 -1
- package/src/lib/module_helpers.ts +2 -2
- package/src/lib/tome.ts +5 -1
package/README.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
> friendly user zystem ๐งถ [fuz.dev](https://ui.fuz.dev/)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
fuz_ui is a [Svelte](https://svelte.dev/) UI library
|
|
8
8
|
with components and helpers for making zippy websites.
|
|
9
9
|
It's in early alpha and it will go through many breaking changes.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
fuz_ui is being made to support
|
|
12
12
|
[my other projects](https://www.ryanatkn.com/)
|
|
13
13
|
that focus on end-users.
|
|
14
14
|
Fuz emphasizes capability and efficiency and tries to be simple for those goals.
|
|
@@ -19,9 +19,9 @@ Feel free to take the ideas and code for your own purposes.
|
|
|
19
19
|
|
|
20
20
|
The Svelte components and helpers:
|
|
21
21
|
|
|
22
|
-
- builds on [
|
|
22
|
+
- builds on [fuz_css](https://github.com/fuzdev/fuz_css)
|
|
23
23
|
- plain CSS and minimal abstraction
|
|
24
|
-
- near-zero dependencies except for Svelte, SvelteKit,
|
|
24
|
+
- near-zero dependencies except for Svelte, SvelteKit, fuz_css,
|
|
25
25
|
and my utility library [`@fuzdev/fuz_util`](https://github.com/fuzdev/fuz_util)
|
|
26
26
|
(not all components require SvelteKit but some do import its modules, needs more consideration)
|
|
27
27
|
- not a fully-featured enterprise-ready set of components,
|
|
@@ -36,7 +36,7 @@ The Svelte components and helpers:
|
|
|
36
36
|
> thank you see [contributing.md](contributing.md), your input is appreciated.
|
|
37
37
|
>
|
|
38
38
|
> If you feel comfortable looking at the source code,
|
|
39
|
-
>
|
|
39
|
+
> fuz_ui is ready to use in your own projects,
|
|
40
40
|
> with the major caveat that there will be a lot of breaking changes ahead.
|
|
41
41
|
> The code is significantly incomplete but I think it's stable enough to use
|
|
42
42
|
> if you're willing to keep up with the relatively fast-moving changelog.
|
|
@@ -45,17 +45,17 @@ The Svelte components and helpers:
|
|
|
45
45
|
npm i -D @fuzdev/fuz_ui
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Fuz uses my style framework [
|
|
48
|
+
Fuz uses my style framework [fuz_css](https://github.com/fuzdev/fuz_css).
|
|
49
49
|
Import modules at their full paths:
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
|
-
//
|
|
52
|
+
// fuz_css has one main plain CSS stylesheet:
|
|
53
53
|
import '@fuzdev/fuz_css/style.css';
|
|
54
54
|
|
|
55
|
-
// and import a
|
|
55
|
+
// and import a fuz_css theme:
|
|
56
56
|
import '@fuzdev/fuz_css/theme.css'; // or bring your own
|
|
57
57
|
|
|
58
|
-
// using Gro generates
|
|
58
|
+
// using Gro generates fuz_css' utility classes stylesheet by default:
|
|
59
59
|
import '$routes/fuz.css';
|
|
60
60
|
|
|
61
61
|
// then import Fuz Svelte components:
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
{#each declarations as declaration (`${declaration.module_path}:${declaration.name}`)}
|
|
26
26
|
<TomeSection>
|
|
27
27
|
<TomeSectionHeader text={declaration.name}>
|
|
28
|
-
<div class="
|
|
28
|
+
<div class="word-break:break-all">{declaration.name}</div>
|
|
29
29
|
</TomeSectionHeader>
|
|
30
30
|
<article id={declaration.name}>
|
|
31
31
|
<DeclarationDetail {declaration} />
|
package/dist/ApiIndex.svelte
CHANGED
|
@@ -267,8 +267,8 @@
|
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
const keyboard_handlers = contextmenu_create_keyboard_handlers(contextmenu);
|
|
271
|
-
const keydown = contextmenu_create_keydown_handler(keyboard_handlers);
|
|
270
|
+
const keyboard_handlers = $derived(contextmenu_create_keyboard_handlers(contextmenu));
|
|
271
|
+
const keydown = $derived(contextmenu_create_keydown_handler(keyboard_handlers));
|
|
272
272
|
</script>
|
|
273
273
|
|
|
274
274
|
<svelte:window
|
|
@@ -376,8 +376,8 @@
|
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
const keyboard_handlers = contextmenu_create_keyboard_handlers(contextmenu);
|
|
380
|
-
const keydown = contextmenu_create_keydown_handler(keyboard_handlers);
|
|
379
|
+
const keyboard_handlers = $derived(contextmenu_create_keyboard_handlers(contextmenu));
|
|
380
|
+
const keydown = $derived(contextmenu_create_keydown_handler(keyboard_handlers));
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
383
|
* Creates an attachment that registers touch event listeners with { passive: false }
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<!-- Metadata -->
|
|
15
|
-
<p class="row
|
|
15
|
+
<p class="row justify-content:space-between">
|
|
16
16
|
<ModuleLink module_path={declaration.module_path} />
|
|
17
17
|
{#if declaration.url_github}
|
|
18
18
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<!-- type signature -->
|
|
33
33
|
{#if declaration.type_signature}
|
|
34
|
-
<Code content={declaration.type_signature}
|
|
34
|
+
<Code lang="ts" content={declaration.type_signature} />
|
|
35
35
|
{/if}
|
|
36
36
|
|
|
37
37
|
<!-- documentation -->
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{/if}
|
|
64
64
|
{#if param.default_value}
|
|
65
65
|
<strong>default</strong>
|
|
66
|
-
<Code content={param.default_value}
|
|
66
|
+
<Code lang="ts" content={param.default_value} />
|
|
67
67
|
{/if}
|
|
68
68
|
</div>
|
|
69
69
|
{/if}
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
{/if}
|
|
100
100
|
{#if prop.default_value}
|
|
101
101
|
<strong>default</strong>
|
|
102
|
-
<Code content={prop.default_value}
|
|
102
|
+
<Code lang="ts" content={prop.default_value} />
|
|
103
103
|
{/if}
|
|
104
104
|
</div>
|
|
105
105
|
{/if}
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
{#if declaration.return_type}
|
|
113
113
|
<section>
|
|
114
114
|
<h4>returns</h4>
|
|
115
|
-
<Code content={declaration.return_type}
|
|
115
|
+
<Code lang="ts" content={declaration.return_type} />
|
|
116
116
|
{#if declaration.return_description}
|
|
117
117
|
<Mdz content={declaration.return_description} />
|
|
118
118
|
{/if}
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
{#each declaration.examples as example, i (example)}
|
|
204
204
|
<Details>
|
|
205
205
|
{#snippet summary()}Example {i + 1}{/snippet}
|
|
206
|
-
<Code content={example}
|
|
206
|
+
<Code lang="ts" content={example} />
|
|
207
207
|
</Details>
|
|
208
208
|
{/each}
|
|
209
209
|
</section>
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
{/if}
|
|
274
274
|
{#if param.default_value}
|
|
275
275
|
<strong>default</strong>
|
|
276
|
-
<Code content={param.default_value}
|
|
276
|
+
<Code lang="ts" content={param.default_value} />
|
|
277
277
|
{/if}
|
|
278
278
|
</div>
|
|
279
279
|
{/if}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
|
+
import {ensure_start} from '@fuzdev/fuz_util/string.js';
|
|
3
4
|
|
|
4
5
|
import {library_context} from './library.svelte.js';
|
|
5
6
|
import {contextmenu_attachment} from './contextmenu_state.svelte.js';
|
|
@@ -7,11 +8,14 @@
|
|
|
7
8
|
|
|
8
9
|
const {
|
|
9
10
|
name,
|
|
11
|
+
hash,
|
|
10
12
|
children,
|
|
11
13
|
class: class_prop = 'chip',
|
|
12
14
|
...rest
|
|
13
15
|
}: SvelteHTMLElements['a'] & {
|
|
14
16
|
name: string;
|
|
17
|
+
/** URL fragment to append, with or without the `#`. */
|
|
18
|
+
hash?: string;
|
|
15
19
|
} = $props();
|
|
16
20
|
|
|
17
21
|
const library = library_context.get();
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
<a
|
|
32
36
|
{...rest}
|
|
33
37
|
class="declaration_link {class_prop}"
|
|
34
|
-
href={declaration.url_api}
|
|
38
|
+
href={declaration.url_api + (hash ? ensure_start(hash, '#') : '')}
|
|
35
39
|
{@attach contextmenu_attachment(contextmenu_entries)}
|
|
36
40
|
>
|
|
37
41
|
{#if children}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
2
|
type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
3
3
|
name: string;
|
|
4
|
+
/** URL fragment to append, with or without the `#`. */
|
|
5
|
+
hash?: string;
|
|
4
6
|
};
|
|
5
7
|
declare const DeclarationLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
8
|
type DeclarationLink = ReturnType<typeof DeclarationLink>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclarationLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DeclarationLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAOvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAiDH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
package/dist/DocsContent.svelte
CHANGED
package/dist/DocsLink.svelte
CHANGED
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
const {
|
|
11
11
|
reference,
|
|
12
|
+
hash,
|
|
12
13
|
display_text,
|
|
13
14
|
children: children_prop,
|
|
14
15
|
}: {
|
|
15
16
|
reference: string;
|
|
17
|
+
/** URL fragment to append, with or without the `#`. */
|
|
18
|
+
hash?: string;
|
|
16
19
|
display_text?: string | null;
|
|
17
20
|
children?: Snippet<[Declaration | undefined, Module | undefined]>;
|
|
18
21
|
} = $props();
|
|
@@ -24,11 +27,11 @@
|
|
|
24
27
|
</script>
|
|
25
28
|
|
|
26
29
|
{#if declaration}
|
|
27
|
-
<DeclarationLink name={reference}>
|
|
30
|
+
<DeclarationLink name={reference} {hash}>
|
|
28
31
|
{@render children()}
|
|
29
32
|
</DeclarationLink>
|
|
30
33
|
{:else if module}
|
|
31
|
-
<ModuleLink module_path={module.path}>
|
|
34
|
+
<ModuleLink module_path={module.path} {hash}>
|
|
32
35
|
{@render children()}
|
|
33
36
|
</ModuleLink>
|
|
34
37
|
{:else}
|
|
@@ -3,6 +3,8 @@ import type { Declaration } from './declaration.svelte.js';
|
|
|
3
3
|
import type { Module } from './module.svelte.js';
|
|
4
4
|
type $$ComponentProps = {
|
|
5
5
|
reference: string;
|
|
6
|
+
/** URL fragment to append, with or without the `#`. */
|
|
7
|
+
hash?: string;
|
|
6
8
|
display_text?: string | null;
|
|
7
9
|
children?: Snippet<[Declaration | undefined, Module | undefined]>;
|
|
8
10
|
};
|
|
@@ -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;AAKpC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE9C,KAAK,gBAAgB,GAAI;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAClE,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;AAKpC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE9C,KAAK,gBAAgB,GAAI;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAClE,CAAC;AA0CH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
package/dist/DocsSearch.svelte
CHANGED
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
const has_search = $derived(search_query.trim().length > 0);
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
|
-
<label class="
|
|
26
|
+
<label class="display:block position:relative">
|
|
27
27
|
<input {...rest} type="search" {placeholder} bind:value={search_query} />
|
|
28
28
|
{#if has_search}
|
|
29
29
|
<button
|
|
30
30
|
type="button"
|
|
31
|
-
class="plain icon_button
|
|
31
|
+
class="plain icon_button position:absolute right:0 top:0"
|
|
32
32
|
onclick={() => {
|
|
33
33
|
search_query = '';
|
|
34
34
|
}}
|
package/dist/GithubLink.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {strip_start} from '@fuzdev/fuz_util/string.js';
|
|
2
|
+
import {ensure_start, strip_start} from '@fuzdev/fuz_util/string.js';
|
|
3
3
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
4
|
import {DEV} from 'esm-env';
|
|
5
5
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
path,
|
|
11
|
+
hash,
|
|
11
12
|
href: href_prop,
|
|
12
13
|
children,
|
|
13
14
|
...rest
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
* @example https://github.com/fuzdev/fuz_ui/issues/123
|
|
20
21
|
*/
|
|
21
22
|
path?: string;
|
|
23
|
+
/** URL fragment to append, with or without the `#`. */
|
|
24
|
+
hash?: string;
|
|
22
25
|
} = $props();
|
|
23
26
|
|
|
24
27
|
if (DEV) {
|
|
@@ -30,12 +33,12 @@
|
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
const href = $derived(
|
|
33
|
-
href_prop ??
|
|
36
|
+
(href_prop ??
|
|
34
37
|
(path
|
|
35
38
|
? path.startsWith('https://')
|
|
36
39
|
? path
|
|
37
40
|
: `https://github.com/${strip_start(path, '/')}`
|
|
38
|
-
: ''),
|
|
41
|
+
: '')) + (hash ? ensure_start(hash, '#') : ''),
|
|
39
42
|
);
|
|
40
43
|
|
|
41
44
|
// extract meaningful display text from the path
|
|
@@ -63,8 +66,8 @@
|
|
|
63
66
|
|
|
64
67
|
<!-- TODO -next-line doesnt work? -->
|
|
65
68
|
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
|
66
|
-
<a {...rest} {href} class="github_link
|
|
67
|
-
><Svg data={logo_github} inline size="var(--icon_size_xs)" class="mx_xs3
|
|
69
|
+
<a {...rest} {href} class="github_link white-space:nowrap {rest.class}" rel="noopener"
|
|
70
|
+
><Svg data={logo_github} inline size="var(--icon_size_xs)" class="mx_xs3 vertical-align:middle" />
|
|
68
71
|
{#if typeof final_children === 'string'}
|
|
69
72
|
<span class="font_family_mono">{final_children}</span>
|
|
70
73
|
{:else if final_children}
|
|
@@ -7,6 +7,8 @@ type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
|
7
7
|
* @example https://github.com/fuzdev/fuz_ui/issues/123
|
|
8
8
|
*/
|
|
9
9
|
path?: string;
|
|
10
|
+
/** URL fragment to append, with or without the `#`. */
|
|
11
|
+
hash?: string;
|
|
10
12
|
};
|
|
11
13
|
declare const GithubLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
14
|
type GithubLink = ReturnType<typeof GithubLink>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GithubLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/GithubLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAMvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"GithubLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/GithubLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAMvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAoEH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
package/dist/Glyph.svelte
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<span
|
|
20
20
|
{...rest}
|
|
21
|
-
class="glyph
|
|
21
|
+
class="glyph display:inline-block text-align:center line-height:1 white-space:nowrap font-weight:400 {rest.class}"
|
|
22
22
|
style:width={final_size}
|
|
23
23
|
style:height={final_size}
|
|
24
24
|
style:min-width={final_size}
|
package/dist/ImgOrSvg.svelte
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<div class="library_detail">
|
|
49
49
|
<!-- TODO maybe continue this snippet pattern, or maybe simplify? -->
|
|
50
50
|
<div class="info">
|
|
51
|
-
<div class="
|
|
51
|
+
<div class="display:flex flex:1">
|
|
52
52
|
<!-- add yet another wrapper so it flows like we want -->
|
|
53
53
|
<div>
|
|
54
54
|
<header>
|
package/dist/MdnLink.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {strip_end, strip_start} from '@fuzdev/fuz_util/string.js';
|
|
2
|
+
import {ensure_start, strip_end, strip_start} from '@fuzdev/fuz_util/string.js';
|
|
3
3
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
import Svg from './Svg.svelte';
|
|
@@ -7,16 +7,20 @@
|
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
path,
|
|
10
|
+
hash,
|
|
10
11
|
children,
|
|
11
12
|
...rest
|
|
12
13
|
}: SvelteHTMLElements['a'] & {
|
|
13
14
|
path: string;
|
|
15
|
+
/** URL fragment to append, with or without the `#`. */
|
|
16
|
+
hash?: string;
|
|
14
17
|
} = $props();
|
|
15
18
|
|
|
16
19
|
const href = $derived(
|
|
17
|
-
path.startsWith('https://')
|
|
20
|
+
(path.startsWith('https://')
|
|
18
21
|
? path
|
|
19
|
-
: `https://developer.mozilla.org/en-US/docs/${strip_start(path, '/')}
|
|
22
|
+
: `https://developer.mozilla.org/en-US/docs/${strip_start(path, '/')}`) +
|
|
23
|
+
(hash ? ensure_start(hash, '#') : ''),
|
|
20
24
|
);
|
|
21
25
|
|
|
22
26
|
const final_children = $derived(children ?? strip_end(path, '/').split('/').at(-1)!);
|
|
@@ -24,8 +28,8 @@
|
|
|
24
28
|
|
|
25
29
|
<!-- TODO -next-line doesnt work? -->
|
|
26
30
|
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
|
27
|
-
<a {...rest} {href} class="mdn_link
|
|
28
|
-
><Svg data={logo_mdn} inline size="var(--icon_size_xs)" class="mx_xs3
|
|
31
|
+
<a {...rest} {href} class="mdn_link white-space:nowrap {rest.class}" rel="noopener"
|
|
32
|
+
><Svg data={logo_mdn} inline size="var(--icon_size_xs)" class="mx_xs3 vertical-align:middle" />
|
|
29
33
|
{#if typeof final_children === 'string'}
|
|
30
34
|
<span class="font_family_mono">{final_children}</span>
|
|
31
35
|
{:else}
|
package/dist/MdnLink.svelte.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
2
|
type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
3
3
|
path: string;
|
|
4
|
+
/** URL fragment to append, with or without the `#`. */
|
|
5
|
+
hash?: string;
|
|
4
6
|
};
|
|
5
7
|
declare const MdnLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
8
|
type MdnLink = ReturnType<typeof MdnLink>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MdnLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdnLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MdnLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/MdnLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAoCH,QAAA,MAAM,OAAO,sDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
package/dist/Mdz.svelte
CHANGED
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
<svelte:element
|
|
22
22
|
this={inline ? 'span' : 'div'}
|
|
23
23
|
{...rest}
|
|
24
|
-
class
|
|
25
|
-
class:white_space_pre_wrap={!nowrap}
|
|
24
|
+
class="{rest.class} {nowrap ? 'white-space:pre' : 'white-space:pre-wrap'}"
|
|
26
25
|
>
|
|
27
26
|
{#each nodes as node (node)}
|
|
28
27
|
<MdzNodeView {node} />
|
package/dist/ModuleLink.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
|
+
import {ensure_start} from '@fuzdev/fuz_util/string.js';
|
|
3
4
|
|
|
4
5
|
import {library_context} from './library.svelte.js';
|
|
5
6
|
import {contextmenu_attachment} from './contextmenu_state.svelte.js';
|
|
@@ -7,11 +8,14 @@
|
|
|
7
8
|
|
|
8
9
|
const {
|
|
9
10
|
module_path,
|
|
11
|
+
hash,
|
|
10
12
|
children,
|
|
11
13
|
class: class_prop = 'chip',
|
|
12
14
|
...rest
|
|
13
15
|
}: SvelteHTMLElements['a'] & {
|
|
14
16
|
module_path: string; // TODO maybe rename?
|
|
17
|
+
/** URL fragment to append, with or without the `#`. */
|
|
18
|
+
hash?: string;
|
|
15
19
|
} = $props();
|
|
16
20
|
|
|
17
21
|
const library = library_context.get();
|
|
@@ -28,7 +32,7 @@
|
|
|
28
32
|
<a
|
|
29
33
|
{...rest}
|
|
30
34
|
class="module_link {class_prop}"
|
|
31
|
-
href={module.url_api}
|
|
35
|
+
href={module.url_api + (hash ? ensure_start(hash, '#') : '')}
|
|
32
36
|
{@attach contextmenu_attachment(contextmenu_entries)}
|
|
33
37
|
>
|
|
34
38
|
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
2
|
type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
3
3
|
module_path: string;
|
|
4
|
+
/** URL fragment to append, with or without the `#`. */
|
|
5
|
+
hash?: string;
|
|
4
6
|
};
|
|
5
7
|
declare const ModuleLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
8
|
type ModuleLink = ReturnType<typeof ModuleLink>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModuleLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ModuleLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModuleLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAOvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AA+CH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
<span
|
|
23
23
|
{...rest}
|
|
24
|
-
class="pending_animation {rest.class}
|
|
24
|
+
class="pending_animation {rest.class} {inline
|
|
25
|
+
? 'display:inline-flex align-items:center'
|
|
26
|
+
: 'display:flex'}"
|
|
25
27
|
class:running
|
|
26
|
-
class:display_flex={!inline}
|
|
27
|
-
class:display_inline_flex={inline}
|
|
28
|
-
class:align_items_center={inline}
|
|
29
28
|
><span {...item_attrs} style:animation-delay="0s"
|
|
30
29
|
>{#if children}{@render children(0)}{:else}โข{/if}</span
|
|
31
30
|
><span {...item_attrs} style:animation-delay="0.09s"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PendingAnimation.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PendingAnimation.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;AAEvD,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,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEvD,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;AAyBH,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
package/dist/ProjectLinks.svelte
CHANGED
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
|
47
47
|
<a class="thumbnail row bg px_md py_xs border_radius_sm mb_lg" href={project_item.url}
|
|
48
48
|
><Svg shrink={false} data={project_item.logo} size="var(--icon_size_lg)" />
|
|
49
|
-
<div class="pl_lg
|
|
49
|
+
<div class="pl_lg width_atmost_sm">
|
|
50
50
|
<div class="thumbnail_name {project_item.color_class}">{project_item.name}</div>
|
|
51
|
-
<div class="thumbnail_description font_size_md text_color_3
|
|
51
|
+
<div class="thumbnail_description font_size_md text_color_3 font-weight:500">
|
|
52
52
|
{project_item.description}
|
|
53
53
|
{project_item.glyph}
|
|
54
54
|
</div>
|
package/dist/Svg.svelte
CHANGED
|
@@ -81,11 +81,10 @@
|
|
|
81
81
|
{...data.attrs}
|
|
82
82
|
{...rest}
|
|
83
83
|
aria-label={label ?? data.label}
|
|
84
|
-
class
|
|
85
|
-
class:
|
|
84
|
+
class="{data.attrs?.class} {rest.class}"
|
|
85
|
+
class:inline
|
|
86
86
|
style:width={final_width}
|
|
87
87
|
style:height={final_height}
|
|
88
|
-
style:top={inline ? '0.1em' : undefined}
|
|
89
88
|
style:flex-shrink={shrink ? 1 : 0}
|
|
90
89
|
{style}
|
|
91
90
|
>
|
|
@@ -96,3 +95,12 @@
|
|
|
96
95
|
{/each}
|
|
97
96
|
{/if}
|
|
98
97
|
</svg>
|
|
98
|
+
|
|
99
|
+
<style>
|
|
100
|
+
.inline {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
position: relative;
|
|
103
|
+
/* TODO idk about this, but vertical align doesnt seem quite right either */
|
|
104
|
+
top: 0.1em;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
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":"AAIC,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;AAED,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;
|
|
1
|
+
{"version":3,"file":"Svg.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Svg.svelte"],"names":[],"mappings":"AAIC,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;AAED,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;AA2CH,QAAA,MAAM,GAAG,sDAAwC,CAAC;AAClD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAClC,eAAe,GAAG,CAAC"}
|
package/dist/TomeContent.svelte
CHANGED
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
|
|
25
25
|
tome_context.set(tome); // TODO make reactive?
|
|
26
26
|
|
|
27
|
-
const fragment = docs_slugify(tome.name);
|
|
27
|
+
const fragment = $derived(docs_slugify(tome.name));
|
|
28
28
|
|
|
29
29
|
const at_root = $derived(page.url.pathname === resolve(docs_path as any));
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<section
|
|
33
|
-
class="tome_content
|
|
33
|
+
class="tome_content width_atmost_md mb_xl9"
|
|
34
34
|
{@attach intersect(() =>
|
|
35
35
|
at_root
|
|
36
36
|
? ({intersecting}) => {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
)}
|
|
45
45
|
>
|
|
46
46
|
<header
|
|
47
|
-
class="mb_xl3
|
|
47
|
+
class="mb_xl3 position:sticky top:0"
|
|
48
48
|
{@attach intersect(() =>
|
|
49
49
|
at_root
|
|
50
50
|
? null
|
package/dist/TomeLink.svelte
CHANGED
|
@@ -15,10 +15,15 @@
|
|
|
15
15
|
}: SvelteHTMLElements['a'] & {
|
|
16
16
|
name: string; // TODO type, generate from `tomes`?
|
|
17
17
|
docs_path?: string;
|
|
18
|
+
/** URL fragment to append, with or without the `#`. */
|
|
18
19
|
hash?: string;
|
|
19
20
|
} = $props();
|
|
20
21
|
|
|
21
|
-
if (DEV)
|
|
22
|
+
if (DEV) {
|
|
23
|
+
$effect(() => {
|
|
24
|
+
get_tome_by_name(name); // throws if not found
|
|
25
|
+
});
|
|
26
|
+
}
|
|
22
27
|
|
|
23
28
|
// TODO add contextmenu behavior
|
|
24
29
|
</script>
|
|
@@ -2,6 +2,7 @@ import type { SvelteHTMLElements } from 'svelte/elements';
|
|
|
2
2
|
type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
3
3
|
name: string;
|
|
4
4
|
docs_path?: string;
|
|
5
|
+
/** URL fragment to append, with or without the `#`. */
|
|
5
6
|
hash?: string;
|
|
6
7
|
};
|
|
7
8
|
declare const TomeLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TomeLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TomeLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"TomeLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TomeLink.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AA+BH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
children?: Snippet;
|
|
25
25
|
} = $props();
|
|
26
26
|
|
|
27
|
-
const fragment = docs_slugify(text);
|
|
27
|
+
const fragment = $derived(docs_slugify(text));
|
|
28
28
|
|
|
29
29
|
const register_section_header = register_section_header_context.get();
|
|
30
30
|
if (!register_section_header) {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
// Auto-detect tag based on depth if not explicitly provided
|
|
37
37
|
const depth = section_depth_context.get();
|
|
38
|
-
const final_tag = tag ?? (depth === 1 ? 'h2' : depth === 2 ? 'h3' : 'h4');
|
|
38
|
+
const final_tag = $derived(tag ?? (depth === 1 ? 'h2' : depth === 2 ? 'h3' : 'h4'));
|
|
39
39
|
|
|
40
40
|
// Get own section's ID from context
|
|
41
41
|
const my_section_id = section_id_context.get();
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
|
|
66
66
|
<header>
|
|
67
67
|
<svelte:element this={final_tag} {...rest} class:tome_section_header={true}>
|
|
68
|
-
<div class="
|
|
68
|
+
<div class="flex:1">
|
|
69
69
|
{#if children}
|
|
70
70
|
{@render children()}
|
|
71
71
|
{:else}
|
package/dist/TypeLink.svelte
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
import DeclarationLink from './DeclarationLink.svelte';
|
|
5
5
|
import {library_context} from './library.svelte.js';
|
|
6
6
|
|
|
7
|
-
const {
|
|
7
|
+
const {
|
|
8
|
+
type,
|
|
9
|
+
hash,
|
|
10
|
+
}: {
|
|
11
|
+
type: string;
|
|
12
|
+
/** URL fragment to append, with or without the `#`. */
|
|
13
|
+
hash?: string;
|
|
14
|
+
} = $props();
|
|
8
15
|
|
|
9
16
|
const library = library_context.get();
|
|
10
17
|
|
|
@@ -13,7 +20,7 @@
|
|
|
13
20
|
</script>
|
|
14
21
|
|
|
15
22
|
{#if library.lookup_declaration(type)}
|
|
16
|
-
<DeclarationLink name={type} />
|
|
23
|
+
<DeclarationLink name={type} {hash} />
|
|
17
24
|
{:else}
|
|
18
|
-
<Code
|
|
25
|
+
<Code lang="ts" content={type} inline />
|
|
19
26
|
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TypeLink.svelte"],"names":[],"mappings":"AAQC,KAAK,gBAAgB,GAAI;
|
|
1
|
+
{"version":3,"file":"TypeLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/TypeLink.svelte"],"names":[],"mappings":"AAQC,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AA0BH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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
|
-
// see also the same issue in
|
|
2
|
+
// see also the same issue in fuz_css
|
|
3
3
|
export const MAIN_HEADER_MARGIN_TOP = 'calc(60px + var(--space_lg))';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextmenu_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/contextmenu_helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAGpE,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,yCAAyC,KAAK,CAAC;AAC5D,eAAO,MAAM,sCAAsC,MAAM,CAAC;AAC1D,eAAO,MAAM,4CAA4C,KAAK,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACvC,QAAQ,WAAW,GAAG,IAAI,EAC1B,UAAU,OAAO,KACf,MAAM,IAAI,WAAW,GAAG,UAIF,CAAC;AAI1B,eAAO,MAAM,oCAAoC,GAChD,aAAa,gBAAgB,KAC3B,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,CAWtB,CAAC;AAEJ,eAAO,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"contextmenu_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/contextmenu_helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAGpE,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,yCAAyC,KAAK,CAAC;AAC5D,eAAO,MAAM,sCAAsC,MAAM,CAAC;AAC1D,eAAO,MAAM,4CAA4C,KAAK,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACvC,QAAQ,WAAW,GAAG,IAAI,EAC1B,UAAU,OAAO,KACf,MAAM,IAAI,WAAW,GAAG,UAIF,CAAC;AAI1B,eAAO,MAAM,oCAAoC,GAChD,aAAa,gBAAgB,KAC3B,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,CAWtB,CAAC;AAEJ,eAAO,MAAM,kCAAkC,GAC7C,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,KAAG,CAAC,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAMxE,CAAC;AAEH,eAAO,MAAM,mCAAmC,GAC/C,QAAQ,MAAM,EACd,YAAY,MAAM,EAClB,cAAc,MAAM,KAClB,MAAoE,CAAC;AAExE,eAAO,MAAM,mCAAmC,GAC/C,QAAQ,MAAM,EACd,aAAa,MAAM,EACnB,eAAe,MAAM,KACnB,MAAsE,CAAC"}
|
|
@@ -26,14 +26,12 @@ export const contextmenu_create_keyboard_handlers = (contextmenu) => new Map([
|
|
|
26
26
|
[' ', () => contextmenu.activate_selected()],
|
|
27
27
|
['Enter', () => contextmenu.activate_selected()],
|
|
28
28
|
]);
|
|
29
|
-
export const contextmenu_create_keydown_handler = (keyboard_handlers) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
handler();
|
|
36
|
-
};
|
|
29
|
+
export const contextmenu_create_keydown_handler = (keyboard_handlers) => (e) => {
|
|
30
|
+
const handler = keyboard_handlers.get(e.key);
|
|
31
|
+
if (!handler || is_editable(e.target))
|
|
32
|
+
return;
|
|
33
|
+
swallow(e);
|
|
34
|
+
handler();
|
|
37
35
|
};
|
|
38
36
|
export const contextmenu_calculate_constrained_x = (menu_x, menu_width, layout_width) => menu_x + Math.min(0, layout_width - (menu_x + menu_width));
|
|
39
37
|
export const contextmenu_calculate_constrained_y = (menu_y, menu_height, layout_height) => menu_y + Math.min(0, layout_height - (menu_y + menu_height));
|
package/dist/library.svelte.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C;;;;;;;;GAQG;AACH,qBAAa,OAAO;IACnB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAiB;IAEnD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4C;IACxD,WAAW
|
|
1
|
+
{"version":3,"file":"library.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C;;;;;;;;GAQG;AACH,qBAAa,OAAO;IACnB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAiB;IAEnD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4C;IACxD,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA2C;IAEtD,IAAI,SAAoC;IACxC,SAAS,SAAyC;IAClD,QAAQ,wCAAwC;IAChD,UAAU,gBAA0C;IACpD,YAAY,+CAA4C;IACxD,QAAQ,+CAAwC;IAChD,QAAQ,SAAwC;IAChD,OAAO,+CAAuC;IAC9C,aAAa,+CAA6C;IAC1D,SAAS,UAAyC;IAElD;;OAEG;IACH,OAAO,gBAML;IAEF;;OAEG;IACH,OAAO,WAIL;IAEF;;OAEG;IACH,cAAc,WAA4E;IAE1F;;OAEG;IACH,YAAY,gBAAmE;IAE/E;;OAEG;IACH,eAAe,2BAAgE;gBAEnE,YAAY,EAAE,WAAW;IAIrC;;OAEG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIzD;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAItC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/C;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC;CAGtD;AAED,eAAO,MAAM,eAAe;;;;CAA4B,CAAC"}
|
|
@@ -91,7 +91,7 @@ export interface ModuleAnalysis {
|
|
|
91
91
|
* Analyze a source file and extract module metadata.
|
|
92
92
|
*
|
|
93
93
|
* Unified entry point that dispatches to the appropriate analyzer based on file type:
|
|
94
|
-
* - TypeScript/
|
|
94
|
+
* - TypeScript/JS files โ `ts_analyze_module`
|
|
95
95
|
* - Svelte components โ `svelte_analyze_module`
|
|
96
96
|
*
|
|
97
97
|
* Returns raw analysis data including `nodocs` flags on declarations.
|
package/dist/library_analysis.js
CHANGED
|
@@ -50,7 +50,7 @@ import { module_extract_path, } from './module_helpers.js';
|
|
|
50
50
|
* Analyze a source file and extract module metadata.
|
|
51
51
|
*
|
|
52
52
|
* Unified entry point that dispatches to the appropriate analyzer based on file type:
|
|
53
|
-
* - TypeScript/
|
|
53
|
+
* - TypeScript/JS files โ `ts_analyze_module`
|
|
54
54
|
* - Svelte components โ `svelte_analyze_module`
|
|
55
55
|
*
|
|
56
56
|
* Returns raw analysis data including `nodocs` flags on declarations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library_gen.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library_gen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAExD,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAmB,KAAK,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAElF,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IACjC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5D;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,QAAQ,KAAG,cAY9D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2CAA2C,GACvD,WAAW,QAAQ,CAAC,QAAQ,CAAC,EAC7B,SAAS,mBAAmB,EAC5B,MAAM;IAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;CAAC,KACtF,KAAK,CAAC,cAAc,CA6BtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,iBAAiB,KAAG,
|
|
1
|
+
{"version":3,"file":"library_gen.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library_gen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAExD,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAmB,KAAK,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAElF,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IACjC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5D;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,QAAQ,KAAG,cAY9D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2CAA2C,GACvD,WAAW,QAAQ,CAAC,QAAQ,CAAC,EAC7B,SAAS,mBAAmB,EAC5B,MAAM;IAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;CAAC,KACtF,KAAK,CAAC,cAAc,CA6BtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,iBAAiB,KAAG,GA2CzD,CAAC"}
|
package/dist/library_gen.js
CHANGED
|
@@ -91,6 +91,7 @@ export const library_collect_source_files_from_disknodes = (disknodes, options,
|
|
|
91
91
|
*/
|
|
92
92
|
export const library_gen = (options) => {
|
|
93
93
|
return {
|
|
94
|
+
dependencies: 'all',
|
|
94
95
|
generate: async ({ log, filer }) => {
|
|
95
96
|
log.info('generating library metadata with full TypeScript analysis...');
|
|
96
97
|
// Build source options with project_root from cwd
|
package/dist/logos.js
CHANGED
|
@@ -9,7 +9,7 @@ Logo colors are the midpoint between the light and dark versions of color varian
|
|
|
9
9
|
--color_c: #d93636;
|
|
10
10
|
--color_d: #8866cc;
|
|
11
11
|
--color_e: #d8bc31;
|
|
12
|
-
--color_f: #84522a; // TODO this one isn't the midpoint bc
|
|
12
|
+
--color_f: #84522a; // TODO this one isn't the midpoint bc fuz_css's color needs tweaking, too light in dark mode
|
|
13
13
|
--color_g: #e55d95;
|
|
14
14
|
--color_h: #f4672f;
|
|
15
15
|
--color_i: #36e2e2;
|
package/dist/module_helpers.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* Analyzer type for source files.
|
|
13
13
|
*
|
|
14
|
-
* - `'typescript'` - TypeScript/
|
|
14
|
+
* - `'typescript'` - TypeScript/JS files analyzed via TypeScript Compiler API
|
|
15
15
|
* - `'svelte'` - Svelte components analyzed via svelte2tsx + TypeScript Compiler API
|
|
16
16
|
*/
|
|
17
17
|
export type AnalyzerType = 'typescript' | 'svelte';
|
|
@@ -243,7 +243,7 @@ export declare const module_get_component_name: (module_path: string) => string;
|
|
|
243
243
|
*/
|
|
244
244
|
export declare const module_get_key: (module_path: string) => string;
|
|
245
245
|
/**
|
|
246
|
-
* Check if a path is a TypeScript or
|
|
246
|
+
* Check if a path is a TypeScript or JS file.
|
|
247
247
|
*
|
|
248
248
|
* Includes both `.ts` and `.js` files since JS files are valid in TS projects.
|
|
249
249
|
* Excludes `.d.ts` declaration files - use a custom `get_analyzer` to include them.
|
package/dist/module_helpers.js
CHANGED
|
@@ -213,7 +213,7 @@ export const module_get_component_name = (module_path) => module_path.replace(/^
|
|
|
213
213
|
*/
|
|
214
214
|
export const module_get_key = (module_path) => `./${module_path}`;
|
|
215
215
|
/**
|
|
216
|
-
* Check if a path is a TypeScript or
|
|
216
|
+
* Check if a path is a TypeScript or JS file.
|
|
217
217
|
*
|
|
218
218
|
* Includes both `.ts` and `.js` files since JS files are valid in TS projects.
|
|
219
219
|
* Excludes `.d.ts` declaration files - use a custom `get_analyzer` to include them.
|
package/dist/tome.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export declare const Tome: z.ZodObject<{
|
|
|
9
9
|
related_declarations: z.ZodArray<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type Tome = z.infer<typeof Tome>;
|
|
12
|
+
/**
|
|
13
|
+
* @param hash - URL fragment to append, with or without the `#`.
|
|
14
|
+
*/
|
|
12
15
|
export declare const to_tome_pathname: (item: Tome | string, docs_path?: string, hash?: string) => string;
|
|
13
16
|
export declare const tomes_context: {
|
|
14
17
|
get: (error_message?: string) => Map<string, {
|
package/dist/tome.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tome.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tome.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,eAAO,MAAM,IAAI;;;;;;;iBAQf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC5B,MAAM,IAAI,GAAG,MAAM,EACnB,kBAA6B,EAC7B,OAAO,MAAM,KACX,MAIF,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,IAK/C,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAyB,CAAC"}
|
package/dist/tome.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolve } from '$app/paths';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { ensure_start } from '@fuzdev/fuz_util/string.js';
|
|
3
4
|
import { create_context } from './context_helpers.js';
|
|
4
5
|
import { DOCS_PATH_DEFAULT, docs_slugify } from './docs_helpers.svelte.js';
|
|
5
6
|
export const Tome = z.object({
|
|
@@ -11,10 +12,13 @@ export const Tome = z.object({
|
|
|
11
12
|
related_modules: z.array(z.string()),
|
|
12
13
|
related_declarations: z.array(z.string()),
|
|
13
14
|
});
|
|
15
|
+
/**
|
|
16
|
+
* @param hash - URL fragment to append, with or without the `#`.
|
|
17
|
+
*/
|
|
14
18
|
export const to_tome_pathname = (item, docs_path = DOCS_PATH_DEFAULT, hash) => {
|
|
15
19
|
const name = typeof item === 'string' ? item : item.name;
|
|
16
20
|
const path = docs_path + '/' + docs_slugify(name);
|
|
17
|
-
return resolve((hash ? path + '#'
|
|
21
|
+
return resolve((hash ? path + ensure_start(hash, '#') : path));
|
|
18
22
|
};
|
|
19
23
|
export const tomes_context = create_context();
|
|
20
24
|
export const get_tome_by_name = (name) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.178.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"motto": "friendly user zystem",
|
|
6
6
|
"glyph": "๐งถ",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@changesets/changelog-git": "^0.2.1",
|
|
64
|
-
"@fuzdev/fuz_code": "^0.
|
|
65
|
-
"@fuzdev/fuz_css": "^0.
|
|
66
|
-
"@fuzdev/fuz_util": "^0.45.
|
|
64
|
+
"@fuzdev/fuz_code": "^0.39.0",
|
|
65
|
+
"@fuzdev/fuz_css": "^0.44.0",
|
|
66
|
+
"@fuzdev/fuz_util": "^0.45.3",
|
|
67
67
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
68
68
|
"@ryanatkn/eslint-config": "^0.9.0",
|
|
69
69
|
"@ryanatkn/gro": "^0.183.0",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@sveltejs/package": "^2.5.7",
|
|
73
73
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
74
74
|
"@types/node": "^24.10.1",
|
|
75
|
+
"@webref/css": "^8.2.0",
|
|
75
76
|
"eslint": "^9.39.1",
|
|
76
77
|
"eslint-plugin-svelte": "^3.13.1",
|
|
77
78
|
"esm-env": "^1.2.2",
|
package/src/lib/constants.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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
|
-
// see also the same issue in
|
|
2
|
+
// see also the same issue in fuz_css
|
|
3
3
|
export const MAIN_HEADER_MARGIN_TOP = 'calc(60px + var(--space_lg))';
|
|
@@ -39,16 +39,14 @@ export const contextmenu_create_keyboard_handlers = (
|
|
|
39
39
|
['Enter', () => contextmenu.activate_selected()],
|
|
40
40
|
]);
|
|
41
41
|
|
|
42
|
-
export const contextmenu_create_keydown_handler =
|
|
43
|
-
keyboard_handlers: Map<string, () => void
|
|
44
|
-
|
|
45
|
-
return (e: KeyboardEvent): void => {
|
|
42
|
+
export const contextmenu_create_keydown_handler =
|
|
43
|
+
(keyboard_handlers: Map<string, () => void>): ((e: KeyboardEvent) => void) =>
|
|
44
|
+
(e: KeyboardEvent): void => {
|
|
46
45
|
const handler = keyboard_handlers.get(e.key);
|
|
47
46
|
if (!handler || is_editable(e.target)) return;
|
|
48
47
|
swallow(e);
|
|
49
48
|
handler();
|
|
50
49
|
};
|
|
51
|
-
};
|
|
52
50
|
|
|
53
51
|
export const contextmenu_calculate_constrained_x = (
|
|
54
52
|
menu_x: number,
|
|
@@ -103,7 +103,7 @@ export interface ModuleAnalysis {
|
|
|
103
103
|
* Analyze a source file and extract module metadata.
|
|
104
104
|
*
|
|
105
105
|
* Unified entry point that dispatches to the appropriate analyzer based on file type:
|
|
106
|
-
* - TypeScript/
|
|
106
|
+
* - TypeScript/JS files โ `ts_analyze_module`
|
|
107
107
|
* - Svelte components โ `svelte_analyze_module`
|
|
108
108
|
*
|
|
109
109
|
* Returns raw analysis data including `nodocs` flags on declarations.
|
package/src/lib/library_gen.ts
CHANGED
|
@@ -150,6 +150,7 @@ export const library_collect_source_files_from_disknodes = (
|
|
|
150
150
|
*/
|
|
151
151
|
export const library_gen = (options?: LibraryGenOptions): Gen => {
|
|
152
152
|
return {
|
|
153
|
+
dependencies: 'all',
|
|
153
154
|
generate: async ({log, filer}) => {
|
|
154
155
|
log.info('generating library metadata with full TypeScript analysis...');
|
|
155
156
|
|
package/src/lib/logos.ts
CHANGED
|
@@ -12,7 +12,7 @@ Logo colors are the midpoint between the light and dark versions of color varian
|
|
|
12
12
|
--color_c: #d93636;
|
|
13
13
|
--color_d: #8866cc;
|
|
14
14
|
--color_e: #d8bc31;
|
|
15
|
-
--color_f: #84522a; // TODO this one isn't the midpoint bc
|
|
15
|
+
--color_f: #84522a; // TODO this one isn't the midpoint bc fuz_css's color needs tweaking, too light in dark mode
|
|
16
16
|
--color_g: #e55d95;
|
|
17
17
|
--color_h: #f4672f;
|
|
18
18
|
--color_i: #36e2e2;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* Analyzer type for source files.
|
|
14
14
|
*
|
|
15
|
-
* - `'typescript'` - TypeScript/
|
|
15
|
+
* - `'typescript'` - TypeScript/JS files analyzed via TypeScript Compiler API
|
|
16
16
|
* - `'svelte'` - Svelte components analyzed via svelte2tsx + TypeScript Compiler API
|
|
17
17
|
*/
|
|
18
18
|
export type AnalyzerType = 'typescript' | 'svelte';
|
|
@@ -362,7 +362,7 @@ export const module_get_component_name = (module_path: string): string =>
|
|
|
362
362
|
export const module_get_key = (module_path: string): string => `./${module_path}`;
|
|
363
363
|
|
|
364
364
|
/**
|
|
365
|
-
* Check if a path is a TypeScript or
|
|
365
|
+
* Check if a path is a TypeScript or JS file.
|
|
366
366
|
*
|
|
367
367
|
* Includes both `.ts` and `.js` files since JS files are valid in TS projects.
|
|
368
368
|
* Excludes `.d.ts` declaration files - use a custom `get_analyzer` to include them.
|
package/src/lib/tome.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {resolve} from '$app/paths';
|
|
2
2
|
import type {Component} from 'svelte';
|
|
3
3
|
import {z} from 'zod';
|
|
4
|
+
import {ensure_start} from '@fuzdev/fuz_util/string.js';
|
|
4
5
|
|
|
5
6
|
import {create_context} from './context_helpers.js';
|
|
6
7
|
import {DOCS_PATH_DEFAULT, docs_slugify} from './docs_helpers.svelte.js';
|
|
@@ -16,6 +17,9 @@ export const Tome = z.object({
|
|
|
16
17
|
});
|
|
17
18
|
export type Tome = z.infer<typeof Tome>;
|
|
18
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @param hash - URL fragment to append, with or without the `#`.
|
|
22
|
+
*/
|
|
19
23
|
export const to_tome_pathname = (
|
|
20
24
|
item: Tome | string,
|
|
21
25
|
docs_path = DOCS_PATH_DEFAULT,
|
|
@@ -23,7 +27,7 @@ export const to_tome_pathname = (
|
|
|
23
27
|
): string => {
|
|
24
28
|
const name = typeof item === 'string' ? item : item.name;
|
|
25
29
|
const path = docs_path + '/' + docs_slugify(name);
|
|
26
|
-
return resolve((hash ? path + '#'
|
|
30
|
+
return resolve((hash ? path + ensure_start(hash, '#') : path) as any);
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
export const tomes_context = create_context<Map<string, Tome>>();
|