fromsrc 0.0.2 → 0.0.21
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 +17 -7
- 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 +17 -4
- 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 +33 -29
- 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 +6 -2
- package/dist/components/feedbackwidget.js +10 -4
- 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 +22 -17
- 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 +3 -2
- package/dist/components/panel.js +91 -15
- 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 +3 -1
- 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 +35 -22
- 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 +221 -56
- package/dist/components/sidebarfilter.d.ts +1 -1
- package/dist/components/sidebarfilter.js +30 -6
- package/dist/components/sidebarscript.d.ts +5 -0
- package/dist/components/sidebarscript.js +18 -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 +25 -3
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
interface ClipboardResult {
|
|
2
2
|
copy: (text: string) => Promise<void>;
|
|
3
3
|
paste: () => Promise<string>;
|
|
4
4
|
copied: boolean;
|
|
5
5
|
supported: boolean;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
declare function useClipboard(timeout?: number): ClipboardResult;
|
|
8
8
|
|
|
9
9
|
export { type ClipboardResult, useClipboard };
|
package/dist/hooks/clipboard.js
CHANGED
|
@@ -4,21 +4,27 @@ function useClipboard(timeout = 2e3) {
|
|
|
4
4
|
const [copied, setCopied] = useState(false);
|
|
5
5
|
const timer = useRef(null);
|
|
6
6
|
const supported = typeof navigator !== "undefined" && !!navigator.clipboard;
|
|
7
|
-
const copy = useCallback(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
const copy = useCallback(
|
|
8
|
+
async (text) => {
|
|
9
|
+
await navigator.clipboard.writeText(text);
|
|
10
|
+
setCopied(true);
|
|
11
|
+
if (timer.current) {
|
|
12
|
+
clearTimeout(timer.current);
|
|
13
|
+
}
|
|
14
|
+
timer.current = setTimeout(() => setCopied(false), timeout);
|
|
15
|
+
},
|
|
16
|
+
[timeout]
|
|
17
|
+
);
|
|
18
|
+
const paste = useCallback(() => navigator.clipboard.readText(), []);
|
|
19
|
+
useEffect(
|
|
20
|
+
() => () => {
|
|
21
|
+
if (timer.current) {
|
|
22
|
+
clearTimeout(timer.current);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
[]
|
|
26
|
+
);
|
|
27
|
+
return { copied, copy, paste, supported };
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
export { useClipboard };
|
package/dist/hooks/copy.js
CHANGED
|
@@ -4,17 +4,22 @@ import { useState, useRef, useEffect, useCallback } from 'react';
|
|
|
4
4
|
function useCopy(duration = 1500) {
|
|
5
5
|
const [copied, setCopied] = useState(false);
|
|
6
6
|
const timeoutRef = useRef(null);
|
|
7
|
-
useEffect(
|
|
8
|
-
|
|
9
|
-
if (timeoutRef.current)
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
useEffect(
|
|
8
|
+
() => () => {
|
|
9
|
+
if (timeoutRef.current) {
|
|
10
|
+
clearTimeout(timeoutRef.current);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
[]
|
|
14
|
+
);
|
|
12
15
|
const copy = useCallback(
|
|
13
16
|
async (text) => {
|
|
14
17
|
try {
|
|
15
18
|
await navigator.clipboard.writeText(text);
|
|
16
19
|
setCopied(true);
|
|
17
|
-
if (timeoutRef.current)
|
|
20
|
+
if (timeoutRef.current) {
|
|
21
|
+
clearTimeout(timeoutRef.current);
|
|
22
|
+
}
|
|
18
23
|
timeoutRef.current = setTimeout(() => setCopied(false), duration);
|
|
19
24
|
} catch {
|
|
20
25
|
setCopied(false);
|
package/dist/hooks/countdown.js
CHANGED
|
@@ -35,7 +35,7 @@ function useCountdown(seconds) {
|
|
|
35
35
|
setRemaining(seconds);
|
|
36
36
|
}, [clear, seconds]);
|
|
37
37
|
useEffect(() => clear, [clear]);
|
|
38
|
-
return {
|
|
38
|
+
return { pause, remaining, reset, running, start };
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export { useCountdown };
|
package/dist/hooks/counter.js
CHANGED
|
@@ -6,7 +6,7 @@ function useCounter(initial = 0) {
|
|
|
6
6
|
const increment = useCallback(() => setCount((c) => c + 1), []);
|
|
7
7
|
const decrement = useCallback(() => setCount((c) => c - 1), []);
|
|
8
8
|
const reset = useCallback(() => setCount(initial), [initial]);
|
|
9
|
-
return { count,
|
|
9
|
+
return { count, decrement, increment, reset, set: setCount };
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { useCounter };
|
package/dist/hooks/escapekey.js
CHANGED
|
@@ -12,7 +12,12 @@ function useEscapeKey(handler, enabled = true) {
|
|
|
12
12
|
},
|
|
13
13
|
[handler]
|
|
14
14
|
);
|
|
15
|
-
useEventListener(
|
|
15
|
+
useEventListener(
|
|
16
|
+
typeof document !== "undefined" ? document : null,
|
|
17
|
+
"keydown",
|
|
18
|
+
handleKey,
|
|
19
|
+
enabled
|
|
20
|
+
);
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
export { useEscapeKey };
|
|
@@ -3,7 +3,9 @@ import { useEffect } from 'react';
|
|
|
3
3
|
|
|
4
4
|
function useEventListener(target, event, handler, enabled = true, options) {
|
|
5
5
|
useEffect(() => {
|
|
6
|
-
if (!enabled || !target)
|
|
6
|
+
if (!enabled || !target) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
7
9
|
const listener = handler;
|
|
8
10
|
target.addEventListener(event, listener, options);
|
|
9
11
|
return () => {
|
|
@@ -11,7 +11,9 @@ function useEventSource(url) {
|
|
|
11
11
|
setStatus("closed");
|
|
12
12
|
}, []);
|
|
13
13
|
useEffect(() => {
|
|
14
|
-
if (!url)
|
|
14
|
+
if (!url) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
15
17
|
setStatus("connecting");
|
|
16
18
|
const source = new EventSource(url);
|
|
17
19
|
sourceRef.current = source;
|
|
@@ -25,7 +27,7 @@ function useEventSource(url) {
|
|
|
25
27
|
source.close();
|
|
26
28
|
};
|
|
27
29
|
}, [url]);
|
|
28
|
-
return {
|
|
30
|
+
return { close, lastData, lastEvent, status };
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export { useEventSource };
|
package/dist/hooks/eyedropper.js
CHANGED
|
@@ -5,10 +5,14 @@ function useEyeDropper() {
|
|
|
5
5
|
const [color, setColor] = useState(null);
|
|
6
6
|
const supported = typeof window !== "undefined" && "EyeDropper" in window;
|
|
7
7
|
const pick = useCallback(async () => {
|
|
8
|
-
if (!supported)
|
|
8
|
+
if (!supported) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
9
11
|
try {
|
|
10
12
|
const Dropper = window.EyeDropper;
|
|
11
|
-
if (!Dropper)
|
|
13
|
+
if (!Dropper) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
12
16
|
const dropper = new Dropper();
|
|
13
17
|
const result = await dropper.open();
|
|
14
18
|
setColor(result.sRGBHex);
|
|
@@ -17,7 +21,7 @@ function useEyeDropper() {
|
|
|
17
21
|
return null;
|
|
18
22
|
}
|
|
19
23
|
}, [supported]);
|
|
20
|
-
return { color,
|
|
24
|
+
return { color, pick, supported };
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
export { useEyeDropper };
|
package/dist/hooks/favicon.js
CHANGED
package/dist/hooks/fetch.js
CHANGED
|
@@ -8,16 +8,24 @@ function useFetch(url, options) {
|
|
|
8
8
|
loading: !!url
|
|
9
9
|
});
|
|
10
10
|
useEffect(() => {
|
|
11
|
-
if (!url)
|
|
11
|
+
if (!url) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
12
14
|
let cancelled = false;
|
|
13
15
|
setState({ data: null, error: null, loading: true });
|
|
14
16
|
fetch(url, options).then((res) => {
|
|
15
|
-
if (!res.ok)
|
|
17
|
+
if (!res.ok) {
|
|
18
|
+
throw new Error(res.statusText);
|
|
19
|
+
}
|
|
16
20
|
return res.json();
|
|
17
21
|
}).then((data) => {
|
|
18
|
-
if (!cancelled)
|
|
22
|
+
if (!cancelled) {
|
|
23
|
+
setState({ data, error: null, loading: false });
|
|
24
|
+
}
|
|
19
25
|
}).catch((error) => {
|
|
20
|
-
if (!cancelled)
|
|
26
|
+
if (!cancelled) {
|
|
27
|
+
setState({ data: null, error, loading: false });
|
|
28
|
+
}
|
|
21
29
|
});
|
|
22
30
|
return () => {
|
|
23
31
|
cancelled = true;
|
package/dist/hooks/focustrap.js
CHANGED
|
@@ -6,8 +6,10 @@ function useFocusTrap(ref, options) {
|
|
|
6
6
|
const { enabled, onEscape, autoFocus = true, restoreFocus = true } = options;
|
|
7
7
|
const previousFocus = useRef(null);
|
|
8
8
|
const getFocusableElements = useCallback(() => {
|
|
9
|
-
if (!ref.current)
|
|
10
|
-
|
|
9
|
+
if (!ref.current) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
return [...ref.current.querySelectorAll(FOCUSABLE_SELECTOR)];
|
|
11
13
|
}, [ref]);
|
|
12
14
|
const handleKeyDown = useCallback(
|
|
13
15
|
(e) => {
|
|
@@ -15,11 +17,15 @@ function useFocusTrap(ref, options) {
|
|
|
15
17
|
onEscape();
|
|
16
18
|
return;
|
|
17
19
|
}
|
|
18
|
-
if (e.key !== "Tab")
|
|
20
|
+
if (e.key !== "Tab") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
19
23
|
const focusable = getFocusableElements();
|
|
20
|
-
if (focusable.length === 0)
|
|
24
|
+
if (focusable.length === 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
21
27
|
const first = focusable[0];
|
|
22
|
-
const last = focusable
|
|
28
|
+
const last = focusable.at(-1);
|
|
23
29
|
if (e.shiftKey && document.activeElement === first) {
|
|
24
30
|
e.preventDefault();
|
|
25
31
|
last?.focus();
|
|
@@ -31,7 +37,9 @@ function useFocusTrap(ref, options) {
|
|
|
31
37
|
[onEscape, getFocusableElements]
|
|
32
38
|
);
|
|
33
39
|
useEffect(() => {
|
|
34
|
-
if (!enabled)
|
|
40
|
+
if (!enabled) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
35
43
|
previousFocus.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
36
44
|
document.addEventListener("keydown", handleKeyDown);
|
|
37
45
|
return () => {
|
|
@@ -42,12 +50,16 @@ function useFocusTrap(ref, options) {
|
|
|
42
50
|
};
|
|
43
51
|
}, [enabled, handleKeyDown, restoreFocus]);
|
|
44
52
|
useEffect(() => {
|
|
45
|
-
if (!enabled || !autoFocus)
|
|
53
|
+
if (!enabled || !autoFocus) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
46
56
|
const focusable = getFocusableElements();
|
|
47
57
|
focusable[0]?.focus();
|
|
48
58
|
}, [enabled, autoFocus, getFocusableElements]);
|
|
49
59
|
useEffect(() => {
|
|
50
|
-
if (!enabled)
|
|
60
|
+
if (!enabled) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
51
63
|
const handleFocusIn = (e) => {
|
|
52
64
|
if (!(e.target instanceof Node) || !ref.current?.contains(e.target)) {
|
|
53
65
|
const focusable = getFocusableElements();
|
|
@@ -6,10 +6,14 @@ function useFocusWithin() {
|
|
|
6
6
|
const [focused, setFocused] = useState(false);
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
const el = ref.current;
|
|
9
|
-
if (!el)
|
|
9
|
+
if (!el) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
10
12
|
const onFocusIn = () => setFocused(true);
|
|
11
13
|
const onFocusOut = (e) => {
|
|
12
|
-
if (!(e.relatedTarget instanceof Node) || !el.contains(e.relatedTarget))
|
|
14
|
+
if (!(e.relatedTarget instanceof Node) || !el.contains(e.relatedTarget)) {
|
|
15
|
+
setFocused(false);
|
|
16
|
+
}
|
|
13
17
|
};
|
|
14
18
|
el.addEventListener("focusin", onFocusIn);
|
|
15
19
|
el.addEventListener("focusout", onFocusOut);
|
package/dist/hooks/form.d.ts
CHANGED
package/dist/hooks/form.js
CHANGED
|
@@ -14,7 +14,9 @@ function useForm(initial, validate) {
|
|
|
14
14
|
(field, value) => {
|
|
15
15
|
setValues((prev) => {
|
|
16
16
|
const next = update(prev, field, value);
|
|
17
|
-
if (validate)
|
|
17
|
+
if (validate) {
|
|
18
|
+
setErrors(validate(next));
|
|
19
|
+
}
|
|
18
20
|
return next;
|
|
19
21
|
});
|
|
20
22
|
},
|
|
@@ -36,7 +38,18 @@ function useForm(initial, validate) {
|
|
|
36
38
|
(field) => () => setTouched((prev) => ({ ...prev, [field]: true })),
|
|
37
39
|
[]
|
|
38
40
|
);
|
|
39
|
-
return {
|
|
41
|
+
return {
|
|
42
|
+
dirty,
|
|
43
|
+
errors,
|
|
44
|
+
handleBlur,
|
|
45
|
+
handleChange,
|
|
46
|
+
reset,
|
|
47
|
+
set,
|
|
48
|
+
setError,
|
|
49
|
+
touched,
|
|
50
|
+
valid,
|
|
51
|
+
values
|
|
52
|
+
};
|
|
40
53
|
}
|
|
41
54
|
|
|
42
55
|
export { useForm };
|
package/dist/hooks/fullscreen.js
CHANGED
|
@@ -3,27 +3,27 @@ import { useState, useCallback, useEffect } from 'react';
|
|
|
3
3
|
|
|
4
4
|
function useGeolocation(watch = false) {
|
|
5
5
|
const [pos, setPos] = useState({
|
|
6
|
-
latitude: null,
|
|
7
|
-
longitude: null,
|
|
8
6
|
accuracy: null,
|
|
7
|
+
error: null,
|
|
8
|
+
latitude: null,
|
|
9
9
|
loading: true,
|
|
10
|
-
|
|
10
|
+
longitude: null
|
|
11
11
|
});
|
|
12
12
|
const onSuccess = useCallback((p) => {
|
|
13
13
|
setPos({
|
|
14
|
-
latitude: p.coords.latitude,
|
|
15
|
-
longitude: p.coords.longitude,
|
|
16
14
|
accuracy: p.coords.accuracy,
|
|
15
|
+
error: null,
|
|
16
|
+
latitude: p.coords.latitude,
|
|
17
17
|
loading: false,
|
|
18
|
-
|
|
18
|
+
longitude: p.coords.longitude
|
|
19
19
|
});
|
|
20
20
|
}, []);
|
|
21
21
|
const onError = useCallback((e) => {
|
|
22
|
-
setPos((prev) => ({ ...prev,
|
|
22
|
+
setPos((prev) => ({ ...prev, error: e.message, loading: false }));
|
|
23
23
|
}, []);
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
if (typeof navigator === "undefined" || !navigator.geolocation) {
|
|
26
|
-
setPos((prev) => ({ ...prev,
|
|
26
|
+
setPos((prev) => ({ ...prev, error: "unsupported", loading: false }));
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
navigator.geolocation.getCurrentPosition(onSuccess, onError);
|
package/dist/hooks/hotkeys.js
CHANGED
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
function matches(e, binding) {
|
|
5
|
-
if (e.key.toLowerCase() !== binding.key.toLowerCase())
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (binding.
|
|
9
|
-
|
|
5
|
+
if (e.key.toLowerCase() !== binding.key.toLowerCase()) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (binding.ctrl && !e.ctrlKey) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
if (binding.meta && !e.metaKey) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
if (binding.shift && !e.shiftKey) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
if (binding.alt && !e.altKey) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
10
20
|
return true;
|
|
11
21
|
}
|
|
12
22
|
function useHotkeys(bindings) {
|
|
@@ -14,8 +24,10 @@ function useHotkeys(bindings) {
|
|
|
14
24
|
ref.current = bindings;
|
|
15
25
|
useEffect(() => {
|
|
16
26
|
function handle(e) {
|
|
17
|
-
if (!(e.target instanceof HTMLElement))
|
|
18
|
-
|
|
27
|
+
if (!(e.target instanceof HTMLElement)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const { target } = e;
|
|
19
31
|
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) {
|
|
20
32
|
return;
|
|
21
33
|
}
|
package/dist/hooks/hover.d.ts
CHANGED
package/dist/hooks/hover.js
CHANGED
|
@@ -6,7 +6,9 @@ function useHover() {
|
|
|
6
6
|
const [hovered, setHovered] = useState(false);
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
const el = ref.current;
|
|
9
|
-
if (!el)
|
|
9
|
+
if (!el) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
10
12
|
const enter = () => setHovered(true);
|
|
11
13
|
const leave = () => setHovered(false);
|
|
12
14
|
el.addEventListener("mouseenter", enter);
|
package/dist/hooks/idle.js
CHANGED
|
@@ -7,10 +7,18 @@ function useIdle(timeout = 6e4) {
|
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
function reset() {
|
|
9
9
|
setIdle(false);
|
|
10
|
-
if (timer.current)
|
|
10
|
+
if (timer.current) {
|
|
11
|
+
clearTimeout(timer.current);
|
|
12
|
+
}
|
|
11
13
|
timer.current = setTimeout(() => setIdle(true), timeout);
|
|
12
14
|
}
|
|
13
|
-
const events = [
|
|
15
|
+
const events = [
|
|
16
|
+
"mousemove",
|
|
17
|
+
"keydown",
|
|
18
|
+
"scroll",
|
|
19
|
+
"touchstart",
|
|
20
|
+
"click"
|
|
21
|
+
];
|
|
14
22
|
for (const event of events) {
|
|
15
23
|
window.addEventListener(event, reset, { passive: true });
|
|
16
24
|
}
|
|
@@ -19,7 +27,9 @@ function useIdle(timeout = 6e4) {
|
|
|
19
27
|
for (const event of events) {
|
|
20
28
|
window.removeEventListener(event, reset);
|
|
21
29
|
}
|
|
22
|
-
if (timer.current)
|
|
30
|
+
if (timer.current) {
|
|
31
|
+
clearTimeout(timer.current);
|
|
32
|
+
}
|
|
23
33
|
};
|
|
24
34
|
}, [timeout]);
|
|
25
35
|
return idle;
|
|
@@ -7,7 +7,9 @@ function useInfiniteScroll(onLoadMore, threshold = 200) {
|
|
|
7
7
|
const [done, setDone] = useState(false);
|
|
8
8
|
const loadingRef = useRef(false);
|
|
9
9
|
const handleScroll = useCallback(() => {
|
|
10
|
-
if (loadingRef.current || done)
|
|
10
|
+
if (loadingRef.current || done) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
11
13
|
const el = ref.current;
|
|
12
14
|
const target = el || document.documentElement;
|
|
13
15
|
const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
@@ -25,7 +27,7 @@ function useInfiniteScroll(onLoadMore, threshold = 200) {
|
|
|
25
27
|
el.addEventListener("scroll", handleScroll, { passive: true });
|
|
26
28
|
return () => el.removeEventListener("scroll", handleScroll);
|
|
27
29
|
}, [handleScroll]);
|
|
28
|
-
return {
|
|
30
|
+
return { done, loading, ref, setDone };
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export { useInfiniteScroll };
|
package/dist/hooks/interval.js
CHANGED
|
@@ -7,7 +7,9 @@ function useInterval(callback, delay) {
|
|
|
7
7
|
savedCallback.current = callback;
|
|
8
8
|
}, [callback]);
|
|
9
9
|
useEffect(() => {
|
|
10
|
-
if (delay === null)
|
|
10
|
+
if (delay === null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
11
13
|
const id = setInterval(() => savedCallback.current(), delay);
|
|
12
14
|
return () => clearInterval(id);
|
|
13
15
|
}, [delay]);
|
package/dist/hooks/inview.js
CHANGED
|
@@ -7,17 +7,21 @@ function useInView(options = {}) {
|
|
|
7
7
|
const [inView, setInView] = useState(false);
|
|
8
8
|
useEffect(() => {
|
|
9
9
|
const element = ref.current;
|
|
10
|
-
if (!element)
|
|
10
|
+
if (!element) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
11
13
|
const observer = new IntersectionObserver(
|
|
12
14
|
([entry]) => {
|
|
13
|
-
if (!entry)
|
|
15
|
+
if (!entry) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
14
18
|
const visible = entry.isIntersecting;
|
|
15
19
|
setInView(visible);
|
|
16
20
|
if (visible && once) {
|
|
17
21
|
observer.disconnect();
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
|
-
{
|
|
24
|
+
{ rootMargin, threshold }
|
|
21
25
|
);
|
|
22
26
|
observer.observe(element);
|
|
23
27
|
return () => observer.disconnect();
|
package/dist/hooks/keyboard.js
CHANGED
|
@@ -31,20 +31,30 @@ function useKeyboardNav(docs, basePath = "/docs") {
|
|
|
31
31
|
const router = useRouter();
|
|
32
32
|
useEffect(() => {
|
|
33
33
|
const sorted = sortDocs(docs);
|
|
34
|
-
const paths = sorted.map(
|
|
34
|
+
const paths = sorted.map(
|
|
35
|
+
(d) => d.slug ? `${basePath}/${d.slug}` : basePath
|
|
36
|
+
);
|
|
35
37
|
const current = paths.indexOf(pathname);
|
|
36
38
|
const handleKeyDown = (e) => {
|
|
37
|
-
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement)
|
|
38
|
-
|
|
39
|
+
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
39
45
|
if (e.key === "ArrowRight" && current < paths.length - 1) {
|
|
40
46
|
e.preventDefault();
|
|
41
47
|
const next = paths[current + 1];
|
|
42
|
-
if (next)
|
|
48
|
+
if (next) {
|
|
49
|
+
router.push(next);
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
52
|
if (e.key === "ArrowLeft" && current > 0) {
|
|
45
53
|
e.preventDefault();
|
|
46
54
|
const prev = paths[current - 1];
|
|
47
|
-
if (prev)
|
|
55
|
+
if (prev) {
|
|
56
|
+
router.push(prev);
|
|
57
|
+
}
|
|
48
58
|
}
|
|
49
59
|
};
|
|
50
60
|
window.addEventListener("keydown", handleKeyDown);
|
|
@@ -52,8 +62,12 @@ function useKeyboardNav(docs, basePath = "/docs") {
|
|
|
52
62
|
}, [docs, pathname, router, basePath]);
|
|
53
63
|
}
|
|
54
64
|
function editable(target) {
|
|
55
|
-
if (!(target instanceof HTMLElement))
|
|
56
|
-
|
|
65
|
+
if (!(target instanceof HTMLElement)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
57
71
|
return target.isContentEditable;
|
|
58
72
|
}
|
|
59
73
|
function useKeyboardShortcut(key, callback, options = {}) {
|
|
@@ -63,12 +77,22 @@ function useKeyboardShortcut(key, callback, options = {}) {
|
|
|
63
77
|
optionsRef.current = options;
|
|
64
78
|
useEffect(() => {
|
|
65
79
|
function handler(e) {
|
|
66
|
-
if (editable(e.target))
|
|
80
|
+
if (editable(e.target)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
67
83
|
const opts = optionsRef.current;
|
|
68
|
-
if (opts.ctrl && !e.ctrlKey)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (
|
|
84
|
+
if (opts.ctrl && !e.ctrlKey) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (opts.meta && !e.metaKey) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (opts.shift && !e.shiftKey) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (e.key.toLowerCase() !== key.toLowerCase()) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
72
96
|
if (opts.preventDefault !== false) {
|
|
73
97
|
e.preventDefault();
|
|
74
98
|
}
|
package/dist/hooks/keypress.js
CHANGED
|
@@ -5,10 +5,14 @@ function useKeyPress(targetKey) {
|
|
|
5
5
|
const [pressed, setPressed] = useState(false);
|
|
6
6
|
useEffect(() => {
|
|
7
7
|
function down(e) {
|
|
8
|
-
if (e.key === targetKey)
|
|
8
|
+
if (e.key === targetKey) {
|
|
9
|
+
setPressed(true);
|
|
10
|
+
}
|
|
9
11
|
}
|
|
10
12
|
function up(e) {
|
|
11
|
-
if (e.key === targetKey)
|
|
13
|
+
if (e.key === targetKey) {
|
|
14
|
+
setPressed(false);
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
window.addEventListener("keydown", down);
|
|
14
18
|
window.addEventListener("keyup", up);
|
package/dist/hooks/list.js
CHANGED
|
@@ -22,7 +22,17 @@ function useList(initial = []) {
|
|
|
22
22
|
const sort = useCallback((fn) => {
|
|
23
23
|
setItems((prev) => [...prev].sort(fn));
|
|
24
24
|
}, []);
|
|
25
|
-
return {
|
|
25
|
+
return {
|
|
26
|
+
clear,
|
|
27
|
+
filter,
|
|
28
|
+
insertAt,
|
|
29
|
+
items,
|
|
30
|
+
push,
|
|
31
|
+
removeAt,
|
|
32
|
+
set: setItems,
|
|
33
|
+
sort,
|
|
34
|
+
updateAt
|
|
35
|
+
};
|
|
26
36
|
}
|
|
27
37
|
|
|
28
38
|
export { useList };
|