tempo-sdk 0.0.14 → 0.0.16

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 (56) hide show
  1. package/dist/annotation-strategy-DCJHc--2.d.cts +13 -0
  2. package/dist/annotation-strategy-DCJHc--2.d.ts +13 -0
  3. package/dist/canvas/editor.d.ts +129 -0
  4. package/dist/canvas/editor.js +1198 -0
  5. package/dist/canvas/editor.js.map +1 -0
  6. package/dist/canvas/index.d.ts +173 -0
  7. package/dist/canvas/index.js +2193 -0
  8. package/dist/canvas/index.js.map +1 -0
  9. package/dist/canvas/parser.d.ts +109 -0
  10. package/dist/canvas/parser.js +13 -0
  11. package/dist/canvas/parser.js.map +1 -0
  12. package/dist/chunk-2LP5G6CD.js +748 -0
  13. package/dist/chunk-2LP5G6CD.js.map +1 -0
  14. package/dist/chunk-77BNMPBS.js +319 -0
  15. package/dist/chunk-77BNMPBS.js.map +1 -0
  16. package/dist/chunk-B3PHU7XX.js +571 -0
  17. package/dist/chunk-B3PHU7XX.js.map +1 -0
  18. package/dist/chunk-EJBWZCEE.js +434 -0
  19. package/dist/chunk-EJBWZCEE.js.map +1 -0
  20. package/dist/chunk-F64WRL4H.js +884 -0
  21. package/dist/chunk-F64WRL4H.js.map +1 -0
  22. package/dist/chunk-GHPL4LGE.js +205 -0
  23. package/dist/chunk-GHPL4LGE.js.map +1 -0
  24. package/dist/chunk-ICP7LCPJ.js +615 -0
  25. package/dist/chunk-ICP7LCPJ.js.map +1 -0
  26. package/dist/chunk-IG3JZVZI.js +846 -0
  27. package/dist/chunk-IG3JZVZI.js.map +1 -0
  28. package/dist/chunk-MBTLXFNP.js +605 -0
  29. package/dist/chunk-MBTLXFNP.js.map +1 -0
  30. package/dist/chunk-MD3HJ7L3.js +457 -0
  31. package/dist/chunk-MD3HJ7L3.js.map +1 -0
  32. package/dist/chunk-O3HYJ6BU.js +433 -0
  33. package/dist/chunk-O3HYJ6BU.js.map +1 -0
  34. package/dist/chunk-X3K7Z2BH.js +900 -0
  35. package/dist/chunk-X3K7Z2BH.js.map +1 -0
  36. package/dist/chunk-ZHORRCQG.js +756 -0
  37. package/dist/chunk-ZHORRCQG.js.map +1 -0
  38. package/dist/expo/plugin.cjs +4 -22
  39. package/dist/expo/plugin.cjs.map +1 -1
  40. package/dist/expo/plugin.js +1 -1
  41. package/dist/expo-babel-plugin.cjs +4 -22
  42. package/dist/expo-babel-plugin.cjs.map +1 -1
  43. package/dist/expo-babel-plugin.d.cts +0 -6
  44. package/dist/expo-babel-plugin.d.ts +0 -6
  45. package/dist/expo-babel-plugin.js +1 -1
  46. package/dist/index.cjs +1170 -0
  47. package/dist/index.cjs.map +1 -0
  48. package/dist/index.d.cts +99 -0
  49. package/dist/index.d.ts +3 -28
  50. package/dist/index.js +0 -2
  51. package/dist/index.js.map +1 -1
  52. package/dist/nextjs-loader.cjs +0 -2
  53. package/dist/nextjs-loader.cjs.map +1 -1
  54. package/dist/page-BokkL6FZ.d.ts +35 -0
  55. package/dist/page-xi1aI5a7.d.ts +36 -0
  56. package/package.json +17 -3
@@ -0,0 +1,13 @@
1
+ import { JSXElement } from 'oxc-parser';
2
+
3
+ interface ElementInfo {
4
+ element: JSXElement;
5
+ /** e.g. "div", "Button", "Foo.Bar" */
6
+ tagName: string;
7
+ }
8
+ /** Supported prop value types. `undefined` values are skipped. */
9
+ type PropValue = string | number | boolean | null | undefined | ((...args: unknown[]) => unknown) | object;
10
+
11
+ type ComputeAnnotatedProps = (info: ElementInfo, filepath: string, modifiedtsMs: number) => Record<string, PropValue>;
12
+
13
+ export type { ComputeAnnotatedProps as C, ElementInfo as E, PropValue as P };
@@ -0,0 +1,13 @@
1
+ import { JSXElement } from 'oxc-parser';
2
+
3
+ interface ElementInfo {
4
+ element: JSXElement;
5
+ /** e.g. "div", "Button", "Foo.Bar" */
6
+ tagName: string;
7
+ }
8
+ /** Supported prop value types. `undefined` values are skipped. */
9
+ type PropValue = string | number | boolean | null | undefined | ((...args: unknown[]) => unknown) | object;
10
+
11
+ type ComputeAnnotatedProps = (info: ElementInfo, filepath: string, modifiedtsMs: number) => Record<string, PropValue>;
12
+
13
+ export type { ComputeAnnotatedProps as C, ElementInfo as E, PropValue as P };
@@ -0,0 +1,129 @@
1
+ import { ParsedCanvasFile } from './parser.js';
2
+
3
+ type CanvasSourceEdit = {
4
+ start: number;
5
+ end: number;
6
+ value: string;
7
+ };
8
+ type CanvasEditResult = {
9
+ source: string;
10
+ edits: CanvasSourceEdit[];
11
+ parsed: ParsedCanvasFile;
12
+ };
13
+ type LegacyCanvasMigrationResult = CanvasEditResult & {
14
+ migrated: boolean;
15
+ };
16
+ type CanvasEditorLayout = {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ zIndex?: number;
22
+ intrinsicSizing?: "root-element";
23
+ };
24
+ type AddCanvasStoryboardInput = {
25
+ kind: "component";
26
+ id: string;
27
+ layout: CanvasEditorLayout;
28
+ name?: string;
29
+ componentExpression?: string;
30
+ componentImport?: {
31
+ localName: string;
32
+ source: string;
33
+ importedName?: string;
34
+ };
35
+ } | {
36
+ kind: "route";
37
+ id: string;
38
+ route: string;
39
+ layout: CanvasEditorLayout;
40
+ name?: string;
41
+ } | {
42
+ kind: "html";
43
+ id: string;
44
+ layout: CanvasEditorLayout;
45
+ name?: string;
46
+ filepath?: string;
47
+ src?: string;
48
+ };
49
+ declare function applyCanvasSourceEdits(source: string, edits: readonly CanvasSourceEdit[]): string;
50
+ declare function migrateLegacyCanvasToReact(options: {
51
+ filePath: string;
52
+ source: string;
53
+ }): LegacyCanvasMigrationResult;
54
+ declare function updateCanvasName(options: {
55
+ filePath: string;
56
+ source: string;
57
+ name: string;
58
+ }): CanvasEditResult;
59
+ declare function updateCanvasPath(options: {
60
+ filePath: string;
61
+ source: string;
62
+ path: string;
63
+ }): CanvasEditResult;
64
+ declare function updateCanvasBackgroundColor(options: {
65
+ filePath: string;
66
+ source: string;
67
+ backgroundColor?: string;
68
+ }): CanvasEditResult;
69
+ declare function updateStoryboardName(options: {
70
+ filePath: string;
71
+ source: string;
72
+ storyboardId: string;
73
+ name?: string;
74
+ }): CanvasEditResult;
75
+ declare function updateStoryboardId(options: {
76
+ filePath: string;
77
+ source: string;
78
+ storyboardId: string;
79
+ nextId: string;
80
+ }): CanvasEditResult;
81
+ declare function updateStoryboardLayout(options: {
82
+ filePath: string;
83
+ source: string;
84
+ storyboardId: string;
85
+ layout: Partial<CanvasEditorLayout>;
86
+ }): CanvasEditResult;
87
+ declare function updateStoryboardComponent(options: {
88
+ filePath: string;
89
+ source: string;
90
+ storyboardId: string;
91
+ componentExpression: string;
92
+ componentImport?: {
93
+ localName: string;
94
+ source: string;
95
+ importedName?: string;
96
+ };
97
+ }): CanvasEditResult;
98
+ declare function updateStoryboardProps(options: {
99
+ filePath: string;
100
+ source: string;
101
+ storyboardId: string;
102
+ propsExpression?: string;
103
+ }): CanvasEditResult;
104
+ declare function updateRouteStoryboardRoute(options: {
105
+ filePath: string;
106
+ source: string;
107
+ storyboardId: string;
108
+ route: string;
109
+ }): CanvasEditResult;
110
+ declare function updateHtmlStoryboardSource(options: {
111
+ filePath: string;
112
+ source: string;
113
+ storyboardId: string;
114
+ filepath?: string;
115
+ src?: string;
116
+ }): CanvasEditResult;
117
+ declare function addCanvasStoryboard(options: {
118
+ filePath: string;
119
+ source: string;
120
+ storyboard: AddCanvasStoryboardInput;
121
+ }): CanvasEditResult;
122
+ declare function removeCanvasStoryboard(options: {
123
+ filePath: string;
124
+ source: string;
125
+ storyboardId: string;
126
+ removeUnusedComponentImport?: boolean;
127
+ }): CanvasEditResult;
128
+
129
+ export { type AddCanvasStoryboardInput, type CanvasEditResult, type CanvasEditorLayout, type CanvasSourceEdit, type LegacyCanvasMigrationResult, addCanvasStoryboard, applyCanvasSourceEdits, migrateLegacyCanvasToReact, removeCanvasStoryboard, updateCanvasBackgroundColor, updateCanvasName, updateCanvasPath, updateHtmlStoryboardSource, updateRouteStoryboardRoute, updateStoryboardComponent, updateStoryboardId, updateStoryboardLayout, updateStoryboardName, updateStoryboardProps };