@fuzdev/fuz_ui 0.197.0 → 0.198.1
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 +5 -3
- package/dist/DeclarationLink.svelte +12 -3
- package/dist/DeclarationLink.svelte.d.ts +6 -0
- package/dist/DeclarationLink.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +9 -2
- package/dist/LibraryDetail.svelte.d.ts +6 -0
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/ModuleLink.svelte +12 -3
- package/dist/ModuleLink.svelte.d.ts +6 -0
- package/dist/ModuleLink.svelte.d.ts.map +1 -1
- package/dist/ProjectLinks.svelte +2 -0
- package/dist/ProjectLinks.svelte.d.ts.map +1 -1
- package/dist/library_helpers.d.ts +0 -30
- package/dist/library_helpers.d.ts.map +1 -1
- package/dist/library_helpers.js +0 -36
- package/dist/logos.d.ts +7 -0
- package/dist/logos.d.ts.map +1 -1
- package/dist/logos.js +9 -0
- package/dist/module.svelte.d.ts +7 -0
- package/dist/module.svelte.d.ts.map +1 -1
- package/dist/module.svelte.js +9 -0
- package/package.json +2 -2
- package/src/lib/library_helpers.ts +0 -45
- package/src/lib/logos.ts +10 -0
- package/src/lib/module.svelte.ts +12 -0
package/README.md
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
> friendly user zystem 🧶 [fuz.dev](https://ui.fuz.dev/)
|
|
6
6
|
|
|
7
|
-
fuz_ui is a
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
fuz_ui is a Svelte UI library with components and helpers for making zippy
|
|
8
|
+
websites. It's built on [fuz_css](https://css.fuz.dev/)
|
|
9
|
+
and provides includes a documentation system built on
|
|
10
|
+
[svelte-docinfo](https://svelte-docinfo.fuz.dev/).
|
|
11
|
+
It's in early alpha with breaking changes ahead.
|
|
10
12
|
|
|
11
13
|
fuz_ui is being made to support
|
|
12
14
|
[my other projects](https://www.ryanatkn.com/)
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
const {
|
|
10
10
|
name,
|
|
11
11
|
hash,
|
|
12
|
+
full = false,
|
|
12
13
|
children,
|
|
13
14
|
class: class_prop = 'chip',
|
|
14
15
|
...rest
|
|
@@ -16,17 +17,25 @@
|
|
|
16
17
|
name: string;
|
|
17
18
|
/** URL fragment to append, with or without the `#`. */
|
|
18
19
|
hash?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Link to the library's own deployed docs (`url_api_full`) instead of a
|
|
22
|
+
* site-local path (`url_api`). Use when rendering a foreign library on a
|
|
23
|
+
* different site, e.g. an aggregator, so links don't dangle locally.
|
|
24
|
+
*/
|
|
25
|
+
full?: boolean;
|
|
19
26
|
} = $props();
|
|
20
27
|
|
|
21
28
|
const library = library_context.get();
|
|
22
29
|
|
|
23
30
|
const declaration = $derived(library.declaration_by_name.get(name));
|
|
24
31
|
|
|
32
|
+
// When linking a foreign library's docs, prefer its full URL; fall back to
|
|
33
|
+
// the site-local path if `homepage_url` is unavailable.
|
|
34
|
+
const url_api = $derived((full && declaration?.url_api_full) || declaration?.url_api);
|
|
35
|
+
|
|
25
36
|
const contextmenu_entries = $derived(
|
|
26
37
|
declaration ? create_declaration_contextmenu(declaration) : undefined,
|
|
27
38
|
);
|
|
28
|
-
|
|
29
|
-
// TODO @many support full https:// url variants - automatic detection? library prop?
|
|
30
39
|
</script>
|
|
31
40
|
|
|
32
41
|
{#if declaration}
|
|
@@ -35,7 +44,7 @@
|
|
|
35
44
|
<a
|
|
36
45
|
{...rest}
|
|
37
46
|
class="declaration-link {class_prop}"
|
|
38
|
-
href={
|
|
47
|
+
href={url_api + (hash ? ensure_start(hash, '#') : '')}
|
|
39
48
|
{@attach contextmenu_attachment(contextmenu_entries)}
|
|
40
49
|
>
|
|
41
50
|
{#if children}
|
|
@@ -3,6 +3,12 @@ type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
|
3
3
|
name: string;
|
|
4
4
|
/** URL fragment to append, with or without the `#`. */
|
|
5
5
|
hash?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Link to the library's own deployed docs (`url_api_full`) instead of a
|
|
8
|
+
* site-local path (`url_api`). Use when rendering a foreign library on a
|
|
9
|
+
* different site, e.g. an aggregator, so links don't dangle locally.
|
|
10
|
+
*/
|
|
11
|
+
full?: boolean;
|
|
6
12
|
};
|
|
7
13
|
declare const DeclarationLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
14
|
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;AAOvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,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;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAoDH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -21,6 +21,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
21
21
|
|
|
22
22
|
const {
|
|
23
23
|
library,
|
|
24
|
+
links_full = false,
|
|
24
25
|
repo_name,
|
|
25
26
|
description,
|
|
26
27
|
tagline,
|
|
@@ -29,6 +30,12 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
29
30
|
children,
|
|
30
31
|
}: {
|
|
31
32
|
library: Library;
|
|
33
|
+
/**
|
|
34
|
+
* Link the module/declaration index to the library's own deployed docs
|
|
35
|
+
* (`url_api_full`) instead of site-local paths. Use when rendering a
|
|
36
|
+
* foreign library on a different site, e.g. an aggregator.
|
|
37
|
+
*/
|
|
38
|
+
links_full?: boolean;
|
|
32
39
|
repo_name?: Snippet<[repo_name: string]>;
|
|
33
40
|
description?: Snippet<[description: string]>;
|
|
34
41
|
tagline?: Snippet<[description: string]>;
|
|
@@ -166,7 +173,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
166
173
|
>
|
|
167
174
|
<div class="module-content">
|
|
168
175
|
<span class="font_size_xl">
|
|
169
|
-
<ModuleLink module_path={module.path}>
|
|
176
|
+
<ModuleLink module_path={module.path} full={links_full}>
|
|
170
177
|
{module.path}
|
|
171
178
|
</ModuleLink>
|
|
172
179
|
</span>
|
|
@@ -174,7 +181,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
174
181
|
<ul class="declarations unstyled">
|
|
175
182
|
{#each module.declarations as declaration (declaration.name)}
|
|
176
183
|
<li>
|
|
177
|
-
<DeclarationLink name={declaration.name} />
|
|
184
|
+
<DeclarationLink name={declaration.name} full={links_full} />
|
|
178
185
|
</li>
|
|
179
186
|
{/each}
|
|
180
187
|
</ul>
|
|
@@ -2,6 +2,12 @@ import type { Snippet } from 'svelte';
|
|
|
2
2
|
import type { Library } from './library.svelte.js';
|
|
3
3
|
type $$ComponentProps = {
|
|
4
4
|
library: Library;
|
|
5
|
+
/**
|
|
6
|
+
* Link the module/declaration index to the library's own deployed docs
|
|
7
|
+
* (`url_api_full`) instead of site-local paths. Use when rendering a
|
|
8
|
+
* foreign library on a different site, e.g. an aggregator.
|
|
9
|
+
*/
|
|
10
|
+
links_full?: boolean;
|
|
5
11
|
repo_name?: Snippet<[repo_name: string]>;
|
|
6
12
|
description?: Snippet<[description: string]>;
|
|
7
13
|
tagline?: Snippet<[description: string]>;
|
|
@@ -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;AAEpC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAOhD,KAAK,gBAAgB,GAAI;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,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;
|
|
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;AAEpC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAOhD,KAAK,gBAAgB,GAAI;IACxB,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;AAkKH;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
package/dist/ModuleLink.svelte
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
const {
|
|
10
10
|
module_path,
|
|
11
11
|
hash,
|
|
12
|
+
full = false,
|
|
12
13
|
children,
|
|
13
14
|
class: class_prop = 'chip',
|
|
14
15
|
...rest
|
|
@@ -16,17 +17,25 @@
|
|
|
16
17
|
module_path: string; // TODO maybe rename?
|
|
17
18
|
/** URL fragment to append, with or without the `#`. */
|
|
18
19
|
hash?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Link to the library's own deployed docs (`url_api_full`) instead of a
|
|
22
|
+
* site-local path (`url_api`). Use when rendering a foreign library on a
|
|
23
|
+
* different site, e.g. an aggregator, so links don't dangle locally.
|
|
24
|
+
*/
|
|
25
|
+
full?: boolean;
|
|
19
26
|
} = $props();
|
|
20
27
|
|
|
21
28
|
const library = library_context.get();
|
|
22
29
|
|
|
23
30
|
const module = $derived(library.module_by_path.get(module_path));
|
|
24
31
|
|
|
32
|
+
// When linking a foreign library's docs, prefer its full URL; fall back to
|
|
33
|
+
// the site-local path if `homepage_url` is unavailable.
|
|
34
|
+
const url_api = $derived((full && module?.url_api_full) || module?.url_api);
|
|
35
|
+
|
|
25
36
|
const color_class = $derived(module_path.endsWith('.svelte') ? 'color_h' : '');
|
|
26
37
|
|
|
27
38
|
const contextmenu_entries = $derived(module ? create_module_contextmenu(module) : undefined);
|
|
28
|
-
|
|
29
|
-
// TODO @many support full https:// url variants - automatic detection? library prop?
|
|
30
39
|
</script>
|
|
31
40
|
|
|
32
41
|
{#if module}
|
|
@@ -34,7 +43,7 @@
|
|
|
34
43
|
<a
|
|
35
44
|
{...rest}
|
|
36
45
|
class="module-link {class_prop} {color_class}"
|
|
37
|
-
href={
|
|
46
|
+
href={url_api + (hash ? ensure_start(hash, '#') : '')}
|
|
38
47
|
{@attach contextmenu_attachment(contextmenu_entries)}
|
|
39
48
|
>
|
|
40
49
|
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
|
@@ -3,6 +3,12 @@ type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
|
3
3
|
module_path: string;
|
|
4
4
|
/** URL fragment to append, with or without the `#`. */
|
|
5
5
|
hash?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Link to the library's own deployed docs (`url_api_full`) instead of a
|
|
8
|
+
* site-local path (`url_api`). Use when rendering a foreign library on a
|
|
9
|
+
* different site, e.g. an aggregator, so links don't dangle locally.
|
|
10
|
+
*/
|
|
11
|
+
full?: boolean;
|
|
6
12
|
};
|
|
7
13
|
declare const ModuleLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
14
|
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;AAOvD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,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;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAoDH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
package/dist/ProjectLinks.svelte
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
logo_fuz_util,
|
|
15
15
|
logo_gro,
|
|
16
16
|
logo_fuz_docs,
|
|
17
|
+
logo_svelte_docinfo,
|
|
17
18
|
logo_fuz_app,
|
|
18
19
|
} from './logos.js';
|
|
19
20
|
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
{name: 'fuz_mastodon', url: 'https://mastodon.fuz.dev/', logo: logo_fuz_mastodon, description: 'Mastodon components and helpers for Svelte, SvelteKit, and Fuz', glyph: '🦣', color_class: 'color_d_50'},
|
|
40
41
|
{name: 'fuz_gitops', url: 'https://gitops.fuz.dev/', logo: logo_fuz_gitops, description: 'a tool for managing many repos', glyph: '🪄', color_class: 'color_a_50'},
|
|
41
42
|
{name: 'fuz_docs', url: 'https://docs.fuz.dev/', logo: logo_fuz_docs, description: 'AI-generated documentation and skills for the Fuz stack', glyph: '📜', color_class: 'color_i_50'},
|
|
43
|
+
{name: 'svelte-docinfo', url: 'https://svelte-docinfo.fuz.dev/', logo: logo_svelte_docinfo, description: 'static analysis for TypeScript and Svelte', glyph: '📜', color_class: 'color_i_50'},
|
|
42
44
|
{name: 'fuz_util', url: 'https://util.fuz.dev/', logo: logo_fuz_util, description: 'utility belt for JS', glyph: '🦕', color_class: 'color_f_50'},
|
|
43
45
|
{name: 'gro', url: 'https://github.com/fuzdev/gro', logo: logo_gro, description: 'task runner and toolkit extending SvelteKit', glyph: '🌰', color_class: 'color_f_50'},
|
|
44
46
|
];
|
|
@@ -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":"AA8EA,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"}
|
|
@@ -8,36 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
12
|
-
* Build project-relative API documentation URL with hash anchor.
|
|
13
|
-
*
|
|
14
|
-
* @param declaration_name - name of the declaration to link to
|
|
15
|
-
* @returns URL path like '/docs/api#declaration_name'
|
|
16
|
-
*/
|
|
17
|
-
export declare const url_api_declaration: (declaration_name: string) => string;
|
|
18
|
-
/**
|
|
19
|
-
* Build full API documentation URL with domain and hash anchor.
|
|
20
|
-
*
|
|
21
|
-
* @param homepage - package homepage URL
|
|
22
|
-
* @param declaration_name - name of the declaration to link to
|
|
23
|
-
* @returns full URL like 'https://example.com/docs/api#declaration_name'
|
|
24
|
-
*/
|
|
25
|
-
export declare const url_api_declaration_full: (homepage: string, declaration_name: string) => string;
|
|
26
|
-
/**
|
|
27
|
-
* Build project-relative module documentation URL.
|
|
28
|
-
*
|
|
29
|
-
* @param module_path - module path (e.g., 'helpers.ts')
|
|
30
|
-
* @returns URL path like '/docs/api/helpers.ts'
|
|
31
|
-
*/
|
|
32
|
-
export declare const url_api_module: (module_path: string) => string;
|
|
33
|
-
/**
|
|
34
|
-
* Build package logo URL with favicon.png fallback.
|
|
35
|
-
*
|
|
36
|
-
* @param homepage_url - package homepage URL, or null
|
|
37
|
-
* @param logo_path - optional custom logo path (defaults to 'favicon.png')
|
|
38
|
-
* @returns full URL to the logo, or null if no homepage
|
|
39
|
-
*/
|
|
40
|
-
export declare const url_package_logo: (homepage_url: string | null, logo_path?: string) => string | null;
|
|
41
11
|
/**
|
|
42
12
|
* Convert a full URL to root-relative format by removing the origin.
|
|
43
13
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"library_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,EAAE,SAAQ,MAAwB,KAAG,MAcpF,CAAC"}
|
package/dist/library_helpers.js
CHANGED
|
@@ -10,42 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { ensure_end, strip_start } from '@fuzdev/fuz_util/string.js';
|
|
12
12
|
import { page } from '$app/state';
|
|
13
|
-
import { DOCS_API_PATH, DOCS_PATH_DEFAULT } from './docs_helpers.svelte.js';
|
|
14
|
-
/**
|
|
15
|
-
* Build project-relative API documentation URL with hash anchor.
|
|
16
|
-
*
|
|
17
|
-
* @param declaration_name - name of the declaration to link to
|
|
18
|
-
* @returns URL path like '/docs/api#declaration_name'
|
|
19
|
-
*/
|
|
20
|
-
export const url_api_declaration = (declaration_name) => `${DOCS_API_PATH}#${encodeURIComponent(declaration_name)}`;
|
|
21
|
-
/**
|
|
22
|
-
* Build full API documentation URL with domain and hash anchor.
|
|
23
|
-
*
|
|
24
|
-
* @param homepage - package homepage URL
|
|
25
|
-
* @param declaration_name - name of the declaration to link to
|
|
26
|
-
* @returns full URL like 'https://example.com/docs/api#declaration_name'
|
|
27
|
-
*/
|
|
28
|
-
export const url_api_declaration_full = (homepage, declaration_name) => `${homepage}${DOCS_PATH_DEFAULT}/api#${encodeURIComponent(declaration_name)}`;
|
|
29
|
-
/**
|
|
30
|
-
* Build project-relative module documentation URL.
|
|
31
|
-
*
|
|
32
|
-
* @param module_path - module path (e.g., 'helpers.ts')
|
|
33
|
-
* @returns URL path like '/docs/api/helpers.ts'
|
|
34
|
-
*/
|
|
35
|
-
export const url_api_module = (module_path) => `${DOCS_API_PATH}/${module_path}`;
|
|
36
|
-
/**
|
|
37
|
-
* Build package logo URL with favicon.png fallback.
|
|
38
|
-
*
|
|
39
|
-
* @param homepage_url - package homepage URL, or null
|
|
40
|
-
* @param logo_path - optional custom logo path (defaults to 'favicon.png')
|
|
41
|
-
* @returns full URL to the logo, or null if no homepage
|
|
42
|
-
*/
|
|
43
|
-
export const url_package_logo = (homepage_url, logo_path) => {
|
|
44
|
-
if (!homepage_url)
|
|
45
|
-
return null;
|
|
46
|
-
const path = logo_path ? strip_start(logo_path, '/') : 'favicon.png';
|
|
47
|
-
return ensure_end(homepage_url, '/') + path;
|
|
48
|
-
};
|
|
49
13
|
/**
|
|
50
14
|
* Convert a full URL to root-relative format by removing the origin.
|
|
51
15
|
*
|
package/dist/logos.d.ts
CHANGED
|
@@ -71,6 +71,13 @@ export declare const logo_fuz_docs: {
|
|
|
71
71
|
d: string;
|
|
72
72
|
}[];
|
|
73
73
|
};
|
|
74
|
+
export declare const logo_svelte_docinfo: {
|
|
75
|
+
label: string;
|
|
76
|
+
fill: string;
|
|
77
|
+
paths: {
|
|
78
|
+
d: string;
|
|
79
|
+
}[];
|
|
80
|
+
};
|
|
74
81
|
export declare const logo_fuz_template: {
|
|
75
82
|
label: string;
|
|
76
83
|
fill: string;
|
package/dist/logos.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/logos.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,QAAQ;;;;;;CAgCF,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;CAIN,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;;;;CAKN,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;CAIL,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;CAIX,CAAC;AAEpB,eAAO,MAAM,eAAe;;;;;;CAIT,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;CAQX,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAwBP,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;;;;CAWL,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC"}
|
|
1
|
+
{"version":3,"file":"logos.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/logos.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,QAAQ;;;;;;CAgCF,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;CAIN,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;;;;CAKN,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;CAIL,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;CAIX,CAAC;AAEpB,eAAO,MAAM,eAAe;;;;;;CAIT,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAIP,CAAC;AAEpB,eAAO,MAAM,mBAAmB;;;;;;CAQb,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;CAQX,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;;;CAwBP,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;;;;;;CAWL,CAAC;AAEpB,eAAO,MAAM,QAAQ;;;;;;CAQF,CAAC"}
|
package/dist/logos.js
CHANGED
|
@@ -98,6 +98,15 @@ export const logo_fuz_docs = {
|
|
|
98
98
|
fill: '#1ec3d2',
|
|
99
99
|
paths: logo_fuz.paths,
|
|
100
100
|
};
|
|
101
|
+
export const logo_svelte_docinfo = {
|
|
102
|
+
label: 'a cyan scroll with curling ends',
|
|
103
|
+
fill: '#1ec3d2',
|
|
104
|
+
paths: [
|
|
105
|
+
{
|
|
106
|
+
d: 'M 83,80.28 c -9.75,-34.41 2.18,-52.33 -3.76,-70 -2.31,-7.66 -48.25,-12 -70.25,-6 -12,6 -10,24 4,24 6,0 5.51,-13.67 6,-18 0,0 -1.43,59.52 5.13,80.21 1.2,3.8 2.91,5.28 4,5.92 3.93,2.31 63.48,3.74 68.01,0.54 1.18,-0.84 3.11,-5.38 2.63,-8.75 -0.42,-2.94 -3.27,-5.78 -5.28,-6.26 -1.74,-0.41 -0.62,-0.79 -5.37,-0.59 C 77.2,81.96 71.49,85.44 47.57,84.25 41.58,84.09 11.04,79.77 64.12,56.73 51.2,46.21 46.99,49.36 37.77,43.13 37.39,42.87 55,45.85 66.37,56.98 -10.84,93.94 82.99,80.29 82.99,80.29 Z',
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
};
|
|
101
110
|
export const logo_fuz_template = {
|
|
102
111
|
label: 'a friendly orange pixelated spider facing you',
|
|
103
112
|
fill: '#f4672f',
|
package/dist/module.svelte.d.ts
CHANGED
|
@@ -38,6 +38,13 @@ export declare class Module {
|
|
|
38
38
|
* API documentation URL for this module.
|
|
39
39
|
*/
|
|
40
40
|
url_api: string;
|
|
41
|
+
/**
|
|
42
|
+
* Public documentation link (if `homepage_url` is available).
|
|
43
|
+
*
|
|
44
|
+
* Absolute URL into the library's own deployed docs, for rendering a
|
|
45
|
+
* foreign library's modules on a different site (e.g. an aggregator).
|
|
46
|
+
*/
|
|
47
|
+
url_api_full: string | undefined;
|
|
41
48
|
/**
|
|
42
49
|
* GitHub source URL.
|
|
43
50
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAGjD;;;;;;;;GAQG;AACH,qBAAa,MAAM;IAClB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAK1C,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAiB;IAEtD;;;;;;;;;;OAUG;IACH,IAAI,SAAmC;IAEvC;;OAEG;IACH,WAAW,SAA8B;IAEzC,cAAc,qBAA4C;IAE1D;;OAEG;IACH,YAAY,gBAIV;IAEF;;OAEG;IACH,OAAO,SAAgE;IAEvE;;OAEG;IACH,UAAU,qBAIR;IAEF,gBAAgB,EAAE,OAAO,CAA8D;IAEvF,kBAAkB,EAAE,OAAO,CAAmC;IAE9D;;OAEG;IACH,YAAY,WAAiD;IAE7D;;OAEG;IACH,UAAU,WAA+C;gBAE7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe;IAK1D;;OAEG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAG9D"}
|
|
1
|
+
{"version":3,"file":"module.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/module.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAGjD;;;;;;;;GAQG;AACH,qBAAa,MAAM;IAClB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAK1C,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAiB;IAEtD;;;;;;;;;;OAUG;IACH,IAAI,SAAmC;IAEvC;;OAEG;IACH,WAAW,SAA8B;IAEzC,cAAc,qBAA4C;IAE1D;;OAEG;IACH,YAAY,gBAIV;IAEF;;OAEG;IACH,OAAO,SAAgE;IAEvE;;;;;OAKG;IACH,YAAY,qBAIV;IAEF;;OAEG;IACH,UAAU,qBAIR;IAEF,gBAAgB,EAAE,OAAO,CAA8D;IAEvF,kBAAkB,EAAE,OAAO,CAAmC;IAE9D;;OAEG;IACH,YAAY,WAAiD;IAE7D;;OAEG;IACH,UAAU,WAA+C;gBAE7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe;IAK1D;;OAEG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAG9D"}
|
package/dist/module.svelte.js
CHANGED
|
@@ -43,6 +43,15 @@ export class Module {
|
|
|
43
43
|
* API documentation URL for this module.
|
|
44
44
|
*/
|
|
45
45
|
url_api = $derived(`/docs/api${this.library.url_prefix}/${this.path}`);
|
|
46
|
+
/**
|
|
47
|
+
* Public documentation link (if `homepage_url` is available).
|
|
48
|
+
*
|
|
49
|
+
* Absolute URL into the library's own deployed docs, for rendering a
|
|
50
|
+
* foreign library's modules on a different site (e.g. an aggregator).
|
|
51
|
+
*/
|
|
52
|
+
url_api_full = $derived(this.library.homepage_url
|
|
53
|
+
? `${this.library.homepage_url.replace(/\/$/, '')}/docs/api/${this.path}`
|
|
54
|
+
: undefined);
|
|
46
55
|
/**
|
|
47
56
|
* GitHub source URL.
|
|
48
57
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.198.1",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"prettier-plugin-svelte": "^3.5.1",
|
|
105
105
|
"svelte": "^5.56.0",
|
|
106
106
|
"svelte-check": "^4.4.8",
|
|
107
|
-
"svelte-docinfo": "^0.2.
|
|
107
|
+
"svelte-docinfo": "^0.2.1",
|
|
108
108
|
"svelte2tsx": "^0.7.55",
|
|
109
109
|
"tslib": "^2.8.1",
|
|
110
110
|
"typescript": "^5.9.3",
|
|
@@ -12,51 +12,6 @@
|
|
|
12
12
|
import {ensure_end, strip_start} from '@fuzdev/fuz_util/string.js';
|
|
13
13
|
import {page} from '$app/state';
|
|
14
14
|
|
|
15
|
-
import {DOCS_API_PATH, DOCS_PATH_DEFAULT} from './docs_helpers.svelte.js';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Build project-relative API documentation URL with hash anchor.
|
|
19
|
-
*
|
|
20
|
-
* @param declaration_name - name of the declaration to link to
|
|
21
|
-
* @returns URL path like '/docs/api#declaration_name'
|
|
22
|
-
*/
|
|
23
|
-
export const url_api_declaration = (declaration_name: string): string =>
|
|
24
|
-
`${DOCS_API_PATH}#${encodeURIComponent(declaration_name)}`;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Build full API documentation URL with domain and hash anchor.
|
|
28
|
-
*
|
|
29
|
-
* @param homepage - package homepage URL
|
|
30
|
-
* @param declaration_name - name of the declaration to link to
|
|
31
|
-
* @returns full URL like 'https://example.com/docs/api#declaration_name'
|
|
32
|
-
*/
|
|
33
|
-
export const url_api_declaration_full = (homepage: string, declaration_name: string): string =>
|
|
34
|
-
`${homepage}${DOCS_PATH_DEFAULT}/api#${encodeURIComponent(declaration_name)}`;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Build project-relative module documentation URL.
|
|
38
|
-
*
|
|
39
|
-
* @param module_path - module path (e.g., 'helpers.ts')
|
|
40
|
-
* @returns URL path like '/docs/api/helpers.ts'
|
|
41
|
-
*/
|
|
42
|
-
export const url_api_module = (module_path: string): string => `${DOCS_API_PATH}/${module_path}`;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Build package logo URL with favicon.png fallback.
|
|
46
|
-
*
|
|
47
|
-
* @param homepage_url - package homepage URL, or null
|
|
48
|
-
* @param logo_path - optional custom logo path (defaults to 'favicon.png')
|
|
49
|
-
* @returns full URL to the logo, or null if no homepage
|
|
50
|
-
*/
|
|
51
|
-
export const url_package_logo = (
|
|
52
|
-
homepage_url: string | null,
|
|
53
|
-
logo_path?: string,
|
|
54
|
-
): string | null => {
|
|
55
|
-
if (!homepage_url) return null;
|
|
56
|
-
const path = logo_path ? strip_start(logo_path, '/') : 'favicon.png';
|
|
57
|
-
return ensure_end(homepage_url, '/') + path;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
15
|
/**
|
|
61
16
|
* Convert a full URL to root-relative format by removing the origin.
|
|
62
17
|
*
|
package/src/lib/logos.ts
CHANGED
|
@@ -112,6 +112,16 @@ export const logo_fuz_docs = {
|
|
|
112
112
|
paths: logo_fuz.paths,
|
|
113
113
|
} satisfies SvgData;
|
|
114
114
|
|
|
115
|
+
export const logo_svelte_docinfo = {
|
|
116
|
+
label: 'a cyan scroll with curling ends',
|
|
117
|
+
fill: '#1ec3d2',
|
|
118
|
+
paths: [
|
|
119
|
+
{
|
|
120
|
+
d: 'M 83,80.28 c -9.75,-34.41 2.18,-52.33 -3.76,-70 -2.31,-7.66 -48.25,-12 -70.25,-6 -12,6 -10,24 4,24 6,0 5.51,-13.67 6,-18 0,0 -1.43,59.52 5.13,80.21 1.2,3.8 2.91,5.28 4,5.92 3.93,2.31 63.48,3.74 68.01,0.54 1.18,-0.84 3.11,-5.38 2.63,-8.75 -0.42,-2.94 -3.27,-5.78 -5.28,-6.26 -1.74,-0.41 -0.62,-0.79 -5.37,-0.59 C 77.2,81.96 71.49,85.44 47.57,84.25 41.58,84.09 11.04,79.77 64.12,56.73 51.2,46.21 46.99,49.36 37.77,43.13 37.39,42.87 55,45.85 66.37,56.98 -10.84,93.94 82.99,80.29 82.99,80.29 Z',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
} satisfies SvgData;
|
|
124
|
+
|
|
115
125
|
export const logo_fuz_template = {
|
|
116
126
|
label: 'a friendly orange pixelated spider facing you',
|
|
117
127
|
fill: '#f4672f',
|
package/src/lib/module.svelte.ts
CHANGED
|
@@ -55,6 +55,18 @@ export class Module {
|
|
|
55
55
|
*/
|
|
56
56
|
url_api = $derived(`/docs/api${this.library.url_prefix}/${this.path}`);
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Public documentation link (if `homepage_url` is available).
|
|
60
|
+
*
|
|
61
|
+
* Absolute URL into the library's own deployed docs, for rendering a
|
|
62
|
+
* foreign library's modules on a different site (e.g. an aggregator).
|
|
63
|
+
*/
|
|
64
|
+
url_api_full = $derived(
|
|
65
|
+
this.library.homepage_url
|
|
66
|
+
? `${this.library.homepage_url.replace(/\/$/, '')}/docs/api/${this.path}`
|
|
67
|
+
: undefined,
|
|
68
|
+
);
|
|
69
|
+
|
|
58
70
|
/**
|
|
59
71
|
* GitHub source URL.
|
|
60
72
|
*/
|