@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
package/bin/agent-cli
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Agent CLI: terse subcommands replacing shell commands agents repeat in this repo.
|
|
3
|
+
// Dependency-free Node ESM; node: builtins only.
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
6
|
+
import { join, relative, resolve } from 'node:path';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const COMMANDS = {
|
|
10
|
+
log: {
|
|
11
|
+
help: 'log [<repo>...] [--n <n>] [--status <n>] [--no-status] [--json]\n Branch, last <n> commits (oneline, default 15) and short status (first 30) per repo in one call.',
|
|
12
|
+
replaces: 'git log --oneline -<n> (17 threads/73 calls), git log --oneline -<n> + git status --short (17 back-to-back calls)',
|
|
13
|
+
run(args) {
|
|
14
|
+
let { flags, paths } = parse(args, ['n', 'status']),
|
|
15
|
+
limit = Number(flags.n) || 15,
|
|
16
|
+
max = flags.status === undefined ? 30 : Number(flags.status),
|
|
17
|
+
out = [];
|
|
18
|
+
|
|
19
|
+
if (!paths.length) {
|
|
20
|
+
paths.push('.');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
for (let i = 0, n = paths.length; i < n; i++) {
|
|
24
|
+
out.push(repo(paths[i], limit, flags['no-status'] ? 0 : max, !flags['no-status']));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (flags.json) {
|
|
28
|
+
print(JSON.stringify(out));
|
|
29
|
+
return out.some((o) => o.error) ? 1 : 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
for (let i = 0, n = out.length; i < n; i++) {
|
|
33
|
+
let o = out[i];
|
|
34
|
+
|
|
35
|
+
if (o.error) {
|
|
36
|
+
print(`${o.path}: ERROR ${o.error}`);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (n > 1 || o.path !== '.') {
|
|
41
|
+
print(`== ${o.path}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
print(`[${o.branch}]`);
|
|
45
|
+
|
|
46
|
+
for (let j = 0, m = o.commits.length; j < m; j++) {
|
|
47
|
+
print(`${o.commits[j].hash} ${o.commits[j].subject}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (!o.status) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!o.status.total) {
|
|
55
|
+
print('-- clean');
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
print(`-- status (${o.status.total})`);
|
|
60
|
+
|
|
61
|
+
for (let j = 0, m = o.status.files.length; j < m; j++) {
|
|
62
|
+
print(o.status.files[j]);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (o.status.total > o.status.files.length) {
|
|
66
|
+
print(`+${o.status.total - o.status.files.length} more`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return out.some((o) => o.error) ? 1 : 0;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
peek: {
|
|
74
|
+
help: 'peek <path>... [--head <n>] [--lines <a>,<b>] [--json]\n List dirs (files with line counts) and print files (optionally a line range) in one call.',
|
|
75
|
+
replaces: 'ls <path> (10 threads/98 calls)',
|
|
76
|
+
run(args) {
|
|
77
|
+
let { flags, paths } = parse(args, ['head', 'lines']),
|
|
78
|
+
out = [];
|
|
79
|
+
|
|
80
|
+
if (!paths.length) {
|
|
81
|
+
paths.push('.');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
let range = window(flags);
|
|
85
|
+
|
|
86
|
+
for (let i = 0, n = paths.length; i < n; i++) {
|
|
87
|
+
out.push(inspect(paths[i], range));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (flags.json) {
|
|
91
|
+
print(JSON.stringify(out));
|
|
92
|
+
return out.some((o) => o.error) ? 1 : 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for (let i = 0, n = out.length; i < n; i++) {
|
|
96
|
+
let o = out[i];
|
|
97
|
+
|
|
98
|
+
if (o.error) {
|
|
99
|
+
print(`${o.path}: ERROR ${o.error}`);
|
|
100
|
+
}
|
|
101
|
+
else if (o.binary) {
|
|
102
|
+
print(`== ${o.path} [binary, ${o.bytes} bytes]`);
|
|
103
|
+
}
|
|
104
|
+
else if (o.type === 'dir') {
|
|
105
|
+
print(`${o.path}/ (${o.entries.length})`);
|
|
106
|
+
|
|
107
|
+
for (let j = 0, m = o.entries.length; j < m; j++) {
|
|
108
|
+
let e = o.entries[j];
|
|
109
|
+
|
|
110
|
+
print(e.type === 'dir' ? ` ${e.name}/` : ` ${e.name} ${e.lines}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
print(`== ${o.path} [${o.from}-${o.to}/${o.lines}]`);
|
|
115
|
+
print(o.content);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return out.some((o) => o.error) ? 1 : 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
function countLines(file) {
|
|
126
|
+
try {
|
|
127
|
+
let buf = readFileSync(file),
|
|
128
|
+
n = 0;
|
|
129
|
+
|
|
130
|
+
if (isBinary(buf)) {
|
|
131
|
+
return 'bin';
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
for (let i = 0, len = buf.length; i < len; i++) {
|
|
135
|
+
if (buf[i] === 10) {
|
|
136
|
+
n++;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return buf.length && buf[buf.length - 1] !== 10 ? n + 1 : n;
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
return '?';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function git(cwd, args) {
|
|
148
|
+
return execFileSync('git', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function inspect(path, range) {
|
|
152
|
+
let abs = resolve(path),
|
|
153
|
+
rel = relative(process.cwd(), abs).replace(/\\/g, '/') || '.',
|
|
154
|
+
stat;
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
stat = statSync(abs);
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
return { error: e.code || String(e), path: rel };
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (stat.isDirectory()) {
|
|
164
|
+
let entries = readdirSync(abs, { withFileTypes: true })
|
|
165
|
+
.filter((d) => d.name !== '.git' && d.name !== 'node_modules')
|
|
166
|
+
.map((d) => d.isDirectory()
|
|
167
|
+
? { name: d.name, type: 'dir' }
|
|
168
|
+
: { lines: countLines(join(abs, d.name)), name: d.name, type: 'file' }
|
|
169
|
+
)
|
|
170
|
+
.sort((a, b) => (a.type === b.type ? 0 : a.type === 'dir' ? -1 : 1) || a.name.localeCompare(b.name));
|
|
171
|
+
|
|
172
|
+
return { entries, path: rel, type: 'dir' };
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
let buf = readFileSync(abs);
|
|
176
|
+
|
|
177
|
+
if (isBinary(buf)) {
|
|
178
|
+
return { binary: true, bytes: buf.length, path: rel, type: 'file' };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
let all = buf.toString('utf8').split(/\r?\n/);
|
|
182
|
+
|
|
183
|
+
if (all.length && all[all.length - 1] === '') {
|
|
184
|
+
all.pop();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let from = Math.max(1, range.from),
|
|
188
|
+
to = Math.min(all.length, range.to);
|
|
189
|
+
|
|
190
|
+
return { content: all.slice(from - 1, to).join('\n'), from, lines: all.length, path: rel, to, type: 'file' };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function isBinary(buf) {
|
|
194
|
+
return buf.includes(0);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function main(argv) {
|
|
198
|
+
let [name, ...rest] = argv;
|
|
199
|
+
|
|
200
|
+
if (!name || name === '--help' || name === '-h') {
|
|
201
|
+
print('agent-cli <command> [--json] [--help]');
|
|
202
|
+
|
|
203
|
+
for (let key of Object.keys(COMMANDS)) {
|
|
204
|
+
print(` ${key} — ${COMMANDS[key].help.split('\n')[1].trim()}`);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (!COMMANDS[name]) {
|
|
211
|
+
print(`unknown command: ${name} (try --help)`);
|
|
212
|
+
return 2;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (rest.includes('--help') || rest.includes('-h')) {
|
|
216
|
+
usage(name);
|
|
217
|
+
return 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return COMMANDS[name].run(rest) || 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function parse(args, valued) {
|
|
224
|
+
let flags = {},
|
|
225
|
+
paths = [];
|
|
226
|
+
|
|
227
|
+
for (let i = 0, n = args.length; i < n; i++) {
|
|
228
|
+
let a = args[i];
|
|
229
|
+
|
|
230
|
+
if (a.startsWith('--')) {
|
|
231
|
+
let key = a.slice(2);
|
|
232
|
+
|
|
233
|
+
flags[key] = valued.includes(key) ? args[++i] : true;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
paths.push(a);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return { flags, paths };
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function print(s) {
|
|
244
|
+
process.stdout.write(s + '\n');
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function repo(path, limit, max, status) {
|
|
248
|
+
let abs = resolve(path),
|
|
249
|
+
rel = relative(process.cwd(), abs).replace(/\\/g, '/') || '.';
|
|
250
|
+
|
|
251
|
+
try {
|
|
252
|
+
let branch = git(abs, ['rev-parse', '--abbrev-ref', 'HEAD']).trim(),
|
|
253
|
+
commits = git(abs, ['log', '--oneline', '--no-decorate', `-${limit}`])
|
|
254
|
+
.split(/\r?\n/)
|
|
255
|
+
.filter(Boolean)
|
|
256
|
+
.map((l) => {
|
|
257
|
+
let k = l.indexOf(' ');
|
|
258
|
+
|
|
259
|
+
return { hash: l.slice(0, k), subject: l.slice(k + 1) };
|
|
260
|
+
}),
|
|
261
|
+
o = { branch, commits, path: rel };
|
|
262
|
+
|
|
263
|
+
if (status) {
|
|
264
|
+
let files = git(abs, ['status', '--short']).split(/\r?\n/).filter(Boolean);
|
|
265
|
+
|
|
266
|
+
o.status = { files: files.slice(0, max), total: files.length };
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return o;
|
|
270
|
+
}
|
|
271
|
+
catch (e) {
|
|
272
|
+
let msg = String(e.stderr || e.message || e).trim().split(/\r?\n/)[0];
|
|
273
|
+
|
|
274
|
+
return { error: msg, path: rel };
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function usage(name) {
|
|
279
|
+
let c = COMMANDS[name];
|
|
280
|
+
|
|
281
|
+
print(`${c.help}\n replaces: ${c.replaces}`);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function window(flags) {
|
|
285
|
+
if (flags.lines) {
|
|
286
|
+
let [a, b] = String(flags.lines).split(',').map(Number);
|
|
287
|
+
|
|
288
|
+
return { from: a || 1, to: b || Infinity };
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (flags.head) {
|
|
292
|
+
return { from: 1, to: Number(flags.head) || Infinity };
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
return { from: 1, to: Infinity };
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
// Set exitCode instead of process.exit() so piped stdout (async on Windows) fully flushes.
|
|
300
|
+
process.exitCode = main(process.argv.slice(2));
|
|
@@ -3,6 +3,7 @@ import { type Attributes } from '@esportsplus/template';
|
|
|
3
3
|
import { type Group } from './group.js';
|
|
4
4
|
import './scss/index.scss';
|
|
5
5
|
type A = Attributes & {
|
|
6
|
+
[ACCORDION_CONTENT]?: Attributes;
|
|
6
7
|
group?: Group;
|
|
7
8
|
lines?: number;
|
|
8
9
|
state?: {
|
|
@@ -10,11 +11,14 @@ type A = Attributes & {
|
|
|
10
11
|
expandable?: boolean;
|
|
11
12
|
};
|
|
12
13
|
};
|
|
14
|
+
declare const ACCORDION_CONTENT: unique symbol;
|
|
13
15
|
declare const _default: template_u1.Factory<A, template_u1.Renderable<any>, template_u1.Renderable<any>, {
|
|
16
|
+
readonly content: typeof ACCORDION_CONTENT;
|
|
14
17
|
readonly group: ({ required }?: {
|
|
15
18
|
required?: boolean;
|
|
16
19
|
}) => Group;
|
|
17
20
|
}> & {
|
|
21
|
+
readonly content: typeof ACCORDION_CONTENT;
|
|
18
22
|
readonly group: ({ required }?: {
|
|
19
23
|
required?: boolean;
|
|
20
24
|
}) => Group;
|
|
@@ -57,7 +57,8 @@ class ReactiveObject_04mlrpv2 extends reactivity_u0.ReactiveObject {
|
|
|
57
57
|
reactivity_u0.write(this.#instant, _v1);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
const ACCORDION_CONTENT = Symbol.for('@esportsplus/ui/accordion.content');
|
|
61
|
+
export default component(function ({ [ACCORDION_CONTENT]: inner, group, lines, state = new ReactiveObject_04mlrpv0(), ...attributes }, content) {
|
|
61
62
|
let a, c, property = lines === undefined ? 'grid-template-rows' : 'height', ui = new ReactiveObject_04mlrpv1(), viewport;
|
|
62
63
|
let motion = trackTransition(property, (running, element) => {
|
|
63
64
|
ui.scrollable = !!state.active && !!element && !running;
|
|
@@ -101,14 +102,16 @@ export default component(function ({ group, lines, state = new ReactiveObject_04
|
|
|
101
102
|
{
|
|
102
103
|
let root_04mlrpv3 = template_04mlrpv4(), element_04mlrpv5 = root_04mlrpv3.firstElementChild;
|
|
103
104
|
template_u1.slot(element_04mlrpv5, content, 1);
|
|
104
|
-
let attributes_04mlrpv6 =
|
|
105
|
+
let attributes_04mlrpv6 = inner;
|
|
105
106
|
template_u1.setProperties(element_04mlrpv5, attributes_04mlrpv6, true);
|
|
106
|
-
|
|
107
|
-
template_u1.
|
|
108
|
-
|
|
109
|
-
template_u1.
|
|
110
|
-
let attributes_04mlrpv8 =
|
|
107
|
+
let attributes_04mlrpv7 = c;
|
|
108
|
+
template_u1.setProperties(element_04mlrpv5, attributes_04mlrpv7, true);
|
|
109
|
+
template_u1.setClass(element_04mlrpv5, ["accordion-content", attributes_04mlrpv6?.class, attributes_04mlrpv7?.class]);
|
|
110
|
+
template_u1.setStyle(element_04mlrpv5, ["", attributes_04mlrpv6?.style, attributes_04mlrpv7?.style]);
|
|
111
|
+
let attributes_04mlrpv8 = attributes;
|
|
111
112
|
template_u1.setProperties(root_04mlrpv3, attributes_04mlrpv8, true);
|
|
113
|
+
let attributes_04mlrpv9 = a;
|
|
114
|
+
template_u1.setProperties(root_04mlrpv3, attributes_04mlrpv9, true);
|
|
112
115
|
template_u1.setProperties(root_04mlrpv3, motion.attributes);
|
|
113
116
|
template_u1.setProperty(root_04mlrpv3, 'inert', () => lines === undefined && !state.active);
|
|
114
117
|
template_u1.onconnect(root_04mlrpv3, (element) => {
|
|
@@ -122,11 +125,11 @@ export default component(function ({ group, lines, state = new ReactiveObject_04
|
|
|
122
125
|
group?.members.delete(state);
|
|
123
126
|
viewport = undefined;
|
|
124
127
|
});
|
|
125
|
-
template_u1.setClass(root_04mlrpv3, ["accordion",
|
|
128
|
+
template_u1.setClass(root_04mlrpv3, ["accordion", attributes_04mlrpv8?.class, attributes_04mlrpv9?.class, [
|
|
126
129
|
() => state.active && '--active',
|
|
127
130
|
() => state.active && ui.scrollable && 'accordion--scrollable'
|
|
128
131
|
]]);
|
|
129
|
-
template_u1.setStyle(root_04mlrpv3, ["",
|
|
132
|
+
template_u1.setStyle(root_04mlrpv3, ["", attributes_04mlrpv8?.style, attributes_04mlrpv9?.style]);
|
|
130
133
|
return root_04mlrpv3;
|
|
131
134
|
}
|
|
132
|
-
}, { group });
|
|
135
|
+
}, { content: ACCORDION_CONTENT, group });
|
|
@@ -5,17 +5,17 @@ import { component } from '@esportsplus/template';
|
|
|
5
5
|
import icon from '../icon/index.js';
|
|
6
6
|
import tooltip from '../tooltip/index.js';
|
|
7
7
|
import { observer } from '../../shared/resize.js';
|
|
8
|
-
import chevron from '@esportsplus/ui/svg/chevron
|
|
8
|
+
import chevron from '@esportsplus/ui/svg/chevron.svg';
|
|
9
9
|
import dots from '@esportsplus/ui/svg/dots.svg';
|
|
10
10
|
import folder from '@esportsplus/ui/svg/folder.svg';
|
|
11
11
|
import slash from '@esportsplus/ui/svg/slash.svg';
|
|
12
12
|
import './scss/index.scss';
|
|
13
13
|
const template_1iy9n1s3 = template_u1.template(`<nav><ol aria-hidden='true' inert><!--$--><li class='breadcrumb-ruler-segment'><!--$--><span class='breadcrumb-space'></span></li></ol><ol class='breadcrumb-list'>`, true);
|
|
14
|
-
const template_1iy9n1s9 = template_u1.template(`<li class='breadcrumb-ruler-segment'
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
14
|
+
const template_1iy9n1s9 = template_u1.template(`<li class='breadcrumb-ruler-segment'><!--$--><!--$--><span>`, true);
|
|
15
|
+
const template_1iy9n1se = template_u1.template(`<li><div class='breadcrumb-segment-body'><!--$--></div></li><!--$-->`);
|
|
16
|
+
const template_1iy9n1sk = template_u1.template(`<!--$--><span aria-current='page' class='breadcrumb-label --active'>`);
|
|
17
|
+
const template_1iy9n1so = template_u1.template(`<a><!--$--><span class='breadcrumb-label'>`, true);
|
|
18
|
+
const template_1iy9n1st = template_u1.template(`<li><div class='breadcrumb-segment-body'><!--$-->`, true);
|
|
19
19
|
class ReactiveObject_1iy9n1s0 extends reactivity_u0.ReactiveObject {
|
|
20
20
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
21
21
|
#hidden = this[reactivity_u0.SIGNAL](0);
|
|
@@ -51,6 +51,9 @@ const BREADCRUMB_LINK = Symbol.for('@esportsplus/ui/breadcrumb.link');
|
|
|
51
51
|
const BREADCRUMB_MENU = Symbol.for('@esportsplus/ui/breadcrumb.menu');
|
|
52
52
|
const SEPARATORS = { chevron, slash };
|
|
53
53
|
let uid = 0;
|
|
54
|
+
function glyph(item, active) {
|
|
55
|
+
return item.icon && icon({ 'aria-hidden': 'true', class: `breadcrumb-icon ${active ? '--active' : ''}` }, item.icon);
|
|
56
|
+
}
|
|
54
57
|
function separator(kind) {
|
|
55
58
|
return icon({ 'aria-hidden': 'true', class: 'breadcrumb-separator' }, SEPARATORS[kind]);
|
|
56
59
|
}
|
|
@@ -94,43 +97,46 @@ const breadcrumb = ({ items, label = 'Breadcrumb', onnavigate, separator: kind =
|
|
|
94
97
|
{
|
|
95
98
|
let root_1iy9n1s2 = template_1iy9n1s3(), element_1iy9n1s4 = root_1iy9n1s2.firstElementChild, element_1iy9n1s5 = element_1iy9n1s4.firstChild, element_1iy9n1s6 = element_1iy9n1s4.firstElementChild.firstChild, element_1iy9n1s7 = element_1iy9n1s4.nextElementSibling;
|
|
96
99
|
template_u1.slot(element_1iy9n1s5, items.map((item, index) => {
|
|
97
|
-
let root_1iy9n1s8 = template_1iy9n1s9(), element_1iy9n1sa = root_1iy9n1s8.firstChild, element_1iy9n1sb = root_1iy9n1s8.firstElementChild;
|
|
100
|
+
let root_1iy9n1s8 = template_1iy9n1s9(), element_1iy9n1sa = root_1iy9n1s8.firstChild, element_1iy9n1sb = element_1iy9n1sa.nextSibling, element_1iy9n1sc = root_1iy9n1s8.firstElementChild;
|
|
98
101
|
template_u1.slot(element_1iy9n1sa, index > 0 && separator(kind));
|
|
99
|
-
template_u1.slot(element_1iy9n1sb, item
|
|
100
|
-
template_u1.
|
|
102
|
+
template_u1.slot(element_1iy9n1sb, glyph(item, index === last));
|
|
103
|
+
template_u1.slot(element_1iy9n1sc, item.label, 1);
|
|
104
|
+
template_u1.setClass(element_1iy9n1sc, ["breadcrumb-label", index === last && '--active']);
|
|
101
105
|
return root_1iy9n1s8;
|
|
102
106
|
}));
|
|
103
107
|
template_u1.slot(element_1iy9n1s6, separator(kind));
|
|
104
108
|
template_u1.slot(element_1iy9n1s7, items.map((item, index) => {
|
|
105
|
-
let
|
|
106
|
-
template_u1.slot(
|
|
107
|
-
|
|
109
|
+
let root_1iy9n1sd = template_1iy9n1se(), element_1iy9n1sf = root_1iy9n1sd.firstChild, element_1iy9n1sg = element_1iy9n1sf.firstElementChild.firstChild, element_1iy9n1sh = element_1iy9n1sf.firstElementChild, element_1iy9n1si = element_1iy9n1sf.nextSibling;
|
|
110
|
+
template_u1.slot(element_1iy9n1sg, index > 0 && separator(kind));
|
|
111
|
+
element_1iy9n1sh.appendChild(index === last
|
|
108
112
|
? (() => {
|
|
109
|
-
let
|
|
110
|
-
template_u1.slot(
|
|
111
|
-
|
|
113
|
+
let root_1iy9n1sj = template_1iy9n1sk(), element_1iy9n1sl = root_1iy9n1sj.firstChild, element_1iy9n1sm = element_1iy9n1sl.nextSibling;
|
|
114
|
+
template_u1.slot(element_1iy9n1sl, glyph(item, true));
|
|
115
|
+
template_u1.slot(element_1iy9n1sm, item.label, 1);
|
|
116
|
+
return root_1iy9n1sj;
|
|
112
117
|
})()
|
|
113
118
|
: (() => {
|
|
114
|
-
let
|
|
115
|
-
template_u1.slot(
|
|
116
|
-
template_u1.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
template_u1.
|
|
119
|
+
let root_1iy9n1sn = template_1iy9n1so(), element_1iy9n1sp = root_1iy9n1sn.firstChild, element_1iy9n1sq = root_1iy9n1sn.firstElementChild;
|
|
120
|
+
template_u1.slot(element_1iy9n1sp, glyph(item, false));
|
|
121
|
+
template_u1.slot(element_1iy9n1sq, item.label, 1);
|
|
122
|
+
template_u1.setProperty(root_1iy9n1sn, 'href', item.href);
|
|
123
|
+
let attributes_1iy9n1sr = attributes[BREADCRUMB_LINK];
|
|
124
|
+
template_u1.setProperties(root_1iy9n1sn, attributes_1iy9n1sr, true);
|
|
125
|
+
template_u1.onconnect(root_1iy9n1sn, (element, on) => {
|
|
120
126
|
on(element, 'click', (e) => navigate(e, item, index));
|
|
121
127
|
});
|
|
122
|
-
template_u1.setClass(
|
|
123
|
-
template_u1.setStyle(
|
|
124
|
-
return
|
|
128
|
+
template_u1.setClass(root_1iy9n1sn, ["breadcrumb-link", attributes_1iy9n1sr?.class]);
|
|
129
|
+
template_u1.setStyle(root_1iy9n1sn, ["", attributes_1iy9n1sr?.style]);
|
|
130
|
+
return root_1iy9n1sn;
|
|
125
131
|
})());
|
|
126
|
-
template_u1.slot(
|
|
127
|
-
let
|
|
128
|
-
template_u1.slot(
|
|
129
|
-
template_u1.slot(
|
|
132
|
+
template_u1.slot(element_1iy9n1si, index === 0 && (() => {
|
|
133
|
+
let root_1iy9n1ss = template_1iy9n1st(), element_1iy9n1su = root_1iy9n1ss.firstElementChild.firstChild, element_1iy9n1sv = root_1iy9n1ss.firstElementChild;
|
|
134
|
+
template_u1.slot(element_1iy9n1su, separator(kind));
|
|
135
|
+
template_u1.slot(element_1iy9n1sv, tooltip.menu({
|
|
130
136
|
items: items.slice(1, last).map((item, i) => ({
|
|
131
137
|
hidden: () => i >= s.hidden,
|
|
132
138
|
href: item.href,
|
|
133
|
-
icon: () => icon({ 'aria-hidden': 'true' }, folder),
|
|
139
|
+
icon: () => icon({ 'aria-hidden': 'true' }, item.icon ?? folder),
|
|
134
140
|
label: item.label,
|
|
135
141
|
onselect: (_item, event) => navigate(event, item, i + 1),
|
|
136
142
|
target: '_self'
|
|
@@ -147,16 +153,16 @@ const breadcrumb = ({ items, label = 'Breadcrumb', onnavigate, separator: kind =
|
|
|
147
153
|
id: `${id}-menu`
|
|
148
154
|
}
|
|
149
155
|
}, icon({ 'aria-hidden': 'true' }, dots)), 1);
|
|
150
|
-
template_u1.setClass(
|
|
151
|
-
return
|
|
156
|
+
template_u1.setClass(root_1iy9n1ss, ["breadcrumb-segment breadcrumb-fold", () => s.hidden <= 0 && 'breadcrumb-segment--hidden']);
|
|
157
|
+
return root_1iy9n1ss;
|
|
152
158
|
})());
|
|
153
|
-
template_u1.setClass(
|
|
154
|
-
return
|
|
159
|
+
template_u1.setClass(element_1iy9n1sf, ["breadcrumb-segment", index === last && '--active', () => index > 0 && index < last && index <= s.hidden && 'breadcrumb-segment--hidden']);
|
|
160
|
+
return root_1iy9n1sd;
|
|
155
161
|
}), 1);
|
|
156
162
|
template_u1.onconnect(element_1iy9n1s4, (element) => { ruler = element; });
|
|
157
163
|
template_u1.setClass(element_1iy9n1s4, ["breadcrumb-ruler"]);
|
|
158
|
-
let
|
|
159
|
-
template_u1.setProperties(root_1iy9n1s2,
|
|
164
|
+
let attributes_1iy9n1sw = attributes;
|
|
165
|
+
template_u1.setProperties(root_1iy9n1s2, attributes_1iy9n1sw, true);
|
|
160
166
|
template_u1.setProperty(root_1iy9n1s2, 'aria-label', label);
|
|
161
167
|
template_u1.onconnect(root_1iy9n1s2, (element) => {
|
|
162
168
|
let resize = observer(fit);
|
|
@@ -171,8 +177,8 @@ const breadcrumb = ({ items, label = 'Breadcrumb', onnavigate, separator: kind =
|
|
|
171
177
|
template_u1.onfirstpaint(root_1iy9n1s2, () => {
|
|
172
178
|
view.instant = false;
|
|
173
179
|
});
|
|
174
|
-
template_u1.setClass(root_1iy9n1s2, ["breadcrumb",
|
|
175
|
-
template_u1.setStyle(root_1iy9n1s2, ["",
|
|
180
|
+
template_u1.setClass(root_1iy9n1s2, ["breadcrumb", attributes_1iy9n1sw?.class, () => view.instant && 'breadcrumb--instant']);
|
|
181
|
+
template_u1.setStyle(root_1iy9n1s2, ["", attributes_1iy9n1sw?.style]);
|
|
176
182
|
return root_1iy9n1s2;
|
|
177
183
|
}
|
|
178
184
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.breadcrumb-list,.breadcrumb-ruler{margin:0;padding:0;list-style:none}.breadcrumb-label.--active{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.breadcrumb-link{--color:var(--color-default);--color-active:var(--color-default);--color-default:var(--color-text-400);--color-hover:var(--color-default);--color-pressed:var(--color-default)}.--active.breadcrumb-link{--color:var(--color-active)}.breadcrumb-link:not(.--active):is(:hover,.--hover){--color:var(--color-hover)}.breadcrumb-link:not(.--active):is(:active,.--pressed){--color:var(--color-pressed)}.breadcrumb-link{--color-active:var(--color-text-300);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}:where([data-theme=dark]) .breadcrumb-link{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-500);--color-pressed:var(--color-text-300)}:where([data-theme=light]) .breadcrumb-link{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}.breadcrumb{--font-size:var(--font-size-300)}.breadcrumb--instant .breadcrumb-segment{--enter-duration:0s;--exit-duration:0s;--slide-duration:0s}.breadcrumb-label{--font-weight:var(--font-weight-400);--padding-horizontal:2px;--padding-vertical:0px}.breadcrumb-label.--active{--color:var(--color-text-400);--font-weight:var(--font-weight-600)}.breadcrumb-link{--border-radius:var(--border-radius-300);--height:var(--size-400);--transition-duration:.15s;--transition-timing-function:ease-out;--underline-color:oklch(from var(--color-primary-500) l c h / .4);--underline-offset:calc(var(--size-100) / 2)}.breadcrumb-list{--height:var(--size-400)}.breadcrumb-segment{--enter-duration:.2s;--enter-timing-function:linear(0, .0491, .1571, .2846, .4106, .5248, .6231, .7049, .7714, .8243, .866, .8984, .9234, .9425, .957, .9679, .9762, .9824, .987, .9904, .9929, .9948, .9962, .9972, 1);--exit-duration:.12s;--exit-timing-function:var(--enter-timing-function);--slide-duration:.31s;--slide-timing-function:linear(0, .0432 4.2%, .1402 8.3%, .2575 12.5%, .3764 16.7%, .4867 20.8%, .584 25%, .667 29.2%, .7361 33.3%, .7925 37.5%, .838 41.7%, .8743 45.8%, .9029 50%, .9254 54.2%, .9428 58.3%, .9564 62.5%, .9668 66.7%, .9748 70.8%, .9809 75%, .9856 79.2%, .9892 83.3%, .9918 87.5%, .9939 91.7%, .9954 95.8%, 1)}.breadcrumb-segment--hidden{--blur:var(--blur-400)}.breadcrumb-segment--hidden .breadcrumb-segment-body{--overflow:hidden;--transition:none}.breadcrumb-segment-body{--overflow:visible;--transition:overflow 0s linear var(--slide-duration) allow-discrete}.breadcrumb-separator.icon{--color:oklch(from var(--color-primary-300) l c h / .5)}.breadcrumb-space{--width:var(--size-400)}.breadcrumb-trigger{--background-hover:var(--surface-background-hover);--border-radius:var(--border-radius-300);--color:var(--color-text-400);--height:calc(var(--size-400) - 4px);--transition-duration:.15s;--transition-timing-function:ease-out;--width:var(--size-400)}.breadcrumb{font-size:var(--font-size);width:100%;min-width:0;position:relative}.breadcrumb-label{font-weight:var(--font-weight);padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal)}.breadcrumb-label.--active{color:var(--color)}.breadcrumb-link{border-radius:var(--border-radius);color:var(--color);height:var(--height);text-underline-offset:var(--underline-offset);touch-action:manipulation;transition:
|
|
1
|
+
@layer components{.breadcrumb-list,.breadcrumb-ruler{margin:0;padding:0;list-style:none}.breadcrumb-label.--active{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.breadcrumb-link{--color:var(--color-default);--color-active:var(--color-default);--color-default:var(--color-text-400);--color-hover:var(--color-default);--color-pressed:var(--color-default)}.--active.breadcrumb-link{--color:var(--color-active)}.breadcrumb-link:not(.--active):is(:hover,.--hover){--color:var(--color-hover)}.breadcrumb-link:not(.--active):is(:active,.--pressed){--color:var(--color-pressed)}.breadcrumb-link{--color-active:var(--color-text-300);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}:where([data-theme=dark]) .breadcrumb-link{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-500);--color-pressed:var(--color-text-300)}:where([data-theme=light]) .breadcrumb-link{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}.breadcrumb{--font-size:var(--font-size-300)}.breadcrumb--instant .breadcrumb-segment{--enter-duration:0s;--exit-duration:0s;--slide-duration:0s}.breadcrumb-icon.icon.--active{--color:var(--color-text-400)}.breadcrumb-label{--font-weight:var(--font-weight-400);--padding-horizontal:2px;--padding-vertical:0px}.breadcrumb-label.--active{--color:var(--color-text-400);--font-weight:var(--font-weight-600)}.breadcrumb-link{--border-radius:var(--border-radius-300);--height:var(--size-400);--transition-duration:.15s;--transition-timing-function:ease-out;--underline-color:oklch(from var(--color-primary-500) l c h / .4);--underline-offset:calc(var(--size-100) / 2)}.breadcrumb-list{--height:var(--size-400)}.breadcrumb-segment{--enter-duration:.2s;--enter-timing-function:linear(0, .0491, .1571, .2846, .4106, .5248, .6231, .7049, .7714, .8243, .866, .8984, .9234, .9425, .957, .9679, .9762, .9824, .987, .9904, .9929, .9948, .9962, .9972, 1);--exit-duration:.12s;--exit-timing-function:var(--enter-timing-function);--slide-duration:.31s;--slide-timing-function:linear(0, .0432 4.2%, .1402 8.3%, .2575 12.5%, .3764 16.7%, .4867 20.8%, .584 25%, .667 29.2%, .7361 33.3%, .7925 37.5%, .838 41.7%, .8743 45.8%, .9029 50%, .9254 54.2%, .9428 58.3%, .9564 62.5%, .9668 66.7%, .9748 70.8%, .9809 75%, .9856 79.2%, .9892 83.3%, .9918 87.5%, .9939 91.7%, .9954 95.8%, 1)}.breadcrumb-segment--hidden{--blur:var(--blur-400)}.breadcrumb-segment--hidden .breadcrumb-segment-body{--overflow:hidden;--transition:none}.breadcrumb-segment-body{--overflow:visible;--transition:overflow 0s linear var(--slide-duration) allow-discrete}.breadcrumb-separator.icon{--color:oklch(from var(--color-primary-300) l c h / .5)}.breadcrumb-space{--width:var(--size-400)}.breadcrumb-trigger{--background-hover:var(--surface-background-hover);--border-radius:var(--border-radius-300);--color:var(--color-text-400);--height:calc(var(--size-400) - 4px);--transition-duration:.15s;--transition-timing-function:ease-out;--width:var(--size-400)}.breadcrumb{font-size:var(--font-size);width:100%;min-width:0;position:relative}.breadcrumb-label{font-weight:var(--font-weight);padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal)}.breadcrumb-label.--active{color:var(--color)}.breadcrumb-link{border-radius:var(--border-radius);color:var(--color);height:var(--height);text-underline-offset:var(--underline-offset);touch-action:manipulation;transition-duration:var(--transition-duration);transition-property:color,text-decoration-color;transition-timing-function:var(--transition-timing-function);-webkit-user-select:none;user-select:none;white-space:nowrap;outline:none;align-items:center;text-decoration:underline #0000;display:inline-flex}.breadcrumb-link:focus-visible{outline:var(--focus-width) solid var(--focus-color)}.breadcrumb-link:hover{text-decoration-color:var(--underline-color)}.breadcrumb-list{height:var(--height);align-items:center;min-width:0;display:flex;position:relative}.breadcrumb-ruler{pointer-events:none;visibility:hidden;white-space:nowrap;display:flex;position:absolute;inset:0 auto auto 0}.breadcrumb-ruler-segment{flex-shrink:0;align-items:center;display:flex}.breadcrumb-segment{transition:filter var(--enter-duration) var(--enter-timing-function), grid-template-columns var(--slide-duration) var(--slide-timing-function), opacity var(--enter-duration) var(--enter-timing-function);flex-shrink:0;grid-template-columns:1fr;align-items:center;display:grid}@media (prefers-reduced-motion:reduce){.breadcrumb-segment{filter:none;transition:opacity var(--enter-duration) var(--enter-timing-function)}}.breadcrumb-segment--hidden{filter:blur(var(--blur));opacity:0;transition:filter 0s linear var(--exit-duration), grid-template-columns var(--slide-duration) var(--slide-timing-function), opacity var(--exit-duration) var(--exit-timing-function), visibility 0s linear var(--slide-duration);visibility:hidden;grid-template-columns:0fr}@media (prefers-reduced-motion:reduce){.breadcrumb-segment--hidden{transition:opacity var(--exit-duration) var(--exit-timing-function), visibility 0s linear var(--exit-duration)}}.breadcrumb-segment-body{min-width:0;overflow:var(--overflow);transition:var(--transition);align-items:center;display:flex}@media (prefers-reduced-motion:reduce){.breadcrumb-segment-body{transition-delay:0s}}.breadcrumb-segment.--active{flex-shrink:1;min-width:0}.breadcrumb-space{width:var(--width);display:block}.breadcrumb-trigger{border-radius:var(--border-radius);color:var(--color);cursor:pointer;height:var(--height);touch-action:manipulation;transition-duration:var(--transition-duration);transition-property:background-color,color;transition-timing-function:var(--transition-timing-function);-webkit-user-select:none;user-select:none;width:var(--width);background:0 0;border:0;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.breadcrumb-trigger:focus-visible{outline:var(--focus-width) solid var(--focus-color)}.breadcrumb-trigger:hover,.breadcrumb-trigger[aria-expanded=true]{background:var(--background-hover)}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -7,5 +7,5 @@ type A = Attributes & {
|
|
|
7
7
|
onwindowkeydown?: never;
|
|
8
8
|
onwindowkeyup?: never;
|
|
9
9
|
};
|
|
10
|
-
declare const _default: template_u1.Factory<A, Renderable<
|
|
10
|
+
declare const _default: template_u1.Factory<A, Renderable<unknown>, Renderable<any>, {}>;
|
|
11
11
|
export default _default;
|
|
@@ -3,6 +3,7 @@ import * as template_u1 from '@esportsplus/template';
|
|
|
3
3
|
import { component } from '@esportsplus/template';
|
|
4
4
|
import cmd from '@esportsplus/ui/svg/command.svg';
|
|
5
5
|
import icon from '../icon/index.js';
|
|
6
|
+
import { mac } from '../../shared/platform.js';
|
|
6
7
|
const template_1g09exi2 = template_u1.template(`<kbd>`, true);
|
|
7
8
|
class ReactiveObject_1g09exi0 extends reactivity_u0.ReactiveObject {
|
|
8
9
|
#code = this[reactivity_u0.SIGNAL]('');
|
|
@@ -31,20 +32,21 @@ class ReactiveObject_1g09exi0 extends reactivity_u0.ReactiveObject {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
const KEYS = {
|
|
34
|
-
alt: ['alt', '⌥'],
|
|
35
|
-
ctrl: ['control', '⌃'],
|
|
36
|
-
down: ['arrowdown', '↓'],
|
|
37
|
-
enter: ['enter', '↵'],
|
|
38
|
-
escape: ['escape', 'esc'],
|
|
39
|
-
left: ['arrowleft', '←'],
|
|
40
|
-
meta: ['meta', () => icon({ 'aria-hidden': 'true', class: 'button-kbd-icon' }, cmd)],
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
alt: (apple) => ['alt', apple ? '⌥' : 'Alt'],
|
|
36
|
+
ctrl: (apple) => ['control', apple ? '⌃' : 'Ctrl'],
|
|
37
|
+
down: () => ['arrowdown', '↓'],
|
|
38
|
+
enter: () => ['enter', '↵'],
|
|
39
|
+
escape: () => ['escape', 'esc'],
|
|
40
|
+
left: () => ['arrowleft', '←'],
|
|
41
|
+
meta: () => ['meta', () => icon({ 'aria-hidden': 'true', class: 'button-kbd-icon' }, cmd)],
|
|
42
|
+
mod: (apple) => KEYS[apple ? 'meta' : 'ctrl'](apple),
|
|
43
|
+
right: () => ['arrowright', '→'],
|
|
44
|
+
shift: (apple) => ['shift', apple ? '⇧' : 'Shift'],
|
|
45
|
+
space: () => [' ', '␣'],
|
|
46
|
+
up: () => ['arrowup', '↑']
|
|
45
47
|
};
|
|
46
|
-
export default component(({ key: name, ontrigger, ...attributes }) => {
|
|
47
|
-
let [key, legend] = KEYS[name.toLowerCase()] ?? [name.toLowerCase(), name.length === 1 ? name.toUpperCase() : name], state = new ReactiveObject_1g09exi0();
|
|
48
|
+
export default component(({ key: name, ontrigger, ...attributes }, content) => {
|
|
49
|
+
let [key, legend] = KEYS[name.toLowerCase()]?.(mac()) ?? [name.toLowerCase(), name.length === 1 ? name.toUpperCase() : name], state = new ReactiveObject_1g09exi0();
|
|
48
50
|
function press(source) {
|
|
49
51
|
let down = state.keyboard || state.pointer;
|
|
50
52
|
state[source] = true;
|
|
@@ -59,7 +61,7 @@ export default component(({ key: name, ontrigger, ...attributes }) => {
|
|
|
59
61
|
}
|
|
60
62
|
{
|
|
61
63
|
let root_1g09exi1 = template_1g09exi2();
|
|
62
|
-
template_u1.slot(root_1g09exi1, typeof legend === 'function' ? legend() : legend, 1);
|
|
64
|
+
template_u1.slot(root_1g09exi1, content ?? (typeof legend === 'function' ? legend() : legend), 1);
|
|
63
65
|
let attributes_1g09exi3 = attributes;
|
|
64
66
|
template_u1.setProperties(root_1g09exi1, attributes_1g09exi3, true);
|
|
65
67
|
template_u1.delegate(root_1g09exi1, 'pointercancel', release);
|
|
@@ -76,7 +78,7 @@ export default component(({ key: name, ontrigger, ...attributes }) => {
|
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
state.code = e.code;
|
|
79
|
-
if (press('keyboard')) {
|
|
81
|
+
if (press('keyboard') && ontrigger) {
|
|
80
82
|
e.preventDefault();
|
|
81
83
|
}
|
|
82
84
|
});
|