@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
|
@@ -11,11 +11,18 @@ import icon from '../../icon/index.js';
|
|
|
11
11
|
import input from '../../input/index.js';
|
|
12
12
|
import overlay from '../../overlay/index.js';
|
|
13
13
|
import tooltip from '../../tooltip/index.js';
|
|
14
|
+
import scrollbar from '../../../modifiers/scrollbar/index.js';
|
|
14
15
|
import fuzzy from '../../../shared/fuzzy.js';
|
|
15
16
|
import { mac } from '../../../shared/platform.js';
|
|
16
17
|
import { observe } from '../../../shared/resize.js';
|
|
17
18
|
import codeEditor from '../code/editor.js';
|
|
19
|
+
import { label as chordLabel, declare, merge, sequence } from './keybindings.js';
|
|
18
20
|
import { dirty, EditorWorkspaceModel } from './model.js';
|
|
21
|
+
import navigate from './navigate.js';
|
|
22
|
+
import hosted from './session.js';
|
|
23
|
+
import shortcuts, { OPEN, PALETTE } from './shortcuts.js';
|
|
24
|
+
import statusbar from './statusbar.js';
|
|
25
|
+
import tabStrip from './strip.js';
|
|
19
26
|
import left from '@esportsplus/ui/svg/arrow-left.svg';
|
|
20
27
|
import right from '@esportsplus/ui/svg/arrow-right.svg';
|
|
21
28
|
import collapse from '@esportsplus/ui/svg/chevrons-up-down.svg';
|
|
@@ -28,20 +35,20 @@ import undo from '@esportsplus/ui/svg/undo.svg';
|
|
|
28
35
|
import '../../button/scss/index.scss';
|
|
29
36
|
import '../code/scss/index.scss';
|
|
30
37
|
import './scss/index.scss';
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
38
|
+
const template_03uclqu6 = template_u1.template(`<div class='code-workspace-empty'> Open a file from the explorer or press <span class='code-workspace-keys'>`);
|
|
39
|
+
const template_03uclqu9 = template_u1.template(`<kbd class='button button--kbd'>`);
|
|
40
|
+
const template_03uclquc = template_u1.template(`<!--$--><!--$-->`);
|
|
41
|
+
const template_03uclqug = template_u1.template(`<div class='command-group' role='group'><div class='command-group-label'>`);
|
|
42
|
+
const template_03uclquk = template_u1.template(`<div class='command-option'><!--$-->`);
|
|
43
|
+
const template_03uclquo = template_u1.template(`<div class='button code-workspace-tab' role='tab'><!--$--><span class='code-workspace-tab-name'></span><!--$--><!--$--><button class='button code-workspace-tab-close' tabindex='-1' type='button'>`);
|
|
44
|
+
const template_03uclquv = template_u1.template(`<span aria-label='Unsaved changes' class='code-workspace-tab-dirty' role='img'>`);
|
|
45
|
+
const template_03uclqux = template_u1.template(`<button class='button code-workspace-control' type='button'>`);
|
|
46
|
+
const template_03uclqu10 = template_u1.template(`<section aria-label='Editor workspace' class='code-workspace'><aside aria-label='File explorer' class='code-workspace-explorer'><div class='code-workspace-explorer-content'><div class='code-workspace-explorer-header'><!--$--><!--$--><!--$--><!--$--></div><div class='code-workspace-tree'><!--$--></div></div></aside><main class='code-workspace-main'><div aria-label='Open files' class='code-workspace-tabs' role='tablist'><!--$--></div><div class='code-workspace-bar'><!--$--><div class='code-workspace-actions'><!--$--><!--$--><!--$--></div></div><div class='code-workspace-editor' role='tabpanel'></div></main><footer class='code-workspace-status'><span class='code-workspace-status-path'></span><span class='code-workspace-status-position'></span><!--$--><span aria-live='polite' class='code-workspace-status-message' role='status'></span></footer><div class='code-workspace-layer' popover='manual'><!--$--><!--$--></div><!--$--><!--$-->`);
|
|
47
|
+
const template_03uclqu1t = template_u1.template(`<div class='code-workspace-notice'>No files in this workspace`);
|
|
48
|
+
const template_03uclqu1v = template_u1.template(`<div class='code-workspace-notice code-workspace-notice--cover' role='alert'><!--$--><button class='button code-workspace-retry' type='button'> Retry `);
|
|
49
|
+
const template_03uclqu1y = template_u1.template(`<div class='code-workspace-notice code-workspace-notice--cover' role='status'>Loading…`);
|
|
50
|
+
const template_03uclqu20 = template_u1.template(`<button aria-label='Peek file explorer' class='code-workspace-edge' type='button'>`);
|
|
51
|
+
const template_03uclqu23 = template_u1.template(`<h2 class='code-workspace-confirm-title'>Save unsaved changes?</h2><p class='code-workspace-confirm-files'></p><p class='code-workspace-confirm-text'></p><div class='code-workspace-confirm-actions'><button autofocus class='button code-workspace-confirm-button' type='button'> Cancel </button><button class='button code-workspace-confirm-button' type='button'> Discard </button><button class='button code-workspace-confirm-button code-workspace-confirm-button--primary' type='button'> Save `);
|
|
45
52
|
class ReactiveObject_03uclqu0 extends reactivity_u0.ReactiveObject {
|
|
46
53
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
47
54
|
constructor() {
|
|
@@ -55,6 +62,18 @@ class ReactiveObject_03uclqu0 extends reactivity_u0.ReactiveObject {
|
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
class ReactiveObject_03uclqu1 extends reactivity_u0.ReactiveObject {
|
|
65
|
+
#active = this[reactivity_u0.SIGNAL](false);
|
|
66
|
+
constructor() {
|
|
67
|
+
super(null);
|
|
68
|
+
}
|
|
69
|
+
get active() {
|
|
70
|
+
return reactivity_u0.read(this.#active);
|
|
71
|
+
}
|
|
72
|
+
set active(_v0) {
|
|
73
|
+
reactivity_u0.write(this.#active, _v0);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class ReactiveObject_03uclqu2 extends reactivity_u0.ReactiveObject {
|
|
58
77
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
59
78
|
#index = this[reactivity_u0.SIGNAL](0);
|
|
60
79
|
#query = this[reactivity_u0.SIGNAL]('');
|
|
@@ -88,7 +107,7 @@ class ReactiveObject_03uclqu1 extends reactivity_u0.ReactiveObject {
|
|
|
88
107
|
reactivity_u0.write(this.#tab, _v3);
|
|
89
108
|
}
|
|
90
109
|
}
|
|
91
|
-
class
|
|
110
|
+
class ReactiveObject_03uclqu3 extends reactivity_u0.ReactiveObject {
|
|
92
111
|
#selected = this[reactivity_u0.SIGNAL]('');
|
|
93
112
|
#selection;
|
|
94
113
|
constructor(_p0) {
|
|
@@ -108,7 +127,7 @@ class ReactiveObject_03uclqu2 extends reactivity_u0.ReactiveObject {
|
|
|
108
127
|
reactivity_u0.write(this.#selection, _v1);
|
|
109
128
|
}
|
|
110
129
|
}
|
|
111
|
-
class
|
|
130
|
+
class ReactiveObject_03uclqu4 extends reactivity_u0.ReactiveObject {
|
|
112
131
|
#busy = this[reactivity_u0.SIGNAL](false);
|
|
113
132
|
#canUndo = this[reactivity_u0.SIGNAL](false);
|
|
114
133
|
#collapsed = this[reactivity_u0.SIGNAL](false);
|
|
@@ -257,15 +276,15 @@ const COMPACT_WIDTH = 520;
|
|
|
257
276
|
let uid = 0;
|
|
258
277
|
function control({ active, disabled, label, onclick, sprite }) {
|
|
259
278
|
return (() => {
|
|
260
|
-
let
|
|
261
|
-
new template_u1.EffectSlot(
|
|
262
|
-
template_u1.setProperty(
|
|
263
|
-
template_u1.setProperty(
|
|
264
|
-
template_u1.setList(
|
|
265
|
-
template_u1.setProperty(
|
|
266
|
-
template_u1.delegate(
|
|
267
|
-
template_u1.setProperty(
|
|
268
|
-
return
|
|
279
|
+
let root_03uclquw = template_03uclqux(), element_03uclquy = root_03uclquw.firstChild;
|
|
280
|
+
new template_u1.EffectSlot(element_03uclquy, () => icon({ 'aria-hidden': 'true', class: 'code-workspace-control-icon' }, typeof sprite === 'string' ? sprite : sprite()), 1);
|
|
281
|
+
template_u1.setProperty(element_03uclquy, 'aria-label', label);
|
|
282
|
+
template_u1.setProperty(element_03uclquy, 'aria-pressed', active && (() => (active() ? 'true' : 'false')));
|
|
283
|
+
template_u1.setList(element_03uclquy, 'class', active && (() => active() && '--active'));
|
|
284
|
+
template_u1.setProperty(element_03uclquy, 'disabled', disabled);
|
|
285
|
+
template_u1.delegate(element_03uclquy, 'click', onclick);
|
|
286
|
+
template_u1.setProperty(element_03uclquy, 'title', label);
|
|
287
|
+
return root_03uclquw;
|
|
269
288
|
})();
|
|
270
289
|
}
|
|
271
290
|
function keys(names) {
|
|
@@ -306,11 +325,41 @@ function reconcile(store, entries) {
|
|
|
306
325
|
}
|
|
307
326
|
}
|
|
308
327
|
const isWorkspaceCodeEditor = (controller) => 'goToLine' in controller && 'rectAt' in controller && 'refresh' in controller;
|
|
309
|
-
const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, editorOptions, host, model: supplied, openTarget, ...attributes }) => {
|
|
328
|
+
const workspace = ({ addons, controller: receive, cwd = '', decorations: provided, editor: editorFor, editorOptions, host, model: supplied, openTarget, ...attributes }) => {
|
|
310
329
|
if (!supplied && !host) {
|
|
311
330
|
throw new Error('Workspace: editor.workspace requires a WorkspaceHost or EditorWorkspaceModel');
|
|
312
331
|
}
|
|
313
|
-
let actions, active = signal(undefined), activeId = signal(0),
|
|
332
|
+
let actions, active = signal(undefined), activeId = signal(0), bindings = signal({}), chords = sequence({
|
|
333
|
+
accept: (event) => !confirmation && !!container?.contains(event.target),
|
|
334
|
+
actions: { [OPEN[1]]: () => openKeybindings() },
|
|
335
|
+
apple: mac(),
|
|
336
|
+
onpending: (pending) => {
|
|
337
|
+
let text = `${chordLabel(OPEN[0], mac())} was pressed; waiting for the next key…`;
|
|
338
|
+
if (pending) {
|
|
339
|
+
model.status(text);
|
|
340
|
+
}
|
|
341
|
+
else if (model.state.status === text) {
|
|
342
|
+
model.status('');
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
prefix: OPEN[0]
|
|
346
|
+
}), confirmation, container, decorated = new Map(), decorations = new FileTreeDecorations(), dialog = new ReactiveObject_03uclqu0(), elements = new WeakMap(), entries, files = signal([]), flags = new Map(), focusing = false, hovered = false, id = `code-workspace-${++uid}`, keyboard = new ReactiveObject_03uclqu1(), model = supplied ?? new EditorWorkspaceModel(host, cwd), mount, palette = new ReactiveObject_03uclqu2('all'), release, request = signal(undefined), returnFocus, revealed = 0, searchField, settle, shown = signal(undefined), statusBar = statusbar(model, () => navigation.go('problem')), strip = tabStrip({
|
|
347
|
+
isFile: (path) => treeStore.get(path)?.type === 'file',
|
|
348
|
+
model,
|
|
349
|
+
remount,
|
|
350
|
+
reveal: (path) => {
|
|
351
|
+
peek(true, true);
|
|
352
|
+
treeState.selected = '';
|
|
353
|
+
flush();
|
|
354
|
+
treeState.selected = path;
|
|
355
|
+
}
|
|
356
|
+
}), tabs = signal([]), tabsKey = '', target = signal(undefined), tree, treeEditor = new FileTreeEditor(), treeState = new ReactiveObject_03uclqu3(new Set()), treeStore = new FileTreeElements([]), view = new ReactiveObject_03uclqu4();
|
|
357
|
+
let hosting = hosted(model, () => (mount?.controller ? { controller: mount.controller, tab: mount.tab } : undefined)), navigation = navigate({
|
|
358
|
+
bindings: () => (mount ? settings(mount.tab, mount.tab.path).keybindings : model.state.preferences.keybindings),
|
|
359
|
+
hosting,
|
|
360
|
+
model,
|
|
361
|
+
tree: () => tree
|
|
362
|
+
});
|
|
314
363
|
function ask(next) {
|
|
315
364
|
confirmation?.resolve('cancel');
|
|
316
365
|
returnFocus = container?.ownerDocument.activeElement ?? undefined;
|
|
@@ -342,6 +391,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
342
391
|
function attach(current) {
|
|
343
392
|
let controller = current.controller;
|
|
344
393
|
detach(current);
|
|
394
|
+
statusBar.attach(controller);
|
|
345
395
|
write(current.path, current.tab.path);
|
|
346
396
|
if (!addons || !controller) {
|
|
347
397
|
return;
|
|
@@ -372,7 +422,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
372
422
|
write(files, paths);
|
|
373
423
|
}
|
|
374
424
|
for (let i = 0, n = list.length; i < n; i++) {
|
|
375
|
-
key += `${list[i].id}:${list[i].path}\n`;
|
|
425
|
+
key += `${list[i].id}:${list[i].path}:${list[i].pinned}:${list[i].preview}\n`;
|
|
376
426
|
}
|
|
377
427
|
if (key !== tabsKey) {
|
|
378
428
|
tabsKey = key;
|
|
@@ -380,6 +430,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
380
430
|
}
|
|
381
431
|
write(active, current);
|
|
382
432
|
write(activeId, current?.id ?? 0);
|
|
433
|
+
write(bindings, state.preferences.keybindings);
|
|
383
434
|
show(current);
|
|
384
435
|
view.busy = state.busy > 0;
|
|
385
436
|
view.canUndo = state.canUndoFiles;
|
|
@@ -408,7 +459,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
408
459
|
view.peek = false;
|
|
409
460
|
view.ready = false;
|
|
410
461
|
}
|
|
411
|
-
let path = current
|
|
462
|
+
let path = current && !current.compare ? current.path : '';
|
|
412
463
|
if (view.path !== path) {
|
|
413
464
|
view.path = path;
|
|
414
465
|
treeState.selected = path;
|
|
@@ -420,6 +471,10 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
420
471
|
reveal();
|
|
421
472
|
}
|
|
422
473
|
function choose(entry) {
|
|
474
|
+
if (entry.group === PALETTE.group && entry.id === PALETTE.id) {
|
|
475
|
+
settle = openKeybindings;
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
423
478
|
let opened = model.open(entry.id);
|
|
424
479
|
settle = () => {
|
|
425
480
|
void opened.then(focusEditor);
|
|
@@ -433,7 +488,9 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
433
488
|
view.compact = entry.contentRect.width <= COMPACT_WIDTH;
|
|
434
489
|
});
|
|
435
490
|
bridge();
|
|
491
|
+
element.setAttribute('aria-keyshortcuts', declare(element.getAttribute('aria-keyshortcuts'), OPEN[0]));
|
|
436
492
|
element.ownerDocument.addEventListener('keydown', keydown, { signal: listening.signal });
|
|
493
|
+
element.ownerDocument.addEventListener('keydown', chords.keydown, { capture: true, signal: listening.signal });
|
|
437
494
|
element.addEventListener('close', () => {
|
|
438
495
|
let next = settle;
|
|
439
496
|
settle = undefined;
|
|
@@ -441,8 +498,12 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
441
498
|
}, { capture: true, signal: listening.signal });
|
|
442
499
|
model.setConfirmation(ask);
|
|
443
500
|
onCleanup(model.subscribe(bridge));
|
|
501
|
+
onCleanup(hosting.connect(element));
|
|
502
|
+
onCleanup(navigation.connect(element));
|
|
503
|
+
onCleanup(statusBar.connect(element));
|
|
444
504
|
onCleanup(() => {
|
|
445
505
|
listening.abort();
|
|
506
|
+
chords.cancel();
|
|
446
507
|
unobserve();
|
|
447
508
|
confirmation?.resolve('cancel');
|
|
448
509
|
model.setConfirmation(undefined);
|
|
@@ -455,7 +516,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
455
516
|
});
|
|
456
517
|
effect(() => {
|
|
457
518
|
let tab = read(active);
|
|
458
|
-
if (!tab) {
|
|
519
|
+
if (!tab || tab.compare) {
|
|
459
520
|
view.position = '';
|
|
460
521
|
return;
|
|
461
522
|
}
|
|
@@ -475,7 +536,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
475
536
|
if (path && treeStore.get(path)?.type === 'file') {
|
|
476
537
|
untrack(() => {
|
|
477
538
|
if (path !== model.state.active?.path) {
|
|
478
|
-
void model.open(path);
|
|
539
|
+
void model.open(path, undefined, undefined, true);
|
|
479
540
|
}
|
|
480
541
|
});
|
|
481
542
|
}
|
|
@@ -493,7 +554,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
493
554
|
untrack(() => confirmation?.resolve('cancel'));
|
|
494
555
|
}
|
|
495
556
|
});
|
|
496
|
-
void
|
|
557
|
+
void hosting.restore();
|
|
497
558
|
return dispose;
|
|
498
559
|
});
|
|
499
560
|
}
|
|
@@ -613,17 +674,21 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
613
674
|
treeState.selected = path;
|
|
614
675
|
}
|
|
615
676
|
}
|
|
677
|
+
function openKeybindings() {
|
|
678
|
+
palette.active = false;
|
|
679
|
+
keyboard.active = true;
|
|
680
|
+
}
|
|
616
681
|
function pane() {
|
|
617
682
|
let next = read(shown);
|
|
618
683
|
if (!next) {
|
|
619
684
|
return (() => {
|
|
620
|
-
let
|
|
621
|
-
template_u1.slot(
|
|
622
|
-
let
|
|
623
|
-
template_u1.slot(
|
|
624
|
-
return
|
|
685
|
+
let root_03uclqu5 = template_03uclqu6(), element_03uclqu7 = root_03uclqu5.firstChild.firstElementChild;
|
|
686
|
+
template_u1.slot(element_03uclqu7, keys(['Mod', 'P']).map((key) => {
|
|
687
|
+
let root_03uclqu8 = template_03uclqu9(), element_03uclqua = root_03uclqu8.firstChild;
|
|
688
|
+
template_u1.slot(element_03uclqua, key, 1);
|
|
689
|
+
return root_03uclqu8;
|
|
625
690
|
}), 1);
|
|
626
|
-
return
|
|
691
|
+
return root_03uclqu5;
|
|
627
692
|
})();
|
|
628
693
|
}
|
|
629
694
|
let current = next.released ? { editor: next.editor, path: signal(next.tab.path), released: false, tab: next.tab } : next, bound = {
|
|
@@ -685,30 +750,40 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
685
750
|
}
|
|
686
751
|
function results(groups) {
|
|
687
752
|
return (() => {
|
|
688
|
-
let
|
|
689
|
-
template_u1.slot(
|
|
690
|
-
template_u1.slot(
|
|
691
|
-
let
|
|
692
|
-
template_u1.slot(
|
|
693
|
-
template_u1.slot(
|
|
694
|
-
let
|
|
695
|
-
template_u1.slot(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
753
|
+
let root_03uclqub = template_03uclquc(), element_03uclqud = root_03uclqub.firstChild, element_03uclque = element_03uclqud.nextSibling;
|
|
754
|
+
template_u1.slot(element_03uclqud, highlight({ class: 'command-highlight', hover: false, target: '.command-option' }));
|
|
755
|
+
template_u1.slot(element_03uclque, groups.map((group) => {
|
|
756
|
+
let root_03uclquf = template_03uclqug(), element_03uclquh = root_03uclquf.firstChild, element_03uclqui = element_03uclquh.firstElementChild;
|
|
757
|
+
template_u1.slot(element_03uclqui, group.label, 1);
|
|
758
|
+
template_u1.slot(element_03uclquh, group.items.map((item) => {
|
|
759
|
+
let root_03uclquj = template_03uclquk(), element_03uclqul = root_03uclquj.firstChild, element_03uclqum = element_03uclqul.firstChild;
|
|
760
|
+
template_u1.slot(element_03uclqum, item.command?.icon
|
|
761
|
+
? icon({ 'aria-hidden': 'true', class: 'code-workspace-command-icon' }, item.command.icon)
|
|
762
|
+
: fileTreeIcon({ name: name(item.id), type: 'file' }, false));
|
|
763
|
+
template_u1.slot(element_03uclqul, item.content, 2);
|
|
764
|
+
template_u1.setProperties(element_03uclqul, item.attributes);
|
|
765
|
+
return root_03uclquj;
|
|
699
766
|
}), 2);
|
|
700
|
-
template_u1.setProperty(
|
|
701
|
-
template_u1.setProperty(
|
|
702
|
-
return
|
|
767
|
+
template_u1.setProperty(element_03uclqui, 'id', group.id);
|
|
768
|
+
template_u1.setProperty(element_03uclquh, 'aria-labelledby', group.id);
|
|
769
|
+
return root_03uclquf;
|
|
703
770
|
}));
|
|
704
|
-
return
|
|
771
|
+
return root_03uclqub;
|
|
705
772
|
})();
|
|
706
773
|
}
|
|
707
774
|
function remember(current) {
|
|
708
775
|
let element = current.controller.scroller;
|
|
709
776
|
current.tab.scroll = { left: element.scrollLeft, top: element.scrollTop };
|
|
777
|
+
hosting.remember(current.tab, current.controller);
|
|
778
|
+
}
|
|
779
|
+
function remount() {
|
|
780
|
+
if (mount) {
|
|
781
|
+
unmount(mount);
|
|
782
|
+
}
|
|
783
|
+
show(model.state.active);
|
|
710
784
|
}
|
|
711
785
|
function restore(current) {
|
|
786
|
+
hosting.shown(current.tab, current.controller);
|
|
712
787
|
let element = current.controller.scroller, { left, top } = current.tab.scroll, tab = current.tab;
|
|
713
788
|
element.scrollLeft = left;
|
|
714
789
|
element.scrollTop = top;
|
|
@@ -751,11 +826,18 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
751
826
|
return [...treeState.selection].filter((path) => treeStore.get(path));
|
|
752
827
|
}
|
|
753
828
|
function settings(tab, path) {
|
|
829
|
+
let options = typeof editorOptions === 'function' ? editorOptions(tab) : editorOptions;
|
|
754
830
|
return {
|
|
755
831
|
fold: true,
|
|
756
832
|
minimap: true,
|
|
757
|
-
|
|
833
|
+
onMerge: () => {
|
|
834
|
+
void strip.merge(tab);
|
|
835
|
+
},
|
|
836
|
+
...options,
|
|
837
|
+
...statusBar.options(tab),
|
|
838
|
+
...(model.host.baseline ? { baseline: hosting.baseline(path) } : {}),
|
|
758
839
|
fileName: path,
|
|
840
|
+
keybindings: merge(options?.keybindings, read(bindings)),
|
|
759
841
|
label: path,
|
|
760
842
|
whitespace: view.whitespace,
|
|
761
843
|
wrap: view.wrap
|
|
@@ -765,7 +847,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
765
847
|
if (mount?.tab === tab) {
|
|
766
848
|
return;
|
|
767
849
|
}
|
|
768
|
-
let editor = tab && (editorFor?.(tab) ?? codeEditor);
|
|
850
|
+
let editor = tab && (strip.editor(tab) ?? editorFor?.(tab) ?? codeEditor);
|
|
769
851
|
if (tab && mount?.controller?.setDocument && mount.editor === editor) {
|
|
770
852
|
retarget(mount, tab);
|
|
771
853
|
return;
|
|
@@ -777,38 +859,39 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
777
859
|
write(shown, mount);
|
|
778
860
|
}
|
|
779
861
|
function tab(entry) {
|
|
780
|
-
let chosen = () => signal.selector(activeId, entry.id), file =
|
|
862
|
+
let chosen = () => signal.selector(activeId, entry.id), file = strip.label(entry);
|
|
781
863
|
return (() => {
|
|
782
|
-
let
|
|
783
|
-
template_u1.slot(
|
|
784
|
-
template_u1.slot(
|
|
785
|
-
|
|
786
|
-
template_u1.
|
|
787
|
-
template_u1.
|
|
788
|
-
template_u1.setProperty(
|
|
789
|
-
template_u1.
|
|
864
|
+
let root_03uclqun = template_03uclquo(), element_03uclqup = root_03uclqun.firstChild, element_03uclquq = element_03uclqup.firstChild, element_03uclqur = element_03uclqup.firstElementChild, element_03uclqus = element_03uclquq.nextSibling.nextSibling, element_03uclqut = element_03uclqus.nextSibling, element_03uclquu = element_03uclqur.nextElementSibling;
|
|
865
|
+
template_u1.slot(element_03uclquq, fileTreeIcon({ name: file, type: 'file' }, false));
|
|
866
|
+
template_u1.slot(element_03uclqur, file, 1);
|
|
867
|
+
template_u1.slot(element_03uclqus, strip.pin(entry));
|
|
868
|
+
new template_u1.EffectSlot(element_03uclqut, () => read(flag(entry)) && template_03uclquv());
|
|
869
|
+
template_u1.slot(element_03uclquu, icon({ 'aria-hidden': 'true', class: 'code-workspace-tab-close-icon' }, close), 1);
|
|
870
|
+
template_u1.setProperty(element_03uclquu, 'aria-label', template_u1.interpolate(["Close ", (file)]));
|
|
871
|
+
template_u1.setProperty(element_03uclquu, 'title', label('Close', ['Mod', 'W']));
|
|
872
|
+
template_u1.delegate(element_03uclquu, 'click', (event) => {
|
|
790
873
|
event.stopPropagation();
|
|
791
874
|
void model.close(entry.path);
|
|
792
875
|
});
|
|
793
|
-
template_u1.setProperty(
|
|
794
|
-
template_u1.setProperty(
|
|
795
|
-
template_u1.setProperty(
|
|
796
|
-
template_u1.setProperty(
|
|
797
|
-
template_u1.setList(
|
|
798
|
-
template_u1.delegate(
|
|
876
|
+
template_u1.setProperty(element_03uclqup, 'aria-controls', template_u1.interpolate([(id), "-panel"]));
|
|
877
|
+
template_u1.setProperty(element_03uclqup, 'id', template_u1.interpolate([(id), "-tab-", (entry.id)]));
|
|
878
|
+
template_u1.setProperty(element_03uclqup, 'title', strip.title(entry));
|
|
879
|
+
template_u1.setProperty(element_03uclqup, 'aria-selected', () => (chosen() ? 'true' : 'false'));
|
|
880
|
+
template_u1.setList(element_03uclqup, 'class', () => chosen() && '--active');
|
|
881
|
+
template_u1.delegate(element_03uclqup, 'auxclick', (event) => {
|
|
799
882
|
if (event.button === 1) {
|
|
800
883
|
event.preventDefault();
|
|
801
884
|
void model.close(entry.path);
|
|
802
885
|
}
|
|
803
886
|
});
|
|
804
|
-
template_u1.delegate(
|
|
887
|
+
template_u1.delegate(element_03uclqup, 'click', () => {
|
|
805
888
|
model.activate(entry);
|
|
806
889
|
focusEditor();
|
|
807
890
|
});
|
|
808
|
-
template_u1.onconnect(
|
|
891
|
+
template_u1.onconnect(element_03uclqup, (element) => {
|
|
809
892
|
elements.set(entry, element);
|
|
810
893
|
});
|
|
811
|
-
template_u1.delegate(
|
|
894
|
+
template_u1.delegate(element_03uclqup, 'keydown', (event) => {
|
|
812
895
|
let list = untrack(() => read(tabs)), at = list.indexOf(entry), next;
|
|
813
896
|
if (event.key === 'ArrowRight') {
|
|
814
897
|
next = list[(at + 1) % list.length];
|
|
@@ -834,8 +917,9 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
834
917
|
elements.get(next)?.focus();
|
|
835
918
|
}
|
|
836
919
|
});
|
|
837
|
-
template_u1.setProperty(
|
|
838
|
-
|
|
920
|
+
template_u1.setProperty(element_03uclqup, 'tabindex', () => (chosen() ? 0 : -1));
|
|
921
|
+
template_u1.setProperties(element_03uclqup, strip.attributes(entry));
|
|
922
|
+
return root_03uclqun;
|
|
839
923
|
})();
|
|
840
924
|
}
|
|
841
925
|
function toggle(key) {
|
|
@@ -851,6 +935,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
851
935
|
current.released = true;
|
|
852
936
|
if (mount === current) {
|
|
853
937
|
mount = undefined;
|
|
938
|
+
statusBar.attach(undefined);
|
|
854
939
|
}
|
|
855
940
|
if (controller?.host.isConnected) {
|
|
856
941
|
remember(current);
|
|
@@ -863,13 +948,16 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
863
948
|
delete: (paths = selected()) => model.delete(paths),
|
|
864
949
|
dispose: () => {
|
|
865
950
|
release?.();
|
|
951
|
+
hosting.dispose();
|
|
866
952
|
model.dispose();
|
|
867
953
|
},
|
|
868
954
|
get editor() {
|
|
869
955
|
return mount?.controller;
|
|
870
956
|
},
|
|
871
957
|
focus: focusEditor,
|
|
958
|
+
keybindings: openKeybindings,
|
|
872
959
|
model,
|
|
960
|
+
navigate: (kind, backward) => navigation.go(kind, backward),
|
|
873
961
|
open: (path, line, column) => model.open(path, line, column),
|
|
874
962
|
quickOpen,
|
|
875
963
|
refresh: () => model.refresh(),
|
|
@@ -906,6 +994,7 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
906
994
|
void model.copyPath(paths()[0]);
|
|
907
995
|
}
|
|
908
996
|
},
|
|
997
|
+
...strip.items(() => paths()),
|
|
909
998
|
...(model.host.actions ?? []).map((action) => ({
|
|
910
999
|
danger: action.danger,
|
|
911
1000
|
hidden: () => !paths().length || (!!action.visible && !action.visible(paths())),
|
|
@@ -926,14 +1015,14 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
926
1015
|
], paths = () => read(target)?.paths ?? [], single = () => paths().length === 1;
|
|
927
1016
|
receive?.(api);
|
|
928
1017
|
return (() => {
|
|
929
|
-
let
|
|
930
|
-
template_u1.slot(
|
|
1018
|
+
let root_03uclquz = template_03uclqu10(), element_03uclqu11 = root_03uclquz.firstChild, element_03uclqu12 = element_03uclqu11.firstElementChild, element_03uclqu13 = element_03uclqu12.firstElementChild, element_03uclqu14 = element_03uclqu13.firstElementChild.firstChild, element_03uclqu15 = element_03uclqu14.nextSibling, element_03uclqu16 = element_03uclqu15.nextSibling, element_03uclqu17 = element_03uclqu16.nextSibling, element_03uclqu18 = element_03uclqu13.firstElementChild, element_03uclqu19 = element_03uclqu18.nextElementSibling.firstChild, element_03uclqu1a = element_03uclqu18.nextElementSibling, element_03uclqu1b = element_03uclqu12.nextElementSibling, element_03uclqu1c = element_03uclqu1b.firstElementChild, element_03uclqu1d = element_03uclqu1c.firstChild, element_03uclqu1e = element_03uclqu1c.nextElementSibling.firstChild, element_03uclqu1f = element_03uclqu1c.nextElementSibling.firstElementChild.firstChild, element_03uclqu1g = element_03uclqu1f.nextSibling, element_03uclqu1h = element_03uclqu1g.nextSibling, element_03uclqu1i = element_03uclqu1c.nextElementSibling.firstElementChild, element_03uclqu1j = element_03uclqu1c.nextElementSibling.nextElementSibling, element_03uclqu1k = element_03uclqu1b.nextElementSibling.firstElementChild, element_03uclqu1l = element_03uclqu1k.nextElementSibling, element_03uclqu1m = element_03uclqu1b.nextElementSibling.firstChild.nextSibling.nextSibling, element_03uclqu1n = element_03uclqu1l.nextElementSibling, element_03uclqu1o = element_03uclqu1b.nextElementSibling.nextElementSibling, element_03uclqu1p = element_03uclqu1o.firstChild, element_03uclqu1q = element_03uclqu1p.nextSibling, element_03uclqu1r = element_03uclqu11.firstChild.nextSibling.nextSibling.nextSibling.nextSibling, element_03uclqu1s = element_03uclqu1r.nextSibling;
|
|
1019
|
+
template_u1.slot(element_03uclqu14, control({
|
|
931
1020
|
label: () => (view.left ? 'Move file explorer to right' : 'Move file explorer to left'),
|
|
932
1021
|
onclick: api.toggleExplorerSide,
|
|
933
1022
|
sprite: () => (view.left ? right : left)
|
|
934
1023
|
}));
|
|
935
|
-
template_u1.slot(
|
|
936
|
-
template_u1.slot(
|
|
1024
|
+
template_u1.slot(element_03uclqu15, control({ label: 'Collapse all folders', onclick: api.collapseAll, sprite: collapse }));
|
|
1025
|
+
template_u1.slot(element_03uclqu16, control({
|
|
937
1026
|
disabled: () => !view.canUndo || view.busy,
|
|
938
1027
|
label: 'Undo file operation',
|
|
939
1028
|
onclick: () => {
|
|
@@ -941,8 +1030,8 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
941
1030
|
},
|
|
942
1031
|
sprite: undo
|
|
943
1032
|
}));
|
|
944
|
-
template_u1.slot(
|
|
945
|
-
template_u1.slot(
|
|
1033
|
+
template_u1.slot(element_03uclqu17, control({ label: label('Go to file', ['Mod', 'P']), onclick: () => quickOpen(), sprite: magnifier }));
|
|
1034
|
+
template_u1.slot(element_03uclqu18, input({
|
|
946
1035
|
'aria-label': 'Search files',
|
|
947
1036
|
autocomplete: 'off',
|
|
948
1037
|
class: 'code-workspace-search',
|
|
@@ -955,17 +1044,18 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
955
1044
|
type: 'search',
|
|
956
1045
|
value: () => view.search
|
|
957
1046
|
}), 2);
|
|
958
|
-
template_u1.
|
|
1047
|
+
new template_u1.EffectSlot(element_03uclqu19, () => hosting.ready() && untrack(() => fileTree({
|
|
959
1048
|
class: 'code-workspace-files',
|
|
960
1049
|
compact: true,
|
|
961
1050
|
controller: (value) => {
|
|
962
1051
|
tree = value;
|
|
963
1052
|
value.search(view.search);
|
|
964
1053
|
},
|
|
965
|
-
decorations,
|
|
1054
|
+
decorations: [hosting.marks, ...[provided ?? []].flat(), decorations],
|
|
966
1055
|
editor: treeEditor,
|
|
967
1056
|
elements: treeStore,
|
|
968
|
-
empty: () =>
|
|
1057
|
+
empty: () => template_03uclqu1t(),
|
|
1058
|
+
export: hosting.export,
|
|
969
1059
|
find: 'filter',
|
|
970
1060
|
menu: (elements, position) => {
|
|
971
1061
|
if (!elements.length || !actions) {
|
|
@@ -975,13 +1065,14 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
975
1065
|
flush();
|
|
976
1066
|
actions.open(position);
|
|
977
1067
|
},
|
|
978
|
-
open: (element) => {
|
|
979
|
-
void model.open(element.id);
|
|
1068
|
+
open: (element, open) => {
|
|
1069
|
+
void model.open(element.id, undefined, undefined, open.mode === 'preview');
|
|
980
1070
|
},
|
|
981
1071
|
operations: {
|
|
982
1072
|
delete: (elements) => {
|
|
983
1073
|
void model.delete(elements.map((element) => element.id));
|
|
984
|
-
}
|
|
1074
|
+
},
|
|
1075
|
+
import: hosting.import
|
|
985
1076
|
},
|
|
986
1077
|
preview: 'immediate',
|
|
987
1078
|
rename: async (element, value) => {
|
|
@@ -993,52 +1084,53 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
993
1084
|
searched: (query) => {
|
|
994
1085
|
view.search = query;
|
|
995
1086
|
},
|
|
1087
|
+
snapshot: hosting.explorer,
|
|
996
1088
|
state: treeState,
|
|
997
1089
|
typing: 'typeahead'
|
|
998
|
-
}));
|
|
999
|
-
new template_u1.EffectSlot(
|
|
1090
|
+
})));
|
|
1091
|
+
new template_u1.EffectSlot(element_03uclqu1a, () => {
|
|
1000
1092
|
if (view.error) {
|
|
1001
1093
|
return (() => {
|
|
1002
|
-
let
|
|
1003
|
-
template_u1.slot(
|
|
1004
|
-
template_u1.delegate(
|
|
1094
|
+
let root_03uclqu1u = template_03uclqu1v(), element_03uclqu1w = root_03uclqu1u.firstChild.firstChild, element_03uclqu1x = root_03uclqu1u.firstChild.firstElementChild;
|
|
1095
|
+
template_u1.slot(element_03uclqu1w, view.error);
|
|
1096
|
+
template_u1.delegate(element_03uclqu1x, 'click', () => {
|
|
1005
1097
|
void model.refresh();
|
|
1006
1098
|
});
|
|
1007
|
-
return
|
|
1099
|
+
return root_03uclqu1u;
|
|
1008
1100
|
})();
|
|
1009
1101
|
}
|
|
1010
|
-
return !view.loaded &&
|
|
1102
|
+
return !view.loaded && template_03uclqu1y();
|
|
1011
1103
|
}, 2);
|
|
1012
|
-
new template_u1.EffectSlot(
|
|
1013
|
-
let
|
|
1014
|
-
template_u1.delegate(
|
|
1015
|
-
template_u1.on(
|
|
1016
|
-
return
|
|
1104
|
+
new template_u1.EffectSlot(element_03uclqu12, () => view.collapsed && !view.ready && (() => {
|
|
1105
|
+
let root_03uclqu1z = template_03uclqu20(), element_03uclqu21 = root_03uclqu1z.firstChild;
|
|
1106
|
+
template_u1.delegate(element_03uclqu21, 'click', reach);
|
|
1107
|
+
template_u1.on(element_03uclqu21, 'focus', reach);
|
|
1108
|
+
return root_03uclqu1z;
|
|
1017
1109
|
})(), 2);
|
|
1018
|
-
template_u1.slot(
|
|
1019
|
-
new template_u1.EffectSlot(
|
|
1020
|
-
new template_u1.EffectSlot(
|
|
1021
|
-
template_u1.
|
|
1110
|
+
template_u1.slot(element_03uclqu1d, highlight({ class: 'code-workspace-tabs-highlight', line: 'bottom' }));
|
|
1111
|
+
new template_u1.EffectSlot(element_03uclqu1c, () => read(tabs).map(tab), 2);
|
|
1112
|
+
new template_u1.EffectSlot(element_03uclqu1e, crumbs);
|
|
1113
|
+
new template_u1.EffectSlot(element_03uclqu1f, statusBar.save(() => control({
|
|
1022
1114
|
disabled: () => !view.tabs || view.busy,
|
|
1023
1115
|
label: label('Save file', ['Mod', 'S']),
|
|
1024
1116
|
onclick: () => {
|
|
1025
1117
|
void model.save();
|
|
1026
1118
|
},
|
|
1027
1119
|
sprite: save
|
|
1028
|
-
}));
|
|
1029
|
-
template_u1.slot(
|
|
1120
|
+
})));
|
|
1121
|
+
template_u1.slot(element_03uclqu1g, control({
|
|
1030
1122
|
active: () => view.wrap,
|
|
1031
1123
|
label: () => (view.wrap ? 'Disable wrap' : 'Wrap long lines'),
|
|
1032
1124
|
onclick: api.toggleWrap,
|
|
1033
1125
|
sprite: wrap
|
|
1034
1126
|
}));
|
|
1035
|
-
template_u1.slot(
|
|
1127
|
+
template_u1.slot(element_03uclqu1h, control({
|
|
1036
1128
|
active: () => view.whitespace,
|
|
1037
1129
|
label: () => (view.whitespace ? 'Hide whitespace' : 'Show whitespace'),
|
|
1038
1130
|
onclick: api.toggleWhitespace,
|
|
1039
1131
|
sprite: whitespace
|
|
1040
1132
|
}));
|
|
1041
|
-
template_u1.slot(
|
|
1133
|
+
template_u1.slot(element_03uclqu1i, sidebar({
|
|
1042
1134
|
'aria-label': () => (view.explorerOpen ? 'Hide file explorer' : 'Show file explorer'),
|
|
1043
1135
|
class: 'code-workspace-control',
|
|
1044
1136
|
onclick: api.toggleExplorer,
|
|
@@ -1046,11 +1138,12 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
1046
1138
|
side: () => (view.left ? 'left' : 'right'),
|
|
1047
1139
|
title: () => (view.explorerOpen ? 'Hide file explorer' : 'Show file explorer')
|
|
1048
1140
|
}), 2);
|
|
1049
|
-
new template_u1.EffectSlot(
|
|
1050
|
-
new template_u1.EffectSlot(
|
|
1051
|
-
new template_u1.EffectSlot(
|
|
1052
|
-
new template_u1.EffectSlot(
|
|
1053
|
-
template_u1.
|
|
1141
|
+
new template_u1.EffectSlot(element_03uclqu1j, pane, 1);
|
|
1142
|
+
new template_u1.EffectSlot(element_03uclqu1k, () => view.cwd, 1);
|
|
1143
|
+
new template_u1.EffectSlot(element_03uclqu1l, () => view.position, 1);
|
|
1144
|
+
new template_u1.EffectSlot(element_03uclqu1m, statusBar.items);
|
|
1145
|
+
new template_u1.EffectSlot(element_03uclqu1n, () => view.status, 1);
|
|
1146
|
+
template_u1.slot(element_03uclqu1p, tooltip.context({
|
|
1054
1147
|
class: 'code-workspace-menu',
|
|
1055
1148
|
controller: (value) => {
|
|
1056
1149
|
actions = value;
|
|
@@ -1058,8 +1151,10 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
1058
1151
|
items,
|
|
1059
1152
|
[tooltip.context.panel]: { 'aria-label': 'File actions', class: 'code-workspace-menu-panel' }
|
|
1060
1153
|
}, ''));
|
|
1061
|
-
template_u1.
|
|
1062
|
-
|
|
1154
|
+
new template_u1.EffectSlot(element_03uclqu1q, statusBar.menu);
|
|
1155
|
+
template_u1.slot(element_03uclqu1o, strip.menu(), 2);
|
|
1156
|
+
template_u1.slot(element_03uclqu1r, command({
|
|
1157
|
+
commands: () => [PALETTE, ...read(files).map((path) => ({ group: 'Files', id: path, label: path }))],
|
|
1063
1158
|
hotkey: [],
|
|
1064
1159
|
label: 'Go to file',
|
|
1065
1160
|
limit: 50,
|
|
@@ -1071,54 +1166,65 @@ const workspace = ({ addons, controller: receive, cwd = '', editor: editorFor, e
|
|
|
1071
1166
|
trigger: false,
|
|
1072
1167
|
[command.dialog]: { 'aria-label': 'Go to file' }
|
|
1073
1168
|
}));
|
|
1074
|
-
template_u1.slot(
|
|
1169
|
+
template_u1.slot(element_03uclqu1s, shortcuts({
|
|
1170
|
+
apple: mac(),
|
|
1171
|
+
id,
|
|
1172
|
+
keybindings: () => read(bindings),
|
|
1173
|
+
onchange: (next) => model.setPreferences({ keybindings: next }),
|
|
1174
|
+
state: keyboard
|
|
1175
|
+
}));
|
|
1176
|
+
template_u1.slot(element_03uclqu11, overlay({
|
|
1075
1177
|
'aria-labelledby': `${id}-confirm`,
|
|
1076
1178
|
class: 'card overlay--alert code-workspace-confirm',
|
|
1077
1179
|
state: dialog
|
|
1078
1180
|
}, (() => {
|
|
1079
|
-
let
|
|
1080
|
-
new template_u1.EffectSlot(
|
|
1081
|
-
new template_u1.EffectSlot(
|
|
1181
|
+
let root_03uclqu22 = template_03uclqu23(), element_03uclqu24 = root_03uclqu22.firstChild, element_03uclqu25 = element_03uclqu24.nextSibling, element_03uclqu26 = element_03uclqu25.nextSibling, element_03uclqu27 = element_03uclqu26.nextSibling.firstElementChild, element_03uclqu28 = element_03uclqu27.nextElementSibling, element_03uclqu29 = element_03uclqu28.nextElementSibling;
|
|
1182
|
+
new template_u1.EffectSlot(element_03uclqu25, () => read(request)?.dirty.join(', '), 1);
|
|
1183
|
+
new template_u1.EffectSlot(element_03uclqu26, () => (read(request)?.kind === 'delete'
|
|
1082
1184
|
? 'Save before deleting, discard the drafts, or cancel deletion.'
|
|
1083
1185
|
: 'Save the drafts, discard them, or keep them open.'), 1);
|
|
1084
|
-
template_u1.delegate(
|
|
1085
|
-
template_u1.delegate(
|
|
1086
|
-
template_u1.delegate(
|
|
1087
|
-
template_u1.setProperty(
|
|
1088
|
-
return
|
|
1186
|
+
template_u1.delegate(element_03uclqu29, 'click', () => confirmation?.resolve('save'));
|
|
1187
|
+
template_u1.delegate(element_03uclqu28, 'click', () => confirmation?.resolve('discard'));
|
|
1188
|
+
template_u1.delegate(element_03uclqu27, 'click', () => confirmation?.resolve('cancel'));
|
|
1189
|
+
template_u1.setProperty(element_03uclqu24, 'id', template_u1.interpolate([(id), "-confirm"]));
|
|
1190
|
+
return root_03uclqu22;
|
|
1089
1191
|
})()), 2);
|
|
1090
|
-
template_u1.
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
template_u1.
|
|
1094
|
-
template_u1.setProperty(
|
|
1095
|
-
template_u1.
|
|
1096
|
-
template_u1.
|
|
1192
|
+
template_u1.onconnect(element_03uclqu1o, (element) => {
|
|
1193
|
+
element.showPopover();
|
|
1194
|
+
});
|
|
1195
|
+
template_u1.setList(element_03uclqu1n, 'class', () => view.statusError && 'code-workspace-status-message--error');
|
|
1196
|
+
template_u1.setProperty(element_03uclqu1j, 'id', template_u1.interpolate([(id), "-panel"]));
|
|
1197
|
+
template_u1.setProperty(element_03uclqu1j, 'aria-labelledby', () => (read(activeId) ? `${id}-tab-${read(activeId)}` : undefined));
|
|
1198
|
+
template_u1.setProperties(element_03uclqu1c, scrollbar());
|
|
1199
|
+
template_u1.on(element_03uclqu1b, 'pointerenter', () => peek(false));
|
|
1200
|
+
template_u1.setProperty(element_03uclqu13, 'inert', () => view.collapsed && !view.ready);
|
|
1201
|
+
template_u1.on(element_03uclqu12, 'focusin', () => peek(true, true));
|
|
1202
|
+
template_u1.on(element_03uclqu12, 'pointerenter', (event) => {
|
|
1097
1203
|
if (!event.currentTarget.getAnimations().length) {
|
|
1098
1204
|
peek(true);
|
|
1099
1205
|
}
|
|
1100
1206
|
});
|
|
1101
|
-
template_u1.delegate(
|
|
1207
|
+
template_u1.delegate(element_03uclqu12, 'transitionend', (event) => {
|
|
1102
1208
|
if (event.target === event.currentTarget && event.propertyName === 'translate') {
|
|
1103
1209
|
view.ready = view.peek;
|
|
1104
1210
|
}
|
|
1105
1211
|
});
|
|
1106
|
-
template_u1.setProperties(
|
|
1107
|
-
template_u1.setList(
|
|
1212
|
+
template_u1.setProperties(element_03uclqu11, attributes);
|
|
1213
|
+
template_u1.setList(element_03uclqu11, 'class', [
|
|
1108
1214
|
() => view.collapsed && 'code-workspace--collapsed',
|
|
1109
1215
|
() => view.left && 'code-workspace--left',
|
|
1110
1216
|
() => view.peek && 'code-workspace--peek',
|
|
1111
1217
|
() => view.compact && view.tabs && view.explorerOpen && 'code-workspace--stacked',
|
|
1112
1218
|
() => view.tabs && 'code-workspace--tabs'
|
|
1113
1219
|
]);
|
|
1114
|
-
template_u1.onconnect(
|
|
1115
|
-
template_u1.on(
|
|
1220
|
+
template_u1.onconnect(element_03uclqu11, connect);
|
|
1221
|
+
template_u1.on(element_03uclqu11, 'pointerenter', () => {
|
|
1116
1222
|
hovered = true;
|
|
1117
1223
|
});
|
|
1118
|
-
template_u1.on(
|
|
1224
|
+
template_u1.on(element_03uclqu11, 'pointerleave', () => {
|
|
1119
1225
|
hovered = false;
|
|
1120
1226
|
});
|
|
1121
|
-
return
|
|
1227
|
+
return root_03uclquz;
|
|
1122
1228
|
})();
|
|
1123
1229
|
};
|
|
1124
1230
|
export default component(workspace);
|