@fuzdev/fuz_ui 0.206.7 → 0.206.8
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 +3 -3
- package/dist/Alert.svelte +21 -25
- package/dist/Alert.svelte.d.ts.map +1 -1
- package/dist/ApiDeclarationList.svelte +2 -2
- package/dist/ApiDeclarationList.svelte.d.ts.map +1 -1
- package/dist/ApiIndex.svelte +4 -4
- package/dist/ApiIndex.svelte.d.ts.map +1 -1
- package/dist/ApiModule.svelte +13 -10
- package/dist/ApiModule.svelte.d.ts.map +1 -1
- package/dist/ApiModulesList.svelte +2 -2
- package/dist/ApiModulesList.svelte.d.ts.map +1 -1
- package/dist/Breadcrumb.svelte +31 -19
- package/dist/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/Card.svelte +17 -17
- package/dist/Card.svelte.d.ts.map +1 -1
- package/dist/ColorSchemeInput.svelte +6 -6
- package/dist/ColorSchemeInput.svelte.d.ts.map +1 -1
- package/dist/Contextmenu.svelte +6 -4
- package/dist/Contextmenu.svelte.d.ts.map +1 -1
- package/dist/ContextmenuEntry.svelte +8 -8
- package/dist/ContextmenuEntry.svelte.d.ts.map +1 -1
- package/dist/ContextmenuIcon.svelte +3 -3
- package/dist/ContextmenuIcon.svelte.d.ts.map +1 -1
- package/dist/ContextmenuLinkEntry.svelte +14 -14
- package/dist/ContextmenuLinkEntry.svelte.d.ts.map +1 -1
- package/dist/ContextmenuMenu.svelte +10 -10
- package/dist/ContextmenuMenu.svelte.d.ts.map +1 -1
- package/dist/ContextmenuRoot.svelte +7 -7
- package/dist/ContextmenuRootForSafariCompatibility.svelte +15 -15
- package/dist/ContextmenuSeparator.svelte +2 -2
- package/dist/ContextmenuSubmenu.svelte +15 -12
- package/dist/ContextmenuSubmenu.svelte.d.ts.map +1 -1
- package/dist/ContextmenuTextEntry.svelte +4 -4
- package/dist/ContextmenuTextEntry.svelte.d.ts.map +1 -1
- package/dist/CopyToClipboard.svelte +7 -7
- package/dist/CopyToClipboard.svelte.d.ts.map +1 -1
- package/dist/DeclarationDetail.svelte +35 -28
- package/dist/DeclarationDetail.svelte.d.ts.map +1 -1
- package/dist/DeclarationLink.svelte +7 -7
- package/dist/DeclarationLink.svelte.d.ts.map +1 -1
- package/dist/Details.svelte +3 -3
- package/dist/Details.svelte.d.ts.map +1 -1
- package/dist/Dialog.svelte +7 -7
- package/dist/Dialog.svelte.d.ts.map +1 -1
- package/dist/DialogContent.svelte +6 -6
- package/dist/DialogContent.svelte.d.ts.map +1 -1
- package/dist/Docs.svelte +14 -12
- package/dist/Docs.svelte.d.ts.map +1 -1
- package/dist/DocsContent.svelte +4 -4
- package/dist/DocsContent.svelte.d.ts.map +1 -1
- package/dist/DocsFooter.svelte +7 -8
- package/dist/DocsFooter.svelte.d.ts.map +1 -1
- package/dist/DocsLink.svelte +24 -21
- package/dist/DocsLink.svelte.d.ts.map +1 -1
- package/dist/DocsList.svelte +3 -3
- package/dist/DocsList.svelte.d.ts.map +1 -1
- package/dist/DocsMenu.svelte +13 -10
- package/dist/DocsMenu.svelte.d.ts.map +1 -1
- package/dist/DocsMenuHeader.svelte +2 -2
- package/dist/DocsMenuHeader.svelte.d.ts.map +1 -1
- package/dist/DocsPageLinks.svelte +9 -7
- package/dist/DocsPageLinks.svelte.d.ts.map +1 -1
- package/dist/DocsPrimaryNav.svelte +5 -5
- package/dist/DocsPrimaryNav.svelte.d.ts.map +1 -1
- package/dist/DocsSearch.svelte +3 -3
- package/dist/DocsSearch.svelte.d.ts.map +1 -1
- package/dist/DocsSecondaryNav.svelte +3 -3
- package/dist/DocsSecondaryNav.svelte.d.ts.map +1 -1
- package/dist/DocsTertiaryNav.svelte +8 -8
- package/dist/DocsTertiaryNav.svelte.d.ts.map +1 -1
- package/dist/EcosystemLinks.svelte +3 -3
- package/dist/EcosystemLinks.svelte.d.ts.map +1 -1
- package/dist/EcosystemLinksPanel.svelte +2 -2
- package/dist/EcosystemLinksPanel.svelte.d.ts.map +1 -1
- package/dist/GithubLink.svelte +10 -10
- package/dist/GithubLink.svelte.d.ts.map +1 -1
- package/dist/Glyph.svelte +4 -2
- package/dist/Glyph.svelte.d.ts.map +1 -1
- package/dist/Hashlink.svelte +5 -5
- package/dist/Hashlink.svelte.d.ts.map +1 -1
- package/dist/HueInput.svelte +5 -5
- package/dist/HueInput.svelte.d.ts.map +1 -1
- package/dist/ImgOrSvg.svelte +20 -20
- package/dist/ImgOrSvg.svelte.d.ts.map +1 -1
- package/dist/LibraryDetail.svelte +16 -16
- package/dist/LibraryDetail.svelte.d.ts.map +1 -1
- package/dist/LibrarySummary.svelte +10 -8
- package/dist/LibrarySummary.svelte.d.ts.map +1 -1
- package/dist/MdnLink.svelte +8 -8
- package/dist/MdnLink.svelte.d.ts.map +1 -1
- package/dist/ModuleLink.svelte +5 -5
- package/dist/ModuleLink.svelte.d.ts.map +1 -1
- package/dist/PasteFromClipboard.svelte +1 -1
- package/dist/PasteFromClipboard.svelte.d.ts.map +1 -1
- package/dist/PendingAnimation.svelte +12 -11
- package/dist/PendingAnimation.svelte.d.ts.map +1 -1
- package/dist/PendingButton.svelte +3 -3
- package/dist/PendingButton.svelte.d.ts.map +1 -1
- package/dist/ProjectLinks.svelte +7 -7
- package/dist/ProjectLinks.svelte.d.ts.map +1 -1
- package/dist/Redirect.svelte +12 -8
- package/dist/Redirect.svelte.d.ts.map +1 -1
- package/dist/Spiders.svelte +5 -5
- package/dist/Spiders.svelte.d.ts.map +1 -1
- package/dist/StyleVariableButton.svelte +6 -6
- package/dist/StyleVariableButton.svelte.d.ts.map +1 -1
- package/dist/Svg.svelte +5 -5
- package/dist/Svg.svelte.d.ts.map +1 -1
- package/dist/Teleport.svelte +2 -2
- package/dist/Teleport.svelte.d.ts.map +1 -1
- package/dist/ThemeInput.svelte +10 -8
- package/dist/ThemeInput.svelte.d.ts.map +1 -1
- package/dist/ThemeRoot.svelte +10 -11
- package/dist/ThemeRoot.svelte.d.ts.map +1 -1
- package/dist/TomeContent.svelte +11 -11
- package/dist/TomeContent.svelte.d.ts.map +1 -1
- package/dist/TomeHeader.svelte +6 -6
- package/dist/TomeLink.svelte +7 -7
- package/dist/TomeLink.svelte.d.ts.map +1 -1
- package/dist/TomeSection.svelte +8 -8
- package/dist/TomeSection.svelte.d.ts.map +1 -1
- package/dist/TomeSectionHeader.svelte +12 -12
- package/dist/TomeSectionHeader.svelte.d.ts.map +1 -1
- package/dist/TypeLink.svelte +11 -11
- package/dist/TypeLink.svelte.d.ts.map +1 -1
- package/dist/alert.js +1 -1
- package/dist/api_search.svelte.d.ts.map +1 -1
- package/dist/api_search.svelte.js +5 -7
- package/dist/autofocus.svelte.d.ts.map +1 -1
- package/dist/context_helpers.js +1 -1
- package/dist/contextmenu_helpers.d.ts.map +1 -1
- package/dist/contextmenu_helpers.js +3 -3
- package/dist/contextmenu_state.svelte.d.ts.map +1 -1
- package/dist/contextmenu_state.svelte.js +4 -4
- package/dist/csp.d.ts.map +1 -1
- package/dist/csp.js +27 -27
- package/dist/csp_of_fuzdev.d.ts.map +1 -1
- package/dist/csp_of_fuzdev.js +1 -1
- package/dist/declaration.svelte.d.ts +44 -256
- package/dist/declaration.svelte.d.ts.map +1 -1
- package/dist/declaration.svelte.js +132 -52
- package/dist/declaration_contextmenu.d.ts.map +1 -1
- package/dist/declaration_contextmenu.js +2 -2
- package/dist/docs_helpers.svelte.d.ts.map +1 -1
- package/dist/icons.js +200 -200
- package/dist/intersect.svelte.d.ts.map +1 -1
- package/dist/library.svelte.d.ts +31 -18
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/library.svelte.js +76 -21
- package/dist/logos.js +42 -42
- package/dist/module.svelte.d.ts +30 -37
- package/dist/module.svelte.d.ts.map +1 -1
- package/dist/module.svelte.js +88 -35
- package/dist/module_contextmenu.d.ts.map +1 -1
- package/dist/module_contextmenu.js +2 -2
- package/dist/site.svelte.d.ts.map +1 -1
- package/dist/style_variable_helpers.svelte.d.ts.map +1 -1
- package/dist/svg.d.ts.map +1 -1
- package/dist/theme_state.svelte.d.ts.map +1 -1
- package/dist/theme_state.svelte.js +1 -1
- package/dist/tome.d.ts.map +1 -1
- package/dist/tome.js +1 -1
- package/dist/vite_plugin_pkg_json.d.ts.map +1 -1
- package/dist/vite_plugin_pkg_json.js +1 -1
- package/package.json +3 -22
- package/src/lib/alert.ts +3 -3
- package/src/lib/api_search.svelte.ts +9 -11
- package/src/lib/autofocus.svelte.ts +2 -2
- package/src/lib/context_helpers.ts +2 -2
- package/src/lib/contextmenu_helpers.ts +21 -21
- package/src/lib/contextmenu_state.svelte.ts +32 -34
- package/src/lib/csp.ts +42 -54
- package/src/lib/csp_of_fuzdev.ts +2 -2
- package/src/lib/declaration.svelte.ts +157 -62
- package/src/lib/declaration_contextmenu.ts +5 -5
- package/src/lib/dialog.ts +1 -1
- package/src/lib/docs_helpers.svelte.ts +9 -9
- package/src/lib/icons.ts +205 -205
- package/src/lib/intersect.svelte.ts +5 -5
- package/src/lib/library.svelte.ts +103 -36
- package/src/lib/library_helpers.ts +2 -2
- package/src/lib/logos.ts +43 -43
- package/src/lib/module.svelte.ts +98 -49
- package/src/lib/module_contextmenu.ts +4 -4
- package/src/lib/site.svelte.ts +5 -5
- package/src/lib/storage.ts +2 -2
- package/src/lib/style_variable_helpers.svelte.ts +2 -2
- package/src/lib/svg.ts +2 -2
- package/src/lib/theme_state.svelte.ts +8 -8
- package/src/lib/tome.ts +8 -8
- package/src/lib/vite_plugin_pkg_json.ts +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
2
|
// The default entry snippets are shared by `ContextmenuRoot.svelte`
|
|
3
3
|
// and `ContextmenuRootForSafariCompatibility.svelte`.
|
|
4
|
-
export {link_entry_default, text_entry_default, separator_entry_default};
|
|
4
|
+
export { link_entry_default, text_entry_default, separator_entry_default };
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* the roots own gesture detection, i.e. how the menu opens. Holds no gesture
|
|
14
14
|
* state of its own; the `open_guard` it consults is owned and armed by the root.
|
|
15
15
|
*/
|
|
16
|
-
import {swallow} from '@fuzdev/fuz_util/dom.ts';
|
|
17
|
-
import type {ComponentProps, Snippet} from 'svelte';
|
|
16
|
+
import { swallow } from '@fuzdev/fuz_util/dom.ts';
|
|
17
|
+
import type { ComponentProps, Snippet } from 'svelte';
|
|
18
18
|
|
|
19
19
|
import {
|
|
20
20
|
contextmenu_dimensions_context,
|
|
21
|
-
type ContextmenuState
|
|
21
|
+
type ContextmenuState
|
|
22
22
|
} from './contextmenu_state.svelte.js';
|
|
23
23
|
import ContextmenuLinkEntry from './ContextmenuLinkEntry.svelte';
|
|
24
24
|
import ContextmenuTextEntry from './ContextmenuTextEntry.svelte';
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
contextmenu_calculate_constrained_x,
|
|
31
31
|
contextmenu_calculate_constrained_y,
|
|
32
32
|
contextmenu_popover_attachment,
|
|
33
|
-
type ContextmenuOpenGuard
|
|
33
|
+
type ContextmenuOpenGuard
|
|
34
34
|
} from './contextmenu_helpers.js';
|
|
35
35
|
|
|
36
36
|
let {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
link_entry,
|
|
40
40
|
text_entry,
|
|
41
41
|
separator_entry,
|
|
42
|
-
el = $bindable()
|
|
42
|
+
el = $bindable()
|
|
43
43
|
}: {
|
|
44
44
|
/**
|
|
45
45
|
* The contextmenu state owned by the root.
|
|
@@ -68,20 +68,20 @@
|
|
|
68
68
|
el?: HTMLElement;
|
|
69
69
|
} = $props();
|
|
70
70
|
|
|
71
|
-
const {layout} = $derived(contextmenu);
|
|
71
|
+
const { layout } = $derived(contextmenu);
|
|
72
72
|
|
|
73
73
|
const dimensions = contextmenu_dimensions_context.set();
|
|
74
74
|
|
|
75
75
|
const x = $derived(
|
|
76
|
-
contextmenu_calculate_constrained_x(contextmenu.x, dimensions.width, layout.width)
|
|
76
|
+
contextmenu_calculate_constrained_x(contextmenu.x, dimensions.width, layout.width)
|
|
77
77
|
);
|
|
78
78
|
const y = $derived(
|
|
79
|
-
contextmenu_calculate_constrained_y(contextmenu.y, dimensions.height, layout.height)
|
|
79
|
+
contextmenu_calculate_constrained_y(contextmenu.y, dimensions.height, layout.height)
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
// Closes the contextmenu on presses outside of it.
|
|
83
83
|
const mousedown = $derived(
|
|
84
|
-
contextmenu_create_mousedown_handler(contextmenu, () => el, open_guard)
|
|
84
|
+
contextmenu_create_mousedown_handler(contextmenu, () => el, open_guard)
|
|
85
85
|
);
|
|
86
86
|
|
|
87
87
|
const keyboard_handlers = $derived(contextmenu_create_keyboard_handlers(contextmenu));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextmenuMenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuMenu.svelte"],"names":[],"mappings":"AAKC,OAAO,
|
|
1
|
+
{"version":3,"file":"ContextmenuMenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuMenu.svelte"],"names":[],"mappings":"AAKC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC;AAY5E,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtD,OAAO,EAEL,KAAK,gBAAgB,EACrB,MAAM,+BAA+B,CAAC;AACxC,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AACjE,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AACjE,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAOL,KAAK,oBAAoB,EACzB,MAAM,0BAA0B,CAAC;AAElC,KAAK,gBAAgB,GAAI;IACxB;;OAEG;IACH,WAAW,EAAE,gBAAgB,CAAC;IAC9B;;;OAGG;IACH,UAAU,EAAE,oBAAoB,CAAC;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1E;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1E;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/E;;OAEG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CACjB,CAAC;AAAC,QAAA,MAAM,kBAAkB,GAAyB,OAAO,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAElI,CAAC;AAAC,QAAA,MAAM,kBAAkB,GAAyB,OAAO,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAE7J,CAAC;AAAC,QAAA,MAAM,uBAAuB,GAAyB,OAAO,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAElK,CAAC;AAuF9B,QAAA,MAAM,eAAe,wDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
import {
|
|
20
20
|
contextmenu_context,
|
|
21
21
|
ContextmenuState,
|
|
22
|
-
contextmenu_check_global_root
|
|
22
|
+
contextmenu_check_global_root
|
|
23
23
|
} from './contextmenu_state.svelte.js';
|
|
24
24
|
import ContextmenuMenu, {
|
|
25
25
|
link_entry_default,
|
|
26
26
|
text_entry_default,
|
|
27
|
-
separator_entry_default
|
|
27
|
+
separator_entry_default
|
|
28
28
|
} from './ContextmenuMenu.svelte';
|
|
29
29
|
import {
|
|
30
30
|
CONTEXTMENU_DEFAULT_OPEN_OFFSET_X,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
contextmenu_resolve_contextmenu_event,
|
|
36
36
|
ContextmenuBypassTracker,
|
|
37
37
|
ContextmenuOpenGuard,
|
|
38
|
-
type ContextmenuRootBaseProps
|
|
38
|
+
type ContextmenuRootBaseProps
|
|
39
39
|
} from './contextmenu_helpers.js';
|
|
40
40
|
|
|
41
41
|
const {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
link_entry = link_entry_default,
|
|
50
50
|
text_entry = text_entry_default,
|
|
51
51
|
separator_entry = separator_entry_default,
|
|
52
|
-
children
|
|
52
|
+
children
|
|
53
53
|
}: ContextmenuRootBaseProps = $props();
|
|
54
54
|
|
|
55
55
|
contextmenu_context.set(() => contextmenu);
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
open_offset_y,
|
|
68
68
|
link_enabled: link_entry !== null,
|
|
69
69
|
text_enabled: text_entry !== null,
|
|
70
|
-
separator_enabled: separator_entry !== null
|
|
70
|
+
separator_enabled: separator_entry !== null
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
const on_window_contextmenu = (e: MouseEvent) => {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
|
|
94
94
|
if (!bypass_with_tap_then_longpress) return;
|
|
95
95
|
|
|
96
|
-
const {touches, target} = e;
|
|
96
|
+
const { touches, target } = e;
|
|
97
97
|
if (
|
|
98
98
|
contextmenu.opened ||
|
|
99
99
|
touches.length !== 1 ||
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const {clientX, clientY} = touches[0]!;
|
|
106
|
+
const { clientX, clientY } = touches[0]!;
|
|
107
107
|
bypass_tracker.track(clientX, clientY, bypass_window, bypass_move_tolerance);
|
|
108
108
|
};
|
|
109
109
|
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
* Otherwise, use the default `ContextmenuRoot.svelte` which is much simpler
|
|
18
18
|
* and relies on the standard `contextmenu` event.
|
|
19
19
|
*/
|
|
20
|
-
import {swallow} from '@fuzdev/fuz_util/dom.ts';
|
|
21
|
-
import {on} from 'svelte/events';
|
|
20
|
+
import { swallow } from '@fuzdev/fuz_util/dom.ts';
|
|
21
|
+
import { on } from 'svelte/events';
|
|
22
22
|
|
|
23
23
|
import {
|
|
24
24
|
contextmenu_context,
|
|
25
25
|
ContextmenuState,
|
|
26
26
|
contextmenu_open,
|
|
27
|
-
contextmenu_check_global_root
|
|
27
|
+
contextmenu_check_global_root
|
|
28
28
|
} from './contextmenu_state.svelte.js';
|
|
29
29
|
import ContextmenuMenu, {
|
|
30
30
|
link_entry_default,
|
|
31
31
|
text_entry_default,
|
|
32
|
-
separator_entry_default
|
|
32
|
+
separator_entry_default
|
|
33
33
|
} from './ContextmenuMenu.svelte';
|
|
34
34
|
import {
|
|
35
35
|
CONTEXTMENU_DEFAULT_OPEN_OFFSET_X,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
contextmenu_resolve_contextmenu_event,
|
|
43
43
|
ContextmenuBypassTracker,
|
|
44
44
|
ContextmenuOpenGuard,
|
|
45
|
-
type ContextmenuRootBaseProps
|
|
45
|
+
type ContextmenuRootBaseProps
|
|
46
46
|
} from './contextmenu_helpers.js';
|
|
47
47
|
|
|
48
48
|
const {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
link_entry = link_entry_default,
|
|
59
59
|
text_entry = text_entry_default,
|
|
60
60
|
separator_entry = separator_entry_default,
|
|
61
|
-
children
|
|
61
|
+
children
|
|
62
62
|
}: ContextmenuRootBaseProps & {
|
|
63
63
|
/**
|
|
64
64
|
* The number of pixels the pointer can be moved without canceling `longpress`.
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
open_offset_y,
|
|
132
132
|
link_enabled: link_entry !== null,
|
|
133
133
|
text_enabled: text_entry !== null,
|
|
134
|
-
separator_enabled: separator_entry !== null
|
|
134
|
+
separator_enabled: separator_entry !== null
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
const on_window_contextmenu = (e: MouseEvent) => {
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
const touchstart = (e: TouchEvent): void => {
|
|
158
158
|
longpress_opened = false;
|
|
159
159
|
open_guard.touchstart(); // begins a gesture, clearing stale flags
|
|
160
|
-
const {touches, target} = e;
|
|
160
|
+
const { touches, target } = e;
|
|
161
161
|
if (
|
|
162
162
|
contextmenu.opened ||
|
|
163
163
|
touches.length !== 1 ||
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
const {clientX, clientY} = touches[0]!;
|
|
171
|
+
const { clientX, clientY } = touches[0]!;
|
|
172
172
|
|
|
173
173
|
// The builtin `'contextmenu'` event will still fire for non-iOS browsers,
|
|
174
174
|
// so the tracker's `bypassed` flag tells `on_window_contextmenu` to exit early.
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
touch_x + open_offset_x,
|
|
196
196
|
touch_y + open_offset_y,
|
|
197
197
|
contextmenu,
|
|
198
|
-
open_options
|
|
198
|
+
open_options
|
|
199
199
|
)
|
|
200
200
|
) {
|
|
201
201
|
// guard the release of this gesture from interacting with the menu
|
|
@@ -208,9 +208,9 @@
|
|
|
208
208
|
const touchmove = (e: TouchEvent): void => {
|
|
209
209
|
// Exit early if no pending longpress or menu is already open
|
|
210
210
|
if (longpress_timeout === null || contextmenu.opened) return;
|
|
211
|
-
const {touches} = e;
|
|
211
|
+
const { touches } = e;
|
|
212
212
|
if (touches.length !== 1) return;
|
|
213
|
-
const {clientX, clientY} = touches[0]!;
|
|
213
|
+
const { clientX, clientY } = touches[0]!;
|
|
214
214
|
const distance = Math.hypot(clientX - touch_x, clientY - touch_y);
|
|
215
215
|
if (distance > longpress_move_tolerance) {
|
|
216
216
|
// User is scrolling - cancel longpress but DON'T preventDefault
|
|
@@ -261,9 +261,9 @@
|
|
|
261
261
|
*/
|
|
262
262
|
const touch_event_attachment = (el: HTMLElement | Window) => {
|
|
263
263
|
// touchstart and touchcancel don't call preventDefault, so they can be passive for better performance
|
|
264
|
-
const passive_options: AddEventListenerOptions = {passive: true, capture: true};
|
|
264
|
+
const passive_options: AddEventListenerOptions = { passive: true, capture: true };
|
|
265
265
|
// touchmove and touchend need to call preventDefault to block iOS behaviors, so they must be non-passive
|
|
266
|
-
const nonpassive_options: AddEventListenerOptions = {passive: false, capture: true};
|
|
266
|
+
const nonpassive_options: AddEventListenerOptions = { passive: false, capture: true };
|
|
267
267
|
|
|
268
268
|
const cleanup_touchstart = on(el, 'touchstart', touchstart as EventListener, passive_options);
|
|
269
269
|
const cleanup_touchmove = on(el, 'touchmove', touchmove as EventListener, nonpassive_options);
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
el,
|
|
273
273
|
'touchcancel',
|
|
274
274
|
touchcancel as EventListener,
|
|
275
|
-
passive_options
|
|
275
|
+
passive_options
|
|
276
276
|
);
|
|
277
277
|
|
|
278
278
|
return () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
3
|
|
|
4
|
-
const {...rest}: SvelteHTMLElements['li'] = $props();
|
|
4
|
+
const { ...rest }: SvelteHTMLElements['li'] = $props();
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<!-- `aria-orientation` is omitted - it defaults to horizontal, correct for a vertical menu's rule -->
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {onDestroy, type Snippet} from 'svelte';
|
|
3
|
-
import {swallow} from '@fuzdev/fuz_util/dom.ts';
|
|
2
|
+
import { onDestroy, type Snippet } from 'svelte';
|
|
3
|
+
import { swallow } from '@fuzdev/fuz_util/dom.ts';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import {
|
|
6
|
+
contextmenu_context,
|
|
7
|
+
contextmenu_dimensions_context
|
|
8
|
+
} from './contextmenu_state.svelte.js';
|
|
9
|
+
import { contextmenu_calculate_submenu_translate } from './contextmenu_helpers.js';
|
|
10
|
+
import type { Dimensions } from './dimensions.svelte.js';
|
|
11
|
+
import type { SvgData } from './svg.js';
|
|
9
12
|
import ContextmenuIcon from './ContextmenuIcon.svelte';
|
|
10
13
|
|
|
11
14
|
const {
|
|
12
15
|
icon,
|
|
13
16
|
menu,
|
|
14
|
-
children
|
|
17
|
+
children
|
|
15
18
|
}: {
|
|
16
19
|
icon?: SvgData | string | Snippet;
|
|
17
20
|
menu: Snippet;
|
|
@@ -24,9 +27,9 @@
|
|
|
24
27
|
// add_submenu registers on the current instance at init — not reactive to contextmenu getter changes
|
|
25
28
|
const submenu = get_contextmenu().add_submenu();
|
|
26
29
|
|
|
27
|
-
const {layout} = $derived(contextmenu);
|
|
30
|
+
const { layout } = $derived(contextmenu);
|
|
28
31
|
|
|
29
|
-
const {selected} = $derived(submenu);
|
|
32
|
+
const { selected } = $derived(submenu);
|
|
30
33
|
|
|
31
34
|
let el: HTMLElement | undefined = $state.raw();
|
|
32
35
|
|
|
@@ -43,7 +46,7 @@
|
|
|
43
46
|
if (el) update_position(el, layout, parent_dimensions);
|
|
44
47
|
});
|
|
45
48
|
const update_position = (el: HTMLElement, layout: Dimensions, parent_dimensions: Dimensions) => {
|
|
46
|
-
const {x, y, width, height} = el.getBoundingClientRect();
|
|
49
|
+
const { x, y, width, height } = el.getBoundingClientRect();
|
|
47
50
|
dimensions.width = width;
|
|
48
51
|
dimensions.height = height;
|
|
49
52
|
const translate = contextmenu_calculate_submenu_translate({
|
|
@@ -53,7 +56,7 @@
|
|
|
53
56
|
height,
|
|
54
57
|
parent_width: parent_dimensions.width,
|
|
55
58
|
layout_width: layout.width,
|
|
56
|
-
layout_height: layout.height
|
|
59
|
+
layout_height: layout.height
|
|
57
60
|
});
|
|
58
61
|
translate_x = translate.x;
|
|
59
62
|
translate_y = translate.y;
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
<li role="none" style:--contextmenu_depth={submenu.depth}>
|
|
69
72
|
<!-- disabling the a11y warning because a parent element handles keyboard events -->
|
|
70
73
|
<div
|
|
71
|
-
class={['menuitem plain selectable', {selected}]}
|
|
74
|
+
class={['menuitem plain selectable', { selected }]}
|
|
72
75
|
role="menuitem"
|
|
73
76
|
aria-haspopup="menu"
|
|
74
77
|
tabindex="-1"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextmenuSubmenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuSubmenu.svelte"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContextmenuSubmenu.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuSubmenu.svelte"],"names":[],"mappings":"AAGA,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AASjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGvC,KAAK,gBAAgB,GAAI;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAiGH,QAAA,MAAM,kBAAkB,sDAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {Snippet} from 'svelte';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
3
|
|
|
4
|
-
import type {SvgData} from './svg.js';
|
|
4
|
+
import type { SvgData } from './svg.js';
|
|
5
5
|
import ContextmenuEntry from './ContextmenuEntry.svelte';
|
|
6
|
-
import type {ContextmenuRun} from './contextmenu_state.svelte.js';
|
|
6
|
+
import type { ContextmenuRun } from './contextmenu_state.svelte.js';
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
run,
|
|
10
10
|
content,
|
|
11
|
-
icon
|
|
11
|
+
icon
|
|
12
12
|
}: {
|
|
13
13
|
run: ContextmenuRun;
|
|
14
14
|
content: string; // TODO @many rethink this API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextmenuTextEntry.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuTextEntry.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ContextmenuTextEntry.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ContextmenuTextEntry.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEnE,KAAK,gBAAgB,GAAI;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;CAClC,CAAC;AAuBH,QAAA,MAAM,oBAAoB,sDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {OmitStrict} from '@fuzdev/fuz_util/types.ts';
|
|
3
|
-
import type {Snippet} from 'svelte';
|
|
4
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
5
|
-
import {scale, slide} from 'svelte/transition';
|
|
2
|
+
import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
5
|
+
import { scale, slide } from 'svelte/transition';
|
|
6
6
|
|
|
7
|
-
import {icon_checkmark, icon_copy} from './icons.js';
|
|
7
|
+
import { icon_checkmark, icon_copy } from './icons.js';
|
|
8
8
|
import Svg from './Svg.svelte';
|
|
9
9
|
|
|
10
10
|
// TODO @many should this have the Button suffix?
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
class={[
|
|
70
70
|
'copy-to-clipboard',
|
|
71
71
|
rest.class,
|
|
72
|
-
{icon_button: children ? false : icon_button, copied, failed, color_c: failed}
|
|
72
|
+
{ icon_button: children ? false : icon_button, copied, failed, color_c: failed }
|
|
73
73
|
]}
|
|
74
74
|
onclick={(e) => {
|
|
75
75
|
onclick?.(e); // before the internal handler, which is async
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
{#if children}
|
|
81
81
|
{@render children(copied, failed)}
|
|
82
82
|
{:else if copied}
|
|
83
|
-
<div style:width="100%" in:scale={{duration: 200}}><Svg data={icon_checkmark} /></div>
|
|
83
|
+
<div style:width="100%" in:scale={{ duration: 200 }}><Svg data={icon_checkmark} /></div>
|
|
84
84
|
{:else}
|
|
85
85
|
<div style:width="100%" in:slide><Svg data={icon_copy} /></div>
|
|
86
86
|
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/CopyToClipboard.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/CopyToClipboard.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAMzD,KAAK,gBAAgB,GAAI,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IAC/E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD,CAAC;AA0EH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -12,20 +12,20 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
import Code from '@fuzdev/fuz_code/Code.svelte';
|
|
14
14
|
import Mdz from '@fuzdev/mdz/Mdz.svelte';
|
|
15
|
-
import {mdz_from_tsdoc} from '@fuzdev/mdz/tsdoc_mdz.ts';
|
|
15
|
+
import { mdz_from_tsdoc } from '@fuzdev/mdz/tsdoc_mdz.ts';
|
|
16
16
|
import {
|
|
17
17
|
mdz_code_context,
|
|
18
18
|
mdz_codeblock_context,
|
|
19
|
-
mdz_set_context_with_fallback
|
|
19
|
+
mdz_set_context_with_fallback
|
|
20
20
|
} from '@fuzdev/mdz/mdz_contexts.ts';
|
|
21
|
-
import type {ParameterJsonInput} from 'svelte-docinfo/types.js';
|
|
21
|
+
import type { ParameterJsonInput } from 'svelte-docinfo/types.js';
|
|
22
22
|
|
|
23
|
-
import type {Declaration} from './declaration.svelte.js';
|
|
23
|
+
import type { Declaration } from './declaration.svelte.js';
|
|
24
24
|
import TypeLink from './TypeLink.svelte';
|
|
25
25
|
import ModuleLink from './ModuleLink.svelte';
|
|
26
26
|
import DocsLink from './DocsLink.svelte';
|
|
27
27
|
|
|
28
|
-
const {declaration}: {declaration: Declaration} = $props();
|
|
28
|
+
const { declaration }: { declaration: Declaration } = $props();
|
|
29
29
|
|
|
30
30
|
// render mdz inline `code` as API-linking `DocsLink` and fenced blocks as syntax-highlighted
|
|
31
31
|
// `Code`, matching the rest of the docs — the injection mdz core leaves open
|
|
@@ -40,7 +40,7 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
40
40
|
since?: string;
|
|
41
41
|
examples?: Array<string>;
|
|
42
42
|
seeAlso?: Array<string>;
|
|
43
|
-
throws?: Array<{type?: string; description: string}>;
|
|
43
|
+
throws?: Array<{ type?: string; description: string }>;
|
|
44
44
|
}
|
|
45
45
|
</script>
|
|
46
46
|
|
|
@@ -48,9 +48,9 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
48
48
|
{#snippet param_detail(param: ParameterJsonInput)}
|
|
49
49
|
<section>
|
|
50
50
|
<h4>
|
|
51
|
-
<code
|
|
52
|
-
|
|
53
|
-
>
|
|
51
|
+
<code>
|
|
52
|
+
{param.name}{#if param.optional}<strong>?</strong>{/if}
|
|
53
|
+
</code>
|
|
54
54
|
</h4>
|
|
55
55
|
{#if param.description}
|
|
56
56
|
<Mdz content={param.description} />
|
|
@@ -76,9 +76,9 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
76
76
|
<!-- A compact parameter row: name (with optional marker) and type, for snippet params and overloads. -->
|
|
77
77
|
{#snippet param_row(param: ParameterJsonInput)}
|
|
78
78
|
<div class="row gap_md">
|
|
79
|
-
<code
|
|
80
|
-
|
|
81
|
-
>
|
|
79
|
+
<code>
|
|
80
|
+
{param.name}{#if param.optional}?{/if}
|
|
81
|
+
</code>
|
|
82
82
|
<TypeLink type={param.type} />
|
|
83
83
|
</div>
|
|
84
84
|
{/snippet}
|
|
@@ -127,8 +127,11 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
127
127
|
|
|
128
128
|
<!-- A comma-separated inline list of type links (extends, implements, intersects are rarely more than one). -->
|
|
129
129
|
{#snippet type_list(types: Array<string>)}
|
|
130
|
-
{#each types as type, i (type)}
|
|
131
|
-
{
|
|
130
|
+
{#each types as type, i (type)}
|
|
131
|
+
{#if i > 0}
|
|
132
|
+
,
|
|
133
|
+
{/if}<TypeLink {type} />
|
|
134
|
+
{/each}
|
|
132
135
|
{/snippet}
|
|
133
136
|
|
|
134
137
|
<!-- Metadata -->
|
|
@@ -145,7 +148,8 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
145
148
|
{#if declaration.is_deprecated ||
|
|
146
149
|
declaration.reactivity ||
|
|
147
150
|
declaration.accepts_children ||
|
|
148
|
-
declaration.alias_of
|
|
151
|
+
declaration.alias_of
|
|
152
|
+
}
|
|
149
153
|
<p class="row gap_md flex-wrap:wrap">
|
|
150
154
|
<!-- eslint-disable-next-line @typescript-eslint/no-deprecated -->
|
|
151
155
|
{#if declaration.is_deprecated}
|
|
@@ -158,10 +162,11 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
158
162
|
<span class="chip">accepts children</span>
|
|
159
163
|
{/if}
|
|
160
164
|
{#if declaration.alias_of}
|
|
161
|
-
<span class="chip"
|
|
162
|
-
|
|
163
|
-
in {declaration.alias_of.module}
|
|
164
|
-
|
|
165
|
+
<span class="chip">
|
|
166
|
+
alias of {declaration.alias_of.name}{#if declaration.alias_of.module}
|
|
167
|
+
in {declaration.alias_of.module}
|
|
168
|
+
{/if}
|
|
169
|
+
</span>
|
|
165
170
|
{/if}
|
|
166
171
|
</p>
|
|
167
172
|
{/if}
|
|
@@ -212,9 +217,9 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
212
217
|
{#each declaration.props as prop (prop)}
|
|
213
218
|
<section>
|
|
214
219
|
<h4>
|
|
215
|
-
<code
|
|
216
|
-
|
|
217
|
-
>
|
|
220
|
+
<code>
|
|
221
|
+
{prop.name}{#if prop.optional}<strong>?</strong>{/if}
|
|
222
|
+
</code>
|
|
218
223
|
</h4>
|
|
219
224
|
{#if prop.description}
|
|
220
225
|
<Mdz content={prop.description} />
|
|
@@ -338,7 +343,7 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
338
343
|
{@render type_list(
|
|
339
344
|
Array.isArray(declaration.extends_type)
|
|
340
345
|
? declaration.extends_type
|
|
341
|
-
: [declaration.extends_type]
|
|
346
|
+
: [declaration.extends_type]
|
|
342
347
|
)}
|
|
343
348
|
</div>
|
|
344
349
|
{/if}
|
|
@@ -419,10 +424,11 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
419
424
|
{#each declaration.members as member (member)}
|
|
420
425
|
<section>
|
|
421
426
|
<h4>
|
|
422
|
-
<code
|
|
423
|
-
|
|
424
|
-
>
|
|
425
|
-
|
|
427
|
+
<code>
|
|
428
|
+
{member.name}{#if member.kind !== 'constructor' && member.optional}
|
|
429
|
+
<strong>?</strong>
|
|
430
|
+
{/if}
|
|
431
|
+
</code>
|
|
426
432
|
</h4>
|
|
427
433
|
{#if member.docComment}
|
|
428
434
|
<Mdz content={member.docComment} />
|
|
@@ -457,7 +463,8 @@ including parameters, props, members, overloads, intersects, and more.
|
|
|
457
463
|
{/if}
|
|
458
464
|
<!-- parameters for methods and constructors -->
|
|
459
465
|
{#if (member.kind === 'function' || member.kind === 'constructor') &&
|
|
460
|
-
member.parameters?.length
|
|
466
|
+
member.parameters?.length
|
|
467
|
+
}
|
|
461
468
|
<section>
|
|
462
469
|
{#each member.parameters as param (param)}
|
|
463
470
|
{@render param_detail(param)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclarationDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationDetail.svelte"],"names":[],"mappings":"AAaA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DeclarationDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationDetail.svelte"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAgB1D,KAAK,gBAAgB,GAAI;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC;AA+cvD;;;;;;;;GAQG;AACH,QAAA,MAAM,iBAAiB,sDAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
3
|
-
import {ensure_start} from '@fuzdev/fuz_util/string.ts';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
import { ensure_start } from '@fuzdev/fuz_util/string.ts';
|
|
4
4
|
|
|
5
|
-
import {library_context} from './library.svelte.js';
|
|
6
|
-
import {contextmenu_attachment} from './contextmenu_state.svelte.js';
|
|
7
|
-
import {create_declaration_contextmenu} from './declaration_contextmenu.js';
|
|
5
|
+
import { library_context } from './library.svelte.js';
|
|
6
|
+
import { contextmenu_attachment } from './contextmenu_state.svelte.js';
|
|
7
|
+
import { create_declaration_contextmenu } from './declaration_contextmenu.js';
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
name,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
const declaration = $derived(
|
|
40
40
|
module_path === undefined
|
|
41
41
|
? library.declaration_by_name.get(name)
|
|
42
|
-
: library.module_by_path.get(module_path)?.get_declaration_by_name(name)
|
|
42
|
+
: library.module_by_path.get(module_path)?.get_declaration_by_name(name)
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
// When linking a foreign library's docs, prefer its full URL; fall back to
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
const url_api = $derived((full && declaration?.url_api_full) || declaration?.url_api);
|
|
48
48
|
|
|
49
49
|
const contextmenu_entries = $derived(
|
|
50
|
-
declaration ? create_declaration_contextmenu(declaration) : undefined
|
|
50
|
+
declaration ? create_declaration_contextmenu(declaration) : undefined
|
|
51
51
|
);
|
|
52
52
|
</script>
|
|
53
53
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclarationLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DeclarationLink.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/DeclarationLink.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAOzD,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/Details.svelte
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {Snippet} from 'svelte';
|
|
3
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
|
-
import {slide} from 'svelte/transition';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
4
|
+
import { slide } from 'svelte/transition';
|
|
5
5
|
|
|
6
6
|
// TODO it may be possible to cleanly add the transition with eager rendering by intercepting the open user action
|
|
7
7
|
// in this case, lazy rendering is probably the better default to retain `ctrl+f` functionality
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Details.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Details.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Details.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Details.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,KAAK,gBAAgB,GAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AA4CH,QAAA,MAAM,OAAO,0DAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
package/dist/Dialog.svelte
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {Snippet} from 'svelte';
|
|
3
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
|
-
import {SvelteSet} from 'svelte/reactivity';
|
|
5
|
-
import {swallow} from '@fuzdev/fuz_util/dom.ts';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
4
|
+
import { SvelteSet } from 'svelte/reactivity';
|
|
5
|
+
import { swallow } from '@fuzdev/fuz_util/dom.ts';
|
|
6
6
|
|
|
7
|
-
import {dialog_context, type DialogContext, type DialogAlign} from './dialog.js';
|
|
7
|
+
import { dialog_context, type DialogContext, type DialogAlign } from './dialog.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This component renders a native `<dialog>` opened with `showModal()`, which
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
|
|
123
123
|
// The context is both passed to `children` and set for descendants (e.g.
|
|
124
124
|
// `DialogContent`), so either path can close the dialog.
|
|
125
|
-
const context: DialogContext = {close, register_surface};
|
|
125
|
+
const context: DialogContext = { close, register_surface };
|
|
126
126
|
dialog_context.set(context);
|
|
127
127
|
|
|
128
128
|
const setup_dialog = (el: HTMLDialogElement) => {
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
{#if show}
|
|
150
150
|
<dialog
|
|
151
151
|
{...rest}
|
|
152
|
-
class={['dialog', rest.class, {'align-top': align === 'top'}]}
|
|
152
|
+
class={['dialog', rest.class, { 'align-top': align === 'top' }]}
|
|
153
153
|
{@attach setup_dialog}
|
|
154
154
|
>
|
|
155
155
|
<div
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Dialog.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Dialog.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Dialog.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAElF,KAAK,gBAAgB,GAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG;IACrF;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;CAC3C,CAAC;AAsHH,QAAA,MAAM,MAAM,sDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|