@godscene/visualizer 1.7.11
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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/es/component/blackboard/highlights.mjs +47 -0
- package/dist/es/component/blackboard/index.css +118 -0
- package/dist/es/component/blackboard/index.mjs +122 -0
- package/dist/es/component/config-selector/index.mjs +251 -0
- package/dist/es/component/context-preview/index.mjs +37 -0
- package/dist/es/component/env-config/index.mjs +237 -0
- package/dist/es/component/env-config-reminder/index.css +30 -0
- package/dist/es/component/env-config-reminder/index.mjs +27 -0
- package/dist/es/component/form-field/index.mjs +158 -0
- package/dist/es/component/history-selector/index.css +237 -0
- package/dist/es/component/history-selector/index.mjs +197 -0
- package/dist/es/component/index.mjs +1 -0
- package/dist/es/component/logo/index.css +19 -0
- package/dist/es/component/logo/index.mjs +20 -0
- package/dist/es/component/logo/logo.mjs +2 -0
- package/dist/es/component/misc/index.mjs +96 -0
- package/dist/es/component/nav-actions/index.mjs +14 -0
- package/dist/es/component/nav-actions/style.css +35 -0
- package/dist/es/component/player/index.css +296 -0
- package/dist/es/component/player/index.mjs +702 -0
- package/dist/es/component/player/playback-controls.mjs +4 -0
- package/dist/es/component/player/report-download.mjs +61 -0
- package/dist/es/component/player/scenes/StepScene.mjs +194 -0
- package/dist/es/component/player/scenes/derive-frame-state.mjs +229 -0
- package/dist/es/component/player/scenes/export-branded-video.mjs +360 -0
- package/dist/es/component/player/scenes/frame-calculator.mjs +149 -0
- package/dist/es/component/player/scenes/playback-frame.mjs +6 -0
- package/dist/es/component/player/scenes/playback-layout.mjs +12 -0
- package/dist/es/component/player/scenes/pointer-layout.mjs +36 -0
- package/dist/es/component/player/use-frame-player.mjs +87 -0
- package/dist/es/component/playground/index.css +930 -0
- package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
- package/dist/es/component/playground-result/index.css +92 -0
- package/dist/es/component/playground-result/index.mjs +232 -0
- package/dist/es/component/prompt-input/index.css +832 -0
- package/dist/es/component/prompt-input/index.mjs +959 -0
- package/dist/es/component/screenshot-viewer/index.css +237 -0
- package/dist/es/component/screenshot-viewer/index.mjs +319 -0
- package/dist/es/component/service-mode-control/index.mjs +107 -0
- package/dist/es/component/shiny-text/index.css +107 -0
- package/dist/es/component/shiny-text/index.mjs +15 -0
- package/dist/es/component/universal-playground/empty-state.mjs +5 -0
- package/dist/es/component/universal-playground/index.css +619 -0
- package/dist/es/component/universal-playground/index.mjs +558 -0
- package/dist/es/component/universal-playground/providers/context-provider.mjs +90 -0
- package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +280 -0
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +279 -0
- package/dist/es/component/universal-playground/universal-playground-electron.mjs +668 -0
- package/dist/es/hooks/useMinimalTypeGate.mjs +47 -0
- package/dist/es/hooks/usePlaygroundExecution.mjs +435 -0
- package/dist/es/hooks/usePlaygroundState.mjs +278 -0
- package/dist/es/hooks/useSafeOverrideAIConfig.mjs +20 -0
- package/dist/es/hooks/useServerValid.mjs +55 -0
- package/dist/es/hooks/useTheme.mjs +25 -0
- package/dist/es/icons/action-chevron.mjs +61 -0
- package/dist/es/icons/avatar.mjs +70 -0
- package/dist/es/icons/close.mjs +61 -0
- package/dist/es/icons/global-perspective.mjs +58 -0
- package/dist/es/icons/history.mjs +72 -0
- package/dist/es/icons/magnifying-glass.mjs +81 -0
- package/dist/es/icons/player-setting.mjs +68 -0
- package/dist/es/icons/prompt-history.mjs +70 -0
- package/dist/es/icons/setting.mjs +62 -0
- package/dist/es/icons/show-marker.mjs +58 -0
- package/dist/es/index.mjs +26 -0
- package/dist/es/static/image/logo.png +0 -0
- package/dist/es/store/history.mjs +128 -0
- package/dist/es/store/store.mjs +277 -0
- package/dist/es/types.mjs +73 -0
- package/dist/es/utils/action-label.mjs +15 -0
- package/dist/es/utils/color.mjs +35 -0
- package/dist/es/utils/constants.mjs +99 -0
- package/dist/es/utils/device-capabilities.mjs +13 -0
- package/dist/es/utils/empty-state-scroll.mjs +8 -0
- package/dist/es/utils/highlight-element.mjs +62 -0
- package/dist/es/utils/index.mjs +13 -0
- package/dist/es/utils/playground-utils.mjs +43 -0
- package/dist/es/utils/progress-action-icon.mjs +30 -0
- package/dist/es/utils/prompt-input-utils.mjs +49 -0
- package/dist/es/utils/prompt-placeholder.mjs +19 -0
- package/dist/es/utils/replay-scripts.mjs +428 -0
- package/dist/lib/component/blackboard/highlights.js +84 -0
- package/dist/lib/component/blackboard/index.css +118 -0
- package/dist/lib/component/blackboard/index.js +169 -0
- package/dist/lib/component/config-selector/index.js +295 -0
- package/dist/lib/component/context-preview/index.js +82 -0
- package/dist/lib/component/env-config/index.js +271 -0
- package/dist/lib/component/env-config-reminder/index.css +30 -0
- package/dist/lib/component/env-config-reminder/index.js +61 -0
- package/dist/lib/component/form-field/index.js +204 -0
- package/dist/lib/component/history-selector/index.css +237 -0
- package/dist/lib/component/history-selector/index.js +243 -0
- package/dist/lib/component/index.js +58 -0
- package/dist/lib/component/logo/index.css +19 -0
- package/dist/lib/component/logo/index.js +67 -0
- package/dist/lib/component/logo/logo.js +24 -0
- package/dist/lib/component/misc/index.js +152 -0
- package/dist/lib/component/nav-actions/index.js +48 -0
- package/dist/lib/component/nav-actions/style.css +35 -0
- package/dist/lib/component/player/index.css +296 -0
- package/dist/lib/component/player/index.js +747 -0
- package/dist/lib/component/player/playback-controls.js +38 -0
- package/dist/lib/component/player/report-download.js +98 -0
- package/dist/lib/component/player/scenes/StepScene.js +228 -0
- package/dist/lib/component/player/scenes/derive-frame-state.js +266 -0
- package/dist/lib/component/player/scenes/export-branded-video.js +403 -0
- package/dist/lib/component/player/scenes/frame-calculator.js +186 -0
- package/dist/lib/component/player/scenes/playback-frame.js +40 -0
- package/dist/lib/component/player/scenes/playback-layout.js +46 -0
- package/dist/lib/component/player/scenes/pointer-layout.js +88 -0
- package/dist/lib/component/player/use-frame-player.js +121 -0
- package/dist/lib/component/playground/index.css +930 -0
- package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
- package/dist/lib/component/playground-result/index.css +92 -0
- package/dist/lib/component/playground-result/index.js +276 -0
- package/dist/lib/component/prompt-input/index.css +832 -0
- package/dist/lib/component/prompt-input/index.js +1005 -0
- package/dist/lib/component/screenshot-viewer/index.css +237 -0
- package/dist/lib/component/screenshot-viewer/index.js +353 -0
- package/dist/lib/component/service-mode-control/index.js +141 -0
- package/dist/lib/component/shiny-text/index.css +107 -0
- package/dist/lib/component/shiny-text/index.js +49 -0
- package/dist/lib/component/universal-playground/empty-state.js +39 -0
- package/dist/lib/component/universal-playground/index.css +619 -0
- package/dist/lib/component/universal-playground/index.js +607 -0
- package/dist/lib/component/universal-playground/providers/context-provider.js +133 -0
- package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +320 -0
- package/dist/lib/component/universal-playground/providers/storage-provider.js +337 -0
- package/dist/lib/component/universal-playground/universal-playground-electron.js +717 -0
- package/dist/lib/hooks/useMinimalTypeGate.js +81 -0
- package/dist/lib/hooks/usePlaygroundExecution.js +478 -0
- package/dist/lib/hooks/usePlaygroundState.js +312 -0
- package/dist/lib/hooks/useSafeOverrideAIConfig.js +57 -0
- package/dist/lib/hooks/useServerValid.js +89 -0
- package/dist/lib/hooks/useTheme.js +59 -0
- package/dist/lib/icons/action-chevron.js +95 -0
- package/dist/lib/icons/avatar.js +104 -0
- package/dist/lib/icons/close.js +95 -0
- package/dist/lib/icons/global-perspective.js +92 -0
- package/dist/lib/icons/history.js +106 -0
- package/dist/lib/icons/magnifying-glass.js +115 -0
- package/dist/lib/icons/player-setting.js +102 -0
- package/dist/lib/icons/prompt-history.js +104 -0
- package/dist/lib/icons/setting.js +96 -0
- package/dist/lib/icons/show-marker.js +92 -0
- package/dist/lib/index.js +204 -0
- package/dist/lib/static/image/logo.png +0 -0
- package/dist/lib/store/history.js +135 -0
- package/dist/lib/store/store.js +287 -0
- package/dist/lib/types.js +119 -0
- package/dist/lib/utils/action-label.js +52 -0
- package/dist/lib/utils/color.js +75 -0
- package/dist/lib/utils/constants.js +172 -0
- package/dist/lib/utils/device-capabilities.js +50 -0
- package/dist/lib/utils/empty-state-scroll.js +42 -0
- package/dist/lib/utils/highlight-element.js +99 -0
- package/dist/lib/utils/index.js +69 -0
- package/dist/lib/utils/playground-utils.js +86 -0
- package/dist/lib/utils/progress-action-icon.js +67 -0
- package/dist/lib/utils/prompt-input-utils.js +89 -0
- package/dist/lib/utils/prompt-placeholder.js +53 -0
- package/dist/lib/utils/replay-scripts.js +474 -0
- package/dist/types/component/blackboard/highlights.d.ts +11 -0
- package/dist/types/component/blackboard/index.d.ts +10 -0
- package/dist/types/component/config-selector/index.d.ts +15 -0
- package/dist/types/component/context-preview/index.d.ts +9 -0
- package/dist/types/component/env-config/index.d.ts +8 -0
- package/dist/types/component/env-config-reminder/index.d.ts +6 -0
- package/dist/types/component/form-field/index.d.ts +17 -0
- package/dist/types/component/history-selector/index.d.ts +13 -0
- package/dist/types/component/index.d.ts +1 -0
- package/dist/types/component/logo/index.d.ts +5 -0
- package/dist/types/component/misc/index.d.ts +6 -0
- package/dist/types/component/nav-actions/index.d.ts +12 -0
- package/dist/types/component/player/index.d.ts +15 -0
- package/dist/types/component/player/playback-controls.d.ts +1 -0
- package/dist/types/component/player/report-download.d.ts +32 -0
- package/dist/types/component/player/scenes/StepScene.d.ts +9 -0
- package/dist/types/component/player/scenes/derive-frame-state.d.ts +40 -0
- package/dist/types/component/player/scenes/export-branded-video.d.ts +33 -0
- package/dist/types/component/player/scenes/frame-calculator.d.ts +40 -0
- package/dist/types/component/player/scenes/playback-frame.d.ts +3 -0
- package/dist/types/component/player/scenes/playback-layout.d.ts +7 -0
- package/dist/types/component/player/scenes/pointer-layout.d.ts +20 -0
- package/dist/types/component/player/use-frame-player.d.ts +17 -0
- package/dist/types/component/playground-result/index.d.ts +22 -0
- package/dist/types/component/prompt-input/index.d.ts +23 -0
- package/dist/types/component/screenshot-viewer/index.d.ts +23 -0
- package/dist/types/component/service-mode-control/index.d.ts +6 -0
- package/dist/types/component/shiny-text/index.d.ts +12 -0
- package/dist/types/component/universal-playground/empty-state.d.ts +3 -0
- package/dist/types/component/universal-playground/index.d.ts +4 -0
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
- package/dist/types/component/universal-playground/providers/indexeddb-storage-provider.d.ts +71 -0
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
- package/dist/types/component/universal-playground/universal-playground-electron.d.ts +4 -0
- package/dist/types/hooks/useMinimalTypeGate.d.ts +72 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +40 -0
- package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
- package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
- package/dist/types/hooks/useServerValid.d.ts +1 -0
- package/dist/types/hooks/useTheme.d.ts +7 -0
- package/dist/types/index.d.ts +29 -0
- package/dist/types/store/history.d.ts +16 -0
- package/dist/types/store/store.d.ts +57 -0
- package/dist/types/types.d.ts +278 -0
- package/dist/types/utils/action-label.d.ts +11 -0
- package/dist/types/utils/color.d.ts +4 -0
- package/dist/types/utils/constants.d.ts +80 -0
- package/dist/types/utils/device-capabilities.d.ts +9 -0
- package/dist/types/utils/empty-state-scroll.d.ts +11 -0
- package/dist/types/utils/highlight-element.d.ts +3 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/playground-utils.d.ts +11 -0
- package/dist/types/utils/progress-action-icon.d.ts +12 -0
- package/dist/types/utils/prompt-input-utils.d.ts +24 -0
- package/dist/types/utils/prompt-placeholder.d.ts +1 -0
- package/dist/types/utils/replay-scripts.d.ts +50 -0
- package/package.json +82 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
import { createStorageProvider, detectBestStorageType } from "../component/universal-playground/providers/storage-provider.mjs";
|
|
3
|
+
import { getWelcomeMessageTemplate } from "../utils/constants.mjs";
|
|
4
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5
|
+
try {
|
|
6
|
+
var info = gen[key](arg);
|
|
7
|
+
var value = info.value;
|
|
8
|
+
} catch (error) {
|
|
9
|
+
reject(error);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (info.done) resolve(value);
|
|
13
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
14
|
+
}
|
|
15
|
+
function _async_to_generator(fn) {
|
|
16
|
+
return function() {
|
|
17
|
+
var self = this, args = arguments;
|
|
18
|
+
return new Promise(function(resolve, reject) {
|
|
19
|
+
var gen = fn.apply(self, args);
|
|
20
|
+
function _next(value) {
|
|
21
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
+
}
|
|
23
|
+
function _throw(err) {
|
|
24
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
+
}
|
|
26
|
+
_next(void 0);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
32
|
+
value: value,
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true
|
|
36
|
+
});
|
|
37
|
+
else obj[key] = value;
|
|
38
|
+
return obj;
|
|
39
|
+
}
|
|
40
|
+
function _object_spread(target) {
|
|
41
|
+
for(var i = 1; i < arguments.length; i++){
|
|
42
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
43
|
+
var ownKeys = Object.keys(source);
|
|
44
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
45
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
46
|
+
}));
|
|
47
|
+
ownKeys.forEach(function(key) {
|
|
48
|
+
_define_property(target, key, source[key]);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
53
|
+
function usePlaygroundState_ownKeys(object, enumerableOnly) {
|
|
54
|
+
var keys = Object.keys(object);
|
|
55
|
+
if (Object.getOwnPropertySymbols) {
|
|
56
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
57
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
58
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
59
|
+
});
|
|
60
|
+
keys.push.apply(keys, symbols);
|
|
61
|
+
}
|
|
62
|
+
return keys;
|
|
63
|
+
}
|
|
64
|
+
function _object_spread_props(target, source) {
|
|
65
|
+
source = null != source ? source : {};
|
|
66
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
67
|
+
else usePlaygroundState_ownKeys(Object(source)).forEach(function(key) {
|
|
68
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
69
|
+
});
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
function usePlaygroundState(playgroundSDK, storage, contextProvider, targetName) {
|
|
73
|
+
const [loading, setLoading] = useState(false);
|
|
74
|
+
const [infoList, setInfoList] = useState([]);
|
|
75
|
+
const [actionSpace, setActionSpace] = useState([]);
|
|
76
|
+
const [actionSpaceLoading, setActionSpaceLoading] = useState(true);
|
|
77
|
+
const [uiContextPreview, setUiContextPreview] = useState();
|
|
78
|
+
const [showScrollToBottomButton, setShowScrollToBottomButton] = useState(false);
|
|
79
|
+
const [autoScrollEnabled, setAutoScrollEnabled] = useState(true);
|
|
80
|
+
const lastScrollTopRef = useRef(0);
|
|
81
|
+
const [verticalMode, setVerticalMode] = useState(false);
|
|
82
|
+
const [replayCounter, setReplayCounter] = useState(0);
|
|
83
|
+
const infoListRef = useRef(null);
|
|
84
|
+
const currentRunningIdRef = useRef(null);
|
|
85
|
+
const interruptedFlagRef = useRef({});
|
|
86
|
+
const initializedRef = useRef(false);
|
|
87
|
+
useEffect(()=>{
|
|
88
|
+
const migrateFromOldNamespace = ()=>_async_to_generator(function*() {
|
|
89
|
+
const oldStorage = createStorageProvider(detectBestStorageType(), 'playground-default');
|
|
90
|
+
try {
|
|
91
|
+
if (null == oldStorage ? void 0 : oldStorage.loadMessages) {
|
|
92
|
+
const oldMessages = yield oldStorage.loadMessages();
|
|
93
|
+
if (oldMessages.length > 1) {
|
|
94
|
+
console.log('Found data in old namespace, migrating...');
|
|
95
|
+
if (null == storage ? void 0 : storage.saveMessages) yield storage.saveMessages(oldMessages);
|
|
96
|
+
if (oldStorage.clearMessages) yield oldStorage.clearMessages();
|
|
97
|
+
return oldMessages;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.debug('No data found in old namespace:', error);
|
|
102
|
+
}
|
|
103
|
+
return [];
|
|
104
|
+
})();
|
|
105
|
+
const initializeMessages = ()=>_async_to_generator(function*() {
|
|
106
|
+
const welcomeMessage = _object_spread_props(_object_spread({}, getWelcomeMessageTemplate(targetName)), {
|
|
107
|
+
id: 'welcome',
|
|
108
|
+
timestamp: new Date()
|
|
109
|
+
});
|
|
110
|
+
if (null == storage ? void 0 : storage.loadMessages) try {
|
|
111
|
+
let storedMessages = yield storage.loadMessages();
|
|
112
|
+
if (0 === storedMessages.length) storedMessages = yield migrateFromOldNamespace();
|
|
113
|
+
const hasWelcomeMessage = storedMessages.some((msg)=>'welcome' === msg.id);
|
|
114
|
+
hasWelcomeMessage ? setInfoList(storedMessages) : setInfoList([
|
|
115
|
+
welcomeMessage,
|
|
116
|
+
...storedMessages
|
|
117
|
+
]);
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.error('Failed to load messages:', error);
|
|
120
|
+
setInfoList([
|
|
121
|
+
welcomeMessage
|
|
122
|
+
]);
|
|
123
|
+
}
|
|
124
|
+
else setInfoList([
|
|
125
|
+
welcomeMessage
|
|
126
|
+
]);
|
|
127
|
+
})();
|
|
128
|
+
if (storage && !initializedRef.current) {
|
|
129
|
+
initializedRef.current = true;
|
|
130
|
+
initializeMessages();
|
|
131
|
+
} else if (!storage && 0 === infoList.length) initializeMessages();
|
|
132
|
+
}, [
|
|
133
|
+
storage
|
|
134
|
+
]);
|
|
135
|
+
useEffect(()=>{
|
|
136
|
+
if ((null == storage ? void 0 : storage.saveMessages) && infoList.length > 1) storage.saveMessages(infoList).catch((error)=>{
|
|
137
|
+
if (error instanceof DOMException && 'QuotaExceededError' === error.name) console.warn('Storage quota exceeded - some messages may not be saved persistently');
|
|
138
|
+
else console.error('Failed to save messages:', error);
|
|
139
|
+
});
|
|
140
|
+
}, [
|
|
141
|
+
infoList,
|
|
142
|
+
storage
|
|
143
|
+
]);
|
|
144
|
+
useEffect(()=>{
|
|
145
|
+
if (!(null == contextProvider ? void 0 : contextProvider.getUIContext) || uiContextPreview) return;
|
|
146
|
+
contextProvider.getUIContext().then((context)=>setUiContextPreview(context)).catch((error)=>{
|
|
147
|
+
console.error('Failed to get UI context:', error);
|
|
148
|
+
});
|
|
149
|
+
}, [
|
|
150
|
+
contextProvider,
|
|
151
|
+
uiContextPreview
|
|
152
|
+
]);
|
|
153
|
+
useEffect(()=>{
|
|
154
|
+
const loadActionSpace = ()=>_async_to_generator(function*() {
|
|
155
|
+
setActionSpaceLoading(true);
|
|
156
|
+
try {
|
|
157
|
+
var _contextProvider_getUIContext;
|
|
158
|
+
if (!playgroundSDK) return void setActionSpace([]);
|
|
159
|
+
const context = uiContextPreview || (yield null == contextProvider ? void 0 : null == (_contextProvider_getUIContext = contextProvider.getUIContext) ? void 0 : _contextProvider_getUIContext.call(contextProvider));
|
|
160
|
+
const space = yield playgroundSDK.getActionSpace(context);
|
|
161
|
+
setActionSpace(space || []);
|
|
162
|
+
} catch (error) {
|
|
163
|
+
console.error('Failed to load action space:', error);
|
|
164
|
+
setActionSpace([]);
|
|
165
|
+
} finally{
|
|
166
|
+
setActionSpaceLoading(false);
|
|
167
|
+
}
|
|
168
|
+
})();
|
|
169
|
+
loadActionSpace();
|
|
170
|
+
}, [
|
|
171
|
+
playgroundSDK,
|
|
172
|
+
uiContextPreview,
|
|
173
|
+
contextProvider
|
|
174
|
+
]);
|
|
175
|
+
useEffect(()=>{
|
|
176
|
+
const sizeThreshold = 750;
|
|
177
|
+
setVerticalMode(window.innerWidth < sizeThreshold);
|
|
178
|
+
const handleResize = ()=>{
|
|
179
|
+
setVerticalMode(window.innerWidth < sizeThreshold);
|
|
180
|
+
};
|
|
181
|
+
window.addEventListener('resize', handleResize);
|
|
182
|
+
return ()=>window.removeEventListener('resize', handleResize);
|
|
183
|
+
}, []);
|
|
184
|
+
const scrollToBottom = useCallback(()=>{
|
|
185
|
+
setTimeout(()=>{
|
|
186
|
+
if (infoListRef.current) infoListRef.current.scrollTop = infoListRef.current.scrollHeight;
|
|
187
|
+
}, 100);
|
|
188
|
+
}, []);
|
|
189
|
+
const checkIfScrolledToBottom = useCallback(()=>{
|
|
190
|
+
if (infoListRef.current) {
|
|
191
|
+
const { scrollTop, scrollHeight, clientHeight } = infoListRef.current;
|
|
192
|
+
const isAtBottom = scrollTop + clientHeight >= scrollHeight - 10;
|
|
193
|
+
setShowScrollToBottomButton(!isAtBottom);
|
|
194
|
+
const scrollingUp = scrollTop < lastScrollTopRef.current;
|
|
195
|
+
lastScrollTopRef.current = scrollTop;
|
|
196
|
+
if (isAtBottom) setAutoScrollEnabled(true);
|
|
197
|
+
else if (scrollingUp) setAutoScrollEnabled(false);
|
|
198
|
+
}
|
|
199
|
+
}, []);
|
|
200
|
+
const handleScrollToBottom = useCallback(()=>{
|
|
201
|
+
if (infoListRef.current) {
|
|
202
|
+
infoListRef.current.scrollTo({
|
|
203
|
+
top: infoListRef.current.scrollHeight,
|
|
204
|
+
behavior: 'smooth'
|
|
205
|
+
});
|
|
206
|
+
setShowScrollToBottomButton(false);
|
|
207
|
+
setAutoScrollEnabled(true);
|
|
208
|
+
}
|
|
209
|
+
}, []);
|
|
210
|
+
useEffect(()=>{
|
|
211
|
+
if (infoList.length > 0 && autoScrollEnabled) scrollToBottom();
|
|
212
|
+
}, [
|
|
213
|
+
infoList,
|
|
214
|
+
scrollToBottom,
|
|
215
|
+
autoScrollEnabled
|
|
216
|
+
]);
|
|
217
|
+
useEffect(()=>{
|
|
218
|
+
const container = infoListRef.current;
|
|
219
|
+
if (container) {
|
|
220
|
+
container.addEventListener('scroll', checkIfScrolledToBottom);
|
|
221
|
+
checkIfScrolledToBottom();
|
|
222
|
+
return ()=>{
|
|
223
|
+
container.removeEventListener('scroll', checkIfScrolledToBottom);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
}, [
|
|
227
|
+
checkIfScrolledToBottom
|
|
228
|
+
]);
|
|
229
|
+
const clearInfoList = useCallback(()=>_async_to_generator(function*() {
|
|
230
|
+
const welcomeMessage = _object_spread_props(_object_spread({}, getWelcomeMessageTemplate(targetName)), {
|
|
231
|
+
id: 'welcome',
|
|
232
|
+
timestamp: new Date()
|
|
233
|
+
});
|
|
234
|
+
setInfoList([
|
|
235
|
+
welcomeMessage
|
|
236
|
+
]);
|
|
237
|
+
if (null == storage ? void 0 : storage.clearMessages) try {
|
|
238
|
+
yield storage.clearMessages();
|
|
239
|
+
} catch (error) {
|
|
240
|
+
console.error('Failed to clear stored messages:', error);
|
|
241
|
+
}
|
|
242
|
+
})(), [
|
|
243
|
+
storage,
|
|
244
|
+
targetName
|
|
245
|
+
]);
|
|
246
|
+
const refreshContext = useCallback(()=>_async_to_generator(function*() {
|
|
247
|
+
if (null == contextProvider ? void 0 : contextProvider.refreshContext) try {
|
|
248
|
+
const newContext = yield contextProvider.refreshContext();
|
|
249
|
+
setUiContextPreview(newContext);
|
|
250
|
+
} catch (error) {
|
|
251
|
+
console.error('Failed to refresh context:', error);
|
|
252
|
+
}
|
|
253
|
+
})(), [
|
|
254
|
+
contextProvider
|
|
255
|
+
]);
|
|
256
|
+
return {
|
|
257
|
+
loading,
|
|
258
|
+
setLoading,
|
|
259
|
+
infoList,
|
|
260
|
+
setInfoList,
|
|
261
|
+
actionSpace,
|
|
262
|
+
actionSpaceLoading,
|
|
263
|
+
uiContextPreview,
|
|
264
|
+
setUiContextPreview,
|
|
265
|
+
showScrollToBottomButton,
|
|
266
|
+
verticalMode,
|
|
267
|
+
replayCounter,
|
|
268
|
+
setReplayCounter,
|
|
269
|
+
infoListRef,
|
|
270
|
+
currentRunningIdRef,
|
|
271
|
+
interruptedFlagRef,
|
|
272
|
+
clearInfoList,
|
|
273
|
+
refreshContext,
|
|
274
|
+
handleScrollToBottom,
|
|
275
|
+
scrollToBottom
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
export { usePlaygroundState };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { overrideAIConfig } from "@godscene/shared/env";
|
|
2
|
+
import { message } from "antd";
|
|
3
|
+
function safeOverrideAIConfig(newConfig, extendMode = false, showErrorMessage = true) {
|
|
4
|
+
try {
|
|
5
|
+
overrideAIConfig(newConfig, extendMode);
|
|
6
|
+
return true;
|
|
7
|
+
} catch (error) {
|
|
8
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
9
|
+
console.error('Failed to override AI config:', err);
|
|
10
|
+
if (showErrorMessage) message.error(`Failed to apply AI configuration: ${err.message}`);
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function useSafeOverrideAIConfig() {
|
|
15
|
+
const applyConfig = (newConfig, extendMode = false, showErrorMessage = true)=>safeOverrideAIConfig(newConfig, extendMode, showErrorMessage);
|
|
16
|
+
return {
|
|
17
|
+
applyConfig
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export { safeOverrideAIConfig, useSafeOverrideAIConfig };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { PlaygroundSDK } from "@godscene/playground";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { useEnvConfig } from "../store/store.mjs";
|
|
4
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5
|
+
try {
|
|
6
|
+
var info = gen[key](arg);
|
|
7
|
+
var value = info.value;
|
|
8
|
+
} catch (error) {
|
|
9
|
+
reject(error);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (info.done) resolve(value);
|
|
13
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
14
|
+
}
|
|
15
|
+
function _async_to_generator(fn) {
|
|
16
|
+
return function() {
|
|
17
|
+
var self = this, args = arguments;
|
|
18
|
+
return new Promise(function(resolve, reject) {
|
|
19
|
+
var gen = fn.apply(self, args);
|
|
20
|
+
function _next(value) {
|
|
21
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
+
}
|
|
23
|
+
function _throw(err) {
|
|
24
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
+
}
|
|
26
|
+
_next(void 0);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const useServerValid = (shouldRun = true)=>{
|
|
31
|
+
const [serverValid, setServerValid] = useState(true);
|
|
32
|
+
const { serviceMode } = useEnvConfig();
|
|
33
|
+
useEffect(()=>{
|
|
34
|
+
let interruptFlag = false;
|
|
35
|
+
if (!shouldRun) return;
|
|
36
|
+
Promise.resolve((()=>_async_to_generator(function*() {
|
|
37
|
+
while(!interruptFlag){
|
|
38
|
+
const playgroundSDK = new PlaygroundSDK({
|
|
39
|
+
type: 'remote-execution'
|
|
40
|
+
});
|
|
41
|
+
const status = yield playgroundSDK.checkStatus();
|
|
42
|
+
status ? setServerValid(true) : setServerValid(false);
|
|
43
|
+
yield new Promise((resolve)=>setTimeout(resolve, 1000));
|
|
44
|
+
}
|
|
45
|
+
})())());
|
|
46
|
+
return ()=>{
|
|
47
|
+
interruptFlag = true;
|
|
48
|
+
};
|
|
49
|
+
}, [
|
|
50
|
+
serviceMode,
|
|
51
|
+
shouldRun
|
|
52
|
+
]);
|
|
53
|
+
return serverValid;
|
|
54
|
+
};
|
|
55
|
+
export { useServerValid };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
function useTheme() {
|
|
3
|
+
const [isDarkMode, setIsDarkMode] = useState(false);
|
|
4
|
+
useEffect(()=>{
|
|
5
|
+
const checkTheme = ()=>{
|
|
6
|
+
var _document_querySelector;
|
|
7
|
+
const theme = null == (_document_querySelector = document.querySelector('[data-theme]')) ? void 0 : _document_querySelector.getAttribute('data-theme');
|
|
8
|
+
setIsDarkMode('dark' === theme);
|
|
9
|
+
};
|
|
10
|
+
checkTheme();
|
|
11
|
+
const observer = new MutationObserver(checkTheme);
|
|
12
|
+
const target = document.querySelector('[data-theme]') || document.documentElement;
|
|
13
|
+
observer.observe(target, {
|
|
14
|
+
attributes: true,
|
|
15
|
+
attributeFilter: [
|
|
16
|
+
'data-theme'
|
|
17
|
+
]
|
|
18
|
+
});
|
|
19
|
+
return ()=>observer.disconnect();
|
|
20
|
+
}, []);
|
|
21
|
+
return {
|
|
22
|
+
isDarkMode
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export { useTheme };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
else obj[key] = value;
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
function _object_spread(target) {
|
|
14
|
+
for(var i = 1; i < arguments.length; i++){
|
|
15
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
16
|
+
var ownKeys = Object.keys(source);
|
|
17
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
+
}));
|
|
20
|
+
ownKeys.forEach(function(key) {
|
|
21
|
+
_define_property(target, key, source[key]);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return target;
|
|
25
|
+
}
|
|
26
|
+
function action_chevron_ownKeys(object, enumerableOnly) {
|
|
27
|
+
var keys = Object.keys(object);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
30
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
31
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
32
|
+
});
|
|
33
|
+
keys.push.apply(keys, symbols);
|
|
34
|
+
}
|
|
35
|
+
return keys;
|
|
36
|
+
}
|
|
37
|
+
function _object_spread_props(target, source) {
|
|
38
|
+
source = null != source ? source : {};
|
|
39
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
40
|
+
else action_chevron_ownKeys(Object(source)).forEach(function(key) {
|
|
41
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
42
|
+
});
|
|
43
|
+
return target;
|
|
44
|
+
}
|
|
45
|
+
const SvgActionChevron = (props)=>/*#__PURE__*/ jsx("svg", _object_spread_props(_object_spread({
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
width: 6,
|
|
48
|
+
height: 10,
|
|
49
|
+
fill: "none",
|
|
50
|
+
viewBox: "0 0 6 10"
|
|
51
|
+
}, props), {
|
|
52
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
53
|
+
fill: "#000",
|
|
54
|
+
fillOpacity: 0.25,
|
|
55
|
+
fillRule: "evenodd",
|
|
56
|
+
d: "M.195 9.138a.667.667 0 0 1 0-.943l3.529-3.528L.195 1.138a.667.667 0 0 1 .943-.943l4 4c.26.26.26.683 0 .943l-4 4a.667.667 0 0 1-.943 0",
|
|
57
|
+
clipRule: "evenodd"
|
|
58
|
+
})
|
|
59
|
+
}));
|
|
60
|
+
const action_chevron = SvgActionChevron;
|
|
61
|
+
export { action_chevron as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
else obj[key] = value;
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
function _object_spread(target) {
|
|
14
|
+
for(var i = 1; i < arguments.length; i++){
|
|
15
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
16
|
+
var ownKeys = Object.keys(source);
|
|
17
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
+
}));
|
|
20
|
+
ownKeys.forEach(function(key) {
|
|
21
|
+
_define_property(target, key, source[key]);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return target;
|
|
25
|
+
}
|
|
26
|
+
function avatar_ownKeys(object, enumerableOnly) {
|
|
27
|
+
var keys = Object.keys(object);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
30
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
31
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
32
|
+
});
|
|
33
|
+
keys.push.apply(keys, symbols);
|
|
34
|
+
}
|
|
35
|
+
return keys;
|
|
36
|
+
}
|
|
37
|
+
function _object_spread_props(target, source) {
|
|
38
|
+
source = null != source ? source : {};
|
|
39
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
40
|
+
else avatar_ownKeys(Object(source)).forEach(function(key) {
|
|
41
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
42
|
+
});
|
|
43
|
+
return target;
|
|
44
|
+
}
|
|
45
|
+
const SvgAvatar = (props)=>/*#__PURE__*/ jsxs("svg", _object_spread_props(_object_spread({
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
width: 20,
|
|
48
|
+
height: 20,
|
|
49
|
+
fill: "none",
|
|
50
|
+
"aria-label": "Playground",
|
|
51
|
+
viewBox: "0 0 20 20"
|
|
52
|
+
}, props), {
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ jsx("rect", {
|
|
55
|
+
width: 20,
|
|
56
|
+
height: 20,
|
|
57
|
+
fill: "#2B83FF",
|
|
58
|
+
rx: 10
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ jsx("path", {
|
|
61
|
+
fill: "#2B83FF",
|
|
62
|
+
stroke: "#fff",
|
|
63
|
+
strokeLinejoin: "round",
|
|
64
|
+
strokeWidth: 1.125,
|
|
65
|
+
d: "M6.866 5.882a.56.56 0 0 1 .667-.078l3.248 1.875 3.247 1.875a.563.563 0 0 1 0 .974l-3.247 1.875-3.248 1.875a.563.563 0 0 1-.784-.74l1.749-3.497-1.75-3.498a.56.56 0 0 1 .118-.661Z"
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}));
|
|
69
|
+
const avatar = SvgAvatar;
|
|
70
|
+
export { avatar as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
else obj[key] = value;
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
function _object_spread(target) {
|
|
14
|
+
for(var i = 1; i < arguments.length; i++){
|
|
15
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
16
|
+
var ownKeys = Object.keys(source);
|
|
17
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
+
}));
|
|
20
|
+
ownKeys.forEach(function(key) {
|
|
21
|
+
_define_property(target, key, source[key]);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return target;
|
|
25
|
+
}
|
|
26
|
+
function close_ownKeys(object, enumerableOnly) {
|
|
27
|
+
var keys = Object.keys(object);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
30
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
31
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
32
|
+
});
|
|
33
|
+
keys.push.apply(keys, symbols);
|
|
34
|
+
}
|
|
35
|
+
return keys;
|
|
36
|
+
}
|
|
37
|
+
function _object_spread_props(target, source) {
|
|
38
|
+
source = null != source ? source : {};
|
|
39
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
40
|
+
else close_ownKeys(Object(source)).forEach(function(key) {
|
|
41
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
42
|
+
});
|
|
43
|
+
return target;
|
|
44
|
+
}
|
|
45
|
+
const SvgClose = (props)=>/*#__PURE__*/ jsx("svg", _object_spread_props(_object_spread({
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
width: 18,
|
|
48
|
+
height: 16,
|
|
49
|
+
fill: "none",
|
|
50
|
+
viewBox: "0 0 18 16"
|
|
51
|
+
}, props), {
|
|
52
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
53
|
+
stroke: "#333",
|
|
54
|
+
strokeLinecap: "round",
|
|
55
|
+
strokeLinejoin: "round",
|
|
56
|
+
strokeWidth: 1.333,
|
|
57
|
+
d: "m3.124 2.667 11.162 10.666M3.124 13.333 14.286 2.667"
|
|
58
|
+
})
|
|
59
|
+
}));
|
|
60
|
+
const icons_close = SvgClose;
|
|
61
|
+
export { icons_close as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
else obj[key] = value;
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
function _object_spread(target) {
|
|
14
|
+
for(var i = 1; i < arguments.length; i++){
|
|
15
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
16
|
+
var ownKeys = Object.keys(source);
|
|
17
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
+
}));
|
|
20
|
+
ownKeys.forEach(function(key) {
|
|
21
|
+
_define_property(target, key, source[key]);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return target;
|
|
25
|
+
}
|
|
26
|
+
function global_perspective_ownKeys(object, enumerableOnly) {
|
|
27
|
+
var keys = Object.keys(object);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
30
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
31
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
32
|
+
});
|
|
33
|
+
keys.push.apply(keys, symbols);
|
|
34
|
+
}
|
|
35
|
+
return keys;
|
|
36
|
+
}
|
|
37
|
+
function _object_spread_props(target, source) {
|
|
38
|
+
source = null != source ? source : {};
|
|
39
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
40
|
+
else global_perspective_ownKeys(Object(source)).forEach(function(key) {
|
|
41
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
42
|
+
});
|
|
43
|
+
return target;
|
|
44
|
+
}
|
|
45
|
+
const SvgGlobalPerspective = (props)=>/*#__PURE__*/ jsx("svg", _object_spread_props(_object_spread({
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
width: 16,
|
|
48
|
+
height: 16,
|
|
49
|
+
fill: "none",
|
|
50
|
+
viewBox: "0 0 16 16"
|
|
51
|
+
}, props), {
|
|
52
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
53
|
+
fill: "currentColor",
|
|
54
|
+
d: "M1.333 13v-2.5a.667.667 0 0 1 1.334 0V13c0 .184.149.333.333.333h2.5a.667.667 0 0 1 0 1.334H3c-.92 0-1.667-.746-1.667-1.667m12 0v-2.5a.667.667 0 0 1 1.334 0V13c0 .92-.746 1.667-1.667 1.667h-2.5a.667.667 0 0 1 0-1.334H13a.333.333 0 0 0 .333-.333m-12-7.5V3c0-.92.747-1.667 1.667-1.667h2.5a.667.667 0 0 1 0 1.334H3A.333.333 0 0 0 2.667 3v2.5a.667.667 0 0 1-1.334 0m12 0V3A.333.333 0 0 0 13 2.667h-2.5a.667.667 0 0 1 0-1.334H13c.92 0 1.667.747 1.667 1.667v2.5a.667.667 0 0 1-1.334 0M5.667 10.333h4.666V5.667H5.667zm6 .167c0 .644-.523 1.167-1.167 1.167h-5A1.167 1.167 0 0 1 4.333 10.5v-5c0-.644.523-1.167 1.167-1.167h5c.644 0 1.167.523 1.167 1.167z"
|
|
55
|
+
})
|
|
56
|
+
}));
|
|
57
|
+
const global_perspective = SvgGlobalPerspective;
|
|
58
|
+
export { global_perspective as default };
|