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,14 +1,10 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { V as V1LayoutCompat } from './v1-client-compat-
|
|
2
|
+
import { V as V1LayoutCompat } from './v1-client-compat-n0E0XxuX.js';
|
|
3
3
|
|
|
4
4
|
interface TempoCanvasConfig {
|
|
5
5
|
name: string;
|
|
6
|
-
/** Canvas surface background color (any CSS color string, e.g. `#232323`).
|
|
7
|
-
* Optional — unset means the renderer uses its default background. */
|
|
8
6
|
backgroundColor?: string;
|
|
9
7
|
}
|
|
10
|
-
/** @deprecated Renamed to {@link TempoCanvasConfig}. Kept as an alias for
|
|
11
|
-
* backwards compatibility with canvas files authored against older SDKs. */
|
|
12
8
|
type TempoPage = TempoCanvasConfig;
|
|
13
9
|
interface StoryboardLayout extends V1LayoutCompat {
|
|
14
10
|
x: number;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { JSXElement } from 'oxc-parser';
|
|
2
|
+
|
|
3
|
+
type StoryboardUiFramework = "svelte" | "vue" | "astro";
|
|
4
|
+
type StoryboardKind = "component" | "route" | "html";
|
|
5
|
+
type StoryboardSdkComponentSpec = {
|
|
6
|
+
importSource: string;
|
|
7
|
+
kind: StoryboardKind;
|
|
8
|
+
uiFramework?: StoryboardUiFramework;
|
|
9
|
+
requiresComponentProp: boolean;
|
|
10
|
+
allowsVrt: boolean;
|
|
11
|
+
componentFileExtension?: string;
|
|
12
|
+
componentImportQuery?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const STORYBOARD_SDK_COMPONENT_ROWS: {
|
|
15
|
+
Storyboard: {
|
|
16
|
+
importSource: string;
|
|
17
|
+
kind: "component";
|
|
18
|
+
requiresComponentProp: true;
|
|
19
|
+
allowsVrt: true;
|
|
20
|
+
componentFileExtension: string;
|
|
21
|
+
};
|
|
22
|
+
SvelteStoryboard: {
|
|
23
|
+
importSource: string;
|
|
24
|
+
kind: "component";
|
|
25
|
+
uiFramework: "svelte";
|
|
26
|
+
requiresComponentProp: true;
|
|
27
|
+
allowsVrt: true;
|
|
28
|
+
componentFileExtension: string;
|
|
29
|
+
};
|
|
30
|
+
VueStoryboard: {
|
|
31
|
+
importSource: string;
|
|
32
|
+
kind: "component";
|
|
33
|
+
uiFramework: "vue";
|
|
34
|
+
requiresComponentProp: true;
|
|
35
|
+
allowsVrt: true;
|
|
36
|
+
componentFileExtension: string;
|
|
37
|
+
};
|
|
38
|
+
AstroStoryboard: {
|
|
39
|
+
importSource: string;
|
|
40
|
+
kind: "component";
|
|
41
|
+
uiFramework: "astro";
|
|
42
|
+
requiresComponentProp: true;
|
|
43
|
+
allowsVrt: true;
|
|
44
|
+
componentFileExtension: string;
|
|
45
|
+
componentImportQuery: string;
|
|
46
|
+
};
|
|
47
|
+
FlutterStoryboard: {
|
|
48
|
+
importSource: string;
|
|
49
|
+
kind: "component";
|
|
50
|
+
requiresComponentProp: false;
|
|
51
|
+
allowsVrt: true;
|
|
52
|
+
};
|
|
53
|
+
RouteStoryboard: {
|
|
54
|
+
importSource: string;
|
|
55
|
+
kind: "route";
|
|
56
|
+
requiresComponentProp: false;
|
|
57
|
+
allowsVrt: false;
|
|
58
|
+
};
|
|
59
|
+
HtmlStoryboard: {
|
|
60
|
+
importSource: string;
|
|
61
|
+
kind: "html";
|
|
62
|
+
requiresComponentProp: false;
|
|
63
|
+
allowsVrt: true;
|
|
64
|
+
};
|
|
65
|
+
LegacyStoryboardV1: {
|
|
66
|
+
importSource: string;
|
|
67
|
+
kind: "component";
|
|
68
|
+
requiresComponentProp: false;
|
|
69
|
+
allowsVrt: false;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
type StoryboardSdkComponent = keyof typeof STORYBOARD_SDK_COMPONENT_ROWS;
|
|
73
|
+
declare const STORYBOARD_SDK_COMPONENTS: Readonly<Record<StoryboardSdkComponent, Readonly<StoryboardSdkComponentSpec>>>;
|
|
74
|
+
declare function storyboardComponentForFramework(uiFramework: StoryboardUiFramework | "react" | undefined): StoryboardSdkComponent;
|
|
75
|
+
declare function componentFileExtensionForFramework(uiFramework: StoryboardUiFramework | "react" | undefined): string;
|
|
76
|
+
declare function componentImportSpecifier(source: string): string;
|
|
77
|
+
declare function componentImportPath(source: string): string;
|
|
78
|
+
|
|
79
|
+
type CanvasSourceSpan = {
|
|
80
|
+
start: number;
|
|
81
|
+
end: number;
|
|
82
|
+
};
|
|
83
|
+
type CanvasParseError = {
|
|
84
|
+
message: string;
|
|
85
|
+
span?: CanvasSourceSpan;
|
|
86
|
+
kind: "structural" | "degraded";
|
|
87
|
+
newerSdkStoryboard?: {
|
|
88
|
+
component: string;
|
|
89
|
+
storyboardKey?: string;
|
|
90
|
+
vrt: boolean;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
type ParsedCanvasImport = {
|
|
94
|
+
localName: string;
|
|
95
|
+
source: string;
|
|
96
|
+
importedName: string;
|
|
97
|
+
kind: "default" | "named" | "namespace";
|
|
98
|
+
importKind?: "type" | "value";
|
|
99
|
+
span: CanvasSourceSpan;
|
|
100
|
+
declarationSpan: CanvasSourceSpan;
|
|
101
|
+
specifierCount: number;
|
|
102
|
+
namedSpecifierCount: number;
|
|
103
|
+
hasDefaultSpecifier: boolean;
|
|
104
|
+
hasNamespaceSpecifier: boolean;
|
|
105
|
+
};
|
|
106
|
+
type MisimportedSdkCanvasImport = {
|
|
107
|
+
source: string;
|
|
108
|
+
sourceSpan: CanvasSourceSpan;
|
|
109
|
+
importedNames: string[];
|
|
110
|
+
rewritable: boolean;
|
|
111
|
+
};
|
|
112
|
+
type ParsedCanvasLayout = {
|
|
113
|
+
x: number;
|
|
114
|
+
y: number;
|
|
115
|
+
width?: number;
|
|
116
|
+
height?: number;
|
|
117
|
+
zIndex?: number;
|
|
118
|
+
};
|
|
119
|
+
type ParsedCanvasLayoutSpans = {
|
|
120
|
+
x?: CanvasSourceSpan;
|
|
121
|
+
y?: CanvasSourceSpan;
|
|
122
|
+
width?: CanvasSourceSpan;
|
|
123
|
+
height?: CanvasSourceSpan;
|
|
124
|
+
zIndex?: CanvasSourceSpan;
|
|
125
|
+
layoutClose?: number;
|
|
126
|
+
};
|
|
127
|
+
type ParsedCanvasComponentReference = {
|
|
128
|
+
expression: string;
|
|
129
|
+
span: CanvasSourceSpan;
|
|
130
|
+
attributeSpan?: CanvasSourceSpan;
|
|
131
|
+
localName?: string;
|
|
132
|
+
import?: ParsedCanvasImport;
|
|
133
|
+
};
|
|
134
|
+
type ParsedStoryboardVrtIgnoreRegion = {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
w: number;
|
|
138
|
+
h: number;
|
|
139
|
+
};
|
|
140
|
+
type ParsedStoryboardVrt = {
|
|
141
|
+
threshold?: number;
|
|
142
|
+
skip?: boolean;
|
|
143
|
+
ignore?: ParsedStoryboardVrtIgnoreRegion[];
|
|
144
|
+
};
|
|
145
|
+
type ParsedCanvasExpressionReference = {
|
|
146
|
+
expression: string;
|
|
147
|
+
span: CanvasSourceSpan;
|
|
148
|
+
attributeSpan?: CanvasSourceSpan;
|
|
149
|
+
};
|
|
150
|
+
type ParsedCanvasStoryboard = {
|
|
151
|
+
storyboardKey: string;
|
|
152
|
+
displayName?: string;
|
|
153
|
+
kind: StoryboardKind;
|
|
154
|
+
uiFramework?: "svelte";
|
|
155
|
+
runtimeFramework?: "astro";
|
|
156
|
+
componentFramework?: StoryboardUiFramework;
|
|
157
|
+
layout: ParsedCanvasLayout;
|
|
158
|
+
editable: boolean;
|
|
159
|
+
jsxElementSpan: CanvasSourceSpan;
|
|
160
|
+
openingElementSpan?: CanvasSourceSpan;
|
|
161
|
+
idSpan?: CanvasSourceSpan;
|
|
162
|
+
idAttributeSpan?: CanvasSourceSpan;
|
|
163
|
+
nameSpan?: CanvasSourceSpan;
|
|
164
|
+
nameAttributeSpan?: CanvasSourceSpan;
|
|
165
|
+
layoutAttributeSpan?: CanvasSourceSpan;
|
|
166
|
+
layoutSpans?: ParsedCanvasLayoutSpans;
|
|
167
|
+
component?: ParsedCanvasComponentReference;
|
|
168
|
+
props?: ParsedCanvasExpressionReference;
|
|
169
|
+
vrt?: ParsedStoryboardVrt;
|
|
170
|
+
vrtAttributeSpan?: CanvasSourceSpan;
|
|
171
|
+
route?: string;
|
|
172
|
+
routeSpan?: CanvasSourceSpan;
|
|
173
|
+
routeAttributeSpan?: CanvasSourceSpan;
|
|
174
|
+
filepath?: string;
|
|
175
|
+
filepathSpan?: CanvasSourceSpan;
|
|
176
|
+
filepathAttributeSpan?: CanvasSourceSpan;
|
|
177
|
+
src?: string;
|
|
178
|
+
srcSpan?: CanvasSourceSpan;
|
|
179
|
+
srcAttributeSpan?: CanvasSourceSpan;
|
|
180
|
+
preview?: string;
|
|
181
|
+
previewSpan?: CanvasSourceSpan;
|
|
182
|
+
previewAttributeSpan?: CanvasSourceSpan;
|
|
183
|
+
legacyV1?: {
|
|
184
|
+
storyboard: ParsedCanvasExpressionReference;
|
|
185
|
+
objectName?: string;
|
|
186
|
+
objectSpan?: CanvasSourceSpan;
|
|
187
|
+
objectClose?: number;
|
|
188
|
+
namePropertySpan?: CanvasSourceSpan;
|
|
189
|
+
layoutPropertySpan?: CanvasSourceSpan;
|
|
190
|
+
};
|
|
191
|
+
errors: CanvasParseError[];
|
|
192
|
+
};
|
|
193
|
+
declare function componentFrameworkForStoryboard(
|
|
194
|
+
storyboard: Pick<
|
|
195
|
+
ParsedCanvasStoryboard,
|
|
196
|
+
"componentFramework" | "runtimeFramework" | "uiFramework"
|
|
197
|
+
>,
|
|
198
|
+
): StoryboardUiFramework | undefined;
|
|
199
|
+
type ParsedCanvasFile = {
|
|
200
|
+
filePath: string;
|
|
201
|
+
canvasPath?: string;
|
|
202
|
+
pageName: string;
|
|
203
|
+
backgroundColor?: string;
|
|
204
|
+
canvasElementSpan?: CanvasSourceSpan;
|
|
205
|
+
canvasOpeningElementSpan?: CanvasSourceSpan;
|
|
206
|
+
canvasChildrenInsertionOffset?: number;
|
|
207
|
+
nameSpan?: CanvasSourceSpan;
|
|
208
|
+
nameAttributeSpan?: CanvasSourceSpan;
|
|
209
|
+
pathSpan?: CanvasSourceSpan;
|
|
210
|
+
pathAttributeSpan?: CanvasSourceSpan;
|
|
211
|
+
backgroundColorSpan?: CanvasSourceSpan;
|
|
212
|
+
backgroundColorAttributeSpan?: CanvasSourceSpan;
|
|
213
|
+
imports: ParsedCanvasImport[];
|
|
214
|
+
misimportedSdkCanvasImports: MisimportedSdkCanvasImport[];
|
|
215
|
+
storyboards: ParsedCanvasStoryboard[];
|
|
216
|
+
errors: CanvasParseError[];
|
|
217
|
+
};
|
|
218
|
+
declare function parseCanvasFile(
|
|
219
|
+
filePath: string,
|
|
220
|
+
source: string,
|
|
221
|
+
): ParsedCanvasFile;
|
|
222
|
+
declare function misimportedSdkCanvasImportMessage(
|
|
223
|
+
entry: MisimportedSdkCanvasImport,
|
|
224
|
+
): string;
|
|
225
|
+
declare function unwrapTsExpression(node: any): any;
|
|
226
|
+
declare function fallbackPageName(filePath: string): string;
|
|
227
|
+
declare function parseComponentRoot(
|
|
228
|
+
filePath: string,
|
|
229
|
+
source: string,
|
|
230
|
+
exportName: string,
|
|
231
|
+
): {
|
|
232
|
+
name: string;
|
|
233
|
+
root: JSXElement;
|
|
234
|
+
} | null;
|
|
235
|
+
|
|
236
|
+
export { type CanvasSourceSpan as C, type MisimportedSdkCanvasImport as M, type ParsedCanvasFile as P, type StoryboardUiFramework as S, parseComponentRoot as a, type CanvasParseError as b, componentFrameworkForStoryboard as c, type ParsedCanvasComponentReference as d, type ParsedCanvasExpressionReference as e, fallbackPageName as f, type ParsedCanvasImport as g, type ParsedCanvasLayout as h, type ParsedCanvasLayoutSpans as i, type ParsedCanvasStoryboard as j, type ParsedStoryboardVrt as k, type ParsedStoryboardVrtIgnoreRegion as l, misimportedSdkCanvasImportMessage as m, STORYBOARD_SDK_COMPONENTS as n, type StoryboardSdkComponent as o, parseCanvasFile as p, type StoryboardSdkComponentSpec as q, componentFileExtensionForFramework as r, componentImportPath as s, componentImportSpecifier as t, unwrapTsExpression as u, storyboardComponentForFramework as v };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
|
-
import { d as TempoStoryboard } from './page-
|
|
4
|
-
import { V as V1LayoutCompat } from './v1-client-compat-
|
|
3
|
+
import { d as TempoStoryboard } from './page-Bc8PekIX.js';
|
|
4
|
+
import { V as V1LayoutCompat } from './v1-client-compat-n0E0XxuX.js';
|
|
5
5
|
|
|
6
6
|
interface StoryboardLayout extends V1LayoutCompat {
|
|
7
7
|
x: number;
|
|
@@ -16,17 +16,9 @@ interface StoryboardVrtIgnoreRegion {
|
|
|
16
16
|
w: number;
|
|
17
17
|
h: number;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Opt-in visual-regression tracking config (TEM-1775). The `vrt` prop is a
|
|
21
|
-
* static, build-time mark read by AST enumeration (`parseCanvasFile`) — it
|
|
22
|
-
* has no runtime behavior. Values must be literals to be tracked.
|
|
23
|
-
*/
|
|
24
19
|
interface StoryboardVrtConfig {
|
|
25
|
-
/** Per-storyboard pixelmatch threshold override (0..0.5). */
|
|
26
20
|
threshold?: number;
|
|
27
|
-
/** Temporarily untracked without losing config. */
|
|
28
21
|
skip?: boolean;
|
|
29
|
-
/** Regions (storyboard-local px) excluded from comparison. */
|
|
30
22
|
ignore?: StoryboardVrtIgnoreRegion[];
|
|
31
23
|
}
|
|
32
24
|
declare function Storyboard<Props extends object = object>({ id, name, component, layout, props, vrt, ...annotations }: {
|
|
@@ -36,7 +28,6 @@ declare function Storyboard<Props extends object = object>({ id, name, component
|
|
|
36
28
|
name?: string;
|
|
37
29
|
props?: Props;
|
|
38
30
|
[annotation: `data-tempo-${string}`]: unknown;
|
|
39
|
-
/** Opt this storyboard into visual regression testing (static mark). */
|
|
40
31
|
vrt?: boolean | StoryboardVrtConfig;
|
|
41
32
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
42
33
|
declare function LegacyStoryboardV1({ id, storyboard, }: {
|
|
@@ -59,28 +50,16 @@ declare function HtmlStoryboard({ id, name, filepath, src, layout, vrt, ...annot
|
|
|
59
50
|
height: number;
|
|
60
51
|
};
|
|
61
52
|
filepath?: string;
|
|
62
|
-
/** @deprecated Retained for v2 clients; prefer filepath for local HTML. */
|
|
63
53
|
src?: string;
|
|
64
54
|
name?: string;
|
|
65
|
-
/** Opt this local HTML storyboard into visual regression testing. */
|
|
66
55
|
vrt?: boolean | StoryboardVrtConfig;
|
|
67
56
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
68
|
-
/**
|
|
69
|
-
* The shell every storyboard kind renders. It is SDK plumbing between the
|
|
70
|
-
* public component (the callsite the compiler annotates) and the shell
|
|
71
|
-
* element, so every caller hides its fiber: the projection then sees the
|
|
72
|
-
* public component as the shell's parent, which the canvas reads as the
|
|
73
|
-
* storyboard's root layer.
|
|
74
|
-
*/
|
|
75
57
|
declare function StoryboardSlot({ children, id, kind, layout, name, route, filepath, src, vrt, uiFramework, preview, previewKey, keepLayoutWhenParked, }: {
|
|
76
58
|
"data-tempo-hide-fiber": "true";
|
|
77
59
|
vrt?: boolean;
|
|
78
60
|
uiFramework?: "svelte" | "vue" | "astro";
|
|
79
61
|
preview?: string;
|
|
80
62
|
previewKey?: string;
|
|
81
|
-
/** A parked (cached) board stays hidden but keeps its layout box instead of
|
|
82
|
-
* leaving layout. For content an engine renders from that box; see where
|
|
83
|
-
* the shell's `display` is chosen. */
|
|
84
63
|
keepLayoutWhenParked?: boolean;
|
|
85
64
|
children?: ReactNode;
|
|
86
65
|
id: string;
|
|
@@ -89,8 +68,7 @@ declare function StoryboardSlot({ children, id, kind, layout, name, route, filep
|
|
|
89
68
|
name?: string;
|
|
90
69
|
route?: string;
|
|
91
70
|
filepath?: string;
|
|
92
|
-
/** @deprecated Retained for v2 clients; prefer filepath for local HTML. */
|
|
93
71
|
src?: string;
|
|
94
72
|
}): react.JSX.Element;
|
|
95
73
|
|
|
96
|
-
export { HtmlStoryboard as H, LegacyStoryboardV1 as L, RouteStoryboard as R,
|
|
74
|
+
export { HtmlStoryboard as H, LegacyStoryboardV1 as L, RouteStoryboard as R, Storyboard as S, StoryboardSlot as a, type StoryboardLayout as b, type StoryboardVrtConfig as c, type StoryboardVrtIgnoreRegion as d };
|
package/dist/svelte.d.ts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import { PreprocessorGroup } from 'svelte/compiler';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Svelte-specific Tempo source annotation.
|
|
5
|
-
*
|
|
6
|
-
* Keep this adapter first in `svelte({ preprocess: [...] })`. It only supplies
|
|
7
|
-
* filesystem/project identity; parsing and annotation remain isolated in the
|
|
8
|
-
* framework-focused @modules/svelte-editor package.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
3
|
interface TempoSveltePreprocessOptions {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* around `root`, else `root` (see defaultSourceRoot); host sidecars set
|
|
16
|
-
* this to the project root while annotations remain relative to the host
|
|
17
|
-
* root. */
|
|
18
|
-
sourceRoot?: string;
|
|
19
|
-
/** Override the normal TEMPO environment gate, primarily for tests. */
|
|
20
|
-
enabled?: boolean;
|
|
4
|
+
root?: string;
|
|
5
|
+
sourceRoot?: string;
|
|
6
|
+
enabled?: boolean;
|
|
21
7
|
}
|
|
22
|
-
declare function tempoSveltePreprocess(
|
|
8
|
+
declare function tempoSveltePreprocess$1(
|
|
9
|
+
options?: TempoSveltePreprocessOptions,
|
|
10
|
+
): PreprocessorGroup;
|
|
11
|
+
|
|
12
|
+
declare const tempoSveltePreprocess: typeof tempoSveltePreprocess$1;
|
|
23
13
|
|
|
24
14
|
export { type TempoSveltePreprocessOptions, tempoSveltePreprocess };
|