tempo-sdk 0.0.16 → 0.0.19

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.
Files changed (71) hide show
  1. package/dist/assets/editor.d.ts +79 -0
  2. package/dist/assets/editor.js +571 -0
  3. package/dist/assets/editor.js.map +1 -0
  4. package/dist/assets/index.d.ts +83 -0
  5. package/dist/assets/index.js +26 -0
  6. package/dist/assets/index.js.map +1 -0
  7. package/dist/assets/parser.d.ts +78 -0
  8. package/dist/assets/parser.js +29 -0
  9. package/dist/assets/parser.js.map +1 -0
  10. package/dist/canvas/editor.d.ts +44 -9
  11. package/dist/canvas/editor.js +116 -416
  12. package/dist/canvas/editor.js.map +1 -1
  13. package/dist/canvas/index.d.ts +1 -0
  14. package/dist/canvas/index.js +237 -56
  15. package/dist/canvas/index.js.map +1 -1
  16. package/dist/canvas/parser.d.ts +25 -2
  17. package/dist/canvas/parser.js +3 -3
  18. package/dist/{chunk-77BNMPBS.js → chunk-CB5NJJJT.js} +31 -5
  19. package/dist/chunk-CB5NJJJT.js.map +1 -0
  20. package/dist/chunk-IWULHYPW.js +650 -0
  21. package/dist/chunk-IWULHYPW.js.map +1 -0
  22. package/dist/{chunk-ICP7LCPJ.js → chunk-P277UVZE.js} +279 -40
  23. package/dist/chunk-P277UVZE.js.map +1 -0
  24. package/dist/expo/plugin.cjs +30 -4
  25. package/dist/expo/plugin.cjs.map +1 -1
  26. package/dist/expo/plugin.js +1 -1
  27. package/dist/expo-babel-plugin.cjs +30 -4
  28. package/dist/expo-babel-plugin.cjs.map +1 -1
  29. package/dist/expo-babel-plugin.d.cts +1 -1
  30. package/dist/expo-babel-plugin.d.ts +1 -1
  31. package/dist/expo-babel-plugin.js +1 -1
  32. package/dist/index.js +26 -6
  33. package/dist/index.js.map +1 -1
  34. package/dist/nextjs-loader.cjs +29 -4
  35. package/dist/nextjs-loader.cjs.map +1 -1
  36. package/dist/types-B-dRoF2T.d.ts +102 -0
  37. package/package.json +16 -3
  38. package/dist/annotation-strategy-DCJHc--2.d.cts +0 -13
  39. package/dist/annotation-strategy-DCJHc--2.d.ts +0 -13
  40. package/dist/chunk-2LP5G6CD.js +0 -748
  41. package/dist/chunk-2LP5G6CD.js.map +0 -1
  42. package/dist/chunk-77BNMPBS.js.map +0 -1
  43. package/dist/chunk-B3PHU7XX.js +0 -571
  44. package/dist/chunk-B3PHU7XX.js.map +0 -1
  45. package/dist/chunk-EJBWZCEE.js +0 -434
  46. package/dist/chunk-EJBWZCEE.js.map +0 -1
  47. package/dist/chunk-F64WRL4H.js +0 -884
  48. package/dist/chunk-F64WRL4H.js.map +0 -1
  49. package/dist/chunk-G7M57ARC.js +0 -902
  50. package/dist/chunk-G7M57ARC.js.map +0 -1
  51. package/dist/chunk-GHPL4LGE.js +0 -205
  52. package/dist/chunk-GHPL4LGE.js.map +0 -1
  53. package/dist/chunk-ICP7LCPJ.js.map +0 -1
  54. package/dist/chunk-IG3JZVZI.js +0 -846
  55. package/dist/chunk-IG3JZVZI.js.map +0 -1
  56. package/dist/chunk-MBTLXFNP.js +0 -605
  57. package/dist/chunk-MBTLXFNP.js.map +0 -1
  58. package/dist/chunk-MD3HJ7L3.js +0 -457
  59. package/dist/chunk-MD3HJ7L3.js.map +0 -1
  60. package/dist/chunk-O3HYJ6BU.js +0 -433
  61. package/dist/chunk-O3HYJ6BU.js.map +0 -1
  62. package/dist/chunk-WGGLHHC5.js +0 -337
  63. package/dist/chunk-WGGLHHC5.js.map +0 -1
  64. package/dist/chunk-X3K7Z2BH.js +0 -900
  65. package/dist/chunk-X3K7Z2BH.js.map +0 -1
  66. package/dist/chunk-ZHORRCQG.js +0 -756
  67. package/dist/chunk-ZHORRCQG.js.map +0 -1
  68. package/dist/index.cjs +0 -1170
  69. package/dist/index.cjs.map +0 -1
  70. package/dist/index.d.cts +0 -99
  71. package/dist/page-BokkL6FZ.d.ts +0 -35
@@ -1,337 +0,0 @@
1
- // expo-babel-plugin.ts
2
- import { existsSync } from "fs";
3
- import { dirname, resolve } from "path";
4
- import { createFilter } from "@rollup/pluginutils";
5
-
6
- // annotation-strategy.ts
7
- import { realpathSync, statSync } from "fs";
8
- import { relative } from "path";
9
- var DEFAULT_EXCLUDE = ["**/node_modules/**"];
10
- var HTML_VOID_ELEMENTS = /* @__PURE__ */ new Set([
11
- "area",
12
- "base",
13
- "br",
14
- "col",
15
- "embed",
16
- "hr",
17
- "img",
18
- "input",
19
- "link",
20
- "meta",
21
- "param",
22
- "source",
23
- "track",
24
- "wbr"
25
- ]);
26
- function cleanModuleId(id) {
27
- return id.replace(/[?#].*$/, "");
28
- }
29
- function resolveCanonicalRoot(root) {
30
- try {
31
- return realpathSync.native(root);
32
- } catch {
33
- return root;
34
- }
35
- }
36
- function isIntrinsicElement(tagName) {
37
- return tagName.length > 0 && tagName[0] === tagName[0].toLowerCase();
38
- }
39
- function hasJsxAttribute(info, attrName) {
40
- for (const attr of info.element.openingElement.attributes) {
41
- const name = attr.name;
42
- if (name?.name === attrName) return true;
43
- }
44
- return false;
45
- }
46
- function defaultComputeAnnotatedProps(info, filepath, modifiedtsMs) {
47
- return {
48
- "data-tempo-filepath": filepath,
49
- "data-tempo-position": info.element.openingElement.start,
50
- "data-tempo-modifiedts": modifiedtsMs
51
- };
52
- }
53
- function computeTempoAnnotatedProps(params) {
54
- const {
55
- info,
56
- filepath,
57
- modifiedtsMs,
58
- computeAnnotatedProps,
59
- elementSupportOverrides
60
- } = params;
61
- const userProps = computeAnnotatedProps ? computeAnnotatedProps(info, filepath, modifiedtsMs) : defaultComputeAnnotatedProps(info, filepath, modifiedtsMs);
62
- if (isIntrinsicElement(info.tagName)) {
63
- return {
64
- ...userProps,
65
- "data-tempo-supports-children": hasJsxAttribute(
66
- info,
67
- "data-tempo-supports-children"
68
- ) ? void 0 : !HTML_VOID_ELEMENTS.has(info.tagName)
69
- };
70
- }
71
- const override = elementSupportOverrides?.get(info.tagName);
72
- if (override) {
73
- return {
74
- ...userProps,
75
- "data-tempo-supports-style": override.supportsStyle,
76
- "data-tempo-supports-classname": override.supportsClassName,
77
- "data-tempo-supports-children": hasJsxAttribute(
78
- info,
79
- "data-tempo-supports-children"
80
- ) ? void 0 : override.supportsChildren
81
- };
82
- }
83
- return userProps;
84
- }
85
- function getFileAnnotationContext(params) {
86
- const rawCleanFilename = cleanModuleId(params.filename);
87
- let cleanFilename = rawCleanFilename;
88
- if (params.canonicalizeFilename) {
89
- try {
90
- cleanFilename = realpathSync.native(rawCleanFilename);
91
- } catch {
92
- cleanFilename = rawCleanFilename;
93
- }
94
- }
95
- return {
96
- cleanFilename,
97
- filepath: relative(params.root, cleanFilename),
98
- modifiedtsMs: Math.trunc(statSync(cleanFilename).mtimeMs)
99
- };
100
- }
101
-
102
- // expo-babel-plugin.ts
103
- var EXPO_DEFAULT_INCLUDE = ["**/*.tsx", "**/*.jsx", "**/*.js"];
104
- var FRAGMENT_TAG_NAMES = /* @__PURE__ */ new Set(["Fragment", "React.Fragment"]);
105
- var REACT_NATIVE_STYLE_COMPONENTS = /* @__PURE__ */ new Set([
106
- "ActivityIndicator",
107
- "Button",
108
- "FlatList",
109
- "Image",
110
- "ImageBackground",
111
- "KeyboardAvoidingView",
112
- "Modal",
113
- "Pressable",
114
- "RefreshControl",
115
- "SafeAreaView",
116
- "ScrollView",
117
- "SectionList",
118
- "Switch",
119
- "Text",
120
- "TextInput",
121
- "TouchableHighlight",
122
- "TouchableNativeFeedback",
123
- "TouchableOpacity",
124
- "TouchableWithoutFeedback",
125
- "View",
126
- "VirtualizedList"
127
- ]);
128
- var REACT_NATIVE_NO_CHILDREN_COMPONENTS = /* @__PURE__ */ new Set([
129
- "ActivityIndicator",
130
- "Image",
131
- "RefreshControl",
132
- "Switch"
133
- ]);
134
- var REACT_NATIVE_SUPPORT_OVERRIDES = new Map(
135
- [...REACT_NATIVE_STYLE_COMPONENTS].map((tagName) => [
136
- tagName,
137
- {
138
- supportsStyle: true,
139
- supportsClassName: false,
140
- supportsChildren: !REACT_NATIVE_NO_CHILDREN_COMPONENTS.has(tagName)
141
- }
142
- ])
143
- );
144
- function hasParserPlugin(plugins, name) {
145
- return plugins.some(
146
- (plugin) => Array.isArray(plugin) ? plugin[0] === name : plugin === name
147
- );
148
- }
149
- function getBabelTagName(name) {
150
- switch (name.type) {
151
- case "JSXIdentifier":
152
- return name.name;
153
- case "JSXNamespacedName":
154
- return `${name.namespace.name}:${name.name.name}`;
155
- case "JSXMemberExpression":
156
- return `${getBabelTagName(name.object)}.${name.property.name}`;
157
- }
158
- }
159
- function hasAttribute(node, attrName) {
160
- return node.attributes.some(
161
- (attr) => attr.type === "JSXAttribute" && attr.name.name === attrName
162
- );
163
- }
164
- function propValueToExpression(api, value) {
165
- if (typeof value === "function") {
166
- return api.template.expression(value.toString())();
167
- }
168
- return api.types.valueToNode(value);
169
- }
170
- function getSupportOverrides(options) {
171
- if (!options.reactNativeClassName) {
172
- return REACT_NATIVE_SUPPORT_OVERRIDES;
173
- }
174
- return new Map(
175
- [...REACT_NATIVE_SUPPORT_OVERRIDES].map(([tagName, support]) => [
176
- tagName,
177
- { ...support, supportsClassName: true }
178
- ])
179
- );
180
- }
181
- function dataAttrToDataSetKey(attrName) {
182
- return attrName.replace(/^data-/, "").replace(/-([a-z])/g, (_, char) => char.toUpperCase());
183
- }
184
- function findDataSetAttribute(openingElement) {
185
- return openingElement.attributes.find(
186
- (attr) => attr.type === "JSXAttribute" && attr.name.name === "dataSet"
187
- );
188
- }
189
- function addAnnotations(api, tagName, openingElement, props) {
190
- const t = api.types;
191
- if (isIntrinsicElement(tagName)) {
192
- for (const [key, value] of Object.entries(props)) {
193
- if (value === void 0 || hasAttribute(openingElement, key)) continue;
194
- openingElement.attributes.push(
195
- t.jsxAttribute(
196
- t.jsxIdentifier(key),
197
- t.jsxExpressionContainer(propValueToExpression(api, value))
198
- )
199
- );
200
- }
201
- return;
202
- }
203
- const dataSetProps = [];
204
- for (const [key, value] of Object.entries(props)) {
205
- if (value === void 0) continue;
206
- dataSetProps.push(
207
- t.objectProperty(
208
- t.identifier(dataAttrToDataSetKey(key)),
209
- propValueToExpression(api, value)
210
- )
211
- );
212
- }
213
- if (dataSetProps.length === 0) return;
214
- const existing = findDataSetAttribute(openingElement);
215
- if (!existing) {
216
- openingElement.attributes.push(
217
- t.jsxAttribute(
218
- t.jsxIdentifier("dataSet"),
219
- t.jsxExpressionContainer(t.objectExpression(dataSetProps))
220
- )
221
- );
222
- return;
223
- }
224
- if (existing.value?.type === "JSXExpressionContainer" && existing.value.expression.type !== "JSXEmptyExpression") {
225
- existing.value.expression = t.objectExpression([
226
- t.spreadElement(existing.value.expression),
227
- ...dataSetProps
228
- ]);
229
- }
230
- }
231
- var ROOT_META_NAME = "tempo-project-root";
232
- function injectProjectRootMeta(api, programPath, root) {
233
- const setter = api.template.statement(`
234
- if (typeof document !== "undefined") {
235
- var __tempoRootMeta = document.querySelector('meta[name="${ROOT_META_NAME}"]');
236
- if (!__tempoRootMeta) {
237
- __tempoRootMeta = document.createElement("meta");
238
- __tempoRootMeta.setAttribute("name", "${ROOT_META_NAME}");
239
- document.head.appendChild(__tempoRootMeta);
240
- }
241
- __tempoRootMeta.setAttribute("content", ${JSON.stringify(root)});
242
- }
243
- `)();
244
- programPath.pushContainer("body", setter);
245
- }
246
- function resolveBabelRoot(state, options, filename) {
247
- return resolveCanonicalRoot(
248
- resolve(
249
- options.root ?? findNearestPackageRoot(filename) ?? state.cwd ?? state.file.opts.cwd ?? state.file.opts.root ?? process.cwd()
250
- )
251
- );
252
- }
253
- function findNearestPackageRoot(filename) {
254
- let current = dirname(filename);
255
- while (true) {
256
- if (existsSync(resolve(current, "package.json"))) return current;
257
- const parent = dirname(current);
258
- if (parent === current) return null;
259
- current = parent;
260
- }
261
- }
262
- function resolveFilename(state) {
263
- const filename = state.filename ?? state.file.opts.filename;
264
- if (!filename) return null;
265
- return resolve(cleanModuleId(filename));
266
- }
267
- function tempoExpoBabelPlugin(api, rawOptions = {}) {
268
- api.assertVersion(7);
269
- const enabled = rawOptions.enabled ?? !!process.env.TEMPO;
270
- const include = rawOptions.include === void 0 ? EXPO_DEFAULT_INCLUDE : rawOptions.include;
271
- const exclude = rawOptions.exclude === void 0 ? DEFAULT_EXCLUDE : rawOptions.exclude;
272
- const filter = createFilter(include, exclude);
273
- return {
274
- name: "tempo-expo-annotate",
275
- manipulateOptions(opts, parserOpts) {
276
- parserOpts.plugins ?? (parserOpts.plugins = []);
277
- if (!hasParserPlugin(parserOpts.plugins, "jsx")) {
278
- parserOpts.plugins.push("jsx");
279
- }
280
- const filename = opts.filename ?? "";
281
- if (/\.(ts|tsx)$/.test(filename) && !hasParserPlugin(parserOpts.plugins, "typescript")) {
282
- parserOpts.plugins.push("typescript");
283
- }
284
- },
285
- visitor: {
286
- Program: {
287
- enter(path, state) {
288
- if (!enabled) return;
289
- const options = { ...rawOptions, ...state.opts };
290
- const filename = resolveFilename(state);
291
- if (!filename || !filter(filename)) return;
292
- const source = state.file.code;
293
- const root = resolveBabelRoot(state, options, filename);
294
- let context;
295
- try {
296
- context = getFileAnnotationContext({
297
- source,
298
- filename,
299
- root,
300
- canonicalizeFilename: true
301
- });
302
- } catch {
303
- return;
304
- }
305
- if (context.filepath === "index.js") {
306
- injectProjectRootMeta(api, path, root);
307
- }
308
- const supportOverrides = getSupportOverrides(options);
309
- path.traverse({
310
- JSXElement(elementPath) {
311
- const element = elementPath.node;
312
- const tagName = getBabelTagName(element.openingElement.name);
313
- if (FRAGMENT_TAG_NAMES.has(tagName)) return;
314
- const info = {
315
- element,
316
- tagName
317
- };
318
- const props = computeTempoAnnotatedProps({
319
- info,
320
- filepath: context.filepath,
321
- modifiedtsMs: context.modifiedtsMs,
322
- computeAnnotatedProps: options.computeAnnotatedProps,
323
- elementSupportOverrides: supportOverrides
324
- });
325
- addAnnotations(api, tagName, element.openingElement, props);
326
- }
327
- });
328
- }
329
- }
330
- }
331
- };
332
- }
333
-
334
- export {
335
- tempoExpoBabelPlugin
336
- };
337
- //# sourceMappingURL=chunk-WGGLHHC5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../expo-babel-plugin.ts","../annotation-strategy.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\n\nimport { createFilter, type FilterPattern } from \"@rollup/pluginutils\";\n\nimport type {\n ElementInfo,\n PropValue,\n} from \"../../modules/annotation/annotate-file.ts\";\nimport {\n cleanModuleId,\n computeTempoAnnotatedProps,\n DEFAULT_EXCLUDE,\n getFileAnnotationContext,\n isIntrinsicElement,\n resolveCanonicalRoot,\n type ComputeAnnotatedProps,\n} from \"./annotation-strategy.ts\";\n\nconst EXPO_DEFAULT_INCLUDE: FilterPattern = [\"**/*.tsx\", \"**/*.jsx\", \"**/*.js\"];\n\nconst FRAGMENT_TAG_NAMES = new Set([\"Fragment\", \"React.Fragment\"]);\n\nconst REACT_NATIVE_STYLE_COMPONENTS = new Set([\n \"ActivityIndicator\",\n \"Button\",\n \"FlatList\",\n \"Image\",\n \"ImageBackground\",\n \"KeyboardAvoidingView\",\n \"Modal\",\n \"Pressable\",\n \"RefreshControl\",\n \"SafeAreaView\",\n \"ScrollView\",\n \"SectionList\",\n \"Switch\",\n \"Text\",\n \"TextInput\",\n \"TouchableHighlight\",\n \"TouchableNativeFeedback\",\n \"TouchableOpacity\",\n \"TouchableWithoutFeedback\",\n \"View\",\n \"VirtualizedList\",\n]);\n\nconst REACT_NATIVE_NO_CHILDREN_COMPONENTS = new Set([\n \"ActivityIndicator\",\n \"Image\",\n \"RefreshControl\",\n \"Switch\",\n]);\n\nconst REACT_NATIVE_SUPPORT_OVERRIDES = new Map(\n [...REACT_NATIVE_STYLE_COMPONENTS].map((tagName) => [\n tagName,\n {\n supportsStyle: true,\n supportsClassName: false,\n supportsChildren: !REACT_NATIVE_NO_CHILDREN_COMPONENTS.has(tagName),\n },\n ]),\n);\n\nexport interface TempoExpoBabelPluginOptions {\n /**\n * Defaults to `!!process.env.TEMPO`, matching `tempoVitePlugin`.\n * Expo users can pass `{ enabled: true }` in babel.config.js for direct tests.\n */\n enabled?: boolean;\n root?: string;\n include?: FilterPattern;\n exclude?: FilterPattern;\n computeAnnotatedProps?: ComputeAnnotatedProps;\n /**\n * NativeWind-style className support is project-level behavior, not a React\n * Native default. Set this when the Expo app intentionally supports className\n * on React Native host components.\n */\n reactNativeClassName?: boolean;\n}\n\ntype BabelApi = {\n assertVersion(version: number): void;\n types: typeof import(\"@babel/types\");\n template: {\n expression(source: string): () => import(\"@babel/types\").Expression;\n statement(source: string): () => import(\"@babel/types\").Statement;\n };\n};\n\ntype BabelPluginState = {\n cwd?: string;\n filename?: string;\n file: {\n code: string;\n opts: {\n cwd?: string;\n filename?: string;\n root?: string;\n };\n };\n opts: TempoExpoBabelPluginOptions;\n};\n\nfunction hasParserPlugin(\n plugins: NonNullable<import(\"@babel/core\").ParserOptions[\"plugins\"]>,\n name: string,\n): boolean {\n return plugins.some((plugin) =>\n Array.isArray(plugin) ? plugin[0] === name : plugin === name,\n );\n}\n\nfunction getBabelTagName(\n name: import(\"@babel/types\").JSXElement[\"openingElement\"][\"name\"],\n): string {\n switch (name.type) {\n case \"JSXIdentifier\":\n return name.name;\n case \"JSXNamespacedName\":\n return `${name.namespace.name}:${name.name.name}`;\n case \"JSXMemberExpression\":\n return `${getBabelTagName(name.object)}.${name.property.name}`;\n }\n}\n\nfunction hasAttribute(\n node: import(\"@babel/types\").JSXOpeningElement,\n attrName: string,\n): boolean {\n return node.attributes.some(\n (attr) => attr.type === \"JSXAttribute\" && attr.name.name === attrName,\n );\n}\n\nfunction propValueToExpression(\n api: BabelApi,\n value: Exclude<PropValue, undefined>,\n): import(\"@babel/types\").Expression {\n if (typeof value === \"function\") {\n return api.template.expression(value.toString())();\n }\n return api.types.valueToNode(value) as import(\"@babel/types\").Expression;\n}\n\nfunction getSupportOverrides(options: TempoExpoBabelPluginOptions) {\n if (!options.reactNativeClassName) {\n return REACT_NATIVE_SUPPORT_OVERRIDES;\n }\n\n return new Map(\n [...REACT_NATIVE_SUPPORT_OVERRIDES].map(([tagName, support]) => [\n tagName,\n { ...support, supportsClassName: true },\n ]),\n );\n}\n\n// \"data-tempo-filepath\" -> \"tempoFilepath\". react-native-web hyphenates dataSet\n// keys back to \"data-tempo-filepath\" on the rendered DOM node, so this round-trips.\nfunction dataAttrToDataSetKey(attrName: string): string {\n return attrName\n .replace(/^data-/, \"\")\n .replace(/-([a-z])/g, (_, char: string) => char.toUpperCase());\n}\n\nfunction findDataSetAttribute(\n openingElement: import(\"@babel/types\").JSXOpeningElement,\n): import(\"@babel/types\").JSXAttribute | undefined {\n return openingElement.attributes.find(\n (attr): attr is import(\"@babel/types\").JSXAttribute =>\n attr.type === \"JSXAttribute\" && attr.name.name === \"dataSet\",\n );\n}\n\nfunction addAnnotations(\n api: BabelApi,\n tagName: string,\n openingElement: import(\"@babel/types\").JSXOpeningElement,\n props: Record<string, PropValue>,\n) {\n const t = api.types;\n\n // Intrinsic web elements (lowercase: div/span/...) are real DOM nodes that\n // forward arbitrary `data-*` attributes, so annotate them directly. React\n // Native host components (View, Text, ...) and any other component are NOT\n // DOM nodes: react-native-web only forwards an allow-list of props plus\n // `dataSet` to the rendered element and drops raw `data-*`. For those we emit\n // the annotations through `dataSet` (camelCase keys), which RNW maps back to\n // `data-*` on the host element.\n if (isIntrinsicElement(tagName)) {\n for (const [key, value] of Object.entries(props)) {\n if (value === undefined || hasAttribute(openingElement, key)) continue;\n openingElement.attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(key),\n t.jsxExpressionContainer(propValueToExpression(api, value)),\n ),\n );\n }\n return;\n }\n\n const dataSetProps: import(\"@babel/types\").ObjectProperty[] = [];\n for (const [key, value] of Object.entries(props)) {\n if (value === undefined) continue;\n dataSetProps.push(\n t.objectProperty(\n t.identifier(dataAttrToDataSetKey(key)),\n propValueToExpression(api, value),\n ),\n );\n }\n if (dataSetProps.length === 0) return;\n\n const existing = findDataSetAttribute(openingElement);\n if (!existing) {\n openingElement.attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"dataSet\"),\n t.jsxExpressionContainer(t.objectExpression(dataSetProps)),\n ),\n );\n return;\n }\n\n // Merge into a user-provided `dataSet={...}` without clobbering their keys:\n // { ...existingDataSet, ...tempoKeys }.\n if (\n existing.value?.type === \"JSXExpressionContainer\" &&\n existing.value.expression.type !== \"JSXEmptyExpression\"\n ) {\n existing.value.expression = t.objectExpression([\n t.spreadElement(existing.value.expression),\n ...dataSetProps,\n ]);\n }\n}\n\nconst ROOT_META_NAME = \"tempo-project-root\";\n\n// Rewrite the sidecar entry to stamp the absolute sidecar root into a\n// `<meta name=\"tempo-project-root\">` at runtime. The canvas reads this meta off\n// the live DOM (`read-source.ts`) to resolve `data-tempo-filepath` annotations —\n// which are relative to this root — back to absolute on-disk paths.\n//\n// Why stamp at runtime instead of writing the path into the committed\n// `public/index.html`: that file is committed to the user's repo, so it must not\n// hold a machine-specific absolute path. `root` here is resolved from the\n// sidecar's `__dirname` when Metro bundles, so it lives only in the built bundle\n// — never in committed source — yet still points at wherever the sidecar lives on\n// the machine running the dev server.\n//\n// Guarded on `typeof document` so it's inert under native/SSR bundles, and\n// idempotent (reuses an existing meta) so the static `public/index.html` marker —\n// kept present-but-empty for dev-server readiness detection — is upgraded in\n// place rather than duplicated.\nfunction injectProjectRootMeta(\n api: BabelApi,\n programPath: import(\"@babel/core\").NodePath<import(\"@babel/types\").Program>,\n root: string,\n) {\n const setter = api.template.statement(`\n if (typeof document !== \"undefined\") {\n var __tempoRootMeta = document.querySelector('meta[name=\"${ROOT_META_NAME}\"]');\n if (!__tempoRootMeta) {\n __tempoRootMeta = document.createElement(\"meta\");\n __tempoRootMeta.setAttribute(\"name\", \"${ROOT_META_NAME}\");\n document.head.appendChild(__tempoRootMeta);\n }\n __tempoRootMeta.setAttribute(\"content\", ${JSON.stringify(root)});\n }\n `)();\n programPath.pushContainer(\"body\", setter);\n}\n\nfunction resolveBabelRoot(\n state: BabelPluginState,\n options: TempoExpoBabelPluginOptions,\n filename: string,\n): string {\n return resolveCanonicalRoot(\n resolve(\n options.root ??\n findNearestPackageRoot(filename) ??\n state.cwd ??\n state.file.opts.cwd ??\n state.file.opts.root ??\n process.cwd(),\n ),\n );\n}\n\nfunction findNearestPackageRoot(filename: string): string | null {\n let current = dirname(filename);\n while (true) {\n if (existsSync(resolve(current, \"package.json\"))) return current;\n const parent = dirname(current);\n if (parent === current) return null;\n current = parent;\n }\n}\n\nfunction resolveFilename(state: BabelPluginState): string | null {\n const filename = state.filename ?? state.file.opts.filename;\n if (!filename) return null;\n return resolve(cleanModuleId(filename));\n}\n\nexport default function tempoExpoBabelPlugin(\n api: BabelApi,\n rawOptions: TempoExpoBabelPluginOptions = {},\n) {\n api.assertVersion(7);\n\n const enabled = rawOptions.enabled ?? !!process.env.TEMPO;\n const include =\n rawOptions.include === undefined\n ? EXPO_DEFAULT_INCLUDE\n : rawOptions.include;\n const exclude =\n rawOptions.exclude === undefined ? DEFAULT_EXCLUDE : rawOptions.exclude;\n const filter = createFilter(include, exclude);\n\n return {\n name: \"tempo-expo-annotate\",\n\n manipulateOptions(\n opts: { filename?: string },\n parserOpts: NonNullable<\n import(\"@babel/core\").TransformOptions[\"parserOpts\"]\n >,\n ) {\n parserOpts.plugins ??= [];\n if (!hasParserPlugin(parserOpts.plugins, \"jsx\")) {\n parserOpts.plugins.push(\"jsx\");\n }\n const filename = opts.filename ?? \"\";\n if (\n /\\.(ts|tsx)$/.test(filename) &&\n !hasParserPlugin(parserOpts.plugins, \"typescript\")\n ) {\n parserOpts.plugins.push(\"typescript\");\n }\n },\n\n visitor: {\n Program: {\n enter(\n path: import(\"@babel/core\").NodePath<import(\"@babel/types\").Program>,\n state: BabelPluginState,\n ) {\n if (!enabled) return;\n const options = { ...rawOptions, ...state.opts };\n const filename = resolveFilename(state);\n if (!filename || !filter(filename)) return;\n\n const source = state.file.code;\n const root = resolveBabelRoot(state, options, filename);\n let context: ReturnType<typeof getFileAnnotationContext>;\n try {\n context = getFileAnnotationContext({\n source,\n filename,\n root,\n canonicalizeFilename: true,\n });\n } catch {\n return;\n }\n\n // The sidecar entry runs once at startup; stamp the project-root meta\n // there so the canvas can resolve annotations off the live DOM. Keyed\n // on the entry's root-relative path (`index.js`), matching the entry\n // scaffolded by tempo-project's `EXPO_INDEX_JS`.\n if (context.filepath === \"index.js\") {\n injectProjectRootMeta(api, path, root);\n }\n\n const supportOverrides = getSupportOverrides(options);\n\n path.traverse({\n JSXElement(elementPath) {\n const element = elementPath.node;\n const tagName = getBabelTagName(element.openingElement.name);\n if (FRAGMENT_TAG_NAMES.has(tagName)) return;\n\n const info = {\n element,\n tagName,\n } as unknown as ElementInfo;\n const props = computeTempoAnnotatedProps({\n info,\n filepath: context.filepath,\n modifiedtsMs: context.modifiedtsMs,\n computeAnnotatedProps: options.computeAnnotatedProps,\n elementSupportOverrides: supportOverrides,\n });\n\n addAnnotations(api, tagName, element.openingElement, props);\n },\n });\n },\n },\n },\n };\n}\n\nexport { tempoExpoBabelPlugin };\n","import { realpathSync, statSync } from \"node:fs\";\nimport { relative } from \"node:path\";\n\nimport type {\n ElementInfo,\n PropValue,\n} from \"../../modules/annotation/annotate-file.ts\";\n\nexport const DEFAULT_EXCLUDE = [\"**/node_modules/**\"] as const;\n\n/**\n * Static per-component declaration of which editable props a custom component\n * accepts. Supplied by callers that know this from a fixed table (e.g. the Expo\n * plugin's React Native host-component overrides). The Vite/Next.js plugins\n * supply no overrides — custom components are left without `supports-*` flags\n * and consumers treat their support as unknown.\n */\nexport interface ElementTypeSupport {\n supportsStyle: boolean;\n supportsClassName: boolean;\n supportsChildren: boolean;\n}\n\n/** HTML void elements that cannot have children (self-closing only). */\nexport const HTML_VOID_ELEMENTS = new Set([\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n\nexport type ComputeAnnotatedProps = (\n info: ElementInfo,\n filepath: string,\n modifiedtsMs: number,\n) => Record<string, PropValue>;\n\nexport function cleanModuleId(id: string): string {\n return id.replace(/[?#].*$/, \"\");\n}\n\nexport function resolveCanonicalRoot(root: string): string {\n try {\n return realpathSync.native(root);\n } catch {\n return root;\n }\n}\n\nexport function isIntrinsicElement(tagName: string): boolean {\n return tagName.length > 0 && tagName[0] === tagName[0]!.toLowerCase();\n}\n\nexport function hasJsxAttribute(info: ElementInfo, attrName: string): boolean {\n for (const attr of info.element.openingElement.attributes) {\n const name = (attr as { name?: { name?: unknown } }).name;\n if (name?.name === attrName) return true;\n }\n return false;\n}\n\nexport function defaultComputeAnnotatedProps(\n info: ElementInfo,\n filepath: string,\n modifiedtsMs: number,\n): Record<string, PropValue> {\n return {\n \"data-tempo-filepath\": filepath,\n \"data-tempo-position\": info.element.openingElement.start,\n \"data-tempo-modifiedts\": modifiedtsMs,\n };\n}\n\nexport function computeTempoAnnotatedProps(params: {\n info: ElementInfo;\n filepath: string;\n modifiedtsMs: number;\n computeAnnotatedProps?: ComputeAnnotatedProps;\n elementSupportOverrides?: ReadonlyMap<string, ElementTypeSupport>;\n}): Record<string, PropValue> {\n const {\n info,\n filepath,\n modifiedtsMs,\n computeAnnotatedProps,\n elementSupportOverrides,\n } = params;\n\n const userProps = computeAnnotatedProps\n ? computeAnnotatedProps(info, filepath, modifiedtsMs)\n : defaultComputeAnnotatedProps(info, filepath, modifiedtsMs);\n\n if (isIntrinsicElement(info.tagName)) {\n return {\n ...userProps,\n \"data-tempo-supports-children\": hasJsxAttribute(\n info,\n \"data-tempo-supports-children\",\n )\n ? undefined\n : !HTML_VOID_ELEMENTS.has(info.tagName),\n };\n }\n\n const override = elementSupportOverrides?.get(info.tagName);\n if (override) {\n return {\n ...userProps,\n \"data-tempo-supports-style\": override.supportsStyle,\n \"data-tempo-supports-classname\": override.supportsClassName,\n \"data-tempo-supports-children\": hasJsxAttribute(\n info,\n \"data-tempo-supports-children\",\n )\n ? undefined\n : override.supportsChildren,\n };\n }\n\n // Custom component with no static override: emit no `data-tempo-supports-*`\n // flags. Determining them required a per-file TypeScript program, which was\n // removed for being the dominant cost of devserver startup. Consumers treat\n // the absent flags as \"unknown\" and fall back to their own defaults.\n return userProps;\n}\n\nexport function getFileAnnotationContext(params: {\n source: string;\n filename: string;\n root: string;\n canonicalizeFilename?: boolean;\n}): {\n cleanFilename: string;\n filepath: string;\n modifiedtsMs: number;\n} {\n const rawCleanFilename = cleanModuleId(params.filename);\n let cleanFilename = rawCleanFilename;\n if (params.canonicalizeFilename) {\n try {\n cleanFilename = realpathSync.native(rawCleanFilename);\n } catch {\n cleanFilename = rawCleanFilename;\n }\n }\n return {\n cleanFilename,\n filepath: relative(params.root, cleanFilename),\n modifiedtsMs: Math.trunc(statSync(cleanFilename).mtimeMs),\n };\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAC3B,SAAS,SAAS,eAAe;AAEjC,SAAS,oBAAwC;;;ACHjD,SAAS,cAAc,gBAAgB;AACvC,SAAS,gBAAgB;AAOlB,IAAM,kBAAkB,CAAC,oBAAoB;AAgB7C,IAAM,qBAAqB,oBAAI,IAAI;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAQM,SAAS,cAAc,IAAoB;AAChD,SAAO,GAAG,QAAQ,WAAW,EAAE;AACjC;AAEO,SAAS,qBAAqB,MAAsB;AACzD,MAAI;AACF,WAAO,aAAa,OAAO,IAAI;AAAA,EACjC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,mBAAmB,SAA0B;AAC3D,SAAO,QAAQ,SAAS,KAAK,QAAQ,CAAC,MAAM,QAAQ,CAAC,EAAG,YAAY;AACtE;AAEO,SAAS,gBAAgB,MAAmB,UAA2B;AAC5E,aAAW,QAAQ,KAAK,QAA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