@netless/fastboard-react 1.0.0-canary.1 → 1.0.0-canary.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.d.ts +39 -2
- package/dist/index.js +112 -87
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -6
- package/src/behaviors/index.ts +3 -0
- package/src/behaviors/netless-app.ts +35 -0
- package/src/behaviors/netless-ua.ts +15 -0
- package/src/create.ts +25 -0
- package/src/hooks.tsx +6 -7
- package/src/index.tsx +5 -2
- package/src/replay.ts +26 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _netless_fastboard_core from '@netless/fastboard-core';
|
|
2
|
+
import { FastboardOptions, FastboardReplayOptions, FastboardApp, FastboardPlayer } from '@netless/fastboard-core';
|
|
2
3
|
export * from '@netless/fastboard-core';
|
|
3
4
|
import { RedoUndoProps, ZoomControlProps, PageControlProps, ToolbarProps, FastboardProps, ReplayFastboardProps } from '@netless/fastboard-ui';
|
|
4
5
|
export { AppInToolbar, AppsInToolbar, FastboardProps, FastboardUIConfig, GenericIcon, Language, PageControlProps, RedoUndoProps, ReplayFastboardProps, Theme, ToolbarProps, ZoomControlProps, apps } from '@netless/fastboard-ui';
|
|
5
6
|
import * as react from 'react';
|
|
7
|
+
export { Attributes as NetlessAppSlideAttributes, Slide, SlideState, SlideViewer, SlideViewerOptions, previewSlide } from '@netless/app-slide';
|
|
6
8
|
|
|
7
9
|
declare const RedoUndo: react.FunctionComponent<RedoUndoProps>;
|
|
8
10
|
|
|
@@ -15,7 +17,42 @@ declare const Toolbar: react.FunctionComponent<ToolbarProps>;
|
|
|
15
17
|
declare const Fastboard: react.FunctionComponent<FastboardProps>;
|
|
16
18
|
declare const ReplayFastboard: react.FunctionComponent<ReplayFastboardProps>;
|
|
17
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Create a FastboardApp instance.
|
|
22
|
+
* @example
|
|
23
|
+
* let app = await createFastboard({
|
|
24
|
+
* sdkConfig: {
|
|
25
|
+
* appIdentifier: import.meta.env.VITE_APPID,
|
|
26
|
+
* region: 'cn-hz',
|
|
27
|
+
* },
|
|
28
|
+
* joinRoom: {
|
|
29
|
+
* uid: unique_id,
|
|
30
|
+
* uuid: import.meta.env.VITE_ROOM_UUID,
|
|
31
|
+
* roomToken: import.meta.env.VITE_ROOM_TOKEN,
|
|
32
|
+
* },
|
|
33
|
+
* })
|
|
34
|
+
*/
|
|
35
|
+
declare function createFastboard<TEventData = any>(options: FastboardOptions): Promise<_netless_fastboard_core.FastboardApp<TEventData>>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a FastboardPlayer instance.
|
|
39
|
+
* @example
|
|
40
|
+
* let player = await replayFastboard({
|
|
41
|
+
* sdkConfig: {
|
|
42
|
+
* appIdentifier: import.meta.env.VITE_APPID,
|
|
43
|
+
* region: 'cn-hz',
|
|
44
|
+
* },
|
|
45
|
+
* replayRoom: {
|
|
46
|
+
* room: "room uuid",
|
|
47
|
+
* roomToken: "NETLESSROOM_...",
|
|
48
|
+
* beginTimestamp: 1646619090394,
|
|
49
|
+
* duration: 70448,
|
|
50
|
+
* },
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
declare function replayFastboard<TEventData = any>(options: FastboardReplayOptions): Promise<_netless_fastboard_core.FastboardPlayer<TEventData>>;
|
|
54
|
+
|
|
18
55
|
declare function useFastboard(config: () => FastboardOptions): FastboardApp | null;
|
|
19
56
|
declare function useReplayFastboard(config: () => FastboardReplayOptions): FastboardPlayer | null;
|
|
20
57
|
|
|
21
|
-
export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, useFastboard, useReplayFastboard };
|
|
58
|
+
export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, createFastboard, replayFastboard, useFastboard, useReplayFastboard };
|
package/dist/index.js
CHANGED
|
@@ -1,53 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
23
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
24
4
|
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
RedoUndo: () => RedoUndo,
|
|
31
|
-
ReplayFastboard: () => ReplayFastboard,
|
|
32
|
-
Toolbar: () => Toolbar,
|
|
33
|
-
ZoomControl: () => ZoomControl,
|
|
34
|
-
apps: () => import_fastboard_ui6.apps,
|
|
35
|
-
useFastboard: () => useFastboard,
|
|
36
|
-
useReplayFastboard: () => useReplayFastboard
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(src_exports);
|
|
39
|
-
__reExport(src_exports, require("@netless/fastboard-core"), module.exports);
|
|
40
|
-
var import_fastboard_ui6 = require("@netless/fastboard-ui");
|
|
5
|
+
var fastboardCore = require('@netless/fastboard-core');
|
|
6
|
+
var fastboardUi = require('@netless/fastboard-ui');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var windowManager = require('@netless/window-manager');
|
|
9
|
+
var NetlessAppSlide = require('@netless/app-slide');
|
|
41
10
|
|
|
42
|
-
|
|
43
|
-
var import_fastboard_ui = require("@netless/fastboard-ui");
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
44
12
|
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
+
var NetlessAppSlide__default = /*#__PURE__*/_interopDefaultLegacy(NetlessAppSlide);
|
|
15
|
+
|
|
16
|
+
// inline-sass-helper:inline-sass-style-helper.js
|
|
17
|
+
function injectStyle(text) {
|
|
18
|
+
if (typeof document !== "undefined") {
|
|
19
|
+
var style = document.createElement("style");
|
|
20
|
+
var node = document.createTextNode(text);
|
|
21
|
+
style.appendChild(node);
|
|
22
|
+
document.head.appendChild(style);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// inline-sass-content:./src/style.scss
|
|
27
|
+
var style_default = '.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-main-view{position:absolute;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 .12s;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-laserPointer-image{margin-left:-22px;margin-top:3px}.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}.window-manager-view-wrapper{position:absolute;z-index:10}.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-quarantine{all:initial;position:relative;width:100%;height:100%;display:flex;flex-direction:column}.telebox-body-wrap{color:#191919;color:var(--tele-boxColor, #191919);flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center;position:relative}.telebox-content{width:100%;height:100%;position:relative;background-color:#f9f9f9;background-color:var(--tele-boxContainerBackground, #f9f9f9)}.telebox-box-stage{position:absolute;z-index:1;overflow:hidden;background-color:#fff;background-color:var(--tele-boxStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column;color:#191919;color:var(--tele-boxFooterColor, #191919);background-color:#fff;background-color:var(--tele-boxFooterBackground, #fff)}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-color-scheme-dark .telebox-body-wrap{color:#e9e9e9;color:var(--tele-boxColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-content{background-color:#25282e;background-color:var(--tele-boxContainerBackground, #25282e)}.telebox-color-scheme-dark .telebox-box-stage{background-color:#272a30;background-color:var(--tele-boxStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-color-scheme-dark .telebox-footer-wrap{color:#e9e9e9;color:var(--tele-boxFooterColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-boxFooterBackground, #383b42)}.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{border:1px solid #e3e3ec;border:var(--tele-boxBorder, 1px solid #e3e3ec);box-shadow:0 4px 10px #2f419226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(47, 65, 146, .15));position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:6px}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-main{position:relative;flex:1;width:100%;overflow:hidden}.telebox-quarantine-outer{width:100%;height:100%;overflow:hidden}.telebox-resize-handle{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;position:absolute;z-index:2147483647;touch-action:none}.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{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;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 .05s cubic-bezier(.4,.9,.71,1.02),height .05s 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{border:1px solid #383b42;border:var(--tele-boxBorder, 1px solid #383b42);box-shadow:0 4px 10px #383b4226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(56, 59, 66, .15))}.telebox-titlebar{-webkit-touch-callout:none;-webkit-user-select:none;box-sizing:border-box;height:26px;display:flex;align-items:center;user-select:none;touch-action:manipulation;color:#191919;color:var(--tele-titlebarColor, #191919);background-color:#fff;background-color:var(--tele-titlebarBackground, #fff);border-bottom:1px solid #eeeef7;border-bottom:var(--tele-titlebarBorderBottom, 1px solid #eeeef7)}.telebox-title-area{padding-left:16px;overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;color:#191919;color:var(--tele-titlebarColor, #191919);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}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10;touch-action:none}.telebox-titlebar-btns{padding-right:16px;white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;width:22px;height:22px;padding:0;outline:none;border:none;background:transparent;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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconMinimize, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-titlebar-icon-maximize{background:center/cover no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOn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8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);background-image:var(--tele-titlebarIconMaximizeActive, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgP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close{background:center/cover no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconClose, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-titlebarBackground, #383b42);border-bottom:none;border-bottom:var(--tele-titlebarBorderBottom, none)}.telebox-manager-container{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:center;align-items:center;--tele-managerContainerBackground: #f9f9f9;--tele-managerStageBackground: #fff;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxContainerBackground: #f9f9f9;--tele-boxStageBackground: #fff;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxColor: #191919;--tele-boxBorder: 1px solid #e3e3ec;--tele-boxShadow: 0px 4px 10px 0px rgba(47, 65, 146, .15);--tele-boxFooterColor: #191919;--tele-boxFooterBackground: #fff;--tele-titlebarColor: #191919;--tele-titlebarBackground: #fff;--tele-titlebarBorderBottom: 1px solid #eeeef7;--tele-titlebarTabColor: #7b88a0;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #e5e5f0;--tele-collectorBackground: #fff;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#f9f9f9;background:var(--tele-managerContainerBackground, #f9f9f9)}.telebox-manager-container.telebox-is-maximized>.telebox-manager-stage,.telebox-manager-container.telebox-is-minimized>.telebox-manager-stage{overflow:visible}.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-maximize,.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-minimize,.telebox-manager-container.telebox-hide-fullscreen-titlebar .telebox-titlebar{display:none!important}.telebox-manager-stage{position:relative;overflow:hidden;background:#fff;background:var(--tele-managerStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-color-scheme-dark.telebox-manager-container{--tele-managerContainerBackground: #25282e;--tele-managerStageBackground: #272a30;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxContainerBackground: #25282e;--tele-boxStageBackground: #272a30;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxColor: #e9e9e9;--tele-boxBorder: 1px solid #383b42;--tele-boxShadow: 0px 4px 10px 0px rgba(56, 59, 66, .15);--tele-boxFooterColor: #e9e9e9;--tele-boxFooterBackground: #383b42;--tele-titlebarColor: #e9e9e9;--tele-titlebarBackground: #383b42;--tele-titlebarBorderBottom: none;--tele-titlebarTabColor: #e9e9e9;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #7b88a0;--tele-collectorBackground: #383b42;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#25282e;background:var(--tele-managerContainerBackground, #25282e)}.telebox-color-scheme-dark.telebox-manager-container>.telebox-manager-stage{background:#272a30;background:var(--tele-managerStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-collector{-webkit-touch-callout:none;-webkit-user-select:none;visibility:hidden;display:block;position:absolute;z-index:5120;width:40px;height:40px;margin:0;padding:0;border:none;outline:none;font-size:0;border-radius:50%;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center;-webkit-tap-highlight-color:transparent;background-color:#fff;background-color:var(--tele-collectorBackground, #fff);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#383b42;background-color:var(--tele-collectorBackground, #383b42);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-max-titlebar{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;display:none;position:absolute;top:0;left:0;width:100%;z-index:5100;border-top-left-radius:6px;border-top-right-radius:6px}.telebox-max-titlebar .telebox-title,.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-titles{display:none}.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-title{display:block}.telebox-max-titlebar-active{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:4px;width:4px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:2px;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:150px;padding:0 26px 0 16px;outline:none;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-width:1px;border-right-style:solid;cursor:pointer;user-select:none;color:#7b88a0;color:var(--tele-titlebarTabColor, #7b88a0);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#e5e5f0;border-right-color:var(--tele-titlebarTabDividerColor, #e5e5f0)}.telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark .telebox-titles-tab{color:#e9e9e9;color:var(--tele-titlebarTabColor, #e9e9e9);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#7b88a0;border-right-color:var(--tele-titlebarTabDividerColor, #7b88a0)}.telebox-color-scheme-dark .telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.fastboard-react-div{width:100%;height:100%}';
|
|
28
|
+
|
|
29
|
+
// inline-sass-stub:./src/style.scss
|
|
30
|
+
injectStyle(style_default);
|
|
31
|
+
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
49
32
|
function useUpdateEffect(effect, deps) {
|
|
50
|
-
const isFirst =
|
|
33
|
+
const isFirst = React.useRef(true);
|
|
51
34
|
useIsomorphicLayoutEffect(() => {
|
|
52
35
|
if (isFirst.current) {
|
|
53
36
|
isFirst.current = false;
|
|
@@ -58,8 +41,8 @@ function useUpdateEffect(effect, deps) {
|
|
|
58
41
|
}
|
|
59
42
|
function wrapReactComponent(SvelteComponent, name) {
|
|
60
43
|
function ReactComponent(props) {
|
|
61
|
-
const [container, setContainer] =
|
|
62
|
-
const component =
|
|
44
|
+
const [container, setContainer] = React.useState(null);
|
|
45
|
+
const component = React.useRef(null);
|
|
63
46
|
useIsomorphicLayoutEffect(() => {
|
|
64
47
|
if (container) {
|
|
65
48
|
component.current = new SvelteComponent({ target: container, props });
|
|
@@ -75,7 +58,7 @@ function wrapReactComponent(SvelteComponent, name) {
|
|
|
75
58
|
component.current.$set(props);
|
|
76
59
|
}
|
|
77
60
|
}, [props]);
|
|
78
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
79
62
|
className: "fastboard-react-div",
|
|
80
63
|
ref: setContainer
|
|
81
64
|
});
|
|
@@ -84,11 +67,11 @@ function wrapReactComponent(SvelteComponent, name) {
|
|
|
84
67
|
return ReactComponent;
|
|
85
68
|
}
|
|
86
69
|
function useFastboard(config) {
|
|
87
|
-
const unmountRef =
|
|
88
|
-
const [fastboard, setFastboard] =
|
|
89
|
-
|
|
70
|
+
const unmountRef = React.useRef(false);
|
|
71
|
+
const [fastboard, setFastboard] = React.useState(null);
|
|
72
|
+
React.useEffect(() => {
|
|
90
73
|
let fastboard2 = null;
|
|
91
|
-
|
|
74
|
+
fastboardCore.createFastboardCore(config()).then((app) => {
|
|
92
75
|
if (!unmountRef.current) {
|
|
93
76
|
setFastboard(fastboard2 = app);
|
|
94
77
|
} else {
|
|
@@ -103,11 +86,11 @@ function useFastboard(config) {
|
|
|
103
86
|
return fastboard;
|
|
104
87
|
}
|
|
105
88
|
function useReplayFastboard(config) {
|
|
106
|
-
const unmountRef =
|
|
107
|
-
const [fastboard, setFastboard] =
|
|
108
|
-
|
|
89
|
+
const unmountRef = React.useRef(false);
|
|
90
|
+
const [fastboard, setFastboard] = React.useState(null);
|
|
91
|
+
React.useEffect(() => {
|
|
109
92
|
let fastboard2 = null;
|
|
110
|
-
|
|
93
|
+
fastboardCore.replayFastboardCore(config()).then((app) => {
|
|
111
94
|
if (!unmountRef.current) {
|
|
112
95
|
setFastboard(fastboard2 = app);
|
|
113
96
|
} else {
|
|
@@ -123,38 +106,80 @@ function useReplayFastboard(config) {
|
|
|
123
106
|
}
|
|
124
107
|
|
|
125
108
|
// src/RedoUndo.tsx
|
|
126
|
-
var RedoUndo = /* @__PURE__ */ wrapReactComponent(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
109
|
+
var RedoUndo = /* @__PURE__ */ wrapReactComponent(fastboardUi.RedoUndo, "RedoUndo");
|
|
110
|
+
var ZoomControl = /* @__PURE__ */ wrapReactComponent(
|
|
111
|
+
fastboardUi.ZoomControl,
|
|
112
|
+
"ZoomControl"
|
|
113
|
+
);
|
|
114
|
+
var PageControl = /* @__PURE__ */ wrapReactComponent(
|
|
115
|
+
fastboardUi.PageControl,
|
|
116
|
+
"PageControl"
|
|
117
|
+
);
|
|
118
|
+
var Toolbar = /* @__PURE__ */ wrapReactComponent(fastboardUi.Toolbar, "Toolbar");
|
|
119
|
+
var Fastboard = /* @__PURE__ */ wrapReactComponent(fastboardUi.Fastboard, "Fastboard");
|
|
120
|
+
var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(
|
|
121
|
+
fastboardUi.ReplayFastboard,
|
|
122
|
+
"ReplayFastboard"
|
|
123
|
+
);
|
|
124
|
+
function registerSlide() {
|
|
125
|
+
if (windowManager.WindowManager.registered.has(NetlessAppSlide__default["default"].kind))
|
|
126
|
+
return;
|
|
127
|
+
windowManager.WindowManager.register({
|
|
128
|
+
kind: NetlessAppSlide__default["default"].kind,
|
|
129
|
+
appOptions: { debug: false },
|
|
130
|
+
src: NetlessAppSlide__default["default"],
|
|
131
|
+
addHooks: NetlessAppSlide.addHooks
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
var DefaultApps = {};
|
|
135
|
+
function registerDefaultApps() {
|
|
136
|
+
Object.keys(DefaultApps).forEach((kind) => {
|
|
137
|
+
if (windowManager.WindowManager.registered.has(kind))
|
|
138
|
+
return;
|
|
139
|
+
windowManager.WindowManager.register({ kind, ...DefaultApps[kind] });
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
async function createFastboard(options) {
|
|
143
|
+
registerSlide();
|
|
144
|
+
registerDefaultApps();
|
|
145
|
+
return fastboardCore.createFastboardCore(options);
|
|
146
|
+
}
|
|
147
|
+
async function replayFastboard(options) {
|
|
148
|
+
registerSlide();
|
|
149
|
+
registerDefaultApps();
|
|
150
|
+
return fastboardCore.replayFastboardCore(options);
|
|
153
151
|
}
|
|
154
152
|
|
|
155
|
-
|
|
156
|
-
var style_default = '.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-main-view{position:absolute;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 .12s;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-laserPointer-image{margin-left:-22px;margin-top:3px}.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}.window-manager-view-wrapper{position:absolute;z-index:10}.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-quarantine{all:initial;position:relative;width:100%;height:100%;display:flex;flex-direction:column}.telebox-body-wrap{color:#191919;color:var(--tele-boxColor, #191919);flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center;position:relative}.telebox-content{width:100%;height:100%;position:relative;background-color:#f9f9f9;background-color:var(--tele-boxContainerBackground, #f9f9f9)}.telebox-box-stage{position:absolute;z-index:1;overflow:hidden;background-color:#fff;background-color:var(--tele-boxStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column;color:#191919;color:var(--tele-boxFooterColor, #191919);background-color:#fff;background-color:var(--tele-boxFooterBackground, #fff)}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-color-scheme-dark .telebox-body-wrap{color:#e9e9e9;color:var(--tele-boxColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-content{background-color:#25282e;background-color:var(--tele-boxContainerBackground, #25282e)}.telebox-color-scheme-dark .telebox-box-stage{background-color:#272a30;background-color:var(--tele-boxStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-color-scheme-dark .telebox-footer-wrap{color:#e9e9e9;color:var(--tele-boxFooterColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-boxFooterBackground, #383b42)}.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{border:1px solid #e3e3ec;border:var(--tele-boxBorder, 1px solid #e3e3ec);box-shadow:0 4px 10px #2f419226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(47, 65, 146, .15));position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:6px}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-main{position:relative;flex:1;width:100%;overflow:hidden}.telebox-quarantine-outer{width:100%;height:100%;overflow:hidden}.telebox-resize-handle{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;position:absolute;z-index:2147483647;touch-action:none}.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{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;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 .05s cubic-bezier(.4,.9,.71,1.02),height .05s 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{border:1px solid #383b42;border:var(--tele-boxBorder, 1px solid #383b42);box-shadow:0 4px 10px #383b4226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(56, 59, 66, .15))}.telebox-titlebar{-webkit-touch-callout:none;-webkit-user-select:none;box-sizing:border-box;height:26px;display:flex;align-items:center;user-select:none;touch-action:manipulation;color:#191919;color:var(--tele-titlebarColor, #191919);background-color:#fff;background-color:var(--tele-titlebarBackground, #fff);border-bottom:1px solid #eeeef7;border-bottom:var(--tele-titlebarBorderBottom, 1px solid #eeeef7)}.telebox-title-area{padding-left:16px;overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;color:#191919;color:var(--tele-titlebarColor, #191919);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}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10;touch-action:none}.telebox-titlebar-btns{padding-right:16px;white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;width:22px;height:22px;padding:0;outline:none;border:none;background:transparent;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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconMinimize, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-titlebar-icon-maximize{background:center/cover no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMj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hyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);background-image:var(--tele-titlebarIconMaximizeActive, 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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconClose, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-titlebarBackground, #383b42);border-bottom:none;border-bottom:var(--tele-titlebarBorderBottom, none)}.telebox-manager-container{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:center;align-items:center;--tele-managerContainerBackground: #f9f9f9;--tele-managerStageBackground: #fff;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxContainerBackground: #f9f9f9;--tele-boxStageBackground: #fff;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxColor: #191919;--tele-boxBorder: 1px solid #e3e3ec;--tele-boxShadow: 0px 4px 10px 0px rgba(47, 65, 146, .15);--tele-boxFooterColor: #191919;--tele-boxFooterBackground: #fff;--tele-titlebarColor: #191919;--tele-titlebarBackground: #fff;--tele-titlebarBorderBottom: 1px solid #eeeef7;--tele-titlebarTabColor: #7b88a0;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #e5e5f0;--tele-collectorBackground: #fff;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#f9f9f9;background:var(--tele-managerContainerBackground, #f9f9f9)}.telebox-manager-container.telebox-is-maximized>.telebox-manager-stage,.telebox-manager-container.telebox-is-minimized>.telebox-manager-stage{overflow:visible}.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-maximize,.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-minimize,.telebox-manager-container.telebox-hide-fullscreen-titlebar .telebox-titlebar{display:none!important}.telebox-manager-stage{position:relative;overflow:hidden;background:#fff;background:var(--tele-managerStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-color-scheme-dark.telebox-manager-container{--tele-managerContainerBackground: #25282e;--tele-managerStageBackground: #272a30;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxContainerBackground: #25282e;--tele-boxStageBackground: #272a30;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxColor: #e9e9e9;--tele-boxBorder: 1px solid #383b42;--tele-boxShadow: 0px 4px 10px 0px rgba(56, 59, 66, .15);--tele-boxFooterColor: #e9e9e9;--tele-boxFooterBackground: #383b42;--tele-titlebarColor: #e9e9e9;--tele-titlebarBackground: #383b42;--tele-titlebarBorderBottom: none;--tele-titlebarTabColor: #e9e9e9;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #7b88a0;--tele-collectorBackground: #383b42;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#25282e;background:var(--tele-managerContainerBackground, #25282e)}.telebox-color-scheme-dark.telebox-manager-container>.telebox-manager-stage{background:#272a30;background:var(--tele-managerStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-collector{-webkit-touch-callout:none;-webkit-user-select:none;visibility:hidden;display:block;position:absolute;z-index:5120;width:40px;height:40px;margin:0;padding:0;border:none;outline:none;font-size:0;border-radius:50%;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center;-webkit-tap-highlight-color:transparent;background-color:#fff;background-color:var(--tele-collectorBackground, #fff);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#383b42;background-color:var(--tele-collectorBackground, #383b42);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-max-titlebar{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;display:none;position:absolute;top:0;left:0;width:100%;z-index:5100;border-top-left-radius:6px;border-top-right-radius:6px}.telebox-max-titlebar .telebox-title,.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-titles{display:none}.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-title{display:block}.telebox-max-titlebar-active{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:4px;width:4px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:2px;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:150px;padding:0 26px 0 16px;outline:none;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-width:1px;border-right-style:solid;cursor:pointer;user-select:none;color:#7b88a0;color:var(--tele-titlebarTabColor, #7b88a0);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#e5e5f0;border-right-color:var(--tele-titlebarTabDividerColor, #e5e5f0)}.telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark .telebox-titles-tab{color:#e9e9e9;color:var(--tele-titlebarTabColor, #e9e9e9);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#7b88a0;border-right-color:var(--tele-titlebarTabDividerColor, #7b88a0)}.telebox-color-scheme-dark .telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.fastboard-react-div{width:100%;height:100%}';
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
153
|
+
Object.defineProperty(exports, 'apps', {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () { return fastboardUi.apps; }
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(exports, 'Slide', {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () { return NetlessAppSlide.Slide; }
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, 'SlideViewer', {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () { return NetlessAppSlide.SlideViewer; }
|
|
164
|
+
});
|
|
165
|
+
Object.defineProperty(exports, 'previewSlide', {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function () { return NetlessAppSlide.previewSlide; }
|
|
168
|
+
});
|
|
169
|
+
exports.Fastboard = Fastboard;
|
|
170
|
+
exports.PageControl = PageControl;
|
|
171
|
+
exports.RedoUndo = RedoUndo;
|
|
172
|
+
exports.ReplayFastboard = ReplayFastboard;
|
|
173
|
+
exports.Toolbar = Toolbar;
|
|
174
|
+
exports.ZoomControl = ZoomControl;
|
|
175
|
+
exports.createFastboard = createFastboard;
|
|
176
|
+
exports.replayFastboard = replayFastboard;
|
|
177
|
+
exports.useFastboard = useFastboard;
|
|
178
|
+
exports.useReplayFastboard = useReplayFastboard;
|
|
179
|
+
Object.keys(fastboardCore).forEach(function (k) {
|
|
180
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () { return fastboardCore[k]; }
|
|
183
|
+
});
|
|
184
|
+
});
|
|
160
185
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.tsx","../src/RedoUndo.tsx","../src/hooks.tsx","../src/ZoomControl.tsx","../src/PageControl.tsx","../src/Toolbar.tsx","../src/Fastboard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,oCAAd;AACA,2BAAqB;;;ACCrB,0BAAyC;;;ACOzC,mBAAoE;AACpE,4BAAiD;AAE1C,IAAM,4BAA4B,OAAO,aAAa,cA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AAO;AACT;AAEO,4BAA4B,QAA8D;AAC/F,QAAM,aAAa,yBAAO,KAAK;AAC/B,QAAM,CAAC,WAAW,gBAAgB,2BAAiC,IAAI;AAEvE,8BAAU,MAAM;AACd,QAAI,aAAoC;AAExC,+CAAgB,OAAO,CAAC,EAAE,KAAK,SAAO;AACpC,UAAI,CAAC,WAAW,SAAS;AACvB,qBAAc,aAAY,GAAI;AAAA,MAChC,OAAO;AACL,YAAI,QAAQ;AAAA,MACd;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,iBAAW,UAAU;AACrB,oBAAa,WAAU,QAAQ;AAAA,IACjC;AAAA,EAEF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;;;ADtGO,IAAM,WAA2B,mCAAkC,8BAAc,UAAU;;;AELlG,2BAA+C;AAKxC,IAAM,cAA8B,mCACzC,kCACA,aACF;;;ACRA,2BAA+C;AAKxC,IAAM,cAA8B,mCACzC,kCACA,aACF;;;ACRA,2BAAuC;AAKhC,IAAM,UAA0B,mCAAiC,8BAAa,SAAS;;;ACL9F,2BAAmF;AAK5E,IAAM,YAA4B,mCAAmC,gCAAe,WAAW;AAC/F,IAAM,kBAAkC,mCAC7C,sCACA,iBACF","sourcesContent":["export * from \"@netless/fastboard-core\";\nexport { apps } from \"@netless/fastboard-ui\";\nexport type {\n Theme,\n Language,\n GenericIcon,\n AppInToolbar,\n AppsInToolbar,\n FastboardUIConfig,\n} from \"@netless/fastboard-ui\";\nexport * from \"./RedoUndo\";\nexport * from \"./ZoomControl\";\nexport * from \"./PageControl\";\nexport * from \"./Toolbar\";\nexport * from \"./Fastboard\";\nexport { useFastboard, useReplayFastboard } from \"./hooks\";\n\nimport \"./style.scss\";\n\n// Caution about Export Namespace (Star)\n// esbuild can not handle nested `export *`, i.e. given two files:\n//\n// foo: export * from './bar'\n// bar: export * from 'baz' (external: baz)\n//\n// the result of bundling foo will be broken.\n// `export * from external-module` works and only works at the entry points.\n// ref: https://github.com/evanw/esbuild/issues/1737\n","import type { RedoUndoProps } from \"@netless/fastboard-ui\";\n\nimport { RedoUndo as RedoUndoImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { RedoUndoProps };\n\nexport const RedoUndo = /* @__PURE__ */ wrapReactComponent<RedoUndoProps>(RedoUndoImpl, \"RedoUndo\");\n","import type { SvelteComponent as SvelteComponentType } from \"svelte\";\nimport type { DependencyList, EffectCallback, FunctionComponent } from \"react\";\nimport type {\n FastboardApp,\n FastboardOptions,\n FastboardPlayer,\n FastboardReplayOptions,\n} from \"@netless/fastboard-core\";\n\nimport React, { useEffect, useLayoutEffect, useRef, useState } from \"react\";\nimport { createFastboard, replayFastboard } from \"@netless/fastboard-core\";\n\nexport const useIsomorphicLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport function useUpdateEffect(effect: EffectCallback, deps?: DependencyList) {\n const isFirst = useRef(true);\n\n useIsomorphicLayoutEffect(() => {\n if (isFirst.current) {\n isFirst.current = false;\n return;\n }\n\n return effect();\n }, deps);\n}\n\nexport function wrapReactComponent<Props>(\n SvelteComponent: typeof SvelteComponentType,\n name: string\n): FunctionComponent<Props> {\n function ReactComponent(props: Props) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const component = useRef<SvelteComponentType | null>(null);\n\n useIsomorphicLayoutEffect(() => {\n if (container) {\n component.current = new SvelteComponent({ target: container, props });\n\n return () => {\n if (component.current) {\n component.current.$destroy();\n }\n };\n }\n }, [container]);\n\n useUpdateEffect(() => {\n if (component.current) {\n component.current.$set(props);\n }\n }, [props]);\n\n return <div className=\"fastboard-react-div\" ref={setContainer} />;\n }\n\n ReactComponent.displayName = name;\n\n return ReactComponent;\n}\n\nexport function useFastboard(config: () => FastboardOptions): FastboardApp | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardApp | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardApp | null = null;\n\n createFastboard(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return fastboard;\n}\n\nexport function useReplayFastboard(config: () => FastboardReplayOptions): FastboardPlayer | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardPlayer | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardPlayer | null = null;\n\n replayFastboard(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return fastboard;\n}\n","import type { ZoomControlProps } from \"@netless/fastboard-ui\";\n\nimport { ZoomControl as ZoomControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ZoomControlProps };\n\nexport const ZoomControl = /* @__PURE__ */ wrapReactComponent<ZoomControlProps>(\n ZoomControlImpl,\n \"ZoomControl\"\n);\n","import type { PageControlProps } from \"@netless/fastboard-ui\";\n\nimport { PageControl as PageControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { PageControlProps };\n\nexport const PageControl = /* @__PURE__ */ wrapReactComponent<PageControlProps>(\n PageControlImpl,\n \"PageControl\"\n);\n","import type { ToolbarProps } from \"@netless/fastboard-ui\";\n\nimport { Toolbar as ToolbarImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ToolbarProps };\n\nexport const Toolbar = /* @__PURE__ */ wrapReactComponent<ToolbarProps>(ToolbarImpl, \"Toolbar\");\n","import type { FastboardProps, ReplayFastboardProps } from \"@netless/fastboard-ui\";\n\nimport { Fastboard as FastboardImpl, ReplayFastboard as ReplayFastboardImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { FastboardProps, ReplayFastboardProps };\n\nexport const Fastboard = /* @__PURE__ */ wrapReactComponent<FastboardProps>(FastboardImpl, \"Fastboard\");\nexport const ReplayFastboard = /* @__PURE__ */ wrapReactComponent<ReplayFastboardProps>(\n ReplayFastboardImpl,\n \"ReplayFastboard\"\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx","../src/RedoUndo.tsx","../src/hooks.tsx","../src/ZoomControl.tsx","../src/PageControl.tsx","../src/Toolbar.tsx","../src/Fastboard.tsx","../src/behaviors/netless-app.ts","../src/create.ts","../src/replay.ts"],"names":["fastboard","createFastboardCore","replayFastboardCore"],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,SAAS,YAAY;;;ACDrB,SAAS,YAAY,oBAAoB;;;ACQzC,SAAS,qBAAqB,2BAA2B;AACzD,OAAO,SAAS,WAAW,iBAAiB,QAAQ,gBAAgB;AAE7D,IAAM,4BAA4B,OAAO,aAAa,cAAc,kBAAkB;AAEtF,SAAS,gBAAgB,QAAwB,MAAuB;AAC7E,QAAM,UAAU,OAAO,IAAI;AAE3B,4BAA0B,MAAM;AAC9B,QAAI,QAAQ,SAAS;AACnB,cAAQ,UAAU;AAClB;AAAA,IACF;AAEA,WAAO,OAAO;AAAA,EAChB,GAAG,IAAI;AACT;AAEO,SAAS,mBACd,iBACA,MAC0B;AAC1B,WAAS,eAAe,OAAc;AACpC,UAAM,CAAC,WAAW,YAAY,IAAI,SAAgC,IAAI;AACtE,UAAM,YAAY,OAAmC,IAAI;AAEzD,8BAA0B,MAAM;AAC9B,UAAI,WAAW;AACb,kBAAU,UAAU,IAAI,gBAAgB,EAAE,QAAQ,WAAW,MAAM,CAAC;AAEpE,eAAO,MAAM;AACX,cAAI,UAAU,SAAS;AACrB,sBAAU,QAAQ,SAAS;AAAA,UAC7B;AAAA,QACF;AAAA,MACF;AAAA,IACF,GAAG,CAAC,SAAS,CAAC;AAEd,oBAAgB,MAAM;AACp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e,uBAAuB;AAKxC,IAAM,cAA8B;AAAA,EACzC;AAAA,EACA;AACF;;;ACRA,SAAS,WAAW,mBAAmB;AAKhC,IAAM,UAA0B,mCAAiC,aAAa,SAAS;;;ACL9F,SAAS,aAAa,eAAe,mBAAmB,2BAA2B;AAK5E,IAAM,YAA4B,mCAAmC,eAAe,WAAW;AAC/F,IAAM,kBAAkC;AAAA,EAC7C;AAAA,EACA;AACF;;;ACHA,SAAS,qBAAqB;AAE9B,OAAO,mBAAmB,UAAU,cAAc,OAAO,mBAAmB;AAKrE,SAAS,gBAAgB;AAC9B,MAAI,cAAc,WAAW,IAAI,gBAAgB,IAAI;AAAG;AACxD,gBAAc,SAAS;AAAA,IACrB,MAAM,gBAAgB;AAAA,IACtB,YAAY,EAAE,OAAO,MAAM;AAAA,IAC3B,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAEA,IAAM,cAEF,CAAC;AAEE,SAAS,sBAAsB;AACpC,SAAO,KAAK,WAAW,EAAE,QAAQ,UAAQ;AACvC,QAAI,cAAc,WAAW,IAAI,IAAI;AAAG;AACxC,kBAAc,SAAS,EAAE,MAAM,GAAG,YAAY,MAAM,CAAC;AAAA,EACvD,CAAC;AACH;;;AChCA,SAAS,uBAAAC,4BAA2B;AAkBpC,eAAsB,gBAAkC,SAA2B;AACjF,gBAAc;AACd,sBAAoB;AACpB,SAAOA,qBAAgC,OAAO;AAChD;;;ACtBA,SAAS,uBAAAC,4BAA2B;AAmBpC,eAAsB,gBAAkC,SAAiC;AACvF,gBAAc;AACd,sBAAoB;AACpB,SAAOA,qBAAgC,OAAO;AAChD","sourcesContent":["import \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport { apps } from \"@netless/fastboard-ui\";\nexport type {\n Theme,\n Language,\n GenericIcon,\n AppInToolbar,\n AppsInToolbar,\n FastboardUIConfig,\n} from \"@netless/fastboard-ui\";\nexport * from \"./RedoUndo\";\nexport * from \"./ZoomControl\";\nexport * from \"./PageControl\";\nexport * from \"./Toolbar\";\nexport * from \"./Fastboard\";\nexport * from \"./behaviors\";\nexport * from \"./create\";\nexport * from \"./replay\";\nexport { useFastboard, useReplayFastboard } from \"./hooks\";\n\n// Caution about Export Namespace (Star)\n// esbuild can not handle nested `export *`, i.e. given two files:\n//\n// foo: export * from './bar'\n// bar: export * from 'baz' (external: baz)\n//\n// the result of bundling foo will be broken.\n// `export * from external-module` works and only works at the entry points.\n// ref: https://github.com/evanw/esbuild/issues/1737\n","import type { RedoUndoProps } from \"@netless/fastboard-ui\";\n\nimport { RedoUndo as RedoUndoImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { RedoUndoProps };\n\nexport const RedoUndo = /* @__PURE__ */ wrapReactComponent<RedoUndoProps>(RedoUndoImpl, \"RedoUndo\");\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport type {\n FastboardApp,\n FastboardOptions,\n FastboardPlayer,\n FastboardReplayOptions,\n} from \"@netless/fastboard-core\";\nimport type { DependencyList, EffectCallback, FunctionComponent } from \"react\";\nimport type { SvelteComponent as SvelteComponentType } from \"svelte\";\n\nimport { createFastboardCore, replayFastboardCore } from \"@netless/fastboard-core\";\nimport React, { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nexport const useIsomorphicLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport function useUpdateEffect(effect: EffectCallback, deps?: DependencyList) {\n const isFirst = useRef(true);\n\n useIsomorphicLayoutEffect(() => {\n if (isFirst.current) {\n isFirst.current = false;\n return;\n }\n\n return effect();\n }, deps);\n}\n\nexport function wrapReactComponent<Props>(\n SvelteComponent: typeof SvelteComponentType,\n name: string\n): FunctionComponent<Props> {\n function ReactComponent(props: Props) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const component = useRef<SvelteComponentType | null>(null);\n\n useIsomorphicLayoutEffect(() => {\n if (container) {\n component.current = new SvelteComponent({ target: container, props });\n\n return () => {\n if (component.current) {\n component.current.$destroy();\n }\n };\n }\n }, [container]);\n\n useUpdateEffect(() => {\n if (component.current) {\n component.current.$set(props);\n }\n }, [props]);\n\n return <div className=\"fastboard-react-div\" ref={setContainer} />;\n }\n\n ReactComponent.displayName = name;\n\n return ReactComponent;\n}\n\nexport function useFastboard(config: () => FastboardOptions): FastboardApp | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardApp | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardApp | null = null;\n\n createFastboardCore(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n }, []);\n\n return fastboard;\n}\n\nexport function useReplayFastboard(config: () => FastboardReplayOptions): FastboardPlayer | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardPlayer | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardPlayer | null = null;\n\n replayFastboardCore(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n }, []);\n\n return fastboard;\n}\n","import type { ZoomControlProps } from \"@netless/fastboard-ui\";\n\nimport { ZoomControl as ZoomControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ZoomControlProps };\n\nexport const ZoomControl = /* @__PURE__ */ wrapReactComponent<ZoomControlProps>(\n ZoomControlImpl,\n \"ZoomControl\"\n);\n","import type { PageControlProps } from \"@netless/fastboard-ui\";\n\nimport { PageControl as PageControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { PageControlProps };\n\nexport const PageControl = /* @__PURE__ */ wrapReactComponent<PageControlProps>(\n PageControlImpl,\n \"PageControl\"\n);\n","import type { ToolbarProps } from \"@netless/fastboard-ui\";\n\nimport { Toolbar as ToolbarImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ToolbarProps };\n\nexport const Toolbar = /* @__PURE__ */ wrapReactComponent<ToolbarProps>(ToolbarImpl, \"Toolbar\");\n","import type { FastboardProps, ReplayFastboardProps } from \"@netless/fastboard-ui\";\n\nimport { Fastboard as FastboardImpl, ReplayFastboard as ReplayFastboardImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { FastboardProps, ReplayFastboardProps };\n\nexport const Fastboard = /* @__PURE__ */ wrapReactComponent<FastboardProps>(FastboardImpl, \"Fastboard\");\nexport const ReplayFastboard = /* @__PURE__ */ wrapReactComponent<ReplayFastboardProps>(\n ReplayFastboardImpl,\n \"ReplayFastboard\"\n);\n","import type {\n AppOptions as NetlessAppSlideAppOptions,\n Attributes as NetlessAppSlideAttributes,\n SlideState,\n SlideViewerOptions,\n} from \"@netless/app-slide\";\nimport type { RegisterParams } from \"@netless/window-manager\";\n\nimport { WindowManager } from \"@netless/window-manager\";\n\nimport NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from \"@netless/app-slide\";\n\nexport { Slide, SlideViewer, previewSlide };\nexport type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };\n\nexport function registerSlide() {\n if (WindowManager.registered.has(NetlessAppSlide.kind)) return;\n WindowManager.register({\n kind: NetlessAppSlide.kind,\n appOptions: { debug: false } as NetlessAppSlideAppOptions,\n src: NetlessAppSlide,\n addHooks,\n });\n}\n\nconst DefaultApps: {\n [kind: string]: Omit<RegisterParams, \"kind\">;\n} = {};\n\nexport function registerDefaultApps() {\n Object.keys(DefaultApps).forEach(kind => {\n if (WindowManager.registered.has(kind)) return;\n WindowManager.register({ kind, ...DefaultApps[kind] });\n });\n}\n","import type { FastboardOptions } from \"@netless/fastboard-core\";\n\nimport { createFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardApp instance.\n * @example\n * let app = await createFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * joinRoom: {\n * uid: unique_id,\n * uuid: import.meta.env.VITE_ROOM_UUID,\n * roomToken: import.meta.env.VITE_ROOM_TOKEN,\n * },\n * })\n */\nexport async function createFastboard<TEventData = any>(options: FastboardOptions) {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\n}\n","import type { FastboardReplayOptions } from \"@netless/fastboard-core\";\n\nimport { replayFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardPlayer instance.\n * @example\n * let player = await replayFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * replayRoom: {\n * room: \"room uuid\",\n * roomToken: \"NETLESSROOM_...\",\n * beginTimestamp: 1646619090394,\n * duration: 70448,\n * },\n * })\n */\nexport async function replayFastboard<TEventData = any>(options: FastboardReplayOptions) {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createFastboardCore, replayFastboardCore } from '@netless/fastboard-core';
|
|
2
2
|
export * from '@netless/fastboard-core';
|
|
3
3
|
import { RedoUndo as RedoUndo$1, ZoomControl as ZoomControl$1, PageControl as PageControl$1, Toolbar as Toolbar$1, Fastboard as Fastboard$1, ReplayFastboard as ReplayFastboard$1 } from '@netless/fastboard-ui';
|
|
4
4
|
export { apps } from '@netless/fastboard-ui';
|
|
5
5
|
import React, { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
6
|
+
import { WindowManager } from '@netless/window-manager';
|
|
7
|
+
import NetlessAppSlide, { addHooks } from '@netless/app-slide';
|
|
8
|
+
export { Slide, SlideViewer, previewSlide } from '@netless/app-slide';
|
|
6
9
|
|
|
7
|
-
//
|
|
10
|
+
// inline-sass-helper:inline-sass-style-helper.js
|
|
11
|
+
function injectStyle(text) {
|
|
12
|
+
if (typeof document !== "undefined") {
|
|
13
|
+
var style = document.createElement("style");
|
|
14
|
+
var node = document.createTextNode(text);
|
|
15
|
+
style.appendChild(node);
|
|
16
|
+
document.head.appendChild(style);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// inline-sass-content:./src/style.scss
|
|
21
|
+
var style_default = '.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-main-view{position:absolute;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 .12s;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-laserPointer-image{margin-left:-22px;margin-top:3px}.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}.window-manager-view-wrapper{position:absolute;z-index:10}.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-quarantine{all:initial;position:relative;width:100%;height:100%;display:flex;flex-direction:column}.telebox-body-wrap{color:#191919;color:var(--tele-boxColor, #191919);flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center;position:relative}.telebox-content{width:100%;height:100%;position:relative;background-color:#f9f9f9;background-color:var(--tele-boxContainerBackground, #f9f9f9)}.telebox-box-stage{position:absolute;z-index:1;overflow:hidden;background-color:#fff;background-color:var(--tele-boxStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column;color:#191919;color:var(--tele-boxFooterColor, #191919);background-color:#fff;background-color:var(--tele-boxFooterBackground, #fff)}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-color-scheme-dark .telebox-body-wrap{color:#e9e9e9;color:var(--tele-boxColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-content{background-color:#25282e;background-color:var(--tele-boxContainerBackground, #25282e)}.telebox-color-scheme-dark .telebox-box-stage{background-color:#272a30;background-color:var(--tele-boxStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-color-scheme-dark .telebox-footer-wrap{color:#e9e9e9;color:var(--tele-boxFooterColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-boxFooterBackground, #383b42)}.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{border:1px solid #e3e3ec;border:var(--tele-boxBorder, 1px solid #e3e3ec);box-shadow:0 4px 10px #2f419226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(47, 65, 146, .15));position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:6px}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-main{position:relative;flex:1;width:100%;overflow:hidden}.telebox-quarantine-outer{width:100%;height:100%;overflow:hidden}.telebox-resize-handle{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;position:absolute;z-index:2147483647;touch-action:none}.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{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;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 .05s cubic-bezier(.4,.9,.71,1.02),height .05s 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{border:1px solid #383b42;border:var(--tele-boxBorder, 1px solid #383b42);box-shadow:0 4px 10px #383b4226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(56, 59, 66, .15))}.telebox-titlebar{-webkit-touch-callout:none;-webkit-user-select:none;box-sizing:border-box;height:26px;display:flex;align-items:center;user-select:none;touch-action:manipulation;color:#191919;color:var(--tele-titlebarColor, #191919);background-color:#fff;background-color:var(--tele-titlebarBackground, #fff);border-bottom:1px solid #eeeef7;border-bottom:var(--tele-titlebarBorderBottom, 1px solid #eeeef7)}.telebox-title-area{padding-left:16px;overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;color:#191919;color:var(--tele-titlebarColor, #191919);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}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10;touch-action:none}.telebox-titlebar-btns{padding-right:16px;white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;width:22px;height:22px;padding:0;outline:none;border:none;background:transparent;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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconMinimize, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-titlebar-icon-maximize{background:center/cover no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==);background-image:var(--tele-titlebarIconMaximize, 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,PHN2ZyB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9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);background-image:var(--tele-titlebarIconMaximizeActive, 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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconClose, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-titlebarBackground, #383b42);border-bottom:none;border-bottom:var(--tele-titlebarBorderBottom, none)}.telebox-manager-container{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:center;align-items:center;--tele-managerContainerBackground: #f9f9f9;--tele-managerStageBackground: #fff;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxContainerBackground: #f9f9f9;--tele-boxStageBackground: #fff;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxColor: #191919;--tele-boxBorder: 1px solid #e3e3ec;--tele-boxShadow: 0px 4px 10px 0px rgba(47, 65, 146, .15);--tele-boxFooterColor: #191919;--tele-boxFooterBackground: #fff;--tele-titlebarColor: #191919;--tele-titlebarBackground: #fff;--tele-titlebarBorderBottom: 1px solid #eeeef7;--tele-titlebarTabColor: #7b88a0;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #e5e5f0;--tele-collectorBackground: #fff;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#f9f9f9;background:var(--tele-managerContainerBackground, #f9f9f9)}.telebox-manager-container.telebox-is-maximized>.telebox-manager-stage,.telebox-manager-container.telebox-is-minimized>.telebox-manager-stage{overflow:visible}.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-maximize,.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-minimize,.telebox-manager-container.telebox-hide-fullscreen-titlebar .telebox-titlebar{display:none!important}.telebox-manager-stage{position:relative;overflow:hidden;background:#fff;background:var(--tele-managerStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-color-scheme-dark.telebox-manager-container{--tele-managerContainerBackground: #25282e;--tele-managerStageBackground: #272a30;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxContainerBackground: #25282e;--tele-boxStageBackground: #272a30;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxColor: #e9e9e9;--tele-boxBorder: 1px solid #383b42;--tele-boxShadow: 0px 4px 10px 0px rgba(56, 59, 66, .15);--tele-boxFooterColor: #e9e9e9;--tele-boxFooterBackground: #383b42;--tele-titlebarColor: #e9e9e9;--tele-titlebarBackground: #383b42;--tele-titlebarBorderBottom: none;--tele-titlebarTabColor: #e9e9e9;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #7b88a0;--tele-collectorBackground: #383b42;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#25282e;background:var(--tele-managerContainerBackground, #25282e)}.telebox-color-scheme-dark.telebox-manager-container>.telebox-manager-stage{background:#272a30;background:var(--tele-managerStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-collector{-webkit-touch-callout:none;-webkit-user-select:none;visibility:hidden;display:block;position:absolute;z-index:5120;width:40px;height:40px;margin:0;padding:0;border:none;outline:none;font-size:0;border-radius:50%;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center;-webkit-tap-highlight-color:transparent;background-color:#fff;background-color:var(--tele-collectorBackground, #fff);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#383b42;background-color:var(--tele-collectorBackground, #383b42);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-max-titlebar{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;display:none;position:absolute;top:0;left:0;width:100%;z-index:5100;border-top-left-radius:6px;border-top-right-radius:6px}.telebox-max-titlebar .telebox-title,.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-titles{display:none}.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-title{display:block}.telebox-max-titlebar-active{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:4px;width:4px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:2px;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:150px;padding:0 26px 0 16px;outline:none;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-width:1px;border-right-style:solid;cursor:pointer;user-select:none;color:#7b88a0;color:var(--tele-titlebarTabColor, #7b88a0);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#e5e5f0;border-right-color:var(--tele-titlebarTabDividerColor, #e5e5f0)}.telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark .telebox-titles-tab{color:#e9e9e9;color:var(--tele-titlebarTabColor, #e9e9e9);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#7b88a0;border-right-color:var(--tele-titlebarTabDividerColor, #7b88a0)}.telebox-color-scheme-dark .telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.fastboard-react-div{width:100%;height:100%}';
|
|
22
|
+
|
|
23
|
+
// inline-sass-stub:./src/style.scss
|
|
24
|
+
injectStyle(style_default);
|
|
8
25
|
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect;
|
|
9
26
|
function useUpdateEffect(effect, deps) {
|
|
10
27
|
const isFirst = useRef(true);
|
|
@@ -48,7 +65,7 @@ function useFastboard(config) {
|
|
|
48
65
|
const [fastboard, setFastboard] = useState(null);
|
|
49
66
|
useEffect(() => {
|
|
50
67
|
let fastboard2 = null;
|
|
51
|
-
|
|
68
|
+
createFastboardCore(config()).then((app) => {
|
|
52
69
|
if (!unmountRef.current) {
|
|
53
70
|
setFastboard(fastboard2 = app);
|
|
54
71
|
} else {
|
|
@@ -67,7 +84,7 @@ function useReplayFastboard(config) {
|
|
|
67
84
|
const [fastboard, setFastboard] = useState(null);
|
|
68
85
|
useEffect(() => {
|
|
69
86
|
let fastboard2 = null;
|
|
70
|
-
|
|
87
|
+
replayFastboardCore(config()).then((app) => {
|
|
71
88
|
if (!unmountRef.current) {
|
|
72
89
|
setFastboard(fastboard2 = app);
|
|
73
90
|
} else {
|
|
@@ -84,27 +101,48 @@ function useReplayFastboard(config) {
|
|
|
84
101
|
|
|
85
102
|
// src/RedoUndo.tsx
|
|
86
103
|
var RedoUndo = /* @__PURE__ */ wrapReactComponent(RedoUndo$1, "RedoUndo");
|
|
87
|
-
var ZoomControl = /* @__PURE__ */ wrapReactComponent(
|
|
88
|
-
|
|
104
|
+
var ZoomControl = /* @__PURE__ */ wrapReactComponent(
|
|
105
|
+
ZoomControl$1,
|
|
106
|
+
"ZoomControl"
|
|
107
|
+
);
|
|
108
|
+
var PageControl = /* @__PURE__ */ wrapReactComponent(
|
|
109
|
+
PageControl$1,
|
|
110
|
+
"PageControl"
|
|
111
|
+
);
|
|
89
112
|
var Toolbar = /* @__PURE__ */ wrapReactComponent(Toolbar$1, "Toolbar");
|
|
90
113
|
var Fastboard = /* @__PURE__ */ wrapReactComponent(Fastboard$1, "Fastboard");
|
|
91
|
-
var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
114
|
+
var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(
|
|
115
|
+
ReplayFastboard$1,
|
|
116
|
+
"ReplayFastboard"
|
|
117
|
+
);
|
|
118
|
+
function registerSlide() {
|
|
119
|
+
if (WindowManager.registered.has(NetlessAppSlide.kind))
|
|
120
|
+
return;
|
|
121
|
+
WindowManager.register({
|
|
122
|
+
kind: NetlessAppSlide.kind,
|
|
123
|
+
appOptions: { debug: false },
|
|
124
|
+
src: NetlessAppSlide,
|
|
125
|
+
addHooks
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
var DefaultApps = {};
|
|
129
|
+
function registerDefaultApps() {
|
|
130
|
+
Object.keys(DefaultApps).forEach((kind) => {
|
|
131
|
+
if (WindowManager.registered.has(kind))
|
|
132
|
+
return;
|
|
133
|
+
WindowManager.register({ kind, ...DefaultApps[kind] });
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
async function createFastboard(options) {
|
|
137
|
+
registerSlide();
|
|
138
|
+
registerDefaultApps();
|
|
139
|
+
return createFastboardCore(options);
|
|
140
|
+
}
|
|
141
|
+
async function replayFastboard(options) {
|
|
142
|
+
registerSlide();
|
|
143
|
+
registerDefaultApps();
|
|
144
|
+
return replayFastboardCore(options);
|
|
101
145
|
}
|
|
102
146
|
|
|
103
|
-
|
|
104
|
-
var style_default = '.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-main-view{position:absolute;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 .12s;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-laserPointer-image{margin-left:-22px;margin-top:3px}.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}.window-manager-view-wrapper{position:absolute;z-index:10}.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-quarantine{all:initial;position:relative;width:100%;height:100%;display:flex;flex-direction:column}.telebox-body-wrap{color:#191919;color:var(--tele-boxColor, #191919);flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center;position:relative}.telebox-content{width:100%;height:100%;position:relative;background-color:#f9f9f9;background-color:var(--tele-boxContainerBackground, #f9f9f9)}.telebox-box-stage{position:absolute;z-index:1;overflow:hidden;background-color:#fff;background-color:var(--tele-boxStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column;color:#191919;color:var(--tele-boxFooterColor, #191919);background-color:#fff;background-color:var(--tele-boxFooterBackground, #fff)}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-color-scheme-dark .telebox-body-wrap{color:#e9e9e9;color:var(--tele-boxColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-content{background-color:#25282e;background-color:var(--tele-boxContainerBackground, #25282e)}.telebox-color-scheme-dark .telebox-box-stage{background-color:#272a30;background-color:var(--tele-boxStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-color-scheme-dark .telebox-footer-wrap{color:#e9e9e9;color:var(--tele-boxFooterColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-boxFooterBackground, #383b42)}.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{border:1px solid #e3e3ec;border:var(--tele-boxBorder, 1px solid #e3e3ec);box-shadow:0 4px 10px #2f419226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(47, 65, 146, .15));position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:6px}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-main{position:relative;flex:1;width:100%;overflow:hidden}.telebox-quarantine-outer{width:100%;height:100%;overflow:hidden}.telebox-resize-handle{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;position:absolute;z-index:2147483647;touch-action:none}.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{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;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 .05s cubic-bezier(.4,.9,.71,1.02),height .05s 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{border:1px solid #383b42;border:var(--tele-boxBorder, 1px solid #383b42);box-shadow:0 4px 10px #383b4226;box-shadow:var(--tele-boxShadow, 0px 4px 10px 0px rgba(56, 59, 66, .15))}.telebox-titlebar{-webkit-touch-callout:none;-webkit-user-select:none;box-sizing:border-box;height:26px;display:flex;align-items:center;user-select:none;touch-action:manipulation;color:#191919;color:var(--tele-titlebarColor, #191919);background-color:#fff;background-color:var(--tele-titlebarBackground, #fff);border-bottom:1px solid #eeeef7;border-bottom:var(--tele-titlebarBorderBottom, 1px solid #eeeef7)}.telebox-title-area{padding-left:16px;overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;color:#191919;color:var(--tele-titlebarColor, #191919);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}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10;touch-action:none}.telebox-titlebar-btns{padding-right:16px;white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0}.telebox-titlebar-btn{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;width:22px;height:22px;padding:0;outline:none;border:none;background:transparent;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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconMinimize, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-titlebar-icon-maximize{background:center/cover no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==);background-image:var(--tele-titlebarIconMaximize, 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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAg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4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);background-image:var(--tele-titlebarIconMaximizeActive, 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;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=);background-image:var(--tele-titlebarIconClose, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=))}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;color:var(--tele-titlebarColor, #e9e9e9);background-color:#383b42;background-color:var(--tele-titlebarBackground, #383b42);border-bottom:none;border-bottom:var(--tele-titlebarBorderBottom, none)}.telebox-manager-container{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:center;align-items:center;--tele-managerContainerBackground: #f9f9f9;--tele-managerStageBackground: #fff;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxContainerBackground: #f9f9f9;--tele-boxStageBackground: #fff;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .08);--tele-boxColor: #191919;--tele-boxBorder: 1px solid #e3e3ec;--tele-boxShadow: 0px 4px 10px 0px rgba(47, 65, 146, .15);--tele-boxFooterColor: #191919;--tele-boxFooterBackground: #fff;--tele-titlebarColor: #191919;--tele-titlebarBackground: #fff;--tele-titlebarBorderBottom: 1px solid #eeeef7;--tele-titlebarTabColor: #7b88a0;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #e5e5f0;--tele-collectorBackground: #fff;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#f9f9f9;background:var(--tele-managerContainerBackground, #f9f9f9)}.telebox-manager-container.telebox-is-maximized>.telebox-manager-stage,.telebox-manager-container.telebox-is-minimized>.telebox-manager-stage{overflow:visible}.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-maximize,.telebox-manager-container.telebox-is-fullscreen .telebox-titlebar-icon-minimize,.telebox-manager-container.telebox-hide-fullscreen-titlebar .telebox-titlebar{display:none!important}.telebox-manager-stage{position:relative;overflow:hidden;background:#fff;background:var(--tele-managerStageBackground, #fff);box-shadow:0 0 16px #00000014;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .08))}.telebox-color-scheme-dark.telebox-manager-container{--tele-managerContainerBackground: #25282e;--tele-managerStageBackground: #272a30;--tele-managerStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxContainerBackground: #25282e;--tele-boxStageBackground: #272a30;--tele-boxStageShadow: 0px 0px 16px rgba(0, 0, 0, .24);--tele-boxColor: #e9e9e9;--tele-boxBorder: 1px solid #383b42;--tele-boxShadow: 0px 4px 10px 0px rgba(56, 59, 66, .15);--tele-boxFooterColor: #e9e9e9;--tele-boxFooterBackground: #383b42;--tele-titlebarColor: #e9e9e9;--tele-titlebarBackground: #383b42;--tele-titlebarBorderBottom: none;--tele-titlebarTabColor: #e9e9e9;--tele-titlebarTabFocusColor: #357bf6;--tele-titlebarTabBackground: transparent;--tele-titlebarTabDividerColor: #7b88a0;--tele-collectorBackground: #383b42;--tele-collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, .15);background:#25282e;background:var(--tele-managerContainerBackground, #25282e)}.telebox-color-scheme-dark.telebox-manager-container>.telebox-manager-stage{background:#272a30;background:var(--tele-managerStageBackground, #272a30);box-shadow:0 0 16px #0000003d;box-shadow:var(--tele-managerStageShadow, 0px 0px 16px rgba(0, 0, 0, .24))}.telebox-collector{-webkit-touch-callout:none;-webkit-user-select:none;visibility:hidden;display:block;position:absolute;z-index:5120;width:40px;height:40px;margin:0;padding:0;border:none;outline:none;font-size:0;border-radius:50%;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center;-webkit-tap-highlight-color:transparent;background-color:#fff;background-color:var(--tele-collectorBackground, #fff);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#383b42;background-color:var(--tele-collectorBackground, #383b42);box-shadow:0 2px 6px #2f419226;box-shadow:var(--tele-collectorShadow, 0px 2px 6px 0px rgba(47, 65, 146, .15))}.telebox-max-titlebar{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;display:none;position:absolute;top:0;left:0;width:100%;z-index:5100;border-top-left-radius:6px;border-top-right-radius:6px}.telebox-max-titlebar .telebox-title,.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-titles{display:none}.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-title{display:block}.telebox-max-titlebar-active{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:4px;width:4px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:2px;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:150px;padding:0 26px 0 16px;outline:none;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-width:1px;border-right-style:solid;cursor:pointer;user-select:none;color:#7b88a0;color:var(--tele-titlebarTabColor, #7b88a0);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#e5e5f0;border-right-color:var(--tele-titlebarTabDividerColor, #e5e5f0)}.telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark .telebox-titles-tab{color:#e9e9e9;color:var(--tele-titlebarTabColor, #e9e9e9);background-color:transparent;background-color:var(--tele-titlebarTabBackground, transparent);border-right-color:#7b88a0;border-right-color:var(--tele-titlebarTabDividerColor, #7b88a0)}.telebox-color-scheme-dark .telebox-titles-tab-focus{color:#357bf6;color:var(--tele-titlebarTabFocusColor, #357bf6)}.fastboard-react-div{width:100%;height:100%}';
|
|
105
|
-
|
|
106
|
-
// inline-sass-stub:./src/style.scss
|
|
107
|
-
injectStyle(style_default);
|
|
108
|
-
|
|
109
|
-
export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, useFastboard, useReplayFastboard };
|
|
147
|
+
export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, createFastboard, replayFastboard, useFastboard, useReplayFastboard };
|
|
110
148
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.tsx","../src/RedoUndo.tsx","../src/hooks.tsx","../src/ZoomControl.tsx","../src/PageControl.tsx","../src/Toolbar.tsx","../src/Fastboard.tsx"],"names":[],"mappings":";AAAA;AACA;;;ACCA;;;ACOA;AACA;AAEO,IAAM,4BAA4B,OAAO,aAAa,cAAc,kBAAkB;AAEtF,yBAAyB,QAAwB,MAAuB;AAC7E,QAAM,UAAU,OAAO,IAAI;AAE3B,4BAA0B,MAAM;AAC9B,QAAI,QAAQ,SAAS;AACnB,cAAQ,UAAU;AAClB;AAAA,IACF;AAEA,WAAO,OAAO;AAAA,EAChB,GAAG,IAAI;AACT;AAEO,4BACL,iBACA,MAC0B;AAC1B,0BAAwB,OAAc;AACpC,UAAM,CAAC,WAAW,gBAAgB,SAAgC,IAAI;AACtE,UAAM,YAAY,OAAmC,IAAI;AAEzD,8BAA0B,MAAM;AAC9B,UAAI,WAAW;AACb,kBAAU,UAAU,IAAI,gBAAgB,EAAE,QAAQ,WAAW,MAAM,CAAC;AAEpE,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AA2B,mCAAkC,cAAc,UAAU;;;AELlG;AAKO,IAAM,cAA8B,mCACzC,iBACA,aACF;;;ACRA;AAKO,IAAM,cAA8B,mCACzC,iBACA,aACF;;;ACRA;AAKO,IAAM,UAA0B,mCAAiC,aAAa,SAAS;;;ACL9F;AAKO,IAAM,YAA4B,mCAAmC,eAAe,WAAW;AAC/F,IAAM,kBAAkC,mCAC7C,qBACA,iBACF","sourcesContent":["export * from \"@netless/fastboard-core\";\nexport { apps } from \"@netless/fastboard-ui\";\nexport type {\n Theme,\n Language,\n GenericIcon,\n AppInToolbar,\n AppsInToolbar,\n FastboardUIConfig,\n} from \"@netless/fastboard-ui\";\nexport * from \"./RedoUndo\";\nexport * from \"./ZoomControl\";\nexport * from \"./PageControl\";\nexport * from \"./Toolbar\";\nexport * from \"./Fastboard\";\nexport { useFastboard, useReplayFastboard } from \"./hooks\";\n\nimport \"./style.scss\";\n\n// Caution about Export Namespace (Star)\n// esbuild can not handle nested `export *`, i.e. given two files:\n//\n// foo: export * from './bar'\n// bar: export * from 'baz' (external: baz)\n//\n// the result of bundling foo will be broken.\n// `export * from external-module` works and only works at the entry points.\n// ref: https://github.com/evanw/esbuild/issues/1737\n","import type { RedoUndoProps } from \"@netless/fastboard-ui\";\n\nimport { RedoUndo as RedoUndoImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { RedoUndoProps };\n\nexport const RedoUndo = /* @__PURE__ */ wrapReactComponent<RedoUndoProps>(RedoUndoImpl, \"RedoUndo\");\n","import type { SvelteComponent as SvelteComponentType } from \"svelte\";\nimport type { DependencyList, EffectCallback, FunctionComponent } from \"react\";\nimport type {\n FastboardApp,\n FastboardOptions,\n FastboardPlayer,\n FastboardReplayOptions,\n} from \"@netless/fastboard-core\";\n\nimport React, { useEffect, useLayoutEffect, useRef, useState } from \"react\";\nimport { createFastboard, replayFastboard } from \"@netless/fastboard-core\";\n\nexport const useIsomorphicLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport function useUpdateEffect(effect: EffectCallback, deps?: DependencyList) {\n const isFirst = useRef(true);\n\n useIsomorphicLayoutEffect(() => {\n if (isFirst.current) {\n isFirst.current = false;\n return;\n }\n\n return effect();\n }, deps);\n}\n\nexport function wrapReactComponent<Props>(\n SvelteComponent: typeof SvelteComponentType,\n name: string\n): FunctionComponent<Props> {\n function ReactComponent(props: Props) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const component = useRef<SvelteComponentType | null>(null);\n\n useIsomorphicLayoutEffect(() => {\n if (container) {\n component.current = new SvelteComponent({ target: container, props });\n\n return () => {\n if (component.current) {\n component.current.$destroy();\n }\n };\n }\n }, [container]);\n\n useUpdateEffect(() => {\n if (component.current) {\n component.current.$set(props);\n }\n }, [props]);\n\n return <div className=\"fastboard-react-div\" ref={setContainer} />;\n }\n\n ReactComponent.displayName = name;\n\n return ReactComponent;\n}\n\nexport function useFastboard(config: () => FastboardOptions): FastboardApp | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardApp | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardApp | null = null;\n\n createFastboard(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return fastboard;\n}\n\nexport function useReplayFastboard(config: () => FastboardReplayOptions): FastboardPlayer | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardPlayer | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardPlayer | null = null;\n\n replayFastboard(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return fastboard;\n}\n","import type { ZoomControlProps } from \"@netless/fastboard-ui\";\n\nimport { ZoomControl as ZoomControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ZoomControlProps };\n\nexport const ZoomControl = /* @__PURE__ */ wrapReactComponent<ZoomControlProps>(\n ZoomControlImpl,\n \"ZoomControl\"\n);\n","import type { PageControlProps } from \"@netless/fastboard-ui\";\n\nimport { PageControl as PageControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { PageControlProps };\n\nexport const PageControl = /* @__PURE__ */ wrapReactComponent<PageControlProps>(\n PageControlImpl,\n \"PageControl\"\n);\n","import type { ToolbarProps } from \"@netless/fastboard-ui\";\n\nimport { Toolbar as ToolbarImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ToolbarProps };\n\nexport const Toolbar = /* @__PURE__ */ wrapReactComponent<ToolbarProps>(ToolbarImpl, \"Toolbar\");\n","import type { FastboardProps, ReplayFastboardProps } from \"@netless/fastboard-ui\";\n\nimport { Fastboard as FastboardImpl, ReplayFastboard as ReplayFastboardImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { FastboardProps, ReplayFastboardProps };\n\nexport const Fastboard = /* @__PURE__ */ wrapReactComponent<FastboardProps>(FastboardImpl, \"Fastboard\");\nexport const ReplayFastboard = /* @__PURE__ */ wrapReactComponent<ReplayFastboardProps>(\n ReplayFastboardImpl,\n \"ReplayFastboard\"\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx","../src/RedoUndo.tsx","../src/hooks.tsx","../src/ZoomControl.tsx","../src/PageControl.tsx","../src/Toolbar.tsx","../src/Fastboard.tsx","../src/behaviors/netless-app.ts","../src/create.ts","../src/replay.ts"],"names":["fastboard","createFastboardCore","replayFastboardCore"],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,SAAS,YAAY;;;ACDrB,SAAS,YAAY,o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AA,IAC3B,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAEA,IAAM,cAEF,CAAC;AAEE,SAAS,sBAAsB;AACpC,SAAO,KAAK,WAAW,EAAE,QAAQ,UAAQ;AACvC,QAAI,cAAc,WAAW,IAAI,IAAI;AAAG;AACxC,kBAAc,SAAS,EAAE,MAAM,GAAG,YAAY,MAAM,CAAC;AAAA,EACvD,CAAC;AACH;;;AChCA,SAAS,uBAAAC,4BAA2B;AAkBpC,eAAsB,gBAAkC,SAA2B;AACjF,gBAAc;AACd,sBAAoB;AACpB,SAAOA,qBAAgC,OAAO;AAChD;;;ACtBA,SAAS,uBAAAC,4BAA2B;AAmBpC,eAAsB,gBAAkC,SAAiC;AACvF,gBAAc;AACd,sBAAoB;AACpB,SAAOA,qBAAgC,OAAO;AAChD","sourcesContent":["import \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport { apps } from \"@netless/fastboard-ui\";\nexport type {\n Theme,\n Language,\n GenericIcon,\n AppInToolbar,\n AppsInToolbar,\n FastboardUIConfig,\n} from \"@netless/fastboard-ui\";\nexport * from \"./RedoUndo\";\nexport * from \"./ZoomControl\";\nexport * from \"./PageControl\";\nexport * from \"./Toolbar\";\nexport * from \"./Fastboard\";\nexport * from \"./behaviors\";\nexport * from \"./create\";\nexport * from \"./replay\";\nexport { useFastboard, useReplayFastboard } from \"./hooks\";\n\n// Caution about Export Namespace (Star)\n// esbuild can not handle nested `export *`, i.e. given two files:\n//\n// foo: export * from './bar'\n// bar: export * from 'baz' (external: baz)\n//\n// the result of bundling foo will be broken.\n// `export * from external-module` works and only works at the entry points.\n// ref: https://github.com/evanw/esbuild/issues/1737\n","import type { RedoUndoProps } from \"@netless/fastboard-ui\";\n\nimport { RedoUndo as RedoUndoImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { RedoUndoProps };\n\nexport const RedoUndo = /* @__PURE__ */ wrapReactComponent<RedoUndoProps>(RedoUndoImpl, \"RedoUndo\");\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport type {\n FastboardApp,\n FastboardOptions,\n FastboardPlayer,\n FastboardReplayOptions,\n} from \"@netless/fastboard-core\";\nimport type { DependencyList, EffectCallback, FunctionComponent } from \"react\";\nimport type { SvelteComponent as SvelteComponentType } from \"svelte\";\n\nimport { createFastboardCore, replayFastboardCore } from \"@netless/fastboard-core\";\nimport React, { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nexport const useIsomorphicLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport function useUpdateEffect(effect: EffectCallback, deps?: DependencyList) {\n const isFirst = useRef(true);\n\n useIsomorphicLayoutEffect(() => {\n if (isFirst.current) {\n isFirst.current = false;\n return;\n }\n\n return effect();\n }, deps);\n}\n\nexport function wrapReactComponent<Props>(\n SvelteComponent: typeof SvelteComponentType,\n name: string\n): FunctionComponent<Props> {\n function ReactComponent(props: Props) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const component = useRef<SvelteComponentType | null>(null);\n\n useIsomorphicLayoutEffect(() => {\n if (container) {\n component.current = new SvelteComponent({ target: container, props });\n\n return () => {\n if (component.current) {\n component.current.$destroy();\n }\n };\n }\n }, [container]);\n\n useUpdateEffect(() => {\n if (component.current) {\n component.current.$set(props);\n }\n }, [props]);\n\n return <div className=\"fastboard-react-div\" ref={setContainer} />;\n }\n\n ReactComponent.displayName = name;\n\n return ReactComponent;\n}\n\nexport function useFastboard(config: () => FastboardOptions): FastboardApp | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardApp | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardApp | null = null;\n\n createFastboardCore(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n }, []);\n\n return fastboard;\n}\n\nexport function useReplayFastboard(config: () => FastboardReplayOptions): FastboardPlayer | null {\n const unmountRef = useRef(false);\n const [fastboard, setFastboard] = useState<FastboardPlayer | null>(null);\n\n useEffect(() => {\n let fastboard: FastboardPlayer | null = null;\n\n replayFastboardCore(config()).then(app => {\n if (!unmountRef.current) {\n setFastboard((fastboard = app));\n } else {\n app.destroy();\n }\n });\n\n return () => {\n unmountRef.current = true;\n fastboard && fastboard.destroy();\n };\n }, []);\n\n return fastboard;\n}\n","import type { ZoomControlProps } from \"@netless/fastboard-ui\";\n\nimport { ZoomControl as ZoomControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ZoomControlProps };\n\nexport const ZoomControl = /* @__PURE__ */ wrapReactComponent<ZoomControlProps>(\n ZoomControlImpl,\n \"ZoomControl\"\n);\n","import type { PageControlProps } from \"@netless/fastboard-ui\";\n\nimport { PageControl as PageControlImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { PageControlProps };\n\nexport const PageControl = /* @__PURE__ */ wrapReactComponent<PageControlProps>(\n PageControlImpl,\n \"PageControl\"\n);\n","import type { ToolbarProps } from \"@netless/fastboard-ui\";\n\nimport { Toolbar as ToolbarImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { ToolbarProps };\n\nexport const Toolbar = /* @__PURE__ */ wrapReactComponent<ToolbarProps>(ToolbarImpl, \"Toolbar\");\n","import type { FastboardProps, ReplayFastboardProps } from \"@netless/fastboard-ui\";\n\nimport { Fastboard as FastboardImpl, ReplayFastboard as ReplayFastboardImpl } from \"@netless/fastboard-ui\";\nimport { wrapReactComponent } from \"./hooks\";\n\nexport type { FastboardProps, ReplayFastboardProps };\n\nexport const Fastboard = /* @__PURE__ */ wrapReactComponent<FastboardProps>(FastboardImpl, \"Fastboard\");\nexport const ReplayFastboard = /* @__PURE__ */ wrapReactComponent<ReplayFastboardProps>(\n ReplayFastboardImpl,\n \"ReplayFastboard\"\n);\n","import type {\n AppOptions as NetlessAppSlideAppOptions,\n Attributes as NetlessAppSlideAttributes,\n SlideState,\n SlideViewerOptions,\n} from \"@netless/app-slide\";\nimport type { RegisterParams } from \"@netless/window-manager\";\n\nimport { WindowManager } from \"@netless/window-manager\";\n\nimport NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from \"@netless/app-slide\";\n\nexport { Slide, SlideViewer, previewSlide };\nexport type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };\n\nexport function registerSlide() {\n if (WindowManager.registered.has(NetlessAppSlide.kind)) return;\n WindowManager.register({\n kind: NetlessAppSlide.kind,\n appOptions: { debug: false } as NetlessAppSlideAppOptions,\n src: NetlessAppSlide,\n addHooks,\n });\n}\n\nconst DefaultApps: {\n [kind: string]: Omit<RegisterParams, \"kind\">;\n} = {};\n\nexport function registerDefaultApps() {\n Object.keys(DefaultApps).forEach(kind => {\n if (WindowManager.registered.has(kind)) return;\n WindowManager.register({ kind, ...DefaultApps[kind] });\n });\n}\n","import type { FastboardOptions } from \"@netless/fastboard-core\";\n\nimport { createFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardApp instance.\n * @example\n * let app = await createFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * joinRoom: {\n * uid: unique_id,\n * uuid: import.meta.env.VITE_ROOM_UUID,\n * roomToken: import.meta.env.VITE_ROOM_TOKEN,\n * },\n * })\n */\nexport async function createFastboard<TEventData = any>(options: FastboardOptions) {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\n}\n","import type { FastboardReplayOptions } from \"@netless/fastboard-core\";\n\nimport { replayFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardPlayer instance.\n * @example\n * let player = await replayFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * replayRoom: {\n * room: \"room uuid\",\n * roomToken: \"NETLESSROOM_...\",\n * beginTimestamp: 1646619090394,\n * duration: 70448,\n * },\n * })\n */\nexport async function replayFastboard<TEventData = any>(options: FastboardReplayOptions) {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netless/fastboard-react",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.2",
|
|
4
4
|
"description": "React components of @netless/fastboard.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,18 +9,23 @@
|
|
|
9
9
|
],
|
|
10
10
|
"repository": "netless-io/fastboard",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"
|
|
12
|
+
"@netless/window-manager": ">=1.0.0-canary.0",
|
|
13
|
+
"react": "*",
|
|
14
|
+
"white-web-sdk": ">=2.16.0"
|
|
13
15
|
},
|
|
14
16
|
"dependencies": {
|
|
15
|
-
"@netless/
|
|
16
|
-
"@netless/fastboard-
|
|
17
|
+
"@netless/app-slide": "0.3.0-canary.7",
|
|
18
|
+
"@netless/fastboard-core": "1.0.0-canary.2",
|
|
19
|
+
"@netless/fastboard-ui": "1.0.0-canary.2",
|
|
20
|
+
"@netless/synced-store": "^2.0.6"
|
|
17
21
|
},
|
|
18
22
|
"devDependencies": {
|
|
19
23
|
"@netless/esbuild-plugin-inline-sass": "0.1.0",
|
|
20
|
-
"@types/react": "^18.0.
|
|
24
|
+
"@types/react": "^18.0.17",
|
|
21
25
|
"@types/react-dom": "^18.0.6",
|
|
22
26
|
"react": "^18.2.0",
|
|
23
|
-
"react-dom": "^18.2.0"
|
|
27
|
+
"react-dom": "^18.2.0",
|
|
28
|
+
"white-web-sdk": "^2.16.33"
|
|
24
29
|
},
|
|
25
30
|
"scripts": {
|
|
26
31
|
"cleanup": "rimraf dist",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AppOptions as NetlessAppSlideAppOptions,
|
|
3
|
+
Attributes as NetlessAppSlideAttributes,
|
|
4
|
+
SlideState,
|
|
5
|
+
SlideViewerOptions,
|
|
6
|
+
} from "@netless/app-slide";
|
|
7
|
+
import type { RegisterParams } from "@netless/window-manager";
|
|
8
|
+
|
|
9
|
+
import { WindowManager } from "@netless/window-manager";
|
|
10
|
+
|
|
11
|
+
import NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from "@netless/app-slide";
|
|
12
|
+
|
|
13
|
+
export { Slide, SlideViewer, previewSlide };
|
|
14
|
+
export type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };
|
|
15
|
+
|
|
16
|
+
export function registerSlide() {
|
|
17
|
+
if (WindowManager.registered.has(NetlessAppSlide.kind)) return;
|
|
18
|
+
WindowManager.register({
|
|
19
|
+
kind: NetlessAppSlide.kind,
|
|
20
|
+
appOptions: { debug: false } as NetlessAppSlideAppOptions,
|
|
21
|
+
src: NetlessAppSlide,
|
|
22
|
+
addHooks,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const DefaultApps: {
|
|
27
|
+
[kind: string]: Omit<RegisterParams, "kind">;
|
|
28
|
+
} = {};
|
|
29
|
+
|
|
30
|
+
export function registerDefaultApps() {
|
|
31
|
+
Object.keys(DefaultApps).forEach(kind => {
|
|
32
|
+
if (WindowManager.registered.has(kind)) return;
|
|
33
|
+
WindowManager.register({ kind, ...DefaultApps[kind] });
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { name, version } from "@netless/fastboard-core";
|
|
2
|
+
|
|
3
|
+
interface InjectTarget {
|
|
4
|
+
__netlessUA?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let injected = false;
|
|
8
|
+
export function ensureNetlessUA() {
|
|
9
|
+
if (typeof window !== "undefined" && !injected) {
|
|
10
|
+
injected = true;
|
|
11
|
+
let str = (window as InjectTarget).__netlessUA || "";
|
|
12
|
+
str += ` ${name}/${version} `;
|
|
13
|
+
(window as InjectTarget).__netlessUA = str;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/create.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FastboardOptions } from "@netless/fastboard-core";
|
|
2
|
+
|
|
3
|
+
import { createFastboardCore } from "@netless/fastboard-core";
|
|
4
|
+
import { registerDefaultApps, registerSlide } from "./behaviors/netless-app";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Create a FastboardApp instance.
|
|
8
|
+
* @example
|
|
9
|
+
* let app = await createFastboard({
|
|
10
|
+
* sdkConfig: {
|
|
11
|
+
* appIdentifier: import.meta.env.VITE_APPID,
|
|
12
|
+
* region: 'cn-hz',
|
|
13
|
+
* },
|
|
14
|
+
* joinRoom: {
|
|
15
|
+
* uid: unique_id,
|
|
16
|
+
* uuid: import.meta.env.VITE_ROOM_UUID,
|
|
17
|
+
* roomToken: import.meta.env.VITE_ROOM_TOKEN,
|
|
18
|
+
* },
|
|
19
|
+
* })
|
|
20
|
+
*/
|
|
21
|
+
export async function createFastboard<TEventData = any>(options: FastboardOptions) {
|
|
22
|
+
registerSlide();
|
|
23
|
+
registerDefaultApps();
|
|
24
|
+
return createFastboardCore<TEventData>(options);
|
|
25
|
+
}
|
package/src/hooks.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import type { DependencyList, EffectCallback, FunctionComponent } from "react";
|
|
1
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3
2
|
import type {
|
|
4
3
|
FastboardApp,
|
|
5
4
|
FastboardOptions,
|
|
6
5
|
FastboardPlayer,
|
|
7
6
|
FastboardReplayOptions,
|
|
8
7
|
} from "@netless/fastboard-core";
|
|
8
|
+
import type { DependencyList, EffectCallback, FunctionComponent } from "react";
|
|
9
|
+
import type { SvelteComponent as SvelteComponentType } from "svelte";
|
|
9
10
|
|
|
11
|
+
import { createFastboardCore, replayFastboardCore } from "@netless/fastboard-core";
|
|
10
12
|
import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
11
|
-
import { createFastboard, replayFastboard } from "@netless/fastboard-core";
|
|
12
13
|
|
|
13
14
|
export const useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect;
|
|
14
15
|
|
|
@@ -66,7 +67,7 @@ export function useFastboard(config: () => FastboardOptions): FastboardApp | nul
|
|
|
66
67
|
useEffect(() => {
|
|
67
68
|
let fastboard: FastboardApp | null = null;
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
createFastboardCore(config()).then(app => {
|
|
70
71
|
if (!unmountRef.current) {
|
|
71
72
|
setFastboard((fastboard = app));
|
|
72
73
|
} else {
|
|
@@ -78,7 +79,6 @@ export function useFastboard(config: () => FastboardOptions): FastboardApp | nul
|
|
|
78
79
|
unmountRef.current = true;
|
|
79
80
|
fastboard && fastboard.destroy();
|
|
80
81
|
};
|
|
81
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
82
82
|
}, []);
|
|
83
83
|
|
|
84
84
|
return fastboard;
|
|
@@ -91,7 +91,7 @@ export function useReplayFastboard(config: () => FastboardReplayOptions): Fastbo
|
|
|
91
91
|
useEffect(() => {
|
|
92
92
|
let fastboard: FastboardPlayer | null = null;
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
replayFastboardCore(config()).then(app => {
|
|
95
95
|
if (!unmountRef.current) {
|
|
96
96
|
setFastboard((fastboard = app));
|
|
97
97
|
} else {
|
|
@@ -103,7 +103,6 @@ export function useReplayFastboard(config: () => FastboardReplayOptions): Fastbo
|
|
|
103
103
|
unmountRef.current = true;
|
|
104
104
|
fastboard && fastboard.destroy();
|
|
105
105
|
};
|
|
106
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
107
106
|
}, []);
|
|
108
107
|
|
|
109
108
|
return fastboard;
|
package/src/index.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "./style.scss";
|
|
2
|
+
|
|
1
3
|
export * from "@netless/fastboard-core";
|
|
2
4
|
export { apps } from "@netless/fastboard-ui";
|
|
3
5
|
export type {
|
|
@@ -13,10 +15,11 @@ export * from "./ZoomControl";
|
|
|
13
15
|
export * from "./PageControl";
|
|
14
16
|
export * from "./Toolbar";
|
|
15
17
|
export * from "./Fastboard";
|
|
18
|
+
export * from "./behaviors";
|
|
19
|
+
export * from "./create";
|
|
20
|
+
export * from "./replay";
|
|
16
21
|
export { useFastboard, useReplayFastboard } from "./hooks";
|
|
17
22
|
|
|
18
|
-
import "./style.scss";
|
|
19
|
-
|
|
20
23
|
// Caution about Export Namespace (Star)
|
|
21
24
|
// esbuild can not handle nested `export *`, i.e. given two files:
|
|
22
25
|
//
|
package/src/replay.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { FastboardReplayOptions } from "@netless/fastboard-core";
|
|
2
|
+
|
|
3
|
+
import { replayFastboardCore } from "@netless/fastboard-core";
|
|
4
|
+
import { registerDefaultApps, registerSlide } from "./behaviors/netless-app";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Create a FastboardPlayer instance.
|
|
8
|
+
* @example
|
|
9
|
+
* let player = await replayFastboard({
|
|
10
|
+
* sdkConfig: {
|
|
11
|
+
* appIdentifier: import.meta.env.VITE_APPID,
|
|
12
|
+
* region: 'cn-hz',
|
|
13
|
+
* },
|
|
14
|
+
* replayRoom: {
|
|
15
|
+
* room: "room uuid",
|
|
16
|
+
* roomToken: "NETLESSROOM_...",
|
|
17
|
+
* beginTimestamp: 1646619090394,
|
|
18
|
+
* duration: 70448,
|
|
19
|
+
* },
|
|
20
|
+
* })
|
|
21
|
+
*/
|
|
22
|
+
export async function replayFastboard<TEventData = any>(options: FastboardReplayOptions) {
|
|
23
|
+
registerSlide();
|
|
24
|
+
registerDefaultApps();
|
|
25
|
+
return replayFastboardCore<TEventData>(options);
|
|
26
|
+
}
|