@widgetic/creator 0.3.50 → 0.3.53
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.
|
@@ -135,6 +135,7 @@ declare const WidgetDetails: $$__sveltets_2_IsomorphicComponent<{
|
|
|
135
135
|
setPreviewLoadingState?: (val: boolean) => void;
|
|
136
136
|
getPreviewError?: () => string | null;
|
|
137
137
|
setPreviewBuildError?: (message: string | null) => void;
|
|
138
|
+
retryPreviewIfEmpty?: () => Promise<void>;
|
|
138
139
|
showNoCodeYetState?: () => void;
|
|
139
140
|
startPreviewLoadingPublic?: () => void;
|
|
140
141
|
sendMessageToPreview?: (message: Record<string, unknown>) => void;
|
|
@@ -224,6 +225,7 @@ declare const WidgetDetails: $$__sveltets_2_IsomorphicComponent<{
|
|
|
224
225
|
setPreviewLoadingState: (val: boolean) => void;
|
|
225
226
|
getPreviewError: () => string | null;
|
|
226
227
|
setPreviewBuildError: (message: string | null) => void;
|
|
228
|
+
retryPreviewIfEmpty: () => Promise<void>;
|
|
227
229
|
showNoCodeYetState: () => void;
|
|
228
230
|
startPreviewLoadingPublic: () => void;
|
|
229
231
|
sendMessageToPreview: (message: Record<string, unknown>) => void;
|
package/dist/creator-types.d.ts
CHANGED
|
@@ -32,6 +32,12 @@ export interface CreatorAppProps {
|
|
|
32
32
|
* Omit for standalone widget-creator (falls back to VITE_DEBUG_MODE / dev).
|
|
33
33
|
*/
|
|
34
34
|
initialDebugMode?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Extra canvas tools (undo/frame/image/library, zoom 1:1/fit/shortcuts).
|
|
37
|
+
* Independent of debugMode — Debug is staging-only UI.
|
|
38
|
+
* Site owns the header toggle; embed uses CustomEvent after mount.
|
|
39
|
+
*/
|
|
40
|
+
initialAdvancedFeatures?: boolean;
|
|
35
41
|
/**
|
|
36
42
|
* Host-controlled default coder model id (e.g. `deepseek-v4-flash`).
|
|
37
43
|
* Site reads its own env and passes this — no creator-app.js rebuild, no API-gateway default for the UI.
|
package/dist/pageHelpers.js
CHANGED
|
@@ -20,6 +20,9 @@ export function sanitizePreviewBuildError(raw) {
|
|
|
20
20
|
if (/failed to fetch|fetch failed/i.test(text)) {
|
|
21
21
|
return 'Could not reach the preview builder. Try Rebuild.';
|
|
22
22
|
}
|
|
23
|
+
if (/is not a function/i.test(text)) {
|
|
24
|
+
return 'Preview rebuild is unavailable in this session. Try Rebuild or reload the page.';
|
|
25
|
+
}
|
|
23
26
|
if (looksLikeHtmlErrorPage(text) || /error code:\s*1042/i.test(text)) {
|
|
24
27
|
return 'Preview builder is unavailable. The widget code was saved — use Rebuild to compile it.';
|
|
25
28
|
}
|
|
@@ -33,7 +36,7 @@ export function isInfrastructurePreviewError(raw) {
|
|
|
33
36
|
return false;
|
|
34
37
|
if (looksLikeHtmlErrorPage(raw))
|
|
35
38
|
return true;
|
|
36
|
-
return /preview builder is unavailable|could not reach the preview builder|unexpected error page/i.test(sanitizePreviewBuildError(raw));
|
|
39
|
+
return /preview builder is unavailable|could not reach the preview builder|unexpected error page|is not a function|requested resource was not found|rebuild is unavailable/i.test(sanitizePreviewBuildError(raw));
|
|
37
40
|
}
|
|
38
41
|
export function normalizeErrorMessage(rawError) {
|
|
39
42
|
let extracted = '';
|