@esportsplus/ui 0.57.0 → 0.58.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/README.md +123 -39
- package/build/components/accordion/group.d.ts +14 -0
- package/build/components/accordion/group.js +21 -0
- package/build/components/accordion/index.d.ts +9 -0
- package/build/components/accordion/index.js +20 -3
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.d.ts +3 -0
- package/build/components/button/sidebar.js +40 -10
- package/build/components/capslock/index.js +1 -1
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/scss/index.scss +1 -1
- package/build/components/chat-minimap/scss/index.scss +1 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/index.d.ts +1 -0
- package/build/components/color-picker/index.js +166 -136
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +0 -1
- package/build/components/command/index.js +3 -2
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/copy/scss/index.scss +1 -1
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/index.js +3 -3
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/code/index.d.ts +0 -1
- package/build/components/editor/code/index.js +0 -1
- package/build/components/editor/code/minimap.d.ts +2 -1
- package/build/components/editor/code/minimap.js +5 -2
- package/build/components/editor/code/view.d.ts +3 -1
- package/build/components/editor/code/view.js +37 -26
- package/build/components/editor/diffs/index.d.ts +0 -1
- package/build/components/editor/diffs/index.js +0 -1
- package/build/components/editor/diffs/merge.js +7 -3
- package/build/components/editor/diffs/view.js +3 -1
- package/build/components/editor/index.d.ts +4 -1
- package/build/components/editor/index.js +2 -1
- package/build/components/editor/markdown/editing.js +22 -3
- package/build/components/editor/markdown/erase.d.ts +9 -0
- package/build/components/editor/markdown/erase.js +78 -0
- package/build/components/editor/markdown/index.d.ts +0 -1
- package/build/components/editor/markdown/index.js +0 -1
- package/build/components/editor/markdown/layout.d.ts +2 -9
- package/build/components/editor/markdown/layout.js +2 -7
- package/build/components/editor/markdown/render.d.ts +0 -1
- package/build/components/editor/markdown/render.js +287 -235
- package/build/components/editor/markdown/view.js +566 -667
- package/build/components/editor/viewer/index.d.ts +27 -0
- package/build/components/editor/viewer/index.js +250 -0
- package/build/components/editor/viewer/model.d.ts +15 -0
- package/build/components/editor/viewer/model.js +73 -0
- package/build/components/editor/workspace/index.d.ts +6 -2
- package/build/components/editor/workspace/index.js +243 -137
- package/build/components/editor/workspace/keybindings.d.ts +37 -0
- package/build/components/editor/workspace/keybindings.js +288 -0
- package/build/components/editor/workspace/model.d.ts +55 -2
- package/build/components/editor/workspace/model.js +141 -3
- package/build/components/editor/workspace/navigate.d.ts +19 -0
- package/build/components/editor/workspace/navigate.js +118 -0
- package/build/components/editor/workspace/session.d.ts +29 -0
- package/build/components/editor/workspace/session.js +373 -0
- package/build/components/editor/workspace/shortcuts.d.ts +19 -0
- package/build/components/editor/workspace/shortcuts.js +185 -0
- package/build/components/editor/workspace/status.d.ts +34 -0
- package/build/components/editor/workspace/status.js +193 -0
- package/build/components/editor/workspace/statusbar.d.ts +15 -0
- package/build/components/editor/workspace/statusbar.js +190 -0
- package/build/components/editor/workspace/strip.d.ts +27 -0
- package/build/components/editor/workspace/strip.js +239 -0
- package/build/components/editor/workspace/tabs.d.ts +15 -0
- package/build/components/editor/workspace/tabs.js +63 -0
- package/build/components/error/index.js +1 -1
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +5 -3
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/heatmap/index.js +3 -3
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +2 -0
- package/build/components/index.js +2 -0
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/metric/scss/index.scss +1 -1
- package/build/components/nav/index.d.ts +1 -1
- package/build/components/nav/scss/index.scss +1 -1
- package/build/components/nav/tree.d.ts +3 -1
- package/build/components/nav/tree.js +30 -60
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/pagination/arrows.d.ts +15 -0
- package/build/components/pagination/arrows.js +65 -0
- package/build/components/pagination/cards.d.ts +23 -0
- package/build/components/pagination/cards.js +66 -0
- package/build/components/pagination/index.d.ts +5 -0
- package/build/components/pagination/index.js +3 -1
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/pull-to-refresh/scss/index.scss +1 -1
- package/build/components/range/index.js +1 -1
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/section/scss/index.scss +2 -0
- package/build/components/select/index.d.ts +1 -0
- package/build/components/select/index.js +16 -11
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/sticky-header/index.js +3 -3
- package/build/components/sticky-header/scss/index.scss +1 -1
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/text/scss/index.scss +1 -1
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/{css-utilities → components}/theme/index.d.ts +1 -1
- package/build/{css-utilities → components}/theme/index.js +15 -5
- package/build/components/theme/scss/index.scss +2 -0
- package/build/components/theme-picker/index.d.ts +52 -0
- package/build/components/theme-picker/index.js +167 -0
- package/build/components/theme-picker/scss/index.scss +2 -0
- package/build/components/toast/index.js +3 -5
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.js +3 -1
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/{css-utilities → modifiers}/glass/index.d.ts +2 -2
- package/build/modifiers/glass/index.js +28 -0
- package/build/modifiers/glass/scss/index.scss +2 -0
- package/build/{css-utilities → modifiers}/index.d.ts +0 -1
- package/build/{css-utilities → modifiers}/index.js +0 -1
- package/build/modifiers/scrollbar/index.d.ts +72 -0
- package/build/{css-utilities → modifiers}/scrollbar/index.js +52 -19
- package/build/modifiers/scrollbar/scss/index.scss +2 -0
- package/build/normalize/scss/index.scss +1 -2
- package/layer.scss +1 -1
- package/package.json +11 -18
- package/scripts/code-editor-markdown.test.mjs +45 -14
- package/scripts/code-viewer.test.mjs +69 -0
- package/scripts/workspace-keybindings.test.mjs +273 -0
- package/scripts/workspace-session.test.mjs +349 -0
- package/scripts/workspace-status.test.mjs +229 -0
- package/scripts/workspace-tabs.test.mjs +142 -0
- package/src/components/accordion/group.ts +39 -0
- package/src/components/accordion/index.ts +32 -6
- package/src/components/accordion/scss/index.scss +12 -21
- package/src/components/accordion/scss/variables.scss +18 -3
- package/src/components/announcement/scss/index.scss +4 -4
- package/src/components/announcement/scss/variables.scss +6 -6
- package/src/components/banner/scss/index.scss +1 -1
- package/src/components/breadcrumb/scss/index.scss +35 -50
- package/src/components/breadcrumb/scss/variables.scss +23 -31
- package/src/components/button/scss/_fan.scss +39 -43
- package/src/components/button/scss/_morph.scss +66 -78
- package/src/components/button/scss/_sidebar.scss +41 -30
- package/src/components/button/scss/_split.scss +9 -9
- package/src/components/button/scss/index.scss +23 -19
- package/src/components/button/scss/variables.scss +94 -90
- package/src/components/button/sidebar.ts +36 -24
- package/src/components/capslock/index.ts +2 -2
- package/src/components/capslock/scss/index.scss +11 -6
- package/src/components/capslock/scss/variables.scss +3 -5
- package/src/components/card/scss/_expand.scss +58 -64
- package/src/components/card/scss/index.scss +40 -21
- package/src/components/card/scss/variables.scss +40 -31
- package/src/components/cc/scss/index.scss +68 -68
- package/src/components/cc/scss/variables.scss +13 -14
- package/src/components/chat-minimap/scss/index.scss +24 -16
- package/src/components/chat-minimap/scss/variables.scss +37 -37
- package/src/components/checkbox/scss/index.scss +54 -52
- package/src/components/checkbox/scss/variables.scss +37 -39
- package/src/components/color-picker/index.ts +157 -120
- package/src/components/color-picker/scss/index.scss +159 -96
- package/src/components/color-picker/scss/variables.scss +33 -15
- package/src/components/command/index.ts +3 -2
- package/src/components/command/scss/index.scss +10 -14
- package/src/components/command/scss/variables.scss +12 -35
- package/src/components/copy/scss/index.scss +6 -6
- package/src/components/copy/scss/variables.scss +12 -15
- package/src/components/counter/scss/index.scss +14 -14
- package/src/components/counter/scss/variables.scss +1 -1
- package/src/components/datalist/index.ts +3 -3
- package/src/components/datalist/scss/index.scss +7 -6
- package/src/components/datalist/scss/variables.scss +7 -3
- package/src/components/dock/scss/index.scss +10 -15
- package/src/components/dock/scss/variables.scss +29 -25
- package/src/components/editor/code/index.ts +0 -1
- package/src/components/editor/code/minimap.ts +13 -5
- package/src/components/editor/code/scss/_editor.scss +83 -81
- package/src/components/editor/code/scss/_features.scss +106 -97
- package/src/components/editor/code/scss/_services.scss +27 -25
- package/src/components/editor/code/scss/index.scss +0 -1
- package/src/components/editor/code/scss/variables.scss +30 -26
- package/src/components/editor/code/view.ts +14 -5
- package/src/components/editor/diffs/index.ts +0 -1
- package/src/components/editor/diffs/merge.ts +2 -1
- package/src/components/editor/diffs/scss/_diffs.scss +67 -57
- package/src/components/editor/diffs/scss/_merge.scss +17 -14
- package/src/components/editor/diffs/scss/index.scss +0 -1
- package/src/components/editor/diffs/scss/variables.scss +25 -18
- package/src/components/editor/diffs/view.ts +2 -1
- package/src/components/editor/index.ts +7 -1
- package/src/components/editor/markdown/editing.ts +38 -3
- package/src/components/editor/markdown/erase.ts +124 -0
- package/src/components/editor/markdown/index.ts +0 -1
- package/src/components/editor/markdown/layout.ts +3 -12
- package/src/components/editor/markdown/render.ts +65 -37
- package/src/components/editor/markdown/scss/index.scss +92 -124
- package/src/components/editor/markdown/scss/variables.scss +39 -19
- package/src/components/editor/markdown/view.ts +737 -786
- package/src/components/editor/tree/scss/index.scss +121 -110
- package/src/components/editor/tree/scss/variables.scss +48 -54
- package/src/components/editor/viewer/index.ts +321 -0
- package/src/components/editor/viewer/model.ts +130 -0
- package/src/components/editor/viewer/scss/_viewer.scss +302 -0
- package/src/components/editor/viewer/scss/index.scss +2 -0
- package/src/components/editor/viewer/scss/variables.scss +69 -0
- package/src/components/editor/workspace/index.ts +159 -31
- package/src/components/editor/workspace/keybindings.ts +447 -0
- package/src/components/editor/workspace/model.ts +233 -3
- package/src/components/editor/workspace/navigate.ts +194 -0
- package/src/components/editor/workspace/scss/index.scss +72 -59
- package/src/components/editor/workspace/scss/keybindings.scss +190 -0
- package/src/components/editor/workspace/scss/status.scss +122 -0
- package/src/components/editor/workspace/scss/tabs.scss +56 -0
- package/src/components/editor/workspace/session.ts +551 -0
- package/src/components/editor/workspace/shortcuts.ts +255 -0
- package/src/components/editor/workspace/status.ts +259 -0
- package/src/components/editor/workspace/statusbar.ts +255 -0
- package/src/components/editor/workspace/strip.ts +273 -0
- package/src/components/editor/workspace/tabs.ts +106 -0
- package/src/components/error/index.ts +1 -1
- package/src/components/error/scss/index.scss +19 -19
- package/src/components/error/scss/variables.scss +2 -2
- package/src/components/filter/index.ts +7 -2
- package/src/components/filter/scss/index.scss +1 -1
- package/src/components/filter/scss/variables.scss +11 -10
- package/src/components/frame/scss/index.scss +12 -12
- package/src/components/frame/scss/variables.scss +8 -8
- package/src/components/heatmap/index.ts +3 -3
- package/src/components/heatmap/scss/index.scss +28 -26
- package/src/components/heatmap/scss/variables.scss +18 -17
- package/src/components/highlight/scss/index.scss +17 -13
- package/src/components/highlight/scss/variables.scss +8 -10
- package/src/components/icon/scss/index.scss +10 -0
- package/src/components/icon/scss/variables.scss +5 -0
- package/src/components/image/scss/index.scss +9 -9
- package/src/components/image/scss/variables.scss +7 -2
- package/src/components/index.ts +2 -0
- package/src/components/inline-edit/scss/index.scss +99 -104
- package/src/components/inline-edit/scss/variables.scss +40 -39
- package/src/components/input/scss/_field.scss +6 -20
- package/src/components/input/scss/_scrub.scss +10 -8
- package/src/components/input/scss/_tag.scss +35 -37
- package/src/components/input/scss/variables.scss +100 -99
- package/src/components/link/scss/index.scss +4 -1
- package/src/components/loading/scss/index.scss +1 -1
- package/src/components/loading/scss/variables.scss +1 -1
- package/src/components/marquee/scss/index.scss +9 -5
- package/src/components/marquee/scss/variables.scss +3 -1
- package/src/components/metric/scss/_flash.scss +3 -1
- package/src/components/metric/scss/index.scss +8 -6
- package/src/components/metric/scss/variables.scss +26 -20
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +12 -40
- package/src/components/nav/scss/variables.scss +30 -11
- package/src/components/nav/tree.ts +19 -62
- package/src/components/notification/scss/index.scss +7 -7
- package/src/components/notification/scss/variables.scss +7 -9
- package/src/components/overlay/scss/index.scss +181 -170
- package/src/components/overlay/scss/variables.scss +26 -57
- package/src/components/page/scss/index.scss +12 -11
- package/src/components/page/scss/variables.scss +5 -0
- package/src/components/pagination/arrows.ts +58 -0
- package/src/components/pagination/cards.ts +57 -0
- package/src/components/pagination/index.ts +4 -1
- package/src/components/pagination/scss/_arrows.scss +69 -0
- package/src/components/pagination/scss/_cards.scss +121 -0
- package/src/components/pagination/scss/_dots.scss +2 -5
- package/src/components/pagination/scss/index.scss +8 -6
- package/src/components/pagination/scss/variables.scss +87 -37
- package/src/components/progress/scss/_text.scss +21 -18
- package/src/components/progress/scss/index.scss +1 -1
- package/src/components/progress/scss/variables.scss +12 -12
- package/src/components/pull-to-refresh/scss/index.scss +2 -1
- package/src/components/pull-to-refresh/scss/variables.scss +11 -6
- package/src/components/range/index.ts +1 -1
- package/src/components/range/scss/_filter.scss +62 -51
- package/src/components/range/scss/_slider.scss +78 -75
- package/src/components/range/scss/_vertical.scss +6 -6
- package/src/components/range/scss/index.scss +3 -2
- package/src/components/range/scss/variables.scss +26 -23
- package/src/components/relative-time/scss/index.scss +27 -27
- package/src/components/relative-time/scss/variables.scss +10 -12
- package/src/components/root/scss/index.scss +71 -43
- package/src/components/root/scss/variables.scss +35 -31
- package/src/components/section/scss/index.scss +31 -0
- package/src/components/section/scss/variables.scss +21 -0
- package/src/components/select/index.ts +11 -6
- package/src/components/select/scss/index.scss +21 -32
- package/src/components/select/scss/variables.scss +25 -18
- package/src/components/shortcut-recorder/scss/index.scss +13 -12
- package/src/components/shortcut-recorder/scss/variables.scss +12 -13
- package/src/components/sortable/scss/index.scss +47 -44
- package/src/components/sortable/scss/variables.scss +4 -5
- package/src/components/sticky-header/index.ts +4 -4
- package/src/components/sticky-header/scss/index.scss +14 -13
- package/src/components/sticky-header/scss/variables.scss +9 -9
- package/src/components/story/scss/index.scss +26 -30
- package/src/components/story/scss/variables.scss +16 -9
- package/src/components/surface-field/scss/index.scss +45 -40
- package/src/components/surface-field/scss/variables.scss +5 -6
- package/src/components/tasklist/scss/index.scss +19 -19
- package/src/components/tasklist/scss/variables.scss +26 -29
- package/src/components/text/scss/index.scss +2 -1
- package/src/components/textarea/scss/variables.scss +1 -1
- package/src/{css-utilities → components}/theme/index.ts +17 -3
- package/src/components/theme/scss/index.scss +1 -0
- package/src/components/theme/scss/variables.scss +78 -0
- package/src/components/theme-picker/index.ts +231 -0
- package/src/components/theme-picker/scss/index.scss +264 -0
- package/src/components/toast/index.ts +28 -30
- package/src/components/toast/scss/index.scss +87 -87
- package/src/components/toast/scss/variables.scss +39 -39
- package/src/components/tooltip/menu.ts +4 -1
- package/src/components/tooltip/scss/_east.scss +10 -10
- package/src/components/tooltip/scss/_menu.scss +284 -269
- package/src/components/tooltip/scss/_north.scss +10 -10
- package/src/components/tooltip/scss/_shared.scss +7 -7
- package/src/components/tooltip/scss/_south.scss +10 -10
- package/src/components/tooltip/scss/_west.scss +10 -10
- package/src/components/tooltip/scss/index.scss +21 -20
- package/src/components/tooltip/scss/variables.scss +104 -96
- package/src/components/typewriter/scss/_retype.scss +12 -11
- package/src/components/typewriter/scss/_rotate.scss +2 -1
- package/src/components/typewriter/scss/variables.scss +41 -39
- package/src/components/uptime/scss/index.scss +15 -15
- package/src/components/uptime/scss/variables.scss +8 -8
- package/src/components/usage-meter/scss/index.scss +3 -1
- package/src/components/usage-meter/scss/variables.scss +5 -5
- package/src/css-utilities/absolute.scss +64 -0
- package/src/css-utilities/background.scss +43 -0
- package/src/css-utilities/border.scss +45 -0
- package/src/css-utilities/box-shadow.scss +29 -0
- package/src/css-utilities/color.scss +41 -0
- package/src/css-utilities/flex.scss +64 -0
- package/src/css-utilities/font/geist/{scss/index.scss → index.scss} +12 -4
- package/src/css-utilities/font/montserrat/Montserrat-Italic-Variable.woff2 +0 -0
- package/src/css-utilities/font/montserrat/Montserrat-Variable.woff2 +0 -0
- package/src/css-utilities/font/montserrat/OFL.txt +93 -0
- package/src/css-utilities/font/montserrat/index.scss +38 -0
- package/src/{shared/scss → css-utilities}/icon.scss +1 -1
- package/src/css-utilities/{inline/scss/index.scss → inline.scss} +1 -1
- package/src/css-utilities/{skeleton/scss/index.scss → skeleton.scss} +11 -11
- package/src/css-utilities/surface.scss +266 -0
- package/src/css-utilities/text.scss +191 -0
- package/src/modifiers/glass/index.ts +44 -0
- package/src/{css-utilities → modifiers}/glass/scss/index.scss +6 -6
- package/src/{css-utilities → modifiers}/glass/scss/variables.scss +1 -1
- package/src/{css-utilities → modifiers}/index.ts +0 -1
- package/src/{css-utilities → modifiers}/scrollbar/index.ts +92 -17
- package/src/{css-utilities → modifiers}/scrollbar/scss/index.scss +178 -177
- package/src/{css-utilities → modifiers}/scrollbar/scss/variables.scss +28 -21
- package/src/normalize/scss/index.scss +4 -2
- package/src/shared/scss/color-weights.scss +19 -0
- package/src/shared/scss/index.scss +1 -12
- package/src/tokens/scss/blur.scss +5 -0
- package/src/tokens/scss/color.scss +74 -50
- package/src/tokens/scss/index.scss +1 -2
- package/src/tokens/scss/size.scss +0 -2
- package/src/tokens/scss/state.scss +3 -2
- package/src/tokens/scss/transition.scss +19 -2
- package/storage/svg/monitor.svg +1 -0
- package/storage/svg/moon.svg +1 -0
- package/storage/svg/pin.svg +1 -0
- package/storage/svg/sun.svg +1 -0
- package/vite.config.ts +33 -8
- package/build/css-utilities/background/scss/index.scss +0 -2
- package/build/css-utilities/border/scss/index.scss +0 -2
- package/build/css-utilities/color/scss/index.scss +0 -2
- package/build/css-utilities/flex/scss/index.scss +0 -2
- package/build/css-utilities/font/geist/index.d.ts +0 -1
- package/build/css-utilities/font/geist/index.js +0 -1
- package/build/css-utilities/font/geist/scss/index.scss +0 -2
- package/build/css-utilities/font/montserrat/index.d.ts +0 -1
- package/build/css-utilities/font/montserrat/index.js +0 -1
- package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/index.scss +0 -2
- package/build/css-utilities/glass/index.js +0 -26
- package/build/css-utilities/glass/scss/index.scss +0 -2
- package/build/css-utilities/index.scss +0 -2
- package/build/css-utilities/inline/scss/index.scss +0 -2
- package/build/css-utilities/scrollbar/index.d.ts +0 -42
- package/build/css-utilities/scrollbar/scss/index.scss +0 -2
- package/build/css-utilities/skeleton/scss/index.scss +0 -2
- package/build/css-utilities/text/scss/index.scss +0 -2
- package/build/themes/dark/index.d.ts +0 -3
- package/build/themes/dark/index.js +0 -3
- package/build/themes/dark/input.d.ts +0 -3
- package/build/themes/dark/input.js +0 -12
- package/build/themes/dark/select.d.ts +0 -3
- package/build/themes/dark/select.js +0 -23
- package/build/themes/dark/textarea.d.ts +0 -2186
- package/build/themes/dark/textarea.js +0 -11
- package/src/css-utilities/background/scss/index.scss +0 -1
- package/src/css-utilities/background/scss/variables.scss +0 -18
- package/src/css-utilities/border/scss/index.scss +0 -1
- package/src/css-utilities/border/scss/variables.scss +0 -23
- package/src/css-utilities/color/scss/index.scss +0 -1
- package/src/css-utilities/color/scss/variables.scss +0 -17
- package/src/css-utilities/flex/scss/index.scss +0 -57
- package/src/css-utilities/flex/scss/variables.scss +0 -16
- package/src/css-utilities/font/geist/index.ts +0 -1
- package/src/css-utilities/font/montserrat/index.ts +0 -1
- package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/index.scss +0 -94
- package/src/css-utilities/glass/index.ts +0 -42
- package/src/css-utilities/index.scss +0 -13
- package/src/css-utilities/skeleton/scss/variables.scss +0 -3
- package/src/css-utilities/text/scss/index.scss +0 -152
- package/src/css-utilities/text/scss/variables.scss +0 -22
- package/src/shared/scss/absolute.scss +0 -28
- package/src/shared/scss/background.scss +0 -21
- package/src/shared/scss/border.scss +0 -21
- package/src/shared/scss/color.scss +0 -21
- package/src/shared/scss/position.scss +0 -55
- package/src/shared/scss/text.scss +0 -31
- package/src/themes/dark/index.ts +0 -3
- package/src/themes/dark/input.ts +0 -16
- package/src/themes/dark/select.ts +0 -28
- package/src/themes/dark/textarea.ts +0 -13
- package/src/tokens/scss/box-shadow.scss +0 -23
- package/src/tokens/scss/font-family.scss +0 -5
- package/storage/code.md +0 -180
- package/storage/editor-features.md +0 -227
- package/build/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
- package/src/{shared/scss → css-utilities}/anchor.scss +6 -6
- package/src/{shared/scss → css-utilities}/drag.scss +0 -0
- package/src/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
- package/src/{shared/scss → css-utilities}/hidden.scss +11 -11
- /package/src/{shared/scss → css-utilities}/layer.scss +0 -0
- /package/src/{shared/scss → css-utilities}/reset.scss +0 -0
|
@@ -17,11 +17,13 @@ import input from '~/components/input';
|
|
|
17
17
|
import overlay from '~/components/overlay';
|
|
18
18
|
import tooltip from '~/components/tooltip';
|
|
19
19
|
import type { Controller as MenuController, Item } from '~/components/tooltip/menu';
|
|
20
|
+
import scrollbar from '~/modifiers/scrollbar';
|
|
20
21
|
import fuzzy from '~/shared/fuzzy';
|
|
21
22
|
import { mac } from '~/shared/platform';
|
|
22
23
|
import { observe } from '~/shared/resize';
|
|
23
24
|
import codeEditor, { type CodeEditorAttributes } from '../code/editor';
|
|
24
25
|
import type { Controller as EditorController, Options as EditorOptions } from '../code/view';
|
|
26
|
+
import { label as chordLabel, declare, merge, sequence, type Keybindings } from './keybindings';
|
|
25
27
|
import {
|
|
26
28
|
dirty,
|
|
27
29
|
EditorWorkspaceModel,
|
|
@@ -32,6 +34,11 @@ import {
|
|
|
32
34
|
type WorkspaceTab,
|
|
33
35
|
type WorkspaceTarget
|
|
34
36
|
} from './model';
|
|
37
|
+
import navigate from './navigate';
|
|
38
|
+
import hosted from './session';
|
|
39
|
+
import shortcuts, { OPEN, PALETTE } from './shortcuts';
|
|
40
|
+
import statusbar from './statusbar';
|
|
41
|
+
import tabStrip from './strip';
|
|
35
42
|
import left from '@esportsplus/ui/svg/arrow-left.svg';
|
|
36
43
|
import right from '@esportsplus/ui/svg/arrow-right.svg';
|
|
37
44
|
import collapse from '@esportsplus/ui/svg/chevrons-up-down.svg';
|
|
@@ -51,6 +58,8 @@ type CodeEditorWorkspaceAttributes = Attributes & {
|
|
|
51
58
|
addons?: (context: WorkspaceEditorContext) => void | VoidFunction;
|
|
52
59
|
controller?: (controller: CodeEditorWorkspaceController) => void;
|
|
53
60
|
cwd?: string;
|
|
61
|
+
// The host's own marks, like git status and problems, which the explorer shows and next/previous step between.
|
|
62
|
+
decorations?: FileTreeDecorations | FileTreeDecorations[];
|
|
54
63
|
// The editor for a tab, such as 'editor.markdown', or undefined for the code editor. A mounted editor stays
|
|
55
64
|
// for the next tab that uses the same one, when its controller can 'setDocument'.
|
|
56
65
|
editor?: (tab: WorkspaceTab) => WorkspaceEditor | undefined;
|
|
@@ -67,7 +76,10 @@ type CodeEditorWorkspaceController = {
|
|
|
67
76
|
dispose(): void;
|
|
68
77
|
readonly editor: WorkspaceEditorController | undefined;
|
|
69
78
|
focus(): void;
|
|
79
|
+
keybindings(): void;
|
|
70
80
|
readonly model: EditorWorkspaceModel;
|
|
81
|
+
// The next or previous change or problem, in the shown file and then the next file that has one.
|
|
82
|
+
navigate(kind: 'change' | 'problem', backward?: boolean): Promise<boolean>;
|
|
71
83
|
open(path: string, line?: number, column?: number): ReturnType<EditorWorkspaceModel['open']>;
|
|
72
84
|
quickOpen(query?: string): void;
|
|
73
85
|
refresh(): Promise<void>;
|
|
@@ -128,7 +140,7 @@ type WorkspaceEditorContext = {
|
|
|
128
140
|
|
|
129
141
|
// Shared by the code and markdown controllers; narrow with 'isWorkspaceCodeEditor' for code-only addons. Without
|
|
130
142
|
// 'setDocument', every tab switch mounts the editor again.
|
|
131
|
-
type WorkspaceEditorController = Pick<EditorController, 'dispose' | 'document' | 'focus' | 'host' | 'scroller' | 'select'
|
|
143
|
+
type WorkspaceEditorController = Pick<EditorController, 'dispose' | 'document' | 'focus' | 'host' | 'scroller' | 'select'> &
|
|
132
144
|
Partial<Pick<EditorController, 'setDocument'>>;
|
|
133
145
|
|
|
134
146
|
|
|
@@ -220,6 +232,7 @@ const workspace = ({
|
|
|
220
232
|
addons,
|
|
221
233
|
controller: receive,
|
|
222
234
|
cwd = '',
|
|
235
|
+
decorations: provided,
|
|
223
236
|
editor: editorFor,
|
|
224
237
|
editorOptions,
|
|
225
238
|
host,
|
|
@@ -234,6 +247,25 @@ const workspace = ({
|
|
|
234
247
|
let actions: MenuController | undefined,
|
|
235
248
|
active = signal<WorkspaceTab | undefined>(undefined),
|
|
236
249
|
activeId = signal(0),
|
|
250
|
+
bindings = signal<Keybindings>({}),
|
|
251
|
+
// The code editor keymap has no chord sequences, so the workspace runs Mod+K Mod+S itself.
|
|
252
|
+
chords = sequence({
|
|
253
|
+
// Focus inside only: the page's own Mod+K, like site search, still answers under a resting pointer.
|
|
254
|
+
accept: (event) => !confirmation && !!container?.contains(event.target as Node | null),
|
|
255
|
+
actions: { [OPEN[1]]: () => openKeybindings() },
|
|
256
|
+
apple: mac(),
|
|
257
|
+
onpending: (pending) => {
|
|
258
|
+
let text = `${chordLabel(OPEN[0], mac())} was pressed; waiting for the next key…`;
|
|
259
|
+
|
|
260
|
+
if (pending) {
|
|
261
|
+
model.status(text);
|
|
262
|
+
}
|
|
263
|
+
else if (model.state.status === text) {
|
|
264
|
+
model.status('');
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
prefix: OPEN[0]
|
|
268
|
+
}),
|
|
237
269
|
confirmation: Confirmation | undefined,
|
|
238
270
|
container: HTMLElement | undefined,
|
|
239
271
|
// Each open tab's path and dirty state as last written to the tree's decorations.
|
|
@@ -247,6 +279,7 @@ const workspace = ({
|
|
|
247
279
|
focusing = false,
|
|
248
280
|
hovered = false,
|
|
249
281
|
id = `code-workspace-${++uid}`,
|
|
282
|
+
keyboard = reactive({ active: false }),
|
|
250
283
|
model = supplied ?? new EditorWorkspaceModel(host!, cwd),
|
|
251
284
|
mount: Mount | undefined,
|
|
252
285
|
palette = reactive({ active: false, index: 0, query: '', tab: 'all' as Tab }),
|
|
@@ -258,6 +291,18 @@ const workspace = ({
|
|
|
258
291
|
// Runs once the open modal has closed and returned focus, to move it where the user went next.
|
|
259
292
|
settle: VoidFunction | undefined,
|
|
260
293
|
shown = signal<Mount | undefined>(undefined),
|
|
294
|
+
statusBar = statusbar(model, () => navigation.go('problem')),
|
|
295
|
+
strip = tabStrip({
|
|
296
|
+
isFile: (path) => treeStore.get(path)?.type === 'file',
|
|
297
|
+
model,
|
|
298
|
+
remount,
|
|
299
|
+
reveal: (path) => {
|
|
300
|
+
peek(true, true);
|
|
301
|
+
treeState.selected = '';
|
|
302
|
+
flush();
|
|
303
|
+
treeState.selected = path;
|
|
304
|
+
}
|
|
305
|
+
}),
|
|
261
306
|
tabs = signal<readonly WorkspaceTab[]>([]),
|
|
262
307
|
tabsKey = '',
|
|
263
308
|
target = signal<Target | undefined>(undefined),
|
|
@@ -288,6 +333,14 @@ const workspace = ({
|
|
|
288
333
|
wrap: false
|
|
289
334
|
});
|
|
290
335
|
|
|
336
|
+
let hosting = hosted(model, () => (mount?.controller ? { controller: mount.controller, tab: mount.tab } : undefined)),
|
|
337
|
+
navigation = navigate({
|
|
338
|
+
bindings: () => (mount ? settings(mount.tab, mount.tab.path).keybindings : model.state.preferences.keybindings),
|
|
339
|
+
hosting,
|
|
340
|
+
model,
|
|
341
|
+
tree: () => tree
|
|
342
|
+
});
|
|
343
|
+
|
|
291
344
|
function ask(next: WorkspaceConfirmation) {
|
|
292
345
|
confirmation?.resolve('cancel');
|
|
293
346
|
returnFocus = (container?.ownerDocument.activeElement as HTMLElement | null) ?? undefined;
|
|
@@ -324,6 +377,7 @@ const workspace = ({
|
|
|
324
377
|
let controller = current.controller;
|
|
325
378
|
|
|
326
379
|
detach(current);
|
|
380
|
+
statusBar.attach(controller);
|
|
327
381
|
write(current.path, current.tab.path);
|
|
328
382
|
|
|
329
383
|
if (!addons || !controller) {
|
|
@@ -366,7 +420,7 @@ const workspace = ({
|
|
|
366
420
|
}
|
|
367
421
|
|
|
368
422
|
for (let i = 0, n = list.length; i < n; i++) {
|
|
369
|
-
key += `${list[i].id}:${list[i].path}\n`;
|
|
423
|
+
key += `${list[i].id}:${list[i].path}:${list[i].pinned}:${list[i].preview}\n`;
|
|
370
424
|
}
|
|
371
425
|
|
|
372
426
|
if (key !== tabsKey) {
|
|
@@ -376,6 +430,7 @@ const workspace = ({
|
|
|
376
430
|
|
|
377
431
|
write(active, current);
|
|
378
432
|
write(activeId, current?.id ?? 0);
|
|
433
|
+
write(bindings, state.preferences.keybindings);
|
|
379
434
|
show(current);
|
|
380
435
|
|
|
381
436
|
view.busy = state.busy > 0;
|
|
@@ -407,7 +462,7 @@ const workspace = ({
|
|
|
407
462
|
view.ready = false;
|
|
408
463
|
}
|
|
409
464
|
|
|
410
|
-
let path = current
|
|
465
|
+
let path = current && !current.compare ? current.path : '';
|
|
411
466
|
|
|
412
467
|
if (view.path !== path) {
|
|
413
468
|
view.path = path;
|
|
@@ -424,6 +479,11 @@ const workspace = ({
|
|
|
424
479
|
}
|
|
425
480
|
|
|
426
481
|
function choose(entry: Command) {
|
|
482
|
+
if (entry.group === PALETTE.group && entry.id === PALETTE.id) {
|
|
483
|
+
settle = openKeybindings;
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
|
|
427
487
|
let opened = model.open(entry.id);
|
|
428
488
|
|
|
429
489
|
settle = () => {
|
|
@@ -441,7 +501,11 @@ const workspace = ({
|
|
|
441
501
|
});
|
|
442
502
|
|
|
443
503
|
bridge();
|
|
504
|
+
// A page-wide palette on Mod+K, like the site search, leaves the chord to a focused element that declares it.
|
|
505
|
+
element.setAttribute('aria-keyshortcuts', declare(element.getAttribute('aria-keyshortcuts'), OPEN[0]));
|
|
444
506
|
element.ownerDocument.addEventListener('keydown', keydown, { signal: listening.signal });
|
|
507
|
+
// Capture, so the second chord reaches neither the editor nor the workspace's own Mod+S.
|
|
508
|
+
element.ownerDocument.addEventListener('keydown', chords.keydown, { capture: true, signal: listening.signal });
|
|
445
509
|
// A closing modal hands focus back to whatever had it before, so ours moves only once it has closed;
|
|
446
510
|
// 'close' doesn't bubble, but capture still passes through the workspace.
|
|
447
511
|
element.addEventListener('close', () => {
|
|
@@ -453,8 +517,12 @@ const workspace = ({
|
|
|
453
517
|
model.setConfirmation(ask);
|
|
454
518
|
|
|
455
519
|
onCleanup(model.subscribe(bridge));
|
|
520
|
+
onCleanup(hosting.connect(element));
|
|
521
|
+
onCleanup(navigation.connect(element));
|
|
522
|
+
onCleanup(statusBar.connect(element));
|
|
456
523
|
onCleanup(() => {
|
|
457
524
|
listening.abort();
|
|
525
|
+
chords.cancel();
|
|
458
526
|
unobserve();
|
|
459
527
|
confirmation?.resolve('cancel');
|
|
460
528
|
model.setConfirmation(undefined);
|
|
@@ -472,7 +540,7 @@ const workspace = ({
|
|
|
472
540
|
effect(() => {
|
|
473
541
|
let tab = read(active);
|
|
474
542
|
|
|
475
|
-
if (!tab) {
|
|
543
|
+
if (!tab || tab.compare) {
|
|
476
544
|
view.position = '';
|
|
477
545
|
return;
|
|
478
546
|
}
|
|
@@ -498,7 +566,7 @@ const workspace = ({
|
|
|
498
566
|
if (path && treeStore.get(path)?.type === 'file') {
|
|
499
567
|
untrack(() => {
|
|
500
568
|
if (path !== model.state.active?.path) {
|
|
501
|
-
void model.open(path);
|
|
569
|
+
void model.open(path, undefined, undefined, true);
|
|
502
570
|
}
|
|
503
571
|
});
|
|
504
572
|
}
|
|
@@ -521,7 +589,7 @@ const workspace = ({
|
|
|
521
589
|
}
|
|
522
590
|
});
|
|
523
591
|
|
|
524
|
-
void
|
|
592
|
+
void hosting.restore();
|
|
525
593
|
|
|
526
594
|
return dispose;
|
|
527
595
|
});
|
|
@@ -683,6 +751,11 @@ const workspace = ({
|
|
|
683
751
|
}
|
|
684
752
|
}
|
|
685
753
|
|
|
754
|
+
function openKeybindings() {
|
|
755
|
+
palette.active = false;
|
|
756
|
+
keyboard.active = true;
|
|
757
|
+
}
|
|
758
|
+
|
|
686
759
|
function pane() {
|
|
687
760
|
let next = read(shown);
|
|
688
761
|
|
|
@@ -781,7 +854,9 @@ const workspace = ({
|
|
|
781
854
|
<div class='command-group-label' id='${group.id}'>${group.label}</div>
|
|
782
855
|
${group.items.map((item) => html`
|
|
783
856
|
<div class='command-option' ${item.attributes}>
|
|
784
|
-
${
|
|
857
|
+
${item.command?.icon
|
|
858
|
+
? icon({ 'aria-hidden': 'true', class: 'code-workspace-command-icon' }, item.command.icon)
|
|
859
|
+
: fileTreeIcon({ name: name(item.id), type: 'file' }, false)}
|
|
785
860
|
${item.content}
|
|
786
861
|
</div>
|
|
787
862
|
`)}
|
|
@@ -795,9 +870,21 @@ const workspace = ({
|
|
|
795
870
|
let element = current.controller!.scroller;
|
|
796
871
|
|
|
797
872
|
current.tab.scroll = { left: element.scrollLeft, top: element.scrollTop };
|
|
873
|
+
hosting.remember(current.tab, current.controller!);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
// A merge starting or ending on the shown tab swaps what the pane shows for it.
|
|
877
|
+
function remount() {
|
|
878
|
+
if (mount) {
|
|
879
|
+
unmount(mount);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
show(model.state.active);
|
|
798
883
|
}
|
|
799
884
|
|
|
800
885
|
function restore(current: Mount) {
|
|
886
|
+
hosting.shown(current.tab, current.controller!);
|
|
887
|
+
|
|
801
888
|
let element = current.controller!.scroller,
|
|
802
889
|
{ left, top } = current.tab.scroll,
|
|
803
890
|
tab = current.tab;
|
|
@@ -858,11 +945,19 @@ const workspace = ({
|
|
|
858
945
|
}
|
|
859
946
|
|
|
860
947
|
function settings(tab: WorkspaceTab, path: string): EditorOptions {
|
|
948
|
+
let options = typeof editorOptions === 'function' ? editorOptions(tab) : editorOptions;
|
|
949
|
+
|
|
861
950
|
return {
|
|
862
951
|
fold: true,
|
|
863
952
|
minimap: true,
|
|
864
|
-
|
|
953
|
+
onMerge: () => {
|
|
954
|
+
void strip.merge(tab);
|
|
955
|
+
},
|
|
956
|
+
...options,
|
|
957
|
+
...statusBar.options(tab),
|
|
958
|
+
...(model.host.baseline ? { baseline: hosting.baseline(path) } : {}),
|
|
865
959
|
fileName: path,
|
|
960
|
+
keybindings: merge(options?.keybindings, read(bindings)),
|
|
866
961
|
label: path,
|
|
867
962
|
whitespace: view.whitespace,
|
|
868
963
|
wrap: view.wrap
|
|
@@ -875,7 +970,7 @@ const workspace = ({
|
|
|
875
970
|
return;
|
|
876
971
|
}
|
|
877
972
|
|
|
878
|
-
let editor = tab && (editorFor?.(tab) ?? codeEditor);
|
|
973
|
+
let editor = tab && (strip.editor(tab) ?? editorFor?.(tab) ?? codeEditor);
|
|
879
974
|
|
|
880
975
|
if (tab && mount?.controller?.setDocument && mount.editor === editor) {
|
|
881
976
|
retarget(mount, tab);
|
|
@@ -892,7 +987,7 @@ const workspace = ({
|
|
|
892
987
|
|
|
893
988
|
function tab(entry: WorkspaceTab) {
|
|
894
989
|
let chosen = () => signal.selector(activeId, entry.id),
|
|
895
|
-
file =
|
|
990
|
+
file = strip.label(entry);
|
|
896
991
|
|
|
897
992
|
return html`
|
|
898
993
|
<div
|
|
@@ -900,7 +995,7 @@ const workspace = ({
|
|
|
900
995
|
class='button code-workspace-tab'
|
|
901
996
|
id='${id}-tab-${entry.id}'
|
|
902
997
|
role='tab'
|
|
903
|
-
title='${entry
|
|
998
|
+
title='${strip.title(entry)}'
|
|
904
999
|
${{
|
|
905
1000
|
'aria-selected': () => (chosen() ? 'true' : 'false'),
|
|
906
1001
|
class: () => chosen() && '--active',
|
|
@@ -949,9 +1044,11 @@ const workspace = ({
|
|
|
949
1044
|
},
|
|
950
1045
|
tabindex: () => (chosen() ? 0 : -1)
|
|
951
1046
|
}}
|
|
1047
|
+
${strip.attributes(entry)}
|
|
952
1048
|
>
|
|
953
1049
|
${fileTreeIcon({ name: file, type: 'file' }, false)}
|
|
954
1050
|
<span class='code-workspace-tab-name'>${file}</span>
|
|
1051
|
+
${strip.pin(entry)}
|
|
955
1052
|
${() => read(flag(entry)) && html`<span aria-label='Unsaved changes' class='code-workspace-tab-dirty' role='img'></span>`}
|
|
956
1053
|
<button
|
|
957
1054
|
aria-label='Close ${file}'
|
|
@@ -989,6 +1086,7 @@ const workspace = ({
|
|
|
989
1086
|
|
|
990
1087
|
if (mount === current) {
|
|
991
1088
|
mount = undefined;
|
|
1089
|
+
statusBar.attach(undefined);
|
|
992
1090
|
}
|
|
993
1091
|
|
|
994
1092
|
if (controller?.host.isConnected) {
|
|
@@ -1004,13 +1102,16 @@ const workspace = ({
|
|
|
1004
1102
|
delete: (paths = selected()) => model.delete(paths),
|
|
1005
1103
|
dispose: () => {
|
|
1006
1104
|
release?.();
|
|
1105
|
+
hosting.dispose();
|
|
1007
1106
|
model.dispose();
|
|
1008
1107
|
},
|
|
1009
1108
|
get editor() {
|
|
1010
1109
|
return mount?.controller;
|
|
1011
1110
|
},
|
|
1012
1111
|
focus: focusEditor,
|
|
1112
|
+
keybindings: openKeybindings,
|
|
1013
1113
|
model,
|
|
1114
|
+
navigate: (kind, backward) => navigation.go(kind, backward),
|
|
1014
1115
|
open: (path, line, column) => model.open(path, line, column),
|
|
1015
1116
|
quickOpen,
|
|
1016
1117
|
refresh: () => model.refresh(),
|
|
@@ -1048,6 +1149,7 @@ const workspace = ({
|
|
|
1048
1149
|
void model.copyPath(paths()[0]);
|
|
1049
1150
|
}
|
|
1050
1151
|
},
|
|
1152
|
+
...strip.items(() => paths()),
|
|
1051
1153
|
...(model.host.actions ?? []).map((action): Item => ({
|
|
1052
1154
|
danger: action.danger,
|
|
1053
1155
|
hidden: () => !paths().length || (!!action.visible && !action.visible(paths())),
|
|
@@ -1144,17 +1246,18 @@ const workspace = ({
|
|
|
1144
1246
|
})}
|
|
1145
1247
|
</div>
|
|
1146
1248
|
<div class='code-workspace-tree'>
|
|
1147
|
-
${fileTree({
|
|
1249
|
+
${() => hosting.ready() && untrack(() => fileTree({
|
|
1148
1250
|
class: 'code-workspace-files',
|
|
1149
1251
|
compact: true,
|
|
1150
1252
|
controller: (value) => {
|
|
1151
1253
|
tree = value;
|
|
1152
1254
|
value.search(view.search);
|
|
1153
1255
|
},
|
|
1154
|
-
decorations,
|
|
1256
|
+
decorations: [hosting.marks, ...[provided ?? []].flat(), decorations],
|
|
1155
1257
|
editor: treeEditor,
|
|
1156
1258
|
elements: treeStore,
|
|
1157
1259
|
empty: () => html`<div class='code-workspace-notice'>No files in this workspace</div>`,
|
|
1260
|
+
export: hosting.export,
|
|
1158
1261
|
find: 'filter',
|
|
1159
1262
|
menu: (elements, position) => {
|
|
1160
1263
|
if (!elements.length || !actions) {
|
|
@@ -1167,13 +1270,14 @@ const workspace = ({
|
|
|
1167
1270
|
// The tree claims the right click; the context menu opens at the point it reports.
|
|
1168
1271
|
actions.open(position);
|
|
1169
1272
|
},
|
|
1170
|
-
open: (element) => {
|
|
1171
|
-
void model.open(element.id);
|
|
1273
|
+
open: (element, open) => {
|
|
1274
|
+
void model.open(element.id, undefined, undefined, open.mode === 'preview');
|
|
1172
1275
|
},
|
|
1173
1276
|
operations: {
|
|
1174
1277
|
delete: (elements) => {
|
|
1175
1278
|
void model.delete(elements.map((element) => element.id));
|
|
1176
|
-
}
|
|
1279
|
+
},
|
|
1280
|
+
import: hosting.import
|
|
1177
1281
|
},
|
|
1178
1282
|
preview: 'immediate',
|
|
1179
1283
|
rename: async (element, value) => {
|
|
@@ -1186,9 +1290,10 @@ const workspace = ({
|
|
|
1186
1290
|
searched: (query) => {
|
|
1187
1291
|
view.search = query;
|
|
1188
1292
|
},
|
|
1293
|
+
snapshot: hosting.explorer,
|
|
1189
1294
|
state: treeState,
|
|
1190
1295
|
typing: 'typeahead'
|
|
1191
|
-
})}
|
|
1296
|
+
}))}
|
|
1192
1297
|
${() => {
|
|
1193
1298
|
if (view.error) {
|
|
1194
1299
|
return html`
|
|
@@ -1221,21 +1326,21 @@ const workspace = ({
|
|
|
1221
1326
|
`}
|
|
1222
1327
|
</aside>
|
|
1223
1328
|
<main class='code-workspace-main' ${{ onpointerenter: () => peek(false) }}>
|
|
1224
|
-
<div aria-label='Open files' class='code-workspace-tabs
|
|
1329
|
+
<div aria-label='Open files' class='code-workspace-tabs' role='tablist' ${scrollbar()}>
|
|
1225
1330
|
${highlight({ class: 'code-workspace-tabs-highlight', line: 'bottom' })}
|
|
1226
1331
|
${() => read(tabs).map(tab)}
|
|
1227
1332
|
</div>
|
|
1228
1333
|
<div class='code-workspace-bar'>
|
|
1229
1334
|
${crumbs}
|
|
1230
1335
|
<div class='code-workspace-actions'>
|
|
1231
|
-
${control({
|
|
1336
|
+
${statusBar.save(() => control({
|
|
1232
1337
|
disabled: () => !view.tabs || view.busy,
|
|
1233
1338
|
label: label('Save file', ['Mod', 'S']),
|
|
1234
1339
|
onclick: () => {
|
|
1235
1340
|
void model.save();
|
|
1236
1341
|
},
|
|
1237
1342
|
sprite: save
|
|
1238
|
-
})}
|
|
1343
|
+
}))}
|
|
1239
1344
|
${control({
|
|
1240
1345
|
active: () => view.wrap,
|
|
1241
1346
|
label: () => (view.wrap ? 'Disable wrap' : 'Wrap long lines'),
|
|
@@ -1270,6 +1375,7 @@ const workspace = ({
|
|
|
1270
1375
|
<footer class='code-workspace-status'>
|
|
1271
1376
|
<span class='code-workspace-status-path'>${() => view.cwd}</span>
|
|
1272
1377
|
<span class='code-workspace-status-position'>${() => view.position}</span>
|
|
1378
|
+
${statusBar.items}
|
|
1273
1379
|
<span
|
|
1274
1380
|
aria-live='polite'
|
|
1275
1381
|
class='code-workspace-status-message'
|
|
@@ -1279,19 +1385,31 @@ const workspace = ({
|
|
|
1279
1385
|
${() => view.status}
|
|
1280
1386
|
</span>
|
|
1281
1387
|
</footer>
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1388
|
+
<div
|
|
1389
|
+
class='code-workspace-layer'
|
|
1390
|
+
popover='manual'
|
|
1391
|
+
${{
|
|
1392
|
+
onconnect: (element: HTMLElement) => {
|
|
1393
|
+
element.showPopover();
|
|
1394
|
+
}
|
|
1395
|
+
}}
|
|
1396
|
+
>
|
|
1397
|
+
${tooltip.context(
|
|
1398
|
+
{
|
|
1399
|
+
class: 'code-workspace-menu',
|
|
1400
|
+
controller: (value: MenuController) => {
|
|
1401
|
+
actions = value;
|
|
1402
|
+
},
|
|
1403
|
+
items,
|
|
1404
|
+
[tooltip.context.panel]: { 'aria-label': 'File actions', class: 'code-workspace-menu-panel' }
|
|
1287
1405
|
},
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1406
|
+
''
|
|
1407
|
+
)}
|
|
1408
|
+
${statusBar.menu}
|
|
1409
|
+
${strip.menu()}
|
|
1410
|
+
</div>
|
|
1293
1411
|
${command({
|
|
1294
|
-
commands: () => read(files).map((path): Command => ({ group: 'Files', id: path, label: path })),
|
|
1412
|
+
commands: () => [PALETTE, ...read(files).map((path): Command => ({ group: 'Files', id: path, label: path }))],
|
|
1295
1413
|
hotkey: [],
|
|
1296
1414
|
label: 'Go to file',
|
|
1297
1415
|
limit: 50,
|
|
@@ -1303,6 +1421,13 @@ const workspace = ({
|
|
|
1303
1421
|
trigger: false,
|
|
1304
1422
|
[command.dialog]: { 'aria-label': 'Go to file' }
|
|
1305
1423
|
})}
|
|
1424
|
+
${shortcuts({
|
|
1425
|
+
apple: mac(),
|
|
1426
|
+
id,
|
|
1427
|
+
keybindings: () => read(bindings),
|
|
1428
|
+
onchange: (next) => model.setPreferences({ keybindings: next }),
|
|
1429
|
+
state: keyboard
|
|
1430
|
+
})}
|
|
1306
1431
|
${overlay(
|
|
1307
1432
|
{
|
|
1308
1433
|
'aria-labelledby': `${id}-confirm`,
|
|
@@ -1347,11 +1472,14 @@ export type {
|
|
|
1347
1472
|
};
|
|
1348
1473
|
export type {
|
|
1349
1474
|
WorkspaceAction,
|
|
1475
|
+
WorkspaceCompare,
|
|
1350
1476
|
WorkspaceConfirmation,
|
|
1351
1477
|
WorkspaceDecision,
|
|
1352
1478
|
WorkspaceEntry,
|
|
1353
1479
|
WorkspaceHost,
|
|
1354
1480
|
WorkspacePreferences,
|
|
1481
|
+
WorkspaceSession,
|
|
1482
|
+
WorkspaceSessionTab,
|
|
1355
1483
|
WorkspaceTab,
|
|
1356
1484
|
WorkspaceTarget
|
|
1357
1485
|
} from './model';
|