@widgetic/creator 0.3.59 → 0.3.60
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/CreatorApp.svelte +1412 -284
- package/dist/components/WidgetDetails.svelte +10 -34
- package/dist/components/WidgetDetails.svelte.d.ts +1 -0
- package/dist/components/WidgetShapeLivePreviews.svelte +414 -43
- package/dist/components/WidgetShapeLivePreviews.svelte.d.ts +53 -29
- package/package.json +1 -1
|
@@ -1,40 +1,64 @@
|
|
|
1
|
-
interface
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
1
|
+
interface VersionOption {
|
|
2
|
+
id: string;
|
|
3
|
+
/** Full list label, e.g. "Version 9". */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Compact trigger label, e.g. "v9". */
|
|
6
|
+
shortLabel?: string;
|
|
7
|
+
/** Published date/time shown in the list. */
|
|
8
|
+
dateLabel?: string;
|
|
9
|
+
/** True when this option is the live published version. */
|
|
10
|
+
isLive?: boolean;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Live iframe + chrome over Fabric WidgetShapes (W3).
|
|
17
|
-
* Body drag is locked on the shape; move via the top drag bar so the iframe stays interactive.
|
|
18
|
-
*/ class?: string;
|
|
12
|
+
interface Props {
|
|
13
|
+
class?: string;
|
|
19
14
|
style?: string;
|
|
20
15
|
enabled?: boolean;
|
|
21
|
-
/** Screen-space boxes for widget shapes currently on the canvas. */
|
|
16
|
+
/** Screen-space boxes for widget shapes currently on the canvas. */
|
|
17
|
+
getRects?: (() => Array<{
|
|
22
18
|
widgetId: string;
|
|
23
19
|
left: number;
|
|
24
20
|
top: number;
|
|
25
21
|
width: number;
|
|
26
22
|
height: number;
|
|
27
23
|
}>) | null;
|
|
28
|
-
/** Resolve a live preview URL for a widget (CDN published or Worker preview). */
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
/** Resolve a live preview URL for a widget (CDN published or Worker preview). */
|
|
25
|
+
resolveUrl?: ((widgetId: string) => string | null) | null;
|
|
26
|
+
/** Currently selected WidgetShape id (highlights chrome). */
|
|
27
|
+
selectedWidgetId?: string | null;
|
|
28
|
+
/** Translate shape by screen-pixel delta. */
|
|
29
|
+
onTranslate?: ((widgetId: string, dxScreen: number, dyScreen: number) => void) | null;
|
|
30
|
+
/** Fired once when a chrome drag ends (mark canvas dirty / history). */
|
|
31
|
+
onTranslateEnd?: ((widgetId: string) => void) | null;
|
|
32
|
+
/** Select the Fabric WidgetShape (e.g. when pressing the drag bar). */
|
|
33
|
+
onSelectShape?: ((widgetId: string) => void) | null;
|
|
34
|
+
/** Open Widget Details / chat for this widget. */
|
|
35
|
+
onOpenChat?: ((widgetId: string) => void) | null;
|
|
36
|
+
/** Resolve display title for the chrome bar. */
|
|
37
|
+
resolveTitle?: ((widgetId: string) => string | null) | null;
|
|
38
|
+
/** Current version label, e.g. "v3" or "Preview". */
|
|
39
|
+
resolveVersionLabel?: ((widgetId: string) => string | null) | null;
|
|
40
|
+
/** Available version options for the select (null/empty → show label only). */
|
|
41
|
+
resolveVersionOptions?: ((widgetId: string) => Array<VersionOption> | null) | null;
|
|
42
|
+
/** Currently selected version option id. */
|
|
43
|
+
resolveVersionSelectedId?: ((widgetId: string) => string | null) | null;
|
|
44
|
+
onVersionChange?: ((widgetId: string, versionId: string) => void) | null;
|
|
45
|
+
/** Promote a published version to Live (same as chat Set live). */
|
|
46
|
+
onSetLive?: ((widgetId: string, version: number) => void) | null;
|
|
47
|
+
/** Version currently being set live (disables that row's button). */
|
|
48
|
+
settingLiveVersion?: number | null;
|
|
49
|
+
/** Optional notify after local iframe reload (does not capture screenshots). */
|
|
50
|
+
onRefresh?: ((widgetId: string) => void) | null;
|
|
51
|
+
/** Bump when widget names / publish state change so chrome re-renders. */
|
|
52
|
+
titleRevision?: number;
|
|
53
|
+
/** Whether this widget has unpublished codegen ahead of Live (show Publish). */
|
|
54
|
+
resolveCanPublish?: ((widgetId: string) => boolean) | null;
|
|
55
|
+
/** Publish HEAD as a new live version (shape bar Publish button). */
|
|
56
|
+
onPublish?: ((widgetId: string) => void) | null;
|
|
57
|
+
/** True while publish is in flight for this widget. */
|
|
58
|
+
resolveIsPublishing?: ((widgetId: string) => boolean) | null;
|
|
59
|
+
}
|
|
60
|
+
declare const WidgetShapeLivePreviews: import("svelte").Component<Props, {
|
|
37
61
|
sync: () => void;
|
|
38
|
-
},
|
|
39
|
-
type WidgetShapeLivePreviews =
|
|
62
|
+
}, "">;
|
|
63
|
+
type WidgetShapeLivePreviews = ReturnType<typeof WidgetShapeLivePreviews>;
|
|
40
64
|
export default WidgetShapeLivePreviews;
|