tempo-sdk 0.0.99 → 0.0.102
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/README.md +3 -403
- package/dist/assets/editor.d.ts +43 -65
- package/dist/assets/editor.js +1 -573
- package/dist/assets/index.d.ts +11 -61
- package/dist/assets/index.js +1 -338
- package/dist/assets/parser.d.ts +68 -78
- package/dist/assets/parser.js +1 -33
- package/dist/astro/asset-preview-client.d.ts +3 -2
- package/dist/astro/asset-preview-client.js +1 -93
- package/dist/astro/controls.d.ts +1 -3
- package/dist/astro/controls.js +1 -7
- package/dist/astro/document-client.d.ts +5 -6
- package/dist/astro/document-client.js +1 -78
- package/dist/astro/runtime.d.ts +23 -11
- package/dist/astro/runtime.js +1 -86
- package/dist/astro.d.ts +19 -13
- package/dist/astro.js +1 -818
- package/dist/canvas/astro-contract.d.ts +0 -3
- package/dist/canvas/astro-contract.js +1 -9
- package/dist/canvas/astro.d.ts +3 -4
- package/dist/canvas/astro.js +1 -42
- package/dist/canvas/editor.d.ts +187 -183
- package/dist/canvas/editor.js +1 -1094
- package/dist/canvas/flutter-preview.d.ts +0 -1
- package/dist/canvas/flutter-preview.js +1 -9
- package/dist/canvas/index.d.ts +46 -100
- package/dist/canvas/index.js +1 -3926
- package/dist/canvas/interact-projection.d.ts +7 -5
- package/dist/canvas/interact-projection.js +1 -12
- package/dist/canvas/parser.d.ts +10 -303
- package/dist/canvas/parser.js +1 -30
- package/dist/canvas/svelte.d.ts +6 -7
- package/dist/canvas/svelte.js +1 -91
- package/dist/canvas/vue.d.ts +9 -49
- package/dist/canvas/vue.js +1 -264
- package/dist/chunk-CXCUJCXD.js +1 -0
- package/dist/chunk-FH6TMWFA.js +1 -0
- package/dist/chunk-FL7FSJSL.js +1 -0
- package/dist/chunk-GQIOB5SV.js +1 -0
- package/dist/chunk-HBQ7FFH7.js +1 -0
- package/dist/chunk-JRJOWLCN.js +1 -0
- package/dist/chunk-LJCBFTMP.js +1 -0
- package/dist/chunk-M3GN2KUH.js +1 -0
- package/dist/chunk-MPIHFFML.js +1 -0
- package/dist/chunk-T5TY3U2H.js +1 -0
- package/dist/chunk-XO2BSHWM.js +1 -0
- package/dist/chunk-XUSV3KOD.js +1 -0
- package/dist/chunk-ZXBMP6RV.js +1 -0
- package/dist/{controls-uCaQ3CNX.d.ts → controls-DKslABtM.d.ts} +0 -3
- package/dist/expo/plugin.cjs +1 -1928
- package/dist/expo/plugin.js +1 -8
- package/dist/expo-babel-plugin.cjs +1 -1928
- package/dist/expo-babel-plugin.d.cts +46 -40
- package/dist/expo-babel-plugin.d.ts +46 -40
- package/dist/expo-babel-plugin.js +1 -8
- package/dist/flutter-preview-path.d.ts +23 -7
- package/dist/flutter-preview-path.js +1 -16
- package/dist/index.d.ts +33 -45
- package/dist/index.js +1 -20
- package/dist/nextjs/plugin.cjs +1 -413
- package/dist/nextjs/plugin.js +1 -7
- package/dist/nextjs-loader.cjs +1 -2277
- package/dist/nextjs.cjs +1 -484
- package/dist/nextjs.d.cts +2 -58
- package/dist/nextjs.d.ts +2 -58
- package/dist/nextjs.js +1 -17
- package/dist/nuxt/runtime/identity.d.ts +2 -4
- package/dist/nuxt/runtime/identity.js +1 -18
- package/dist/nuxt.d.ts +31 -92
- package/dist/nuxt.js +1 -5854
- package/dist/{page-DwLnOM5d.d.ts → page-Bc8PekIX.d.ts} +1 -5
- package/dist/parser.d-MO5ciJ5n.d.ts +236 -0
- package/dist/{storyboard-CMJVBSXn.d.ts → storyboard.contract.d-UQ4MUYN5.d.ts} +3 -25
- package/dist/svelte.d.ts +8 -18
- package/dist/svelte.js +1 -917
- package/dist/types-CfUgM2w4.d.ts +57 -0
- package/dist/v1-client-compat-n0E0XxuX.d.ts +5 -0
- package/dist/vue.d.ts +17 -58
- package/dist/vue.js +1 -1501
- package/package.json +12 -62
- package/dist/assets/editor.js.map +0 -1
- package/dist/assets/index.js.map +0 -1
- package/dist/assets/parser.js.map +0 -1
- package/dist/astro/asset-preview-client.js.map +0 -1
- package/dist/astro/controls.js.map +0 -1
- package/dist/astro/document-client.js.map +0 -1
- package/dist/astro/runtime.js.map +0 -1
- package/dist/astro.js.map +0 -1
- package/dist/canvas/astro-contract.js.map +0 -1
- package/dist/canvas/astro.js.map +0 -1
- package/dist/canvas/editor.js.map +0 -1
- package/dist/canvas/flutter-preview.js.map +0 -1
- package/dist/canvas/index.js.map +0 -1
- package/dist/canvas/interact-projection.js.map +0 -1
- package/dist/canvas/parser.js.map +0 -1
- package/dist/canvas/svelte.js.map +0 -1
- package/dist/canvas/vue.js.map +0 -1
- package/dist/chunk-27WT3XUG.js +0 -455
- package/dist/chunk-27WT3XUG.js.map +0 -1
- package/dist/chunk-5HIIF354.js +0 -67
- package/dist/chunk-5HIIF354.js.map +0 -1
- package/dist/chunk-65B52AR7.js +0 -11
- package/dist/chunk-65B52AR7.js.map +0 -1
- package/dist/chunk-6HYKKP5N.js +0 -2658
- package/dist/chunk-6HYKKP5N.js.map +0 -1
- package/dist/chunk-6SOP4XU6.js +0 -1891
- package/dist/chunk-6SOP4XU6.js.map +0 -1
- package/dist/chunk-AFXE462X.js +0 -1253
- package/dist/chunk-AFXE462X.js.map +0 -1
- package/dist/chunk-BQPKOVI5.js +0 -115
- package/dist/chunk-BQPKOVI5.js.map +0 -1
- package/dist/chunk-CYDF4LYJ.js +0 -342
- package/dist/chunk-CYDF4LYJ.js.map +0 -1
- package/dist/chunk-CYQE3TLC.js +0 -37
- package/dist/chunk-CYQE3TLC.js.map +0 -1
- package/dist/chunk-DI2ZFAWL.js +0 -14
- package/dist/chunk-DI2ZFAWL.js.map +0 -1
- package/dist/chunk-EGRHWZRV.js +0 -1
- package/dist/chunk-EGRHWZRV.js.map +0 -1
- package/dist/chunk-FGWGY3G3.js +0 -157
- package/dist/chunk-FGWGY3G3.js.map +0 -1
- package/dist/chunk-HOBTDB6G.js +0 -112
- package/dist/chunk-HOBTDB6G.js.map +0 -1
- package/dist/chunk-I7VF4ZOV.js +0 -630
- package/dist/chunk-I7VF4ZOV.js.map +0 -1
- package/dist/chunk-JVVHU3A7.js +0 -1077
- package/dist/chunk-JVVHU3A7.js.map +0 -1
- package/dist/chunk-MIXQVPDH.js +0 -8606
- package/dist/chunk-MIXQVPDH.js.map +0 -1
- package/dist/chunk-MU7S7NU7.js +0 -183
- package/dist/chunk-MU7S7NU7.js.map +0 -1
- package/dist/chunk-OX2YKYSL.js +0 -13
- package/dist/chunk-OX2YKYSL.js.map +0 -1
- package/dist/chunk-PYAJHLXO.js +0 -903
- package/dist/chunk-PYAJHLXO.js.map +0 -1
- package/dist/chunk-SGN7BDRE.js +0 -16
- package/dist/chunk-SGN7BDRE.js.map +0 -1
- package/dist/chunk-SGTGDLOX.js +0 -285
- package/dist/chunk-SGTGDLOX.js.map +0 -1
- package/dist/chunk-T364NBR3.js +0 -1440
- package/dist/chunk-T364NBR3.js.map +0 -1
- package/dist/chunk-U66QI3EN.js +0 -1524
- package/dist/chunk-U66QI3EN.js.map +0 -1
- package/dist/chunk-WTXOWQ7N.js +0 -47
- package/dist/chunk-WTXOWQ7N.js.map +0 -1
- package/dist/chunk-X5DJKVBT.js +0 -1308
- package/dist/chunk-X5DJKVBT.js.map +0 -1
- package/dist/chunk-ZT7HJ6YU.js +0 -38
- package/dist/chunk-ZT7HJ6YU.js.map +0 -1
- package/dist/chunk-ZW26VZHX.js +0 -3169
- package/dist/chunk-ZW26VZHX.js.map +0 -1
- package/dist/controls-reader-5MFHYBZZ.js +0 -192
- package/dist/controls-reader-5MFHYBZZ.js.map +0 -1
- package/dist/expo/plugin.cjs.map +0 -1
- package/dist/expo/plugin.js.map +0 -1
- package/dist/expo-babel-plugin.cjs.map +0 -1
- package/dist/expo-babel-plugin.js.map +0 -1
- package/dist/flutter-preview-path.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/nextjs/plugin.cjs.map +0 -1
- package/dist/nextjs/plugin.js.map +0 -1
- package/dist/nextjs-loader.cjs.map +0 -1
- package/dist/nextjs.cjs.map +0 -1
- package/dist/nextjs.js.map +0 -1
- package/dist/nuxt/runtime/identity.js.map +0 -1
- package/dist/nuxt.js.map +0 -1
- package/dist/svelte.js.map +0 -1
- package/dist/types-C8OIU-kc.d.ts +0 -106
- package/dist/v1-client-compat-qxaXEDm_.d.ts +0 -23
- package/dist/vue.js.map +0 -1
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
FLUTTER_PREVIEW_KEY_ATTRIBUTE,
|
|
3
|
-
parseFlutterPreview
|
|
4
|
-
} from "../chunk-CYQE3TLC.js";
|
|
5
|
-
export {
|
|
6
|
-
FLUTTER_PREVIEW_KEY_ATTRIBUTE,
|
|
7
|
-
parseFlutterPreview
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=flutter-preview.js.map
|
|
1
|
+
import{a,b}from"../chunk-FH6TMWFA.js";import"../chunk-XUSV3KOD.js";export{b as FLUTTER_PREVIEW_KEY_ATTRIBUTE,a as parseFlutterPreview};
|
package/dist/canvas/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
|
-
import { S as
|
|
4
|
-
export {
|
|
5
|
-
import '../page-
|
|
6
|
-
import '../v1-client-compat-
|
|
3
|
+
import { H as HtmlStoryboard$1, L as LegacyStoryboardV1$1, R as RouteStoryboard$1, S as Storyboard$1, a as StoryboardSlot$1, b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-UQ4MUYN5.js';
|
|
4
|
+
export { d as StoryboardVrtIgnoreRegion } from '../storyboard.contract.d-UQ4MUYN5.js';
|
|
5
|
+
import '../page-Bc8PekIX.js';
|
|
6
|
+
import '../v1-client-compat-n0E0XxuX.js';
|
|
7
7
|
|
|
8
|
-
declare function useActiveState(storyboardId: string): boolean;
|
|
9
|
-
|
|
10
|
-
/** Canvas and editor previews use the same key for an unkeyed declaration. */
|
|
11
8
|
declare function getStoryboardKey(id: string): string;
|
|
12
9
|
|
|
13
10
|
declare function getCanvasStoryboardRenderId(canvasPath: string, storyboardId: string): string;
|
|
@@ -30,35 +27,32 @@ declare function CanvasContext({ children, path, }: {
|
|
|
30
27
|
type CanvasModule = {
|
|
31
28
|
default: ComponentType;
|
|
32
29
|
};
|
|
33
|
-
declare function CanvasImportBoundary({ canvasPath, load, }: {
|
|
30
|
+
declare function CanvasImportBoundary$1({ canvasPath, load, }: {
|
|
34
31
|
canvasPath: string;
|
|
35
32
|
load: () => Promise<CanvasModule>;
|
|
36
33
|
}): react.JSX.Element;
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* CDP identify Tempo-internal frames by the leading "INTERNAL" marker and
|
|
41
|
-
* leave them alone. Only the runtime title changes: the static
|
|
42
|
-
* `<title>tempo-host</title>` in the harness HTML must stay untouched because
|
|
43
|
-
* tempo-devserver's HTTP host detector matches on that exact body text.
|
|
44
|
-
*/
|
|
45
|
-
declare const CANVAS_HOST_DOCUMENT_TITLE = "INTERNAL tempo-host \u2014 Tempo component host, do not interact";
|
|
35
|
+
declare const CanvasImportBoundary: typeof CanvasImportBoundary$1;
|
|
36
|
+
|
|
46
37
|
type CanvasHostModule = {
|
|
47
38
|
canvasPath: string;
|
|
48
39
|
load: () => Promise<CanvasModule>;
|
|
49
40
|
};
|
|
50
|
-
declare
|
|
51
|
-
name: string;
|
|
52
|
-
}
|
|
53
|
-
declare function CanvasHost({ children, canvasModules, incremental, activeStoryboardIds, isStoryboardActive, }: {
|
|
41
|
+
declare function CanvasHost$1({ children, canvasModules, incremental, activeStoryboardIds, isStoryboardActive, }: {
|
|
54
42
|
children?: ReactNode;
|
|
55
43
|
canvasModules?: readonly CanvasHostModule[];
|
|
56
|
-
/** Generated Vite hosts admit requested canvases without replacing the document. */
|
|
57
44
|
incremental?: boolean;
|
|
58
45
|
activeStoryboardIds?: ReadonlySet<string> | readonly string[];
|
|
59
46
|
isStoryboardActive?: (storyboardId: string) => boolean;
|
|
60
47
|
}): react.JSX.Element;
|
|
61
48
|
|
|
49
|
+
declare class CanvasHostContractError extends Error {
|
|
50
|
+
name: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare const CANVAS_HOST_DOCUMENT_TITLE = "INTERNAL tempo-host \u2014 Tempo component host, do not interact";
|
|
54
|
+
declare const CanvasHost: typeof CanvasHost$1;
|
|
55
|
+
|
|
62
56
|
type CanvasHostCaptureResult = {
|
|
63
57
|
img: {
|
|
64
58
|
src: string;
|
|
@@ -70,9 +64,6 @@ type CanvasHostCaptureResult = {
|
|
|
70
64
|
bottom: number;
|
|
71
65
|
left: number;
|
|
72
66
|
};
|
|
73
|
-
/** The capture is fully transparent — the storyboard rendered nothing
|
|
74
|
-
* visible. Reported by hosts that scan the decoded bitmap; absent means
|
|
75
|
-
* the host did not answer, never that content was found. */
|
|
76
67
|
contentEmpty?: boolean;
|
|
77
68
|
};
|
|
78
69
|
timing?: Record<string, number>;
|
|
@@ -98,8 +89,6 @@ type CanvasHostRuntime = {
|
|
|
98
89
|
forceRefresh?: boolean;
|
|
99
90
|
portalSelectors?: string[];
|
|
100
91
|
}): Promise<CanvasHostCaptureResult | null>;
|
|
101
|
-
/** One canvas's backing store, read where it is: no resize of the host,
|
|
102
|
-
* no compositor frame. Absent in desktop apps older than it. */
|
|
103
92
|
captureCanvas?(selector: string, options?: {
|
|
104
93
|
format?: "jpeg" | "png";
|
|
105
94
|
quality?: number;
|
|
@@ -147,30 +136,24 @@ declare global {
|
|
|
147
136
|
declare function getCanvasHostRuntime(): CanvasHostRuntime;
|
|
148
137
|
declare function getOptionalCanvasHostRuntime(): CanvasHostRuntime | undefined;
|
|
149
138
|
|
|
150
|
-
declare const buildRenderSelector: (renderId: string) => string;
|
|
151
|
-
declare const buildRenderContentSelector: (renderId: string) => string;
|
|
152
|
-
declare const buildRenderContentFiberSelector: (renderId: string) => string;
|
|
153
|
-
declare function stripRenderContentWrapperAttributes<T>(capture: T, renderId: string): T;
|
|
154
|
-
declare function stripRenderContentWrapperFromCombinedCapture<T>(capture: T, renderId: string): T;
|
|
155
|
-
declare function captureStoryboardImage(renderId: string, options?: Parameters<CanvasHostRuntime["captureSelector"]>[1] & {
|
|
156
|
-
/** Capture a single descendant of the storyboard's render root instead of
|
|
157
|
-
* the root — composed as `<renderRoot> <childSelector>`, so it can only
|
|
158
|
-
* ever match inside this storyboard's slot. */
|
|
139
|
+
declare const buildRenderSelector$1: (renderId: string) => string;
|
|
140
|
+
declare const buildRenderContentSelector$1: (renderId: string) => string;
|
|
141
|
+
declare const buildRenderContentFiberSelector$1: (renderId: string) => string;
|
|
142
|
+
declare function stripRenderContentWrapperAttributes$1<T>(capture: T, renderId: string): T;
|
|
143
|
+
declare function stripRenderContentWrapperFromCombinedCapture$1<T>(capture: T, renderId: string): T;
|
|
144
|
+
declare function captureStoryboardImage$1(renderId: string, options?: Parameters<CanvasHostRuntime["captureSelector"]>[1] & {
|
|
159
145
|
childSelector?: string;
|
|
160
|
-
/** Read the storyboard's capture canvas where it is instead of
|
|
161
|
-
* photographing its element: no resize, no compositor frame, and no
|
|
162
|
-
* render lease, so the read never changes what the board renders. */
|
|
163
146
|
fromCanvas?: boolean;
|
|
164
147
|
}): Promise<CanvasHostCaptureResult | null>;
|
|
165
|
-
declare function captureStoryboardHtml(renderId: string, options?: {
|
|
148
|
+
declare function captureStoryboardHtml$1(renderId: string, options?: {
|
|
166
149
|
timeout?: number;
|
|
167
150
|
}): Promise<unknown | null>;
|
|
168
|
-
declare function captureStoryboardCombined(renderId: string, options?: {
|
|
151
|
+
declare function captureStoryboardCombined$1(renderId: string, options?: {
|
|
169
152
|
fiberSelector?: string;
|
|
170
153
|
fiberTags?: unknown[];
|
|
171
154
|
timeout?: number;
|
|
172
155
|
}): Promise<unknown | null>;
|
|
173
|
-
declare function watchStoryboardCombined(renderId: string, options: {
|
|
156
|
+
declare function watchStoryboardCombined$1(renderId: string, options: {
|
|
174
157
|
onUpdate(capture: unknown): void;
|
|
175
158
|
onError?(error: Error): void;
|
|
176
159
|
fiberSelector?: string;
|
|
@@ -181,14 +164,23 @@ declare function watchStoryboardCombined(renderId: string, options: {
|
|
|
181
164
|
knownSourceVersion?: unknown;
|
|
182
165
|
}): Promise<CanvasHostWatch>;
|
|
183
166
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
declare
|
|
167
|
+
declare const buildRenderSelector: typeof buildRenderSelector$1;
|
|
168
|
+
declare const buildRenderContentSelector: typeof buildRenderContentSelector$1;
|
|
169
|
+
declare const buildRenderContentFiberSelector: typeof buildRenderContentFiberSelector$1;
|
|
170
|
+
declare const stripRenderContentWrapperAttributes: typeof stripRenderContentWrapperAttributes$1;
|
|
171
|
+
declare const stripRenderContentWrapperFromCombinedCapture: typeof stripRenderContentWrapperFromCombinedCapture$1;
|
|
172
|
+
declare const captureStoryboardImage: typeof captureStoryboardImage$1;
|
|
173
|
+
declare const captureStoryboardHtml: typeof captureStoryboardHtml$1;
|
|
174
|
+
declare const captureStoryboardCombined: typeof captureStoryboardCombined$1;
|
|
175
|
+
declare const watchStoryboardCombined: typeof watchStoryboardCombined$1;
|
|
176
|
+
|
|
177
|
+
declare const Storyboard: typeof Storyboard$1;
|
|
178
|
+
declare const LegacyStoryboardV1: typeof LegacyStoryboardV1$1;
|
|
179
|
+
declare const RouteStoryboard: typeof RouteStoryboard$1;
|
|
180
|
+
declare const HtmlStoryboard: typeof HtmlStoryboard$1;
|
|
181
|
+
declare const StoryboardSlot: typeof StoryboardSlot$1;
|
|
182
|
+
|
|
183
|
+
declare function FlutterStoryboard$1({ id, name, preview, layout, vrt, [FLUTTER_PREVIEW_KEY_ATTRIBUTE]: previewKey, }: {
|
|
192
184
|
id: string;
|
|
193
185
|
preview: string;
|
|
194
186
|
layout: StoryboardLayout & {
|
|
@@ -196,60 +188,18 @@ declare function FlutterStoryboard({ id, name, preview, layout, vrt, [FLUTTER_PR
|
|
|
196
188
|
height: number;
|
|
197
189
|
};
|
|
198
190
|
name?: string;
|
|
199
|
-
/** Opt this storyboard into visual regression testing (static mark). */
|
|
200
191
|
vrt?: boolean | StoryboardVrtConfig;
|
|
201
192
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
202
193
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
*
|
|
206
|
-
* The authoritative compatibility gate is devserver-side: tempo-devserver
|
|
207
|
-
* resolves the installed tempo-sdk package version BEFORE generating a host
|
|
208
|
-
* document and refuses generation with a typed, actionable error when the
|
|
209
|
-
* installed SDK predates the generated contract. That check cannot be an
|
|
210
|
-
* in-host import assertion, because an SDK old enough to matter does not
|
|
211
|
-
* export this constant — the named import itself would throw before any
|
|
212
|
-
* assertion ran.
|
|
213
|
-
*
|
|
214
|
-
* This constant exists as defense-in-depth for FUTURE protocol bumps, once
|
|
215
|
-
* every supported SDK version is known to export it.
|
|
216
|
-
*/
|
|
194
|
+
declare const FlutterStoryboard: typeof FlutterStoryboard$1;
|
|
195
|
+
|
|
217
196
|
declare const canvasHostCapability: {
|
|
218
197
|
readonly protocolVersion: 1;
|
|
219
198
|
readonly supportsModules: true;
|
|
220
199
|
};
|
|
221
200
|
|
|
222
|
-
/**
|
|
223
|
-
* In-document recovery feed shared between the SDK runtime and the
|
|
224
|
-
* devserver-generated CanvasHost recovery adapter.
|
|
225
|
-
*
|
|
226
|
-
* The generated host document contains two cooperating parties that must not
|
|
227
|
-
* import each other:
|
|
228
|
-
*
|
|
229
|
-
* - the SDK (problem tracking), which observes the product fact "a module
|
|
230
|
-
* evaluation failed in this document"; and
|
|
231
|
-
* - the devserver-generated Vite recovery adapter, which owns
|
|
232
|
-
* `import.meta.hot` and decides when a failed host document may reload.
|
|
233
|
-
*
|
|
234
|
-
* The feed is a tiny window-global event bus with create-if-absent semantics
|
|
235
|
-
* on both sides, so evaluation order between the SDK and the generated
|
|
236
|
-
* adapter never matters. It carries product facts about failed module loads —
|
|
237
|
-
* never Vite contexts, cycle numbers, owner success, or reload commands.
|
|
238
|
-
* Which canvases show which problems is the SDK problem tracker's job; the
|
|
239
|
-
* adapter's repair (a document reload) is document-scoped and needs no owner
|
|
240
|
-
* identity.
|
|
241
|
-
*/
|
|
242
201
|
type CanvasHostRecoveryEvent = {
|
|
243
|
-
/** "module-load-failure": a module load or evaluation failed in a way Vite
|
|
244
|
-
* cannot converge in place (evaluation threw and cleared the Fast Refresh
|
|
245
|
-
* accepts, or a canvas's cold-start import rejected) — the adapter reloads
|
|
246
|
-
* on the first later HMR cycle. "module-update-dropped": Vite dropped a
|
|
247
|
-
* hot update whose module fetch failed — the adapter reloads only if a
|
|
248
|
-
* later cycle does not retry the path (a retry lets Vite own the outcome). */
|
|
249
202
|
type: "module-load-failure" | "module-update-dropped";
|
|
250
|
-
/** Failed module path. Diagnostic for load failures; for dropped updates it
|
|
251
|
-
* must be the exact accepted-module path Vite reported so the adapter can
|
|
252
|
-
* match it against later update payloads. */
|
|
253
203
|
path: string;
|
|
254
204
|
message?: string;
|
|
255
205
|
};
|
|
@@ -257,14 +207,8 @@ type CanvasHostRecoveryFeed = {
|
|
|
257
207
|
publish(event: CanvasHostRecoveryEvent): void;
|
|
258
208
|
subscribe(listener: (event: CanvasHostRecoveryEvent) => void): () => void;
|
|
259
209
|
};
|
|
260
|
-
/**
|
|
261
|
-
* Returns the document's shared recovery feed, creating it when this is the
|
|
262
|
-
* first party to ask. The generated adapter bootstraps an identically-shaped
|
|
263
|
-
* feed, so whichever side evaluates first wins and the other reuses it.
|
|
264
|
-
*/
|
|
265
210
|
declare function getCanvasHostRecoveryFeed(): CanvasHostRecoveryFeed;
|
|
266
211
|
|
|
267
|
-
/** Stable browsing-context marker for Tempo-owned live interact previews. */
|
|
268
212
|
declare const TEMPO_INTERACT_FRAME_NAME = "tempo-interact-preview";
|
|
269
213
|
declare function isTempoInteractFrameName(value: string): boolean;
|
|
270
214
|
declare global {
|
|
@@ -273,4 +217,6 @@ declare global {
|
|
|
273
217
|
}
|
|
274
218
|
}
|
|
275
219
|
|
|
276
|
-
|
|
220
|
+
declare function useActiveState(storyboardId: string): boolean;
|
|
221
|
+
|
|
222
|
+
export { CANVAS_HOST_DOCUMENT_TITLE, Canvas, CanvasContext, CanvasHost, type CanvasHostCaptureResult, CanvasHostContractError, type CanvasHostModule, type CanvasHostRecoveryEvent, type CanvasHostRecoveryFeed, type CanvasHostRuntime, type CanvasHostWatch, CanvasImportBoundary, FlutterStoryboard, HtmlStoryboard, LegacyStoryboardV1, RouteStoryboard, Storyboard, StoryboardLayout, StoryboardSlot, StoryboardVrtConfig, TEMPO_INTERACT_FRAME_NAME, buildRenderContentFiberSelector, buildRenderContentSelector, buildRenderSelector, canvasHostCapability, captureStoryboardCombined, captureStoryboardHtml, captureStoryboardImage, getCanvasHostRecoveryFeed, getCanvasHostRuntime, getCanvasStoryboardRenderId, getOptionalCanvasHostRuntime, getStoryboardKey, isTempoInteractFrameName, stripRenderContentWrapperAttributes, stripRenderContentWrapperFromCombinedCapture, useActiveState, watchStoryboardCombined };
|