@superblocksteam/library 1.99.99-next.2 → 2.0.0-SNAPSHOT.1b6ff49be85cc3b1

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 (436) hide show
  1. package/README.md +1 -26
  2. package/dist/build-manifest-BQAcrmit.js +6 -0
  3. package/dist/build-manifest-BQAcrmit.js.map +1 -0
  4. package/dist/devtools-consolidated-C5sXwPGD.js +156 -0
  5. package/dist/devtools-consolidated-C5sXwPGD.js.map +1 -0
  6. package/dist/early-console-buffer-BJWsc4E3.js +133 -0
  7. package/dist/early-console-buffer-BJWsc4E3.js.map +1 -0
  8. package/dist/jsx-dev-runtime/index.d.ts +14 -0
  9. package/dist/jsx-dev-runtime/index.d.ts.map +1 -0
  10. package/dist/jsx-dev-runtime/index.js +52 -0
  11. package/dist/jsx-dev-runtime/index.js.map +1 -0
  12. package/dist/jsx-runtime/index.d.ts +7 -0
  13. package/dist/jsx-runtime/index.d.ts.map +1 -0
  14. package/dist/jsx-runtime/index.js +9 -0
  15. package/dist/jsx-runtime/index.js.map +1 -0
  16. package/dist/jsx-wrapper-CAKd0FsI.js +638 -0
  17. package/dist/jsx-wrapper-CAKd0FsI.js.map +1 -0
  18. package/dist/lib/index.d.ts +2324 -0
  19. package/dist/lib/index.d.ts.map +1 -0
  20. package/dist/lib/index.js +7644 -0
  21. package/dist/lib/index.js.map +1 -0
  22. package/dist/logs-DwKJqoRc.js +29 -0
  23. package/dist/logs-DwKJqoRc.js.map +1 -0
  24. package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
  25. package/dist/root-store-DFc-KUI6.js +3845 -0
  26. package/dist/root-store-DFc-KUI6.js.map +1 -0
  27. package/dist/sdk-api-discovery-ChkM2xTd.js +366 -0
  28. package/dist/sdk-api-discovery-ChkM2xTd.js.map +1 -0
  29. package/dist/style.css +355 -0
  30. package/dist/utils-Blrvh8kW.js +61 -0
  31. package/dist/utils-Blrvh8kW.js.map +1 -0
  32. package/package.json +79 -105
  33. package/dist/allPaths-CCZMME3l.js +0 -17
  34. package/dist/allPaths-CCZMME3l.js.map +0 -1
  35. package/dist/allPaths-CHXNxDVP.js +0 -17
  36. package/dist/allPaths-CHXNxDVP.js.map +0 -1
  37. package/dist/allPathsLoader-DTWFaGcd.js +0 -22
  38. package/dist/allPathsLoader-DTWFaGcd.js.map +0 -1
  39. package/dist/allPathsLoader-Fr8EhLGp.js +0 -22
  40. package/dist/allPathsLoader-Fr8EhLGp.js.map +0 -1
  41. package/dist/icons-BrNMuu_I.js +0 -40
  42. package/dist/icons-BrNMuu_I.js.map +0 -1
  43. package/dist/index-BxzKdlqH.js +0 -1353
  44. package/dist/index-BxzKdlqH.js.map +0 -1
  45. package/dist/index-DIJYif9G.js +0 -1341
  46. package/dist/index-DIJYif9G.js.map +0 -1
  47. package/dist/index-DIn-fanT.js +0 -1353
  48. package/dist/index-DIn-fanT.js.map +0 -1
  49. package/dist/index-LHtbj0-V.js +0 -1341
  50. package/dist/index-LHtbj0-V.js.map +0 -1
  51. package/dist/index-U0oPeutu.js +0 -189889
  52. package/dist/index-U0oPeutu.js.map +0 -1
  53. package/dist/index.css +0 -34239
  54. package/dist/index.js +0 -164
  55. package/dist/index.js.map +0 -1
  56. package/dist/splitPathsBySizeLoader-DHk6oFvg.js +0 -34
  57. package/dist/splitPathsBySizeLoader-DHk6oFvg.js.map +0 -1
  58. package/dist/splitPathsBySizeLoader-PcZVWYaJ.js +0 -34
  59. package/dist/splitPathsBySizeLoader-PcZVWYaJ.js.map +0 -1
  60. package/dist-types/app-internal.d.ts +0 -4
  61. package/dist-types/docs-utils/generate-docs.d.ts +0 -2
  62. package/dist-types/edit-mode/collisions-layer.d.ts +0 -3
  63. package/dist-types/edit-mode/create-component.d.ts +0 -8
  64. package/dist-types/edit-mode/debug-tools.d.ts +0 -11
  65. package/dist-types/edit-mode/dnd/collision-detection.d.ts +0 -3
  66. package/dist-types/edit-mode/dnd/dnd-provider.d.ts +0 -4
  67. package/dist-types/edit-mode/dnd/draggable-widget.d.ts +0 -7
  68. package/dist-types/edit-mode/dnd/drop-layer.d.ts +0 -5
  69. package/dist-types/edit-mode/dnd/droppable-widget.d.ts +0 -10
  70. package/dist-types/edit-mode/dnd/grid-drop.d.ts +0 -4
  71. package/dist-types/edit-mode/dnd/grid-store.d.ts +0 -33
  72. package/dist-types/edit-mode/dnd/grid-utils.d.ts +0 -8
  73. package/dist-types/edit-mode/dnd/handle-grid-drop.d.ts +0 -9
  74. package/dist-types/edit-mode/dnd/handle-stack-drop.d.ts +0 -9
  75. package/dist-types/edit-mode/dnd/hooks/use-component-draggable.d.ts +0 -5
  76. package/dist-types/edit-mode/dnd/hooks/use-component-droppable.d.ts +0 -6
  77. package/dist-types/edit-mode/dnd/hooks/use-handle-dnd-events.d.ts +0 -1
  78. package/dist-types/edit-mode/dnd/hooks/use-widget-node-ref.d.ts +0 -2
  79. package/dist-types/edit-mode/dnd/new-components-drag-layer.d.ts +0 -6
  80. package/dist-types/edit-mode/dnd/stack-drop.d.ts +0 -4
  81. package/dist-types/edit-mode/dnd/stack-store.d.ts +0 -10
  82. package/dist-types/edit-mode/dnd/stack-utils.d.ts +0 -13
  83. package/dist-types/edit-mode/dnd/types.d.ts +0 -45
  84. package/dist-types/edit-mode/dnd/utils.d.ts +0 -13
  85. package/dist-types/edit-mode/duplicated-name-popover.d.ts +0 -7
  86. package/dist-types/edit-mode/edit-store.d.ts +0 -28
  87. package/dist-types/edit-mode/edit-wrapper.d.ts +0 -18
  88. package/dist-types/edit-mode/editor-hotkeys.d.ts +0 -3
  89. package/dist-types/edit-mode/features/connection-manager.d.ts +0 -10
  90. package/dist-types/edit-mode/features/drag-and-drop-store.d.ts +0 -69
  91. package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +0 -17
  92. package/dist-types/edit-mode/features/operation-store.d.ts +0 -49
  93. package/dist-types/edit-mode/features/properties-panel-manager.d.ts +0 -31
  94. package/dist-types/edit-mode/features/resizing-store.d.ts +0 -53
  95. package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +0 -94
  96. package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +0 -55
  97. package/dist-types/edit-mode/features/ui-store.d.ts +0 -41
  98. package/dist-types/edit-mode/hooks/use-register-source-element.d.ts +0 -2
  99. package/dist-types/edit-mode/iframe-wrappers.d.ts +0 -4
  100. package/dist-types/edit-mode/interaction-add-section-button.d.ts +0 -4
  101. package/dist-types/edit-mode/interaction-layer.d.ts +0 -11
  102. package/dist-types/edit-mode/interaction-rect-handles.d.ts +0 -7
  103. package/dist-types/edit-mode/interaction-rect-name-pill.d.ts +0 -13
  104. package/dist-types/edit-mode/interaction-rect.d.ts +0 -44
  105. package/dist-types/edit-mode/interaction-utils.d.ts +0 -4
  106. package/dist-types/edit-mode/mobx-sync/create-patch.d.ts +0 -2
  107. package/dist-types/edit-mode/mobx-sync/deep-observe.d.ts +0 -24
  108. package/dist-types/edit-mode/mobx-sync/mobx-editor-sync.d.ts +0 -23
  109. package/dist-types/edit-mode/properties.d.ts +0 -13
  110. package/dist-types/edit-mode/resize-capabilities.d.ts +0 -5
  111. package/dist-types/edit-mode/right-click-menu/right-click-menu.d.ts +0 -14
  112. package/dist-types/edit-mode/roots.d.ts +0 -9
  113. package/dist-types/edit-mode/runtime-children.d.ts +0 -14
  114. package/dist-types/edit-mode/sb-component-from-meta.d.ts +0 -2
  115. package/dist-types/edit-mode/source-update-api.d.ts +0 -26
  116. package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +0 -34
  117. package/dist-types/internal-testing/components/api.d.ts +0 -3
  118. package/dist-types/internal-testing/components/button.d.ts +0 -1
  119. package/dist-types/internal-testing/components/checkbox.d.ts +0 -1
  120. package/dist-types/internal-testing/components/container.d.ts +0 -1
  121. package/dist-types/internal-testing/components/date-picker.d.ts +0 -1
  122. package/dist-types/internal-testing/components/dropdown.d.ts +0 -1
  123. package/dist-types/internal-testing/components/icon.d.ts +0 -1
  124. package/dist-types/internal-testing/components/image.d.ts +0 -1
  125. package/dist-types/internal-testing/components/input.d.ts +0 -1
  126. package/dist-types/internal-testing/components/key-value.d.ts +0 -1
  127. package/dist-types/internal-testing/components/modal.d.ts +0 -1
  128. package/dist-types/internal-testing/components/section-column.d.ts +0 -1
  129. package/dist-types/internal-testing/components/switch.d.ts +0 -1
  130. package/dist-types/internal-testing/components/table.d.ts +0 -1
  131. package/dist-types/internal-testing/components/timer.d.ts +0 -3
  132. package/dist-types/internal-testing/components/variable.d.ts +0 -3
  133. package/dist-types/internal-testing/utils.d.ts +0 -5
  134. package/dist-types/internal-testing/widgets.d.ts +0 -2
  135. package/dist-types/lib/hooks/use-alignment-styles.d.ts +0 -9
  136. package/dist-types/lib/hooks/use-cached-value.d.ts +0 -11
  137. package/dist-types/lib/hooks/use-callback-as-ref.d.ts +0 -1
  138. package/dist-types/lib/hooks/use-deep-memo.d.ts +0 -9
  139. package/dist-types/lib/hooks/use-editor-hotkeys.d.ts +0 -3
  140. package/dist-types/lib/hooks/use-element-rect.d.ts +0 -7
  141. package/dist-types/lib/hooks/use-observer-memo.d.ts +0 -14
  142. package/dist-types/lib/hooks/use-observer-memo.test.d.ts +0 -1
  143. package/dist-types/lib/hooks/use-pointer-down-outside.d.ts +0 -15
  144. package/dist-types/lib/hooks/use-stable-effect.d.ts +0 -22
  145. package/dist-types/lib/hooks/use-stable-effect.test.d.ts +0 -1
  146. package/dist-types/lib/index.d.ts +0 -40
  147. package/dist-types/lib/internal-details/actions-context.d.ts +0 -9
  148. package/dist-types/lib/internal-details/component-info-context.d.ts +0 -10
  149. package/dist-types/lib/internal-details/entities-state.d.ts +0 -10
  150. package/dist-types/lib/internal-details/entities.d.ts +0 -5
  151. package/dist-types/lib/internal-details/env.d.ts +0 -1
  152. package/dist-types/lib/internal-details/identifier-normalizer.d.ts +0 -9
  153. package/dist-types/lib/internal-details/is-sb-component.d.ts +0 -7
  154. package/dist-types/lib/internal-details/lib/devtools.d.ts +0 -1
  155. package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +0 -97
  156. package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.d.ts +0 -2
  157. package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts +0 -6
  158. package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +0 -20
  159. package/dist-types/lib/internal-details/lib/evaluator/create-global-object.d.ts +0 -7
  160. package/dist-types/lib/internal-details/lib/evaluator/create-scope-proxy.d.ts +0 -2
  161. package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +0 -27
  162. package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +0 -83
  163. package/dist-types/lib/internal-details/lib/evaluator/entity-types.d.ts +0 -16
  164. package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +0 -7
  165. package/dist-types/lib/internal-details/lib/evaluator/names.d.ts +0 -7
  166. package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +0 -2
  167. package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +0 -32
  168. package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.d.ts +0 -1
  169. package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.test.d.ts +0 -1
  170. package/dist-types/lib/internal-details/lib/features/api-store.d.ts +0 -36
  171. package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +0 -77
  172. package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +0 -27
  173. package/dist-types/lib/internal-details/lib/features/injected-features.d.ts +0 -8
  174. package/dist-types/lib/internal-details/lib/features/name-manager.d.ts +0 -36
  175. package/dist-types/lib/internal-details/lib/iframe.d.ts +0 -44
  176. package/dist-types/lib/internal-details/lib/mobx-cached-getter.d.ts +0 -1
  177. package/dist-types/lib/internal-details/lib/resolve-id-singleton.d.ts +0 -4
  178. package/dist-types/lib/internal-details/lib/root-store.d.ts +0 -30
  179. package/dist-types/lib/internal-details/lib/throttle.d.ts +0 -2
  180. package/dist-types/lib/internal-details/lib/types.d.ts +0 -226
  181. package/dist-types/lib/internal-details/reactive-component.d.ts +0 -10
  182. package/dist-types/lib/internal-details/sb-wrapper-notes.d.ts +0 -1
  183. package/dist-types/lib/internal-details/sb-wrapper.d.ts +0 -14
  184. package/dist-types/lib/internal-details/scope/global.d.ts +0 -9
  185. package/dist-types/lib/internal-details/scope/scope-context.d.ts +0 -8
  186. package/dist-types/lib/internal-details/scope/scope.d.ts +0 -12
  187. package/dist-types/lib/internal-details/size.d.ts +0 -1
  188. package/dist-types/lib/internal-details/theme-context.d.ts +0 -8
  189. package/dist-types/lib/internal-details/use-track-runtime-widget.d.ts +0 -15
  190. package/dist-types/lib/sb-trigger.d.ts +0 -53
  191. package/dist-types/lib/triggers/base.d.ts +0 -17
  192. package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +0 -19
  193. package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +0 -21
  194. package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +0 -17
  195. package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +0 -17
  196. package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +0 -20
  197. package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +0 -20
  198. package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +0 -28
  199. package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +0 -23
  200. package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +0 -26
  201. package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +0 -18
  202. package/dist-types/lib/triggers/implementations/run-js.d.ts +0 -18
  203. package/dist-types/lib/triggers/implementations/set-profile.d.ts +0 -17
  204. package/dist-types/lib/triggers/implementations/show-alert.d.ts +0 -22
  205. package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +0 -15
  206. package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +0 -18
  207. package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +0 -17
  208. package/dist-types/lib/triggers/implementations/trigger-event.d.ts +0 -17
  209. package/dist-types/lib/triggers/registry.d.ts +0 -174
  210. package/dist-types/lib/triggers/run-event-handlers.d.ts +0 -10
  211. package/dist-types/lib/user-facing/component-base/components/autolinked-text.d.ts +0 -8
  212. package/dist-types/lib/user-facing/component-base/components/button.d.ts +0 -46
  213. package/dist-types/lib/user-facing/component-base/components/checkbox.d.ts +0 -12
  214. package/dist-types/lib/user-facing/component-base/components/dropdown-select.d.ts +0 -4
  215. package/dist-types/lib/user-facing/component-base/components/dynamic-svg.d.ts +0 -10
  216. package/dist-types/lib/user-facing/component-base/components/expand-button.d.ts +0 -8
  217. package/dist-types/lib/user-facing/component-base/components/loading-animator.d.ts +0 -4
  218. package/dist-types/lib/user-facing/component-base/components/plain-link.d.ts +0 -1
  219. package/dist-types/lib/user-facing/component-base/components/popper.d.ts +0 -20
  220. package/dist-types/lib/user-facing/component-base/components/search-component.d.ts +0 -19
  221. package/dist-types/lib/user-facing/component-base/components/span-trunc-middle.d.ts +0 -9
  222. package/dist-types/lib/user-facing/component-base/components/switch.d.ts +0 -6
  223. package/dist-types/lib/user-facing/component-base/constants.d.ts +0 -18
  224. package/dist-types/lib/user-facing/component-base/error/error-inline-message.d.ts +0 -36
  225. package/dist-types/lib/user-facing/component-base/error/error-tooltip.d.ts +0 -11
  226. package/dist-types/lib/user-facing/component-base/error/error-utils.d.ts +0 -13
  227. package/dist-types/lib/user-facing/component-base/error/widget-errors-wrapper.d.ts +0 -15
  228. package/dist-types/lib/user-facing/component-base/error-boundary.d.ts +0 -18
  229. package/dist-types/lib/user-facing/component-base/sb-component.d.ts +0 -18
  230. package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +0 -16
  231. package/dist-types/lib/user-facing/component-base/styles/hover-styles.d.ts +0 -10
  232. package/dist-types/lib/user-facing/component-base/styles/input-styles.d.ts +0 -2
  233. package/dist-types/lib/user-facing/component-base/use-passthrough-props.d.ts +0 -6
  234. package/dist-types/lib/user-facing/component-base/utils/format-utils.d.ts +0 -37
  235. package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +0 -17
  236. package/dist-types/lib/user-facing/components/button/index.d.ts +0 -37
  237. package/dist-types/lib/user-facing/components/button/props.d.ts +0 -48
  238. package/dist-types/lib/user-facing/components/checkbox/checkbox-component.d.ts +0 -9
  239. package/dist-types/lib/user-facing/components/checkbox/index.d.ts +0 -43
  240. package/dist-types/lib/user-facing/components/checkbox/props.d.ts +0 -44
  241. package/dist-types/lib/user-facing/components/checkbox/types.d.ts +0 -19
  242. package/dist-types/lib/user-facing/components/column/index.d.ts +0 -51
  243. package/dist-types/lib/user-facing/components/column/props.d.ts +0 -45
  244. package/dist-types/lib/user-facing/components/container/index.d.ts +0 -63
  245. package/dist-types/lib/user-facing/components/container/props.d.ts +0 -58
  246. package/dist-types/lib/user-facing/components/custom/context.d.ts +0 -11
  247. package/dist-types/lib/user-facing/components/custom/index.d.ts +0 -2
  248. package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +0 -27
  249. package/dist-types/lib/user-facing/components/date-picker/constants.d.ts +0 -8
  250. package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +0 -29
  251. package/dist-types/lib/user-facing/components/date-picker/date-picker.d.ts +0 -2
  252. package/dist-types/lib/user-facing/components/date-picker/index.d.ts +0 -63
  253. package/dist-types/lib/user-facing/components/date-picker/props.d.ts +0 -65
  254. package/dist-types/lib/user-facing/components/date-picker/props.test-d.d.ts +0 -1
  255. package/dist-types/lib/user-facing/components/date-picker/side-effects.d.ts +0 -3
  256. package/dist-types/lib/user-facing/components/date-picker/types.d.ts +0 -40
  257. package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +0 -24
  258. package/dist-types/lib/user-facing/components/dropdown/constants.d.ts +0 -5
  259. package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +0 -106
  260. package/dist-types/lib/user-facing/components/dropdown/index.d.ts +0 -73
  261. package/dist-types/lib/user-facing/components/dropdown/multi-dropdown.d.ts +0 -18
  262. package/dist-types/lib/user-facing/components/dropdown/normalize-values.d.ts +0 -2
  263. package/dist-types/lib/user-facing/components/dropdown/props.d.ts +0 -76
  264. package/dist-types/lib/user-facing/components/dropdown/types.d.ts +0 -89
  265. package/dist-types/lib/user-facing/components/dropdown/utils.d.ts +0 -8
  266. package/dist-types/lib/user-facing/components/grid/calculations/calculate-constraints.d.ts +0 -26
  267. package/dist-types/lib/user-facing/components/grid/calculations/calculate-row-positions.d.ts +0 -2
  268. package/dist-types/lib/user-facing/components/grid/calculations/order-constraints.d.ts +0 -2
  269. package/dist-types/lib/user-facing/components/grid/index.d.ts +0 -36
  270. package/dist-types/lib/user-facing/components/grid/use-height-observer.d.ts +0 -5
  271. package/dist-types/lib/user-facing/components/grid/utils.d.ts +0 -1
  272. package/dist-types/lib/user-facing/components/icon/index.d.ts +0 -22
  273. package/dist-types/lib/user-facing/components/icon/props.d.ts +0 -24
  274. package/dist-types/lib/user-facing/components/image/image-component.d.ts +0 -38
  275. package/dist-types/lib/user-facing/components/image/index.d.ts +0 -29
  276. package/dist-types/lib/user-facing/components/image/props.d.ts +0 -39
  277. package/dist-types/lib/user-facing/components/input/constants.d.ts +0 -24
  278. package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +0 -5
  279. package/dist-types/lib/user-facing/components/input/index.d.ts +0 -96
  280. package/dist-types/lib/user-facing/components/input/input-component.d.ts +0 -57
  281. package/dist-types/lib/user-facing/components/input/props.d.ts +0 -100
  282. package/dist-types/lib/user-facing/components/input/styles.d.ts +0 -6
  283. package/dist-types/lib/user-facing/components/input/types.d.ts +0 -45
  284. package/dist-types/lib/user-facing/components/input/utils.d.ts +0 -15
  285. package/dist-types/lib/user-facing/components/key-value/components/key-styles.d.ts +0 -3
  286. package/dist-types/lib/user-facing/components/key-value/components/property-key.d.ts +0 -7
  287. package/dist-types/lib/user-facing/components/key-value/components/property-value.d.ts +0 -12
  288. package/dist-types/lib/user-facing/components/key-value/components/value-styles.d.ts +0 -6
  289. package/dist-types/lib/user-facing/components/key-value/constants.d.ts +0 -7
  290. package/dist-types/lib/user-facing/components/key-value/derived-properties.d.ts +0 -1
  291. package/dist-types/lib/user-facing/components/key-value/index.d.ts +0 -6
  292. package/dist-types/lib/user-facing/components/key-value/key-value-component.d.ts +0 -2
  293. package/dist-types/lib/user-facing/components/key-value/properties-props.d.ts +0 -45
  294. package/dist-types/lib/user-facing/components/key-value/props.d.ts +0 -38
  295. package/dist-types/lib/user-facing/components/key-value/styles.d.ts +0 -22
  296. package/dist-types/lib/user-facing/components/key-value/types.d.ts +0 -106
  297. package/dist-types/lib/user-facing/components/key-value/utils.d.ts +0 -11
  298. package/dist-types/lib/user-facing/components/modal/constants.d.ts +0 -8
  299. package/dist-types/lib/user-facing/components/modal/index.d.ts +0 -49
  300. package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +0 -37
  301. package/dist-types/lib/user-facing/components/modal/props.d.ts +0 -46
  302. package/dist-types/lib/user-facing/components/page/index.d.ts +0 -13
  303. package/dist-types/lib/user-facing/components/page/props.d.ts +0 -15
  304. package/dist-types/lib/user-facing/components/page/register-page.d.ts +0 -2
  305. package/dist-types/lib/user-facing/components/section/index.d.ts +0 -22
  306. package/dist-types/lib/user-facing/components/section/props.d.ts +0 -25
  307. package/dist-types/lib/user-facing/components/slideout/index.d.ts +0 -1
  308. package/dist-types/lib/user-facing/components/slideout/props.d.ts +0 -15
  309. package/dist-types/lib/user-facing/components/stack/index.d.ts +0 -60
  310. package/dist-types/lib/user-facing/components/switch/index.d.ts +0 -44
  311. package/dist-types/lib/user-facing/components/switch/props.d.ts +0 -45
  312. package/dist-types/lib/user-facing/components/switch/switch-component.d.ts +0 -5
  313. package/dist-types/lib/user-facing/components/switch/types.d.ts +0 -19
  314. package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +0 -178
  315. package/dist-types/lib/user-facing/components/table/components/autotooltip-component.d.ts +0 -17
  316. package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +0 -16
  317. package/dist-types/lib/user-facing/components/table/components/column-settings.d.ts +0 -11
  318. package/dist-types/lib/user-facing/components/table/components/edit-cell.d.ts +0 -15
  319. package/dist-types/lib/user-facing/components/table/components/edit-checkbox-cell.d.ts +0 -11
  320. package/dist-types/lib/user-facing/components/table/components/edit-date-cell.d.ts +0 -12
  321. package/dist-types/lib/user-facing/components/table/components/edit-input-cell.d.ts +0 -14
  322. package/dist-types/lib/user-facing/components/table/components/edit-multi-select-cell.d.ts +0 -13
  323. package/dist-types/lib/user-facing/components/table/components/edit-single-select-cell.d.ts +0 -13
  324. package/dist-types/lib/user-facing/components/table/components/edit-utils.d.ts +0 -28
  325. package/dist-types/lib/user-facing/components/table/components/editable-link-cell.d.ts +0 -20
  326. package/dist-types/lib/user-facing/components/table/components/filter-popover-content.d.ts +0 -37
  327. package/dist-types/lib/user-facing/components/table/components/popover-video.d.ts +0 -5
  328. package/dist-types/lib/user-facing/components/table/components/table-action-icon.d.ts +0 -13
  329. package/dist-types/lib/user-facing/components/table/components/table-column-header-button.d.ts +0 -19
  330. package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +0 -15
  331. package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +0 -40
  332. package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +0 -62
  333. package/dist-types/lib/user-facing/components/table/components/table-loading-state.d.ts +0 -11
  334. package/dist-types/lib/user-facing/components/table/components/table-pagination-input.d.ts +0 -10
  335. package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +0 -18
  336. package/dist-types/lib/user-facing/components/table/components/table-row-context-menu.d.ts +0 -17
  337. package/dist-types/lib/user-facing/components/table/components/table-tag.d.ts +0 -25
  338. package/dist-types/lib/user-facing/components/table/constants.d.ts +0 -111
  339. package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +0 -20
  340. package/dist-types/lib/user-facing/components/table/index.d.ts +0 -255
  341. package/dist-types/lib/user-facing/components/table/props.d.ts +0 -259
  342. package/dist-types/lib/user-facing/components/table/table-component.d.ts +0 -100
  343. package/dist-types/lib/user-facing/components/table/table-manager.d.ts +0 -23
  344. package/dist-types/lib/user-facing/components/table/table-styles.d.ts +0 -78
  345. package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +0 -147
  346. package/dist-types/lib/user-facing/components/table/table-widget.d.ts +0 -148
  347. package/dist-types/lib/user-facing/components/table/types.d.ts +0 -471
  348. package/dist-types/lib/user-facing/components/table/use-sticky.d.ts +0 -1
  349. package/dist-types/lib/user-facing/components/table/utils.d.ts +0 -2
  350. package/dist-types/lib/user-facing/components/text/index.d.ts +0 -51
  351. package/dist-types/lib/user-facing/components/text/long-text-button.d.ts +0 -8
  352. package/dist-types/lib/user-facing/components/text/props.d.ts +0 -60
  353. package/dist-types/lib/user-facing/components/text/styles.d.ts +0 -2
  354. package/dist-types/lib/user-facing/components/text/utils.d.ts +0 -25
  355. package/dist-types/lib/user-facing/constants.d.ts +0 -2
  356. package/dist-types/lib/user-facing/entities/api/index.d.ts +0 -14
  357. package/dist-types/lib/user-facing/entities/api/props.d.ts +0 -20
  358. package/dist-types/lib/user-facing/entities/timer/index.d.ts +0 -16
  359. package/dist-types/lib/user-facing/entities/timer/props.d.ts +0 -19
  360. package/dist-types/lib/user-facing/entities/variable/index.d.ts +0 -14
  361. package/dist-types/lib/user-facing/entities/variable/props.d.ts +0 -13
  362. package/dist-types/lib/user-facing/global-functions.d.ts +0 -23
  363. package/dist-types/lib/user-facing/hooks/use-editor.d.ts +0 -42
  364. package/dist-types/lib/user-facing/hooks/use-update-properties.d.ts +0 -1
  365. package/dist-types/lib/user-facing/icons/constants.d.ts +0 -8
  366. package/dist-types/lib/user-facing/icons/encoded.d.ts +0 -1
  367. package/dist-types/lib/user-facing/icons/helpers.d.ts +0 -21
  368. package/dist-types/lib/user-facing/icons/index.d.ts +0 -2
  369. package/dist-types/lib/user-facing/internal-index.d.ts +0 -4
  370. package/dist-types/lib/user-facing/layers.d.ts +0 -43
  371. package/dist-types/lib/user-facing/properties-panel/constants.d.ts +0 -1
  372. package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +0 -5
  373. package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +0 -22
  374. package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +0 -12
  375. package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +0 -44
  376. package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +0 -114
  377. package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +0 -6
  378. package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +0 -253
  379. package/dist-types/lib/user-facing/properties-panel/props-builder.test-d.d.ts +0 -1
  380. package/dist-types/lib/user-facing/properties-panel/props-panel-utils.d.ts +0 -3
  381. package/dist-types/lib/user-facing/properties-panel/validators.d.ts +0 -33
  382. package/dist-types/lib/user-facing/sb-event-flow.d.ts +0 -52
  383. package/dist-types/lib/user-facing/sb-provider.d.ts +0 -12
  384. package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +0 -6
  385. package/dist-types/lib/user-facing/state/create-scope.d.ts +0 -17
  386. package/dist-types/lib/user-facing/state/sb-computed.d.ts +0 -2
  387. package/dist-types/lib/user-facing/state/types.d.ts +0 -17
  388. package/dist-types/lib/user-facing/styling/color-utils.d.ts +0 -13
  389. package/dist-types/lib/user-facing/styling/colors.d.ts +0 -67
  390. package/dist-types/lib/user-facing/styling/style-as-class.d.ts +0 -1
  391. package/dist-types/lib/user-facing/styling/styles.d.ts +0 -4
  392. package/dist-types/lib/user-facing/styling/widget-label-styles.d.ts +0 -11
  393. package/dist-types/lib/user-facing/themes/classnames.d.ts +0 -72
  394. package/dist-types/lib/user-facing/themes/constants.d.ts +0 -80
  395. package/dist-types/lib/user-facing/themes/default-theme.d.ts +0 -8
  396. package/dist-types/lib/user-facing/themes/generate-border-css.d.ts +0 -25
  397. package/dist-types/lib/user-facing/themes/generate-border-styles.d.ts +0 -15
  398. package/dist-types/lib/user-facing/themes/generate-class-name.d.ts +0 -2
  399. package/dist-types/lib/user-facing/themes/generate-colors.d.ts +0 -45
  400. package/dist-types/lib/user-facing/themes/generate-theme.d.ts +0 -3
  401. package/dist-types/lib/user-facing/themes/generate-typographies.d.ts +0 -5
  402. package/dist-types/lib/user-facing/themes/generatedStyles/button-styles.d.ts +0 -2
  403. package/dist-types/lib/user-facing/themes/generatedStyles/container-styles.d.ts +0 -2
  404. package/dist-types/lib/user-facing/themes/generatedStyles/datepicker-styles.d.ts +0 -2
  405. package/dist-types/lib/user-facing/themes/generatedStyles/dropdown-styles.d.ts +0 -2
  406. package/dist-types/lib/user-facing/themes/generatedStyles/editor-styles.d.ts +0 -2
  407. package/dist-types/lib/user-facing/themes/generatedStyles/generate-component-styles.d.ts +0 -16
  408. package/dist-types/lib/user-facing/themes/generatedStyles/generate-padding-style.d.ts +0 -19
  409. package/dist-types/lib/user-facing/themes/generatedStyles/icon-styles.d.ts +0 -2
  410. package/dist-types/lib/user-facing/themes/generatedStyles/input-styles.d.ts +0 -3
  411. package/dist-types/lib/user-facing/themes/generatedStyles/paginator-styles.d.ts +0 -2
  412. package/dist-types/lib/user-facing/themes/generatedStyles/popper-styles.d.ts +0 -2
  413. package/dist-types/lib/user-facing/themes/generatedStyles/styles-utils.d.ts +0 -1
  414. package/dist-types/lib/user-facing/themes/generatedStyles/text-styles.d.ts +0 -3
  415. package/dist-types/lib/user-facing/themes/generatedStyles/theme-styles.d.ts +0 -5
  416. package/dist-types/lib/user-facing/themes/generatedStyles/utils.d.ts +0 -23
  417. package/dist-types/lib/user-facing/themes/index.d.ts +0 -5
  418. package/dist-types/lib/user-facing/themes/layers.d.ts +0 -6
  419. package/dist-types/lib/user-facing/themes/padding-constants.d.ts +0 -10
  420. package/dist-types/lib/user-facing/themes/typeface-constants.d.ts +0 -3
  421. package/dist-types/lib/user-facing/themes/typefaces/utils.d.ts +0 -28
  422. package/dist-types/lib/user-facing/themes/typeography/typography-utils.d.ts +0 -33
  423. package/dist-types/lib/user-facing/themes/typeography/use-typography-styling.d.ts +0 -15
  424. package/dist-types/lib/user-facing/themes/typography-constants.d.ts +0 -34
  425. package/dist-types/lib/user-facing/themes/utils.d.ts +0 -16
  426. package/dist-types/lib/user-facing/types.d.ts +0 -22
  427. package/dist-types/lib/user-facing/utils/form.d.ts +0 -10
  428. package/dist-types/lib/utils/clean-object.d.ts +0 -5
  429. package/dist-types/lib/utils/fast-clone.d.ts +0 -1
  430. package/dist-types/lib/utils/generate-id.d.ts +0 -1
  431. package/dist-types/lib/utils/is-user-on-mac.d.ts +0 -1
  432. package/dist-types/lib/utils/is-widget-grid.d.ts +0 -2
  433. package/dist-types/lib/utils/is-widget-vstack.d.ts +0 -2
  434. package/dist-types/lib/utils/shallow-equal.d.ts +0 -1
  435. package/dist-types/lib/utils/widget-wrapper-naming.d.ts +0 -6
  436. package/dist-types/main.d.ts +0 -1
@@ -0,0 +1,2324 @@
1
+ import { Callback, ControlType, DataType, DataTypeString, EntityDefinition, HeaderType, PropertiesPanelDefinition as PropertiesPanelDefinition$1, PropertiesPanelDisplay, PropertyForData, PropsCategory, Relation, WidgetPropertyDefinition } from "@superblocksteam/library-shared/props";
2
+ import { DataRouter, Location, Params } from "react-router";
3
+ import { Dim, EditorConfig, EvaluateOrValueComputedArgs, Property, TailwindPropertyKey } from "@superblocksteam/library-shared";
4
+ import * as React$2 from "react";
5
+ import React$1, { LegacyRef, ReactNode, createElement } from "react";
6
+ import { OrchestratorViewMode, PlaceholderInfo, Profile } from "@superblocksteam/shared";
7
+ import { AiContextMode, AppToEditorMessage, Catalog, CatalogWithInternalDetails, ComponentRegistryShareState, ConsoleLogEntry, CreateChild, CreateChild as CreateChild$1, CreateRequest, DeleteMeLibraryApi, DeleteRequest, EditOperationPayload, EditOperationType, EditOperations, EditorConfig as EditorConfig$1, Entity, EntityOutputProp, ExecutionTimingBreakdown, InitData, InteractionMode, PayloadAction, PropertyInfo, ReparentRequest, RuntimeErrorData, RuntimeSyncComposite, SbApiRunOptions, SbElement, SbSelector, SetPropertiesRequest, SetPropertyRequest, SourceLocation, TransactionInfo, UrlState, ViteMessage, ViteMessageKind, WithBindingIdentifier } from "@superblocksteam/library-shared/types";
8
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
9
+ import { CompiledApi, IntegrationDeclaration } from "@superblocksteam/sdk-api";
10
+ import { Graph } from "@dagrejs/graphlib";
11
+ import { XYCoord } from "react-dnd";
12
+
13
+ //#region src/lib/internal-details/scope/types.d.ts
14
+ declare const AppMode: {
15
+ readonly EDIT: "EDIT";
16
+ readonly PUBLISHED: "PUBLISHED";
17
+ readonly PREVIEW: "PREVIEW";
18
+ };
19
+ type AppMode = (typeof AppMode)[keyof typeof AppMode];
20
+ //#endregion
21
+ //#region src/lib/internal-details/superblocks-context.d.ts
22
+ type User = {
23
+ name: string;
24
+ email: string;
25
+ id: string;
26
+ groups: Group[];
27
+ username: string;
28
+ metadata: Record<string, unknown>;
29
+ };
30
+ type Group = {
31
+ id: string;
32
+ name: string;
33
+ size: number;
34
+ };
35
+ /**
36
+ * A data tag (formerly "profile") representing a data segment such as Staging or Production.
37
+ *
38
+ * Key fields:
39
+ * - `key` — unique identifier, pass to `setDataTag()`
40
+ * - `displayName` — human-readable label for UI display (there is no `name` field)
41
+ * - `description` — optional description of the tag
42
+ * - `type` — `"RESERVED"` or `"CUSTOM"`
43
+ */
44
+ type DataTag = Profile;
45
+ type DataTags = {
46
+ available: DataTag[];
47
+ selected?: DataTag;
48
+ default: DataTag;
49
+ };
50
+ /** @deprecated Use DataTags instead */
51
+ type Profiles = DataTags;
52
+ declare class SuperblocksAppContext {
53
+ private context?;
54
+ constructor();
55
+ get user(): User | undefined;
56
+ get groups(): Group[] | undefined;
57
+ get selectedProfile(): Profile | undefined;
58
+ get profiles(): DataTags | undefined;
59
+ setProfile(profileKey: string): void;
60
+ updateContext(context: Partial<SuperblocksAppContext>): void;
61
+ getGlobal(): {
62
+ user?: User;
63
+ groups?: Group[];
64
+ selectedProfileId?: string;
65
+ profiles?: Profiles;
66
+ viewMode?: any;
67
+ app?: {
68
+ id: string;
69
+ name: string;
70
+ };
71
+ } | undefined;
72
+ }
73
+ declare function useSuperblocksUser(): User | undefined;
74
+ declare function useSuperblocksGroups(): Group[] | undefined;
75
+ declare function useSuperblocksDataTags(): {
76
+ dataTags: DataTags | undefined;
77
+ setDataTag: (dataTagKey: string) => void;
78
+ };
79
+ /** @deprecated Use useSuperblocksDataTags instead */
80
+ declare function useSuperblocksProfiles(): {
81
+ profiles: DataTags | undefined;
82
+ setProfile: (dataTagKey: string) => void;
83
+ };
84
+ declare function getAppMode(): AppMode | undefined;
85
+ //#endregion
86
+ //#region src/lib/user-facing/sb-provider.d.ts
87
+ declare const SbProvider: ({
88
+ name,
89
+ children,
90
+ className,
91
+ context
92
+ }: {
93
+ name?: string;
94
+ children?: React$1.ReactNode;
95
+ className?: string;
96
+ context?: SuperblocksAppContext;
97
+ }) => _$react_jsx_runtime0.JSX.Element;
98
+ //#endregion
99
+ //#region src/lib/internal-details/lib/evaluator/entity-types.d.ts
100
+ type SingleInputProp<T = EntityOutputProp, ARGS extends any[] = any[]> = T extends Callback ? Callback<ARGS> : T;
101
+ type NestedInputProp<T, ARGS extends any[] = any[]> = T extends object ? { [K in keyof T]: SingleInputProp<T[K], ARGS> | NestedInputProp<T[K], ARGS> } : never;
102
+ type InputProp<T = EntityOutputProp, ARGS extends any[] = any[]> = SingleInputProp<T, ARGS> | NestedInputProp<T, ARGS>;
103
+ type EntityFunction<ARGS extends any[] = any[], R = EntityOutputProp> = (this: Entity, ...ARGS: ARGS) => R;
104
+ //#endregion
105
+ //#region src/edit-mode/runtime-graph/types.d.ts
106
+ type ComponentNode = {
107
+ selectorId: SbSelector;
108
+ sourceId: SbElement;
109
+ type: any;
110
+ isSbComponent: boolean;
111
+ isHtmlElement: boolean;
112
+ noSelect?: boolean;
113
+ props?: Record<string, unknown>;
114
+ firstRenderedTag: SbSelector | undefined;
115
+ nearestSelectableAncestor: SbSelector | undefined;
116
+ displayName: string;
117
+ };
118
+ //#endregion
119
+ //#region src/edit-mode/features/runtime-tracking-store.d.ts
120
+ declare class RuntimeTrackingStore {
121
+ readonly editStore: EditStore | undefined;
122
+ constructor(editStore: EditStore | undefined);
123
+ private graph;
124
+ private jsxNodes;
125
+ private sourceNodes;
126
+ private disabledComponents;
127
+ registerComponent(selectorId: SbSelector, params: {
128
+ sourceId: SbElement;
129
+ type: any;
130
+ parentSelectorId?: SbSelector;
131
+ isSbComponent: boolean;
132
+ isHtmlElement: boolean;
133
+ noSelect?: boolean;
134
+ }): void;
135
+ getDisplayName(selectorId: SbSelector): string;
136
+ unregisterComponent(selectorId: SbSelector): void;
137
+ getFirstAnchorableTag(selectorId: SbSelector): SbSelector | undefined;
138
+ getNearestSelectableAncestor(selectorId: SbSelector, skipSelf?: boolean): SbSelector | undefined;
139
+ updatePropsForComponent(selectorId: SbSelector, props: Record<string, unknown>): void;
140
+ getComponent(selectorId: SbSelector): ComponentNode | undefined;
141
+ getComponentParent(selectorId: SbSelector): SbSelector;
142
+ getComponentChildren(selectorId: SbSelector): SbSelector[];
143
+ getSelectorIdsForSourceId(sourceId: SbElement): Set<SbSelector>;
144
+ getSourceId(selectorId: SbSelector): SbElement | undefined;
145
+ getClosestAncestorByType(selectorId: SbSelector, type: string): SbSelector | undefined;
146
+ hasRenderedNodes(): boolean;
147
+ getDisabledComponents(): SbSelector[];
148
+ /**
149
+ * Given a selectorId that represents a DOM element, walks up the component tree
150
+ * to find the outermost registered component whose firstRenderedTag matches this selectorId.
151
+ * This is used to select the component when clicking on its root DOM element.
152
+ *
153
+ * IMPORTANT: This only returns a component if the anchorSelectorId is the IMMEDIATE parent
154
+ * of the component (i.e., the component doesn't have any intermediate nodes between itself
155
+ * and the anchor). This prevents inner HTML elements from being treated as component roots.
156
+ *
157
+ * ONLY returns registered components (isSbComponent: true). Unregistered wrapper components
158
+ * are treated as transparent and skipped.
159
+ *
160
+ * Returns undefined if no registered component has this as its firstRenderedTag.
161
+ */
162
+ getOutermostComponentForFirstRenderedTag(anchorSelectorId: SbSelector): SbSelector | undefined;
163
+ }
164
+ //#endregion
165
+ //#region src/edit-mode/features/ai-store.d.ts
166
+ declare class AiManager {
167
+ private readonly runtimeTrackingStore;
168
+ private _isTaggingEnabled;
169
+ private _isEditing;
170
+ private _editingComponents;
171
+ private _contextMode;
172
+ private _targetedComponents;
173
+ private _targetedSelectors;
174
+ private _hasHadSuccessfulBuild;
175
+ private _hasEverHadSuccessfulBuild;
176
+ constructor(runtimeTrackingStore: RuntimeTrackingStore);
177
+ getIsTaggingEnabled(): boolean;
178
+ getIsEditing(): boolean;
179
+ getShouldShowLoader(): boolean;
180
+ setIsTaggingEnabled(isTaggingEnabled: boolean): void;
181
+ getAiContextMode(): AiContextMode;
182
+ shouldToggleComponentInAiContext(): boolean;
183
+ getTargetedComponents(): `SB-${string}`[];
184
+ getTargetedSelectors(): `S-${string}`[];
185
+ isEditingComponent(id: SbElement): boolean;
186
+ isTargetingComponent(id: SbElement): boolean;
187
+ startEditing(): void;
188
+ setEditingComponents(components: SbElement[]): void;
189
+ finishEditing(): void;
190
+ setAiContextMode(mode: AiContextMode, components?: {
191
+ id: SbElement;
192
+ selectorId?: SbSelector;
193
+ }[]): void;
194
+ addTargetedSelector(selectorId: SbSelector): void;
195
+ toggleTargetedSelector(selectorId: SbSelector): void;
196
+ isTargetedSelector(selectorId: SbSelector): boolean;
197
+ /**
198
+ * Returns true if we are targeting a different selector of the same source id, since in some cases we want to keep
199
+ * the same source targeted, but just highlight another selector of it
200
+ */
201
+ isAlternateSourceIdTarget(sourceId: SbElement, selectorId: SbSelector): boolean;
202
+ handleRuntimeError(data: RuntimeErrorData): void;
203
+ clearRuntimeError(id: string): void;
204
+ markFirstBuildSuccess(): void;
205
+ private notifyLoaderState;
206
+ private removeAllSharedSelectors;
207
+ private removeAllSelectorsForSource;
208
+ }
209
+ //#endregion
210
+ //#region src/edit-mode/features/connection-manager.d.ts
211
+ type ConnectionStatus = "pre-init" | "disconnected" | "connecting" | "connected";
212
+ declare class ConnectionManager {
213
+ connectionStatus: ConnectionStatus;
214
+ constructor();
215
+ initializeSocket(): void;
216
+ connect(): void;
217
+ disconnect(): void;
218
+ }
219
+ //#endregion
220
+ //#region src/edit-mode/features/operation-store.d.ts
221
+ type OptimisticOperation<P> = {
222
+ type: keyof EditOperations;
223
+ payload: P;
224
+ id: string;
225
+ callback?: () => void;
226
+ };
227
+ type ReparentTransaction = OptimisticOperation<ReparentRequest>;
228
+ type SetPropertiesTransaction = OptimisticOperation<SetPropertiesRequest>;
229
+ type SetPropertyTransaction = OptimisticOperation<SetPropertyRequest>;
230
+ type CreateComponentTransaction = OptimisticOperation<CreateRequest>;
231
+ type DeleteComponentsTransaction = OptimisticOperation<DeleteRequest>;
232
+ type PendingTransaction = ReparentTransaction | SetPropertiesTransaction | SetPropertyTransaction | CreateComponentTransaction | DeleteComponentsTransaction;
233
+ declare class OperationManager {
234
+ private pendingTransactions;
235
+ private waitingForBatch;
236
+ private batchOperations;
237
+ private batchOperationTransactionId;
238
+ visibleSourceIds: string[];
239
+ constructor();
240
+ get allPendingTransactions(): PendingTransaction[];
241
+ get pendingDeleteOperations(): DeleteComponentsTransaction[];
242
+ get pendingSetPropertiesOperations(): SetPropertiesTransaction[];
243
+ get hasPendingOperations(): boolean;
244
+ get allNames(): never[];
245
+ private executeOrAddToBatch;
246
+ private addPendingTransaction;
247
+ clearPendingTransactions(transactionIds: string[]): void;
248
+ batchUpdate(performOperations: () => void): void;
249
+ createComponent(payload: CreateRequest): void;
250
+ dropComponent(action: {
251
+ from: {
252
+ source: SourceLocation;
253
+ };
254
+ to: {
255
+ source: SourceLocation;
256
+ };
257
+ propsToChange?: Record<string, PropertyInfo>;
258
+ }): void;
259
+ deleteComponents(sourceIds: SbElement[]): void;
260
+ acknowledgeEditOperation(operation: EditOperationPayload<EditOperationType>): void;
261
+ writeRuntimeProperties(sourceId: SbElement, transactionId: string, updates: Record<string, PropertyInfo<unknown>>): void;
262
+ setWidgetProperties({
263
+ sourceId,
264
+ properties,
265
+ callback
266
+ }: {
267
+ sourceId: SbElement;
268
+ properties: Record<string, PropertyInfo<unknown>>;
269
+ callback?: () => void;
270
+ }): void;
271
+ setWidgetProperty({
272
+ sourceId,
273
+ property,
274
+ value,
275
+ callback
276
+ }: {
277
+ sourceId: SbElement;
278
+ property: string;
279
+ value: PropertyInfo<unknown>;
280
+ callback?: () => void;
281
+ }): void;
282
+ ensureFilesSynced(): Promise<void>;
283
+ generateSourceId(): `SB-${string}`;
284
+ }
285
+ //#endregion
286
+ //#region src/edit-mode/features/properties-panel-manager.d.ts
287
+ declare class PropertiesPanelManager {
288
+ readonly editStore: EditStore;
289
+ readonly componentsManager: ComponentRegistry;
290
+ private propertiesDefinitions;
291
+ private propertiesPanelTrackerDisposer;
292
+ private _propertyLookupCache;
293
+ private removeHotReloadListener;
294
+ constructor(editStore: EditStore, componentsManager: ComponentRegistry);
295
+ getPropertiesPanel(selectorId: SbSelector): PropertiesPanelDefinition$1;
296
+ trackPropertiesPanel(selectorId: SbSelector): void;
297
+ untrackPropertiesPanel(): void;
298
+ getPropertiesDefinition(type: string): PropertiesDefinition | undefined;
299
+ setPropertiesDefinition(widgetType: string, propertiesDefinition: PropertiesDefinition): void;
300
+ updatePropertiesDefinitionForType(type: string): void;
301
+ computeAndApplySideEffectsForPropertyUpdate(payload: {
302
+ sourceId: SbElement;
303
+ updates: Record<string, PropertyInfo<unknown>>;
304
+ }): Record<SbElement, Record<string, PropertyInfo<unknown>>>;
305
+ /**
306
+ * When a custom component's source code is updated, we want to update the properties definition for that component.
307
+ * In order to do that, we need to listen to vite's hot reload events. We can't put import.meta.hot calls in the library
308
+ * because Vite just compiled all of those out in library builds, so we inject a listener from the plugin instead.
309
+ * https://github.com/vitejs/vite/blob/v6.2/packages/vite/src/node/plugins/define.ts#L37
310
+ */
311
+ private attachHotReloadListener;
312
+ }
313
+ //#endregion
314
+ //#region src/edit-mode/features/resizing-store.d.ts
315
+ type ResizeState = {
316
+ selectorId: SbSelector;
317
+ sourceId: SbElement;
318
+ dragStartX: number;
319
+ dragStartY: number;
320
+ start: {
321
+ width: number;
322
+ height: number;
323
+ };
324
+ resizedPosition: string;
325
+ widthToUpdate: Dim | null;
326
+ heightToUpdate: Dim | null;
327
+ isApplyingResize: boolean;
328
+ };
329
+ declare class ResizingManager {
330
+ private root;
331
+ private _activeResizes;
332
+ constructor(root: RootStore);
333
+ get activeResize(): ResizeState | null | undefined;
334
+ private isLockedAspectRatio;
335
+ startResizing(dragStartX: number, dragStartY: number, selectorId: SbSelector, position: string): void;
336
+ private calculateDimension;
337
+ private handleResizeDimension;
338
+ resizeWidget(currentX: number, currentY: number, selectorId: SbSelector, canResizeWidth: boolean, canResizeHeight: boolean): void;
339
+ pendingResize(sourceId: SbElement): {
340
+ width: Dim | null;
341
+ height: Dim | null;
342
+ } | null;
343
+ get hasAnyPendingResize(): boolean;
344
+ get pendingResizes(): ResizeState[];
345
+ applyResize(selectorId: SbSelector): void;
346
+ }
347
+ //#endregion
348
+ //#region src/edit-mode/features/ui-store.d.ts
349
+ declare class UIStore {
350
+ readonly root: RootStore;
351
+ readonly editStore: EditStore;
352
+ resizing: ResizingManager;
353
+ private _selectedSourceIds;
354
+ private _selectedSelectorIds;
355
+ private _focusedSelectorId;
356
+ private _rootInstanceData;
357
+ private newComponentSelectPromise;
358
+ constructor(root: RootStore, editStore: EditStore);
359
+ getMostRelevantSelectorIdsForSourceId(sourceId: SbElement): SbSelector[];
360
+ isSourceSelected(sourceId: SbElement): boolean;
361
+ getSelectedSourceIds(): SbElement[];
362
+ getSelectedSelectorIds(): SbSelector[];
363
+ private get focusedSelectorId();
364
+ getFocusedSourceId(): SbElement | null;
365
+ getFocusedSelectorId(): SbSelector | null;
366
+ setSelectedSourceIds(sourceIds: SbElement[]): void;
367
+ private subscribeNewSourceIdsToRuntimeSync;
368
+ setSelectedSelectorIds(selectorIds: SbSelector[]): void;
369
+ setFocusedIds(selectorId: SbSelector | null): void;
370
+ selectWidget(selectorId: SbSelector | null, _addToSelection?: boolean): void;
371
+ /**
372
+ * This is cursed because component selection actually needs to be done by instance ids, but
373
+ * instance IDs are only guaranteed to be stable after the component is rendered, while source IDs
374
+ * are assigned by the source tracker.
375
+ *
376
+ * If _any_ other selection comes in before we select something, we will cancel this reaction
377
+ */
378
+ selectNewComponentBySourceId(sourceId: SbElement, selectorIdsToIgnore?: Set<`S-${string}`>): Promise<void>;
379
+ }
380
+ //#endregion
381
+ //#region src/edit-mode/runtime-sync/runtime-subscriptions-store.d.ts
382
+ /**
383
+ * MobX store that manages runtime component subscriptions.
384
+ * Tracks which components are subscribed and builds fresh composites on-demand.
385
+ * The subscriptions getter allows startEditorSync reactions to track deep observables
386
+ * from buildComposite, eliminating the need for manual reaction management.
387
+ */
388
+ declare class RuntimeSubscriptionsStore {
389
+ readonly editStore: EditStore;
390
+ private subscribedSourceIds;
391
+ constructor(editStore: EditStore);
392
+ subscribe(sourceId: SbElement): void;
393
+ unsubscribe(sourceId: SbElement): void;
394
+ clearAll(): void;
395
+ get subscriptions(): Record<SbElement, RuntimeSyncComposite | null>;
396
+ }
397
+ //#endregion
398
+ //#region src/edit-mode/edit-store.d.ts
399
+ declare global {
400
+ interface Window {
401
+ _SB_ENABLE_SESSION_RECORDING?: boolean;
402
+ __SUPERBLOCKS_EDITOR_HOOK__: InstanceType<typeof EditStore>;
403
+ }
404
+ }
405
+ declare class EditStore {
406
+ ui: UIStore;
407
+ operationManager: OperationManager;
408
+ propertiesPanelManager: PropertiesPanelManager;
409
+ runtimeTrackingStore: RuntimeTrackingStore;
410
+ connectionManager: ConnectionManager;
411
+ ai: AiManager;
412
+ runtimeSubscriptionsStore: RuntimeSubscriptionsStore;
413
+ isInitialized: boolean;
414
+ recordingInitialized: boolean;
415
+ interactionMode: InteractionMode;
416
+ lastInteractionMode: InteractionMode;
417
+ isDesignModeLocked: boolean;
418
+ designModeDisabled: boolean;
419
+ private viteMessageListeners;
420
+ constructor(rootStore: RootStore);
421
+ setIsInitialized(isInitialized: boolean): void;
422
+ setDesignModeDisabled(disabled: boolean): void;
423
+ setInteractionMode(mode: InteractionMode, notifyEditor?: boolean): void;
424
+ setDesignModeLocked(locked: boolean): void;
425
+ onViteMessage<T extends ViteMessageKind, Message extends Extract<ViteMessage, {
426
+ kind: T;
427
+ }>>(kind: T, callback: (message: Message) => void): () => void;
428
+ triggerViteMessage<T extends ViteMessageKind, Message extends Extract<ViteMessage, {
429
+ kind: T;
430
+ }>>(kind: T, message: Message): void;
431
+ startRecording(recording: {
432
+ userId: string;
433
+ appId: string;
434
+ sessionRecordingKey: string;
435
+ }): void;
436
+ }
437
+ //#endregion
438
+ //#region src/lib/internal-details/lib/types.d.ts
439
+ type ExecutionError = {
440
+ name?: string;
441
+ message: string;
442
+ formPath: string;
443
+ blockPath: string;
444
+ handled?: boolean;
445
+ };
446
+ type ExecutionEventRequest = {
447
+ summary: string;
448
+ metadata: {
449
+ placeHoldersInfo?: Record<string, PlaceholderInfo>;
450
+ };
451
+ };
452
+ type Resolutions = Record<string, // name of the field: eg: "range", for the range field let's say the code is {{[1,2,3]}}
453
+ {
454
+ value: any;
455
+ bindings: any[];
456
+ }>;
457
+ type ExecutionEvent = {
458
+ name: string;
459
+ type: string;
460
+ timestamp: string;
461
+ start?: Record<string, unknown>;
462
+ end?: {
463
+ performance?: {
464
+ start: string | number;
465
+ finish: string | number;
466
+ total: string | number;
467
+ execution: string | number;
468
+ overhead: string | number;
469
+ };
470
+ error?: ExecutionError;
471
+ output?: {
472
+ result?: any;
473
+ request?: string;
474
+ requestV2?: ExecutionEventRequest;
475
+ stdout?: Array<string>;
476
+ stderr?: Array<string>;
477
+ };
478
+ resolved?: Resolutions;
479
+ };
480
+ parent: string;
481
+ };
482
+ interface StreamEvent {
483
+ result: {
484
+ event: ExecutionEvent;
485
+ execution: string;
486
+ };
487
+ }
488
+ type RouteInfo = Omit<UrlState, "host" | "hostname" | "href" | "port" | "protocol">;
489
+ /**
490
+ * Schema representation for SDK API input/output/chunk schemas.
491
+ * Contains both TypeScript and JSON Schema formats for display in the UI.
492
+ */
493
+ interface SdkApiSchemaInfo {
494
+ /** TypeScript type string representation, e.g., "{ userId: string; limit?: number }" */
495
+ typescript: string;
496
+ /** JSON Schema representation for the schema */
497
+ jsonSchema: object;
498
+ }
499
+ /**
500
+ * Metadata for an SDK API, sent from the library to ui-code-mode
501
+ * when an SDK API is registered.
502
+ */
503
+ interface SdkApiMetadata {
504
+ /** Unique name of the API */
505
+ name: string;
506
+ /** Plain-language summary of what this API does */
507
+ description?: string;
508
+ /** Input schema information */
509
+ inputSchema: SdkApiSchemaInfo;
510
+ /** Output schema information (for non-streaming APIs) */
511
+ outputSchema?: SdkApiSchemaInfo;
512
+ /** Chunk schema information (for streaming APIs) */
513
+ chunkSchema?: SdkApiSchemaInfo;
514
+ /** Whether this is a streaming API */
515
+ isStreaming: boolean;
516
+ /** Declared integrations for this API */
517
+ integrations: Array<{
518
+ /** Key used in the API code to reference this integration */key: string; /** Plugin ID (e.g., "postgres", "slack") */
519
+ pluginId: string; /** Integration name (e.g., "Production Postgres") */
520
+ name: string; /** Integration ID (UUID) */
521
+ id: string;
522
+ }>;
523
+ /** Entry point file path relative to app root (e.g. "server/apis/GetUsers/api.ts") */
524
+ entryPoint?: string;
525
+ /** Original export name in the source file (set for named exports, undefined for default exports) */
526
+ exportName?: string;
527
+ /** TypeScript source code of the API */
528
+ sourceCode?: string;
529
+ }
530
+ type RouteChangePayload = Omit<UrlState, "host" | "hostname" | "href" | "pathname" | "port" | "protocol">;
531
+ type AiUpdatesPayload = {
532
+ parentToChild: {
533
+ type: "start-editing";
534
+ components?: SbElement[];
535
+ } | {
536
+ type: "finish-editing";
537
+ } | {
538
+ type: "update-editing-entities";
539
+ components: SbElement[];
540
+ } | {
541
+ type: "set-ai-context-mode";
542
+ mode: AiContextMode;
543
+ components?: {
544
+ id: SbElement;
545
+ selectorId?: SbSelector;
546
+ }[];
547
+ } | {
548
+ type: "set-tagging-enabled";
549
+ isTaggingEnabled: boolean;
550
+ };
551
+ childToParent: {
552
+ type: "add-component-to-context";
553
+ component: SbElement;
554
+ label?: string;
555
+ selectorId?: SbSelector;
556
+ } | {
557
+ type: "toggle-component-in-context";
558
+ component: SbElement;
559
+ label?: string;
560
+ selectorId: SbSelector;
561
+ } | {
562
+ type: "set-ai-context-mode";
563
+ mode: AiContextMode;
564
+ } | {
565
+ type: "ai-generate";
566
+ prompt: string;
567
+ } | {
568
+ type: "loader-state";
569
+ shouldShowLoader: boolean;
570
+ };
571
+ };
572
+ /**
573
+ * Lightweight agent metadata sent from parent to library.
574
+ * Allows the library to locally filter agents by profile,
575
+ * eliminating the async round-trip when profiles change.
576
+ */
577
+ type AgentInfo = {
578
+ url: string;
579
+ tags: Record<string, string[]>;
580
+ environment: string;
581
+ };
582
+ /** Profile metadata sent between parent and library for orchestrator API calls. */
583
+ type SdkProfileInfo = {
584
+ id: string;
585
+ name: string;
586
+ key: string;
587
+ };
588
+ /**
589
+ * Why the app preview is (or isn't) ready for a screenshot, in increasing
590
+ * readiness:
591
+ * - "not-rendered": app shell (`sb-provider-root`) absent — preview hasn't
592
+ * mounted (e.g. still building or migrating). Nothing meaningful to capture;
593
+ * NOT a visual verdict.
594
+ * - "loading": shell exists but page still loading (full-page spinner or other
595
+ * significant loading indicators). Capturing is useful so the agent can see
596
+ * the loading state and retry.
597
+ * - "not-found": shell exists but the current route rendered the Superblocks
598
+ * not-found page. This is a verification failure, not a useful screenshot.
599
+ * - "ready": shell exists, no spinner or loading indicators.
600
+ */
601
+ type ScreenshotReadyReason = "ready" | "loading" | "not-rendered" | "not-found";
602
+ type FromParentToChildMessageTypesMap = {
603
+ "sb-init": InitData;
604
+ "sb-bootstrap-response": {
605
+ userId?: string;
606
+ appId: string;
607
+ token: string;
608
+ accessToken: string;
609
+ /**
610
+ * Explicit authorization for the code-mode dev server. Consumers must not
611
+ * substitute API execution auth when this is null.
612
+ */
613
+ devServerAuthorization: string | null;
614
+ /**
615
+ * Pre-filtered agent URLs for the current profile.
616
+ * Used as fallback for cloud orgs where agent URLs are
617
+ * derived from SUPERBLOCKS_UI_AGENT_BASE_URL, not from
618
+ * agent metadata.
619
+ */
620
+ agentUrls: string[];
621
+ /**
622
+ * Full on-premise agent metadata (all profiles) for local
623
+ * profile-based filtering, eliminating the async round-trip
624
+ * when profiles change. Empty array for cloud orgs.
625
+ */
626
+ agents: AgentInfo[];
627
+ logContext: Record<string, unknown>;
628
+ featureFlags?: Record<string, unknown>;
629
+ sessionRecordingKey?: string; /** Selected integration profile for API execution */
630
+ profile?: SdkProfileInfo; /** Current git branch name (editor mode only) */
631
+ branchName?: string; /** Deployed/preview commit ID (non-editor modes) */
632
+ commitId?: string;
633
+ /**
634
+ * DP routing config mapping profile keys to DP URLs.
635
+ * Only populated when dataPlaneGatewayEnabled is true.
636
+ * Used by the library to route execution requests to the
637
+ * correct DP based on the selected profile.
638
+ */
639
+ dpRoutingConfig?: Record<string, string>;
640
+ };
641
+ "sb-editor-request-bootstrap": {
642
+ forceRefreshScopedToken?: boolean;
643
+ };
644
+ "sb-update-active-agents": {
645
+ /** Pre-filtered URLs for current profile (cloud org fallback) */agentUrls: string[]; /** All active on-premise agents for local profile filtering */
646
+ agents: AgentInfo[];
647
+ /**
648
+ * DP routing config mapping profile keys to DP URLs.
649
+ * Only populated when dataPlaneGatewayEnabled is true.
650
+ */
651
+ dpRoutingConfig?: Record<string, string>;
652
+ };
653
+ /**
654
+ * Sent when execution context changes (e.g. profile or branch switch)
655
+ * so the library can update its orchestrator call parameters.
656
+ */
657
+ "sb-update-sdk-context": {
658
+ profile?: SdkProfileInfo;
659
+ branchName?: string;
660
+ commitId?: string;
661
+ };
662
+ "sb-update-token": {
663
+ authorization: string | undefined;
664
+ };
665
+ "sb-update-property-with-effects": {
666
+ sourceId: string;
667
+ callbackId: string;
668
+ updates: Record<string, PropertyInfo<unknown>>;
669
+ transaction: TransactionInfo;
670
+ };
671
+ "sb-edit-operation-acknowledge": EditOperationPayload<EditOperationType>;
672
+ "sb-retrieve-property-panel-props": {
673
+ sourceId: string;
674
+ };
675
+ "sb-global-sync": {
676
+ global: Record<string, unknown>;
677
+ };
678
+ "parent-action-batch": PayloadAction<unknown>[];
679
+ click: void;
680
+ "register-keypress": {
681
+ keys: string;
682
+ options?: any;
683
+ };
684
+ "canvas-scale-update": {
685
+ canvasScaleFactor: number;
686
+ };
687
+ /**
688
+ * Resolve a promise created by addNewPromise.
689
+ * Note: callbackId must be at the top level, not nested in payload.
690
+ * Payload contains the resolution value.
691
+ */
692
+ "resolve-promise": unknown;
693
+ /**
694
+ * Reject a promise created by addNewPromise.
695
+ * Note: callbackId must be at the top level, not nested in payload.
696
+ * Payload contains the error object.
697
+ */
698
+ "reject-promise": unknown;
699
+ "flash-element": {
700
+ elementId: string;
701
+ };
702
+ "set-theme": {
703
+ theme: unknown;
704
+ updateRedux?: boolean;
705
+ storedTypographies?: unknown;
706
+ };
707
+ getDropTarget: {
708
+ parentId: string;
709
+ };
710
+ keypress: {
711
+ keys: string;
712
+ eventInfo: {
713
+ code: string;
714
+ key: string;
715
+ altKey: boolean;
716
+ ctrlKey: boolean;
717
+ shiftKey: boolean;
718
+ };
719
+ };
720
+ dragstart: Record<string, unknown> & {
721
+ type: string;
722
+ };
723
+ "sb-create-component": {
724
+ componentType: string;
725
+ parent: SourceLocation;
726
+ scopeName: string;
727
+ baseProperties?: Record<string, PropertyInfo>;
728
+ skipSecondaryComponentsCreation?: boolean;
729
+ otherComponentsUpdates?: Record<SbElement, Record<string, PropertyInfo>>;
730
+ };
731
+ "set-interaction-mode": {
732
+ interactionMode: InteractionMode;
733
+ };
734
+ /**
735
+ * Request a route change in the child
736
+ */
737
+ "route-change": RouteChangePayload;
738
+ "ai-updates": AiUpdatesPayload["parentToChild"];
739
+ /**
740
+ * Runtime sync: subscribe and unsubscribe to component updates
741
+ */
742
+ "runtime/subscribe-component": {
743
+ sourceId: SbElement;
744
+ };
745
+ "runtime/unsubscribe-component": {
746
+ sourceId: SbElement;
747
+ };
748
+ /**
749
+ * Request a screenshot capture from the iframe
750
+ */
751
+ "capture-screenshot": {
752
+ callbackId: string;
753
+ /**
754
+ * If true, capture immediately without waiting for APIs to finish.
755
+ * Useful for capturing loading-state shimmers/skeletons.
756
+ */
757
+ captureLoadingState?: boolean;
758
+ /**
759
+ * Optional CSS selector to target a specific element for the screenshot.
760
+ * If provided, only the matched element will be captured instead of the full page.
761
+ * Falls back to the root element if the selector doesn't match or the element has no dimensions.
762
+ */
763
+ selector?: string;
764
+ };
765
+ /**
766
+ * Ping to check if the app is ready for screenshot (sb-provider-root exists and spinner is gone)
767
+ */
768
+ "ping-app-ready-for-screenshot": {
769
+ callbackId: string;
770
+ };
771
+ /**
772
+ * Update embed properties from the external embedder
773
+ */
774
+ "embed-property-change": {
775
+ properties: Record<string, unknown>;
776
+ };
777
+ /**
778
+ * Trigger an event inside the embedded app from the external embedder
779
+ */
780
+ "embed-trigger-event": {
781
+ eventName: string;
782
+ payload: Record<string, unknown>;
783
+ };
784
+ /**
785
+ * Request DOM metadata (bounding rect, opening tag HTML) for tagged components
786
+ */
787
+ "get-tagged-element-metadata": {
788
+ callbackId: string;
789
+ sourceIds: string[];
790
+ };
791
+ /**
792
+ * Request the TypeScript source code for an SDK API.
793
+ */
794
+ "sdk-get-api-code": {
795
+ name: string;
796
+ callbackId: string;
797
+ };
798
+ };
799
+ type FromParentToChildMessageTypes = keyof FromParentToChildMessageTypesMap;
800
+ /**
801
+ * Where an `sb-load-error` originated:
802
+ * - `early_relay`: the HTML classic script (module graph failed to evaluate).
803
+ * - `in_app`: the in-app error-capture global handler (crash before render).
804
+ * - `build_overlay`: the in-app Vite HMR build-error notification (app mounted).
805
+ * - `build_preload`: the injected build-error overlay for a Vite build error
806
+ * that fires before the app mounts, so no in-app UI exists — the editor shows
807
+ * its own before-render failure panel.
808
+ */
809
+ type LoadErrorSource = "build_overlay" | "build_preload" | "early_relay" | "in_app";
810
+ type FromChildToParentMessageTypesMap = {
811
+ "sb-ready": {
812
+ connectionStartTime?: number;
813
+ };
814
+ "sb-load-error": {
815
+ error: string;
816
+ /**
817
+ * Which capture path detected the failure. Drives the `source` tag on the
818
+ * editor's app-render-error metric. Optional for backward compatibility.
819
+ */
820
+ source?: LoadErrorSource;
821
+ };
822
+ "sb-clear-load-error": void;
823
+ "sb-app-frame-will-reload": void;
824
+ "iframe-action-batch": PayloadAction<unknown>[];
825
+ /**
826
+ * Navigate the parent window to a new URL
827
+ */
828
+ "navigate-to": {
829
+ url: string;
830
+ newWindow?: boolean;
831
+ };
832
+ "sb-iframe-track-changes": Record<string, unknown>;
833
+ /**
834
+ * Resolve a promise created by addNewPromise.
835
+ * Note: callbackId must be at the top level, not nested in payload.
836
+ * Payload contains the resolution value.
837
+ */
838
+ "resolve-promise": unknown;
839
+ /**
840
+ * Reject a promise created by addNewPromise.
841
+ * Note: callbackId must be at the top level, not nested in payload.
842
+ * Payload contains the error object.
843
+ */
844
+ "reject-promise": unknown;
845
+ "sb-editor-request-bootstrap": {
846
+ forceRefreshScopedToken?: boolean;
847
+ };
848
+ "reload-configs": void;
849
+ "sb-edit-operation-request": EditOperationPayload<EditOperationType>;
850
+ "client:selectWidgets": {
851
+ sourceIds: SbElement[];
852
+ selectorIdHint?: string;
853
+ };
854
+ "set-interaction-mode": {
855
+ interactionMode: InteractionMode;
856
+ };
857
+ getDropTargetResult: {
858
+ offset: XYCoord;
859
+ size: {
860
+ height: number;
861
+ width: number;
862
+ };
863
+ };
864
+ keypress: {
865
+ keys: string;
866
+ eventInfo: {
867
+ code: string;
868
+ key: string;
869
+ altKey: boolean;
870
+ ctrlKey: boolean;
871
+ shiftKey: boolean;
872
+ };
873
+ };
874
+ "register-click": {
875
+ type: string;
876
+ context: {
877
+ clientX: number;
878
+ clientY: number;
879
+ sourceId: string;
880
+ selectorId?: string;
881
+ };
882
+ };
883
+ "api/started-execution": {
884
+ apiName: string;
885
+ };
886
+ "api/set-api-response": {
887
+ apiName: string;
888
+ response: unknown;
889
+ };
890
+ "api/stream-event": {
891
+ event: StreamEvent;
892
+ apiName: string;
893
+ };
894
+ "api/stream-message": {
895
+ message: any;
896
+ apiName: string;
897
+ };
898
+ "authenticate-api-request": {
899
+ accessToken?: string;
900
+ apiId: string;
901
+ callbackId: string;
902
+ integrationIds?: string[];
903
+ profile?: SdkProfileInfo;
904
+ };
905
+ /**
906
+ * Execute an integration query as part of SDK API execution.
907
+ * The parent (ui-code-mode) will dispatch executeRequestToIntegration
908
+ * and resolve the promise with the result.
909
+ *
910
+ * For language plugins (Python, JavaScript), the input parameter contains
911
+ * bindings that should be passed to the API execution request for {{}} resolution.
912
+ */
913
+ "sdk-execute-query": {
914
+ integrationId: string;
915
+ request: Record<string, unknown>;
916
+ input?: Record<string, unknown>;
917
+ callbackId: string;
918
+ };
919
+ /**
920
+ * Resolve integration configs before SDK API execution.
921
+ * The parent (ui-code-mode) will look up each integration by ID,
922
+ * ensure it's authenticated, and return the resolved configs.
923
+ *
924
+ * This enables upfront auth checks before API execution starts.
925
+ */
926
+ "sdk-resolve-integrations": {
927
+ integrations: Array<{
928
+ key: string;
929
+ pluginId: string;
930
+ id: string;
931
+ }>;
932
+ callbackId: string;
933
+ };
934
+ "set-apis-deployed-mode": {
935
+ apis: Array<DeleteMeLibraryApi & {
936
+ scopeId: string;
937
+ }>;
938
+ callbackId: string;
939
+ };
940
+ /**
941
+ * Notify the parent of a route change
942
+ */
943
+ "route-change": RouteChangePayload;
944
+ "ai-updates": AiUpdatesPayload["childToParent"];
945
+ undo: void;
946
+ redo: void;
947
+ "socket/error": {
948
+ message: string;
949
+ connectionStartTime?: number;
950
+ };
951
+ "runtime-error": RuntimeErrorData;
952
+ "clear-runtime-error": {
953
+ id: string;
954
+ };
955
+ "console-log": ConsoleLogEntry;
956
+ "logout-integration": {
957
+ callbackId: string;
958
+ };
959
+ /**
960
+ * Posted exactly once when `retryConnection` exhausts its budget and gives
961
+ * up — the connection sequence is terminally abandoned and the user is
962
+ * shown a refresh-required state. Deliberately a distinct type from
963
+ * `app-websocket-connected` (whose unit is individual attempts): parents
964
+ * that predate it ignore it entirely instead of misclassifying it as one
965
+ * more per-attempt failure.
966
+ */
967
+ "app-websocket-exhausted": {
968
+ durationMs: number;
969
+ connectionStartTime?: number;
970
+ connectionType?: "initial" | "reconnect";
971
+ connectionTarget?: string;
972
+ error: {
973
+ message: string;
974
+ type: string;
975
+ };
976
+ };
977
+ "app-websocket-connected": {
978
+ success: boolean;
979
+ durationMs: number;
980
+ connectionStartTime?: number;
981
+ connectionType?: "initial" | "reconnect";
982
+ connectionTarget?: string;
983
+ error?: {
984
+ message: string;
985
+ type: string;
986
+ stack?: string;
987
+ };
988
+ };
989
+ /**
990
+ * Response to capture-screenshot request
991
+ */
992
+ "capture-screenshot-response": {
993
+ callbackId: string;
994
+ dataUrl?: string;
995
+ error?: string;
996
+ };
997
+ /**
998
+ * Response to ping-app-ready-for-screenshot request
999
+ */
1000
+ "ping-app-ready-for-screenshot-response": {
1001
+ callbackId: string;
1002
+ isReady: boolean;
1003
+ /**
1004
+ * Why the app is (or isn't) ready. Optional for backward compatibility with
1005
+ * older app builds that only send `isReady`; consumers must tolerate its
1006
+ * absence (treat missing as "ready" when isReady, else "not-rendered").
1007
+ */
1008
+ reason?: ScreenshotReadyReason;
1009
+ };
1010
+ /**
1011
+ * Emit an event from the embedded app to the external embedder
1012
+ */
1013
+ "embed-emit-event": {
1014
+ eventName: string;
1015
+ payload: Record<string, unknown>;
1016
+ };
1017
+ /**
1018
+ * Notify the parent when an SDK API is registered (loaded).
1019
+ * Contains metadata including input/output schemas for display in the UI.
1020
+ */
1021
+ "sdk-api-registered": {
1022
+ name: string;
1023
+ metadata: SdkApiMetadata;
1024
+ };
1025
+ /**
1026
+ * Notify the parent when an SDK API is unregistered (HMR unload).
1027
+ */
1028
+ "sdk-api-unregistered": {
1029
+ name: string;
1030
+ };
1031
+ /**
1032
+ * Notify the parent when an SDK API's source code has been updated.
1033
+ * Used for HMR to update the code viewer without full re-registration.
1034
+ */
1035
+ "sdk-api-source-updated": {
1036
+ name: string;
1037
+ sourceCode: string;
1038
+ };
1039
+ /**
1040
+ * Response to sdk-get-api-code request with the TypeScript source code.
1041
+ */
1042
+ "sdk-api-code-response": {
1043
+ callbackId: string;
1044
+ name: string;
1045
+ code?: string;
1046
+ error?: string;
1047
+ };
1048
+ /**
1049
+ * Notify the parent when an SDK API execution starts (from app code).
1050
+ * Used for tracking executions in the SDK API editor's execution log.
1051
+ */
1052
+ "sdk-api-execution-started": {
1053
+ executionId: string;
1054
+ apiName: string;
1055
+ input: Record<string, unknown>;
1056
+ };
1057
+ /**
1058
+ * Notify the parent when an SDK API execution completes successfully.
1059
+ */
1060
+ "sdk-api-execution-completed": {
1061
+ executionId: string;
1062
+ apiName: string;
1063
+ output: unknown;
1064
+ durationMs: number;
1065
+ diagnostics?: unknown[];
1066
+ orchestratorStartMs?: number;
1067
+ orchestratorDurationMs?: number;
1068
+ fetchStartMs?: number;
1069
+ timingBreakdown?: ExecutionTimingBreakdown;
1070
+ };
1071
+ /**
1072
+ * Notify the parent when an SDK API execution fails.
1073
+ */
1074
+ "sdk-api-execution-failed": {
1075
+ executionId: string;
1076
+ apiName: string;
1077
+ error: {
1078
+ code: string;
1079
+ message: string;
1080
+ };
1081
+ durationMs: number;
1082
+ diagnostics?: unknown[];
1083
+ orchestratorStartMs?: number;
1084
+ orchestratorDurationMs?: number;
1085
+ fetchStartMs?: number;
1086
+ timingBreakdown?: ExecutionTimingBreakdown;
1087
+ };
1088
+ } & AppToEditorMessage<PropertiesPanelDefinition$1>;
1089
+ type FromChildToParentMessageTypes = keyof FromChildToParentMessageTypesMap;
1090
+ //#endregion
1091
+ //#region src/lib/internal-details/location-store.d.ts
1092
+ declare class LocationStore {
1093
+ route?: RouteInfo;
1094
+ rootStore: RootStore;
1095
+ constructor(rootStore: RootStore);
1096
+ updateLocation(location: Location, routes: DataRouter["routes"], params: Readonly<Params<string>>): void;
1097
+ sendLocationToEditor(): void;
1098
+ private matchesToRoutePattern;
1099
+ locationToRouteInfo(location: Location, routes: DataRouter["routes"], params: Readonly<Params<string>>): RouteInfo | undefined;
1100
+ }
1101
+ //#endregion
1102
+ //#region src/lib/internal-details/lib/features/api-store.d.ts
1103
+ type ApiResult<T = any> = {
1104
+ data?: T;
1105
+ error?: string;
1106
+ };
1107
+ declare class ApiManager {
1108
+ readonly rootStore: RootStore;
1109
+ /**
1110
+ * Pre-filtered agent URLs for the current profile, sent by the parent.
1111
+ * Used as fallback for cloud orgs where URLs come from
1112
+ * SUPERBLOCKS_UI_AGENT_BASE_URL rather than agent metadata.
1113
+ */
1114
+ private _agentUrls;
1115
+ /**
1116
+ * Full on-premise agent metadata (all profiles) from the parent,
1117
+ * enabling local profile-based filtering without a postMessage
1118
+ * round-trip. Empty for cloud orgs.
1119
+ */
1120
+ private _agents;
1121
+ /**
1122
+ * DP routing config mapping profile keys to DP URLs, sent by the parent.
1123
+ * Only populated when dataPlaneGatewayEnabled is true.
1124
+ */
1125
+ private _dpRoutingConfig;
1126
+ private token;
1127
+ private accessToken;
1128
+ private runningApiControllers;
1129
+ private waitForInitApiPromise;
1130
+ private waitForBootstrapPromise;
1131
+ private resolveBootstrapPromise;
1132
+ private callContexts;
1133
+ /**
1134
+ * Flush pending file writes to DBFS, logging a warning if it blocks for
1135
+ * >50ms. Returns the elapsed time in ms so callers can record it in the
1136
+ * execution timing breakdown.
1137
+ */
1138
+ private timedEnsureFilesSynced;
1139
+ constructor(rootStore: RootStore);
1140
+ set agentUrls(urls: string[]);
1141
+ set agents(agents: AgentInfo[]);
1142
+ set dpRoutingConfig(config: Record<string, string>);
1143
+ setTokens(token: string, accessToken: string): void;
1144
+ clearTokens(): void;
1145
+ isInitialized(): boolean;
1146
+ /**
1147
+ * Get agent URLs for the given profile by filtering locally stored
1148
+ * agent metadata. Falls back to the pre-filtered `_agentUrls` when
1149
+ * no full agent metadata is available (cloud orgs or legacy parents).
1150
+ */
1151
+ private getAgentUrlsForProfile;
1152
+ /**
1153
+ * Selects a random agent URL from the available agents and returns it normalized
1154
+ * (with trailing slash) to ensure proper URL path joining.
1155
+ */
1156
+ private getRandomAgentBaseUrl;
1157
+ private awaitInitApiIfNeeded;
1158
+ private awaitBootstrapIfNeeded;
1159
+ notifyBootstrapComplete(): void;
1160
+ private prewarmExecutionPath;
1161
+ loadApiManifest({
1162
+ apis
1163
+ }: {
1164
+ apis?: Record<string, {
1165
+ api: DeleteMeLibraryApi;
1166
+ scopeId: string;
1167
+ }>;
1168
+ }): void;
1169
+ rerunApiByCallId(callId: string): Promise<ApiResult>;
1170
+ runApiByPath({
1171
+ path,
1172
+ inputs,
1173
+ callId,
1174
+ callback,
1175
+ isTestRun,
1176
+ injectedCallerId
1177
+ }: {
1178
+ path: string;
1179
+ inputs: SbApiRunOptions;
1180
+ callId?: string;
1181
+ callback?: () => Promise<unknown>;
1182
+ isTestRun?: boolean;
1183
+ injectedCallerId?: string;
1184
+ }): Promise<ApiResult>;
1185
+ private getHMRCallHash;
1186
+ private getCachedHMRExecution;
1187
+ private executeApi;
1188
+ private executeApiInternal;
1189
+ private findError;
1190
+ private extractStatusCode;
1191
+ /**
1192
+ * Extract step-level logs from execution events.
1193
+ * Captures console.log (stdout), console.error (stderr), output, and errors for each step.
1194
+ */
1195
+ private extractStepLogs;
1196
+ /**
1197
+ * Execute an SDK API directly via the orchestrator's v3/execute endpoint.
1198
+ * Reads execution context (profile, branch, tokens) from rootStore so the
1199
+ * caller doesn't need to resolve them through the parent frame.
1200
+ */
1201
+ executeSdkApiV3(apiName: string, inputs: Record<string, unknown>, options?: {
1202
+ signal?: AbortSignal;
1203
+ }): Promise<{
1204
+ success: boolean;
1205
+ output?: unknown;
1206
+ error?: {
1207
+ code: string;
1208
+ message: string;
1209
+ };
1210
+ diagnostics?: unknown[];
1211
+ executionStartMs?: number;
1212
+ executionDurationMs?: number;
1213
+ fetchStartMs?: number;
1214
+ timingBreakdown?: ExecutionTimingBreakdown;
1215
+ }>;
1216
+ cancelApi(apiName: string, _scopeId?: string): Promise<void>;
1217
+ }
1218
+ //#endregion
1219
+ //#region src/lib/internal-details/lib/root-store.d.ts
1220
+ /**
1221
+ * User information extracted from JWT for SDK API execution.
1222
+ * Matches the ApiUser interface from @superblocksteam/sdk-api.
1223
+ */
1224
+ interface SdkApiUser {
1225
+ /** Unique user identifier from JWT */
1226
+ readonly userId: string;
1227
+ /** User's email address (if available) */
1228
+ readonly email?: string;
1229
+ /** User's display name (if available) */
1230
+ readonly name?: string;
1231
+ /** User's group memberships from JWT */
1232
+ readonly groups: string[];
1233
+ /** Custom claims from JWT */
1234
+ readonly customClaims: Readonly<Record<string, unknown>>;
1235
+ }
1236
+ declare class RootStore {
1237
+ apis: ApiManager;
1238
+ componentRegistry: ComponentRegistry;
1239
+ editStore?: EditStore;
1240
+ locationStore: LocationStore;
1241
+ currentPageScopeId: string | undefined;
1242
+ applicationId: string | undefined;
1243
+ userId: string | undefined;
1244
+ windowOriginUrl: string | undefined;
1245
+ /**
1246
+ * Current user info for SDK API execution.
1247
+ * Populated from JWT claims when available.
1248
+ */
1249
+ sdkUser: SdkApiUser;
1250
+ /**
1251
+ * Whether the SDK API feature is enabled.
1252
+ * Derived from the application's templateName (see `isSdkApiTemplate()`).
1253
+ * Passed to the library via the `clark.sdk-api.enabled` bootstrap flag.
1254
+ * When false, the YAML-based API system is used instead.
1255
+ */
1256
+ sdkApiEnabled: boolean;
1257
+ /**
1258
+ * Whether execute requests should be routed through the data plane gateway
1259
+ * endpoint instead of direct agent URLs.
1260
+ * Passed to the library via the ui.data-plane-gateway.enabled bootstrap flag.
1261
+ */
1262
+ dataPlaneGatewayEnabled: boolean;
1263
+ orchestratorExecuteResponseSizeLimitBytes: number | undefined;
1264
+ /** Selected integration profile for orchestrator API calls */
1265
+ profile: SdkProfileInfo | undefined;
1266
+ /** Current git branch name for editor-mode API execution */
1267
+ branchName: string | undefined;
1268
+ /** Deployed/preview commit ID for non-editor API execution */
1269
+ commitId: string | undefined;
1270
+ /**
1271
+ * Maps API name → entryPoint path (relative to app root).
1272
+ * Populated by sdk-api-discovery during edit mode.
1273
+ * Used by executeSdkApiV3 to resolve the correct file path for the orchestrator.
1274
+ */
1275
+ apiEntryPoints: Map<string, string>;
1276
+ /**
1277
+ * Maps API name → original export name in the source file.
1278
+ * Set for named exports (e.g. `export const GetUsers = api({...})`).
1279
+ * Undefined/absent for default exports.
1280
+ * Used by executeSdkApiV3 to send the correct `exportName` to the orchestrator.
1281
+ */
1282
+ apiExportNames: Map<string, string>;
1283
+ /**
1284
+ * Maps API name → statically declared integrations.
1285
+ * Populated during edit-mode discovery and from the deployed build manifest.
1286
+ */
1287
+ apiIntegrations: Map<string, IntegrationDeclaration[]>;
1288
+ /**
1289
+ * Resolves when the initial SDK API discovery pass completes.
1290
+ * executeSdkApiV3 awaits this so callers don't race against discovery.
1291
+ */
1292
+ private _discoveryPromise;
1293
+ private _resolveDiscovery;
1294
+ private editorRegisteredCallbacks;
1295
+ constructor();
1296
+ /**
1297
+ * Updates the SDK user info from JWT claims or bootstrap data.
1298
+ */
1299
+ setSdkUser(user: Partial<SdkApiUser>): void;
1300
+ /**
1301
+ * Sets the SDK API feature flag state.
1302
+ * Called during bootstrap with the value from feature flags.
1303
+ *
1304
+ * When enabling, pre-initializes the discovery gate immediately so that
1305
+ * any component whose useEffect runs before IframeConnected's reaction
1306
+ * useEffect (children run before parents in React) will correctly block
1307
+ * on awaitDiscovery() instead of resolving immediately with no entry points.
1308
+ */
1309
+ setSdkApiEnabled(enabled: boolean): void;
1310
+ setDataPlaneGatewayEnabled(enabled: boolean): void;
1311
+ setOrchestratorExecuteResponseSizeLimitBytes(value: unknown): void;
1312
+ setProfile(profile: SdkProfileInfo | undefined): void;
1313
+ setBranchName(branchName: string | undefined): void;
1314
+ setCommitId(commitId: string | undefined): void;
1315
+ setApiEntryPoint(apiName: string, entryPoint: string): void;
1316
+ getApiEntryPoint(apiName: string): string | undefined;
1317
+ setApiExportName(apiName: string, exportName: string): void;
1318
+ getApiExportName(apiName: string): string | undefined;
1319
+ clearApiEntryPoints(): void;
1320
+ setApiIntegrations(apiName: string, integrations: IntegrationDeclaration[]): void;
1321
+ getApiIntegrations(apiName: string): IntegrationDeclaration[] | undefined;
1322
+ clearApiIntegrations(): void;
1323
+ /**
1324
+ * Initialise (or re-initialise) the discovery gate. Called when discovery
1325
+ * starts so that executeSdkApiV3 awaits before checking entry points.
1326
+ * Always creates a fresh promise so HMR re-discovery is also gated.
1327
+ * Resolves any in-flight promise before replacing it so callers awaiting
1328
+ * the old gate (e.g. from before HMR re-triggered discovery) do not hang.
1329
+ */
1330
+ initDiscoveryGate(): void;
1331
+ /**
1332
+ * Signal that the initial discovery pass has finished (success or failure).
1333
+ */
1334
+ notifyDiscoveryComplete(): void;
1335
+ /**
1336
+ * Returns true if a discovery gate exists and has not yet been resolved.
1337
+ * Used by discoverAndRegisterSdkApis to avoid re-initializing the gate
1338
+ * when setSdkApiEnabled already pre-initialized it.
1339
+ */
1340
+ hasUnresolvedGate(): boolean;
1341
+ /**
1342
+ * Returns a promise that resolves once initial discovery has completed.
1343
+ * Resolves immediately if discovery already finished or was never started.
1344
+ */
1345
+ awaitDiscovery(): Promise<void>;
1346
+ setEditStore(editStore: EditStore): void;
1347
+ notifyEditorRegistered(): void;
1348
+ onEditorRegistered(fn: () => void): void;
1349
+ }
1350
+ //#endregion
1351
+ //#region src/lib/internal-details/lib/features/component-registry.d.ts
1352
+ type DefaultTagNames = {
1353
+ container: string;
1354
+ button: string;
1355
+ text: string;
1356
+ };
1357
+ /**
1358
+ * TODO: The component registry could be split into two a thin layer always on, and move some stuff to the EditStore.
1359
+ * Some of the actions (rename, delete) and some of the data (isDroppable) are editor-only.
1360
+ */
1361
+ declare class ComponentRegistry implements ComponentRegistryShareState {
1362
+ readonly rootStore: RootStore;
1363
+ private _componentRegistry;
1364
+ private _componentToType;
1365
+ private _defaultContainerType;
1366
+ private _defaultButtonType;
1367
+ private _defaultTextType;
1368
+ constructor(rootStore: RootStore);
1369
+ private getOrCreateMetadata;
1370
+ addComponent(type: string, rawComponent: React$2.ElementType, propertiesDefinition: PropertiesDefinition): void;
1371
+ deleteComponent(type: string): void;
1372
+ renameComponent(oldName: string, newName: string): void;
1373
+ addManagedProps(type: string, props: ManagedPropsList): void;
1374
+ deleteManagedProps(type: string): void;
1375
+ addEditorTemplate(type: string, template: EditorTemplate<any>): void;
1376
+ getEditorTemplates(type: string): EditorTemplate<any>[] | undefined;
1377
+ getEditorConfigFromComponentType(type: any): EditorConfig$1<any> | undefined;
1378
+ addEditorConfig(type: string, config: EditorConfig$1): void;
1379
+ addInternalProps(type: string, props: Array<{
1380
+ path: string;
1381
+ factory: () => any;
1382
+ }>): void;
1383
+ getInternalProps(type: string): Array<{
1384
+ path: string;
1385
+ factory: () => any;
1386
+ }>;
1387
+ getEditorConfig(type: string): EditorConfig$1<any> | undefined;
1388
+ get entityDefinitions(): Record<string, EntityDefinition>;
1389
+ get libraryComponentCatalogs(): CatalogWithInternalDetails[];
1390
+ get libraryComponentEditorConfigs(): Record<string, EditorConfig$1<any>>;
1391
+ get customComponentList(): string[];
1392
+ get containerTypes(): Set<string>;
1393
+ get defaultTagNames(): DefaultTagNames;
1394
+ get managedPropsRegistry(): Map<string, ManagedPropsList>;
1395
+ getManagedProps(type: string): ManagedPropsList;
1396
+ /**
1397
+ * Get the component type string for a raw component reference.
1398
+ * Used for registry-based component identity checking.
1399
+ */
1400
+ getTypeForComponent(component: React$2.ComponentType<any>): string | undefined;
1401
+ /**
1402
+ * Check if a component or element type is registered in the component registry.
1403
+ * Accepts both component references and string element names (e.g., "div").
1404
+ * Used for component identity checking instead of symbol-based approach.
1405
+ */
1406
+ hasComponent(component: React$2.ElementType | string): boolean;
1407
+ /**
1408
+ * Get the property path with the record identifier if it exists. For example,
1409
+ * `columns.columnName.label` becomes `columns.*.label`, for record properties.
1410
+ */
1411
+ getPropertyWithRecordIdentifier(type: string, path: string): string;
1412
+ }
1413
+ //#endregion
1414
+ //#region src/lib/internal-details/sb-wrapper.d.ts
1415
+ type InjectedProps = {
1416
+ dropTargetRef?: React$1.Ref<HTMLElement> | LegacyRef<HTMLElement>;
1417
+ };
1418
+ type ParentInfo = {
1419
+ type?: string;
1420
+ };
1421
+ interface CreationContext {
1422
+ parentInfo: ParentInfo;
1423
+ defaultTagNames: DefaultTagNames;
1424
+ selfTagName: string;
1425
+ generateUniqueName: (prefix: string) => string;
1426
+ }
1427
+ type PropertyValues<P extends React$1.ComponentProps<any>> = { [K in keyof P]?: PropertyInfo | PropertyValues<P[K]> };
1428
+ interface EditorTemplate<P extends React$1.ComponentProps<any> = React$1.ComponentProps<any>> {
1429
+ catalog?: Catalog;
1430
+ /***
1431
+ * Config for the newly created component when added to the canvas from the Editor.
1432
+ * @returns a single CreateRequest or an array of CreateRequests.
1433
+ *
1434
+ * When returning Array<CreateRequests>:
1435
+ * - The 1st CreateRequest's type must match the componentType passed to createComponent.
1436
+ * - The last CreateRequest's will be the selected component after drag & drop.
1437
+ *
1438
+ * Example: [Modal, Button]
1439
+ * A modal that when drag & dropped on the page will add a trigger button.
1440
+ * The modal is closed by default, so the selected component after drop will be the trigger button.
1441
+ */
1442
+ create?: (context: CreationContext) => CreateRequest$1<P> | Array<CreateRequest$1<P>>;
1443
+ }
1444
+ interface CreateRequest$1<P extends React$1.ComponentProps<any> = React$1.ComponentProps<any>> {
1445
+ type: string;
1446
+ properties?: PropertyValues<P>;
1447
+ createAt?: "root" | "dropLocation";
1448
+ children?: CreateChild$1[];
1449
+ }
1450
+ interface Chainable<PROPS extends React$1.ComponentProps<any> = React$1.ComponentProps<any>> {
1451
+ addEditorTemplate: (config: EditorTemplate<PROPS>) => Chainable<PROPS>;
1452
+ editorConfig: (config: EditorConfig$1) => Chainable<PROPS>;
1453
+ }
1454
+ /**
1455
+ * Register a component to be used with the framework.
1456
+ *
1457
+ * @param Component - The React component or HTML element name (e.g., "div") to register. Can be a React functional component, class component, or intrinsic element string.
1458
+ * @param propertiesDefinition - The definition of the component's properties, used for property panel generation and validation.
1459
+ *
1460
+ * @returns A chainable object that provides methods for editor integration (addEditorTemplate and editorConfig).
1461
+ */
1462
+ declare const registerComponentInternal: <T extends React$1.ElementType>(Component: T, propertiesDefinition: PropertiesDefinition) => Chainable<React$1.ComponentProps<T>>;
1463
+ //#endregion
1464
+ //#region src/lib/user-facing/component-base/sb-component.d.ts
1465
+ type SbComponentProps<El = HTMLElement> = {
1466
+ name?: string;
1467
+ bind?: WithBindingIdentifier;
1468
+ sourceId?: SbElement;
1469
+ /**
1470
+ * undefined means auto, true means always loading, false means never loading
1471
+ */
1472
+ loading?: boolean;
1473
+ } & Omit<React.HTMLAttributes<El>, "height" | "width">;
1474
+ //#endregion
1475
+ //#region src/lib/user-facing/properties-panel/props-builder.d.ts
1476
+ type Exact<T, Shape> = T extends Shape ? Exclude<keyof T, keyof Shape> extends never ? T : never : never;
1477
+ type ManagedProp<T extends DataType = DataType> = PropertyForData<T> & {
1478
+ default?: SingleInputProp<T>;
1479
+ defaultOnAdd?: SingleInputProp<T>;
1480
+ /**
1481
+ * Controls binding nesting behavior:
1482
+ * - true: Allows bindings to be nested at any depth within this property
1483
+ * - false: Only allows bindings at the top level (unless the property is composite)
1484
+ */
1485
+ nestedBindings?: boolean;
1486
+ /**
1487
+ * Indicates this property should be evaluated per-context (e.g., per-row in tables)
1488
+ * When true, the property value will be evaluated for each context with access to context variables
1489
+ */
1490
+ contextual?: boolean;
1491
+ computedArgs?: EvaluateOrValueComputedArgs;
1492
+ };
1493
+ type ManagedPropsList = Array<ManagedProp & {
1494
+ propertiesPanelDisplay?: PropertiesPanelDisplay<any>;
1495
+ }>;
1496
+ /**
1497
+ * Merges shared and variant properties for union types without creating intersections
1498
+ * Variant properties override shared properties with the same key
1499
+ */
1500
+ type MergeUnionVariant<SHARED extends Record<string, Prop<any, any>>, VARIANT extends Record<string, Prop<any, any>>> = Omit<SHARED, keyof VARIANT> & VARIANT;
1501
+ /**
1502
+ * Converts a union type to an intersection type
1503
+ * Used to merge multiple section props into a single props type
1504
+ */
1505
+ type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I extends U) => void) ? I : never;
1506
+ /**
1507
+ * Controls how default values affect property optionality
1508
+ * - RequiredIfDefault: Properties with default values become required
1509
+ * - AlwaysOptional: All properties become optional regardless of defaults
1510
+ */
1511
+ type DefaultValueBehavior = "RequiredIfDefault" | "AlwaysOptional";
1512
+ /**
1513
+ * Extracts the concrete type from a property definition
1514
+ *
1515
+ * For evaluated props: returns the actual value type
1516
+ *
1517
+ * For non-evaluated props: returns InputProp<ValueType>
1518
+ */
1519
+ /**
1520
+ * Extracts the concrete type from a property definition
1521
+ * Enhanced to handle contextual properties
1522
+ */
1523
+ type ExtractPropType<T, DefaultsBehavior extends DefaultValueBehavior, IsEvaluated extends boolean> = T extends Record<string, Prop<any, any, any>> ? ExtractProps<T, DefaultsBehavior, IsEvaluated> : T extends RecordProp<infer U> ? Record<string, ExtractProps<U, DefaultsBehavior, IsEvaluated>> : T extends CompositeProp<infer U> ? IsEvaluated extends true ? ExtractProps<U, DefaultsBehavior, IsEvaluated> : InputProp<ExtractProps<U, DefaultsBehavior, true>> : T extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: ExtractProps<MergeUnionVariant<SHARED, VARIANTS[I]>, DefaultsBehavior, IsEvaluated> }[number] : never : T extends Prop<infer V, infer _HasDefault, infer ContextualProps> ? IsEvaluated extends true ? ContextualProps extends undefined ? V extends Callback ? (...args: any[]) => Promise<void> : V : ContextualProps extends any[] ? (...args: ContextualProps) => V : InputProp<V> : InputProp<V> : never;
1524
+ /**
1525
+ * Extracts a flat props object from a properties definition
1526
+ * Handles optionality based on DefaultValueBehavior
1527
+ */
1528
+ type ExtractProps<T, DefaultsBehavior extends DefaultValueBehavior, IsEvaluated extends boolean> = T extends Record<string, Section> ? ExtractProps<MergeSections<T>, DefaultsBehavior, IsEvaluated> : T extends SectionPropRecord ? DefaultsBehavior extends "AlwaysOptional" ? { [K in keyof T as T[K] extends Prop<any, any, any> ? K : never]?: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated> } : { [K in keyof T as T[K] extends Prop<any, infer HasDefault, any> ? HasDefault extends true ? K : never : never]: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated> } & { [K in keyof T as T[K] extends Prop<any, infer HasDefault, any> ? HasDefault extends false ? K : never : never]?: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated> } : never;
1529
+ /**
1530
+ * Handles non Prop types, aka our default types and CSS props
1531
+ */
1532
+ type SectionPropertiesPanelConfig = {
1533
+ showHeader?: boolean;
1534
+ isDefaultOpen?: boolean;
1535
+ headerType?: HeaderType;
1536
+ subHeader?: string;
1537
+ };
1538
+ /**
1539
+ * Merges all sections in a properties definition into a single props type
1540
+ */
1541
+ type MergeSections<T extends Record<string, Section>, Merged = UnionToIntersection<T[keyof T]>> = Merged extends Section<any, infer U> ? U : never;
1542
+ /**
1543
+ * Identical to InternalProps but without the base props
1544
+ */
1545
+ type EntityProps<Definition extends PropertiesDefinition, MergedSections = MergeSections<Definition>> = ExtractProps<MergedSections, "RequiredIfDefault", true>;
1546
+ /**
1547
+ * Internal props used by the component implementation
1548
+ * - Properties with defaults are required
1549
+ * - Properties are fully evaluated to their final types
1550
+ */
1551
+ type InternalProps<Definition extends PropertiesDefinition, FlattenedProps = EntityProps<Definition>, BaseProps = Omit<SbComponentProps, keyof FlattenedProps>> = FlattenedProps & BaseProps & InjectedProps;
1552
+ /**
1553
+ * External props exposed to component consumers
1554
+ * - All properties are optional regardless of defaults
1555
+ * - Properties accept InputProp values (bindings/functions)
1556
+ */
1557
+ type PropertiesDefinition = Record<string, Section>;
1558
+ type SectionDefinition<T extends Record<string, Prop<any, any>>> = {
1559
+ props: T;
1560
+ showHeader?: boolean;
1561
+ isDefaultOpen?: boolean;
1562
+ headerType?: HeaderType;
1563
+ subHeader?: string;
1564
+ };
1565
+ type SectionPropRecord<Props = Record<string, any>> = Partial<{ [K in keyof Props]: Prop<Props[K], any> }>;
1566
+ declare class Section<TProps = any, // Component props type for validation
1567
+ T extends SectionPropRecord<TProps> = SectionPropRecord<TProps>> {
1568
+ readonly category: PropsCategory;
1569
+ props: T;
1570
+ propertiesPanelConfig: SectionPropertiesPanelConfig;
1571
+ constructor(category: PropsCategory);
1572
+ static category<Props = any>(category: PropsCategory): Section<Props, Partial<{ [K in keyof Props]: Prop<Props[K], any, undefined> }>>;
1573
+ children<INP extends SectionPropRecord<TProps> | CompositeProp<any> | UnionProp<any, any>, OUT extends (INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]> }[number] : never : INP)>(props: INP extends CompositeProp<any> | UnionProp<any, any> ? INP : Exact<INP, SectionPropRecord<TProps>>): Section<TProps, T & OUT>;
1574
+ add: <INP extends SectionPropRecord<TProps> | CompositeProp<any> | UnionProp<any, any>, OUT extends (INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]> }[number] : never : INP)>(props: INP extends CompositeProp<any> | UnionProp<any, any> ? INP : Exact<INP, SectionPropRecord<TProps>>) => Section<TProps, T & OUT>;
1575
+ propertiesPanel(config: Omit<SectionDefinition<any>, "props">): this;
1576
+ get name(): "Content" | "Routing" | "Interaction" | "Styles" | "Layout" | "Appearance" | "Permissions" | "Uncategorized" | "Actions";
1577
+ }
1578
+ declare class Prop<Type extends DataType, _HasDefault extends boolean = false, _ContextualArgs extends any[] | undefined | ((entity: Entity) => any[] | undefined) = undefined> {
1579
+ protected prop: ManagedProp<Type>;
1580
+ /**
1581
+ * Relations are an array of arrays
1582
+ * each sub-array is AND requirements, and each element is an OR requirement
1583
+ */
1584
+ protected relations: Relation[][];
1585
+ protected constructor(typeString: DataTypeString);
1586
+ static unset(): Prop<undefined>;
1587
+ static string<T extends string>(): Prop<T>;
1588
+ static number<T extends number>(): Prop<T>;
1589
+ static boolean<T extends boolean>(): Prop<T>;
1590
+ static array<T>(): Prop<Array<T>>;
1591
+ static any<T = any>(): Prop<T>;
1592
+ static jsx<T extends ReactNode>(): Prop<T>;
1593
+ static literal<T extends Readonly<string | number | boolean>>(value: T): Prop<T, true>;
1594
+ static eventHandler(): Prop<any>;
1595
+ static function<ARGS extends any[] = any[], RETURN = any>(implementation: EntityFunction<ARGS, RETURN>): FunctionProp<ARGS, RETURN>;
1596
+ /**
1597
+ * Creates a composite property, which is a property that contains nested properties. For example,
1598
+ * the following composite property:
1599
+ *
1600
+ * ```ts
1601
+ * const prop = Prop.composite({
1602
+ * name: Prop.string(),
1603
+ * age: Prop.number(),
1604
+ * });
1605
+ * ```
1606
+ *
1607
+ * is equivalent to the following type:
1608
+ *
1609
+ * ```ts
1610
+ * type Prop = {
1611
+ * name: string;
1612
+ * age: number;
1613
+ * };
1614
+ * ```
1615
+ */
1616
+ static composite<T extends CompositeInputs>(props: T): CompositeProp<T>;
1617
+ /**
1618
+ * Creates a record property, which is a record that maps string keys to the nestedproperties. For example,
1619
+ * the following record property:
1620
+ *
1621
+ * ```ts
1622
+ * const prop = Prop.record({
1623
+ * name: Prop.string(),
1624
+ * age: Prop.number(),
1625
+ * });
1626
+ * ```
1627
+ *
1628
+ * is equivalent to the following type:
1629
+ *
1630
+ * ```ts
1631
+ * type Prop = Record<string, {
1632
+ * name: string;
1633
+ * age: number;
1634
+ * }>;
1635
+ * ```
1636
+ */
1637
+ static record<T extends CompositeInputs>(props: T): RecordProp<T>;
1638
+ static union<SHARED extends Record<string, Prop<unknown, boolean>>, VARIANTS extends UnionVariant<SHARED>[] = UnionVariant<SHARED>[]>(props: {
1639
+ shared: SHARED;
1640
+ variants: VARIANTS;
1641
+ }): UnionProp<SHARED, VARIANTS, VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: SHARED & VARIANTS[I] }[number] : never>;
1642
+ default(de: SingleInputProp<DataType>): Prop<Type, true>;
1643
+ contextual<TContext extends any[] | undefined = any[]>(computedArgs?: EvaluateOrValueComputedArgs): Prop<Type, _HasDefault, TContext>;
1644
+ setName(name: string): this;
1645
+ propertiesPanel<CT extends ControlType>(schema: Omit<Partial<PropertiesPanelDisplay<Type, CT>>, "isTriggerProperty">): this;
1646
+ setDisplayProperty<K extends keyof PropertiesPanelDisplay<Type>>(property: K, value: PropertiesPanelDisplay<Type>[K]): this;
1647
+ docs(docs: Exclude<PropertyForData<DataType>["docs"], undefined>): this;
1648
+ build(): ManagedProp<Type>;
1649
+ toDefinition(props: Record<string, unknown>): WidgetPropertyDefinition<DataType> | undefined;
1650
+ getRelations(): Relation[][];
1651
+ dependsOn(relations: Relation[][]): this;
1652
+ hasPropertiesPanelDisplay(): boolean;
1653
+ get type(): DataTypeString;
1654
+ get path(): string;
1655
+ }
1656
+ type CompositeInputs = Record<string, Section> | Section | Record<string, Prop<unknown, boolean>>;
1657
+ /**
1658
+ * See {@link Prop.composite}
1659
+ */
1660
+ declare class CompositeProp<T extends CompositeInputs> extends Prop<unknown, boolean> {
1661
+ typeString: "composite";
1662
+ nestedProps: T;
1663
+ constructor(props: T);
1664
+ getProps(): T;
1665
+ toDefinition(props: Record<string, unknown>): WidgetPropertyDefinition<DataType> | undefined;
1666
+ propertiesPanelChildrenDisplayMode(): ({
1667
+ type: "inline";
1668
+ } | {
1669
+ type: "popover";
1670
+ title?: string;
1671
+ panelIdPropertyName?: string;
1672
+ titlePropertyName?: string;
1673
+ addButton?: boolean;
1674
+ }) | ((this: any, state: any, path: string) => ({
1675
+ type: "inline";
1676
+ } | {
1677
+ type: "popover";
1678
+ title?: string;
1679
+ panelIdPropertyName?: string;
1680
+ titlePropertyName?: string;
1681
+ addButton?: boolean;
1682
+ }) | undefined) | undefined;
1683
+ }
1684
+ /**
1685
+ * See {@link Prop.record}
1686
+ */
1687
+ declare class RecordProp<T extends CompositeInputs> extends Prop<Record<string, any>, boolean> {
1688
+ typeString: "recordOf";
1689
+ nestedProps: T;
1690
+ constructor(props: T);
1691
+ getProps(): T;
1692
+ toDefinition(props: Record<string, unknown>): WidgetPropertyDefinition<DataType> | undefined;
1693
+ }
1694
+ interface ActionPanel {
1695
+ arguments?: Record<string, Prop<any>>;
1696
+ }
1697
+ declare class FunctionProp<ARGS extends any[] = any[], RETURN = any> extends Prop<EntityFunction<ARGS, RETURN>, true> {
1698
+ typeString: "function";
1699
+ private _actionPanel;
1700
+ constructor(implementation: EntityFunction<ARGS, RETURN>);
1701
+ actionPanel(panel?: ActionPanel): this;
1702
+ getActionPanel(): ActionPanel | undefined;
1703
+ }
1704
+ type UnionVariant<SHARED extends Record<string, Prop<any>>> = { [K in keyof SHARED]: Prop<any> };
1705
+ declare class UnionProp<SHARED extends Record<string, Prop<unknown, boolean>>, VARIANTS extends UnionVariant<SHARED>[] = UnionVariant<SHARED>[], _OUTPUT = (VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: SHARED & VARIANTS[I] }[number] : never)> extends Prop<any> {
1706
+ typeString: "union";
1707
+ shared: SHARED;
1708
+ variants: VARIANTS;
1709
+ constructor(shared: SHARED, variants: VARIANTS);
1710
+ getProps(): SHARED & Record<string, Prop<any, false, undefined>>;
1711
+ }
1712
+ //#endregion
1713
+ //#region src/lib/user-facing/components/app/props.d.ts
1714
+ declare const propertiesDefinition: {
1715
+ contents: Section<any, Partial<{
1716
+ [x: string]: Prop<any, any, undefined>;
1717
+ }> & {
1718
+ children: Prop<any, false, undefined>;
1719
+ }>;
1720
+ appearance: Section<{
1721
+ className: string;
1722
+ }, Partial<{
1723
+ className: Prop<string, any, undefined>;
1724
+ }>>;
1725
+ };
1726
+ //#endregion
1727
+ //#region src/lib/user-facing/components/app/index.d.ts
1728
+ declare const App: (({
1729
+ children,
1730
+ className,
1731
+ context
1732
+ }: InternalProps<typeof propertiesDefinition> & {
1733
+ context?: SuperblocksAppContext;
1734
+ }) => _$react_jsx_runtime0.JSX.Element) & {
1735
+ displayName: string;
1736
+ };
1737
+ //#endregion
1738
+ //#region src/lib/user-facing/components/custom/register-custom-component.d.ts
1739
+ type PropertiesPanelDefinition<Props extends React$1.ComponentProps<any>> = SectionPropRecord<Props> | { [K in string]: Section<Props, SectionPropRecord<Props>> };
1740
+ /**
1741
+ * Registers a custom React component or HTML element with Superblocks.
1742
+ *
1743
+ * @param component - The React component or HTML element name (e.g., "div") to register
1744
+ * @param propertiesDefinition - Optional properties panel definition, either as flat props or organized into sections
1745
+ * @returns The registered component
1746
+ *
1747
+ * @example
1748
+ * ```tsx
1749
+ * // Register HTML element with just defaults
1750
+ * registerComponent("div");
1751
+ *
1752
+ * // Register HTML element with custom props
1753
+ * registerComponent("div", {
1754
+ * children: Prop.node(),
1755
+ * onClick: Prop.eventHandler(),
1756
+ * });
1757
+ *
1758
+ * // Flat props (auto-categorized into Content and Event sections)
1759
+ * registerComponent(MyComponent, {
1760
+ * label: Prop.string().default("Click me"),
1761
+ * onClick: Prop.eventHandler(),
1762
+ * });
1763
+ *
1764
+ * // Organized into sections
1765
+ * registerComponent(MyComponent, {
1766
+ * content: Section.category(PropsCategory.Content).children({
1767
+ * label: Prop.string().default("Click me"),
1768
+ * }),
1769
+ * events: Section.category(PropsCategory.EventHandlers).children({
1770
+ * onClick: Prop.eventHandler(),
1771
+ * }),
1772
+ * });
1773
+ * ```
1774
+ */
1775
+ declare function registerComponent<T extends React$1.ElementType>(component: T, propertiesDefinition?: PropertiesPanelDefinition<React$1.ComponentProps<T>>): ReturnType<typeof registerComponentInternal>;
1776
+ //#endregion
1777
+ //#region src/lib/user-facing/error-pages/page-not-found.d.ts
1778
+ declare const PageNotFound: ({
1779
+ title,
1780
+ errorMessage,
1781
+ buttonPath,
1782
+ buttonText,
1783
+ onButtonClick,
1784
+ hideActions
1785
+ }: {
1786
+ title?: string;
1787
+ errorMessage?: string | React$1.ReactElement;
1788
+ buttonPath?: string;
1789
+ buttonText?: string;
1790
+ onButtonClick?: () => void;
1791
+ hideActions?: boolean;
1792
+ }) => _$react_jsx_runtime0.JSX.Element;
1793
+ //#endregion
1794
+ //#region src/lib/internal-details/internal-components/route-load-error.d.ts
1795
+ declare function RouteLoadError(): _$react_jsx_runtime0.JSX.Element;
1796
+ //#endregion
1797
+ //#region src/lib/internal-details/use-api.d.ts
1798
+ declare global {
1799
+ interface SuperblocksAPIRegistry {}
1800
+ }
1801
+ type RegisteredAPINames = keyof SuperblocksAPIRegistry;
1802
+ type ApiInterfaces<Name extends string> = Name extends keyof SuperblocksAPIRegistry ? SuperblocksAPIRegistry[Name] extends {
1803
+ input: infer I;
1804
+ output: infer O;
1805
+ } ? {
1806
+ input: I;
1807
+ output: O;
1808
+ } : {
1809
+ input: Record<string, unknown>;
1810
+ output: any;
1811
+ } : {
1812
+ input: never;
1813
+ output: never;
1814
+ };
1815
+ /**
1816
+ * Get the API path for an API by name.
1817
+ *
1818
+ * When SDK APIs are enabled, paths point to `/server/apis/<name>/api.ts`.
1819
+ * When using legacy YAML mode, paths point to `/apis/<name>/api.yaml`.
1820
+ */
1821
+ /** Helper type to extract input type from a CompiledApi */
1822
+ type ApiInput<T> = T extends CompiledApi<infer TInput, any> ? TInput : never;
1823
+ /** Helper type to extract output type from a CompiledApi */
1824
+ type ApiOutput<T> = T extends CompiledApi<any, infer TOutput> ? TOutput : never;
1825
+ /** Core run/cancel returned by the internal delegation hooks. */
1826
+ interface UseApiCoreMethods<TInput, TOutput> {
1827
+ run: (inputs?: TInput) => Promise<TOutput | undefined>;
1828
+ cancel: () => Promise<void>;
1829
+ }
1830
+ /** Return type for useApi hook */
1831
+ interface UseApiResult<TInput, TOutput> extends UseApiCoreMethods<TInput, TOutput> {
1832
+ /**
1833
+ * Whether an API call is in flight.
1834
+ *
1835
+ * **Imperative mode** (no `inputs`): tracks only the latest `run()`
1836
+ * invocation. If a newer `run()` is started while an older one is pending,
1837
+ * `loading` reflects the newer call. `cancel()` resets it to `false`.
1838
+ *
1839
+ * **Declarative mode** (`inputs` provided): equivalent to
1840
+ * `useApiData.fetching` — `true` during any fetch including background
1841
+ * refetches, not just the initial load.
1842
+ */
1843
+ loading: boolean;
1844
+ /** The most recent successful response. Persists across re-runs. */
1845
+ data: TOutput | undefined;
1846
+ /**
1847
+ * The error from the last failed run(). Cleared on the next successful run.
1848
+ * In declarative mode, populated when the auto-fetch fails (no try/catch needed).
1849
+ */
1850
+ error: unknown;
1851
+ /**
1852
+ * Semantic status of the last execution.
1853
+ * - "idle": no run has been triggered yet
1854
+ * - "pending": a run is in flight
1855
+ * - "success": last run completed successfully
1856
+ * - "error": last run failed
1857
+ */
1858
+ status: "idle" | "pending" | "success" | "error";
1859
+ /**
1860
+ * The inputs passed to the most recent run(). Useful for optimistic UI.
1861
+ * Undefined until the first run() is called.
1862
+ */
1863
+ variables: TInput | undefined;
1864
+ /**
1865
+ * Reset state back to idle. Clears data, error, loading, status, and variables.
1866
+ * Also invalidates any in-flight run so its settlement is ignored.
1867
+ */
1868
+ reset: () => void;
1869
+ }
1870
+ /**
1871
+ * API Registry interface for type inference.
1872
+ *
1873
+ * This interface is used with useTypedApi to enable automatic type inference.
1874
+ * Apps define their own ApiRegistry type and pass it to useTypedApi.
1875
+ *
1876
+ * @example
1877
+ * ```typescript
1878
+ * // In server/apis/index.ts
1879
+ * const apis = { GetUsers, CreateOrder } as const;
1880
+ * export type ApiRegistry = typeof apis;
1881
+ *
1882
+ * // In client/hooks/useApi.ts
1883
+ * import type { ApiRegistry } from "../../server/apis/index.js";
1884
+ * import { useTypedApi } from "@superblocksteam/library";
1885
+ * export const useApi = useTypedApi<ApiRegistry>();
1886
+ * ```
1887
+ */
1888
+ interface ApiRegistry {}
1889
+ /**
1890
+ * Conditional return type for useApi.
1891
+ * Returns typed result if the API name is in the registry, otherwise unknown.
1892
+ */
1893
+ type UseApiReturnType<TName extends string> = TName extends keyof ApiRegistry ? UseApiResult<ApiInput<ApiRegistry[TName]>, ApiOutput<ApiRegistry[TName]>> : UseApiResult<unknown, unknown>;
1894
+ /**
1895
+ * React hook for executing YAML-based Superblocks APIs.
1896
+ *
1897
+ * This is the legacy API system that uses `rootStore.apis.runApiByPath`.
1898
+ * It remains the default when the `sdkApiEnabled` flag is off.
1899
+ *
1900
+ * @param name - The name of the registered API to execute
1901
+ * @returns An object with `run` and `cancel` functions
1902
+ */
1903
+ declare function useApiStateful<Name extends RegisteredAPINames, Inputs = ApiInterfaces<Name>["input"], Response = ApiInterfaces<Name>["output"]>(name: Name): UseApiCoreMethods<Inputs, Response>;
1904
+ declare function useApi<TName extends string>(apiName: TName, inputs?: undefined): UseApiReturnType<TName>;
1905
+ /**
1906
+ * @deprecated Use `useApiData` for declarative data fetching.
1907
+ * This overload will be removed in a future major version.
1908
+ */
1909
+ declare function useApi<TName extends string>(apiName: TName, inputs: TName extends keyof ApiRegistry ? ApiInput<ApiRegistry[TName]> : Record<string, unknown>): UseApiReturnType<TName>;
1910
+ declare function useApi<TApi extends CompiledApi<unknown, unknown>>(apiName: string, inputs?: ApiInput<TApi>): UseApiResult<ApiInput<TApi>, ApiOutput<TApi>>;
1911
+ /**
1912
+ * Type for a registry of compiled APIs.
1913
+ * Used with useTypedApi to enable automatic type inference.
1914
+ */
1915
+ type AnyApiRegistry = Record<string, CompiledApi<any, any>>;
1916
+ /**
1917
+ * Typed useApi function signature for a specific registry.
1918
+ * Supports both imperative (no inputs) and declarative (with inputs) modes.
1919
+ */
1920
+ interface TypedUseApi<TRegistry extends AnyApiRegistry> {
1921
+ <TName extends keyof TRegistry & string>(apiName: TName): UseApiResult<ApiInput<TRegistry[TName]>, ApiOutput<TRegistry[TName]>>;
1922
+ /**
1923
+ * @deprecated Use `useApiData` for declarative data fetching.
1924
+ */
1925
+ <TName extends keyof TRegistry & string>(apiName: TName, inputs: ApiInput<TRegistry[TName]>): UseApiResult<ApiInput<TRegistry[TName]>, ApiOutput<TRegistry[TName]>>;
1926
+ }
1927
+ /**
1928
+ * Creates a typed version of useApi bound to a specific API registry type.
1929
+ *
1930
+ * This enables full type inference using only type imports from the server,
1931
+ * keeping backend code out of the client bundle.
1932
+ *
1933
+ * @returns A typed useApi function
1934
+ */
1935
+ declare function useTypedApi<TRegistry extends AnyApiRegistry>(): TypedUseApi<TRegistry>;
1936
+ //#endregion
1937
+ //#region src/lib/internal-details/use-api-data.d.ts
1938
+ interface UseApiDataResult<TOutput> {
1939
+ /** The most recent successful response. Persists across background refetches. */
1940
+ data: TOutput | undefined;
1941
+ /** The error from the last failed fetch. Cleared on success. */
1942
+ error: unknown;
1943
+ /**
1944
+ * Status of the data:
1945
+ * - "pending": fetching for the first time, no data yet
1946
+ * - "success": data has been fetched at least once
1947
+ * - "error": last fetch failed and there is no cached data
1948
+ */
1949
+ status: "pending" | "success" | "error";
1950
+ /** Status of the current network request. */
1951
+ fetchStatus: "idle" | "fetching";
1952
+ /** True when fetching for the first time with no cached data. */
1953
+ loading: boolean;
1954
+ /** True when any fetch is in progress (including background refetch). */
1955
+ fetching: boolean;
1956
+ /** True when the last fetch resulted in an error. */
1957
+ isError: boolean;
1958
+ /** True when data has been fetched successfully at least once. */
1959
+ isSuccess: boolean;
1960
+ /**
1961
+ * True when cached data is older than `staleTime`.
1962
+ * The next mount or refetch trigger will fetch fresh data.
1963
+ */
1964
+ isStale: boolean;
1965
+ /** Manually trigger a fresh fetch, bypassing staleTime. */
1966
+ refetch: () => Promise<TOutput | undefined>;
1967
+ /** Abort the current in-flight fetch for this component instance. */
1968
+ cancel: () => void;
1969
+ }
1970
+ interface UseApiDataOptions {
1971
+ /**
1972
+ * Skip fetching when false. Useful for conditional fetching.
1973
+ * Default: true
1974
+ */
1975
+ enabled?: boolean;
1976
+ /**
1977
+ * Milliseconds before cached data is considered stale.
1978
+ * Stale data is still shown while a background refetch completes.
1979
+ * Default: 0 (always refetch on mount)
1980
+ */
1981
+ staleTime?: number;
1982
+ /**
1983
+ * Milliseconds to keep inactive (un-observed) cache entries before GC.
1984
+ * Default: 300_000 (5 minutes)
1985
+ *
1986
+ * @deprecated SWR manages cache lifecycle internally. This option is
1987
+ * accepted for backward compatibility but has no effect.
1988
+ */
1989
+ gcTime?: number;
1990
+ /**
1991
+ * Number of retry attempts on failure.
1992
+ * All errors are retried except user-initiated cancellations (AbortError).
1993
+ * Set to `false` to disable retries entirely.
1994
+ * Default: 3
1995
+ */
1996
+ retry?: number | false;
1997
+ /**
1998
+ * Delay strategy for retries. Receives the zero-based attempt index.
1999
+ * Default: exponential backoff capped at 30s
2000
+ */
2001
+ retryDelay?: (attempt: number) => number;
2002
+ /**
2003
+ * Refetch when the browser tab regains focus.
2004
+ * Default: false (avoids burst requests on every tab switch — Risk #6)
2005
+ */
2006
+ refetchOnWindowFocus?: boolean;
2007
+ /**
2008
+ * Refetch when the browser reconnects to the network.
2009
+ * Default: true
2010
+ */
2011
+ refetchOnReconnect?: boolean;
2012
+ /**
2013
+ * Polling interval in ms. false disables polling.
2014
+ * Default: false
2015
+ */
2016
+ refetchInterval?: number | false;
2017
+ /**
2018
+ * When true, deep-compares incoming data against cached data. If equal,
2019
+ * preserves the old object reference to prevent unnecessary re-renders.
2020
+ * Default: false (opt-in to avoid breaking identity-sensitive effects — Risk #4)
2021
+ */
2022
+ structuralSharing?: boolean;
2023
+ /** Shown while the real fetch is in progress, before any data arrives. */
2024
+ placeholderData?: unknown;
2025
+ }
2026
+ declare function useApiData(apiName: string, inputs: Record<string, unknown>, options?: UseApiDataOptions): UseApiDataResult<unknown>;
2027
+ interface TypedUseApiData<TRegistry extends AnyApiRegistry> {
2028
+ <TName extends keyof TRegistry & string>(apiName: TName, inputs: ApiInput<TRegistry[TName]>, options?: UseApiDataOptions): UseApiDataResult<ApiOutput<TRegistry[TName]>>;
2029
+ }
2030
+ /**
2031
+ * Creates a typed version of useApiData bound to a specific API registry.
2032
+ *
2033
+ * @example
2034
+ * ```typescript
2035
+ * import type { ApiRegistry } from "../../server/apis/index.js";
2036
+ * import { useTypedApiData } from "@superblocksteam/library";
2037
+ * export const useApiData = useTypedApiData<ApiRegistry>();
2038
+ * ```
2039
+ */
2040
+ declare function useTypedApiData<TRegistry extends AnyApiRegistry>(): TypedUseApiData<TRegistry>;
2041
+ //#endregion
2042
+ //#region src/lib/internal-details/execute-api.d.ts
2043
+ interface ExecuteApiOptions {
2044
+ /** AbortSignal to cancel the request mid-flight. */
2045
+ signal?: AbortSignal;
2046
+ /** Stable execution ID to reuse across iframe reloads. When omitted a random ID is generated. */
2047
+ executionId?: string;
2048
+ }
2049
+ /**
2050
+ * Execute a Superblocks API as a plain Promise, without any React lifecycle.
2051
+ *
2052
+ * Routes to the SDK path (`executeSdkApiV3`) when the API has an entry point
2053
+ * or when `sdkApiEnabled` is set on rootStore. Falls back to the legacy YAML
2054
+ * path otherwise.
2055
+ *
2056
+ * Sends edit-mode tracking messages to the parent frame when in edit mode,
2057
+ * keeping the Requests Panel in sync even for out-of-React calls.
2058
+ *
2059
+ * @throws {DOMException} with name "AbortError" if cancelled via signal.
2060
+ * @throws The orchestrator error object on API failure.
2061
+ */
2062
+ declare function executeApi(apiName: string, inputs?: Record<string, unknown>, options?: ExecuteApiOptions): Promise<unknown>;
2063
+ type TypedExecuteApi<TRegistry extends AnyApiRegistry> = <TName extends keyof TRegistry & string>(apiName: TName, inputs?: ApiInput<TRegistry[TName]>, options?: ExecuteApiOptions) => Promise<ApiOutput<TRegistry[TName]>>;
2064
+ /**
2065
+ * Creates a typed version of executeApi bound to a specific API registry.
2066
+ *
2067
+ * @example
2068
+ * ```typescript
2069
+ * import type { ApiRegistry } from "../../server/apis/index.js";
2070
+ * import { createTypedExecuteApi } from "@superblocksteam/library";
2071
+ * export const executeApi = createTypedExecuteApi<ApiRegistry>();
2072
+ * ```
2073
+ */
2074
+ declare function createTypedExecuteApi<TRegistry extends AnyApiRegistry>(): TypedExecuteApi<TRegistry>;
2075
+ //#endregion
2076
+ //#region src/lib/internal-details/query-cache.d.ts
2077
+ /**
2078
+ * Build a deterministic, string cache key from API name + inputs.
2079
+ * Sorts object entries so { b: 2, a: 1 } and { a: 1, b: 2 } produce
2080
+ * the same key.
2081
+ */
2082
+ declare function buildCacheKey(apiName: string, inputs: Record<string, unknown>): string;
2083
+ declare class QueryClient {
2084
+ buildCacheKey: typeof buildCacheKey;
2085
+ getQueryData<T>(key: string): T | undefined;
2086
+ setQueryData<T>(key: string, updater: T | ((old: T | undefined) => T)): void;
2087
+ invalidateQueries(keyPrefix: string): Promise<void>;
2088
+ cache: {
2089
+ clear: () => void;
2090
+ };
2091
+ }
2092
+ declare const queryClient: QueryClient;
2093
+ //#endregion
2094
+ //#region src/lib/user-facing/global-functions.d.ts
2095
+ /**
2096
+ * Logs out the user from all authenticated integrations used in APIs.
2097
+ *
2098
+ * Clears OAuth tokens and session data for integrations using oauth
2099
+ * so the user must re-authenticate on the next API call. Use this when
2100
+ * building a "Log out" or "Sign out" button in apps that use authenticated
2101
+ * integrations.
2102
+ *
2103
+ * @returns An object with `success: boolean` and optional `errors` array.
2104
+ *
2105
+ * @example
2106
+ * ```tsx
2107
+ * import { logoutIntegrations } from "@superblocksteam/library";
2108
+ *
2109
+ * function LogoutButton() {
2110
+ * const handleLogout = async () => {
2111
+ * const result = await logoutIntegrations();
2112
+ * if (!result.success) {
2113
+ * console.error("Logout failed", result.errors);
2114
+ * }
2115
+ * };
2116
+ * return <Button onClick={handleLogout}>Sign out</Button>;
2117
+ * }
2118
+ * ```
2119
+ */
2120
+ declare function logoutIntegrations(): Promise<{
2121
+ success: boolean;
2122
+ errors?: Array<{
2123
+ message: string;
2124
+ }>;
2125
+ }>;
2126
+ //#endregion
2127
+ //#region src/lib/user-facing/properties-panel/mixins/styles-category.d.ts
2128
+ /**
2129
+ * Creates a standardized styles section for use in properties panels.
2130
+ * This provides a consistent interface for applying Tailwind CSS classes across components.
2131
+ *
2132
+ * @example
2133
+ * // Basic usage with defaults
2134
+ * styles: tailwindStylesCategory()
2135
+ *
2136
+ * // Override with prioritizedTailwindProperties. These properties will always be shown in the properties panel, event when not set.
2137
+ * styles: tailwindStylesCategory({prioritizedTailwindProperties: ["rounded", "text-color"]})
2138
+ *
2139
+ * @param options - Configuration options to override defaults
2140
+ * @returns A Section with PropsCategory.Styles containing a className prop
2141
+ */
2142
+ declare const tailwindStylesCategory: (props?: {
2143
+ prioritizedTailwindProperties?: TailwindPropertyKey[];
2144
+ }) => Section<{
2145
+ className: string;
2146
+ }>;
2147
+ //#endregion
2148
+ //#region src/lib/internal-details/embed-store.d.ts
2149
+ /**
2150
+ * Store for managing embed properties and events.
2151
+ * Used when the library is embedded in an external application (third-party embedding).
2152
+ *
2153
+ * Properties can be set by the parent window via postMessage, and events can be
2154
+ * emitted back to the parent window.
2155
+ */
2156
+ declare class EmbedStore {
2157
+ properties: Record<string, unknown>;
2158
+ constructor();
2159
+ /**
2160
+ * Update the embed properties. Called when the parent window sends updated properties.
2161
+ */
2162
+ setProperties(properties: Record<string, unknown>): void;
2163
+ /**
2164
+ * Emit an event to the parent window.
2165
+ * The parent can listen for these events using window.addEventListener("message", ...).
2166
+ */
2167
+ emitEvent(eventName: string, payload?: Record<string, unknown>): void;
2168
+ /**
2169
+ * Typed helper for the platform-reserved
2170
+ * `superblocks:integration-auth-error` event. Emitted when an SDK API
2171
+ * execution fails the integration-auth gate (either reactively from a
2172
+ * 401/403 response or proactively from the embed shell). Hosts subscribe
2173
+ * via the embed SDK's `onEvent` and render their own connect/retry UX.
2174
+ *
2175
+ * `status` is the HTTP status that triggered the emit (401 or 403 for
2176
+ * reactive emits; the embed shell uses 401 for its proactive emit).
2177
+ * `integrationIds` are scoped to the integrations the host should drive
2178
+ * reauth for, so a host with multiple integrations can target the right
2179
+ * one.
2180
+ */
2181
+ emitIntegrationAuthError(payload: {
2182
+ apiId: string;
2183
+ integrationIds: string[];
2184
+ status: number;
2185
+ message: string;
2186
+ }): void;
2187
+ }
2188
+ declare const embedStore: EmbedStore;
2189
+ //#endregion
2190
+ //#region src/lib/user-facing/embed.d.ts
2191
+ /**
2192
+ * Emit a custom event to the external embedder.
2193
+ * This is used when the library is embedded in an iframe
2194
+ * to communicate events back to the parent application.
2195
+ *
2196
+ * @param eventName - The name of the event to emit
2197
+ * @param payload - Optional payload data to send with the event
2198
+ *
2199
+ * @example
2200
+ * ```ts
2201
+ * import { Superblocks } from "@superblocksteam/library";
2202
+ *
2203
+ * // Emit a simple event
2204
+ * Superblocks.emitEvent("formSubmitted");
2205
+ *
2206
+ * // Emit an event with payload
2207
+ * Superblocks.emitEvent("userSelected", { userId: "123", name: "John" });
2208
+ * ```
2209
+ */
2210
+ declare function emitEvent(eventName: string, payload?: Record<string, unknown>): void;
2211
+ /**
2212
+ * Get the current embed properties passed from the external embedder.
2213
+ *
2214
+ * @returns The current embed properties object
2215
+ *
2216
+ * @example
2217
+ * ```ts
2218
+ * import { Superblocks } from "@superblocksteam/library";
2219
+ *
2220
+ * const props = Superblocks.getEmbedProperties();
2221
+ * console.log(props.userId);
2222
+ * ```
2223
+ */
2224
+ declare function getEmbedProperties(): Record<string, unknown>;
2225
+ /**
2226
+ * The Superblocks object provides utilities for interacting with
2227
+ * the embedding context when the library is embedded in an iframe.
2228
+ */
2229
+ declare const Superblocks: {
2230
+ emitEvent: typeof emitEvent;
2231
+ getEmbedProperties: typeof getEmbedProperties;
2232
+ };
2233
+ //#endregion
2234
+ //#region src/lib/hooks/use-embed-properties.d.ts
2235
+ /**
2236
+ * React hook for accessing embed properties passed from the external embedder.
2237
+ * Automatically re-renders when properties change.
2238
+ *
2239
+ * @returns The current embed properties object (reactive)
2240
+ *
2241
+ * @example
2242
+ * ```tsx
2243
+ * import { useEmbedProperties } from "@superblocksteam/library";
2244
+ *
2245
+ * function MyComponent() {
2246
+ * const properties = useEmbedProperties();
2247
+ *
2248
+ * // Access properties passed from the embedder
2249
+ * const userId = properties.userId as string;
2250
+ * const theme = properties.theme as "light" | "dark";
2251
+ *
2252
+ * return <div>User: {userId}, Theme: {theme}</div>;
2253
+ * }
2254
+ * ```
2255
+ */
2256
+ declare function useEmbedProperties(): Record<string, unknown>;
2257
+ //#endregion
2258
+ //#region src/lib/hooks/use-embed-event.d.ts
2259
+ /**
2260
+ * React hook for listening to events triggered by the external embedder.
2261
+ * The handler will be called whenever the embedder triggers the specified event.
2262
+ *
2263
+ * @param eventName - The name of the event to listen for
2264
+ * @param handler - Callback function invoked when the event is triggered
2265
+ *
2266
+ * @example
2267
+ * ```tsx
2268
+ * import { useEmbedEvent } from "@superblocksteam/library";
2269
+ *
2270
+ * function MyComponent() {
2271
+ * useEmbedEvent("refreshData", (payload) => {
2272
+ * console.log("Embedder requested refresh:", payload);
2273
+ * // Refetch data, reset state, etc.
2274
+ * });
2275
+ *
2276
+ * useEmbedEvent("themeChange", (payload) => {
2277
+ * const { theme } = payload as { theme: "light" | "dark" };
2278
+ * setTheme(theme);
2279
+ * });
2280
+ *
2281
+ * return <div>Listening for events...</div>;
2282
+ * }
2283
+ * ```
2284
+ */
2285
+ declare function useEmbedEvent(eventName: string, handler: (payload: Record<string, unknown>) => void): void;
2286
+ //#endregion
2287
+ //#region src/lib/hooks/use-emit-embed-event.d.ts
2288
+ /**
2289
+ * React hook that returns a function to emit events to the external embedder.
2290
+ * Use this to communicate actions or state changes back to the parent application.
2291
+ *
2292
+ * @returns A function to emit events to the embedder
2293
+ *
2294
+ * @example
2295
+ * ```tsx
2296
+ * import { useEmitEmbedEvent } from "@superblocksteam/library";
2297
+ *
2298
+ * function MyComponent() {
2299
+ * const emitEvent = useEmitEmbedEvent();
2300
+ *
2301
+ * const handleFormSubmit = (data: FormData) => {
2302
+ * emitEvent("formSubmitted", {
2303
+ * formId: "contact-form",
2304
+ * timestamp: Date.now(),
2305
+ * data,
2306
+ * });
2307
+ * };
2308
+ *
2309
+ * const handleRowClick = (row: { id: string; name: string }) => {
2310
+ * emitEvent("rowSelected", { rowId: row.id, rowName: row.name });
2311
+ * };
2312
+ *
2313
+ * return (
2314
+ * <button onClick={() => emitEvent("buttonClicked", { action: "save" })}>
2315
+ * Save
2316
+ * </button>
2317
+ * );
2318
+ * }
2319
+ * ```
2320
+ */
2321
+ declare function useEmitEmbedEvent(): (eventName: string, payload?: Record<string, unknown>) => void;
2322
+ //#endregion
2323
+ export { type AgentInfo, type AnyApiRegistry, type ApiInput, type ApiOutput, type ApiRegistry, App, type CreateChild, type CreationContext, type DataTag, type DataTags, type EditorConfig, type EditorTemplate, type ExecuteApiOptions, type FromChildToParentMessageTypes, type FromChildToParentMessageTypesMap, type FromParentToChildMessageTypes, type FromParentToChildMessageTypesMap, PageNotFound, Prop, type PropertiesPanelDefinition, Property, PropsCategory, RouteLoadError, Section, Superblocks, SbProvider as SuperblocksProvider, type TypedExecuteApi, type TypedUseApi, type TypedUseApiData, type UseApiDataOptions, type UseApiDataResult, type UseApiResult, type UseApiReturnType, createElement, createTypedExecuteApi, embedStore, executeApi, getAppMode, logoutIntegrations, queryClient, registerComponent, tailwindStylesCategory, useApi, useApiData, useApiStateful, useEmbedEvent, useEmbedProperties, useEmitEmbedEvent, useSuperblocksDataTags, useSuperblocksGroups, useSuperblocksProfiles, useSuperblocksUser, useTypedApi, useTypedApiData };
2324
+ //# sourceMappingURL=index.d.ts.map