tempo-sdk 0.0.44 → 0.0.51
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/dist/assets/editor.d.ts +1 -1
- package/dist/assets/editor.js +4 -2
- package/dist/assets/editor.js.map +1 -1
- package/dist/assets/index.d.ts +112 -24
- package/dist/assets/index.js +309 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/parser.d.ts +14 -3
- package/dist/assets/parser.js +7 -3
- package/dist/canvas/index.d.ts +1 -1
- package/dist/canvas/index.js +21 -12
- package/dist/canvas/index.js.map +1 -1
- package/dist/canvas/interact-projection.js +3 -2
- package/dist/canvas/svelte.d.ts +1 -1
- package/dist/canvas/svelte.js +2 -2
- package/dist/{chunk-ZT2REPH4.js → chunk-57KAYXHF.js} +1 -1
- package/dist/chunk-57KAYXHF.js.map +1 -0
- package/dist/chunk-DI2ZFAWL.js +14 -0
- package/dist/chunk-DI2ZFAWL.js.map +1 -0
- package/dist/chunk-DX6XAXCK.js +827 -0
- package/dist/chunk-DX6XAXCK.js.map +1 -0
- package/dist/chunk-K3EYTZLL.js +45 -0
- package/dist/chunk-K3EYTZLL.js.map +1 -0
- package/dist/{chunk-MUW75SOS.js → chunk-LFYKJJC5.js} +3 -3
- package/dist/{chunk-MUW75SOS.js.map → chunk-LFYKJJC5.js.map} +1 -1
- package/dist/{chunk-IWULHYPW.js → chunk-O65OD3NA.js} +216 -19
- package/dist/chunk-O65OD3NA.js.map +1 -0
- package/dist/{chunk-KQHC77IF.js → chunk-PULSTDX2.js} +17 -5
- package/dist/chunk-PULSTDX2.js.map +1 -0
- package/dist/{chunk-U52RN7MP.js → chunk-ZZYNOX24.js} +23 -811
- package/dist/chunk-ZZYNOX24.js.map +1 -0
- package/dist/index.js +195 -19
- package/dist/index.js.map +1 -1
- package/dist/nextjs/plugin.js +1 -1
- package/dist/nextjs.cjs +2 -2
- package/dist/nextjs.cjs.map +1 -1
- package/dist/nextjs.js +1 -1
- package/dist/{storyboard-xVaRTJAu.d.ts → storyboard-CBHki7Aw.d.ts} +2 -1
- package/dist/{types-B-dRoF2T.d.ts → types-C7cvcY6T.d.ts} +5 -1
- package/package.json +2 -2
- package/dist/chunk-IWULHYPW.js.map +0 -1
- package/dist/chunk-KQHC77IF.js.map +0 -1
- package/dist/chunk-U52RN7MP.js.map +0 -1
- package/dist/chunk-ZT2REPH4.js.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
installTempoInteractProjectionSource
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ZZYNOX24.js";
|
|
4
4
|
import "../chunk-65B52AR7.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-57KAYXHF.js";
|
|
6
|
+
import "../chunk-DX6XAXCK.js";
|
|
6
7
|
export {
|
|
7
8
|
installTempoInteractProjectionSource
|
|
8
9
|
};
|
package/dist/canvas/svelte.d.ts
CHANGED
package/dist/canvas/svelte.js
CHANGED
|
@@ -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 admission or Suspense boundary renders a single hidden marker\n * element while waiting instead of `null`. That turns \"this subtree is briefly\n * empty because content is loading\" — which is indistinguishable from \"this\n * subtree is now 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-owned 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":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// assets/types.ts
|
|
2
|
+
var UNRESOLVED_VALUE = Object.freeze({
|
|
3
|
+
$unresolved: true
|
|
4
|
+
});
|
|
5
|
+
function isUnresolvedValue(value) {
|
|
6
|
+
return typeof value === "object" && value !== null && $unresolvedKey in value && value.$unresolved === true;
|
|
7
|
+
}
|
|
8
|
+
var $unresolvedKey = "$unresolved";
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
UNRESOLVED_VALUE,
|
|
12
|
+
isUnresolvedValue
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk-DI2ZFAWL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../assets/types.ts"],"sourcesContent":["/**\n * Shared data-model types for the asset system's static pipeline: the parser\n * (`tempo-sdk/assets/parser`), the source editor (`tempo-sdk/assets/editor`),\n * and downstream consumers (`@tempo-modules/asset-libraries` index + MCP\n * tools). Everything here must stay JSON-serializable — parse results cross\n * IPC and MCP boundaries verbatim.\n *\n * See specs/asset-libraries.md §3 for the full parsing contract.\n */\n\nexport type AssetSourceSpan = { start: number; end: number };\n\n/** Stable machine-readable identifiers for every parse/edit problem. */\nexport type AssetParseErrorCode =\n // structural — the declaration's identity cannot be trusted; excluded from the index\n | \"misimported_define_asset\"\n | \"non_identifier_component\"\n | \"unknown_binding\"\n | \"imported_binding\"\n | \"non_top_level_binding\"\n | \"config_not_object_literal\"\n | \"invalid_call_arguments\"\n | \"duplicate_declaration\"\n | \"non_top_level_call\"\n | \"unparseable_source\"\n | \"invalid_control\"\n | \"invalid_variant_config\"\n // structural — emitted by the workspace index builder (@tempo-modules/\n // asset-libraries), never by the per-file parser: these need workspace\n // context (canvas-dir location, cross-file identity) the parser lacks\n | \"component_declaration_outside_canvas\"\n | \"duplicate_asset_declaration\"\n // degraded/info — canvas-pointer docstring validation, emitted by the\n // workspace index builder for canvas-declared components: the component's\n // defining file must carry a comment naming the declaring canvas's path\n | \"missing_canvas_pointer\"\n | \"stale_canvas_pointer\"\n | \"canvas_pointer_unverified\"\n // degraded — emitted by the workspace index builder: a canvas self-\n // registration is redundant when files in the same canvas folder also\n // declare component references (those already link the canvas via\n // canvasPath — self-registration is strictly for component-less\n // foundations pages)\n | \"redundant_canvas_declaration\"\n // degraded — the declaration is indexed; the issue is carried as a warning\n | \"non_literal_library\"\n | \"empty_library_name\"\n | \"duplicate_library\"\n | \"empty_variants\"\n | \"variants_on_canvas\"\n | \"unresolved_prop_value\"\n | \"not_exported\";\n\nexport type AssetParseError = {\n code: AssetParseErrorCode;\n message: string;\n /** \"structural\": the declaration is excluded from the index — readers must\n * fail closed. \"degraded\": the declaration is indexed; this is a warning\n * carried on the entry. \"info\": advisory note carried on the entry —\n * best-effort validation that could not run to a verdict; never a\n * failure. Mirrors CanvasParseError's severity split. */\n severity: \"structural\" | \"degraded\" | \"info\";\n span?: AssetSourceSpan;\n};\n\n/**\n * A config value the parser could not resolve statically (identifier\n * reference, call result, JSX, spread, …). The `$unresolved` shape is the\n * wire format everywhere (index, IPC, MCP) — no translation layers.\n * A user literally writing `{ $unresolved: true }` as a prop value is\n * indistinguishable from this marker; that collision is accepted.\n */\nexport type UnresolvedValue = { $unresolved: true };\n\nexport const UNRESOLVED_VALUE: UnresolvedValue = Object.freeze({\n $unresolved: true,\n});\n\nexport function isUnresolvedValue(value: unknown): value is UnresolvedValue {\n return (\n typeof value === \"object\" &&\n value !== null &&\n $unresolvedKey in value &&\n (value as UnresolvedValue).$unresolved === true\n );\n}\n\nconst $unresolvedKey = \"$unresolved\" satisfies keyof UnresolvedValue;\n\n/** Statically-readable config value: JSON literals plus the UNRESOLVED marker. */\nexport type StaticValue =\n | string\n | number\n | boolean\n | null\n | UnresolvedValue\n | StaticValue[]\n | { [key: string]: StaticValue };\n\nexport type ParsedAssetVariant = {\n name: string;\n /** Statically validated JSX template. Never evaluated as a function during insertion. */\n render?: { jsx: StaticValue };\n /** One dynamic value does not discard the variant — it parses to UNRESOLVED. */\n props: Record<string, StaticValue>;\n hasUnresolvedValues: boolean;\n};\n\nexport type AssetExportKind = \"named\" | \"default\" | \"none\";\n\n/** Source spans that power the surgical editor (specs/asset-libraries.md §4). */\nexport type AssetSpans = {\n /** The whole `defineAsset(...)` expression statement, semicolon included. */\n call: AssetSourceSpan;\n /** The config ObjectExpression (second argument). */\n config: AssetSourceSpan;\n /** The `libraries` array expression, only when the value is an array\n * literal. A `librariesProperty` without `libraries` means the property\n * exists but its value is dynamic — the editor must refuse to touch it. */\n libraries?: AssetSourceSpan;\n /** The whole `libraries: <value>` property, whenever the key is present.\n * Lets the editor remove the property outright when its array empties. */\n librariesProperty?: AssetSourceSpan;\n /** One span per statically-known `libraries` entry, in source order,\n * index-aligned with ParsedAssetDeclaration.libraries. */\n libraryItems: AssetSourceSpan[];\n};\n\n/** Reference-declaration target: defineAsset's first argument is an imported\n * binding, and the asset's identity is the import itself. Purely syntactic —\n * the parser records the import statement's module specifier plus the name\n * imported from it (\"default\" for default imports); resolution to a\n * workspace identity happens in @tempo-modules/asset-libraries. */\nexport type ParsedAssetReference = {\n importSpecifier: string;\n importedName: string;\n};\n\nexport type ParsedAssetDeclaration = {\n /** The identifier passed as defineAsset's first argument. */\n bindingName: string;\n exportKind: AssetExportKind;\n /** Deduplicated, statically-known entries only. */\n libraries: string[];\n /** What this asset is and when to reach for it (and when not). */\n usageInstructions?: string;\n variants: ParsedAssetVariant[];\n /** Present iff the declaration targets an imported binding. */\n reference?: ParsedAssetReference;\n spans: AssetSpans;\n /** Degraded-severity notes scoped to this declaration. */\n warnings: AssetParseError[];\n};\n\nexport type ParsedAssetFile = {\n filePath: string;\n /** Declarations whose identity parsed cleanly (may carry warnings). */\n declarations: ParsedAssetDeclaration[];\n /** Structural errors: file-level problems and rejected declarations. */\n errors: AssetParseError[];\n};\n\n/** Typed failures shared by the editor operations (§4.1) and the MCP write\n * tools that surface them (§7.3). */\nexport type AssetEditFailureCode =\n | \"asset_not_found\"\n | \"config_not_editable\"\n | \"export_not_found\"\n | \"already_defined\"\n | \"not_definable\";\n"],"mappings":";AA0EO,IAAM,mBAAoC,OAAO,OAAO;AAAA,EAC7D,aAAa;AACf,CAAC;AAEM,SAAS,kBAAkB,OAA0C;AAC1E,SACE,OAAO,UAAU,YACjB,UAAU,QACV,kBAAkB,SACjB,MAA0B,gBAAgB;AAE/C;AAEA,IAAM,iBAAiB;","names":[]}
|