fromsrc 0.0.2 → 0.0.22
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/access.d.ts +7 -7
- package/dist/access.js +12 -5
- package/dist/adapter.js +8 -16
- package/dist/adapterbrowser.js +6 -10
- package/dist/adapternext.js +7 -18
- package/dist/adapterreactrouter.js +5 -9
- package/dist/adapterremix.js +8 -17
- package/dist/adaptertanstack.js +6 -10
- package/dist/algolia.js +43 -21
- package/dist/analytics.d.ts +1 -1
- package/dist/analytics.js +16 -10
- package/dist/ansi.js +76 -37
- package/dist/api.d.ts +10 -10
- package/dist/api.js +14 -11
- package/dist/audit.d.ts +6 -6
- package/dist/audit.js +29 -10
- package/dist/autotype.js +20 -10
- package/dist/batch.d.ts +6 -6
- package/dist/batch.js +16 -9
- package/dist/changelog.js +28 -14
- package/dist/changelogutil.d.ts +4 -4
- package/dist/changelogutil.js +33 -13
- package/dist/cli.d.ts +6 -6
- package/dist/cli.js +7 -3
- package/dist/client.d.ts +1 -1
- package/dist/codesample.d.ts +4 -4
- package/dist/codesample.js +63 -24
- package/dist/collapse.js +31 -13
- package/dist/collections.js +36 -16
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +5 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +24 -13
- package/dist/components/announce.js +40 -17
- package/dist/components/autofill.js +18 -8
- package/dist/components/avatar.js +4 -4
- package/dist/components/avatarstack.js +2 -2
- package/dist/components/backtotop.d.ts +1 -1
- package/dist/components/backtotop.js +18 -5
- package/dist/components/badge.js +9 -4
- package/dist/components/banner.js +22 -5
- package/dist/components/breadcrumb.js +11 -4
- package/dist/components/breadcrumbnav.js +37 -21
- package/dist/components/button.js +23 -8
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/callout.js +35 -31
- package/dist/components/changelog.js +21 -8
- package/dist/components/checkbox.js +32 -19
- package/dist/components/code.d.ts +1 -1
- package/dist/components/code.js +6 -3
- package/dist/components/codeblock.js +157 -39
- package/dist/components/codecopy.d.ts +1 -1
- package/dist/components/codecopy.js +36 -13
- package/dist/components/codegroup.js +87 -25
- package/dist/components/collapsible.d.ts +1 -1
- package/dist/components/collapsible.js +5 -1
- package/dist/components/command.d.ts +1 -1
- package/dist/components/command.js +42 -15
- package/dist/components/compare.js +20 -8
- package/dist/components/content.js +121 -79
- package/dist/components/copybutton.d.ts +1 -1
- package/dist/components/copybutton.js +14 -7
- package/dist/components/countdown.js +9 -3
- package/dist/components/create.js +34 -24
- package/dist/components/definition.js +11 -4
- package/dist/components/diffview.js +63 -29
- package/dist/components/divider.js +5 -1
- package/dist/components/docheader.js +8 -1
- package/dist/components/doclinkcard.js +27 -3
- package/dist/components/dropdown.d.ts +1 -1
- package/dist/components/dropdown.js +32 -11
- package/dist/components/dynamiccode.js +5 -3
- package/dist/components/editlink.js +35 -23
- package/dist/components/embed.js +15 -7
- package/dist/components/endpoint.d.ts +3 -3
- package/dist/components/endpoint.js +24 -9
- package/dist/components/errormessage.d.ts +1 -1
- package/dist/components/errormessage.js +4 -1
- package/dist/components/expandcode.d.ts +1 -1
- package/dist/components/expandcode.js +6 -2
- package/dist/components/feature.js +8 -1
- package/dist/components/featuregrid.d.ts +4 -4
- package/dist/components/featuregrid.js +7 -1
- package/dist/components/feedback.js +11 -7
- package/dist/components/feedbackwidget.js +18 -12
- package/dist/components/files.d.ts +1 -1
- package/dist/components/files.js +52 -18
- package/dist/components/folder.d.ts +1 -1
- package/dist/components/folder.js +21 -4
- package/dist/components/footer.js +5 -1
- package/dist/components/formlabel.d.ts +1 -1
- package/dist/components/formlabel.js +31 -18
- package/dist/components/github.js +43 -14
- package/dist/components/graph.js +38 -14
- package/dist/components/heading.js +36 -29
- package/dist/components/headingcopy.js +13 -5
- package/dist/components/hero.js +20 -14
- package/dist/components/highlight.d.ts +2 -2
- package/dist/components/highlight.js +14 -8
- package/dist/components/hover.d.ts +2 -2
- package/dist/components/hover.js +11 -4
- package/dist/components/icons.js +4 -1
- package/dist/components/inlinetoc.js +3 -1
- package/dist/components/input.js +13 -3
- package/dist/components/install.js +34 -24
- package/dist/components/kbd.js +19 -11
- package/dist/components/langicon.d.ts +1 -1
- package/dist/components/langicon.js +32 -24
- package/dist/components/language.d.ts +1 -1
- package/dist/components/language.js +12 -4
- package/dist/components/lastupdated.d.ts +2 -2
- package/dist/components/lastupdated.js +36 -12
- package/dist/components/link.d.ts +1 -1
- package/dist/components/linkcard.js +3 -1
- package/dist/components/list.d.ts +1 -1
- package/dist/components/list.js +4 -1
- package/dist/components/math.js +33 -8
- package/dist/components/mermaid.js +3 -3
- package/dist/components/mobilenav.d.ts +2 -1
- package/dist/components/mobilenav.js +116 -47
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/modal.js +9 -2
- package/dist/components/navlink.js +17 -3
- package/dist/components/openapi.d.ts +1 -1
- package/dist/components/openapi.js +102 -32
- package/dist/components/openapischema.d.ts +1 -1
- package/dist/components/openapischema.js +29 -9
- package/dist/components/openapitags.js +6 -2
- package/dist/components/pagetransition.js +5 -3
- package/dist/components/pagination.js +5 -4
- package/dist/components/panel.js +92 -16
- package/dist/components/playground.d.ts +1 -1
- package/dist/components/playground.js +153 -50
- package/dist/components/popover.js +9 -7
- package/dist/components/prelink.js +40 -9
- package/dist/components/prevnext.d.ts +1 -1
- package/dist/components/prevnext.js +36 -16
- package/dist/components/progress.js +2 -2
- package/dist/components/property.js +4 -2
- package/dist/components/quote.d.ts +2 -2
- package/dist/components/quote.js +32 -4
- package/dist/components/radio.js +36 -18
- package/dist/components/rating.js +14 -3
- package/dist/components/recent.d.ts +1 -1
- package/dist/components/recent.js +26 -10
- package/dist/components/responsive.js +21 -13
- package/dist/components/results.js +8 -4
- package/dist/components/screenshot.js +61 -21
- package/dist/components/scrollprogress.js +9 -5
- package/dist/components/scrollspy.d.ts +2 -2
- package/dist/components/scrollspy.js +9 -3
- package/dist/components/search.js +47 -18
- package/dist/components/searchbutton.js +3 -1
- package/dist/components/searchdialog.js +36 -23
- package/dist/components/searcher.d.ts +1 -1
- package/dist/components/searcher.js +51 -26
- package/dist/components/select.js +27 -13
- package/dist/components/shortcuts.d.ts +1 -1
- package/dist/components/shortcuts.js +57 -38
- package/dist/components/sidebar.d.ts +2 -1
- package/dist/components/sidebar.js +209 -64
- package/dist/components/sidebarfilter.d.ts +1 -1
- package/dist/components/sidebarfilter.js +33 -9
- package/dist/components/sidebarscript.d.ts +5 -0
- package/dist/components/sidebarscript.js +5 -0
- package/dist/components/skeleton.js +15 -3
- package/dist/components/spinner.js +13 -3
- package/dist/components/status.js +20 -8
- package/dist/components/steps.js +3 -1
- package/dist/components/switch.js +4 -4
- package/dist/components/table.js +37 -12
- package/dist/components/tabnav.d.ts +1 -1
- package/dist/components/tabnav.js +48 -36
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +56 -40
- package/dist/components/tag.js +8 -3
- package/dist/components/terminal.js +14 -4
- package/dist/components/textarea.js +96 -82
- package/dist/components/theme.d.ts +1 -1
- package/dist/components/theme.js +26 -4
- package/dist/components/themeprovider.d.ts +4 -4
- package/dist/components/themeprovider.js +16 -5
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toast.js +23 -14
- package/dist/components/toc/default.d.ts +1 -1
- package/dist/components/toc/default.js +28 -13
- package/dist/components/toc/hook.js +28 -14
- package/dist/components/toc/index.js +8 -4
- package/dist/components/toc/inline.js +12 -2
- package/dist/components/toc/minimal.js +11 -5
- package/dist/components/toc/zigzag.d.ts +1 -1
- package/dist/components/toc/zigzag.js +37 -17
- package/dist/components/tocprogress.d.ts +1 -1
- package/dist/components/tocprogress.js +66 -34
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +20 -8
- package/dist/components/trigger.js +13 -5
- package/dist/components/twoslash.js +49 -26
- package/dist/components/typetable.js +23 -4
- package/dist/components/typewriter.js +6 -2
- package/dist/components/version.js +40 -14
- package/dist/components/video.js +25 -15
- package/dist/components/zoom.js +6 -2
- package/dist/config.d.ts +2 -2
- package/dist/config.js +56 -30
- package/dist/content.d.ts +5 -5
- package/dist/content.js +121 -57
- package/dist/contentcache.d.ts +10 -10
- package/dist/contentcache.js +9 -5
- package/dist/contentdiff.d.ts +4 -4
- package/dist/contentdiff.js +16 -8
- package/dist/contributors.d.ts +4 -4
- package/dist/contributors.js +49 -19
- package/dist/diff.d.ts +6 -6
- package/dist/diff.js +37 -16
- package/dist/draft.d.ts +11 -11
- package/dist/draft.js +9 -5
- package/dist/env.js +21 -7
- package/dist/export.js +4 -4
- package/dist/frontmatter.js +11 -9
- package/dist/github.js +60 -30
- package/dist/gitsource.d.ts +1 -1
- package/dist/gitsource.js +16 -9
- package/dist/hash.d.ts +6 -6
- package/dist/hash.js +19 -7
- package/dist/highlight.d.ts +4 -4
- package/dist/highlight.js +34 -14
- package/dist/hooks/anchor.js +26 -14
- package/dist/hooks/arrownav.js +25 -7
- package/dist/hooks/async.js +3 -3
- package/dist/hooks/battery.js +11 -3
- package/dist/hooks/breakpoint.js +10 -2
- package/dist/hooks/clickoutside.js +10 -3
- package/dist/hooks/clipboard-paste.js +7 -3
- package/dist/hooks/clipboard.d.ts +2 -2
- package/dist/hooks/clipboard.js +21 -15
- package/dist/hooks/copy.js +11 -6
- package/dist/hooks/countdown.js +1 -1
- package/dist/hooks/counter.js +1 -1
- package/dist/hooks/escapekey.js +6 -1
- package/dist/hooks/eventlistener.js +3 -1
- package/dist/hooks/eventsource.js +4 -2
- package/dist/hooks/eyedropper.js +7 -3
- package/dist/hooks/favicon.js +1 -1
- package/dist/hooks/fetch.js +12 -4
- package/dist/hooks/focustrap.js +20 -8
- package/dist/hooks/focuswithin.js +6 -2
- package/dist/hooks/form.d.ts +2 -2
- package/dist/hooks/form.js +15 -2
- package/dist/hooks/fullscreen.js +1 -1
- package/dist/hooks/geolocation.js +8 -8
- package/dist/hooks/hotkeys.js +19 -7
- package/dist/hooks/hover.d.ts +4 -1
- package/dist/hooks/hover.js +3 -1
- package/dist/hooks/idle.js +13 -3
- package/dist/hooks/infinitescroll.js +4 -2
- package/dist/hooks/interval.js +3 -1
- package/dist/hooks/inview.js +7 -3
- package/dist/hooks/keyboard.js +36 -12
- package/dist/hooks/keypress.js +6 -2
- package/dist/hooks/list.js +11 -1
- package/dist/hooks/longpress.js +3 -3
- package/dist/hooks/map.js +1 -1
- package/dist/hooks/measure.js +16 -7
- package/dist/hooks/mediarecorder.js +7 -3
- package/dist/hooks/networkstate.js +4 -2
- package/dist/hooks/os.js +12 -4
- package/dist/hooks/pagination.js +6 -4
- package/dist/hooks/permission.js +6 -2
- package/dist/hooks/queue.js +4 -2
- package/dist/hooks/readprogress.js +6 -2
- package/dist/hooks/resizeobserver.js +6 -4
- package/dist/hooks/script.js +1 -1
- package/dist/hooks/scrolllock.js +6 -2
- package/dist/hooks/scrollspy.js +4 -2
- package/dist/hooks/selection.js +6 -3
- package/dist/hooks/share.js +18 -9
- package/dist/hooks/speechrecognition.js +7 -3
- package/dist/hooks/stepper.js +4 -4
- package/dist/hooks/storage.js +9 -3
- package/dist/hooks/stylesheet.js +4 -2
- package/dist/hooks/textselection.js +6 -3
- package/dist/hooks/throttle.js +6 -2
- package/dist/hooks/undoredo.js +19 -11
- package/dist/hooks/vibrate.js +3 -1
- package/dist/hooks/viewtransition.js +8 -4
- package/dist/hooks/wakelock.js +12 -7
- package/dist/hooks/websocket.js +4 -2
- package/dist/hooks/windowsize.js +2 -2
- package/dist/i18n.d.ts +2 -2
- package/dist/i18n.js +27 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lastmodified.js +11 -5
- package/dist/linkcheck.d.ts +6 -6
- package/dist/linkcheck.js +55 -14
- package/dist/llms.js +20 -4
- package/dist/manifest.js +7 -7
- package/dist/mcp.js +28 -22
- package/dist/mdtoc.d.ts +4 -4
- package/dist/mdtoc.js +11 -5
- package/dist/mdxscope.d.ts +2 -2
- package/dist/mdxscope.js +3 -1
- package/dist/meta.js +19 -7
- package/dist/migrate.js +35 -25
- package/dist/navgen.d.ts +8 -8
- package/dist/navgen.js +73 -30
- package/dist/navtree.d.ts +1 -1
- package/dist/navtree.js +39 -19
- package/dist/oembed.d.ts +4 -4
- package/dist/oembed.js +24 -18
- package/dist/ogimage.d.ts +11 -11
- package/dist/ogimage.js +24 -24
- package/dist/openapi.js +60 -33
- package/dist/openapiguard.js +21 -11
- package/dist/openapiutil.js +66 -20
- package/dist/orama.js +52 -34
- package/dist/pipeline.d.ts +4 -4
- package/dist/pipeline.js +4 -4
- package/dist/preload.d.ts +2 -2
- package/dist/preload.js +4 -4
- package/dist/ranking.d.ts +6 -6
- package/dist/ranking.js +39 -13
- package/dist/readtime.js +3 -1
- package/dist/redirects.d.ts +2 -2
- package/dist/redirects.js +20 -12
- package/dist/rehype.js +16 -9
- package/dist/rehypeautolink.d.ts +2 -2
- package/dist/rehypeautolink.js +25 -23
- package/dist/rehypecode.js +38 -28
- package/dist/rehypecopy.js +17 -13
- package/dist/rehypeinline.js +33 -27
- package/dist/rehypelinks.js +28 -20
- package/dist/rehyperaw.js +9 -3
- package/dist/rehypeslug.d.ts +1 -1
- package/dist/rehypeslug.js +23 -19
- package/dist/rehypetablewrap.d.ts +2 -2
- package/dist/rehypetablewrap.js +9 -5
- package/dist/rehypetoc.d.ts +1 -1
- package/dist/rehypetoc.js +15 -7
- package/dist/remark.js +28 -13
- package/dist/remarkadmonition.js +40 -14
- package/dist/remarkannotation.d.ts +2 -2
- package/dist/remarkannotation.js +26 -10
- package/dist/remarkbadge.js +43 -31
- package/dist/remarkblockmath.js +29 -15
- package/dist/remarkcallout.js +32 -14
- package/dist/remarkcaption.js +28 -16
- package/dist/remarkcodetitle.js +29 -13
- package/dist/remarkcolumns.js +22 -10
- package/dist/remarkdetails.js +34 -14
- package/dist/remarkdirective.js +47 -20
- package/dist/remarkembed.js +38 -22
- package/dist/remarkfiletree.js +29 -19
- package/dist/remarkfootnote.js +46 -18
- package/dist/remarkgfm.js +13 -8
- package/dist/remarkheadingid.js +16 -6
- package/dist/remarkimage.js +54 -34
- package/dist/remarkinclude.js +20 -8
- package/dist/remarkinstall.js +20 -12
- package/dist/remarklinkcard.js +33 -14
- package/dist/remarkmath.js +34 -15
- package/dist/remarkmermaid.js +10 -6
- package/dist/remarkmeta.d.ts +2 -2
- package/dist/remarkmeta.js +15 -5
- package/dist/remarkreadingtime.d.ts +2 -2
- package/dist/remarkreadingtime.js +3 -1
- package/dist/remarksteps.js +26 -14
- package/dist/remarkstructure.js +16 -10
- package/dist/remarktabs.js +31 -14
- package/dist/remarktoc.js +40 -24
- package/dist/remarkts2js.js +51 -40
- package/dist/remarktwoslash.d.ts +4 -4
- package/dist/remarktwoslash.js +24 -14
- package/dist/remarkvideo.d.ts +4 -4
- package/dist/remarkvideo.js +42 -16
- package/dist/schema.d.ts +14 -14
- package/dist/schema.js +2 -2
- package/dist/search.js +106 -48
- package/dist/searchindex.js +86 -34
- package/dist/searchpolicy.js +1 -1
- package/dist/searchscore.js +5 -5
- package/dist/searchtypo.js +30 -10
- package/dist/seo.d.ts +2 -2
- package/dist/seo.js +14 -14
- package/dist/shortcodes.d.ts +4 -4
- package/dist/shortcodes.js +25 -20
- package/dist/sitemap.js +18 -8
- package/dist/snippets.js +26 -18
- package/dist/source.js +75 -41
- package/dist/stats.d.ts +4 -4
- package/dist/stats.js +18 -12
- package/dist/testing.d.ts +7 -7
- package/dist/testing.js +74 -29
- package/dist/themeutil.d.ts +6 -6
- package/dist/themeutil.js +145 -27
- package/dist/typegen.js +31 -12
- package/dist/validate.js +19 -7
- package/dist/validator.d.ts +11 -11
- package/dist/validator.js +68 -19
- package/dist/versioning.d.ts +7 -7
- package/dist/versioning.js +27 -11
- package/dist/watcher.js +39 -15
- package/dist/webhook.d.ts +6 -6
- package/dist/webhook.js +34 -12
- package/dist/workspace.js +26 -12
- package/package.json +137 -137
- package/styles/reset.css +1 -1
|
@@ -13,60 +13,106 @@ function Sidebar({
|
|
|
13
13
|
basePath = "/docs",
|
|
14
14
|
github,
|
|
15
15
|
collapsible,
|
|
16
|
-
defaultOpenLevel = 0
|
|
16
|
+
defaultOpenLevel = 0,
|
|
17
|
+
width = 268
|
|
17
18
|
}) {
|
|
18
19
|
const [collapsed, setCollapsed] = useState(false);
|
|
19
20
|
const [hovered, setHovered] = useState(false);
|
|
20
21
|
const leaveTimer = useRef(null);
|
|
22
|
+
const floatingTimer = useRef(null);
|
|
23
|
+
const [floating, setFloating] = useState(false);
|
|
24
|
+
const widthvalue = `${width}px`;
|
|
21
25
|
useEffect(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
if (floatingTimer.current) {
|
|
27
|
+
clearTimeout(floatingTimer.current);
|
|
28
|
+
floatingTimer.current = null;
|
|
29
|
+
}
|
|
30
|
+
if (!collapsed || hovered) {
|
|
31
|
+
setFloating(false);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
floatingTimer.current = setTimeout(() => setFloating(true), 220);
|
|
35
|
+
return () => {
|
|
36
|
+
if (floatingTimer.current) {
|
|
37
|
+
clearTimeout(floatingTimer.current);
|
|
38
|
+
floatingTimer.current = null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}, [collapsed, hovered]);
|
|
25
42
|
const toggle = useCallback(() => {
|
|
26
|
-
setCollapsed((prev) =>
|
|
27
|
-
const next = !prev;
|
|
28
|
-
localStorage.setItem("sidebar-collapsed", String(next));
|
|
29
|
-
return next;
|
|
30
|
-
});
|
|
43
|
+
setCollapsed((prev) => !prev);
|
|
31
44
|
}, []);
|
|
32
45
|
const showExpanded = !collapsed || hovered;
|
|
33
|
-
const handleEnter = useCallback(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (collapsed) setHovered(true);
|
|
39
|
-
}, [collapsed]);
|
|
40
|
-
const handleLeave = useCallback(() => {
|
|
41
|
-
leaveTimer.current = setTimeout(() => setHovered(false), 150);
|
|
42
|
-
}, []);
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
return () => {
|
|
46
|
+
const handleEnter = useCallback(
|
|
47
|
+
(event) => {
|
|
48
|
+
if (event?.pointerType === "touch") {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
45
51
|
if (leaveTimer.current) {
|
|
46
52
|
clearTimeout(leaveTimer.current);
|
|
47
53
|
leaveTimer.current = null;
|
|
48
54
|
}
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
if (collapsed) {
|
|
56
|
+
setHovered(true);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
[collapsed]
|
|
60
|
+
);
|
|
61
|
+
const handleLeave = useCallback(
|
|
62
|
+
(event) => {
|
|
63
|
+
if (event.pointerType === "touch") {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (event.clientX <= 0) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const distance = Math.min(
|
|
70
|
+
event.clientX,
|
|
71
|
+
document.body.clientWidth - event.clientX
|
|
72
|
+
);
|
|
73
|
+
const delay = distance > 100 ? 0 : 500;
|
|
74
|
+
leaveTimer.current = setTimeout(() => setHovered(false), delay);
|
|
75
|
+
},
|
|
76
|
+
[]
|
|
77
|
+
);
|
|
78
|
+
useEffect(
|
|
79
|
+
() => () => {
|
|
80
|
+
if (leaveTimer.current) {
|
|
81
|
+
clearTimeout(leaveTimer.current);
|
|
82
|
+
leaveTimer.current = null;
|
|
83
|
+
}
|
|
84
|
+
if (floatingTimer.current) {
|
|
85
|
+
clearTimeout(floatingTimer.current);
|
|
86
|
+
floatingTimer.current = null;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
[]
|
|
90
|
+
);
|
|
51
91
|
const openSearch = useCallback(() => {
|
|
52
|
-
const event = new KeyboardEvent("keydown", {
|
|
92
|
+
const event = new KeyboardEvent("keydown", {
|
|
93
|
+
bubbles: true,
|
|
94
|
+
key: "k",
|
|
95
|
+
metaKey: true
|
|
96
|
+
});
|
|
53
97
|
window.dispatchEvent(event);
|
|
54
98
|
}, []);
|
|
55
|
-
const
|
|
99
|
+
const shadow = collapsed && hovered ? "shadow-xl" : "";
|
|
100
|
+
const translate = collapsed && !hovered ? `translateX(-${width}px)` : "translateX(0px)";
|
|
56
101
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
|
-
/* @__PURE__ */ jsx("div", { className: "hidden lg:block shrink-0
|
|
102
|
+
/* @__PURE__ */ jsx("div", { className: "hidden lg:block shrink-0", style: { width: widthvalue } }),
|
|
58
103
|
/* @__PURE__ */ jsxs(
|
|
59
104
|
"div",
|
|
60
105
|
{
|
|
61
|
-
className: "hidden lg:block fixed left-0 top-0 z-40 h-screen
|
|
62
|
-
|
|
63
|
-
onMouseLeave: handleLeave,
|
|
106
|
+
className: "hidden lg:block fixed left-0 top-0 z-40 h-screen pointer-events-none",
|
|
107
|
+
style: { width: widthvalue },
|
|
64
108
|
children: [
|
|
65
109
|
collapsed && /* @__PURE__ */ jsx(
|
|
66
110
|
"div",
|
|
67
111
|
{
|
|
68
|
-
className: "fixed inset-y-0 left-0
|
|
69
|
-
|
|
112
|
+
className: "fixed inset-y-0 left-0 pointer-events-auto z-40",
|
|
113
|
+
style: { width: hovered ? widthvalue : "3px" },
|
|
114
|
+
onPointerEnter: handleEnter,
|
|
115
|
+
onPointerLeave: handleLeave
|
|
70
116
|
}
|
|
71
117
|
),
|
|
72
118
|
/* @__PURE__ */ jsxs(
|
|
@@ -74,7 +120,12 @@ function Sidebar({
|
|
|
74
120
|
{
|
|
75
121
|
"aria-label": "sidebar navigation",
|
|
76
122
|
"aria-expanded": showExpanded,
|
|
77
|
-
|
|
123
|
+
"data-collapsed": collapsed,
|
|
124
|
+
"data-hovered": collapsed && hovered,
|
|
125
|
+
className: `${shadow} h-full flex flex-col bg-bg border-r border-line transition-[transform,box-shadow] duration-250 ease-[cubic-bezier(0.25,0.1,0.25,1)] pointer-events-auto`,
|
|
126
|
+
style: { transform: translate, width: widthvalue },
|
|
127
|
+
onPointerEnter: handleEnter,
|
|
128
|
+
onPointerLeave: handleLeave,
|
|
78
129
|
children: [
|
|
79
130
|
/* @__PURE__ */ jsx(
|
|
80
131
|
SidebarHeader,
|
|
@@ -102,14 +153,14 @@ function Sidebar({
|
|
|
102
153
|
]
|
|
103
154
|
}
|
|
104
155
|
),
|
|
105
|
-
|
|
156
|
+
floating && /* @__PURE__ */ jsx("div", { className: "hidden lg:flex fixed left-0 top-0 z-50 p-3 pointer-events-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col rounded-lg border border-line bg-surface/80 backdrop-blur-sm overflow-hidden", children: [
|
|
106
157
|
/* @__PURE__ */ jsx(
|
|
107
158
|
"button",
|
|
108
159
|
{
|
|
109
160
|
type: "button",
|
|
110
161
|
onClick: toggle,
|
|
111
|
-
className: "w-9 h-9 flex items-center justify-center
|
|
112
|
-
"aria-label": "
|
|
162
|
+
className: "w-9 h-9 flex items-center justify-center text-muted hover:text-fg hover:bg-surface transition-colors",
|
|
163
|
+
"aria-label": "Expand sidebar",
|
|
113
164
|
children: /* @__PURE__ */ jsx(IconPanelLeft, { size: 16 })
|
|
114
165
|
}
|
|
115
166
|
),
|
|
@@ -118,16 +169,40 @@ function Sidebar({
|
|
|
118
169
|
{
|
|
119
170
|
type: "button",
|
|
120
171
|
onClick: openSearch,
|
|
121
|
-
className: "w-9 h-9 flex items-center justify-center
|
|
122
|
-
"aria-label": "
|
|
172
|
+
className: "w-9 h-9 flex items-center justify-center text-muted hover:text-fg hover:bg-surface transition-colors",
|
|
173
|
+
"aria-label": "Open search",
|
|
123
174
|
"aria-keyshortcuts": "Meta+K",
|
|
124
|
-
children: /* @__PURE__ */ jsx(
|
|
175
|
+
children: /* @__PURE__ */ jsx(
|
|
176
|
+
"svg",
|
|
177
|
+
{
|
|
178
|
+
className: "w-4 h-4",
|
|
179
|
+
fill: "none",
|
|
180
|
+
viewBox: "0 0 24 24",
|
|
181
|
+
stroke: "currentColor",
|
|
182
|
+
"aria-hidden": "true",
|
|
183
|
+
children: /* @__PURE__ */ jsx(
|
|
184
|
+
"path",
|
|
185
|
+
{
|
|
186
|
+
strokeLinecap: "round",
|
|
187
|
+
strokeLinejoin: "round",
|
|
188
|
+
strokeWidth: 2,
|
|
189
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
)
|
|
125
194
|
}
|
|
126
195
|
)
|
|
127
|
-
] })
|
|
196
|
+
] }) })
|
|
128
197
|
] });
|
|
129
198
|
}
|
|
130
|
-
function SidebarHeader({
|
|
199
|
+
function SidebarHeader({
|
|
200
|
+
title,
|
|
201
|
+
logo,
|
|
202
|
+
collapsible,
|
|
203
|
+
collapsed,
|
|
204
|
+
onToggle
|
|
205
|
+
}) {
|
|
131
206
|
return /* @__PURE__ */ jsxs("div", { className: "px-4 h-14 flex items-center", children: [
|
|
132
207
|
collapsible && /* @__PURE__ */ jsx(
|
|
133
208
|
"button",
|
|
@@ -153,41 +228,102 @@ function SidebarHeader({ title, logo, collapsible, collapsed, onToggle }) {
|
|
|
153
228
|
)
|
|
154
229
|
] });
|
|
155
230
|
}
|
|
156
|
-
function SidebarSearch({
|
|
231
|
+
function SidebarSearch({
|
|
232
|
+
showExpanded,
|
|
233
|
+
onOpen
|
|
234
|
+
}) {
|
|
157
235
|
return /* @__PURE__ */ jsx("div", { className: "px-4 pb-2 flex items-center", children: /* @__PURE__ */ jsxs(
|
|
158
236
|
"button",
|
|
159
237
|
{
|
|
160
238
|
type: "button",
|
|
161
239
|
onClick: onOpen,
|
|
162
240
|
className: "h-9 w-full flex items-center rounded-lg border border-line bg-surface/40 text-muted hover:text-fg hover:bg-surface/80 transition-colors px-3 gap-2",
|
|
163
|
-
"aria-label": "
|
|
241
|
+
"aria-label": "Open search",
|
|
164
242
|
"aria-keyshortcuts": "Meta+K",
|
|
165
243
|
children: [
|
|
166
|
-
/* @__PURE__ */ jsx(
|
|
167
|
-
|
|
168
|
-
|
|
244
|
+
/* @__PURE__ */ jsx(
|
|
245
|
+
"svg",
|
|
246
|
+
{
|
|
247
|
+
className: "w-4 h-4 shrink-0",
|
|
248
|
+
fill: "none",
|
|
249
|
+
viewBox: "0 0 24 24",
|
|
250
|
+
stroke: "currentColor",
|
|
251
|
+
"aria-hidden": "true",
|
|
252
|
+
children: /* @__PURE__ */ jsx(
|
|
253
|
+
"path",
|
|
254
|
+
{
|
|
255
|
+
strokeLinecap: "round",
|
|
256
|
+
strokeLinejoin: "round",
|
|
257
|
+
strokeWidth: 2,
|
|
258
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ jsx("span", { className: `text-sm ${showExpanded ? "block" : "hidden"}`, children: "Search..." }),
|
|
264
|
+
/* @__PURE__ */ jsx(
|
|
265
|
+
"kbd",
|
|
266
|
+
{
|
|
267
|
+
className: `ml-auto text-[10px] font-mono text-muted/50 ${showExpanded ? "block" : "hidden"}`,
|
|
268
|
+
children: "\u2318K"
|
|
269
|
+
}
|
|
270
|
+
)
|
|
169
271
|
]
|
|
170
272
|
}
|
|
171
273
|
) });
|
|
172
274
|
}
|
|
173
|
-
function SidebarNav({
|
|
275
|
+
function SidebarNav({
|
|
276
|
+
navigation,
|
|
277
|
+
basePath,
|
|
278
|
+
defaultOpenLevel
|
|
279
|
+
}) {
|
|
174
280
|
return /* @__PURE__ */ jsx(
|
|
175
281
|
"nav",
|
|
176
282
|
{
|
|
177
283
|
"aria-label": "documentation",
|
|
178
284
|
className: "px-4 pt-2 pb-8 flex-1 min-h-0 overflow-y-auto overflow-x-hidden overscroll-contain [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
179
|
-
children: navigation.map((section) => /* @__PURE__ */ jsxs(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
285
|
+
children: navigation.map((section) => /* @__PURE__ */ jsxs(
|
|
286
|
+
"section",
|
|
287
|
+
{
|
|
288
|
+
className: "mb-6",
|
|
289
|
+
"aria-labelledby": `section-${section.title}`,
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ jsx(
|
|
292
|
+
"h3",
|
|
293
|
+
{
|
|
294
|
+
id: `section-${section.title}`,
|
|
295
|
+
className: "px-2 mb-2 text-xs font-medium text-muted/70 whitespace-nowrap",
|
|
296
|
+
children: section.title
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
/* @__PURE__ */ jsx("ul", { role: "list", className: "space-y-px", children: section.items.map((item, i) => {
|
|
300
|
+
if (!("type" in item)) {
|
|
301
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
302
|
+
NavLink,
|
|
303
|
+
{
|
|
304
|
+
href: item.slug ? `${basePath}/${item.slug}` : basePath,
|
|
305
|
+
children: item.title
|
|
306
|
+
}
|
|
307
|
+
) }, item.slug || i);
|
|
308
|
+
}
|
|
309
|
+
if (item.type === "folder") {
|
|
310
|
+
return /* @__PURE__ */ jsx(
|
|
311
|
+
Folder,
|
|
312
|
+
{
|
|
313
|
+
folder: item,
|
|
314
|
+
basePath,
|
|
315
|
+
depth: 1,
|
|
316
|
+
defaultOpenLevel
|
|
317
|
+
},
|
|
318
|
+
i
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: item.href, icon: item.icon, children: item.title }) }, i);
|
|
322
|
+
}) })
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
section.title
|
|
326
|
+
))
|
|
191
327
|
}
|
|
192
328
|
);
|
|
193
329
|
}
|
|
@@ -200,14 +336,23 @@ function SidebarFooter({ github }) {
|
|
|
200
336
|
rel: "noopener noreferrer",
|
|
201
337
|
"aria-label": "view on github",
|
|
202
338
|
className: "w-9 h-9 flex items-center justify-center rounded-lg text-muted hover:text-fg hover:bg-surface/50 transition-colors",
|
|
203
|
-
children: /* @__PURE__ */ jsx(
|
|
204
|
-
"
|
|
339
|
+
children: /* @__PURE__ */ jsx(
|
|
340
|
+
"svg",
|
|
205
341
|
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
342
|
+
className: "w-4 h-4",
|
|
343
|
+
fill: "currentColor",
|
|
344
|
+
viewBox: "0 0 24 24",
|
|
345
|
+
"aria-hidden": "true",
|
|
346
|
+
children: /* @__PURE__ */ jsx(
|
|
347
|
+
"path",
|
|
348
|
+
{
|
|
349
|
+
fillRule: "evenodd",
|
|
350
|
+
d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",
|
|
351
|
+
clipRule: "evenodd"
|
|
352
|
+
}
|
|
353
|
+
)
|
|
209
354
|
}
|
|
210
|
-
)
|
|
355
|
+
)
|
|
211
356
|
}
|
|
212
357
|
) });
|
|
213
358
|
}
|
|
@@ -5,7 +5,7 @@ import 'zod';
|
|
|
5
5
|
import '../schema.js';
|
|
6
6
|
|
|
7
7
|
declare function filternavigation(nav: SidebarSection[], q: string): SidebarSection[];
|
|
8
|
-
declare function SidebarFilter({ value, onChange }: {
|
|
8
|
+
declare function SidebarFilter({ value, onChange, }: {
|
|
9
9
|
value: string;
|
|
10
10
|
onChange: (v: string) => void;
|
|
11
11
|
}): ReactNode;
|
|
@@ -3,20 +3,32 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useCallback } from 'react';
|
|
4
4
|
|
|
5
5
|
const matches = (text, q) => text.toLowerCase().includes(q.toLowerCase());
|
|
6
|
-
const foldermatches = (f, q) => matches(f.title, q) || f.items.some(
|
|
6
|
+
const foldermatches = (f, q) => matches(f.title, q) || f.items.some(
|
|
7
|
+
(i) => i.type === "folder" ? foldermatches(i, q) : matches(i.title, q)
|
|
8
|
+
);
|
|
7
9
|
function filternavigation(nav, q) {
|
|
8
|
-
if (!q)
|
|
10
|
+
if (!q) {
|
|
11
|
+
return nav;
|
|
12
|
+
}
|
|
9
13
|
return nav.map((s) => ({
|
|
10
14
|
...s,
|
|
11
15
|
items: s.items.filter((i) => {
|
|
12
|
-
if (!("type" in i))
|
|
16
|
+
if (!("type" in i)) {
|
|
17
|
+
return matches(i.title, q);
|
|
18
|
+
}
|
|
13
19
|
return i.type === "folder" ? foldermatches(i, q) : matches(i.title, q);
|
|
14
20
|
})
|
|
15
21
|
})).filter((s) => s.items.length > 0);
|
|
16
22
|
}
|
|
17
|
-
function SidebarFilter({
|
|
23
|
+
function SidebarFilter({
|
|
24
|
+
value,
|
|
25
|
+
onChange
|
|
26
|
+
}) {
|
|
18
27
|
const ref = useRef(null);
|
|
19
|
-
const handle = useCallback(
|
|
28
|
+
const handle = useCallback(
|
|
29
|
+
(e) => onChange(e.target.value),
|
|
30
|
+
[onChange]
|
|
31
|
+
);
|
|
20
32
|
const clear = useCallback(() => {
|
|
21
33
|
onChange("");
|
|
22
34
|
ref.current?.focus();
|
|
@@ -29,8 +41,8 @@ function SidebarFilter({ value, onChange }) {
|
|
|
29
41
|
type: "text",
|
|
30
42
|
value,
|
|
31
43
|
onChange: handle,
|
|
32
|
-
"aria-label": "
|
|
33
|
-
placeholder: "
|
|
44
|
+
"aria-label": "Filter navigation",
|
|
45
|
+
placeholder: "Filter...",
|
|
34
46
|
className: "w-full h-8 px-2.5 pr-7 rounded-md border border-line bg-surface/50 text-sm text-fg placeholder:text-muted outline-none transition-colors focus:border-accent"
|
|
35
47
|
}
|
|
36
48
|
),
|
|
@@ -39,9 +51,21 @@ function SidebarFilter({ value, onChange }) {
|
|
|
39
51
|
{
|
|
40
52
|
type: "button",
|
|
41
53
|
onClick: clear,
|
|
42
|
-
"aria-label": "
|
|
54
|
+
"aria-label": "Clear filter",
|
|
43
55
|
className: "absolute right-1.5 top-1/2 -translate-y-1/2 w-5 h-5 flex items-center justify-center text-muted hover:text-fg transition-colors",
|
|
44
|
-
children: /* @__PURE__ */ jsx(
|
|
56
|
+
children: /* @__PURE__ */ jsx(
|
|
57
|
+
"svg",
|
|
58
|
+
{
|
|
59
|
+
className: "w-3 h-3",
|
|
60
|
+
viewBox: "0 0 24 24",
|
|
61
|
+
fill: "none",
|
|
62
|
+
stroke: "currentColor",
|
|
63
|
+
strokeWidth: 2,
|
|
64
|
+
strokeLinecap: "round",
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
67
|
+
}
|
|
68
|
+
)
|
|
45
69
|
}
|
|
46
70
|
)
|
|
47
71
|
] });
|
|
@@ -14,8 +14,8 @@ const Skeleton = memo(function Skeleton2({
|
|
|
14
14
|
{
|
|
15
15
|
className: `animate-pulse bg-surface ${radiusClass} ${className}`,
|
|
16
16
|
style: {
|
|
17
|
-
width: typeof width === "number" ? `${width}px` : width,
|
|
18
17
|
height: typeof height === "number" ? `${height}px` : height,
|
|
18
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
19
19
|
willChange: "opacity"
|
|
20
20
|
},
|
|
21
21
|
role: "status",
|
|
@@ -33,8 +33,20 @@ const SkeletonText = memo(function SkeletonText2({
|
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
className: "space-y-2",
|
|
36
|
-
...standalone && {
|
|
37
|
-
|
|
36
|
+
...standalone && {
|
|
37
|
+
"aria-busy": true,
|
|
38
|
+
"aria-label": label,
|
|
39
|
+
role: "status"
|
|
40
|
+
},
|
|
41
|
+
children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx(
|
|
42
|
+
Skeleton,
|
|
43
|
+
{
|
|
44
|
+
width: i === lines - 1 ? "75%" : "100%",
|
|
45
|
+
height: "0.875rem",
|
|
46
|
+
label: ""
|
|
47
|
+
},
|
|
48
|
+
i
|
|
49
|
+
))
|
|
38
50
|
}
|
|
39
51
|
);
|
|
40
52
|
});
|
|
@@ -2,9 +2,9 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
|
|
4
4
|
const sizes = {
|
|
5
|
-
|
|
5
|
+
lg: "size-8",
|
|
6
6
|
md: "size-6",
|
|
7
|
-
|
|
7
|
+
sm: "size-4"
|
|
8
8
|
};
|
|
9
9
|
const Spinner = memo(function Spinner2({
|
|
10
10
|
size = "md",
|
|
@@ -21,7 +21,17 @@ const Spinner = memo(function Spinner2({
|
|
|
21
21
|
"aria-label": ariaHidden ? void 0 : "Loading",
|
|
22
22
|
"aria-hidden": ariaHidden,
|
|
23
23
|
children: [
|
|
24
|
-
/* @__PURE__ */ jsx(
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
"circle",
|
|
26
|
+
{
|
|
27
|
+
className: "opacity-25",
|
|
28
|
+
cx: "12",
|
|
29
|
+
cy: "12",
|
|
30
|
+
r: "10",
|
|
31
|
+
stroke: "currentColor",
|
|
32
|
+
strokeWidth: "4"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
25
35
|
/* @__PURE__ */ jsx(
|
|
26
36
|
"path",
|
|
27
37
|
{
|
|
@@ -3,18 +3,18 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
|
|
5
5
|
const statusStyles = {
|
|
6
|
-
success: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20",
|
|
7
|
-
warning: "bg-amber-500/10 text-amber-400 border-amber-500/20",
|
|
8
6
|
error: "bg-red-500/10 text-red-400 border-red-500/20",
|
|
9
7
|
info: "bg-blue-500/10 text-blue-400 border-blue-500/20",
|
|
10
|
-
neutral: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20"
|
|
8
|
+
neutral: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20",
|
|
9
|
+
success: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20",
|
|
10
|
+
warning: "bg-amber-500/10 text-amber-400 border-amber-500/20"
|
|
11
11
|
};
|
|
12
12
|
const dotStyles = {
|
|
13
|
-
success: "bg-emerald-400",
|
|
14
|
-
warning: "bg-amber-400",
|
|
15
13
|
error: "bg-red-400",
|
|
16
14
|
info: "bg-blue-400",
|
|
17
|
-
neutral: "bg-zinc-400"
|
|
15
|
+
neutral: "bg-zinc-400",
|
|
16
|
+
success: "bg-emerald-400",
|
|
17
|
+
warning: "bg-amber-400"
|
|
18
18
|
};
|
|
19
19
|
const Status = memo(function Status2({
|
|
20
20
|
type = "neutral",
|
|
@@ -28,7 +28,13 @@ const Status = memo(function Status2({
|
|
|
28
28
|
"aria-live": "polite",
|
|
29
29
|
className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full border ${statusStyles[type]}`,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */ jsx(
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
className: `w-1.5 h-1.5 rounded-full ${dotStyles[type]}`
|
|
36
|
+
}
|
|
37
|
+
),
|
|
32
38
|
children
|
|
33
39
|
]
|
|
34
40
|
}
|
|
@@ -47,7 +53,13 @@ const StatusDot = memo(function StatusDot2({
|
|
|
47
53
|
"aria-live": "polite",
|
|
48
54
|
className: "relative inline-flex",
|
|
49
55
|
children: [
|
|
50
|
-
/* @__PURE__ */ jsx(
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
"aria-hidden": "true",
|
|
60
|
+
className: `w-2 h-2 rounded-full ${dotStyles[type]}`
|
|
61
|
+
}
|
|
62
|
+
),
|
|
51
63
|
pulse && /* @__PURE__ */ jsx(
|
|
52
64
|
"span",
|
|
53
65
|
{
|
package/dist/components/steps.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
|
|
5
|
-
const Steps = memo(function Steps2({
|
|
5
|
+
const Steps = memo(function Steps2({
|
|
6
|
+
children
|
|
7
|
+
}) {
|
|
6
8
|
return /* @__PURE__ */ jsx("div", { className: "steps my-6 ml-4 border-l border-line pl-6 [counter-reset:step]", children });
|
|
7
9
|
});
|
|
8
10
|
const Step = memo(function Step2({ children }) {
|
|
@@ -4,14 +4,14 @@ import { memo, useId } from 'react';
|
|
|
4
4
|
import { FormLabel } from './formlabel';
|
|
5
5
|
|
|
6
6
|
const trackSizes = {
|
|
7
|
-
|
|
7
|
+
lg: "h-6 w-11",
|
|
8
8
|
md: "h-5 w-9",
|
|
9
|
-
|
|
9
|
+
sm: "h-4 w-7"
|
|
10
10
|
};
|
|
11
11
|
const thumbSizes = {
|
|
12
|
-
|
|
12
|
+
lg: { size: "size-5", translate: "translate-x-5" },
|
|
13
13
|
md: { size: "size-4", translate: "translate-x-4" },
|
|
14
|
-
|
|
14
|
+
sm: { size: "size-3", translate: "translate-x-3" }
|
|
15
15
|
};
|
|
16
16
|
function SwitchComponent({
|
|
17
17
|
checked = false,
|