@fuzdev/fuz_ui 0.202.0 → 0.203.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApiIndex.svelte +6 -3
- package/dist/ApiIndex.svelte.d.ts +1 -1
- package/dist/ApiIndex.svelte.d.ts.map +1 -1
- package/dist/ApiModule.svelte +72 -21
- package/dist/ApiModule.svelte.d.ts +1 -1
- package/dist/ApiModule.svelte.d.ts.map +1 -1
- package/dist/ContextmenuEntry.svelte +11 -10
- package/dist/ContextmenuEntry.svelte.d.ts +1 -1
- package/dist/ContextmenuEntry.svelte.d.ts.map +1 -1
- package/dist/ContextmenuLinkEntry.svelte +30 -12
- package/dist/ContextmenuLinkEntry.svelte.d.ts +2 -1
- package/dist/ContextmenuLinkEntry.svelte.d.ts.map +1 -1
- package/dist/ContextmenuMenu.svelte +207 -0
- package/dist/ContextmenuMenu.svelte.d.ts +41 -0
- package/dist/ContextmenuMenu.svelte.d.ts.map +1 -0
- package/dist/ContextmenuRoot.svelte +58 -260
- package/dist/ContextmenuRoot.svelte.d.ts +2 -60
- package/dist/ContextmenuRoot.svelte.d.ts.map +1 -1
- package/dist/ContextmenuRootForSafariCompatibility.svelte +72 -283
- package/dist/ContextmenuRootForSafariCompatibility.svelte.d.ts +2 -58
- package/dist/ContextmenuRootForSafariCompatibility.svelte.d.ts.map +1 -1
- package/dist/ContextmenuSeparator.svelte +2 -1
- package/dist/ContextmenuSeparator.svelte.d.ts.map +1 -1
- package/dist/ContextmenuSubmenu.svelte +27 -23
- package/dist/ContextmenuSubmenu.svelte.d.ts +1 -1
- package/dist/ContextmenuSubmenu.svelte.d.ts.map +1 -1
- package/dist/ContextmenuTextEntry.svelte +7 -3
- package/dist/ContextmenuTextEntry.svelte.d.ts +2 -1
- package/dist/ContextmenuTextEntry.svelte.d.ts.map +1 -1
- package/dist/DeclarationLink.svelte +15 -2
- package/dist/DeclarationLink.svelte.d.ts +7 -0
- package/dist/DeclarationLink.svelte.d.ts.map +1 -1
- package/dist/DocsLink.svelte +3 -1
- package/dist/DocsLink.svelte.d.ts.map +1 -1
- package/dist/DocsTertiaryNav.svelte +2 -1
- package/dist/DocsTertiaryNav.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +9 -3
- package/dist/LibraryDetail.svelte.d.ts +1 -1
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/ModuleLink.svelte +2 -1
- package/dist/ModuleLink.svelte.d.ts.map +1 -1
- package/dist/TypeLink.svelte +2 -1
- package/dist/TypeLink.svelte.d.ts.map +1 -1
- package/dist/contextmenu_helpers.d.ts +324 -1
- package/dist/contextmenu_helpers.d.ts.map +1 -1
- package/dist/contextmenu_helpers.js +403 -2
- package/dist/contextmenu_state.svelte.d.ts +61 -15
- package/dist/contextmenu_state.svelte.d.ts.map +1 -1
- package/dist/contextmenu_state.svelte.js +206 -119
- package/dist/declaration.svelte.d.ts +1 -0
- package/dist/declaration.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.js +2 -1
- package/dist/icons.d.ts +15 -3
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +17 -3
- package/dist/library.svelte.d.ts +30 -3
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/library.svelte.js +38 -0
- package/dist/module.svelte.d.ts +62 -1
- package/dist/module.svelte.d.ts.map +1 -1
- package/dist/module.svelte.js +71 -1
- package/package.json +2 -2
- package/src/lib/contextmenu_helpers.ts +546 -3
- package/src/lib/contextmenu_state.svelte.ts +219 -119
- package/src/lib/declaration.svelte.ts +2 -1
- package/src/lib/icons.ts +19 -3
- package/src/lib/library.svelte.ts +43 -1
- package/src/lib/module.svelte.ts +97 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type
|
|
2
|
+
import {onDestroy, type Snippet} from 'svelte';
|
|
3
3
|
import {swallow} from '@fuzdev/fuz_util/dom.js';
|
|
4
4
|
|
|
5
5
|
import {contextmenu_context, contextmenu_dimensions_context} from './contextmenu_state.svelte.js';
|
|
6
|
+
import {contextmenu_calculate_submenu_translate} from './contextmenu_helpers.js';
|
|
6
7
|
import type {Dimensions} from './dimensions.svelte.js';
|
|
7
8
|
|
|
8
9
|
const {
|
|
@@ -32,6 +33,10 @@
|
|
|
32
33
|
|
|
33
34
|
let translate_x = $state.raw(0);
|
|
34
35
|
let translate_y = $state.raw(0);
|
|
36
|
+
// Measure-and-correct loop: `update_position` reads `translate_x`/`translate_y`
|
|
37
|
+
// (subtracting them from the measured rect to recover the untranslated base position)
|
|
38
|
+
// and writes them back, so the effect re-runs after the transform applies -
|
|
39
|
+
// the second pass measures the same base and writes identical values, settling.
|
|
35
40
|
$effect(() => {
|
|
36
41
|
if (el) update_position(el, layout, parent_dimensions);
|
|
37
42
|
});
|
|
@@ -39,23 +44,23 @@
|
|
|
39
44
|
const {x, y, width, height} = el.getBoundingClientRect();
|
|
40
45
|
dimensions.width = width;
|
|
41
46
|
dimensions.height = height;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} else {
|
|
54
|
-
translate_x = overflow_left - width;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
translate_y = Math.min(0, layout.height - (base_y + height));
|
|
47
|
+
const translate = contextmenu_calculate_submenu_translate({
|
|
48
|
+
base_x: x - translate_x,
|
|
49
|
+
base_y: y - translate_y,
|
|
50
|
+
width,
|
|
51
|
+
height,
|
|
52
|
+
parent_width: parent_dimensions.width,
|
|
53
|
+
layout_width: layout.width,
|
|
54
|
+
layout_height: layout.height,
|
|
55
|
+
});
|
|
56
|
+
translate_x = translate.x;
|
|
57
|
+
translate_y = translate.y;
|
|
58
58
|
};
|
|
59
|
+
|
|
60
|
+
let select_timeout: NodeJS.Timeout | null = null;
|
|
61
|
+
onDestroy(() => {
|
|
62
|
+
if (select_timeout !== null) clearTimeout(select_timeout);
|
|
63
|
+
});
|
|
59
64
|
</script>
|
|
60
65
|
|
|
61
66
|
<li role="none" style:--contextmenu_depth={submenu.depth}>
|
|
@@ -64,7 +69,6 @@
|
|
|
64
69
|
class="menuitem plain selectable"
|
|
65
70
|
class:selected
|
|
66
71
|
role="menuitem"
|
|
67
|
-
aria-label="contextmenu submenmu"
|
|
68
72
|
aria-haspopup="menu"
|
|
69
73
|
tabindex="-1"
|
|
70
74
|
onmouseenter={(e) => {
|
|
@@ -73,7 +77,11 @@
|
|
|
73
77
|
// fires immediately when the contextmenu appears,
|
|
74
78
|
// and then the newly mounted selected entry immediately receives a click event.
|
|
75
79
|
// The timeout ensures the click event is not passed through.
|
|
76
|
-
|
|
80
|
+
if (select_timeout !== null) clearTimeout(select_timeout);
|
|
81
|
+
select_timeout = setTimeout(() => {
|
|
82
|
+
select_timeout = null;
|
|
83
|
+
contextmenu.select(submenu);
|
|
84
|
+
});
|
|
77
85
|
}}
|
|
78
86
|
aria-expanded={selected}
|
|
79
87
|
>
|
|
@@ -111,8 +119,4 @@
|
|
|
111
119
|
max-width: var(--contextmenu_width);
|
|
112
120
|
width: 100%;
|
|
113
121
|
}
|
|
114
|
-
/* TODO hacky, needed because the base `.menuitem` added z-index */
|
|
115
|
-
.menuitem {
|
|
116
|
-
z-index: unset;
|
|
117
|
-
}
|
|
118
122
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextmenuSubmenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuSubmenu.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ContextmenuSubmenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuSubmenu.svelte"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,OAAO,EAAC,MAAM,QAAQ,CAAC;AAO9C,KAAK,gBAAgB,GAAI;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AA6FH,QAAA,MAAM,kBAAkB,sDAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type {SvgData} from './svg.js';
|
|
3
|
+
import Svg from './Svg.svelte';
|
|
2
4
|
import ContextmenuEntry from './ContextmenuEntry.svelte';
|
|
3
5
|
import type {ContextmenuRun} from './contextmenu_state.svelte.js';
|
|
4
6
|
|
|
5
7
|
const {
|
|
6
8
|
run,
|
|
7
9
|
content,
|
|
8
|
-
icon:
|
|
10
|
+
icon: icon_value,
|
|
9
11
|
}: {
|
|
10
12
|
run: ContextmenuRun;
|
|
11
13
|
content: string; // TODO @many rethink this API
|
|
12
|
-
icon: string;
|
|
14
|
+
icon: SvgData | string;
|
|
13
15
|
} = $props();
|
|
14
16
|
|
|
15
17
|
// TODO consider making this the implicit default entry, so consumers can simply declare `{run, content}`
|
|
16
18
|
</script>
|
|
17
19
|
|
|
18
20
|
<ContextmenuEntry {run}>
|
|
19
|
-
{#snippet icon()}{
|
|
21
|
+
{#snippet icon()}{#if typeof icon_value === 'string'}{icon_value}{:else}<Svg
|
|
22
|
+
data={icon_value}
|
|
23
|
+
/>{/if}{/snippet}
|
|
20
24
|
{content}
|
|
21
25
|
</ContextmenuEntry>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { SvgData } from './svg.js';
|
|
1
2
|
import type { ContextmenuRun } from './contextmenu_state.svelte.js';
|
|
2
3
|
type $$ComponentProps = {
|
|
3
4
|
run: ContextmenuRun;
|
|
4
5
|
content: string;
|
|
5
|
-
icon: string;
|
|
6
|
+
icon: SvgData | string;
|
|
6
7
|
};
|
|
7
8
|
declare const ContextmenuTextEntry: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
9
|
type ContextmenuTextEntry = ReturnType<typeof ContextmenuTextEntry>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextmenuTextEntry.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuTextEntry.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContextmenuTextEntry.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuTextEntry.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGtC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAEjE,KAAK,gBAAgB,GAAI;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;CACvB,CAAC;AAuBH,QAAA,MAAM,oBAAoB,sDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
name,
|
|
11
|
+
module_path,
|
|
11
12
|
hash,
|
|
12
13
|
full = false,
|
|
13
14
|
children,
|
|
@@ -15,6 +16,13 @@
|
|
|
15
16
|
...rest
|
|
16
17
|
}: SvelteHTMLElements['a'] & {
|
|
17
18
|
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Module path of the declaration's defining module. When provided,
|
|
21
|
+
* resolution is scoped to that module's declarations — exact even when
|
|
22
|
+
* names collide across modules. Without it, resolution falls back to the
|
|
23
|
+
* library-wide by-name map.
|
|
24
|
+
*/
|
|
25
|
+
module_path?: string;
|
|
18
26
|
/** URL fragment to append, with or without the `#`. */
|
|
19
27
|
hash?: string;
|
|
20
28
|
/**
|
|
@@ -25,9 +33,14 @@
|
|
|
25
33
|
full?: boolean;
|
|
26
34
|
} = $props();
|
|
27
35
|
|
|
28
|
-
const
|
|
36
|
+
const get_library = library_context.get();
|
|
37
|
+
const library = $derived(get_library());
|
|
29
38
|
|
|
30
|
-
const declaration = $derived(
|
|
39
|
+
const declaration = $derived(
|
|
40
|
+
module_path === undefined
|
|
41
|
+
? library.declaration_by_name.get(name)
|
|
42
|
+
: library.module_by_path.get(module_path)?.get_declaration_by_name(name),
|
|
43
|
+
);
|
|
31
44
|
|
|
32
45
|
// When linking a foreign library's docs, prefer its full URL; fall back to
|
|
33
46
|
// the site-local path if `homepage_url` is unavailable.
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
2
|
type $$ComponentProps = SvelteHTMLElements['a'] & {
|
|
3
3
|
name: string;
|
|
4
|
+
/**
|
|
5
|
+
* Module path of the declaration's defining module. When provided,
|
|
6
|
+
* resolution is scoped to that module's declarations — exact even when
|
|
7
|
+
* names collide across modules. Without it, resolution falls back to the
|
|
8
|
+
* library-wide by-name map.
|
|
9
|
+
*/
|
|
10
|
+
module_path?: string;
|
|
4
11
|
/** URL fragment to append, with or without the `#`. */
|
|
5
12
|
hash?: string;
|
|
6
13
|
/**
|
|
@@ -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;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,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;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AA0DH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
package/dist/DocsLink.svelte
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
display_text?: string | null;
|
|
20
20
|
children?: Snippet<[Declaration | undefined, Module | undefined]>;
|
|
21
21
|
} = $props();
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
const get_library = library_context.get();
|
|
24
|
+
const library = $derived(get_library());
|
|
23
25
|
|
|
24
26
|
// Try to find as declaration first, then module
|
|
25
27
|
const declaration = $derived(library.declaration_by_name.get(reference));
|
|
@@ -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,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;
|
|
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;AA4CH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
.filter((t) => t !== undefined) ?? [],
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
const
|
|
32
|
+
const get_library = library_context.get();
|
|
33
|
+
const library = $derived(get_library());
|
|
33
34
|
|
|
34
35
|
const modules_related_to_selected = $derived(
|
|
35
36
|
selected_tome?.related_modules
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocsTertiaryNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsTertiaryNav.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAmB,IAAI,EAAC,MAAM,WAAW,CAAC;AAOhD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG;IACtD,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"DocsTertiaryNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DocsTertiaryNav.svelte"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAmB,IAAI,EAAC,MAAM,WAAW,CAAC;AAOhD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG;IACtD,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAyFH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -12,7 +12,7 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
12
12
|
import {format_url} from '@fuzdev/fuz_util/url.js';
|
|
13
13
|
import type {Snippet} from 'svelte';
|
|
14
14
|
|
|
15
|
-
import type
|
|
15
|
+
import {library_context, type Library} from './library.svelte.js';
|
|
16
16
|
import ImgOrSvg from './ImgOrSvg.svelte';
|
|
17
17
|
import DeclarationLink from './DeclarationLink.svelte';
|
|
18
18
|
import ModuleLink from './ModuleLink.svelte';
|
|
@@ -44,6 +44,8 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
44
44
|
children?: Snippet<[library: Library]>;
|
|
45
45
|
} = $props();
|
|
46
46
|
|
|
47
|
+
library_context.set(() => library);
|
|
48
|
+
|
|
47
49
|
// TODO show other data (lines of code)
|
|
48
50
|
|
|
49
51
|
const {pkg_json} = $derived(library);
|
|
@@ -175,11 +177,15 @@ with file-type coloring. Uses svelte-docinfo's file type predicates for module c
|
|
|
175
177
|
{module.path}
|
|
176
178
|
</ModuleLink>
|
|
177
179
|
</span>
|
|
178
|
-
{#if module.
|
|
180
|
+
{#if module.has_declarations}
|
|
179
181
|
<ul class="declarations unstyled">
|
|
180
182
|
{#each module.declarations as declaration (declaration.name)}
|
|
181
183
|
<li>
|
|
182
|
-
<DeclarationLink
|
|
184
|
+
<DeclarationLink
|
|
185
|
+
name={declaration.name}
|
|
186
|
+
module_path={module.path}
|
|
187
|
+
full={links_full}
|
|
188
|
+
/>
|
|
183
189
|
</li>
|
|
184
190
|
{/each}
|
|
185
191
|
</ul>
|
|
@@ -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,
|
|
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,EAAkB,KAAK,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAOjE,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;AAmKH;;;;;;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
|
@@ -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;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf,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;AAqDH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
package/dist/TypeLink.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA2BH,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|