vzcode 1.61.0 → 1.62.0

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.html CHANGED
@@ -20,7 +20,7 @@
20
20
  href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
21
21
  rel="stylesheet"
22
22
  />
23
- <script type="module" crossorigin src="/assets/index-EWyCE9d7.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-vbF7Aejt.js"></script>
24
24
  <link rel="stylesheet" crossorigin href="/assets/index-Br76WttW.css">
25
25
  </head>
26
26
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vzcode",
3
- "version": "1.61.0",
3
+ "version": "1.62.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -244,4 +244,5 @@ export interface VZCodeProviderProps {
244
244
  chatId: string;
245
245
  canUndo: boolean;
246
246
  }>;
247
+ iframeRef?: React.MutableRefObject<HTMLIFrameElement>;
247
248
  }
@@ -52,6 +52,7 @@ export const useVZCodeState = ({
52
52
  clearStoredAIPrompt,
53
53
  getStoredAIPrompt,
54
54
  additionalWidgets,
55
+ iframeRef: externalIframeRef,
55
56
  }: Omit<
56
57
  VZCodeProviderProps,
57
58
  'children'
@@ -76,7 +77,8 @@ export const useVZCodeState = ({
76
77
 
77
78
  const codeEditorRef = useRef(null);
78
79
 
79
- const iframeRef = useRef(null);
80
+ // Use external iframeRef if provided, otherwise create our own
81
+ const iframeRef = externalIframeRef || useRef(null);
80
82
 
81
83
  // The error message shows errors in order of priority:
82
84
  // * `runtimeError` - errors from runtime execution, highest priority
@@ -59,6 +59,17 @@ export const VisualEditor = () => {
59
59
  );
60
60
  }
61
61
 
62
+ if (!Array.isArray(configData.visualEditorWidgets)) {
63
+ return (
64
+ <EmptyState>
65
+ Your config.json file has "visualEditorWidgets" but
66
+ it is not an array. Please make sure
67
+ "visualEditorWidgets" is an array of widget
68
+ configurations.
69
+ </EmptyState>
70
+ );
71
+ }
72
+
62
73
  const onInputUpdate = useCallback(
63
74
  (
64
75
  property: string,