@esportsplus/ui 0.56.4 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +232 -0
- package/README.md +129 -138
- package/build/components/accordion/index.d.ts +23 -9
- package/build/components/accordion/index.js +95 -11
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/index.d.ts +2167 -0
- package/build/components/announcement/index.js +35 -0
- package/build/components/announcement/scss/index.scss +2 -0
- package/build/components/banner/scss/index.scss +1 -1
- package/build/components/breadcrumb/index.d.ts +25 -25
- package/build/components/breadcrumb/index.js +189 -17
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/copy.js +6 -6
- package/build/components/button/faces.js +4 -4
- package/build/components/button/fan.js +85 -84
- package/build/components/button/hold.js +8 -10
- package/build/components/button/icons.js +33 -10
- package/build/components/button/index.d.ts +6 -0
- package/build/components/button/index.js +4 -1
- package/build/components/button/kbd.js +25 -25
- package/build/components/button/loading.js +7 -7
- package/build/components/button/morph.d.ts +22 -0
- package/build/components/button/morph.js +115 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.d.ts +18 -0
- package/build/components/button/sidebar.js +19 -0
- package/build/components/button/split.d.ts +23 -0
- package/build/components/button/split.js +41 -0
- package/build/components/capslock/index.d.ts +19 -0
- package/build/components/capslock/index.js +39 -0
- package/build/components/capslock/scss/index.scss +2 -0
- package/build/components/card/expand.d.ts +22 -0
- package/build/components/card/expand.js +118 -0
- package/build/components/card/index.d.ts +6 -0
- package/build/components/card/index.js +4 -0
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/index.d.ts +30 -0
- package/build/components/cc/index.js +569 -0
- package/build/components/cc/scss/index.scss +2 -0
- package/build/components/chat-minimap/index.d.ts +28 -0
- package/build/components/chat-minimap/index.js +223 -0
- package/build/components/chat-minimap/range.d.ts +9 -0
- package/build/components/chat-minimap/range.js +30 -0
- package/build/components/chat-minimap/scss/index.scss +2 -0
- package/build/components/chat-minimap/spy.d.ts +14 -0
- package/build/components/chat-minimap/spy.js +107 -0
- package/build/components/checkbox/group.d.ts +33 -0
- package/build/components/checkbox/group.js +156 -0
- package/build/components/checkbox/index.d.ts +3 -1456
- package/build/components/checkbox/index.js +3 -69
- package/build/components/checkbox/options.d.ts +6513 -0
- package/build/components/checkbox/options.js +79 -0
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/clipboard/copy.js +5 -5
- package/build/components/clipboard/index.d.ts +15 -3
- package/build/components/color-picker/index.d.ts +5 -7
- package/build/components/color-picker/index.js +175 -222
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +83 -17
- package/build/components/command/index.js +556 -143
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/container/scss/index.scss +1 -1
- package/build/components/copy/index.d.ts +23 -0
- package/build/components/copy/index.js +61 -0
- package/build/components/copy/scss/index.scss +2 -0
- package/build/components/counter/index.d.ts +3 -2
- package/build/components/counter/index.js +41 -73
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/index.d.ts +5 -0
- package/build/components/datalist/index.js +76 -49
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/index.d.ts +5 -4
- package/build/components/dock/index.js +62 -171
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/code/changes.d.ts +15 -0
- package/build/components/editor/code/changes.js +60 -0
- package/build/components/editor/code/clipboard.d.ts +6 -0
- package/build/components/editor/code/clipboard.js +50 -0
- package/build/components/editor/code/colors.d.ts +11 -0
- package/build/components/editor/code/colors.js +172 -0
- package/build/components/editor/code/commands.d.ts +22 -0
- package/build/components/editor/code/commands.js +556 -0
- package/build/components/editor/code/composition.d.ts +23 -0
- package/build/components/editor/code/composition.js +67 -0
- package/build/components/editor/code/conflicts.d.ts +21 -0
- package/build/components/editor/code/conflicts.js +91 -0
- package/build/components/editor/code/document.d.ts +127 -0
- package/build/components/editor/code/document.js +477 -0
- package/build/components/editor/code/editor.d.ts +21 -0
- package/build/components/editor/code/editor.js +30 -0
- package/build/components/editor/code/features.d.ts +77 -0
- package/build/components/editor/code/features.js +833 -0
- package/build/components/editor/code/field.d.ts +14 -0
- package/build/components/editor/code/field.js +57 -0
- package/build/components/editor/code/find.d.ts +83 -0
- package/build/components/editor/code/find.js +312 -0
- package/build/components/editor/code/folding.d.ts +34 -0
- package/build/components/editor/code/folding.js +433 -0
- package/build/components/editor/code/goto.d.ts +22 -0
- package/build/components/editor/code/goto.js +91 -0
- package/build/components/editor/code/gutter.d.ts +5 -0
- package/build/components/editor/code/gutter.js +22 -0
- package/build/components/editor/code/index.d.ts +17 -0
- package/build/components/editor/code/index.js +7 -0
- package/build/components/editor/code/keymap.d.ts +30 -0
- package/build/components/editor/code/keymap.js +356 -0
- package/build/components/editor/code/layout.d.ts +67 -0
- package/build/components/editor/code/layout.js +350 -0
- package/build/components/editor/code/links.d.ts +8 -0
- package/build/components/editor/code/links.js +32 -0
- package/build/components/editor/code/minimap.d.ts +46 -0
- package/build/components/editor/code/minimap.js +172 -0
- package/build/components/editor/code/navigation.d.ts +17 -0
- package/build/components/editor/code/navigation.js +49 -0
- package/build/components/editor/code/pointer.d.ts +40 -0
- package/build/components/editor/code/pointer.js +134 -0
- package/build/components/editor/code/projection.d.ts +43 -0
- package/build/components/editor/code/projection.js +200 -0
- package/build/components/editor/code/rows.d.ts +50 -0
- package/build/components/editor/code/rows.js +296 -0
- package/build/components/editor/code/search.d.ts +24 -0
- package/build/components/editor/code/search.js +231 -0
- package/build/components/editor/code/selection.d.ts +2 -0
- package/build/components/editor/code/selection.js +53 -0
- package/build/components/editor/code/services/completion.d.ts +27 -0
- package/build/components/editor/code/services/completion.js +90 -0
- package/build/components/editor/code/services/diagnostics.d.ts +28 -0
- package/build/components/editor/code/services/diagnostics.js +98 -0
- package/build/components/editor/code/services/hover.d.ts +14 -0
- package/build/components/editor/code/services/hover.js +66 -0
- package/build/components/editor/code/services/index.d.ts +27 -0
- package/build/components/editor/code/services/index.js +64 -0
- package/build/components/editor/code/services/model.d.ts +35 -0
- package/build/components/editor/code/services/model.js +167 -0
- package/build/components/editor/code/services/protocol.d.ts +68 -0
- package/build/components/editor/code/services/protocol.js +1 -0
- package/build/components/editor/code/services/session.d.ts +54 -0
- package/build/components/editor/code/services/session.js +496 -0
- package/build/components/editor/code/services/transport.d.ts +12 -0
- package/build/components/editor/code/services/transport.js +18 -0
- package/build/components/editor/code/syntax.d.ts +83 -0
- package/build/components/editor/code/syntax.js +1106 -0
- package/build/components/editor/code/unicode.d.ts +10 -0
- package/build/components/editor/code/unicode.js +117 -0
- package/build/components/editor/code/view.d.ts +122 -0
- package/build/components/editor/code/view.js +1560 -0
- package/build/components/editor/diffs/diff3.d.ts +25 -0
- package/build/components/editor/diffs/diff3.js +152 -0
- package/build/components/editor/diffs/engine.d.ts +18 -0
- package/build/components/editor/diffs/engine.js +110 -0
- package/build/components/editor/diffs/hunks.d.ts +41 -0
- package/build/components/editor/diffs/hunks.js +96 -0
- package/build/components/editor/diffs/index.d.ts +18 -0
- package/build/components/editor/diffs/index.js +10 -0
- package/build/components/editor/diffs/merge.d.ts +23 -0
- package/build/components/editor/diffs/merge.js +324 -0
- package/build/components/editor/diffs/render.d.ts +6 -0
- package/build/components/editor/diffs/render.js +56 -0
- package/build/components/editor/diffs/view.d.ts +44 -0
- package/build/components/editor/diffs/view.js +363 -0
- package/build/components/editor/diffs/words.d.ts +8 -0
- package/build/components/editor/diffs/words.js +47 -0
- package/build/components/editor/index.d.ts +21 -0
- package/build/components/editor/index.js +11 -0
- package/build/components/editor/markdown/editing.d.ts +7 -0
- package/build/components/editor/markdown/editing.js +55 -0
- package/build/components/editor/markdown/html.d.ts +24 -0
- package/build/components/editor/markdown/html.js +108 -0
- package/build/components/editor/markdown/index.d.ts +25 -0
- package/build/components/editor/markdown/index.js +33 -0
- package/build/components/editor/markdown/inline.d.ts +16 -0
- package/build/components/editor/markdown/inline.js +259 -0
- package/build/components/editor/markdown/layout.d.ts +63 -0
- package/build/components/editor/markdown/layout.js +252 -0
- package/build/components/editor/markdown/model.d.ts +53 -0
- package/build/components/editor/markdown/model.js +463 -0
- package/build/components/editor/markdown/render.d.ts +29 -0
- package/build/components/editor/markdown/render.js +561 -0
- package/build/components/editor/markdown/structure.d.ts +7 -0
- package/build/components/editor/markdown/structure.js +87 -0
- package/build/components/editor/markdown/view.d.ts +18 -0
- package/build/components/editor/markdown/view.js +1841 -0
- package/build/components/editor/tree/clipboard.d.ts +12 -0
- package/build/components/editor/tree/clipboard.js +48 -0
- package/build/components/editor/tree/compact.d.ts +23 -0
- package/build/components/editor/tree/compact.js +57 -0
- package/build/components/editor/tree/decorations.d.ts +39 -0
- package/build/components/editor/tree/decorations.js +126 -0
- package/build/components/editor/tree/drag.d.ts +45 -0
- package/build/components/editor/tree/drag.js +462 -0
- package/build/components/editor/tree/edit.d.ts +43 -0
- package/build/components/editor/tree/edit.js +134 -0
- package/build/components/editor/tree/filter.d.ts +7 -0
- package/build/components/editor/tree/filter.js +47 -0
- package/build/components/editor/tree/find.d.ts +55 -0
- package/build/components/editor/tree/find.js +291 -0
- package/build/components/editor/tree/glob.d.ts +2 -0
- package/build/components/editor/tree/glob.js +57 -0
- package/build/components/editor/tree/glyph.d.ts +6 -0
- package/build/components/editor/tree/glyph.js +31 -0
- package/build/components/editor/tree/history.d.ts +61 -0
- package/build/components/editor/tree/history.js +172 -0
- package/build/components/editor/tree/icons.d.ts +29 -0
- package/build/components/editor/tree/icons.js +417 -0
- package/build/components/editor/tree/index.d.ts +118 -0
- package/build/components/editor/tree/index.js +2227 -0
- package/build/components/editor/tree/jump.d.ts +8 -0
- package/build/components/editor/tree/jump.js +45 -0
- package/build/components/editor/tree/lazy.d.ts +24 -0
- package/build/components/editor/tree/lazy.js +71 -0
- package/build/components/editor/tree/model.d.ts +33 -0
- package/build/components/editor/tree/model.js +128 -0
- package/build/components/editor/tree/selection.d.ts +13 -0
- package/build/components/editor/tree/selection.js +55 -0
- package/build/components/editor/tree/shortcuts.d.ts +6 -0
- package/build/components/editor/tree/shortcuts.js +44 -0
- package/build/components/editor/tree/sort.d.ts +13 -0
- package/build/components/editor/tree/sort.js +53 -0
- package/build/components/editor/tree/spoken.d.ts +9 -0
- package/build/components/editor/tree/spoken.js +38 -0
- package/build/components/editor/tree/sprites.d.ts +4 -0
- package/build/components/editor/tree/sprites.js +152 -0
- package/build/components/editor/tree/sticky.d.ts +11 -0
- package/build/components/editor/tree/sticky.js +102 -0
- package/build/components/editor/tree/transfer.d.ts +15 -0
- package/build/components/editor/tree/transfer.js +75 -0
- package/build/components/editor/workspace/index.d.ts +64 -0
- package/build/components/editor/workspace/index.js +1125 -0
- package/build/components/editor/workspace/model.d.ts +161 -0
- package/build/components/editor/workspace/model.js +690 -0
- package/build/components/error/index.d.ts +31 -0
- package/build/components/error/index.js +150 -0
- package/build/components/error/scss/index.scss +2 -0
- package/build/components/filter/index.d.ts +38 -0
- package/build/components/filter/index.js +307 -0
- package/build/components/filter/scss/index.scss +2 -0
- package/build/components/form/action.js +1 -2
- package/build/components/form/index.d.ts +10 -1
- package/build/components/form/input.d.ts +12 -2
- package/build/components/form/input.js +12 -7
- package/build/components/form/scss/index.scss +1 -1
- package/build/components/frame/scss/index.scss +2 -0
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/heatmap/index.d.ts +32 -0
- package/build/components/heatmap/index.js +209 -0
- package/build/components/heatmap/scss/index.scss +2 -0
- package/build/components/highlight/easing.d.ts +2 -0
- package/build/components/highlight/easing.js +19 -0
- package/build/components/highlight/index.d.ts +6 -0
- package/build/components/highlight/index.js +334 -112
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/index.js +1 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/index.d.ts +17 -12
- package/build/components/image/index.js +3 -61
- package/build/components/image/lazyload.d.ts +15 -0
- package/build/components/image/lazyload.js +72 -0
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +15 -79
- package/build/components/index.js +15 -79
- package/build/components/inline-edit/format.d.ts +29 -0
- package/build/components/inline-edit/format.js +112 -0
- package/build/components/inline-edit/history.d.ts +14 -0
- package/build/components/inline-edit/history.js +40 -0
- package/build/components/inline-edit/index.d.ts +13 -7
- package/build/components/inline-edit/index.js +44 -38
- package/build/components/inline-edit/markdown.d.ts +7 -0
- package/build/components/inline-edit/markdown.js +314 -0
- package/build/components/inline-edit/model.d.ts +61 -0
- package/build/components/inline-edit/model.js +192 -0
- package/build/components/inline-edit/rich.d.ts +39 -0
- package/build/components/inline-edit/rich.js +1236 -0
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/selection.d.ts +7 -0
- package/build/components/inline-edit/selection.js +114 -0
- package/build/components/inline-edit/status.d.ts +24 -0
- package/build/components/inline-edit/status.js +196 -0
- package/build/components/inline-edit/utilities.d.ts +4 -0
- package/build/components/inline-edit/utilities.js +12 -0
- package/build/components/input/field.d.ts +14 -0
- package/build/components/input/field.js +34 -0
- package/build/components/input/index.d.ts +7 -14
- package/build/components/input/index.js +5 -41
- package/build/components/input/scrub.d.ts +30 -0
- package/build/components/input/scrub.js +221 -0
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.d.ts +24 -0
- package/build/components/input/tag.js +288 -0
- package/build/components/json/download.js +4 -3
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/index.d.ts +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/index.d.ts +10 -1
- package/build/components/marquee/index.js +240 -174
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/marquee/velocity.d.ts +17 -0
- package/build/components/marquee/velocity.js +78 -0
- package/build/components/metric/flash.d.ts +11 -0
- package/build/components/metric/flash.js +116 -0
- package/build/components/metric/index.d.ts +33 -0
- package/build/components/metric/index.js +271 -0
- package/build/components/metric/scss/index.scss +2 -0
- package/build/components/nav/index.d.ts +13 -0
- package/build/components/nav/index.js +6 -0
- package/build/components/nav/scss/index.scss +2 -0
- package/build/components/nav/spy.d.ts +9 -0
- package/build/components/nav/spy.js +157 -0
- package/build/components/nav/toc.d.ts +26 -0
- package/build/components/nav/toc.js +22 -0
- package/build/components/nav/tree.d.ts +39 -0
- package/build/components/nav/tree.js +123 -0
- package/build/components/notification/index.d.ts +15 -0
- package/build/components/notification/index.js +98 -0
- package/build/components/notification/scss/index.scss +2 -0
- package/build/components/overlay/index.d.ts +28 -9
- package/build/components/overlay/index.js +346 -8
- package/build/components/overlay/popup.d.ts +31 -0
- package/build/components/overlay/popup.js +150 -0
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/pagination/dots.d.ts +21 -0
- package/build/components/pagination/dots.js +110 -0
- package/build/components/pagination/index.d.ts +8 -3
- package/build/components/pagination/index.js +36 -59
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/progress/index.d.ts +7 -2
- package/build/components/progress/index.js +14 -10
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.d.ts +12 -0
- package/build/components/progress/text.js +124 -0
- package/build/components/pull-to-refresh/index.d.ts +3 -11
- package/build/components/pull-to-refresh/index.js +127 -165
- package/build/components/pull-to-refresh/scss/index.scss +1 -1
- package/build/components/radio/index.d.ts +2 -2
- package/build/components/radio/index.js +2 -2
- package/build/components/range/filter.d.ts +22 -0
- package/build/components/range/filter.js +322 -0
- package/build/components/range/index.d.ts +9 -2
- package/build/components/range/index.js +13 -9
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/index.d.ts +15 -8
- package/build/components/relative-time/index.js +206 -193
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/select/index.d.ts +35 -16
- package/build/components/select/index.js +358 -92
- package/build/components/select/placement.d.ts +15 -0
- package/build/components/select/placement.js +31 -0
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shortcut-recorder/index.d.ts +7 -2
- package/build/components/shortcut-recorder/index.js +107 -99
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/index.d.ts +722 -4
- package/build/components/sortable/index.js +329 -213
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/sticky-header/index.d.ts +22 -15
- package/build/components/sticky-header/index.js +41 -81
- package/build/components/sticky-header/scss/index.scss +1 -1
- package/build/components/story/index.d.ts +21 -0
- package/build/components/story/index.js +253 -0
- package/build/components/story/scss/index.scss +2 -0
- package/build/components/surface-field/engine.d.ts +65 -0
- package/build/components/surface-field/engine.js +970 -0
- package/build/components/surface-field/index.d.ts +2247 -1470
- package/build/components/surface-field/index.js +394 -371
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/surface-field/surface.d.ts +39 -0
- package/build/components/surface-field/surface.js +159 -0
- package/build/components/surface-field/worker/index.d.ts +9 -0
- package/build/components/surface-field/worker/index.js +19 -0
- package/build/components/switch/index.d.ts +2 -2
- package/build/components/switch/index.js +2 -2
- package/build/components/tasklist/index.d.ts +25 -717
- package/build/components/tasklist/index.js +151 -97
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/text/scss/index.scss +1 -1
- package/build/components/textarea/index.d.ts +15 -3
- package/build/components/textarea/index.js +124 -32
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/toast/index.d.ts +40 -7
- package/build/components/toast/index.js +192 -145
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/index.d.ts +3 -4
- package/build/components/tooltip/index.js +3 -4
- package/build/components/tooltip/menu.d.ts +47 -21
- package/build/components/tooltip/menu.js +525 -18
- package/build/components/tooltip/onclick.d.ts +1 -0
- package/build/components/tooltip/onclick.js +50 -33
- package/build/components/tooltip/onhover.d.ts +721 -10
- package/build/components/tooltip/onhover.js +129 -43
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.d.ts +34 -0
- package/build/components/tooltip/shared.js +569 -0
- package/build/components/tooltip/utilities.d.ts +23 -3
- package/build/components/tooltip/utilities.js +46 -21
- package/build/components/typewriter/index.d.ts +1439 -10
- package/build/components/typewriter/index.js +7 -2
- package/build/components/typewriter/retype.d.ts +7 -0
- package/build/components/typewriter/retype.js +83 -0
- package/build/components/typewriter/rotate.d.ts +13 -0
- package/build/components/typewriter/rotate.js +186 -0
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/index.js +61 -61
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/index.d.ts +15 -3
- package/build/components/usage-meter/index.js +19 -19
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/css-utilities/background/scss/index.scss +1 -1
- package/build/css-utilities/border/scss/index.scss +1 -1
- package/build/css-utilities/color/scss/index.scss +1 -1
- package/build/css-utilities/flex/scss/index.scss +1 -1
- package/build/css-utilities/font/geist/scss/index.scss +1 -1
- package/build/css-utilities/font/montserrat/scss/index.scss +1 -1
- package/build/css-utilities/glass/index.d.ts +10 -0
- package/build/css-utilities/glass/index.js +26 -0
- package/build/css-utilities/glass/scss/index.scss +1 -1
- package/build/css-utilities/index.d.ts +3 -0
- package/build/css-utilities/index.js +3 -0
- package/build/css-utilities/index.scss +1 -1
- package/build/css-utilities/inline/scss/index.scss +1 -1
- package/build/css-utilities/scrollbar/index.d.ts +42 -0
- package/build/css-utilities/scrollbar/index.js +155 -0
- package/build/css-utilities/scrollbar/scss/index.scss +1 -1
- package/build/css-utilities/skeleton/scss/index.scss +1 -1
- package/build/css-utilities/text/scss/index.scss +1 -1
- package/build/css-utilities/theme/index.d.ts +16 -0
- package/build/css-utilities/theme/index.js +60 -0
- package/build/normalize/scss/index.scss +3 -0
- package/build/shared/anchor.d.ts +7 -0
- package/build/shared/anchor.js +18 -0
- package/build/shared/animation.d.ts +6 -0
- package/build/shared/animation.js +57 -0
- package/build/shared/clamp.d.ts +2 -0
- package/build/shared/clamp.js +4 -0
- package/build/shared/deadline.d.ts +2 -0
- package/build/shared/deadline.js +94 -0
- package/build/shared/dismiss.d.ts +2 -0
- package/build/shared/dismiss.js +5 -0
- package/build/shared/drag.d.ts +47 -0
- package/build/shared/drag.js +189 -0
- package/build/shared/fuzzy.d.ts +6 -0
- package/build/shared/fuzzy.js +153 -0
- package/build/shared/keystep.d.ts +2 -0
- package/build/shared/keystep.js +21 -0
- package/build/shared/platform.d.ts +2 -0
- package/build/shared/platform.js +3 -0
- package/build/shared/press.d.ts +15 -0
- package/build/shared/press.js +83 -0
- package/build/shared/resize.d.ts +18 -0
- package/build/shared/resize.js +137 -0
- package/build/shared/subscribe.d.ts +3 -0
- package/build/shared/subscribe.js +12 -0
- package/build/shared/ticker.d.ts +3 -0
- package/build/shared/ticker.js +34 -0
- package/build/shared/transition.d.ts +11 -0
- package/build/shared/transition.js +49 -0
- package/build/shared/viewport.d.ts +7 -0
- package/build/shared/viewport.js +11 -0
- package/build/shared/visible.d.ts +8 -0
- package/build/shared/visible.js +79 -0
- package/build/themes/dark/input.d.ts +3 -721
- package/build/themes/dark/input.js +4 -2
- package/build/themes/dark/select.js +2 -1
- package/build/themes/dark/textarea.d.ts +15 -3
- package/build/themes/dark/textarea.js +1 -0
- package/package.json +11 -4
- package/pnpm-workspace.yaml +3 -18
- package/scripts/animation.test.mjs +45 -0
- package/scripts/chat-minimap.test.mjs +53 -0
- package/scripts/code-editor-features.test.mjs +287 -0
- package/scripts/code-editor-markdown.test.mjs +527 -0
- package/scripts/code-editor-services.test.mjs +361 -0
- package/scripts/code-editor-workspace.test.mjs +398 -0
- package/scripts/code-editor.test.mjs +1615 -0
- package/scripts/css-variables.test.mjs +1 -1
- package/scripts/deadline.test.mjs +191 -0
- package/scripts/diffs.test.mjs +189 -0
- package/scripts/file-tree-features.test.mjs +137 -0
- package/scripts/file-tree-icons.test.mjs +234 -0
- package/scripts/highlight.test.mjs +52 -0
- package/scripts/resize.test.mjs +247 -0
- package/scripts/resolve.mjs +52 -0
- package/scripts/slides.test.mjs +126 -0
- package/scripts/subscribe.test.mjs +49 -0
- package/scripts/ticker.test.mjs +126 -0
- package/scripts/transition.test.mjs +83 -0
- package/scripts/viewport.test.mjs +82 -0
- package/scripts/visible.test.mjs +186 -0
- package/shared.scss +2 -0
- package/src/components/accordion/index.ts +71 -12
- package/src/components/accordion/scss/index.scss +32 -129
- package/src/components/accordion/scss/variables.scss +7 -0
- package/src/components/announcement/index.ts +26 -0
- package/src/components/announcement/scss/index.scss +47 -0
- package/src/components/announcement/scss/variables.scss +23 -0
- package/src/components/banner/scss/index.scss +4 -8
- package/src/components/banner/scss/variables.scss +6 -0
- package/src/components/breadcrumb/index.ts +222 -25
- package/src/components/breadcrumb/scss/index.scss +217 -34
- package/src/components/breadcrumb/scss/variables.scss +73 -8
- package/src/components/button/copy.ts +1 -1
- package/src/components/button/faces.ts +1 -2
- package/src/components/button/fan.ts +111 -114
- package/src/components/button/hold.ts +9 -9
- package/src/components/button/icons.ts +15 -32
- package/src/components/button/index.ts +13 -1
- package/src/components/button/kbd.ts +6 -6
- package/src/components/button/loading.ts +1 -1
- package/src/components/button/morph.ts +153 -0
- package/src/components/button/scss/_kbd.scss +2 -1
- package/src/components/button/scss/_morph.scss +119 -0
- package/src/components/button/scss/_sidebar.scss +50 -0
- package/src/components/button/scss/_split.scss +53 -0
- package/src/components/button/scss/index.scss +45 -31
- package/src/components/button/scss/variables.scss +85 -34
- package/src/components/button/sidebar.ts +60 -0
- package/src/components/button/split.ts +60 -0
- package/src/components/capslock/index.ts +54 -0
- package/src/components/capslock/scss/index.scss +55 -0
- package/src/components/capslock/scss/variables.scss +26 -0
- package/src/components/card/expand.ts +141 -0
- package/src/components/card/index.ts +8 -0
- package/src/components/card/scss/_expand.scss +240 -0
- package/src/components/card/scss/index.scss +52 -9
- package/src/components/card/scss/variables.scss +85 -19
- package/src/components/cc/index.ts +558 -0
- package/src/components/cc/scss/index.scss +429 -0
- package/src/components/cc/scss/variables.scss +68 -0
- package/src/components/chat-minimap/index.ts +265 -0
- package/src/components/chat-minimap/range.ts +59 -0
- package/src/components/chat-minimap/scss/index.scss +140 -0
- package/src/components/chat-minimap/scss/variables.scss +97 -0
- package/src/components/chat-minimap/spy.ts +151 -0
- package/src/components/checkbox/group.ts +216 -0
- package/src/components/checkbox/index.ts +3 -41
- package/src/components/checkbox/options.ts +55 -0
- package/src/components/checkbox/scss/index.scss +69 -17
- package/src/components/checkbox/scss/variables.scss +28 -7
- package/src/components/clipboard/copy.ts +5 -5
- package/src/components/color-picker/index.ts +160 -233
- package/src/components/color-picker/scss/index.scss +51 -93
- package/src/components/color-picker/scss/variables.scss +68 -10
- package/src/components/command/index.ts +788 -206
- package/src/components/command/scss/index.scss +168 -158
- package/src/components/command/scss/variables.scss +118 -25
- package/src/components/copy/index.ts +69 -0
- package/src/components/copy/scss/index.scss +52 -0
- package/src/components/copy/scss/variables.scss +22 -0
- package/src/components/counter/index.ts +69 -94
- package/src/components/counter/scss/index.scss +20 -48
- package/src/components/counter/scss/variables.scss +24 -35
- package/src/components/datalist/index.ts +49 -29
- package/src/components/datalist/scss/index.scss +43 -24
- package/src/components/datalist/scss/variables.scss +7 -4
- package/src/components/dock/index.ts +61 -231
- package/src/components/dock/scss/index.scss +73 -39
- package/src/components/dock/scss/variables.scss +77 -16
- package/src/components/editor/code/changes.ts +111 -0
- package/src/components/editor/code/clipboard.ts +81 -0
- package/src/components/editor/code/colors.ts +278 -0
- package/src/components/editor/code/commands.ts +879 -0
- package/src/components/editor/code/composition.ts +85 -0
- package/src/components/editor/code/conflicts.ts +160 -0
- package/src/components/editor/code/document.ts +789 -0
- package/src/components/editor/code/editor.ts +68 -0
- package/src/components/editor/code/features.ts +1144 -0
- package/src/components/editor/code/field.ts +96 -0
- package/src/components/editor/code/find.ts +340 -0
- package/src/components/editor/code/folding.ts +689 -0
- package/src/components/editor/code/goto.ts +89 -0
- package/src/components/editor/code/gutter.ts +47 -0
- package/src/components/editor/code/index.ts +29 -0
- package/src/components/editor/code/keymap.ts +518 -0
- package/src/components/editor/code/layout.ts +565 -0
- package/src/components/editor/code/links.ts +55 -0
- package/src/components/editor/code/minimap.ts +260 -0
- package/src/components/editor/code/navigation.ts +95 -0
- package/src/components/editor/code/pointer.ts +199 -0
- package/src/components/editor/code/projection.ts +342 -0
- package/src/components/editor/code/rows.ts +412 -0
- package/src/components/editor/code/scss/_editor.scss +432 -0
- package/src/components/editor/code/scss/_features.scss +311 -0
- package/src/components/editor/code/scss/_services.scss +154 -0
- package/src/components/editor/code/scss/index.scss +6 -0
- package/src/components/editor/code/scss/variables.scss +194 -0
- package/src/components/editor/code/search.ts +391 -0
- package/src/components/editor/code/selection.ts +83 -0
- package/src/components/editor/code/services/completion.ts +114 -0
- package/src/components/editor/code/services/diagnostics.ts +168 -0
- package/src/components/editor/code/services/hover.ts +74 -0
- package/src/components/editor/code/services/index.ts +118 -0
- package/src/components/editor/code/services/model.ts +270 -0
- package/src/components/editor/code/services/protocol.ts +55 -0
- package/src/components/editor/code/services/session.ts +721 -0
- package/src/components/editor/code/services/transport.ts +36 -0
- package/src/components/editor/code/syntax.ts +1673 -0
- package/src/components/editor/code/unicode.ts +156 -0
- package/src/components/editor/code/view.ts +2139 -0
- package/src/components/editor/diffs/diff3.ts +280 -0
- package/src/components/editor/diffs/engine.ts +192 -0
- package/src/components/editor/diffs/hunks.ts +196 -0
- package/src/components/editor/diffs/index.ts +20 -0
- package/src/components/editor/diffs/merge.ts +377 -0
- package/src/components/editor/diffs/render.ts +95 -0
- package/src/components/editor/diffs/scss/_diffs.scss +352 -0
- package/src/components/editor/diffs/scss/_merge.scss +121 -0
- package/src/components/editor/diffs/scss/index.scss +5 -0
- package/src/components/editor/diffs/scss/variables.scss +70 -0
- package/src/components/editor/diffs/view.ts +464 -0
- package/src/components/editor/diffs/words.ts +85 -0
- package/src/components/editor/index.ts +59 -0
- package/src/components/editor/markdown/editing.ts +92 -0
- package/src/components/editor/markdown/html.ts +192 -0
- package/src/components/editor/markdown/index.ts +72 -0
- package/src/components/editor/markdown/inline.ts +399 -0
- package/src/components/editor/markdown/layout.ts +446 -0
- package/src/components/editor/markdown/model.ts +737 -0
- package/src/components/editor/markdown/render.ts +461 -0
- package/src/components/editor/markdown/scss/index.scss +456 -0
- package/src/components/editor/markdown/scss/variables.scss +109 -0
- package/src/components/editor/markdown/structure.ts +136 -0
- package/src/components/editor/markdown/view.ts +2417 -0
- package/src/components/editor/tree/clipboard.ts +80 -0
- package/src/components/editor/tree/compact.ts +93 -0
- package/src/components/editor/tree/decorations.ts +210 -0
- package/src/components/editor/tree/drag.ts +652 -0
- package/src/components/editor/tree/edit.ts +234 -0
- package/src/components/editor/tree/filter.ts +81 -0
- package/src/components/editor/tree/find.ts +500 -0
- package/src/components/editor/tree/glob.ts +76 -0
- package/src/components/editor/tree/glyph.ts +49 -0
- package/src/components/editor/tree/history.ts +282 -0
- package/src/components/editor/tree/icons.ts +507 -0
- package/src/components/editor/tree/index.ts +3438 -0
- package/src/components/editor/tree/jump.ts +78 -0
- package/src/components/editor/tree/lazy.ts +111 -0
- package/src/components/editor/tree/model.ts +235 -0
- package/src/components/editor/tree/scss/index.scss +732 -0
- package/src/components/editor/tree/scss/variables.scss +260 -0
- package/src/components/editor/tree/selection.ts +85 -0
- package/src/components/editor/tree/shortcuts.ts +64 -0
- package/src/components/editor/tree/sort.ts +104 -0
- package/src/components/editor/tree/spoken.ts +67 -0
- package/src/components/editor/tree/sprites.ts +159 -0
- package/src/components/editor/tree/sticky.ts +154 -0
- package/src/components/editor/tree/transfer.ts +134 -0
- package/src/components/editor/workspace/index.ts +1357 -0
- package/src/components/editor/workspace/model.ts +1023 -0
- package/src/components/editor/workspace/scss/index.scss +547 -0
- package/src/components/error/index.ts +189 -0
- package/src/components/error/scss/index.scss +89 -0
- package/src/components/error/scss/variables.scss +13 -0
- package/src/components/filter/index.ts +420 -0
- package/src/components/filter/scss/index.scss +6 -0
- package/src/components/filter/scss/variables.scss +17 -0
- package/src/components/form/action.ts +4 -4
- package/src/components/form/input.ts +13 -7
- package/src/components/frame/scss/index.scss +107 -0
- package/src/components/frame/scss/variables.scss +27 -0
- package/src/components/heatmap/index.ts +281 -0
- package/src/components/heatmap/scss/index.scss +131 -0
- package/src/components/heatmap/scss/variables.scss +58 -0
- package/src/components/highlight/easing.ts +33 -0
- package/src/components/highlight/index.ts +580 -77
- package/src/components/highlight/scss/index.scss +49 -9
- package/src/components/highlight/scss/variables.scss +62 -3
- package/src/components/icon/scss/index.scss +0 -1
- package/src/components/image/index.ts +3 -76
- package/src/components/image/lazyload.ts +95 -0
- package/src/components/image/scss/index.scss +71 -57
- package/src/components/image/scss/variables.scss +39 -14
- package/src/components/index.ts +27 -79
- package/src/components/inline-edit/format.ts +183 -0
- package/src/components/inline-edit/history.ts +71 -0
- package/src/components/inline-edit/index.ts +44 -38
- package/src/components/inline-edit/markdown.ts +485 -0
- package/src/components/inline-edit/model.ts +366 -0
- package/src/components/inline-edit/rich.ts +1518 -0
- package/src/components/inline-edit/scss/index.scss +431 -41
- package/src/components/inline-edit/scss/variables.scss +105 -0
- package/src/components/inline-edit/selection.ts +188 -0
- package/src/components/inline-edit/status.ts +194 -0
- package/src/components/inline-edit/utilities.ts +18 -0
- package/src/components/input/field.ts +32 -0
- package/src/components/input/index.ts +5 -38
- package/src/components/input/scrub.ts +338 -0
- package/src/components/input/scss/_field.scss +53 -0
- package/src/components/input/scss/_scrub.scss +91 -0
- package/src/components/input/scss/_tag.scss +162 -0
- package/src/components/input/scss/index.scss +5 -18
- package/src/components/input/scss/variables.scss +108 -38
- package/src/components/input/tag.ts +403 -0
- package/src/components/json/download.ts +9 -6
- package/src/components/link/scss/index.scss +9 -4
- package/src/components/link/scss/variables.scss +1 -31
- package/src/components/loading/index.ts +1 -1
- package/src/components/loading/scss/index.scss +3 -6
- package/src/components/marquee/index.ts +246 -169
- package/src/components/marquee/scss/index.scss +21 -28
- package/src/components/marquee/scss/variables.scss +16 -0
- package/src/components/marquee/velocity.ts +144 -0
- package/src/components/metric/flash.ts +128 -0
- package/src/components/metric/index.ts +315 -0
- package/src/components/metric/scss/_flash.scss +163 -0
- package/src/components/metric/scss/index.scss +163 -0
- package/src/components/metric/scss/variables.scss +133 -0
- package/src/components/nav/index.ts +13 -0
- package/src/components/nav/scss/index.scss +123 -0
- package/src/components/nav/scss/variables.scss +60 -0
- package/src/components/nav/spy.ts +203 -0
- package/src/components/nav/toc.ts +48 -0
- package/src/components/nav/tree.ts +181 -0
- package/src/components/notification/index.ts +111 -0
- package/src/components/notification/scss/index.scss +123 -0
- package/src/components/notification/scss/variables.scss +54 -0
- package/src/components/overlay/index.ts +487 -5
- package/src/components/overlay/popup.ts +214 -0
- package/src/components/overlay/scss/index.scss +379 -7
- package/src/components/overlay/scss/variables.scss +117 -0
- package/src/components/pagination/dots.ts +132 -0
- package/src/components/pagination/index.ts +34 -45
- package/src/components/pagination/scss/_dots.scss +67 -0
- package/src/components/pagination/scss/index.scss +15 -8
- package/src/components/pagination/scss/variables.scss +59 -0
- package/src/components/progress/index.ts +18 -8
- package/src/components/progress/scss/_text.scss +132 -0
- package/src/components/progress/scss/index.scss +1 -0
- package/src/components/progress/scss/variables.scss +42 -0
- package/src/components/progress/text.ts +158 -0
- package/src/components/pull-to-refresh/index.ts +126 -248
- package/src/components/pull-to-refresh/scss/index.scss +65 -29
- package/src/components/pull-to-refresh/scss/variables.scss +24 -1
- package/src/components/radio/index.ts +3 -3
- package/src/components/range/filter.ts +398 -0
- package/src/components/range/index.ts +27 -16
- package/src/components/range/scss/_filter.scss +374 -0
- package/src/components/range/scss/_slider.scss +140 -0
- package/src/components/range/scss/_vertical.scss +22 -0
- package/src/components/range/scss/index.scss +26 -14
- package/src/components/range/scss/variables.scss +78 -13
- package/src/components/relative-time/index.ts +218 -233
- package/src/components/relative-time/scss/index.scss +42 -18
- package/src/components/relative-time/scss/variables.scss +25 -0
- package/src/components/root/scss/index.scss +7 -3
- package/src/components/root/scss/variables.scss +21 -12
- package/src/components/select/index.ts +506 -153
- package/src/components/select/placement.ts +75 -0
- package/src/components/select/scss/index.scss +182 -45
- package/src/components/select/scss/variables.scss +58 -44
- package/src/components/shortcut-recorder/index.ts +145 -106
- package/src/components/shortcut-recorder/scss/index.scss +34 -121
- package/src/components/shortcut-recorder/scss/variables.scss +27 -39
- package/src/components/sortable/index.ts +380 -272
- package/src/components/sortable/scss/index.scss +107 -38
- package/src/components/sortable/scss/variables.scss +12 -1
- package/src/components/sticky-header/index.ts +43 -92
- package/src/components/sticky-header/scss/index.scss +76 -86
- package/src/components/sticky-header/scss/variables.scss +36 -12
- package/src/components/story/index.ts +305 -0
- package/src/components/story/scss/index.scss +189 -0
- package/src/components/story/scss/variables.scss +28 -0
- package/src/components/surface-field/engine.ts +1631 -0
- package/src/components/surface-field/index.ts +574 -608
- package/src/components/surface-field/scss/index.scss +74 -17
- package/src/components/surface-field/scss/variables.scss +23 -0
- package/src/components/surface-field/surface.ts +260 -0
- package/src/components/surface-field/worker/index.ts +41 -0
- package/src/components/switch/index.ts +3 -3
- package/src/components/tasklist/index.ts +197 -119
- package/src/components/tasklist/scss/index.scss +45 -128
- package/src/components/tasklist/scss/variables.scss +97 -70
- package/src/components/text/scss/index.scss +2 -15
- package/src/components/textarea/index.ts +142 -39
- package/src/components/textarea/scss/index.scss +41 -18
- package/src/components/textarea/scss/variables.scss +5 -46
- package/src/components/toast/index.ts +270 -157
- package/src/components/toast/scss/index.scss +244 -225
- package/src/components/toast/scss/variables.scss +68 -9
- package/src/components/tooltip/index.ts +9 -4
- package/src/components/tooltip/menu.ts +599 -37
- package/src/components/tooltip/onclick.ts +28 -22
- package/src/components/tooltip/onhover.ts +155 -73
- package/src/components/tooltip/scss/_menu.scss +352 -0
- package/src/components/tooltip/scss/_shared.scss +109 -0
- package/src/components/tooltip/scss/_south.scss +0 -1
- package/src/components/tooltip/scss/index.scss +16 -97
- package/src/components/tooltip/scss/variables.scss +103 -59
- package/src/components/tooltip/shared.ts +819 -0
- package/src/components/tooltip/utilities.ts +78 -23
- package/src/components/typewriter/index.ts +8 -1
- package/src/components/typewriter/retype.ts +99 -0
- package/src/components/typewriter/rotate.ts +279 -0
- package/src/components/typewriter/scss/_caret.scss +34 -0
- package/src/components/typewriter/scss/_retype.scss +67 -0
- package/src/components/typewriter/scss/_rotate.scss +28 -0
- package/src/components/typewriter/scss/index.scss +3 -33
- package/src/components/typewriter/scss/variables.scss +60 -10
- package/src/components/uptime/index.ts +50 -49
- package/src/components/uptime/scss/index.scss +67 -47
- package/src/components/uptime/scss/variables.scss +32 -4
- package/src/components/usage-meter/index.ts +17 -17
- package/src/components/usage-meter/scss/index.scss +19 -31
- package/src/components/usage-meter/scss/variables.scss +15 -7
- package/src/css-utilities/background/scss/index.scss +1 -1
- package/src/css-utilities/background/scss/variables.scss +2 -17
- package/src/css-utilities/border/scss/index.scss +1 -1
- package/src/css-utilities/border/scss/variables.scss +7 -23
- package/src/css-utilities/color/scss/index.scss +1 -1
- package/src/css-utilities/color/scss/variables.scss +2 -17
- package/src/css-utilities/flex/scss/variables.scss +0 -1
- package/src/css-utilities/font/geist/scss/index.scss +2 -2
- package/src/css-utilities/font/montserrat/scss/index.scss +2 -2
- package/src/css-utilities/glass/index.ts +42 -0
- package/src/css-utilities/glass/scss/index.scss +65 -1
- package/src/css-utilities/glass/scss/variables.scss +6 -1
- package/src/css-utilities/index.scss +0 -5
- package/src/css-utilities/index.ts +3 -0
- package/src/css-utilities/scrollbar/index.ts +200 -0
- package/src/css-utilities/scrollbar/scss/index.scss +300 -36
- package/src/css-utilities/scrollbar/scss/variables.scss +38 -3
- package/src/css-utilities/text/scss/index.scss +97 -6
- package/src/css-utilities/text/scss/variables.scss +22 -0
- package/src/css-utilities/theme/index.ts +71 -0
- package/src/normalize/scss/index.scss +42 -0
- package/src/shared/anchor.ts +34 -0
- package/src/shared/animation.ts +106 -0
- package/src/shared/clamp.ts +6 -0
- package/src/shared/deadline.ts +153 -0
- package/src/shared/dismiss.ts +6 -0
- package/src/shared/drag.ts +348 -0
- package/src/shared/fuzzy.ts +263 -0
- package/src/shared/keystep.ts +28 -0
- package/src/shared/platform.ts +10 -0
- package/src/shared/press.ts +144 -0
- package/src/shared/resize.ts +232 -0
- package/src/shared/scss/absolute.scss +28 -0
- package/src/shared/scss/anchor.scss +63 -0
- package/src/shared/scss/background.scss +21 -0
- package/src/shared/scss/border.scss +21 -0
- package/src/shared/scss/color.scss +21 -0
- package/src/shared/scss/drag.scss +7 -0
- package/src/shared/scss/hidden.scss +22 -0
- package/src/shared/scss/icon.scss +36 -0
- package/src/shared/scss/index.scss +16 -0
- package/src/shared/scss/layer.scss +20 -0
- package/src/shared/scss/list.scss +64 -0
- package/src/shared/scss/reset.scss +21 -0
- package/src/shared/scss/string.scss +18 -0
- package/src/shared/scss/text.scss +31 -0
- package/src/shared/subscribe.ts +20 -0
- package/src/shared/ticker.ts +56 -0
- package/src/shared/transition.ts +61 -0
- package/src/shared/viewport.ts +23 -0
- package/src/shared/visible.ts +127 -0
- package/src/themes/dark/input.ts +6 -2
- package/src/themes/dark/select.ts +3 -2
- package/src/themes/dark/textarea.ts +1 -0
- package/src/tokens/scss/box-shadow.scss +12 -16
- package/src/tokens/scss/color.scss +3 -2
- package/src/tokens/scss/font-family.scss +5 -0
- package/src/tokens/scss/index.scss +10 -0
- package/src/tokens/scss/state.scss +10 -8
- package/storage/code.md +180 -0
- package/storage/editor-features.md +227 -0
- package/storage/svg/amex.svg +1 -0
- package/storage/svg/arrow-down.svg +1 -0
- package/storage/svg/arrow-up.svg +1 -0
- package/storage/svg/bold.svg +1 -0
- package/storage/svg/caps-lock.svg +1 -0
- package/storage/svg/card.svg +1 -0
- package/storage/svg/chevron-down.svg +1 -0
- package/storage/svg/chevron-left.svg +1 -0
- package/storage/svg/chevron-right.svg +1 -0
- package/storage/svg/chevron-up.svg +1 -0
- package/storage/svg/chevrons-up-down.svg +1 -0
- package/storage/svg/chip.svg +1 -0
- package/storage/svg/circle.svg +1 -0
- package/storage/svg/clear-format.svg +1 -0
- package/storage/svg/close.svg +1 -0
- package/storage/svg/code.svg +1 -0
- package/storage/svg/command.svg +1 -0
- package/storage/svg/contrast.svg +1 -0
- package/storage/svg/copy.svg +1 -0
- package/storage/svg/corner-down-right.svg +1 -0
- package/storage/svg/credit-card.svg +1 -0
- package/storage/svg/dash.svg +1 -0
- package/storage/svg/discover.svg +1 -0
- package/storage/svg/document.svg +1 -0
- package/storage/svg/dots.svg +1 -0
- package/storage/svg/download.svg +1 -0
- package/storage/svg/enter.svg +1 -0
- package/storage/svg/expand.svg +1 -0
- package/storage/svg/external-link.svg +1 -0
- package/storage/svg/eye-off.svg +1 -0
- package/storage/svg/eye.svg +1 -0
- package/storage/svg/file-agents.svg +1 -0
- package/storage/svg/file-astro.svg +1 -0
- package/storage/svg/file-babel.svg +1 -0
- package/storage/svg/file-bash.svg +1 -0
- package/storage/svg/file-biome.svg +1 -0
- package/storage/svg/file-bootstrap.svg +1 -0
- package/storage/svg/file-browserslist.svg +1 -0
- package/storage/svg/file-bun.svg +1 -0
- package/storage/svg/file-c.svg +1 -0
- package/storage/svg/file-claude.svg +1 -0
- package/storage/svg/file-css.svg +1 -0
- package/storage/svg/file-database.svg +1 -0
- package/storage/svg/file-docker.svg +1 -0
- package/storage/svg/file-eslint.svg +1 -0
- package/storage/svg/file-font.svg +1 -0
- package/storage/svg/file-git.svg +1 -0
- package/storage/svg/file-go.svg +1 -0
- package/storage/svg/file-graphql.svg +1 -0
- package/storage/svg/file-html.svg +1 -0
- package/storage/svg/file-image.svg +1 -0
- package/storage/svg/file-javascript.svg +1 -0
- package/storage/svg/file-json.svg +1 -0
- package/storage/svg/file-markdown.svg +1 -0
- package/storage/svg/file-mcp.svg +1 -0
- package/storage/svg/file-nextjs.svg +1 -0
- package/storage/svg/file-npm.svg +1 -0
- package/storage/svg/file-oxc.svg +1 -0
- package/storage/svg/file-package.svg +1 -0
- package/storage/svg/file-pnpm.svg +1 -0
- package/storage/svg/file-postcss.svg +1 -0
- package/storage/svg/file-prettier.svg +1 -0
- package/storage/svg/file-python.svg +1 -0
- package/storage/svg/file-react.svg +1 -0
- package/storage/svg/file-readme.svg +1 -0
- package/storage/svg/file-ruby.svg +1 -0
- package/storage/svg/file-rust.svg +1 -0
- package/storage/svg/file-sass.svg +1 -0
- package/storage/svg/file-stylelint.svg +1 -0
- package/storage/svg/file-svelte.svg +1 -0
- package/storage/svg/file-svg.svg +1 -0
- package/storage/svg/file-svgo.svg +1 -0
- package/storage/svg/file-swift.svg +1 -0
- package/storage/svg/file-table.svg +1 -0
- package/storage/svg/file-tailwind.svg +1 -0
- package/storage/svg/file-terraform.svg +1 -0
- package/storage/svg/file-text.svg +1 -0
- package/storage/svg/file-tsconfig.svg +1 -0
- package/storage/svg/file-typescript.svg +1 -0
- package/storage/svg/file-vite.svg +1 -0
- package/storage/svg/file-vscode.svg +1 -0
- package/storage/svg/file-vue.svg +1 -0
- package/storage/svg/file-wasm.svg +1 -0
- package/storage/svg/file-webpack.svg +1 -0
- package/storage/svg/file-yml.svg +1 -0
- package/storage/svg/file-zig.svg +1 -0
- package/storage/svg/file-zip.svg +1 -0
- package/storage/svg/file.svg +1 -0
- package/storage/svg/folder-assets-open.svg +1 -0
- package/storage/svg/folder-assets.svg +1 -0
- package/storage/svg/folder-components-open.svg +1 -0
- package/storage/svg/folder-components.svg +1 -0
- package/storage/svg/folder-docs-open.svg +1 -0
- package/storage/svg/folder-docs.svg +1 -0
- package/storage/svg/folder-git-open.svg +1 -0
- package/storage/svg/folder-git.svg +1 -0
- package/storage/svg/folder-open.svg +1 -0
- package/storage/svg/folder-output-open.svg +1 -0
- package/storage/svg/folder-output.svg +1 -0
- package/storage/svg/folder-packages-open.svg +1 -0
- package/storage/svg/folder-packages.svg +1 -0
- package/storage/svg/folder-public-open.svg +1 -0
- package/storage/svg/folder-public.svg +1 -0
- package/storage/svg/folder-scripts-open.svg +1 -0
- package/storage/svg/folder-scripts.svg +1 -0
- package/storage/svg/folder-src-open.svg +1 -0
- package/storage/svg/folder-src.svg +1 -0
- package/storage/svg/folder-test-open.svg +1 -0
- package/storage/svg/folder-test.svg +1 -0
- package/storage/svg/folder.svg +1 -0
- package/storage/svg/gear.svg +1 -0
- package/storage/svg/help.svg +1 -0
- package/storage/svg/highlight.svg +1 -0
- package/storage/svg/home.svg +1 -0
- package/storage/svg/inbox.svg +1 -0
- package/storage/svg/italic.svg +1 -0
- package/storage/svg/keyboard.svg +1 -0
- package/storage/svg/link.svg +1 -0
- package/storage/svg/list-checks.svg +1 -0
- package/storage/svg/lock.svg +1 -0
- package/storage/svg/log-out.svg +1 -0
- package/storage/svg/map.svg +1 -0
- package/storage/svg/mastercard.svg +1 -0
- package/storage/svg/pause.svg +1 -0
- package/storage/svg/pencil.svg +1 -0
- package/storage/svg/play.svg +1 -0
- package/storage/svg/plus.svg +1 -0
- package/storage/svg/redo.svg +1 -0
- package/storage/svg/save.svg +1 -0
- package/storage/svg/sidebar-filled.svg +1 -0
- package/storage/svg/sidebar.svg +1 -0
- package/storage/svg/slash.svg +1 -0
- package/storage/svg/sliders.svg +1 -0
- package/storage/svg/strikethrough.svg +1 -0
- package/storage/svg/trash.svg +1 -0
- package/storage/svg/triangle.svg +1 -0
- package/storage/svg/undo.svg +1 -0
- package/storage/svg/unlink.svg +1 -0
- package/storage/svg/user.svg +1 -0
- package/storage/svg/visa.svg +1 -0
- package/storage/svg/zoom-in.svg +1 -0
- package/storage/svg/zoom-out.svg +1 -0
- package/tokens.scss +1 -1
- package/vite.config.ts +47 -46
- package/build/components/accordion/more.d.ts +0 -20
- package/build/components/accordion/more.js +0 -76
- package/build/components/anchor/scss/index.scss +0 -2
- package/build/components/announcement-banner/index.d.ts +0 -33
- package/build/components/announcement-banner/index.js +0 -61
- package/build/components/announcement-banner/scss/index.scss +0 -2
- package/build/components/autosave/index.d.ts +0 -12
- package/build/components/autosave/index.js +0 -140
- package/build/components/autosave/scss/index.scss +0 -2
- package/build/components/back-to-top/index.d.ts +0 -16
- package/build/components/back-to-top/index.js +0 -182
- package/build/components/back-to-top/scss/index.scss +0 -2
- package/build/components/bento-grid/index.d.ts +0 -25
- package/build/components/bento-grid/index.js +0 -38
- package/build/components/bento-grid/scss/index.scss +0 -2
- package/build/components/bento-grid-spotlight/index.d.ts +0 -35
- package/build/components/bento-grid-spotlight/index.js +0 -108
- package/build/components/bento-grid-spotlight/scss/index.scss +0 -2
- package/build/components/bookmark-button/index.d.ts +0 -23
- package/build/components/bookmark-button/index.js +0 -120
- package/build/components/bookmark-button/scss/index.scss +0 -2
- package/build/components/breadcrumb/ellipsis.d.ts +0 -12
- package/build/components/breadcrumb/ellipsis.js +0 -11
- package/build/components/breadcrumb/item.d.ts +0 -12
- package/build/components/breadcrumb/item.js +0 -9
- package/build/components/breadcrumb/link.d.ts +0 -15
- package/build/components/breadcrumb/link.js +0 -14
- package/build/components/breadcrumb/list.d.ts +0 -12
- package/build/components/breadcrumb/list.js +0 -9
- package/build/components/breadcrumb/menu.d.ts +0 -13
- package/build/components/breadcrumb/menu.js +0 -16
- package/build/components/breadcrumb/page.d.ts +0 -12
- package/build/components/breadcrumb/page.js +0 -9
- package/build/components/breadcrumb/separator.d.ts +0 -12
- package/build/components/breadcrumb/separator.js +0 -11
- package/build/components/breadcrumb/svg/caret.svg +0 -1
- package/build/components/breadcrumb/svg/chevron.svg +0 -1
- package/build/components/breadcrumb/svg/more.svg +0 -1
- package/build/components/breadcrumbs/index.d.ts +0 -27
- package/build/components/breadcrumbs/index.js +0 -324
- package/build/components/breadcrumbs/scss/index.scss +0 -2
- package/build/components/button/svg/plus.svg +0 -1
- package/build/components/card-input/index.d.ts +0 -31
- package/build/components/card-input/index.js +0 -562
- package/build/components/card-input/scss/index.scss +0 -2
- package/build/components/carousel-3d/index.d.ts +0 -27
- package/build/components/carousel-3d/index.js +0 -248
- package/build/components/carousel-3d/scss/index.scss +0 -2
- package/build/components/checkbox-group/index.d.ts +0 -30
- package/build/components/checkbox-group/index.js +0 -101
- package/build/components/checkbox-group/scss/index.scss +0 -2
- package/build/components/code-morph/index.d.ts +0 -25
- package/build/components/code-morph/index.js +0 -401
- package/build/components/code-morph/scss/index.scss +0 -2
- package/build/components/collapsible-sidebar/index.d.ts +0 -41
- package/build/components/collapsible-sidebar/index.js +0 -105
- package/build/components/collapsible-sidebar/scss/index.scss +0 -2
- package/build/components/command/constants.d.ts +0 -3
- package/build/components/command/constants.js +0 -3
- package/build/components/command-palette/index.d.ts +0 -51
- package/build/components/command-palette/index.js +0 -319
- package/build/components/command-palette/scss/index.scss +0 -2
- package/build/components/composer/index.d.ts +0 -29
- package/build/components/composer/index.js +0 -79
- package/build/components/composer/scss/index.scss +0 -2
- package/build/components/composer/svg/arrow-up.svg +0 -1
- package/build/components/contribution-heatmap/index.d.ts +0 -30
- package/build/components/contribution-heatmap/index.js +0 -236
- package/build/components/contribution-heatmap/scss/index.scss +0 -2
- package/build/components/date-range-picker/index.d.ts +0 -28
- package/build/components/date-range-picker/index.js +0 -443
- package/build/components/date-range-picker/scss/index.scss +0 -2
- package/build/components/dynamic-island/index.d.ts +0 -23
- package/build/components/dynamic-island/index.js +0 -179
- package/build/components/dynamic-island/scss/index.scss +0 -2
- package/build/components/email-typo-fix/index.d.ts +0 -28
- package/build/components/email-typo-fix/index.js +0 -416
- package/build/components/email-typo-fix/scss/index.scss +0 -2
- package/build/components/expanding-card/index.d.ts +0 -26
- package/build/components/expanding-card/index.js +0 -265
- package/build/components/expanding-card/scss/index.scss +0 -2
- package/build/components/feature-spotlight/index.d.ts +0 -37
- package/build/components/feature-spotlight/index.js +0 -248
- package/build/components/feature-spotlight/scss/index.scss +0 -2
- package/build/components/file-tree/index.d.ts +0 -31
- package/build/components/file-tree/index.js +0 -208
- package/build/components/file-tree/scss/index.scss +0 -2
- package/build/components/filter-grid/index.d.ts +0 -23
- package/build/components/filter-grid/index.js +0 -240
- package/build/components/filter-grid/scss/index.scss +0 -2
- package/build/components/gradient-text/index.d.ts +0 -19
- package/build/components/gradient-text/index.js +0 -14
- package/build/components/gradient-text/scss/index.scss +0 -2
- package/build/components/header/index.d.ts +0 -41
- package/build/components/header/index.js +0 -281
- package/build/components/header/scss/index.scss +0 -2
- package/build/components/hover-card/index.d.ts +0 -47
- package/build/components/hover-card/index.js +0 -197
- package/build/components/hover-card/scss/index.scss +0 -2
- package/build/components/kanban-board/index.d.ts +0 -23
- package/build/components/kanban-board/index.js +0 -235
- package/build/components/kanban-board/scss/index.scss +0 -2
- package/build/components/lightbox/index.d.ts +0 -32
- package/build/components/lightbox/index.js +0 -396
- package/build/components/lightbox/scss/index.scss +0 -2
- package/build/components/lightbox/spring.d.ts +0 -16
- package/build/components/lightbox/spring.js +0 -71
- package/build/components/line-shadow-text/index.d.ts +0 -17
- package/build/components/line-shadow-text/index.js +0 -15
- package/build/components/line-shadow-text/scss/index.scss +0 -2
- package/build/components/log/index.d.ts +0 -20
- package/build/components/log/index.js +0 -125
- package/build/components/log/scss/index.scss +0 -2
- package/build/components/long-press/bind.d.ts +0 -21
- package/build/components/long-press/bind.js +0 -136
- package/build/components/long-press/button.d.ts +0 -21
- package/build/components/long-press/button.js +0 -25
- package/build/components/long-press/index.d.ts +0 -2181
- package/build/components/long-press/index.js +0 -4
- package/build/components/long-press/scss/index.scss +0 -2
- package/build/components/modal/index.d.ts +0 -24
- package/build/components/modal/index.js +0 -75
- package/build/components/modal/scss/index.scss +0 -2
- package/build/components/morphing-button/index.d.ts +0 -24
- package/build/components/morphing-button/index.js +0 -127
- package/build/components/morphing-button/scss/index.scss +0 -2
- package/build/components/morphing-nav/index.d.ts +0 -38
- package/build/components/morphing-nav/index.js +0 -342
- package/build/components/morphing-nav/scss/index.scss +0 -2
- package/build/components/multi-step-form/index.d.ts +0 -32
- package/build/components/multi-step-form/index.js +0 -305
- package/build/components/multi-step-form/scss/index.scss +0 -2
- package/build/components/navigation-menu/index.d.ts +0 -28
- package/build/components/navigation-menu/index.js +0 -419
- package/build/components/navigation-menu/scss/index.scss +0 -2
- package/build/components/nested-menu/index.d.ts +0 -27
- package/build/components/nested-menu/index.js +0 -374
- package/build/components/nested-menu/scss/index.scss +0 -2
- package/build/components/normalize/scss/index.scss +0 -3
- package/build/components/notification-bell/index.d.ts +0 -13
- package/build/components/notification-bell/index.js +0 -87
- package/build/components/notification-bell/scss/index.scss +0 -2
- package/build/components/onboarding-checklist/index.d.ts +0 -29
- package/build/components/onboarding-checklist/index.js +0 -196
- package/build/components/onboarding-checklist/scss/index.scss +0 -2
- package/build/components/page-dots/index.d.ts +0 -24
- package/build/components/page-dots/index.js +0 -116
- package/build/components/page-dots/scss/index.scss +0 -2
- package/build/components/pagination/svg/arrow-left.svg +0 -1
- package/build/components/pagination/svg/arrow-right.svg +0 -1
- package/build/components/password/constants.d.ts +0 -2
- package/build/components/password/constants.js +0 -2
- package/build/components/password/index.d.ts +0 -22
- package/build/components/password/index.js +0 -74
- package/build/components/password/scss/index.scss +0 -2
- package/build/components/plan-card/index.d.ts +0 -36
- package/build/components/plan-card/index.js +0 -257
- package/build/components/plan-card/scss/index.scss +0 -2
- package/build/components/radio-cards/index.d.ts +0 -36
- package/build/components/radio-cards/index.js +0 -106
- package/build/components/radio-cards/scss/index.scss +0 -2
- package/build/components/range-filter/index.d.ts +0 -20
- package/build/components/range-filter/index.js +0 -216
- package/build/components/range-filter/scss/index.scss +0 -2
- package/build/components/range-slider/index.d.ts +0 -30
- package/build/components/range-slider/index.js +0 -287
- package/build/components/range-slider/scss/index.scss +0 -2
- package/build/components/reading-progress/index.d.ts +0 -13
- package/build/components/reading-progress/index.js +0 -106
- package/build/components/reading-progress/scss/index.scss +0 -2
- package/build/components/scroll-fade/index.d.ts +0 -39
- package/build/components/scroll-fade/index.js +0 -104
- package/build/components/scroll-fade/scss/index.scss +0 -2
- package/build/components/scroll-spine/index.d.ts +0 -26
- package/build/components/scroll-spine/index.js +0 -204
- package/build/components/scroll-spine/scss/index.scss +0 -2
- package/build/components/scroll-velocity/index.d.ts +0 -22
- package/build/components/scroll-velocity/index.js +0 -160
- package/build/components/scroll-velocity/scss/index.scss +0 -2
- package/build/components/scrub-input/index.d.ts +0 -39
- package/build/components/scrub-input/index.js +0 -221
- package/build/components/scrub-input/scss/index.scss +0 -2
- package/build/components/select-menu/index.d.ts +0 -34
- package/build/components/select-menu/index.js +0 -329
- package/build/components/select-menu/scss/index.scss +0 -2
- package/build/components/selection-toolbar/index.d.ts +0 -36
- package/build/components/selection-toolbar/index.js +0 -442
- package/build/components/selection-toolbar/scss/index.scss +0 -2
- package/build/components/settings/index.d.ts +0 -43
- package/build/components/settings/index.js +0 -147
- package/build/components/settings/scss/index.scss +0 -2
- package/build/components/settings/svg/close.svg +0 -1
- package/build/components/settings/svg/saved.svg +0 -1
- package/build/components/share-button/index.d.ts +0 -29
- package/build/components/share-button/index.js +0 -191
- package/build/components/share-button/scss/index.scss +0 -2
- package/build/components/sheet/index.d.ts +0 -33
- package/build/components/sheet/index.js +0 -110
- package/build/components/sheet/scss/index.scss +0 -2
- package/build/components/shiny-text/index.d.ts +0 -17
- package/build/components/shiny-text/index.js +0 -14
- package/build/components/shiny-text/scss/index.scss +0 -2
- package/build/components/shortcut-sheet/index.d.ts +0 -48
- package/build/components/shortcut-sheet/index.js +0 -304
- package/build/components/shortcut-sheet/scss/index.scss +0 -2
- package/build/components/sidebar/index.d.ts +0 -13
- package/build/components/sidebar/index.js +0 -13
- package/build/components/sidebar/scss/index.scss +0 -2
- package/build/components/slider/index.d.ts +0 -25
- package/build/components/slider/index.js +0 -188
- package/build/components/slider/scss/index.scss +0 -2
- package/build/components/sliding-tabs/index.d.ts +0 -28
- package/build/components/sliding-tabs/index.js +0 -188
- package/build/components/sliding-tabs/scss/index.scss +0 -2
- package/build/components/snap-carousel/index.d.ts +0 -30
- package/build/components/snap-carousel/index.js +0 -233
- package/build/components/snap-carousel/scss/index.scss +0 -2
- package/build/components/sparkline/index.d.ts +0 -26
- package/build/components/sparkline/index.js +0 -173
- package/build/components/sparkline/scss/index.scss +0 -2
- package/build/components/stacked-drawer/index.d.ts +0 -24
- package/build/components/stacked-drawer/index.js +0 -211
- package/build/components/stacked-drawer/scss/index.scss +0 -2
- package/build/components/stat-counter/index.d.ts +0 -32
- package/build/components/stat-counter/index.js +0 -216
- package/build/components/stat-counter/scss/index.scss +0 -2
- package/build/components/status-picker/index.d.ts +0 -32
- package/build/components/status-picker/index.js +0 -198
- package/build/components/status-picker/scss/index.scss +0 -2
- package/build/components/sticky-stack/index.d.ts +0 -33
- package/build/components/sticky-stack/index.js +0 -184
- package/build/components/sticky-stack/scss/index.scss +0 -2
- package/build/components/story-progress/index.d.ts +0 -26
- package/build/components/story-progress/index.js +0 -196
- package/build/components/story-progress/scss/index.scss +0 -2
- package/build/components/swipe-deck/index.d.ts +0 -19
- package/build/components/swipe-deck/index.js +0 -300
- package/build/components/swipe-deck/scss/index.scss +0 -2
- package/build/components/tabs/scss/index.scss +0 -2
- package/build/components/tag-input/index.d.ts +0 -27
- package/build/components/tag-input/index.js +0 -309
- package/build/components/tag-input/scss/index.scss +0 -2
- package/build/components/task-list/index.d.ts +0 -28
- package/build/components/task-list/index.js +0 -107
- package/build/components/task-list/scss/index.scss +0 -2
- package/build/components/tasklist/constants.d.ts +0 -2
- package/build/components/tasklist/constants.js +0 -2
- package/build/components/text-animate/index.d.ts +0 -30
- package/build/components/text-animate/index.js +0 -97
- package/build/components/text-animate/scss/index.scss +0 -2
- package/build/components/text-progress/index.d.ts +0 -13
- package/build/components/text-progress/index.js +0 -114
- package/build/components/text-progress/scss/index.scss +0 -2
- package/build/components/thumbnail/scss/index.scss +0 -2
- package/build/components/toast/manager.d.ts +0 -64
- package/build/components/toast/manager.js +0 -221
- package/build/components/toast/svg/check.svg +0 -1
- package/build/components/toast/svg/chevron.svg +0 -1
- package/build/components/toast/svg/close.svg +0 -1
- package/build/components/toast/svg/copy.svg +0 -1
- package/build/components/toast/svg/info.svg +0 -1
- package/build/components/tooltip/context.d.ts +0 -22
- package/build/components/tooltip/context.js +0 -66
- package/build/components/tooltip/group.d.ts +0 -29
- package/build/components/tooltip/group.js +0 -128
- package/build/components/tooltip/options.d.ts +0 -7
- package/build/components/tooltip/options.js +0 -21
- package/build/components/tree/index.d.ts +0 -28
- package/build/components/tree/index.js +0 -182
- package/build/components/tree/scss/index.scss +0 -2
- package/build/components/tree-view/index.d.ts +0 -25
- package/build/components/tree-view/index.js +0 -205
- package/build/components/tree-view/scss/index.scss +0 -2
- package/build/components/typewriter-retype/index.d.ts +0 -8
- package/build/components/typewriter-retype/index.js +0 -122
- package/build/components/typewriter-retype/scss/index.scss +0 -2
- package/build/components/undo-toast/index.d.ts +0 -30
- package/build/components/undo-toast/index.js +0 -262
- package/build/components/undo-toast/scss/index.scss +0 -2
- package/build/components/value-flash/index.d.ts +0 -12
- package/build/components/value-flash/index.js +0 -106
- package/build/components/value-flash/scss/index.scss +0 -2
- package/build/components/waitlist-join/index.d.ts +0 -34
- package/build/components/waitlist-join/index.js +0 -402
- package/build/components/waitlist-join/scss/index.scss +0 -2
- package/build/components/web-search/brands.d.ts +0 -121
- package/build/components/web-search/brands.js +0 -138
- package/build/components/web-search/index.d.ts +0 -31
- package/build/components/web-search/index.js +0 -245
- package/build/components/web-search/scss/index.scss +0 -2
- package/build/components/word-rotator/index.d.ts +0 -14
- package/build/components/word-rotator/index.js +0 -196
- package/build/components/word-rotator/scss/index.scss +0 -2
- package/build/css-utilities/absolute/scss/index.scss +0 -2
- package/build/css-utilities/disabled/scss/index.scss +0 -2
- package/build/css-utilities/hidden/scss/index.scss +0 -2
- package/build/css-utilities/not-allowed/scss/index.scss +0 -2
- package/build/css-utilities/tabular/scss/index.scss +0 -2
- package/lib.scss +0 -2
- package/src/components/accordion/more.ts +0 -97
- package/src/components/anchor/scss/index.scss +0 -56
- package/src/components/anchor/scss/variables.scss +0 -4
- package/src/components/announcement-banner/index.ts +0 -81
- package/src/components/announcement-banner/scss/index.scss +0 -183
- package/src/components/announcement-banner/scss/variables.scss +0 -18
- package/src/components/autosave/index.ts +0 -113
- package/src/components/autosave/scss/index.scss +0 -155
- package/src/components/autosave/scss/variables.scss +0 -22
- package/src/components/back-to-top/index.ts +0 -293
- package/src/components/back-to-top/scss/index.scss +0 -111
- package/src/components/back-to-top/scss/variables.scss +0 -30
- package/src/components/bento-grid/index.ts +0 -63
- package/src/components/bento-grid/scss/index.scss +0 -175
- package/src/components/bento-grid/scss/variables.scss +0 -19
- package/src/components/bento-grid-spotlight/index.ts +0 -133
- package/src/components/bento-grid-spotlight/scss/index.scss +0 -226
- package/src/components/bento-grid-spotlight/scss/variables.scss +0 -36
- package/src/components/bookmark-button/index.ts +0 -174
- package/src/components/bookmark-button/scss/index.scss +0 -162
- package/src/components/bookmark-button/scss/variables.scss +0 -28
- package/src/components/breadcrumb/ellipsis.ts +0 -17
- package/src/components/breadcrumb/item.ts +0 -10
- package/src/components/breadcrumb/link.ts +0 -21
- package/src/components/breadcrumb/list.ts +0 -10
- package/src/components/breadcrumb/menu.ts +0 -20
- package/src/components/breadcrumb/page.ts +0 -16
- package/src/components/breadcrumb/separator.ts +0 -17
- package/src/components/breadcrumb/svg/caret.svg +0 -1
- package/src/components/breadcrumb/svg/chevron.svg +0 -1
- package/src/components/breadcrumb/svg/more.svg +0 -1
- package/src/components/breadcrumbs/index.ts +0 -479
- package/src/components/breadcrumbs/scss/index.scss +0 -235
- package/src/components/breadcrumbs/scss/variables.scss +0 -30
- package/src/components/button/svg/plus.svg +0 -1
- package/src/components/card-input/index.ts +0 -594
- package/src/components/card-input/scss/index.scss +0 -512
- package/src/components/card-input/scss/variables.scss +0 -29
- package/src/components/carousel-3d/index.ts +0 -405
- package/src/components/carousel-3d/scss/index.scss +0 -155
- package/src/components/carousel-3d/scss/variables.scss +0 -25
- package/src/components/checkbox/svg/check.svg +0 -1
- package/src/components/checkbox-group/index.ts +0 -171
- package/src/components/checkbox-group/scss/index.scss +0 -229
- package/src/components/checkbox-group/scss/variables.scss +0 -28
- package/src/components/code-morph/index.ts +0 -459
- package/src/components/code-morph/scss/index.scss +0 -384
- package/src/components/code-morph/scss/variables.scss +0 -33
- package/src/components/collapsible-sidebar/index.ts +0 -193
- package/src/components/collapsible-sidebar/scss/index.scss +0 -220
- package/src/components/collapsible-sidebar/scss/variables.scss +0 -42
- package/src/components/command/constants.ts +0 -6
- package/src/components/command-palette/index.ts +0 -456
- package/src/components/command-palette/scss/index.scss +0 -235
- package/src/components/command-palette/scss/variables.scss +0 -42
- package/src/components/composer/index.ts +0 -117
- package/src/components/composer/scss/index.scss +0 -105
- package/src/components/composer/scss/variables.scss +0 -82
- package/src/components/composer/svg/arrow-up.svg +0 -1
- package/src/components/contribution-heatmap/index.ts +0 -348
- package/src/components/contribution-heatmap/scss/index.scss +0 -151
- package/src/components/contribution-heatmap/scss/variables.scss +0 -39
- package/src/components/date-range-picker/index.ts +0 -641
- package/src/components/date-range-picker/scss/index.scss +0 -380
- package/src/components/date-range-picker/scss/variables.scss +0 -22
- package/src/components/dynamic-island/index.ts +0 -161
- package/src/components/dynamic-island/scss/index.scss +0 -278
- package/src/components/dynamic-island/scss/variables.scss +0 -39
- package/src/components/email-typo-fix/index.ts +0 -615
- package/src/components/email-typo-fix/scss/index.scss +0 -213
- package/src/components/email-typo-fix/scss/variables.scss +0 -18
- package/src/components/expanding-card/index.ts +0 -377
- package/src/components/expanding-card/scss/index.scss +0 -232
- package/src/components/expanding-card/scss/variables.scss +0 -22
- package/src/components/feature-spotlight/index.ts +0 -437
- package/src/components/feature-spotlight/scss/index.scss +0 -254
- package/src/components/feature-spotlight/scss/variables.scss +0 -36
- package/src/components/file-tree/index.ts +0 -319
- package/src/components/file-tree/scss/index.scss +0 -138
- package/src/components/file-tree/scss/variables.scss +0 -18
- package/src/components/filter-grid/index.ts +0 -344
- package/src/components/filter-grid/scss/index.scss +0 -142
- package/src/components/filter-grid/scss/variables.scss +0 -41
- package/src/components/gradient-text/index.ts +0 -26
- package/src/components/gradient-text/scss/index.scss +0 -20
- package/src/components/gradient-text/scss/variables.scss +0 -6
- package/src/components/header/index.ts +0 -318
- package/src/components/header/scss/index.scss +0 -508
- package/src/components/header/scss/variables.scss +0 -21
- package/src/components/hover-card/index.ts +0 -319
- package/src/components/hover-card/scss/index.scss +0 -117
- package/src/components/hover-card/scss/variables.scss +0 -25
- package/src/components/kanban-board/index.ts +0 -326
- package/src/components/kanban-board/scss/index.scss +0 -126
- package/src/components/kanban-board/scss/variables.scss +0 -39
- package/src/components/lightbox/index.ts +0 -594
- package/src/components/lightbox/scss/index.scss +0 -194
- package/src/components/lightbox/scss/variables.scss +0 -24
- package/src/components/lightbox/spring.ts +0 -118
- package/src/components/line-shadow-text/index.ts +0 -24
- package/src/components/line-shadow-text/scss/index.scss +0 -45
- package/src/components/line-shadow-text/scss/variables.scss +0 -6
- package/src/components/log/index.ts +0 -156
- package/src/components/log/scss/index.scss +0 -269
- package/src/components/log/scss/variables.scss +0 -19
- package/src/components/long-press/bind.ts +0 -159
- package/src/components/long-press/button.ts +0 -46
- package/src/components/long-press/index.ts +0 -6
- package/src/components/long-press/scss/index.scss +0 -60
- package/src/components/long-press/scss/variables.scss +0 -9
- package/src/components/modal/index.ts +0 -91
- package/src/components/modal/scss/index.scss +0 -81
- package/src/components/modal/scss/variables.scss +0 -42
- package/src/components/morphing-button/index.ts +0 -188
- package/src/components/morphing-button/scss/index.scss +0 -154
- package/src/components/morphing-button/scss/variables.scss +0 -21
- package/src/components/morphing-nav/index.ts +0 -496
- package/src/components/morphing-nav/scss/index.scss +0 -284
- package/src/components/morphing-nav/scss/variables.scss +0 -36
- package/src/components/multi-step-form/index.ts +0 -368
- package/src/components/multi-step-form/scss/index.scss +0 -397
- package/src/components/multi-step-form/scss/variables.scss +0 -22
- package/src/components/navigation-menu/index.ts +0 -608
- package/src/components/navigation-menu/scss/index.scss +0 -213
- package/src/components/navigation-menu/scss/variables.scss +0 -24
- package/src/components/nested-menu/index.ts +0 -446
- package/src/components/nested-menu/scss/index.scss +0 -219
- package/src/components/nested-menu/scss/variables.scss +0 -26
- package/src/components/normalize/scss/index.scss +0 -35
- package/src/components/notification-bell/index.ts +0 -102
- package/src/components/notification-bell/scss/index.scss +0 -132
- package/src/components/notification-bell/scss/variables.scss +0 -41
- package/src/components/notification-bell/svg/bell.svg +0 -1
- package/src/components/onboarding-checklist/index.ts +0 -252
- package/src/components/onboarding-checklist/scss/index.scss +0 -414
- package/src/components/onboarding-checklist/scss/variables.scss +0 -17
- package/src/components/page-dots/index.ts +0 -137
- package/src/components/page-dots/scss/index.scss +0 -95
- package/src/components/page-dots/scss/variables.scss +0 -26
- package/src/components/pagination/svg/arrow-left.svg +0 -1
- package/src/components/pagination/svg/arrow-right.svg +0 -1
- package/src/components/password/constants.ts +0 -4
- package/src/components/password/index.ts +0 -97
- package/src/components/password/scss/index.scss +0 -188
- package/src/components/password/scss/variables.scss +0 -50
- package/src/components/plan-card/index.ts +0 -404
- package/src/components/plan-card/scss/index.scss +0 -513
- package/src/components/plan-card/scss/variables.scss +0 -33
- package/src/components/radio-cards/index.ts +0 -145
- package/src/components/radio-cards/scss/index.scss +0 -232
- package/src/components/radio-cards/scss/variables.scss +0 -32
- package/src/components/range-filter/index.ts +0 -295
- package/src/components/range-filter/scss/index.scss +0 -257
- package/src/components/range-filter/scss/variables.scss +0 -20
- package/src/components/range-slider/index.ts +0 -277
- package/src/components/range-slider/scss/index.scss +0 -234
- package/src/components/range-slider/scss/variables.scss +0 -26
- package/src/components/reading-progress/index.ts +0 -160
- package/src/components/reading-progress/scss/index.scss +0 -115
- package/src/components/reading-progress/scss/variables.scss +0 -31
- package/src/components/scroll-fade/index.ts +0 -131
- package/src/components/scroll-fade/scss/index.scss +0 -104
- package/src/components/scroll-fade/scss/variables.scss +0 -10
- package/src/components/scroll-spine/index.ts +0 -355
- package/src/components/scroll-spine/scss/index.scss +0 -209
- package/src/components/scroll-spine/scss/variables.scss +0 -22
- package/src/components/scroll-velocity/index.ts +0 -269
- package/src/components/scroll-velocity/scss/index.scss +0 -29
- package/src/components/scroll-velocity/scss/variables.scss +0 -3
- package/src/components/scrub-input/index.ts +0 -339
- package/src/components/scrub-input/scss/index.scss +0 -105
- package/src/components/scrub-input/scss/variables.scss +0 -23
- package/src/components/select-menu/index.ts +0 -499
- package/src/components/select-menu/scss/index.scss +0 -192
- package/src/components/select-menu/scss/variables.scss +0 -41
- package/src/components/selection-toolbar/index.ts +0 -510
- package/src/components/selection-toolbar/scss/index.scss +0 -221
- package/src/components/selection-toolbar/scss/variables.scss +0 -24
- package/src/components/settings/index.ts +0 -184
- package/src/components/settings/scss/index.scss +0 -327
- package/src/components/settings/scss/variables.scss +0 -50
- package/src/components/settings/svg/close.svg +0 -1
- package/src/components/settings/svg/saved.svg +0 -1
- package/src/components/share-button/index.ts +0 -328
- package/src/components/share-button/scss/index.scss +0 -191
- package/src/components/share-button/scss/variables.scss +0 -24
- package/src/components/sheet/index.ts +0 -170
- package/src/components/sheet/scss/index.scss +0 -65
- package/src/components/sheet/scss/variables.scss +0 -27
- package/src/components/shiny-text/index.ts +0 -19
- package/src/components/shiny-text/scss/index.scss +0 -32
- package/src/components/shiny-text/scss/variables.scss +0 -7
- package/src/components/shortcut-sheet/index.ts +0 -454
- package/src/components/shortcut-sheet/scss/index.scss +0 -306
- package/src/components/shortcut-sheet/scss/variables.scss +0 -36
- package/src/components/sidebar/index.ts +0 -13
- package/src/components/sidebar/scss/index.scss +0 -49
- package/src/components/sidebar/scss/variables.scss +0 -20
- package/src/components/slider/index.ts +0 -232
- package/src/components/slider/scss/index.scss +0 -182
- package/src/components/slider/scss/variables.scss +0 -15
- package/src/components/sliding-tabs/index.ts +0 -291
- package/src/components/sliding-tabs/scss/index.scss +0 -174
- package/src/components/sliding-tabs/scss/variables.scss +0 -34
- package/src/components/snap-carousel/index.ts +0 -324
- package/src/components/snap-carousel/scss/index.scss +0 -174
- package/src/components/snap-carousel/scss/variables.scss +0 -31
- package/src/components/sparkline/index.ts +0 -234
- package/src/components/sparkline/scss/index.scss +0 -169
- package/src/components/sparkline/scss/variables.scss +0 -30
- package/src/components/stacked-drawer/index.ts +0 -272
- package/src/components/stacked-drawer/scss/index.scss +0 -122
- package/src/components/stacked-drawer/scss/variables.scss +0 -20
- package/src/components/stat-counter/index.ts +0 -337
- package/src/components/stat-counter/scss/index.scss +0 -246
- package/src/components/stat-counter/scss/variables.scss +0 -24
- package/src/components/status-picker/index.ts +0 -323
- package/src/components/status-picker/scss/index.scss +0 -290
- package/src/components/status-picker/scss/variables.scss +0 -29
- package/src/components/sticky-stack/index.ts +0 -313
- package/src/components/sticky-stack/scss/index.scss +0 -167
- package/src/components/sticky-stack/scss/variables.scss +0 -50
- package/src/components/story-progress/index.ts +0 -247
- package/src/components/story-progress/scss/index.scss +0 -205
- package/src/components/story-progress/scss/variables.scss +0 -21
- package/src/components/swipe-deck/index.ts +0 -438
- package/src/components/swipe-deck/scss/index.scss +0 -275
- package/src/components/swipe-deck/scss/variables.scss +0 -24
- package/src/components/tabs/scss/index.scss +0 -62
- package/src/components/tabs/scss/variables.scss +0 -4
- package/src/components/tag-input/index.ts +0 -415
- package/src/components/tag-input/scss/index.scss +0 -186
- package/src/components/tag-input/scss/variables.scss +0 -30
- package/src/components/task-list/index.ts +0 -137
- package/src/components/task-list/scss/index.scss +0 -171
- package/src/components/task-list/scss/variables.scss +0 -8
- package/src/components/tasklist/constants.ts +0 -4
- package/src/components/text/scss/variables.scss +0 -9
- package/src/components/text-animate/index.ts +0 -142
- package/src/components/text-animate/scss/index.scss +0 -106
- package/src/components/text-animate/scss/variables.scss +0 -17
- package/src/components/text-progress/index.ts +0 -170
- package/src/components/text-progress/scss/index.scss +0 -148
- package/src/components/text-progress/scss/variables.scss +0 -26
- package/src/components/thumbnail/scss/index.scss +0 -62
- package/src/components/thumbnail/scss/variables.scss +0 -19
- package/src/components/toast/manager.ts +0 -342
- package/src/components/toast/svg/check.svg +0 -1
- package/src/components/toast/svg/chevron.svg +0 -1
- package/src/components/toast/svg/close.svg +0 -1
- package/src/components/toast/svg/copy.svg +0 -1
- package/src/components/toast/svg/error.svg +0 -1
- package/src/components/toast/svg/info.svg +0 -1
- package/src/components/toast/svg/loading.svg +0 -1
- package/src/components/toast/svg/success.svg +0 -1
- package/src/components/toast/svg/warning.svg +0 -1
- package/src/components/tooltip/context.ts +0 -96
- package/src/components/tooltip/group.ts +0 -162
- package/src/components/tooltip/options.ts +0 -33
- package/src/components/tooltip/scss/_group.scss +0 -164
- package/src/components/tree/index.ts +0 -259
- package/src/components/tree/scss/index.scss +0 -105
- package/src/components/tree/scss/variables.scss +0 -48
- package/src/components/tree-view/index.ts +0 -285
- package/src/components/tree-view/scss/index.scss +0 -169
- package/src/components/tree-view/scss/variables.scss +0 -18
- package/src/components/typewriter-retype/index.ts +0 -164
- package/src/components/typewriter-retype/scss/index.scss +0 -142
- package/src/components/typewriter-retype/scss/variables.scss +0 -46
- package/src/components/undo-toast/index.ts +0 -359
- package/src/components/undo-toast/scss/index.scss +0 -216
- package/src/components/undo-toast/scss/variables.scss +0 -20
- package/src/components/value-flash/index.ts +0 -121
- package/src/components/value-flash/scss/index.scss +0 -193
- package/src/components/value-flash/scss/variables.scss +0 -47
- package/src/components/waitlist-join/index.ts +0 -545
- package/src/components/waitlist-join/scss/index.scss +0 -401
- package/src/components/waitlist-join/scss/variables.scss +0 -23
- package/src/components/web-search/brands.ts +0 -155
- package/src/components/web-search/index.ts +0 -316
- package/src/components/web-search/scss/index.scss +0 -270
- package/src/components/web-search/scss/variables.scss +0 -8
- package/src/components/word-rotator/index.ts +0 -296
- package/src/components/word-rotator/scss/index.scss +0 -33
- package/src/components/word-rotator/scss/variables.scss +0 -7
- package/src/css-utilities/absolute/scss/index.scss +0 -36
- package/src/css-utilities/disabled/scss/index.scss +0 -4
- package/src/css-utilities/hidden/scss/index.scss +0 -28
- package/src/css-utilities/not-allowed/scss/index.scss +0 -7
- package/src/css-utilities/tabular/scss/index.scss +0 -3
- package/src/lib/index.scss +0 -7
- package/src/lib/scss/breakpoint.scss +0 -41
- package/src/lib/scss/color.scss +0 -1
- package/src/lib/scss/list.scss +0 -77
- package/src/lib/scss/string.scss +0 -34
- package/src/tokens/index.scss +0 -9
- package/storage/psd/Color Palette.psd +0 -0
- /package/src/{lib → shared}/scss/css-variables.scss +0 -0
- /package/src/{lib → shared}/scss/map.scss +0 -0
- /package/src/{lib → shared}/scss/position.scss +0 -0
- /package/{build/components/notification-bell → storage}/svg/bell.svg +0 -0
- /package/{build/components/checkbox → storage}/svg/check.svg +0 -0
- /package/{build/components/toast/svg/error.svg → storage/svg/circle-alert.svg} +0 -0
- /package/{build/components/toast/svg/success.svg → storage/svg/circle-check.svg} +0 -0
- /package/{build/components/toast/svg/loading.svg → storage/svg/spinner.svg} +0 -0
- /package/{build/components/toast → storage}/svg/warning.svg +0 -0
|
@@ -0,0 +1,2227 @@
|
|
|
1
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
+
import { ReactiveArray, effect, flush, peek, read, signal, untrack, write } from '@esportsplus/reactivity';
|
|
3
|
+
import * as template_u1 from '@esportsplus/template';
|
|
4
|
+
import { write as writeText } from '../../clipboard/index.js';
|
|
5
|
+
import highlight from '../../highlight/index.js';
|
|
6
|
+
import icon from '../../icon/index.js';
|
|
7
|
+
import tooltip from '../../tooltip/index.js';
|
|
8
|
+
import fuzzy from '../../../shared/fuzzy.js';
|
|
9
|
+
import chevron from '@esportsplus/ui/svg/chevron-right.svg';
|
|
10
|
+
import symlink from '@esportsplus/ui/svg/corner-down-right.svg';
|
|
11
|
+
import lock from '@esportsplus/ui/svg/lock.svg';
|
|
12
|
+
import Clipboard from './clipboard.js';
|
|
13
|
+
import segments, { ancestors, caption, holds, lineage, same, SEGMENT, sole } from './compact.js';
|
|
14
|
+
import Decorations, { merge } from './decorations.js';
|
|
15
|
+
import draggable from './drag.js';
|
|
16
|
+
import Editor, { field, resolve } from './edit.js';
|
|
17
|
+
import filter, { recheck } from './filter.js';
|
|
18
|
+
import Finder from './find.js';
|
|
19
|
+
import glob from './glob.js';
|
|
20
|
+
import glyph, { renderer } from './glyph.js';
|
|
21
|
+
import History from './history.js';
|
|
22
|
+
import { resolver as createFileTreeIconResolver, resolve as resolveFileTreeIcon } from './icons.js';
|
|
23
|
+
import { enclosing, flagged, order, seek } from './jump.js';
|
|
24
|
+
import Loader, { placeholder } from './lazy.js';
|
|
25
|
+
import Elements from './model.js';
|
|
26
|
+
import Selection from './selection.js';
|
|
27
|
+
import command, { extending } from './shortcuts.js';
|
|
28
|
+
import comparator from './sort.js';
|
|
29
|
+
import spoken from './spoken.js';
|
|
30
|
+
import stick from './sticky.js';
|
|
31
|
+
import '../../button/scss/index.scss';
|
|
32
|
+
import './scss/index.scss';
|
|
33
|
+
const template_187wopb4 = template_u1.template(`<div class='file-tree-row ' role='treeitem' style=';;;'>`);
|
|
34
|
+
const template_187wopb7 = template_u1.template(`<span class='file-tree-tooltip-path'><!--$--><strong></strong></span><!--$-->`);
|
|
35
|
+
const template_187wopbc = template_u1.template(`<span class='file-tree-tooltip-meta'>`);
|
|
36
|
+
const template_187wopbf = template_u1.template(`<div aria-expanded='true' class='file-tree-row file-tree-row--pinned ' style=';;'>`);
|
|
37
|
+
const template_187wopbi = template_u1.template(`<span aria-hidden='true' class='file-tree-twistie'></span><!--$--><!--$--><!--$--><!--$--><!--$-->`);
|
|
38
|
+
const template_187wopbq = template_u1.template(`<span class='file-tree-name'>`);
|
|
39
|
+
const template_187wopbt = template_u1.template(`<!--$--><!--$-->`);
|
|
40
|
+
const template_187wopbz = template_u1.template(`<span aria-hidden='true' class='file-tree-badge'>`);
|
|
41
|
+
const template_187wopb12 = template_u1.template(`<div class='file-tree-row '>`);
|
|
42
|
+
const template_187wopb15 = template_u1.template(`<span class='file-tree-badge-part '>`);
|
|
43
|
+
const template_187wopb18 = template_u1.template(`<mark class='file-tree-match'>`);
|
|
44
|
+
const template_187wopb1b = template_u1.template(`<div class='file-tree '><div aria-multiselectable='true' class='file-tree-viewport' role='tree' tabindex='0'><!--$--><!--$--></div><div aria-hidden='true' class='file-tree-motion' inert><div class='file-tree-motion-layer'></div></div><!--$--><!--$--><!--$--><!--$-->`);
|
|
45
|
+
const template_187wopb1n = template_u1.template(`<div class='file-tree-empty'>`);
|
|
46
|
+
const template_187wopb1q = template_u1.template(`<button class='button file-tree-toggle' type='button'>`);
|
|
47
|
+
class ReactiveObject_187wopb0 extends reactivity_u0.ReactiveObject {
|
|
48
|
+
#selected;
|
|
49
|
+
#selection;
|
|
50
|
+
constructor(_p0, _p1) {
|
|
51
|
+
super(null);
|
|
52
|
+
this.#selected = this[reactivity_u0.SIGNAL](_p0);
|
|
53
|
+
this.#selection = this[reactivity_u0.SIGNAL](_p1);
|
|
54
|
+
}
|
|
55
|
+
get selected() {
|
|
56
|
+
return reactivity_u0.read(this.#selected);
|
|
57
|
+
}
|
|
58
|
+
set selected(_v0) {
|
|
59
|
+
reactivity_u0.write(this.#selected, _v0);
|
|
60
|
+
}
|
|
61
|
+
get selection() {
|
|
62
|
+
return reactivity_u0.read(this.#selection);
|
|
63
|
+
}
|
|
64
|
+
set selection(_v1) {
|
|
65
|
+
reactivity_u0.write(this.#selection, _v1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
class ReactiveObject_187wopb1 extends reactivity_u0.ReactiveObject {
|
|
69
|
+
#edge = this[reactivity_u0.SIGNAL](0);
|
|
70
|
+
#height = this[reactivity_u0.SIGNAL](0);
|
|
71
|
+
#left = this[reactivity_u0.SIGNAL](0);
|
|
72
|
+
#top = this[reactivity_u0.SIGNAL](0);
|
|
73
|
+
#width = this[reactivity_u0.SIGNAL](0);
|
|
74
|
+
constructor() {
|
|
75
|
+
super(null);
|
|
76
|
+
}
|
|
77
|
+
get edge() {
|
|
78
|
+
return reactivity_u0.read(this.#edge);
|
|
79
|
+
}
|
|
80
|
+
set edge(_v0) {
|
|
81
|
+
reactivity_u0.write(this.#edge, _v0);
|
|
82
|
+
}
|
|
83
|
+
get height() {
|
|
84
|
+
return reactivity_u0.read(this.#height);
|
|
85
|
+
}
|
|
86
|
+
set height(_v1) {
|
|
87
|
+
reactivity_u0.write(this.#height, _v1);
|
|
88
|
+
}
|
|
89
|
+
get left() {
|
|
90
|
+
return reactivity_u0.read(this.#left);
|
|
91
|
+
}
|
|
92
|
+
set left(_v2) {
|
|
93
|
+
reactivity_u0.write(this.#left, _v2);
|
|
94
|
+
}
|
|
95
|
+
get top() {
|
|
96
|
+
return reactivity_u0.read(this.#top);
|
|
97
|
+
}
|
|
98
|
+
set top(_v3) {
|
|
99
|
+
reactivity_u0.write(this.#top, _v3);
|
|
100
|
+
}
|
|
101
|
+
get width() {
|
|
102
|
+
return reactivity_u0.read(this.#width);
|
|
103
|
+
}
|
|
104
|
+
set width(_v4) {
|
|
105
|
+
reactivity_u0.write(this.#width, _v4);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
class ReactiveObject_187wopb2 extends reactivity_u0.ReactiveObject {
|
|
109
|
+
#any;
|
|
110
|
+
#motion;
|
|
111
|
+
#motionRows = this[reactivity_u0.SIGNAL](0);
|
|
112
|
+
constructor(_p0, _p1) {
|
|
113
|
+
super(null);
|
|
114
|
+
this.#any = this[reactivity_u0.SIGNAL](_p0);
|
|
115
|
+
this.#motion = this[reactivity_u0.SIGNAL](_p1);
|
|
116
|
+
}
|
|
117
|
+
get any() {
|
|
118
|
+
return reactivity_u0.read(this.#any);
|
|
119
|
+
}
|
|
120
|
+
set any(_v0) {
|
|
121
|
+
reactivity_u0.write(this.#any, _v0);
|
|
122
|
+
}
|
|
123
|
+
get motion() {
|
|
124
|
+
return reactivity_u0.read(this.#motion);
|
|
125
|
+
}
|
|
126
|
+
set motion(_v1) {
|
|
127
|
+
reactivity_u0.write(this.#motion, _v1);
|
|
128
|
+
}
|
|
129
|
+
get motionRows() {
|
|
130
|
+
return reactivity_u0.read(this.#motionRows);
|
|
131
|
+
}
|
|
132
|
+
set motionRows(_v2) {
|
|
133
|
+
reactivity_u0.write(this.#motionRows, _v2);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const BYTES = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'].map((unit, i) => new Intl.NumberFormat(undefined, {
|
|
137
|
+
maximumFractionDigits: 1,
|
|
138
|
+
style: 'unit',
|
|
139
|
+
unit,
|
|
140
|
+
unitDisplay: i ? 'short' : 'long'
|
|
141
|
+
}));
|
|
142
|
+
const CHUNK = 8192;
|
|
143
|
+
const GUIDES = [];
|
|
144
|
+
const LETTERS = {
|
|
145
|
+
added: 'A',
|
|
146
|
+
conflict: '!',
|
|
147
|
+
deleted: 'D',
|
|
148
|
+
ignored: '',
|
|
149
|
+
modified: 'M',
|
|
150
|
+
renamed: 'R',
|
|
151
|
+
untracked: 'U'
|
|
152
|
+
};
|
|
153
|
+
const PREVIEW = { mode: 'preview', side: false };
|
|
154
|
+
const RANK = ['ignored', 'added', 'modified', 'warning', 'deleted', 'conflict', 'error'];
|
|
155
|
+
const REST = 200;
|
|
156
|
+
const ROW = Symbol();
|
|
157
|
+
const TONES = {
|
|
158
|
+
added: 'added',
|
|
159
|
+
conflict: 'conflict',
|
|
160
|
+
deleted: 'deleted',
|
|
161
|
+
ignored: 'ignored',
|
|
162
|
+
modified: 'modified',
|
|
163
|
+
renamed: 'added',
|
|
164
|
+
untracked: 'added'
|
|
165
|
+
};
|
|
166
|
+
const TOOLTIP = 600;
|
|
167
|
+
const TYPEAHEAD = 500;
|
|
168
|
+
const dates = new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' });
|
|
169
|
+
let uid = 0;
|
|
170
|
+
function badge(decoration, lines, rollup) {
|
|
171
|
+
let editor = decoration?.editor, parts = [], staged = decoration?.staged, status = decoration?.status;
|
|
172
|
+
if (lines[0]) {
|
|
173
|
+
parts.push({ text: `+${lines[0]}`, tone: 'additions' });
|
|
174
|
+
}
|
|
175
|
+
if (lines[1]) {
|
|
176
|
+
parts.push({ text: `−${lines[1]}`, tone: 'deletions' });
|
|
177
|
+
}
|
|
178
|
+
for (let custom of decoration?.badges ?? []) {
|
|
179
|
+
parts.push({ color: custom.color, text: custom.text, title: custom.tooltip });
|
|
180
|
+
}
|
|
181
|
+
if (rollup === null && staged && LETTERS[staged]) {
|
|
182
|
+
parts.push({ staged: true, text: LETTERS[staged], title: 'Staged', tone: TONES[staged] });
|
|
183
|
+
}
|
|
184
|
+
if (rollup === null && status && LETTERS[status]) {
|
|
185
|
+
parts.push({ text: LETTERS[status], tone: TONES[status] });
|
|
186
|
+
}
|
|
187
|
+
if (decoration?.submodule) {
|
|
188
|
+
parts.push({ text: 'S', tone: 'submodule' });
|
|
189
|
+
}
|
|
190
|
+
if (rollup) {
|
|
191
|
+
parts.push({ text: '●', tone: rollup });
|
|
192
|
+
}
|
|
193
|
+
if (editor?.unsaved || editor?.open) {
|
|
194
|
+
parts.push({ text: editor.unsaved ? '●' : '○', tone: editor.unsaved ? 'unsaved' : 'open' });
|
|
195
|
+
}
|
|
196
|
+
return parts;
|
|
197
|
+
}
|
|
198
|
+
function bytes(value) {
|
|
199
|
+
let unit = 0;
|
|
200
|
+
while (value >= 1024 && unit < BYTES.length - 1) {
|
|
201
|
+
value /= 1024;
|
|
202
|
+
unit++;
|
|
203
|
+
}
|
|
204
|
+
return BYTES[unit].format(value);
|
|
205
|
+
}
|
|
206
|
+
function chip(part) {
|
|
207
|
+
return (() => {
|
|
208
|
+
let root_187wopb14 = template_187wopb15(), element_187wopb16 = root_187wopb14.firstChild;
|
|
209
|
+
template_u1.slot(element_187wopb16, part.text, 1);
|
|
210
|
+
template_u1.setList(element_187wopb16, 'class', part.staged && 'file-tree-badge-part--staged');
|
|
211
|
+
template_u1.setList(element_187wopb16, 'class', part.tone && `file-tree-badge-part--${part.tone}`);
|
|
212
|
+
template_u1.setList(element_187wopb16, 'style', part.color && `color: ${part.color}`);
|
|
213
|
+
template_u1.setProperties(element_187wopb16, !!part.title && { title: part.title });
|
|
214
|
+
return root_187wopb14;
|
|
215
|
+
})();
|
|
216
|
+
}
|
|
217
|
+
function emphasis(name, query) {
|
|
218
|
+
let match = query ? fuzzy(query, name) : null;
|
|
219
|
+
if (!match) {
|
|
220
|
+
return name;
|
|
221
|
+
}
|
|
222
|
+
let at = 0, indices = match.indices, out = [];
|
|
223
|
+
for (let i = 0, n = indices.length; i < n;) {
|
|
224
|
+
let end = indices[i] + 1, start = indices[i];
|
|
225
|
+
while (++i < n && indices[i] === end) {
|
|
226
|
+
end++;
|
|
227
|
+
}
|
|
228
|
+
if (start > at) {
|
|
229
|
+
out.push(name.slice(at, start));
|
|
230
|
+
}
|
|
231
|
+
out.push((() => {
|
|
232
|
+
let root_187wopb17 = template_187wopb18(), element_187wopb19 = root_187wopb17.firstChild;
|
|
233
|
+
template_u1.slot(element_187wopb19, name.slice(start, end), 1);
|
|
234
|
+
return root_187wopb17;
|
|
235
|
+
})());
|
|
236
|
+
at = end;
|
|
237
|
+
}
|
|
238
|
+
if (at < name.length) {
|
|
239
|
+
out.push(name.slice(at));
|
|
240
|
+
}
|
|
241
|
+
return out;
|
|
242
|
+
}
|
|
243
|
+
function found(block, mark) {
|
|
244
|
+
if (!mark) {
|
|
245
|
+
return mark;
|
|
246
|
+
}
|
|
247
|
+
return mark === 'current' ? `${block}--match ${block}--match-current` : `${block}--match`;
|
|
248
|
+
}
|
|
249
|
+
function folder(element) {
|
|
250
|
+
return element.type ? element.type === 'folder' : Array.isArray(element.children);
|
|
251
|
+
}
|
|
252
|
+
function guides(depth) {
|
|
253
|
+
let out = GUIDES[depth];
|
|
254
|
+
if (out !== undefined) {
|
|
255
|
+
return out;
|
|
256
|
+
}
|
|
257
|
+
let parts = [];
|
|
258
|
+
for (let i = 1; i < depth; i++) {
|
|
259
|
+
parts.push(`calc(var(--indent) * ${-i} * var(--guide-direction)) 0`);
|
|
260
|
+
}
|
|
261
|
+
return GUIDES[depth] = parts.join(', ') || 'none';
|
|
262
|
+
}
|
|
263
|
+
function lift(rank) {
|
|
264
|
+
return rank === RANK.indexOf('deleted') ? RANK.indexOf('modified') : rank;
|
|
265
|
+
}
|
|
266
|
+
function middle(event) {
|
|
267
|
+
if (event.button === 1) {
|
|
268
|
+
event.preventDefault();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function path(row) {
|
|
272
|
+
return [...ancestors(row), row].map((node) => node.element.name).join('/');
|
|
273
|
+
}
|
|
274
|
+
function pick(row, event) {
|
|
275
|
+
return event.target.closest('.file-tree-segment')?.[SEGMENT] ?? row;
|
|
276
|
+
}
|
|
277
|
+
function place(row) {
|
|
278
|
+
let out = [];
|
|
279
|
+
for (let node = row; node; node = node.parent) {
|
|
280
|
+
out.unshift(node.position);
|
|
281
|
+
}
|
|
282
|
+
return out;
|
|
283
|
+
}
|
|
284
|
+
function rank(decoration) {
|
|
285
|
+
if (!decoration) {
|
|
286
|
+
return -1;
|
|
287
|
+
}
|
|
288
|
+
if (decoration.errors) {
|
|
289
|
+
return RANK.indexOf('error');
|
|
290
|
+
}
|
|
291
|
+
let value = decoration.status ?? decoration.staged, status = value ? RANK.indexOf(TONES[value]) : -1;
|
|
292
|
+
return decoration.warnings ? Math.max(status, RANK.indexOf('warning')) : status;
|
|
293
|
+
}
|
|
294
|
+
function shown(row) {
|
|
295
|
+
let target = row;
|
|
296
|
+
for (let node = row.parent; node; node = node.parent) {
|
|
297
|
+
if (!peek(node.open)) {
|
|
298
|
+
target = node;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return target;
|
|
302
|
+
}
|
|
303
|
+
function trail(index, id) {
|
|
304
|
+
let entry = index.get(id), out = [];
|
|
305
|
+
if (!entry) {
|
|
306
|
+
return out;
|
|
307
|
+
}
|
|
308
|
+
if (folder(entry.element) && entry.element.selectable !== false) {
|
|
309
|
+
out.push(id);
|
|
310
|
+
}
|
|
311
|
+
for (let parent = entry.parent; parent !== null; parent = index.get(parent).parent) {
|
|
312
|
+
out.push(parent);
|
|
313
|
+
}
|
|
314
|
+
return out;
|
|
315
|
+
}
|
|
316
|
+
function twistie(event) {
|
|
317
|
+
return event.target.closest('.file-tree-twistie') !== null;
|
|
318
|
+
}
|
|
319
|
+
export default ({ compact = true, controller, create, decorations: providers, display = {}, drag, editor, elements, empty, exclude = [], expand: unfold = 'click', expanded = [], export: exporter, find = 'highlight', highlight: phrase = '', history, icon: draw, icons = {}, indicator = 'always', label = 'Files', load, menu, open: view, operations, path: address = (element) => element.id, preview, rename, reveal: autoreveal = 'on', roots = false, scopes = [], searched, select, selected, shortcuts, snapshot, sort = 'folders', state = new ReactiveObject_187wopb0(selected ?? '', new Set()), sticky = true, toggle, tooltip: hint = true, typing = 'typeahead', validate, ...attributes }) => {
|
|
320
|
+
let built = new Map(), chosen = untrack(() => state.selected), clipboard = new Clipboard(), compare = comparator(sort, folder), counts = new Map(), current = signal(chosen), decorations = providers && merge([providers].flat()), diffs = new Map(), draft = signal(null), excluded = glob(exclude), model = elements instanceof Elements ? elements : new Elements(elements), filtered = untrack(() => filter(model.elements, display.dotfiles !== false, excluded, roots)), ghosts = new ReactiveArray(), hidden = untrack(() => new Set([...filtered, ...(decorations?.keys() ?? [])].filter(gone))), id = `file-tree-${++uid}`, index = model.index, initial = new Set([
|
|
321
|
+
...(snapshot?.expanded ?? expanded),
|
|
322
|
+
...(roots && !snapshot?.expanded ? model.elements.map((element) => element.id) : []),
|
|
323
|
+
...(autoreveal === 'off' ? [] : trail(index, chosen))
|
|
324
|
+
]), key = 0, known = chosen, loader = load ? new Loader(load, loaded) : null, marks = new Map(), notes = new Map(), opened = 0, own = new Map(), places = new WeakMap(), given = signal(typeof phrase === 'function' ? untrack(phrase) : phrase), query = signal(''), remap = icons ? icons.remap ?? {} : {}, render = draw ?? (icons ? renderer(icons) : () => false), revealing = new Map(), search = find === 'off' ? null : new Finder(find, query, {
|
|
325
|
+
compare,
|
|
326
|
+
cursor: () => cursor && segment(cursor).id,
|
|
327
|
+
elements: model.elements,
|
|
328
|
+
folder,
|
|
329
|
+
go: (id) => reveal(id, true),
|
|
330
|
+
gone,
|
|
331
|
+
lazy: !!load,
|
|
332
|
+
leave: () => viewport?.focus({ preventScroll: true }),
|
|
333
|
+
searched,
|
|
334
|
+
shows: (id) => {
|
|
335
|
+
let row = built.get(id);
|
|
336
|
+
return !!row && !hidden.has(id) && shown(row) === row;
|
|
337
|
+
},
|
|
338
|
+
sift: (folders) => {
|
|
339
|
+
sift(folders);
|
|
340
|
+
slot.flush();
|
|
341
|
+
}
|
|
342
|
+
}), seen = model.version, settings = untrack(modes), shifts = 0, split = null, stage = new ReactiveObject_187wopb1(), sweep = signal(0), top = build(model.elements, 0, null), totals = new Map(), unfolded = new Map(), rows = reactivity_u0.reactive(visible(top)), cursor = rows.find((row) => holds(row, (id) => id === chosen)) ?? rows[0] ?? null, dragging = (drag || exporter || operations?.import) && draggable({ drag, export: exporter, import: operations?.import }, {
|
|
343
|
+
grab: (row) => (selection.has(row.id) ? [...selection.ids].map((id) => built.get(id)) : [row])
|
|
344
|
+
.filter((row) => row !== undefined && !header(row) && !ancestors(row).some((node) => selection.has(node.id) && !header(node))),
|
|
345
|
+
host: (row) => row.host ?? row,
|
|
346
|
+
last: (row) => {
|
|
347
|
+
let out = row;
|
|
348
|
+
while (out.open && peek(out.open)) {
|
|
349
|
+
let list = branch(out), next;
|
|
350
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
351
|
+
if (!hidden.has(list[i].id)) {
|
|
352
|
+
next = list[i];
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
if (!next) {
|
|
357
|
+
let inner = visible(list);
|
|
358
|
+
return inner[inner.length - 1] ?? out;
|
|
359
|
+
}
|
|
360
|
+
out = next;
|
|
361
|
+
}
|
|
362
|
+
return out;
|
|
363
|
+
},
|
|
364
|
+
open: (row) => fold(row, true),
|
|
365
|
+
row: (element) => element[SEGMENT] ?? element[ROW],
|
|
366
|
+
top: !roots,
|
|
367
|
+
viewport: () => viewport
|
|
368
|
+
}), focused = signal(cursor?.key ?? 0), quiet = null, tip = tooltip.shared({ delay: { open: TOOLTIP }, direction: 'e' }), typed = '', typedAt = 0, ui = new ReactiveObject_187wopb2(opened > 0, ''), selection = new Selection((ids) => {
|
|
369
|
+
state.selection = ids;
|
|
370
|
+
}), slot = new template_u1.VirtualSlot(rows, (row) => {
|
|
371
|
+
if (row.notice) {
|
|
372
|
+
return placeholder(row.notice, {
|
|
373
|
+
'aria-level': String(row.depth + 1),
|
|
374
|
+
class: [
|
|
375
|
+
() => signal.selector(focused, row.key) && 'file-tree-row--focused',
|
|
376
|
+
() => revealing.has(row) && ui.motion === 'open' && 'file-tree-row--reveal'
|
|
377
|
+
],
|
|
378
|
+
id: `${id}-${row.key}`,
|
|
379
|
+
onclick: () => {
|
|
380
|
+
focus(row);
|
|
381
|
+
retry(row);
|
|
382
|
+
},
|
|
383
|
+
style: `--depth: ${row.depth}; --guides: ${guides(row.depth)}; --reveal-index: ${revealing.get(row) ?? 0};`
|
|
384
|
+
}, dragging?.row(row) ?? {}, onscreen(row));
|
|
385
|
+
}
|
|
386
|
+
let mark = decorations ? track(row.id) : null, open = row.open;
|
|
387
|
+
return (() => {
|
|
388
|
+
let root_187wopb3 = template_187wopb4(), element_187wopb5 = root_187wopb3.firstChild;
|
|
389
|
+
template_u1.slot(element_187wopb5, contents(row, mark, false), 1);
|
|
390
|
+
template_u1.setProperty(element_187wopb5, 'aria-level', row.depth + 1);
|
|
391
|
+
template_u1.setList(element_187wopb5, 'class', row.locked && '--disabled');
|
|
392
|
+
template_u1.setList(element_187wopb5, 'class', header(row) && 'file-tree-row--root');
|
|
393
|
+
template_u1.setList(element_187wopb5, 'class', () => active(row) && '--active');
|
|
394
|
+
template_u1.setList(element_187wopb5, 'class', () => holds(row, (id) => clipboard.marked.read(id)) && 'file-tree-row--cut');
|
|
395
|
+
template_u1.setList(element_187wopb5, 'class', () => holds(row, (id) => selection.read(id)) && !active(row) && 'file-tree-row--selected');
|
|
396
|
+
template_u1.setProperty(element_187wopb5, 'id', template_u1.interpolate([(id), "-", (row.key)]));
|
|
397
|
+
template_u1.setList(element_187wopb5, 'style', template_u1.interpolate(["--depth: ", (row.depth)]));
|
|
398
|
+
template_u1.setList(element_187wopb5, 'style', template_u1.interpolate([" --guides: ", (guides(row.depth))]));
|
|
399
|
+
template_u1.setList(element_187wopb5, 'style', template_u1.interpolate([" --reveal-index: ", (revealing.get(row) ?? 0)]));
|
|
400
|
+
template_u1.setProperties(element_187wopb5, row.locked && { 'aria-disabled': 'true' });
|
|
401
|
+
template_u1.setProperties(element_187wopb5, open && { 'aria-expanded': () => read(open) ? 'true' : 'false' });
|
|
402
|
+
template_u1.setProperties(element_187wopb5, mark && { class: () => read(mark).tone && `file-tree-row--${read(mark).tone}` });
|
|
403
|
+
template_u1.setProperties(element_187wopb5, search && { class: () => found('file-tree-row', matched(row)) });
|
|
404
|
+
template_u1.setProperties(element_187wopb5, !!row.scope && { class: 'file-tree-row--scope', style: `--scope: ${row.scope}` });
|
|
405
|
+
template_u1.setProperties(element_187wopb5, dragging?.row(row));
|
|
406
|
+
template_u1.setProperties(element_187wopb5, onscreen(row));
|
|
407
|
+
template_u1.setProperty(element_187wopb5, 'aria-label', mark ? () => read(mark).label : spoken({ ...row.element, name: caption(row), root: header(row) }));
|
|
408
|
+
template_u1.setProperty(element_187wopb5, 'aria-posinset', () => position(row));
|
|
409
|
+
template_u1.setProperty(element_187wopb5, 'aria-selected', () => holds(row, (id) => selection.read(id)) ? 'true' : 'false');
|
|
410
|
+
template_u1.setProperty(element_187wopb5, 'aria-setsize', () => row.size - read(row.gaps));
|
|
411
|
+
template_u1.setList(element_187wopb5, 'class', [
|
|
412
|
+
() => signal.selector(focused, row.key) && 'file-tree-row--focused',
|
|
413
|
+
() => signal.selector(sweep, row.key) && ui.motion === 'close' && 'file-tree-row--motion',
|
|
414
|
+
() => revealing.has(row) && ui.motion === 'open' && 'file-tree-row--reveal'
|
|
415
|
+
]);
|
|
416
|
+
template_u1.delegate(element_187wopb5, 'auxclick', (event) => press(row, event));
|
|
417
|
+
template_u1.delegate(element_187wopb5, 'click', (event) => press(row, event));
|
|
418
|
+
template_u1.delegate(element_187wopb5, 'dblclick', (event) => press(row, event));
|
|
419
|
+
return root_187wopb3;
|
|
420
|
+
})();
|
|
421
|
+
}), pins = stick(rows, sticky, (row) => {
|
|
422
|
+
let mark = decorations ? track(row.id) : null;
|
|
423
|
+
return (() => {
|
|
424
|
+
let root_187wopbe = template_187wopbf(), element_187wopbg = root_187wopbe.firstChild;
|
|
425
|
+
template_u1.slot(element_187wopbg, contents(row, mark, true), 1);
|
|
426
|
+
template_u1.setList(element_187wopbg, 'class', row.locked && '--disabled');
|
|
427
|
+
template_u1.setList(element_187wopbg, 'class', header(row) && 'file-tree-row--root');
|
|
428
|
+
template_u1.setList(element_187wopbg, 'class', () => active(row) && 'file-tree-row--selected');
|
|
429
|
+
template_u1.setList(element_187wopbg, 'style', template_u1.interpolate(["--depth: ", (row.depth)]));
|
|
430
|
+
template_u1.setList(element_187wopbg, 'style', template_u1.interpolate([" --guides: ", (guides(row.depth))]));
|
|
431
|
+
template_u1.setProperties(element_187wopbg, mark && { class: () => read(mark).tone && `file-tree-row--${read(mark).tone}` });
|
|
432
|
+
template_u1.setList(element_187wopbg, 'class', () => signal.selector(focused, row.key) && 'file-tree-row--focused');
|
|
433
|
+
template_u1.delegate(element_187wopbg, 'click', () => unpin(row));
|
|
434
|
+
return root_187wopbe;
|
|
435
|
+
})();
|
|
436
|
+
}, height), anchor = null, detach, forget, motion = 0, root, timer, touched = null, unsubscribe, unwatch, viewport;
|
|
437
|
+
selection.replace([...(untrack(() => state.selection) ?? []), ...(chosen ? [chosen] : [])]);
|
|
438
|
+
persist();
|
|
439
|
+
function about(row) {
|
|
440
|
+
return () => {
|
|
441
|
+
let element = row.element, full = path(row), meta = [];
|
|
442
|
+
if (element.size !== undefined) {
|
|
443
|
+
meta.push(bytes(element.size));
|
|
444
|
+
}
|
|
445
|
+
if (element.modified !== undefined) {
|
|
446
|
+
meta.push(dates.format(element.modified));
|
|
447
|
+
}
|
|
448
|
+
return (() => {
|
|
449
|
+
let root_187wopb6 = template_187wopb7(), element_187wopb8 = root_187wopb6.firstChild.firstChild, element_187wopb9 = root_187wopb6.firstChild.firstElementChild, element_187wopba = root_187wopb6.firstChild.nextSibling;
|
|
450
|
+
template_u1.slot(element_187wopb8, full.slice(0, full.length - element.name.length));
|
|
451
|
+
template_u1.slot(element_187wopb9, element.name, 1);
|
|
452
|
+
template_u1.slot(element_187wopba, meta.length > 0 && (() => {
|
|
453
|
+
let root_187wopbb = template_187wopbc(), element_187wopbd = root_187wopbb.firstChild;
|
|
454
|
+
template_u1.slot(element_187wopbd, meta.join(' · '), 1);
|
|
455
|
+
return root_187wopbb;
|
|
456
|
+
})());
|
|
457
|
+
return root_187wopb6;
|
|
458
|
+
})();
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
controller?.({
|
|
462
|
+
collapseAll: () => all(false),
|
|
463
|
+
expandAll: () => all(true),
|
|
464
|
+
find: (text) => search?.open(text),
|
|
465
|
+
next: (kind) => jump(kind, 1),
|
|
466
|
+
previous: (kind) => jump(kind, -1),
|
|
467
|
+
search: (text) => search?.set(text)
|
|
468
|
+
});
|
|
469
|
+
function activate(row, open, toggle = true, subject = segment(row)) {
|
|
470
|
+
if (row.notice) {
|
|
471
|
+
retry(row);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
if (row.locked) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
clearTimeout(timer);
|
|
478
|
+
anchor = row;
|
|
479
|
+
selection.replace([subject.id]);
|
|
480
|
+
state.selected = subject.id;
|
|
481
|
+
select?.(subject.element);
|
|
482
|
+
if (!row.open) {
|
|
483
|
+
view?.(row.element, open);
|
|
484
|
+
}
|
|
485
|
+
else if (toggle) {
|
|
486
|
+
fold(row, !peek(row.open));
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
function active(row) {
|
|
490
|
+
return holds(row, (id) => signal.selector(current, id));
|
|
491
|
+
}
|
|
492
|
+
function all(value, scope) {
|
|
493
|
+
let at = scope ? rows.indexOf(scope) : -1;
|
|
494
|
+
if (scope && (!scope.open || scope.locked || at === -1)) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
settle();
|
|
498
|
+
let count = scope ? (peek(scope.open) ? visible(branch(scope)).length : 0) : rows.$length, stack = scope ? [scope] : [...top];
|
|
499
|
+
while (stack.length) {
|
|
500
|
+
let row = stack.pop();
|
|
501
|
+
if (!row.open) {
|
|
502
|
+
continue;
|
|
503
|
+
}
|
|
504
|
+
let open = value && !row.locked && (header(row) || !!row.element.children?.length);
|
|
505
|
+
if (peek(row.open) !== open) {
|
|
506
|
+
write(row.open, open);
|
|
507
|
+
opened += open ? 1 : -1;
|
|
508
|
+
}
|
|
509
|
+
if (!open && loader?.forget(row.id)) {
|
|
510
|
+
row.children = null;
|
|
511
|
+
}
|
|
512
|
+
let children = open ? branch(row) : (row.children ?? []);
|
|
513
|
+
for (let i = 0, n = children.length; i < n; i++) {
|
|
514
|
+
stack.push(children[i]);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
swap(at + 1, at + 1 + count, scope ? (peek(scope.open) ? visible(branch(scope)) : []) : visible(top));
|
|
518
|
+
prune();
|
|
519
|
+
ui.any = opened > 0;
|
|
520
|
+
if (cursor) {
|
|
521
|
+
focus(shown(cursor));
|
|
522
|
+
}
|
|
523
|
+
persist();
|
|
524
|
+
}
|
|
525
|
+
function begin(action, target) {
|
|
526
|
+
close(false);
|
|
527
|
+
if (target) {
|
|
528
|
+
reveal(target, true);
|
|
529
|
+
}
|
|
530
|
+
let row = target === null ? null : target === undefined ? cursor && segment(cursor) : built.get(target);
|
|
531
|
+
if (row === undefined) {
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
if (row?.host) {
|
|
535
|
+
row = separate(row);
|
|
536
|
+
}
|
|
537
|
+
if (action === 'rename') {
|
|
538
|
+
if (!rename || !row || row.locked || header(row)) {
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
write(draft, {
|
|
542
|
+
busy: signal(false),
|
|
543
|
+
element: row.element,
|
|
544
|
+
from: row,
|
|
545
|
+
kind: folder(row.element) ? 'folder' : 'file',
|
|
546
|
+
message: signal(''),
|
|
547
|
+
parent: row.parent,
|
|
548
|
+
range: null,
|
|
549
|
+
row,
|
|
550
|
+
value: row.element.name
|
|
551
|
+
});
|
|
552
|
+
move(rows.indexOf(row), 'end');
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (!create) {
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
let parent = row?.open && !row.locked ? row : (row?.parent ?? (roots ? top[0] ?? null : null)), stub = {
|
|
559
|
+
children: null,
|
|
560
|
+
depth: parent ? parent.depth + 1 : 0,
|
|
561
|
+
element: { id: `${id}-draft`, name: '', type: action },
|
|
562
|
+
gaps: signal(0),
|
|
563
|
+
id: `${id}-draft`,
|
|
564
|
+
key: ++key,
|
|
565
|
+
locked: false,
|
|
566
|
+
open: action === 'folder' ? signal(false) : null,
|
|
567
|
+
parent,
|
|
568
|
+
position: 1,
|
|
569
|
+
scope: parent?.scope ?? '',
|
|
570
|
+
size: (parent ? branch(parent) : top).length + 1
|
|
571
|
+
};
|
|
572
|
+
if (roots && !parent) {
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
write(draft, {
|
|
576
|
+
busy: signal(false),
|
|
577
|
+
element: null,
|
|
578
|
+
from: cursor,
|
|
579
|
+
kind: action,
|
|
580
|
+
message: signal(''),
|
|
581
|
+
parent,
|
|
582
|
+
range: null,
|
|
583
|
+
row: stub,
|
|
584
|
+
value: ''
|
|
585
|
+
});
|
|
586
|
+
if (parent && !peek(parent.open)) {
|
|
587
|
+
expand(parent, true);
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
rows.splice(parent ? rows.indexOf(parent) + 1 : 0, 0, stub);
|
|
591
|
+
}
|
|
592
|
+
move(rows.indexOf(stub), 'end');
|
|
593
|
+
}
|
|
594
|
+
function blank(root) {
|
|
595
|
+
let row = notes.get(root.id);
|
|
596
|
+
if (!row || row.parent !== root) {
|
|
597
|
+
notes.set(root.id, row = notice(root, { type: 'empty' }));
|
|
598
|
+
}
|
|
599
|
+
return row;
|
|
600
|
+
}
|
|
601
|
+
function branch(row) {
|
|
602
|
+
return row.children ??= loader && !row.element.children
|
|
603
|
+
? [notice(row, loader.request(row.element))]
|
|
604
|
+
: build(row.element.children ?? [], row.depth + 1, row);
|
|
605
|
+
}
|
|
606
|
+
function build(elements, depth, parent) {
|
|
607
|
+
let arranged = compare && !(roots && !parent) ? [...elements].sort(compare) : elements, gaps = group(arranged, parent), n = arranged.length, out = new Array(n), prefix = scopes.length && parent ? `${path(parent)}/` : '', unseen = 0;
|
|
608
|
+
if (roots) {
|
|
609
|
+
prefix = prefix.slice(prefix.indexOf('/') + 1);
|
|
610
|
+
}
|
|
611
|
+
for (let i = 0; i < n; i++) {
|
|
612
|
+
let element = arranged[i], full = roots && !parent ? '' : prefix + element.name, merged = false, segments = [], tint = scopes.length ? scope(element, full, parent?.scope ?? '') : '';
|
|
613
|
+
if (hidden.has(element.id)) {
|
|
614
|
+
unseen++;
|
|
615
|
+
}
|
|
616
|
+
for (let next = joined(element); next; next = joined(element)) {
|
|
617
|
+
let previous = built.get(element.id);
|
|
618
|
+
merged ||= !!previous?.open && !previous.host && peek(previous.open);
|
|
619
|
+
segments.push(lay({ depth, element, gaps, parent, position: i + 1, scope: tint, segments: undefined, size: n }, true));
|
|
620
|
+
element = next;
|
|
621
|
+
full = `${full}/${element.name}`;
|
|
622
|
+
tint = scopes.length ? scope(element, full, tint) : '';
|
|
623
|
+
}
|
|
624
|
+
let fresh = !built.has(element.id), row = out[i] = lay({
|
|
625
|
+
depth,
|
|
626
|
+
element,
|
|
627
|
+
gaps,
|
|
628
|
+
parent,
|
|
629
|
+
position: i + 1,
|
|
630
|
+
scope: tint,
|
|
631
|
+
segments: segments.length ? segments : undefined,
|
|
632
|
+
size: n
|
|
633
|
+
}, false);
|
|
634
|
+
for (let j = 0, m = segments.length; j < m; j++) {
|
|
635
|
+
segments[j].host = row;
|
|
636
|
+
}
|
|
637
|
+
if (merged && fresh && !peek(row.open)) {
|
|
638
|
+
write(row.open, true);
|
|
639
|
+
opened++;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
write(gaps, unseen);
|
|
643
|
+
return out;
|
|
644
|
+
}
|
|
645
|
+
function carry(row, layout) {
|
|
646
|
+
let element = layout.element;
|
|
647
|
+
if (row.element === element && row.depth === layout.depth && row.gaps === layout.gaps && row.scope === layout.scope && same(row.segments, layout.segments)) {
|
|
648
|
+
row.parent = layout.parent;
|
|
649
|
+
row.position = layout.position;
|
|
650
|
+
row.segments = layout.segments;
|
|
651
|
+
row.size = layout.size;
|
|
652
|
+
return row;
|
|
653
|
+
}
|
|
654
|
+
let next = {
|
|
655
|
+
...row,
|
|
656
|
+
...layout,
|
|
657
|
+
children: null,
|
|
658
|
+
key: ++key,
|
|
659
|
+
locked: element.selectable === false
|
|
660
|
+
};
|
|
661
|
+
built.set(row.id, next);
|
|
662
|
+
retarget(row, next);
|
|
663
|
+
return next;
|
|
664
|
+
}
|
|
665
|
+
function change(value) {
|
|
666
|
+
let edit = peek(draft);
|
|
667
|
+
edit.value = value;
|
|
668
|
+
write(edit.message, inspect(edit).message);
|
|
669
|
+
}
|
|
670
|
+
function close(refocus) {
|
|
671
|
+
let edit = peek(draft);
|
|
672
|
+
if (!edit) {
|
|
673
|
+
return;
|
|
674
|
+
}
|
|
675
|
+
write(draft, null);
|
|
676
|
+
if (!edit.element) {
|
|
677
|
+
let at = rows.indexOf(edit.row);
|
|
678
|
+
if (at !== -1) {
|
|
679
|
+
rows.splice(at, 1);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
let back = edit.from ? rows.indexOf(edit.from) : -1;
|
|
683
|
+
move(back === -1 ? 0 : back, 'end');
|
|
684
|
+
if (split) {
|
|
685
|
+
let rejoin = split;
|
|
686
|
+
split = null;
|
|
687
|
+
update([rejoin]);
|
|
688
|
+
}
|
|
689
|
+
if (refocus) {
|
|
690
|
+
viewport?.focus({ preventScroll: true });
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
function commit(refocus) {
|
|
694
|
+
let edit = peek(draft);
|
|
695
|
+
if (!edit || peek(edit.busy)) {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
let element = edit.element;
|
|
699
|
+
if (element && edit.value === element.name) {
|
|
700
|
+
close(refocus);
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
let { message, parent, parts } = inspect(edit);
|
|
704
|
+
if (message) {
|
|
705
|
+
write(edit.message, message);
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
write(edit.busy, true);
|
|
709
|
+
Promise.resolve()
|
|
710
|
+
.then(() => element ? rename(element, edit.value) : create(parent, parts, edit.kind))
|
|
711
|
+
.then((accepted) => {
|
|
712
|
+
if (peek(draft) !== edit) {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
write(edit.busy, false);
|
|
716
|
+
if (accepted !== false) {
|
|
717
|
+
close(refocus);
|
|
718
|
+
}
|
|
719
|
+
}, (error) => {
|
|
720
|
+
if (peek(draft) !== edit) {
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
write(edit.busy, false);
|
|
724
|
+
write(edit.message, error instanceof Error ? error.message : String(error));
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
function conceal(row) {
|
|
728
|
+
let at = rows.indexOf(row);
|
|
729
|
+
if (at === -1) {
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
rows.splice(at, 1 + (row.open && peek(row.open) ? visible(branch(row)).length : 0));
|
|
733
|
+
prune();
|
|
734
|
+
if (cursor && rows.indexOf(cursor) === -1 && rows.$length) {
|
|
735
|
+
focus(rows[Math.min(at, rows.$length - 1)]);
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
function contents(row, mark, pinned) {
|
|
739
|
+
let element = row.element, open = row.open;
|
|
740
|
+
return (() => {
|
|
741
|
+
let root_187wopbh = template_187wopbi(), element_187wopbj = root_187wopbh.firstChild, element_187wopbk = element_187wopbj.nextSibling, element_187wopbl = element_187wopbk.nextSibling, element_187wopbm = element_187wopbl.nextSibling, element_187wopbn = element_187wopbm.nextSibling, element_187wopbo = element_187wopbn.nextSibling;
|
|
742
|
+
template_u1.slot(element_187wopbj, open && icon({ class: 'file-tree-chevron' }, remap.chevron ?? chevron), 1);
|
|
743
|
+
new template_u1.EffectSlot(element_187wopbk, () => !header(row) && render(element, open !== null && read(open)));
|
|
744
|
+
new template_u1.EffectSlot(element_187wopbl, () => {
|
|
745
|
+
let edit = read(draft);
|
|
746
|
+
if (pinned || edit?.row !== row) {
|
|
747
|
+
return row.segments
|
|
748
|
+
? segments(row, (node) => [
|
|
749
|
+
{
|
|
750
|
+
class: [
|
|
751
|
+
() => node !== row && signal.selector(current, node.id) && '--active',
|
|
752
|
+
search && (() => found('file-tree-segment', search.mark(node.id)))
|
|
753
|
+
]
|
|
754
|
+
},
|
|
755
|
+
dragging?.segment(node) ?? {}
|
|
756
|
+
], (node) => () => emphasis(node.element.name, read(query) || read(given)))
|
|
757
|
+
: (() => {
|
|
758
|
+
let root_187wopbp = template_187wopbq(), element_187wopbr = root_187wopbp.firstChild;
|
|
759
|
+
new template_u1.EffectSlot(element_187wopbr, () => emphasis(element.name, read(query) || read(given)), 1);
|
|
760
|
+
return root_187wopbp;
|
|
761
|
+
})();
|
|
762
|
+
}
|
|
763
|
+
return (() => {
|
|
764
|
+
let root_187wopbs = template_187wopbt(), element_187wopbu = root_187wopbs.firstChild, element_187wopbv = element_187wopbu.nextSibling;
|
|
765
|
+
template_u1.slot(element_187wopbu, row.segments && (() => {
|
|
766
|
+
let root_187wopbw = template_187wopbq(), element_187wopbx = root_187wopbw.firstChild;
|
|
767
|
+
template_u1.slot(element_187wopbx, row.segments.map((node) => `${node.element.name}/`).join(''), 1);
|
|
768
|
+
return root_187wopbw;
|
|
769
|
+
})());
|
|
770
|
+
template_u1.slot(element_187wopbv, field(edit, id, {
|
|
771
|
+
blur: leave,
|
|
772
|
+
cancel: () => close(true),
|
|
773
|
+
input: change,
|
|
774
|
+
submit: () => commit(true)
|
|
775
|
+
}));
|
|
776
|
+
return root_187wopbs;
|
|
777
|
+
})();
|
|
778
|
+
});
|
|
779
|
+
template_u1.slot(element_187wopbm, element.symlink && icon({ 'aria-hidden': 'true', class: 'file-tree-marker' }, remap.symlink ?? symlink));
|
|
780
|
+
template_u1.slot(element_187wopbn, element.readonly && icon({ 'aria-hidden': 'true', class: 'file-tree-marker' }, remap.lock ?? lock));
|
|
781
|
+
template_u1.slot(element_187wopbo, mark && (() => {
|
|
782
|
+
let root_187wopby = template_187wopbz(), element_187wopb10 = root_187wopby.firstChild;
|
|
783
|
+
new template_u1.EffectSlot(element_187wopb10, () => read(mark).parts.map(chip), 1);
|
|
784
|
+
return root_187wopby;
|
|
785
|
+
})());
|
|
786
|
+
return root_187wopbh;
|
|
787
|
+
})();
|
|
788
|
+
}
|
|
789
|
+
function decorate(ids) {
|
|
790
|
+
let outer = touched === null, toggled = [];
|
|
791
|
+
touched ??= new Set();
|
|
792
|
+
for (let id of ids) {
|
|
793
|
+
let hide = unseen(id), parent = index.get(id)?.parent ?? null, silent = gone(id) && (filtered.has(id) || !deleted(id)), after = silent ? -1 : rank(decorations?.get(id)), before = own.get(id) ?? -1;
|
|
794
|
+
if (hide !== hidden.has(id)) {
|
|
795
|
+
obscure(id, hide);
|
|
796
|
+
toggled.push(id);
|
|
797
|
+
}
|
|
798
|
+
if (after !== before) {
|
|
799
|
+
if (after === -1) {
|
|
800
|
+
own.delete(id);
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
own.set(id, after);
|
|
804
|
+
}
|
|
805
|
+
let from = lift(before), to = lift(after);
|
|
806
|
+
if (from !== to) {
|
|
807
|
+
tally(parent, from, undefined, -1);
|
|
808
|
+
tally(parent, to, undefined, 1);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
let decoration = silent ? undefined : decorations?.get(id), lines = [decoration?.additions ?? 0, decoration?.deletions ?? 0], previous = diffs.get(id), added = lines[0] - (previous?.[0] ?? 0), removed = lines[1] - (previous?.[1] ?? 0);
|
|
812
|
+
if (added || removed) {
|
|
813
|
+
if (lines[0] || lines[1]) {
|
|
814
|
+
diffs.set(id, lines);
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
diffs.delete(id);
|
|
818
|
+
}
|
|
819
|
+
tally(parent, 0, [added, removed], 1);
|
|
820
|
+
}
|
|
821
|
+
refresh(id);
|
|
822
|
+
}
|
|
823
|
+
if (toggled.length === 1) {
|
|
824
|
+
let id = toggled[0], groups = refold(id), row = built.get(id);
|
|
825
|
+
if (groups.length) {
|
|
826
|
+
update(groups);
|
|
827
|
+
}
|
|
828
|
+
else if (row && hidden.has(id)) {
|
|
829
|
+
conceal(row);
|
|
830
|
+
}
|
|
831
|
+
else if (row) {
|
|
832
|
+
restore(row);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
else if (toggled.length) {
|
|
836
|
+
reshow(toggled);
|
|
837
|
+
}
|
|
838
|
+
if (outer) {
|
|
839
|
+
let marked = touched;
|
|
840
|
+
touched = null;
|
|
841
|
+
for (let id of marked) {
|
|
842
|
+
refresh(id);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
function deleted(id) {
|
|
847
|
+
let decoration = decorations?.get(id);
|
|
848
|
+
return (decoration?.status ?? decoration?.staged) === 'deleted';
|
|
849
|
+
}
|
|
850
|
+
function copy(element, limit, container, scroller) {
|
|
851
|
+
let edge = element.getBoundingClientRect().bottom, frame = container.getBoundingClientRect(), out = [], view = scroller.getBoundingClientRect(), left = view.left + scroller.clientLeft, top = view.top + scroller.clientTop, bottom = top + scroller.clientHeight;
|
|
852
|
+
stage.edge = edge - top;
|
|
853
|
+
stage.height = scroller.clientHeight;
|
|
854
|
+
stage.left = left - frame.left - container.clientLeft;
|
|
855
|
+
stage.top = top - frame.top - container.clientTop;
|
|
856
|
+
stage.width = scroller.clientWidth;
|
|
857
|
+
for (let i = 0, node = element.nextElementSibling; i < limit && node?.classList.contains('file-tree-row'); i++, node = node.nextElementSibling) {
|
|
858
|
+
let rect = node.getBoundingClientRect(), row = node[ROW];
|
|
859
|
+
if (rect.top >= bottom) {
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
if (row) {
|
|
863
|
+
out.push({ left: rect.left - left, row, top: rect.top - edge, width: rect.width });
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
return out;
|
|
867
|
+
}
|
|
868
|
+
function destination(row) {
|
|
869
|
+
return row.open ? row.element : (row.parent?.element ?? null);
|
|
870
|
+
}
|
|
871
|
+
async function discard(elements, permanent) {
|
|
872
|
+
if (!elements.length || (operations?.confirm && !(await operations.confirm(elements, permanent)))) {
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
operations?.delete?.(elements, permanent);
|
|
876
|
+
}
|
|
877
|
+
function expand(row, value, inner) {
|
|
878
|
+
if (!row.open || peek(row.open) === value) {
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
settle();
|
|
882
|
+
let at = rows.indexOf(row);
|
|
883
|
+
if (value) {
|
|
884
|
+
write(row.open, true);
|
|
885
|
+
opened++;
|
|
886
|
+
if (at !== -1) {
|
|
887
|
+
insert(at + 1, inner ?? visible(branch(row)));
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
else {
|
|
891
|
+
if (at !== -1) {
|
|
892
|
+
rows.splice(at + 1, (inner ?? visible(branch(row))).length);
|
|
893
|
+
}
|
|
894
|
+
write(row.open, false);
|
|
895
|
+
opened--;
|
|
896
|
+
prune();
|
|
897
|
+
if (loader?.forget(row.id)) {
|
|
898
|
+
row.children = null;
|
|
899
|
+
}
|
|
900
|
+
if (cursor) {
|
|
901
|
+
focus(shown(cursor));
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
ui.any = opened > 0;
|
|
905
|
+
persist();
|
|
906
|
+
}
|
|
907
|
+
function flip(row) {
|
|
908
|
+
if (row.locked) {
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
anchor = row;
|
|
912
|
+
if (!selection.has(row.id)) {
|
|
913
|
+
selection.replace([...selection.ids, row.id]);
|
|
914
|
+
primary(row.id);
|
|
915
|
+
prune();
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
let rest = [...selection.ids].filter((id) => id !== row.id);
|
|
919
|
+
selection.replace(rest);
|
|
920
|
+
if (state.selected === row.id) {
|
|
921
|
+
primary(rest[rest.length - 1] ?? '');
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
function fold(row, value) {
|
|
925
|
+
if (!row.open || peek(row.open) === value) {
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
settle();
|
|
929
|
+
let container = root, element = node(row), inner = visible(branch(row)), scroller = viewport;
|
|
930
|
+
if (!container || !element || !inner.length || !scroller) {
|
|
931
|
+
expand(row, value);
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
if (value) {
|
|
935
|
+
for (let i = 0, n = inner.length; i < n; i++) {
|
|
936
|
+
revealing.set(inner[i], i);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
let measured = copy(element, value ? Infinity : inner.length, container, scroller);
|
|
940
|
+
expand(row, value, inner);
|
|
941
|
+
motion = requestAnimationFrame(() => {
|
|
942
|
+
let out = [];
|
|
943
|
+
for (let i = 0, n = measured.length; i < n; i++) {
|
|
944
|
+
let current = lookup(measured[i].row.id);
|
|
945
|
+
if (!current || !node(current)) {
|
|
946
|
+
out.push(measured[i]);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
ghosts.push(...out);
|
|
950
|
+
write(sweep, row.key);
|
|
951
|
+
ui.motion = value ? 'open' : 'close';
|
|
952
|
+
ui.motionRows = inner.length;
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
function focus(row) {
|
|
956
|
+
cursor = row;
|
|
957
|
+
write(focused, row.key);
|
|
958
|
+
}
|
|
959
|
+
function follow(row) {
|
|
960
|
+
clearTimeout(timer);
|
|
961
|
+
if (preview && !row.open && !row.locked) {
|
|
962
|
+
if (preview === 'immediate') {
|
|
963
|
+
activate(row, PREVIEW);
|
|
964
|
+
}
|
|
965
|
+
else {
|
|
966
|
+
timer = setTimeout(() => activate(row, PREVIEW), REST);
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
function ghost({ left, row, top, width }) {
|
|
971
|
+
let style = `--depth: ${row.depth}; --guides: ${guides(row.depth)}; left: ${left}px; margin: 0; position: absolute; top: ${top}px; width: ${width}px;`;
|
|
972
|
+
if (row.notice) {
|
|
973
|
+
return placeholder(row.notice, { style });
|
|
974
|
+
}
|
|
975
|
+
let mark = decorations ? track(row.id) : null, open = row.open;
|
|
976
|
+
return (() => {
|
|
977
|
+
let root_187wopb11 = template_187wopb12(), element_187wopb13 = root_187wopb11.firstChild;
|
|
978
|
+
template_u1.slot(element_187wopb13, contents(row, mark, true), 1);
|
|
979
|
+
template_u1.setList(element_187wopb13, 'class', row.locked && '--disabled');
|
|
980
|
+
template_u1.setList(element_187wopb13, 'class', header(row) && 'file-tree-row--root');
|
|
981
|
+
template_u1.setList(element_187wopb13, 'class', () => active(row) && '--active');
|
|
982
|
+
template_u1.setList(element_187wopb13, 'class', () => holds(row, (id) => clipboard.marked.read(id)) && 'file-tree-row--cut');
|
|
983
|
+
template_u1.setList(element_187wopb13, 'class', () => holds(row, (id) => selection.read(id)) && !active(row) && 'file-tree-row--selected');
|
|
984
|
+
template_u1.setList(element_187wopb13, 'style', style);
|
|
985
|
+
template_u1.setProperties(element_187wopb13, open && { 'aria-expanded': () => read(open) ? 'true' : 'false' });
|
|
986
|
+
template_u1.setProperties(element_187wopb13, mark && { class: () => read(mark).tone && `file-tree-row--${read(mark).tone}` });
|
|
987
|
+
template_u1.setProperties(element_187wopb13, search && { class: () => found('file-tree-row', matched(row)) });
|
|
988
|
+
template_u1.setProperties(element_187wopb13, !!row.scope && { class: 'file-tree-row--scope', style: `--scope: ${row.scope}` });
|
|
989
|
+
template_u1.setList(element_187wopb13, 'class', () => signal.selector(focused, row.key) && 'file-tree-row--focused');
|
|
990
|
+
return root_187wopb11;
|
|
991
|
+
})();
|
|
992
|
+
}
|
|
993
|
+
function gone(id) {
|
|
994
|
+
return filtered.has(id) || (deleted(id) && !display.deleted) || (display.ignored === false && decorations?.get(id)?.status === 'ignored');
|
|
995
|
+
}
|
|
996
|
+
function group(elements, parent) {
|
|
997
|
+
let owner = parent?.id ?? null;
|
|
998
|
+
for (let i = 0, n = elements.length; i < n; i++) {
|
|
999
|
+
let row = built.get(elements[i].id);
|
|
1000
|
+
if (row && (row.parent?.id ?? null) === owner) {
|
|
1001
|
+
return row.gaps;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
return signal(0, () => false);
|
|
1005
|
+
}
|
|
1006
|
+
function header(row) {
|
|
1007
|
+
return roots && row.parent === null;
|
|
1008
|
+
}
|
|
1009
|
+
function height() {
|
|
1010
|
+
return viewport?.querySelector('.file-tree-row')?.offsetHeight ?? 0;
|
|
1011
|
+
}
|
|
1012
|
+
function informative(row, target) {
|
|
1013
|
+
let element = row.element, name = target.querySelector('.file-tree-name');
|
|
1014
|
+
if (element.size !== undefined || element.modified !== undefined || !name) {
|
|
1015
|
+
return true;
|
|
1016
|
+
}
|
|
1017
|
+
return name.scrollWidth > name.clientWidth || path(row) !== name.textContent?.trim();
|
|
1018
|
+
}
|
|
1019
|
+
function insert(at, items) {
|
|
1020
|
+
for (let i = 0, n = items.length; i < n; i += CHUNK) {
|
|
1021
|
+
rows.splice(at + i, 0, ...items.slice(i, i + CHUNK));
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
function inspect(edit) {
|
|
1025
|
+
let parent = edit.parent?.element ?? null, result = resolve(edit.value, parent, edit.element, siblings, folder);
|
|
1026
|
+
if (!result.message && validate) {
|
|
1027
|
+
result.message = validate(edit.value, parent, edit.element) || '';
|
|
1028
|
+
}
|
|
1029
|
+
return result;
|
|
1030
|
+
}
|
|
1031
|
+
function joined(element) {
|
|
1032
|
+
if (!compact || element.id === split || hidden.has(element.id) || !folder(element) || (roots && index.get(element.id)?.parent === null)) {
|
|
1033
|
+
return null;
|
|
1034
|
+
}
|
|
1035
|
+
return sole(element, hidden, folder);
|
|
1036
|
+
}
|
|
1037
|
+
async function jump(kind, step) {
|
|
1038
|
+
if (!decorations) {
|
|
1039
|
+
return null;
|
|
1040
|
+
}
|
|
1041
|
+
if (loader) {
|
|
1042
|
+
await uncover(kind);
|
|
1043
|
+
}
|
|
1044
|
+
let found = [];
|
|
1045
|
+
for (let id of decorations.keys()) {
|
|
1046
|
+
let entry = index.get(id);
|
|
1047
|
+
if (!entry || folder(entry.element) || hidden.has(id) || !flagged(decorations.get(id), kind)) {
|
|
1048
|
+
continue;
|
|
1049
|
+
}
|
|
1050
|
+
let row = locate(id);
|
|
1051
|
+
found.push({ place: place(row), row });
|
|
1052
|
+
}
|
|
1053
|
+
found.sort((a, b) => order(a.place, b.place));
|
|
1054
|
+
let at = seek(found.map((item) => item.place), cursor ? place(cursor) : null, step);
|
|
1055
|
+
if (at === -1) {
|
|
1056
|
+
return null;
|
|
1057
|
+
}
|
|
1058
|
+
let target = found[at].row;
|
|
1059
|
+
reveal(target.id, true);
|
|
1060
|
+
follow(target);
|
|
1061
|
+
return target.element;
|
|
1062
|
+
}
|
|
1063
|
+
function lay(layout, folded) {
|
|
1064
|
+
let element = layout.element, previous = built.get(element.id);
|
|
1065
|
+
if (!previous) {
|
|
1066
|
+
let open = folder(element) ? folded || initial.has(element.id) : null, row = {
|
|
1067
|
+
...layout,
|
|
1068
|
+
children: null,
|
|
1069
|
+
id: element.id,
|
|
1070
|
+
key: ++key,
|
|
1071
|
+
locked: element.selectable === false,
|
|
1072
|
+
open: open === null ? null : signal(open)
|
|
1073
|
+
};
|
|
1074
|
+
if (open && !folded) {
|
|
1075
|
+
opened++;
|
|
1076
|
+
}
|
|
1077
|
+
built.set(element.id, row);
|
|
1078
|
+
return row;
|
|
1079
|
+
}
|
|
1080
|
+
let was = !!previous.host, row = carry(previous, layout);
|
|
1081
|
+
row.host = undefined;
|
|
1082
|
+
if (was !== folded) {
|
|
1083
|
+
row.children = null;
|
|
1084
|
+
if (!folded) {
|
|
1085
|
+
opened += peek(row.open) ? 1 : 0;
|
|
1086
|
+
}
|
|
1087
|
+
else if (peek(row.open)) {
|
|
1088
|
+
opened--;
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1091
|
+
write(row.open, true);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
if (row !== previous) {
|
|
1095
|
+
refresh(element.id);
|
|
1096
|
+
}
|
|
1097
|
+
return row;
|
|
1098
|
+
}
|
|
1099
|
+
function leave() {
|
|
1100
|
+
let edit = peek(draft);
|
|
1101
|
+
if (!edit || peek(edit.busy)) {
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
if (peek(edit.message) || inspect(edit).message) {
|
|
1105
|
+
close(false);
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
commit(false);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
function loaded(id, children) {
|
|
1112
|
+
let element = model.get(id);
|
|
1113
|
+
if (!element) {
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
if (children && !element.children) {
|
|
1117
|
+
model.add(children, id);
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
update([id]);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
function locate(id) {
|
|
1124
|
+
let chain = [];
|
|
1125
|
+
for (let node = index.get(id)?.parent ?? null; node !== null; node = index.get(node).parent) {
|
|
1126
|
+
chain.push(node);
|
|
1127
|
+
}
|
|
1128
|
+
for (let i = chain.length - 1; i >= 0; i--) {
|
|
1129
|
+
let row = built.get(chain[i]);
|
|
1130
|
+
if (!row.host) {
|
|
1131
|
+
branch(row);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
let row = built.get(id);
|
|
1135
|
+
return row?.host ?? row;
|
|
1136
|
+
}
|
|
1137
|
+
function look(id) {
|
|
1138
|
+
let entry = index.get(id), inside = -1, list = counts.get(id);
|
|
1139
|
+
if (list) {
|
|
1140
|
+
for (let i = list.length - 1; i > 0; i--) {
|
|
1141
|
+
if (list[i]) {
|
|
1142
|
+
inside = i;
|
|
1143
|
+
break;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
let decoration = decorations?.get(id), highest = Math.max(own.get(id) ?? -1, inside), mine = diffs.get(id), total = totals.get(id), lines = display.stats ? [(mine?.[0] ?? 0) + (total?.[0] ?? 0), (mine?.[1] ?? 0) + (total?.[1] ?? 0)] : [0, 0], row = built.get(id), subject = entry?.element ?? { name: id }, label = spoken({ ...subject, name: row?.segments ? caption(row) : subject.name, root: roots && entry?.parent === null }, decoration, lines, inside > 0 ? RANK[inside] : undefined), parts = badge(decoration, lines, entry && folder(entry.element) ? (highest > 0 ? RANK[highest] : '') : null), tone = highest === -1 ? '' : RANK[highest];
|
|
1148
|
+
return { key: JSON.stringify([label, parts]), label, parts, tone };
|
|
1149
|
+
}
|
|
1150
|
+
function lookup(id) {
|
|
1151
|
+
return built.get(id) ?? rows.find((row) => row.notice && row.id === id);
|
|
1152
|
+
}
|
|
1153
|
+
function matched(row) {
|
|
1154
|
+
let out = false;
|
|
1155
|
+
for (let node of lineage(row)) {
|
|
1156
|
+
let mark = search.mark(node.id);
|
|
1157
|
+
if (mark === 'current') {
|
|
1158
|
+
return mark;
|
|
1159
|
+
}
|
|
1160
|
+
out ||= mark;
|
|
1161
|
+
}
|
|
1162
|
+
return out;
|
|
1163
|
+
}
|
|
1164
|
+
function modes() {
|
|
1165
|
+
return [display.deleted, display.dotfiles, display.ignored, display.stats].join();
|
|
1166
|
+
}
|
|
1167
|
+
function move(index, align) {
|
|
1168
|
+
let row = rows[index];
|
|
1169
|
+
if (!row || !viewport) {
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1172
|
+
focus(row);
|
|
1173
|
+
let element = node(row);
|
|
1174
|
+
if (!element) {
|
|
1175
|
+
slot.scrollTo(align === 'start' ? index - pins.cover(row) : index, align);
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
let r = element.getBoundingClientRect(), v = viewport.getBoundingClientRect(), top = v.top + pins.cover(row) * r.height;
|
|
1179
|
+
if (r.top < top) {
|
|
1180
|
+
viewport.scrollTop -= top - r.top;
|
|
1181
|
+
}
|
|
1182
|
+
else if (r.bottom > v.bottom) {
|
|
1183
|
+
viewport.scrollTop += r.bottom - v.bottom;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
function notice(parent, value) {
|
|
1187
|
+
let at = ++key, self = `${id}-${at}`;
|
|
1188
|
+
return {
|
|
1189
|
+
children: null,
|
|
1190
|
+
depth: parent.depth + 1,
|
|
1191
|
+
element: { id: self, name: '' },
|
|
1192
|
+
gaps: signal(0),
|
|
1193
|
+
id: self,
|
|
1194
|
+
key: at,
|
|
1195
|
+
locked: true,
|
|
1196
|
+
notice: value,
|
|
1197
|
+
open: null,
|
|
1198
|
+
parent,
|
|
1199
|
+
position: 1,
|
|
1200
|
+
scope: parent.scope,
|
|
1201
|
+
size: 1
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
function node(row) {
|
|
1205
|
+
return document.getElementById(`${id}-${row.key}`);
|
|
1206
|
+
}
|
|
1207
|
+
function obscure(id, value) {
|
|
1208
|
+
let row = built.get(id);
|
|
1209
|
+
if (value) {
|
|
1210
|
+
hidden.add(id);
|
|
1211
|
+
}
|
|
1212
|
+
else {
|
|
1213
|
+
hidden.delete(id);
|
|
1214
|
+
}
|
|
1215
|
+
shifts++;
|
|
1216
|
+
if (row) {
|
|
1217
|
+
write(row.gaps, peek(row.gaps) + (value ? 1 : -1));
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
function onscreen(row) {
|
|
1221
|
+
return {
|
|
1222
|
+
onconnect: (element) => {
|
|
1223
|
+
element[ROW] = row;
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
function owner(element) {
|
|
1228
|
+
let row = element?.[ROW];
|
|
1229
|
+
return row && !row.notice ? row : null;
|
|
1230
|
+
}
|
|
1231
|
+
function page() {
|
|
1232
|
+
let size = height();
|
|
1233
|
+
return size && viewport ? Math.max(1, Math.floor(viewport.clientHeight / size)) : 1;
|
|
1234
|
+
}
|
|
1235
|
+
function perform(name, row) {
|
|
1236
|
+
switch (name) {
|
|
1237
|
+
case 'all': {
|
|
1238
|
+
let ids = [];
|
|
1239
|
+
for (let i = 0, n = rows.$length; i < n; i++) {
|
|
1240
|
+
if (!rows[i].locked) {
|
|
1241
|
+
ids.push(rows[i].id);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
selection.replace(ids);
|
|
1245
|
+
if (!selection.has(state.selected) && !row.locked) {
|
|
1246
|
+
primary(row.id);
|
|
1247
|
+
}
|
|
1248
|
+
return true;
|
|
1249
|
+
}
|
|
1250
|
+
case 'clear': {
|
|
1251
|
+
let cut = clipboard.cancel(), lead = row.locked ? built.get(state.selected) : row;
|
|
1252
|
+
if (!cut && selection.ids.size < 2) {
|
|
1253
|
+
return false;
|
|
1254
|
+
}
|
|
1255
|
+
selection.replace(lead ? [lead.id] : []);
|
|
1256
|
+
if (lead) {
|
|
1257
|
+
anchor = lead;
|
|
1258
|
+
primary(lead.id);
|
|
1259
|
+
}
|
|
1260
|
+
return true;
|
|
1261
|
+
}
|
|
1262
|
+
case 'copy':
|
|
1263
|
+
case 'cut': {
|
|
1264
|
+
let elements = targets(row, true);
|
|
1265
|
+
if (!operations || !elements.length) {
|
|
1266
|
+
return false;
|
|
1267
|
+
}
|
|
1268
|
+
clipboard.hold(elements, name === 'cut');
|
|
1269
|
+
operations[name]?.(elements);
|
|
1270
|
+
return true;
|
|
1271
|
+
}
|
|
1272
|
+
case 'delete':
|
|
1273
|
+
case 'trash':
|
|
1274
|
+
if (!operations?.delete) {
|
|
1275
|
+
return false;
|
|
1276
|
+
}
|
|
1277
|
+
void discard(targets(row, true), name === 'delete');
|
|
1278
|
+
return true;
|
|
1279
|
+
case 'duplicate': {
|
|
1280
|
+
let elements = targets(row, true);
|
|
1281
|
+
if (!operations?.duplicate || !elements.length) {
|
|
1282
|
+
return false;
|
|
1283
|
+
}
|
|
1284
|
+
operations.duplicate(elements);
|
|
1285
|
+
return true;
|
|
1286
|
+
}
|
|
1287
|
+
case 'paste': {
|
|
1288
|
+
let paste = operations?.paste, target = destination(segment(row));
|
|
1289
|
+
if (!paste) {
|
|
1290
|
+
return false;
|
|
1291
|
+
}
|
|
1292
|
+
void clipboard.paste((elements, cut) => paste(elements, target, cut));
|
|
1293
|
+
return true;
|
|
1294
|
+
}
|
|
1295
|
+
case 'path':
|
|
1296
|
+
case 'relative': {
|
|
1297
|
+
let elements = targets(row, false);
|
|
1298
|
+
if (!elements.length) {
|
|
1299
|
+
return false;
|
|
1300
|
+
}
|
|
1301
|
+
void writeText(elements.map((element) => address(element, name === 'relative')).join('\n'));
|
|
1302
|
+
return true;
|
|
1303
|
+
}
|
|
1304
|
+
case 'redo':
|
|
1305
|
+
case 'undo':
|
|
1306
|
+
if (!history || !(name === 'undo' ? history.canUndo : history.canRedo)) {
|
|
1307
|
+
return false;
|
|
1308
|
+
}
|
|
1309
|
+
void history[name]();
|
|
1310
|
+
return true;
|
|
1311
|
+
case 'toggle':
|
|
1312
|
+
flip(row);
|
|
1313
|
+
return true;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
function persist() {
|
|
1317
|
+
if (!snapshot) {
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
let out = [];
|
|
1321
|
+
for (let [id, row] of built) {
|
|
1322
|
+
if (row.open && peek(row.open) && !unfolded.get(id)) {
|
|
1323
|
+
out.push(id);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
for (let id of initial) {
|
|
1327
|
+
if (!built.has(id) && (loader || index.has(id))) {
|
|
1328
|
+
out.push(id);
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
snapshot.expanded = out;
|
|
1332
|
+
}
|
|
1333
|
+
function position(row) {
|
|
1334
|
+
let siblings = row.parent ? row.parent.children : top;
|
|
1335
|
+
if (!read(row.gaps) || !siblings) {
|
|
1336
|
+
return row.position;
|
|
1337
|
+
}
|
|
1338
|
+
let counted = places.get(siblings);
|
|
1339
|
+
if (!counted || counted.at !== shifts) {
|
|
1340
|
+
let before = new Int32Array(siblings.length + 1);
|
|
1341
|
+
for (let i = 0, n = siblings.length; i < n; i++) {
|
|
1342
|
+
before[i + 1] = before[i] + +hidden.has(siblings[i].id);
|
|
1343
|
+
}
|
|
1344
|
+
places.set(siblings, counted = { at: shifts, before });
|
|
1345
|
+
}
|
|
1346
|
+
return row.position - counted.before[row.position - 1];
|
|
1347
|
+
}
|
|
1348
|
+
function press(row, event) {
|
|
1349
|
+
let from = cursor, subject = pick(row, event), type = event.type;
|
|
1350
|
+
if (type === 'auxclick' && event.button !== 1) {
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
focus(row);
|
|
1354
|
+
if (type === 'click' && event.shiftKey) {
|
|
1355
|
+
span(from ?? row, row);
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
if (type === 'click' && (event.ctrlKey || event.metaKey)) {
|
|
1359
|
+
flip(subject);
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
if (!row.open) {
|
|
1363
|
+
activate(row, { mode: type === 'click' ? 'preview' : 'pinned', side: event.altKey });
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
let single = unfold === 'click' || twistie(event);
|
|
1367
|
+
if (type === 'click' && event.altKey) {
|
|
1368
|
+
activate(row, PREVIEW, false, subject);
|
|
1369
|
+
all(!peek(row.open), row);
|
|
1370
|
+
}
|
|
1371
|
+
else if (type === 'click') {
|
|
1372
|
+
activate(row, PREVIEW, single, subject);
|
|
1373
|
+
}
|
|
1374
|
+
else if (type === 'dblclick' && !single && !event.altKey && !row.locked) {
|
|
1375
|
+
fold(row, !peek(row.open));
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
function primary(id) {
|
|
1379
|
+
quiet = id;
|
|
1380
|
+
state.selected = id;
|
|
1381
|
+
}
|
|
1382
|
+
function prune() {
|
|
1383
|
+
selection.replace([...selection.ids].filter((id) => {
|
|
1384
|
+
let row = built.get(id);
|
|
1385
|
+
return id === state.selected || (!!row && !hidden.has(id) && shown(row) === row);
|
|
1386
|
+
}));
|
|
1387
|
+
}
|
|
1388
|
+
function purge(ids) {
|
|
1389
|
+
for (let i = 0, n = ids.length; i < n; i++) {
|
|
1390
|
+
let id = ids[i], row = built.get(id);
|
|
1391
|
+
if (row?.open && peek(row.open) && !row.host) {
|
|
1392
|
+
opened--;
|
|
1393
|
+
}
|
|
1394
|
+
if (anchor?.id === id) {
|
|
1395
|
+
anchor = null;
|
|
1396
|
+
}
|
|
1397
|
+
built.delete(id);
|
|
1398
|
+
counts.delete(id);
|
|
1399
|
+
diffs.delete(id);
|
|
1400
|
+
filtered.delete(id);
|
|
1401
|
+
hidden.delete(id);
|
|
1402
|
+
initial.delete(id);
|
|
1403
|
+
marks.delete(id);
|
|
1404
|
+
notes.delete(id);
|
|
1405
|
+
own.delete(id);
|
|
1406
|
+
totals.delete(id);
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
function recover(at) {
|
|
1410
|
+
if (cursor && rows.includes(cursor)) {
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
let row;
|
|
1414
|
+
for (let node = cursor && index.has(cursor.id) ? cursor.id : null; node !== null; node = index.get(node).parent) {
|
|
1415
|
+
let found = built.get(node), candidate = found?.host ?? found;
|
|
1416
|
+
if (candidate && rows.includes(candidate)) {
|
|
1417
|
+
row = candidate;
|
|
1418
|
+
break;
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
if (row) {
|
|
1422
|
+
focus(row);
|
|
1423
|
+
}
|
|
1424
|
+
else if (rows.$length) {
|
|
1425
|
+
focus(rows[Math.min(Math.max(at, 0), rows.$length - 1)]);
|
|
1426
|
+
}
|
|
1427
|
+
else {
|
|
1428
|
+
cursor = null;
|
|
1429
|
+
write(focused, 0);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
function redisplay(force = false) {
|
|
1433
|
+
settle();
|
|
1434
|
+
let changed = [];
|
|
1435
|
+
for (let id of index.keys()) {
|
|
1436
|
+
rehide(id, changed);
|
|
1437
|
+
}
|
|
1438
|
+
for (let id of decorations?.keys() ?? []) {
|
|
1439
|
+
if (!index.has(id)) {
|
|
1440
|
+
rehide(id, changed);
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
decorate(changed);
|
|
1444
|
+
for (let id of marks.keys()) {
|
|
1445
|
+
refresh(id);
|
|
1446
|
+
}
|
|
1447
|
+
if (changed.length || force) {
|
|
1448
|
+
reshow(changed);
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
function refold(id) {
|
|
1452
|
+
let out = [];
|
|
1453
|
+
for (let node of [id, index.get(id)?.parent ?? null]) {
|
|
1454
|
+
let row = node === null ? undefined : built.get(node);
|
|
1455
|
+
if (row && stale(row)) {
|
|
1456
|
+
out.push((row.host ?? row).parent?.id ?? null);
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
return out;
|
|
1460
|
+
}
|
|
1461
|
+
function refresh(id) {
|
|
1462
|
+
let mark = marks.get(id);
|
|
1463
|
+
if (!mark) {
|
|
1464
|
+
return;
|
|
1465
|
+
}
|
|
1466
|
+
if (touched) {
|
|
1467
|
+
touched.add(id);
|
|
1468
|
+
return;
|
|
1469
|
+
}
|
|
1470
|
+
let current = peek(mark), next = look(id);
|
|
1471
|
+
if (current.key !== next.key || current.tone !== next.tone) {
|
|
1472
|
+
write(mark, next);
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
function regroup(id) {
|
|
1476
|
+
let row = id === null ? undefined : built.get(id);
|
|
1477
|
+
return row && (row.host || stale(row)) ? (row.host ?? row).parent?.id ?? null : id;
|
|
1478
|
+
}
|
|
1479
|
+
function rehide(id, changed) {
|
|
1480
|
+
let hide = unseen(id);
|
|
1481
|
+
if (hide !== hidden.has(id)) {
|
|
1482
|
+
obscure(id, hide);
|
|
1483
|
+
changed.push(id);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
function reshow(changed) {
|
|
1487
|
+
settle();
|
|
1488
|
+
for (let group of new Set(changed.flatMap(refold))) {
|
|
1489
|
+
sync(group);
|
|
1490
|
+
}
|
|
1491
|
+
if (cursor?.host) {
|
|
1492
|
+
focus(cursor.host);
|
|
1493
|
+
}
|
|
1494
|
+
let next = visible(top), kept = new Set(next), target = cursor && !kept.has(cursor)
|
|
1495
|
+
? rows.slice(rows.indexOf(cursor)).find((row) => kept.has(row)) ?? next[next.length - 1]
|
|
1496
|
+
: undefined;
|
|
1497
|
+
swap(0, rows.$length, next);
|
|
1498
|
+
prune();
|
|
1499
|
+
if (target) {
|
|
1500
|
+
focus(target);
|
|
1501
|
+
}
|
|
1502
|
+
ui.any = opened > 0;
|
|
1503
|
+
persist();
|
|
1504
|
+
}
|
|
1505
|
+
function restore(row) {
|
|
1506
|
+
let parent = row.parent, at = parent ? rows.indexOf(parent) + 1 : 0;
|
|
1507
|
+
if (parent && (!peek(parent.open) || at === 0)) {
|
|
1508
|
+
return;
|
|
1509
|
+
}
|
|
1510
|
+
let siblings = parent ? branch(parent) : top;
|
|
1511
|
+
for (let i = row.position - 2; i >= 0; i--) {
|
|
1512
|
+
let sibling = siblings[i];
|
|
1513
|
+
if (!hidden.has(sibling.id)) {
|
|
1514
|
+
at = rows.indexOf(sibling) + 1 + (sibling.open && peek(sibling.open) ? visible(branch(sibling)).length : 0);
|
|
1515
|
+
break;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
insert(at, [row, ...(row.open && peek(row.open) ? visible(branch(row)) : [])]);
|
|
1519
|
+
}
|
|
1520
|
+
function restructure({ elements, from = null, ids, parent, type }) {
|
|
1521
|
+
let groups = [];
|
|
1522
|
+
seen = model.version;
|
|
1523
|
+
if (type === 'remove') {
|
|
1524
|
+
let edit = peek(draft), removed = new Set(ids);
|
|
1525
|
+
if (edit && ((edit.element && removed.has(edit.element.id)) || (edit.parent && removed.has(edit.parent.id)))) {
|
|
1526
|
+
close(false);
|
|
1527
|
+
}
|
|
1528
|
+
shift(ids, parent, null);
|
|
1529
|
+
purge(ids);
|
|
1530
|
+
if (removed.has(state.selected)) {
|
|
1531
|
+
primary([...selection.ids].find((id) => !removed.has(id)) ?? '');
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
else {
|
|
1535
|
+
for (let id of ids) {
|
|
1536
|
+
filtered.delete(id);
|
|
1537
|
+
}
|
|
1538
|
+
for (let i = 0, n = elements.length; i < n; i++) {
|
|
1539
|
+
recheck(elements[i], index, display.dotfiles !== false, excluded, roots, filtered);
|
|
1540
|
+
}
|
|
1541
|
+
for (let id of ids) {
|
|
1542
|
+
if (roots && type === 'add' && index.get(id)?.parent === null) {
|
|
1543
|
+
initial.add(id);
|
|
1544
|
+
}
|
|
1545
|
+
if (unseen(id) === hidden.has(id)) {
|
|
1546
|
+
continue;
|
|
1547
|
+
}
|
|
1548
|
+
obscure(id, !hidden.has(id));
|
|
1549
|
+
groups.push(...refold(id));
|
|
1550
|
+
}
|
|
1551
|
+
if (type === 'move') {
|
|
1552
|
+
shift(ids, from, parent);
|
|
1553
|
+
}
|
|
1554
|
+
if (decorations) {
|
|
1555
|
+
decorate(ids);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
update([...(type === 'move' && from !== parent ? [from, parent] : [parent]), ...groups]);
|
|
1559
|
+
search?.refresh();
|
|
1560
|
+
}
|
|
1561
|
+
function resync() {
|
|
1562
|
+
close(false);
|
|
1563
|
+
for (let [id, row] of built) {
|
|
1564
|
+
if (index.has(id)) {
|
|
1565
|
+
row.children = null;
|
|
1566
|
+
}
|
|
1567
|
+
else {
|
|
1568
|
+
purge([id]);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
filtered = filter(model.elements, display.dotfiles !== false, excluded, roots);
|
|
1572
|
+
hidden = new Set([...filtered, ...(decorations?.keys() ?? [])].filter(gone));
|
|
1573
|
+
shifts++;
|
|
1574
|
+
if (decorations) {
|
|
1575
|
+
counts.clear();
|
|
1576
|
+
diffs.clear();
|
|
1577
|
+
own.clear();
|
|
1578
|
+
totals.clear();
|
|
1579
|
+
for (let id of marks.keys()) {
|
|
1580
|
+
refresh(id);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
seen = model.version;
|
|
1584
|
+
update([null]);
|
|
1585
|
+
}
|
|
1586
|
+
function retarget(row, next) {
|
|
1587
|
+
let edit = peek(draft);
|
|
1588
|
+
if (anchor === row) {
|
|
1589
|
+
anchor = next;
|
|
1590
|
+
}
|
|
1591
|
+
if (cursor === row) {
|
|
1592
|
+
focus(next);
|
|
1593
|
+
}
|
|
1594
|
+
if (!edit) {
|
|
1595
|
+
return;
|
|
1596
|
+
}
|
|
1597
|
+
if (edit.from === row) {
|
|
1598
|
+
edit.from = next;
|
|
1599
|
+
}
|
|
1600
|
+
if (edit.parent === row) {
|
|
1601
|
+
edit.parent = next;
|
|
1602
|
+
if (!edit.element) {
|
|
1603
|
+
edit.row.parent = next;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
if (edit.row === row) {
|
|
1607
|
+
edit.element = next.element;
|
|
1608
|
+
edit.row = next;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
function retrace({ operations }) {
|
|
1612
|
+
let ids = new Set(), left = null;
|
|
1613
|
+
for (let i = 0, n = operations.length; i < n; i++) {
|
|
1614
|
+
let operation = operations[i];
|
|
1615
|
+
if (operation.type === 'remove') {
|
|
1616
|
+
left ??= operation.parent;
|
|
1617
|
+
}
|
|
1618
|
+
else {
|
|
1619
|
+
ids.add(operation.element.id);
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
if (!ids.size && left !== null) {
|
|
1623
|
+
ids.add(left);
|
|
1624
|
+
}
|
|
1625
|
+
let found = [];
|
|
1626
|
+
for (let id of ids) {
|
|
1627
|
+
let row = locate(id);
|
|
1628
|
+
if (row && !row.locked && !hidden.has(id)) {
|
|
1629
|
+
found.push({ id, place: place(row), row });
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
if (!found.length) {
|
|
1633
|
+
return;
|
|
1634
|
+
}
|
|
1635
|
+
found.sort((a, b) => order(a.place, b.place));
|
|
1636
|
+
anchor = found[0].row;
|
|
1637
|
+
selection.replace(found.map((item) => item.id));
|
|
1638
|
+
primary(found[0].id);
|
|
1639
|
+
reveal(found[0].id, true);
|
|
1640
|
+
}
|
|
1641
|
+
function retry(row) {
|
|
1642
|
+
if (row.notice?.type === 'error' && loader?.forget(row.parent.id)) {
|
|
1643
|
+
update([row.parent.id]);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
function reveal(id, scroll) {
|
|
1647
|
+
let row = locate(id);
|
|
1648
|
+
if (!row) {
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
for (let node = row.parent; node; node = node.parent) {
|
|
1652
|
+
expand(node, true);
|
|
1653
|
+
}
|
|
1654
|
+
let at = rows.indexOf(row);
|
|
1655
|
+
if (at === -1) {
|
|
1656
|
+
return;
|
|
1657
|
+
}
|
|
1658
|
+
if (scroll) {
|
|
1659
|
+
move(at, 'center');
|
|
1660
|
+
}
|
|
1661
|
+
else {
|
|
1662
|
+
focus(row);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
function scope(element, full, inherited) {
|
|
1666
|
+
for (let i = 0, n = scopes.length; i < n; i++) {
|
|
1667
|
+
let match = scopes[i].match;
|
|
1668
|
+
if (typeof match === 'function' ? match(element) : match.test(full)) {
|
|
1669
|
+
return scopes[i].color;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
return inherited;
|
|
1673
|
+
}
|
|
1674
|
+
function segment(row) {
|
|
1675
|
+
return row.segments?.find((node) => node.id === state.selected) ?? row;
|
|
1676
|
+
}
|
|
1677
|
+
function separate(row) {
|
|
1678
|
+
split = row.id;
|
|
1679
|
+
update([row.id]);
|
|
1680
|
+
return built.get(row.id);
|
|
1681
|
+
}
|
|
1682
|
+
function settle() {
|
|
1683
|
+
if (!motion) {
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
cancelAnimationFrame(motion);
|
|
1687
|
+
motion = 0;
|
|
1688
|
+
ghosts.splice(0, ghosts.$length);
|
|
1689
|
+
revealing.clear();
|
|
1690
|
+
write(sweep, 0);
|
|
1691
|
+
ui.motion = '';
|
|
1692
|
+
flush();
|
|
1693
|
+
}
|
|
1694
|
+
function shift(ids, from, to) {
|
|
1695
|
+
for (let i = 0, n = ids.length; i < n; i++) {
|
|
1696
|
+
let lines = diffs.get(ids[i]), value = lift(own.get(ids[i]) ?? -1);
|
|
1697
|
+
if (value > 0 || lines) {
|
|
1698
|
+
tally(from, value, lines, -1);
|
|
1699
|
+
tally(to, value, lines, 1);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
function siblings(parent) {
|
|
1704
|
+
return (parent ? parent.children ?? [] : model.elements).filter((element) => decorations?.get(element.id)?.status !== 'deleted');
|
|
1705
|
+
}
|
|
1706
|
+
function sift(folders) {
|
|
1707
|
+
let changed = false, next = new Set(folders), shut = [], spared = new Set();
|
|
1708
|
+
if (compact) {
|
|
1709
|
+
for (let row of built.values()) {
|
|
1710
|
+
if (row.open && !row.host && !peek(row.open)) {
|
|
1711
|
+
shut.push(row.id);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
redisplay();
|
|
1716
|
+
for (let i = 0, n = shut.length; i < n; i++) {
|
|
1717
|
+
if (built.get(shut[i])?.host && !unfolded.has(shut[i])) {
|
|
1718
|
+
unfolded.set(shut[i], true);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
if (!folders) {
|
|
1722
|
+
for (let row of [cursor, built.get(state.selected)]) {
|
|
1723
|
+
for (let node of row ? ancestors(row) : []) {
|
|
1724
|
+
spared.add(node.id);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
for (let [id, mine] of unfolded) {
|
|
1729
|
+
if (next.has(id)) {
|
|
1730
|
+
continue;
|
|
1731
|
+
}
|
|
1732
|
+
let row = built.get(id);
|
|
1733
|
+
unfolded.delete(id);
|
|
1734
|
+
if (!mine || spared.has(id) || !row?.open || !peek(row.open)) {
|
|
1735
|
+
continue;
|
|
1736
|
+
}
|
|
1737
|
+
write(row.open, false);
|
|
1738
|
+
opened -= row.host ? 0 : 1;
|
|
1739
|
+
changed = true;
|
|
1740
|
+
}
|
|
1741
|
+
for (let id of folders ?? []) {
|
|
1742
|
+
if (unfolded.has(id)) {
|
|
1743
|
+
continue;
|
|
1744
|
+
}
|
|
1745
|
+
locate(id);
|
|
1746
|
+
let row = built.get(id), open = !!row?.open && !row.host && !row.locked && !peek(row.open);
|
|
1747
|
+
unfolded.set(id, open);
|
|
1748
|
+
if (open) {
|
|
1749
|
+
write(row.open, true);
|
|
1750
|
+
opened++;
|
|
1751
|
+
changed = true;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
redisplay(changed);
|
|
1755
|
+
ui.any = opened > 0;
|
|
1756
|
+
persist();
|
|
1757
|
+
}
|
|
1758
|
+
function span(from, to) {
|
|
1759
|
+
if (!anchor || rows.indexOf(anchor) === -1) {
|
|
1760
|
+
anchor = from.locked ? to : from;
|
|
1761
|
+
}
|
|
1762
|
+
let a = rows.indexOf(anchor), b = rows.indexOf(to), ids = [];
|
|
1763
|
+
for (let i = Math.min(a, b), n = Math.max(a, b); i <= n; i++) {
|
|
1764
|
+
if (!rows[i].locked) {
|
|
1765
|
+
ids.push(rows[i].id);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
selection.replace(ids);
|
|
1769
|
+
primary(anchor.locked ? (ids[0] ?? '') : anchor.id);
|
|
1770
|
+
}
|
|
1771
|
+
function stale(row) {
|
|
1772
|
+
let now = joined(index.get(row.id)?.element ?? row.element), was = row.host ? lineage(row.host)[lineage(row).length] : undefined;
|
|
1773
|
+
return (now?.id ?? null) !== (was?.id ?? null);
|
|
1774
|
+
}
|
|
1775
|
+
function swap(at, end, next) {
|
|
1776
|
+
let head = 0, n = next.length, tail = 0;
|
|
1777
|
+
while (head < n && at + head < end && rows[at + head] === next[head]) {
|
|
1778
|
+
head++;
|
|
1779
|
+
}
|
|
1780
|
+
while (tail < n - head && tail < end - at - head && rows[end - tail - 1] === next[n - tail - 1]) {
|
|
1781
|
+
tail++;
|
|
1782
|
+
}
|
|
1783
|
+
let items = next.slice(head, n - tail), removed = end - at - head - tail;
|
|
1784
|
+
if (!items.length && !removed) {
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
rows.splice(at + head, removed, ...items.slice(0, CHUNK));
|
|
1788
|
+
insert(at + head + CHUNK, items.slice(CHUNK));
|
|
1789
|
+
}
|
|
1790
|
+
function sync(target) {
|
|
1791
|
+
let row = target === null ? null : built.get(target);
|
|
1792
|
+
if (row === undefined || (row && !row.children)) {
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
let next;
|
|
1796
|
+
if (row) {
|
|
1797
|
+
row.children = null;
|
|
1798
|
+
next = branch(row);
|
|
1799
|
+
}
|
|
1800
|
+
else {
|
|
1801
|
+
next = top = build(model.elements, 0, null);
|
|
1802
|
+
}
|
|
1803
|
+
let at = row ? rows.indexOf(row) + 1 : 0, end = row ? at : rows.$length;
|
|
1804
|
+
if (row && (at === 0 || !peek(row.open))) {
|
|
1805
|
+
return;
|
|
1806
|
+
}
|
|
1807
|
+
while (row && end < rows.$length && rows[end].depth > row.depth) {
|
|
1808
|
+
end++;
|
|
1809
|
+
}
|
|
1810
|
+
swap(at, end, visible(next));
|
|
1811
|
+
}
|
|
1812
|
+
function tally(start, value, lines, sign) {
|
|
1813
|
+
if (value <= 0 && !lines) {
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
for (let parent = start; parent !== null; parent = index.get(parent)?.parent ?? null) {
|
|
1817
|
+
if (value > 0) {
|
|
1818
|
+
let list = counts.get(parent);
|
|
1819
|
+
if (!list) {
|
|
1820
|
+
counts.set(parent, list = new Array(RANK.length).fill(0));
|
|
1821
|
+
}
|
|
1822
|
+
list[value] += sign;
|
|
1823
|
+
}
|
|
1824
|
+
if (lines) {
|
|
1825
|
+
let total = totals.get(parent);
|
|
1826
|
+
if (!total) {
|
|
1827
|
+
totals.set(parent, total = [0, 0]);
|
|
1828
|
+
}
|
|
1829
|
+
total[0] += sign * lines[0];
|
|
1830
|
+
total[1] += sign * lines[1];
|
|
1831
|
+
}
|
|
1832
|
+
refresh(parent);
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
function targets(row, distinct) {
|
|
1836
|
+
let subject = segment(row);
|
|
1837
|
+
if (!selection.has(subject.id)) {
|
|
1838
|
+
return subject.locked || (distinct && header(subject)) ? [] : [subject.element];
|
|
1839
|
+
}
|
|
1840
|
+
let out = [];
|
|
1841
|
+
for (let i = 0, n = rows.$length; i < n; i++) {
|
|
1842
|
+
for (let candidate of lineage(rows[i])) {
|
|
1843
|
+
if (!selection.has(candidate.id)) {
|
|
1844
|
+
continue;
|
|
1845
|
+
}
|
|
1846
|
+
if (distinct && (header(candidate) || ancestors(candidate).some((node) => selection.has(node.id) && !header(node)))) {
|
|
1847
|
+
continue;
|
|
1848
|
+
}
|
|
1849
|
+
out.push(candidate.element);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
return out;
|
|
1853
|
+
}
|
|
1854
|
+
function track(id) {
|
|
1855
|
+
let mark = marks.get(id);
|
|
1856
|
+
if (!mark) {
|
|
1857
|
+
marks.set(id, mark = signal(look(id)));
|
|
1858
|
+
}
|
|
1859
|
+
return mark;
|
|
1860
|
+
}
|
|
1861
|
+
function typeahead(character, from) {
|
|
1862
|
+
let now = performance.now(), next = (now - typedAt > TYPEAHEAD ? '' : typed) + character.toLowerCase(), repeat = [...next].every((c) => c === next[0]), start = repeat ? from + 1 : from;
|
|
1863
|
+
typed = repeat ? next[0] : next;
|
|
1864
|
+
typedAt = now;
|
|
1865
|
+
for (let i = 0, n = rows.$length; i < n; i++) {
|
|
1866
|
+
let index = (start + i) % n;
|
|
1867
|
+
if (caption(rows[index]).toLowerCase().startsWith(typed)) {
|
|
1868
|
+
return index;
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
return -1;
|
|
1872
|
+
}
|
|
1873
|
+
async function uncover(kind) {
|
|
1874
|
+
let asked = new Set();
|
|
1875
|
+
for (;;) {
|
|
1876
|
+
let folders = [];
|
|
1877
|
+
for (let id of decorations.keys()) {
|
|
1878
|
+
if (index.has(id) || !flagged(decorations.get(id), kind)) {
|
|
1879
|
+
continue;
|
|
1880
|
+
}
|
|
1881
|
+
let parent = enclosing(id).find((candidate) => index.has(candidate)), element = parent === undefined ? undefined : index.get(parent).element;
|
|
1882
|
+
if (!element || element.children || asked.has(element.id) || hidden.has(element.id) || !folder(element)) {
|
|
1883
|
+
continue;
|
|
1884
|
+
}
|
|
1885
|
+
asked.add(element.id);
|
|
1886
|
+
folders.push(element);
|
|
1887
|
+
}
|
|
1888
|
+
if (!folders.length) {
|
|
1889
|
+
return;
|
|
1890
|
+
}
|
|
1891
|
+
for (let i = 0, n = folders.length; i < n; i++) {
|
|
1892
|
+
await loader.wait(folders[i]);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
function unpin(row) {
|
|
1897
|
+
move(rows.indexOf(row), 'start');
|
|
1898
|
+
requestAnimationFrame(() => activate(row, PREVIEW));
|
|
1899
|
+
}
|
|
1900
|
+
function unseen(id) {
|
|
1901
|
+
return gone(id) || !!search?.hides(id);
|
|
1902
|
+
}
|
|
1903
|
+
function update(folders) {
|
|
1904
|
+
settle();
|
|
1905
|
+
let at = cursor ? rows.indexOf(cursor) : 0;
|
|
1906
|
+
for (let i = 0, n = folders.length; i < n; i++) {
|
|
1907
|
+
sync(regroup(folders[i]));
|
|
1908
|
+
}
|
|
1909
|
+
prune();
|
|
1910
|
+
clipboard.retain((id) => model.get(id));
|
|
1911
|
+
recover(at);
|
|
1912
|
+
ui.any = opened > 0;
|
|
1913
|
+
persist();
|
|
1914
|
+
}
|
|
1915
|
+
function visible(list, out = []) {
|
|
1916
|
+
let edit = peek(draft);
|
|
1917
|
+
if (edit && !edit.element && list === (edit.parent ? edit.parent.children : top)) {
|
|
1918
|
+
out.push(edit.row);
|
|
1919
|
+
}
|
|
1920
|
+
if (roots && !list.length && list !== top) {
|
|
1921
|
+
let root = top.find((row) => row.children === list);
|
|
1922
|
+
if (root) {
|
|
1923
|
+
out.push(blank(root));
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
for (let i = 0, n = list.length; i < n; i++) {
|
|
1927
|
+
let row = list[i];
|
|
1928
|
+
if (hidden.has(row.id)) {
|
|
1929
|
+
continue;
|
|
1930
|
+
}
|
|
1931
|
+
out.push(row);
|
|
1932
|
+
if (row.open && peek(row.open)) {
|
|
1933
|
+
visible(branch(row), out);
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
return out;
|
|
1937
|
+
}
|
|
1938
|
+
return (() => {
|
|
1939
|
+
let root_187wopb1a = template_187wopb1b(), element_187wopb1c = root_187wopb1a.firstChild, element_187wopb1d = element_187wopb1c.firstElementChild, element_187wopb1e = element_187wopb1d.firstChild, element_187wopb1f = element_187wopb1e.nextSibling, element_187wopb1g = element_187wopb1d.nextElementSibling, element_187wopb1h = element_187wopb1g.firstElementChild, element_187wopb1i = element_187wopb1c.firstChild.nextSibling.nextSibling, element_187wopb1j = element_187wopb1i.nextSibling, element_187wopb1k = element_187wopb1j.nextSibling, element_187wopb1l = element_187wopb1k.nextSibling;
|
|
1940
|
+
template_u1.slot(element_187wopb1e, highlight({ class: 'file-tree-highlight', target: '.file-tree-row' }));
|
|
1941
|
+
template_u1.slot(element_187wopb1f, pins.render());
|
|
1942
|
+
template_u1.slot(element_187wopb1d, slot.fragment, 2);
|
|
1943
|
+
element_187wopb1h.appendChild(new template_u1.ArraySlot(ghosts, ghost, true).fragment);
|
|
1944
|
+
new template_u1.EffectSlot(element_187wopb1i, () => empty && !rows.$length && !search?.filtering() && (() => {
|
|
1945
|
+
let root_187wopb1m = template_187wopb1n(), element_187wopb1o = root_187wopb1m.firstChild;
|
|
1946
|
+
template_u1.slot(element_187wopb1o, empty(), 1);
|
|
1947
|
+
return root_187wopb1m;
|
|
1948
|
+
})());
|
|
1949
|
+
template_u1.slot(element_187wopb1j, search?.render(id));
|
|
1950
|
+
template_u1.slot(element_187wopb1k, hint && tip.render({ 'aria-hidden': 'true', class: 'file-tree-tooltip' }));
|
|
1951
|
+
template_u1.slot(element_187wopb1l, toggle && (() => {
|
|
1952
|
+
let root_187wopb1p = template_187wopb1q(), element_187wopb1r = root_187wopb1p.firstChild;
|
|
1953
|
+
new template_u1.EffectSlot(element_187wopb1r, () => ui.any ? 'Collapse all' : 'Expand all', 1);
|
|
1954
|
+
template_u1.delegate(element_187wopb1r, 'click', () => all(!ui.any));
|
|
1955
|
+
return root_187wopb1p;
|
|
1956
|
+
})());
|
|
1957
|
+
template_u1.slot(element_187wopb1c, dragging?.ghost, 2);
|
|
1958
|
+
template_u1.setList(element_187wopb1h, 'style', () => `top: ${stage.edge}px;`);
|
|
1959
|
+
template_u1.setList(element_187wopb1h, 'class', () => ui.motion && `file-tree-motion-layer--${ui.motion}`);
|
|
1960
|
+
template_u1.setList(element_187wopb1g, 'style', () => `height: ${stage.height}px; left: ${stage.left}px; top: ${stage.top}px; width: ${stage.width}px;`);
|
|
1961
|
+
template_u1.setList(element_187wopb1g, 'class', () => ui.motion && '--active');
|
|
1962
|
+
template_u1.setProperty(element_187wopb1d, 'aria-label', label);
|
|
1963
|
+
template_u1.setProperty(element_187wopb1d, 'id', id);
|
|
1964
|
+
template_u1.setProperties(element_187wopb1d, dragging?.viewport);
|
|
1965
|
+
template_u1.setProperty(element_187wopb1d, 'aria-activedescendant', () => read(focused) > 0 && `${id}-${read(focused)}`);
|
|
1966
|
+
template_u1.onconnect(element_187wopb1d, (element) => {
|
|
1967
|
+
viewport = element;
|
|
1968
|
+
});
|
|
1969
|
+
template_u1.delegate(element_187wopb1d, 'contextmenu', (event) => {
|
|
1970
|
+
if (!menu || !viewport) {
|
|
1971
|
+
return;
|
|
1972
|
+
}
|
|
1973
|
+
event.preventDefault();
|
|
1974
|
+
let item = event.target.closest('.file-tree-row'), keyboard = !item && event.button !== 2, row = keyboard ? cursor : owner(item);
|
|
1975
|
+
if (!row) {
|
|
1976
|
+
menu([], { x: event.clientX, y: event.clientY }, false);
|
|
1977
|
+
return;
|
|
1978
|
+
}
|
|
1979
|
+
let subject = keyboard ? segment(row) : pick(row, event);
|
|
1980
|
+
if (!subject.locked && !selection.has(subject.id)) {
|
|
1981
|
+
anchor = row;
|
|
1982
|
+
selection.replace([subject.id]);
|
|
1983
|
+
primary(subject.id);
|
|
1984
|
+
}
|
|
1985
|
+
focus(row);
|
|
1986
|
+
let box = keyboard ? (node(row) ?? viewport).getBoundingClientRect() : null;
|
|
1987
|
+
menu(targets(row, false), box ? { x: box.left, y: box.bottom } : { x: event.clientX, y: event.clientY }, header(row));
|
|
1988
|
+
});
|
|
1989
|
+
template_u1.delegate(element_187wopb1d, 'keydown', (event) => {
|
|
1990
|
+
if (search?.key(event)) {
|
|
1991
|
+
event.preventDefault();
|
|
1992
|
+
return;
|
|
1993
|
+
}
|
|
1994
|
+
let index = cursor ? rows.indexOf(cursor) : -1, row = rows[index];
|
|
1995
|
+
if (!row || !viewport) {
|
|
1996
|
+
return;
|
|
1997
|
+
}
|
|
1998
|
+
let name = command(event);
|
|
1999
|
+
if (name && perform(name, row)) {
|
|
2000
|
+
event.preventDefault();
|
|
2001
|
+
return;
|
|
2002
|
+
}
|
|
2003
|
+
let align = 'end', target = -1;
|
|
2004
|
+
switch (event.key) {
|
|
2005
|
+
case '*': {
|
|
2006
|
+
let siblings = row.parent ? branch(row.parent) : top;
|
|
2007
|
+
for (let i = 0, n = siblings.length; i < n; i++) {
|
|
2008
|
+
if (!siblings[i].locked) {
|
|
2009
|
+
expand(siblings[i], true);
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
break;
|
|
2013
|
+
}
|
|
2014
|
+
case 'ArrowDown':
|
|
2015
|
+
target = index + 1;
|
|
2016
|
+
break;
|
|
2017
|
+
case 'ArrowUp':
|
|
2018
|
+
align = 'start';
|
|
2019
|
+
target = index - 1;
|
|
2020
|
+
break;
|
|
2021
|
+
case 'End':
|
|
2022
|
+
target = rows.$length - 1;
|
|
2023
|
+
break;
|
|
2024
|
+
case 'Enter':
|
|
2025
|
+
case ' ':
|
|
2026
|
+
activate(row, event.key === ' ' ? PREVIEW : { mode: 'pinned', side: event.ctrlKey || event.metaKey });
|
|
2027
|
+
break;
|
|
2028
|
+
case 'F5':
|
|
2029
|
+
if (!event.altKey || event.ctrlKey || event.metaKey) {
|
|
2030
|
+
return;
|
|
2031
|
+
}
|
|
2032
|
+
void jump('change', event.shiftKey ? -1 : 1);
|
|
2033
|
+
break;
|
|
2034
|
+
case 'F8':
|
|
2035
|
+
if (event.altKey || event.ctrlKey || event.metaKey) {
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
void jump('problem', event.shiftKey ? -1 : 1);
|
|
2039
|
+
break;
|
|
2040
|
+
case 'F2':
|
|
2041
|
+
begin('rename');
|
|
2042
|
+
break;
|
|
2043
|
+
case 'Home':
|
|
2044
|
+
align = 'start';
|
|
2045
|
+
target = 0;
|
|
2046
|
+
break;
|
|
2047
|
+
case 'PageDown':
|
|
2048
|
+
target = Math.min(rows.$length - 1, index + page());
|
|
2049
|
+
break;
|
|
2050
|
+
case 'PageUp':
|
|
2051
|
+
align = 'start';
|
|
2052
|
+
target = Math.max(0, index - page());
|
|
2053
|
+
break;
|
|
2054
|
+
case 'ArrowLeft':
|
|
2055
|
+
case 'ArrowRight': {
|
|
2056
|
+
let inward = (event.key === 'ArrowRight') !== (getComputedStyle(viewport).direction === 'rtl'), open = row.open && peek(row.open);
|
|
2057
|
+
if (event.altKey && row.open && (inward || open)) {
|
|
2058
|
+
all(inward, row);
|
|
2059
|
+
}
|
|
2060
|
+
else if (inward && row.open && !row.locked) {
|
|
2061
|
+
if (!open) {
|
|
2062
|
+
fold(row, true);
|
|
2063
|
+
}
|
|
2064
|
+
else if (row.element.children?.length) {
|
|
2065
|
+
target = index + 1;
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
else if (!inward && open) {
|
|
2069
|
+
fold(row, false);
|
|
2070
|
+
}
|
|
2071
|
+
else if (!inward && row.parent) {
|
|
2072
|
+
align = 'start';
|
|
2073
|
+
target = rows.indexOf(row.parent);
|
|
2074
|
+
}
|
|
2075
|
+
break;
|
|
2076
|
+
}
|
|
2077
|
+
default:
|
|
2078
|
+
if (shortcuts && event.altKey && event.code === 'KeyN' && !event.ctrlKey && !event.metaKey) {
|
|
2079
|
+
begin(event.shiftKey ? 'folder' : 'file');
|
|
2080
|
+
break;
|
|
2081
|
+
}
|
|
2082
|
+
if (event.key.length !== 1 || event.altKey || event.ctrlKey || event.metaKey) {
|
|
2083
|
+
return;
|
|
2084
|
+
}
|
|
2085
|
+
if (search && typing === 'find') {
|
|
2086
|
+
search.type(event.key);
|
|
2087
|
+
}
|
|
2088
|
+
else {
|
|
2089
|
+
target = typeahead(event.key, index);
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
event.preventDefault();
|
|
2093
|
+
if (target !== -1) {
|
|
2094
|
+
if (rows[target] && extending(event)) {
|
|
2095
|
+
span(row, rows[target]);
|
|
2096
|
+
}
|
|
2097
|
+
move(target, align);
|
|
2098
|
+
if (cursor && cursor !== row) {
|
|
2099
|
+
follow(cursor);
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2103
|
+
template_u1.delegate(element_187wopb1d, 'mousedown', middle);
|
|
2104
|
+
template_u1.on(element_187wopb1d, 'scroll', () => {
|
|
2105
|
+
settle();
|
|
2106
|
+
pins.update();
|
|
2107
|
+
if (snapshot) {
|
|
2108
|
+
snapshot.scroll = viewport.scrollTop;
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
template_u1.setProperties(element_187wopb1d, hint && {
|
|
2112
|
+
onpointerleave: (event) => {
|
|
2113
|
+
if (event.pointerType !== 'touch') {
|
|
2114
|
+
tip.release();
|
|
2115
|
+
}
|
|
2116
|
+
},
|
|
2117
|
+
onpointerover: (event) => {
|
|
2118
|
+
let scroller = event.currentTarget, target = event.target.closest('.file-tree-row'), row = owner(target);
|
|
2119
|
+
if (!target || !row) {
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
if (!informative(row, target)) {
|
|
2123
|
+
tip.release();
|
|
2124
|
+
return;
|
|
2125
|
+
}
|
|
2126
|
+
tip.request(target, about(row), () => {
|
|
2127
|
+
let box = scroller.getBoundingClientRect(), rect = target.getBoundingClientRect();
|
|
2128
|
+
return new DOMRect(box.left, rect.top, box.width, rect.height);
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
});
|
|
2132
|
+
template_u1.setList(element_187wopb1c, 'class', indicator !== 'never' && 'file-tree--indicator');
|
|
2133
|
+
template_u1.setList(element_187wopb1c, 'class', indicator === 'hover' && 'file-tree--indicator-hover');
|
|
2134
|
+
template_u1.setProperties(element_187wopb1c, attributes);
|
|
2135
|
+
template_u1.setProperties(element_187wopb1c, dragging?.root);
|
|
2136
|
+
template_u1.setList(element_187wopb1c, 'class', () => ui.motion && `file-tree--motion file-tree--motion-${ui.motion}`);
|
|
2137
|
+
template_u1.delegate(element_187wopb1c, 'animationend', (event) => {
|
|
2138
|
+
if (event.target === root) {
|
|
2139
|
+
settle();
|
|
2140
|
+
}
|
|
2141
|
+
});
|
|
2142
|
+
template_u1.onconnect(element_187wopb1c, (element) => {
|
|
2143
|
+
root = element;
|
|
2144
|
+
forget = history?.subscribe(retrace);
|
|
2145
|
+
unwatch = model.subscribe(restructure);
|
|
2146
|
+
if (seen !== model.version) {
|
|
2147
|
+
resync();
|
|
2148
|
+
}
|
|
2149
|
+
effect(() => state.selected, (value) => {
|
|
2150
|
+
write(current, value);
|
|
2151
|
+
if (value === known) {
|
|
2152
|
+
return;
|
|
2153
|
+
}
|
|
2154
|
+
known = value;
|
|
2155
|
+
if (!selection.has(value)) {
|
|
2156
|
+
anchor = built.get(value) ?? null;
|
|
2157
|
+
selection.replace(value ? [value] : []);
|
|
2158
|
+
}
|
|
2159
|
+
if (value !== quiet && autoreveal !== 'off') {
|
|
2160
|
+
reveal(value, autoreveal === 'on');
|
|
2161
|
+
}
|
|
2162
|
+
quiet = null;
|
|
2163
|
+
});
|
|
2164
|
+
effect(() => state.selection, (value) => {
|
|
2165
|
+
if (!value || value === selection.ids) {
|
|
2166
|
+
return;
|
|
2167
|
+
}
|
|
2168
|
+
selection.replace(value);
|
|
2169
|
+
if (!value.has(state.selected)) {
|
|
2170
|
+
primary(value.values().next().value ?? '');
|
|
2171
|
+
}
|
|
2172
|
+
});
|
|
2173
|
+
effect(modes, (value) => {
|
|
2174
|
+
if (value !== settings) {
|
|
2175
|
+
settings = value;
|
|
2176
|
+
filtered = filter(model.elements, display.dotfiles !== false, excluded, roots);
|
|
2177
|
+
redisplay();
|
|
2178
|
+
search?.refresh();
|
|
2179
|
+
}
|
|
2180
|
+
});
|
|
2181
|
+
if (typeof phrase === 'function') {
|
|
2182
|
+
effect(phrase, (value) => {
|
|
2183
|
+
write(given, value);
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
search?.refresh();
|
|
2187
|
+
if (snapshot?.scroll) {
|
|
2188
|
+
let offset = snapshot.scroll;
|
|
2189
|
+
requestAnimationFrame(() => {
|
|
2190
|
+
viewport.scrollTop = offset;
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
detach = editor?.subscribe((request) => {
|
|
2194
|
+
if (request.action === 'cancel') {
|
|
2195
|
+
close(!!viewport?.contains(document.activeElement));
|
|
2196
|
+
}
|
|
2197
|
+
else {
|
|
2198
|
+
begin(request.action, request.target);
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2201
|
+
if (!decorations) {
|
|
2202
|
+
return;
|
|
2203
|
+
}
|
|
2204
|
+
unsubscribe = decorations.subscribe((ids) => {
|
|
2205
|
+
decorate(ids);
|
|
2206
|
+
search?.refresh();
|
|
2207
|
+
});
|
|
2208
|
+
decorate(new Set([...own.keys(), ...decorations.keys()]));
|
|
2209
|
+
});
|
|
2210
|
+
template_u1.ondisconnect(element_187wopb1c, () => {
|
|
2211
|
+
clearTimeout(timer);
|
|
2212
|
+
search?.dispose();
|
|
2213
|
+
detach?.();
|
|
2214
|
+
detach = undefined;
|
|
2215
|
+
forget?.();
|
|
2216
|
+
forget = undefined;
|
|
2217
|
+
unsubscribe?.();
|
|
2218
|
+
unsubscribe = undefined;
|
|
2219
|
+
unwatch?.();
|
|
2220
|
+
unwatch = undefined;
|
|
2221
|
+
});
|
|
2222
|
+
template_u1.setList(element_187wopb1c, 'style', () => ui.motion && `--motion-rows: ${ui.motionRows}`);
|
|
2223
|
+
return root_187wopb1a;
|
|
2224
|
+
})();
|
|
2225
|
+
};
|
|
2226
|
+
export { Decorations as FileTreeDecorations, Editor as FileTreeEditor, Elements as FileTreeElements, History as FileTreeHistory };
|
|
2227
|
+
export { createFileTreeIconResolver, glyph as fileTreeIcon, resolveFileTreeIcon };
|