tempo-sdk 0.0.99 → 0.0.102

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 (170) hide show
  1. package/README.md +3 -403
  2. package/dist/assets/editor.d.ts +43 -65
  3. package/dist/assets/editor.js +1 -573
  4. package/dist/assets/index.d.ts +11 -61
  5. package/dist/assets/index.js +1 -338
  6. package/dist/assets/parser.d.ts +68 -78
  7. package/dist/assets/parser.js +1 -33
  8. package/dist/astro/asset-preview-client.d.ts +3 -2
  9. package/dist/astro/asset-preview-client.js +1 -93
  10. package/dist/astro/controls.d.ts +1 -3
  11. package/dist/astro/controls.js +1 -7
  12. package/dist/astro/document-client.d.ts +5 -6
  13. package/dist/astro/document-client.js +1 -78
  14. package/dist/astro/runtime.d.ts +23 -11
  15. package/dist/astro/runtime.js +1 -86
  16. package/dist/astro.d.ts +19 -13
  17. package/dist/astro.js +1 -818
  18. package/dist/canvas/astro-contract.d.ts +0 -3
  19. package/dist/canvas/astro-contract.js +1 -9
  20. package/dist/canvas/astro.d.ts +3 -4
  21. package/dist/canvas/astro.js +1 -42
  22. package/dist/canvas/editor.d.ts +187 -183
  23. package/dist/canvas/editor.js +1 -1094
  24. package/dist/canvas/flutter-preview.d.ts +0 -1
  25. package/dist/canvas/flutter-preview.js +1 -9
  26. package/dist/canvas/index.d.ts +46 -100
  27. package/dist/canvas/index.js +1 -3926
  28. package/dist/canvas/interact-projection.d.ts +7 -5
  29. package/dist/canvas/interact-projection.js +1 -12
  30. package/dist/canvas/parser.d.ts +10 -303
  31. package/dist/canvas/parser.js +1 -30
  32. package/dist/canvas/svelte.d.ts +6 -7
  33. package/dist/canvas/svelte.js +1 -91
  34. package/dist/canvas/vue.d.ts +9 -49
  35. package/dist/canvas/vue.js +1 -264
  36. package/dist/chunk-CXCUJCXD.js +1 -0
  37. package/dist/chunk-FH6TMWFA.js +1 -0
  38. package/dist/chunk-FL7FSJSL.js +1 -0
  39. package/dist/chunk-GQIOB5SV.js +1 -0
  40. package/dist/chunk-HBQ7FFH7.js +1 -0
  41. package/dist/chunk-JRJOWLCN.js +1 -0
  42. package/dist/chunk-LJCBFTMP.js +1 -0
  43. package/dist/chunk-M3GN2KUH.js +1 -0
  44. package/dist/chunk-MPIHFFML.js +1 -0
  45. package/dist/chunk-T5TY3U2H.js +1 -0
  46. package/dist/chunk-XO2BSHWM.js +1 -0
  47. package/dist/chunk-XUSV3KOD.js +1 -0
  48. package/dist/chunk-ZXBMP6RV.js +1 -0
  49. package/dist/{controls-uCaQ3CNX.d.ts → controls-DKslABtM.d.ts} +0 -3
  50. package/dist/expo/plugin.cjs +1 -1928
  51. package/dist/expo/plugin.js +1 -8
  52. package/dist/expo-babel-plugin.cjs +1 -1928
  53. package/dist/expo-babel-plugin.d.cts +46 -40
  54. package/dist/expo-babel-plugin.d.ts +46 -40
  55. package/dist/expo-babel-plugin.js +1 -8
  56. package/dist/flutter-preview-path.d.ts +23 -7
  57. package/dist/flutter-preview-path.js +1 -16
  58. package/dist/index.d.ts +33 -45
  59. package/dist/index.js +1 -20
  60. package/dist/nextjs/plugin.cjs +1 -413
  61. package/dist/nextjs/plugin.js +1 -7
  62. package/dist/nextjs-loader.cjs +1 -2277
  63. package/dist/nextjs.cjs +1 -484
  64. package/dist/nextjs.d.cts +2 -58
  65. package/dist/nextjs.d.ts +2 -58
  66. package/dist/nextjs.js +1 -17
  67. package/dist/nuxt/runtime/identity.d.ts +2 -4
  68. package/dist/nuxt/runtime/identity.js +1 -18
  69. package/dist/nuxt.d.ts +31 -92
  70. package/dist/nuxt.js +1 -5854
  71. package/dist/{page-DwLnOM5d.d.ts → page-Bc8PekIX.d.ts} +1 -5
  72. package/dist/parser.d-MO5ciJ5n.d.ts +236 -0
  73. package/dist/{storyboard-CMJVBSXn.d.ts → storyboard.contract.d-UQ4MUYN5.d.ts} +3 -25
  74. package/dist/svelte.d.ts +8 -18
  75. package/dist/svelte.js +1 -917
  76. package/dist/types-CfUgM2w4.d.ts +57 -0
  77. package/dist/v1-client-compat-n0E0XxuX.d.ts +5 -0
  78. package/dist/vue.d.ts +17 -58
  79. package/dist/vue.js +1 -1501
  80. package/package.json +12 -62
  81. package/dist/assets/editor.js.map +0 -1
  82. package/dist/assets/index.js.map +0 -1
  83. package/dist/assets/parser.js.map +0 -1
  84. package/dist/astro/asset-preview-client.js.map +0 -1
  85. package/dist/astro/controls.js.map +0 -1
  86. package/dist/astro/document-client.js.map +0 -1
  87. package/dist/astro/runtime.js.map +0 -1
  88. package/dist/astro.js.map +0 -1
  89. package/dist/canvas/astro-contract.js.map +0 -1
  90. package/dist/canvas/astro.js.map +0 -1
  91. package/dist/canvas/editor.js.map +0 -1
  92. package/dist/canvas/flutter-preview.js.map +0 -1
  93. package/dist/canvas/index.js.map +0 -1
  94. package/dist/canvas/interact-projection.js.map +0 -1
  95. package/dist/canvas/parser.js.map +0 -1
  96. package/dist/canvas/svelte.js.map +0 -1
  97. package/dist/canvas/vue.js.map +0 -1
  98. package/dist/chunk-27WT3XUG.js +0 -455
  99. package/dist/chunk-27WT3XUG.js.map +0 -1
  100. package/dist/chunk-5HIIF354.js +0 -67
  101. package/dist/chunk-5HIIF354.js.map +0 -1
  102. package/dist/chunk-65B52AR7.js +0 -11
  103. package/dist/chunk-65B52AR7.js.map +0 -1
  104. package/dist/chunk-6HYKKP5N.js +0 -2658
  105. package/dist/chunk-6HYKKP5N.js.map +0 -1
  106. package/dist/chunk-6SOP4XU6.js +0 -1891
  107. package/dist/chunk-6SOP4XU6.js.map +0 -1
  108. package/dist/chunk-AFXE462X.js +0 -1253
  109. package/dist/chunk-AFXE462X.js.map +0 -1
  110. package/dist/chunk-BQPKOVI5.js +0 -115
  111. package/dist/chunk-BQPKOVI5.js.map +0 -1
  112. package/dist/chunk-CYDF4LYJ.js +0 -342
  113. package/dist/chunk-CYDF4LYJ.js.map +0 -1
  114. package/dist/chunk-CYQE3TLC.js +0 -37
  115. package/dist/chunk-CYQE3TLC.js.map +0 -1
  116. package/dist/chunk-DI2ZFAWL.js +0 -14
  117. package/dist/chunk-DI2ZFAWL.js.map +0 -1
  118. package/dist/chunk-EGRHWZRV.js +0 -1
  119. package/dist/chunk-EGRHWZRV.js.map +0 -1
  120. package/dist/chunk-FGWGY3G3.js +0 -157
  121. package/dist/chunk-FGWGY3G3.js.map +0 -1
  122. package/dist/chunk-HOBTDB6G.js +0 -112
  123. package/dist/chunk-HOBTDB6G.js.map +0 -1
  124. package/dist/chunk-I7VF4ZOV.js +0 -630
  125. package/dist/chunk-I7VF4ZOV.js.map +0 -1
  126. package/dist/chunk-JVVHU3A7.js +0 -1077
  127. package/dist/chunk-JVVHU3A7.js.map +0 -1
  128. package/dist/chunk-MIXQVPDH.js +0 -8606
  129. package/dist/chunk-MIXQVPDH.js.map +0 -1
  130. package/dist/chunk-MU7S7NU7.js +0 -183
  131. package/dist/chunk-MU7S7NU7.js.map +0 -1
  132. package/dist/chunk-OX2YKYSL.js +0 -13
  133. package/dist/chunk-OX2YKYSL.js.map +0 -1
  134. package/dist/chunk-PYAJHLXO.js +0 -903
  135. package/dist/chunk-PYAJHLXO.js.map +0 -1
  136. package/dist/chunk-SGN7BDRE.js +0 -16
  137. package/dist/chunk-SGN7BDRE.js.map +0 -1
  138. package/dist/chunk-SGTGDLOX.js +0 -285
  139. package/dist/chunk-SGTGDLOX.js.map +0 -1
  140. package/dist/chunk-T364NBR3.js +0 -1440
  141. package/dist/chunk-T364NBR3.js.map +0 -1
  142. package/dist/chunk-U66QI3EN.js +0 -1524
  143. package/dist/chunk-U66QI3EN.js.map +0 -1
  144. package/dist/chunk-WTXOWQ7N.js +0 -47
  145. package/dist/chunk-WTXOWQ7N.js.map +0 -1
  146. package/dist/chunk-X5DJKVBT.js +0 -1308
  147. package/dist/chunk-X5DJKVBT.js.map +0 -1
  148. package/dist/chunk-ZT7HJ6YU.js +0 -38
  149. package/dist/chunk-ZT7HJ6YU.js.map +0 -1
  150. package/dist/chunk-ZW26VZHX.js +0 -3169
  151. package/dist/chunk-ZW26VZHX.js.map +0 -1
  152. package/dist/controls-reader-5MFHYBZZ.js +0 -192
  153. package/dist/controls-reader-5MFHYBZZ.js.map +0 -1
  154. package/dist/expo/plugin.cjs.map +0 -1
  155. package/dist/expo/plugin.js.map +0 -1
  156. package/dist/expo-babel-plugin.cjs.map +0 -1
  157. package/dist/expo-babel-plugin.js.map +0 -1
  158. package/dist/flutter-preview-path.js.map +0 -1
  159. package/dist/index.js.map +0 -1
  160. package/dist/nextjs/plugin.cjs.map +0 -1
  161. package/dist/nextjs/plugin.js.map +0 -1
  162. package/dist/nextjs-loader.cjs.map +0 -1
  163. package/dist/nextjs.cjs.map +0 -1
  164. package/dist/nextjs.js.map +0 -1
  165. package/dist/nuxt/runtime/identity.js.map +0 -1
  166. package/dist/nuxt.js.map +0 -1
  167. package/dist/svelte.js.map +0 -1
  168. package/dist/types-C8OIU-kc.d.ts +0 -106
  169. package/dist/v1-client-compat-qxaXEDm_.d.ts +0 -23
  170. package/dist/vue.js.map +0 -1
@@ -0,0 +1,57 @@
1
+ type AssetSourceSpan = {
2
+ start: number;
3
+ end: number;
4
+ };
5
+ type AssetParseErrorCode = "misimported_define_asset" | "non_identifier_component" | "unknown_binding" | "imported_binding" | "non_top_level_binding" | "config_not_object_literal" | "invalid_call_arguments" | "duplicate_declaration" | "non_top_level_call" | "unparseable_source" | "invalid_control" | "invalid_variant_config" | "component_declaration_outside_canvas" | "duplicate_asset_declaration" | "missing_canvas_pointer" | "stale_canvas_pointer" | "canvas_pointer_unverified" | "redundant_canvas_declaration" | "non_literal_library" | "empty_library_name" | "duplicate_library" | "empty_variants" | "variants_on_canvas" | "unresolved_prop_value" | "not_exported";
6
+ type AssetParseError = {
7
+ code: AssetParseErrorCode;
8
+ message: string;
9
+ severity: "structural" | "degraded" | "info";
10
+ span?: AssetSourceSpan;
11
+ };
12
+ type UnresolvedValue = {
13
+ $unresolved: true;
14
+ };
15
+ declare const UNRESOLVED_VALUE: UnresolvedValue;
16
+ declare function isUnresolvedValue(value: unknown): value is UnresolvedValue;
17
+ type StaticValue = string | number | boolean | null | UnresolvedValue | StaticValue[] | {
18
+ [key: string]: StaticValue;
19
+ };
20
+ type ParsedAssetVariant = {
21
+ name: string;
22
+ render?: {
23
+ jsx: StaticValue;
24
+ };
25
+ props: Record<string, StaticValue>;
26
+ hasUnresolvedValues: boolean;
27
+ };
28
+ type AssetExportKind = "named" | "default" | "none";
29
+ type AssetSpans = {
30
+ call: AssetSourceSpan;
31
+ config: AssetSourceSpan;
32
+ libraries?: AssetSourceSpan;
33
+ librariesProperty?: AssetSourceSpan;
34
+ libraryItems: AssetSourceSpan[];
35
+ };
36
+ type ParsedAssetReference = {
37
+ importSpecifier: string;
38
+ importedName: string;
39
+ };
40
+ type ParsedAssetDeclaration = {
41
+ bindingName: string;
42
+ exportKind: AssetExportKind;
43
+ libraries: string[];
44
+ usageInstructions?: string;
45
+ variants: ParsedAssetVariant[];
46
+ reference?: ParsedAssetReference;
47
+ spans: AssetSpans;
48
+ warnings: AssetParseError[];
49
+ };
50
+ type ParsedAssetFile = {
51
+ filePath: string;
52
+ declarations: ParsedAssetDeclaration[];
53
+ errors: AssetParseError[];
54
+ };
55
+ type AssetEditFailureCode = "asset_not_found" | "config_not_editable" | "export_not_found" | "already_defined" | "not_definable";
56
+
57
+ export { type AssetEditFailureCode as A, type ParsedAssetReference as P, type StaticValue as S, UNRESOLVED_VALUE as U, type AssetSourceSpan as a, type AssetExportKind as b, type AssetParseError as c, type ParsedAssetFile as d, type AssetParseErrorCode as e, type AssetSpans as f, type ParsedAssetDeclaration as g, type ParsedAssetVariant as h, type UnresolvedValue as i, isUnresolvedValue as j };
@@ -0,0 +1,5 @@
1
+ type V1LayoutCompat = {
2
+ intrinsicSizing?: "root-element";
3
+ };
4
+
5
+ export type { V1LayoutCompat as V };
package/dist/vue.d.ts CHANGED
@@ -1,66 +1,25 @@
1
1
  import { PluginOption, Plugin } from 'vite';
2
2
 
3
- /**
4
- * Vue-specific Tempo source annotation.
5
- *
6
- * Put `tempoVuePlugin()` before `vue()` in the Vite plugins. It only supplies
7
- * filesystem/project identity and the Vite hook order; parsing and
8
- * annotation remain isolated in the framework-focused @modules/vue-editor
9
- * package. `tempoVueAppPlugins()` brings the app's own Vite plugins into
10
- * Tempo's Vue canvas host.
11
- */
12
-
13
3
  interface TempoVuePluginOptions {
14
- /** Annotation identity root. Defaults to the process working directory. */
15
- root?: string;
16
- /** Allowed source boundary. Defaults to the package-manager workspace
17
- * around `root`, else `root` (see defaultSourceRoot); host sidecars set
18
- * this to the project root while annotations remain relative to the host
19
- * root. */
20
- sourceRoot?: string;
21
- /** Override the normal TEMPO environment gate, primarily for tests. */
22
- enabled?: boolean;
23
- /** Directories whose `.vue` files are never annotated or registered, even
24
- * inside the source boundary. The Nuxt sidecar lists its own root here:
25
- * its `app.vue` and host page are canvas plumbing, not authored UI. */
26
- exclude?: string[];
4
+ root?: string;
5
+ sourceRoot?: string;
6
+ enabled?: boolean;
7
+ exclude?: string[];
27
8
  }
28
- /**
29
- * Two Vite plugins around @vitejs/plugin-vue:
30
- * - `pre` stamps the authored template (native elements get the four
31
- * `data-tempo-*` stamps, component invocations a vnode-hook marker) at
32
- * exact UTF-16 offsets of the raw file. It never touches `<script>`, so
33
- * plugin-vue's template-only HMR (`rerender`) keeps working. Its transform
34
- * is `order: "pre"`, which Vite runs ahead of every unordered transform, so
35
- * only a plugin listed earlier that is also `order: "pre"` can rewrite a
36
- * file before it (vue-router's `definePage`, vue-macros and markdown
37
- * plugins are `enforce: "pre"` with unordered transforms).
38
- * - `post` ends plugin-vue's compiled main module with the file's source
39
- * registry record and module version record, so both run once per module
40
- * evaluation (a `<script setup>` statement would run per instance).
41
- */
42
- declare function tempoVuePlugin(options?: TempoVuePluginOptions): Plugin[];
9
+ declare function tempoVuePlugin$1(
10
+ options?: TempoVuePluginOptions,
11
+ ): Plugin[];
43
12
  interface TempoVueAppPluginsOptions {
44
- /** The canvas host's Vite root (`tempo/`). */
45
- root: string;
46
- /** The folder holding the app's own vite.config. */
47
- appRoot: string;
48
- /** The host's `@vitejs/plugin-vue` factory, called only when the app's
49
- * config has no plugin-vue of its own or cannot load. */
50
- vue: () => PluginOption;
51
- /** App plugin names (or name prefixes) the host leaves out, for a plugin
52
- * the host config adds its own copy of after this call. */
53
- exclude?: string[];
13
+ root: string;
14
+ appRoot: string;
15
+ vue: () => PluginOption;
16
+ exclude?: string[];
54
17
  }
55
- /**
56
- * The app's own Vite plugins for Tempo's Vue canvas host, taken from the
57
- * app's vite.config: auto-imports, auto-registered components, macros, the
58
- * typed router, i18n, UnoCSS. The app's `@vitejs/plugin-vue` compiles its
59
- * components with the options and position the app gave it; `vue` builds the
60
- * host's own only when the app has none. List it after `...tempoVuePlugin()`,
61
- * which must stamp each `.vue` file before any app plugin rewrites it. Never
62
- * rejects: a config that cannot load leaves the host's `vue()` and a warning.
63
- */
64
- declare function tempoVueAppPlugins(options: TempoVueAppPluginsOptions): Promise<PluginOption[]>;
18
+ declare function tempoVueAppPlugins$1(
19
+ options: TempoVueAppPluginsOptions,
20
+ ): Promise<PluginOption[]>;
21
+
22
+ declare const tempoVuePlugin: typeof tempoVuePlugin$1;
23
+ declare const tempoVueAppPlugins: typeof tempoVueAppPlugins$1;
65
24
 
66
25
  export { type TempoVueAppPluginsOptions, type TempoVuePluginOptions, tempoVueAppPlugins, tempoVuePlugin };