@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.
Files changed (221) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/es/component/blackboard/highlights.mjs +47 -0
  4. package/dist/es/component/blackboard/index.css +118 -0
  5. package/dist/es/component/blackboard/index.mjs +122 -0
  6. package/dist/es/component/config-selector/index.mjs +251 -0
  7. package/dist/es/component/context-preview/index.mjs +37 -0
  8. package/dist/es/component/env-config/index.mjs +237 -0
  9. package/dist/es/component/env-config-reminder/index.css +30 -0
  10. package/dist/es/component/env-config-reminder/index.mjs +27 -0
  11. package/dist/es/component/form-field/index.mjs +158 -0
  12. package/dist/es/component/history-selector/index.css +237 -0
  13. package/dist/es/component/history-selector/index.mjs +197 -0
  14. package/dist/es/component/index.mjs +1 -0
  15. package/dist/es/component/logo/index.css +19 -0
  16. package/dist/es/component/logo/index.mjs +20 -0
  17. package/dist/es/component/logo/logo.mjs +2 -0
  18. package/dist/es/component/misc/index.mjs +96 -0
  19. package/dist/es/component/nav-actions/index.mjs +14 -0
  20. package/dist/es/component/nav-actions/style.css +35 -0
  21. package/dist/es/component/player/index.css +296 -0
  22. package/dist/es/component/player/index.mjs +702 -0
  23. package/dist/es/component/player/playback-controls.mjs +4 -0
  24. package/dist/es/component/player/report-download.mjs +61 -0
  25. package/dist/es/component/player/scenes/StepScene.mjs +194 -0
  26. package/dist/es/component/player/scenes/derive-frame-state.mjs +229 -0
  27. package/dist/es/component/player/scenes/export-branded-video.mjs +360 -0
  28. package/dist/es/component/player/scenes/frame-calculator.mjs +149 -0
  29. package/dist/es/component/player/scenes/playback-frame.mjs +6 -0
  30. package/dist/es/component/player/scenes/playback-layout.mjs +12 -0
  31. package/dist/es/component/player/scenes/pointer-layout.mjs +36 -0
  32. package/dist/es/component/player/use-frame-player.mjs +87 -0
  33. package/dist/es/component/playground/index.css +930 -0
  34. package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
  35. package/dist/es/component/playground-result/index.css +92 -0
  36. package/dist/es/component/playground-result/index.mjs +232 -0
  37. package/dist/es/component/prompt-input/index.css +832 -0
  38. package/dist/es/component/prompt-input/index.mjs +959 -0
  39. package/dist/es/component/screenshot-viewer/index.css +237 -0
  40. package/dist/es/component/screenshot-viewer/index.mjs +319 -0
  41. package/dist/es/component/service-mode-control/index.mjs +107 -0
  42. package/dist/es/component/shiny-text/index.css +107 -0
  43. package/dist/es/component/shiny-text/index.mjs +15 -0
  44. package/dist/es/component/universal-playground/empty-state.mjs +5 -0
  45. package/dist/es/component/universal-playground/index.css +619 -0
  46. package/dist/es/component/universal-playground/index.mjs +558 -0
  47. package/dist/es/component/universal-playground/providers/context-provider.mjs +90 -0
  48. package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +280 -0
  49. package/dist/es/component/universal-playground/providers/storage-provider.mjs +279 -0
  50. package/dist/es/component/universal-playground/universal-playground-electron.mjs +668 -0
  51. package/dist/es/hooks/useMinimalTypeGate.mjs +47 -0
  52. package/dist/es/hooks/usePlaygroundExecution.mjs +435 -0
  53. package/dist/es/hooks/usePlaygroundState.mjs +278 -0
  54. package/dist/es/hooks/useSafeOverrideAIConfig.mjs +20 -0
  55. package/dist/es/hooks/useServerValid.mjs +55 -0
  56. package/dist/es/hooks/useTheme.mjs +25 -0
  57. package/dist/es/icons/action-chevron.mjs +61 -0
  58. package/dist/es/icons/avatar.mjs +70 -0
  59. package/dist/es/icons/close.mjs +61 -0
  60. package/dist/es/icons/global-perspective.mjs +58 -0
  61. package/dist/es/icons/history.mjs +72 -0
  62. package/dist/es/icons/magnifying-glass.mjs +81 -0
  63. package/dist/es/icons/player-setting.mjs +68 -0
  64. package/dist/es/icons/prompt-history.mjs +70 -0
  65. package/dist/es/icons/setting.mjs +62 -0
  66. package/dist/es/icons/show-marker.mjs +58 -0
  67. package/dist/es/index.mjs +26 -0
  68. package/dist/es/static/image/logo.png +0 -0
  69. package/dist/es/store/history.mjs +128 -0
  70. package/dist/es/store/store.mjs +277 -0
  71. package/dist/es/types.mjs +73 -0
  72. package/dist/es/utils/action-label.mjs +15 -0
  73. package/dist/es/utils/color.mjs +35 -0
  74. package/dist/es/utils/constants.mjs +99 -0
  75. package/dist/es/utils/device-capabilities.mjs +13 -0
  76. package/dist/es/utils/empty-state-scroll.mjs +8 -0
  77. package/dist/es/utils/highlight-element.mjs +62 -0
  78. package/dist/es/utils/index.mjs +13 -0
  79. package/dist/es/utils/playground-utils.mjs +43 -0
  80. package/dist/es/utils/progress-action-icon.mjs +30 -0
  81. package/dist/es/utils/prompt-input-utils.mjs +49 -0
  82. package/dist/es/utils/prompt-placeholder.mjs +19 -0
  83. package/dist/es/utils/replay-scripts.mjs +428 -0
  84. package/dist/lib/component/blackboard/highlights.js +84 -0
  85. package/dist/lib/component/blackboard/index.css +118 -0
  86. package/dist/lib/component/blackboard/index.js +169 -0
  87. package/dist/lib/component/config-selector/index.js +295 -0
  88. package/dist/lib/component/context-preview/index.js +82 -0
  89. package/dist/lib/component/env-config/index.js +271 -0
  90. package/dist/lib/component/env-config-reminder/index.css +30 -0
  91. package/dist/lib/component/env-config-reminder/index.js +61 -0
  92. package/dist/lib/component/form-field/index.js +204 -0
  93. package/dist/lib/component/history-selector/index.css +237 -0
  94. package/dist/lib/component/history-selector/index.js +243 -0
  95. package/dist/lib/component/index.js +58 -0
  96. package/dist/lib/component/logo/index.css +19 -0
  97. package/dist/lib/component/logo/index.js +67 -0
  98. package/dist/lib/component/logo/logo.js +24 -0
  99. package/dist/lib/component/misc/index.js +152 -0
  100. package/dist/lib/component/nav-actions/index.js +48 -0
  101. package/dist/lib/component/nav-actions/style.css +35 -0
  102. package/dist/lib/component/player/index.css +296 -0
  103. package/dist/lib/component/player/index.js +747 -0
  104. package/dist/lib/component/player/playback-controls.js +38 -0
  105. package/dist/lib/component/player/report-download.js +98 -0
  106. package/dist/lib/component/player/scenes/StepScene.js +228 -0
  107. package/dist/lib/component/player/scenes/derive-frame-state.js +266 -0
  108. package/dist/lib/component/player/scenes/export-branded-video.js +403 -0
  109. package/dist/lib/component/player/scenes/frame-calculator.js +186 -0
  110. package/dist/lib/component/player/scenes/playback-frame.js +40 -0
  111. package/dist/lib/component/player/scenes/playback-layout.js +46 -0
  112. package/dist/lib/component/player/scenes/pointer-layout.js +88 -0
  113. package/dist/lib/component/player/use-frame-player.js +121 -0
  114. package/dist/lib/component/playground/index.css +930 -0
  115. package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
  116. package/dist/lib/component/playground-result/index.css +92 -0
  117. package/dist/lib/component/playground-result/index.js +276 -0
  118. package/dist/lib/component/prompt-input/index.css +832 -0
  119. package/dist/lib/component/prompt-input/index.js +1005 -0
  120. package/dist/lib/component/screenshot-viewer/index.css +237 -0
  121. package/dist/lib/component/screenshot-viewer/index.js +353 -0
  122. package/dist/lib/component/service-mode-control/index.js +141 -0
  123. package/dist/lib/component/shiny-text/index.css +107 -0
  124. package/dist/lib/component/shiny-text/index.js +49 -0
  125. package/dist/lib/component/universal-playground/empty-state.js +39 -0
  126. package/dist/lib/component/universal-playground/index.css +619 -0
  127. package/dist/lib/component/universal-playground/index.js +607 -0
  128. package/dist/lib/component/universal-playground/providers/context-provider.js +133 -0
  129. package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +320 -0
  130. package/dist/lib/component/universal-playground/providers/storage-provider.js +337 -0
  131. package/dist/lib/component/universal-playground/universal-playground-electron.js +717 -0
  132. package/dist/lib/hooks/useMinimalTypeGate.js +81 -0
  133. package/dist/lib/hooks/usePlaygroundExecution.js +478 -0
  134. package/dist/lib/hooks/usePlaygroundState.js +312 -0
  135. package/dist/lib/hooks/useSafeOverrideAIConfig.js +57 -0
  136. package/dist/lib/hooks/useServerValid.js +89 -0
  137. package/dist/lib/hooks/useTheme.js +59 -0
  138. package/dist/lib/icons/action-chevron.js +95 -0
  139. package/dist/lib/icons/avatar.js +104 -0
  140. package/dist/lib/icons/close.js +95 -0
  141. package/dist/lib/icons/global-perspective.js +92 -0
  142. package/dist/lib/icons/history.js +106 -0
  143. package/dist/lib/icons/magnifying-glass.js +115 -0
  144. package/dist/lib/icons/player-setting.js +102 -0
  145. package/dist/lib/icons/prompt-history.js +104 -0
  146. package/dist/lib/icons/setting.js +96 -0
  147. package/dist/lib/icons/show-marker.js +92 -0
  148. package/dist/lib/index.js +204 -0
  149. package/dist/lib/static/image/logo.png +0 -0
  150. package/dist/lib/store/history.js +135 -0
  151. package/dist/lib/store/store.js +287 -0
  152. package/dist/lib/types.js +119 -0
  153. package/dist/lib/utils/action-label.js +52 -0
  154. package/dist/lib/utils/color.js +75 -0
  155. package/dist/lib/utils/constants.js +172 -0
  156. package/dist/lib/utils/device-capabilities.js +50 -0
  157. package/dist/lib/utils/empty-state-scroll.js +42 -0
  158. package/dist/lib/utils/highlight-element.js +99 -0
  159. package/dist/lib/utils/index.js +69 -0
  160. package/dist/lib/utils/playground-utils.js +86 -0
  161. package/dist/lib/utils/progress-action-icon.js +67 -0
  162. package/dist/lib/utils/prompt-input-utils.js +89 -0
  163. package/dist/lib/utils/prompt-placeholder.js +53 -0
  164. package/dist/lib/utils/replay-scripts.js +474 -0
  165. package/dist/types/component/blackboard/highlights.d.ts +11 -0
  166. package/dist/types/component/blackboard/index.d.ts +10 -0
  167. package/dist/types/component/config-selector/index.d.ts +15 -0
  168. package/dist/types/component/context-preview/index.d.ts +9 -0
  169. package/dist/types/component/env-config/index.d.ts +8 -0
  170. package/dist/types/component/env-config-reminder/index.d.ts +6 -0
  171. package/dist/types/component/form-field/index.d.ts +17 -0
  172. package/dist/types/component/history-selector/index.d.ts +13 -0
  173. package/dist/types/component/index.d.ts +1 -0
  174. package/dist/types/component/logo/index.d.ts +5 -0
  175. package/dist/types/component/misc/index.d.ts +6 -0
  176. package/dist/types/component/nav-actions/index.d.ts +12 -0
  177. package/dist/types/component/player/index.d.ts +15 -0
  178. package/dist/types/component/player/playback-controls.d.ts +1 -0
  179. package/dist/types/component/player/report-download.d.ts +32 -0
  180. package/dist/types/component/player/scenes/StepScene.d.ts +9 -0
  181. package/dist/types/component/player/scenes/derive-frame-state.d.ts +40 -0
  182. package/dist/types/component/player/scenes/export-branded-video.d.ts +33 -0
  183. package/dist/types/component/player/scenes/frame-calculator.d.ts +40 -0
  184. package/dist/types/component/player/scenes/playback-frame.d.ts +3 -0
  185. package/dist/types/component/player/scenes/playback-layout.d.ts +7 -0
  186. package/dist/types/component/player/scenes/pointer-layout.d.ts +20 -0
  187. package/dist/types/component/player/use-frame-player.d.ts +17 -0
  188. package/dist/types/component/playground-result/index.d.ts +22 -0
  189. package/dist/types/component/prompt-input/index.d.ts +23 -0
  190. package/dist/types/component/screenshot-viewer/index.d.ts +23 -0
  191. package/dist/types/component/service-mode-control/index.d.ts +6 -0
  192. package/dist/types/component/shiny-text/index.d.ts +12 -0
  193. package/dist/types/component/universal-playground/empty-state.d.ts +3 -0
  194. package/dist/types/component/universal-playground/index.d.ts +4 -0
  195. package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
  196. package/dist/types/component/universal-playground/providers/indexeddb-storage-provider.d.ts +71 -0
  197. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
  198. package/dist/types/component/universal-playground/universal-playground-electron.d.ts +4 -0
  199. package/dist/types/hooks/useMinimalTypeGate.d.ts +72 -0
  200. package/dist/types/hooks/usePlaygroundExecution.d.ts +40 -0
  201. package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
  202. package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
  203. package/dist/types/hooks/useServerValid.d.ts +1 -0
  204. package/dist/types/hooks/useTheme.d.ts +7 -0
  205. package/dist/types/index.d.ts +29 -0
  206. package/dist/types/store/history.d.ts +16 -0
  207. package/dist/types/store/store.d.ts +57 -0
  208. package/dist/types/types.d.ts +278 -0
  209. package/dist/types/utils/action-label.d.ts +11 -0
  210. package/dist/types/utils/color.d.ts +4 -0
  211. package/dist/types/utils/constants.d.ts +80 -0
  212. package/dist/types/utils/device-capabilities.d.ts +9 -0
  213. package/dist/types/utils/empty-state-scroll.d.ts +11 -0
  214. package/dist/types/utils/highlight-element.d.ts +3 -0
  215. package/dist/types/utils/index.d.ts +5 -0
  216. package/dist/types/utils/playground-utils.d.ts +11 -0
  217. package/dist/types/utils/progress-action-icon.d.ts +12 -0
  218. package/dist/types/utils/prompt-input-utils.d.ts +24 -0
  219. package/dist/types/utils/prompt-placeholder.d.ts +1 -0
  220. package/dist/types/utils/replay-scripts.d.ts +50 -0
  221. package/package.json +82 -0
@@ -0,0 +1,72 @@
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 history_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 history_ownKeys(Object(source)).forEach(function(key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ return target;
44
+ }
45
+ const SvgHistory = (props)=>/*#__PURE__*/ jsxs("svg", _object_spread_props(_object_spread({
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ width: 25,
48
+ height: 25,
49
+ fill: "none",
50
+ viewBox: "0 0 25 25"
51
+ }, props), {
52
+ children: [
53
+ /*#__PURE__*/ jsx("path", {
54
+ stroke: "currentColor",
55
+ strokeLinecap: "round",
56
+ strokeLinejoin: "round",
57
+ strokeOpacity: 0.85,
58
+ strokeWidth: 1.33,
59
+ d: "M6.63 9.021c-2.862 6.126 2.197 10.501 6.063 10.501a7 7 0 1 0-6.063-10.5"
60
+ }),
61
+ /*#__PURE__*/ jsx("path", {
62
+ stroke: "currentColor",
63
+ strokeLinecap: "round",
64
+ strokeLinejoin: "round",
65
+ strokeOpacity: 0.85,
66
+ strokeWidth: 1.33,
67
+ d: "M12.695 8.322v4.203l2.967 2.968"
68
+ })
69
+ ]
70
+ }));
71
+ const icons_history = SvgHistory;
72
+ export { icons_history as default };
@@ -0,0 +1,81 @@
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 magnifying_glass_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 magnifying_glass_ownKeys(Object(source)).forEach(function(key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ return target;
44
+ }
45
+ const SvgMagnifyingGlass = (props)=>/*#__PURE__*/ jsxs("svg", _object_spread_props(_object_spread({
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ width: 19,
48
+ height: 19,
49
+ fill: "none",
50
+ viewBox: "0 0 19 19"
51
+ }, props), {
52
+ children: [
53
+ /*#__PURE__*/ jsxs("g", {
54
+ stroke: "currentColor",
55
+ strokeLinejoin: "round",
56
+ strokeOpacity: 0.65,
57
+ strokeWidth: 1.5,
58
+ clipPath: "url(#magnifying-glass_svg__a)",
59
+ children: [
60
+ /*#__PURE__*/ jsx("path", {
61
+ d: "M8.397 14.29a6.375 6.375 0 1 0 0-12.75 6.375 6.375 0 0 0 0 12.75Z"
62
+ }),
63
+ /*#__PURE__*/ jsx("path", {
64
+ strokeLinecap: "round",
65
+ d: "M10.519 5.42a3 3 0 0 0-2.122-.88 3 3 0 0 0-2.121.88M12.98 12.499l3.182 3.182"
66
+ })
67
+ ]
68
+ }),
69
+ /*#__PURE__*/ jsx("defs", {
70
+ children: /*#__PURE__*/ jsx("clipPath", {
71
+ id: "magnifying-glass_svg__a",
72
+ children: /*#__PURE__*/ jsx("path", {
73
+ fill: "#fff",
74
+ d: "M.522.04h18v18h-18z"
75
+ })
76
+ })
77
+ })
78
+ ]
79
+ }));
80
+ const magnifying_glass = SvgMagnifyingGlass;
81
+ export { magnifying_glass as default };
@@ -0,0 +1,68 @@
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 player_setting_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 player_setting_ownKeys(Object(source)).forEach(function(key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ return target;
44
+ }
45
+ const SvgPlayerSetting = (props)=>/*#__PURE__*/ jsxs("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: [
53
+ /*#__PURE__*/ jsx("path", {
54
+ stroke: "currentColor",
55
+ strokeLinejoin: "round",
56
+ strokeWidth: 1.333,
57
+ d: "M11.333 13.667 14.667 8l-3.334-5.667H4.667L1.333 8l3.334 5.667z"
58
+ }),
59
+ /*#__PURE__*/ jsx("path", {
60
+ stroke: "currentColor",
61
+ strokeLinejoin: "round",
62
+ strokeWidth: 1.333,
63
+ d: "M8 9.667a1.667 1.667 0 1 0 0-3.334 1.667 1.667 0 0 0 0 3.334Z"
64
+ })
65
+ ]
66
+ }));
67
+ const player_setting = SvgPlayerSetting;
68
+ export { player_setting 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 prompt_history_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 prompt_history_ownKeys(Object(source)).forEach(function(key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ return target;
44
+ }
45
+ const SvgPromptHistory = (props)=>/*#__PURE__*/ jsxs("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: [
53
+ /*#__PURE__*/ jsx("path", {
54
+ stroke: "#878787",
55
+ strokeLinecap: "round",
56
+ strokeLinejoin: "round",
57
+ strokeWidth: 1.33,
58
+ d: "M1.505 4.164c-2.862 6.126 2.197 10.501 6.063 10.501a7 7 0 1 0-6.063-10.5"
59
+ }),
60
+ /*#__PURE__*/ jsx("path", {
61
+ stroke: "#878787",
62
+ strokeLinecap: "round",
63
+ strokeLinejoin: "round",
64
+ strokeWidth: 1.33,
65
+ d: "M7.57 3.465v4.203l2.967 2.968"
66
+ })
67
+ ]
68
+ }));
69
+ const prompt_history = SvgPromptHistory;
70
+ export { prompt_history as default };
@@ -0,0 +1,62 @@
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 setting_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 setting_ownKeys(Object(source)).forEach(function(key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ return target;
44
+ }
45
+ const SvgSetting = (props)=>/*#__PURE__*/ jsx("svg", _object_spread_props(_object_spread({
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ width: 27,
48
+ height: 27,
49
+ fill: "none",
50
+ viewBox: "0 0 27 27"
51
+ }, props), {
52
+ children: /*#__PURE__*/ jsx("path", {
53
+ stroke: "currentColor",
54
+ strokeLinecap: "round",
55
+ strokeLinejoin: "round",
56
+ strokeOpacity: 0.85,
57
+ strokeWidth: 1.333,
58
+ d: "M19.527 8.855h-2M14.86 7.522v2.667M14.86 8.855H7.527M10.194 13.522H7.527M12.86 12.189v2.666M20.193 13.522H12.86M19.527 18.189h-2M14.86 16.855v2.667M14.86 18.189H7.527"
59
+ })
60
+ }));
61
+ const setting = SvgSetting;
62
+ export { setting 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 show_marker_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 show_marker_ownKeys(Object(source)).forEach(function(key) {
41
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42
+ });
43
+ return target;
44
+ }
45
+ const SvgShowMarker = (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: "M13 1.835a2.165 2.165 0 0 1 .665 4.225v3.88a2.166 2.166 0 1 1-2.725 2.725H5.06a2.165 2.165 0 1 1-2.725-2.726V6.06A2.165 2.165 0 1 1 5.06 3.336h5.88c.281-.87 1.097-1.5 2.06-1.5m-10 9.33a.835.835 0 1 0 0 1.67.835.835 0 0 0 0-1.67m10 0a.835.835 0 1 0 0 1.67.835.835 0 0 0 0-1.67m-7.94-6.5A2.17 2.17 0 0 1 3.665 6.06v3.88c.66.213 1.181.734 1.395 1.395h5.88a2.17 2.17 0 0 1 1.395-1.396V6.06a2.17 2.17 0 0 1-1.395-1.394zM3 3.165a.835.835 0 1 0 0 1.67.835.835 0 0 0 0-1.67m10 0a.835.835 0 1 0 0 1.67.835.835 0 0 0 0-1.67"
55
+ })
56
+ }));
57
+ const show_marker = SvgShowMarker;
58
+ export { show_marker as default };
@@ -0,0 +1,26 @@
1
+ import { allScriptsFromDump, extractDumpMetaInfo, generateAnimationScripts } from "./utils/replay-scripts.mjs";
2
+ import { useEnvConfig, useGlobalPreference } from "./store/store.mjs";
3
+ import { colorForName, globalThemeConfig, highlightColorForType } from "./utils/color.mjs";
4
+ import { EnvConfig } from "./component/env-config/index.mjs";
5
+ import { EnvConfigReminder } from "./component/env-config-reminder/index.mjs";
6
+ import { NavActions } from "./component/nav-actions/index.mjs";
7
+ import { Logo } from "./component/logo/index.mjs";
8
+ import { iconForStatus, timeCostStrElement } from "./component/misc/index.mjs";
9
+ import { useTheme } from "./hooks/useTheme.mjs";
10
+ import { useServerValid } from "./hooks/useServerValid.mjs";
11
+ import { safeOverrideAIConfig, useSafeOverrideAIConfig } from "./hooks/useSafeOverrideAIConfig.mjs";
12
+ import { PlaygroundResultView } from "./component/playground-result/index.mjs";
13
+ import { ServiceModeControl } from "./component/service-mode-control/index.mjs";
14
+ import { ContextPreview } from "./component/context-preview/index.mjs";
15
+ import { PromptInput } from "./component/prompt-input/index.mjs";
16
+ import { Player } from "./component/player/index.mjs";
17
+ import { Blackboard } from "./component/blackboard/index.mjs";
18
+ import screenshot_viewer from "./component/screenshot-viewer/index.mjs";
19
+ import { actionNameForType, getPlaceholderForType, staticAgentFromContext } from "./utils/playground-utils.mjs";
20
+ import { filterBase64Value, timeStr } from "./utils/index.mjs";
21
+ import shiny_text from "./component/shiny-text/index.mjs";
22
+ import universal_playground, { UniversalPlayground } from "./component/universal-playground/index.mjs";
23
+ import { UniversalPlaygroundElectron } from "./component/universal-playground/universal-playground-electron.mjs";
24
+ import { IndexedDBStorageProvider, LocalStorageProvider, MemoryStorageProvider, NoOpStorageProvider, StorageType, createStorageProvider, detectBestStorageType } from "./component/universal-playground/providers/storage-provider.mjs";
25
+ import { AgentContextProvider, BaseContextProvider, NoOpContextProvider, StaticContextProvider } from "./component/universal-playground/providers/context-provider.mjs";
26
+ export { AgentContextProvider, BaseContextProvider, Blackboard, ContextPreview, EnvConfig, EnvConfigReminder, IndexedDBStorageProvider, LocalStorageProvider, Logo, MemoryStorageProvider, NavActions, NoOpContextProvider, NoOpStorageProvider, Player, PlaygroundResultView, PromptInput, screenshot_viewer as ScreenshotViewer, ServiceModeControl, shiny_text as ShinyText, StaticContextProvider, StorageType, UniversalPlayground, universal_playground as UniversalPlaygroundDefault, UniversalPlaygroundElectron, actionNameForType, allScriptsFromDump, colorForName, createStorageProvider, detectBestStorageType, extractDumpMetaInfo, filterBase64Value, generateAnimationScripts, getPlaceholderForType, globalThemeConfig, highlightColorForType, iconForStatus, safeOverrideAIConfig, staticAgentFromContext, timeCostStrElement, timeStr, useEnvConfig, useGlobalPreference, useSafeOverrideAIConfig, useServerValid, useTheme };
Binary file
@@ -0,0 +1,128 @@
1
+ import { create } from "zustand";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var external_zustand_namespaceObject = {};
25
+ __webpack_require__.r(external_zustand_namespaceObject);
26
+ __webpack_require__.d(external_zustand_namespaceObject, {
27
+ create: ()=>create
28
+ });
29
+ function _define_property(obj, key, value) {
30
+ if (key in obj) Object.defineProperty(obj, key, {
31
+ value: value,
32
+ enumerable: true,
33
+ configurable: true,
34
+ writable: true
35
+ });
36
+ else obj[key] = value;
37
+ return obj;
38
+ }
39
+ function _object_spread(target) {
40
+ for(var i = 1; i < arguments.length; i++){
41
+ var source = null != arguments[i] ? arguments[i] : {};
42
+ var ownKeys = Object.keys(source);
43
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
44
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
45
+ }));
46
+ ownKeys.forEach(function(key) {
47
+ _define_property(target, key, source[key]);
48
+ });
49
+ }
50
+ return target;
51
+ }
52
+ function history_ownKeys(object, enumerableOnly) {
53
+ var keys = Object.keys(object);
54
+ if (Object.getOwnPropertySymbols) {
55
+ var symbols = Object.getOwnPropertySymbols(object);
56
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
57
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
58
+ });
59
+ keys.push.apply(keys, symbols);
60
+ }
61
+ return keys;
62
+ }
63
+ function _object_spread_props(target, source) {
64
+ source = null != source ? source : {};
65
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
66
+ else history_ownKeys(Object(source)).forEach(function(key) {
67
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68
+ });
69
+ return target;
70
+ }
71
+ const { create: history_create } = external_zustand_namespaceObject;
72
+ const HISTORY_KEY = 'midscene-prompt-history-v2';
73
+ const LAST_SELECTED_TYPE_KEY = 'midscene-last-selected-type';
74
+ const getHistoryFromLocalStorage = ()=>{
75
+ const historyString = localStorage.getItem(HISTORY_KEY);
76
+ return historyString ? JSON.parse(historyString) : {};
77
+ };
78
+ const getLastSelectedType = ()=>localStorage.getItem(LAST_SELECTED_TYPE_KEY) || 'aiAct';
79
+ const setLastSelectedType = (type)=>{
80
+ localStorage.setItem(LAST_SELECTED_TYPE_KEY, type);
81
+ };
82
+ const useHistoryStore = history_create((set, get)=>({
83
+ history: getHistoryFromLocalStorage(),
84
+ lastSelectedType: getLastSelectedType(),
85
+ clearHistory: (type)=>{
86
+ const newHistory = _object_spread({}, get().history);
87
+ delete newHistory[type];
88
+ set({
89
+ history: newHistory
90
+ });
91
+ localStorage.setItem(HISTORY_KEY, JSON.stringify(newHistory));
92
+ },
93
+ addHistory: (historyItem)=>{
94
+ const { type } = historyItem;
95
+ const currentHistory = get().history;
96
+ const typeHistory = currentHistory[type] || [];
97
+ const stringifiedNewItem = JSON.stringify({
98
+ prompt: historyItem.prompt,
99
+ params: historyItem.params
100
+ });
101
+ const newTypeHistory = [
102
+ historyItem,
103
+ ...typeHistory.filter((h)=>{
104
+ const stringifiedOldItem = JSON.stringify({
105
+ prompt: h.prompt,
106
+ params: h.params
107
+ });
108
+ return stringifiedOldItem !== stringifiedNewItem;
109
+ })
110
+ ];
111
+ if (newTypeHistory.length > 10) newTypeHistory.length = 10;
112
+ const newHistory = _object_spread_props(_object_spread({}, currentHistory), {
113
+ [type]: newTypeHistory
114
+ });
115
+ set({
116
+ history: newHistory
117
+ });
118
+ localStorage.setItem(HISTORY_KEY, JSON.stringify(newHistory));
119
+ },
120
+ getHistoryForType: (type)=>get().history[type] || [],
121
+ setLastSelectedType: (type)=>{
122
+ set({
123
+ lastSelectedType: type
124
+ });
125
+ setLastSelectedType(type);
126
+ }
127
+ }));
128
+ export { useHistoryStore };