@netless/fastboard-react 1.0.0-canary.1 → 1.0.0-canary.4

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 CHANGED
@@ -3,6 +3,7 @@ export * from '@netless/fastboard-core';
3
3
  import { RedoUndoProps, ZoomControlProps, PageControlProps, ToolbarProps, FastboardProps, ReplayFastboardProps } from '@netless/fastboard-ui';
4
4
  export { AppInToolbar, AppsInToolbar, FastboardProps, FastboardUIConfig, GenericIcon, Language, PageControlProps, RedoUndoProps, ReplayFastboardProps, Theme, ToolbarProps, ZoomControlProps, apps } from '@netless/fastboard-ui';
5
5
  import * as react from 'react';
6
+ export { Attributes as NetlessAppSlideAttributes, Slide, SlideState, SlideViewer, SlideViewerOptions, previewSlide } from '@netless/app-slide';
6
7
 
7
8
  declare const RedoUndo: react.FunctionComponent<RedoUndoProps>;
8
9
 
@@ -15,7 +16,42 @@ declare const Toolbar: react.FunctionComponent<ToolbarProps>;
15
16
  declare const Fastboard: react.FunctionComponent<FastboardProps>;
16
17
  declare const ReplayFastboard: react.FunctionComponent<ReplayFastboardProps>;
17
18
 
19
+ /**
20
+ * Create a FastboardApp instance.
21
+ * @example
22
+ * let app = await createFastboard({
23
+ * sdkConfig: {
24
+ * appIdentifier: import.meta.env.VITE_APPID,
25
+ * region: 'cn-hz',
26
+ * },
27
+ * joinRoom: {
28
+ * uid: unique_id,
29
+ * uuid: import.meta.env.VITE_ROOM_UUID,
30
+ * roomToken: import.meta.env.VITE_ROOM_TOKEN,
31
+ * },
32
+ * })
33
+ */
34
+ declare function createFastboard<TEventData = any>(options: FastboardOptions): Promise<FastboardApp<TEventData>>;
35
+
36
+ /**
37
+ * Create a FastboardPlayer instance.
38
+ * @example
39
+ * let player = await replayFastboard({
40
+ * sdkConfig: {
41
+ * appIdentifier: import.meta.env.VITE_APPID,
42
+ * region: 'cn-hz',
43
+ * },
44
+ * replayRoom: {
45
+ * room: "room uuid",
46
+ * roomToken: "NETLESSROOM_...",
47
+ * beginTimestamp: 1646619090394,
48
+ * duration: 70448,
49
+ * },
50
+ * })
51
+ */
52
+ declare function replayFastboard<TEventData = any>(options: FastboardReplayOptions): Promise<FastboardPlayer<TEventData>>;
53
+
18
54
  declare function useFastboard(config: () => FastboardOptions): FastboardApp | null;
19
55
  declare function useReplayFastboard(config: () => FastboardReplayOptions): FastboardPlayer | null;
20
56
 
21
- export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, useFastboard, useReplayFastboard };
57
+ export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, createFastboard, replayFastboard, useFastboard, useReplayFastboard };
package/dist/index.js CHANGED
@@ -1,53 +1,66 @@
1
1
  'use strict';
2
2
 
3
- var __create = Object.create;
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 });
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var fastboardCore = require('@netless/fastboard-core');
6
+ var fastboardUi = require('@netless/fastboard-ui');
7
+ var windowManager = require('@netless/window-manager');
8
+ var NetlessAppSlide = require('@netless/app-slide');
9
+ var React = require('react');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var NetlessAppSlide__default = /*#__PURE__*/_interopDefaultLegacy(NetlessAppSlide);
14
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
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);
18
23
  }
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);
24
+ }
24
25
 
25
- // src/index.tsx
26
- var src_exports = {};
27
- __export(src_exports, {
28
- Fastboard: () => Fastboard,
29
- PageControl: () => PageControl,
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");
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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPH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ICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==))}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21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MgMHoiIC8+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%}';
41
28
 
42
- // src/RedoUndo.tsx
43
- var import_fastboard_ui = require("@netless/fastboard-ui");
29
+ // inline-sass-stub:./src/style.scss
30
+ injectStyle(style_default);
31
+ function registerSlide() {
32
+ if (windowManager.WindowManager.registered.has(NetlessAppSlide__default["default"].kind))
33
+ return;
34
+ windowManager.WindowManager.register({
35
+ kind: NetlessAppSlide__default["default"].kind,
36
+ appOptions: { debug: false },
37
+ src: NetlessAppSlide__default["default"],
38
+ addHooks: NetlessAppSlide.addHooks
39
+ });
40
+ }
41
+ var DefaultApps = {};
42
+ function registerDefaultApps() {
43
+ Object.keys(DefaultApps).forEach((kind) => {
44
+ if (windowManager.WindowManager.registered.has(kind))
45
+ return;
46
+ windowManager.WindowManager.register({ kind, ...DefaultApps[kind] });
47
+ });
48
+ }
44
49
 
45
- // src/hooks.tsx
46
- var import_react = __toESM(require("react"));
47
- var import_fastboard_core = require("@netless/fastboard-core");
48
- var useIsomorphicLayoutEffect = typeof document !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
50
+ // src/create.ts
51
+ async function createFastboard(options) {
52
+ registerSlide();
53
+ registerDefaultApps();
54
+ return fastboardCore.createFastboardCore(options);
55
+ }
56
+ async function replayFastboard(options) {
57
+ registerSlide();
58
+ registerDefaultApps();
59
+ return fastboardCore.replayFastboardCore(options);
60
+ }
61
+ var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
49
62
  function useUpdateEffect(effect, deps) {
50
- const isFirst = (0, import_react.useRef)(true);
63
+ const isFirst = React.useRef(true);
51
64
  useIsomorphicLayoutEffect(() => {
52
65
  if (isFirst.current) {
53
66
  isFirst.current = false;
@@ -58,8 +71,8 @@ function useUpdateEffect(effect, deps) {
58
71
  }
59
72
  function wrapReactComponent(SvelteComponent, name) {
60
73
  function ReactComponent(props) {
61
- const [container, setContainer] = (0, import_react.useState)(null);
62
- const component = (0, import_react.useRef)(null);
74
+ const [container, setContainer] = React.useState(null);
75
+ const component = React.useRef(null);
63
76
  useIsomorphicLayoutEffect(() => {
64
77
  if (container) {
65
78
  component.current = new SvelteComponent({ target: container, props });
@@ -75,7 +88,7 @@ function wrapReactComponent(SvelteComponent, name) {
75
88
  component.current.$set(props);
76
89
  }
77
90
  }, [props]);
78
- return /* @__PURE__ */ import_react.default.createElement("div", {
91
+ return /* @__PURE__ */ React__default["default"].createElement("div", {
79
92
  className: "fastboard-react-div",
80
93
  ref: setContainer
81
94
  });
@@ -84,11 +97,11 @@ function wrapReactComponent(SvelteComponent, name) {
84
97
  return ReactComponent;
85
98
  }
86
99
  function useFastboard(config) {
87
- const unmountRef = (0, import_react.useRef)(false);
88
- const [fastboard, setFastboard] = (0, import_react.useState)(null);
89
- (0, import_react.useEffect)(() => {
100
+ const unmountRef = React.useRef(false);
101
+ const [fastboard, setFastboard] = React.useState(null);
102
+ React.useEffect(() => {
90
103
  let fastboard2 = null;
91
- (0, import_fastboard_core.createFastboard)(config()).then((app) => {
104
+ createFastboard(config()).then((app) => {
92
105
  if (!unmountRef.current) {
93
106
  setFastboard(fastboard2 = app);
94
107
  } else {
@@ -103,11 +116,11 @@ function useFastboard(config) {
103
116
  return fastboard;
104
117
  }
105
118
  function useReplayFastboard(config) {
106
- const unmountRef = (0, import_react.useRef)(false);
107
- const [fastboard, setFastboard] = (0, import_react.useState)(null);
108
- (0, import_react.useEffect)(() => {
119
+ const unmountRef = React.useRef(false);
120
+ const [fastboard, setFastboard] = React.useState(null);
121
+ React.useEffect(() => {
109
122
  let fastboard2 = null;
110
- (0, import_fastboard_core.replayFastboard)(config()).then((app) => {
123
+ replayFastboard(config()).then((app) => {
111
124
  if (!unmountRef.current) {
112
125
  setFastboard(fastboard2 = app);
113
126
  } else {
@@ -123,38 +136,52 @@ function useReplayFastboard(config) {
123
136
  }
124
137
 
125
138
  // src/RedoUndo.tsx
126
- var RedoUndo = /* @__PURE__ */ wrapReactComponent(import_fastboard_ui.RedoUndo, "RedoUndo");
127
-
128
- // src/ZoomControl.tsx
129
- var import_fastboard_ui2 = require("@netless/fastboard-ui");
130
- var ZoomControl = /* @__PURE__ */ wrapReactComponent(import_fastboard_ui2.ZoomControl, "ZoomControl");
139
+ var RedoUndo = /* @__PURE__ */ wrapReactComponent(fastboardUi.RedoUndo, "RedoUndo");
140
+ var ZoomControl = /* @__PURE__ */ wrapReactComponent(
141
+ fastboardUi.ZoomControl,
142
+ "ZoomControl"
143
+ );
144
+ var PageControl = /* @__PURE__ */ wrapReactComponent(
145
+ fastboardUi.PageControl,
146
+ "PageControl"
147
+ );
148
+ var Toolbar = /* @__PURE__ */ wrapReactComponent(fastboardUi.Toolbar, "Toolbar");
149
+ var Fastboard = /* @__PURE__ */ wrapReactComponent(fastboardUi.Fastboard, "Fastboard");
150
+ var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(
151
+ fastboardUi.ReplayFastboard,
152
+ "ReplayFastboard"
153
+ );
131
154
 
132
- // src/PageControl.tsx
133
- var import_fastboard_ui3 = require("@netless/fastboard-ui");
134
- var PageControl = /* @__PURE__ */ wrapReactComponent(import_fastboard_ui3.PageControl, "PageControl");
135
-
136
- // src/Toolbar.tsx
137
- var import_fastboard_ui4 = require("@netless/fastboard-ui");
138
- var Toolbar = /* @__PURE__ */ wrapReactComponent(import_fastboard_ui4.Toolbar, "Toolbar");
139
-
140
- // src/Fastboard.tsx
141
- var import_fastboard_ui5 = require("@netless/fastboard-ui");
142
- var Fastboard = /* @__PURE__ */ wrapReactComponent(import_fastboard_ui5.Fastboard, "Fastboard");
143
- var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(import_fastboard_ui5.ReplayFastboard, "ReplayFastboard");
144
-
145
- // inline-sass-helper:inline-sass-style-helper.js
146
- function injectStyle(text) {
147
- if (typeof document !== "undefined") {
148
- var style = document.createElement("style");
149
- var node = document.createTextNode(text);
150
- style.appendChild(node);
151
- document.head.appendChild(style);
152
- }
153
- }
154
-
155
- // inline-sass-content:./src/style.scss
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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm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KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==))}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);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
- // inline-sass-stub:./src/style.scss
159
- injectStyle(style_default);
155
+ Object.defineProperty(exports, 'apps', {
156
+ enumerable: true,
157
+ get: function () { return fastboardUi.apps; }
158
+ });
159
+ Object.defineProperty(exports, 'Slide', {
160
+ enumerable: true,
161
+ get: function () { return NetlessAppSlide.Slide; }
162
+ });
163
+ Object.defineProperty(exports, 'SlideViewer', {
164
+ enumerable: true,
165
+ get: function () { return NetlessAppSlide.SlideViewer; }
166
+ });
167
+ Object.defineProperty(exports, 'previewSlide', {
168
+ enumerable: true,
169
+ get: function () { return NetlessAppSlide.previewSlide; }
170
+ });
171
+ exports.Fastboard = Fastboard;
172
+ exports.PageControl = PageControl;
173
+ exports.RedoUndo = RedoUndo;
174
+ exports.ReplayFastboard = ReplayFastboard;
175
+ exports.Toolbar = Toolbar;
176
+ exports.ZoomControl = ZoomControl;
177
+ exports.createFastboard = createFastboard;
178
+ exports.replayFastboard = replayFastboard;
179
+ exports.useFastboard = useFastboard;
180
+ exports.useReplayFastboard = useReplayFastboard;
181
+ Object.keys(fastboardCore).forEach(function (k) {
182
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
183
+ enumerable: true,
184
+ get: function () { return fastboardCore[k]; }
185
+ });
186
+ });
160
187
  //# 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,cAAc,+BAAkB;AAEtF,yBAAyB,QAAwB,MAAuB;AAC7E,QAAM,UAAU,yBAAO,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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,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/create.ts","../src/behaviors/netless-app.ts","../src/replay.ts","../src/hooks.tsx","../src/ZoomControl.tsx","../src/PageControl.tsx","../src/Toolbar.tsx","../src/Fastboard.tsx"],"names":["fastboard"],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,SAAS,YAAY;;;ACDrB,SAAS,YAAY,oBAAoB;;;ACAzC,SAAS,2BAA2B;;;ACMpC,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;;;ADdA,eAAsB,gBACpB,SACmC;AACnC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD;;;AExBA,SAAS,2BAA2B;AAmBpC,eAAsB,gBACpB,SACsC;AACtC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD;;;ACfA,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,EACh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oBAAgB,OAAO,CAAC,EAAE,KAAK,SAAO;AACpC,UAAI,CAAC,WAAW,SAAS;AACvB,qBAAcA,aAAY,GAAI;AAAA,MAChC,OAAO;AACL,YAAI,QAAQ;AAAA,MACd;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,iBAAW,UAAU;AACrB,MAAAA,cAAaA,WAAU,QAAQ;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;;;AJtGO,IAAM,WAA2B,mCAAkC,cAAc,UAAU;;;AKLlG,SAAS,eAAe,uBAAuB;AAKxC,IAAM,cAA8B;AAAA,EACzC;AAAA,EACA;AACF;;;ACRA,SAAS,eAAe,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","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","import type { FastboardApp, 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>(\n options: FastboardOptions\n): Promise<FastboardApp<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\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 { FastboardPlayer, 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>(\n options: FastboardReplayOptions\n): Promise<FastboardPlayer<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\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 { createFastboard } from \"./create\";\nimport { replayFastboard } from \"./replay\";\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 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 }, []);\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 }, []);\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"]}
package/dist/index.mjs CHANGED
@@ -1,10 +1,57 @@
1
- import { createFastboard, replayFastboard } from '@netless/fastboard-core';
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
+ import { WindowManager } from '@netless/window-manager';
6
+ import NetlessAppSlide, { addHooks } from '@netless/app-slide';
7
+ export { Slide, SlideViewer, previewSlide } from '@netless/app-slide';
5
8
  import React, { useRef, useState, useEffect, useLayoutEffect } from 'react';
6
9
 
7
- // src/index.tsx
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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMj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8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);background-image:var(--tele-titlebarIconMaximizeActive, url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3L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jk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K))}.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);
25
+ function registerSlide() {
26
+ if (WindowManager.registered.has(NetlessAppSlide.kind))
27
+ return;
28
+ WindowManager.register({
29
+ kind: NetlessAppSlide.kind,
30
+ appOptions: { debug: false },
31
+ src: NetlessAppSlide,
32
+ addHooks
33
+ });
34
+ }
35
+ var DefaultApps = {};
36
+ function registerDefaultApps() {
37
+ Object.keys(DefaultApps).forEach((kind) => {
38
+ if (WindowManager.registered.has(kind))
39
+ return;
40
+ WindowManager.register({ kind, ...DefaultApps[kind] });
41
+ });
42
+ }
43
+
44
+ // src/create.ts
45
+ async function createFastboard(options) {
46
+ registerSlide();
47
+ registerDefaultApps();
48
+ return createFastboardCore(options);
49
+ }
50
+ async function replayFastboard(options) {
51
+ registerSlide();
52
+ registerDefaultApps();
53
+ return replayFastboardCore(options);
54
+ }
8
55
  var useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect;
9
56
  function useUpdateEffect(effect, deps) {
10
57
  const isFirst = useRef(true);
@@ -84,27 +131,20 @@ function useReplayFastboard(config) {
84
131
 
85
132
  // src/RedoUndo.tsx
86
133
  var RedoUndo = /* @__PURE__ */ wrapReactComponent(RedoUndo$1, "RedoUndo");
87
- var ZoomControl = /* @__PURE__ */ wrapReactComponent(ZoomControl$1, "ZoomControl");
88
- var PageControl = /* @__PURE__ */ wrapReactComponent(PageControl$1, "PageControl");
134
+ var ZoomControl = /* @__PURE__ */ wrapReactComponent(
135
+ ZoomControl$1,
136
+ "ZoomControl"
137
+ );
138
+ var PageControl = /* @__PURE__ */ wrapReactComponent(
139
+ PageControl$1,
140
+ "PageControl"
141
+ );
89
142
  var Toolbar = /* @__PURE__ */ wrapReactComponent(Toolbar$1, "Toolbar");
90
143
  var Fastboard = /* @__PURE__ */ wrapReactComponent(Fastboard$1, "Fastboard");
91
- var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(ReplayFastboard$1, "ReplayFastboard");
92
-
93
- // inline-sass-helper:inline-sass-style-helper.js
94
- function injectStyle(text) {
95
- if (typeof document !== "undefined") {
96
- var style = document.createElement("style");
97
- var node = document.createTextNode(text);
98
- style.appendChild(node);
99
- document.head.appendChild(style);
100
- }
101
- }
102
-
103
- // inline-sass-content:./src/style.scss
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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5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yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K);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);
144
+ var ReplayFastboard = /* @__PURE__ */ wrapReactComponent(
145
+ ReplayFastboard$1,
146
+ "ReplayFastboard"
147
+ );
108
148
 
109
- export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, useFastboard, useReplayFastboard };
149
+ export { Fastboard, PageControl, RedoUndo, ReplayFastboard, Toolbar, ZoomControl, createFastboard, replayFastboard, useFastboard, useReplayFastboard };
110
150
  //# sourceMappingURL=index.mjs.map
@@ -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,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,CAAC,CAAC;AAEL,SAAO;AACT;;;ADtGO,IAAM,WAA2B,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/create.ts","../src/behaviors/netless-app.ts","../src/replay.ts","../src/hooks.tsx","../src/ZoomControl.tsx","../src/PageControl.tsx","../src/Toolbar.tsx","../src/Fastboard.tsx"],"names":["fastboard"],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,SAAS,YAAY;;;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AU,QAAQ;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;;;AJtGO,IAAM,WAA2B,mCAAkC,cAAc,UAAU;;;AKLlG,SAAS,eAAe,uBAAuB;AAKxC,IAAM,cAA8B;AAAA,EACzC;AAAA,EACA;AACF;;;ACRA,SAAS,eAAe,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","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","import type { FastboardApp, 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>(\n options: FastboardOptions\n): Promise<FastboardApp<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\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 { FastboardPlayer, 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>(\n options: FastboardReplayOptions\n): Promise<FastboardPlayer<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\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 { createFastboard } from \"./create\";\nimport { replayFastboard } from \"./replay\";\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 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 }, []);\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 }, []);\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/fastboard-react",
3
- "version": "1.0.0-canary.1",
3
+ "version": "1.0.0-canary.4",
4
4
  "description": "React components of @netless/fastboard.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -9,15 +9,18 @@
9
9
  ],
10
10
  "repository": "netless-io/fastboard",
11
11
  "peerDependencies": {
12
- "react": "*"
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/fastboard-core": "1.0.0-canary.1",
16
- "@netless/fastboard-ui": "1.0.0-canary.1"
17
+ "@netless/app-slide": "0.3.0-canary.7",
18
+ "@netless/fastboard-core": "1.0.0-canary.4",
19
+ "@netless/fastboard-ui": "1.0.0-canary.4"
17
20
  },
18
21
  "devDependencies": {
19
22
  "@netless/esbuild-plugin-inline-sass": "0.1.0",
20
- "@types/react": "^18.0.15",
23
+ "@types/react": "^18.0.17",
21
24
  "@types/react-dom": "^18.0.6",
22
25
  "react": "^18.2.0",
23
26
  "react-dom": "^18.2.0"
@@ -0,0 +1,3 @@
1
+ export type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions } from "./netless-app";
2
+
3
+ export { previewSlide, Slide, SlideViewer } from "./netless-app";
@@ -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
+ }
package/src/create.ts ADDED
@@ -0,0 +1,27 @@
1
+ import type { FastboardApp, 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>(
22
+ options: FastboardOptions
23
+ ): Promise<FastboardApp<TEventData>> {
24
+ registerSlide();
25
+ registerDefaultApps();
26
+ return createFastboardCore<TEventData>(options);
27
+ }
package/src/hooks.tsx CHANGED
@@ -1,14 +1,16 @@
1
- import type { SvelteComponent as SvelteComponentType } from "svelte";
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 { createFastboard } from "./create";
12
+ import { replayFastboard } from "./replay";
10
13
  import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
11
- import { createFastboard, replayFastboard } from "@netless/fastboard-core";
12
14
 
13
15
  export const useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect;
14
16
 
@@ -78,7 +80,6 @@ export function useFastboard(config: () => FastboardOptions): FastboardApp | nul
78
80
  unmountRef.current = true;
79
81
  fastboard && fastboard.destroy();
80
82
  };
81
- // eslint-disable-next-line react-hooks/exhaustive-deps
82
83
  }, []);
83
84
 
84
85
  return fastboard;
@@ -103,7 +104,6 @@ export function useReplayFastboard(config: () => FastboardReplayOptions): Fastbo
103
104
  unmountRef.current = true;
104
105
  fastboard && fastboard.destroy();
105
106
  };
106
- // eslint-disable-next-line react-hooks/exhaustive-deps
107
107
  }, []);
108
108
 
109
109
  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,28 @@
1
+ import type { FastboardPlayer, 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>(
23
+ options: FastboardReplayOptions
24
+ ): Promise<FastboardPlayer<TEventData>> {
25
+ registerSlide();
26
+ registerDefaultApps();
27
+ return replayFastboardCore<TEventData>(options);
28
+ }