tempo-sdk 0.0.69 → 0.0.75

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 (109) hide show
  1. package/dist/assets/index.js +3 -3
  2. package/dist/astro/asset-preview-client.js +2 -2
  3. package/dist/astro.js +17 -11
  4. package/dist/astro.js.map +1 -1
  5. package/dist/canvas/astro.d.ts +1 -1
  6. package/dist/canvas/astro.js +2 -2
  7. package/dist/canvas/editor.d.ts +15 -5
  8. package/dist/canvas/editor.js +13 -8
  9. package/dist/canvas/editor.js.map +1 -1
  10. package/dist/canvas/flutter-preview.d.ts +18 -0
  11. package/dist/canvas/flutter-preview.js +9 -0
  12. package/dist/canvas/flutter-preview.js.map +1 -0
  13. package/dist/canvas/index.d.ts +33 -2
  14. package/dist/canvas/index.js +1134 -26
  15. package/dist/canvas/index.js.map +1 -1
  16. package/dist/canvas/interact-projection.js +5 -4
  17. package/dist/canvas/parser.d.ts +142 -3
  18. package/dist/canvas/parser.js +14 -1
  19. package/dist/canvas/svelte.d.ts +1 -1
  20. package/dist/canvas/svelte.js +2 -2
  21. package/dist/canvas/vue.d.ts +74 -0
  22. package/dist/canvas/vue.js +264 -0
  23. package/dist/canvas/vue.js.map +1 -0
  24. package/dist/{chunk-6BSLP7P3.js → chunk-2YX4WVFH.js} +49 -7
  25. package/dist/chunk-2YX4WVFH.js.map +1 -0
  26. package/dist/chunk-5HIIF354.js +67 -0
  27. package/dist/chunk-5HIIF354.js.map +1 -0
  28. package/dist/{chunk-FE6TYCLF.js → chunk-5VIBKVFO.js} +2 -2
  29. package/dist/{chunk-FE6TYCLF.js.map → chunk-5VIBKVFO.js.map} +1 -1
  30. package/dist/{chunk-77DZCV5Z.js → chunk-CXIW4IKC.js} +2 -2
  31. package/dist/chunk-CYQE3TLC.js +37 -0
  32. package/dist/chunk-CYQE3TLC.js.map +1 -0
  33. package/dist/{chunk-WTQQOLXM.js → chunk-DNSCVLKV.js} +1571 -1410
  34. package/dist/chunk-DNSCVLKV.js.map +1 -0
  35. package/dist/chunk-EGRHWZRV.js +1 -0
  36. package/dist/chunk-EGRHWZRV.js.map +1 -0
  37. package/dist/{chunk-EYKOOLPL.js → chunk-GKDDNDG3.js} +1039 -134
  38. package/dist/chunk-GKDDNDG3.js.map +1 -0
  39. package/dist/{chunk-KOSJXE4G.js → chunk-H6BQZOAW.js} +4 -3
  40. package/dist/chunk-HOBTDB6G.js +112 -0
  41. package/dist/chunk-HOBTDB6G.js.map +1 -0
  42. package/dist/chunk-HZXQPM4W.js +285 -0
  43. package/dist/chunk-HZXQPM4W.js.map +1 -0
  44. package/dist/chunk-SGN7BDRE.js +16 -0
  45. package/dist/chunk-SGN7BDRE.js.map +1 -0
  46. package/dist/{chunk-F23JGM4U.js → chunk-UBTL6JUF.js} +6 -2
  47. package/dist/{chunk-F23JGM4U.js.map → chunk-UBTL6JUF.js.map} +1 -1
  48. package/dist/{chunk-2JRAG36X.js → chunk-WBMO4ZYO.js} +2 -2
  49. package/dist/chunk-WBMO4ZYO.js.map +1 -0
  50. package/dist/{chunk-K3EYTZLL.js → chunk-WTXOWQ7N.js} +3 -1
  51. package/dist/chunk-WTXOWQ7N.js.map +1 -0
  52. package/dist/{chunk-Q2A46HHW.js → chunk-XFPFWTWX.js} +276 -43
  53. package/dist/chunk-XFPFWTWX.js.map +1 -0
  54. package/dist/chunk-XMFVWJUY.js +342 -0
  55. package/dist/chunk-XMFVWJUY.js.map +1 -0
  56. package/dist/{chunk-PXDTH36X.js → chunk-Y72PIE3I.js} +212 -20
  57. package/dist/chunk-Y72PIE3I.js.map +1 -0
  58. package/dist/{chunk-6IR5JY6W.js → chunk-YECMP34I.js} +41 -9
  59. package/dist/chunk-YECMP34I.js.map +1 -0
  60. package/dist/{chunk-NSKYOKG5.js → chunk-ZXC7SZIT.js} +278 -26
  61. package/dist/chunk-ZXC7SZIT.js.map +1 -0
  62. package/dist/{controls-reader-SNMI2UY7.js → controls-reader-Z7OQWYWQ.js} +4 -3
  63. package/dist/{controls-reader-SNMI2UY7.js.map → controls-reader-Z7OQWYWQ.js.map} +1 -1
  64. package/dist/expo/plugin.cjs +301 -58
  65. package/dist/expo/plugin.cjs.map +1 -1
  66. package/dist/expo/plugin.js +1 -1
  67. package/dist/expo-babel-plugin.cjs +301 -58
  68. package/dist/expo-babel-plugin.cjs.map +1 -1
  69. package/dist/expo-babel-plugin.js +1 -1
  70. package/dist/flutter-preview-path.d.ts +9 -0
  71. package/dist/flutter-preview-path.js +16 -0
  72. package/dist/flutter-preview-path.js.map +1 -0
  73. package/dist/index.d.ts +16 -15
  74. package/dist/index.js +9 -6
  75. package/dist/nextjs/plugin.cjs +46 -5
  76. package/dist/nextjs/plugin.cjs.map +1 -1
  77. package/dist/nextjs/plugin.js +1 -1
  78. package/dist/nextjs-loader.cjs +343 -68
  79. package/dist/nextjs-loader.cjs.map +1 -1
  80. package/dist/nextjs.cjs +48 -6
  81. package/dist/nextjs.cjs.map +1 -1
  82. package/dist/nextjs.d.cts +9 -1
  83. package/dist/nextjs.d.ts +9 -1
  84. package/dist/nextjs.js +1 -1
  85. package/dist/nuxt/runtime/identity.d.ts +24 -0
  86. package/dist/nuxt/runtime/identity.js +18 -0
  87. package/dist/nuxt/runtime/identity.js.map +1 -0
  88. package/dist/nuxt.d.ts +102 -0
  89. package/dist/nuxt.js +5673 -0
  90. package/dist/nuxt.js.map +1 -0
  91. package/dist/{storyboard-4YdTYq_e.d.ts → storyboard-CMJVBSXn.d.ts} +9 -3
  92. package/dist/svelte.d.ts +4 -2
  93. package/dist/svelte.js +21 -88
  94. package/dist/svelte.js.map +1 -1
  95. package/dist/vue.d.ts +66 -0
  96. package/dist/vue.js +1403 -0
  97. package/dist/vue.js.map +1 -0
  98. package/package.json +48 -5
  99. package/dist/chunk-2JRAG36X.js.map +0 -1
  100. package/dist/chunk-6BSLP7P3.js.map +0 -1
  101. package/dist/chunk-6IR5JY6W.js.map +0 -1
  102. package/dist/chunk-EYKOOLPL.js.map +0 -1
  103. package/dist/chunk-K3EYTZLL.js.map +0 -1
  104. package/dist/chunk-NSKYOKG5.js.map +0 -1
  105. package/dist/chunk-PXDTH36X.js.map +0 -1
  106. package/dist/chunk-Q2A46HHW.js.map +0 -1
  107. package/dist/chunk-WTQQOLXM.js.map +0 -1
  108. /package/dist/{chunk-77DZCV5Z.js.map → chunk-CXIW4IKC.js.map} +0 -0
  109. /package/dist/{chunk-KOSJXE4G.js.map → chunk-H6BQZOAW.js.map} +0 -0
@@ -521,6 +521,27 @@ function isProjectionScopePlumbing(fiber) {
521
521
  return role(fiber) !== void 0 || isOutputInvocation(fiber);
522
522
  }
523
523
 
524
+ // ../../modules/iframe-projection/combined/projection-pending.ts
525
+ var PROJECTION_PENDING_ATTRIBUTE = "data-tempo-projection-pending";
526
+ var PROJECTION_UNAVAILABLE_ATTRIBUTE = "data-tempo-projection-unavailable";
527
+ function isProjectionPendingOnly(rootElement) {
528
+ return childrenAllCarry(rootElement, PROJECTION_PENDING_ATTRIBUTE);
529
+ }
530
+ function isProjectionUnavailableOnly(rootElement) {
531
+ return childrenAllCarry(rootElement, PROJECTION_UNAVAILABLE_ATTRIBUTE);
532
+ }
533
+ function childrenAllCarry(rootElement, attribute) {
534
+ const children = rootElement.children;
535
+ if (children.length === 0) return false;
536
+ for (let index = 0; index < children.length; index += 1) {
537
+ const child = children[index];
538
+ if (!child || !child.hasAttribute(attribute)) {
539
+ return false;
540
+ }
541
+ }
542
+ return true;
543
+ }
544
+
524
545
  // ../../modules/iframe-projection/combined/projection-astro-alpine.ts
525
546
  function createAstroAlpineOwnership(key, original) {
526
547
  let active = /* @__PURE__ */ new Map();
@@ -1826,6 +1847,7 @@ function createProjectionDomLayerSerializer() {
1826
1847
  const domIdOwners = /* @__PURE__ */ new Map();
1827
1848
  const identity = {
1828
1849
  id: /* @__PURE__ */ new WeakMap(),
1850
+ publishedProps: /* @__PURE__ */ new WeakMap(),
1829
1851
  layerIdForElement(_root, element) {
1830
1852
  const existing = elementIds.get(element);
1831
1853
  if (existing) return existing;
@@ -1911,11 +1933,14 @@ function captureProjectionDomLayerPatchFromTargets(root, targets, observedFiles,
1911
1933
  if (target !== root && regions.some((region) => region === root || region.contains(target))) {
1912
1934
  continue;
1913
1935
  }
1914
- metadataSnapshots.push({
1915
- targetFiberId: layerIdForTarget(root, target, identity),
1916
- targetId: id(root, target, identity),
1917
- props: captureProjectionDomLayerProps(target)
1918
- });
1936
+ const targetFiberId = layerIdForTarget(root, target, identity);
1937
+ const targetId = id(root, target, identity);
1938
+ const props = captureProjectionDomLayerProps(target);
1939
+ const published = identity.publishedProps;
1940
+ if (published?.has(target) && layerPropsEqual(published.get(target), props))
1941
+ continue;
1942
+ published?.set(target, props);
1943
+ metadataSnapshots.push({ targetFiberId, targetId, props });
1919
1944
  }
1920
1945
  if (regionSnapshots.length === 0 && metadataSnapshots.length === 0) {
1921
1946
  return void 0;
@@ -1997,6 +2022,8 @@ function serializeDomLayerNode(root, element, identity = dataDomLayerIdentity, o
1997
2022
  const name = element.tagName.toLowerCase();
1998
2023
  const props = captureProjectionDomLayerProps(element, observedFiles);
1999
2024
  const hostProps = root && firstStampCarrier(root, element) ? props : withoutSourceStamps(props);
2025
+ const nodeProps = hostProps && Object.keys(hostProps).length ? hostProps : void 0;
2026
+ identity.publishedProps?.set(element, nodeProps);
2000
2027
  return {
2001
2028
  kind: "host",
2002
2029
  runtime: "dom",
@@ -2005,7 +2032,7 @@ function serializeDomLayerNode(root, element, identity = dataDomLayerIdentity, o
2005
2032
  name,
2006
2033
  domId,
2007
2034
  elementTag: name,
2008
- props: hostProps && Object.keys(hostProps).length ? hostProps : void 0,
2035
+ props: nodeProps,
2009
2036
  source: {
2010
2037
  kind: "react-fiber",
2011
2038
  fiber: {
@@ -2063,6 +2090,7 @@ function captureProjectionDomLayerProps(element, observedFiles) {
2063
2090
  if (className) props.className = className;
2064
2091
  const style = parseInlineStyle(element.getAttribute("style"));
2065
2092
  if (style) props.style = style;
2093
+ Object.assign(props, svgLayerAttributes(element));
2066
2094
  for (const name of SOURCE_ANNOTATION_ATTRIBUTES) {
2067
2095
  const value = element.getAttribute(name);
2068
2096
  if (value === null) continue;
@@ -2088,6 +2116,23 @@ function captureProjectionDomLayerProps(element, observedFiles) {
2088
2116
  observedFiles?.addLayerProps(props);
2089
2117
  return Object.keys(props).length > 0 ? props : void 0;
2090
2118
  }
2119
+ function invocationSourceLayerProps(source2, invocation) {
2120
+ const props = {};
2121
+ for (const [name, value] of Object.entries(invocation.literalProps ?? {}))
2122
+ props[`data-tempo-component-prop-${name}`] = JSON.stringify(value);
2123
+ if (invocation.className) props.className = invocation.className;
2124
+ const style = parseInlineStyle(invocation.style ?? null);
2125
+ if (style) props.style = style;
2126
+ if (invocation.locked !== void 0)
2127
+ props["data-tempo-locked"] = invocation.locked;
2128
+ if (invocation.expressions !== void 0)
2129
+ props["data-tempo-expr"] = invocation.expressions;
2130
+ props["data-tempo-filepath"] = source2.filepath;
2131
+ props["data-tempo-position"] = invocation.position;
2132
+ props["data-tempo-modifiedts"] = source2.modifiedTs;
2133
+ props["data-tempo-source-version"] = source2.sourceVersion;
2134
+ return props;
2135
+ }
2091
2136
  function parseInlineStyle(value) {
2092
2137
  if (!value) return void 0;
2093
2138
  const style = {};
@@ -2101,7 +2146,206 @@ function parseInlineStyle(value) {
2101
2146
  return Object.keys(style).length > 0 ? style : void 0;
2102
2147
  }
2103
2148
 
2149
+ // ../../modules/iframe-projection/combined/projection-flutter-layers.ts
2150
+ var FLUTTER_ROOT_ATTRIBUTE = "data-tempo-flutter-root";
2151
+ var FLUTTER_VIEW_ATTRIBUTE = "data-tempo-flutter-view";
2152
+ function isFlutterViewRoot(element) {
2153
+ return element.hasAttribute(FLUTTER_ROOT_ATTRIBUTE);
2154
+ }
2155
+ function flutterViewRootOf(element) {
2156
+ return element.closest(`[${FLUTTER_ROOT_ATTRIBUTE}]`);
2157
+ }
2158
+ function flutterHostProps(element) {
2159
+ const viewId = element.getAttribute(FLUTTER_VIEW_ATTRIBUTE);
2160
+ return {
2161
+ "data-tempo-hide-fiber": true,
2162
+ ...viewId !== null ? { [FLUTTER_VIEW_ATTRIBUTE]: viewId } : {}
2163
+ };
2164
+ }
2165
+ var hostIdsByHost = /* @__PURE__ */ new WeakMap();
2166
+ function serializeFlutterViewLayers(host, root, observedFiles) {
2167
+ const snapshot = readSnapshot(host);
2168
+ if (!snapshot) return [];
2169
+ const offset = hostOffsetFromRoot(host, root ?? nearestProjectionRoot(host));
2170
+ const nodesById = /* @__PURE__ */ new Map();
2171
+ const childrenOf = /* @__PURE__ */ new Map();
2172
+ for (const node of snapshot.nodes) {
2173
+ if (!isFlutterLayerNode(node)) continue;
2174
+ nodesById.set(node.id, node);
2175
+ }
2176
+ for (const node of nodesById.values()) {
2177
+ const parent = node.parent !== null && nodesById.has(node.parent) ? node.parent : null;
2178
+ const siblings = childrenOf.get(parent) ?? [];
2179
+ siblings.push(node);
2180
+ childrenOf.set(parent, siblings);
2181
+ }
2182
+ const previousIds = hostIdsByHost.get(host) ?? /* @__PURE__ */ new Map();
2183
+ const currentIds = /* @__PURE__ */ new Map();
2184
+ const hostIdFor = (snapshotId) => {
2185
+ const id2 = previousIds.get(snapshotId) ?? nextProjectionId();
2186
+ currentIds.set(snapshotId, id2);
2187
+ return id2;
2188
+ };
2189
+ const serialize = (node) => {
2190
+ const id2 = hostIdFor(node.id);
2191
+ const props = flutterNodeProps(node);
2192
+ observedFiles?.addLayerProps(props);
2193
+ return {
2194
+ kind: "component",
2195
+ runtime: "flutter",
2196
+ id: id2,
2197
+ key: null,
2198
+ name: node.name,
2199
+ domId: null,
2200
+ elementTag: null,
2201
+ ...props ? { props } : {},
2202
+ geometry: {
2203
+ x: node.x + offset.x,
2204
+ y: node.y + offset.y,
2205
+ width: node.width,
2206
+ height: node.height,
2207
+ painted: node.painted === true
2208
+ },
2209
+ source: {
2210
+ kind: "react-fiber",
2211
+ fiber: { tag: FiberTag.FunctionComponent, name: node.name, id: id2 }
2212
+ },
2213
+ children: (childrenOf.get(node.id) ?? []).map(serialize)
2214
+ };
2215
+ };
2216
+ const roots = (childrenOf.get(null) ?? []).map(serialize);
2217
+ hostIdsByHost.set(host, currentIds);
2218
+ return roots;
2219
+ }
2220
+ function flutterNodeProps(node) {
2221
+ if (node.position === null) return void 0;
2222
+ return {
2223
+ "data-tempo-filepath": node.file,
2224
+ "data-tempo-position": node.position,
2225
+ ...node.modifiedTs !== null ? { "data-tempo-modifiedts": node.modifiedTs } : {}
2226
+ };
2227
+ }
2228
+ function readSnapshot(host) {
2229
+ const attribute = host.getAttribute(FLUTTER_VIEW_ATTRIBUTE);
2230
+ if (attribute === null) return null;
2231
+ const viewId = Number(attribute);
2232
+ if (!Number.isInteger(viewId)) return null;
2233
+ const runtime = host.ownerDocument.defaultView?.__tempoFlutter;
2234
+ const snapshot = runtime?.layers?.get(viewId);
2235
+ if (!snapshot || !Array.isArray(snapshot.nodes)) return null;
2236
+ return snapshot;
2237
+ }
2238
+ function isFlutterLayerNode(value) {
2239
+ if (typeof value !== "object" || value === null) return false;
2240
+ const node = value;
2241
+ return typeof node.id === "string" && (node.parent === null || typeof node.parent === "string") && typeof node.name === "string" && typeof node.file === "string" && [node.x, node.y, node.width, node.height].every(
2242
+ (n) => typeof n === "number" && Number.isFinite(n)
2243
+ );
2244
+ }
2245
+ function nearestProjectionRoot(host) {
2246
+ return host.closest(`[${PROJECTION_ROOT_ATTRIBUTE}]`) ?? host;
2247
+ }
2248
+ function hostOffsetFromRoot(host, root) {
2249
+ if (host === root) return { x: 0, y: 0 };
2250
+ const hostRect = host.getBoundingClientRect();
2251
+ const rootRect = root.getBoundingClientRect();
2252
+ return { x: hostRect.left - rootRect.left, y: hostRect.top - rootRect.top };
2253
+ }
2254
+
2104
2255
  // ../../modules/iframe-projection/combined/projection-layer-snapshot.ts
2256
+ var SVG_PRESENTATION_ATTRIBUTES = [
2257
+ "fill",
2258
+ "fill-opacity",
2259
+ "fill-rule",
2260
+ "stroke",
2261
+ "stroke-width",
2262
+ "stroke-opacity",
2263
+ "stroke-linecap",
2264
+ "stroke-linejoin",
2265
+ "stroke-dasharray",
2266
+ "stroke-dashoffset",
2267
+ "stroke-miterlimit",
2268
+ "color",
2269
+ "opacity",
2270
+ "clip-path",
2271
+ "mask",
2272
+ "filter"
2273
+ ];
2274
+ var SVG_GEOMETRY_ATTRIBUTES = {
2275
+ path: ["d"],
2276
+ rect: ["x", "y", "width", "height", "rx", "ry"],
2277
+ circle: ["cx", "cy", "r"],
2278
+ ellipse: ["cx", "cy", "rx", "ry"],
2279
+ line: ["x1", "y1", "x2", "y2"],
2280
+ polygon: ["points"],
2281
+ polyline: ["points"]
2282
+ };
2283
+ var SVG_LAYER_IDENTITY = ["id", "transform"];
2284
+ var SVG_PICTURE_BOX = [
2285
+ "viewBox",
2286
+ "width",
2287
+ "height",
2288
+ "preserveAspectRatio"
2289
+ ];
2290
+ var SVG_OWN_ATTRIBUTES = new Map([
2291
+ ["svg", SVG_PICTURE_BOX],
2292
+ ["g", SVG_LAYER_IDENTITY],
2293
+ ...Object.entries(SVG_GEOMETRY_ATTRIBUTES).map(
2294
+ ([tag, geometry]) => [
2295
+ tag,
2296
+ [...SVG_LAYER_IDENTITY, ...geometry]
2297
+ ]
2298
+ )
2299
+ ]);
2300
+ var SVG_LAYER_ATTRIBUTE_NAMES = /* @__PURE__ */ new Set([
2301
+ ...SVG_PRESENTATION_ATTRIBUTES,
2302
+ ...[...SVG_OWN_ATTRIBUTES.values()].flat()
2303
+ ]);
2304
+ function svgLayerAttributes(element) {
2305
+ const props = {};
2306
+ if (element.namespaceURI !== "http://www.w3.org/2000/svg") return props;
2307
+ const read = (names) => {
2308
+ for (const name of names) {
2309
+ const value = element.getAttribute(name);
2310
+ if (value !== null) props[name] = value;
2311
+ }
2312
+ };
2313
+ read(SVG_PRESENTATION_ATTRIBUTES);
2314
+ read(SVG_OWN_ATTRIBUTES.get(element.localName) ?? []);
2315
+ return props;
2316
+ }
2317
+ function svgLayerAttributesOf(props) {
2318
+ if (!props) return void 0;
2319
+ const picked = Object.entries(props).filter(
2320
+ (entry) => SVG_LAYER_ATTRIBUTE_NAMES.has(entry[0]) && typeof entry[1] === "string"
2321
+ );
2322
+ return picked.length > 0 ? Object.fromEntries(picked) : void 0;
2323
+ }
2324
+ function layerPropsEqual(left, right) {
2325
+ if (left === right) return true;
2326
+ if (!left || !right) return left === right;
2327
+ const leftEntries = Object.entries(left);
2328
+ const rightEntries = Object.entries(right);
2329
+ if (leftEntries.length !== rightEntries.length) return false;
2330
+ for (const [key, value] of leftEntries) {
2331
+ const other = right[key];
2332
+ if (key === "style") {
2333
+ if (!recordEqual(
2334
+ value,
2335
+ other
2336
+ )) {
2337
+ return false;
2338
+ }
2339
+ } else if (value !== other) return false;
2340
+ }
2341
+ return true;
2342
+ }
2343
+ function recordEqual(left, right) {
2344
+ if (left === right) return true;
2345
+ if (!left || !right) return left === right;
2346
+ const keys = Object.keys(left);
2347
+ return keys.length === Object.keys(right).length && keys.every((key) => left[key] === right[key]);
2348
+ }
2105
2349
  function layoutModeOf(style) {
2106
2350
  if (/grid/.test(style.display)) return "grid";
2107
2351
  if (!/flex/.test(style.display)) return void 0;
@@ -2399,7 +2643,14 @@ function createProjectionLayerSerializer(watchedRoot, contentsScope = false, inc
2399
2643
  )
2400
2644
  );
2401
2645
  }
2402
- const children = suppliedChildren ?? (element ? domChildren(element, fiber) : []);
2646
+ const flutterChildren = !suppliedChildren && element && isFlutterViewRoot(element) ? serializeFlutterViewLayers(
2647
+ element,
2648
+ watchedRoot ?? null,
2649
+ observedFiles
2650
+ ) : null;
2651
+ if (flutterChildren)
2652
+ semanticNodesSerialized += countNodes(flutterChildren);
2653
+ const children = suppliedChildren ?? flutterChildren ?? (element ? domChildren(element, fiber) : []);
2403
2654
  if (!suppliedChildren && !element)
2404
2655
  for (let child = fiber.child; child; child = child.sibling)
2405
2656
  children.push(...visit(child));
@@ -2701,9 +2952,6 @@ function captureProjectionLayerProps(fiber, element, sourceAnnotations = "fiber"
2701
2952
  putString("data-tempo-canvas-declaration", "tempoCanvasDeclaration");
2702
2953
  putString("data-tempo-storyboard-declaration", "tempoStoryboardDeclaration");
2703
2954
  putString("data-tempo-storyboard-id", "tempoStoryboardId");
2704
- if (fiber.tag === FiberTag.HostComponent && fiber.type === "polygon" && typeof raw?.points === "string") {
2705
- props.points = raw.points;
2706
- }
2707
2955
  if (element) {
2708
2956
  if (layoutMode === void 0) {
2709
2957
  layoutMode = layoutModeOf(getComputedStyle(element));
@@ -2713,11 +2961,19 @@ function captureProjectionLayerProps(fiber, element, sourceAnnotations = "fiber"
2713
2961
  if (className !== null && className !== "") props.className = className;
2714
2962
  const style = parseInlineStyle2(element.getAttribute("style"));
2715
2963
  if (style) props.style = style;
2964
+ Object.assign(props, svgLayerAttributes(element));
2716
2965
  } else if (typeof raw?.className === "string") {
2717
2966
  props.className = raw.className;
2718
2967
  }
2968
+ if (element && isFlutterViewRoot(element))
2969
+ Object.assign(props, flutterHostProps(element));
2719
2970
  return Object.keys(props).length > 0 ? props : void 0;
2720
2971
  }
2972
+ function countNodes(nodes) {
2973
+ let count = 0;
2974
+ for (const node of nodes) count += 1 + countNodes(node.children ?? []);
2975
+ return count;
2976
+ }
2721
2977
  function parseInlineStyle2(value) {
2722
2978
  if (!value) return void 0;
2723
2979
  const style = {};
@@ -2737,25 +2993,13 @@ function projectionFiberSourceKey(fiber) {
2737
2993
  return filepath && position !== void 0 ? `${filepath}:${position}` : null;
2738
2994
  }
2739
2995
 
2740
- // ../../modules/iframe-projection/combined/projection-pending.ts
2741
- var PROJECTION_PENDING_ATTRIBUTE = "data-tempo-projection-pending";
2742
- function isProjectionPendingOnly(rootElement) {
2743
- const children = rootElement.children;
2744
- if (children.length === 0) return false;
2745
- for (let index = 0; index < children.length; index += 1) {
2746
- const child = children[index];
2747
- if (!child || !child.hasAttribute(PROJECTION_PENDING_ATTRIBUTE)) {
2748
- return false;
2749
- }
2750
- }
2751
- return true;
2752
- }
2753
-
2754
2996
  export {
2755
2997
  FiberTag,
2756
2998
  PROJECTION_SCOPE_ROLE,
2757
2999
  PROJECTION_PENDING_ATTRIBUTE,
3000
+ PROJECTION_UNAVAILABLE_ATTRIBUTE,
2758
3001
  isProjectionPendingOnly,
3002
+ isProjectionUnavailableOnly,
2759
3003
  getDisplayName,
2760
3004
  getTag,
2761
3005
  getProps,
@@ -2784,6 +3028,8 @@ export {
2784
3028
  syncProjectionDomIdsToClone,
2785
3029
  watchDom,
2786
3030
  drainProjectionDomMutations,
3031
+ isFlutterViewRoot,
3032
+ flutterViewRootOf,
2787
3033
  watchState,
2788
3034
  drainProjectionStateEvents,
2789
3035
  PORTAL_ID_ATTR,
@@ -2792,6 +3038,7 @@ export {
2792
3038
  capturePortalCoordinateSpace,
2793
3039
  cssEscape,
2794
3040
  ProjectionObservedFileAccumulator,
3041
+ SOURCE_ANNOTATION_ATTRIBUTES,
2795
3042
  PROJECTION_ROOT_TARGET_ID,
2796
3043
  captureProjectionMutationPatch,
2797
3044
  captureProjectionStatePatch,
@@ -2800,6 +3047,9 @@ export {
2800
3047
  stripSourceAnnotations,
2801
3048
  captureRegionWithoutAnnotations,
2802
3049
  captureProjectionAncestorIds,
3050
+ svgLayerAttributesOf,
3051
+ layerPropsEqual,
3052
+ recordEqual,
2803
3053
  PROJECTION_SCOPE_TARGET,
2804
3054
  projectionLayerRoots,
2805
3055
  createProjectionLayerSerializer,
@@ -2809,6 +3059,8 @@ export {
2809
3059
  DOM_LAYER_ROOT_ID,
2810
3060
  createProjectionDomLayerSerializer,
2811
3061
  serializeDomLayerNode,
2812
- captureProjectionDomLayerProps
3062
+ captureProjectionDomLayerProps,
3063
+ invocationSourceLayerProps,
3064
+ parseInlineStyle
2813
3065
  };
2814
- //# sourceMappingURL=chunk-NSKYOKG5.js.map
3066
+ //# sourceMappingURL=chunk-ZXC7SZIT.js.map