@superblocksteam/library-shared 1.99.99-next.3 → 2.0.0-SNAPSHOT.04704c19f32b3902

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 -9
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +17 -9
  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 +1721 -0
  58. package/dist/types/ai.d.ts.map +1 -0
  59. package/dist/types/ai.js +432 -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/common.d.ts +2 -1
  68. package/dist/types/common.d.ts.map +1 -1
  69. package/dist/types/edit-operations.d.ts +26 -23
  70. package/dist/types/edit-operations.d.ts.map +1 -1
  71. package/dist/types/edit-operations.js +2 -0
  72. package/dist/types/edit-operations.js.map +1 -1
  73. package/dist/types/entities.d.ts +10 -29
  74. package/dist/types/entities.d.ts.map +1 -1
  75. package/dist/types/entities.js +0 -5
  76. package/dist/types/entities.js.map +1 -1
  77. package/dist/types/errors.d.ts +82 -1
  78. package/dist/types/errors.d.ts.map +1 -1
  79. package/dist/types/errors.js +15 -1
  80. package/dist/types/errors.js.map +1 -1
  81. package/dist/types/events.d.ts +218 -26
  82. package/dist/types/events.d.ts.map +1 -1
  83. package/dist/types/events.js +33 -5
  84. package/dist/types/events.js.map +1 -1
  85. package/dist/types/index.d.ts +19 -7
  86. package/dist/types/index.d.ts.map +1 -1
  87. package/dist/types/index.js +19 -7
  88. package/dist/types/index.js.map +1 -1
  89. package/dist/types/migration.d.ts +240 -0
  90. package/dist/types/migration.d.ts.map +1 -0
  91. package/dist/types/migration.js +50 -0
  92. package/dist/types/migration.js.map +1 -0
  93. package/dist/types/mobx-shared-state.d.ts +27 -1
  94. package/dist/types/mobx-shared-state.d.ts.map +1 -1
  95. package/dist/types/parent-messages.d.ts +16 -7
  96. package/dist/types/parent-messages.d.ts.map +1 -1
  97. package/dist/types/persisted-chat-message.d.ts +55 -0
  98. package/dist/types/persisted-chat-message.d.ts.map +1 -0
  99. package/dist/types/persisted-chat-message.js +752 -0
  100. package/dist/types/persisted-chat-message.js.map +1 -0
  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 +668 -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 +7 -0
  138. package/dist/urls.d.ts.map +1 -0
  139. package/dist/urls.js +6 -0
  140. package/dist/urls.js.map +1 -0
  141. package/dist/utils/binding-identifier.d.ts +1 -0
  142. package/dist/utils/binding-identifier.d.ts.map +1 -1
  143. package/dist/utils/binding-identifier.js +3 -0
  144. package/dist/utils/binding-identifier.js.map +1 -1
  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 +16 -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,234 @@
1
+ export const BORDER_RADIUS_PROPERTY_KEYS = [
2
+ "rounded",
3
+ "rounded-tl",
4
+ "rounded-tr",
5
+ "rounded-br",
6
+ "rounded-bl",
7
+ "rounded-t",
8
+ "rounded-r",
9
+ "rounded-b",
10
+ "rounded-l",
11
+ ];
12
+ export const BORDER_PROPERTY_KEYS = [
13
+ "border-width",
14
+ "border-t-width",
15
+ "border-r-width",
16
+ "border-b-width",
17
+ "border-l-width",
18
+ // color
19
+ "border-color",
20
+ "border-t-color",
21
+ "border-r-color",
22
+ "border-b-color",
23
+ "border-l-color",
24
+ ];
25
+ // Comprehensive list of all supported Tailwind property keys
26
+ export const TAILWIND_PROPERTY_KEYS = [
27
+ // Layout
28
+ "display",
29
+ "position",
30
+ "top",
31
+ "right",
32
+ "bottom",
33
+ "left",
34
+ "visibility",
35
+ "z-index",
36
+ "overflow",
37
+ "overflow-x",
38
+ "overflow-y",
39
+ "overscroll",
40
+ "clear",
41
+ "float",
42
+ // Flexbox & Grid
43
+ "flex-direction",
44
+ "flex-wrap",
45
+ "flex",
46
+ "flex-grow",
47
+ "flex-shrink",
48
+ "flex-basis",
49
+ "order",
50
+ "grid-template-columns",
51
+ "grid-template-rows",
52
+ "grid-column",
53
+ "grid-row",
54
+ "grid-auto-flow",
55
+ "gap",
56
+ "gap-x",
57
+ "gap-y",
58
+ "justify",
59
+ "justify-items",
60
+ "justify-self",
61
+ "align-content",
62
+ "align-items",
63
+ "align-self",
64
+ "place-content",
65
+ "place-items",
66
+ "place-self",
67
+ // Spacing
68
+ "m",
69
+ "mx",
70
+ "my",
71
+ "mt",
72
+ "mr",
73
+ "mb",
74
+ "ml",
75
+ "p",
76
+ "px",
77
+ "py",
78
+ "pt",
79
+ "pr",
80
+ "pb",
81
+ "pl",
82
+ "space-x",
83
+ "space-y",
84
+ // Sizing
85
+ "width",
86
+ "min-width",
87
+ "max-width",
88
+ "height",
89
+ "min-height",
90
+ "max-height",
91
+ "size",
92
+ "aspect-ratio",
93
+ // Typography
94
+ "font-family",
95
+ "font-size",
96
+ "font-weight",
97
+ "font-style",
98
+ "font-variant-numeric",
99
+ "line-height",
100
+ "letter-spacing",
101
+ "text-align",
102
+ "text-color",
103
+ "text-shadow-size",
104
+ "text-shadow-color",
105
+ "text-decoration",
106
+ "text-decoration-color",
107
+ "text-decoration-style",
108
+ "text-decoration-thickness",
109
+ "text-underline-offset",
110
+ "text-transform",
111
+ "text-overflow",
112
+ "text-indent",
113
+ "text-balance",
114
+ "vertical-align",
115
+ "whitespace",
116
+ "word-break",
117
+ "hyphens",
118
+ "content",
119
+ "object-fit",
120
+ "object-position",
121
+ // Backgrounds
122
+ "background-attachment",
123
+ "background-clip",
124
+ "background-color",
125
+ "background-origin",
126
+ "background-position",
127
+ "background-repeat",
128
+ "background-size",
129
+ "background-image",
130
+ "background-gradient-from",
131
+ "background-gradient-via",
132
+ "background-gradient-to",
133
+ // Borders
134
+ ...BORDER_RADIUS_PROPERTY_KEYS,
135
+ ...BORDER_PROPERTY_KEYS,
136
+ "border-style",
137
+ "border-collapse",
138
+ "border-spacing",
139
+ "divide-width",
140
+ "divide-color",
141
+ "divide-style",
142
+ "outline-width",
143
+ "outline-color",
144
+ "outline-style",
145
+ "outline-offset",
146
+ "ring-width",
147
+ "ring-color",
148
+ "ring-opacity",
149
+ "ring-offset-width",
150
+ "ring-offset-color",
151
+ // Effects
152
+ "box-shadow",
153
+ "box-shadow-color",
154
+ "opacity",
155
+ "mix-blend-mode",
156
+ "background-blend-mode",
157
+ // Filters
158
+ "blur",
159
+ "brightness",
160
+ "contrast",
161
+ "drop-shadow",
162
+ "grayscale",
163
+ "hue-rotate",
164
+ "invert",
165
+ "saturate",
166
+ "sepia",
167
+ "backdrop-blur",
168
+ "backdrop-brightness",
169
+ "backdrop-contrast",
170
+ "backdrop-grayscale",
171
+ "backdrop-hue-rotate",
172
+ "backdrop-invert",
173
+ "backdrop-opacity",
174
+ "backdrop-saturate",
175
+ "backdrop-sepia",
176
+ // Tables
177
+ "border-collapse",
178
+ "border-spacing",
179
+ "table-layout",
180
+ "caption-side",
181
+ "empty-cells",
182
+ // Transitions & Animation
183
+ "transition",
184
+ "transition-delay",
185
+ "transition-duration",
186
+ "transition-property",
187
+ "transition-timing-function",
188
+ "duration",
189
+ "delay",
190
+ "ease",
191
+ "animate",
192
+ // Transforms
193
+ "scale",
194
+ "scale-x",
195
+ "scale-y",
196
+ "rotate",
197
+ "translate-x",
198
+ "translate-y",
199
+ "skew-x",
200
+ "skew-y",
201
+ "transform-origin",
202
+ // Interactivity
203
+ "accent-color",
204
+ "appearance",
205
+ "cursor",
206
+ "caret-color",
207
+ "pointer-events",
208
+ "resize",
209
+ "scroll-behavior",
210
+ "scroll-margin",
211
+ "scroll-padding",
212
+ "scroll-snap-align",
213
+ "scroll-snap-stop",
214
+ "scroll-snap-type",
215
+ "touch-action",
216
+ "user-select",
217
+ "will-change",
218
+ // SVG
219
+ "fill",
220
+ "stroke",
221
+ "stroke-width",
222
+ // Accessibility
223
+ "screen-readers",
224
+ // bg
225
+ "bg-attachment",
226
+ "bg-clip",
227
+ "bg-origin",
228
+ "bg-position",
229
+ "bg-repeat",
230
+ "bg-size",
231
+ "bg-linear",
232
+ "bg-radial",
233
+ ];
234
+ //# sourceMappingURL=tailwind-property-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind-property-keys.js","sourceRoot":"","sources":["../../src/props/tailwind-property-keys.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ACN,SAAS;IAET,aAAa;IACb,OAAO;IACP,SAAS;IACT,SAAS;IACT,QAAQ;IACR,aAAa;IACb,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,kBAAkB;IAElB,gBAAgB;IAChB,cAAc;IACd,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,QAAQ;IACR,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,mBAAmB;IACnB,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,aAAa;IACb,aAAa;IAEb,MAAM;IACN,MAAM;IACN,QAAQ;IACR,cAAc;IAEd,gBAAgB;IAChB,gBAAgB;IAEhB,KAAK;IACL,eAAe;IACf,SAAS;IACT,WAAW;IACX,aAAa;IACb,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;CACH,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Child process exit code that asks the `superblocks dev` parent supervisor to
3
+ * respawn the dev server in place (rather than letting the pod be swapped)
4
+ * after an in-place v2->v3 template flip, so the same pod boots the new
5
+ * template. The full exit-code contract is documented in
6
+ * `packages/cli/packages/cli/src/commands/dev-parent.mts`.
7
+ */
8
+ export declare const RESTART_EXIT_CODE = 98;
9
+ /**
10
+ * Env var the CLI parent sets on every supervised child it spawns. Its presence
11
+ * tells the dev-server runtime that a supervisor is watching for
12
+ * `RESTART_EXIT_CODE` and will respawn the child, so it is safe to self-restart
13
+ * in place after a template flip. Warm-claimed single-process pods have no
14
+ * parent loop and never see this marker, so they keep today's pod-swap behavior.
15
+ */
16
+ export declare const RESTART_SUPERVISED_ENV = "SUPERBLOCKS_RESTART_SUPERVISED";
17
+ /**
18
+ * Env var the CLI parent stamps on a child it respawns *because the previous
19
+ * child exited with `RESTART_EXIT_CODE`* (an in-place v2->v3 template flip). The
20
+ * respawned dev-server reads it once at boot to tag its boot metric, so Datadog
21
+ * can tell a post-flip in-place restart apart from a normal cold start and prove
22
+ * the child actually booted after the flip. Absent on a first/cold boot.
23
+ *
24
+ * Canonically defined here; the builtins-only CLI parent
25
+ * (`restart-template-env.mts`) keeps a hand-written copy that the drift-guard
26
+ * test pins to this value. Keep the two in sync.
27
+ */
28
+ export declare const RESTART_REASON_ENV = "SUPERBLOCKS_RESTART_REASON";
29
+ /**
30
+ * The only value the parent writes into `RESTART_REASON_ENV`: an in-place
31
+ * respawn after a template flip. Kept as a closed constant (not free-form text)
32
+ * so it can back a bounded, low-cardinality `boot_kind` metric label.
33
+ */
34
+ export declare const RESTART_REASON_FLIP_RESTART = "flip_restart";
35
+ //# sourceMappingURL=restart-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restart-contract.d.ts","sourceRoot":"","sources":["../src/restart-contract.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,iBAAiB,CAAC"}
@@ -0,0 +1,49 @@
1
+ // Canonical home for the in-place dev-server restart contract — the handshake
2
+ // between the dev-server runtime (which decides to restart and exits) and the
3
+ // `superblocks dev` parent supervisor (which respawns the child).
4
+ //
5
+ // This module intentionally has ZERO imports so it can be pulled in via the
6
+ // dedicated `@superblocksteam/library-shared/restart-contract` subpath without
7
+ // dragging the rest of library-shared's (heavy, frontend) runtime into the
8
+ // Node dev-server process.
9
+ //
10
+ // Two readers cannot import this module and keep their own annotated copies,
11
+ // because they run in the lightweight `superblocks dev` parent which must stay
12
+ // on `node:` builtins only (see dev-parent.mts): `RESTART_EXIT_CODE` in
13
+ // dev-parent.mts and `RESTART_SUPERVISED_ENV` in restart-template-env.mts. Those
14
+ // copies point back here as the source of truth; keep them in sync.
15
+ /**
16
+ * Child process exit code that asks the `superblocks dev` parent supervisor to
17
+ * respawn the dev server in place (rather than letting the pod be swapped)
18
+ * after an in-place v2->v3 template flip, so the same pod boots the new
19
+ * template. The full exit-code contract is documented in
20
+ * `packages/cli/packages/cli/src/commands/dev-parent.mts`.
21
+ */
22
+ export const RESTART_EXIT_CODE = 98;
23
+ /**
24
+ * Env var the CLI parent sets on every supervised child it spawns. Its presence
25
+ * tells the dev-server runtime that a supervisor is watching for
26
+ * `RESTART_EXIT_CODE` and will respawn the child, so it is safe to self-restart
27
+ * in place after a template flip. Warm-claimed single-process pods have no
28
+ * parent loop and never see this marker, so they keep today's pod-swap behavior.
29
+ */
30
+ export const RESTART_SUPERVISED_ENV = "SUPERBLOCKS_RESTART_SUPERVISED";
31
+ /**
32
+ * Env var the CLI parent stamps on a child it respawns *because the previous
33
+ * child exited with `RESTART_EXIT_CODE`* (an in-place v2->v3 template flip). The
34
+ * respawned dev-server reads it once at boot to tag its boot metric, so Datadog
35
+ * can tell a post-flip in-place restart apart from a normal cold start and prove
36
+ * the child actually booted after the flip. Absent on a first/cold boot.
37
+ *
38
+ * Canonically defined here; the builtins-only CLI parent
39
+ * (`restart-template-env.mts`) keeps a hand-written copy that the drift-guard
40
+ * test pins to this value. Keep the two in sync.
41
+ */
42
+ export const RESTART_REASON_ENV = "SUPERBLOCKS_RESTART_REASON";
43
+ /**
44
+ * The only value the parent writes into `RESTART_REASON_ENV`: an in-place
45
+ * respawn after a template flip. Kept as a closed constant (not free-form text)
46
+ * so it can back a bounded, low-cardinality `boot_kind` metric label.
47
+ */
48
+ export const RESTART_REASON_FLIP_RESTART = "flip_restart";
49
+ //# sourceMappingURL=restart-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restart-contract.js","sourceRoot":"","sources":["../src/restart-contract.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,2EAA2E;AAC3E,2BAA2B;AAC3B,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,iFAAiF;AACjF,oEAAoE;AAEpE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,cAAc,CAAC"}
package/dist/scope.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ import type { SbElement } from "./types/common.js";
1
2
  export declare function getStableScopeId(scopeName: string): string;
3
+ export declare function getStableEntityId(scopeId: string, entityName: string): SbElement;
2
4
  //# sourceMappingURL=scope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAEjD"}
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAEjD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GACA,SAAS,CAC7E"}
package/dist/scope.js CHANGED
@@ -2,4 +2,7 @@ import { generatePredictableId } from "@superblocksteam/shared";
2
2
  export function getStableScopeId(scopeName) {
3
3
  return generatePredictableId(`sc-${scopeName}`);
4
4
  }
5
+ export function getStableEntityId(scopeId, entityName) {
6
+ return `SB-${generatePredictableId(scopeId + entityName)}-type`;
7
+ }
5
8
  //# sourceMappingURL=scope.js.map
package/dist/scope.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,qBAAqB,CAAC,MAAM,SAAS,EAAE,CAAC,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,qBAAqB,CAAC,MAAM,SAAS,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAe,EAAE,UAAkB;IACnE,OAAO,MAAM,qBAAqB,CAAC,OAAO,GAAG,UAAU,CAAC,OAAoB,CAAC;AAC/E,CAAC"}