@netless/fastboard-react 0.1.0 → 0.2.2
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/dist/index.js +426 -487
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +368 -425
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -13
- package/src/components/Fastboard.tsx +27 -17
- package/src/components/PageControl/PageControl.tsx +2 -4
- package/src/components/PageControl/hooks.ts +18 -61
- package/src/components/Toolbar/Content.tsx +19 -4
- package/src/components/Toolbar/Toolbar.scss +13 -3
- package/src/components/Toolbar/Toolbar.tsx +15 -47
- package/src/components/hooks.ts +1 -1
- package/src/index.ts +1 -0
- package/src/vanilla/index.tsx +18 -0
- package/dist/behaviors/style.d.ts +0 -1
- package/dist/components/Fastboard.d.ts +0 -15
- package/dist/components/PageControl/PageControl.d.ts +0 -5
- package/dist/components/PageControl/hooks.d.ts +0 -9
- package/dist/components/PageControl/index.d.ts +0 -2
- package/dist/components/PlayerControl/PlayerControl.d.ts +0 -9
- package/dist/components/PlayerControl/hooks.d.ts +0 -11
- package/dist/components/PlayerControl/icons/Loading.d.ts +0 -3
- package/dist/components/PlayerControl/icons/Pause.d.ts +0 -3
- package/dist/components/PlayerControl/icons/Play.d.ts +0 -3
- package/dist/components/PlayerControl/icons/index.d.ts +0 -6
- package/dist/components/PlayerControl/index.d.ts +0 -2
- package/dist/components/RedoUndo/RedoUndo.d.ts +0 -5
- package/dist/components/RedoUndo/hooks.d.ts +0 -6
- package/dist/components/RedoUndo/index.d.ts +0 -2
- package/dist/components/Toolbar/Content.d.ts +0 -2
- package/dist/components/Toolbar/Toolbar.d.ts +0 -14
- package/dist/components/Toolbar/components/ApplianceButtons.d.ts +0 -7
- package/dist/components/Toolbar/components/AppsButton.d.ts +0 -6
- package/dist/components/Toolbar/components/ColorBox.d.ts +0 -2
- package/dist/components/Toolbar/components/CutLine.d.ts +0 -2
- package/dist/components/Toolbar/components/Mask.d.ts +0 -7
- package/dist/components/Toolbar/components/PencilButton.d.ts +0 -2
- package/dist/components/Toolbar/components/ShapesButton.d.ts +0 -3
- package/dist/components/Toolbar/components/Slider.d.ts +0 -2
- package/dist/components/Toolbar/components/TextButton.d.ts +0 -2
- package/dist/components/Toolbar/components/UpDownButtons.d.ts +0 -7
- package/dist/components/Toolbar/const.d.ts +0 -18
- package/dist/components/Toolbar/hooks.d.ts +0 -12
- package/dist/components/Toolbar/icons/Apps.d.ts +0 -3
- package/dist/components/Toolbar/icons/Arrow.d.ts +0 -3
- package/dist/components/Toolbar/icons/Circle.d.ts +0 -3
- package/dist/components/Toolbar/icons/Clean.d.ts +0 -3
- package/dist/components/Toolbar/icons/Clicker.d.ts +0 -3
- package/dist/components/Toolbar/icons/Collapse.d.ts +0 -3
- package/dist/components/Toolbar/icons/Diamond.d.ts +0 -3
- package/dist/components/Toolbar/icons/Down.d.ts +0 -3
- package/dist/components/Toolbar/icons/Eraser.d.ts +0 -3
- package/dist/components/Toolbar/icons/Expand.d.ts +0 -3
- package/dist/components/Toolbar/icons/Line.d.ts +0 -3
- package/dist/components/Toolbar/icons/Pencil.d.ts +0 -3
- package/dist/components/Toolbar/icons/Rectangle.d.ts +0 -3
- package/dist/components/Toolbar/icons/Selector.d.ts +0 -3
- package/dist/components/Toolbar/icons/SpeechBalloon.d.ts +0 -3
- package/dist/components/Toolbar/icons/Star.d.ts +0 -3
- package/dist/components/Toolbar/icons/Text.d.ts +0 -3
- package/dist/components/Toolbar/icons/Triangle.d.ts +0 -3
- package/dist/components/Toolbar/icons/Up.d.ts +0 -3
- package/dist/components/Toolbar/icons/index.d.ts +0 -22
- package/dist/components/Toolbar/index.d.ts +0 -2
- package/dist/components/ZoomControl/ZoomControl.d.ts +0 -5
- package/dist/components/ZoomControl/hooks.d.ts +0 -7
- package/dist/components/ZoomControl/index.d.ts +0 -2
- package/dist/components/hooks.d.ts +0 -13
- package/dist/i18n/index.d.ts +0 -12
- package/dist/icons/ChevronLeft.d.ts +0 -3
- package/dist/icons/ChevronRight.d.ts +0 -3
- package/dist/icons/FilePlus.d.ts +0 -3
- package/dist/icons/Minus.d.ts +0 -3
- package/dist/icons/Plus.d.ts +0 -3
- package/dist/icons/Redo.d.ts +0 -3
- package/dist/icons/Reset.d.ts +0 -3
- package/dist/icons/Undo.d.ts +0 -3
- package/dist/icons/index.d.ts +0 -7
- package/dist/index.d.ts +0 -9
- package/dist/internal/helpers.d.ts +0 -16
- package/dist/internal/hooks.d.ts +0 -3
- package/dist/internal/index.d.ts +0 -2
- package/dist/theme.d.ts +0 -16
- package/dist/typings.d.ts +0 -10
- package/src/components/Toolbar/components/Mask.tsx +0 -44
package/dist/index.mjs
CHANGED
|
@@ -81,7 +81,7 @@ function useForceUpdate() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// src/style.scss?inline
|
|
84
|
-
var style_default = '.page-renderer-pages-container{position:relative;overflow:hidden}.page-renderer-page{position:absolute;top:0;left:0;will-change:transform;background-position:center;background-size:cover;background-repeat:no-repeat}.page-renderer-page-img{display:block;width:100%;height:auto;user-select:none}.netless-app-docs-viewer-static-scrollbar{position:absolute;top:0;right:0;z-index:2147483647;width:8px;min-height:30px;margin:0;padding:0;border:none;outline:none;border-radius:4px;background:rgba(68,78,96,.4);box-shadow:1px 1px 8px #ffffffb3;opacity:0;transition:background .4s,opacity .4s 3s,transform .2s;will-change:transform,height;user-select:none}.netless-app-docs-viewer-static-scrollbar.netless-app-docs-viewer-static-scrollbar-dragging{background:rgba(68,78,96,.6);opacity:1;transition:background .4s,opacity .4s 3s!important}.netless-app-docs-viewer-static-scrollbar:hover,.netless-app-docs-viewer-static-scrollbar:focus{background:rgba(68,78,96,.5)}.netless-app-docs-viewer-static-scrollbar:active{background:rgba(68,78,96,.6)}.netless-app-docs-viewer-content:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-static-scrollbar{display:none}.netless-app-docs-viewer-static-pages:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-sizer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden;display:flex}.netless-window-manager-sizer-horizontal{flex-direction:column}.netless-window-manager-sizer:before,.netless-window-manager-sizer:after{flex:1;content:"";display:block}.netless-window-manager-chess-sizer:before,.netless-window-manager-chess-sizer:after{background-image:linear-gradient(45deg,#b0b0b0 25%,transparent 25%),linear-gradient(-45deg,#b0b0b0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#b0b0b0 75%),linear-gradient(-45deg,transparent 75%,#b0b0b0 75%);background-color:#fff;background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px}.netless-window-manager-wrapper{position:relative;z-index:1;width:100%;height:100%;overflow:hidden}.netless-window-manager-main-view{width:100%;height:100%}.netless-window-manager-cursor-pencil-image,.netless-window-manager-cursor-eraser-image{width:26px;height:26px}.netless-window-manager-cursor-selector-image{width:24px;height:24px}.netless-window-manager-cursor-selector-avatar{border-radius:50%;border-style:solid;border-width:2px;border-color:#fff;margin-bottom:2px}.netless-window-manager-cursor-selector-avatar img{width:12px}.netless-window-manager-cursor-inner{border-radius:4px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:4px;padding-right:4px;font-size:12px}.netless-window-manager-cursor-inner-mellow{height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:16px;padding-right:16px}.netless-window-manager-cursor-tag-name{font-size:12px;margin-left:4px;padding:2px 8px;border-radius:4px}.netless-window-manager-cursor-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:26px;height:26px;z-index:2147483647;left:0;top:0;will-change:transform;transition:transform .05s;transform-origin:0 0;user-select:none}.netless-window-manager-cursor-pencil-offset{margin-left:-20px}.netless-window-manager-cursor-selector-offset{margin-left:-22px;margin-top:56px}.netless-window-manager-cursor-text-offset{margin-left:-30px;margin-top:18px}.netless-window-manager-cursor-shape-offset{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px;margin-left:-30px;margin-top:12px}.netless-window-manager-cursor-name{width:100%;height:48px;display:flex;align-items:center;justify-content:center;position:absolute;top:-40px}.cursor-image-wrapper{display:flex;justify-content:center}.telebox-collector{position:absolute;right:10px;bottom:15px}.tele-fancy-scrollbar{overscroll-behavior:contain;overflow:auto;overflow-y:scroll;overflow-y:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.tele-fancy-scrollbar::-webkit-scrollbar{height:8px;width:8px}.tele-fancy-scrollbar::-webkit-scrollbar-track{background-color:transparent}.tele-fancy-scrollbar::-webkit-scrollbar-thumb{background-color:#444e601a;background-color:transparent;border-radius:4px;transition:background-color .4s}.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb{background-color:#444e601a}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical{min-height:50px}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-box{position:absolute;top:0;left:0;z-index:100;will-change:transform;transition:width .4s cubic-bezier(.4,.9,.71,1.02),height .4s cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .4s ease}.telebox-box-main{position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#f9f9fc;box-shadow:0 4px 10px #2f419226;border-radius:6px;border:1px solid #e3e3ec}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-content-wrap{flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.telebox-content{width:100%;height:100%;position:relative}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-resize-handle{position:absolute;z-index:2147483647}.telebox-n{width:100%;height:5px;left:0;top:-5px;cursor:n-resize}.telebox-s{width:100%;height:5px;left:0;bottom:-5px;cursor:s-resize}.telebox-w{width:5px;height:100%;left:-5px;top:0;cursor:w-resize}.telebox-e{width:5px;height:100%;right:-5px;top:0;cursor:e-resize}.telebox-nw{width:15px;height:15px;top:-5px;left:-5px;cursor:nw-resize}.telebox-ne{width:15px;height:15px;top:-5px;right:-5px;cursor:ne-resize}.telebox-se{width:15px;height:15px;bottom:-5px;right:-5px;cursor:se-resize}.telebox-sw{width:15px;height:15px;bottom:-5px;left:-5px;cursor:sw-resize}.telebox-track-mask{position:fixed;top:0;left:0;z-index:2147483647;width:100%;height:100%;background:rgba(0,0,0,.0001);cursor:move}.telebox-cursor-n{cursor:n-resize}.telebox-cursor-s{cursor:s-resize}.telebox-cursor-w{cursor:w-resize}.telebox-cursor-e{cursor:e-resize}.telebox-cursor-nw{cursor:nw-resize}.telebox-cursor-ne{cursor:ne-resize}.telebox-cursor-se{cursor:se-resize}.telebox-cursor-sw{cursor:sw-resize}.telebox-maximized .telebox-resize-handles,.telebox-no-resize .telebox-resize-handles{display:none}.telebox-maximized{box-shadow:none;transition:none}.telebox-minimized{will-change:transform;transition:width 50ms cubic-bezier(.4,.9,.71,1.02),height 50ms cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .6s ease;opacity:0;pointer-events:none;user-select:none}.telebox-transforming{will-change:transform;transition:opacity .6s cubic-bezier(.7,0,.84,0)}.telebox-readonly .telebox-resize-handle{cursor:initial!important;pointer-events:none!important}.telebox-color-scheme-dark .telebox-box-main{color:#e9e9e9;background:#212126;border-color:#43434d}.telebox-titlebar{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;background:#fff;user-select:none;border-bottom:1px solid #eeeef7;touch-action:manipulation}.telebox-title-area{overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{overflow:hidden;margin:0;padding:0;font-size:14px;font-weight:400;font-family:PingFangSC-Regular,PingFang SC;white-space:nowrap;word-break:keep-all;text-overflow:ellipsis;color:#191919}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10}.telebox-titlebar-btns{white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{width:22px;height:22px;padding:0;outline:0;border:none;background:0 0;cursor:pointer}.telebox-titlebar-btn~.telebox-titlebar-btn{margin-left:10px}.telebox-titlebar-btn-icon{width:22px;height:22px}.telebox-readonly .telebox-titlebar-btn{cursor:not-allowed}.telebox-titlebar-icon-minimize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-titlebar-icon-maximize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==)}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.telebox-titlebar-icon-close{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-collector{visibility:hidden;display:block;position:absolute;z-index:200;width:40px;height:40px;margin:0;padding:0;border:none;outline:0;font-size:0;border-radius:50%;background:#fff;box-shadow:0 2px 6px #2f419226;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#43434d}.telebox-max-titlebar{display:none;position:absolute;top:0;left:0;z-index:50000;user-select:none}.telebox-max-titlebar .telebox-drag-area{height:100%;min-width:16px;position:static;margin:0;flex-grow:1;flex-shrink:0}.telebox-max-titlebar-maximized{display:flex}.telebox-titles{height:100%;margin:0;overflow-y:hidden;overflow-x:scroll;overflow-x:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.telebox-titles::-webkit-scrollbar{height:8px;width:8px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:4px;transition:background-color .4s}.telebox-titles:hover::-webkit-scrollbar-thumb{background-color:#eeeef7cc}.telebox-titles::-webkit-scrollbar-thumb:hover{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:active{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:vertical{min-height:50px}.telebox-titles::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-titles-content{height:100%;display:flex;flex-wrap:nowrap;align-items:center;padding:0}.telebox-titles-tab{height:100%;overflow:hidden;max-width:182px;min-width:50px;padding:0 26px 0 16px;outline:0;font-size:13px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;border:none;border-right:1px solid #e5e5f0;color:#7b88a0;background:0 0;cursor:pointer;user-select:none}.telebox-titles-tab-focus{color:#357bf6}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark.telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-color-scheme-dark .telebox-titles-tab{border-right-color:#7b88a0}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.rc-slider{position:relative;height:14px;padding:5px 0;width:100%;border-radius:6px;touch-action:none;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider-rail{position:absolute;width:100%;background-color:#e9e9e9;height:4px;border-radius:6px}.rc-slider-track{position:absolute;left:0;height:4px;border-radius:6px;background-color:#abe2fb}.rc-slider-handle{position:absolute;width:14px;height:14px;cursor:pointer;cursor:-webkit-grab;margin-top:-5px;cursor:grab;border-radius:50%;border:solid 2px #96dbfa;background-color:#fff;touch-action:pan-x}.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging{border-color:#57c5f7;box-shadow:0 0 0 5px #96dbfa}.rc-slider-handle:focus{outline:none}.rc-slider-handle-click-focused:focus{border-color:#96dbfa;box-shadow:unset}.rc-slider-handle:hover{border-color:#57c5f7}.rc-slider-handle:active{border-color:#57c5f7;box-shadow:0 0 5px #57c5f7;cursor:-webkit-grabbing;cursor:grabbing}.rc-slider-mark{position:absolute;top:18px;left:0;width:100%;font-size:12px}.rc-slider-mark-text{position:absolute;display:inline-block;vertical-align:middle;text-align:center;cursor:pointer;color:#999}.rc-slider-mark-text-active{color:#666}.rc-slider-step{position:absolute;width:100%;height:4px;background:transparent}.rc-slider-dot{position:absolute;bottom:-2px;margin-left:-4px;width:8px;height:8px;border:2px solid #e9e9e9;background-color:#fff;cursor:pointer;border-radius:50%;vertical-align:middle}.rc-slider-dot-active{border-color:#96dbfa}.rc-slider-dot-reverse{margin-right:-4px}.rc-slider-disabled{background-color:#e9e9e9}.rc-slider-disabled .rc-slider-track{background-color:#ccc}.rc-slider-disabled .rc-slider-handle,.rc-slider-disabled .rc-slider-dot{border-color:#ccc;box-shadow:none;background-color:#fff;cursor:not-allowed}.rc-slider-disabled .rc-slider-mark-text,.rc-slider-disabled .rc-slider-dot{cursor:not-allowed!important}.rc-slider-vertical{width:14px;height:100%;padding:0 5px}.rc-slider-vertical .rc-slider-rail{height:100%;width:4px}.rc-slider-vertical .rc-slider-track{left:5px;bottom:0;width:4px}.rc-slider-vertical .rc-slider-handle{margin-left:-5px;touch-action:pan-y}.rc-slider-vertical .rc-slider-mark{top:0;left:18px;height:100%}.rc-slider-vertical .rc-slider-step{height:100%;width:4px}.rc-slider-vertical .rc-slider-dot{left:2px;margin-bottom:-4px}.rc-slider-vertical .rc-slider-dot:first-child{margin-bottom:-4px}.rc-slider-vertical .rc-slider-dot:last-child{margin-bottom:-4px}.rc-slider-tooltip-zoom-down-enter,.rc-slider-tooltip-zoom-down-appear,.rc-slider-tooltip-zoom-down-leave{animation-duration:.3s;animation-fill-mode:both;display:block!important;animation-play-state:paused}.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active{animation-name:rcSliderTooltipZoomDownIn;animation-play-state:running}.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active{animation-name:rcSliderTooltipZoomDownOut;animation-play-state:running}.rc-slider-tooltip-zoom-down-enter,.rc-slider-tooltip-zoom-down-appear{transform:scale(0);animation-timing-function:cubic-bezier(.23,1,.32,1)}.rc-slider-tooltip-zoom-down-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}@keyframes rcSliderTooltipZoomDownIn{0%{opacity:0;transform-origin:50% 100%;transform:scale(0)}to{transform-origin:50% 100%;transform:scale(1)}}@keyframes rcSliderTooltipZoomDownOut{0%{transform-origin:50% 100%;transform:scale(1)}to{opacity:0;transform-origin:50% 100%;transform:scale(0)}}.rc-slider-tooltip{position:absolute;left:-9999px;top:-9999px;visibility:visible;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider-tooltip *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider-tooltip-hidden{display:none}.rc-slider-tooltip-placement-top{padding:4px 0 8px}.rc-slider-tooltip-inner{padding:6px 2px;min-width:24px;height:24px;font-size:12px;line-height:1;color:#fff;text-align:center;text-decoration:none;background-color:#6c6c6c;border-radius:6px;box-shadow:0 0 4px #d9d9d9}.rc-slider-tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow{bottom:4px;left:50%;margin-left:-4px;border-width:4px 4px 0;border-top-color:#6c6c6c}.fastboard-root{position:relative;width:100%;height:100%;overflow:hidden}.fastboard-view{position:absolute;top:0;left:0;width:100%;height:100%}.fastboard-left{position:absolute;top:0;left:0;height:calc(100% - 48px);padding:16px;z-index:201;display:flex;align-items:center}.fastboard-bottom-left,.fastboard-bottom-right{display:flex;gap:10px;position:absolute;bottom:8px;left:8px;padding:8px;z-index:200}.fastboard-bottom-right{left:initial;right:8px}.fastboard-redo-undo{display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-redo-undo.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-redo-undo.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-redo-undo-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1}.fastboard-redo-undo-btn svg,.fastboard-redo-undo-btn img{width:1em;height:1em}.fastboard-redo-undo-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-redo-undo-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-redo-undo-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-page-control{display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-page-control.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-page-control.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-page-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1}.fastboard-page-control-btn svg,.fastboard-page-control-btn img{width:1em;height:1em}.fastboard-page-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-page-control-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-page-control-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-page-control-cut-line{height:24px;width:.5px}.fastboard-page-control-cut-line.light{background-color:#e7e7e7}.fastboard-page-control-cut-line.dark{background-color:#ffffff26}.fastboard-page-control-slash{opacity:.6}.fastboard-page-control-page,.fastboard-page-control-slash,.fastboard-page-control-page-count{font-size:12px;font-variant-numeric:tabular-nums}.fastboard-zoom-control{position:relative;display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-zoom-control.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-zoom-control.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-zoom-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1}.fastboard-zoom-control-btn svg,.fastboard-zoom-control-btn img{width:1em;height:1em}.fastboard-zoom-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-zoom-control-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-zoom-control-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-zoom-control-cut-line{height:24px;width:.5px}.fastboard-zoom-control-cut-line.light{background-color:#e7e7e7}.fastboard-zoom-control-cut-line.dark{background-color:#ffffff26}.fastboard-zoom-control-percent{opacity:.6}.fastboard-zoom-control-scale,.fastboard-zoom-control-percent{font-size:12px;font-variant-numeric:tabular-nums}.fastboard-toolbar{display:flex;align-items:center;padding:4px;border-radius:4px;flex-direction:column;gap:4px;position:absolute;z-index:100;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-toolbar .rc-slider{padding:6px 0}.fastboard-toolbar .rc-slider-rail,.fastboard-toolbar .rc-slider-track{height:2px}.fastboard-toolbar .tippy-content{padding:8px}.fastboard-toolbar .tippy-box{border:1px solid rgba(0,0,0,.15);background-color:#333333f2;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-toolbar .tippy-box[data-theme~=light]{background-color:#fffffff2;box-shadow:0 5px 10px #00000040}.fastboard-toolbar.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-toolbar.expanded{border:1px solid rgba(0,0,0,.15)}.fastboard-toolbar.dark{color:#ddd;background-color:#333333d9}.fastboard-toolbar.expanded:hover{box-shadow:0 0 5px #00000040;transform:translate(0)}.fastboard-toolbar.collapsed{padding:0;background-color:transparent}.fastboard-toolbar-tooltip{display:inline-flex;align-items:center;gap:4px}.fastboard-toolbar-hotkey{margin-right:-4px;width:24px;height:24px;border-radius:4px;background-color:#ffffff1a;display:inline-flex;align-items:center;justify-content:center}.fastboard-toolbar-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:4px;width:32px;height:32px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1;position:relative}.fastboard-toolbar-btn-interactive{display:inline-block;width:32px;height:32px}.fastboard-toolbar-btn svg,.fastboard-toolbar-btn img{width:1em;height:1em}.fastboard-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-toolbar-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-toolbar-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-toolbar-triangle{width:0px;height:0px;border-bottom:4px solid;border-left:4px solid transparent;position:absolute;bottom:0;right:0}.fastboard-toolbar-cut-line{display:inline-block;height:.5px;width:100%}.fastboard-toolbar-cut-line.light{background-color:#e7e7e7}.fastboard-toolbar-cut-line.dark{background-color:#ffffff26}.fastboard-toolbar-section{display:inline-flex;flex-flow:column nowrap;gap:4px;scroll-behavior:smooth}.fastboard-toolbar-section.collapsed{transform:translate(-100%);transition:1s transform}.fastboard-toolbar-panel{width:120px;padding:0;display:flex;flex-flow:column nowrap;align-items:center;gap:8px}.fastboard-toolbar-panel.apps{width:224px}.fastboard-toolbar-color-box,.fastboard-toolbar-shapes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;align-items:center;justify-items:center}.fastboard-toolbar-color-box .fastboard-toolbar-btn,.fastboard-toolbar-shapes .fastboard-toolbar-btn{padding:0;width:24px;height:24px}.fastboard-toolbar-apps{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;align-items:center;justify-items:center}.fastboard-toolbar-apps .fastboard-toolbar-btn{width:40px;height:40px;font-size:40px}.fastboard-toolbar-app-icon{padding-top:4px;display:inline-flex;flex-flow:column nowrap;align-items:center;gap:4px}.fastboard-toolbar-app-icon .fastboard-toolbar-btn{padding:0}.fastboard-toolbar-app-icon-text{font-size:12px;color:#5d5d5d;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fastboard-toolbar-color-item{width:24px;height:24px;border-radius:4px;cursor:pointer}.fastboard-toolbar-color-item *.light:hover{background-color:#f5f5f5}.fastboard-toolbar-color-item *.dark:hover{background-color:#333}.fastboard-toolbar-color-border{width:24px;height:24px;border:1px solid transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center}.fastboard-toolbar-color-border.active.light,.fastboard-toolbar-color-border.active.dark{border:1px solid rgba(51,129,255,.8)}.fastboard-toolbar-color-btn{margin:0;border:1px solid rgba(0,0,0,.24);padding:0;appearance:none;width:16px;height:16px;border-radius:4px;cursor:pointer}.fastboard-toolbar-color-btn:focus-visible{outline-offset:2px}.fastboard-toolbar-mask-btn{width:17px;height:62px;cursor:pointer}.fastboard-toolbar-mask-btn.dark{filter:invert(.8)}.fastboard-toolbar-expand-btn{display:flex;align-items:center;position:absolute;left:0}.fastboard-player-control{width:100%;display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-player-control.auto-hide{opacity:0;transition:opacity .2s}.fastboard-player-control.auto-hide:hover{opacity:1}.fastboard-player-control .rc-slider-disabled{background:transparent;opacity:.5}.fastboard-player-control .rc-slider-rail,.fastboard-player-control .rc-slider-track{height:2px}.fastboard-player-control .tippy-content{padding:8px}.fastboard-player-control .tippy-box{border:1px solid rgba(0,0,0,.15);background-color:#333333f2;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-player-control .tippy-box[data-theme~=light]{background-color:#fffffff2;box-shadow:0 5px 10px #00000040}.fastboard-player-control.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-player-control.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-player-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;min-width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.fastboard-player-control-btn svg,.fastboard-player-control-btn img{width:1em;height:1em}.fastboard-player-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-player-control-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-player-control-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-player-control-btn.loading{animation:fastboard-player-control-rotate .5s linear infinite}@keyframes fastboard-player-control-rotate{to{transform:rotate(360deg)}}.fastboard-player-control-panel{padding:0;display:flex;flex-flow:column nowrap;align-items:stretch;gap:4px}.fastboard-player-control-panel .fastboard-player-control-btn{width:initial;height:initial;user-select:none;font-size:12px;padding:4px;justify-content:flex-end}.fastboard-player-control-panel .fastboard-player-control-btn.active{color:#3381ff}.fastboard-player-control-slider{width:100%;padding:0 7px}.fastboard-player-control-slider.loading{cursor:not-allowed}.fastboard-player-control-slash{opacity:.6}.fastboard-player-control-current,.fastboard-player-control-slash,.fastboard-player-control-total,.fastboard-player-control-speed-text{font-size:12px;font-variant-numeric:tabular-nums}.tippy-box.fastboard-tip{color:#eee;background-color:#000000f2;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.tippy-box.fastboard-tip[data-placement^=right]>.tippy-arrow:before{top:4px;border-width:4px;border-right-color:#000}.tippy-box.fastboard-tip[data-placement^=top]>.tippy-arrow:before{left:4px;border-width:4px;border-top-color:#000}\n';
|
|
84
|
+
var style_default = '.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-sizer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden;display:flex}.netless-window-manager-sizer-horizontal{flex-direction:column}.netless-window-manager-sizer:before,.netless-window-manager-sizer:after{flex:1;content:"";display:block}.netless-window-manager-chess-sizer:before,.netless-window-manager-chess-sizer:after{background-image:linear-gradient(45deg,#b0b0b0 25%,transparent 25%),linear-gradient(-45deg,#b0b0b0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#b0b0b0 75%),linear-gradient(-45deg,transparent 75%,#b0b0b0 75%);background-color:#fff;background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px}.netless-window-manager-wrapper{position:relative;z-index:1;width:100%;height:100%;overflow:hidden}.netless-window-manager-main-view{width:100%;height:100%}.netless-window-manager-cursor-pencil-image,.netless-window-manager-cursor-eraser-image{width:26px;height:26px}.netless-window-manager-cursor-selector-image{width:24px;height:24px}.netless-window-manager-cursor-selector-avatar{border-radius:50%;border-style:solid;border-width:2px;border-color:#fff;margin-bottom:2px}.netless-window-manager-cursor-selector-avatar img{width:12px}.netless-window-manager-cursor-inner{border-radius:4px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:4px;padding-right:4px;font-size:12px}.netless-window-manager-cursor-inner-mellow{height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:16px;padding-right:16px}.netless-window-manager-cursor-tag-name{font-size:12px;margin-left:4px;padding:2px 8px;border-radius:4px}.netless-window-manager-cursor-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:26px;height:26px;z-index:2147483647;left:0;top:0;will-change:transform;transition:transform .1s;transform-origin:0 0;user-select:none}.netless-window-manager-cursor-pencil-offset{margin-left:-20px}.netless-window-manager-cursor-selector-offset{margin-left:-22px;margin-top:56px}.netless-window-manager-cursor-text-offset{margin-left:-30px;margin-top:18px}.netless-window-manager-cursor-shape-offset{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px;margin-left:-30px;margin-top:12px}.netless-window-manager-cursor-name{width:100%;height:48px;display:flex;align-items:center;justify-content:center;position:absolute;top:-40px}.cursor-image-wrapper{display:flex;justify-content:center}.telebox-collector{position:absolute;right:10px;bottom:15px}.tele-fancy-scrollbar{overscroll-behavior:contain;overflow:auto;overflow-y:scroll;overflow-y:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.tele-fancy-scrollbar::-webkit-scrollbar{height:8px;width:8px}.tele-fancy-scrollbar::-webkit-scrollbar-track{background-color:transparent}.tele-fancy-scrollbar::-webkit-scrollbar-thumb{background-color:#444e601a;background-color:transparent;border-radius:4px;transition:background-color .4s}.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb{background-color:#444e601a}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical{min-height:50px}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-box{position:absolute;top:0;left:0;z-index:100;transition:width .4s cubic-bezier(.4,.9,.71,1.02),height .4s cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .4s ease}.telebox-box-main{position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#f9f9fc;box-shadow:0 4px 10px #2f419226;border-radius:6px;border:1px solid #e3e3ec}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-content-wrap{flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.telebox-content{width:100%;height:100%;position:relative}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-resize-handle{position:absolute;z-index:2147483647}.telebox-n{width:100%;height:5px;left:0;top:-5px;cursor:n-resize}.telebox-s{width:100%;height:5px;left:0;bottom:-5px;cursor:s-resize}.telebox-w{width:5px;height:100%;left:-5px;top:0;cursor:w-resize}.telebox-e{width:5px;height:100%;right:-5px;top:0;cursor:e-resize}.telebox-nw{width:15px;height:15px;top:-5px;left:-5px;cursor:nw-resize}.telebox-ne{width:15px;height:15px;top:-5px;right:-5px;cursor:ne-resize}.telebox-se{width:15px;height:15px;bottom:-5px;right:-5px;cursor:se-resize}.telebox-sw{width:15px;height:15px;bottom:-5px;left:-5px;cursor:sw-resize}.telebox-track-mask{position:fixed;top:0;left:0;z-index:2147483647;width:100%;height:100%;background:rgba(0,0,0,.0001);cursor:move}.telebox-cursor-n{cursor:n-resize}.telebox-cursor-s{cursor:s-resize}.telebox-cursor-w{cursor:w-resize}.telebox-cursor-e{cursor:e-resize}.telebox-cursor-nw{cursor:nw-resize}.telebox-cursor-ne{cursor:ne-resize}.telebox-cursor-se{cursor:se-resize}.telebox-cursor-sw{cursor:sw-resize}.telebox-maximized .telebox-resize-handles,.telebox-no-resize .telebox-resize-handles{display:none}.telebox-maximized{box-shadow:none;transition:none}.telebox-minimized{transition:width 50ms cubic-bezier(.4,.9,.71,1.02),height 50ms cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .6s ease;opacity:0;pointer-events:none;user-select:none}.telebox-transforming{will-change:transform;transition:opacity .6s cubic-bezier(.7,0,.84,0)}.telebox-readonly .telebox-resize-handle{cursor:initial!important;pointer-events:none!important}.telebox-color-scheme-dark .telebox-box-main{color:#e9e9e9;background:#212126;border-color:#43434d}.telebox-titlebar{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;background:#fff;user-select:none;border-bottom:1px solid #eeeef7;touch-action:manipulation}.telebox-title-area{overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{overflow:hidden;margin:0;padding:0;font-size:14px;font-weight:400;font-family:PingFangSC-Regular,PingFang SC;white-space:nowrap;word-break:keep-all;text-overflow:ellipsis;color:#191919}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10}.telebox-titlebar-btns{white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{width:22px;height:22px;padding:0;outline:0;border:none;background:0 0;cursor:pointer}.telebox-titlebar-btn~.telebox-titlebar-btn{margin-left:10px}.telebox-titlebar-btn-icon{width:22px;height:22px}.telebox-readonly .telebox-titlebar-btn{cursor:not-allowed}.telebox-titlebar-icon-minimize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-titlebar-icon-maximize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==)}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.telebox-titlebar-icon-close{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-collector{visibility:hidden;display:block;position:absolute;z-index:200;width:40px;height:40px;margin:0;padding:0;border:none;outline:0;font-size:0;border-radius:50%;background:#fff;box-shadow:0 2px 6px #2f419226;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#43434d}.telebox-max-titlebar{display:none;position:absolute;top:0;left:0;z-index:50000;user-select:none}.telebox-max-titlebar .telebox-drag-area{height:100%;min-width:16px;position:static;margin:0;flex-grow:1;flex-shrink:0}.telebox-max-titlebar-maximized{display:flex}.telebox-titles{height:100%;margin:0;overflow-y:hidden;overflow-x:scroll;overflow-x:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.telebox-titles::-webkit-scrollbar{height:8px;width:8px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:4px;transition:background-color .4s}.telebox-titles:hover::-webkit-scrollbar-thumb{background-color:#eeeef7cc}.telebox-titles::-webkit-scrollbar-thumb:hover{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:active{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:vertical{min-height:50px}.telebox-titles::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-titles-content{height:100%;display:flex;flex-wrap:nowrap;align-items:center;padding:0}.telebox-titles-tab{height:100%;overflow:hidden;max-width:182px;min-width:50px;padding:0 26px 0 16px;outline:0;font-size:13px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;border:none;border-right:1px solid #e5e5f0;color:#7b88a0;background:0 0;cursor:pointer;user-select:none}.telebox-titles-tab-focus{color:#357bf6}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark.telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-color-scheme-dark .telebox-titles-tab{border-right-color:#7b88a0}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.rc-slider{position:relative;height:14px;padding:5px 0;width:100%;border-radius:6px;touch-action:none;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider-rail{position:absolute;width:100%;background-color:#e9e9e9;height:4px;border-radius:6px}.rc-slider-track{position:absolute;left:0;height:4px;border-radius:6px;background-color:#abe2fb}.rc-slider-handle{position:absolute;width:14px;height:14px;cursor:pointer;cursor:-webkit-grab;margin-top:-5px;cursor:grab;border-radius:50%;border:solid 2px #96dbfa;background-color:#fff;touch-action:pan-x}.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging{border-color:#57c5f7;box-shadow:0 0 0 5px #96dbfa}.rc-slider-handle:focus{outline:none}.rc-slider-handle-click-focused:focus{border-color:#96dbfa;box-shadow:unset}.rc-slider-handle:hover{border-color:#57c5f7}.rc-slider-handle:active{border-color:#57c5f7;box-shadow:0 0 5px #57c5f7;cursor:-webkit-grabbing;cursor:grabbing}.rc-slider-mark{position:absolute;top:18px;left:0;width:100%;font-size:12px}.rc-slider-mark-text{position:absolute;display:inline-block;vertical-align:middle;text-align:center;cursor:pointer;color:#999}.rc-slider-mark-text-active{color:#666}.rc-slider-step{position:absolute;width:100%;height:4px;background:transparent}.rc-slider-dot{position:absolute;bottom:-2px;margin-left:-4px;width:8px;height:8px;border:2px solid #e9e9e9;background-color:#fff;cursor:pointer;border-radius:50%;vertical-align:middle}.rc-slider-dot-active{border-color:#96dbfa}.rc-slider-dot-reverse{margin-right:-4px}.rc-slider-disabled{background-color:#e9e9e9}.rc-slider-disabled .rc-slider-track{background-color:#ccc}.rc-slider-disabled .rc-slider-handle,.rc-slider-disabled .rc-slider-dot{border-color:#ccc;box-shadow:none;background-color:#fff;cursor:not-allowed}.rc-slider-disabled .rc-slider-mark-text,.rc-slider-disabled .rc-slider-dot{cursor:not-allowed!important}.rc-slider-vertical{width:14px;height:100%;padding:0 5px}.rc-slider-vertical .rc-slider-rail{height:100%;width:4px}.rc-slider-vertical .rc-slider-track{left:5px;bottom:0;width:4px}.rc-slider-vertical .rc-slider-handle{margin-left:-5px;touch-action:pan-y}.rc-slider-vertical .rc-slider-mark{top:0;left:18px;height:100%}.rc-slider-vertical .rc-slider-step{height:100%;width:4px}.rc-slider-vertical .rc-slider-dot{left:2px;margin-bottom:-4px}.rc-slider-vertical .rc-slider-dot:first-child{margin-bottom:-4px}.rc-slider-vertical .rc-slider-dot:last-child{margin-bottom:-4px}.rc-slider-tooltip-zoom-down-enter,.rc-slider-tooltip-zoom-down-appear,.rc-slider-tooltip-zoom-down-leave{animation-duration:.3s;animation-fill-mode:both;display:block!important;animation-play-state:paused}.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active{animation-name:rcSliderTooltipZoomDownIn;animation-play-state:running}.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active{animation-name:rcSliderTooltipZoomDownOut;animation-play-state:running}.rc-slider-tooltip-zoom-down-enter,.rc-slider-tooltip-zoom-down-appear{transform:scale(0);animation-timing-function:cubic-bezier(.23,1,.32,1)}.rc-slider-tooltip-zoom-down-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}@keyframes rcSliderTooltipZoomDownIn{0%{opacity:0;transform-origin:50% 100%;transform:scale(0)}to{transform-origin:50% 100%;transform:scale(1)}}@keyframes rcSliderTooltipZoomDownOut{0%{transform-origin:50% 100%;transform:scale(1)}to{opacity:0;transform-origin:50% 100%;transform:scale(0)}}.rc-slider-tooltip{position:absolute;left:-9999px;top:-9999px;visibility:visible;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider-tooltip *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rc-slider-tooltip-hidden{display:none}.rc-slider-tooltip-placement-top{padding:4px 0 8px}.rc-slider-tooltip-inner{padding:6px 2px;min-width:24px;height:24px;font-size:12px;line-height:1;color:#fff;text-align:center;text-decoration:none;background-color:#6c6c6c;border-radius:6px;box-shadow:0 0 4px #d9d9d9}.rc-slider-tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow{bottom:4px;left:50%;margin-left:-4px;border-width:4px 4px 0;border-top-color:#6c6c6c}.fastboard-root{position:relative;width:100%;height:100%;overflow:hidden}.fastboard-view{position:absolute;top:0;left:0;width:100%;height:100%}.fastboard-left{position:absolute;top:0;left:0;height:calc(100% - 48px);padding:16px;z-index:201;display:flex;align-items:center}.fastboard-bottom-left,.fastboard-bottom-right{display:flex;gap:10px;position:absolute;bottom:8px;left:8px;padding:8px;z-index:200}.fastboard-bottom-right{left:initial;right:8px}.fastboard-redo-undo{display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-redo-undo.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-redo-undo.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-redo-undo-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1}.fastboard-redo-undo-btn svg,.fastboard-redo-undo-btn img{width:1em;height:1em}.fastboard-redo-undo-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-redo-undo-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-redo-undo-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-page-control{display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-page-control.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-page-control.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-page-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1}.fastboard-page-control-btn svg,.fastboard-page-control-btn img{width:1em;height:1em}.fastboard-page-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-page-control-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-page-control-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-page-control-cut-line{height:24px;width:.5px}.fastboard-page-control-cut-line.light{background-color:#e7e7e7}.fastboard-page-control-cut-line.dark{background-color:#ffffff26}.fastboard-page-control-slash{opacity:.6}.fastboard-page-control-page,.fastboard-page-control-slash,.fastboard-page-control-page-count{font-size:12px;font-variant-numeric:tabular-nums}.fastboard-zoom-control{position:relative;display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-zoom-control.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-zoom-control.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-zoom-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1}.fastboard-zoom-control-btn svg,.fastboard-zoom-control-btn img{width:1em;height:1em}.fastboard-zoom-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-zoom-control-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-zoom-control-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-zoom-control-cut-line{height:24px;width:.5px}.fastboard-zoom-control-cut-line.light{background-color:#e7e7e7}.fastboard-zoom-control-cut-line.dark{background-color:#ffffff26}.fastboard-zoom-control-percent{opacity:.6}.fastboard-zoom-control-scale,.fastboard-zoom-control-percent{font-size:12px;font-variant-numeric:tabular-nums}.fastboard-toolbar{display:flex;align-items:center;padding:4px;border-radius:4px;flex-direction:column;gap:4px;position:absolute;z-index:100;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-toolbar .rc-slider{padding:6px 0}.fastboard-toolbar .rc-slider-rail,.fastboard-toolbar .rc-slider-track{height:2px}.fastboard-toolbar .tippy-content{padding:8px}.fastboard-toolbar .tippy-box{border:1px solid rgba(0,0,0,.15);background-color:#333333f2;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-toolbar .tippy-box[data-theme~=light]{background-color:#fffffff2;box-shadow:0 5px 10px #00000040}.fastboard-toolbar.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-toolbar.expanded{border:1px solid rgba(0,0,0,.15)}.fastboard-toolbar.dark{color:#ddd;background-color:#333333d9}.fastboard-toolbar.expanded:hover{box-shadow:0 0 5px #00000040;transform:translate(0)}.fastboard-toolbar.collapsed{padding:0;background-color:transparent}.fastboard-toolbar-tooltip{display:inline-flex;align-items:center;gap:4px}.fastboard-toolbar-hotkey{margin-right:-4px;width:24px;height:24px;border-radius:4px;background-color:#ffffff1a;display:inline-flex;align-items:center;justify-content:center}.fastboard-toolbar-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:4px;width:32px;height:32px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1;position:relative}.fastboard-toolbar-btn-interactive{display:inline-block;width:32px;height:32px}.fastboard-toolbar-btn svg,.fastboard-toolbar-btn img{width:100%;height:100%}.fastboard-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-toolbar-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-toolbar-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-toolbar-triangle{width:0px;height:0px;border-bottom:4px solid;border-left:4px solid transparent;position:absolute;bottom:0;right:0}.fastboard-toolbar-cut-line{display:inline-block;height:.5px;width:100%}.fastboard-toolbar-cut-line.light{background-color:#e7e7e7}.fastboard-toolbar-cut-line.dark{background-color:#ffffff26}.fastboard-toolbar-section{display:inline-flex;flex-flow:column nowrap;gap:4px;scroll-behavior:smooth}.fastboard-toolbar-section.collapsed{transform:translate(-100%);transition:1s transform}.fastboard-toolbar-panel{width:120px;padding:0;display:flex;flex-flow:column nowrap;align-items:center;gap:8px}.fastboard-toolbar-panel.apps{width:224px}.fastboard-toolbar-color-box,.fastboard-toolbar-shapes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;align-items:center;justify-items:center}.fastboard-toolbar-color-box .fastboard-toolbar-btn,.fastboard-toolbar-shapes .fastboard-toolbar-btn{padding:0;width:24px;height:24px}.fastboard-toolbar-apps{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;align-items:center;justify-items:center}.fastboard-toolbar-apps .fastboard-toolbar-btn{width:40px;height:40px;font-size:0}.fastboard-toolbar-app-icon{padding-top:4px;display:inline-flex;flex-flow:column nowrap;align-items:center;gap:4px}.fastboard-toolbar-app-icon .fastboard-toolbar-btn{padding:0}.fastboard-toolbar-app-icon-text{font-size:12px;color:#5d5d5d;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fastboard-toolbar-color-item{width:24px;height:24px;border-radius:4px;cursor:pointer}.fastboard-toolbar-color-item *.light:hover{background-color:#f5f5f5}.fastboard-toolbar-color-item *.dark:hover{background-color:#333}.fastboard-toolbar-color-border{width:24px;height:24px;border:1px solid transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center}.fastboard-toolbar-color-border.active.light,.fastboard-toolbar-color-border.active.dark{border:1px solid rgba(51,129,255,.8)}.fastboard-toolbar-color-btn{margin:0;border:1px solid rgba(0,0,0,.24);padding:0;appearance:none;width:16px;height:16px;border-radius:4px;cursor:pointer}.fastboard-toolbar-color-btn:focus-visible{outline-offset:2px}.fastboard-toolbar-mask{position:absolute;left:calc(100% + 1px);top:50%;transform:translateY(-50%)}.fastboard-toolbar-mask.dark{left:100%}.fastboard-toolbar-mask-btn{width:17px;height:62px;cursor:pointer}.fastboard-toolbar-mask-btn.dark{filter:invert(.8)}.fastboard-toolbar-expand-btn{display:flex;align-items:center;position:absolute;left:0}.fastboard-player-control{width:100%;display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:4px;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-player-control.auto-hide{opacity:0;transition:opacity .2s}.fastboard-player-control.auto-hide:hover{opacity:1}.fastboard-player-control .rc-slider-disabled{background:transparent;opacity:.5}.fastboard-player-control .rc-slider-rail,.fastboard-player-control .rc-slider-track{height:2px}.fastboard-player-control .tippy-content{padding:8px}.fastboard-player-control .tippy-box{border:1px solid rgba(0,0,0,.15);background-color:#333333f2;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.fastboard-player-control .tippy-box[data-theme~=light]{background-color:#fffffff2;box-shadow:0 5px 10px #00000040}.fastboard-player-control.light{color:#333;background-color:#ffffffd9;border:1px solid rgba(0,0,0,.15)}.fastboard-player-control.dark{color:#ddd;background-color:#333333d9;border:1px solid rgba(0,0,0,.45)}.fastboard-player-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;min-width:24px;height:24px;background-color:transparent;border-radius:4px;font-size:24px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.fastboard-player-control-btn svg,.fastboard-player-control-btn img{width:1em;height:1em}.fastboard-player-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-player-control-btn.light:not(:disabled):hover{background-color:#3381ff1a}.fastboard-player-control-btn.dark:not(:disabled):hover{background-color:#3381ff40}.fastboard-player-control-btn.loading{animation:fastboard-player-control-rotate .5s linear infinite}@keyframes fastboard-player-control-rotate{to{transform:rotate(360deg)}}.fastboard-player-control-panel{padding:0;display:flex;flex-flow:column nowrap;align-items:stretch;gap:4px}.fastboard-player-control-panel .fastboard-player-control-btn{width:initial;height:initial;user-select:none;font-size:12px;padding:4px;justify-content:flex-end}.fastboard-player-control-panel .fastboard-player-control-btn.active{color:#3381ff}.fastboard-player-control-slider{width:100%;padding:0 7px}.fastboard-player-control-slider.loading{cursor:not-allowed}.fastboard-player-control-slash{opacity:.6}.fastboard-player-control-current,.fastboard-player-control-slash,.fastboard-player-control-total,.fastboard-player-control-speed-text{font-size:12px;font-variant-numeric:tabular-nums}.tippy-box.fastboard-tip{color:#eee;background-color:#000000f2;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.tippy-box.fastboard-tip[data-placement^=right]>.tippy-arrow:before{top:4px;border-width:4px;border-right-color:#000}.tippy-box.fastboard-tip[data-placement^=top]>.tippy-arrow:before{left:4px;border-width:4px;border-top-color:#000}\n';
|
|
85
85
|
|
|
86
86
|
// src/behaviors/style.ts
|
|
87
87
|
applyStyles(style_default);
|
|
@@ -89,8 +89,8 @@ applyStyles(style_default);
|
|
|
89
89
|
// src/components/hooks.ts
|
|
90
90
|
import { BuiltinApps } from "@netless/window-manager";
|
|
91
91
|
import { createContext, useContext, useEffect as useEffect2, useState as useState2 } from "react";
|
|
92
|
-
var FastboardAppContext = createContext(null);
|
|
93
|
-
var ThemeContext = createContext("light");
|
|
92
|
+
var FastboardAppContext = /* @__PURE__ */ createContext(null);
|
|
93
|
+
var ThemeContext = /* @__PURE__ */ createContext("light");
|
|
94
94
|
function useTheme(userTheme) {
|
|
95
95
|
const themeFromContext = useContext(ThemeContext);
|
|
96
96
|
return userTheme || themeFromContext;
|
|
@@ -235,7 +235,7 @@ var createI18n = async ({
|
|
|
235
235
|
});
|
|
236
236
|
return i18next;
|
|
237
237
|
};
|
|
238
|
-
var I18nContext = createContext2(null);
|
|
238
|
+
var I18nContext = /* @__PURE__ */ createContext2(null);
|
|
239
239
|
function useTranslation() {
|
|
240
240
|
const i18n = useContext2(I18nContext);
|
|
241
241
|
const t = useMemo(() => i18n ? i18n.getFixedT(null, ["translation"]) : (id) => id, [i18n]);
|
|
@@ -245,7 +245,7 @@ function useTranslation() {
|
|
|
245
245
|
// src/icons/index.tsx
|
|
246
246
|
import React from "react";
|
|
247
247
|
function Icon({ fallback, src, alt = "[icon]" }) {
|
|
248
|
-
return src ? React.createElement("img", {
|
|
248
|
+
return src ? /* @__PURE__ */ React.createElement("img", {
|
|
249
249
|
src,
|
|
250
250
|
alt,
|
|
251
251
|
title: alt
|
|
@@ -283,17 +283,17 @@ var RightOffset = [0, 11];
|
|
|
283
283
|
function Redo({ theme = "light", active }) {
|
|
284
284
|
const config = themes[theme];
|
|
285
285
|
const stroke = active ? config.activeColor : config.color;
|
|
286
|
-
return React2.createElement("svg", {
|
|
286
|
+
return /* @__PURE__ */ React2.createElement("svg", {
|
|
287
287
|
viewBox: "0 0 24 24"
|
|
288
|
-
}, React2.createElement("g", {
|
|
288
|
+
}, /* @__PURE__ */ React2.createElement("g", {
|
|
289
289
|
fill: "none",
|
|
290
290
|
fillRule: "evenodd",
|
|
291
291
|
stroke,
|
|
292
292
|
strokeLinecap: "round",
|
|
293
293
|
strokeLinejoin: "round"
|
|
294
|
-
}, React2.createElement("path", {
|
|
294
|
+
}, /* @__PURE__ */ React2.createElement("path", {
|
|
295
295
|
d: "M14 14h4v-4"
|
|
296
|
-
}), React2.createElement("path", {
|
|
296
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
297
297
|
d: "m18 14-.788-.9A7.005 7.005 0 0 0 6 14h0"
|
|
298
298
|
})));
|
|
299
299
|
}
|
|
@@ -303,17 +303,17 @@ import React3 from "react";
|
|
|
303
303
|
function Undo({ theme = "light", active }) {
|
|
304
304
|
const config = themes[theme];
|
|
305
305
|
const stroke = active ? config.activeColor : config.color;
|
|
306
|
-
return React3.createElement("svg", {
|
|
306
|
+
return /* @__PURE__ */ React3.createElement("svg", {
|
|
307
307
|
viewBox: "0 0 24 24"
|
|
308
|
-
}, React3.createElement("g", {
|
|
308
|
+
}, /* @__PURE__ */ React3.createElement("g", {
|
|
309
309
|
fill: "none",
|
|
310
310
|
fillRule: "evenodd",
|
|
311
311
|
stroke,
|
|
312
312
|
strokeLinecap: "round",
|
|
313
313
|
strokeLinejoin: "round"
|
|
314
|
-
}, React3.createElement("path", {
|
|
314
|
+
}, /* @__PURE__ */ React3.createElement("path", {
|
|
315
315
|
d: "M10 14H6v-4"
|
|
316
|
-
}), React3.createElement("path", {
|
|
316
|
+
}), /* @__PURE__ */ React3.createElement("path", {
|
|
317
317
|
d: "m6 14 .788-.9A7.005 7.005 0 0 1 18 14h0"
|
|
318
318
|
})));
|
|
319
319
|
}
|
|
@@ -326,9 +326,9 @@ function RedoUndo({ theme, undoIcon, undoIconDisable, redoIcon, redoIconDisable
|
|
|
326
326
|
const writable = useWritable();
|
|
327
327
|
const { redoSteps, undoSteps, redo, undo } = useRedoUndo();
|
|
328
328
|
const disabled = !writable;
|
|
329
|
-
return React4.createElement("div", {
|
|
329
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
330
330
|
className: clsx(name, theme)
|
|
331
|
-
}, React4.createElement(Tippy, {
|
|
331
|
+
}, /* @__PURE__ */ React4.createElement(Tippy, {
|
|
332
332
|
className: "fastboard-tip",
|
|
333
333
|
content: t("undo"),
|
|
334
334
|
theme,
|
|
@@ -337,17 +337,17 @@ function RedoUndo({ theme, undoIcon, undoIconDisable, redoIcon, redoIconDisable
|
|
|
337
337
|
delay: [1e3, 400],
|
|
338
338
|
duration: 300,
|
|
339
339
|
offset: TopOffset
|
|
340
|
-
}, React4.createElement("button", {
|
|
340
|
+
}, /* @__PURE__ */ React4.createElement("button", {
|
|
341
341
|
className: clsx(`${name}-btn`, "undo", theme),
|
|
342
342
|
disabled: disabled || undoSteps === 0,
|
|
343
343
|
onClick: undo
|
|
344
|
-
}, React4.createElement(Icon, {
|
|
345
|
-
fallback: React4.createElement(Undo, {
|
|
344
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
345
|
+
fallback: /* @__PURE__ */ React4.createElement(Undo, {
|
|
346
346
|
theme
|
|
347
347
|
}),
|
|
348
348
|
src: undoSteps === 0 ? undoIconDisable : undoIcon,
|
|
349
349
|
alt: "[undo]"
|
|
350
|
-
}))), React4.createElement(Tippy, {
|
|
350
|
+
}))), /* @__PURE__ */ React4.createElement(Tippy, {
|
|
351
351
|
className: "fastboard-tip",
|
|
352
352
|
content: t("redo"),
|
|
353
353
|
theme,
|
|
@@ -356,12 +356,12 @@ function RedoUndo({ theme, undoIcon, undoIconDisable, redoIcon, redoIconDisable
|
|
|
356
356
|
delay: [1e3, 400],
|
|
357
357
|
duration: 300,
|
|
358
358
|
offset: TopOffset
|
|
359
|
-
}, React4.createElement("button", {
|
|
359
|
+
}, /* @__PURE__ */ React4.createElement("button", {
|
|
360
360
|
className: clsx(`${name}-btn`, "redo", theme),
|
|
361
361
|
disabled: disabled || redoSteps === 0,
|
|
362
362
|
onClick: redo
|
|
363
|
-
}, React4.createElement(Icon, {
|
|
364
|
-
fallback: React4.createElement(Redo, {
|
|
363
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
364
|
+
fallback: /* @__PURE__ */ React4.createElement(Redo, {
|
|
365
365
|
theme
|
|
366
366
|
}),
|
|
367
367
|
src: redoSteps === 0 ? redoIconDisable : redoIcon,
|
|
@@ -443,9 +443,9 @@ import React5 from "react";
|
|
|
443
443
|
function Minus({ theme = "light", active }) {
|
|
444
444
|
const config = themes[theme];
|
|
445
445
|
const stroke = active ? config.activeColor : config.color;
|
|
446
|
-
return React5.createElement("svg", {
|
|
446
|
+
return /* @__PURE__ */ React5.createElement("svg", {
|
|
447
447
|
viewBox: "0 0 24 24"
|
|
448
|
-
}, React5.createElement("path", {
|
|
448
|
+
}, /* @__PURE__ */ React5.createElement("path", {
|
|
449
449
|
fill: "none",
|
|
450
450
|
stroke,
|
|
451
451
|
strokeLinecap: "round",
|
|
@@ -459,9 +459,9 @@ import React6 from "react";
|
|
|
459
459
|
function Plus({ theme = "light", active }) {
|
|
460
460
|
const config = themes[theme];
|
|
461
461
|
const stroke = active ? config.activeColor : config.color;
|
|
462
|
-
return React6.createElement("svg", {
|
|
462
|
+
return /* @__PURE__ */ React6.createElement("svg", {
|
|
463
463
|
viewBox: "0 0 24 24"
|
|
464
|
-
}, React6.createElement("path", {
|
|
464
|
+
}, /* @__PURE__ */ React6.createElement("path", {
|
|
465
465
|
fill: "none",
|
|
466
466
|
stroke,
|
|
467
467
|
strokeLinecap: "round",
|
|
@@ -475,22 +475,22 @@ import React7 from "react";
|
|
|
475
475
|
function Reset({ theme = "light", active }) {
|
|
476
476
|
const config = themes[theme];
|
|
477
477
|
const stroke = active ? config.activeColor : config.color;
|
|
478
|
-
return React7.createElement("svg", {
|
|
478
|
+
return /* @__PURE__ */ React7.createElement("svg", {
|
|
479
479
|
viewBox: "0 0 24 24"
|
|
480
|
-
}, React7.createElement("g", {
|
|
480
|
+
}, /* @__PURE__ */ React7.createElement("g", {
|
|
481
481
|
fill: "none",
|
|
482
482
|
fillRule: "evenodd",
|
|
483
483
|
transform: "translate(-176 -684)"
|
|
484
|
-
}, React7.createElement("path", {
|
|
484
|
+
}, /* @__PURE__ */ React7.createElement("path", {
|
|
485
485
|
stroke,
|
|
486
486
|
strokeLinejoin: "round",
|
|
487
487
|
d: "M188 688v4m0 8v4m8-8h-4m-8 0h-4"
|
|
488
|
-
}), React7.createElement("circle", {
|
|
488
|
+
}), /* @__PURE__ */ React7.createElement("circle", {
|
|
489
489
|
cx: "188",
|
|
490
490
|
cy: "696",
|
|
491
491
|
r: "6",
|
|
492
492
|
stroke
|
|
493
|
-
}), React7.createElement("circle", {
|
|
493
|
+
}), /* @__PURE__ */ React7.createElement("circle", {
|
|
494
494
|
cx: "188",
|
|
495
495
|
cy: "696",
|
|
496
496
|
r: "1",
|
|
@@ -514,9 +514,9 @@ function ZoomControl({
|
|
|
514
514
|
const writable = useWritable();
|
|
515
515
|
const { scale, resetCamera, zoomIn, zoomOut } = useZoomControl();
|
|
516
516
|
const disabled = !writable;
|
|
517
|
-
return React8.createElement("div", {
|
|
517
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
|
518
518
|
className: clsx2(name2, theme)
|
|
519
|
-
}, React8.createElement(Tippy2, {
|
|
519
|
+
}, /* @__PURE__ */ React8.createElement(Tippy2, {
|
|
520
520
|
className: "fastboard-tip",
|
|
521
521
|
content: t("zoomOut"),
|
|
522
522
|
theme,
|
|
@@ -525,21 +525,21 @@ function ZoomControl({
|
|
|
525
525
|
delay: [1e3, 400],
|
|
526
526
|
duration: 300,
|
|
527
527
|
offset: TopOffset
|
|
528
|
-
}, React8.createElement("button", {
|
|
528
|
+
}, /* @__PURE__ */ React8.createElement("button", {
|
|
529
529
|
className: clsx2(`${name2}-btn`, "minus", theme),
|
|
530
530
|
disabled,
|
|
531
531
|
onClick: zoomOut
|
|
532
|
-
}, React8.createElement(Icon, {
|
|
533
|
-
fallback: React8.createElement(Minus, {
|
|
532
|
+
}, /* @__PURE__ */ React8.createElement(Icon, {
|
|
533
|
+
fallback: /* @__PURE__ */ React8.createElement(Minus, {
|
|
534
534
|
theme
|
|
535
535
|
}),
|
|
536
536
|
src: disabled ? minusIconDisable : minusIcon,
|
|
537
537
|
alt: "[minus]"
|
|
538
|
-
}))), React8.createElement("span", {
|
|
538
|
+
}))), /* @__PURE__ */ React8.createElement("span", {
|
|
539
539
|
className: clsx2(`${name2}-scale`, theme)
|
|
540
|
-
}, Math.ceil(scale * 100)), React8.createElement("span", {
|
|
540
|
+
}, Math.ceil(scale * 100)), /* @__PURE__ */ React8.createElement("span", {
|
|
541
541
|
className: clsx2(`${name2}-percent`, theme)
|
|
542
|
-
}, "%"), React8.createElement(Tippy2, {
|
|
542
|
+
}, "%"), /* @__PURE__ */ React8.createElement(Tippy2, {
|
|
543
543
|
className: "fastboard-tip",
|
|
544
544
|
content: t("zoomIn"),
|
|
545
545
|
theme,
|
|
@@ -548,17 +548,17 @@ function ZoomControl({
|
|
|
548
548
|
delay: [1e3, 400],
|
|
549
549
|
duration: 300,
|
|
550
550
|
offset: TopOffset
|
|
551
|
-
}, React8.createElement("button", {
|
|
551
|
+
}, /* @__PURE__ */ React8.createElement("button", {
|
|
552
552
|
className: clsx2(`${name2}-btn`, "plus", theme),
|
|
553
553
|
disabled,
|
|
554
554
|
onClick: zoomIn
|
|
555
|
-
}, React8.createElement(Icon, {
|
|
556
|
-
fallback: React8.createElement(Plus, {
|
|
555
|
+
}, /* @__PURE__ */ React8.createElement(Icon, {
|
|
556
|
+
fallback: /* @__PURE__ */ React8.createElement(Plus, {
|
|
557
557
|
theme
|
|
558
558
|
}),
|
|
559
559
|
src: disabled ? plusIconDisable : plusIcon,
|
|
560
560
|
alt: "[plus]"
|
|
561
|
-
}))), React8.createElement(Tippy2, {
|
|
561
|
+
}))), /* @__PURE__ */ React8.createElement(Tippy2, {
|
|
562
562
|
className: "fastboard-tip",
|
|
563
563
|
content: t("reset"),
|
|
564
564
|
theme,
|
|
@@ -567,12 +567,12 @@ function ZoomControl({
|
|
|
567
567
|
delay: [1e3, 400],
|
|
568
568
|
duration: 300,
|
|
569
569
|
offset: TopOffset
|
|
570
|
-
}, React8.createElement("button", {
|
|
570
|
+
}, /* @__PURE__ */ React8.createElement("button", {
|
|
571
571
|
className: clsx2(`${name2}-btn`, "reset", theme),
|
|
572
572
|
disabled,
|
|
573
573
|
onClick: resetCamera
|
|
574
|
-
}, React8.createElement(Icon, {
|
|
575
|
-
fallback: React8.createElement(Reset, {
|
|
574
|
+
}, /* @__PURE__ */ React8.createElement(Icon, {
|
|
575
|
+
fallback: /* @__PURE__ */ React8.createElement(Reset, {
|
|
576
576
|
theme
|
|
577
577
|
}),
|
|
578
578
|
src: disabled ? resetIconDisable : resetIcon,
|
|
@@ -581,59 +581,22 @@ function ZoomControl({
|
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
// src/components/PageControl/hooks.ts
|
|
584
|
-
import { useCallback as useCallback4
|
|
585
|
-
function usePageControl(
|
|
586
|
-
const
|
|
587
|
-
const
|
|
584
|
+
import { useCallback as useCallback4 } from "react";
|
|
585
|
+
function usePageControl() {
|
|
586
|
+
const app = useFastboardApp();
|
|
587
|
+
const pageIndex = useFastboardValue(app.sceneIndex);
|
|
588
|
+
const pageCount = useFastboardValue(app.sceneLength);
|
|
588
589
|
const addPage = useCallback4(async () => {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}, [room, manager, pageIndex]);
|
|
600
|
-
const prevPage = useCallback4(() => {
|
|
601
|
-
if (manager) {
|
|
602
|
-
manager.setMainViewSceneIndex(pageIndex - 1);
|
|
603
|
-
} else if (room) {
|
|
604
|
-
room.pptPreviousStep();
|
|
605
|
-
}
|
|
606
|
-
}, [room, manager, pageIndex]);
|
|
607
|
-
const nextPage = useCallback4(() => {
|
|
608
|
-
if (manager) {
|
|
609
|
-
manager.setMainViewSceneIndex(pageIndex + 1);
|
|
610
|
-
} else if (room) {
|
|
611
|
-
room.pptNextStep();
|
|
612
|
-
}
|
|
613
|
-
}, [room, manager, pageIndex]);
|
|
614
|
-
useEffect3(() => {
|
|
615
|
-
if (room) {
|
|
616
|
-
setPageIndex(room.state.sceneState.index);
|
|
617
|
-
setPageCount(room.state.sceneState.scenes.length);
|
|
618
|
-
if (manager) {
|
|
619
|
-
manager.emitter.on("mainViewSceneIndexChange", setPageIndex);
|
|
620
|
-
return () => {
|
|
621
|
-
manager.emitter.off("mainViewSceneIndexChange", setPageIndex);
|
|
622
|
-
};
|
|
623
|
-
} else {
|
|
624
|
-
const onRoomStateChanged = (modifyState) => {
|
|
625
|
-
if (modifyState.sceneState) {
|
|
626
|
-
setPageIndex(modifyState.sceneState.index);
|
|
627
|
-
setPageCount(modifyState.sceneState.scenes.length);
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
room.callbacks.on("onRoomStateChanged", onRoomStateChanged);
|
|
631
|
-
return () => {
|
|
632
|
-
room.callbacks.off("onRoomStateChanged", onRoomStateChanged);
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
}, [room, manager]);
|
|
590
|
+
await app.manager.switchMainViewToWriter();
|
|
591
|
+
app.room.putScenes(app.manager.mainViewSceneDir, [{}], pageIndex + 1);
|
|
592
|
+
await app.manager.setMainViewSceneIndex(pageIndex + 1);
|
|
593
|
+
}, [app, pageIndex]);
|
|
594
|
+
const prevPage = useCallback4(async () => {
|
|
595
|
+
await app.manager.setMainViewSceneIndex(pageIndex - 1);
|
|
596
|
+
}, [app, pageIndex]);
|
|
597
|
+
const nextPage = useCallback4(async () => {
|
|
598
|
+
await app.manager.setMainViewSceneIndex(pageIndex + 1);
|
|
599
|
+
}, [app, pageIndex]);
|
|
637
600
|
return { pageIndex, pageCount, prevPage, nextPage, addPage };
|
|
638
601
|
}
|
|
639
602
|
|
|
@@ -647,9 +610,9 @@ import React9 from "react";
|
|
|
647
610
|
function ChevronLeft({ theme = "light", active }) {
|
|
648
611
|
const config = themes[theme];
|
|
649
612
|
const stroke = active ? config.activeColor : config.color;
|
|
650
|
-
return React9.createElement("svg", {
|
|
613
|
+
return /* @__PURE__ */ React9.createElement("svg", {
|
|
651
614
|
viewBox: "0 0 24 24"
|
|
652
|
-
}, React9.createElement("path", {
|
|
615
|
+
}, /* @__PURE__ */ React9.createElement("path", {
|
|
653
616
|
fill: "none",
|
|
654
617
|
stroke,
|
|
655
618
|
strokeLinecap: "round",
|
|
@@ -663,9 +626,9 @@ import React10 from "react";
|
|
|
663
626
|
function ChevronRight({ theme = "light", active }) {
|
|
664
627
|
const config = themes[theme];
|
|
665
628
|
const stroke = active ? config.activeColor : config.color;
|
|
666
|
-
return React10.createElement("svg", {
|
|
629
|
+
return /* @__PURE__ */ React10.createElement("svg", {
|
|
667
630
|
viewBox: "0 0 24 24"
|
|
668
|
-
}, React10.createElement("path", {
|
|
631
|
+
}, /* @__PURE__ */ React10.createElement("path", {
|
|
669
632
|
fill: "none",
|
|
670
633
|
stroke,
|
|
671
634
|
strokeLinecap: "round",
|
|
@@ -679,9 +642,9 @@ import React11 from "react";
|
|
|
679
642
|
function FilePlus({ theme = "light", active }) {
|
|
680
643
|
const config = themes[theme];
|
|
681
644
|
const stroke = active ? config.activeColor : config.color;
|
|
682
|
-
return React11.createElement("svg", {
|
|
645
|
+
return /* @__PURE__ */ React11.createElement("svg", {
|
|
683
646
|
viewBox: "0 0 24 24"
|
|
684
|
-
}, React11.createElement("path", {
|
|
647
|
+
}, /* @__PURE__ */ React11.createElement("path", {
|
|
685
648
|
fill: stroke,
|
|
686
649
|
d: "M12 7.5a.5.5 0 0 1 .09.992L12 8.5H8a1.5 1.5 0 0 0-1.493 1.356L6.5 10v6a1.5 1.5 0 0 0 1.356 1.493L8 17.5h6a1.5 1.5 0 0 0 1.493-1.356L15.5 16v-4a.5.5 0 0 1 .992-.09l.008.09v4a2.5 2.5 0 0 1-2.336 2.495L14 18.5H8a2.5 2.5 0 0 1-2.495-2.336L5.5 16v-6a2.5 2.5 0 0 1 2.336-2.495L8 7.5h4Zm4-2a.5.5 0 0 1 .492.41L16.5 6v1.5H18a.5.5 0 0 1 .09.992L18 8.5h-1.5V10a.5.5 0 0 1-.992.09L15.5 10V8.5H14a.5.5 0 0 1-.09-.992L14 7.5h1.5V6a.5.5 0 0 1 .5-.5Z"
|
|
687
650
|
}));
|
|
@@ -698,15 +661,14 @@ function PageControl({
|
|
|
698
661
|
nextIcon,
|
|
699
662
|
nextIconDisable
|
|
700
663
|
}) {
|
|
701
|
-
const app = useFastboardApp();
|
|
702
664
|
theme = useTheme(theme);
|
|
703
665
|
const { t } = useTranslation();
|
|
704
666
|
const writable = useWritable();
|
|
705
|
-
const _a = usePageControl(
|
|
667
|
+
const _a = usePageControl(), { pageIndex, pageCount } = _a, actions = __objRest(_a, ["pageIndex", "pageCount"]);
|
|
706
668
|
const disabled = !writable;
|
|
707
|
-
return React12.createElement("div", {
|
|
669
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
708
670
|
className: clsx3(name3, theme)
|
|
709
|
-
}, React12.createElement(Tippy3, {
|
|
671
|
+
}, /* @__PURE__ */ React12.createElement(Tippy3, {
|
|
710
672
|
className: "fastboard-tip",
|
|
711
673
|
content: t("prevPage"),
|
|
712
674
|
theme,
|
|
@@ -715,23 +677,23 @@ function PageControl({
|
|
|
715
677
|
delay: [1e3, 400],
|
|
716
678
|
duration: 300,
|
|
717
679
|
offset: TopOffset
|
|
718
|
-
}, React12.createElement("button", {
|
|
680
|
+
}, /* @__PURE__ */ React12.createElement("button", {
|
|
719
681
|
className: clsx3(`${name3}-btn`, "prev", theme),
|
|
720
682
|
disabled: disabled || pageIndex === 0,
|
|
721
683
|
onClick: actions.prevPage
|
|
722
|
-
}, React12.createElement(Icon, {
|
|
723
|
-
fallback: React12.createElement(ChevronLeft, {
|
|
684
|
+
}, /* @__PURE__ */ React12.createElement(Icon, {
|
|
685
|
+
fallback: /* @__PURE__ */ React12.createElement(ChevronLeft, {
|
|
724
686
|
theme
|
|
725
687
|
}),
|
|
726
688
|
src: disabled ? prevIconDisable : prevIcon,
|
|
727
689
|
alt: "[prev]"
|
|
728
|
-
}))), React12.createElement("span", {
|
|
690
|
+
}))), /* @__PURE__ */ React12.createElement("span", {
|
|
729
691
|
className: clsx3(`${name3}-page`, theme)
|
|
730
|
-
}, pageCount === 0 ? "\u2026" : pageIndex + 1), React12.createElement("span", {
|
|
692
|
+
}, pageCount === 0 ? "\u2026" : pageIndex + 1), /* @__PURE__ */ React12.createElement("span", {
|
|
731
693
|
className: clsx3(`${name3}-slash`, theme)
|
|
732
|
-
}, "/"), React12.createElement("span", {
|
|
694
|
+
}, "/"), /* @__PURE__ */ React12.createElement("span", {
|
|
733
695
|
className: clsx3(`${name3}-page-count`, theme)
|
|
734
|
-
}, pageCount), React12.createElement(Tippy3, {
|
|
696
|
+
}, pageCount), /* @__PURE__ */ React12.createElement(Tippy3, {
|
|
735
697
|
className: "fastboard-tip",
|
|
736
698
|
content: t("nextPage"),
|
|
737
699
|
theme,
|
|
@@ -740,17 +702,17 @@ function PageControl({
|
|
|
740
702
|
delay: [1e3, 400],
|
|
741
703
|
duration: 300,
|
|
742
704
|
offset: TopOffset
|
|
743
|
-
}, React12.createElement("button", {
|
|
705
|
+
}, /* @__PURE__ */ React12.createElement("button", {
|
|
744
706
|
className: clsx3(`${name3}-btn`, "next", theme),
|
|
745
707
|
disabled: disabled || pageIndex === pageCount - 1,
|
|
746
708
|
onClick: actions.nextPage
|
|
747
|
-
}, React12.createElement(Icon, {
|
|
748
|
-
fallback: React12.createElement(ChevronRight, {
|
|
709
|
+
}, /* @__PURE__ */ React12.createElement(Icon, {
|
|
710
|
+
fallback: /* @__PURE__ */ React12.createElement(ChevronRight, {
|
|
749
711
|
theme
|
|
750
712
|
}),
|
|
751
713
|
src: disabled ? nextIconDisable : nextIcon,
|
|
752
714
|
alt: "[next]"
|
|
753
|
-
}))), React12.createElement(Tippy3, {
|
|
715
|
+
}))), /* @__PURE__ */ React12.createElement(Tippy3, {
|
|
754
716
|
className: "fastboard-tip",
|
|
755
717
|
content: t("addPage"),
|
|
756
718
|
theme,
|
|
@@ -759,12 +721,12 @@ function PageControl({
|
|
|
759
721
|
delay: [1e3, 400],
|
|
760
722
|
duration: 300,
|
|
761
723
|
offset: TopOffset
|
|
762
|
-
}, React12.createElement("button", {
|
|
724
|
+
}, /* @__PURE__ */ React12.createElement("button", {
|
|
763
725
|
className: clsx3(`${name3}-btn`, "add", theme),
|
|
764
726
|
disabled,
|
|
765
727
|
onClick: actions.addPage
|
|
766
|
-
}, React12.createElement(Icon, {
|
|
767
|
-
fallback: React12.createElement(FilePlus, {
|
|
728
|
+
}, /* @__PURE__ */ React12.createElement(Icon, {
|
|
729
|
+
fallback: /* @__PURE__ */ React12.createElement(FilePlus, {
|
|
768
730
|
theme
|
|
769
731
|
}),
|
|
770
732
|
src: disabled ? addIconDisable : addIcon,
|
|
@@ -814,94 +776,56 @@ var EmptyToolbarHook = {
|
|
|
814
776
|
// src/components/Toolbar/Toolbar.tsx
|
|
815
777
|
import clsx9 from "clsx";
|
|
816
778
|
import { AnimatePresence, motion } from "framer-motion";
|
|
817
|
-
import
|
|
818
|
-
|
|
819
|
-
// src/components/Toolbar/components/assets/collapsed.png
|
|
820
|
-
var collapsed_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAB8CAYAAAAMw2JFAAAAAXNSR0IArs4c6QAAA49JREFUeF7tnLFv00AUh5/TFVYkxIDEnKFjJ/gb2CIqpUPagYXNEV2LRGk7tAiRSA0bWcC0QzowwQKuVDnCLE2KTZCMSNLkHCLalCpBkdFVMTKh8TXO+c4S16XDSb0vv/vyfE3fqwQR+ZIA4AoAdADgJ08mSVXVV9ls9nE+nzcBAAFAnweQ1Gg06gihrmEYubm5OeX4+LgBAD9Yw0iO49S63S7U6/VYq9UyCoXC2tLS0kcAwEA9VkBnIO5m7XYbJwTVanVLluWcruvfAOA7ADhhA/0Fgjfr9/tweHgYs20baZq2sbCw8HaQTqgy/wPivvKTkxN8XFPNZvMdC5lHgmAgx3EAISQhhHqGYWyGKbMviJsOC5kvBOIjcxUAWjRkHgtkSGZb07R1WjKPDeIj82cAaAatzIFBhmU2TTOXTCZfBq3ME4HQlJkKCA2ZqYJMIjN1kKAyhwYyrsyhgpwns6IoyysrK/rgQfrnqc4ExCtzrVb7tbe39yCVSr0GAFyZz2CYguANT09PwbIsaWdn5146nX4zuO+wB8EwnU5HqlQqdiKRuHNwcFDC1Zh5Iu4xWZYVU1V1eXZ29jlOhRvI0dGRVC6XP8zMzNwFgK/cQHq9HpTLZXt6evo2AFS4geDbX6lUisXj8VsA8IkbCHZlf39/Kh6P3xQg7jtHJDL826JIRCRC+gRBOCIcEY6QEhCOkBISdUQ4IhwhJSAcISUk6kjojjxaXbt0Py3jP1DCtes3ruLvVetLnenRYIgnT7OX3Y25gLgQ3gSYg3ghuIEMQ3ABOQ+COcgoCKYgfhD/Jwh+1ZE4GrdKRkJWPxhulTUSBe28ZLglMgzDHcR9N3G/BpDuHH7r4qoY+lUx6PGIoxFHQ3JHOCIcEY6QEhCOkBISdUQ4IhwhJSAcISUk6ohwxM+RyLR/RaYhLjItgpFomoxEG2kkGmvxRBPXVmPPWIypKMpD5s3X3kEh0zSfJZPJF6NmK0JrI3VHpxBCaiaTWc/n877TJtRBPMNkdrFY3Jifn8ed3njUzneYjCqIZ7xue3FxMadpGh6vu9BEEhUQr4yFQmE1yMDhRCDjyEi6JAUGGVdG6iBBZaQK4pVRluVNXdfZjsfRkHGiRGjKGBjEI+P7TCazQaqMpI1I635jtmNVRtJGpPVRg8fbtGW8EAiL6VUiyGA4vUd6TJN+0KTr0u7u7hYLGUmg0fkHBiRSVuu/AWpfZNft9vFDAAAAAElFTkSuQmCC";
|
|
779
|
+
import React43, { createContext as createContext3, useState as useState4 } from "react";
|
|
821
780
|
|
|
822
781
|
// src/components/Toolbar/components/assets/expanded.png
|
|
823
782
|
var expanded_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAB8CAYAAAAMw2JFAAAAAXNSR0IArs4c6QAAA5xJREFUeF7tnL9v00AUx5/TlRkJMSAxZ+jYCf4GtopK6dB2qBBsjshaJErboWVJpYaNLGDaIR2YYAFXqlxhlvzAJkhGJGlyDhVNSpWgyOiqBJnQ+urznW2Jy1JVVnKffv3x8yV9LxLE5CEBwFUA6ALAzyiZJFVVX21ubj7N5/MmACAAGEQBJDWbzQZCqGcYRm52dlbpdDpNAPgRNozkOE691+tBo9FItNtto1AorC0tLX0EAAzUDwvoDGS02NHREU4IarXatizLOV3XvwHAdwBweAP9BYIXGwwGcHh4mLBtG2matrGwsPB2mA5Xmf8BGf3lJycn+HRNtFqtd2HIfCEIBnIcBxBCEkKobxjGFk+ZPUFG6YQh86VAPGSuAUCbhcy+QMZktjVNW2cls28QD5k/A0CLtjJTg4zLbJpmLpVKvaStzIFAWMrMBISFzExBgsjMHIRWZm4gfmXmCnKezIqiLK+srOjDG+mfu3ooIG6Z6/X6r/39/Udzc3OvAQBX5jOYUEHwgqenp2BZlrS7u/sgnU6/Ge53wgfBMN1uV6pWq/b09PTdSqVSwtU49ERGp8myrISqqsszMzPPcSqRgRwfH0vlcvnD1NTUIgB8jQyk3+9DuVy2Jycn7wBANTIQvPsrlUqJZDJ5GwA+RQaCXSkWixPJZPKWABldOSKR8XeLIhGRCOkTBOGIcEQ4QkpAOEJKSNQR4YhwhJSAcISUkKgjTBy5fuPmNfxCNetLA/98srp25WFaxv+UpH5QnZpxEPz7/XuLnSAwzEBwFEFgmIIEgWEOQgvDBYQGhhuIXxiuIH5g/g8QP5czt0T8QFB/mHdeZXXXdr8QXEBoIJiD0EIwBQkCwQwksm0A9abD44lUl68A4ZEAkz0rDzDhiDg1JK+EI8IR4QgpAeEIKSFRR4QjwhFSAsIRUkKijsTSkdi0f8WmIS42LYKxaJqMRRtpLBpr8URTpK3GrrEYU1GUx6E3X7sHhUzTfJZKpV5cNFvBrY10NDqFEFKz2ex6Pp/3nDZhDuIaJrMPDg425ufncac3HrXzHCZjCuIar9vJZDI5TdPweN2lJpKYgLhlLBQKqzQDh4FA/MhI2ptQg/iVkTkIrYxMQdwyyrK8pet6uONxLGQMlAhLGalBXDK+z2azG6TKSFqIdNxrzNZXZSQtRDp+0eDxDmsZLwUSxvQqEWQ4nN4n3aZJLxT0uLS3t7cdhowk0Ph8gQGJNKzjvwGKWUjXcvHclAAAAABJRU5ErkJggg==";
|
|
824
783
|
|
|
825
|
-
// src/components/Toolbar/components/Mask.tsx
|
|
826
|
-
import React13, { useState as useState4, useEffect as useEffect4 } from "react";
|
|
827
|
-
import ReactDOM from "react-dom";
|
|
828
|
-
var Mask = React13.memo(({ toolbar, children }) => {
|
|
829
|
-
const [rootElement] = useState4(() => {
|
|
830
|
-
const element = document.createElement("div");
|
|
831
|
-
element.style.position = "absolute";
|
|
832
|
-
return element;
|
|
833
|
-
});
|
|
834
|
-
useEffect4(() => {
|
|
835
|
-
if (toolbar && rootElement) {
|
|
836
|
-
toolbar.appendChild(rootElement);
|
|
837
|
-
}
|
|
838
|
-
}, [rootElement, toolbar]);
|
|
839
|
-
useEffect4(() => {
|
|
840
|
-
if (rootElement && toolbar) {
|
|
841
|
-
toolbar.appendChild(rootElement);
|
|
842
|
-
const toolbarRect = toolbar.getBoundingClientRect();
|
|
843
|
-
const halfHeight = toolbarRect.height / 2 - 31;
|
|
844
|
-
rootElement.style.top = halfHeight + "px";
|
|
845
|
-
rootElement.style.left = "41px";
|
|
846
|
-
rootElement.style.width = "17px";
|
|
847
|
-
rootElement.style.height = "62px";
|
|
848
|
-
return () => {
|
|
849
|
-
toolbar.removeChild(rootElement);
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
}, [rootElement, toolbar]);
|
|
853
|
-
if (rootElement) {
|
|
854
|
-
return ReactDOM.createPortal(children, rootElement);
|
|
855
|
-
} else {
|
|
856
|
-
return null;
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
|
|
860
784
|
// src/components/Toolbar/Content.tsx
|
|
861
785
|
import clsx8 from "clsx";
|
|
862
|
-
import
|
|
786
|
+
import React42, { useCallback as useCallback10, useContext as useContext13, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
|
|
863
787
|
|
|
864
788
|
// src/components/Toolbar/components/ApplianceButtons.tsx
|
|
865
|
-
import
|
|
789
|
+
import React33, { useCallback as useCallback6, useContext as useContext4 } from "react";
|
|
866
790
|
import { ApplianceNames } from "white-web-sdk";
|
|
867
791
|
|
|
868
792
|
// src/components/Toolbar/icons/index.ts
|
|
869
793
|
import { memo } from "react";
|
|
870
794
|
|
|
871
795
|
// src/components/Toolbar/icons/Apps.tsx
|
|
872
|
-
import
|
|
796
|
+
import React13 from "react";
|
|
873
797
|
var Apps = (props) => {
|
|
874
798
|
const stroke = getStroke(props);
|
|
875
|
-
return
|
|
799
|
+
return /* @__PURE__ */ React13.createElement("svg", {
|
|
876
800
|
viewBox: "0 0 24 24"
|
|
877
|
-
},
|
|
801
|
+
}, /* @__PURE__ */ React13.createElement("g", {
|
|
878
802
|
fill: stroke
|
|
879
|
-
},
|
|
803
|
+
}, /* @__PURE__ */ React13.createElement("path", {
|
|
880
804
|
d: "M17.667 4.5h-3.334c-1.012 0-1.833.82-1.833 1.833V11.5h5.167c1.012 0 1.833-.82 1.833-1.833V6.333c0-1.012-.82-1.833-1.833-1.833Zm-3.334 1h3.334c.46 0 .833.373.833.833v3.334l-.006.104a.833.833 0 0 1-.827.729H13.5V6.333c0-.46.373-.833.833-.833Z"
|
|
881
|
-
}),
|
|
805
|
+
}), /* @__PURE__ */ React13.createElement("path", {
|
|
882
806
|
d: "M6.333 19.5A1.833 1.833 0 0 1 4.5 17.667v-3.334c0-.525.221-1 .576-1.334a1.822 1.822 0 0 1-.576-1.332V8.333c0-1.012.82-1.833 1.833-1.833H10A1.5 1.5 0 0 1 11.5 8v4.5h4.167c.962 0 1.75.74 1.827 1.683l.006.15v3.334c0 1.012-.82 1.833-1.833 1.833Zm4.167-6H6.333a.833.833 0 0 0-.827.729l-.006.104v3.334c0 .46.373.833.833.833H10.5v-5Zm5.167 0H11.5v5h4.167c.46 0 .833-.373.833-.833v-3.334a.833.833 0 0 0-.833-.833ZM10 7.5H6.333a.833.833 0 0 0-.833.833v3.334c0 .46.373.833.833.833H10.5V8a.5.5 0 0 0-.41-.492L10 7.5Z"
|
|
883
807
|
})));
|
|
884
808
|
};
|
|
885
809
|
|
|
886
810
|
// src/components/Toolbar/icons/Arrow.tsx
|
|
887
|
-
import
|
|
811
|
+
import React14 from "react";
|
|
888
812
|
var Arrow = (props) => {
|
|
889
813
|
const stroke = getStroke(props);
|
|
890
|
-
return
|
|
814
|
+
return /* @__PURE__ */ React14.createElement("svg", {
|
|
891
815
|
viewBox: "0 0 24 24"
|
|
892
|
-
},
|
|
816
|
+
}, /* @__PURE__ */ React14.createElement("path", {
|
|
893
817
|
fill: stroke,
|
|
894
818
|
d: "M19 5v6l-2.647-2.646L5.99 18.718l-.708-.708L15.645 7.646 13 5h6Z"
|
|
895
819
|
}));
|
|
896
820
|
};
|
|
897
821
|
|
|
898
822
|
// src/components/Toolbar/icons/Circle.tsx
|
|
899
|
-
import
|
|
823
|
+
import React15 from "react";
|
|
900
824
|
var Circle = (props) => {
|
|
901
825
|
const stroke = getStroke(props);
|
|
902
|
-
return
|
|
826
|
+
return /* @__PURE__ */ React15.createElement("svg", {
|
|
903
827
|
viewBox: "0 0 24 24"
|
|
904
|
-
},
|
|
828
|
+
}, /* @__PURE__ */ React15.createElement("rect", {
|
|
905
829
|
width: "15",
|
|
906
830
|
height: "15",
|
|
907
831
|
x: "4.5",
|
|
@@ -913,40 +837,40 @@ var Circle = (props) => {
|
|
|
913
837
|
};
|
|
914
838
|
|
|
915
839
|
// src/components/Toolbar/icons/Clean.tsx
|
|
916
|
-
import
|
|
840
|
+
import React16 from "react";
|
|
917
841
|
var Clean = (props) => {
|
|
918
842
|
const stroke = getStroke(props);
|
|
919
|
-
return
|
|
843
|
+
return /* @__PURE__ */ React16.createElement("svg", {
|
|
920
844
|
viewBox: "0 0 24 24"
|
|
921
|
-
},
|
|
845
|
+
}, /* @__PURE__ */ React16.createElement("path", {
|
|
922
846
|
fill: stroke,
|
|
923
847
|
d: "M9.754 11.99c0 1.856-.711 3.62-1.96 4.951l-.151.155h1.403l.855-.853h.707l.853.853h2.635l.094-.064a6.237 6.237 0 0 0 2.559-4.781l.005-.26h1a7.237 7.237 0 0 1-2.994 5.862l-.229.16-.277.083h-3l-.353-.146-.647-.647-.646.647-.354.146h-3l-.286-.91.214-.148a6.237 6.237 0 0 0 2.567-4.787l.005-.26h1Zm4.772-6.502v2l.35.039a2.98 2.98 0 0 1 2.644 2.78l.006.181h-8a2.98 2.98 0 0 1 2.65-2.961l.35-.039v-2h2Z"
|
|
924
848
|
}));
|
|
925
849
|
};
|
|
926
850
|
|
|
927
851
|
// src/components/Toolbar/icons/Clicker.tsx
|
|
928
|
-
import
|
|
852
|
+
import React17 from "react";
|
|
929
853
|
var Clicker = (props) => {
|
|
930
854
|
const stroke = getStroke(props);
|
|
931
|
-
return
|
|
855
|
+
return /* @__PURE__ */ React17.createElement("svg", {
|
|
932
856
|
viewBox: "0 0 24 24"
|
|
933
|
-
},
|
|
857
|
+
}, /* @__PURE__ */ React17.createElement("g", {
|
|
934
858
|
fill: "none"
|
|
935
|
-
},
|
|
859
|
+
}, /* @__PURE__ */ React17.createElement("path", {
|
|
936
860
|
d: "M0 0h24v24H0z"
|
|
937
|
-
}),
|
|
861
|
+
}), /* @__PURE__ */ React17.createElement("path", {
|
|
938
862
|
fill: stroke,
|
|
939
863
|
d: "m7 5.072 10.33 7.892-4.879.549 3.232 5.598-.866.5-3.233-5.597-2.914 3.95L7 5.072Z"
|
|
940
864
|
})));
|
|
941
865
|
};
|
|
942
866
|
|
|
943
867
|
// src/components/Toolbar/icons/Collapse.tsx
|
|
944
|
-
import
|
|
868
|
+
import React18 from "react";
|
|
945
869
|
var Collapse = (props) => {
|
|
946
870
|
const stroke = getStroke(props);
|
|
947
|
-
return
|
|
871
|
+
return /* @__PURE__ */ React18.createElement("svg", {
|
|
948
872
|
viewBox: "0 0 24 24"
|
|
949
|
-
},
|
|
873
|
+
}, /* @__PURE__ */ React18.createElement("path", {
|
|
950
874
|
fill: "none",
|
|
951
875
|
stroke,
|
|
952
876
|
d: "m8 10-2 2 2 2m10-8H6m12 12H6m12-4h-8m8-4h-8"
|
|
@@ -954,12 +878,12 @@ var Collapse = (props) => {
|
|
|
954
878
|
};
|
|
955
879
|
|
|
956
880
|
// src/components/Toolbar/icons/Diamond.tsx
|
|
957
|
-
import
|
|
881
|
+
import React19 from "react";
|
|
958
882
|
var Diamond = (props) => {
|
|
959
883
|
const stroke = getStroke(props);
|
|
960
|
-
return
|
|
884
|
+
return /* @__PURE__ */ React19.createElement("svg", {
|
|
961
885
|
viewBox: "0 0 24 24"
|
|
962
|
-
},
|
|
886
|
+
}, /* @__PURE__ */ React19.createElement("path", {
|
|
963
887
|
fill: "none",
|
|
964
888
|
stroke,
|
|
965
889
|
d: "M4.222 12 12 4.222 19.778 12 12 19.778z"
|
|
@@ -967,12 +891,12 @@ var Diamond = (props) => {
|
|
|
967
891
|
};
|
|
968
892
|
|
|
969
893
|
// src/components/Toolbar/icons/Down.tsx
|
|
970
|
-
import
|
|
894
|
+
import React20 from "react";
|
|
971
895
|
var Down = (props) => {
|
|
972
896
|
const stroke = getStroke(props);
|
|
973
|
-
return
|
|
897
|
+
return /* @__PURE__ */ React20.createElement("svg", {
|
|
974
898
|
viewBox: "0 0 24 24"
|
|
975
|
-
},
|
|
899
|
+
}, /* @__PURE__ */ React20.createElement("path", {
|
|
976
900
|
fill: "none",
|
|
977
901
|
stroke,
|
|
978
902
|
d: "m16 13-2 2-2 2-2-2-2-2m8-6-2 2-2 2-2-2-2-2"
|
|
@@ -980,24 +904,24 @@ var Down = (props) => {
|
|
|
980
904
|
};
|
|
981
905
|
|
|
982
906
|
// src/components/Toolbar/icons/Eraser.tsx
|
|
983
|
-
import
|
|
907
|
+
import React21 from "react";
|
|
984
908
|
var Eraser = (props) => {
|
|
985
909
|
const stroke = getStroke(props);
|
|
986
|
-
return
|
|
910
|
+
return /* @__PURE__ */ React21.createElement("svg", {
|
|
987
911
|
viewBox: "0 0 24 24"
|
|
988
|
-
},
|
|
912
|
+
}, /* @__PURE__ */ React21.createElement("path", {
|
|
989
913
|
fill: stroke,
|
|
990
914
|
d: "m14.333 5.183.165.007c.494.037.978.245 1.356.623l2.333 2.333a2.15 2.15 0 0 1 0 3.04l-5.833 5.834a3.8 3.8 0 0 1-5.374 0l-1.167-1.166a2.15 2.15 0 0 1 0-3.04l7-7c.42-.42.97-.63 1.52-.63ZM11.52 8.52l-4.999 5a1.15 1.15 0 0 0 0 1.626l1.167 1.167a2.8 2.8 0 0 0 3.96 0l3.832-3.833-3.96-3.96Z"
|
|
991
915
|
}));
|
|
992
916
|
};
|
|
993
917
|
|
|
994
918
|
// src/components/Toolbar/icons/Expand.tsx
|
|
995
|
-
import
|
|
919
|
+
import React22 from "react";
|
|
996
920
|
var Expand = (props) => {
|
|
997
921
|
const stroke = getStroke(props);
|
|
998
|
-
return
|
|
922
|
+
return /* @__PURE__ */ React22.createElement("svg", {
|
|
999
923
|
viewBox: "0 0 24 24"
|
|
1000
|
-
},
|
|
924
|
+
}, /* @__PURE__ */ React22.createElement("path", {
|
|
1001
925
|
fill: "none",
|
|
1002
926
|
stroke,
|
|
1003
927
|
d: "m16 10 2 2-2 2M6 6h12M6 18h12M6 14h8m-8-4h8"
|
|
@@ -1005,36 +929,36 @@ var Expand = (props) => {
|
|
|
1005
929
|
};
|
|
1006
930
|
|
|
1007
931
|
// src/components/Toolbar/icons/Line.tsx
|
|
1008
|
-
import
|
|
932
|
+
import React23 from "react";
|
|
1009
933
|
var Line = (props) => {
|
|
1010
934
|
const stroke = getStroke(props);
|
|
1011
|
-
return
|
|
935
|
+
return /* @__PURE__ */ React23.createElement("svg", {
|
|
1012
936
|
viewBox: "0 0 24 24"
|
|
1013
|
-
},
|
|
937
|
+
}, /* @__PURE__ */ React23.createElement("path", {
|
|
1014
938
|
fill: stroke,
|
|
1015
939
|
d: "m18.01 5.282.708.708L5.99 18.718l-.708-.708z"
|
|
1016
940
|
}));
|
|
1017
941
|
};
|
|
1018
942
|
|
|
1019
943
|
// src/components/Toolbar/icons/Pencil.tsx
|
|
1020
|
-
import
|
|
944
|
+
import React24 from "react";
|
|
1021
945
|
var Pencil = (props) => {
|
|
1022
946
|
const stroke = getStroke(props);
|
|
1023
|
-
return
|
|
947
|
+
return /* @__PURE__ */ React24.createElement("svg", {
|
|
1024
948
|
viewBox: "0 0 24 24"
|
|
1025
|
-
},
|
|
949
|
+
}, /* @__PURE__ */ React24.createElement("path", {
|
|
1026
950
|
fill: stroke,
|
|
1027
951
|
d: "m17.497 4.84.116.105 1.442 1.442a1.52 1.52 0 0 1 .104 2.034l-.104.116L8.733 18.858l-4.347.756.756-4.347L15.463 4.945a1.52 1.52 0 0 1 2.034-.104ZM5.967 16.349l-.353 2.037 2.037-.354-1.683-1.683Zm8.407-8.901-7.946 7.946 2.178 2.178 7.946-7.946-2.178-2.178Zm-.728 2.2.708.707-5 5-.708-.708 5-5Zm2.596-4.055-.072.06-1.09 1.088 2.179 2.178 1.089-1.088a.52.52 0 0 0 .105-.584l-.045-.08-.06-.072-1.442-1.442a.52.52 0 0 0-.664-.06Z"
|
|
1028
952
|
}));
|
|
1029
953
|
};
|
|
1030
954
|
|
|
1031
955
|
// src/components/Toolbar/icons/Rectangle.tsx
|
|
1032
|
-
import
|
|
956
|
+
import React25 from "react";
|
|
1033
957
|
var Rectangle = (props) => {
|
|
1034
958
|
const stroke = getStroke(props);
|
|
1035
|
-
return
|
|
959
|
+
return /* @__PURE__ */ React25.createElement("svg", {
|
|
1036
960
|
viewBox: "0 0 24 24"
|
|
1037
|
-
},
|
|
961
|
+
}, /* @__PURE__ */ React25.createElement("path", {
|
|
1038
962
|
fill: "none",
|
|
1039
963
|
stroke,
|
|
1040
964
|
d: "M5.5 5.5h13v13h-13z"
|
|
@@ -1042,24 +966,24 @@ var Rectangle = (props) => {
|
|
|
1042
966
|
};
|
|
1043
967
|
|
|
1044
968
|
// src/components/Toolbar/icons/Selector.tsx
|
|
1045
|
-
import
|
|
969
|
+
import React26 from "react";
|
|
1046
970
|
var Selector = (props) => {
|
|
1047
971
|
const stroke = getStroke(props);
|
|
1048
|
-
return
|
|
972
|
+
return /* @__PURE__ */ React26.createElement("svg", {
|
|
1049
973
|
viewBox: "0 0 24 24"
|
|
1050
|
-
},
|
|
974
|
+
}, /* @__PURE__ */ React26.createElement("path", {
|
|
1051
975
|
fill: stroke,
|
|
1052
976
|
d: "m12 12 8 2.667-3.556 1.777L14.667 20 12 12Zm3-8v7.5h-1V5H5v9h6.5v1H4V4h11Z"
|
|
1053
977
|
}));
|
|
1054
978
|
};
|
|
1055
979
|
|
|
1056
980
|
// src/components/Toolbar/icons/SpeechBalloon.tsx
|
|
1057
|
-
import
|
|
981
|
+
import React27 from "react";
|
|
1058
982
|
var SpeechBalloon = (props) => {
|
|
1059
983
|
const stroke = getStroke(props);
|
|
1060
|
-
return
|
|
984
|
+
return /* @__PURE__ */ React27.createElement("svg", {
|
|
1061
985
|
viewBox: "0 0 24 24"
|
|
1062
|
-
},
|
|
986
|
+
}, /* @__PURE__ */ React27.createElement("path", {
|
|
1063
987
|
fill: "none",
|
|
1064
988
|
stroke,
|
|
1065
989
|
d: "M17 4.5c.414 0 .79.168 1.06.44.272.27.44.646.44 1.06v9c0 .414-.168.79-.44 1.06a1.49 1.49 0 0 1-1.06.44h-4.207l-2.715 2.715-1.81-2.715H7a1.49 1.49 0 0 1-1.06-.44A1.495 1.495 0 0 1 5.5 15V6c0-.414.168-.79.44-1.06A1.49 1.49 0 0 1 7 4.5Z"
|
|
@@ -1067,12 +991,12 @@ var SpeechBalloon = (props) => {
|
|
|
1067
991
|
};
|
|
1068
992
|
|
|
1069
993
|
// src/components/Toolbar/icons/Star.tsx
|
|
1070
|
-
import
|
|
994
|
+
import React28 from "react";
|
|
1071
995
|
var Star = (props) => {
|
|
1072
996
|
const stroke = getStroke(props);
|
|
1073
|
-
return
|
|
997
|
+
return /* @__PURE__ */ React28.createElement("svg", {
|
|
1074
998
|
viewBox: "0 0 24 24"
|
|
1075
|
-
},
|
|
999
|
+
}, /* @__PURE__ */ React28.createElement("path", {
|
|
1076
1000
|
fill: "none",
|
|
1077
1001
|
stroke,
|
|
1078
1002
|
d: "m12 3.523 1.993 5.734 6.07.123-4.838 3.668 1.758 5.81L12 15.391l-4.983 3.467 1.758-5.81L3.938 9.38l6.069-.123L12 3.523Z"
|
|
@@ -1080,24 +1004,24 @@ var Star = (props) => {
|
|
|
1080
1004
|
};
|
|
1081
1005
|
|
|
1082
1006
|
// src/components/Toolbar/icons/Text.tsx
|
|
1083
|
-
import
|
|
1007
|
+
import React29 from "react";
|
|
1084
1008
|
var Text = (props) => {
|
|
1085
1009
|
const stroke = getStroke(props);
|
|
1086
|
-
return
|
|
1010
|
+
return /* @__PURE__ */ React29.createElement("svg", {
|
|
1087
1011
|
viewBox: "0 0 24 24"
|
|
1088
|
-
},
|
|
1012
|
+
}, /* @__PURE__ */ React29.createElement("path", {
|
|
1089
1013
|
fill: stroke,
|
|
1090
1014
|
d: "M18.5 5.5V8h-1V6.5H13v11h2v1H9v-1h2v-11H6.5V8h-1V5.5h13Z"
|
|
1091
1015
|
}));
|
|
1092
1016
|
};
|
|
1093
1017
|
|
|
1094
1018
|
// src/components/Toolbar/icons/Triangle.tsx
|
|
1095
|
-
import
|
|
1019
|
+
import React30 from "react";
|
|
1096
1020
|
var Triangle = (props) => {
|
|
1097
1021
|
const stroke = getStroke(props);
|
|
1098
|
-
return
|
|
1022
|
+
return /* @__PURE__ */ React30.createElement("svg", {
|
|
1099
1023
|
viewBox: "0 0 24 24"
|
|
1100
|
-
},
|
|
1024
|
+
}, /* @__PURE__ */ React30.createElement("path", {
|
|
1101
1025
|
fill: "none",
|
|
1102
1026
|
stroke,
|
|
1103
1027
|
d: "M12 6.008 19.138 18.5H4.862L12 6.008Z"
|
|
@@ -1105,12 +1029,12 @@ var Triangle = (props) => {
|
|
|
1105
1029
|
};
|
|
1106
1030
|
|
|
1107
1031
|
// src/components/Toolbar/icons/Up.tsx
|
|
1108
|
-
import
|
|
1032
|
+
import React31 from "react";
|
|
1109
1033
|
var Up = (props) => {
|
|
1110
1034
|
const stroke = getStroke(props);
|
|
1111
|
-
return
|
|
1035
|
+
return /* @__PURE__ */ React31.createElement("svg", {
|
|
1112
1036
|
viewBox: "0 0 24 24"
|
|
1113
|
-
},
|
|
1037
|
+
}, /* @__PURE__ */ React31.createElement("path", {
|
|
1114
1038
|
fill: "none",
|
|
1115
1039
|
stroke,
|
|
1116
1040
|
d: "m16 11-2-2-2-2-2 2-2 2m8 6-2-2-2-2-2 2-2 2"
|
|
@@ -1142,12 +1066,12 @@ var Icons = {
|
|
|
1142
1066
|
|
|
1143
1067
|
// src/components/Toolbar/components/Button.tsx
|
|
1144
1068
|
import clsx4 from "clsx";
|
|
1145
|
-
import
|
|
1069
|
+
import React32, { forwardRef, useContext as useContext3 } from "react";
|
|
1146
1070
|
import Tippy4 from "@tippyjs/react";
|
|
1147
1071
|
var Button = forwardRef((props, ref) => {
|
|
1148
1072
|
const { content, disabled, active, onClick, interactive, placement = "right", children } = props;
|
|
1149
1073
|
const { writable, theme } = useContext3(ToolbarContext);
|
|
1150
|
-
return
|
|
1074
|
+
return /* @__PURE__ */ React32.createElement(Tippy4, {
|
|
1151
1075
|
className: "fastboard-tip",
|
|
1152
1076
|
content,
|
|
1153
1077
|
interactive,
|
|
@@ -1157,7 +1081,7 @@ var Button = forwardRef((props, ref) => {
|
|
|
1157
1081
|
offset: placement.includes("right") ? RightOffset : void 0,
|
|
1158
1082
|
delay: [1e3, 400],
|
|
1159
1083
|
duration: 300
|
|
1160
|
-
},
|
|
1084
|
+
}, /* @__PURE__ */ React32.createElement("button", {
|
|
1161
1085
|
ref,
|
|
1162
1086
|
className: clsx4("fastboard-toolbar-btn", theme, { active }),
|
|
1163
1087
|
onClick,
|
|
@@ -1169,9 +1093,9 @@ var Button = forwardRef((props, ref) => {
|
|
|
1169
1093
|
function renderToolTip(text, hotkey) {
|
|
1170
1094
|
if (!(typeof hotkey === "string"))
|
|
1171
1095
|
return text;
|
|
1172
|
-
return
|
|
1096
|
+
return /* @__PURE__ */ React33.createElement("span", {
|
|
1173
1097
|
className: "fastboard-toolbar-tooltip"
|
|
1174
|
-
},
|
|
1098
|
+
}, /* @__PURE__ */ React33.createElement("span", null, text), /* @__PURE__ */ React33.createElement("span", {
|
|
1175
1099
|
className: "fastboard-toolbar-hotkey"
|
|
1176
1100
|
}, hotkey.toUpperCase()));
|
|
1177
1101
|
}
|
|
@@ -1185,12 +1109,12 @@ function ClickerButton() {
|
|
|
1185
1109
|
const appliance = memberState == null ? void 0 : memberState.currentApplianceName;
|
|
1186
1110
|
const active = appliance === ApplianceNames.clicker;
|
|
1187
1111
|
const disabled = !writable;
|
|
1188
|
-
return
|
|
1112
|
+
return /* @__PURE__ */ React33.createElement(Button, {
|
|
1189
1113
|
content: renderToolTip(t("clicker"), shortcut),
|
|
1190
1114
|
onClick: changeAppliance,
|
|
1191
1115
|
active
|
|
1192
|
-
},
|
|
1193
|
-
fallback:
|
|
1116
|
+
}, /* @__PURE__ */ React33.createElement(Icon, {
|
|
1117
|
+
fallback: /* @__PURE__ */ React33.createElement(Icons.Clicker, {
|
|
1194
1118
|
theme,
|
|
1195
1119
|
active
|
|
1196
1120
|
}),
|
|
@@ -1207,12 +1131,12 @@ function SelectorButton() {
|
|
|
1207
1131
|
const active = appliance === ApplianceNames.selector;
|
|
1208
1132
|
const disabled = !writable;
|
|
1209
1133
|
const shortcut = (app.hotKeys || defaultHotKeys).changeToSelector;
|
|
1210
|
-
return
|
|
1134
|
+
return /* @__PURE__ */ React33.createElement(Button, {
|
|
1211
1135
|
content: renderToolTip(t("selector"), shortcut),
|
|
1212
1136
|
onClick: changeAppliance,
|
|
1213
1137
|
active
|
|
1214
|
-
},
|
|
1215
|
-
fallback:
|
|
1138
|
+
}, /* @__PURE__ */ React33.createElement(Icon, {
|
|
1139
|
+
fallback: /* @__PURE__ */ React33.createElement(Icons.Selector, {
|
|
1216
1140
|
theme,
|
|
1217
1141
|
active
|
|
1218
1142
|
}),
|
|
@@ -1229,12 +1153,12 @@ function EraserButton() {
|
|
|
1229
1153
|
const active = appliance === ApplianceNames.eraser;
|
|
1230
1154
|
const disabled = !writable;
|
|
1231
1155
|
const shortcut = ((app == null ? void 0 : app.hotKeys) || defaultHotKeys).changeToEraser;
|
|
1232
|
-
return
|
|
1156
|
+
return /* @__PURE__ */ React33.createElement(Button, {
|
|
1233
1157
|
content: renderToolTip(t("eraser"), shortcut),
|
|
1234
1158
|
onClick: changeAppliance,
|
|
1235
1159
|
active
|
|
1236
|
-
},
|
|
1237
|
-
fallback:
|
|
1160
|
+
}, /* @__PURE__ */ React33.createElement(Icon, {
|
|
1161
|
+
fallback: /* @__PURE__ */ React33.createElement(Icons.Eraser, {
|
|
1238
1162
|
theme,
|
|
1239
1163
|
active
|
|
1240
1164
|
}),
|
|
@@ -1246,11 +1170,11 @@ function CleanButton() {
|
|
|
1246
1170
|
const { t } = useTranslation();
|
|
1247
1171
|
const { theme, icons, writable, cleanCurrentScene } = useContext4(ToolbarContext);
|
|
1248
1172
|
const disabled = !writable;
|
|
1249
|
-
return
|
|
1173
|
+
return /* @__PURE__ */ React33.createElement(Button, {
|
|
1250
1174
|
content: t("clean"),
|
|
1251
1175
|
onClick: cleanCurrentScene
|
|
1252
|
-
},
|
|
1253
|
-
fallback:
|
|
1176
|
+
}, /* @__PURE__ */ React33.createElement(Icon, {
|
|
1177
|
+
fallback: /* @__PURE__ */ React33.createElement(Icons.Clean, {
|
|
1254
1178
|
theme
|
|
1255
1179
|
}),
|
|
1256
1180
|
src: disabled ? icons == null ? void 0 : icons.cleanIconDisable : icons == null ? void 0 : icons.cleanIcon,
|
|
@@ -1260,7 +1184,7 @@ function CleanButton() {
|
|
|
1260
1184
|
|
|
1261
1185
|
// src/components/Toolbar/components/AppsButton.tsx
|
|
1262
1186
|
import Tippy5 from "@tippyjs/react";
|
|
1263
|
-
import
|
|
1187
|
+
import React34, { useContext as useContext5 } from "react";
|
|
1264
1188
|
|
|
1265
1189
|
// src/components/Toolbar/components/assets/vscode.png
|
|
1266
1190
|
var vscode_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAAXNSR0IArs4c6QAABnxJREFUWMPtWWlsVFUUPve+ZTY6HUoLpS1tEUrLVooKLgWVTQGVfRWhiUpAECGGEgOJShRj9I9EjSEQIMhSBIKBQoBgQCMEKEuo1LKV7rRl2pm201nf3Hv8MdNKO/NmBqWFGE7Oj8nkzb3f+8653zn3DEFEePyMwmNpT2D9D2CJnb1BpcWx/WKdTYoZ01f/SpKoE0kkvyKdehKL7jat++WapalZlOS4wS+aNGRiMp2QLHWTySODde5Ow/r8YpvDCZxRgj2HjCKEAqHdZJiYIk5KEYwa2tWwjhXVfn3iptujACIwhQLEZWYT0oqDUINExvcRJqeKsTraRbDyCiq/P3Wbcw4AiByYVwCMzRz1Dyz/5kQn0rHJ4tsDRG37nHvIKY+Im34v3XGuDDm2fuODhoiAAU/bPSz/Dnq8fFmmprMEQmH8q+M3t54t9TLOEH3OETkCB1ALCnJ+slzpLIFwetj6I8Uni+ugfVYQBB9TIZLFw7FTYDU7ldwDf14st0Dg5oiICIAMgaiGPmI5vWF2SQJ5KkYTFpPZ5vpwb+H12iYIRkgrWxDiZGEkKs8Rfzhv3n7FQgnJyeq+ZESsJKimYIXFsXzXlSqrXe0B3prqXJ2tgBgGpLzC8IvTdVsKGrwK83i8mwsaVuRXm+1K0OWKa5rf2XGp3NLSluCBzgGMBu26qcM1oogIQR3Cwvr8dO3P1xoZIgPCgDDEP8ptc/ZWnKvsyMf50obFOy/fa3KELCJkcKJp9+LscYMTfaypeRhYR240ImfY3u7ZXEsPVW0qqGetdB+7VvNB3lVri4txVHMEMm9E8racEUkxegTg4BOLoB4O1ursXoTQQJ49infjWfPy/Kp6u5J3vnTNvit2hxPVLUqn+WrG0LWTMrSS0Hbc1KjiEE4g5g+LkQW6/lStx8sChe90ie2Nantz1U2ueECQgApAKZAOqUzS46O+nZPVN9bQQQVUpSsSgZg5xGTS0dzjdXaXO3ABq5NDj77YWAPORqAiUBGoQNqQETrr2T5rJ6YbNB1X5qAKC8MG0Wfj+hk3T02MNmgYQjAnPDoBoxM483KmcKYwzhiCTitvmD5kw9TBgZh8sEJ4pE3zM4n6n2b0iTeqyinqTBjXD4Gi4kHG+sXq894dOevpJNUwqahD0OCGKtXpcdq8OSmpMVpVTRJkHteP64zTshL2L83O6G0MsZoK8X5/wJrIFDCXoNIdZJ2aNIEpiZu6Iw3TjISoPwgPwtb12uaZP565VduE5hLusnGE4M7xwDXrtF13iu85Q2F6KEEsKLPM23zhbpOLUYkTEevLuN3qa1CCGOe3zM4Ze8rzCi2qHUzkGq8G63hR7YJtF+/ZnAwIJwKnIicSWiq5zRxicZvLs/pYde7xGruHBUQaWAiPhK28CxVLdl5usbv8QUJAQjkVUJCwqcbotSKQEAHdfbVhys7SEos7IIjqFsBYR1jbzpSu3l/oVrztmSBABE7lcZmpv60Y+eWrCYIg+LvhYMiK6hyTd5QeLGqMMIbh28DP8os8jAVSKIli7oQBK8b2FyjJGa4zaYWVR+863YpaajY63O8frrxQ7fhkTLxOom0C8S9nENOzkgBIu9dHiI/W57333KrxaQL1F5mpA007ZiZH6WTVaCIwxrdcrJ+ys6TM6ob/eBK/mZW58PkU9PW6AEjIy+k9T6waPTottsOTL6V2Ozg/tZdRGwIZ53i5qmXClr+OFJlDXuMiuL5yxA1Hizf+elugZOXY/rmvpYdomu9Y3DP3lJZZXSEuXOB1U2SJaUMJISrSgYULoyO6VRdWN8qCkBEfFTYPamzKnL1lhTWO4BKEjCgewpWEAcMIJWqX3qJF0RHJaWaiKRJMANA7Sjq0oG92ahQCCZo3vr4UH1apjty668R9c1PeHGhiAB3KOSJy7t9YFVbnjd0MsrBterJJK2y9VH//67d95AhqNzKJduaQUhbId68nrhnVixDappX+e75/OhJU4smMNE3nDikpIevH9Y7RCx+fuMsY950pisB9oDrKANVLdPYA6aMsuStmpytf6BmrF5cdrnZ7FETgiAQA4b4oEmqUydw0MWeQHG8Qum6ku2BYTA+d+Na+ima7AzgIiIgEAIBSk4YszJAWDZRjtF0+pPSPTytapu0qMVuaJYEkpA/rqSc5GeL8DNmkoY9y0gwAN+tdn542W6HbvEGG2WmSQXoMBuBP/lx5Auuxs78BCY9M0wbXBY0AAAAASUVORK5CYII=";
|
|
@@ -1275,19 +1199,19 @@ var countdown_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyC
|
|
|
1275
1199
|
function AppsButton({ content, onClick }) {
|
|
1276
1200
|
const { theme, icons, writable } = useContext5(ToolbarContext);
|
|
1277
1201
|
const disabled = !writable;
|
|
1278
|
-
const button =
|
|
1202
|
+
const button = /* @__PURE__ */ React34.createElement(Button, {
|
|
1279
1203
|
content: "Apps",
|
|
1280
1204
|
onClick
|
|
1281
|
-
},
|
|
1282
|
-
fallback:
|
|
1205
|
+
}, /* @__PURE__ */ React34.createElement(Icon, {
|
|
1206
|
+
fallback: /* @__PURE__ */ React34.createElement(Icons.Apps, {
|
|
1283
1207
|
theme
|
|
1284
1208
|
}),
|
|
1285
1209
|
src: disabled ? icons == null ? void 0 : icons.appsIconDisable : icons == null ? void 0 : icons.appsIcon,
|
|
1286
1210
|
alt: "[apps]"
|
|
1287
1211
|
}));
|
|
1288
|
-
return content === false ? button :
|
|
1212
|
+
return content === false ? button : /* @__PURE__ */ React34.createElement("span", {
|
|
1289
1213
|
className: "fastboard-toolbar-btn-interactive"
|
|
1290
|
-
},
|
|
1214
|
+
}, /* @__PURE__ */ React34.createElement(Tippy5, {
|
|
1291
1215
|
className: "fastboard-tip",
|
|
1292
1216
|
content: renderAppsButtonContent(content),
|
|
1293
1217
|
theme,
|
|
@@ -1299,25 +1223,25 @@ function AppsButton({ content, onClick }) {
|
|
|
1299
1223
|
}, button));
|
|
1300
1224
|
}
|
|
1301
1225
|
function renderAppsButtonContent(content) {
|
|
1302
|
-
return
|
|
1226
|
+
return /* @__PURE__ */ React34.createElement("div", {
|
|
1303
1227
|
className: "fastboard-toolbar-panel apps"
|
|
1304
|
-
},
|
|
1228
|
+
}, /* @__PURE__ */ React34.createElement("div", {
|
|
1305
1229
|
className: "fastboard-toolbar-apps"
|
|
1306
|
-
}, content ||
|
|
1230
|
+
}, content || /* @__PURE__ */ React34.createElement(DefaultApps, null)));
|
|
1307
1231
|
}
|
|
1308
1232
|
function DefaultApps() {
|
|
1309
1233
|
const app = useFastboardApp();
|
|
1310
|
-
return
|
|
1234
|
+
return /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(AppIcon, {
|
|
1311
1235
|
title: "Code Editor",
|
|
1312
1236
|
src: vscode_default,
|
|
1313
1237
|
alt: "[code editor]",
|
|
1314
1238
|
onClick: app == null ? void 0 : app.insertCodeEditor.bind(app)
|
|
1315
|
-
}),
|
|
1239
|
+
}), /* @__PURE__ */ React34.createElement(AppIcon, {
|
|
1316
1240
|
title: "GeoGebra",
|
|
1317
1241
|
src: geogebra_default,
|
|
1318
1242
|
alt: "[geogebra]",
|
|
1319
1243
|
onClick: app == null ? void 0 : app.insertGeoGebra.bind(app)
|
|
1320
|
-
}),
|
|
1244
|
+
}), /* @__PURE__ */ React34.createElement(AppIcon, {
|
|
1321
1245
|
title: "Countdown",
|
|
1322
1246
|
src: countdown_default,
|
|
1323
1247
|
alt: "[countdown]",
|
|
@@ -1325,29 +1249,29 @@ function DefaultApps() {
|
|
|
1325
1249
|
}));
|
|
1326
1250
|
}
|
|
1327
1251
|
function AppIcon({ title, src, alt, onClick }) {
|
|
1328
|
-
return
|
|
1252
|
+
return /* @__PURE__ */ React34.createElement("span", {
|
|
1329
1253
|
className: "fastboard-toolbar-app-icon"
|
|
1330
|
-
},
|
|
1254
|
+
}, /* @__PURE__ */ React34.createElement(Button, {
|
|
1331
1255
|
placement: "top",
|
|
1332
1256
|
content: title,
|
|
1333
1257
|
onClick
|
|
1334
|
-
},
|
|
1258
|
+
}, /* @__PURE__ */ React34.createElement("img", {
|
|
1335
1259
|
src,
|
|
1336
1260
|
alt,
|
|
1337
1261
|
title
|
|
1338
|
-
})),
|
|
1262
|
+
})), /* @__PURE__ */ React34.createElement("span", {
|
|
1339
1263
|
className: "fastboard-toolbar-app-icon-text"
|
|
1340
1264
|
}, title));
|
|
1341
1265
|
}
|
|
1342
1266
|
|
|
1343
1267
|
// src/components/Toolbar/components/PencilButton.tsx
|
|
1344
1268
|
import Tippy6 from "@tippyjs/react";
|
|
1345
|
-
import
|
|
1269
|
+
import React38, { useCallback as useCallback7, useContext as useContext9 } from "react";
|
|
1346
1270
|
import { ApplianceNames as ApplianceNames2 } from "white-web-sdk";
|
|
1347
1271
|
|
|
1348
1272
|
// src/components/Toolbar/components/ColorBox.tsx
|
|
1349
1273
|
import clsx5 from "clsx";
|
|
1350
|
-
import
|
|
1274
|
+
import React35, { useContext as useContext6 } from "react";
|
|
1351
1275
|
var colors = {
|
|
1352
1276
|
"#E02020": [224, 32, 32],
|
|
1353
1277
|
"#F7B500": [247, 181, 0],
|
|
@@ -1363,17 +1287,17 @@ function ColorBox() {
|
|
|
1363
1287
|
const { theme, memberState, setStrokeColor, writable } = useContext6(ToolbarContext);
|
|
1364
1288
|
const strokeColor = memberState == null ? void 0 : memberState.strokeColor;
|
|
1365
1289
|
const disabled = !writable;
|
|
1366
|
-
return
|
|
1290
|
+
return /* @__PURE__ */ React35.createElement("div", {
|
|
1367
1291
|
className: clsx5("fastboard-toolbar-color-box", theme)
|
|
1368
|
-
}, colorKeys.map((key) =>
|
|
1292
|
+
}, colorKeys.map((key) => /* @__PURE__ */ React35.createElement("div", {
|
|
1369
1293
|
key,
|
|
1370
1294
|
className: clsx5("fastboard-toolbar-color-item", theme),
|
|
1371
1295
|
onClick: () => setStrokeColor(colors[key])
|
|
1372
|
-
},
|
|
1296
|
+
}, /* @__PURE__ */ React35.createElement("div", {
|
|
1373
1297
|
className: clsx5("fastboard-toolbar-color-border", theme, {
|
|
1374
1298
|
active: strokeColor && isEqualArray(strokeColor, colors[key])
|
|
1375
1299
|
})
|
|
1376
|
-
},
|
|
1300
|
+
}, /* @__PURE__ */ React35.createElement("button", {
|
|
1377
1301
|
className: clsx5("fastboard-toolbar-color-btn"),
|
|
1378
1302
|
style: { background: key },
|
|
1379
1303
|
disabled,
|
|
@@ -1386,10 +1310,10 @@ function ColorBox() {
|
|
|
1386
1310
|
|
|
1387
1311
|
// src/components/Toolbar/components/CutLine.tsx
|
|
1388
1312
|
import clsx6 from "clsx";
|
|
1389
|
-
import
|
|
1313
|
+
import React36, { useContext as useContext7 } from "react";
|
|
1390
1314
|
function CutLine() {
|
|
1391
1315
|
const { theme } = useContext7(ToolbarContext);
|
|
1392
|
-
return
|
|
1316
|
+
return /* @__PURE__ */ React36.createElement("span", {
|
|
1393
1317
|
className: clsx6(`${name4}-cut-line`, theme)
|
|
1394
1318
|
});
|
|
1395
1319
|
}
|
|
@@ -1397,12 +1321,12 @@ function CutLine() {
|
|
|
1397
1321
|
// src/components/Toolbar/components/Slider.tsx
|
|
1398
1322
|
import clsx7 from "clsx";
|
|
1399
1323
|
import RcSlider from "rc-slider";
|
|
1400
|
-
import
|
|
1324
|
+
import React37, { useContext as useContext8 } from "react";
|
|
1401
1325
|
function Slider() {
|
|
1402
1326
|
const { theme, writable, memberState, setStrokeWidth } = useContext8(ToolbarContext);
|
|
1403
1327
|
const { activeColor } = themes[theme];
|
|
1404
1328
|
const strokeWidth = (memberState == null ? void 0 : memberState.strokeWidth) || 0;
|
|
1405
|
-
return
|
|
1329
|
+
return /* @__PURE__ */ React37.createElement(RcSlider, {
|
|
1406
1330
|
disabled: !writable,
|
|
1407
1331
|
className: clsx7("fastboard-toolbar-slider", theme),
|
|
1408
1332
|
trackStyle: { background: activeColor },
|
|
@@ -1426,9 +1350,9 @@ function PencilButton() {
|
|
|
1426
1350
|
const active = appliance === ApplianceNames2.pencil;
|
|
1427
1351
|
const disabled = !writable;
|
|
1428
1352
|
const shortcut = ((app == null ? void 0 : app.hotKeys) || defaultHotKeys).changeToPencil;
|
|
1429
|
-
return
|
|
1353
|
+
return /* @__PURE__ */ React38.createElement("span", {
|
|
1430
1354
|
className: "fastboard-toolbar-btn-interactive"
|
|
1431
|
-
},
|
|
1355
|
+
}, /* @__PURE__ */ React38.createElement(Tippy6, {
|
|
1432
1356
|
className: "fastboard-tip",
|
|
1433
1357
|
content: renderPencilButtonContent(),
|
|
1434
1358
|
theme,
|
|
@@ -1437,30 +1361,30 @@ function PencilButton() {
|
|
|
1437
1361
|
offset: RightOffset,
|
|
1438
1362
|
arrow: false,
|
|
1439
1363
|
interactive: true
|
|
1440
|
-
},
|
|
1364
|
+
}, /* @__PURE__ */ React38.createElement(Button, {
|
|
1441
1365
|
content: renderToolTip(t("pencil"), shortcut),
|
|
1442
1366
|
active,
|
|
1443
1367
|
onClick: changeAppliance
|
|
1444
|
-
},
|
|
1445
|
-
fallback:
|
|
1368
|
+
}, /* @__PURE__ */ React38.createElement(Icon, {
|
|
1369
|
+
fallback: /* @__PURE__ */ React38.createElement(Icons.Pencil, {
|
|
1446
1370
|
theme,
|
|
1447
1371
|
active
|
|
1448
1372
|
}),
|
|
1449
1373
|
src: disabled ? icons == null ? void 0 : icons.pencilIconDisable : icons == null ? void 0 : icons.pencilIcon,
|
|
1450
1374
|
alt: "[pencil]"
|
|
1451
|
-
}),
|
|
1375
|
+
}), /* @__PURE__ */ React38.createElement("span", {
|
|
1452
1376
|
className: "fastboard-toolbar-triangle"
|
|
1453
1377
|
}))));
|
|
1454
1378
|
}
|
|
1455
1379
|
function renderPencilButtonContent() {
|
|
1456
|
-
return
|
|
1380
|
+
return /* @__PURE__ */ React38.createElement("div", {
|
|
1457
1381
|
className: "fastboard-toolbar-panel pencil"
|
|
1458
|
-
},
|
|
1382
|
+
}, /* @__PURE__ */ React38.createElement(Slider, null), /* @__PURE__ */ React38.createElement(CutLine, null), /* @__PURE__ */ React38.createElement(ColorBox, null));
|
|
1459
1383
|
}
|
|
1460
1384
|
|
|
1461
1385
|
// src/components/Toolbar/components/ShapesButton.tsx
|
|
1462
1386
|
import Tippy7 from "@tippyjs/react";
|
|
1463
|
-
import
|
|
1387
|
+
import React39, { useContext as useContext10 } from "react";
|
|
1464
1388
|
import { ApplianceNames as ApplianceNames4 } from "white-web-sdk";
|
|
1465
1389
|
|
|
1466
1390
|
// src/components/Toolbar/const.ts
|
|
@@ -1502,9 +1426,9 @@ function ShapesButton() {
|
|
|
1502
1426
|
const key = appliance === ApplianceNames4.shape ? shape : appliance;
|
|
1503
1427
|
const active = ShapeTypes.has(key);
|
|
1504
1428
|
const CurrentIcon = ShapesMap[key] || Icons.Rectangle;
|
|
1505
|
-
return
|
|
1429
|
+
return /* @__PURE__ */ React39.createElement("span", {
|
|
1506
1430
|
className: "fastboard-toolbar-btn-interactive"
|
|
1507
|
-
},
|
|
1431
|
+
}, /* @__PURE__ */ React39.createElement(Tippy7, {
|
|
1508
1432
|
className: "fastboard-tip",
|
|
1509
1433
|
content: renderShapesButtonContent(),
|
|
1510
1434
|
theme,
|
|
@@ -1513,31 +1437,31 @@ function ShapesButton() {
|
|
|
1513
1437
|
offset: RightOffset,
|
|
1514
1438
|
arrow: false,
|
|
1515
1439
|
interactive: true
|
|
1516
|
-
},
|
|
1440
|
+
}, /* @__PURE__ */ React39.createElement(Button, {
|
|
1517
1441
|
content: t("shape"),
|
|
1518
1442
|
active
|
|
1519
|
-
},
|
|
1443
|
+
}, /* @__PURE__ */ React39.createElement(CurrentIcon, {
|
|
1520
1444
|
theme,
|
|
1521
1445
|
active
|
|
1522
|
-
}),
|
|
1446
|
+
}), /* @__PURE__ */ React39.createElement("span", {
|
|
1523
1447
|
className: "fastboard-toolbar-triangle"
|
|
1524
1448
|
}))));
|
|
1525
1449
|
}
|
|
1526
1450
|
function renderShapesButtonContent() {
|
|
1527
|
-
return
|
|
1451
|
+
return /* @__PURE__ */ React39.createElement("div", {
|
|
1528
1452
|
className: "fastboard-toolbar-panel shapes"
|
|
1529
|
-
},
|
|
1453
|
+
}, /* @__PURE__ */ React39.createElement(ShapesBox, null), /* @__PURE__ */ React39.createElement(CutLine, null), /* @__PURE__ */ React39.createElement(Slider, null), /* @__PURE__ */ React39.createElement(CutLine, null), /* @__PURE__ */ React39.createElement(ColorBox, null));
|
|
1530
1454
|
}
|
|
1531
1455
|
function ShapesBox() {
|
|
1532
1456
|
const { t } = useTranslation();
|
|
1533
|
-
return
|
|
1457
|
+
return /* @__PURE__ */ React39.createElement("div", {
|
|
1534
1458
|
className: "fastboard-toolbar-shapes"
|
|
1535
|
-
}, ApplianceShapes.map((Appliance) =>
|
|
1459
|
+
}, ApplianceShapes.map((Appliance) => /* @__PURE__ */ React39.createElement(ApplianceShapeButton, {
|
|
1536
1460
|
key: Appliance,
|
|
1537
1461
|
content: t(Appliance),
|
|
1538
1462
|
Appliance,
|
|
1539
1463
|
Icon: ShapesMap[Appliance]
|
|
1540
|
-
})), Shapes.map((shape) =>
|
|
1464
|
+
})), Shapes.map((shape) => /* @__PURE__ */ React39.createElement(ShapeShapeButton, {
|
|
1541
1465
|
key: shape,
|
|
1542
1466
|
content: t(shape),
|
|
1543
1467
|
shape,
|
|
@@ -1548,12 +1472,12 @@ function ApplianceShapeButton({ content, Appliance, Icon: Icon2 }) {
|
|
|
1548
1472
|
const { theme, writable, setAppliance, memberState } = useContext10(ToolbarContext);
|
|
1549
1473
|
const current = memberState == null ? void 0 : memberState.currentApplianceName;
|
|
1550
1474
|
const disabled = !writable;
|
|
1551
|
-
return
|
|
1475
|
+
return /* @__PURE__ */ React39.createElement(Button, {
|
|
1552
1476
|
content,
|
|
1553
1477
|
disabled,
|
|
1554
1478
|
placement: "top",
|
|
1555
1479
|
onClick: () => setAppliance(Appliance)
|
|
1556
|
-
},
|
|
1480
|
+
}, /* @__PURE__ */ React39.createElement(Icon2, {
|
|
1557
1481
|
theme,
|
|
1558
1482
|
active: current === Appliance
|
|
1559
1483
|
}));
|
|
@@ -1563,12 +1487,12 @@ function ShapeShapeButton({ content, shape, Icon: Icon2 }) {
|
|
|
1563
1487
|
const appliance = memberState == null ? void 0 : memberState.currentApplianceName;
|
|
1564
1488
|
const current = appliance === ApplianceNames4.shape && (memberState == null ? void 0 : memberState.shapeType);
|
|
1565
1489
|
const disabled = !writable;
|
|
1566
|
-
return
|
|
1490
|
+
return /* @__PURE__ */ React39.createElement(Button, {
|
|
1567
1491
|
content,
|
|
1568
1492
|
disabled,
|
|
1569
1493
|
placement: "top",
|
|
1570
1494
|
onClick: () => setAppliance(ApplianceNames4.shape, shape)
|
|
1571
|
-
},
|
|
1495
|
+
}, /* @__PURE__ */ React39.createElement(Icon2, {
|
|
1572
1496
|
theme,
|
|
1573
1497
|
active: current === shape
|
|
1574
1498
|
}));
|
|
@@ -1576,7 +1500,7 @@ function ShapeShapeButton({ content, shape, Icon: Icon2 }) {
|
|
|
1576
1500
|
|
|
1577
1501
|
// src/components/Toolbar/components/TextButton.tsx
|
|
1578
1502
|
import Tippy8 from "@tippyjs/react";
|
|
1579
|
-
import
|
|
1503
|
+
import React40, { useCallback as useCallback8, useContext as useContext11 } from "react";
|
|
1580
1504
|
import { ApplianceNames as ApplianceNames5 } from "white-web-sdk";
|
|
1581
1505
|
function TextButton() {
|
|
1582
1506
|
const app = useFastboardApp();
|
|
@@ -1589,9 +1513,9 @@ function TextButton() {
|
|
|
1589
1513
|
const active = appliance === ApplianceNames5.text;
|
|
1590
1514
|
const disabled = !writable;
|
|
1591
1515
|
const shortcut = ((app == null ? void 0 : app.hotKeys) || defaultHotKeys).changeToText;
|
|
1592
|
-
return
|
|
1516
|
+
return /* @__PURE__ */ React40.createElement("span", {
|
|
1593
1517
|
className: "fastboard-toolbar-btn-interactive"
|
|
1594
|
-
},
|
|
1518
|
+
}, /* @__PURE__ */ React40.createElement(Tippy8, {
|
|
1595
1519
|
className: "fastboard-tip",
|
|
1596
1520
|
content: renderTextButtonContent(),
|
|
1597
1521
|
theme,
|
|
@@ -1600,53 +1524,53 @@ function TextButton() {
|
|
|
1600
1524
|
offset: RightOffset,
|
|
1601
1525
|
arrow: false,
|
|
1602
1526
|
interactive: true
|
|
1603
|
-
},
|
|
1527
|
+
}, /* @__PURE__ */ React40.createElement(Button, {
|
|
1604
1528
|
content: renderToolTip(t("text"), shortcut),
|
|
1605
1529
|
active,
|
|
1606
1530
|
onClick: changeAppliance
|
|
1607
|
-
},
|
|
1608
|
-
fallback:
|
|
1531
|
+
}, /* @__PURE__ */ React40.createElement(Icon, {
|
|
1532
|
+
fallback: /* @__PURE__ */ React40.createElement(Icons.Text, {
|
|
1609
1533
|
theme,
|
|
1610
1534
|
active
|
|
1611
1535
|
}),
|
|
1612
1536
|
src: disabled ? icons == null ? void 0 : icons.textIconDisable : icons == null ? void 0 : icons.textIcon,
|
|
1613
1537
|
alt: "[text]"
|
|
1614
|
-
}),
|
|
1538
|
+
}), /* @__PURE__ */ React40.createElement("span", {
|
|
1615
1539
|
className: "fastboard-toolbar-triangle"
|
|
1616
1540
|
}))));
|
|
1617
1541
|
}
|
|
1618
1542
|
function renderTextButtonContent() {
|
|
1619
|
-
return
|
|
1543
|
+
return /* @__PURE__ */ React40.createElement("div", {
|
|
1620
1544
|
className: "fastboard-toolbar-panel text"
|
|
1621
|
-
},
|
|
1545
|
+
}, /* @__PURE__ */ React40.createElement(ColorBox, null));
|
|
1622
1546
|
}
|
|
1623
1547
|
|
|
1624
1548
|
// src/components/Toolbar/components/UpDownButtons.tsx
|
|
1625
|
-
import
|
|
1549
|
+
import React41, { useCallback as useCallback9, useContext as useContext12 } from "react";
|
|
1626
1550
|
function UpButton({ disabled, scrollTo }) {
|
|
1627
1551
|
const { theme, icons } = useContext12(ToolbarContext);
|
|
1628
1552
|
const scrollUp = useCallback9(() => scrollTo(-ItemHeight), [scrollTo]);
|
|
1629
|
-
return
|
|
1553
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Button, {
|
|
1630
1554
|
content: "Up",
|
|
1631
1555
|
disabled,
|
|
1632
1556
|
onClick: scrollUp
|
|
1633
|
-
},
|
|
1634
|
-
fallback:
|
|
1557
|
+
}, /* @__PURE__ */ React41.createElement(Icon, {
|
|
1558
|
+
fallback: /* @__PURE__ */ React41.createElement(Icons.Up, {
|
|
1635
1559
|
theme
|
|
1636
1560
|
}),
|
|
1637
1561
|
src: disabled ? icons == null ? void 0 : icons.upIconDisable : icons == null ? void 0 : icons.upIcon,
|
|
1638
1562
|
alt: "[up]"
|
|
1639
|
-
})),
|
|
1563
|
+
})), /* @__PURE__ */ React41.createElement(CutLine, null));
|
|
1640
1564
|
}
|
|
1641
1565
|
function DownButton({ disabled, scrollTo }) {
|
|
1642
1566
|
const { theme, icons } = useContext12(ToolbarContext);
|
|
1643
1567
|
const scrollDown = useCallback9(() => scrollTo(ItemHeight), [scrollTo]);
|
|
1644
|
-
return
|
|
1568
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(CutLine, null), /* @__PURE__ */ React41.createElement(Button, {
|
|
1645
1569
|
content: "Down",
|
|
1646
1570
|
disabled,
|
|
1647
1571
|
onClick: scrollDown
|
|
1648
|
-
},
|
|
1649
|
-
fallback:
|
|
1572
|
+
}, /* @__PURE__ */ React41.createElement(Icon, {
|
|
1573
|
+
fallback: /* @__PURE__ */ React41.createElement(Icons.Down, {
|
|
1650
1574
|
theme
|
|
1651
1575
|
}),
|
|
1652
1576
|
src: disabled ? icons == null ? void 0 : icons.downIconDisable : icons == null ? void 0 : icons.downIcon,
|
|
@@ -1654,11 +1578,16 @@ function DownButton({ disabled, scrollTo }) {
|
|
|
1654
1578
|
})));
|
|
1655
1579
|
}
|
|
1656
1580
|
|
|
1581
|
+
// src/components/Toolbar/components/assets/collapsed.png
|
|
1582
|
+
var collapsed_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAB8CAYAAAAMw2JFAAAAAXNSR0IArs4c6QAAA49JREFUeF7tnLFv00AUh5/TFVYkxIDEnKFjJ/gb2CIqpUPagYXNEV2LRGk7tAiRSA0bWcC0QzowwQKuVDnCLE2KTZCMSNLkHCLalCpBkdFVMTKh8TXO+c4S16XDSb0vv/vyfE3fqwQR+ZIA4AoAdADgJ08mSVXVV9ls9nE+nzcBAAFAnweQ1Gg06gihrmEYubm5OeX4+LgBAD9Yw0iO49S63S7U6/VYq9UyCoXC2tLS0kcAwEA9VkBnIO5m7XYbJwTVanVLluWcruvfAOA7ADhhA/0Fgjfr9/tweHgYs20baZq2sbCw8HaQTqgy/wPivvKTkxN8XFPNZvMdC5lHgmAgx3EAISQhhHqGYWyGKbMviJsOC5kvBOIjcxUAWjRkHgtkSGZb07R1WjKPDeIj82cAaAatzIFBhmU2TTOXTCZfBq3ME4HQlJkKCA2ZqYJMIjN1kKAyhwYyrsyhgpwns6IoyysrK/rgQfrnqc4ExCtzrVb7tbe39yCVSr0GAFyZz2CYguANT09PwbIsaWdn5146nX4zuO+wB8EwnU5HqlQqdiKRuHNwcFDC1Zh5Iu4xWZYVU1V1eXZ29jlOhRvI0dGRVC6XP8zMzNwFgK/cQHq9HpTLZXt6evo2AFS4geDbX6lUisXj8VsA8IkbCHZlf39/Kh6P3xQg7jtHJDL826JIRCRC+gRBOCIcEY6QEhCOkBISdUQ4IhwhJSAcISUk6kjojjxaXbt0Py3jP1DCtes3ruLvVetLnenRYIgnT7OX3Y25gLgQ3gSYg3ghuIEMQ3ABOQ+COcgoCKYgfhD/Jwh+1ZE4GrdKRkJWPxhulTUSBe28ZLglMgzDHcR9N3G/BpDuHH7r4qoY+lUx6PGIoxFHQ3JHOCIcEY6QEhCOkBISdUQ4IhwhJSAcISUk6ohwxM+RyLR/RaYhLjItgpFomoxEG2kkGmvxRBPXVmPPWIypKMpD5s3X3kEh0zSfJZPJF6NmK0JrI3VHpxBCaiaTWc/n877TJtRBPMNkdrFY3Jifn8ed3njUzneYjCqIZ7xue3FxMadpGh6vu9BEEhUQr4yFQmE1yMDhRCDjyEi6JAUGGVdG6iBBZaQK4pVRluVNXdfZjsfRkHGiRGjKGBjEI+P7TCazQaqMpI1I635jtmNVRtJGpPVRg8fbtGW8EAiL6VUiyGA4vUd6TJN+0KTr0u7u7hYLGUmg0fkHBiRSVuu/AWpfZNft9vFDAAAAAElFTkSuQmCC";
|
|
1583
|
+
|
|
1657
1584
|
// src/components/Toolbar/Content.tsx
|
|
1658
|
-
|
|
1585
|
+
function Content({ onCollapse }) {
|
|
1586
|
+
const { theme, icons, writable } = useContext13(ToolbarContext);
|
|
1659
1587
|
const ref = useRef2(null);
|
|
1660
|
-
const [scrollTop, setScrollTop] =
|
|
1661
|
-
const [parentHeight, setParentHeight] =
|
|
1588
|
+
const [scrollTop, setScrollTop] = useState3(0);
|
|
1589
|
+
const [parentHeight, setParentHeight] = useState3(0);
|
|
1590
|
+
const disabled = !writable;
|
|
1662
1591
|
const needScroll = parentHeight < ItemHeight * ItemsCount + 48;
|
|
1663
1592
|
const sectionHeight = clamp(parentHeight - 48 * (needScroll ? 3 : 1), MinHeight, MaxHeight);
|
|
1664
1593
|
const scrollBuffer = Math.max(parentHeight - sectionHeight - 1, 0);
|
|
@@ -1667,12 +1596,12 @@ var Content = React43.memo(() => {
|
|
|
1667
1596
|
const scrollTo = useCallback10((height) => {
|
|
1668
1597
|
setScrollTop(clamp(scrollTop + height, 0, scrollBuffer));
|
|
1669
1598
|
}, [scrollBuffer, scrollTop]);
|
|
1670
|
-
|
|
1599
|
+
useEffect3(() => {
|
|
1671
1600
|
if (ref.current) {
|
|
1672
1601
|
ref.current.scrollTop = scrollTop;
|
|
1673
1602
|
}
|
|
1674
1603
|
}, [scrollTop]);
|
|
1675
|
-
|
|
1604
|
+
useEffect3(() => {
|
|
1676
1605
|
var _a, _b;
|
|
1677
1606
|
const container = (_b = (_a = ref.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement;
|
|
1678
1607
|
if (container) {
|
|
@@ -1685,95 +1614,82 @@ var Content = React43.memo(() => {
|
|
|
1685
1614
|
return () => resizeObserver.disconnect();
|
|
1686
1615
|
}
|
|
1687
1616
|
}, []);
|
|
1688
|
-
return
|
|
1617
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, needScroll && /* @__PURE__ */ React42.createElement(UpButton, {
|
|
1689
1618
|
scrollTo,
|
|
1690
1619
|
disabled: disableScrollUp
|
|
1691
|
-
}),
|
|
1620
|
+
}), /* @__PURE__ */ React42.createElement("div", {
|
|
1692
1621
|
ref,
|
|
1693
1622
|
className: clsx8(`${name4}-section`),
|
|
1694
1623
|
style: {
|
|
1695
1624
|
height: `${sectionHeight}px`,
|
|
1696
1625
|
overflow: needScroll ? "hidden" : "visible"
|
|
1697
1626
|
}
|
|
1698
|
-
},
|
|
1627
|
+
}, /* @__PURE__ */ React42.createElement(ClickerButton, null), /* @__PURE__ */ React42.createElement(SelectorButton, null), /* @__PURE__ */ React42.createElement(PencilButton, null), /* @__PURE__ */ React42.createElement(TextButton, null), /* @__PURE__ */ React42.createElement(ShapesButton, null), /* @__PURE__ */ React42.createElement(EraserButton, null), /* @__PURE__ */ React42.createElement(CleanButton, null), /* @__PURE__ */ React42.createElement(AppsButton, null)), needScroll && /* @__PURE__ */ React42.createElement(DownButton, {
|
|
1699
1628
|
scrollTo,
|
|
1700
1629
|
disabled: disableScrollDown
|
|
1701
|
-
})
|
|
1702
|
-
|
|
1630
|
+
}), /* @__PURE__ */ React42.createElement("div", {
|
|
1631
|
+
className: clsx8("fastboard-toolbar-mask", theme),
|
|
1632
|
+
onClick: onCollapse
|
|
1633
|
+
}, /* @__PURE__ */ React42.createElement(Icon, {
|
|
1634
|
+
fallback: /* @__PURE__ */ React42.createElement("img", {
|
|
1635
|
+
draggable: false,
|
|
1636
|
+
className: clsx8(`${name4}-mask-btn`, theme),
|
|
1637
|
+
src: collapsed_default
|
|
1638
|
+
}),
|
|
1639
|
+
src: disabled ? icons == null ? void 0 : icons.expandIconDisable : icons == null ? void 0 : icons.expandIcon
|
|
1640
|
+
})));
|
|
1641
|
+
}
|
|
1703
1642
|
|
|
1704
1643
|
// src/components/Toolbar/Toolbar.tsx
|
|
1705
1644
|
var ToolbarContext = createContext3(__spreadValues({
|
|
1706
1645
|
theme: "light"
|
|
1707
1646
|
}, EmptyToolbarHook));
|
|
1708
1647
|
var name4 = "fastboard-toolbar";
|
|
1709
|
-
|
|
1648
|
+
function Toolbar({ theme, icons }) {
|
|
1710
1649
|
theme = useTheme(theme);
|
|
1711
1650
|
const hook = useToolbar();
|
|
1712
|
-
const [expanded, setExpanded] =
|
|
1713
|
-
const [
|
|
1714
|
-
const [onHover, setOnHover] = useState6(false);
|
|
1715
|
-
const [delayedOnHover, setDelayedOnHover] = useState6(false);
|
|
1716
|
-
const [pointEvents, setPointEvents] = useState6(true);
|
|
1651
|
+
const [expanded, setExpanded] = useState4(true);
|
|
1652
|
+
const [pointerEvents, setPointerEvents] = useState4("auto");
|
|
1717
1653
|
const disabled = !hook.writable;
|
|
1718
|
-
|
|
1719
|
-
setExpanded((e) => !e);
|
|
1720
|
-
}, []);
|
|
1721
|
-
useEffect6(() => {
|
|
1722
|
-
const timer = setTimeout(() => {
|
|
1723
|
-
setDelayedOnHover(onHover);
|
|
1724
|
-
}, 400);
|
|
1725
|
-
return () => clearTimeout(timer);
|
|
1726
|
-
}, [onHover]);
|
|
1727
|
-
return React44.createElement(ToolbarContext.Provider, {
|
|
1654
|
+
return /* @__PURE__ */ React43.createElement(ToolbarContext.Provider, {
|
|
1728
1655
|
value: __spreadValues({ theme, icons }, hook)
|
|
1729
|
-
},
|
|
1730
|
-
initial: { x: -100 },
|
|
1731
|
-
animate: { x: 0, transition: { duration: 0.5 } },
|
|
1656
|
+
}, /* @__PURE__ */ React43.createElement(AnimatePresence, null, expanded ? /* @__PURE__ */ React43.createElement(motion.div, {
|
|
1732
1657
|
key: "toolbar",
|
|
1733
|
-
ref: toolbarRef,
|
|
1734
1658
|
className: clsx9(name4, theme),
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
},
|
|
1738
|
-
onMouseLeave: () => setOnHover(false),
|
|
1659
|
+
initial: { x: -100 },
|
|
1660
|
+
animate: { x: 0, transition: { duration: 0.5 } },
|
|
1739
1661
|
exit: { x: -100, transition: { duration: 0.5 } },
|
|
1740
|
-
onAnimationStart: () =>
|
|
1741
|
-
onAnimationComplete: () =>
|
|
1742
|
-
style: { pointerEvents
|
|
1743
|
-
},
|
|
1744
|
-
|
|
1745
|
-
}
|
|
1746
|
-
onClick: toggle
|
|
1747
|
-
}, React44.createElement("img", {
|
|
1748
|
-
draggable: false,
|
|
1749
|
-
className: clsx9(`${name4}-mask-btn`, theme),
|
|
1750
|
-
src: collapsed_default
|
|
1751
|
-
})))) : React44.createElement(motion.div, {
|
|
1662
|
+
onAnimationStart: () => setPointerEvents("none"),
|
|
1663
|
+
onAnimationComplete: () => setPointerEvents("auto"),
|
|
1664
|
+
style: { pointerEvents }
|
|
1665
|
+
}, /* @__PURE__ */ React43.createElement(Content, {
|
|
1666
|
+
onCollapse: () => setExpanded(false)
|
|
1667
|
+
})) : /* @__PURE__ */ React43.createElement(motion.div, {
|
|
1752
1668
|
className: clsx9(`${name4}-expand-btn`, theme),
|
|
1753
1669
|
key: "expand",
|
|
1754
|
-
onClick:
|
|
1670
|
+
onClick: () => setExpanded(true),
|
|
1755
1671
|
initial: { x: -100 },
|
|
1756
1672
|
animate: { x: 0, transition: { duration: 0.5 } }
|
|
1757
|
-
},
|
|
1758
|
-
fallback:
|
|
1673
|
+
}, /* @__PURE__ */ React43.createElement(Icon, {
|
|
1674
|
+
fallback: /* @__PURE__ */ React43.createElement("img", {
|
|
1759
1675
|
draggable: false,
|
|
1760
1676
|
src: expanded_default,
|
|
1761
1677
|
className: clsx9(`${name4}-mask-btn`, theme)
|
|
1762
1678
|
}),
|
|
1763
1679
|
src: disabled ? icons == null ? void 0 : icons.expandIconDisable : icons == null ? void 0 : icons.expandIcon
|
|
1764
1680
|
}))));
|
|
1765
|
-
}
|
|
1681
|
+
}
|
|
1766
1682
|
|
|
1767
1683
|
// src/components/PlayerControl/hooks.ts
|
|
1768
|
-
import { useCallback as
|
|
1684
|
+
import { useCallback as useCallback11, useEffect as useEffect4, useState as useState5 } from "react";
|
|
1769
1685
|
import { PlayerPhase } from "white-web-sdk";
|
|
1770
1686
|
var EMPTY_ARRAY = [];
|
|
1771
1687
|
function useForceUpdate2() {
|
|
1772
|
-
const [, forceUpdate_] =
|
|
1773
|
-
return
|
|
1688
|
+
const [, forceUpdate_] = useState5({});
|
|
1689
|
+
return useCallback11(() => forceUpdate_({}), EMPTY_ARRAY);
|
|
1774
1690
|
}
|
|
1775
1691
|
function usePlayerControl(player) {
|
|
1776
|
-
const togglePlay =
|
|
1692
|
+
const togglePlay = useCallback11(() => {
|
|
1777
1693
|
if (player) {
|
|
1778
1694
|
switch (player.phase) {
|
|
1779
1695
|
case PlayerPhase.WaitingFirstFrame:
|
|
@@ -1789,25 +1705,25 @@ function usePlayerControl(player) {
|
|
|
1789
1705
|
}
|
|
1790
1706
|
}
|
|
1791
1707
|
}, [player]);
|
|
1792
|
-
const seekToProgressTime =
|
|
1708
|
+
const seekToProgressTime = useCallback11((time) => {
|
|
1793
1709
|
if (player) {
|
|
1794
1710
|
player.seekToProgressTime(time);
|
|
1795
1711
|
}
|
|
1796
1712
|
}, [player]);
|
|
1797
1713
|
const lastPlayer = useLastValue(player);
|
|
1798
1714
|
const forceUpdate = useForceUpdate2();
|
|
1799
|
-
const setSpeed =
|
|
1715
|
+
const setSpeed = useCallback11((speed2) => {
|
|
1800
1716
|
if (player) {
|
|
1801
1717
|
player.playbackSpeed = speed2;
|
|
1802
1718
|
forceUpdate();
|
|
1803
1719
|
}
|
|
1804
1720
|
}, [forceUpdate, player]);
|
|
1805
|
-
|
|
1721
|
+
useEffect4(() => {
|
|
1806
1722
|
if (!lastPlayer && player) {
|
|
1807
1723
|
forceUpdate();
|
|
1808
1724
|
}
|
|
1809
1725
|
}, [forceUpdate, lastPlayer, player]);
|
|
1810
|
-
|
|
1726
|
+
useEffect4(() => {
|
|
1811
1727
|
if (player) {
|
|
1812
1728
|
player.callbacks.on("onPhaseChanged", forceUpdate);
|
|
1813
1729
|
player.callbacks.on("onProgressTimeChanged", forceUpdate);
|
|
@@ -1836,16 +1752,16 @@ function usePlayerControl(player) {
|
|
|
1836
1752
|
import Tippy10 from "@tippyjs/react";
|
|
1837
1753
|
import clsx11 from "clsx";
|
|
1838
1754
|
import RcSlider2 from "rc-slider";
|
|
1839
|
-
import
|
|
1755
|
+
import React48, { useEffect as useEffect5, useState as useState6 } from "react";
|
|
1840
1756
|
import { PlayerPhase as PlayerPhase2 } from "white-web-sdk";
|
|
1841
1757
|
|
|
1842
1758
|
// src/components/PlayerControl/components/Button.tsx
|
|
1843
1759
|
import clsx10 from "clsx";
|
|
1844
|
-
import
|
|
1760
|
+
import React44, { forwardRef as forwardRef2 } from "react";
|
|
1845
1761
|
import Tippy9 from "@tippyjs/react";
|
|
1846
1762
|
var Button2 = forwardRef2((props, ref) => {
|
|
1847
1763
|
const { theme, content, disabled, active, onClick, interactive, placement = "top", children } = props;
|
|
1848
|
-
return
|
|
1764
|
+
return /* @__PURE__ */ React44.createElement(Tippy9, {
|
|
1849
1765
|
className: "fastboard-tip",
|
|
1850
1766
|
content,
|
|
1851
1767
|
interactive,
|
|
@@ -1855,7 +1771,7 @@ var Button2 = forwardRef2((props, ref) => {
|
|
|
1855
1771
|
offset: TopOffset,
|
|
1856
1772
|
delay: [1e3, 400],
|
|
1857
1773
|
duration: 300
|
|
1858
|
-
},
|
|
1774
|
+
}, /* @__PURE__ */ React44.createElement("button", {
|
|
1859
1775
|
ref,
|
|
1860
1776
|
className: clsx10("fastboard-player-control-btn", theme, { active }),
|
|
1861
1777
|
onClick,
|
|
@@ -1867,36 +1783,36 @@ var Button2 = forwardRef2((props, ref) => {
|
|
|
1867
1783
|
import { memo as memo2 } from "react";
|
|
1868
1784
|
|
|
1869
1785
|
// src/components/PlayerControl/icons/Loading.tsx
|
|
1870
|
-
import
|
|
1786
|
+
import React45 from "react";
|
|
1871
1787
|
var Loading = (props) => {
|
|
1872
1788
|
const stroke = getStroke(props);
|
|
1873
|
-
return
|
|
1789
|
+
return /* @__PURE__ */ React45.createElement("svg", {
|
|
1874
1790
|
viewBox: "0 0 24 24"
|
|
1875
|
-
},
|
|
1791
|
+
}, /* @__PURE__ */ React45.createElement("path", {
|
|
1876
1792
|
d: "M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8z",
|
|
1877
1793
|
fill: stroke
|
|
1878
1794
|
}));
|
|
1879
1795
|
};
|
|
1880
1796
|
|
|
1881
1797
|
// src/components/PlayerControl/icons/Pause.tsx
|
|
1882
|
-
import
|
|
1798
|
+
import React46 from "react";
|
|
1883
1799
|
var Pause = (props) => {
|
|
1884
1800
|
const stroke = getStroke(props);
|
|
1885
|
-
return
|
|
1801
|
+
return /* @__PURE__ */ React46.createElement("svg", {
|
|
1886
1802
|
viewBox: "0 0 24 24"
|
|
1887
|
-
},
|
|
1803
|
+
}, /* @__PURE__ */ React46.createElement("path", {
|
|
1888
1804
|
d: "M14 19h4V5h-4M6 19h4V5H6v14z",
|
|
1889
1805
|
fill: stroke
|
|
1890
1806
|
}));
|
|
1891
1807
|
};
|
|
1892
1808
|
|
|
1893
1809
|
// src/components/PlayerControl/icons/Play.tsx
|
|
1894
|
-
import
|
|
1810
|
+
import React47 from "react";
|
|
1895
1811
|
var Play = (props) => {
|
|
1896
1812
|
const stroke = getStroke(props);
|
|
1897
|
-
return
|
|
1813
|
+
return /* @__PURE__ */ React47.createElement("svg", {
|
|
1898
1814
|
viewBox: "0 0 24 24"
|
|
1899
|
-
},
|
|
1815
|
+
}, /* @__PURE__ */ React47.createElement("path", {
|
|
1900
1816
|
d: "M8 5.14v14l11-7l-11-7z",
|
|
1901
1817
|
fill: stroke
|
|
1902
1818
|
}));
|
|
@@ -1915,12 +1831,12 @@ function PlayerControl(_a) {
|
|
|
1915
1831
|
var _b = _a, { theme, autoHide = false, player: player_ } = _b, icons = __objRest(_b, ["theme", "autoHide", "player"]);
|
|
1916
1832
|
theme = useTheme(theme);
|
|
1917
1833
|
const { t } = useTranslation();
|
|
1918
|
-
const [currentTime, setCurrentTime] =
|
|
1834
|
+
const [currentTime, setCurrentTime] = useState6(0);
|
|
1919
1835
|
const player = usePlayerControl(player_);
|
|
1920
|
-
|
|
1836
|
+
useEffect5(() => {
|
|
1921
1837
|
setCurrentTime(player.currentTime);
|
|
1922
1838
|
}, [player.currentTime]);
|
|
1923
|
-
|
|
1839
|
+
useEffect5(() => {
|
|
1924
1840
|
if (player.currentTime !== currentTime) {
|
|
1925
1841
|
player.seekToProgressTime(currentTime);
|
|
1926
1842
|
}
|
|
@@ -1928,25 +1844,25 @@ function PlayerControl(_a) {
|
|
|
1928
1844
|
const isLoading = player.phase === PlayerPhase2.WaitingFirstFrame || player.phase === PlayerPhase2.Buffering;
|
|
1929
1845
|
const isPlaying = player.phase === PlayerPhase2.Playing;
|
|
1930
1846
|
const { activeColor } = themes[theme];
|
|
1931
|
-
return
|
|
1847
|
+
return /* @__PURE__ */ React48.createElement("div", {
|
|
1932
1848
|
className: clsx11(name5, theme, { "auto-hide": autoHide })
|
|
1933
|
-
},
|
|
1849
|
+
}, /* @__PURE__ */ React48.createElement("button", {
|
|
1934
1850
|
className: clsx11(`${name5}-btn`, isLoading ? "loading" : isPlaying ? "pause" : "play", theme),
|
|
1935
1851
|
disabled: isLoading,
|
|
1936
1852
|
onClick: player.togglePlay
|
|
1937
|
-
},
|
|
1938
|
-
fallback: isLoading ?
|
|
1853
|
+
}, /* @__PURE__ */ React48.createElement(Icon, {
|
|
1854
|
+
fallback: isLoading ? /* @__PURE__ */ React48.createElement(Icons2.Loading, {
|
|
1939
1855
|
theme
|
|
1940
|
-
}) : isPlaying ?
|
|
1856
|
+
}) : isPlaying ? /* @__PURE__ */ React48.createElement(Icons2.Pause, {
|
|
1941
1857
|
theme
|
|
1942
|
-
}) :
|
|
1858
|
+
}) : /* @__PURE__ */ React48.createElement(Icons2.Play, {
|
|
1943
1859
|
theme
|
|
1944
1860
|
}),
|
|
1945
1861
|
src: isLoading ? icons.loadingIcon : isPlaying ? icons.pauseIcon : icons.playIcon,
|
|
1946
1862
|
alt: isLoading ? "[loading]" : isPlaying ? "[pause]" : "[play]"
|
|
1947
|
-
})),
|
|
1863
|
+
})), /* @__PURE__ */ React48.createElement("span", {
|
|
1948
1864
|
className: clsx11(`${name5}-slider`, { loading: isLoading }, theme)
|
|
1949
|
-
},
|
|
1865
|
+
}, /* @__PURE__ */ React48.createElement(RcSlider2, {
|
|
1950
1866
|
disabled: isLoading,
|
|
1951
1867
|
trackStyle: { background: activeColor },
|
|
1952
1868
|
handleStyle: { border: `1px solid ${activeColor}` },
|
|
@@ -1955,15 +1871,15 @@ function PlayerControl(_a) {
|
|
|
1955
1871
|
min: 0,
|
|
1956
1872
|
max: player.totalTime,
|
|
1957
1873
|
step: 100
|
|
1958
|
-
})),
|
|
1874
|
+
})), /* @__PURE__ */ React48.createElement("span", {
|
|
1959
1875
|
className: clsx11(`${name5}-current`, theme)
|
|
1960
|
-
}, renderTime(player.currentTime)),
|
|
1876
|
+
}, renderTime(player.currentTime)), /* @__PURE__ */ React48.createElement("span", {
|
|
1961
1877
|
className: clsx11(`${name5}-slash`, theme)
|
|
1962
|
-
}, "/"),
|
|
1878
|
+
}, "/"), /* @__PURE__ */ React48.createElement("span", {
|
|
1963
1879
|
className: clsx11(`${name5}-total`, theme)
|
|
1964
|
-
}, renderTime(player.totalTime)),
|
|
1880
|
+
}, renderTime(player.totalTime)), /* @__PURE__ */ React48.createElement("span", {
|
|
1965
1881
|
className: `${name5}-btn-interactive`
|
|
1966
|
-
},
|
|
1882
|
+
}, /* @__PURE__ */ React48.createElement(Tippy10, {
|
|
1967
1883
|
className: "fastboard-tip",
|
|
1968
1884
|
content: renderSpeeds(player),
|
|
1969
1885
|
theme,
|
|
@@ -1972,11 +1888,11 @@ function PlayerControl(_a) {
|
|
|
1972
1888
|
offset: TopOffset,
|
|
1973
1889
|
arrow: false,
|
|
1974
1890
|
interactive: true
|
|
1975
|
-
},
|
|
1891
|
+
}, /* @__PURE__ */ React48.createElement(Button2, {
|
|
1976
1892
|
content: t("speed"),
|
|
1977
1893
|
theme,
|
|
1978
1894
|
disabled: isLoading
|
|
1979
|
-
},
|
|
1895
|
+
}, /* @__PURE__ */ React48.createElement("span", {
|
|
1980
1896
|
className: clsx11(`${name5}-speed-text`, theme)
|
|
1981
1897
|
}, player.speed, "x")))));
|
|
1982
1898
|
}
|
|
@@ -1988,9 +1904,9 @@ function renderTime(ms) {
|
|
|
1988
1904
|
}
|
|
1989
1905
|
var Speeds = [2, 1.5, 1.25, 1, 0.75, 0.5];
|
|
1990
1906
|
function renderSpeeds({ speed: current, setSpeed }) {
|
|
1991
|
-
return
|
|
1907
|
+
return /* @__PURE__ */ React48.createElement("div", {
|
|
1992
1908
|
className: clsx11(`${name5}-panel`, "speed")
|
|
1993
|
-
}, Speeds.map((speed) =>
|
|
1909
|
+
}, Speeds.map((speed) => /* @__PURE__ */ React48.createElement("button", {
|
|
1994
1910
|
className: clsx11(`${name5}-btn`, "speed", {
|
|
1995
1911
|
active: speed === current
|
|
1996
1912
|
}),
|
|
@@ -2000,34 +1916,49 @@ function renderSpeeds({ speed: current, setSpeed }) {
|
|
|
2000
1916
|
}
|
|
2001
1917
|
|
|
2002
1918
|
// src/components/Fastboard.tsx
|
|
2003
|
-
import
|
|
2004
|
-
|
|
2005
|
-
var _b = _a, { app } = _b, restProps = __objRest(_b, ["app"]);
|
|
1919
|
+
import React49, { forwardRef as forwardRef3, useCallback as useCallback12, useEffect as useEffect6 } from "react";
|
|
1920
|
+
var Fastboard = /* @__PURE__ */ forwardRef3(function Fastboard2(_a, ref) {
|
|
1921
|
+
var _b = _a, { app, theme, layout, language } = _b, restProps = __objRest(_b, ["app", "theme", "layout", "language"]);
|
|
2006
1922
|
if (!app) {
|
|
2007
|
-
return
|
|
2008
|
-
className: "fastboard-root"
|
|
2009
|
-
|
|
1923
|
+
return /* @__PURE__ */ React49.createElement("div", __spreadValues({
|
|
1924
|
+
className: "fastboard-root",
|
|
1925
|
+
ref
|
|
1926
|
+
}, restProps));
|
|
2010
1927
|
}
|
|
2011
|
-
return
|
|
1928
|
+
return /* @__PURE__ */ React49.createElement(FastboardAppContext.Provider, {
|
|
2012
1929
|
value: app
|
|
2013
|
-
},
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
1930
|
+
}, /* @__PURE__ */ React49.createElement(FastboardInternal, __spreadValues(__spreadValues({
|
|
1931
|
+
forwardedRef: ref
|
|
1932
|
+
}, { theme, layout, language }), restProps)));
|
|
1933
|
+
});
|
|
1934
|
+
function FastboardInternal(_a) {
|
|
1935
|
+
var _b = _a, {
|
|
1936
|
+
forwardedRef,
|
|
1937
|
+
language,
|
|
1938
|
+
layout = {},
|
|
1939
|
+
theme = "light",
|
|
1940
|
+
children
|
|
1941
|
+
} = _b, restProps = __objRest(_b, [
|
|
1942
|
+
"forwardedRef",
|
|
1943
|
+
"language",
|
|
1944
|
+
"layout",
|
|
1945
|
+
"theme",
|
|
1946
|
+
"children"
|
|
1947
|
+
]);
|
|
2021
1948
|
const app = useFastboardApp();
|
|
2022
1949
|
const forceUpdate = useForceUpdate();
|
|
2023
1950
|
const i18n = useAsyncValue(() => createI18n({ language }));
|
|
2024
|
-
|
|
1951
|
+
useEffect6(() => {
|
|
2025
1952
|
if (i18n)
|
|
2026
1953
|
i18n.changeLanguage(language);
|
|
2027
1954
|
forceUpdate();
|
|
2028
1955
|
}, [forceUpdate, i18n, language]);
|
|
2029
|
-
|
|
2030
|
-
|
|
1956
|
+
useEffect6(() => {
|
|
1957
|
+
app.manager.setPrefersColorScheme(theme);
|
|
1958
|
+
}, [app, theme]);
|
|
1959
|
+
const useWhiteboard = useCallback12((container) => {
|
|
1960
|
+
if (container && app)
|
|
1961
|
+
app.manager.bindContainer(container);
|
|
2031
1962
|
}, [app]);
|
|
2032
1963
|
const hideControls = useHideControls();
|
|
2033
1964
|
const showControls = !hideControls;
|
|
@@ -2037,22 +1968,33 @@ function FastboardInternal({
|
|
|
2037
1968
|
ZoomControl: zoom_control = showControls,
|
|
2038
1969
|
PageControl: page_control = showControls
|
|
2039
1970
|
} = layout;
|
|
2040
|
-
return
|
|
1971
|
+
return /* @__PURE__ */ React49.createElement(ThemeContext.Provider, {
|
|
2041
1972
|
value: theme
|
|
2042
|
-
},
|
|
1973
|
+
}, /* @__PURE__ */ React49.createElement(I18nContext.Provider, {
|
|
2043
1974
|
value: i18n
|
|
2044
|
-
},
|
|
2045
|
-
className: "fastboard-root"
|
|
2046
|
-
|
|
1975
|
+
}, /* @__PURE__ */ React49.createElement("div", __spreadProps(__spreadValues({}, restProps), {
|
|
1976
|
+
className: "fastboard-root",
|
|
1977
|
+
ref: forwardedRef
|
|
1978
|
+
}), /* @__PURE__ */ React49.createElement("div", {
|
|
2047
1979
|
className: "fastboard-view",
|
|
2048
1980
|
ref: useWhiteboard
|
|
2049
|
-
}), children ? children :
|
|
1981
|
+
}), children ? children : /* @__PURE__ */ React49.createElement(React49.Fragment, null, toolbar && /* @__PURE__ */ React49.createElement("div", {
|
|
2050
1982
|
className: "fastboard-left"
|
|
2051
|
-
},
|
|
1983
|
+
}, /* @__PURE__ */ React49.createElement(Toolbar, null)), (redo_undo || zoom_control) && /* @__PURE__ */ React49.createElement("div", {
|
|
2052
1984
|
className: "fastboard-bottom-left"
|
|
2053
|
-
}, redo_undo &&
|
|
1985
|
+
}, redo_undo && /* @__PURE__ */ React49.createElement(RedoUndo, null), zoom_control && /* @__PURE__ */ React49.createElement(ZoomControl, null)), page_control && /* @__PURE__ */ React49.createElement("div", {
|
|
2054
1986
|
className: "fastboard-bottom-right"
|
|
2055
|
-
},
|
|
1987
|
+
}, /* @__PURE__ */ React49.createElement(PageControl, null))))));
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
// src/vanilla/index.tsx
|
|
1991
|
+
import React50 from "react";
|
|
1992
|
+
import ReactDOM from "react-dom";
|
|
1993
|
+
function mount(app, dom, props) {
|
|
1994
|
+
ReactDOM.render(/* @__PURE__ */ React50.createElement(Fastboard, __spreadValues({
|
|
1995
|
+
app
|
|
1996
|
+
}, props)), dom);
|
|
1997
|
+
return () => ReactDOM.unmountComponentAtNode(dom);
|
|
2056
1998
|
}
|
|
2057
1999
|
export {
|
|
2058
2000
|
EmptyToolbarHook,
|
|
@@ -2065,6 +2007,7 @@ export {
|
|
|
2065
2007
|
ThemeContext,
|
|
2066
2008
|
Toolbar,
|
|
2067
2009
|
ZoomControl,
|
|
2010
|
+
mount,
|
|
2068
2011
|
useBoxState,
|
|
2069
2012
|
useFastboardApp,
|
|
2070
2013
|
useFastboardValue,
|