tempo-sdk 0.0.20 → 0.0.23

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.
@@ -0,0 +1,19 @@
1
+ // ../../modules/iframe-projection/combined/projection-pending.ts
2
+ var PROJECTION_PENDING_ATTRIBUTE = "data-tempo-projection-pending";
3
+ function isProjectionPendingOnly(rootElement) {
4
+ const children = rootElement.children;
5
+ if (children.length === 0) return false;
6
+ for (let index = 0; index < children.length; index += 1) {
7
+ const child = children[index];
8
+ if (!child || !child.hasAttribute(PROJECTION_PENDING_ATTRIBUTE)) {
9
+ return false;
10
+ }
11
+ }
12
+ return true;
13
+ }
14
+
15
+ export {
16
+ PROJECTION_PENDING_ATTRIBUTE,
17
+ isProjectionPendingOnly
18
+ };
19
+ //# sourceMappingURL=chunk-ZT2REPH4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../modules/iframe-projection/combined/projection-pending.ts"],"sourcesContent":["/**\n * The pending-marker contract, shared between the source app and the producer.\n *\n * A Tempo-owned Suspense boundary renders a single hidden marker element as its\n * fallback instead of `null`. That turns \"this subtree is briefly empty because\n * content is loading\" — which is indistinguishable from \"this subtree is now\n * genuinely empty\" once it reaches the DOM — into something the producer can\n * recognise without inspecting React internals.\n *\n * This file is imported directly by tempo-sdk and bundled into it, so it must\n * stay dependency-free: no imports, no DOM globals beyond the element passed in.\n */\n\n/** Marks an element as a Tempo Suspense boundary's pending placeholder. */\nexport const PROJECTION_PENDING_ATTRIBUTE = \"data-tempo-projection-pending\";\n\n/**\n * Is this root showing a pending marker and nothing else?\n *\n * The rule is deliberately strict — marker-ONLY. A root that still holds real\n * content alongside a marker is a partially-loaded tree, and partial content is\n * exactly what the mirror should show; only a root whose entire visible output\n * is placeholder has nothing worth publishing. An empty root is likewise not\n * pending: emptiness with no marker is a real state (a conditional unmount, a\n * foreign boundary with `fallback={null}`) and stays a real change.\n */\nexport function isProjectionPendingOnly(rootElement: Element): boolean {\n const children = rootElement.children;\n if (children.length === 0) return false;\n for (let index = 0; index < children.length; index += 1) {\n const child = children[index];\n if (!child || !child.hasAttribute(PROJECTION_PENDING_ATTRIBUTE)) {\n return false;\n }\n }\n return true;\n}\n"],"mappings":";AAcO,IAAM,+BAA+B;AAYrC,SAAS,wBAAwB,aAA+B;AACrE,QAAM,WAAW,YAAY;AAC7B,MAAI,SAAS,WAAW,EAAG,QAAO;AAClC,WAAS,QAAQ,GAAG,QAAQ,SAAS,QAAQ,SAAS,GAAG;AACvD,UAAM,QAAQ,SAAS,KAAK;AAC5B,QAAI,CAAC,SAAS,CAAC,MAAM,aAAa,4BAA4B,GAAG;AAC/D,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
package/dist/index.d.ts CHANGED
@@ -41,6 +41,9 @@ type SseClient = ServerResponse<IncomingMessage>;
41
41
  interface TempoErrorServer {
42
42
  /** The error currently broadcast to SSE clients (most recent across all modules). */
43
43
  readonly currentError: TempoViteError | null;
44
+ /** Files with active compile errors. Failed transforms may not be present in
45
+ * Vite's module graph, so recovery code must track them explicitly. */
46
+ readonly errorFiles: readonly string[];
44
47
  clients: Set<SseClient>;
45
48
  setError(error: TempoViteError): void;
46
49
  /** Clear errors for exact module aliases present in the HMR update. Pathless