@superblocksteam/library-shared 1.99.99-next.2 → 2.0.0-SNAPSHOT.53db949903de312b

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 (175) hide show
  1. package/dist/computed.d.ts +4 -2
  2. package/dist/computed.d.ts.map +1 -1
  3. package/dist/computed.js +1 -1
  4. package/dist/computed.js.map +1 -1
  5. package/dist/default-structure.d.ts +12 -0
  6. package/dist/default-structure.d.ts.map +1 -0
  7. package/dist/default-structure.js +36 -0
  8. package/dist/default-structure.js.map +1 -0
  9. package/dist/event-trigger-constants.d.ts +2 -0
  10. package/dist/event-trigger-constants.d.ts.map +1 -0
  11. package/dist/event-trigger-constants.js +2 -0
  12. package/dist/event-trigger-constants.js.map +1 -0
  13. package/dist/index.d.ts +18 -8
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +17 -8
  16. package/dist/index.js.map +1 -1
  17. package/dist/layout.d.ts +12 -1
  18. package/dist/layout.d.ts.map +1 -1
  19. package/dist/layout.js +11 -4
  20. package/dist/layout.js.map +1 -1
  21. package/dist/mobx-sync/apply-patch.d.ts.map +1 -1
  22. package/dist/mobx-sync/apply-patch.js +23 -4
  23. package/dist/mobx-sync/apply-patch.js.map +1 -1
  24. package/dist/mobx-sync/to-patch.d.ts.map +1 -1
  25. package/dist/mobx-sync/to-patch.js.map +1 -1
  26. package/dist/pages.d.ts +76 -6
  27. package/dist/pages.d.ts.map +1 -1
  28. package/dist/pages.js +54 -2
  29. package/dist/pages.js.map +1 -1
  30. package/dist/pegs/find-string-interpolation.d.ts +12 -0
  31. package/dist/pegs/find-string-interpolation.d.ts.map +1 -0
  32. package/dist/pegs/find-string-interpolation.js +1265 -0
  33. package/dist/pegs/find-string-interpolation.js.map +1 -0
  34. package/dist/props/helpers.d.ts +1 -1
  35. package/dist/props/helpers.d.ts.map +1 -1
  36. package/dist/props/helpers.js +13 -5
  37. package/dist/props/helpers.js.map +1 -1
  38. package/dist/props/prop-types.d.ts +24 -13
  39. package/dist/props/prop-types.d.ts.map +1 -1
  40. package/dist/props/prop-types.js.map +1 -1
  41. package/dist/props/properties-panel.d.ts +61 -26
  42. package/dist/props/properties-panel.d.ts.map +1 -1
  43. package/dist/props/properties-panel.js +2 -5
  44. package/dist/props/properties-panel.js.map +1 -1
  45. package/dist/props/tailwind-property-keys.d.ts +5 -0
  46. package/dist/props/tailwind-property-keys.d.ts.map +1 -0
  47. package/dist/props/tailwind-property-keys.js +234 -0
  48. package/dist/props/tailwind-property-keys.js.map +1 -0
  49. package/dist/restart-contract.d.ts +35 -0
  50. package/dist/restart-contract.d.ts.map +1 -0
  51. package/dist/restart-contract.js +49 -0
  52. package/dist/restart-contract.js.map +1 -0
  53. package/dist/scope.d.ts +2 -0
  54. package/dist/scope.d.ts.map +1 -1
  55. package/dist/scope.js +3 -0
  56. package/dist/scope.js.map +1 -1
  57. package/dist/types/ai.d.ts +1712 -0
  58. package/dist/types/ai.d.ts.map +1 -0
  59. package/dist/types/ai.js +414 -0
  60. package/dist/types/ai.js.map +1 -0
  61. package/dist/types/apis.d.ts +44 -1
  62. package/dist/types/apis.d.ts.map +1 -1
  63. package/dist/types/base-entity-manager.d.ts +15 -0
  64. package/dist/types/base-entity-manager.d.ts.map +1 -0
  65. package/dist/types/base-entity-manager.js +2 -0
  66. package/dist/types/base-entity-manager.js.map +1 -0
  67. package/dist/types/binding-identifiers.d.ts +13 -0
  68. package/dist/types/binding-identifiers.d.ts.map +1 -0
  69. package/dist/types/binding-identifiers.js +6 -0
  70. package/dist/types/binding-identifiers.js.map +1 -0
  71. package/dist/types/common.d.ts +2 -1
  72. package/dist/types/common.d.ts.map +1 -1
  73. package/dist/types/edit-operations.d.ts +26 -23
  74. package/dist/types/edit-operations.d.ts.map +1 -1
  75. package/dist/types/edit-operations.js +2 -0
  76. package/dist/types/edit-operations.js.map +1 -1
  77. package/dist/types/entities.d.ts +10 -29
  78. package/dist/types/entities.d.ts.map +1 -1
  79. package/dist/types/entities.js +0 -5
  80. package/dist/types/entities.js.map +1 -1
  81. package/dist/types/errors.d.ts +73 -1
  82. package/dist/types/errors.d.ts.map +1 -1
  83. package/dist/types/errors.js +9 -1
  84. package/dist/types/errors.js.map +1 -1
  85. package/dist/types/events.d.ts +219 -26
  86. package/dist/types/events.d.ts.map +1 -1
  87. package/dist/types/events.js +33 -5
  88. package/dist/types/events.js.map +1 -1
  89. package/dist/types/index.d.ts +18 -6
  90. package/dist/types/index.d.ts.map +1 -1
  91. package/dist/types/index.js +18 -6
  92. package/dist/types/index.js.map +1 -1
  93. package/dist/types/migration.d.ts +240 -0
  94. package/dist/types/migration.d.ts.map +1 -0
  95. package/dist/types/migration.js +50 -0
  96. package/dist/types/migration.js.map +1 -0
  97. package/dist/types/mobx-shared-state.d.ts +27 -1
  98. package/dist/types/mobx-shared-state.d.ts.map +1 -1
  99. package/dist/types/parent-messages.d.ts +16 -7
  100. package/dist/types/parent-messages.d.ts.map +1 -1
  101. package/dist/types/protected-packages.d.ts +54 -0
  102. package/dist/types/protected-packages.d.ts.map +1 -0
  103. package/dist/types/protected-packages.js +91 -0
  104. package/dist/types/protected-packages.js.map +1 -0
  105. package/dist/types/register-component.d.ts +128 -0
  106. package/dist/types/register-component.d.ts.map +1 -0
  107. package/dist/types/register-component.js +45 -0
  108. package/dist/types/register-component.js.map +1 -0
  109. package/dist/types/routing.d.ts +68 -0
  110. package/dist/types/routing.d.ts.map +1 -0
  111. package/dist/types/routing.js +2 -0
  112. package/dist/types/routing.js.map +1 -0
  113. package/dist/types/runtime-sync.d.ts +32 -0
  114. package/dist/types/runtime-sync.d.ts.map +1 -0
  115. package/dist/types/runtime-sync.js +2 -0
  116. package/dist/types/runtime-sync.js.map +1 -0
  117. package/dist/types/scope.d.ts +8 -6
  118. package/dist/types/scope.d.ts.map +1 -1
  119. package/dist/types/snapshot.d.ts +53 -0
  120. package/dist/types/snapshot.d.ts.map +1 -0
  121. package/dist/types/snapshot.js +2 -0
  122. package/dist/types/snapshot.js.map +1 -0
  123. package/dist/types/socket.d.ts +662 -48
  124. package/dist/types/socket.d.ts.map +1 -1
  125. package/dist/types/theme.d.ts +8 -7
  126. package/dist/types/theme.d.ts.map +1 -1
  127. package/dist/types/theme.js +5 -6
  128. package/dist/types/theme.js.map +1 -1
  129. package/dist/types/tool-permission-response.d.ts +5 -0
  130. package/dist/types/tool-permission-response.d.ts.map +1 -0
  131. package/dist/types/tool-permission-response.js +26 -0
  132. package/dist/types/tool-permission-response.js.map +1 -0
  133. package/dist/types/vite.d.ts +29 -0
  134. package/dist/types/vite.d.ts.map +1 -0
  135. package/dist/types/vite.js +6 -0
  136. package/dist/types/vite.js.map +1 -0
  137. package/dist/urls.d.ts +6 -0
  138. package/dist/urls.d.ts.map +1 -0
  139. package/dist/urls.js +5 -0
  140. package/dist/urls.js.map +1 -0
  141. package/dist/utils/binding-identifier.d.ts +5 -0
  142. package/dist/utils/binding-identifier.d.ts.map +1 -0
  143. package/dist/utils/binding-identifier.js +14 -0
  144. package/dist/utils/binding-identifier.js.map +1 -0
  145. package/dist/utils/blocks.d.ts +3 -0
  146. package/dist/utils/blocks.d.ts.map +1 -0
  147. package/dist/utils/blocks.js +70 -0
  148. package/dist/utils/blocks.js.map +1 -0
  149. package/dist/utils/computed-args.d.ts +11 -0
  150. package/dist/utils/computed-args.d.ts.map +1 -0
  151. package/dist/utils/computed-args.js +13 -0
  152. package/dist/utils/computed-args.js.map +1 -0
  153. package/dist/utils/dev-server-authorization.d.ts +4 -0
  154. package/dist/utils/dev-server-authorization.d.ts.map +1 -0
  155. package/dist/utils/dev-server-authorization.js +56 -0
  156. package/dist/utils/dev-server-authorization.js.map +1 -0
  157. package/dist/utils/dotted-paths.js +1 -1
  158. package/dist/utils/dotted-paths.js.map +1 -1
  159. package/dist/utils/properties.d.ts +12 -9
  160. package/dist/utils/properties.d.ts.map +1 -1
  161. package/dist/utils/properties.js +14 -6
  162. package/dist/utils/properties.js.map +1 -1
  163. package/dist/utils/routing.d.ts +5 -0
  164. package/dist/utils/routing.d.ts.map +1 -0
  165. package/dist/utils/routing.js +15 -0
  166. package/dist/utils/routing.js.map +1 -0
  167. package/dist/utils/strings.d.ts +12 -0
  168. package/dist/utils/strings.d.ts.map +1 -1
  169. package/dist/utils/strings.js +40 -1
  170. package/dist/utils/strings.js.map +1 -1
  171. package/package.json +41 -25
  172. package/dist/apis.d.ts +0 -2
  173. package/dist/apis.d.ts.map +0 -1
  174. package/dist/apis.js +0 -4
  175. package/dist/apis.js.map +0 -1
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Public list of icon ids to be used by library or custom components.
3
+ * These icons are displayed in the editor UI to visually represent each component type
4
+ * in places like sidebars and panels.
5
+ */
6
+ export declare const ComponentIcons: {
7
+ readonly "date-picker": "date-picker";
8
+ readonly "file-picker": "file-picker";
9
+ readonly "key-value": "key-value";
10
+ readonly "pdf-viewer": "pdf-viewer";
11
+ readonly "radio-group": "radio-group";
12
+ readonly "rich-text-editor": "rich-text-editor";
13
+ readonly app: "app";
14
+ readonly button: "button";
15
+ readonly callout: "callout";
16
+ readonly chart: "chart";
17
+ readonly chat: "chat";
18
+ readonly checkbox: "checkbox";
19
+ readonly code: "code";
20
+ readonly collapse: "collapse";
21
+ readonly container: "container";
22
+ readonly custom: "custom";
23
+ readonly diff: "diff";
24
+ readonly dropdown: "dropdown";
25
+ readonly form: "form";
26
+ readonly grid: "grid";
27
+ readonly icon: "icon";
28
+ readonly iframe: "iframe";
29
+ readonly image: "image";
30
+ readonly input: "input";
31
+ readonly link: "link";
32
+ readonly list: "list";
33
+ readonly map: "map";
34
+ readonly menu: "menu";
35
+ readonly modal: "modal";
36
+ readonly page: "page";
37
+ readonly slideout: "slideout";
38
+ readonly spinner: "spinner";
39
+ readonly switch: "switch";
40
+ readonly table: "table";
41
+ readonly tabs: "tabs";
42
+ readonly text: "text";
43
+ readonly video: "video";
44
+ };
45
+ export type ComponentIcon = (typeof ComponentIcons)[keyof typeof ComponentIcons];
46
+ export type SvgDataUri = `data:image/svg+xml,${string}`;
47
+ export interface EditorConfig<TProps = any> {
48
+ icon?: ComponentIcon | SvgDataUri;
49
+ /**
50
+ * A human-readable description of the component, used in autocomplete.
51
+ */
52
+ description?: string;
53
+ /**
54
+ * The path that defines the layout property of the component, for container-style components.
55
+ * Used for editor's UX when dragging & dropping components.
56
+ *
57
+ * @default "layout"
58
+ */
59
+ layoutPropertyPath?: string;
60
+ /**
61
+ * Components that register a Prop.children will automatically set isDroppable to true.
62
+ */
63
+ isDroppable?: boolean;
64
+ /**
65
+ * Whether the component is draggable.
66
+ * @default true
67
+ */
68
+ isDraggable?: boolean;
69
+ /**
70
+ * Whether the component can be dragged by clicking on its area (vs clicking the name pill).
71
+ * Useful for full width/height components like sections, columns.
72
+ * Note: `isDraggable` must be true for this to take effect.
73
+ *
74
+ * @default true
75
+ */
76
+ isContentDraggable?: boolean;
77
+ isResizable?: {
78
+ width?: boolean;
79
+ height?: boolean;
80
+ } | ((props: TProps) => {
81
+ width: boolean;
82
+ height: boolean;
83
+ }) | boolean;
84
+ isFixedAspectRatio?: boolean;
85
+ useAs?: {
86
+ defaultContainer?: boolean;
87
+ defaultButton?: boolean;
88
+ defaultText?: boolean;
89
+ };
90
+ /**
91
+ * Whether the component is detached from the canvas.
92
+ *
93
+ * A detached component implies that:
94
+ * - It's not part of the main canvas.
95
+ * - It's a drop area.
96
+ * - It has an open/close state.
97
+ *
98
+ * Useful for dialogs, slideouts, modals.
99
+ *
100
+ * Note: You might also want to set `createAt: root` on the editor template for detached components.
101
+ *
102
+ * @default false
103
+ */
104
+ isDetached?: boolean;
105
+ /**
106
+ * Whether the component has an extended click area for selection.
107
+ * @default false
108
+ */
109
+ hasExtendedClickArea?: boolean;
110
+ }
111
+ /**
112
+ * Editor metadata shown for each component before users drag/add them to their applications.
113
+ */
114
+ export type Catalog = {
115
+ hidden: true;
116
+ displayName: string;
117
+ keywords?: string[];
118
+ category: "COMMON" | "FORMS" | "CONTAINERS" | "MEDIA" | "ADVANCED" | string;
119
+ } | {
120
+ displayName: string;
121
+ keywords?: string[];
122
+ category: "COMMON" | "FORMS" | "CONTAINERS" | "MEDIA" | "ADVANCED" | string;
123
+ description?: string;
124
+ };
125
+ export type CatalogWithInternalDetails = Catalog & {
126
+ componentType: string;
127
+ };
128
+ //# sourceMappingURL=register-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-component.d.ts","sourceRoot":"","sources":["../../src/types/register-component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCjB,CAAC;AAEX,MAAM,MAAM,aAAa,GACvB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,sBAAsB,MAAM,EAAE,CAAC;AACxD,MAAM,WAAW,YAAY,CAAC,MAAM,GAAG,GAAG;IACxC,IAAI,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAO7B,WAAW,CAAC,EACR;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GACrC,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,GACxD,OAAO,CAAC;IAMZ,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAM7B,KAAK,CAAC,EAAE;QACN,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IAEF;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,IAAI,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EACJ,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,OAAO,GACP,UAAU,GACV,MAAM,CAAC;CACZ,GACD;IACE,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EACJ,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,OAAO,GACP,UAAU,GACV,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG;IACjD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Public list of icon ids to be used by library or custom components.
3
+ * These icons are displayed in the editor UI to visually represent each component type
4
+ * in places like sidebars and panels.
5
+ */
6
+ export const ComponentIcons = {
7
+ "date-picker": "date-picker",
8
+ "file-picker": "file-picker",
9
+ "key-value": "key-value",
10
+ "pdf-viewer": "pdf-viewer",
11
+ "radio-group": "radio-group",
12
+ "rich-text-editor": "rich-text-editor",
13
+ app: "app",
14
+ button: "button",
15
+ callout: "callout",
16
+ chart: "chart",
17
+ chat: "chat",
18
+ checkbox: "checkbox",
19
+ code: "code",
20
+ collapse: "collapse",
21
+ container: "container",
22
+ custom: "custom",
23
+ diff: "diff",
24
+ dropdown: "dropdown",
25
+ form: "form",
26
+ grid: "grid",
27
+ icon: "icon",
28
+ iframe: "iframe",
29
+ image: "image",
30
+ input: "input",
31
+ link: "link",
32
+ list: "list",
33
+ map: "map",
34
+ menu: "menu",
35
+ modal: "modal",
36
+ page: "page",
37
+ slideout: "slideout",
38
+ spinner: "spinner",
39
+ switch: "switch",
40
+ table: "table",
41
+ tabs: "tabs",
42
+ text: "text",
43
+ video: "video",
44
+ };
45
+ //# sourceMappingURL=register-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-component.js","sourceRoot":"","sources":["../../src/types/register-component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,kBAAkB,EAAE,kBAAkB;IACtC,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC"}
@@ -0,0 +1,68 @@
1
+ import type { ScopeId } from "./scope.js";
2
+ export interface RoutesFileDefinition {
3
+ [route: string]: {
4
+ file: string;
5
+ };
6
+ }
7
+ export interface UrlState {
8
+ /**
9
+ * Search query parameters
10
+ * @example { q: 'query' }
11
+ */
12
+ queryParams: Record<string, string>;
13
+ /**
14
+ * Current protocol
15
+ * @example "https"
16
+ */
17
+ protocol: string;
18
+ /**
19
+ * Full host, including port if applicable
20
+ * @example "superblocks.com:443"
21
+ */
22
+ host: string;
23
+ /**
24
+ * Domain name
25
+ * @example "superblocks.com"
26
+ */
27
+ hostname: string;
28
+ /**
29
+ * The current port
30
+ * @example "8080"
31
+ */
32
+ port: string;
33
+ /**
34
+ * Uninterpolated route
35
+ * @example "/orders/:orderId"
36
+ */
37
+ route: string;
38
+ /**
39
+ * Route parameters
40
+ * @example { orderId: 123 }
41
+ */
42
+ routeParams: Record<string, unknown>;
43
+ /**
44
+ * Interpolated pathname
45
+ * @example "/orders/123"
46
+ */
47
+ pathname: string;
48
+ /**
49
+ * Route hash (/path#some-hash)
50
+ * @example "element-id"
51
+ */
52
+ hash: string;
53
+ /**
54
+ * Full path, including domain, hash and search params
55
+ * @example "https://superblocks.com/orders/123#element-id?q=query"
56
+ */
57
+ href: string;
58
+ }
59
+ /**
60
+ * Uninterpolated route, eg. `/users/:id`, _not_ `/users/123`
61
+ */
62
+ export type Route = string;
63
+ export interface RouteDefinition {
64
+ id: Route;
65
+ path: Route;
66
+ pageId: ScopeId;
67
+ }
68
+ //# sourceMappingURL=routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/types/routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,KAAK,CAAC;IACV,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/types/routing.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import type { SbElement } from "./common.js";
2
+ export type RuntimeSyncComponentData = {
3
+ selectorId: string;
4
+ sourceId: SbElement;
5
+ type: string;
6
+ displayName: string;
7
+ isSbComponent: boolean;
8
+ isHtmlElement: boolean;
9
+ props?: Record<string, unknown>;
10
+ };
11
+ export type RuntimeSyncComponentMetadata = {
12
+ selectorId: string;
13
+ sourceId: SbElement;
14
+ displayName: string;
15
+ type: string;
16
+ };
17
+ export type RuntimeSyncSubtreeNode = {
18
+ selectorId: string;
19
+ sourceId: SbElement;
20
+ displayName: string;
21
+ type: string;
22
+ root?: RuntimeSyncSubtreeNode;
23
+ children: RuntimeSyncSubtreeNode[];
24
+ };
25
+ export type RuntimeSyncComposite = {
26
+ component: RuntimeSyncComponentData | null;
27
+ parent?: RuntimeSyncComponentMetadata | null;
28
+ children?: RuntimeSyncComponentMetadata[];
29
+ path?: RuntimeSyncComponentMetadata[];
30
+ subtree?: RuntimeSyncSubtreeNode;
31
+ };
32
+ //# sourceMappingURL=runtime-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-sync.d.ts","sourceRoot":"","sources":["../../src/types/runtime-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC1C,IAAI,CAAC,EAAE,4BAA4B,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=runtime-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-sync.js","sourceRoot":"","sources":["../../src/types/runtime-sync.ts"],"names":[],"mappings":""}
@@ -1,20 +1,22 @@
1
1
  import type { RootNode } from "../pages.js";
2
- import type { RemoveMeIApiV3Dto } from "./apis.js";
2
+ import type { IApiV3Dto } from "./apis.js";
3
3
  import type { AnyStaticSbEntity } from "./entities.js";
4
4
  export type ScopeOptions = {
5
- onScopeLoaded?: () => void;
5
+ onScopeLoaded?: (scopeId: string) => void;
6
6
  };
7
+ export type ScopeId = string;
7
8
  export type StaticScope = {
8
- scopeId: string;
9
- scopeName?: string;
9
+ scopeId: ScopeId;
10
+ scopeName: string;
10
11
  entities: Record<string, AnyStaticSbEntity>;
11
12
  };
12
13
  export type AppScope = StaticScope & {
13
14
  pages: Record<string, PageScope>;
14
- apis?: RemoveMeIApiV3Dto[];
15
+ apis?: IApiV3Dto[];
16
+ roots?: RootNode[];
15
17
  };
16
18
  export type PageScope = StaticScope & {
17
- route: string;
19
+ routes: string[];
18
20
  name: string;
19
21
  roots: RootNode[];
20
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/types/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/types/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Metadata about the contents of a snapshot (or session snapshot).
3
+ */
4
+ export interface AppSnapshotMeta {
5
+ /** Names of API directories under apis/ */
6
+ apiNames: string[];
7
+ /** Names of page directories under pages/ */
8
+ pageNames: string[];
9
+ }
10
+ /**
11
+ * State of a currently uploaded snapshot.
12
+ */
13
+ export interface SnapshotState {
14
+ /** MD5 hash identifying this upload */
15
+ uploadId: string;
16
+ /** Full path to the upload root directory (contains main/ and session subdirs) */
17
+ extractedDir: string;
18
+ /** When the upload was processed */
19
+ uploadedAt: Date;
20
+ }
21
+ /**
22
+ * Information about a recording session within the snapshot.
23
+ */
24
+ export interface RecordingSessionInfo {
25
+ /** Unique session identifier */
26
+ id: string;
27
+ /** Timestamp when the session started */
28
+ startedAt: number;
29
+ /** Timestamp when the session ended (undefined if still active) */
30
+ endedAt?: number;
31
+ /** Commit ID when session started */
32
+ startingCommitId?: string;
33
+ /** Current commit ID at end of session */
34
+ currentCommitId?: string;
35
+ /** Size of recording.jsonl file in bytes */
36
+ recordingFileSize: number;
37
+ /** Size of snapshot.tar.gz file in bytes, null if missing */
38
+ snapshotFileSize: number | null;
39
+ /** Analyzed metadata about the session snapshot contents */
40
+ meta?: AppSnapshotMeta;
41
+ }
42
+ /**
43
+ * Detailed information about an uploaded snapshot.
44
+ */
45
+ export interface SnapshotDetails {
46
+ /** Application ID from superblocks.json */
47
+ appId: string | null;
48
+ /** List of recording sessions in the snapshot */
49
+ sessions: RecordingSessionInfo[];
50
+ /** Analyzed metadata about the snapshot contents */
51
+ meta?: AppSnapshotMeta;
52
+ }
53
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/types/snapshot.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,UAAU,EAAE,IAAI,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,4DAA4D;IAC5D,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iDAAiD;IACjD,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,oDAAoD;IACpD,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/types/snapshot.ts"],"names":[],"mappings":""}