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.
- package/README.md +3 -403
- package/dist/assets/editor.d.ts +43 -65
- package/dist/assets/editor.js +1 -573
- package/dist/assets/index.d.ts +11 -61
- package/dist/assets/index.js +1 -338
- package/dist/assets/parser.d.ts +68 -78
- package/dist/assets/parser.js +1 -33
- package/dist/astro/asset-preview-client.d.ts +3 -2
- package/dist/astro/asset-preview-client.js +1 -93
- package/dist/astro/controls.d.ts +1 -3
- package/dist/astro/controls.js +1 -7
- package/dist/astro/document-client.d.ts +5 -6
- package/dist/astro/document-client.js +1 -78
- package/dist/astro/runtime.d.ts +23 -11
- package/dist/astro/runtime.js +1 -86
- package/dist/astro.d.ts +19 -13
- package/dist/astro.js +1 -818
- package/dist/canvas/astro-contract.d.ts +0 -3
- package/dist/canvas/astro-contract.js +1 -9
- package/dist/canvas/astro.d.ts +3 -4
- package/dist/canvas/astro.js +1 -42
- package/dist/canvas/editor.d.ts +187 -183
- package/dist/canvas/editor.js +1 -1094
- package/dist/canvas/flutter-preview.d.ts +0 -1
- package/dist/canvas/flutter-preview.js +1 -9
- package/dist/canvas/index.d.ts +46 -100
- package/dist/canvas/index.js +1 -3926
- package/dist/canvas/interact-projection.d.ts +7 -5
- package/dist/canvas/interact-projection.js +1 -12
- package/dist/canvas/parser.d.ts +10 -303
- package/dist/canvas/parser.js +1 -30
- package/dist/canvas/svelte.d.ts +6 -7
- package/dist/canvas/svelte.js +1 -91
- package/dist/canvas/vue.d.ts +9 -49
- package/dist/canvas/vue.js +1 -264
- package/dist/chunk-CXCUJCXD.js +1 -0
- package/dist/chunk-FH6TMWFA.js +1 -0
- package/dist/chunk-FL7FSJSL.js +1 -0
- package/dist/chunk-GQIOB5SV.js +1 -0
- package/dist/chunk-HBQ7FFH7.js +1 -0
- package/dist/chunk-JRJOWLCN.js +1 -0
- package/dist/chunk-LJCBFTMP.js +1 -0
- package/dist/chunk-M3GN2KUH.js +1 -0
- package/dist/chunk-MPIHFFML.js +1 -0
- package/dist/chunk-T5TY3U2H.js +1 -0
- package/dist/chunk-XO2BSHWM.js +1 -0
- package/dist/chunk-XUSV3KOD.js +1 -0
- package/dist/chunk-ZXBMP6RV.js +1 -0
- package/dist/{controls-uCaQ3CNX.d.ts → controls-DKslABtM.d.ts} +0 -3
- package/dist/expo/plugin.cjs +1 -1928
- package/dist/expo/plugin.js +1 -8
- package/dist/expo-babel-plugin.cjs +1 -1928
- package/dist/expo-babel-plugin.d.cts +46 -40
- package/dist/expo-babel-plugin.d.ts +46 -40
- package/dist/expo-babel-plugin.js +1 -8
- package/dist/flutter-preview-path.d.ts +23 -7
- package/dist/flutter-preview-path.js +1 -16
- package/dist/index.d.ts +33 -45
- package/dist/index.js +1 -20
- package/dist/nextjs/plugin.cjs +1 -413
- package/dist/nextjs/plugin.js +1 -7
- package/dist/nextjs-loader.cjs +1 -2277
- package/dist/nextjs.cjs +1 -484
- package/dist/nextjs.d.cts +2 -58
- package/dist/nextjs.d.ts +2 -58
- package/dist/nextjs.js +1 -17
- package/dist/nuxt/runtime/identity.d.ts +2 -4
- package/dist/nuxt/runtime/identity.js +1 -18
- package/dist/nuxt.d.ts +31 -92
- package/dist/nuxt.js +1 -5854
- package/dist/{page-DwLnOM5d.d.ts → page-Bc8PekIX.d.ts} +1 -5
- package/dist/parser.d-MO5ciJ5n.d.ts +236 -0
- package/dist/{storyboard-CMJVBSXn.d.ts → storyboard.contract.d-UQ4MUYN5.d.ts} +3 -25
- package/dist/svelte.d.ts +8 -18
- package/dist/svelte.js +1 -917
- package/dist/types-CfUgM2w4.d.ts +57 -0
- package/dist/v1-client-compat-n0E0XxuX.d.ts +5 -0
- package/dist/vue.d.ts +17 -58
- package/dist/vue.js +1 -1501
- package/package.json +12 -62
- package/dist/assets/editor.js.map +0 -1
- package/dist/assets/index.js.map +0 -1
- package/dist/assets/parser.js.map +0 -1
- package/dist/astro/asset-preview-client.js.map +0 -1
- package/dist/astro/controls.js.map +0 -1
- package/dist/astro/document-client.js.map +0 -1
- package/dist/astro/runtime.js.map +0 -1
- package/dist/astro.js.map +0 -1
- package/dist/canvas/astro-contract.js.map +0 -1
- package/dist/canvas/astro.js.map +0 -1
- package/dist/canvas/editor.js.map +0 -1
- package/dist/canvas/flutter-preview.js.map +0 -1
- package/dist/canvas/index.js.map +0 -1
- package/dist/canvas/interact-projection.js.map +0 -1
- package/dist/canvas/parser.js.map +0 -1
- package/dist/canvas/svelte.js.map +0 -1
- package/dist/canvas/vue.js.map +0 -1
- package/dist/chunk-27WT3XUG.js +0 -455
- package/dist/chunk-27WT3XUG.js.map +0 -1
- package/dist/chunk-5HIIF354.js +0 -67
- package/dist/chunk-5HIIF354.js.map +0 -1
- package/dist/chunk-65B52AR7.js +0 -11
- package/dist/chunk-65B52AR7.js.map +0 -1
- package/dist/chunk-6HYKKP5N.js +0 -2658
- package/dist/chunk-6HYKKP5N.js.map +0 -1
- package/dist/chunk-6SOP4XU6.js +0 -1891
- package/dist/chunk-6SOP4XU6.js.map +0 -1
- package/dist/chunk-AFXE462X.js +0 -1253
- package/dist/chunk-AFXE462X.js.map +0 -1
- package/dist/chunk-BQPKOVI5.js +0 -115
- package/dist/chunk-BQPKOVI5.js.map +0 -1
- package/dist/chunk-CYDF4LYJ.js +0 -342
- package/dist/chunk-CYDF4LYJ.js.map +0 -1
- package/dist/chunk-CYQE3TLC.js +0 -37
- package/dist/chunk-CYQE3TLC.js.map +0 -1
- package/dist/chunk-DI2ZFAWL.js +0 -14
- package/dist/chunk-DI2ZFAWL.js.map +0 -1
- package/dist/chunk-EGRHWZRV.js +0 -1
- package/dist/chunk-EGRHWZRV.js.map +0 -1
- package/dist/chunk-FGWGY3G3.js +0 -157
- package/dist/chunk-FGWGY3G3.js.map +0 -1
- package/dist/chunk-HOBTDB6G.js +0 -112
- package/dist/chunk-HOBTDB6G.js.map +0 -1
- package/dist/chunk-I7VF4ZOV.js +0 -630
- package/dist/chunk-I7VF4ZOV.js.map +0 -1
- package/dist/chunk-JVVHU3A7.js +0 -1077
- package/dist/chunk-JVVHU3A7.js.map +0 -1
- package/dist/chunk-MIXQVPDH.js +0 -8606
- package/dist/chunk-MIXQVPDH.js.map +0 -1
- package/dist/chunk-MU7S7NU7.js +0 -183
- package/dist/chunk-MU7S7NU7.js.map +0 -1
- package/dist/chunk-OX2YKYSL.js +0 -13
- package/dist/chunk-OX2YKYSL.js.map +0 -1
- package/dist/chunk-PYAJHLXO.js +0 -903
- package/dist/chunk-PYAJHLXO.js.map +0 -1
- package/dist/chunk-SGN7BDRE.js +0 -16
- package/dist/chunk-SGN7BDRE.js.map +0 -1
- package/dist/chunk-SGTGDLOX.js +0 -285
- package/dist/chunk-SGTGDLOX.js.map +0 -1
- package/dist/chunk-T364NBR3.js +0 -1440
- package/dist/chunk-T364NBR3.js.map +0 -1
- package/dist/chunk-U66QI3EN.js +0 -1524
- package/dist/chunk-U66QI3EN.js.map +0 -1
- package/dist/chunk-WTXOWQ7N.js +0 -47
- package/dist/chunk-WTXOWQ7N.js.map +0 -1
- package/dist/chunk-X5DJKVBT.js +0 -1308
- package/dist/chunk-X5DJKVBT.js.map +0 -1
- package/dist/chunk-ZT7HJ6YU.js +0 -38
- package/dist/chunk-ZT7HJ6YU.js.map +0 -1
- package/dist/chunk-ZW26VZHX.js +0 -3169
- package/dist/chunk-ZW26VZHX.js.map +0 -1
- package/dist/controls-reader-5MFHYBZZ.js +0 -192
- package/dist/controls-reader-5MFHYBZZ.js.map +0 -1
- package/dist/expo/plugin.cjs.map +0 -1
- package/dist/expo/plugin.js.map +0 -1
- package/dist/expo-babel-plugin.cjs.map +0 -1
- package/dist/expo-babel-plugin.js.map +0 -1
- package/dist/flutter-preview-path.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/nextjs/plugin.cjs.map +0 -1
- package/dist/nextjs/plugin.js.map +0 -1
- package/dist/nextjs-loader.cjs.map +0 -1
- package/dist/nextjs.cjs.map +0 -1
- package/dist/nextjs.js.map +0 -1
- package/dist/nuxt/runtime/identity.js.map +0 -1
- package/dist/nuxt.js.map +0 -1
- package/dist/svelte.js.map +0 -1
- package/dist/types-C8OIU-kc.d.ts +0 -106
- package/dist/v1-client-compat-qxaXEDm_.d.ts +0 -23
- 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 };
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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 };
|