@esportsplus/ui 0.63.0 → 0.64.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 +2 -2
- package/.audit/rules-audit.md +2 -2
- package/README.md +15 -18
- package/RULES.md +80 -9
- package/bin/agent-cli +300 -0
- package/build/components/accordion/index.d.ts +4 -0
- package/build/components/accordion/index.js +13 -10
- package/build/components/breadcrumb/index.d.ts +1 -0
- package/build/components/breadcrumb/index.js +43 -37
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/kbd.d.ts +1 -1
- package/build/components/button/kbd.js +17 -15
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/split.js +14 -16
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/chat/minimap/index.js +4 -5
- package/build/components/checkbox/group.d.ts +1 -0
- package/build/components/checkbox/group.js +21 -20
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/index.js +6 -6
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +1 -1
- package/build/components/command/palette.d.ts +13 -9
- package/build/components/command/palette.js +143 -152
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +5 -7
- package/build/components/command/search.js +6 -26
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/editor/code/commands.js +1 -1
- package/build/components/editor/code/document.d.ts +1 -3
- package/build/components/editor/code/document.js +1 -1
- package/build/components/editor/code/editor.d.ts +18 -6
- package/build/components/editor/code/editor.js +9 -7
- package/build/components/editor/code/features.js +27 -18
- package/build/components/editor/code/find.d.ts +1 -1
- package/build/components/editor/code/find.js +5 -6
- package/build/components/editor/code/folding.d.ts +3 -5
- package/build/components/editor/code/folding.js +2 -15
- package/build/components/editor/code/gutter.js +2 -2
- package/build/components/editor/code/index.d.ts +1 -0
- package/build/components/editor/code/index.js +1 -0
- package/build/components/editor/code/minimap.d.ts +3 -1
- package/build/components/editor/code/minimap.js +31 -5
- package/build/components/editor/code/services/model.js +2 -1
- package/build/components/editor/code/syntax.js +2 -1
- package/build/components/editor/code/view.d.ts +8 -2
- package/build/components/editor/code/view.js +37 -56
- package/build/components/editor/diffs/index.d.ts +1 -0
- package/build/components/editor/diffs/index.js +1 -0
- package/build/components/editor/diffs/merge.js +16 -17
- package/build/components/editor/diffs/view.js +10 -11
- package/build/components/editor/markdown/editing.d.ts +2 -1
- package/build/components/editor/markdown/editing.js +14 -5
- package/build/components/editor/markdown/format.d.ts +1 -1
- package/build/components/editor/markdown/format.js +116 -26
- package/build/components/editor/markdown/layout.js +2 -1
- package/build/components/editor/markdown/model.d.ts +1 -2
- package/build/components/editor/markdown/model.js +1 -29
- package/build/components/editor/markdown/render.js +1 -1
- package/build/components/editor/markdown/template.d.ts +3 -10
- package/build/components/editor/markdown/template.js +2 -29
- package/build/components/editor/markdown/toolbar.d.ts +2 -2
- package/build/components/editor/markdown/toolbar.js +90 -126
- package/build/components/editor/markdown/view.d.ts +1 -1
- package/build/components/editor/markdown/view.js +54 -87
- package/build/components/editor/tree/drag.js +1 -1
- package/build/components/editor/tree/find.js +70 -64
- package/build/components/editor/tree/template.js +8 -7
- package/build/components/editor/viewer/model.d.ts +1 -1
- package/build/components/editor/viewer/template.js +4 -26
- package/build/components/editor/workspace/keybindings.d.ts +1 -1
- package/build/components/editor/workspace/model.d.ts +12 -2
- package/build/components/editor/workspace/model.js +87 -31
- package/build/components/editor/workspace/session.d.ts +2 -6
- package/build/components/editor/workspace/session.js +99 -16
- package/build/components/editor/workspace/status.d.ts +1 -1
- package/build/components/editor/workspace/strip.d.ts +10 -9
- package/build/components/editor/workspace/strip.js +99 -141
- package/build/components/editor/workspace/tabs.d.ts +2 -4
- package/build/components/editor/workspace/tabs.js +1 -14
- package/build/components/editor/workspace/template.d.ts +1 -1
- package/build/components/editor/workspace/template.js +305 -435
- package/build/components/error/index.d.ts +4 -13
- package/build/components/error/index.js +53 -172
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/form/action.d.ts +2 -2
- package/build/components/form/action.js +2 -2
- package/build/components/form/input.d.ts +3 -3
- package/build/components/form/input.js +32 -10
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/group/index.js +96 -9
- package/build/components/group/scss/index.scss +1 -1
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.js +55 -48
- 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 +3 -6
- package/build/components/index.js +3 -6
- package/build/components/inline-edit/index.d.ts +2 -2
- package/build/components/inline-edit/index.js +5 -5
- package/build/components/inline-edit/rich.js +4 -4
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/status.js +1 -0
- package/build/components/input/index.d.ts +4 -0
- package/build/components/input/index.js +3 -1
- package/build/components/input/otp.d.ts +18 -0
- package/build/components/input/otp.js +112 -0
- package/build/components/input/password.d.ts +15 -0
- package/build/components/input/password.js +163 -0
- package/build/components/input/scrub.d.ts +1 -0
- package/build/components/input/scrub.js +103 -89
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.d.ts +5 -0
- package/build/components/input/tag.js +116 -69
- package/build/components/json/download.js +1 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/marquee/index.js +1 -1
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/nav/scss/index.scss +1 -1
- package/build/components/nav/tree.d.ts +2 -1
- package/build/components/nav/tree.js +6 -5
- package/build/components/notification/index.js +3 -3
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/popup.d.ts +2 -2
- package/build/components/overlay/popup.js +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/pagination/arrows.js +2 -3
- package/build/components/pagination/cards.js +2 -3
- package/build/components/pagination/index.d.ts +2 -3
- package/build/components/pagination/index.js +18 -13
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/progress/index.js +1 -1
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.js +3 -3
- package/build/components/range/filter.d.ts +7 -1
- package/build/components/range/filter.js +188 -171
- package/build/components/range/index.d.ts +14 -9
- package/build/components/range/index.js +11 -8
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/range/surface.d.ts +21 -0
- package/build/components/range/surface.js +144 -0
- package/build/components/relative-time/index.js +2 -2
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/{preview/header.d.ts → search/button.d.ts} +3 -3
- package/build/components/search/button.js +18 -0
- package/build/components/search/index.d.ts +8 -0
- package/build/components/search/index.js +5 -0
- package/build/components/search/input.d.ts +9 -0
- package/build/components/search/input.js +23 -0
- package/build/components/search/parts.d.ts +5 -0
- package/build/components/search/parts.js +17 -0
- package/build/components/search/scss/index.scss +2 -0
- package/build/components/select/expand.js +4 -5
- package/build/components/select/index.d.ts +7 -7
- package/build/components/select/index.js +127 -117
- package/build/components/select/placement.js +8 -1
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/{panels → shell}/group.d.ts +21 -5
- package/build/components/shell/group.js +336 -0
- package/build/components/shell/index.d.ts +15 -17
- package/build/components/shell/index.js +583 -238
- package/build/components/shell/model.d.ts +94 -0
- package/build/components/{panels → shell}/model.js +199 -73
- package/build/components/shell/resize.d.ts +5 -0
- package/build/components/{panels → shell}/resize.js +54 -30
- package/build/components/shell/scss/index.scss +1 -1
- package/build/components/shell/sidebar.d.ts +34 -0
- package/build/components/shell/sidebar.js +362 -0
- package/build/components/{panels → shell}/subtree.js +7 -8
- package/build/components/shortcut-recorder/index.d.ts +5 -4
- package/build/components/shortcut-recorder/index.js +69 -44
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/index.d.ts +16 -2
- package/build/components/sortable/index.js +237 -134
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/story/index.js +46 -34
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/engine.d.ts +2 -0
- package/build/components/surface-field/engine.js +86 -33
- package/build/components/surface-field/index.d.ts +26 -4
- package/build/components/surface-field/index.js +35 -4
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/surface-field/surface.d.ts +13 -1
- package/build/components/surface-field/surface.js +149 -58
- package/build/components/tasklist/index.d.ts +1 -4
- package/build/components/tasklist/index.js +36 -43
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/textarea/index.d.ts +1 -1
- package/build/components/textarea/index.js +14 -14
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/theme/shared.d.ts +1 -2
- package/build/components/theme/shared.js +2 -5
- package/build/components/toast/index.d.ts +3 -3
- package/build/components/toast/index.js +3 -3
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/toolbar/index.d.ts +91 -0
- package/build/components/toolbar/index.js +1281 -0
- package/build/components/toolbar/scss/index.scss +2 -0
- package/build/components/tooltip/menu.d.ts +9 -8
- package/build/components/tooltip/menu.js +397 -279
- package/build/components/tooltip/onclick.d.ts +2 -0
- package/build/components/tooltip/onclick.js +13 -4
- package/build/components/tooltip/onhover.d.ts +3 -1
- package/build/components/tooltip/onhover.js +10 -9
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.d.ts +4 -4
- package/build/components/tooltip/shared.js +27 -46
- package/build/components/tooltip/utilities.d.ts +5 -2
- package/build/components/tooltip/utilities.js +169 -9
- package/build/components/typewriter/rotate.js +6 -6
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/index.js +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/css-utilities/font/montserrat/OFL.txt +93 -0
- package/build/shared/drag.d.ts +15 -9
- package/build/shared/drag.js +41 -28
- package/build/shared/placement.d.ts +39 -0
- package/build/shared/placement.js +55 -0
- package/build/shared/transition.js +1 -1
- package/build/shared/viewport.d.ts +1 -2
- package/build/shared/viewport.js +1 -4
- package/package.json +2 -5
- package/src/components/accordion/index.ts +12 -5
- package/src/components/announcement/index.ts +1 -1
- package/src/components/breadcrumb/index.ts +13 -3
- package/src/components/breadcrumb/scss/index.scss +6 -6
- package/src/components/breadcrumb/scss/variables.scss +7 -0
- package/src/components/button/kbd.ts +22 -17
- package/src/components/button/scss/index.scss +69 -76
- package/src/components/button/scss/variables.scss +51 -18
- package/src/components/button/split.ts +12 -8
- package/src/components/capslock/index.ts +2 -0
- package/src/components/capslock/scss/index.scss +21 -21
- package/src/components/card/scss/index.scss +16 -0
- package/src/components/card/scss/variables.scss +25 -2
- package/src/components/chat/minimap/index.ts +5 -6
- package/src/components/chat/minimap/scss/index.scss +12 -11
- package/src/components/chat/minimap/scss/variables.scss +23 -17
- package/src/components/checkbox/group.ts +8 -7
- package/src/components/checkbox/scss/index.scss +59 -35
- package/src/components/checkbox/scss/variables.scss +24 -17
- package/src/components/color-picker/index.ts +6 -6
- package/src/components/color-picker/scss/index.scss +35 -22
- package/src/components/color-picker/scss/variables.scss +11 -3
- package/src/components/command/index.ts +1 -1
- package/src/components/command/palette.ts +174 -166
- package/src/components/command/scss/index.scss +18 -51
- package/src/components/command/scss/variables.scss +37 -71
- package/src/components/command/search.ts +9 -31
- package/src/components/counter/index.ts +22 -22
- package/src/components/counter/scss/variables.scss +10 -7
- package/src/components/editor/code/commands.ts +1 -1
- package/src/components/editor/code/document.ts +0 -2
- package/src/components/editor/code/editor.ts +31 -13
- package/src/components/editor/code/features.ts +39 -24
- package/src/components/editor/code/find.ts +5 -6
- package/src/components/editor/code/folding.ts +3 -21
- package/src/components/editor/code/gutter.ts +2 -2
- package/src/components/editor/code/index.ts +1 -0
- package/src/components/editor/code/minimap.ts +39 -5
- package/src/components/editor/code/scss/_editor.scss +28 -21
- package/src/components/editor/code/scss/_features.scss +19 -21
- package/src/components/editor/code/scss/_services.scss +14 -11
- package/src/components/editor/code/scss/variables.scss +31 -12
- package/src/components/editor/code/services/model.ts +2 -1
- package/src/components/editor/code/syntax.ts +2 -1
- package/src/components/editor/code/view.ts +22 -45
- package/src/components/editor/diffs/index.ts +1 -0
- package/src/components/editor/diffs/merge.ts +9 -10
- package/src/components/editor/diffs/scss/_diffs.scss +39 -63
- package/src/components/editor/diffs/scss/_merge.scss +10 -2
- package/src/components/editor/diffs/scss/index.scss +0 -1
- package/src/components/editor/diffs/scss/variables.scss +36 -17
- package/src/components/editor/diffs/view.ts +8 -9
- package/src/components/editor/markdown/editing.ts +18 -6
- package/src/components/editor/markdown/format.ts +180 -32
- package/src/components/editor/markdown/layout.ts +2 -1
- package/src/components/editor/markdown/model.ts +0 -38
- package/src/components/editor/markdown/render.ts +1 -1
- package/src/components/editor/markdown/scss/index.scss +38 -52
- package/src/components/editor/markdown/scss/variables.scss +24 -50
- package/src/components/editor/markdown/template.ts +3 -63
- package/src/components/editor/markdown/toolbar.ts +76 -127
- package/src/components/editor/markdown/view.ts +9 -32
- package/src/components/editor/tree/drag.ts +1 -1
- package/src/components/editor/tree/find.ts +61 -64
- package/src/components/editor/tree/scss/index.scss +29 -30
- package/src/components/editor/tree/scss/variables.scss +34 -15
- package/src/components/editor/tree/template.ts +9 -9
- package/src/components/editor/viewer/model.ts +1 -1
- package/src/components/editor/viewer/scss/_viewer.scss +4 -5
- package/src/components/editor/viewer/scss/variables.scss +3 -3
- package/src/components/editor/viewer/template.ts +4 -31
- package/src/components/editor/workspace/keybindings.ts +1 -1
- package/src/components/editor/workspace/model.ts +136 -37
- package/src/components/editor/workspace/scss/_keybindings.scss +3 -20
- package/src/components/editor/workspace/scss/_status.scss +0 -1
- package/src/components/editor/workspace/scss/_tabs.scss +2 -41
- package/src/components/editor/workspace/scss/index.scss +49 -71
- package/src/components/editor/workspace/scss/variables.scss +1 -135
- package/src/components/editor/workspace/session.ts +138 -18
- package/src/components/editor/workspace/status.ts +1 -1
- package/src/components/editor/workspace/strip.ts +96 -115
- package/src/components/editor/workspace/tabs.ts +2 -23
- package/src/components/editor/workspace/template.ts +323 -458
- package/src/components/error/index.ts +47 -183
- package/src/components/error/scss/index.scss +34 -35
- package/src/components/error/scss/variables.scss +14 -26
- package/src/components/filter/scss/index.scss +6 -5
- package/src/components/form/action.ts +7 -7
- package/src/components/form/input.ts +25 -12
- package/src/components/frame/scss/index.scss +5 -5
- package/src/components/group/index.ts +77 -2
- package/src/components/group/scss/index.scss +164 -0
- package/src/components/group/scss/variables.scss +110 -2
- package/src/components/heatmap/scss/variables.scss +13 -10
- package/src/components/highlight/index.ts +87 -79
- package/src/components/highlight/scss/index.scss +6 -16
- package/src/components/highlight/scss/variables.scss +33 -5
- package/src/components/icon/scss/index.scss +2 -2
- package/src/components/icon/scss/variables.scss +14 -1
- package/src/components/image/scss/index.scss +9 -9
- package/src/components/image/scss/variables.scss +1 -1
- package/src/components/index.ts +3 -6
- package/src/components/inline-edit/index.ts +8 -6
- package/src/components/inline-edit/rich.ts +8 -8
- package/src/components/inline-edit/scss/index.scss +50 -36
- package/src/components/inline-edit/scss/variables.scss +28 -18
- package/src/components/inline-edit/status.ts +2 -0
- package/src/components/input/index.ts +3 -1
- package/src/components/input/otp.ts +175 -0
- package/src/components/input/password.ts +178 -0
- package/src/components/input/scrub.ts +197 -178
- package/src/components/input/scss/index.scss +344 -4
- package/src/components/input/scss/variables.scss +234 -65
- package/src/components/input/tag.ts +98 -53
- package/src/components/json/download.ts +2 -5
- package/src/components/link/scss/index.scss +3 -5
- package/src/components/loading/scss/index.scss +1 -0
- package/src/components/loading/scss/variables.scss +1 -0
- package/src/components/marquee/index.ts +1 -1
- package/src/components/marquee/scss/index.scss +11 -4
- package/src/components/nav/scss/index.scss +10 -26
- package/src/components/nav/scss/variables.scss +13 -23
- package/src/components/nav/tree.ts +10 -8
- package/src/components/notification/index.ts +3 -3
- package/src/components/notification/scss/index.scss +7 -14
- package/src/components/notification/scss/variables.scss +10 -2
- package/src/components/number/index.ts +1 -1
- package/src/components/overlay/popup.ts +2 -2
- package/src/components/overlay/scss/index.scss +60 -51
- package/src/components/page/scss/variables.scss +1 -0
- package/src/components/pagination/arrows.ts +2 -3
- package/src/components/pagination/cards.ts +2 -3
- package/src/components/pagination/index.ts +11 -9
- package/src/components/pagination/scss/index.scss +38 -101
- package/src/components/pagination/scss/variables.scss +24 -75
- package/src/components/progress/index.ts +1 -1
- package/src/components/progress/scss/index.scss +22 -11
- package/src/components/progress/scss/variables.scss +13 -5
- package/src/components/progress/text.ts +3 -3
- package/src/components/range/filter.ts +249 -246
- package/src/components/range/index.ts +22 -7
- package/src/components/range/scss/index.scss +470 -15
- package/src/components/range/scss/variables.scss +402 -198
- package/src/components/range/surface.ts +135 -0
- package/src/components/relative-time/index.ts +2 -2
- package/src/components/relative-time/scss/index.scss +4 -2
- package/src/components/relative-time/scss/variables.scss +4 -5
- package/src/components/root/scss/index.scss +11 -11
- package/src/components/root/scss/variables.scss +4 -4
- package/src/components/search/button.ts +24 -0
- package/src/components/search/index.ts +12 -0
- package/src/components/search/input.ts +35 -0
- package/src/components/search/parts.ts +24 -0
- package/src/components/search/scss/index.scss +36 -0
- package/src/components/search/scss/variables.scss +67 -0
- package/src/components/section/scss/variables.scss +1 -0
- package/src/components/select/expand.ts +3 -4
- package/src/components/select/index.ts +55 -41
- package/src/components/select/placement.ts +17 -1
- package/src/components/select/scss/index.scss +57 -29
- package/src/components/select/scss/variables.scss +91 -53
- package/src/components/{panels → shell}/group.ts +151 -98
- package/src/components/shell/index.ts +805 -284
- package/src/components/{panels → shell}/model.ts +329 -102
- package/src/components/shell/resize.ts +176 -0
- package/src/components/shell/scss/index.scss +502 -89
- package/src/components/shell/scss/variables.scss +264 -39
- package/src/components/shell/sidebar.ts +325 -0
- package/src/components/{panels → shell}/subtree.ts +1 -2
- package/src/components/shortcut-recorder/index.ts +99 -61
- package/src/components/shortcut-recorder/scss/index.scss +76 -52
- package/src/components/shortcut-recorder/scss/variables.scss +25 -30
- package/src/components/sortable/index.ts +364 -63
- package/src/components/sortable/scss/index.scss +22 -2
- package/src/components/sortable/scss/variables.scss +16 -4
- package/src/components/story/index.ts +56 -33
- package/src/components/story/scss/index.scss +67 -16
- package/src/components/story/scss/variables.scss +59 -18
- package/src/components/surface-field/engine.ts +157 -61
- package/src/components/surface-field/index.ts +64 -9
- package/src/components/surface-field/scss/index.scss +88 -77
- package/src/components/surface-field/scss/variables.scss +84 -36
- package/src/components/surface-field/surface.ts +225 -76
- package/src/components/tasklist/index.ts +10 -14
- package/src/components/tasklist/scss/index.scss +25 -45
- package/src/components/tasklist/scss/variables.scss +12 -29
- package/src/components/textarea/index.ts +39 -42
- package/src/components/theme/reveal.ts +1 -0
- package/src/components/theme/scss/index.scss +20 -16
- package/src/components/theme/scss/variables.scss +11 -5
- package/src/components/theme/shared.ts +3 -7
- package/src/components/toast/index.ts +7 -8
- package/src/components/toast/scss/index.scss +44 -36
- package/src/components/toast/scss/variables.scss +36 -33
- package/src/components/toolbar/index.ts +1675 -0
- package/src/components/toolbar/scss/index.scss +759 -0
- package/src/components/toolbar/scss/variables.scss +555 -0
- package/src/components/tooltip/menu.ts +301 -220
- package/src/components/tooltip/onclick.ts +18 -3
- package/src/components/tooltip/onhover.ts +13 -9
- package/src/components/tooltip/scss/index.scss +155 -188
- package/src/components/tooltip/scss/variables.scss +151 -135
- package/src/components/tooltip/shared.ts +47 -74
- package/src/components/tooltip/utilities.ts +151 -10
- package/src/components/truncate/index.ts +1 -1
- package/src/components/typewriter/rotate.ts +6 -6
- package/src/components/typewriter/scss/index.scss +14 -5
- package/src/components/uptime/scss/index.scss +8 -15
- package/src/components/uptime/scss/variables.scss +12 -1
- package/src/components/usage-meter/index.ts +1 -1
- package/src/components/usage-meter/scss/index.scss +6 -4
- package/src/components/usage-meter/scss/variables.scss +11 -11
- package/src/css-utilities/box-shadow.scss +0 -1
- package/src/css-utilities/icon.scss +9 -9
- package/src/css-utilities/surface.scss +27 -17
- package/src/modifiers/glass/index.ts +2 -2
- package/src/modifiers/glass/scss/index.scss +2 -2
- package/src/normalize/scss/index.scss +1 -1
- package/src/shared/drag.ts +92 -53
- package/src/shared/placement.ts +145 -0
- package/src/shared/transition.ts +1 -1
- package/src/shared/viewport.ts +1 -7
- package/src/tokens/scss/color.scss +2 -2
- package/src/tokens/scss/scale.scss +5 -1
- package/src/tokens/scss/size.scss +0 -7
- package/storage/svg/angle.svg +1 -0
- package/storage/svg/{chevron-left.svg → arrow.svg} +1 -1
- package/storage/svg/calendar.svg +1 -0
- package/storage/svg/circle-filled.svg +1 -0
- package/storage/svg/cursor-arrow-left.svg +1 -0
- package/storage/svg/cursor-arrow-right.svg +1 -0
- package/storage/svg/fit.svg +1 -0
- package/storage/svg/grip.svg +1 -0
- package/storage/svg/mail.svg +1 -0
- package/storage/svg/{chevron-down.svg → minus.svg} +1 -1
- package/storage/svg/music.svg +1 -0
- package/storage/svg/{chevron-up.svg → rotate-ccw.svg} +1 -1
- package/vite.config.ts +9 -13
- package/build/components/dock/index.d.ts +0 -47
- package/build/components/dock/index.js +0 -469
- package/build/components/dock/scss/index.scss +0 -2
- package/build/components/metric/flash.d.ts +0 -12
- package/build/components/metric/flash.js +0 -117
- package/build/components/metric/index.d.ts +0 -44
- package/build/components/metric/index.js +0 -275
- package/build/components/metric/scss/index.scss +0 -2
- package/build/components/pagination/dots.d.ts +0 -23
- package/build/components/pagination/dots.js +0 -115
- package/build/components/panels/dnd.d.ts +0 -47
- package/build/components/panels/dnd.js +0 -114
- package/build/components/panels/group.js +0 -322
- package/build/components/panels/index.d.ts +0 -17
- package/build/components/panels/index.js +0 -524
- package/build/components/panels/model.d.ts +0 -64
- package/build/components/panels/resize.d.ts +0 -9
- package/build/components/panels/scss/index.scss +0 -2
- package/build/components/preview/buttons.d.ts +0 -12
- package/build/components/preview/buttons.js +0 -26
- package/build/components/preview/code.d.ts +0 -8
- package/build/components/preview/code.js +0 -18
- package/build/components/preview/header.js +0 -21
- package/build/components/preview/index.d.ts +0 -37
- package/build/components/preview/index.js +0 -123
- package/build/components/preview/scss/index.scss +0 -2
- package/build/components/preview/source.d.ts +0 -12
- package/build/components/preview/source.js +0 -79
- package/build/components/preview/stage.d.ts +0 -8
- package/build/components/preview/stage.js +0 -28
- package/build/components/textarea/scss/index.scss +0 -2
- package/src/components/dock/index.ts +0 -567
- package/src/components/dock/scss/index.scss +0 -346
- package/src/components/dock/scss/variables.scss +0 -357
- package/src/components/input/scss/_field.scss +0 -39
- package/src/components/input/scss/_scrub.scss +0 -89
- package/src/components/input/scss/_tag.scss +0 -142
- package/src/components/metric/flash.ts +0 -129
- package/src/components/metric/index.ts +0 -307
- package/src/components/metric/scss/_flash.scss +0 -150
- package/src/components/metric/scss/index.scss +0 -155
- package/src/components/metric/scss/variables.scss +0 -233
- package/src/components/pagination/dots.ts +0 -132
- package/src/components/panels/dnd.ts +0 -190
- package/src/components/panels/index.ts +0 -676
- package/src/components/panels/resize.ts +0 -157
- package/src/components/panels/scss/index.scss +0 -379
- package/src/components/panels/scss/variables.scss +0 -197
- package/src/components/preview/buttons.ts +0 -48
- package/src/components/preview/code.ts +0 -28
- package/src/components/preview/header.ts +0 -23
- package/src/components/preview/index.ts +0 -149
- package/src/components/preview/scss/index.scss +0 -158
- package/src/components/preview/scss/variables.scss +0 -149
- package/src/components/preview/source.ts +0 -73
- package/src/components/preview/stage.ts +0 -33
- package/src/components/range/scss/_filter.scss +0 -360
- package/src/components/range/scss/_slider.scss +0 -65
- package/src/components/range/scss/_vertical.scss +0 -10
- package/src/components/textarea/scss/index.scss +0 -72
- package/src/components/textarea/scss/variables.scss +0 -22
- package/storage/svg/amex.svg +0 -1
- package/storage/svg/arrow-down.svg +0 -1
- package/storage/svg/arrow-left.svg +0 -1
- package/storage/svg/arrow-right.svg +0 -1
- package/storage/svg/arrow-up.svg +0 -1
- package/storage/svg/card.svg +0 -1
- package/storage/svg/chip.svg +0 -1
- package/storage/svg/discover.svg +0 -1
- package/storage/svg/mastercard.svg +0 -1
- package/storage/svg/visa.svg +0 -1
- /package/build/components/{panels → shell}/subtree.d.ts +0 -0
- /package/storage/svg/{chevron-right.svg → chevron.svg} +0 -0
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type Attributes } from '@esportsplus/template';
|
|
3
|
-
import command, { type State } from './palette.js';
|
|
1
|
+
import command, { opener, type State } from './palette.js';
|
|
4
2
|
import './scss/index.scss';
|
|
5
3
|
type Modal = Parameters<typeof command>[0] & {
|
|
6
4
|
state: State;
|
|
7
5
|
};
|
|
8
|
-
type Trigger =
|
|
9
|
-
label?: string;
|
|
6
|
+
type Trigger = Omit<Parameters<typeof opener>[0], 'state'> & {
|
|
10
7
|
onclick?: never;
|
|
8
|
+
onkeydown?: never;
|
|
11
9
|
state: State;
|
|
12
10
|
};
|
|
13
11
|
declare const state: () => State;
|
|
14
12
|
declare const _default: {
|
|
15
|
-
modal:
|
|
13
|
+
modal: import("@esportsplus/template").Factory<Modal, import("@esportsplus/template").Renderable<any>, import("@esportsplus/template").Renderable<any>, {}>;
|
|
16
14
|
state: typeof state;
|
|
17
|
-
trigger:
|
|
15
|
+
trigger: import("@esportsplus/template").Factory<Trigger, import("@esportsplus/template").Renderable<any>, import("@esportsplus/template").Renderable<any>, {}>;
|
|
18
16
|
};
|
|
19
17
|
export default _default;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
-
import * as template_u1 from '@esportsplus/template';
|
|
3
2
|
import { component } from '@esportsplus/template';
|
|
4
|
-
import {
|
|
5
|
-
import magnifier from '@esportsplus/ui/svg/search.svg';
|
|
6
|
-
import command, { glyph, kbd, sprite } from './palette.js';
|
|
3
|
+
import command, { opener } from './palette.js';
|
|
7
4
|
import './scss/index.scss';
|
|
8
|
-
const template_0et4m8g2 = template_u1.template(`<button aria-haspopup='dialog' type='button'><!--$--><span class='command-trigger-label'>`, true);
|
|
9
5
|
class ReactiveObject_0et4m8g0 extends reactivity_u0.ReactiveObject {
|
|
10
6
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
11
7
|
#index = this[reactivity_u0.SIGNAL](-1);
|
|
@@ -42,27 +38,11 @@ class ReactiveObject_0et4m8g0 extends reactivity_u0.ReactiveObject {
|
|
|
42
38
|
}
|
|
43
39
|
const state = () => new ReactiveObject_0et4m8g0('all');
|
|
44
40
|
const modal = component(function ({ state, ...attributes }) {
|
|
45
|
-
return command({
|
|
41
|
+
return command({ hotkey: ['Mod', 'K'], ...attributes, state, trigger: false });
|
|
46
42
|
});
|
|
47
|
-
const trigger = component(function ({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
template_u1.slot(element_0et4m8g3, sprite(magnifier, 'command-trigger-icon command-trigger-icon--search'));
|
|
52
|
-
template_u1.slot(element_0et4m8g4, label, 1);
|
|
53
|
-
template_u1.slot(root_0et4m8g1, kbd(['Mod', 'K'].map((key) => glyph(key, apple))), 1);
|
|
54
|
-
template_u1.setProperty(root_0et4m8g1, 'aria-keyshortcuts', apple ? 'Meta+K' : 'Control+K');
|
|
55
|
-
template_u1.setProperty(root_0et4m8g1, 'aria-label', label);
|
|
56
|
-
template_u1.setProperty(root_0et4m8g1, 'title', "" + (label) + " (" + (apple ? '⌘' : 'Ctrl+') + "K)");
|
|
57
|
-
let attributes_0et4m8g5 = attributes;
|
|
58
|
-
template_u1.setProperties(root_0et4m8g1, attributes_0et4m8g5, true);
|
|
59
|
-
template_u1.setProperty(root_0et4m8g1, 'aria-expanded', () => state.active ? 'true' : 'false');
|
|
60
|
-
template_u1.delegate(root_0et4m8g1, 'click', () => {
|
|
61
|
-
state.active = true;
|
|
62
|
-
});
|
|
63
|
-
template_u1.setClass(root_0et4m8g1, ["button command-trigger", attributes_0et4m8g5?.class]);
|
|
64
|
-
template_u1.setStyle(root_0et4m8g1, ["", attributes_0et4m8g5?.style]);
|
|
65
|
-
return root_0et4m8g1;
|
|
66
|
-
}
|
|
43
|
+
const trigger = component(function ({ state, ...attributes }) {
|
|
44
|
+
return opener({ kbd: ['Mod', 'K'], ...attributes }, state, () => {
|
|
45
|
+
state.active = true;
|
|
46
|
+
});
|
|
67
47
|
});
|
|
68
48
|
export default { modal, state, trigger };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.counter-sr{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.counter{--color:var(--color-text-400);--fill:linear-gradient(currentColor, currentColor);--font-size:1em;--font-weight:var(--font-weight-400);--gap-horizontal:calc(var(--size-100) / 4);--gap-vertical:calc(var(--size-100) / 4);--transform-timing-function:ease;--transition-duration:
|
|
1
|
+
@layer components{.counter-sr{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.counter{--color:var(--color-text-400);--fill:linear-gradient(currentColor, currentColor);--font-size:1em;--font-weight:var(--font-weight-400);--gap-horizontal:calc(var(--size-100) / 4);--gap-vertical:calc(var(--size-100) / 4);--roll-duration:2s;--transform-timing-function:ease;--transition-duration:var(--roll-duration)}.counter--blur .counter-character-track{--blur:.05em}.counter--inherit{--color:currentColor}.counter--shade{--fill:linear-gradient(currentColor 50%, color-mix(in srgb, currentColor 45%, transparent))}.counter--snap{--roll-duration:.6s}.counter--snap .counter-character-track{--transition-timing-function:cubic-bezier(.16, 1, .3, 1)}.counter--spring{--roll-duration:1.2s}.counter--spring .counter-character-track{--transition-timing-function:linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1)}.counter--ticker{--gap-horizontal:0px;--gap-vertical:0px;--roll-duration:.9s}.counter--ticker .counter-character-track{--stagger:60ms;--transition-timing-function:cubic-bezier(.22, 1, .36, 1)}.counter-character--symbol{--opacity:1;--scale:1;--spacer:.1ch}.counter-character-track{--animation-duration:var(--roll-duration);--animation-timing-function:ease-out;--stagger:0s;--transition-duration:var(--roll-duration);--transition-timing-function:linear(0, .004, .016, .035, .063, .098, .141 13.6%, .25, .391, .563, .765, 1, .891 40.9%, .848, .813, .785, .766, .754, .75, .754, .766, .785, .813, .848, .891 68.2%, 1 72.7%, .973, .953, .941, .938, .941, .953, .973, 1, .988, .984, .988, 1)}.counter{color:var(--color);gap:var(--gap-vertical) var(--gap-horizontal);transition:transform calc(var(--transition-duration) / 4) var(--transform-timing-function) var(--transition-duration);place-items:center;display:flex}@media (prefers-reduced-motion:reduce){.counter{transition:none}}@media (prefers-reduced-motion:no-preference){.counter--blur .counter-character-track--roll-1{animation:counter-character-track--roll-1 var(--animation-duration) var(--animation-timing-function) calc(var(--index) * var(--stagger))}@keyframes counter-character-track--roll-1{0%,to{filter:blur()}20%{filter:blur(var(--blur))}}.counter--blur .counter-character-track--roll-2{animation:counter-character-track--roll-2 var(--animation-duration) var(--animation-timing-function) calc(var(--index) * var(--stagger))}@keyframes counter-character-track--roll-2{0%,to{filter:blur()}20%{filter:blur(var(--blur))}}}.counter-character{font-size:var(--font-size);font-variant:tabular-nums;font-weight:var(--font-weight);height:1lh;display:grid;overflow:hidden}.counter-character--symbol{font-size:calc(var(--font-size) * var(--scale));opacity:var(--opacity);margin-inline-end:var(--spacer)}.counter-character-track{transition:translate var(--transition-duration) var(--transition-timing-function) calc(var(--index) * var(--stagger));translate:0 calc((var(--value) + 1) * -1lh);display:grid}@media (prefers-reduced-motion:reduce){.counter-character-track{transition:none}}.counter-character--symbol,.counter-digit{-webkit-text-fill-color:transparent;background:var(--fill);background-clip:text}.counter-digit{height:1lh}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -418,7 +418,7 @@ const lineCommand = (doc, command) => {
|
|
|
418
418
|
? rows.findLastIndex((row) => row.id === id)
|
|
419
419
|
: rows.findIndex((row) => row.id === id);
|
|
420
420
|
if (index < 0) {
|
|
421
|
-
index =
|
|
421
|
+
index = clamp(id - first, 0, rows.length - 1);
|
|
422
422
|
}
|
|
423
423
|
if (command === 'blank' && selected.has(id)) {
|
|
424
424
|
let blank = rows.findIndex((row, i) => row.id === id && rows[i + 1]?.id === -1);
|
|
@@ -55,10 +55,8 @@ declare const floorIndex: (starts: readonly number[], offset: number) => number;
|
|
|
55
55
|
declare const lineEnd: (text: string, starts: readonly number[], index: number) => number;
|
|
56
56
|
declare const lineStarts: (text: string) => number[];
|
|
57
57
|
declare const preferredEol: (text: string) => string;
|
|
58
|
-
declare const sameSelection: (a: Selection, b: Selection) => boolean;
|
|
59
58
|
declare const sameSelections: (a: readonly Selection[], b: readonly Selection[]) => boolean;
|
|
60
59
|
declare const selection: (value: Partial<Selection>, length: number) => Selection;
|
|
61
|
-
declare const normalizeSelections: (ranges: readonly Partial<Selection>[], length: number) => readonly Selection[];
|
|
62
60
|
declare class EditorDocument {
|
|
63
61
|
private boundary;
|
|
64
62
|
private byteLimit;
|
|
@@ -123,5 +121,5 @@ declare class EditorDocument {
|
|
|
123
121
|
undo(): boolean;
|
|
124
122
|
undoSelection(): boolean;
|
|
125
123
|
}
|
|
126
|
-
export { EditorDocument, floorIndex, lineEnd, lineStarts,
|
|
124
|
+
export { EditorDocument, floorIndex, lineEnd, lineStarts, preferredEol, sameSelections, selection };
|
|
127
125
|
export type { Change, Delta, Edit, Selection, Snapshot, TransactionOptions, TransactionResult };
|
|
@@ -474,4 +474,4 @@ class EditorDocument {
|
|
|
474
474
|
return this.travelSelection(false);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
export { EditorDocument, floorIndex, lineEnd, lineStarts,
|
|
477
|
+
export { EditorDocument, floorIndex, lineEnd, lineStarts, preferredEol, sameSelections, selection };
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import { type Attributes } from '@esportsplus/template';
|
|
1
|
+
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
2
|
import { EditorDocument } from './document.js';
|
|
3
3
|
import { type Callbacks, type CodeController, type Options } from './view.js';
|
|
4
|
-
type CodeEditorAttributes =
|
|
5
|
-
|
|
4
|
+
type CodeEditorAttributes = EditorAttributes<CodeController, Options>;
|
|
5
|
+
type EditorAttributes<C, O> = Attributes & Callbacks & {
|
|
6
|
+
controller?: (controller: C) => void;
|
|
6
7
|
document?: EditorDocument;
|
|
7
|
-
options?:
|
|
8
|
+
options?: O | (() => O);
|
|
8
9
|
value?: string | (() => string);
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
type Hosted<O> = {
|
|
12
|
+
readonly document: EditorDocument;
|
|
13
|
+
setOptions(options: O, replace?: boolean): void;
|
|
14
|
+
setValue(value: string): boolean;
|
|
15
|
+
};
|
|
16
|
+
type View<C> = (model: EditorDocument, callbacks: Callbacks, receive?: (controller: C) => void) => {
|
|
17
|
+
controller: C;
|
|
18
|
+
template: (attributes?: Attributes) => Renderable<any>;
|
|
19
|
+
};
|
|
20
|
+
declare const editor: <C extends Hosted<O>, O extends object>(view: View<C>, defaults?: Partial<O>) => import("@esportsplus/template").Factory<EditorAttributes<C, O>, Renderable<any>, Renderable<any>, {}>;
|
|
21
|
+
declare const _default: import("@esportsplus/template").Factory<EditorAttributes<CodeController, Options>, Renderable<any>, Renderable<any>, {}>;
|
|
11
22
|
export default _default;
|
|
12
|
-
export
|
|
23
|
+
export { editor };
|
|
24
|
+
export type { CodeEditorAttributes, EditorAttributes };
|
|
@@ -2,14 +2,14 @@ import { effect, untrack } from '@esportsplus/reactivity';
|
|
|
2
2
|
import { component } from '@esportsplus/template';
|
|
3
3
|
import { EditorDocument } from './document.js';
|
|
4
4
|
import { view } from './view.js';
|
|
5
|
-
|
|
5
|
+
const editor = (view, defaults = {}) => component(function (input) {
|
|
6
6
|
let { controller: receive, document: supplied, onChange, onSave, onSelection, options, value, ...attributes } = untrack(() => ({ ...this?.attributes, ...input })), current = () => {
|
|
7
7
|
let next = input.value ?? this?.attributes?.value;
|
|
8
8
|
return typeof next === 'function' ? next() : next;
|
|
9
9
|
}, settings = () => {
|
|
10
10
|
let next = input.options ?? this?.attributes?.options;
|
|
11
|
-
return { ...(typeof next === 'function' ? next() : next) };
|
|
12
|
-
},
|
|
11
|
+
return { ...defaults, ...(typeof next === 'function' ? next() : next) };
|
|
12
|
+
}, instance = view(supplied ?? new EditorDocument(untrack(current) ?? ''), { onChange, onSave, onSelection }, receive), last;
|
|
13
13
|
effect(() => {
|
|
14
14
|
let next = current();
|
|
15
15
|
if (next === last) {
|
|
@@ -17,14 +17,16 @@ export default component(function (input) {
|
|
|
17
17
|
}
|
|
18
18
|
last = next;
|
|
19
19
|
untrack(() => {
|
|
20
|
-
if (next !== undefined && next !==
|
|
21
|
-
|
|
20
|
+
if (next !== undefined && next !== instance.controller.document.value) {
|
|
21
|
+
instance.controller.setValue(next);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
effect(() => {
|
|
26
26
|
let next = settings();
|
|
27
|
-
untrack(() =>
|
|
27
|
+
untrack(() => instance.controller.setOptions(next, true));
|
|
28
28
|
});
|
|
29
|
-
return
|
|
29
|
+
return instance.template(attributes);
|
|
30
30
|
});
|
|
31
|
+
export default editor(view);
|
|
32
|
+
export { editor };
|
|
@@ -4,6 +4,7 @@ import * as template_u1 from '@esportsplus/template';
|
|
|
4
4
|
import colorPicker from '../../color-picker/index.js';
|
|
5
5
|
import icon from '../../icon/index.js';
|
|
6
6
|
import tooltip from '../../tooltip/index.js';
|
|
7
|
+
import { clamp } from '../../../shared/clamp.js';
|
|
7
8
|
import { changeLines, lineChanges, revertChange } from './changes.js';
|
|
8
9
|
import { colorLiterals, formatColor, toHex } from './colors.js';
|
|
9
10
|
import { conflictsOf, resolveConflict, tints } from './conflicts.js';
|
|
@@ -11,8 +12,7 @@ import { stickyFolds, structureOf } from './folding.js';
|
|
|
11
12
|
import { linksIn } from './links.js';
|
|
12
13
|
import { markup, tokens as lineTokens } from './rows.js';
|
|
13
14
|
import { describeSuspect, suspects } from './unicode.js';
|
|
14
|
-
import
|
|
15
|
-
import arrowUp from '@esportsplus/ui/svg/arrow-up.svg';
|
|
15
|
+
import arrow from '@esportsplus/ui/svg/arrow.svg';
|
|
16
16
|
import close from '@esportsplus/ui/svg/close.svg';
|
|
17
17
|
import undo from '@esportsplus/ui/svg/undo.svg';
|
|
18
18
|
const template_1emgvff5 = template_u1.template(`<div aria-hidden='true'>`, true);
|
|
@@ -162,7 +162,7 @@ function same(a, b) {
|
|
|
162
162
|
return a.length === b.length && a.every((value, i) => value === b[i]);
|
|
163
163
|
}
|
|
164
164
|
const features = (host, apple) => {
|
|
165
|
-
let anchor, baseline = null, blocks = { document: null, list: [], revision: -1, tints: new Map() }, changes = [], kinds = new Map(), lenses = new reactivity_u0.ReactiveArray(), link = null, memo = { cache: null, colors: new Map(), document: null, revision: -1, suspects: new Map() }, mouse = null, noticed = -1, peek = new ReactiveObject_1emgvff0(), pick = null, seen = { document: null, revision: -1 }, settings = { colors: false, links: false, rulers: [], sticky: 0, unicode: true }, sticky = new reactivity_u0.ReactiveArray(), stuck = '', structure = { cache: null, folds: [], revision: -1 }, timers = {}, tipState = new ReactiveObject_1emgvff1(), tip = tooltip.shared({ class: 'code-editor-picker-tooltip',
|
|
165
|
+
let anchor, baseline = null, blocks = { document: null, list: [], revision: -1, tints: new Map() }, changes = [], kinds = new Map(), lenses = new reactivity_u0.ReactiveArray(), link = null, memo = { cache: null, colors: new Map(), document: null, revision: -1, suspects: new Map() }, mouse = null, noticed = -1, peek = new ReactiveObject_1emgvff0(), pick = null, seen = { document: null, revision: -1 }, settings = { colors: false, links: false, rulers: [], sticky: 0, unicode: true }, sticky = new reactivity_u0.ReactiveArray(), stuck = '', structure = { cache: null, folds: [], revision: -1 }, timers = {}, tipState = new ReactiveObject_1emgvff1(), tip = tooltip.shared({ axis: 'y', class: 'code-editor-picker-tooltip', interactive: true, state: tipState }), view = new ReactiveObject_1emgvff2();
|
|
166
166
|
let stop = effect(() => tipState.active, (active) => {
|
|
167
167
|
if (!active) {
|
|
168
168
|
commit();
|
|
@@ -544,7 +544,7 @@ const features = (host, apple) => {
|
|
|
544
544
|
timers.baseline = setTimeout(recompute, BASELINE_DELAY);
|
|
545
545
|
},
|
|
546
546
|
configure: (options) => {
|
|
547
|
-
let columns = (options.rulers ?? []).filter((column) => Number.isFinite(column) && column > 0).slice(0, RULERS), cap = options.sticky === true ? STICKY : typeof options.sticky === 'number' ?
|
|
547
|
+
let columns = (options.rulers ?? []).filter((column) => Number.isFinite(column) && column > 0).slice(0, RULERS), cap = options.sticky === true ? STICKY : typeof options.sticky === 'number' ? clamp(Math.trunc(options.sticky) || 0, 0, STICKY_MAX) : 0;
|
|
548
548
|
if (!!options.colors !== settings.colors) {
|
|
549
549
|
memo.colors.clear();
|
|
550
550
|
}
|
|
@@ -674,10 +674,19 @@ const features = (host, apple) => {
|
|
|
674
674
|
tip.close();
|
|
675
675
|
let state = reactivity_u0.reactive({ error: '', value }), current = { document: host.document(), from: swatch.from, initial: value, literal: swatch.value, state, to: swatch.to };
|
|
676
676
|
pick = current;
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
677
|
+
let target = anchor, waiting = new AbortController();
|
|
678
|
+
for (let type of ['pointercancel', 'pointerup']) {
|
|
679
|
+
window.addEventListener(type, (event) => {
|
|
680
|
+
waiting.abort();
|
|
681
|
+
if (event.type !== 'pointerup' || pick !== current) {
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
tip.open(target, () => colorPicker({ class: 'code-editor-picker', recent: false, state, value }), () => {
|
|
685
|
+
let rect = host.rectAt(current.from) ?? swatch.rect, width = host.charWidth();
|
|
686
|
+
return new DOMRect(rect.left - width, rect.top, width, rect.height);
|
|
687
|
+
});
|
|
688
|
+
}, { signal: waiting.signal });
|
|
689
|
+
}
|
|
681
690
|
return true;
|
|
682
691
|
},
|
|
683
692
|
pointermove: (e) => {
|
|
@@ -778,24 +787,24 @@ const features = (host, apple) => {
|
|
|
778
787
|
let root_1emgvffo = template_1emgvffp(), element_1emgvffq = root_1emgvffo.firstElementChild, element_1emgvffr = element_1emgvffq.nextElementSibling, element_1emgvffs = element_1emgvffr.nextElementSibling, element_1emgvfft = element_1emgvffs.nextElementSibling;
|
|
779
788
|
template_u1.delegate(element_1emgvfft, 'click', run(null));
|
|
780
789
|
template_u1.delegate(element_1emgvfft, 'mousedown', keep);
|
|
781
|
-
template_u1.setClass(element_1emgvfft, ["code-editor-lens-action"]);
|
|
790
|
+
template_u1.setClass(element_1emgvfft, ["button code-editor-lens-action"]);
|
|
782
791
|
template_u1.delegate(element_1emgvffs, 'click', run('both'));
|
|
783
792
|
template_u1.delegate(element_1emgvffs, 'mousedown', keep);
|
|
784
|
-
template_u1.setClass(element_1emgvffs, ["code-editor-lens-action code-editor-lens-action--accept"]);
|
|
793
|
+
template_u1.setClass(element_1emgvffs, ["button code-editor-lens-action code-editor-lens-action--accept"]);
|
|
785
794
|
template_u1.delegate(element_1emgvffr, 'click', run('incoming'));
|
|
786
795
|
template_u1.delegate(element_1emgvffr, 'mousedown', keep);
|
|
787
|
-
template_u1.setClass(element_1emgvffr, ["code-editor-lens-action code-editor-lens-action--accept"]);
|
|
796
|
+
template_u1.setClass(element_1emgvffr, ["button code-editor-lens-action code-editor-lens-action--accept"]);
|
|
788
797
|
template_u1.delegate(element_1emgvffq, 'click', run('current'));
|
|
789
798
|
template_u1.delegate(element_1emgvffq, 'mousedown', keep);
|
|
790
|
-
template_u1.setClass(element_1emgvffq, ["code-editor-lens-action code-editor-lens-action--accept"]);
|
|
799
|
+
template_u1.setClass(element_1emgvffq, ["button code-editor-lens-action code-editor-lens-action--accept"]);
|
|
791
800
|
template_u1.setClass(root_1emgvffo, ["code-editor-lens", () => lens.readonly && 'code-editor-lens--readonly']);
|
|
792
801
|
template_u1.setStyle(root_1emgvffo, ["", () => lens.style]);
|
|
793
802
|
return root_1emgvffo;
|
|
794
803
|
}
|
|
795
804
|
}, true).fragment);
|
|
796
805
|
new template_u1.EffectSlot(element_1emgvffg, () => peek.label, 1);
|
|
797
|
-
template_u1.slot(element_1emgvffh, icon({ 'aria-hidden': 'true', class: 'code-editor-peek-icon' },
|
|
798
|
-
template_u1.slot(element_1emgvffi, icon({ 'aria-hidden': 'true', class: 'code-editor-peek-icon' },
|
|
806
|
+
template_u1.slot(element_1emgvffh, icon({ 'aria-hidden': 'true', class: 'code-editor-peek-icon icon--up' }, arrow), 1);
|
|
807
|
+
template_u1.slot(element_1emgvffi, icon({ 'aria-hidden': 'true', class: 'code-editor-peek-icon icon--down' }, arrow), 1);
|
|
799
808
|
template_u1.slot(element_1emgvffj, icon({ 'aria-hidden': 'true', class: 'code-editor-peek-icon' }, undo), 1);
|
|
800
809
|
template_u1.slot(element_1emgvffk, icon({ 'aria-hidden': 'true', class: 'code-editor-peek-icon' }, close), 1);
|
|
801
810
|
new template_u1.EffectSlot(element_1emgvffl, () => peek.lines, 1);
|
|
@@ -809,7 +818,7 @@ const features = (host, apple) => {
|
|
|
809
818
|
host.focus();
|
|
810
819
|
});
|
|
811
820
|
template_u1.delegate(element_1emgvffk, 'mousedown', keep);
|
|
812
|
-
template_u1.setClass(element_1emgvffk, ["code-editor-peek-button"]);
|
|
821
|
+
template_u1.setClass(element_1emgvffk, ["button code-editor-peek-button"]);
|
|
813
822
|
template_u1.setProperty(element_1emgvffj, 'disabled', () => host.readonly());
|
|
814
823
|
template_u1.delegate(element_1emgvffj, 'click', () => {
|
|
815
824
|
let change = changes[peek.index], doc = host.document();
|
|
@@ -824,13 +833,13 @@ const features = (host, apple) => {
|
|
|
824
833
|
host.focus();
|
|
825
834
|
});
|
|
826
835
|
template_u1.delegate(element_1emgvffj, 'mousedown', keep);
|
|
827
|
-
template_u1.setClass(element_1emgvffj, ["code-editor-peek-button"]);
|
|
836
|
+
template_u1.setClass(element_1emgvffj, ["button code-editor-peek-button"]);
|
|
828
837
|
template_u1.delegate(element_1emgvffi, 'click', () => navigate('change', false));
|
|
829
838
|
template_u1.delegate(element_1emgvffi, 'mousedown', keep);
|
|
830
|
-
template_u1.setClass(element_1emgvffi, ["code-editor-peek-button"]);
|
|
839
|
+
template_u1.setClass(element_1emgvffi, ["button code-editor-peek-button"]);
|
|
831
840
|
template_u1.delegate(element_1emgvffh, 'click', () => navigate('change', true));
|
|
832
841
|
template_u1.delegate(element_1emgvffh, 'mousedown', keep);
|
|
833
|
-
template_u1.setClass(element_1emgvffh, ["code-editor-peek-button"]);
|
|
842
|
+
template_u1.setClass(element_1emgvffh, ["button code-editor-peek-button"]);
|
|
834
843
|
template_u1.setProperty(element_1emgvffe, 'aria-label', () => peek.label);
|
|
835
844
|
template_u1.setClass(element_1emgvffe, ["code-editor-peek", [() => peek.open && '--active', () => peek.kind && `code-editor-peek--${peek.kind}`]]);
|
|
836
845
|
template_u1.setStyle(element_1emgvffe, ["", () => `top: ${peek.top}px;`]);
|
|
@@ -39,7 +39,7 @@ type Host = {
|
|
|
39
39
|
selection: () => Selection;
|
|
40
40
|
update: VoidFunction;
|
|
41
41
|
};
|
|
42
|
-
declare function action(label: string, href: string, onclick: VoidFunction): template_u1.Element;
|
|
42
|
+
declare function action(label: string, href: string, onclick: VoidFunction, direction?: string): template_u1.Element;
|
|
43
43
|
declare const find: (host: Host) => {
|
|
44
44
|
close: () => void;
|
|
45
45
|
find: (query?: string, next?: SearchOptions) => Readonly<{
|
|
@@ -4,8 +4,7 @@ import * as template_u1 from '@esportsplus/template';
|
|
|
4
4
|
import icon from '../../icon/index.js';
|
|
5
5
|
import input from '../../input/index.js';
|
|
6
6
|
import { nextMatch, replaceMatches, searchDocument } from './search.js';
|
|
7
|
-
import
|
|
8
|
-
import up from '@esportsplus/ui/svg/arrow-up.svg';
|
|
7
|
+
import arrow from '@esportsplus/ui/svg/arrow.svg';
|
|
9
8
|
import close from '@esportsplus/ui/svg/close.svg';
|
|
10
9
|
const template_13vur872 = template_u1.template(`<button type='button'>`, true);
|
|
11
10
|
const template_13vur874 = template_u1.template(`<div aria-label='Find and replace' role='search'><div class='code-editor-find-row'><!--$--><!--$--><span aria-live='polite' class='code-editor-find-status'></span><!--$--><!--$--></div><div><!--$--><button type='button'> Replace </button><button type='button'> Replace all `, true);
|
|
@@ -117,10 +116,10 @@ function matchAt(matches, offset) {
|
|
|
117
116
|
}
|
|
118
117
|
return lo;
|
|
119
118
|
}
|
|
120
|
-
function action(label, href, onclick) {
|
|
119
|
+
function action(label, href, onclick, direction = '') {
|
|
121
120
|
{
|
|
122
121
|
let root_13vur87f = template_13vur872();
|
|
123
|
-
template_u1.slot(root_13vur87f, icon({ 'aria-hidden': 'true', class: 'code-editor-find-icon' }, href), 1);
|
|
122
|
+
template_u1.slot(root_13vur87f, icon({ 'aria-hidden': 'true', class: ['code-editor-find-icon', direction] }, href), 1);
|
|
124
123
|
template_u1.setProperty(root_13vur87f, 'aria-label', label);
|
|
125
124
|
template_u1.setProperty(root_13vur87f, 'title', label);
|
|
126
125
|
template_u1.delegate(root_13vur87f, 'click', onclick);
|
|
@@ -261,8 +260,8 @@ const find = (host) => {
|
|
|
261
260
|
}));
|
|
262
261
|
template_u1.slot(element_13vur877, TOGGLES.map(toggle));
|
|
263
262
|
new template_u1.EffectSlot(element_13vur878, () => state.status, 1);
|
|
264
|
-
template_u1.slot(element_13vur879, action('Previous match',
|
|
265
|
-
template_u1.slot(element_13vur87a, action('Next match',
|
|
263
|
+
template_u1.slot(element_13vur879, action('Previous match', arrow, () => navigate(true), 'icon--up'));
|
|
264
|
+
template_u1.slot(element_13vur87a, action('Next match', arrow, () => navigate(false), 'icon--down'));
|
|
266
265
|
template_u1.slot(element_13vur875, action('Close find', close, () => api.close()), 1);
|
|
267
266
|
template_u1.slot(element_13vur87c, input({
|
|
268
267
|
'aria-label': 'Replacement text',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SyntaxCache
|
|
1
|
+
import { type Edit, type EditorDocument } from './document.js';
|
|
2
|
+
import { SyntaxCache } from './syntax.js';
|
|
3
3
|
type BracketPair = {
|
|
4
4
|
from: number;
|
|
5
5
|
to: number;
|
|
@@ -19,7 +19,6 @@ type Structure = {
|
|
|
19
19
|
declare const enclosingFold: (cache: SyntaxCache, line: number) => FoldRange | null;
|
|
20
20
|
declare const foldAt: (cache: SyntaxCache, line: number) => FoldRange | null;
|
|
21
21
|
declare const mapFolds: (folds: readonly FoldRange[], batches: readonly (readonly Edit[])[], source: EditorDocument | string) => FoldRange[];
|
|
22
|
-
declare const matchingPair: (pairs: readonly BracketPair[], offset: number) => BracketPair | null;
|
|
23
22
|
declare const openBracket: (cache: SyntaxCache, offset: number) => {
|
|
24
23
|
from: number;
|
|
25
24
|
name: string;
|
|
@@ -29,6 +28,5 @@ declare const pairAround: (cache: SyntaxCache, from: number, to: number) => Brac
|
|
|
29
28
|
declare const pairAt: (cache: SyntaxCache, offset: number) => BracketPair | null;
|
|
30
29
|
declare const stickyFolds: (folds: readonly FoldRange[], top: number, cap: number) => FoldRange[];
|
|
31
30
|
declare const structureOf: (cache: SyntaxCache) => Structure;
|
|
32
|
-
|
|
33
|
-
export { enclosingFold, foldAt, mapFolds, matchingPair, openBracket, outerFolds, pairAround, pairAt, stickyFolds, structureOf, structures };
|
|
31
|
+
export { enclosingFold, foldAt, mapFolds, openBracket, outerFolds, pairAround, pairAt, stickyFolds, structureOf };
|
|
34
32
|
export type { BracketPair, FoldRange };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SyntaxCache } from './syntax.js';
|
|
1
|
+
import { floorIndex, lineStarts } from './document.js';
|
|
3
2
|
const COMMENT_LINE = /^\s*#/;
|
|
4
3
|
const HEADER = /:\s*(?:#.*)?$/;
|
|
5
4
|
const HEADING = /^#{1,6}\s/;
|
|
@@ -285,15 +284,6 @@ const mapFolds = (folds, batches, source) => {
|
|
|
285
284
|
line: floorIndex(starts, fold.open ?? Math.max(0, fold.from - 1)) + 1
|
|
286
285
|
}));
|
|
287
286
|
};
|
|
288
|
-
const matchingPair = (pairs, offset) => {
|
|
289
|
-
for (let i = 0, n = pairs.length; i < n; i++) {
|
|
290
|
-
let pair = pairs[i];
|
|
291
|
-
if (pair.from === offset || pair.to === offset || pair.from === offset - 1 || pair.to === offset - 1) {
|
|
292
|
-
return pair;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return null;
|
|
296
|
-
};
|
|
297
287
|
const openBracket = (cache, offset) => {
|
|
298
288
|
let document = cache.document, index = document.lineAt(offset), top = stackAt(cache, index, offset - document.lineStart(index), false);
|
|
299
289
|
return top ? { from: openOf(cache, top, index), name: top.name } : null;
|
|
@@ -427,7 +417,4 @@ const structureOf = (cache) => {
|
|
|
427
417
|
folds.sort((a, b) => a.line - b.line || b.endLine - a.endLine || b.to - b.from - (a.to - a.from) || a.from - b.from);
|
|
428
418
|
return { folds, pairs };
|
|
429
419
|
};
|
|
430
|
-
|
|
431
|
-
return structureOf(new SyntaxCache(new EditorDocument(source), language));
|
|
432
|
-
};
|
|
433
|
-
export { enclosingFold, foldAt, mapFolds, matchingPair, openBracket, outerFolds, pairAround, pairAt, stickyFolds, structureOf, structures };
|
|
420
|
+
export { enclosingFold, foldAt, mapFolds, openBracket, outerFolds, pairAround, pairAt, stickyFolds, structureOf };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as template_u1 from '@esportsplus/template';
|
|
2
2
|
import icon from '../../icon/index.js';
|
|
3
|
-
import chevron from '@esportsplus/ui/svg/chevron
|
|
3
|
+
import chevron from '@esportsplus/ui/svg/chevron.svg';
|
|
4
4
|
const template_0sd455b1 = template_u1.template(`<div><span></span><span class='code-editor-number-text'></span><span>`, true);
|
|
5
5
|
function keep(e) {
|
|
6
6
|
e.preventDefault();
|
|
@@ -8,7 +8,7 @@ function keep(e) {
|
|
|
8
8
|
const gutter = (slots, toggle, peek) => new template_u1.ArraySlot(slots, (slot) => {
|
|
9
9
|
let root_0sd455b0 = template_0sd455b1(), element_0sd455b2 = root_0sd455b0.firstElementChild, element_0sd455b3 = element_0sd455b2.nextElementSibling, element_0sd455b4 = element_0sd455b3.nextElementSibling;
|
|
10
10
|
new template_u1.EffectSlot(element_0sd455b3, () => slot.number, 1);
|
|
11
|
-
template_u1.slot(element_0sd455b4, icon({ class: 'code-editor-fold-icon' }, chevron), 1);
|
|
11
|
+
template_u1.slot(element_0sd455b4, icon({ class: 'code-editor-fold-icon icon--rotate' }, chevron), 1);
|
|
12
12
|
template_u1.delegate(element_0sd455b4, 'click', () => toggle(slot));
|
|
13
13
|
template_u1.delegate(element_0sd455b4, 'mousedown', keep);
|
|
14
14
|
template_u1.setClass(element_0sd455b4, ["code-editor-fold", [() => slot.fold === 0 && 'code-editor-fold--none', () => slot.fold === 2 && '--active']]);
|
|
@@ -37,5 +37,7 @@ declare const minimap: ({ focus, name, scroll }: {
|
|
|
37
37
|
state: ReactiveObject_0bg9uqd0;
|
|
38
38
|
template: (attributes?: Attributes) => template_u1.Element;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
declare const pixels: (value: string) => number;
|
|
41
|
+
declare const tokenColors: (style: CSSStyleDeclaration, kinds?: readonly Token['kind'][]) => Record<string, string>;
|
|
42
|
+
export { minimap, pixels, tokenColors };
|
|
41
43
|
export type { Source };
|
|
@@ -26,6 +26,21 @@ const INSET = 3;
|
|
|
26
26
|
const LONG = 10000;
|
|
27
27
|
const PITCH = 4;
|
|
28
28
|
const SPACING = 1.15;
|
|
29
|
+
const TOKEN_COLORS = [
|
|
30
|
+
'color',
|
|
31
|
+
'comment',
|
|
32
|
+
'function',
|
|
33
|
+
'keyword',
|
|
34
|
+
'number',
|
|
35
|
+
'operator',
|
|
36
|
+
'property',
|
|
37
|
+
'regexp',
|
|
38
|
+
'selector',
|
|
39
|
+
'string',
|
|
40
|
+
'tag',
|
|
41
|
+
'type',
|
|
42
|
+
'variable'
|
|
43
|
+
];
|
|
29
44
|
function blank(text, i) {
|
|
30
45
|
let code = text.charCodeAt(i);
|
|
31
46
|
return code === 32 || code === 9 || code === 160;
|
|
@@ -44,9 +59,9 @@ const minimapScroll = (y, grab, height, scrollHeight, clientHeight) => {
|
|
|
44
59
|
return metrics.travel ? (clamp(y - grab, 0, metrics.travel) / metrics.travel) * metrics.scroll : 0;
|
|
45
60
|
};
|
|
46
61
|
const minimap = ({ focus, name = 'code-editor', scroll }) => {
|
|
47
|
-
let canvas, colors = {}, content = 0, dirty = null, full = true, grab = null, lineHeight = 20,
|
|
62
|
+
let canvas, colors = {}, content = 0, dirty = null, full = true, grab = null, lineHeight = 20, sized = '', state = new ReactiveObject_0bg9uqd0(), style = '', viewport = { clientHeight: 0, scrollHeight: 0, scrollTop: 0 }, width = 0;
|
|
48
63
|
function draw(context, source, scale, index) {
|
|
49
|
-
let text = source.text(index), top = source.top(index), pitch =
|
|
64
|
+
let text = source.text(index), top = source.top(index), pitch = clamp(source.lineHeight * scale, 1, 3);
|
|
50
65
|
if (text.length > LONG) {
|
|
51
66
|
fill(context, colors.comment);
|
|
52
67
|
context.fillRect(INSET, top * scale, Math.min(width - INSET * 2, COLUMNS), pitch);
|
|
@@ -131,12 +146,12 @@ const minimap = ({ focus, name = 'code-editor', scroll }) => {
|
|
|
131
146
|
return;
|
|
132
147
|
}
|
|
133
148
|
let key = `${size}:${height}:${ratio}:${content}:${source.height}`;
|
|
134
|
-
if (key !==
|
|
149
|
+
if (key !== sized || colors !== palette) {
|
|
135
150
|
canvas.height = Math.round(height * ratio);
|
|
136
151
|
canvas.width = Math.round(size * ratio);
|
|
137
152
|
colors = palette;
|
|
138
153
|
full = true;
|
|
139
|
-
|
|
154
|
+
sized = key;
|
|
140
155
|
width = size;
|
|
141
156
|
}
|
|
142
157
|
if (!full && !dirty) {
|
|
@@ -177,4 +192,15 @@ const minimap = ({ focus, name = 'code-editor', scroll }) => {
|
|
|
177
192
|
}
|
|
178
193
|
};
|
|
179
194
|
};
|
|
180
|
-
|
|
195
|
+
const pixels = (value) => {
|
|
196
|
+
return parseFloat(value) || 0;
|
|
197
|
+
};
|
|
198
|
+
const tokenColors = (style, kinds = TOKEN_COLORS) => {
|
|
199
|
+
let fallback = style.getPropertyValue('--color').trim() || 'currentColor', palette = {};
|
|
200
|
+
for (let i = 0, n = kinds.length; i < n; i++) {
|
|
201
|
+
let kind = kinds[i];
|
|
202
|
+
palette[kind] = style.getPropertyValue(`--${kind === 'color' ? 'literal' : kind}-color`).trim() || fallback;
|
|
203
|
+
}
|
|
204
|
+
return palette;
|
|
205
|
+
};
|
|
206
|
+
export { minimap, pixels, tokenColors };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clamp } from '../../../../shared/clamp.js';
|
|
1
2
|
const LANGUAGES = {
|
|
2
3
|
cjs: 'javascript',
|
|
3
4
|
css: 'css',
|
|
@@ -151,7 +152,7 @@ const offsetAt = (doc, position) => {
|
|
|
151
152
|
};
|
|
152
153
|
const positionAt = (doc, offset) => {
|
|
153
154
|
let line = doc.lineAt(offset);
|
|
154
|
-
return { character:
|
|
155
|
+
return { character: clamp(offset, 0, doc.lineEnd(line)) - doc.lineStart(line), line };
|
|
155
156
|
};
|
|
156
157
|
const spanOf = (doc, range) => {
|
|
157
158
|
let from = offsetAt(doc, range.start), to = offsetAt(doc, range.end);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clamp } from '../../../shared/clamp.js';
|
|
1
2
|
const ATTRIBUTE = /[\w:-]+/y;
|
|
2
3
|
const CACHES = new WeakMap();
|
|
3
4
|
const CSS_HEX = /#[\da-f]{3,8}(?![\w-])/iy;
|
|
@@ -969,7 +970,7 @@ class SyntaxCache {
|
|
|
969
970
|
this.version = document.revision;
|
|
970
971
|
}
|
|
971
972
|
clampLine(index) {
|
|
972
|
-
return Math.
|
|
973
|
+
return clamp(Math.trunc(index) || 0, 0, this.document.lineCount - 1);
|
|
973
974
|
}
|
|
974
975
|
entry(line) {
|
|
975
976
|
this.sync();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactiveArray } from '@esportsplus/reactivity';
|
|
1
2
|
import * as template_u1 from '@esportsplus/template';
|
|
2
3
|
import { type Attributes } from '@esportsplus/template';
|
|
3
4
|
import { type LineCommand } from './commands.js';
|
|
@@ -71,6 +72,10 @@ type Controller = {
|
|
|
71
72
|
unfold(line?: number): boolean;
|
|
72
73
|
unfoldAll(): void;
|
|
73
74
|
};
|
|
75
|
+
type Decoration = {
|
|
76
|
+
kind: string;
|
|
77
|
+
style: string;
|
|
78
|
+
};
|
|
74
79
|
type Options = {
|
|
75
80
|
autoBrackets?: boolean;
|
|
76
81
|
autoIndent?: boolean;
|
|
@@ -117,9 +122,10 @@ type State = Omit<Snapshot, 'selections'> & Readonly<{
|
|
|
117
122
|
};
|
|
118
123
|
selections: number;
|
|
119
124
|
}>;
|
|
125
|
+
declare const reuse: (pool: ReactiveArray<Decoration>, items: readonly Decoration[]) => void;
|
|
120
126
|
declare const view: (model: EditorDocument, callbacks: Callbacks, receive?: (controller: CodeController) => void) => {
|
|
121
127
|
controller: CodeController;
|
|
122
128
|
template: (attributes?: Attributes) => template_u1.Element;
|
|
123
129
|
};
|
|
124
|
-
export { view };
|
|
125
|
-
export type { Callbacks, CodeController, Controller, Options, State };
|
|
130
|
+
export { reuse, view };
|
|
131
|
+
export type { Callbacks, CodeController, Controller, Decoration, Options, State };
|