@superblocksteam/library 2.0.3-next.71

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 (408) hide show
  1. package/LICENSE.txt +87 -0
  2. package/README.md +108 -0
  3. package/dist/allPaths-DyYm9YwR.js +17 -0
  4. package/dist/allPaths-DyYm9YwR.js.map +1 -0
  5. package/dist/allPaths-KD515okF.js +17 -0
  6. package/dist/allPaths-KD515okF.js.map +1 -0
  7. package/dist/allPathsLoader-ZiZSv3bC.js +22 -0
  8. package/dist/allPathsLoader-ZiZSv3bC.js.map +1 -0
  9. package/dist/allPathsLoader-fVkkn-jB.js +22 -0
  10. package/dist/allPathsLoader-fVkkn-jB.js.map +1 -0
  11. package/dist/icons-BrNMuu_I.js +40 -0
  12. package/dist/icons-BrNMuu_I.js.map +1 -0
  13. package/dist/index-BxzKdlqH.js +1353 -0
  14. package/dist/index-BxzKdlqH.js.map +1 -0
  15. package/dist/index-DBrh5TuF.js +195984 -0
  16. package/dist/index-DBrh5TuF.js.map +1 -0
  17. package/dist/index-DIJYif9G.js +1341 -0
  18. package/dist/index-DIJYif9G.js.map +1 -0
  19. package/dist/index-DIn-fanT.js +1353 -0
  20. package/dist/index-DIn-fanT.js.map +1 -0
  21. package/dist/index-LHtbj0-V.js +1341 -0
  22. package/dist/index-LHtbj0-V.js.map +1 -0
  23. package/dist/index.css +34465 -0
  24. package/dist/index.js +162 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/splitPathsBySizeLoader-BJsOSCsQ.js +34 -0
  27. package/dist/splitPathsBySizeLoader-BJsOSCsQ.js.map +1 -0
  28. package/dist/splitPathsBySizeLoader-CSiJpIs1.js +34 -0
  29. package/dist/splitPathsBySizeLoader-CSiJpIs1.js.map +1 -0
  30. package/dist-types/app-internal.d.ts +4 -0
  31. package/dist-types/docs-utils/generate-docs.d.ts +2 -0
  32. package/dist-types/edit-mode/collisions-layer.d.ts +3 -0
  33. package/dist-types/edit-mode/create-component.d.ts +8 -0
  34. package/dist-types/edit-mode/debug-tools.d.ts +11 -0
  35. package/dist-types/edit-mode/dnd/collision-detection.d.ts +3 -0
  36. package/dist-types/edit-mode/dnd/dnd-provider.d.ts +4 -0
  37. package/dist-types/edit-mode/dnd/draggable-widget.d.ts +7 -0
  38. package/dist-types/edit-mode/dnd/drop-layer.d.ts +5 -0
  39. package/dist-types/edit-mode/dnd/droppable-widget.d.ts +9 -0
  40. package/dist-types/edit-mode/dnd/grid-drop.d.ts +4 -0
  41. package/dist-types/edit-mode/dnd/grid-store.d.ts +31 -0
  42. package/dist-types/edit-mode/dnd/grid-utils.d.ts +8 -0
  43. package/dist-types/edit-mode/dnd/handle-grid-drop.d.ts +9 -0
  44. package/dist-types/edit-mode/dnd/handle-stack-drop.d.ts +9 -0
  45. package/dist-types/edit-mode/dnd/hooks/use-component-draggable.d.ts +5 -0
  46. package/dist-types/edit-mode/dnd/hooks/use-component-droppable.d.ts +6 -0
  47. package/dist-types/edit-mode/dnd/hooks/use-handle-dnd-events.d.ts +1 -0
  48. package/dist-types/edit-mode/dnd/hooks/use-widget-node-ref.d.ts +2 -0
  49. package/dist-types/edit-mode/dnd/new-components-drag-layer.d.ts +6 -0
  50. package/dist-types/edit-mode/dnd/stack-drop.d.ts +4 -0
  51. package/dist-types/edit-mode/dnd/stack-store.d.ts +10 -0
  52. package/dist-types/edit-mode/dnd/stack-utils.d.ts +13 -0
  53. package/dist-types/edit-mode/dnd/types.d.ts +45 -0
  54. package/dist-types/edit-mode/dnd/utils.d.ts +13 -0
  55. package/dist-types/edit-mode/duplicated-name-popover.d.ts +7 -0
  56. package/dist-types/edit-mode/edit-store.d.ts +28 -0
  57. package/dist-types/edit-mode/edit-wrapper.d.ts +17 -0
  58. package/dist-types/edit-mode/editor-hotkeys.d.ts +3 -0
  59. package/dist-types/edit-mode/features/connection-manager.d.ts +10 -0
  60. package/dist-types/edit-mode/features/drag-and-drop-store.d.ts +69 -0
  61. package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +17 -0
  62. package/dist-types/edit-mode/features/operation-store.d.ts +49 -0
  63. package/dist-types/edit-mode/features/properties-panel-manager.d.ts +31 -0
  64. package/dist-types/edit-mode/features/resizing-store.d.ts +50 -0
  65. package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +84 -0
  66. package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +51 -0
  67. package/dist-types/edit-mode/features/ui-store.d.ts +41 -0
  68. package/dist-types/edit-mode/hooks/use-register-source-element.d.ts +2 -0
  69. package/dist-types/edit-mode/iframe-wrappers.d.ts +4 -0
  70. package/dist-types/edit-mode/interaction-add-section-button.d.ts +4 -0
  71. package/dist-types/edit-mode/interaction-layer.d.ts +11 -0
  72. package/dist-types/edit-mode/interaction-rect-handles.d.ts +7 -0
  73. package/dist-types/edit-mode/interaction-rect-name-pill.d.ts +13 -0
  74. package/dist-types/edit-mode/interaction-rect.d.ts +44 -0
  75. package/dist-types/edit-mode/interaction-utils.d.ts +3 -0
  76. package/dist-types/edit-mode/mobx-sync/create-patch.d.ts +2 -0
  77. package/dist-types/edit-mode/mobx-sync/deep-observe.d.ts +24 -0
  78. package/dist-types/edit-mode/mobx-sync/mobx-editor-sync.d.ts +23 -0
  79. package/dist-types/edit-mode/properties.d.ts +13 -0
  80. package/dist-types/edit-mode/resize-capabilities.d.ts +5 -0
  81. package/dist-types/edit-mode/right-click-menu/right-click-menu.d.ts +13 -0
  82. package/dist-types/edit-mode/roots.d.ts +9 -0
  83. package/dist-types/edit-mode/runtime-children.d.ts +14 -0
  84. package/dist-types/edit-mode/sb-component-from-meta.d.ts +2 -0
  85. package/dist-types/edit-mode/source-update-api.d.ts +24 -0
  86. package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +34 -0
  87. package/dist-types/internal-testing/components/api.d.ts +3 -0
  88. package/dist-types/internal-testing/components/button.d.ts +1 -0
  89. package/dist-types/internal-testing/components/checkbox.d.ts +1 -0
  90. package/dist-types/internal-testing/components/container.d.ts +1 -0
  91. package/dist-types/internal-testing/components/date-picker.d.ts +1 -0
  92. package/dist-types/internal-testing/components/dropdown.d.ts +1 -0
  93. package/dist-types/internal-testing/components/icon.d.ts +1 -0
  94. package/dist-types/internal-testing/components/image.d.ts +1 -0
  95. package/dist-types/internal-testing/components/input.d.ts +1 -0
  96. package/dist-types/internal-testing/components/key-value.d.ts +1 -0
  97. package/dist-types/internal-testing/components/modal.d.ts +1 -0
  98. package/dist-types/internal-testing/components/section-column.d.ts +1 -0
  99. package/dist-types/internal-testing/components/switch.d.ts +1 -0
  100. package/dist-types/internal-testing/components/table.d.ts +1 -0
  101. package/dist-types/internal-testing/components/timer.d.ts +3 -0
  102. package/dist-types/internal-testing/components/variable.d.ts +3 -0
  103. package/dist-types/internal-testing/utils.d.ts +5 -0
  104. package/dist-types/internal-testing/widgets.d.ts +2 -0
  105. package/dist-types/lib/hooks/use-alignment-styles.d.ts +9 -0
  106. package/dist-types/lib/hooks/use-cached-value.d.ts +11 -0
  107. package/dist-types/lib/hooks/use-callback-as-ref.d.ts +1 -0
  108. package/dist-types/lib/hooks/use-deep-memo.d.ts +9 -0
  109. package/dist-types/lib/hooks/use-editor-hotkeys.d.ts +3 -0
  110. package/dist-types/lib/hooks/use-element-rect.d.ts +7 -0
  111. package/dist-types/lib/hooks/use-observer-memo.d.ts +14 -0
  112. package/dist-types/lib/hooks/use-observer-memo.test.d.ts +1 -0
  113. package/dist-types/lib/hooks/use-pointer-down-outside.d.ts +15 -0
  114. package/dist-types/lib/hooks/use-stable-effect.d.ts +22 -0
  115. package/dist-types/lib/hooks/use-stable-effect.test.d.ts +1 -0
  116. package/dist-types/lib/index.d.ts +40 -0
  117. package/dist-types/lib/internal-details/actions-context.d.ts +9 -0
  118. package/dist-types/lib/internal-details/component-info-context.d.ts +10 -0
  119. package/dist-types/lib/internal-details/entities-state.d.ts +10 -0
  120. package/dist-types/lib/internal-details/entities.d.ts +5 -0
  121. package/dist-types/lib/internal-details/env.d.ts +1 -0
  122. package/dist-types/lib/internal-details/identifier-normalizer.d.ts +9 -0
  123. package/dist-types/lib/internal-details/is-sb-component.d.ts +7 -0
  124. package/dist-types/lib/internal-details/lib/devtools.d.ts +1 -0
  125. package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +104 -0
  126. package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.d.ts +2 -0
  127. package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts +6 -0
  128. package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +20 -0
  129. package/dist-types/lib/internal-details/lib/evaluator/create-global-object.d.ts +7 -0
  130. package/dist-types/lib/internal-details/lib/evaluator/create-scope-proxy.d.ts +2 -0
  131. package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +27 -0
  132. package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +83 -0
  133. package/dist-types/lib/internal-details/lib/evaluator/entity-types.d.ts +16 -0
  134. package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +7 -0
  135. package/dist-types/lib/internal-details/lib/evaluator/names.d.ts +7 -0
  136. package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +2 -0
  137. package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +32 -0
  138. package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.d.ts +1 -0
  139. package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.test.d.ts +1 -0
  140. package/dist-types/lib/internal-details/lib/features/api-store.d.ts +31 -0
  141. package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +77 -0
  142. package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +29 -0
  143. package/dist-types/lib/internal-details/lib/features/injected-features.d.ts +8 -0
  144. package/dist-types/lib/internal-details/lib/features/name-manager.d.ts +36 -0
  145. package/dist-types/lib/internal-details/lib/iframe.d.ts +44 -0
  146. package/dist-types/lib/internal-details/lib/mobx-cached-getter.d.ts +1 -0
  147. package/dist-types/lib/internal-details/lib/resolve-id-singleton.d.ts +4 -0
  148. package/dist-types/lib/internal-details/lib/root-store.d.ts +30 -0
  149. package/dist-types/lib/internal-details/lib/throttle.d.ts +2 -0
  150. package/dist-types/lib/internal-details/lib/types.d.ts +229 -0
  151. package/dist-types/lib/internal-details/reactive-component.d.ts +10 -0
  152. package/dist-types/lib/internal-details/sb-wrapper-notes.d.ts +1 -0
  153. package/dist-types/lib/internal-details/sb-wrapper.d.ts +11 -0
  154. package/dist-types/lib/internal-details/scope/scope-context.d.ts +8 -0
  155. package/dist-types/lib/internal-details/scope/scope.d.ts +12 -0
  156. package/dist-types/lib/internal-details/size.d.ts +1 -0
  157. package/dist-types/lib/internal-details/theme-context.d.ts +8 -0
  158. package/dist-types/lib/internal-details/use-track-runtime-widget.d.ts +15 -0
  159. package/dist-types/lib/sb-trigger.d.ts +53 -0
  160. package/dist-types/lib/triggers/base.d.ts +17 -0
  161. package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +18 -0
  162. package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +21 -0
  163. package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +17 -0
  164. package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +17 -0
  165. package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +20 -0
  166. package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +20 -0
  167. package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +28 -0
  168. package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +23 -0
  169. package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +26 -0
  170. package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +18 -0
  171. package/dist-types/lib/triggers/implementations/run-js.d.ts +18 -0
  172. package/dist-types/lib/triggers/implementations/set-profile.d.ts +17 -0
  173. package/dist-types/lib/triggers/implementations/show-alert.d.ts +22 -0
  174. package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +15 -0
  175. package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +18 -0
  176. package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +17 -0
  177. package/dist-types/lib/triggers/implementations/trigger-event.d.ts +17 -0
  178. package/dist-types/lib/triggers/registry.d.ts +174 -0
  179. package/dist-types/lib/triggers/run-event-handlers.d.ts +18 -0
  180. package/dist-types/lib/user-facing/component-base/components/autolinked-text.d.ts +8 -0
  181. package/dist-types/lib/user-facing/component-base/components/button.d.ts +46 -0
  182. package/dist-types/lib/user-facing/component-base/components/checkbox.d.ts +12 -0
  183. package/dist-types/lib/user-facing/component-base/components/dropdown-select.d.ts +4 -0
  184. package/dist-types/lib/user-facing/component-base/components/dynamic-svg.d.ts +10 -0
  185. package/dist-types/lib/user-facing/component-base/components/expand-button.d.ts +8 -0
  186. package/dist-types/lib/user-facing/component-base/components/loading-animator.d.ts +4 -0
  187. package/dist-types/lib/user-facing/component-base/components/plain-link.d.ts +1 -0
  188. package/dist-types/lib/user-facing/component-base/components/popper.d.ts +20 -0
  189. package/dist-types/lib/user-facing/component-base/components/search-component.d.ts +19 -0
  190. package/dist-types/lib/user-facing/component-base/components/span-trunc-middle.d.ts +9 -0
  191. package/dist-types/lib/user-facing/component-base/components/switch.d.ts +6 -0
  192. package/dist-types/lib/user-facing/component-base/constants.d.ts +18 -0
  193. package/dist-types/lib/user-facing/component-base/error/error-inline-message.d.ts +36 -0
  194. package/dist-types/lib/user-facing/component-base/error/error-tooltip.d.ts +11 -0
  195. package/dist-types/lib/user-facing/component-base/error/error-utils.d.ts +13 -0
  196. package/dist-types/lib/user-facing/component-base/error/widget-errors-wrapper.d.ts +15 -0
  197. package/dist-types/lib/user-facing/component-base/error-boundary.d.ts +18 -0
  198. package/dist-types/lib/user-facing/component-base/sb-component.d.ts +18 -0
  199. package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +16 -0
  200. package/dist-types/lib/user-facing/component-base/styles/hover-styles.d.ts +10 -0
  201. package/dist-types/lib/user-facing/component-base/styles/input-styles.d.ts +2 -0
  202. package/dist-types/lib/user-facing/component-base/use-passthrough-props.d.ts +6 -0
  203. package/dist-types/lib/user-facing/component-base/utils/format-utils.d.ts +37 -0
  204. package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +17 -0
  205. package/dist-types/lib/user-facing/components/button/index.d.ts +37 -0
  206. package/dist-types/lib/user-facing/components/button/props.d.ts +48 -0
  207. package/dist-types/lib/user-facing/components/checkbox/checkbox-component.d.ts +9 -0
  208. package/dist-types/lib/user-facing/components/checkbox/constants.d.ts +2 -0
  209. package/dist-types/lib/user-facing/components/checkbox/index.d.ts +43 -0
  210. package/dist-types/lib/user-facing/components/checkbox/props.d.ts +44 -0
  211. package/dist-types/lib/user-facing/components/checkbox/types.d.ts +19 -0
  212. package/dist-types/lib/user-facing/components/column/index.d.ts +51 -0
  213. package/dist-types/lib/user-facing/components/column/props.d.ts +45 -0
  214. package/dist-types/lib/user-facing/components/container/index.d.ts +63 -0
  215. package/dist-types/lib/user-facing/components/container/props.d.ts +58 -0
  216. package/dist-types/lib/user-facing/components/custom/context.d.ts +11 -0
  217. package/dist-types/lib/user-facing/components/custom/index.d.ts +2 -0
  218. package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +27 -0
  219. package/dist-types/lib/user-facing/components/date-picker/constants.d.ts +8 -0
  220. package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +29 -0
  221. package/dist-types/lib/user-facing/components/date-picker/date-picker.d.ts +2 -0
  222. package/dist-types/lib/user-facing/components/date-picker/index.d.ts +62 -0
  223. package/dist-types/lib/user-facing/components/date-picker/props.d.ts +64 -0
  224. package/dist-types/lib/user-facing/components/date-picker/props.test-d.d.ts +1 -0
  225. package/dist-types/lib/user-facing/components/date-picker/side-effects.d.ts +3 -0
  226. package/dist-types/lib/user-facing/components/date-picker/types.d.ts +40 -0
  227. package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +24 -0
  228. package/dist-types/lib/user-facing/components/dropdown/constants.d.ts +5 -0
  229. package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +106 -0
  230. package/dist-types/lib/user-facing/components/dropdown/index.d.ts +73 -0
  231. package/dist-types/lib/user-facing/components/dropdown/multi-dropdown.d.ts +18 -0
  232. package/dist-types/lib/user-facing/components/dropdown/normalize-values.d.ts +2 -0
  233. package/dist-types/lib/user-facing/components/dropdown/props.d.ts +76 -0
  234. package/dist-types/lib/user-facing/components/dropdown/types.d.ts +89 -0
  235. package/dist-types/lib/user-facing/components/dropdown/utils.d.ts +8 -0
  236. package/dist-types/lib/user-facing/components/grid/calculations/calculate-constraints.d.ts +26 -0
  237. package/dist-types/lib/user-facing/components/grid/calculations/calculate-row-positions.d.ts +2 -0
  238. package/dist-types/lib/user-facing/components/grid/calculations/order-constraints.d.ts +2 -0
  239. package/dist-types/lib/user-facing/components/grid/index.d.ts +36 -0
  240. package/dist-types/lib/user-facing/components/grid/use-height-observer.d.ts +5 -0
  241. package/dist-types/lib/user-facing/components/grid/utils.d.ts +1 -0
  242. package/dist-types/lib/user-facing/components/icon/index.d.ts +25 -0
  243. package/dist-types/lib/user-facing/components/icon/props.d.ts +26 -0
  244. package/dist-types/lib/user-facing/components/image/image-component.d.ts +38 -0
  245. package/dist-types/lib/user-facing/components/image/index.d.ts +29 -0
  246. package/dist-types/lib/user-facing/components/image/props.d.ts +39 -0
  247. package/dist-types/lib/user-facing/components/input/constants.d.ts +24 -0
  248. package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +5 -0
  249. package/dist-types/lib/user-facing/components/input/index.d.ts +97 -0
  250. package/dist-types/lib/user-facing/components/input/input-component.d.ts +60 -0
  251. package/dist-types/lib/user-facing/components/input/props.d.ts +101 -0
  252. package/dist-types/lib/user-facing/components/input/styles.d.ts +6 -0
  253. package/dist-types/lib/user-facing/components/input/types.d.ts +45 -0
  254. package/dist-types/lib/user-facing/components/input/utils.d.ts +15 -0
  255. package/dist-types/lib/user-facing/components/key-value/components/key-styles.d.ts +3 -0
  256. package/dist-types/lib/user-facing/components/key-value/components/property-key.d.ts +7 -0
  257. package/dist-types/lib/user-facing/components/key-value/components/property-value.d.ts +12 -0
  258. package/dist-types/lib/user-facing/components/key-value/components/value-styles.d.ts +6 -0
  259. package/dist-types/lib/user-facing/components/key-value/constants.d.ts +7 -0
  260. package/dist-types/lib/user-facing/components/key-value/derived-properties.d.ts +1 -0
  261. package/dist-types/lib/user-facing/components/key-value/index.d.ts +39 -0
  262. package/dist-types/lib/user-facing/components/key-value/key-value-component.d.ts +2 -0
  263. package/dist-types/lib/user-facing/components/key-value/properties-props.d.ts +45 -0
  264. package/dist-types/lib/user-facing/components/key-value/props.d.ts +38 -0
  265. package/dist-types/lib/user-facing/components/key-value/styles.d.ts +22 -0
  266. package/dist-types/lib/user-facing/components/key-value/types.d.ts +106 -0
  267. package/dist-types/lib/user-facing/components/key-value/utils.d.ts +11 -0
  268. package/dist-types/lib/user-facing/components/modal/constants.d.ts +8 -0
  269. package/dist-types/lib/user-facing/components/modal/index.d.ts +49 -0
  270. package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +36 -0
  271. package/dist-types/lib/user-facing/components/modal/props.d.ts +46 -0
  272. package/dist-types/lib/user-facing/components/page/index.d.ts +18 -0
  273. package/dist-types/lib/user-facing/components/page/props.d.ts +19 -0
  274. package/dist-types/lib/user-facing/components/page/register-page.d.ts +2 -0
  275. package/dist-types/lib/user-facing/components/section/index.d.ts +19 -0
  276. package/dist-types/lib/user-facing/components/section/props.d.ts +22 -0
  277. package/dist-types/lib/user-facing/components/slideout/index.d.ts +15 -0
  278. package/dist-types/lib/user-facing/components/slideout/props.d.ts +15 -0
  279. package/dist-types/lib/user-facing/components/stack/index.d.ts +60 -0
  280. package/dist-types/lib/user-facing/components/switch/constants.d.ts +3 -0
  281. package/dist-types/lib/user-facing/components/switch/index.d.ts +44 -0
  282. package/dist-types/lib/user-facing/components/switch/props.d.ts +45 -0
  283. package/dist-types/lib/user-facing/components/switch/switch-component.d.ts +4 -0
  284. package/dist-types/lib/user-facing/components/switch/types.d.ts +19 -0
  285. package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +245 -0
  286. package/dist-types/lib/user-facing/components/table/components/autotooltip-component.d.ts +17 -0
  287. package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +16 -0
  288. package/dist-types/lib/user-facing/components/table/components/column-settings.d.ts +11 -0
  289. package/dist-types/lib/user-facing/components/table/components/edit-cell.d.ts +15 -0
  290. package/dist-types/lib/user-facing/components/table/components/edit-checkbox-cell.d.ts +11 -0
  291. package/dist-types/lib/user-facing/components/table/components/edit-date-cell.d.ts +12 -0
  292. package/dist-types/lib/user-facing/components/table/components/edit-input-cell.d.ts +14 -0
  293. package/dist-types/lib/user-facing/components/table/components/edit-multi-select-cell.d.ts +13 -0
  294. package/dist-types/lib/user-facing/components/table/components/edit-single-select-cell.d.ts +13 -0
  295. package/dist-types/lib/user-facing/components/table/components/edit-utils.d.ts +28 -0
  296. package/dist-types/lib/user-facing/components/table/components/editable-link-cell.d.ts +20 -0
  297. package/dist-types/lib/user-facing/components/table/components/filter-popover-content.d.ts +37 -0
  298. package/dist-types/lib/user-facing/components/table/components/popover-video.d.ts +5 -0
  299. package/dist-types/lib/user-facing/components/table/components/table-action-icon.d.ts +13 -0
  300. package/dist-types/lib/user-facing/components/table/components/table-column-header-button.d.ts +19 -0
  301. package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +15 -0
  302. package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +40 -0
  303. package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +62 -0
  304. package/dist-types/lib/user-facing/components/table/components/table-loading-state.d.ts +11 -0
  305. package/dist-types/lib/user-facing/components/table/components/table-pagination-input.d.ts +10 -0
  306. package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +18 -0
  307. package/dist-types/lib/user-facing/components/table/components/table-row-context-menu.d.ts +17 -0
  308. package/dist-types/lib/user-facing/components/table/components/table-tag.d.ts +25 -0
  309. package/dist-types/lib/user-facing/components/table/constants.d.ts +111 -0
  310. package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +20 -0
  311. package/dist-types/lib/user-facing/components/table/index.d.ts +338 -0
  312. package/dist-types/lib/user-facing/components/table/props.d.ts +342 -0
  313. package/dist-types/lib/user-facing/components/table/table-component.d.ts +100 -0
  314. package/dist-types/lib/user-facing/components/table/table-manager.d.ts +23 -0
  315. package/dist-types/lib/user-facing/components/table/table-styles.d.ts +78 -0
  316. package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +147 -0
  317. package/dist-types/lib/user-facing/components/table/table-widget.d.ts +148 -0
  318. package/dist-types/lib/user-facing/components/table/types.d.ts +471 -0
  319. package/dist-types/lib/user-facing/components/table/use-sticky.d.ts +1 -0
  320. package/dist-types/lib/user-facing/components/table/utils.d.ts +2 -0
  321. package/dist-types/lib/user-facing/components/text/index.d.ts +51 -0
  322. package/dist-types/lib/user-facing/components/text/long-text-button.d.ts +8 -0
  323. package/dist-types/lib/user-facing/components/text/props.d.ts +60 -0
  324. package/dist-types/lib/user-facing/components/text/styles.d.ts +2 -0
  325. package/dist-types/lib/user-facing/components/text/utils.d.ts +25 -0
  326. package/dist-types/lib/user-facing/constants.d.ts +2 -0
  327. package/dist-types/lib/user-facing/entities/api/index.d.ts +14 -0
  328. package/dist-types/lib/user-facing/entities/api/props.d.ts +15 -0
  329. package/dist-types/lib/user-facing/entities/timer/index.d.ts +16 -0
  330. package/dist-types/lib/user-facing/entities/timer/props.d.ts +19 -0
  331. package/dist-types/lib/user-facing/entities/variable/index.d.ts +14 -0
  332. package/dist-types/lib/user-facing/entities/variable/props.d.ts +13 -0
  333. package/dist-types/lib/user-facing/global-functions.d.ts +23 -0
  334. package/dist-types/lib/user-facing/hooks/use-editor.d.ts +42 -0
  335. package/dist-types/lib/user-facing/hooks/use-update-properties.d.ts +1 -0
  336. package/dist-types/lib/user-facing/icons/constants.d.ts +8 -0
  337. package/dist-types/lib/user-facing/icons/encoded.d.ts +1 -0
  338. package/dist-types/lib/user-facing/icons/helpers.d.ts +21 -0
  339. package/dist-types/lib/user-facing/icons/index.d.ts +2 -0
  340. package/dist-types/lib/user-facing/internal-index.d.ts +4 -0
  341. package/dist-types/lib/user-facing/layers.d.ts +43 -0
  342. package/dist-types/lib/user-facing/properties-panel/constants.d.ts +1 -0
  343. package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +5 -0
  344. package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +21 -0
  345. package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +12 -0
  346. package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +44 -0
  347. package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +114 -0
  348. package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +6 -0
  349. package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +253 -0
  350. package/dist-types/lib/user-facing/properties-panel/props-builder.test-d.d.ts +1 -0
  351. package/dist-types/lib/user-facing/properties-panel/props-panel-utils.d.ts +3 -0
  352. package/dist-types/lib/user-facing/properties-panel/validators.d.ts +33 -0
  353. package/dist-types/lib/user-facing/sb-event-flow.d.ts +52 -0
  354. package/dist-types/lib/user-facing/sb-provider.d.ts +12 -0
  355. package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +6 -0
  356. package/dist-types/lib/user-facing/state/create-scope.d.ts +6 -0
  357. package/dist-types/lib/user-facing/state/sb-computed.d.ts +2 -0
  358. package/dist-types/lib/user-facing/state/types.d.ts +17 -0
  359. package/dist-types/lib/user-facing/styling/color-utils.d.ts +13 -0
  360. package/dist-types/lib/user-facing/styling/colors.d.ts +67 -0
  361. package/dist-types/lib/user-facing/styling/style-as-class.d.ts +1 -0
  362. package/dist-types/lib/user-facing/styling/styles.d.ts +4 -0
  363. package/dist-types/lib/user-facing/styling/widget-label-styles.d.ts +11 -0
  364. package/dist-types/lib/user-facing/themes/classnames.d.ts +72 -0
  365. package/dist-types/lib/user-facing/themes/constants.d.ts +80 -0
  366. package/dist-types/lib/user-facing/themes/default-theme.d.ts +8 -0
  367. package/dist-types/lib/user-facing/themes/generate-border-css.d.ts +25 -0
  368. package/dist-types/lib/user-facing/themes/generate-border-styles.d.ts +15 -0
  369. package/dist-types/lib/user-facing/themes/generate-class-name.d.ts +2 -0
  370. package/dist-types/lib/user-facing/themes/generate-colors.d.ts +45 -0
  371. package/dist-types/lib/user-facing/themes/generate-theme.d.ts +3 -0
  372. package/dist-types/lib/user-facing/themes/generate-typographies.d.ts +5 -0
  373. package/dist-types/lib/user-facing/themes/generatedStyles/button-styles.d.ts +2 -0
  374. package/dist-types/lib/user-facing/themes/generatedStyles/container-styles.d.ts +2 -0
  375. package/dist-types/lib/user-facing/themes/generatedStyles/datepicker-styles.d.ts +2 -0
  376. package/dist-types/lib/user-facing/themes/generatedStyles/dropdown-styles.d.ts +2 -0
  377. package/dist-types/lib/user-facing/themes/generatedStyles/editor-styles.d.ts +2 -0
  378. package/dist-types/lib/user-facing/themes/generatedStyles/generate-component-styles.d.ts +16 -0
  379. package/dist-types/lib/user-facing/themes/generatedStyles/generate-padding-style.d.ts +19 -0
  380. package/dist-types/lib/user-facing/themes/generatedStyles/icon-styles.d.ts +2 -0
  381. package/dist-types/lib/user-facing/themes/generatedStyles/input-styles.d.ts +3 -0
  382. package/dist-types/lib/user-facing/themes/generatedStyles/paginator-styles.d.ts +2 -0
  383. package/dist-types/lib/user-facing/themes/generatedStyles/popper-styles.d.ts +2 -0
  384. package/dist-types/lib/user-facing/themes/generatedStyles/styles-utils.d.ts +1 -0
  385. package/dist-types/lib/user-facing/themes/generatedStyles/text-styles.d.ts +3 -0
  386. package/dist-types/lib/user-facing/themes/generatedStyles/theme-styles.d.ts +5 -0
  387. package/dist-types/lib/user-facing/themes/generatedStyles/utils.d.ts +23 -0
  388. package/dist-types/lib/user-facing/themes/index.d.ts +5 -0
  389. package/dist-types/lib/user-facing/themes/layers.d.ts +6 -0
  390. package/dist-types/lib/user-facing/themes/padding-constants.d.ts +10 -0
  391. package/dist-types/lib/user-facing/themes/typeface-constants.d.ts +3 -0
  392. package/dist-types/lib/user-facing/themes/typefaces/utils.d.ts +28 -0
  393. package/dist-types/lib/user-facing/themes/typeography/typography-utils.d.ts +33 -0
  394. package/dist-types/lib/user-facing/themes/typeography/use-typography-styling.d.ts +15 -0
  395. package/dist-types/lib/user-facing/themes/typography-constants.d.ts +34 -0
  396. package/dist-types/lib/user-facing/themes/utils.d.ts +16 -0
  397. package/dist-types/lib/user-facing/types.d.ts +22 -0
  398. package/dist-types/lib/user-facing/utils/form.d.ts +10 -0
  399. package/dist-types/lib/utils/clean-object.d.ts +5 -0
  400. package/dist-types/lib/utils/fast-clone.d.ts +1 -0
  401. package/dist-types/lib/utils/generate-id.d.ts +1 -0
  402. package/dist-types/lib/utils/is-user-on-mac.d.ts +1 -0
  403. package/dist-types/lib/utils/is-widget-grid.d.ts +2 -0
  404. package/dist-types/lib/utils/is-widget-vstack.d.ts +2 -0
  405. package/dist-types/lib/utils/shallow-equal.d.ts +1 -0
  406. package/dist-types/lib/utils/widget-wrapper-naming.d.ts +6 -0
  407. package/dist-types/main.d.ts +1 -0
  408. package/package.json +152 -0
@@ -0,0 +1,34 @@
1
+ import type { FromChildToParentMessageTypesMap } from "../lib/index.js";
2
+ import type { StreamEvent } from "../lib/internal-details/lib/types.js";
3
+ import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
4
+ import type { GeneratedTheme, SbElement, Theme } from "@superblocksteam/library-shared/types";
5
+ export declare class SuperblocksEditorBridge {
6
+ private static instance;
7
+ private messagesToSend;
8
+ private connectedToParent;
9
+ static getInstance(): SuperblocksEditorBridge;
10
+ connected(): void;
11
+ sendReady(): void;
12
+ sendNotification(type: "success" | "error" | "info" | "warning", message: string, description?: string): void;
13
+ selectWidgets(sourceIds: SbElement[], selectingMultiple?: boolean): void;
14
+ updateWidgetProperty(sourceId: string, updates: Record<string, unknown>): void;
15
+ deleteWidgets(sourceIds: SbElement[]): void;
16
+ undo(): void;
17
+ redo(): void;
18
+ sendStreamedApiEvent(event: StreamEvent, apiName: string): void;
19
+ sendStreamedApiMessage(message: any, apiName: string): void;
20
+ setApiStarted(apiName: string): void;
21
+ setApiResponse(apiName: string, response: unknown): void;
22
+ navigateTo(path: string, newWindow?: boolean): void;
23
+ updateTheme(theme: Theme, generatedTheme: GeneratedTheme): void;
24
+ updatePropertiesPanels(updates: Record<string, PropertiesPanelDefinition>): void;
25
+ addPropertiesPanel(id: string, definition: PropertiesPanelDefinition): void;
26
+ initializeEditorSyncedStore(payload: FromChildToParentMessageTypesMap["codeMode/editor-synced-store/init"]): void;
27
+ updateEditorSyncedStore(payload: FromChildToParentMessageTypesMap["codeMode/editor-synced-store/update"]): void;
28
+ resolvePromise(callbackId: string, payload: unknown): void;
29
+ rejectPromise(callbackId: string, payload: unknown): void;
30
+ canvasClicked(): void;
31
+ private queueMessage;
32
+ private sendImmediate;
33
+ }
34
+ export declare const editorBridge: SuperblocksEditorBridge;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<() => React.JSX.Element>;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Image(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function KeyValue(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Widgets(): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<() => React.JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<() => React.JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export declare function WidgetWrapper({ label, children, }: {
3
+ label: string;
4
+ children: React.ReactNode;
5
+ }): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare function Widgets(): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type VerticalAlignment, type HorizontalAlignment } from "../user-facing/component-base/constants.js";
2
+ import type { ContainerLayout } from "../user-facing/component-base/constants.js";
3
+ import type { CSSProperties } from "react";
4
+ declare const useAlignmentStyles: ({ layout, verticalAlign, horizontalAlign, }: {
5
+ layout?: ContainerLayout;
6
+ verticalAlign?: VerticalAlignment;
7
+ horizontalAlign?: HorizontalAlignment;
8
+ }) => CSSProperties;
9
+ export default useAlignmentStyles;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A hook that caches a (non-primitive) value and returns the cached value for as long it
3
+ * does not change with respect to a deep equality function.
4
+ * This is useful when a non-primitive is to be used in a dependency array:
5
+ * the cached value returned will be referentially the same object for as long as the
6
+ * object has not changed and therefore the dependency will not change.
7
+ * @param value The value to cache. It does not make sense use this hook for primitive values.
8
+ * @param isEqualFn The (deep) equality function to compare objects, defaults to `isEqual` from lodash.
9
+ * @returns `value` or a cached version of `value` that is (deeply) equal to `value`.
10
+ */
11
+ export declare function useCachedValue<T>(value: T, isEqualFn?: (cachedValue: T, curValue: T) => boolean): T;
@@ -0,0 +1 @@
1
+ export declare const useCallbackAsRef: <T extends (...args: any[]) => any>(callback: T) => (...args: any) => any;
@@ -0,0 +1,9 @@
1
+ import type { DependencyList } from "react";
2
+ /**
3
+ * Custom hook that memoizes a value based on deep equality of dependencies.
4
+ * @param factory A function that returns the value to be memoized.
5
+ * @param deps An array of dependencies that trigger the memoization.
6
+ * @returns The memoized value.
7
+ */
8
+ declare const useDeepMemo: <T>(factory: () => T, deps: DependencyList) => T;
9
+ export default useDeepMemo;
@@ -0,0 +1,3 @@
1
+ import type { KeyHandler } from "hotkeys-js";
2
+ import type { Options } from "react-hotkeys-hook";
3
+ export declare function useEditorHotkeys<T extends Element>(keys: string, callback: KeyHandler, options?: any[] | Options, deps?: any[]): React.MutableRefObject<T | null> | undefined;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { Options as DebounceSettings } from "use-debounce";
3
+ export declare function useElementRect<T extends HTMLElement>(target: React.RefObject<T> | T | null, wait?: number, options?: DebounceSettings): DOMRect | undefined;
4
+ export declare function useElementWidth<T extends HTMLElement>(target: React.RefObject<T> | T | null, wait?: number): number;
5
+ export declare function useHeightChange<T extends HTMLElement>(target: React.RefObject<T> | T | null, onChange: (height: number) => void, wait?: number): void;
6
+ export declare function useWidthChange<T extends HTMLElement>(target: React.RefObject<T> | T | null, onChange: (width: number) => void, wait?: number): void;
7
+ export declare function useRectChange<T extends HTMLElement>(target: React.RefObject<T> | T | null, onChange: (width: number, height: number) => void, wait?: number): void;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The component that uses this hook must be wrapped `observer`, otherwise state changes will not
3
+ * cause this hook to re-run.
4
+ */
5
+ export declare const useObserverMemo: <T>(fn: () => T, deps: any[]) => T;
6
+ /**
7
+ * Like useObserverMemo, but does not require the component to be wrapped in an observer.
8
+ * It is recommended to use useObserverMemo instead.
9
+ * @see useObserverMemo
10
+ *
11
+ * Note: This implementation uses MobX reactions to track both observable changes and
12
+ * dependency changes.
13
+ */
14
+ export declare const useStandaloneObserverMemo: <T>(fn: () => T, deps: any[]) => T;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import type React from "react";
2
+ /**
3
+ * Calls @param onClickOutside when the user clicks outside of a set of elements
4
+ *
5
+ * @param - `wrapperRefs, wrapperIds, wrapperSelectors` - Arrays of refs to DOM elements that should be considered "wrappers" for
6
+ * the click outside handler. If the user clicks outside of all of these elements, the callback will be
7
+ * called.
8
+ * @param - onClickOutside - A callback function that will be called when the user clicks outside of the wrappers
9
+ */
10
+ export declare function usePointerDownOutside({ wrapperRefs, wrapperIds, wrapperSelectors, onClickOutside, }: {
11
+ wrapperRefs?: Array<React.MutableRefObject<Element | null | undefined>>;
12
+ wrapperIds?: Array<string>;
13
+ wrapperSelectors?: Array<string>;
14
+ onClickOutside: () => void;
15
+ }): void;
@@ -0,0 +1,22 @@
1
+ import type React from "react";
2
+ type isType = (a: unknown) => boolean;
3
+ type isEqual = (a: any, b: any) => boolean;
4
+ /**
5
+ * Options for the useStableEffect hook.
6
+ */
7
+ export interface UseStableEffectOptions {
8
+ customEqualChecks?: [isType, isEqual][];
9
+ ignoreKeys?: string[];
10
+ cold?: boolean;
11
+ }
12
+ /**
13
+ * Custom hook that runs an effect only when specified properties of an object change.
14
+ *
15
+ * @param effect - The effect callback to run.
16
+ * @param obj - The object whose properties are checked for changes.
17
+ * @param options - Optional custom equality checks and keys to ignore when checking for changes.
18
+ */
19
+ declare const useStableEffect: (effect: React.EffectCallback, obj: {
20
+ [key: string]: unknown;
21
+ }, options?: UseStableEffectOptions) => void;
22
+ export default useStableEffect;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,40 @@
1
+ import "./style.css";
2
+ import "../edit-mode/edit-style.css";
3
+ export { SbButton } from "./user-facing/components/button/index.jsx";
4
+ export { SbSection } from "./user-facing/components/section/index.jsx";
5
+ export { SbColumn } from "./user-facing/components/column/index.jsx";
6
+ export { SbContainer } from "./user-facing/components/container/index.jsx";
7
+ export { SbInput } from "./user-facing/components/input/index.jsx";
8
+ export { SbPage } from "./user-facing/components/page/index.jsx";
9
+ export { SbText } from "./user-facing/components/text/index.jsx";
10
+ export { SbModal } from "./user-facing/components/modal/index.jsx";
11
+ export { SbSlideout } from "./user-facing/components/slideout/index.jsx";
12
+ export { SbTable } from "./user-facing/components/table/index.jsx";
13
+ export { SbDropdown } from "./user-facing/components/dropdown/index.jsx";
14
+ export { SbCustom } from "./user-facing/components/custom/index.jsx";
15
+ export { SbKeyValue } from "./user-facing/components/key-value/index.jsx";
16
+ export { registerComponent, type CustomComponentProps, } from "./user-facing/components/custom/register-custom-component.jsx";
17
+ export { SbCheckbox } from "./user-facing/components/checkbox/index.jsx";
18
+ export { SbDatePicker } from "./user-facing/components/date-picker/index.jsx";
19
+ export { SbSwitch } from "./user-facing/components/switch/index.jsx";
20
+ export { SbIcon } from "./user-facing/components/icon/index.jsx";
21
+ export { SbImage } from "./user-facing/components/image/index.jsx";
22
+ export { SbVariable, SbVariablePersistence, } from "./user-facing/entities/variable/index.js";
23
+ export { SbTimer } from "./user-facing/entities/timer/index.js";
24
+ export { SbApi } from "./user-facing/entities/api/index.js";
25
+ export { default as MakeEditableWithSuperblocks } from "./user-facing/sb-provider.jsx";
26
+ export { default as SbProvider } from "./user-facing/sb-provider.jsx";
27
+ export { SbEventFlow } from "./user-facing/sb-event-flow.js";
28
+ export { copyToClipboard, navigateTo, setQueryParams, download, showAlert, logoutIntegrations, } from "./user-facing/global-functions.js";
29
+ export { registerScope } from "./internal-details/scope/scope.jsx";
30
+ export { registerPage } from "./user-facing/components/page/register-page.js";
31
+ export { createSbScope } from "./user-facing/state/create-scope.js";
32
+ export { type BindingIdentifier } from "./user-facing/state/types.js";
33
+ export { SbEvent } from "./internal-details/entities.js";
34
+ export { useUpdateProperties } from "./user-facing/hooks/use-update-properties.js";
35
+ export { Prop } from "./user-facing/properties-panel/props-builder.js";
36
+ export { sbComputed } from "./user-facing/state/sb-computed.js";
37
+ export { Dim, type DimModes, SB } from "@superblocksteam/library-shared";
38
+ export type { Theme } from "@superblocksteam/library-shared/types";
39
+ export type { FromChildToParentMessageTypes, FromChildToParentMessageTypesMap, FromParentToChildMessageTypes, FromParentToChildMessageTypesMap, } from "./internal-details/lib/types.js";
40
+ export { Outlet } from "react-router";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type { createEntityActions } from "./entities-state.js";
3
+ export declare const ActionsProvider: React.FC<React.PropsWithChildren<{
4
+ actions: ReturnType<typeof createEntityActions>;
5
+ }>>;
6
+ export declare const useActions: () => {
7
+ reset: () => void;
8
+ update: (run: (entity: import("./lib/evaluator/base-entity-manager.js").Entity) => void) => void;
9
+ };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
3
+ type ComponentInfo = {
4
+ sourceId: SbElement;
5
+ instanceId: SbInstance;
6
+ name: string;
7
+ };
8
+ export declare const ComponentInfoProvider: React.FC<React.PropsWithChildren<ComponentInfo>>;
9
+ export declare const useComponentInfo: () => ComponentInfo;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { Entity, ScopeId } from "./lib/evaluator/base-entity-manager.js";
2
+ declare const entityActions: {
3
+ reset: (entityName: string, scopeId: ScopeId) => void;
4
+ update: (entityName: string, scopeId: ScopeId, run: (entity: Entity) => void) => void;
5
+ };
6
+ declare const createEntityActions: (entityName: string, scopeId: ScopeId) => {
7
+ reset: () => void;
8
+ update: (run: (entity: Entity) => void) => void;
9
+ };
10
+ export { entityActions, createEntityActions };
@@ -0,0 +1,5 @@
1
+ import type { SbEntity, SbEvent as TSbEvent } from "@superblocksteam/library-shared/types";
2
+ export declare function isSbEntity(entity: any): entity is SbEntity;
3
+ export declare function SbEvent({ payload, }: {
4
+ payload: string;
5
+ }): Omit<TSbEvent, "name" | "id">;
@@ -0,0 +1 @@
1
+ export declare const SUPERBLOCKS_UI_MATERIAL_ICON_CDN_PATH: any;
@@ -0,0 +1,9 @@
1
+ import type { BindingIdentifier } from "../user-facing/state/types";
2
+ export declare const getNormalizedIdInfo: (params: {
3
+ bind: BindingIdentifier | undefined;
4
+ propsName: string | undefined;
5
+ fallbackScopeId: string;
6
+ }) => {
7
+ name: string | undefined;
8
+ scopeId: string;
9
+ };
@@ -0,0 +1,7 @@
1
+ import type { SbComponentProps } from "../user-facing/component-base/sb-component";
2
+ import type { ReactNode } from "react";
3
+ type ChildFunction = Function;
4
+ export type StackChildElement = React.ReactElement<SbComponentProps>;
5
+ export declare const superblocksComponentSymbol: unique symbol;
6
+ export declare function isSbComponent(child: ReactNode | ChildFunction): child is StackChildElement;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare function registerStores(stores: Record<string, any>): void;
@@ -0,0 +1,104 @@
1
+ import type { ObserveListener } from "./deep-observe.js";
2
+ import type { Name } from "./names.js";
3
+ import type { ValidateFn } from "../../../user-facing/properties-panel/validators.js";
4
+ import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
5
+ import type { BindingString, ComputedProperty, Dim, DimModes } from "@superblocksteam/library-shared";
6
+ import type { SbElement, SbInstance, UserAccessibleTheme } from "@superblocksteam/library-shared/types";
7
+ export type EntityOutputProp = Exclude<null | undefined | string | number | boolean | object | bigint | any[], BindingString | EntityDerivedProp<any[]>>;
8
+ export type EntityDerivedProp<ARGS extends any[] = any[]> = (this: Readonly<Entity>, state: Readonly<ScopedState>, ...args: ARGS) => EntityOutputProp;
9
+ export type Executable<ARGS extends any[] = any[]> = (this: Entity, state: ScopedState, ...args: ARGS) => void;
10
+ export type ValueInputProp<T = EntityOutputProp> = T | EntityDerivedProp | BindingString | ComputedProperty<T>;
11
+ export type SingleInputProp<T = EntityOutputProp> = ValueInputProp<T> | SbEventFlow | Dim<DimModes>;
12
+ export type NestedInputProp<T> = T extends object ? {
13
+ [K in keyof T]: SingleInputProp<T[K]> | NestedInputProp<T[K]>;
14
+ } : never;
15
+ export type InputProp<T = EntityOutputProp> = SingleInputProp<T> | NestedInputProp<T>;
16
+ export type EntityFunction<ARGS extends any[] = any[], R = EntityOutputProp> = (this: Entity, state: ScopedState, ...args: ARGS) => R;
17
+ export type Entity = {
18
+ [key: string]: EntityOutputProp;
19
+ type: string;
20
+ };
21
+ export type ScopeId = string;
22
+ export type GeneralScopedState = {
23
+ [key: string]: Entity | GeneralScopedState;
24
+ };
25
+ type ThemeEntity = UserAccessibleTheme & {
26
+ type: "theme";
27
+ };
28
+ export type ScopedState = {
29
+ theme: ThemeEntity;
30
+ } & GeneralScopedState;
31
+ export type InternalScope = {
32
+ id: string;
33
+ name?: string;
34
+ entities: Record<string, Entity>;
35
+ entityMeta: Record<string, Entity>;
36
+ childScopes: Record<ScopeId, InternalScope>;
37
+ idToName: Record<string, Name>;
38
+ getEntity(name: Name): Entity;
39
+ getEntityMeta(name: Name): Entity;
40
+ getEntityName(id: string): Name;
41
+ setEntityName(id: string, name: Name, currentName?: Name): void;
42
+ };
43
+ export interface IEntityManager {
44
+ getFullState: Record<string, Entity>;
45
+ getScopeName(scopeId: string): string;
46
+ getState(scopeId: string): ScopedState;
47
+ getEntity(scopeId: string, name: Name): Entity;
48
+ getEntityById(scopeId: string, id: SbInstance): Entity;
49
+ createScope(params: {
50
+ name?: string;
51
+ parentScopeId?: ScopeId;
52
+ scopeId?: string;
53
+ }): ScopeId;
54
+ deleteScope(params: {
55
+ scopeId: ScopeId;
56
+ }): void;
57
+ createEntity(params: {
58
+ scopeId: ScopeId;
59
+ name: Name;
60
+ props: Record<string, InputProp>;
61
+ type: string;
62
+ instanceId?: SbInstance;
63
+ sourceId?: SbElement;
64
+ }): Name;
65
+ deleteEntity(params: {
66
+ name: Name;
67
+ scopeId: ScopeId;
68
+ }): void;
69
+ deleteEntityById(params: {
70
+ scopeId: ScopeId;
71
+ entityId: string;
72
+ }): void;
73
+ resetEntity(params: {
74
+ scopeId: ScopeId;
75
+ name: Name;
76
+ key?: string;
77
+ }): void;
78
+ updateEntity(params: {
79
+ scopeId: ScopeId;
80
+ name: Name;
81
+ instanceId?: SbInstance;
82
+ props: Record<string, InputProp>;
83
+ }): void;
84
+ renameEntity(params: {
85
+ scopeId: ScopeId;
86
+ instanceId: SbInstance;
87
+ newName: Name;
88
+ isDuplicate: boolean;
89
+ }): void;
90
+ runCode<ARGS extends any[] = any[]>(params: {
91
+ scopeId: ScopeId;
92
+ name: Name;
93
+ func: Executable<ARGS>;
94
+ args?: ARGS;
95
+ }): void;
96
+ computeValue<T>(params: {
97
+ scopeId: ScopeId;
98
+ name: Name;
99
+ value: SingleInputProp<T>;
100
+ validator?: ValidateFn<T>;
101
+ }): T;
102
+ observeScope(scopeId: string, listener: ObserveListener<InternalScope>): () => void;
103
+ }
104
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { IEntityManager } from "./base-entity-manager.js";
2
+ export declare function getApiDeps(entitiesState: IEntityManager, scopeId: string, apiDepCandidates: string[]): any;
@@ -0,0 +1,6 @@
1
+ import type { EntityDerivedProp } from "../base-entity-manager.js";
2
+ import type { BindingString } from "@superblocksteam/library-shared";
3
+ declare const transformBindings: (value: BindingString) => Function;
4
+ export declare const toEvalFunc: ([prop, binding]: [string, BindingString]) => [string, EntityDerivedProp];
5
+ export declare const stringToJS: (string: string) => string;
6
+ export default transformBindings;
@@ -0,0 +1,20 @@
1
+ import type { EntityDerivedProp, EntityOutputProp, ScopedState } from "./base-entity-manager.js";
2
+ import type { Name } from "./names.js";
3
+ export type ComputeParams<ARGS extends any[] = any[]> = {
4
+ snapshot: Readonly<ScopedState>;
5
+ entityName: Name;
6
+ path?: string;
7
+ func: EntityDerivedProp<ARGS>;
8
+ args?: ARGS;
9
+ };
10
+ export interface ComputeEngine {
11
+ compute(params: ComputeParams): EntityOutputProp;
12
+ }
13
+ declare class EvalComputeEngine implements ComputeEngine {
14
+ private statementFunction;
15
+ compute({ snapshot, entityName, func, args, path }: ComputeParams): any;
16
+ }
17
+ declare class DirectComputeEngine implements ComputeEngine {
18
+ compute({ snapshot, entityName, func, args, path }: ComputeParams): EntityOutputProp;
19
+ }
20
+ export { EvalComputeEngine, DirectComputeEngine };
@@ -0,0 +1,7 @@
1
+ import type { ScopedState } from "./base-entity-manager.js";
2
+ export declare const ARGS_VAR_NAME = "$SB_args";
3
+ export declare const USER_JS_CODE_VAR_NAME = "$SB_userJSCode";
4
+ export declare const SNAPSHOT_VAR_NAME = "$SB_snapshot";
5
+ export declare function createGlobalObject({ snapshot, }: {
6
+ snapshot: Readonly<ScopedState>;
7
+ }): Record<string, unknown>;
@@ -0,0 +1,2 @@
1
+ import type { ScopedState, InternalScope } from "./base-entity-manager.js";
2
+ export declare function createScopeProxy(scopes: InternalScope[]): ScopedState;
@@ -0,0 +1,27 @@
1
+ import type { Entity } from "./base-entity-manager.js";
2
+ import type { DeepObserveChange } from "@superblocksteam/library-shared/types";
3
+ type IChange = DeepObserveChange;
4
+ type ChangeWithRelatedObject = IChange & {
5
+ relatedEntity?: Entity;
6
+ };
7
+ export type ObserveListener<T> = (change: ChangeWithRelatedObject, path: string, root: T) => void;
8
+ /**
9
+ * Given an object, deeply observes the given object.
10
+ * It is like `observe` from mobx, but applied recursively, including all future children.
11
+ *
12
+ * Note that the given object cannot ever contain cycles and should be a tree.
13
+ *
14
+ * As benefit: path and root will be provided in the callback, so the signature of the listener is
15
+ * (change, path, root) => void
16
+ *
17
+ * The returned disposer can be invoked to clean up the listener
18
+ *
19
+ * deepObserve cannot be used on computed values.
20
+ *
21
+ * @example
22
+ * const disposer = deepObserve(target, (change, path) => {
23
+ * console.dir(change)
24
+ * })
25
+ */
26
+ export declare function deepObserve<T>(target: T, listener: ObserveListener<T>): () => void;
27
+ export {};
@@ -0,0 +1,83 @@
1
+ import { type SbElement, type SbInstance } from "@superblocksteam/library-shared/types";
2
+ import { type Name } from "./names.js";
3
+ import type { IEntityManager, Executable, SingleInputProp, InternalScope, ScopedState, ScopeId, Entity, InputProp } from "./base-entity-manager.js";
4
+ import type { ObserveListener } from "./deep-observe.js";
5
+ import type { ValidateFn } from "../../../user-facing/properties-panel/validators.js";
6
+ import type { ComponentRegistry } from "../features/component-registry.js";
7
+ export declare const GLOBAL_SCOPE_ID = "Global";
8
+ export declare class EntityManager implements IEntityManager {
9
+ readonly componentRegistry: ComponentRegistry;
10
+ private state;
11
+ private atoms;
12
+ private dirComputeEngine;
13
+ private evalComputeEngine;
14
+ constructor(componentRegistry: ComponentRegistry, options?: {
15
+ devtools?: boolean;
16
+ });
17
+ getEntity(ScopeId: string, name: Name): Entity;
18
+ getEntityById(scopeId: string, id: SbInstance): Entity;
19
+ getState(scopeId: string): ScopedState;
20
+ getScopeName(scopeId: string): string;
21
+ get getFullState(): Record<string, Entity>;
22
+ private getAccessibleScopes;
23
+ getScope(scopeId: string): InternalScope;
24
+ private getPossibleScope;
25
+ createScope(params: {
26
+ name?: string;
27
+ parentScopeId?: string;
28
+ scopeId?: string;
29
+ }): string;
30
+ deleteScope(params: {
31
+ scopeId: ScopeId;
32
+ }): void;
33
+ createEntity(params: {
34
+ scopeId: ScopeId;
35
+ name: Name;
36
+ props: Record<string, InputProp>;
37
+ type: string;
38
+ instanceId?: SbInstance;
39
+ sourceId?: SbElement;
40
+ }): Name;
41
+ private createEntityStructure;
42
+ private addProperty;
43
+ deleteEntity(params: {
44
+ name: Name;
45
+ scopeId: string;
46
+ }): void;
47
+ deleteEntityById(params: {
48
+ scopeId: string;
49
+ entityId: string;
50
+ }): void;
51
+ resetEntity(params: {
52
+ scopeId: string;
53
+ name: Name;
54
+ key?: string;
55
+ }): void;
56
+ updateEntity(params: {
57
+ scopeId: string;
58
+ name: Name;
59
+ instanceId?: SbInstance;
60
+ props: Record<string, InputProp>;
61
+ }): void;
62
+ private addMissingProps;
63
+ renameEntity(params: {
64
+ scopeId: ScopeId;
65
+ instanceId: SbInstance;
66
+ newName: Name;
67
+ isDuplicate: boolean;
68
+ }): void;
69
+ runCode<ARGS extends any[] = any[]>(params: {
70
+ scopeId: string;
71
+ name: Name;
72
+ func: Executable;
73
+ args?: ARGS;
74
+ }): void;
75
+ computeValue<T>(params: {
76
+ scopeId: ScopeId;
77
+ name: Name;
78
+ value: SingleInputProp<T>;
79
+ validator?: ValidateFn<T>;
80
+ }): T;
81
+ private getOrCreateAtom;
82
+ observeScope(scopeId: string, listener: ObserveListener<InternalScope>): () => void;
83
+ }
@@ -0,0 +1,16 @@
1
+ export declare const EntityType: {
2
+ readonly API: "API";
3
+ readonly Button: "Button";
4
+ readonly Text: "Text";
5
+ readonly Image: "Image";
6
+ readonly Container: "Container";
7
+ readonly Grid: "Grid";
8
+ readonly Input: "Input";
9
+ readonly Checkbox: "Checkbox";
10
+ readonly Table: "Table";
11
+ readonly Switch: "Switch";
12
+ readonly Dropdown: "Dropdown";
13
+ readonly Modal: "Modal";
14
+ readonly Dialog: "Dialog";
15
+ };
16
+ export type EntityType = (typeof EntityType)[keyof typeof EntityType];
@@ -0,0 +1,7 @@
1
+ declare const lazyFunctionSymbol: unique symbol;
2
+ export type LazyFunction = ((...args: unknown[]) => unknown) & {
3
+ [lazyFunctionSymbol]: true;
4
+ };
5
+ export declare const isLazyFunction: (value: unknown) => value is LazyFunction;
6
+ export declare const LazyFunction: (source: string) => LazyFunction;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ export type Name = {
2
+ value: string;
3
+ isAnonymous: boolean;
4
+ };
5
+ export declare const getName: (name?: string) => Name;
6
+ export declare const isName: (name: any) => name is Name;
7
+ export declare const isNameEqual: (a: Name, b: Name) => boolean;
@@ -0,0 +1,2 @@
1
+ import type { EntityDerivedProp } from "./base-entity-manager.js";
2
+ export declare const prettyPrintFunction: (func: EntityDerivedProp, args: any[]) => string;