@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
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
@use '/shared';
|
|
2
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/background';
|
|
3
|
+
@use 'css-utilities/reset';
|
|
4
|
+
@use 'css-utilities/surface';
|
|
5
|
+
@use 'css-utilities/text';
|
|
3
6
|
|
|
4
7
|
// Language services. The completion list and hover card are popovers in the top layer, clear of the editor's
|
|
5
8
|
// clipping, placed against anchors that scroll with the text; squiggles are marks on the rendered rows.
|
|
@@ -11,7 +14,10 @@
|
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
&-completion {
|
|
17
|
+
@extend %background-state;
|
|
18
|
+
--background-active: var(--selection-background);
|
|
14
19
|
align-items: center;
|
|
20
|
+
background: var(--background);
|
|
15
21
|
cursor: pointer;
|
|
16
22
|
display: flex;
|
|
17
23
|
gap: var(--completion-gap);
|
|
@@ -19,29 +25,25 @@
|
|
|
19
25
|
padding: 0 var(--completion-padding);
|
|
20
26
|
white-space: nowrap;
|
|
21
27
|
|
|
22
|
-
@include tokens.state(active) {
|
|
23
|
-
background: var(--selection-background);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
28
|
@media (forced-colors: active) {
|
|
27
29
|
@include tokens.state(active) {
|
|
28
30
|
background: Highlight;
|
|
29
31
|
color: HighlightText;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
&-detail {
|
|
36
|
+
@extend %text-truncate;
|
|
37
|
+
color: var(--completion-detail-color);
|
|
38
|
+
margin-left: auto;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
&-label {
|
|
43
|
+
@extend %text-truncate;
|
|
44
|
+
flex: none;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
&-completions {
|
|
@@ -56,11 +58,11 @@
|
|
|
56
58
|
|
|
57
59
|
&-completions,
|
|
58
60
|
&-hover {
|
|
59
|
-
@extend %reset-popover;
|
|
60
|
-
background: var(--background);
|
|
61
|
+
@extend %reset-popover, %surface-raised-level;
|
|
62
|
+
background: var(--surface-background-default);
|
|
61
63
|
border: var(--border-width) solid var(--border-color);
|
|
62
64
|
border-radius: var(--popup-border-radius);
|
|
63
|
-
box-shadow: var(--
|
|
65
|
+
box-shadow: var(--surface-shadow-default);
|
|
64
66
|
box-sizing: border-box;
|
|
65
67
|
color: var(--color);
|
|
66
68
|
font-family: var(--font-family);
|
|
@@ -103,8 +105,11 @@
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
&-problem {
|
|
108
|
+
@extend %background-state;
|
|
109
|
+
--background-hover: var(--active-line-background);
|
|
110
|
+
--background-pressed: var(--background-hover);
|
|
106
111
|
appearance: none;
|
|
107
|
-
background:
|
|
112
|
+
background: var(--background);
|
|
108
113
|
border: 0;
|
|
109
114
|
border-left: var(--caret-width) solid var(--diagnostic-error-color);
|
|
110
115
|
color: inherit;
|
|
@@ -129,14 +134,11 @@
|
|
|
129
134
|
&:focus-visible {
|
|
130
135
|
outline: var(--focus-width) solid var(--focus-color);
|
|
131
136
|
}
|
|
132
|
-
|
|
133
|
-
&:hover {
|
|
134
|
-
background: var(--active-line-background);
|
|
135
|
-
}
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
&-problems {
|
|
139
|
-
|
|
140
|
+
@extend %surface-sunken-level;
|
|
141
|
+
background: var(--surface-background-default);
|
|
140
142
|
border-top: var(--border-width) solid var(--border-color);
|
|
141
143
|
display: none;
|
|
142
144
|
flex: none;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/background';
|
|
3
|
+
@use 'css-utilities/border';
|
|
4
|
+
@use 'css-utilities/font/geist';
|
|
5
|
+
@use 'css-utilities/surface';
|
|
2
6
|
|
|
3
7
|
.code-editor {
|
|
4
|
-
|
|
5
|
-
--background: var(--
|
|
6
|
-
--
|
|
8
|
+
@extend %background-state, %border-state, %font-geist-mono, %surface-raised-level;
|
|
9
|
+
--active-line-background: var(--surface-background-hover);
|
|
10
|
+
--background-default: var(--surface-background-default);
|
|
7
11
|
--bar-control-height: var(--size-700);
|
|
8
12
|
--bar-font-size: var(--font-size-200);
|
|
9
13
|
--bar-gap: var(--size-100);
|
|
10
14
|
--bar-icon-size: var(--size-300);
|
|
11
15
|
--bar-input-width: 160px;
|
|
12
16
|
--bar-padding: var(--size-100);
|
|
13
|
-
--border-color: var(--
|
|
17
|
+
--border-color-default: var(--surface-border-default);
|
|
14
18
|
--border-radius: var(--border-radius-300);
|
|
15
19
|
--border-width: var(--border-width-400);
|
|
16
20
|
--bracket-background: oklch(from var(--color-yellow-400) l c h / 0.45);
|
|
@@ -27,27 +31,26 @@
|
|
|
27
31
|
--completion-padding: var(--size-200);
|
|
28
32
|
--completion-rows: 8;
|
|
29
33
|
--completion-width: 240px;
|
|
30
|
-
--conflict-base-background: oklch(from var(--color-
|
|
34
|
+
--conflict-base-background: oklch(from var(--color-primary-300) l c h / 0.12);
|
|
31
35
|
--conflict-current-background: oklch(from var(--color-green-400) l c h / 0.16);
|
|
32
|
-
--conflict-divider-background: oklch(from var(--color-
|
|
36
|
+
--conflict-divider-background: oklch(from var(--color-primary-300) l c h / 0.2);
|
|
33
37
|
--conflict-incoming-background: oklch(from var(--color-blue-400) l c h / 0.16);
|
|
34
38
|
--diagnostic-error-color: var(--invalid-color);
|
|
35
39
|
--diagnostic-hint-color: var(--muted-color);
|
|
36
40
|
--diagnostic-info-color: var(--focus-color);
|
|
37
|
-
--diagnostic-offset:
|
|
41
|
+
--diagnostic-offset: calc(var(--size-100) / 4);
|
|
38
42
|
--diagnostic-warning-color: var(--color-yellow-500);
|
|
39
43
|
--disabled-opacity: 0.5;
|
|
40
44
|
--drop-width: var(--border-width-500);
|
|
41
45
|
--focus-color: var(--color-blue-400);
|
|
42
46
|
--focus-offset: var(--border-width-400);
|
|
43
47
|
--focus-width: var(--border-width-500);
|
|
44
|
-
--fold-duration:
|
|
48
|
+
--fold-duration: var(--duration-fast);
|
|
45
49
|
--fold-icon-size: var(--size-100);
|
|
46
50
|
--fold-rotate: 0deg;
|
|
47
51
|
--fold-width: var(--size-400);
|
|
48
|
-
--font-family: var(--font-family-mono);
|
|
49
52
|
--font-size: var(--font-size-300);
|
|
50
|
-
--function-color: var(--color-purple-300);
|
|
53
|
+
--function-color: light-dark(var(--color-purple-300), oklch(from var(--color-purple-300) 0.8 0.13 h));
|
|
51
54
|
--gutter-active-color: var(--color);
|
|
52
55
|
--gutter-added-color: var(--color-green-400);
|
|
53
56
|
--gutter-color: var(--color-text-300);
|
|
@@ -61,13 +64,15 @@
|
|
|
61
64
|
--input-color: transparent;
|
|
62
65
|
--input-cursor: text;
|
|
63
66
|
--invalid-color: var(--color-red-400);
|
|
64
|
-
--keyword-color: var(--color-purple-400);
|
|
67
|
+
--keyword-color: light-dark(var(--color-purple-400), oklch(from var(--color-purple-400) 0.75 0.15 h));
|
|
65
68
|
--lens-color: var(--muted-color);
|
|
69
|
+
// Resolved here, since a lens action's color state redefines --color on it.
|
|
70
|
+
--lens-color-hover: var(--color);
|
|
66
71
|
--lens-font-size: 0.85em;
|
|
67
72
|
--lens-gap: var(--size-300);
|
|
68
73
|
--line-height: var(--size-600);
|
|
69
74
|
--line-width: max-content;
|
|
70
|
-
--link-color: var(--color-blue-400);
|
|
75
|
+
--link-color: light-dark(var(--color-blue-400), oklch(from var(--color-blue-400) 0.74 0.14 h));
|
|
71
76
|
// CSS color literals.
|
|
72
77
|
--literal-color: var(--number-color);
|
|
73
78
|
--match-active-background: oklch(from var(--color-yellow-500) l c h / 0.6);
|
|
@@ -76,10 +81,10 @@
|
|
|
76
81
|
--minimap-display: none;
|
|
77
82
|
--minimap-offset: 0px;
|
|
78
83
|
--minimap-opacity: 0.7;
|
|
79
|
-
--minimap-slider-background: oklch(from var(--color-
|
|
84
|
+
--minimap-slider-background: oklch(from var(--color-primary-500) l c h / 0.1);
|
|
80
85
|
--minimap-width: 80px;
|
|
81
86
|
--muted-color: var(--color-text-300);
|
|
82
|
-
--number-color: var(--color-blue-400);
|
|
87
|
+
--number-color: light-dark(var(--color-blue-400), oklch(from var(--color-blue-400) 0.78 0.12 h));
|
|
83
88
|
--number-display: block;
|
|
84
89
|
--number-padding: var(--size-100);
|
|
85
90
|
--number-width: calc(var(--digits) * 1ch + var(--number-padding));
|
|
@@ -91,28 +96,27 @@
|
|
|
91
96
|
--peek-border-color: var(--gutter-modified-color);
|
|
92
97
|
--peek-lines-background: oklch(from var(--color-red-400) l c h / 0.08);
|
|
93
98
|
--peek-max-height: 160px;
|
|
94
|
-
--placeholder-background: oklch(from var(--color-
|
|
99
|
+
--placeholder-background: oklch(from var(--color-primary-300) l c h / 0.15);
|
|
95
100
|
--placeholder-color: var(--color-text-300);
|
|
96
101
|
--popup-border-radius: var(--border-radius-300);
|
|
97
|
-
--
|
|
98
|
-
--
|
|
99
|
-
--
|
|
100
|
-
--
|
|
101
|
-
--ruler-color: var(--color-border-300);
|
|
102
|
+
--problems-max-height: var(--spacer-400);
|
|
103
|
+
--property-color: light-dark(var(--color-blue-500), oklch(from var(--color-blue-500) 0.8 0.1 h));
|
|
104
|
+
--regexp-color: light-dark(var(--color-red-500), oklch(from var(--color-red-500) 0.75 0.14 h));
|
|
105
|
+
--ruler-color: var(--surface-border-default);
|
|
102
106
|
--ruler-width: var(--border-width-400);
|
|
103
107
|
--selection-background: oklch(from var(--color-blue-400) l c h / 0.22);
|
|
104
|
-
--selector-color: var(--color-purple-500);
|
|
105
|
-
--sticky-shadow: 0 2px 4px -2px oklch(from var(--
|
|
106
|
-
--string-color: oklch(from var(--color-green-500) 45% c h);
|
|
108
|
+
--selector-color: light-dark(var(--color-purple-500), oklch(from var(--color-purple-500) 0.78 0.13 h));
|
|
109
|
+
--sticky-shadow: 0 2px 4px -2px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 2.8));
|
|
110
|
+
--string-color: light-dark(oklch(from var(--color-green-500) 45% c h), oklch(from var(--color-green-500) 0.8 0.15 h));
|
|
107
111
|
--swatch-gap: 1px;
|
|
108
112
|
--swatch-size: 0.75em;
|
|
109
|
-
--tag-color: var(--color-red-400);
|
|
110
|
-
--type-color: var(--color-blue-300);
|
|
113
|
+
--tag-color: light-dark(var(--color-red-400), oklch(from var(--color-red-400) 0.72 0.16 h));
|
|
114
|
+
--type-color: light-dark(var(--color-blue-300), oklch(from var(--color-blue-300) 0.76 0.13 h));
|
|
111
115
|
--unicode-color: var(--color-yellow-500);
|
|
112
116
|
--unicode-style: solid;
|
|
113
117
|
--variable-color: var(--color);
|
|
114
118
|
--white-space: pre;
|
|
115
|
-
--whitespace-color: oklch(from var(--color-
|
|
119
|
+
--whitespace-color: oklch(from var(--color-primary-300) l c h / 0.6);
|
|
116
120
|
|
|
117
121
|
&--composing {
|
|
118
122
|
--input-color: var(--color);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { flush, reactive } from '@esportsplus/reactivity';
|
|
2
2
|
import { html, type Attributes } from '@esportsplus/template';
|
|
3
|
+
import scrollbar from '~/modifiers/scrollbar';
|
|
3
4
|
import { clamp } from '~/shared/clamp';
|
|
4
5
|
import { mac } from '~/shared/platform';
|
|
5
6
|
import { observeSize } from '~/shared/resize';
|
|
@@ -51,7 +52,11 @@ type Callbacks = {
|
|
|
51
52
|
type CodeController = Omit<Controller, 'state'> & {
|
|
52
53
|
// A reactive snapshot for toolbars and status bars; read-only.
|
|
53
54
|
readonly state: State;
|
|
55
|
+
// Set once the editor connects; the 'controller' callback runs after that.
|
|
56
|
+
readonly textarea: HTMLTextAreaElement;
|
|
54
57
|
conflicts(): Conflict[];
|
|
58
|
+
// The lines the folded blocks start on, as 'fold' takes them.
|
|
59
|
+
folds(): number[];
|
|
55
60
|
// Each moves the caret to the next or previous one, wrapping around; false when there are none.
|
|
56
61
|
nextChange(): boolean;
|
|
57
62
|
nextConflict(): boolean;
|
|
@@ -69,14 +74,12 @@ type CodeController = Omit<Controller, 'state'> & {
|
|
|
69
74
|
// The controller both editors share; the code editor's is 'CodeController'.
|
|
70
75
|
type Controller = {
|
|
71
76
|
readonly document: EditorDocument;
|
|
72
|
-
// The editor's root element; set once the editor connects, like 'scroller'
|
|
77
|
+
// The editor's root element; set once the editor connects, like 'scroller'.
|
|
73
78
|
readonly host: HTMLElement;
|
|
74
79
|
// The element that scrolls the text.
|
|
75
80
|
readonly scroller: HTMLElement;
|
|
76
81
|
// A reactive snapshot for toolbars and status bars; read-only.
|
|
77
82
|
readonly state: Snapshot;
|
|
78
|
-
// Set once the editor connects; the 'controller' callback runs after that.
|
|
79
|
-
readonly textarea: HTMLTextAreaElement;
|
|
80
83
|
addNextOccurrence(all?: boolean): boolean;
|
|
81
84
|
closeFind(): void;
|
|
82
85
|
dispose(): void;
|
|
@@ -157,6 +160,8 @@ type Options = {
|
|
|
157
160
|
lineNumbers?: boolean;
|
|
158
161
|
// URLs open on Mod+click, in a new tab or through the handler, which also gets file URLs and relative paths.
|
|
159
162
|
links?: boolean | ((url: string) => void);
|
|
163
|
+
// A CSS length, or pixels; left out, the '--min-height' variable applies.
|
|
164
|
+
minHeight?: number | string;
|
|
160
165
|
minimap?: boolean;
|
|
161
166
|
name?: string;
|
|
162
167
|
// Ctrl/Cmd+Space requests completion; text changes stay observable through onChange.
|
|
@@ -285,6 +290,7 @@ const view = (model: EditorDocument, callbacks: Callbacks, receive?: (controller
|
|
|
285
290
|
highlight: true,
|
|
286
291
|
label: 'Code editor',
|
|
287
292
|
lineNumbers: true,
|
|
293
|
+
minHeight: '',
|
|
288
294
|
minimap: false,
|
|
289
295
|
name: '',
|
|
290
296
|
placeholder: '',
|
|
@@ -1452,6 +1458,7 @@ const view = (model: EditorDocument, callbacks: Callbacks, receive?: (controller
|
|
|
1452
1458
|
model.select({ start: 0 });
|
|
1453
1459
|
rebuild();
|
|
1454
1460
|
},
|
|
1461
|
+
folds: () => folded.map((fold) => fold.line),
|
|
1455
1462
|
goToLine: (line, column = 1) => {
|
|
1456
1463
|
if (disposed || ime.busy()) {
|
|
1457
1464
|
return;
|
|
@@ -1630,6 +1637,7 @@ const view = (model: EditorDocument, callbacks: Callbacks, receive?: (controller
|
|
|
1630
1637
|
ui.highlight = options.highlight !== false;
|
|
1631
1638
|
ui.label = options.label ?? 'Code editor';
|
|
1632
1639
|
ui.lineNumbers = options.lineNumbers !== false;
|
|
1640
|
+
ui.minHeight = typeof options.minHeight === 'number' ? `${options.minHeight}px` : options.minHeight ?? '';
|
|
1633
1641
|
ui.minimap = !!options.minimap;
|
|
1634
1642
|
ui.name = options.name ?? '';
|
|
1635
1643
|
ui.placeholder = options.placeholder ?? '';
|
|
@@ -2050,7 +2058,7 @@ const view = (model: EditorDocument, callbacks: Callbacks, receive?: (controller
|
|
|
2050
2058
|
receive?.(controller);
|
|
2051
2059
|
},
|
|
2052
2060
|
ondisconnect: () => controller.dispose(),
|
|
2053
|
-
style: () => `--content-width: ${ui.width}px; --digits: ${ui.digits}; --tab-size: ${ui.tabSize}; --track-height: ${ui.trackHeight}px; --track-width: ${ui.trackWidth}px;`
|
|
2061
|
+
style: () => `--content-width: ${ui.width}px; --digits: ${ui.digits}; --tab-size: ${ui.tabSize}; --track-height: ${ui.trackHeight}px; --track-width: ${ui.trackWidth}px;${ui.minHeight && ` --min-height: ${ui.minHeight};`}`
|
|
2054
2062
|
}}
|
|
2055
2063
|
>
|
|
2056
2064
|
${search.template()}
|
|
@@ -2105,9 +2113,10 @@ const view = (model: EditorDocument, callbacks: Callbacks, receive?: (controller
|
|
|
2105
2113
|
autocapitalize='off'
|
|
2106
2114
|
autocomplete='off'
|
|
2107
2115
|
autocorrect='off'
|
|
2108
|
-
class='code-editor-input
|
|
2116
|
+
class='code-editor-input'
|
|
2109
2117
|
dir='ltr'
|
|
2110
2118
|
spellcheck='false'
|
|
2119
|
+
${scrollbar()}
|
|
2111
2120
|
${field}
|
|
2112
2121
|
${lsp.aria}
|
|
2113
2122
|
${{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { reactive, untrack } from '@esportsplus/reactivity';
|
|
2
2
|
import { component, html, type Attributes } from '@esportsplus/template';
|
|
3
3
|
import icon from '~/components/icon';
|
|
4
|
+
import scrollbar from '~/modifiers/scrollbar';
|
|
4
5
|
import codeEditor, { type Controller } from '../code';
|
|
5
6
|
import { EditorDocument } from '../code/document';
|
|
6
7
|
import { languageFor, type Language } from '../code/syntax';
|
|
@@ -262,7 +263,7 @@ export default component(
|
|
|
262
263
|
return html`
|
|
263
264
|
<div class='diffs-merge-pane diffs-merge-pane--${side}'>
|
|
264
265
|
<div class='diffs-merge-title'>${side === 'current' ? 'Current' : 'Incoming'}</div>
|
|
265
|
-
<div class='diffs-merge-scroller
|
|
266
|
+
<div class='diffs-merge-scroller' tabindex='0' ${scrollbar()}>
|
|
266
267
|
${panes[side].slot.fragment}
|
|
267
268
|
</div>
|
|
268
269
|
</div>
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
@use '/
|
|
1
|
+
@use 'css-utilities/background';
|
|
2
|
+
@use 'css-utilities/box-shadow';
|
|
3
|
+
@use 'css-utilities/color';
|
|
4
|
+
@use 'css-utilities/surface';
|
|
5
|
+
|
|
2
6
|
|
|
3
7
|
.diffs {
|
|
4
8
|
background: var(--background);
|
|
@@ -15,7 +19,11 @@
|
|
|
15
19
|
|
|
16
20
|
|
|
17
21
|
&-action {
|
|
18
|
-
background
|
|
22
|
+
@extend %background-state;
|
|
23
|
+
--background-default: var(--action-background);
|
|
24
|
+
--background-hover: var(--action-hover-background);
|
|
25
|
+
--background-pressed: var(--background-hover);
|
|
26
|
+
background: var(--background);
|
|
19
27
|
border: var(--border-width) solid var(--border-color);
|
|
20
28
|
border-radius: var(--border-radius);
|
|
21
29
|
color: var(--color);
|
|
@@ -28,10 +36,6 @@
|
|
|
28
36
|
&:focus-visible {
|
|
29
37
|
outline: var(--focus-width) solid var(--focus-color);
|
|
30
38
|
}
|
|
31
|
-
|
|
32
|
-
&:hover {
|
|
33
|
-
background: var(--action-hover-background);
|
|
34
|
-
}
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
// Shown for the change under the pointer or holding focus, so a long diff isn't covered in buttons.
|
|
@@ -46,11 +50,19 @@
|
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
&-button {
|
|
53
|
+
@extend %background-state, %color-state;
|
|
54
|
+
--background-active: var(--hover-background);
|
|
55
|
+
--background-hover: var(--hover-background);
|
|
56
|
+
--background-pressed: var(--hover-background);
|
|
57
|
+
--color-active: var(--hover-color);
|
|
58
|
+
--color-default: var(--muted-color);
|
|
59
|
+
--color-hover: var(--hover-color);
|
|
60
|
+
--color-pressed: var(--hover-color);
|
|
49
61
|
align-items: center;
|
|
50
|
-
background:
|
|
62
|
+
background: var(--background);
|
|
51
63
|
border: 0;
|
|
52
64
|
border-radius: var(--border-radius);
|
|
53
|
-
color: var(--
|
|
65
|
+
color: var(--color);
|
|
54
66
|
cursor: pointer;
|
|
55
67
|
display: inline-flex;
|
|
56
68
|
flex: none;
|
|
@@ -62,15 +74,31 @@
|
|
|
62
74
|
padding: 0;
|
|
63
75
|
|
|
64
76
|
&--primary {
|
|
65
|
-
background: var(--accent);
|
|
66
|
-
|
|
77
|
+
--background-default: var(--accent);
|
|
78
|
+
--background-hover: var(--accent);
|
|
79
|
+
--background-pressed: var(--accent);
|
|
80
|
+
--color-default: var(--accent-color);
|
|
81
|
+
--color-hover: var(--accent-color);
|
|
82
|
+
--color-pressed: var(--accent-color);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&--primary:not(:disabled):hover {
|
|
86
|
+
filter: brightness(1.1);
|
|
67
87
|
}
|
|
68
88
|
|
|
69
89
|
&--text {
|
|
70
90
|
padding: 0 var(--size-200);
|
|
71
91
|
}
|
|
72
92
|
|
|
93
|
+
&-icon.icon {
|
|
94
|
+
--size: var(--button-icon-size);
|
|
95
|
+
}
|
|
96
|
+
|
|
73
97
|
&:disabled {
|
|
98
|
+
--background-hover: var(--background-default);
|
|
99
|
+
--background-pressed: var(--background-default);
|
|
100
|
+
--color-hover: var(--color-default);
|
|
101
|
+
--color-pressed: var(--color-default);
|
|
74
102
|
cursor: default;
|
|
75
103
|
opacity: var(--disabled-opacity);
|
|
76
104
|
}
|
|
@@ -79,26 +107,6 @@
|
|
|
79
107
|
outline: var(--focus-width) solid var(--focus-color);
|
|
80
108
|
outline-offset: calc(var(--focus-width) * -1);
|
|
81
109
|
}
|
|
82
|
-
|
|
83
|
-
&:not(:disabled):hover {
|
|
84
|
-
background: var(--hover-background);
|
|
85
|
-
color: var(--color);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@include tokens.state(active) {
|
|
89
|
-
background: var(--hover-background);
|
|
90
|
-
color: var(--color);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&-button--primary:not(:disabled):hover {
|
|
95
|
-
background: var(--accent);
|
|
96
|
-
color: var(--accent-color);
|
|
97
|
-
filter: brightness(1.1);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&-button-icon.icon {
|
|
101
|
-
--size: var(--button-icon-size);
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
&-cell {
|
|
@@ -140,7 +148,7 @@
|
|
|
140
148
|
}
|
|
141
149
|
|
|
142
150
|
&-filename {
|
|
143
|
-
font-weight: 600;
|
|
151
|
+
font-weight: var(--font-weight-600);
|
|
144
152
|
min-width: 0;
|
|
145
153
|
overflow: hidden;
|
|
146
154
|
text-overflow: ellipsis;
|
|
@@ -148,10 +156,17 @@
|
|
|
148
156
|
}
|
|
149
157
|
|
|
150
158
|
&-gap {
|
|
159
|
+
@extend %background-state, %color-state;
|
|
160
|
+
--background-default: var(--gap-background);
|
|
161
|
+
--background-hover: var(--gap-hover-background);
|
|
162
|
+
--background-pressed: var(--background-hover);
|
|
163
|
+
--color-default: var(--gap-color);
|
|
164
|
+
--color-hover: var(--hover-color);
|
|
165
|
+
--color-pressed: var(--color-hover);
|
|
151
166
|
align-items: center;
|
|
152
|
-
background: var(--
|
|
167
|
+
background: var(--background);
|
|
153
168
|
border: 0;
|
|
154
|
-
color: var(--
|
|
169
|
+
color: var(--color);
|
|
155
170
|
cursor: pointer;
|
|
156
171
|
display: flex;
|
|
157
172
|
font: inherit;
|
|
@@ -161,24 +176,20 @@
|
|
|
161
176
|
padding: 0 var(--code-padding);
|
|
162
177
|
width: 100%;
|
|
163
178
|
|
|
179
|
+
&-icon.icon {
|
|
180
|
+
--size: var(--button-icon-size);
|
|
181
|
+
}
|
|
182
|
+
|
|
164
183
|
&:focus-visible {
|
|
165
184
|
outline: var(--focus-width) solid var(--focus-color);
|
|
166
185
|
outline-offset: calc(var(--focus-width) * -1);
|
|
167
186
|
}
|
|
168
|
-
|
|
169
|
-
&:hover {
|
|
170
|
-
background: var(--gap-hover-background);
|
|
171
|
-
color: var(--color);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&-gap-icon.icon {
|
|
176
|
-
--size: var(--button-icon-size);
|
|
177
187
|
}
|
|
178
188
|
|
|
179
189
|
&-header {
|
|
190
|
+
@extend %surface-sunken-level;
|
|
180
191
|
align-items: center;
|
|
181
|
-
background: var(--
|
|
192
|
+
background: var(--surface-background-default);
|
|
182
193
|
border-bottom: var(--border-width) solid var(--border-color);
|
|
183
194
|
display: flex;
|
|
184
195
|
flex: none;
|
|
@@ -189,7 +200,7 @@
|
|
|
189
200
|
|
|
190
201
|
&-modes {
|
|
191
202
|
display: flex;
|
|
192
|
-
gap:
|
|
203
|
+
gap: calc(var(--size-100) / 4);
|
|
193
204
|
}
|
|
194
205
|
|
|
195
206
|
&-number {
|
|
@@ -206,6 +217,9 @@
|
|
|
206
217
|
}
|
|
207
218
|
|
|
208
219
|
&-row {
|
|
220
|
+
@extend %box-shadow-state;
|
|
221
|
+
--box-shadow-active: inset 2px 0 0 var(--active-outline);
|
|
222
|
+
box-shadow: var(--box-shadow);
|
|
209
223
|
line-height: var(--line-height);
|
|
210
224
|
min-height: var(--line-height);
|
|
211
225
|
position: relative;
|
|
@@ -214,10 +228,18 @@
|
|
|
214
228
|
background: var(--delete-background);
|
|
215
229
|
}
|
|
216
230
|
|
|
231
|
+
&--delete .diffs-sign {
|
|
232
|
+
color: var(--delete-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
217
235
|
&--insert {
|
|
218
236
|
background: var(--insert-background);
|
|
219
237
|
}
|
|
220
238
|
|
|
239
|
+
&--insert .diffs-sign {
|
|
240
|
+
color: var(--insert-color);
|
|
241
|
+
}
|
|
242
|
+
|
|
221
243
|
&--split {
|
|
222
244
|
display: grid;
|
|
223
245
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
@@ -234,18 +256,6 @@
|
|
|
234
256
|
opacity: 1;
|
|
235
257
|
}
|
|
236
258
|
}
|
|
237
|
-
|
|
238
|
-
@include tokens.state(active) {
|
|
239
|
-
box-shadow: inset 2px 0 0 var(--active-outline);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&-row--delete &-sign {
|
|
244
|
-
color: var(--delete-color);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
&-row--insert &-sign {
|
|
248
|
-
color: var(--insert-color);
|
|
249
259
|
}
|
|
250
260
|
|
|
251
261
|
&-scroller {
|
|
@@ -339,7 +349,7 @@
|
|
|
339
349
|
}
|
|
340
350
|
|
|
341
351
|
&-word {
|
|
342
|
-
border-radius:
|
|
352
|
+
border-radius: var(--border-radius-100);
|
|
343
353
|
|
|
344
354
|
&--delete {
|
|
345
355
|
background: var(--delete-word-background);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
@use '/
|
|
1
|
+
@use 'css-utilities/box-shadow';
|
|
2
|
+
@use 'css-utilities/surface';
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
.diffs-merge {
|
|
4
6
|
background: var(--background);
|
|
@@ -24,8 +26,9 @@
|
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
&-header {
|
|
29
|
+
@extend %surface-sunken-level;
|
|
27
30
|
align-items: center;
|
|
28
|
-
background: var(--
|
|
31
|
+
background: var(--surface-background-default);
|
|
29
32
|
border-bottom: var(--border-width) solid var(--border-color);
|
|
30
33
|
display: flex;
|
|
31
34
|
flex-wrap: wrap;
|
|
@@ -40,21 +43,24 @@
|
|
|
40
43
|
display: flex;
|
|
41
44
|
gap: var(--size-100);
|
|
42
45
|
min-height: var(--line-height);
|
|
43
|
-
padding:
|
|
46
|
+
padding: calc(var(--size-100) / 4) var(--code-padding);
|
|
44
47
|
|
|
45
48
|
&--resolved {
|
|
46
49
|
background: transparent;
|
|
47
50
|
border-top-color: var(--border-color);
|
|
48
51
|
}
|
|
49
|
-
}
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
&-note {
|
|
54
|
+
color: var(--muted-color);
|
|
55
|
+
font-family: var(--font-family);
|
|
56
|
+
font-size: var(--label-font-size);
|
|
57
|
+
}
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
&-line {
|
|
61
|
+
@extend %box-shadow-state;
|
|
62
|
+
--box-shadow-active: inset 2px 0 0 var(--active-outline);
|
|
63
|
+
box-shadow: var(--box-shadow);
|
|
58
64
|
display: grid;
|
|
59
65
|
grid-template-columns: var(--number-width) minmax(0, 1fr);
|
|
60
66
|
line-height: var(--line-height);
|
|
@@ -67,10 +73,6 @@
|
|
|
67
73
|
&--conflict {
|
|
68
74
|
background: var(--conflict-background);
|
|
69
75
|
}
|
|
70
|
-
|
|
71
|
-
@include tokens.state(active) {
|
|
72
|
-
box-shadow: inset 2px 0 0 var(--active-outline);
|
|
73
|
-
}
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
&-pane {
|
|
@@ -111,11 +113,12 @@
|
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
&-title {
|
|
114
|
-
|
|
116
|
+
@extend %surface-sunken-level;
|
|
117
|
+
background: var(--surface-background-default);
|
|
115
118
|
border-bottom: var(--border-width) solid var(--border-color);
|
|
116
119
|
color: var(--muted-color);
|
|
117
120
|
flex: none;
|
|
118
|
-
font-weight: 600;
|
|
121
|
+
font-weight: var(--font-weight-600);
|
|
119
122
|
padding: var(--bar-padding);
|
|
120
123
|
}
|
|
121
124
|
}
|