tempo-sdk 0.0.45 → 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.
Files changed (38) hide show
  1. package/dist/assets/editor.d.ts +1 -1
  2. package/dist/assets/editor.js +4 -2
  3. package/dist/assets/editor.js.map +1 -1
  4. package/dist/assets/index.d.ts +112 -24
  5. package/dist/assets/index.js +309 -1
  6. package/dist/assets/index.js.map +1 -1
  7. package/dist/assets/parser.d.ts +14 -3
  8. package/dist/assets/parser.js +7 -3
  9. package/dist/canvas/index.d.ts +1 -1
  10. package/dist/canvas/index.js +3 -2
  11. package/dist/canvas/index.js.map +1 -1
  12. package/dist/canvas/interact-projection.js +2 -1
  13. package/dist/canvas/svelte.d.ts +1 -1
  14. package/dist/canvas/svelte.js +1 -1
  15. package/dist/chunk-DI2ZFAWL.js +14 -0
  16. package/dist/chunk-DI2ZFAWL.js.map +1 -0
  17. package/dist/chunk-DX6XAXCK.js +827 -0
  18. package/dist/chunk-DX6XAXCK.js.map +1 -0
  19. package/dist/{chunk-7AJVPFFG.js → chunk-LFYKJJC5.js} +3 -3
  20. package/dist/{chunk-7AJVPFFG.js.map → chunk-LFYKJJC5.js.map} +1 -1
  21. package/dist/{chunk-IWULHYPW.js → chunk-O65OD3NA.js} +216 -19
  22. package/dist/chunk-O65OD3NA.js.map +1 -0
  23. package/dist/{chunk-7O6DPEMF.js → chunk-PULSTDX2.js} +9 -3
  24. package/dist/chunk-PULSTDX2.js.map +1 -0
  25. package/dist/{chunk-FIIU52RN.js → chunk-ZZYNOX24.js} +22 -810
  26. package/dist/chunk-ZZYNOX24.js.map +1 -0
  27. package/dist/index.js +86 -13
  28. package/dist/index.js.map +1 -1
  29. package/dist/nextjs/plugin.js +1 -1
  30. package/dist/nextjs.cjs +2 -2
  31. package/dist/nextjs.cjs.map +1 -1
  32. package/dist/nextjs.js +1 -1
  33. package/dist/{storyboard-xVaRTJAu.d.ts → storyboard-CBHki7Aw.d.ts} +2 -1
  34. package/dist/{types-B-dRoF2T.d.ts → types-C7cvcY6T.d.ts} +5 -1
  35. package/package.json +2 -2
  36. package/dist/chunk-7O6DPEMF.js.map +0 -1
  37. package/dist/chunk-FIIU52RN.js.map +0 -1
  38. package/dist/chunk-IWULHYPW.js.map +0 -1
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  installTempoInteractProjectionSource
3
- } from "../chunk-FIIU52RN.js";
3
+ } from "../chunk-ZZYNOX24.js";
4
4
  import "../chunk-65B52AR7.js";
5
5
  import "../chunk-57KAYXHF.js";
6
+ import "../chunk-DX6XAXCK.js";
6
7
  export {
7
8
  installTempoInteractProjectionSource
8
9
  };
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as StoryboardLayout } from '../storyboard-xVaRTJAu.js';
2
+ import { a as StoryboardLayout } from '../storyboard-CBHki7Aw.js';
3
3
  import 'react';
4
4
  import '../page-xi1aI5a7.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StoryboardSlot
3
- } from "../chunk-7O6DPEMF.js";
3
+ } from "../chunk-PULSTDX2.js";
4
4
  import "../chunk-57KAYXHF.js";
5
5
 
6
6
  // canvas/svelte.tsx
@@ -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":[]}