@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
|
@@ -8,7 +8,9 @@ type Link = {
|
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
}[];
|
|
11
|
+
sequence?: string;
|
|
11
12
|
speed?: number;
|
|
13
|
+
strength?: number;
|
|
12
14
|
to?: string;
|
|
13
15
|
width?: number;
|
|
14
16
|
};
|
|
@@ -1477,14 +1479,24 @@ declare const _default: template_u1.Factory<{
|
|
|
1477
1479
|
minHeight?: number;
|
|
1478
1480
|
minWidth?: number;
|
|
1479
1481
|
name?: string;
|
|
1482
|
+
onlink?: (to: string) => void;
|
|
1483
|
+
onlinking?: (point: {
|
|
1484
|
+
x: number;
|
|
1485
|
+
y: number;
|
|
1486
|
+
} | null) => void;
|
|
1480
1487
|
onsave?: (key: 'body' | 'title', value: string) => void;
|
|
1481
|
-
|
|
1488
|
+
ports?: boolean;
|
|
1489
|
+
rich?: boolean;
|
|
1490
|
+
rotation?: number;
|
|
1491
|
+
state?: Omit<{
|
|
1482
1492
|
height: number;
|
|
1493
|
+
rotation: number;
|
|
1483
1494
|
width: number;
|
|
1484
1495
|
x: number;
|
|
1485
1496
|
y: number;
|
|
1486
|
-
} & {
|
|
1497
|
+
}, "rotation"> & {
|
|
1487
1498
|
body?: string;
|
|
1499
|
+
rotation?: number;
|
|
1488
1500
|
title?: string;
|
|
1489
1501
|
};
|
|
1490
1502
|
title?: string;
|
|
@@ -2217,14 +2229,24 @@ declare const _default: template_u1.Factory<{
|
|
|
2217
2229
|
minHeight?: number;
|
|
2218
2230
|
minWidth?: number;
|
|
2219
2231
|
name?: string;
|
|
2232
|
+
onlink?: (to: string) => void;
|
|
2233
|
+
onlinking?: (point: {
|
|
2234
|
+
x: number;
|
|
2235
|
+
y: number;
|
|
2236
|
+
} | null) => void;
|
|
2220
2237
|
onsave?: (key: 'body' | 'title', value: string) => void;
|
|
2221
|
-
|
|
2238
|
+
ports?: boolean;
|
|
2239
|
+
rich?: boolean;
|
|
2240
|
+
rotation?: number;
|
|
2241
|
+
state?: Omit<{
|
|
2222
2242
|
height: number;
|
|
2243
|
+
rotation: number;
|
|
2223
2244
|
width: number;
|
|
2224
2245
|
x: number;
|
|
2225
2246
|
y: number;
|
|
2226
|
-
} & {
|
|
2247
|
+
}, "rotation"> & {
|
|
2227
2248
|
body?: string;
|
|
2249
|
+
rotation?: number;
|
|
2228
2250
|
title?: string;
|
|
2229
2251
|
};
|
|
2230
2252
|
title?: string;
|
|
@@ -66,6 +66,14 @@ function angle(value) {
|
|
|
66
66
|
let match = ANGLE.exec(value);
|
|
67
67
|
return match ? parseFloat(match[1]) * UNITS[match[2]] : 0;
|
|
68
68
|
}
|
|
69
|
+
function inside(shape, x, y) {
|
|
70
|
+
let angle = shape.rotation * Math.PI / 180, cos = Math.cos(angle), sin = Math.sin(angle), dx = x - shape.x, dy = y - shape.y, hx = shape.width / 2, hy = shape.height / 2, lx = Math.abs(dx * cos + dy * sin), ly = Math.abs(dy * cos - dx * sin);
|
|
71
|
+
if (shape.ellipse) {
|
|
72
|
+
return (lx * lx) / (hx * hx) + (ly * ly) / (hy * hy) <= 1;
|
|
73
|
+
}
|
|
74
|
+
let r = Math.max(0, Math.min(shape.radius, hx, hy)), qx = Math.max(0, lx - hx + r), qy = Math.max(0, ly - hy + r);
|
|
75
|
+
return lx <= hx && ly <= hy && qx * qx + qy * qy <= r * r;
|
|
76
|
+
}
|
|
69
77
|
function rgb(color) {
|
|
70
78
|
let cached = colors.get(color);
|
|
71
79
|
if (cached) {
|
|
@@ -143,10 +151,26 @@ export default component(function (attributes, content) {
|
|
|
143
151
|
if (!a || !b) {
|
|
144
152
|
return points;
|
|
145
153
|
}
|
|
146
|
-
let dx = b.x - a.x, dy = b.y - a.y, across = Math.abs(dx) >= Math.abs(dy), c1x = across ? a.x + dx / 2 : a.x, c1y = across ? a.y : a.y + dy / 2, c2x = across ? b.x - dx / 2 : b.x, c2y = across ? b.y : b.y - dy / 2;
|
|
154
|
+
let dx = b.x - a.x, dy = b.y - a.y, across = Math.abs(dx) >= Math.abs(dy), c1x = across ? a.x + dx / 2 : a.x, c1y = across ? a.y : a.y + dy / 2, c2x = across ? b.x - dx / 2 : b.x, c2y = across ? b.y : b.y - dy / 2, x = (t) => (1 - t) ** 3 * a.x + 3 * (1 - t) ** 2 * t * c1x + 3 * (1 - t) * t * t * c2x + t ** 3 * b.x, y = (t) => (1 - t) ** 3 * a.y + 3 * (1 - t) ** 2 * t * c1y + 3 * (1 - t) * t * t * c2y + t ** 3 * b.y;
|
|
155
|
+
let edge = (shape, from, to) => {
|
|
156
|
+
for (let i = 0; i < 12; i++) {
|
|
157
|
+
let mid = (from + to) / 2;
|
|
158
|
+
if (inside(shape, x(mid), y(mid))) {
|
|
159
|
+
from = mid;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
to = mid;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return (from + to) / 2;
|
|
166
|
+
};
|
|
167
|
+
let t0 = edge(a, 0, 1), t1 = edge(b, 1, t0);
|
|
168
|
+
if (t1 - t0 < 0.001) {
|
|
169
|
+
return points;
|
|
170
|
+
}
|
|
147
171
|
for (let i = 0; i <= 32; i++) {
|
|
148
|
-
let t =
|
|
149
|
-
points.push(
|
|
172
|
+
let t = t0 + (t1 - t0) * i / 32;
|
|
173
|
+
points.push(x(t), y(t));
|
|
150
174
|
}
|
|
151
175
|
return points;
|
|
152
176
|
}
|
|
@@ -243,7 +267,14 @@ export default component(function (attributes, content) {
|
|
|
243
267
|
points = curve(named.get(link.from ?? ''), named.get(link.to ?? ''));
|
|
244
268
|
}
|
|
245
269
|
if (points.length >= 4) {
|
|
246
|
-
result.push({
|
|
270
|
+
result.push({
|
|
271
|
+
motion: link.motion ?? 'still',
|
|
272
|
+
points,
|
|
273
|
+
sequence: link.sequence ?? '',
|
|
274
|
+
speed: link.speed ?? 0,
|
|
275
|
+
strength: link.strength ?? 1,
|
|
276
|
+
width: link.width ?? 0
|
|
277
|
+
});
|
|
247
278
|
}
|
|
248
279
|
}
|
|
249
280
|
return result;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.surface-field-surface-handle:before{position:absolute;bottom:50%;right:50%;translate:50% 50%}.surface-field-canvas,.surface-field-surface-lift{position:absolute;inset:0}.surface-field-surface-lift{border-radius:inherit;pointer-events:none}.surface-field-surface{--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .036) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .036) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .036) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .036) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) + -3.6), 0) * .01 + min(calc(var(--surface-level) + -3.6), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) + -3.6), 0) * .01 + min(calc(var(--surface-level) + -3.6), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h));--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}@container style(--surface-level:-3){.surface-field-surface{--surface-level:-2;--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:-2){.surface-field-surface{--surface-level:-1;--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:-1){.surface-field-surface{--surface-level:0;--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:0){.surface-field-surface{--surface-level:1;--surface-shadow-active:0 1px 3px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1px 2px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1px 2.875px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .075)), 0 .875px 1.75px -.875px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .07));--surface-shadow-default:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 2.25px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05)), 0 .25px .5px -.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:1){.surface-field-surface{--surface-level:2;--surface-shadow-active:0 4px 6px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 2px 4px -2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.625px 5.625px -.875px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.875px 3.75px -1.875px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-default:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 3px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1px 2px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1.75px 3.75px -.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.25px 2.5px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-pressed:0 .75px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .015),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 .125px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .005)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:2){.surface-field-surface{--surface-level:3;--surface-shadow-active:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 9.25px 13.875px -2.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 3.75px 5.75px -3.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-default:0 1px 3px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1px 2px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 4px 6px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 2px 4px -2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 5.5px 8.25px -1.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.5px 4.5px -2.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-pressed:0 1px 1.5px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .25px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:3){.surface-field-surface{--surface-level:4;--surface-shadow-active:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 18.75px 23.75px -4.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 7.5px 9.5px -5.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-default:0 4px 6px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2px 4px -2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 12.5px 17.5px -3.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 5px 7px -4.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-pressed:0 1px 2.75px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .035),transparent), 0 .75px 1.5px -.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .03),transparent), 0 1px 2.125px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .045)), 0 .125px .25px -.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01))}}@container style(--surface-level:4){.surface-field-surface{--surface-level:5;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 24.375px 46.875px -11.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .185)), 0 1px 1.25px -.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01));--surface-shadow-default:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 21.25px 31.25px -6.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .11)), 0 6px 7.5px -4.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .06));--surface-shadow-pressed:0 3.25px 5.25px -.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1.75px 3.5px -1.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1.375px 3.375px -.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.125px 2.25px -1.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:5){.surface-field-surface{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}.surface-field-surface-title{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}}.surface-field-canvas{--accent:#6683e8;--color:var(--color-text-500);--still:0}@media (prefers-reduced-motion:reduce){.surface-field-canvas{--still:1}}.surface-field-surface{--border-color:var(--surface-border-default);--border-radius:14px;--border-width:1px;--box-shadow:0 1px 2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .024),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .048)), 0 8px 24px -8px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .062),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .124));--scale:1;--transition-duration:.2s;--transition-timing-function:ease}@media (prefers-reduced-motion:reduce){.surface-field-surface{--transition-duration:0s}}.surface-field-surface-body{--color:var(--color-text-300);--font-size:calc(var(--font-size-400) * .8125);--line-height:1.5}.surface-field-surface-content{--gap-horizontal:0px;--gap-vertical:var(--size-100);--padding-bottom:var(--size-400);--padding-horizontal:var(--size-400)}.surface-field-surface-handle{--width:32px}.surface-field-surface-handle:before{--height:2px;--opacity:.7;--width:18px}.surface-field-surface-handle,.surface-field-surface-resize{--color:var(--color-primary-300)}.surface-field-surface-header{--cursor:grab;--gap-horizontal:calc(var(--size-100) / 2);--gap-vertical:0px;--height:28px;--padding-start:var(--size-400)}.surface-field-surface-lift{--box-shadow:0 2px 4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .032),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .064)), 0 20px 40px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .108),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .216));--opacity:0}.surface-field-surface-resize{--opacity:.7;--size:22px}.surface-field-surface-title{--color:var(--color-text-500)}.surface-field-surface.--active{--scale:1.01}@media (prefers-reduced-motion:reduce){.surface-field-surface.--active{--scale:1}}.surface-field-surface.--active .surface-field-surface-header{--cursor:grabbing}.surface-field-surface.--active .surface-field-surface-lift{--opacity:1}@property --still{syntax:"<number>";inherits:true;initial-value:0}.surface-field{isolation:isolate;position:relative}.surface-field-canvas{accent-color:var(--accent);color:var(--color);pointer-events:none;z-index:0;width:100%;height:100%;transition:--still 1ms}.surface-field-content{z-index:1;height:100%;position:relative}.surface-field-surface{background:var(--surface-background-default);border-radius:var(--border-radius);box-shadow:0 0 0 var(--border-width) var(--border-color), var(--box-shadow);scale:var(--scale);transition:scale var(--transition-duration) var(--transition-timing-function);flex-direction:column;display:flex;position:absolute;inset:0 auto auto 0}.surface-field-surface-body{color:var(--color);font-size:var(--font-size);line-height:var(--line-height);overflow-wrap:break-word;margin:0}.surface-field-surface-content{gap:var(--gap-vertical) var(--gap-horizontal);min-height:0;padding-block:0 var(--padding-bottom);padding-inline:var(--padding-horizontal);flex-direction:column;flex:1;display:flex;overflow:hidden}.surface-field-surface-handle{border-radius:0 var(--border-radius) 0 0;cursor:inherit;width:var(--width);flex-shrink:0;align-self:stretch;position:relative}.surface-field-surface-handle:before{content:"";height:var(--height);opacity:var(--opacity);width:var(--width);background:currentColor;border-radius:999px}.surface-field-surface-handle:only-child{border-radius:var(--border-radius) var(--border-radius) 0 0;flex:1;margin-inline-start:calc(var(--size-400) * -1)}.surface-field-surface-handle,.surface-field-surface-resize{color:var(--color);touch-action:none;background:0 0;border:0;padding:0}.surface-field-surface-handle:focus-visible,.surface-field-surface-resize:focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.surface-field-surface-header{cursor:var(--cursor);align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);min-height:var(--height);touch-action:none;flex-shrink:0;padding-inline-start:var(--padding-start);display:flex}.surface-field-surface-lift{box-shadow:var(--box-shadow);opacity:var(--opacity);transition:opacity var(--transition-duration) var(--transition-timing-function)}.surface-field-surface-resize{border-radius:0 0 var(--border-radius) 0;cursor:nwse-resize;height:var(--size);opacity:var(--opacity);width:var(--size);background:linear-gradient(135deg,#0000 45%,currentColor 45% 52%,#0000 52%) 4px 4px/12px 12px no-repeat,linear-gradient(135deg,#0000 70%,currentColor 70% 77%,#0000 77%) 4px 4px/12px 12px no-repeat;position:absolute;bottom:0;right:0}.surface-field-surface-title{color:var(--color);font-weight:var(--font-weight-600);flex:0 auto;min-width:0}.surface-field-surface-title+.surface-field-surface-handle{margin-inline-start:auto}}
|
|
1
|
+
@layer components{.surface-field-canvas,.surface-field-surface-lift{position:absolute;inset:0}.surface-field-surface-lift{border-radius:inherit;pointer-events:none}.surface-field-surface-title:not(.inline-edit){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}}.surface-field-canvas{--accent:var(--color-blue-400);--color:var(--color-text-500);--still:0}@media (prefers-reduced-motion:reduce){.surface-field-canvas{--still:1}}.surface-field-surface{--border-radius:var(--border-radius-700);--cursor:grab;--padding-horizontal:var(--size-500);--padding-vertical:var(--size-500);--scale:1;--transition-duration:.2s;--transition-timing-function:ease}@media (prefers-reduced-motion:reduce){.surface-field-surface{--transition-duration:0s}}.surface-field-surface--selected .surface-field-surface-frame{--display:block}.surface-field-surface-body{--color:var(--color-text-300);--font-size:var(--font-size-300);--line-height:1.5}.surface-field-surface-content{--gap-horizontal:0px;--gap-vertical:var(--size-100)}.surface-field-surface-corner,.surface-field-surface-port,.surface-field-surface-rotate{--background:var(--surface-background-default);--border-color:var(--color-primary-300);--border-width:var(--border-width-400)}.surface-field-surface-corner{--border-radius:var(--border-radius-100);--size:var(--size-100)}.surface-field-surface-corner[data-side=ne]{--cursor:nesw-resize;--left:100%;--top:0%}.surface-field-surface-corner[data-side=nw]{--cursor:nwse-resize;--left:0%;--top:0%}.surface-field-surface-corner[data-side=se]{--cursor:nwse-resize;--left:100%;--top:100%}.surface-field-surface-corner[data-side=sw]{--cursor:nesw-resize;--left:0%;--top:100%}.surface-field-surface-edge{--corner:var(--size-100);--hit:var(--size-100)}.surface-field-surface-edge[data-side=e]{--cursor:ew-resize;--height:auto;--inset:var(--corner) calc(var(--hit) / -2) var(--corner) auto;--width:var(--hit)}.surface-field-surface-edge[data-side=n]{--cursor:ns-resize;--height:var(--hit);--inset:calc(var(--hit) / -2) var(--corner) auto;--width:auto}.surface-field-surface-edge[data-side=s]{--cursor:ns-resize;--height:var(--hit);--inset:auto var(--corner) calc(var(--hit) / -2);--width:auto}.surface-field-surface-edge[data-side=w]{--cursor:ew-resize;--height:auto;--inset:var(--corner) auto var(--corner) calc(var(--hit) / -2);--width:var(--hit)}.surface-field-surface-frame{--border-color:var(--color-primary-300);--border-radius:calc(var(--border-radius-700) + var(--offset));--border-width:var(--border-width-400);--display:none;--offset:calc(var(--size-100) / 2)}.surface-field-surface-lift{--box-shadow:var(--surface-shadow-active);--opacity:0}.surface-field-surface-port{--border-radius:50%;--cursor:default;--size:var(--size-200);--z-index:1}.surface-field-surface-port--in{--left:0%}.surface-field-surface-port--out{--cursor:crosshair;--left:100%}.surface-field-surface-rotate{--border-radius:50%;--cursor:grab;--size:var(--size-200);--stem:var(--size-400)}.surface-field-surface-title{--color:var(--color-text-500)}.surface-field-surface.card{--border-radius:var(--border-radius-700);--width:var(--geometry-width)}.surface-field-surface.--active{--cursor:grabbing;--scale:1.01}@media (prefers-reduced-motion:reduce){.surface-field-surface.--active{--scale:1}}.surface-field-surface.--active .surface-field-surface-lift{--opacity:1}@property --still{syntax:"<number>";inherits:true;initial-value:0}.surface-field{isolation:isolate;position:relative}.surface-field-canvas{accent-color:var(--accent);color:var(--color);pointer-events:none;z-index:0;width:100%;height:100%;transition:--still 1ms}.surface-field-content{z-index:1;height:100%;position:relative}.surface-field-surface{cursor:var(--cursor);height:var(--geometry-height);rotate:var(--geometry-rotate);scale:var(--scale);touch-action:none;translate:var(--geometry-x) var(--geometry-y);z-index:var(--geometry-z-index);inset:0 auto auto 0}.surface-field-surface-body{color:var(--color);font-size:var(--font-size);line-height:var(--line-height);overflow-wrap:break-word;margin-block:0}.surface-field-surface-content{gap:var(--gap-vertical) var(--gap-horizontal);flex-direction:column;height:100%;display:flex;overflow:hidden}.surface-field-surface-corner,.surface-field-surface-edge,.surface-field-surface-rotate{cursor:var(--cursor);pointer-events:auto}.surface-field-surface-corner,.surface-field-surface-port,.surface-field-surface-rotate{background:var(--background);border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);position:absolute}.surface-field-surface-corner{height:var(--size);left:var(--left);top:var(--top);width:var(--size);translate:-50% -50%}.surface-field-surface-edge{height:var(--height);inset:var(--inset);width:var(--width);position:absolute}.surface-field-surface-frame{border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius);display:var(--display);inset:calc(var(--offset) * -1);pointer-events:none;position:absolute}.surface-field-surface-lift{box-shadow:var(--box-shadow);opacity:var(--opacity);transition:opacity var(--transition-duration) var(--transition-timing-function)}.surface-field-surface-port{cursor:var(--cursor);height:var(--size);left:var(--left);width:var(--size);z-index:var(--z-index);top:50%;translate:-50% -50%}.surface-field-surface-rotate{height:var(--size);left:50%;top:calc((var(--size) + var(--stem)) * -1);width:var(--size);translate:-50%}.surface-field-surface-rotate:before{background:var(--border-color);content:"";height:var(--stem);width:var(--border-width);position:absolute;top:100%;left:50%;translate:-50%}.surface-field-surface-title{color:var(--color);font-weight:var(--font-weight-600)}.surface-field-surface.card{transition:scale var(--transition-duration) var(--transition-timing-function);position:absolute}.surface-field-surface:focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import * as template_u1 from '@esportsplus/template';
|
|
2
2
|
import { type Attributes } from '@esportsplus/template';
|
|
3
|
+
import '../card/scss/index.scss';
|
|
3
4
|
type Geometry = {
|
|
4
5
|
height: number;
|
|
6
|
+
rotation: number;
|
|
5
7
|
width: number;
|
|
6
8
|
x: number;
|
|
7
9
|
y: number;
|
|
8
10
|
};
|
|
9
|
-
type
|
|
11
|
+
type Point = {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
type State = Omit<Geometry, 'rotation'> & {
|
|
10
16
|
body?: string;
|
|
17
|
+
rotation?: number;
|
|
11
18
|
title?: string;
|
|
12
19
|
};
|
|
13
20
|
type Surface = Attributes & {
|
|
@@ -19,7 +26,12 @@ type Surface = Attributes & {
|
|
|
19
26
|
minHeight?: number;
|
|
20
27
|
minWidth?: number;
|
|
21
28
|
name?: string;
|
|
29
|
+
onlink?: (to: string) => void;
|
|
30
|
+
onlinking?: (point: Point | null) => void;
|
|
22
31
|
onsave?: (key: 'body' | 'title', value: string) => void;
|
|
32
|
+
ports?: boolean;
|
|
33
|
+
rich?: boolean;
|
|
34
|
+
rotation?: number;
|
|
23
35
|
state?: State;
|
|
24
36
|
title?: string;
|
|
25
37
|
width?: number;
|
|
@@ -3,18 +3,30 @@ import * as template_u1 from '@esportsplus/template';
|
|
|
3
3
|
import { component } from '@esportsplus/template';
|
|
4
4
|
import { clamp } from '../../shared/clamp.js';
|
|
5
5
|
import inlineEdit from '../inline-edit/index.js';
|
|
6
|
-
|
|
6
|
+
import '../card/scss/index.scss';
|
|
7
|
+
const template_14xxaca1 = template_u1.template(`<div aria-keyshortcuts='ArrowUp ArrowDown ArrowLeft ArrowRight Alt+ArrowUp Alt+ArrowDown Alt+ArrowLeft Alt+ArrowRight [ ] Escape' aria-roledescription='surface' data-grip='move' role='group' tabindex='0'><span aria-hidden='true' class='surface-field-surface-lift'></span><div class='surface-field-surface-content'><!--$--><!--$--></div><!--$--><div aria-hidden='true' class='surface-field-surface-frame'><!--$--><!--$--><span class='surface-field-surface-rotate' data-grip='rotate'>`, true);
|
|
7
8
|
const template_14xxaca9 = template_u1.template(`<span class='surface-field-surface-title'>`, true);
|
|
8
9
|
const template_14xxacab = template_u1.template(`<p class='surface-field-surface-body'>`, true);
|
|
10
|
+
const template_14xxacac = template_u1.template(`<span aria-hidden='true' class='surface-field-surface-port surface-field-surface-port--in'></span><span aria-hidden='true' class='surface-field-surface-port surface-field-surface-port--out' data-grip='link'>`);
|
|
11
|
+
const template_14xxacae = template_u1.template(`<span class='surface-field-surface-edge' data-grip='resize'>`, true);
|
|
12
|
+
const template_14xxacag = template_u1.template(`<span class='surface-field-surface-corner' data-grip='resize'>`, true);
|
|
13
|
+
const CORNERS = [['ne', 1, -1], ['nw', -1, -1], ['se', 1, 1], ['sw', -1, 1]];
|
|
14
|
+
const DRAG_SLOP = 3;
|
|
15
|
+
const EDGES = [['e', 1, 0], ['n', 0, -1], ['s', 0, 1], ['w', -1, 0]];
|
|
9
16
|
let z = 1;
|
|
10
|
-
|
|
11
|
-
let
|
|
17
|
+
function wrap(degrees) {
|
|
18
|
+
let d = ((degrees % 360) + 360) % 360;
|
|
19
|
+
return d > 180 ? d - 360 : d;
|
|
20
|
+
}
|
|
21
|
+
export default component(function ({ body, bounded = true, editable = false, height = 160, label, minHeight = 72, minWidth = 120, name, onlink, onlinking, onsave, ports = false, rich = false, rotation = 0, state, title, width = 240, x = 0, y = 0, ...attributes }, content) {
|
|
22
|
+
let element, start = null, view = reactivity_u0.reactive({ active: false, height, rotation, selected: false, width, x, y, z: 0 });
|
|
12
23
|
if (state) {
|
|
13
24
|
({ height, width, x, y } = state);
|
|
14
25
|
body = state.body ?? body;
|
|
26
|
+
rotation = state.rotation ?? rotation;
|
|
15
27
|
title = state.title ?? title;
|
|
16
28
|
}
|
|
17
|
-
let called = label ?? title
|
|
29
|
+
let called = label ?? title ?? 'Surface';
|
|
18
30
|
function apply() {
|
|
19
31
|
if (!element) {
|
|
20
32
|
return;
|
|
@@ -30,60 +42,75 @@ export default component(function ({ body, bounded = true, editable = false, hei
|
|
|
30
42
|
y = clamp(y, 0, Math.max(0, ph - height));
|
|
31
43
|
}
|
|
32
44
|
view.height = height;
|
|
45
|
+
view.rotation = rotation;
|
|
33
46
|
view.width = width;
|
|
34
47
|
view.x = x;
|
|
35
48
|
view.y = y;
|
|
36
|
-
if (state && (state.height !== height || state.width !== width || state.x !== x || state.y !== y)) {
|
|
49
|
+
if (state && (state.height !== height || state.rotation !== rotation || state.width !== width || state.x !== x || state.y !== y)) {
|
|
37
50
|
state.height = height;
|
|
51
|
+
state.rotation = rotation;
|
|
38
52
|
state.width = width;
|
|
39
53
|
state.x = x;
|
|
40
54
|
state.y = y;
|
|
41
55
|
}
|
|
42
56
|
}
|
|
43
|
-
function begin(event
|
|
44
|
-
if (event.button !== 0 || !element) {
|
|
57
|
+
function begin(event) {
|
|
58
|
+
if (event.button !== 0 || !element || start) {
|
|
45
59
|
return;
|
|
46
60
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
view.selected = true;
|
|
62
|
+
let target = event.target, held = target.closest('[data-grip]');
|
|
63
|
+
if (!held || (held === element && target.closest('.inline-edit'))) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
let { grip: kind, sx, sy } = held.dataset, bounds = element.getBoundingClientRect(), turn = rotation * Math.PI / 180, scale = bounds.width / (width * Math.abs(Math.cos(turn)) + height * Math.abs(Math.sin(turn))) || 1;
|
|
67
|
+
element.setPointerCapture(event.pointerId);
|
|
68
|
+
event.preventDefault();
|
|
50
69
|
start = {
|
|
51
|
-
|
|
52
|
-
|
|
70
|
+
cx: bounds.left + bounds.width / 2,
|
|
71
|
+
cy: bounds.top + bounds.height / 2,
|
|
72
|
+
grip: { kind: kind, sx: Number(sx ?? 0), sy: Number(sy ?? 0) },
|
|
73
|
+
height,
|
|
74
|
+
moved: kind !== 'move' && kind !== 'link',
|
|
53
75
|
pointerX: event.clientX,
|
|
54
76
|
pointerY: event.clientY,
|
|
55
|
-
|
|
56
|
-
|
|
77
|
+
rotation,
|
|
78
|
+
scale,
|
|
79
|
+
width,
|
|
57
80
|
x,
|
|
58
81
|
y
|
|
59
82
|
};
|
|
83
|
+
view.active = kind !== 'link';
|
|
84
|
+
view.z = ++z;
|
|
60
85
|
}
|
|
61
86
|
function end() {
|
|
87
|
+
if (start?.grip.kind === 'link') {
|
|
88
|
+
onlinking?.(null);
|
|
89
|
+
}
|
|
62
90
|
start = null;
|
|
63
91
|
view.active = false;
|
|
64
92
|
}
|
|
65
|
-
function
|
|
66
|
-
if (
|
|
93
|
+
function keydown(event) {
|
|
94
|
+
if (event.target !== event.currentTarget) {
|
|
67
95
|
return;
|
|
68
96
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
97
|
+
if (event.key === 'Escape') {
|
|
98
|
+
view.selected = false;
|
|
99
|
+
element?.blur();
|
|
100
|
+
return;
|
|
73
101
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
102
|
+
if (event.key === '[' || event.key === ']') {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
rotation = wrap(rotation + (event.key === ']' ? 1 : -1) * (event.shiftKey ? 1 : 15));
|
|
105
|
+
apply();
|
|
106
|
+
return;
|
|
77
107
|
}
|
|
78
|
-
apply();
|
|
79
|
-
}
|
|
80
|
-
function nudge(event, resize) {
|
|
81
108
|
let step = event.shiftKey ? 32 : 8, dx = event.key === 'ArrowLeft' ? -step : event.key === 'ArrowRight' ? step : 0, dy = event.key === 'ArrowUp' ? -step : event.key === 'ArrowDown' ? step : 0;
|
|
82
109
|
if (!dx && !dy) {
|
|
83
110
|
return;
|
|
84
111
|
}
|
|
85
112
|
event.preventDefault();
|
|
86
|
-
if (
|
|
113
|
+
if (event.altKey) {
|
|
87
114
|
width += dx;
|
|
88
115
|
height += dy;
|
|
89
116
|
}
|
|
@@ -93,6 +120,58 @@ export default component(function ({ body, bounded = true, editable = false, hei
|
|
|
93
120
|
}
|
|
94
121
|
apply();
|
|
95
122
|
}
|
|
123
|
+
function move(event) {
|
|
124
|
+
if (!start) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
let dx = event.clientX - start.pointerX, dy = event.clientY - start.pointerY;
|
|
128
|
+
if (!start.moved) {
|
|
129
|
+
if (Math.hypot(dx, dy) < DRAG_SLOP) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
start.moved = true;
|
|
133
|
+
}
|
|
134
|
+
let grip = start.grip, turn = start.rotation * Math.PI / 180, cos = Math.cos(turn), sin = Math.sin(turn);
|
|
135
|
+
dx /= start.scale;
|
|
136
|
+
dy /= start.scale;
|
|
137
|
+
if (grip.kind === 'link') {
|
|
138
|
+
onlinking?.(port(start, dx, dy));
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (grip.kind === 'move') {
|
|
142
|
+
x = start.x + dx;
|
|
143
|
+
y = start.y + dy;
|
|
144
|
+
}
|
|
145
|
+
else if (grip.kind === 'rotate') {
|
|
146
|
+
let swept = Math.atan2(event.clientY - start.cy, event.clientX - start.cx)
|
|
147
|
+
- Math.atan2(start.pointerY - start.cy, start.pointerX - start.cx), degrees = start.rotation + swept * 180 / Math.PI;
|
|
148
|
+
rotation = wrap(event.shiftKey ? Math.round(degrees / 15) * 15 : degrees);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
let du = cos * dx + sin * dy, dv = cos * dy - sin * dx, w = grip.sx ? Math.max(minWidth, start.width + grip.sx * du) : start.width, h = grip.sy ? Math.max(minHeight, start.height + grip.sy * dv) : start.height, lx = grip.sx * (w - start.width) / 2, ly = grip.sy * (h - start.height) / 2;
|
|
152
|
+
width = w;
|
|
153
|
+
height = h;
|
|
154
|
+
x = start.x + start.width / 2 + cos * lx - sin * ly - w / 2;
|
|
155
|
+
y = start.y + start.height / 2 + sin * lx + cos * ly - h / 2;
|
|
156
|
+
}
|
|
157
|
+
apply();
|
|
158
|
+
}
|
|
159
|
+
function port(from, dx, dy) {
|
|
160
|
+
let turn = from.rotation * Math.PI / 180;
|
|
161
|
+
return {
|
|
162
|
+
x: from.x + from.width / 2 + Math.cos(turn) * from.width / 2 + dx,
|
|
163
|
+
y: from.y + from.height / 2 + Math.sin(turn) * from.width / 2 + dy
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function release(event) {
|
|
167
|
+
if (start?.grip.kind !== 'link' || !start.moved) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
let to = document.elementFromPoint(event.clientX, event.clientY)?.closest('[data-surface-field]')?.getAttribute('data-surface-field');
|
|
171
|
+
if (to && to !== name) {
|
|
172
|
+
onlink?.(to);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
96
175
|
function save(key, value) {
|
|
97
176
|
if (state) {
|
|
98
177
|
state[key] = value;
|
|
@@ -100,10 +179,10 @@ export default component(function ({ body, bounded = true, editable = false, hei
|
|
|
100
179
|
onsave?.(key, value);
|
|
101
180
|
}
|
|
102
181
|
{
|
|
103
|
-
let root_14xxaca0 = template_14xxaca1(), element_14xxaca2 = root_14xxaca0.firstElementChild.nextElementSibling, element_14xxaca3 = element_14xxaca2.firstChild, element_14xxaca4 =
|
|
182
|
+
let root_14xxaca0 = template_14xxaca1(), element_14xxaca2 = root_14xxaca0.firstElementChild.nextElementSibling, element_14xxaca3 = element_14xxaca2.firstChild, element_14xxaca4 = element_14xxaca3.nextSibling, element_14xxaca5 = root_14xxaca0.firstChild.nextSibling.nextSibling, element_14xxaca6 = element_14xxaca2.nextElementSibling.firstChild, element_14xxaca7 = element_14xxaca6.nextSibling;
|
|
104
183
|
template_u1.slot(element_14xxaca3, title !== undefined && (editable
|
|
105
184
|
? inlineEdit({
|
|
106
|
-
class: 'surface-field-surface-title',
|
|
185
|
+
class: 'inline-edit--seamless surface-field-surface-title',
|
|
107
186
|
label: `${called} title`,
|
|
108
187
|
onsave: (value) => save('title', value),
|
|
109
188
|
placeholder: 'Untitled',
|
|
@@ -114,9 +193,9 @@ export default component(function ({ body, bounded = true, editable = false, hei
|
|
|
114
193
|
template_u1.slot(root_14xxaca8, title, 1);
|
|
115
194
|
return root_14xxaca8;
|
|
116
195
|
})()));
|
|
117
|
-
template_u1.slot(
|
|
118
|
-
? inlineEdit({
|
|
119
|
-
class: 'surface-field-surface-body',
|
|
196
|
+
template_u1.slot(element_14xxaca4, body !== undefined && (editable
|
|
197
|
+
? (rich ? inlineEdit.rich : inlineEdit)({
|
|
198
|
+
class: 'inline-edit--seamless surface-field-surface-body',
|
|
120
199
|
label: `${called} note`,
|
|
121
200
|
multiline: true,
|
|
122
201
|
onsave: (value) => save('body', value),
|
|
@@ -128,37 +207,49 @@ export default component(function ({ body, bounded = true, editable = false, hei
|
|
|
128
207
|
template_u1.slot(root_14xxacaa, body, 1);
|
|
129
208
|
return root_14xxacaa;
|
|
130
209
|
})()));
|
|
131
|
-
template_u1.slot(
|
|
132
|
-
template_u1.
|
|
133
|
-
template_u1.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
template_u1.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
template_u1.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
template_u1.setProperties(root_14xxaca0, attributes_14xxacad, true);
|
|
210
|
+
template_u1.slot(element_14xxaca2, content, 1);
|
|
211
|
+
template_u1.slot(element_14xxaca5, ports && template_14xxacac());
|
|
212
|
+
template_u1.slot(element_14xxaca6, EDGES.map(([side, sx, sy]) => {
|
|
213
|
+
let root_14xxacad = template_14xxacae();
|
|
214
|
+
template_u1.setProperty(root_14xxacad, 'data-side', side);
|
|
215
|
+
template_u1.setProperty(root_14xxacad, 'data-sx', sx);
|
|
216
|
+
template_u1.setProperty(root_14xxacad, 'data-sy', sy);
|
|
217
|
+
return root_14xxacad;
|
|
218
|
+
}));
|
|
219
|
+
template_u1.slot(element_14xxaca7, CORNERS.map(([side, sx, sy]) => {
|
|
220
|
+
let root_14xxacaf = template_14xxacag();
|
|
221
|
+
template_u1.setProperty(root_14xxacaf, 'data-side', side);
|
|
222
|
+
template_u1.setProperty(root_14xxacaf, 'data-sx', sx);
|
|
223
|
+
template_u1.setProperty(root_14xxacaf, 'data-sy', sy);
|
|
224
|
+
return root_14xxacaf;
|
|
225
|
+
}));
|
|
226
|
+
template_u1.setProperty(root_14xxaca0, 'aria-label', `${called}: arrow keys move it, Alt and the arrow keys resize it, [ and ] turn it`);
|
|
227
|
+
let attributes_14xxacah = this?.attributes;
|
|
228
|
+
template_u1.setProperties(root_14xxaca0, attributes_14xxacah, true);
|
|
229
|
+
let attributes_14xxacai = attributes;
|
|
230
|
+
template_u1.setProperties(root_14xxaca0, attributes_14xxacai, true);
|
|
153
231
|
template_u1.setProperty(root_14xxaca0, 'data-surface-field', name);
|
|
154
232
|
template_u1.onconnect(root_14xxaca0, (el) => {
|
|
155
233
|
element = el;
|
|
156
234
|
apply();
|
|
157
235
|
});
|
|
158
|
-
template_u1.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
236
|
+
template_u1.direct(root_14xxaca0, 'focus', () => {
|
|
237
|
+
view.selected = true;
|
|
238
|
+
});
|
|
239
|
+
template_u1.delegate(root_14xxaca0, 'keydown', keydown);
|
|
240
|
+
template_u1.delegate(root_14xxaca0, 'lostpointercapture', end);
|
|
241
|
+
template_u1.delegate(root_14xxaca0, 'pointerdown', begin);
|
|
242
|
+
template_u1.delegate(root_14xxaca0, 'pointermove', move);
|
|
243
|
+
template_u1.delegate(root_14xxaca0, 'pointerup', release);
|
|
244
|
+
template_u1.onwindow(root_14xxaca0, 'pointerdown', (event) => {
|
|
245
|
+
if (!element?.contains(event.target)) {
|
|
246
|
+
view.selected = false;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
template_u1.setClass(root_14xxaca0, ["card card--ring surface-field-surface", attributes_14xxacah?.class, attributes_14xxacai?.class, () => [view.active && '--active', view.selected && 'surface-field-surface--selected']]);
|
|
250
|
+
template_u1.setStyle(root_14xxaca0, ["", attributes_14xxacah?.style, attributes_14xxacai?.style, [
|
|
251
|
+
() => `--geometry-height: ${view.height}px; --geometry-rotate: ${view.rotation}deg; --geometry-width: ${view.width}px; --geometry-x: ${view.x}px; --geometry-y: ${view.y}px;`,
|
|
252
|
+
() => `--geometry-z-index: ${view.z || 'auto'};`
|
|
162
253
|
]]);
|
|
163
254
|
return root_14xxaca0;
|
|
164
255
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as template_u1 from '@esportsplus/template';
|
|
2
2
|
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
3
3
|
import checkbox from '../checkbox/index.js';
|
|
4
|
+
import '../group/scss/index.scss';
|
|
4
5
|
import './scss/index.scss';
|
|
5
6
|
type A = Attributes & {
|
|
6
7
|
[TASKLIST_CHECKBOX]?: CheckboxAttributes;
|
|
7
|
-
[TASKLIST_CONTENT]?: Attributes;
|
|
8
8
|
[TASKLIST_DESCRIPTION]?: Attributes;
|
|
9
9
|
[TASKLIST_ITEM]?: Attributes;
|
|
10
10
|
[TASKLIST_LABEL]?: Attributes;
|
|
@@ -21,21 +21,18 @@ type Task = {
|
|
|
21
21
|
label: Renderable<unknown>;
|
|
22
22
|
};
|
|
23
23
|
declare const TASKLIST_CHECKBOX: unique symbol;
|
|
24
|
-
declare const TASKLIST_CONTENT: unique symbol;
|
|
25
24
|
declare const TASKLIST_DESCRIPTION: unique symbol;
|
|
26
25
|
declare const TASKLIST_ITEM: unique symbol;
|
|
27
26
|
declare const TASKLIST_LABEL: unique symbol;
|
|
28
27
|
declare const TASKLIST_ROW: unique symbol;
|
|
29
28
|
declare const _default: template_u1.Factory<A, Renderable<any>, Renderable<any>, {
|
|
30
29
|
readonly checkbox: typeof TASKLIST_CHECKBOX;
|
|
31
|
-
readonly content: typeof TASKLIST_CONTENT;
|
|
32
30
|
readonly description: typeof TASKLIST_DESCRIPTION;
|
|
33
31
|
readonly item: typeof TASKLIST_ITEM;
|
|
34
32
|
readonly label: typeof TASKLIST_LABEL;
|
|
35
33
|
readonly row: typeof TASKLIST_ROW;
|
|
36
34
|
}> & {
|
|
37
35
|
readonly checkbox: typeof TASKLIST_CHECKBOX;
|
|
38
|
-
readonly content: typeof TASKLIST_CONTENT;
|
|
39
36
|
readonly description: typeof TASKLIST_DESCRIPTION;
|
|
40
37
|
readonly item: typeof TASKLIST_ITEM;
|
|
41
38
|
readonly label: typeof TASKLIST_LABEL;
|