@esportsplus/ui 0.59.1 → 0.61.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/.audit/audit.json +2810 -0
- package/.audit/check-scss.mjs +20 -0
- package/.audit/rules-audit.md +542 -0
- package/README.md +42 -31
- package/RULES.md +115 -0
- package/build/components/accordion/index.d.ts +12 -2175
- package/build/components/accordion/index.js +3 -4
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/index.js +47 -64
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/copy.d.ts +6 -4
- package/build/components/button/copy.js +24 -20
- package/build/components/button/faces.d.ts +0 -1
- package/build/components/button/faces.js +5 -6
- package/build/components/button/index.d.ts +3 -7
- package/build/components/button/index.js +3 -5
- package/build/components/button/kbd.d.ts +12 -8
- package/build/components/button/kbd.js +59 -74
- package/build/components/button/morph/index.d.ts +2169 -0
- package/build/components/button/morph/index.js +4 -0
- package/build/components/button/morph/save.d.ts +19 -0
- package/build/components/button/morph/save.js +57 -0
- package/build/components/button/morph/template.d.ts +22 -0
- package/build/components/button/morph/template.js +90 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.js +2 -2
- package/build/components/button/split.d.ts +1 -1
- package/build/components/button/split.js +11 -15
- package/build/components/capslock/index.js +6 -5
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/index.js +103 -111
- package/build/components/cc/scss/index.scss +1 -1
- package/build/components/chat/index.d.ts +6 -0
- package/build/components/chat/index.js +3 -0
- package/build/components/chat/minimap/index.d.ts +52 -0
- package/build/components/chat/minimap/index.js +248 -0
- package/build/components/{chat-minimap/range.js → chat/minimap/model.js} +1 -1
- package/build/components/{chat-minimap → chat/minimap}/spy.d.ts +1 -1
- package/build/components/{chat-minimap → chat/minimap}/spy.js +1 -1
- package/build/components/checkbox/index.d.ts +1 -0
- package/build/components/checkbox/index.js +1 -0
- package/build/components/checkbox/options.d.ts +0 -1
- package/build/components/checkbox/options.js +0 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/clipboard/index.d.ts +3 -2181
- package/build/components/clipboard/index.js +2 -3
- package/build/components/color-picker/index.d.ts +21 -0
- package/build/components/color-picker/index.js +153 -138
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +6 -93
- package/build/components/command/index.js +4 -601
- package/build/components/command/palette.d.ts +103 -0
- package/build/components/command/palette.js +595 -0
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +37 -0
- package/build/components/command/search.js +67 -0
- package/build/components/counter/index.d.ts +15 -4
- package/build/components/counter/index.js +3 -2
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/index.d.ts +24 -5
- package/build/components/dock/index.js +389 -51
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/markdown/index.d.ts +3 -22
- package/build/components/editor/markdown/index.js +3 -30
- package/build/components/editor/markdown/render.js +3 -5
- package/build/components/editor/markdown/template.d.ts +22 -0
- package/build/components/editor/markdown/template.js +30 -0
- package/build/components/editor/tree/find.js +3 -3
- package/build/components/editor/tree/index.d.ts +3 -116
- package/build/components/editor/tree/index.js +3 -2225
- package/build/components/editor/tree/template.d.ts +116 -0
- package/build/components/editor/tree/template.js +2225 -0
- package/build/components/editor/viewer/index.d.ts +3 -26
- package/build/components/editor/viewer/index.js +3 -249
- package/build/components/editor/viewer/template.d.ts +26 -0
- package/build/components/editor/viewer/template.js +249 -0
- package/build/components/editor/workspace/index.d.ts +4 -65
- package/build/components/editor/workspace/index.js +4 -1228
- package/build/components/editor/workspace/model.d.ts +29 -37
- package/build/components/editor/workspace/model.js +186 -155
- package/build/components/editor/workspace/session.d.ts +3 -0
- package/build/components/editor/workspace/session.js +61 -34
- package/build/components/editor/workspace/shortcuts.d.ts +0 -2
- package/build/components/editor/workspace/shortcuts.js +0 -2
- package/build/components/editor/workspace/status.d.ts +4 -5
- package/build/components/editor/workspace/status.js +79 -61
- package/build/components/editor/workspace/statusbar.d.ts +5 -3
- package/build/components/editor/workspace/statusbar.js +66 -80
- package/build/components/editor/workspace/strip.d.ts +1 -2
- package/build/components/editor/workspace/strip.js +4 -3
- package/build/components/editor/workspace/tabs.d.ts +35 -3
- package/build/components/editor/workspace/tabs.js +75 -13
- package/build/components/editor/workspace/template.d.ts +65 -0
- package/build/components/editor/workspace/template.js +1145 -0
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +0 -3
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/form/index.d.ts +6 -32
- package/build/components/form/index.js +2 -1
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/group/index.d.ts +12 -0
- package/build/components/group/index.js +15 -0
- package/build/components/group/scss/index.scss +2 -0
- package/build/components/heatmap/index.js +10 -32
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.d.ts +2 -3
- package/build/components/highlight/index.js +79 -78
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +4 -3
- package/build/components/icon/index.js +2 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/index.d.ts +3 -16
- package/build/components/image/index.js +2 -2
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +6 -4
- package/build/components/index.js +6 -4
- package/build/components/inline-edit/index.js +5 -4
- package/build/components/inline-edit/rich.js +79 -82
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/status.js +4 -3
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.js +84 -67
- package/build/components/json/index.d.ts +4 -3
- package/build/components/json/index.js +2 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/index.js +74 -71
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/metric/flash.js +12 -11
- 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/toc.d.ts +8 -13
- package/build/components/nav/toc.js +9 -21
- package/build/components/nav/tree.d.ts +13 -14
- package/build/components/nav/tree.js +32 -19
- package/build/components/notification/index.d.ts +14 -3
- package/build/components/notification/index.js +4 -3
- 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/cards.d.ts +1 -0
- package/build/components/pagination/cards.js +4 -6
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/panels/dnd.d.ts +47 -0
- package/build/components/panels/dnd.js +106 -0
- package/build/components/panels/group.d.ts +35 -0
- package/build/components/panels/group.js +319 -0
- package/build/components/panels/index.d.ts +25 -0
- package/build/components/panels/index.js +520 -0
- package/build/components/panels/model.d.ts +64 -0
- package/build/components/panels/model.js +446 -0
- package/build/components/panels/resize.d.ts +9 -0
- package/build/components/panels/resize.js +87 -0
- package/build/components/panels/scss/index.scss +2 -0
- package/build/components/panels/subtree.d.ts +3 -0
- package/build/components/panels/subtree.js +43 -0
- package/build/components/preview/buttons.d.ts +20 -0
- package/build/components/preview/buttons.js +26 -0
- package/build/components/{copy/index.d.ts → preview/code.d.ts} +3 -9
- package/build/components/preview/code.js +18 -0
- package/build/components/preview/header.d.ts +16 -0
- package/build/components/preview/header.js +18 -0
- package/build/components/preview/index.d.ts +8704 -0
- package/build/components/preview/index.js +123 -0
- package/build/components/preview/scss/index.scss +2 -0
- package/build/components/preview/source.d.ts +21 -0
- package/build/components/preview/source.js +76 -0
- package/build/components/preview/stage.d.ts +16 -0
- package/build/components/preview/stage.js +24 -0
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.js +9 -11
- package/build/components/radio/index.d.ts +3 -2
- package/build/components/radio/index.js +2 -2
- package/build/components/range/filter.js +8 -9
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/index.js +4 -7
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +72 -59
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shell/index.d.ts +22 -0
- package/build/components/shell/index.js +272 -0
- package/build/components/shell/scss/index.scss +2 -0
- package/build/components/shortcut-recorder/index.d.ts +2 -3
- package/build/components/shortcut-recorder/index.js +3 -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/scss/index.scss +1 -1
- package/build/components/story/index.d.ts +10 -6
- package/build/components/story/index.js +27 -47
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/index.js +13 -16
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/switch/index.d.ts +3 -2
- package/build/components/switch/index.js +2 -2
- package/build/components/tasklist/index.js +3 -1
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/theme/index.d.ts +6 -2
- package/build/components/theme/index.js +4 -3
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/theme-picker/cards.d.ts +13 -0
- package/build/components/theme-picker/cards.js +17 -0
- package/build/components/theme-picker/index.d.ts +9 -49
- package/build/components/theme-picker/index.js +5 -165
- package/build/components/theme-picker/scss/index.scss +1 -1
- package/build/components/theme-picker/shared.d.ts +26 -0
- package/build/components/theme-picker/shared.js +24 -0
- package/build/components/theme-picker/swatches.d.ts +13 -0
- package/build/components/theme-picker/swatches.js +17 -0
- package/build/components/theme-picker/toggle.d.ts +19 -0
- package/build/components/theme-picker/toggle.js +109 -0
- package/build/components/toast/index.js +10 -10
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.d.ts +2 -0
- package/build/components/tooltip/menu.js +88 -45
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.js +2 -2
- package/build/components/typewriter/rotate.js +7 -16
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/index.js +26 -33
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/modifiers/background/scss/index.scss +2 -0
- package/build/modifiers/border/scss/index.scss +2 -0
- package/build/modifiers/box-shadow/scss/index.scss +2 -0
- package/build/modifiers/color/scss/index.scss +2 -0
- package/build/modifiers/scrollbar/scss/index.scss +1 -1
- package/build/shared/animation.js +1 -1
- package/build/shared/drag.d.ts +2 -1
- package/build/shared/drag.js +4 -3
- package/package.json +5 -5
- package/scripts/code-editor-services.test.mjs +1 -1
- package/scripts/code-editor-workspace.test.mjs +28 -18
- package/scripts/panels.test.mjs +262 -0
- package/scripts/workspace-keybindings.test.mjs +1 -1
- package/scripts/workspace-session.test.mjs +8 -6
- package/scripts/workspace-status.test.mjs +9 -1
- package/scripts/workspace-tabs.test.mjs +5 -5
- package/src/components/accordion/index.ts +11 -8
- package/src/components/accordion/scss/index.scss +15 -15
- package/src/components/accordion/scss/variables.scss +11 -7
- package/src/components/announcement/scss/index.scss +21 -24
- package/src/components/announcement/scss/variables.scss +13 -7
- package/src/components/breadcrumb/index.ts +8 -10
- package/src/components/breadcrumb/scss/index.scss +48 -122
- package/src/components/breadcrumb/scss/variables.scss +73 -55
- package/src/components/button/copy.ts +34 -27
- package/src/components/button/faces.ts +2 -4
- package/src/components/button/index.ts +3 -7
- package/src/components/button/kbd.ts +37 -95
- package/src/components/button/morph/index.ts +6 -0
- package/src/components/button/morph/save.ts +55 -0
- package/src/components/button/morph/template.ts +135 -0
- package/src/components/button/scss/index.scss +218 -99
- package/src/components/button/scss/variables.scss +160 -115
- package/src/components/button/sidebar.ts +6 -6
- package/src/components/button/split.ts +5 -6
- package/src/components/capslock/index.ts +9 -8
- package/src/components/capslock/scss/index.scss +21 -25
- package/src/components/capslock/scss/variables.scss +31 -12
- package/src/components/card/scss/index.scss +9 -24
- package/src/components/card/scss/variables.scss +29 -76
- package/src/components/cc/index.ts +15 -10
- package/src/components/cc/scss/index.scss +110 -153
- package/src/components/cc/scss/variables.scss +231 -44
- package/src/components/chat/index.ts +10 -0
- package/src/components/{chat-minimap → chat/minimap}/index.ts +66 -21
- package/src/components/{chat-minimap → chat/minimap}/scss/index.scss +26 -54
- package/src/components/chat/minimap/scss/variables.scss +178 -0
- package/src/components/{chat-minimap → chat/minimap}/spy.ts +1 -1
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox/options.ts +0 -1
- package/src/components/checkbox/scss/index.scss +25 -31
- package/src/components/checkbox/scss/variables.scss +50 -19
- package/src/components/clipboard/index.ts +4 -3
- package/src/components/color-picker/index.ts +131 -67
- package/src/components/color-picker/scss/index.scss +138 -221
- package/src/components/color-picker/scss/variables.scss +228 -81
- package/src/components/command/index.ts +5 -860
- package/src/components/command/palette.ts +879 -0
- package/src/components/command/scss/index.scss +82 -99
- package/src/components/command/scss/variables.scss +129 -50
- package/src/components/command/search.ts +67 -0
- package/src/components/counter/index.ts +90 -85
- package/src/components/counter/scss/index.scss +32 -41
- package/src/components/counter/scss/variables.scss +44 -16
- package/src/components/datalist/scss/index.scss +25 -25
- package/src/components/datalist/scss/variables.scss +21 -11
- package/src/components/dock/index.ts +505 -42
- package/src/components/dock/scss/index.scss +318 -73
- package/src/components/dock/scss/variables.scss +310 -39
- package/src/components/editor/code/features.ts +0 -1
- package/src/components/editor/code/find.ts +0 -1
- package/src/components/editor/code/keymap.ts +0 -1
- package/src/components/editor/code/scss/_editor.scss +12 -31
- package/src/components/editor/code/scss/_features.scss +12 -45
- package/src/components/editor/code/scss/_services.scss +15 -23
- package/src/components/editor/code/scss/index.scss +1 -1
- package/src/components/editor/code/scss/variables.scss +195 -42
- package/src/components/editor/code/view.ts +0 -1
- package/src/components/editor/diffs/scss/_diffs.scss +24 -77
- package/src/components/editor/diffs/scss/_merge.scss +5 -16
- package/src/components/editor/diffs/scss/index.scss +1 -1
- package/src/components/editor/diffs/scss/variables.scss +148 -11
- package/src/components/editor/markdown/index.ts +3 -67
- package/src/components/editor/markdown/render.ts +3 -6
- package/src/components/editor/markdown/scss/index.scss +30 -48
- package/src/components/editor/markdown/scss/variables.scss +117 -32
- package/src/components/editor/markdown/template.ts +69 -0
- package/src/components/editor/tree/drag.ts +5 -2
- package/src/components/editor/tree/find.ts +5 -4
- package/src/components/editor/tree/index.ts +3 -3434
- package/src/components/editor/tree/scss/index.scss +204 -262
- package/src/components/editor/tree/scss/variables.scss +198 -31
- package/src/components/editor/tree/template.ts +3436 -0
- package/src/components/editor/viewer/index.ts +3 -318
- package/src/components/editor/viewer/scss/_viewer.scss +15 -31
- package/src/components/editor/viewer/scss/index.scss +1 -1
- package/src/components/editor/viewer/scss/variables.scss +56 -14
- package/src/components/editor/viewer/template.ts +321 -0
- package/src/components/editor/workspace/index.ts +4 -1480
- package/src/components/editor/workspace/model.ts +225 -185
- package/src/components/editor/workspace/scss/_keybindings.scss +163 -0
- package/src/components/editor/workspace/scss/{status.scss → _status.scss} +11 -44
- package/src/components/editor/workspace/scss/_tabs.scss +57 -0
- package/src/components/editor/workspace/scss/index.scss +82 -312
- package/src/components/editor/workspace/scss/variables.scss +427 -0
- package/src/components/editor/workspace/session.ts +80 -44
- package/src/components/editor/workspace/shortcuts.ts +0 -2
- package/src/components/editor/workspace/status.ts +110 -80
- package/src/components/editor/workspace/statusbar.ts +38 -35
- package/src/components/editor/workspace/strip.ts +6 -5
- package/src/components/editor/workspace/tabs.ts +115 -15
- package/src/components/editor/workspace/template.ts +1486 -0
- package/src/components/error/index.ts +3 -0
- package/src/components/error/scss/index.scss +34 -65
- package/src/components/error/scss/variables.scss +28 -9
- package/src/components/filter/index.ts +2 -6
- package/src/components/filter/scss/index.scss +9 -2
- package/src/components/filter/scss/variables.scss +6 -6
- package/src/components/form/index.ts +4 -1
- package/src/components/frame/scss/index.scss +31 -42
- package/src/components/frame/scss/variables.scss +25 -18
- package/src/components/grid/scss/index.scss +2 -1
- package/src/components/group/index.ts +24 -0
- package/src/components/group/scss/index.scss +6 -0
- package/src/components/group/scss/variables.scss +4 -0
- package/src/components/heatmap/index.ts +14 -44
- package/src/components/heatmap/scss/index.scss +38 -44
- package/src/components/heatmap/scss/variables.scss +100 -59
- package/src/components/highlight/index.ts +133 -119
- package/src/components/highlight/scss/index.scss +49 -43
- package/src/components/highlight/scss/variables.scss +71 -30
- package/src/components/icon/index.ts +7 -5
- package/src/components/icon/scss/index.scss +7 -2
- package/src/components/icon/scss/variables.scss +2 -0
- package/src/components/image/index.ts +4 -2
- package/src/components/image/scss/index.scss +14 -22
- package/src/components/image/scss/variables.scss +30 -15
- package/src/components/index.ts +6 -4
- package/src/components/inline-edit/index.ts +3 -2
- package/src/components/inline-edit/rich.ts +17 -15
- package/src/components/inline-edit/scss/index.scss +165 -254
- package/src/components/inline-edit/scss/variables.scss +311 -83
- package/src/components/inline-edit/status.ts +2 -1
- package/src/components/input/scrub.ts +1 -1
- package/src/components/input/scss/_field.scss +1 -1
- package/src/components/input/scss/_scrub.scss +14 -25
- package/src/components/input/scss/_tag.scss +26 -46
- package/src/components/input/scss/variables.scss +167 -77
- package/src/components/input/tag.ts +59 -49
- package/src/components/json/index.ts +4 -1
- package/src/components/link/scss/index.scss +1 -4
- package/src/components/link/scss/variables.scss +5 -1
- package/src/components/loading/scss/index.scss +3 -23
- package/src/components/loading/scss/variables.scss +3 -6
- package/src/components/marquee/index.ts +33 -28
- package/src/components/marquee/scss/index.scss +32 -26
- package/src/components/marquee/scss/variables.scss +35 -23
- package/src/components/metric/flash.ts +2 -1
- package/src/components/metric/scss/_flash.scss +125 -145
- package/src/components/metric/scss/index.scss +31 -43
- package/src/components/metric/scss/variables.scss +192 -98
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +46 -49
- package/src/components/nav/scss/variables.scss +61 -64
- package/src/components/nav/spy.ts +2 -0
- package/src/components/nav/toc.ts +11 -31
- package/src/components/nav/tree.ts +56 -24
- package/src/components/notification/index.ts +94 -89
- package/src/components/notification/scss/index.scss +77 -76
- package/src/components/notification/scss/variables.scss +55 -38
- package/src/components/overlay/index.ts +3 -1
- package/src/components/overlay/scss/index.scss +94 -114
- package/src/components/overlay/scss/variables.scss +46 -18
- package/src/components/page/scss/variables.scss +1 -1
- package/src/components/pagination/cards.ts +2 -1
- package/src/components/pagination/scss/index.scss +191 -7
- package/src/components/pagination/scss/variables.scss +112 -36
- package/src/components/panels/dnd.ts +184 -0
- package/src/components/panels/group.ts +437 -0
- package/src/components/panels/index.ts +678 -0
- package/src/components/panels/model.ts +675 -0
- package/src/components/panels/resize.ts +131 -0
- package/src/components/panels/scss/index.scss +394 -0
- package/src/components/panels/scss/variables.scss +197 -0
- package/src/components/panels/subtree.ts +65 -0
- package/src/components/preview/buttons.ts +48 -0
- package/src/components/preview/code.ts +28 -0
- package/src/components/preview/header.ts +23 -0
- package/src/components/preview/index.ts +144 -0
- package/src/components/preview/scss/index.scss +143 -0
- package/src/components/preview/scss/variables.scss +127 -0
- package/src/components/preview/source.ts +73 -0
- package/src/components/preview/stage.ts +33 -0
- package/src/components/progress/scss/index.scss +117 -15
- package/src/components/progress/scss/variables.scss +140 -40
- package/src/components/progress/text.ts +5 -4
- package/src/components/radio/index.ts +2 -4
- package/src/components/range/filter.ts +7 -11
- package/src/components/range/scss/_filter.scss +301 -327
- package/src/components/range/scss/_slider.scss +31 -110
- package/src/components/range/scss/_vertical.scss +8 -20
- package/src/components/range/scss/index.scss +1 -4
- package/src/components/range/scss/variables.scss +374 -70
- package/src/components/relative-time/index.ts +9 -14
- package/src/components/relative-time/scss/index.scss +13 -21
- package/src/components/relative-time/scss/variables.scss +46 -29
- package/src/components/root/scss/index.scss +11 -20
- package/src/components/root/scss/variables.scss +17 -15
- package/src/components/select/index.ts +37 -15
- package/src/components/select/scss/index.scss +24 -51
- package/src/components/select/scss/variables.scss +77 -19
- package/src/components/shell/index.ts +321 -0
- package/src/components/shell/scss/index.scss +214 -0
- package/src/components/shell/scss/variables.scss +89 -0
- package/src/components/shortcut-recorder/index.ts +6 -3
- package/src/components/shortcut-recorder/scss/index.scss +71 -56
- package/src/components/shortcut-recorder/scss/variables.scss +47 -21
- package/src/components/sortable/index.ts +1 -0
- package/src/components/sortable/scss/index.scss +37 -42
- package/src/components/sortable/scss/variables.scss +76 -52
- package/src/components/sticky-header/scss/index.scss +11 -10
- package/src/components/sticky-header/scss/variables.scss +36 -4
- package/src/components/story/index.ts +1 -36
- package/src/components/story/scss/index.scss +22 -98
- package/src/components/story/scss/variables.scss +57 -15
- package/src/components/surface-field/index.ts +18 -20
- package/src/components/surface-field/scss/index.scss +32 -46
- package/src/components/surface-field/scss/variables.scss +92 -23
- package/src/components/switch/index.ts +2 -4
- package/src/components/tasklist/index.ts +8 -2
- package/src/components/tasklist/scss/index.scss +7 -7
- package/src/components/tasklist/scss/variables.scss +18 -13
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/scss/index.scss +9 -7
- package/src/components/textarea/scss/variables.scss +2 -2
- package/src/components/theme/index.ts +12 -4
- package/src/components/theme/scss/index.scss +13 -0
- package/src/components/theme/scss/variables.scss +5 -16
- package/src/components/theme-picker/cards.ts +19 -0
- package/src/components/theme-picker/index.ts +6 -225
- package/src/components/theme-picker/scss/index.scss +77 -167
- package/src/components/theme-picker/scss/variables.scss +220 -0
- package/src/components/theme-picker/shared.ts +54 -0
- package/src/components/theme-picker/swatches.ts +15 -0
- package/src/components/theme-picker/toggle.ts +150 -0
- package/src/components/toast/index.ts +14 -14
- package/src/components/toast/scss/index.scss +130 -155
- package/src/components/toast/scss/variables.scss +89 -52
- package/src/components/tooltip/menu.ts +77 -10
- package/src/components/tooltip/scss/_menu.scss +96 -138
- package/src/components/tooltip/scss/_shared.scss +93 -90
- package/src/components/tooltip/scss/index.scss +52 -54
- package/src/components/tooltip/scss/variables.scss +187 -67
- package/src/components/tooltip/shared.ts +8 -6
- package/src/components/typewriter/rotate.ts +15 -24
- package/src/components/typewriter/scss/index.scss +131 -3
- package/src/components/typewriter/scss/variables.scss +56 -44
- package/src/components/uptime/index.ts +1 -13
- package/src/components/uptime/scss/index.scss +28 -66
- package/src/components/uptime/scss/variables.scss +63 -48
- package/src/components/usage-meter/scss/index.scss +19 -19
- package/src/components/usage-meter/scss/variables.scss +80 -35
- package/src/css-utilities/absolute.scss +54 -52
- package/src/css-utilities/background.scss +22 -24
- package/src/css-utilities/border.scss +21 -21
- package/src/css-utilities/box-shadow.scss +32 -21
- package/src/css-utilities/color.scss +23 -21
- package/src/css-utilities/flex.scss +55 -53
- package/src/css-utilities/group.scss +7 -0
- package/src/css-utilities/hidden.scss +22 -20
- package/src/css-utilities/icon.scss +32 -30
- package/src/css-utilities/layer.scss +10 -10
- package/src/css-utilities/reset.scss +27 -16
- package/src/css-utilities/surface.scss +206 -128
- package/src/css-utilities/text.scss +114 -114
- package/src/modifiers/background/scss/index.scss +1 -0
- package/src/modifiers/background/scss/variables.scss +24 -0
- package/src/modifiers/border/scss/index.scss +1 -0
- package/src/modifiers/border/scss/variables.scss +21 -0
- package/src/modifiers/box-shadow/scss/index.scss +1 -0
- package/src/modifiers/box-shadow/scss/variables.scss +12 -0
- package/src/modifiers/color/scss/index.scss +1 -0
- package/src/modifiers/color/scss/variables.scss +10 -0
- package/src/modifiers/scrollbar/scss/index.scss +3 -2
- package/src/modifiers/scrollbar/scss/variables.scss +4 -3
- package/src/shared/animation.ts +3 -3
- package/src/shared/drag.ts +8 -3
- package/src/tokens/scss/color.scss +53 -37
- package/src/tokens/scss/index.scss +0 -1
- package/src/tokens/scss/state.scss +16 -1
- package/storage/svg/code.svg +1 -1
- package/storage/svg/collapse.svg +1 -0
- package/storage/svg/grid.svg +1 -0
- package/storage/svg/stack.svg +1 -0
- package/build/components/banner/scss/index.scss +0 -2
- package/build/components/button/fan.d.ts +0 -24
- package/build/components/button/fan.js +0 -118
- package/build/components/button/hold.d.ts +0 -31
- package/build/components/button/hold.js +0 -115
- package/build/components/button/icons.d.ts +0 -6
- package/build/components/button/icons.js +0 -35
- package/build/components/button/loading.d.ts +0 -22
- package/build/components/button/loading.js +0 -60
- package/build/components/button/morph.d.ts +0 -22
- package/build/components/button/morph.js +0 -115
- package/build/components/card/expand.d.ts +0 -22
- package/build/components/card/expand.js +0 -118
- package/build/components/card/index.d.ts +0 -6
- package/build/components/card/index.js +0 -4
- package/build/components/chat-minimap/index.d.ts +0 -28
- package/build/components/chat-minimap/index.js +0 -223
- package/build/components/chat-minimap/scss/index.scss +0 -2
- package/build/components/clipboard/copy.d.ts +0 -27
- package/build/components/clipboard/copy.js +0 -48
- package/build/components/copy/index.js +0 -61
- package/build/components/copy/scss/index.scss +0 -2
- package/build/components/highlight/easing.d.ts +0 -2
- package/build/components/highlight/easing.js +0 -19
- package/build/components/pull-to-refresh/index.d.ts +0 -18
- package/build/components/pull-to-refresh/index.js +0 -222
- package/build/components/pull-to-refresh/scss/index.scss +0 -2
- package/src/components/banner/scss/index.scss +0 -37
- package/src/components/banner/scss/variables.scss +0 -16
- package/src/components/button/fan.ts +0 -170
- package/src/components/button/hold.ts +0 -154
- package/src/components/button/icons.ts +0 -21
- package/src/components/button/loading.ts +0 -77
- package/src/components/button/morph.ts +0 -153
- package/src/components/button/scss/_fan.scss +0 -121
- package/src/components/button/scss/_kbd.scss +0 -11
- package/src/components/button/scss/_morph.scss +0 -107
- package/src/components/button/scss/_sidebar.scss +0 -61
- package/src/components/button/scss/_split.scss +0 -53
- package/src/components/card/expand.ts +0 -141
- package/src/components/card/index.ts +0 -8
- package/src/components/card/scss/_expand.scss +0 -234
- package/src/components/chat-minimap/scss/variables.scss +0 -97
- package/src/components/clipboard/copy.ts +0 -49
- package/src/components/copy/index.ts +0 -69
- package/src/components/copy/scss/index.scss +0 -52
- package/src/components/copy/scss/variables.scss +0 -19
- package/src/components/editor/workspace/scss/keybindings.scss +0 -190
- package/src/components/editor/workspace/scss/tabs.scss +0 -56
- package/src/components/highlight/easing.ts +0 -33
- package/src/components/pagination/scss/_arrows.scss +0 -69
- package/src/components/pagination/scss/_cards.scss +0 -121
- package/src/components/pagination/scss/_dots.scss +0 -64
- package/src/components/progress/scss/_text.scss +0 -135
- package/src/components/pull-to-refresh/index.ts +0 -316
- package/src/components/pull-to-refresh/scss/index.scss +0 -128
- package/src/components/pull-to-refresh/scss/variables.scss +0 -38
- package/src/components/typewriter/scss/_caret.scss +0 -34
- package/src/components/typewriter/scss/_retype.scss +0 -68
- package/src/components/typewriter/scss/_rotate.scss +0 -29
- package/src/tokens/scss/transition.scss +0 -21
- /package/build/components/{chat-minimap/range.d.ts → chat/minimap/model.d.ts} +0 -0
- /package/src/components/{chat-minimap/range.ts → chat/minimap/model.ts} +0 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
@use 'css-utilities/background';
|
|
2
|
+
@use 'css-utilities/border';
|
|
3
|
+
@use 'css-utilities/color';
|
|
4
|
+
@use 'css-utilities/surface';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
// Modifiers only set variables; the layout reads them, so combined states never need combined selectors.
|
|
8
|
+
.code-workspace {
|
|
9
|
+
@extend %background-state, %border-state, %surface-raise;
|
|
10
|
+
--accent: var(--color-accent-400);
|
|
11
|
+
--accent-color: var(--color-white-300);
|
|
12
|
+
--aside-track: minmax(0, 1fr);
|
|
13
|
+
--background-default: var(--surface-background-default);
|
|
14
|
+
--bar-height: var(--size-800);
|
|
15
|
+
--border-color-default: var(--surface-border-default);
|
|
16
|
+
--close-size: var(--size-400);
|
|
17
|
+
--color: var(--color-text-500);
|
|
18
|
+
--columns: var(--main-track) var(--aside-track);
|
|
19
|
+
--content-delay: 0s;
|
|
20
|
+
--content-visibility: visible;
|
|
21
|
+
--control-active-background: var(--surface-background-active);
|
|
22
|
+
--control-size: var(--size-600);
|
|
23
|
+
--dirty-size: calc(var(--size-100) * 0.75);
|
|
24
|
+
--disabled-opacity: 0.45;
|
|
25
|
+
--divider: var(--border-width-400) solid var(--border-color);
|
|
26
|
+
--docked-track: var(--explorer-width);
|
|
27
|
+
--drawer-duration: 0.18s;
|
|
28
|
+
--drawer-hidden: calc(100% - var(--peek-width));
|
|
29
|
+
--drawer-inset-horizontal: auto 0;
|
|
30
|
+
--drawer-offset: var(--drawer-hidden);
|
|
31
|
+
--drawer-shadow: #{surface.shadow(5)};
|
|
32
|
+
--drawer-timing-function: var(--transition-timing-function);
|
|
33
|
+
// At least a usable explorer, even when the workspace itself is narrow.
|
|
34
|
+
--drawer-width: min(100%, max(16rem, 46%));
|
|
35
|
+
--edge-inset-horizontal: 0 auto;
|
|
36
|
+
--error-color: var(--color-red-400);
|
|
37
|
+
--explorer-column: 2;
|
|
38
|
+
--explorer-end: none;
|
|
39
|
+
--explorer-inset-horizontal: auto;
|
|
40
|
+
--explorer-layer: auto;
|
|
41
|
+
--explorer-position: relative;
|
|
42
|
+
--explorer-row: 1 / 3;
|
|
43
|
+
--explorer-shadow: none;
|
|
44
|
+
--explorer-size: auto;
|
|
45
|
+
--explorer-span: var(--explorer-column);
|
|
46
|
+
--explorer-start: var(--divider);
|
|
47
|
+
--explorer-top: none;
|
|
48
|
+
--explorer-translate: 0px;
|
|
49
|
+
--explorer-width: min(22rem, 46%);
|
|
50
|
+
--focus-color: var(--accent);
|
|
51
|
+
--focus-width: var(--border-width-500);
|
|
52
|
+
--font-size: var(--font-size-200);
|
|
53
|
+
--height: 100%;
|
|
54
|
+
--main-column: 1;
|
|
55
|
+
--main-track: 0px;
|
|
56
|
+
--main-visibility: hidden;
|
|
57
|
+
--menu-layer: 3;
|
|
58
|
+
--min-height: 160px;
|
|
59
|
+
--muted-color: var(--color-text-300);
|
|
60
|
+
--peek-width: var(--size-400);
|
|
61
|
+
--radius: var(--border-radius-300);
|
|
62
|
+
--raised: var(--surface-background-default);
|
|
63
|
+
--rows: minmax(0, 1fr) auto;
|
|
64
|
+
--spacing: var(--size-100);
|
|
65
|
+
--spacing-tight: calc(var(--size-100) / 2);
|
|
66
|
+
--status-font-size: var(--font-size-100);
|
|
67
|
+
--status-item-height: var(--size-500);
|
|
68
|
+
--status-item-hover: var(--control-active-background);
|
|
69
|
+
--status-row: 2;
|
|
70
|
+
--tab-height: var(--size-600);
|
|
71
|
+
--tab-hover-background: var(--surface-background-hover);
|
|
72
|
+
--tab-max-width: 160px;
|
|
73
|
+
--tabs-height: var(--size-700);
|
|
74
|
+
|
|
75
|
+
@media (forced-colors: active) {
|
|
76
|
+
--accent: Highlight;
|
|
77
|
+
--accent-color: HighlightText;
|
|
78
|
+
--background-default: Canvas;
|
|
79
|
+
--border-color-default: CanvasText;
|
|
80
|
+
--color: CanvasText;
|
|
81
|
+
--error-color: CanvasText;
|
|
82
|
+
--muted-color: CanvasText;
|
|
83
|
+
--raised: Canvas;
|
|
84
|
+
--surface: Canvas;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (prefers-reduced-motion: reduce) {
|
|
88
|
+
--drawer-duration: 0s;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// A hidden explorer overlays the editor as a drawer that rests offscreen but for its edge.
|
|
93
|
+
&--collapsed {
|
|
94
|
+
// Only the drawer's edge shows at rest; its contents stay hidden until it peeks, and while it slides away.
|
|
95
|
+
--content-delay: var(--drawer-duration);
|
|
96
|
+
--content-visibility: hidden;
|
|
97
|
+
--docked-track: var(--peek-width);
|
|
98
|
+
--explorer-inset-horizontal: var(--drawer-inset-horizontal);
|
|
99
|
+
--explorer-layer: 2;
|
|
100
|
+
--explorer-position: absolute;
|
|
101
|
+
--explorer-shadow: var(--drawer-shadow);
|
|
102
|
+
--explorer-size: var(--drawer-width);
|
|
103
|
+
--explorer-span: 1 / -1;
|
|
104
|
+
--explorer-translate: var(--drawer-offset);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--left {
|
|
108
|
+
--columns: var(--aside-track) var(--main-track);
|
|
109
|
+
--drawer-hidden: calc(var(--peek-width) - 100%);
|
|
110
|
+
--drawer-inset-horizontal: 0 auto;
|
|
111
|
+
--edge-inset-horizontal: auto 0;
|
|
112
|
+
--explorer-column: 1;
|
|
113
|
+
--explorer-end: var(--divider);
|
|
114
|
+
--explorer-start: none;
|
|
115
|
+
--main-column: 2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--peek {
|
|
119
|
+
--content-delay: 0s;
|
|
120
|
+
--content-visibility: visible;
|
|
121
|
+
--drawer-offset: 0px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Follows '--left' so a narrow workspace stacks the same way whichever side the explorer docks on.
|
|
125
|
+
&--stacked {
|
|
126
|
+
--columns: minmax(0, 1fr);
|
|
127
|
+
--explorer-column: 1;
|
|
128
|
+
--explorer-end: none;
|
|
129
|
+
--explorer-row: 2;
|
|
130
|
+
--explorer-start: none;
|
|
131
|
+
--explorer-top: var(--divider);
|
|
132
|
+
--main-column: 1;
|
|
133
|
+
--rows: minmax(0, 3fr) minmax(0, 2fr) auto;
|
|
134
|
+
--status-row: 3;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&--tabs {
|
|
138
|
+
--aside-track: var(--docked-track);
|
|
139
|
+
--main-track: minmax(0, 1fr);
|
|
140
|
+
--main-visibility: visible;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
&-actions {
|
|
145
|
+
--gap-horizontal: var(--spacing-tight);
|
|
146
|
+
--gap-vertical: var(--spacing-tight);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&-autosave {
|
|
150
|
+
@extend %color-text;
|
|
151
|
+
--background-default: transparent;
|
|
152
|
+
--background-hover: var(--control-active-background);
|
|
153
|
+
--border-radius: var(--radius);
|
|
154
|
+
--padding-horizontal: var(--spacing);
|
|
155
|
+
--padding-vertical: 0px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Inline-edit lays its status out under the field; here it sits on the toolbar's line instead.
|
|
159
|
+
&-autosave .inline-edit-status {
|
|
160
|
+
--color: inherit;
|
|
161
|
+
--font-size: var(--status-font-size);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// The label's side keeps its own room; the controls' side takes the spacing.
|
|
165
|
+
&-bar {
|
|
166
|
+
--gap-horizontal: var(--spacing);
|
|
167
|
+
--gap-vertical: var(--spacing);
|
|
168
|
+
--padding-horizontal: var(--spacing);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&-breadcrumb.breadcrumb {
|
|
172
|
+
--font-size: var(--font-size-200);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Chained through '.icon' so these win over the icon's own size regardless of stylesheet order.
|
|
176
|
+
&-choice-icon.icon,
|
|
177
|
+
&-command-icon.icon {
|
|
178
|
+
--size: var(--size-300);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&-confirm {
|
|
182
|
+
&-actions {
|
|
183
|
+
--gap-horizontal: var(--spacing);
|
|
184
|
+
--gap-vertical: var(--spacing);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&-button {
|
|
188
|
+
--background-default: var(--surface-background-default);
|
|
189
|
+
--background-hover: var(--control-active-background);
|
|
190
|
+
--border-radius: var(--radius);
|
|
191
|
+
--color-default: var(--color);
|
|
192
|
+
--padding-horizontal: var(--size-300);
|
|
193
|
+
--padding-vertical: var(--spacing);
|
|
194
|
+
|
|
195
|
+
&--primary {
|
|
196
|
+
--background-default: var(--accent);
|
|
197
|
+
--background-hover: var(--color-accent-500);
|
|
198
|
+
--color-default: var(--accent-color);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&-text {
|
|
203
|
+
--margin-vertical: var(--spacing);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.card {
|
|
207
|
+
--border-radius: var(--border-radius-500);
|
|
208
|
+
--border-width: 0px;
|
|
209
|
+
--max-width: 440px;
|
|
210
|
+
--padding-horizontal: var(--size-500);
|
|
211
|
+
--padding-vertical: var(--size-500);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&-control {
|
|
216
|
+
@extend %color-text;
|
|
217
|
+
--background-active: var(--control-active-background);
|
|
218
|
+
--background-default: transparent;
|
|
219
|
+
--background-hover: var(--control-active-background);
|
|
220
|
+
--border-radius: var(--radius);
|
|
221
|
+
--padding-horizontal: 0px;
|
|
222
|
+
--padding-vertical: 0px;
|
|
223
|
+
|
|
224
|
+
&-icon.icon {
|
|
225
|
+
--size: var(--size-300);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&-document.code-editor,
|
|
230
|
+
&-document.markdown-editor {
|
|
231
|
+
--border-radius: 0px;
|
|
232
|
+
--border-width: 0px;
|
|
233
|
+
--height: 100%;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&-document.diffs,
|
|
237
|
+
&-merge-editor.diffs-merge {
|
|
238
|
+
--border-radius: 0px;
|
|
239
|
+
--border-width: 0px;
|
|
240
|
+
--height: 100%;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&-empty {
|
|
244
|
+
--gap-horizontal: var(--spacing);
|
|
245
|
+
--gap-vertical: var(--spacing);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&-explorer {
|
|
249
|
+
@extend %surface-raise;
|
|
250
|
+
|
|
251
|
+
&-header {
|
|
252
|
+
--gap-horizontal: var(--spacing-tight);
|
|
253
|
+
--gap-vertical: var(--spacing-tight);
|
|
254
|
+
--padding-horizontal: var(--spacing);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&-keybindings {
|
|
259
|
+
--columns: minmax(0, 1fr) minmax(9rem, auto) 4.5rem 4.5rem;
|
|
260
|
+
--conflict-color: var(--color-red-400);
|
|
261
|
+
--row-height: var(--size-800);
|
|
262
|
+
|
|
263
|
+
&-button {
|
|
264
|
+
--background-default: var(--surface-background-default);
|
|
265
|
+
--background-hover: var(--control-active-background);
|
|
266
|
+
--border-radius: var(--radius);
|
|
267
|
+
--color-default: var(--color);
|
|
268
|
+
--padding-horizontal: var(--size-200);
|
|
269
|
+
--padding-vertical: var(--spacing-tight);
|
|
270
|
+
|
|
271
|
+
&--primary {
|
|
272
|
+
--background-default: var(--accent);
|
|
273
|
+
--background-hover: var(--color-accent-500);
|
|
274
|
+
--color-default: var(--accent-color);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&-conflict,
|
|
279
|
+
&-header,
|
|
280
|
+
&-keys {
|
|
281
|
+
--gap-horizontal: var(--spacing);
|
|
282
|
+
--gap-vertical: var(--spacing);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&-recorder--add.shortcut-recorder {
|
|
286
|
+
--min-width: var(--size-600);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
&-recorder.shortcut-recorder {
|
|
290
|
+
--font-size: var(--font-size-200);
|
|
291
|
+
--height: var(--size-600);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&-row {
|
|
295
|
+
--gap-horizontal: var(--size-200);
|
|
296
|
+
--gap-vertical: var(--size-200);
|
|
297
|
+
--padding-vertical: var(--spacing-tight);
|
|
298
|
+
|
|
299
|
+
&--head {
|
|
300
|
+
--padding-vertical: var(--spacing);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&.card {
|
|
305
|
+
--border-radius: var(--border-radius-500);
|
|
306
|
+
--border-width: 0px;
|
|
307
|
+
--max-width: 760px;
|
|
308
|
+
--padding-horizontal: var(--size-500);
|
|
309
|
+
--padding-vertical: var(--size-500);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&-keys {
|
|
314
|
+
--gap-horizontal: var(--spacing-tight);
|
|
315
|
+
--gap-vertical: var(--spacing-tight);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
&-merge-bar {
|
|
319
|
+
--gap-horizontal: var(--spacing);
|
|
320
|
+
--gap-vertical: var(--spacing);
|
|
321
|
+
--padding-horizontal: var(--size-300);
|
|
322
|
+
--padding-vertical: var(--spacing-tight);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&-merge-cancel {
|
|
326
|
+
--background-default: transparent;
|
|
327
|
+
--background-hover: var(--control-active-background);
|
|
328
|
+
--border-radius: var(--radius);
|
|
329
|
+
--color-default: var(--color);
|
|
330
|
+
--padding-horizontal: var(--size-200);
|
|
331
|
+
--padding-vertical: var(--spacing-tight);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&-notice {
|
|
335
|
+
--gap-horizontal: var(--spacing);
|
|
336
|
+
--gap-vertical: var(--spacing);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&-retry {
|
|
340
|
+
--background-default: var(--background);
|
|
341
|
+
--background-hover: var(--control-active-background);
|
|
342
|
+
--border-radius: var(--radius);
|
|
343
|
+
--color-default: var(--color);
|
|
344
|
+
--padding-horizontal: var(--size-200);
|
|
345
|
+
--padding-vertical: var(--spacing-tight);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
&-search.input {
|
|
349
|
+
--background-default: transparent;
|
|
350
|
+
--border-color-default: transparent;
|
|
351
|
+
--border-radius: var(--radius);
|
|
352
|
+
--color-default: var(--color);
|
|
353
|
+
--font-size: var(--font-size-200);
|
|
354
|
+
--padding-horizontal: var(--spacing);
|
|
355
|
+
--padding-vertical: 0px;
|
|
356
|
+
--size: var(--control-size);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
&-status {
|
|
360
|
+
--gap-horizontal: var(--size-300);
|
|
361
|
+
--gap-vertical: 0px;
|
|
362
|
+
--padding-horizontal: var(--size-300);
|
|
363
|
+
--padding-vertical: var(--spacing-tight);
|
|
364
|
+
|
|
365
|
+
&-icon.icon {
|
|
366
|
+
--size: var(--size-200);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&-item.button {
|
|
370
|
+
--background-default: transparent;
|
|
371
|
+
--background-hover: var(--status-item-hover);
|
|
372
|
+
--border-radius: var(--border-radius-100);
|
|
373
|
+
--color-default: inherit;
|
|
374
|
+
--color-hover: var(--color);
|
|
375
|
+
--gap-horizontal: var(--spacing-tight);
|
|
376
|
+
--padding-horizontal: var(--spacing-tight);
|
|
377
|
+
--padding-vertical: 0px;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
&-items {
|
|
381
|
+
--gap-horizontal: var(--spacing);
|
|
382
|
+
--gap-vertical: var(--spacing);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
&-tab {
|
|
387
|
+
@extend %color-text;
|
|
388
|
+
--background-active: transparent;
|
|
389
|
+
--background-default: transparent;
|
|
390
|
+
--background-hover: transparent;
|
|
391
|
+
--background-pressed: transparent;
|
|
392
|
+
--border-radius: var(--radius);
|
|
393
|
+
--gap-horizontal: var(--spacing-tight);
|
|
394
|
+
--padding-horizontal: var(--spacing);
|
|
395
|
+
--padding-vertical: 0px;
|
|
396
|
+
|
|
397
|
+
&-close {
|
|
398
|
+
--background-default: transparent;
|
|
399
|
+
--background-hover: var(--control-active-background);
|
|
400
|
+
--border-radius: var(--border-radius-100);
|
|
401
|
+
--color-default: inherit;
|
|
402
|
+
--padding-horizontal: 0px;
|
|
403
|
+
--padding-vertical: 0px;
|
|
404
|
+
|
|
405
|
+
&-icon.icon {
|
|
406
|
+
--size: var(--size-200);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
&-pin.icon {
|
|
411
|
+
--size: var(--size-200);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
&-tabs {
|
|
416
|
+
--gap-horizontal: var(--spacing-tight);
|
|
417
|
+
--gap-vertical: var(--spacing-tight);
|
|
418
|
+
--padding-horizontal: var(--spacing);
|
|
419
|
+
--scrollbar-size: calc(var(--size-100) / 2);
|
|
420
|
+
|
|
421
|
+
&-highlight {
|
|
422
|
+
--background-active: var(--control-active-background);
|
|
423
|
+
--background-default: var(--tab-hover-background);
|
|
424
|
+
--border-color: var(--accent);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { effect, read, root, signal, untrack, write, type Signal } from '@esportsplus/reactivity';
|
|
1
|
+
import { effect, onCleanup, read, root, signal, untrack, write, type Signal } from '@esportsplus/reactivity';
|
|
2
2
|
import Decorations, { type Decoration } from '../tree/decorations';
|
|
3
3
|
import type { CodeController } from '../code/view';
|
|
4
4
|
import type { FileTreeElement, FileTreeImportEntry, FileTreeSnapshot } from '../tree';
|
|
5
5
|
import {
|
|
6
6
|
containsPath,
|
|
7
|
-
dirty,
|
|
8
7
|
workspacePath,
|
|
9
8
|
type EditorWorkspaceModel,
|
|
10
9
|
type WorkspaceChange,
|
|
@@ -134,7 +133,7 @@ const hosted = (model: EditorWorkspaceModel, current: () => Shown | undefined, d
|
|
|
134
133
|
selection: selection(tab)
|
|
135
134
|
};
|
|
136
135
|
|
|
137
|
-
if (dirty
|
|
136
|
+
if (tab.dirty || tab.missing) {
|
|
138
137
|
item.draft = tab.document.value;
|
|
139
138
|
}
|
|
140
139
|
|
|
@@ -168,6 +167,47 @@ const hosted = (model: EditorWorkspaceModel, current: () => Shown | undefined, d
|
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
|
|
170
|
+
// A tab is followed while it's open: its edits and selection reschedule the session write, and its baseline is
|
|
171
|
+
// fetched for its path and again whenever its saved text changes. Detached, since it lives as long as the tab.
|
|
172
|
+
function follow(tab: WorkspaceTab) {
|
|
173
|
+
let stop = !tab.compare && host.baseline
|
|
174
|
+
? root(() => effect(() => {
|
|
175
|
+
let path = tab.path;
|
|
176
|
+
|
|
177
|
+
untrack(() => {
|
|
178
|
+
if (!baselines.has(path)) {
|
|
179
|
+
track(tab);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
onCleanup(() => baselines.delete(path));
|
|
184
|
+
|
|
185
|
+
effect(() => {
|
|
186
|
+
let saved = tab.saved;
|
|
187
|
+
|
|
188
|
+
untrack(() => {
|
|
189
|
+
let entry = baselines.get(path);
|
|
190
|
+
|
|
191
|
+
if (entry && entry.saved !== saved) {
|
|
192
|
+
entry.saved = saved;
|
|
193
|
+
entry.fetched = fetch(path, entry);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
}))
|
|
198
|
+
: undefined,
|
|
199
|
+
unsubscribe = tab.document.subscribe((_, change) => {
|
|
200
|
+
if (change.selectionChanged || change.textChanged) {
|
|
201
|
+
schedule();
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
documents.set(tab, () => {
|
|
206
|
+
stop?.();
|
|
207
|
+
unsubscribe();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
171
211
|
function flush() {
|
|
172
212
|
clearTimeout(timer);
|
|
173
213
|
timer = undefined;
|
|
@@ -299,35 +339,10 @@ const hosted = (model: EditorWorkspaceModel, current: () => Shown | undefined, d
|
|
|
299
339
|
}
|
|
300
340
|
}
|
|
301
341
|
|
|
302
|
-
function sync() {
|
|
303
|
-
let open = new Set<string>(),
|
|
304
|
-
tabs = model.state.tabs;
|
|
305
|
-
|
|
342
|
+
function sync(tabs: readonly WorkspaceTab[]) {
|
|
306
343
|
for (let i = 0, n = tabs.length; i < n; i++) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
open.add(tab.path);
|
|
310
|
-
|
|
311
|
-
if (!documents.has(tab)) {
|
|
312
|
-
documents.set(tab, tab.document.subscribe((_, change) => {
|
|
313
|
-
if (change.selectionChanged || change.textChanged) {
|
|
314
|
-
schedule();
|
|
315
|
-
}
|
|
316
|
-
}));
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (!host.baseline) {
|
|
320
|
-
continue;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
let entry = baselines.get(tab.path);
|
|
324
|
-
|
|
325
|
-
if (!entry) {
|
|
326
|
-
track(tab);
|
|
327
|
-
}
|
|
328
|
-
else if (entry.saved !== tab.saved) {
|
|
329
|
-
entry.saved = tab.saved;
|
|
330
|
-
entry.fetched = fetch(tab.path, entry);
|
|
344
|
+
if (!documents.has(tabs[i])) {
|
|
345
|
+
follow(tabs[i]);
|
|
331
346
|
}
|
|
332
347
|
}
|
|
333
348
|
|
|
@@ -339,14 +354,6 @@ const hosted = (model: EditorWorkspaceModel, current: () => Shown | undefined, d
|
|
|
339
354
|
settle(tab, undefined);
|
|
340
355
|
}
|
|
341
356
|
}
|
|
342
|
-
|
|
343
|
-
for (let path of [...baselines.keys()]) {
|
|
344
|
-
if (!open.has(path)) {
|
|
345
|
-
baselines.delete(path);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
schedule();
|
|
350
357
|
}
|
|
351
358
|
|
|
352
359
|
function track(tab: WorkspaceTab) {
|
|
@@ -382,22 +389,51 @@ const hosted = (model: EditorWorkspaceModel, current: () => Shown | undefined, d
|
|
|
382
389
|
|
|
383
390
|
return entry ? read(entry.text) : null;
|
|
384
391
|
},
|
|
392
|
+
// Spread on the workspace. Hot exit: a closing page never disconnects the workspace.
|
|
393
|
+
attributes: {
|
|
394
|
+
onwindowpagehide: flush
|
|
395
|
+
},
|
|
385
396
|
connect(element: HTMLElement) {
|
|
386
397
|
let listening = new AbortController(),
|
|
387
|
-
|
|
398
|
+
release = root((dispose) => {
|
|
399
|
+
effect(() => {
|
|
400
|
+
let tabs = model.state.tabs;
|
|
401
|
+
|
|
402
|
+
untrack(() => sync(tabs));
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
// Whatever the session stores, read here, reschedules its write.
|
|
406
|
+
effect(() => {
|
|
407
|
+
let state = model.state;
|
|
408
|
+
|
|
409
|
+
state.active;
|
|
410
|
+
|
|
411
|
+
for (let i = 0, n = state.tabs.length; i < n; i++) {
|
|
412
|
+
let tab = state.tabs[i];
|
|
413
|
+
|
|
414
|
+
tab.dirty;
|
|
415
|
+
tab.missing;
|
|
416
|
+
tab.path;
|
|
417
|
+
tab.pinned;
|
|
418
|
+
tab.preview;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
untrack(schedule);
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
return dispose;
|
|
425
|
+
}),
|
|
388
426
|
unwatch = model.onWatch(watched);
|
|
389
427
|
|
|
390
428
|
// Scrolling, folding and opening folders tell nothing else, so any gesture in the workspace may be one.
|
|
429
|
+
// Captured, which template's events aren't, since scroll doesn't bubble and a control may stop the rest.
|
|
391
430
|
element.addEventListener('keyup', schedule, { capture: true, passive: true, signal: listening.signal });
|
|
392
431
|
element.addEventListener('pointerup', schedule, { capture: true, passive: true, signal: listening.signal });
|
|
393
432
|
element.addEventListener('scroll', schedule, { capture: true, passive: true, signal: listening.signal });
|
|
394
|
-
// Hot exit: a closing page never disconnects the workspace.
|
|
395
|
-
element.ownerDocument.defaultView?.addEventListener('pagehide', flush, { signal: listening.signal });
|
|
396
|
-
sync();
|
|
397
433
|
|
|
398
434
|
return () => {
|
|
399
435
|
listening.abort();
|
|
400
|
-
|
|
436
|
+
release();
|
|
401
437
|
unwatch();
|
|
402
438
|
flush();
|
|
403
439
|
stopProblems?.();
|