@esportsplus/ui 0.62.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 +4 -92
- package/.audit/rules-audit.md +4 -18
- 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 -7
- package/build/components/index.js +3 -7
- 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 +9 -12
- 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 -7
- 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 -69
- 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/cc/index.d.ts +0 -33
- package/build/components/cc/index.js +0 -603
- package/build/components/cc/scss/index.scss +0 -2
- 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/cc/index.ts +0 -562
- package/src/components/cc/scss/index.scss +0 -416
- package/src/components/cc/scss/variables.scss +0 -257
- 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,115 +0,0 @@
|
|
|
1
|
-
import * as template_u1 from '@esportsplus/template';
|
|
2
|
-
import { component } from '@esportsplus/template';
|
|
3
|
-
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
|
-
import { effect, onCleanup } from '@esportsplus/reactivity';
|
|
5
|
-
const template_01hmmm73 = template_u1.template(`<div aria-label='Pages' role='group'><!--$--><span aria-hidden='true' class='pagination-pill'>`, true);
|
|
6
|
-
const template_01hmmm77 = template_u1.template(`<button type='button'><span class='pagination-mark'>`, true);
|
|
7
|
-
const template_01hmmm7b = template_u1.template(`<span class='pagination-fill'>`, true);
|
|
8
|
-
class ReactiveObject_01hmmm70 extends reactivity_u0.ReactiveObject {
|
|
9
|
-
#active = this[reactivity_u0.SIGNAL](0);
|
|
10
|
-
#progress = this[reactivity_u0.SIGNAL](0);
|
|
11
|
-
#running = this[reactivity_u0.SIGNAL](false);
|
|
12
|
-
constructor() {
|
|
13
|
-
super(null);
|
|
14
|
-
}
|
|
15
|
-
get active() {
|
|
16
|
-
return reactivity_u0.read(this.#active);
|
|
17
|
-
}
|
|
18
|
-
set active(_v0) {
|
|
19
|
-
reactivity_u0.write(this.#active, _v0);
|
|
20
|
-
}
|
|
21
|
-
get progress() {
|
|
22
|
-
return reactivity_u0.read(this.#progress);
|
|
23
|
-
}
|
|
24
|
-
set progress(_v1) {
|
|
25
|
-
reactivity_u0.write(this.#progress, _v1);
|
|
26
|
-
}
|
|
27
|
-
get running() {
|
|
28
|
-
return reactivity_u0.read(this.#running);
|
|
29
|
-
}
|
|
30
|
-
set running(_v2) {
|
|
31
|
-
reactivity_u0.write(this.#running, _v2);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
class ReactiveObject_01hmmm71 extends reactivity_u0.ReactiveObject {
|
|
35
|
-
#connected = this[reactivity_u0.SIGNAL](false);
|
|
36
|
-
constructor() {
|
|
37
|
-
super(null);
|
|
38
|
-
}
|
|
39
|
-
get connected() {
|
|
40
|
-
return reactivity_u0.read(this.#connected);
|
|
41
|
-
}
|
|
42
|
-
set connected(_v0) {
|
|
43
|
-
reactivity_u0.write(this.#connected, _v0);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const DOTS_DOT = Symbol.for('@esportsplus/ui/pagination.dots.dot');
|
|
47
|
-
const SETTLE = { duration: 200, easing: 'cubic-bezier(0.23, 1, 0.32, 1)' };
|
|
48
|
-
function template({ autoplay, count, onelapsed, onpage, state = new ReactiveObject_01hmmm70(), ...attributes }) {
|
|
49
|
-
let fill, local = new ReactiveObject_01hmmm71(), settle;
|
|
50
|
-
effect(() => {
|
|
51
|
-
let active = Math.min(Math.max(Math.round(state.progress), 0), count - 1);
|
|
52
|
-
if (state.active !== active) {
|
|
53
|
-
state.active = active;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
effect((cleanup) => {
|
|
57
|
-
let active = state.active, running = local.connected && state.running;
|
|
58
|
-
if (!autoplay || !fill || !running) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
let target = fill;
|
|
62
|
-
settle?.cancel();
|
|
63
|
-
let countdown = target.animate([{ transform: 'scaleX(0)' }, { transform: 'scaleX(1)' }], { duration: autoplay, easing: 'linear' });
|
|
64
|
-
countdown.onfinish = () => onelapsed?.(active);
|
|
65
|
-
cleanup(() => {
|
|
66
|
-
countdown.onfinish = null;
|
|
67
|
-
if (countdown.playState !== 'running') {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (!target.isConnected) {
|
|
71
|
-
countdown.cancel();
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
let from = getComputedStyle(target).transform;
|
|
75
|
-
countdown.cancel();
|
|
76
|
-
settle = target.animate([{ transform: from }, { transform: 'scaleX(1)' }], SETTLE);
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
onCleanup(() => settle?.cancel());
|
|
80
|
-
{
|
|
81
|
-
let root_01hmmm72 = template_01hmmm73(), element_01hmmm74 = root_01hmmm72.firstChild, element_01hmmm75 = root_01hmmm72.firstElementChild;
|
|
82
|
-
template_u1.slot(element_01hmmm74, Array.from({ length: count }, (_, i) => {
|
|
83
|
-
let root_01hmmm76 = template_01hmmm77();
|
|
84
|
-
template_u1.setProperty(root_01hmmm76, 'aria-current', () => state.active === i && 'page');
|
|
85
|
-
template_u1.setProperty(root_01hmmm76, 'aria-label', `Page ${i + 1} of ${count}`);
|
|
86
|
-
template_u1.delegate(root_01hmmm76, 'click', () => onpage?.(i));
|
|
87
|
-
let attributes_01hmmm78 = this?.attributes?.[DOTS_DOT];
|
|
88
|
-
template_u1.setProperties(root_01hmmm76, attributes_01hmmm78, true);
|
|
89
|
-
let attributes_01hmmm79 = attributes[DOTS_DOT];
|
|
90
|
-
template_u1.setProperties(root_01hmmm76, attributes_01hmmm79, true);
|
|
91
|
-
template_u1.setClass(root_01hmmm76, ["pagination-dot", attributes_01hmmm78?.class, attributes_01hmmm79?.class]);
|
|
92
|
-
template_u1.setStyle(root_01hmmm76, ["", `--index: ${i};`, attributes_01hmmm78?.style, attributes_01hmmm79?.style]);
|
|
93
|
-
return root_01hmmm76;
|
|
94
|
-
}));
|
|
95
|
-
template_u1.slot(element_01hmmm75, autoplay && (() => {
|
|
96
|
-
let root_01hmmm7a = template_01hmmm7b();
|
|
97
|
-
template_u1.onconnect(root_01hmmm7a, (el) => { fill = el; });
|
|
98
|
-
return root_01hmmm7a;
|
|
99
|
-
})(), 1);
|
|
100
|
-
let attributes_01hmmm7c = this?.attributes;
|
|
101
|
-
template_u1.setProperties(root_01hmmm72, attributes_01hmmm7c, true);
|
|
102
|
-
let attributes_01hmmm7d = attributes;
|
|
103
|
-
template_u1.setProperties(root_01hmmm72, attributes_01hmmm7d, true);
|
|
104
|
-
template_u1.onconnect(root_01hmmm72, () => {
|
|
105
|
-
local.connected = true;
|
|
106
|
-
});
|
|
107
|
-
template_u1.ondisconnect(root_01hmmm72, () => {
|
|
108
|
-
local.connected = false;
|
|
109
|
-
});
|
|
110
|
-
template_u1.setClass(root_01hmmm72, ["pagination pagination--dots", autoplay && 'pagination--dots-autoplay', attributes_01hmmm7c?.class, attributes_01hmmm7d?.class]);
|
|
111
|
-
template_u1.setStyle(root_01hmmm72, ["", () => `--count: ${count}; --progress: ${state.progress};`, attributes_01hmmm7c?.style, attributes_01hmmm7d?.style]);
|
|
112
|
-
return root_01hmmm72;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
export default component(template, { dot: DOTS_DOT });
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
type Active = Source & {
|
|
2
|
-
rect: Rect;
|
|
3
|
-
};
|
|
4
|
-
type Collide = (active: Active, pointer: Point, targets: Target[]) => string | null;
|
|
5
|
-
type Data = Record<string, unknown>;
|
|
6
|
-
type Over = Target;
|
|
7
|
-
type Point = {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
type Rect = {
|
|
12
|
-
bottom: number;
|
|
13
|
-
height: number;
|
|
14
|
-
left: number;
|
|
15
|
-
right: number;
|
|
16
|
-
top: number;
|
|
17
|
-
width: number;
|
|
18
|
-
};
|
|
19
|
-
type Source = {
|
|
20
|
-
data: Data;
|
|
21
|
-
id: string;
|
|
22
|
-
node: HTMLElement;
|
|
23
|
-
};
|
|
24
|
-
type Target = Source & {
|
|
25
|
-
rect: Rect;
|
|
26
|
-
};
|
|
27
|
-
declare const manager: ({ collide, end, label }: {
|
|
28
|
-
collide: Collide;
|
|
29
|
-
end: (active: Active, over: Over | null, pointer: Point) => void;
|
|
30
|
-
label: (active: Active) => string;
|
|
31
|
-
}) => {
|
|
32
|
-
active: import("@esportsplus/reactivity").Signal<Active | null>;
|
|
33
|
-
dispose: () => void;
|
|
34
|
-
drag(source: Source, e: PointerEvent): void;
|
|
35
|
-
droppable(config: () => {
|
|
36
|
-
data: Data;
|
|
37
|
-
id: string;
|
|
38
|
-
}): {
|
|
39
|
-
class: () => "" | "--over";
|
|
40
|
-
onconnect: (element: HTMLElement) => void;
|
|
41
|
-
ondisconnect: () => void;
|
|
42
|
-
};
|
|
43
|
-
over: import("@esportsplus/reactivity").Signal<Target | null>;
|
|
44
|
-
overlay(): () => void;
|
|
45
|
-
};
|
|
46
|
-
export default manager;
|
|
47
|
-
export type { Active, Collide, Over, Point, Rect, Target };
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { dispose, effect, peek, read, root, signal, untrack, write } from '@esportsplus/reactivity';
|
|
2
|
-
import * as template_u1 from '@esportsplus/template';
|
|
3
|
-
import { on, render } from '@esportsplus/template';
|
|
4
|
-
const template_0iee3uw1 = template_u1.template(`<div>`, true);
|
|
5
|
-
const THRESHOLD = 4;
|
|
6
|
-
function measure(element) {
|
|
7
|
-
let { bottom, height, left, right, top, width } = element.getBoundingClientRect();
|
|
8
|
-
return { bottom, height, left, right, top, width };
|
|
9
|
-
}
|
|
10
|
-
const manager = ({ collide, end, label }) => {
|
|
11
|
-
let active = signal(null), delta = signal({ x: 0, y: 0 }), over = signal(null), pressed = null, targets = new Map();
|
|
12
|
-
function reset() {
|
|
13
|
-
pressed?.();
|
|
14
|
-
pressed = null;
|
|
15
|
-
write(active, null);
|
|
16
|
-
write(delta, { x: 0, y: 0 });
|
|
17
|
-
write(over, null);
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
active,
|
|
21
|
-
dispose: reset,
|
|
22
|
-
drag(source, e) {
|
|
23
|
-
if (pressed || e.button !== 0) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
let controller = new AbortController(), origin = { x: e.clientX, y: e.clientY }, rects = [], signal = controller.signal, started = false;
|
|
27
|
-
pressed = () => controller.abort();
|
|
28
|
-
function move(e) {
|
|
29
|
-
let pointer = { x: e.clientX, y: e.clientY };
|
|
30
|
-
if (!started) {
|
|
31
|
-
if (Math.hypot(pointer.x - origin.x, pointer.y - origin.y) < THRESHOLD) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
started = true;
|
|
35
|
-
rects = [...targets.values()].map((target) => ({ ...target, rect: measure(target.node) }));
|
|
36
|
-
write(active, { ...source, rect: measure(source.node) });
|
|
37
|
-
}
|
|
38
|
-
let current = peek(active), id = collide(current, pointer, rects);
|
|
39
|
-
write(delta, { x: pointer.x - origin.x, y: pointer.y - origin.y });
|
|
40
|
-
write(over, rects.find((target) => target.id === id) ?? null);
|
|
41
|
-
}
|
|
42
|
-
on(document, 'keydown', (e) => {
|
|
43
|
-
if (e.key === 'Escape') {
|
|
44
|
-
e.preventDefault();
|
|
45
|
-
reset();
|
|
46
|
-
}
|
|
47
|
-
}, { signal });
|
|
48
|
-
on(document, 'pointercancel', reset, { signal });
|
|
49
|
-
on(document, 'pointermove', move, { signal });
|
|
50
|
-
on(document, 'pointerup', (e) => {
|
|
51
|
-
let current = peek(active), target = peek(over);
|
|
52
|
-
reset();
|
|
53
|
-
if (started && current) {
|
|
54
|
-
end(current, target, { x: e.clientX, y: e.clientY });
|
|
55
|
-
}
|
|
56
|
-
}, { signal });
|
|
57
|
-
},
|
|
58
|
-
droppable(config) {
|
|
59
|
-
let id = '', node = null;
|
|
60
|
-
return {
|
|
61
|
-
class: () => read(over)?.id === id && id !== '' ? '--over' : '',
|
|
62
|
-
onconnect: (element) => {
|
|
63
|
-
let current = config();
|
|
64
|
-
id = current.id;
|
|
65
|
-
node = element;
|
|
66
|
-
targets.set(id, { ...current, node: element });
|
|
67
|
-
},
|
|
68
|
-
ondisconnect: () => {
|
|
69
|
-
if (node && targets.get(id)?.node === node) {
|
|
70
|
-
targets.delete(id);
|
|
71
|
-
}
|
|
72
|
-
node = null;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
over,
|
|
77
|
-
overlay() {
|
|
78
|
-
let release = null;
|
|
79
|
-
function unmount() {
|
|
80
|
-
release?.();
|
|
81
|
-
release = null;
|
|
82
|
-
}
|
|
83
|
-
let stop = effect(() => {
|
|
84
|
-
let current = read(active);
|
|
85
|
-
if (!current) {
|
|
86
|
-
unmount();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (release) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
release = untrack(() => root(() => render(document.body, () => {
|
|
93
|
-
let root_0iee3uw0 = template_0iee3uw1();
|
|
94
|
-
template_u1.slot(root_0iee3uw0, label(current), 1);
|
|
95
|
-
template_u1.setClass(root_0iee3uw0, ["panels-ghost"]);
|
|
96
|
-
template_u1.setStyle(root_0iee3uw0, ["", () => {
|
|
97
|
-
let offset = read(delta);
|
|
98
|
-
return {
|
|
99
|
-
left: `${current.rect.left}px`,
|
|
100
|
-
top: `${current.rect.top}px`,
|
|
101
|
-
translate: `${offset.x}px ${offset.y}px`
|
|
102
|
-
};
|
|
103
|
-
}]);
|
|
104
|
-
return root_0iee3uw0;
|
|
105
|
-
})));
|
|
106
|
-
});
|
|
107
|
-
return () => {
|
|
108
|
-
dispose(stop);
|
|
109
|
-
unmount();
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
export default manager;
|
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
-
import { computed, effect, read } from '@esportsplus/reactivity';
|
|
3
|
-
import * as template_u1 from '@esportsplus/template';
|
|
4
|
-
import highlight from '../highlight/index.js';
|
|
5
|
-
import icon from '../icon/index.js';
|
|
6
|
-
import scrollbar from '../../modifiers/scrollbar/index.js';
|
|
7
|
-
import subtree from './subtree.js';
|
|
8
|
-
import close from '@esportsplus/ui/svg/close.svg';
|
|
9
|
-
import collapse from '@esportsplus/ui/svg/collapse.svg';
|
|
10
|
-
import expand from '@esportsplus/ui/svg/expand.svg';
|
|
11
|
-
import plus from '@esportsplus/ui/svg/plus.svg';
|
|
12
|
-
const template_0ixvyzr2 = template_u1.template(`<div aria-hidden='true'>`, true);
|
|
13
|
-
const template_0ixvyzr8 = template_u1.template(`<div role='tab'><!--$-->`, true);
|
|
14
|
-
const template_0ixvyzrb = template_u1.template(`<span class='panels-tab-label'></span><button tabindex='-1' type='button'>`);
|
|
15
|
-
const template_0ixvyzrf = template_u1.template(`<div aria-label='Open a panel' tabindex='0'><div class='panels-launcher-content'><div class='panels-launcher-header'><span class='panels-launcher-title'>Open a panel</span><span class='panels-launcher-description'>Choose what to show in this group.</span></div><div class='panels-launcher-cards'>`, true);
|
|
16
|
-
const template_0ixvyzri = template_u1.template(`<button type='button'><span class='panels-launcher-card-title'><!--$--></span><!--$-->`, true);
|
|
17
|
-
const template_0ixvyzrn = template_u1.template(`<span class='panels-launcher-card-description'>`, true);
|
|
18
|
-
const template_0ixvyzrp = template_u1.template(`<kbd class='button button--kbd panels-launcher-card-key'>`, true);
|
|
19
|
-
const template_0ixvyzrr = template_u1.template(`<section><div><div aria-label='Panels' role='tablist'><!--$--><!--$--><button aria-haspopup='menu' aria-label='Add panel' title='Add panel' type='button'></button></div><!--$--><button aria-label='Close group' title='Close group' type='button'></button></div><div class='panels-body'><!--$-->`, true);
|
|
20
|
-
const template_0ixvyzr12 = template_u1.template(`<button type='button'>`, true);
|
|
21
|
-
const template_0ixvyzr14 = template_u1.template(`<button aria-label='Expand this group' type='button'>`, true);
|
|
22
|
-
class ReactiveObject_0ixvyzr0 extends reactivity_u0.ReactiveObject {
|
|
23
|
-
#index = this[reactivity_u0.SIGNAL](-1);
|
|
24
|
-
constructor() {
|
|
25
|
-
super(null);
|
|
26
|
-
}
|
|
27
|
-
get index() {
|
|
28
|
-
return reactivity_u0.read(this.#index);
|
|
29
|
-
}
|
|
30
|
-
set index(_v0) {
|
|
31
|
-
reactivity_u0.write(this.#index, _v0);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const BLOCKING = 'dialog[open], [popover]:popover-open';
|
|
35
|
-
const SIDES = ['bottom', 'left', 'right', 'top'];
|
|
36
|
-
function edge(context, live, side) {
|
|
37
|
-
let { group } = live();
|
|
38
|
-
return (side === "bottom" ? (() => {
|
|
39
|
-
let root_0ixvyzr1 = template_0ixvyzr2();
|
|
40
|
-
template_u1.setProperties(root_0ixvyzr1, context.manager.droppable(() => ({
|
|
41
|
-
data: { group: group.id, kind: 'edge', side },
|
|
42
|
-
id: `edge:${group.id}:${side}`
|
|
43
|
-
})));
|
|
44
|
-
template_u1.setClass(root_0ixvyzr1, ["panels-edge panels-edge--bottom"]);
|
|
45
|
-
return root_0ixvyzr1;
|
|
46
|
-
})() : side === "left" ? (() => {
|
|
47
|
-
let root_0ixvyzr3 = template_0ixvyzr2();
|
|
48
|
-
template_u1.setProperties(root_0ixvyzr3, context.manager.droppable(() => ({
|
|
49
|
-
data: { group: group.id, kind: 'edge', side },
|
|
50
|
-
id: `edge:${group.id}:${side}`
|
|
51
|
-
})));
|
|
52
|
-
template_u1.setClass(root_0ixvyzr3, ["panels-edge panels-edge--left"]);
|
|
53
|
-
return root_0ixvyzr3;
|
|
54
|
-
})() : side === "right" ? (() => {
|
|
55
|
-
let root_0ixvyzr4 = template_0ixvyzr2();
|
|
56
|
-
template_u1.setProperties(root_0ixvyzr4, context.manager.droppable(() => ({
|
|
57
|
-
data: { group: group.id, kind: 'edge', side },
|
|
58
|
-
id: `edge:${group.id}:${side}`
|
|
59
|
-
})));
|
|
60
|
-
template_u1.setClass(root_0ixvyzr4, ["panels-edge panels-edge--right"]);
|
|
61
|
-
return root_0ixvyzr4;
|
|
62
|
-
})() : side === "top" ? (() => {
|
|
63
|
-
let root_0ixvyzr5 = template_0ixvyzr2();
|
|
64
|
-
template_u1.setProperties(root_0ixvyzr5, context.manager.droppable(() => ({
|
|
65
|
-
data: { group: group.id, kind: 'edge', side },
|
|
66
|
-
id: `edge:${group.id}:${side}`
|
|
67
|
-
})));
|
|
68
|
-
template_u1.setClass(root_0ixvyzr5, ["panels-edge panels-edge--top"]);
|
|
69
|
-
return root_0ixvyzr5;
|
|
70
|
-
})() : (() => {
|
|
71
|
-
let root_0ixvyzr6 = template_0ixvyzr2();
|
|
72
|
-
template_u1.setProperties(root_0ixvyzr6, context.manager.droppable(() => ({
|
|
73
|
-
data: { group: group.id, kind: 'edge', side },
|
|
74
|
-
id: `edge:${group.id}:${side}`
|
|
75
|
-
})));
|
|
76
|
-
template_u1.setClass(root_0ixvyzr6, ["panels-edge", "panels-edge--" + (side)]);
|
|
77
|
-
return root_0ixvyzr6;
|
|
78
|
-
})());
|
|
79
|
-
}
|
|
80
|
-
function glyph(context, surface) {
|
|
81
|
-
let kind = context.catalog[surface.kind];
|
|
82
|
-
return kind?.icon && icon({ 'aria-hidden': 'true', class: 'panels-tab-icon' }, kind.icon);
|
|
83
|
-
}
|
|
84
|
-
function tab(context, live, surface) {
|
|
85
|
-
let active = () => live().group.active === surface.id, { group } = live(), label = title(context, surface), only = context.icons && !!context.catalog[surface.kind]?.icon;
|
|
86
|
-
{
|
|
87
|
-
let root_0ixvyzr7 = template_0ixvyzr8(), element_0ixvyzr9 = root_0ixvyzr7.firstChild;
|
|
88
|
-
template_u1.slot(element_0ixvyzr9, glyph(context, surface));
|
|
89
|
-
template_u1.slot(root_0ixvyzr7, !only && (() => {
|
|
90
|
-
let root_0ixvyzra = template_0ixvyzrb(), element_0ixvyzrc = root_0ixvyzra.firstChild, element_0ixvyzrd = element_0ixvyzrc.nextSibling;
|
|
91
|
-
template_u1.slot(element_0ixvyzrc, label, 1);
|
|
92
|
-
template_u1.slot(element_0ixvyzrd, icon({ 'aria-hidden': 'true' }, close), 1);
|
|
93
|
-
template_u1.setProperty(element_0ixvyzrd, 'aria-label', "Close " + (label));
|
|
94
|
-
template_u1.delegate(element_0ixvyzrd, 'click', (e) => {
|
|
95
|
-
e.stopPropagation();
|
|
96
|
-
context.state.close(surface.id);
|
|
97
|
-
});
|
|
98
|
-
template_u1.delegate(element_0ixvyzrd, 'pointerdown', (e) => e.stopPropagation());
|
|
99
|
-
template_u1.setClass(element_0ixvyzrd, ["button panels-tab-close"]);
|
|
100
|
-
return root_0ixvyzra;
|
|
101
|
-
})(), 1);
|
|
102
|
-
template_u1.setProperty(root_0ixvyzr7, 'aria-selected', () => String(active()));
|
|
103
|
-
template_u1.setProperty(root_0ixvyzr7, 'data-surface', surface.id);
|
|
104
|
-
template_u1.setProperty(root_0ixvyzr7, 'title', label);
|
|
105
|
-
template_u1.delegate(root_0ixvyzr7, 'auxclick', (e) => {
|
|
106
|
-
if (e.button === 1) {
|
|
107
|
-
e.preventDefault();
|
|
108
|
-
context.state.close(surface.id);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
template_u1.delegate(root_0ixvyzr7, 'click', () => context.state.activate(surface.id));
|
|
112
|
-
template_u1.delegate(root_0ixvyzr7, 'contextmenu', (e) => context.menu(e, group.id, surface.id));
|
|
113
|
-
template_u1.delegate(root_0ixvyzr7, 'keydown', (e) => {
|
|
114
|
-
if (e.key === 'Delete') {
|
|
115
|
-
e.preventDefault();
|
|
116
|
-
context.state.close(surface.id);
|
|
117
|
-
}
|
|
118
|
-
else if (e.key === 'Enter' || e.key === ' ') {
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
context.state.activate(surface.id);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
template_u1.delegate(root_0ixvyzr7, 'mousedown', (e) => {
|
|
124
|
-
if (e.button === 1) {
|
|
125
|
-
e.preventDefault();
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
template_u1.delegate(root_0ixvyzr7, 'pointerdown', function (e) {
|
|
129
|
-
if (context.held(e)) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
context.manager.drag({ data: { group: group.id, surface: surface.id }, id: surface.id, node: this }, e);
|
|
133
|
-
});
|
|
134
|
-
template_u1.setProperty(root_0ixvyzr7, 'tabindex', () => active() ? 0 : -1);
|
|
135
|
-
template_u1.setClass(root_0ixvyzr7, ["button panels-tab", [
|
|
136
|
-
() => active() && '--active',
|
|
137
|
-
only && 'panels-tab--icon',
|
|
138
|
-
() => read(context.manager.active)?.id === surface.id && 'panels-tab--dragging'
|
|
139
|
-
]]);
|
|
140
|
-
return root_0ixvyzr7;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
function title(context, surface) {
|
|
144
|
-
let kind = context.catalog[surface.kind];
|
|
145
|
-
if (!kind) {
|
|
146
|
-
return surface.id;
|
|
147
|
-
}
|
|
148
|
-
return typeof kind.title === 'function' ? kind.title(surface) : kind.title;
|
|
149
|
-
}
|
|
150
|
-
const launcher = (context, group) => {
|
|
151
|
-
let highlighted = new ReactiveObject_0ixvyzr0(), kinds = Object.entries(context.catalog);
|
|
152
|
-
function current() {
|
|
153
|
-
return group === undefined || context.state.layout.active === group;
|
|
154
|
-
}
|
|
155
|
-
function open(index) {
|
|
156
|
-
let entry = kinds[index];
|
|
157
|
-
if (entry) {
|
|
158
|
-
context.add(entry[0], group);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
{
|
|
162
|
-
let root_0ixvyzre = template_0ixvyzrf(), element_0ixvyzrg = root_0ixvyzre.firstElementChild.firstElementChild.nextElementSibling;
|
|
163
|
-
template_u1.slot(element_0ixvyzrg, kinds.map(([, kind], index) => {
|
|
164
|
-
let root_0ixvyzrh = template_0ixvyzri(), element_0ixvyzrj = root_0ixvyzrh.firstElementChild.firstChild, element_0ixvyzrk = root_0ixvyzrh.firstElementChild, element_0ixvyzrl = root_0ixvyzrh.firstChild.nextSibling;
|
|
165
|
-
template_u1.slot(element_0ixvyzrj, kind.icon && icon({ 'aria-hidden': 'true', class: 'panels-launcher-card-icon' }, kind.icon));
|
|
166
|
-
template_u1.slot(element_0ixvyzrk, typeof kind.title === 'function' ? kind.title({ id: '', kind: kinds[index][0] }) : kind.title, 1);
|
|
167
|
-
template_u1.slot(element_0ixvyzrl, kind.description && (() => {
|
|
168
|
-
let root_0ixvyzrm = template_0ixvyzrn();
|
|
169
|
-
template_u1.slot(root_0ixvyzrm, kind.description, 1);
|
|
170
|
-
return root_0ixvyzrm;
|
|
171
|
-
})());
|
|
172
|
-
template_u1.slot(root_0ixvyzrh, kind.shortcut && (() => {
|
|
173
|
-
let root_0ixvyzro = template_0ixvyzrp();
|
|
174
|
-
template_u1.slot(root_0ixvyzro, kind.shortcut, 1);
|
|
175
|
-
return root_0ixvyzro;
|
|
176
|
-
})(), 1);
|
|
177
|
-
template_u1.delegate(root_0ixvyzrh, 'click', () => open(index));
|
|
178
|
-
template_u1.direct(root_0ixvyzrh, 'pointerenter', () => {
|
|
179
|
-
highlighted.index = index;
|
|
180
|
-
});
|
|
181
|
-
template_u1.direct(root_0ixvyzrh, 'pointerleave', () => {
|
|
182
|
-
if (highlighted.index === index) {
|
|
183
|
-
highlighted.index = -1;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
template_u1.setClass(root_0ixvyzrh, ["button panels-launcher-card", () => highlighted.index === index && '--active']);
|
|
187
|
-
return root_0ixvyzrh;
|
|
188
|
-
}), 1);
|
|
189
|
-
template_u1.onconnect(root_0ixvyzre, (element) => {
|
|
190
|
-
let active = document.activeElement;
|
|
191
|
-
if (current() && (!active || active === document.body || !active.isConnected)) {
|
|
192
|
-
element.focus({ preventScroll: true });
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
template_u1.delegate(root_0ixvyzre, 'keydown', (e) => {
|
|
196
|
-
let n = kinds.length;
|
|
197
|
-
if (!n || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey) {
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {
|
|
201
|
-
e.preventDefault();
|
|
202
|
-
highlighted.index = (highlighted.index + 1) % n;
|
|
203
|
-
}
|
|
204
|
-
else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {
|
|
205
|
-
e.preventDefault();
|
|
206
|
-
highlighted.index = highlighted.index < 1 ? n - 1 : highlighted.index - 1;
|
|
207
|
-
}
|
|
208
|
-
else if (e.key === 'Enter' && !e.target.closest('button')) {
|
|
209
|
-
e.preventDefault();
|
|
210
|
-
open(highlighted.index);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
template_u1.onwindow(root_0ixvyzre, 'keydown', (e) => {
|
|
214
|
-
if (e.defaultPrevented || e.isComposing || e.altKey || e.ctrlKey || e.metaKey || !current()) {
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
let target = e.target;
|
|
218
|
-
if (document.querySelector(BLOCKING) || target.closest?.('input, select, textarea, [contenteditable]')) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
let index = kinds.findIndex(([, kind]) => kind.shortcut?.toLowerCase() === e.key.toLowerCase());
|
|
222
|
-
if (index !== -1) {
|
|
223
|
-
e.preventDefault();
|
|
224
|
-
open(index);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
template_u1.setClass(root_0ixvyzre, ["panels-launcher"]);
|
|
228
|
-
return root_0ixvyzre;
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
const group = (context, live) => {
|
|
232
|
-
let { group } = live(), drop = context.manager.droppable(() => ({
|
|
233
|
-
data: { group: group.id, kind: 'group', strip: () => header?.getBoundingClientRect().bottom ?? 0 },
|
|
234
|
-
id: `group:${group.id}`
|
|
235
|
-
})), header, selected = computed(() => live().group.active), tabs;
|
|
236
|
-
function maximize(e) {
|
|
237
|
-
if (e.target.closest('.panels-action, .panels-add, .panels-tab-close')) {
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
if (context.state.layout.zoom.length) {
|
|
241
|
-
context.state.unzoom();
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
context.state.maximize(group.id);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
effect(() => {
|
|
248
|
-
read(selected);
|
|
249
|
-
queueMicrotask(() => {
|
|
250
|
-
tabs?.querySelector('.panels-tab.--active')?.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
{
|
|
254
|
-
let root_0ixvyzrq = template_0ixvyzrr(), element_0ixvyzrs = root_0ixvyzrq.firstElementChild, element_0ixvyzrt = element_0ixvyzrs.firstElementChild, element_0ixvyzru = element_0ixvyzrt.firstChild, element_0ixvyzrv = element_0ixvyzru.nextSibling, element_0ixvyzrw = element_0ixvyzrt.firstElementChild, element_0ixvyzrx = element_0ixvyzrs.firstChild.nextSibling, element_0ixvyzry = element_0ixvyzrt.nextElementSibling, element_0ixvyzrz = element_0ixvyzrs.nextElementSibling.firstChild, element_0ixvyzr10 = element_0ixvyzrs.nextElementSibling;
|
|
255
|
-
template_u1.slot(element_0ixvyzru, highlight({ class: 'panels-tabs-highlight', target: '.panels-tab' }));
|
|
256
|
-
template_u1.slot(element_0ixvyzrv, group.surfaces.map((surface) => tab(context, live, surface)));
|
|
257
|
-
template_u1.slot(element_0ixvyzrw, icon({ 'aria-hidden': 'true' }, plus), 1);
|
|
258
|
-
template_u1.slot(element_0ixvyzrx, group.placement === 'bottom' && (() => {
|
|
259
|
-
let root_0ixvyzr11 = template_0ixvyzr12();
|
|
260
|
-
new template_u1.EffectSlot(root_0ixvyzr11, () => icon({ 'aria-hidden': 'true' }, live().layout.bottom.maximized ? collapse : expand), 1);
|
|
261
|
-
template_u1.setProperty(root_0ixvyzr11, 'aria-label', () => live().layout.bottom.maximized ? 'Restore panel size' : 'Maximize panel');
|
|
262
|
-
template_u1.setProperty(root_0ixvyzr11, 'aria-pressed', () => String(live().layout.bottom.maximized));
|
|
263
|
-
template_u1.delegate(root_0ixvyzr11, 'click', () => context.state.maximize(group.id));
|
|
264
|
-
template_u1.setProperty(root_0ixvyzr11, 'title', () => live().layout.bottom.maximized ? 'Restore panel size' : 'Maximize panel');
|
|
265
|
-
template_u1.setClass(root_0ixvyzr11, ["button panels-action"]);
|
|
266
|
-
return root_0ixvyzr11;
|
|
267
|
-
})());
|
|
268
|
-
template_u1.slot(element_0ixvyzry, icon({ 'aria-hidden': 'true' }, close), 1);
|
|
269
|
-
template_u1.slot(element_0ixvyzrz, subtree(() => live().group.active ?? '', () => {
|
|
270
|
-
let { active, surfaces } = live().group;
|
|
271
|
-
if (surfaces.length === 0) {
|
|
272
|
-
return launcher(context, group.id);
|
|
273
|
-
}
|
|
274
|
-
return active === null ? '' : context.slot(active);
|
|
275
|
-
}));
|
|
276
|
-
new template_u1.EffectSlot(element_0ixvyzr10, () => {
|
|
277
|
-
let { group: current, layout } = live();
|
|
278
|
-
return current.placement !== 'bottom' && layout.maximized !== null && layout.maximized !== current.id && (() => {
|
|
279
|
-
let root_0ixvyzr13 = template_0ixvyzr14();
|
|
280
|
-
template_u1.delegate(root_0ixvyzr13, 'pointerdown', () => context.state.focus(group.id));
|
|
281
|
-
template_u1.setClass(root_0ixvyzr13, ["panels-expand"]);
|
|
282
|
-
return root_0ixvyzr13;
|
|
283
|
-
})();
|
|
284
|
-
}, 1);
|
|
285
|
-
template_u1.slot(root_0ixvyzrq, SIDES.map((side) => edge(context, live, side)), 1);
|
|
286
|
-
template_u1.delegate(element_0ixvyzry, 'click', () => context.state.closeGroup(group.id));
|
|
287
|
-
template_u1.setClass(element_0ixvyzry, ["button panels-action"]);
|
|
288
|
-
template_u1.delegate(element_0ixvyzrw, 'click', (e) => context.choose(e, group.id));
|
|
289
|
-
template_u1.setClass(element_0ixvyzrw, ["button panels-add"]);
|
|
290
|
-
let attributes_0ixvyzr15 = scrollbar({ hidden: true });
|
|
291
|
-
template_u1.setProperties(element_0ixvyzrt, attributes_0ixvyzr15, true);
|
|
292
|
-
template_u1.onconnect(element_0ixvyzrt, (element) => {
|
|
293
|
-
tabs = element;
|
|
294
|
-
});
|
|
295
|
-
template_u1.setClass(element_0ixvyzrt, ["panels-tabs", attributes_0ixvyzr15?.class]);
|
|
296
|
-
template_u1.setStyle(element_0ixvyzrt, ["", attributes_0ixvyzr15?.style]);
|
|
297
|
-
template_u1.onconnect(element_0ixvyzrs, (element) => {
|
|
298
|
-
header = element;
|
|
299
|
-
});
|
|
300
|
-
template_u1.delegate(element_0ixvyzrs, 'dblclick', maximize);
|
|
301
|
-
template_u1.setClass(element_0ixvyzrs, ["panels-header"]);
|
|
302
|
-
template_u1.setProperty(root_0ixvyzrq, 'data-group', group.id);
|
|
303
|
-
template_u1.setProperties(root_0ixvyzrq, drop);
|
|
304
|
-
template_u1.onconnect(root_0ixvyzrq, (element, on) => {
|
|
305
|
-
on(element, 'pointerdown', () => context.state.focus(group.id), { direct: true });
|
|
306
|
-
on(element, 'click', (e) => {
|
|
307
|
-
if (context.held(e)) {
|
|
308
|
-
e.preventDefault();
|
|
309
|
-
e.stopPropagation();
|
|
310
|
-
context.pick(group.id);
|
|
311
|
-
}
|
|
312
|
-
}, { capture: true });
|
|
313
|
-
});
|
|
314
|
-
template_u1.setClass(root_0ixvyzrq, ["panels-group", [
|
|
315
|
-
() => context.state.layout.active === group.id && '--active',
|
|
316
|
-
() => live().group.placement === 'bottom' && 'panels-group--bottom',
|
|
317
|
-
() => context.picked(group.id) && 'panels-group--picked'
|
|
318
|
-
]]);
|
|
319
|
-
return root_0ixvyzrq;
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
export { group, launcher, title };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as template_u1 from '@esportsplus/template';
|
|
2
|
-
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
3
|
-
import { type Catalog, type Kind } from './group.js';
|
|
4
|
-
import state, { type Layout, type Node, type Surface } from './model.js';
|
|
5
|
-
import './scss/index.scss';
|
|
6
|
-
type A = Attributes & {
|
|
7
|
-
catalog: Catalog;
|
|
8
|
-
icons?: boolean;
|
|
9
|
-
onconnect?: never;
|
|
10
|
-
state: ReturnType<typeof state>;
|
|
11
|
-
};
|
|
12
|
-
declare const panels: template_u1.Factory<A, Renderable<any>, Renderable<any>, {}>;
|
|
13
|
-
declare const layout: typeof panels & {
|
|
14
|
-
state: typeof state;
|
|
15
|
-
};
|
|
16
|
-
export default layout;
|
|
17
|
-
export type { Catalog, Kind, Layout, Node, Surface };
|