@superblocksteam/library 1.99.99-next.2 → 2.0.0-SNAPSHOT.041d4af83c6f028a

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 +2336 -0
  19. package/dist/lib/index.d.ts.map +1 -0
  20. package/dist/lib/index.js +7677 -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
package/README.md CHANGED
@@ -19,31 +19,6 @@ pnpm env:secrets:fetch
19
19
  pnpm migration:run
20
20
  ```
21
21
 
22
- In addition, open the [code-mode-ee](https://github.com/superblocksteam/superblocks/tree/code-mode-ee) branch and find the most recent build-codesandbox task. Click on "Details":
23
-
24
- ![](https://i.imgur.com/kcUdLkE.png)
25
-
26
- And take the latest templateId from here, and copy it in to `server/.env`:
27
-
28
- ![](https://i.imgur.com/tWNmucz.png)
29
-
30
- For example, `SUPERBLOCKS_CODE_SANDBOX_TEMPLATE_ID=6f8q2z`
31
-
32
- ---
33
-
34
- Then there is a one time task to setup built assets (non-editor UI):
35
-
36
- ```
37
- cd packages/ui
38
- npm run copy-built-assets
39
- ```
40
-
41
- You'll also want to ensure you've compiled the new CLI and library:
42
-
43
- ```
44
- pnpm --filter cli --filter library build
45
- ```
46
-
47
22
  ### Build
48
23
 
49
24
  Build a copy of the library using `pnpm build` (from this folder) or `pnpm --filter library build` (from root of the workspace).
@@ -63,7 +38,7 @@ If you make changes to the library, you need to rebuild, reinstall, and rerun th
63
38
 
64
39
  ### Running a code mode app (automated)
65
40
 
66
- A shortcut to above is to run `pnpm watch-lib-template` from the root of the workspace, which compiles the library and runs the dev server for `packages/demo-apps/code-demo-app`. This will also watch for changes in the `library` package and re-build, re-install, and re-run server for you.
41
+ A shortcut to above is to run `pnpm watch-lib-template` from the root of the workspace, which compiles the library and runs the dev server for the active demo app (configured in `packages/demo-apps/config.json`). This will also watch for changes in the `library` package and re-build, re-install, and re-run server for you.
67
42
 
68
43
  ### Running a code mode app in editor
69
44
 
@@ -0,0 +1,6 @@
1
+ //#region src/lib/user-facing/build-manifest.js
2
+ var build_manifest_default = {};
3
+ //#endregion
4
+ export { build_manifest_default as default };
5
+
6
+ //# sourceMappingURL=build-manifest-BQAcrmit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-manifest-BQAcrmit.js","names":[],"sources":["../src/lib/user-facing/build-manifest.js"],"sourcesContent":["// This is a placeholder file that is replaced with the actual build manifest during the build process\n// This stub will be used primarily in tests and for the dev server\nexport default {};\n"],"mappings":";AAEA,IAAA,yBAAe,EAAE"}
@@ -0,0 +1,156 @@
1
+ import { makeAutoObservable, toJS } from "mobx";
2
+ import { useCallback, useEffect } from "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { observer } from "mobx-react-lite";
5
+ import { createPortal } from "react-dom";
6
+ import { JsonView } from "react-json-view-lite";
7
+ import "react-json-view-lite/dist/index.css";
8
+ //#region src/lib/internal-details/lib/devtools/serialize-store-data.tsx
9
+ function serializeStoreData(stores_) {
10
+ try {
11
+ const stores = toJS(stores_);
12
+ const seen = /* @__PURE__ */ new Set();
13
+ function serialize(obj) {
14
+ if (obj === null || typeof obj !== "object") return obj;
15
+ if (seen.has(obj)) return "[Already Seen]";
16
+ seen.add(obj);
17
+ if (Array.isArray(obj)) return obj.map(serialize);
18
+ const result = {};
19
+ for (const key of Object.keys(obj)) {
20
+ if (typeof obj[key] === "function") result[key] = "[Function]";
21
+ try {
22
+ const descriptor = Object.getOwnPropertyDescriptor(obj, key);
23
+ if (descriptor && descriptor.get) try {
24
+ result[key] = serialize(obj[key]);
25
+ } catch {
26
+ result[key] = "[Getter Error]";
27
+ }
28
+ else result[key] = serialize(obj[key]);
29
+ } catch {
30
+ result[key] = "[Access Error]";
31
+ }
32
+ }
33
+ if (obj.constructor && obj.constructor.name !== "Object") result.__type__ = obj.constructor.name;
34
+ return result;
35
+ }
36
+ return serialize(stores);
37
+ } catch (error) {
38
+ return { error: `Error serializing data: ${error instanceof Error ? error.message : "Unknown error"}` };
39
+ }
40
+ }
41
+ //#endregion
42
+ //#region src/lib/internal-details/lib/devtools/devtools-consolidated.tsx
43
+ var DevToolsState = class {
44
+ isVisible = false;
45
+ constructor() {
46
+ makeAutoObservable(this);
47
+ }
48
+ show() {
49
+ this.isVisible = true;
50
+ }
51
+ hide() {
52
+ this.isVisible = false;
53
+ }
54
+ toggle() {
55
+ this.isVisible = !this.isVisible;
56
+ }
57
+ };
58
+ const devToolsState = new DevToolsState();
59
+ const registeredStores = {};
60
+ function getRegisteredStores() {
61
+ return registeredStores;
62
+ }
63
+ const overlayStyles = {
64
+ position: "fixed",
65
+ top: 0,
66
+ left: 0,
67
+ right: 0,
68
+ bottom: 0,
69
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
70
+ zIndex: 9999
71
+ };
72
+ const panelStyles = {
73
+ position: "fixed",
74
+ top: "50%",
75
+ left: "50%",
76
+ transform: "translate(-50%, -50%)",
77
+ width: "90vw",
78
+ height: "90vh",
79
+ backgroundColor: "#fff",
80
+ zIndex: 1e4,
81
+ display: "flex",
82
+ flexDirection: "column",
83
+ borderRadius: 12
84
+ };
85
+ const headerStyles = {
86
+ padding: 12,
87
+ borderBottom: "1px solid #ccc",
88
+ display: "flex",
89
+ justifyContent: "space-between",
90
+ alignItems: "center"
91
+ };
92
+ const closeButtonStyles = {
93
+ background: "none",
94
+ border: "none",
95
+ cursor: "pointer"
96
+ };
97
+ const contentStyles = {
98
+ padding: 8,
99
+ display: "flex",
100
+ flex: 1,
101
+ overflow: "auto",
102
+ flexDirection: "column"
103
+ };
104
+ const DevToolsPanelContent = observer(() => {
105
+ const stores = getRegisteredStores();
106
+ const storeNames = Object.keys(stores);
107
+ const serializedData = serializeStoreData(stores);
108
+ const onClose = useCallback(() => {
109
+ devToolsState.hide();
110
+ }, []);
111
+ return createPortal(/* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
112
+ style: overlayStyles,
113
+ onClick: onClose
114
+ }), /* @__PURE__ */ jsxs("div", {
115
+ style: panelStyles,
116
+ children: [/* @__PURE__ */ jsxs("div", {
117
+ style: headerStyles,
118
+ children: [/* @__PURE__ */ jsxs("h3", { children: [
119
+ "MobX DevTools (",
120
+ storeNames.length,
121
+ " store",
122
+ storeNames.length !== 1 ? "s" : "",
123
+ ")"
124
+ ] }), /* @__PURE__ */ jsx("button", {
125
+ style: closeButtonStyles,
126
+ onClick: onClose,
127
+ title: "Close (ESC)",
128
+ children: "×"
129
+ })]
130
+ }), storeNames.length === 0 ? /* @__PURE__ */ jsx("div", { children: "No stores registered yet." }) : /* @__PURE__ */ jsx("div", {
131
+ style: contentStyles,
132
+ children: /* @__PURE__ */ jsx(JsonView, {
133
+ data: serializedData,
134
+ clickToExpandNode: true,
135
+ shouldExpandNode: (level) => level < 2
136
+ })
137
+ })]
138
+ })] }), document.body);
139
+ });
140
+ const CustomDevTools = observer(() => {
141
+ useEffect(() => {
142
+ if (devToolsState.isVisible) {
143
+ const handleEscape = (event) => {
144
+ if (event.key === "Escape") devToolsState.hide();
145
+ };
146
+ document.addEventListener("keydown", handleEscape);
147
+ return () => document.removeEventListener("keydown", handleEscape);
148
+ }
149
+ }, []);
150
+ if (!devToolsState.isVisible) return null;
151
+ return /* @__PURE__ */ jsx(DevToolsPanelContent, {});
152
+ });
153
+ //#endregion
154
+ export { CustomDevTools };
155
+
156
+ //# sourceMappingURL=devtools-consolidated-C5sXwPGD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools-consolidated-C5sXwPGD.js","names":[],"sources":["../src/lib/internal-details/lib/devtools/serialize-store-data.tsx","../src/lib/internal-details/lib/devtools/devtools-consolidated.tsx"],"sourcesContent":["import { toJS } from \"mobx\";\n\nexport function serializeStoreData(\n stores_: Record<string, any>,\n): Record<string, any> {\n try {\n const stores = toJS(stores_);\n const seen = new Set();\n function serialize(obj: any): any {\n if (obj === null || typeof obj !== \"object\") {\n return obj;\n }\n\n if (seen.has(obj)) {\n return \"[Already Seen]\";\n }\n\n // Create new path for this branch of recursion\n seen.add(obj);\n\n if (Array.isArray(obj)) {\n return obj.map(serialize);\n }\n\n const result: any = {};\n\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] === \"function\") {\n result[key] = \"[Function]\";\n }\n\n try {\n const descriptor = Object.getOwnPropertyDescriptor(obj, key);\n if (descriptor && descriptor.get) {\n try {\n result[key] = serialize(obj[key]);\n } catch {\n result[key] = \"[Getter Error]\";\n }\n } else {\n result[key] = serialize(obj[key]);\n }\n } catch {\n result[key] = \"[Access Error]\";\n }\n }\n\n // Add type information\n if (obj.constructor && obj.constructor.name !== \"Object\") {\n result.__type__ = obj.constructor.name;\n }\n\n return result;\n }\n\n return serialize(stores);\n } catch (error) {\n return {\n error: `Error serializing data: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n };\n }\n}\n","import { makeAutoObservable } from \"mobx\";\nimport { observer } from \"mobx-react-lite\";\nimport React, { useCallback, useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { JsonView } from \"react-json-view-lite\";\n\nimport \"react-json-view-lite/dist/index.css\";\nimport { serializeStoreData } from \"./serialize-store-data.js\";\n\n// ============================================================================\n// STATE MANAGEMENT\n// ============================================================================\n\nclass DevToolsState {\n isVisible = false;\n\n constructor() {\n makeAutoObservable(this);\n }\n\n show() {\n this.isVisible = true;\n }\n\n hide() {\n this.isVisible = false;\n }\n\n toggle() {\n this.isVisible = !this.isVisible;\n }\n}\n\nconst devToolsState = new DevToolsState();\n\n// ============================================================================\n// STORE ACCESS\n// ============================================================================\n\n// This will be populated by the registerStores function\nconst registeredStores: Record<string, any> = {};\n\nfunction getRegisteredStores() {\n return registeredStores;\n}\n\n// ============================================================================\n// DEVTOOLS PANEL COMPONENT\n// ============================================================================\n\nconst overlayStyles: React.CSSProperties = {\n position: \"fixed\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: \"rgba(0, 0, 0, 0.5)\",\n zIndex: 9999,\n};\n\nconst panelStyles: React.CSSProperties = {\n position: \"fixed\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n width: \"90vw\",\n height: \"90vh\",\n backgroundColor: \"#fff\",\n zIndex: 10000,\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: 12,\n};\n\nconst headerStyles: React.CSSProperties = {\n padding: 12,\n borderBottom: \"1px solid #ccc\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n};\n\nconst closeButtonStyles: React.CSSProperties = {\n background: \"none\",\n border: \"none\",\n cursor: \"pointer\",\n};\n\nconst contentStyles: React.CSSProperties = {\n padding: 8,\n display: \"flex\",\n flex: 1,\n overflow: \"auto\",\n flexDirection: \"column\",\n};\n\nconst DevToolsPanelContent: React.FC = observer(() => {\n const stores = getRegisteredStores();\n const storeNames = Object.keys(stores);\n\n const serializedData = serializeStoreData(stores);\n const onClose = useCallback(() => {\n devToolsState.hide();\n }, []);\n\n return createPortal(\n <>\n <div style={overlayStyles} onClick={onClose} />\n <div style={panelStyles}>\n <div style={headerStyles}>\n <h3>\n MobX DevTools ({storeNames.length} store\n {storeNames.length !== 1 ? \"s\" : \"\"})\n </h3>\n <button\n style={closeButtonStyles}\n onClick={onClose}\n title=\"Close (ESC)\"\n >\n ×\n </button>\n </div>\n {storeNames.length === 0 ? (\n <div>No stores registered yet.</div>\n ) : (\n <div style={contentStyles}>\n <JsonView\n data={serializedData}\n clickToExpandNode={true}\n shouldExpandNode={(level) => level < 2}\n />\n </div>\n )}\n </div>\n </>,\n document.body,\n );\n});\n\n// ============================================================================\n// PROVIDER COMPONENT\n// ============================================================================\n\nexport const CustomDevTools: React.FC = observer(() => {\n useEffect(() => {\n if (devToolsState.isVisible) {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n devToolsState.hide();\n }\n };\n document.addEventListener(\"keydown\", handleEscape);\n return () => document.removeEventListener(\"keydown\", handleEscape);\n }\n }, []);\n\n if (!devToolsState.isVisible) {\n return null;\n }\n\n return <DevToolsPanelContent />;\n});\n"],"mappings":"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"}
@@ -0,0 +1,133 @@
1
+ import { SeverityNumber } from "@opentelemetry/api-logs";
2
+ //#region src/lib/tracing/console-logging.ts
3
+ var ConsoleLogAttributes = class ConsoleLogAttributes {
4
+ constructor(attributes) {
5
+ this.attributes = attributes;
6
+ }
7
+ static create(attrs) {
8
+ return new ConsoleLogAttributes(attrs);
9
+ }
10
+ };
11
+ const consoleLogAttributes = (attrs) => {
12
+ return new ConsoleLogAttributes(attrs);
13
+ };
14
+ //#endregion
15
+ //#region src/lib/tracing/early-console-buffer.ts
16
+ function mergeAllConsoleLogAttributes(args) {
17
+ if (args.length === 0) return void 0;
18
+ return args.reduce((merged, arg) => {
19
+ if (arg instanceof ConsoleLogAttributes) return {
20
+ ...merged,
21
+ ...arg.attributes
22
+ };
23
+ return merged;
24
+ }, {});
25
+ }
26
+ var LibraryEarlyConsoleBuffer = class LibraryEarlyConsoleBuffer {
27
+ static instance;
28
+ buffer = [];
29
+ maxBufferSize = 1e3;
30
+ originalMethods = {};
31
+ otelLogger = void 0;
32
+ isPatched = false;
33
+ static getInstance() {
34
+ if (!LibraryEarlyConsoleBuffer.instance) LibraryEarlyConsoleBuffer.instance = new LibraryEarlyConsoleBuffer();
35
+ return LibraryEarlyConsoleBuffer.instance;
36
+ }
37
+ patchEarly() {
38
+ if (this.isPatched) return;
39
+ this.originalMethods.log = console.log.bind(console);
40
+ this.originalMethods.info = console.info.bind(console);
41
+ this.originalMethods.debug = console.debug.bind(console);
42
+ this.originalMethods.warn = console.warn.bind(console);
43
+ this.originalMethods.error = console.error.bind(console);
44
+ this.patchMethod("log");
45
+ this.patchMethod("info");
46
+ this.patchMethod("debug");
47
+ this.patchMethod("warn");
48
+ this.patchMethod("error");
49
+ this.isPatched = true;
50
+ }
51
+ patchMethod(level) {
52
+ const originalMethod = this.originalMethods[level];
53
+ console[level] = (...args) => {
54
+ originalMethod(...args);
55
+ this.bufferLog(level, args);
56
+ if (this.otelLogger) this.sendToOpenTelemetry(level, args);
57
+ };
58
+ }
59
+ bufferLog(level, args) {
60
+ if (this.buffer.length >= this.maxBufferSize) this.buffer.shift();
61
+ this.buffer.push({
62
+ level,
63
+ args,
64
+ timestamp: Date.now()
65
+ });
66
+ }
67
+ enableOpenTelemetry(otelLogger) {
68
+ console.info("[internal] [EarlyConsoleBuffer] Enabling OpenTelemetry integration");
69
+ this.otelLogger = otelLogger;
70
+ this.flushBuffer();
71
+ }
72
+ flushBuffer() {
73
+ if (!this.otelLogger) return;
74
+ const bufferCount = this.buffer.length;
75
+ if (bufferCount === 0) {
76
+ console.info("[internal] [EarlyConsoleBuffer] No buffered logs to flush");
77
+ return;
78
+ }
79
+ console.info(`[internal] [EarlyConsoleBuffer] Flushing ${bufferCount} buffered logs to OpenTelemetry`);
80
+ this.buffer.forEach((entry) => {
81
+ this.sendToOpenTelemetry(entry.level, entry.args, entry.timestamp, true);
82
+ });
83
+ this.buffer = [];
84
+ console.info(`[internal] [EarlyConsoleBuffer] Successfully sent ${bufferCount} buffered logs to OpenTelemetry logger`);
85
+ }
86
+ sendToOpenTelemetry(level, args, timestamp, fromBuffer) {
87
+ if (!this.otelLogger) return;
88
+ const severityMap = {
89
+ debug: SeverityNumber.DEBUG,
90
+ log: SeverityNumber.INFO,
91
+ info: SeverityNumber.INFO,
92
+ warn: SeverityNumber.WARN,
93
+ error: SeverityNumber.ERROR
94
+ };
95
+ const attributes = {
96
+ ...fromBuffer && { source: "early-console-buffer" },
97
+ ...mergeAllConsoleLogAttributes(args)
98
+ };
99
+ this.otelLogger.emit({
100
+ severityNumber: severityMap[level],
101
+ severityText: level,
102
+ body: this.formatConsoleArgs(args),
103
+ timestamp,
104
+ attributes
105
+ });
106
+ }
107
+ formatConsoleArgs(args) {
108
+ return args.filter((arg) => !(arg instanceof ConsoleLogAttributes)).map((arg) => {
109
+ if (typeof arg === "string") return arg;
110
+ if (arg === null) return "null";
111
+ if (arg === void 0) return "undefined";
112
+ if (typeof arg === "object") try {
113
+ return JSON.stringify(arg, null, 2);
114
+ } catch {
115
+ return "[object Object]";
116
+ }
117
+ return String(arg);
118
+ }).join(" ");
119
+ }
120
+ getBufferSize() {
121
+ return this.buffer.length;
122
+ }
123
+ isConsolePatched() {
124
+ return this.isPatched;
125
+ }
126
+ isOpenTelemetryEnabled() {
127
+ return this.otelLogger !== void 0;
128
+ }
129
+ };
130
+ //#endregion
131
+ export { consoleLogAttributes as n, LibraryEarlyConsoleBuffer as t };
132
+
133
+ //# sourceMappingURL=early-console-buffer-BJWsc4E3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"early-console-buffer-BJWsc4E3.js","names":[],"sources":["../src/lib/tracing/console-logging.ts","../src/lib/tracing/early-console-buffer.ts"],"sourcesContent":["// The attributes that should be passed to OTEL logs as part of the message context.\n// To use, use consoleLogAttributes() to create an instance of this class, and pass as an argument to console.* methods.\nexport class ConsoleLogAttributes {\n constructor(public readonly attributes: Record<string, any>) {}\n\n // Optional: Add validation or transformation\n static create(attrs: Record<string, any>): ConsoleLogAttributes {\n return new ConsoleLogAttributes(attrs);\n }\n}\n\n// Convenience factory\nexport const consoleLogAttributes = (\n attrs: Record<string, any>,\n): ConsoleLogAttributes => {\n return new ConsoleLogAttributes(attrs);\n};\n","import { SeverityNumber } from \"@opentelemetry/api-logs\";\nimport type { Logger as OTelLogger } from \"@opentelemetry/api-logs\";\n\nimport { ConsoleLogAttributes } from \"./console-logging.js\";\n\ninterface LogEntry {\n level: \"log\" | \"info\" | \"warn\" | \"error\" | \"debug\";\n args: any[];\n timestamp: number;\n}\n\nfunction mergeAllConsoleLogAttributes(\n args: any[],\n): Record<string, any> | undefined {\n if (args.length === 0) return undefined;\n\n return args.reduce((merged, arg) => {\n if (arg instanceof ConsoleLogAttributes) {\n return { ...merged, ...arg.attributes };\n }\n return merged;\n }, {});\n}\n\nclass LibraryEarlyConsoleBuffer {\n private static instance: LibraryEarlyConsoleBuffer;\n private buffer: LogEntry[] = [];\n private maxBufferSize = 1000;\n private originalMethods: Record<string, (...args: any[]) => void> = {};\n private otelLogger?: OTelLogger = undefined;\n private isPatched = false;\n\n static getInstance(): LibraryEarlyConsoleBuffer {\n if (!LibraryEarlyConsoleBuffer.instance) {\n LibraryEarlyConsoleBuffer.instance = new LibraryEarlyConsoleBuffer();\n }\n return LibraryEarlyConsoleBuffer.instance;\n }\n\n // Patch console methods immediately with buffering\n patchEarly(): void {\n if (this.isPatched) return;\n\n // Store original methods\n this.originalMethods.log = console.log.bind(console);\n this.originalMethods.info = console.info.bind(console);\n this.originalMethods.debug = console.debug.bind(console);\n this.originalMethods.warn = console.warn.bind(console);\n this.originalMethods.error = console.error.bind(console);\n\n // Replace with buffering versions\n this.patchMethod(\"log\");\n this.patchMethod(\"info\");\n this.patchMethod(\"debug\");\n this.patchMethod(\"warn\");\n this.patchMethod(\"error\");\n\n this.isPatched = true;\n }\n\n private patchMethod(level: string): void {\n const originalMethod = this.originalMethods[level];\n\n (console as any)[level] = (...args: any[]) => {\n // Always call original method for dev experience\n originalMethod(...args);\n\n // Buffer for OpenTelemetry\n this.bufferLog(level as any, args);\n\n // Send to OpenTelemetry if available\n if (this.otelLogger) {\n this.sendToOpenTelemetry(level as any, args);\n }\n };\n }\n\n private bufferLog(level: LogEntry[\"level\"], args: any[]): void {\n if (this.buffer.length >= this.maxBufferSize) {\n this.buffer.shift(); // Remove oldest entry\n }\n\n this.buffer.push({\n level,\n args,\n timestamp: Date.now(),\n });\n }\n\n enableOpenTelemetry(otelLogger: OTelLogger): void {\n console.info(\n \"[internal] [EarlyConsoleBuffer] Enabling OpenTelemetry integration\",\n );\n this.otelLogger = otelLogger;\n this.flushBuffer();\n }\n\n private flushBuffer(): void {\n if (!this.otelLogger) return;\n\n const bufferCount = this.buffer.length;\n if (bufferCount === 0) {\n console.info(\"[internal] [EarlyConsoleBuffer] No buffered logs to flush\");\n return;\n }\n\n console.info(\n `[internal] [EarlyConsoleBuffer] Flushing ${bufferCount} buffered logs to OpenTelemetry`,\n );\n\n this.buffer.forEach((entry) => {\n this.sendToOpenTelemetry(entry.level, entry.args, entry.timestamp, true); // true = from buffer\n });\n\n this.buffer = []; // Clear buffer\n console.info(\n `[internal] [EarlyConsoleBuffer] Successfully sent ${bufferCount} buffered logs to OpenTelemetry logger`,\n );\n }\n\n private sendToOpenTelemetry(\n level: LogEntry[\"level\"],\n args: any[],\n timestamp?: number,\n fromBuffer?: boolean,\n ): void {\n if (!this.otelLogger) return;\n\n const severityMap = {\n debug: SeverityNumber.DEBUG,\n log: SeverityNumber.INFO,\n info: SeverityNumber.INFO,\n warn: SeverityNumber.WARN,\n error: SeverityNumber.ERROR,\n };\n\n // Only add 'source' attribute if this log came from the buffer flush\n const attributes = {\n ...(fromBuffer && { source: \"early-console-buffer\" }),\n ...mergeAllConsoleLogAttributes(args),\n };\n\n this.otelLogger.emit({\n severityNumber: severityMap[level],\n severityText: level,\n body: this.formatConsoleArgs(args),\n timestamp: timestamp,\n attributes,\n });\n }\n\n private formatConsoleArgs(args: any[]): string {\n return args\n .filter((arg) => !(arg instanceof ConsoleLogAttributes))\n .map((arg) => {\n if (typeof arg === \"string\") return arg;\n if (arg === null) return \"null\";\n if (arg === undefined) return \"undefined\";\n if (typeof arg === \"object\") {\n try {\n return JSON.stringify(arg, null, 2);\n } catch {\n return \"[object Object]\";\n }\n }\n return String(arg);\n })\n .join(\" \");\n }\n\n // Method to check if we have buffered logs (for testing/debugging)\n getBufferSize(): number {\n return this.buffer.length;\n }\n\n // Method to check if console is patched (for testing/debugging)\n isConsolePatched(): boolean {\n return this.isPatched;\n }\n\n // Method to check if OpenTelemetry is enabled (for testing/debugging)\n isOpenTelemetryEnabled(): boolean {\n return this.otelLogger !== undefined;\n }\n}\n\nexport default LibraryEarlyConsoleBuffer;\n"],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ //#region src/jsx-dev-runtime/jsx-dev-runtime.d.ts
2
+ declare global {
3
+ interface Window {
4
+ __SUPERBLOCKS_EDIT_MODE__?: boolean;
5
+ _SB_VIEW_MODE?: string;
6
+ }
7
+ }
8
+ declare function jsxDEV(type: any, props: any, key: any, isStaticChildren: any, source: any, self: any): any;
9
+ //#endregion
10
+ //#region src/jsx-dev-runtime/index.d.ts
11
+ declare const Fragment: any;
12
+ //#endregion
13
+ export { Fragment, jsxDEV };
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/jsx-dev-runtime/jsx-dev-runtime.ts","../../src/jsx-dev-runtime/index.ts"],"mappings":";QAUQ,MAAA;EAAA,UACI,MAAA;IACR,yBAAA;IACA,aAAA;EAAA;AAAA;AAAA,iBAuDY,MAAA,CACd,IAAA,OACA,KAAA,OACA,GAAA,OACA,gBAAA,OACA,MAAA,OACA,IAAA;;;cCxEW,QAAA"}
@@ -0,0 +1,52 @@
1
+ import { n as root_store_default, o as tracker } from "../root-store-DFc-KUI6.js";
2
+ import { t as makeWrappedComponent } from "../jsx-wrapper-CAKd0FsI.js";
3
+ import { SOURCE_ID_ATTRIBUTE } from "@superblocksteam/library-shared";
4
+ import * as ReactJsxDevRuntime from "react/jsx-dev-runtime";
5
+ //#region src/jsx-dev-runtime/jsx-dev-runtime.ts
6
+ const reactJsxDEV = ReactJsxDevRuntime.jsxDEV;
7
+ function isEditMode() {
8
+ if (typeof window === "undefined") return false;
9
+ if (window.__SUPERBLOCKS_EDIT_MODE__ !== void 0) return window.__SUPERBLOCKS_EDIT_MODE__;
10
+ if (window._SB_VIEW_MODE === "dev") {
11
+ window.__SUPERBLOCKS_EDIT_MODE__ = true;
12
+ return true;
13
+ }
14
+ const isEdit = false;
15
+ window.__SUPERBLOCKS_EDIT_MODE__ = isEdit;
16
+ return isEdit;
17
+ }
18
+ const objTypeCache = /* @__PURE__ */ new WeakMap();
19
+ const stringTypeCache = /* @__PURE__ */ new Map();
20
+ function getOrSetCachedWrappedComponent(type) {
21
+ const typeIsObject = (typeof type === "object" || typeof type === "function") && type !== null;
22
+ const cachedType = typeIsObject ? objTypeCache.get(type) : stringTypeCache.get(type);
23
+ if (cachedType) return cachedType;
24
+ const newComponent = makeWrappedComponent(type);
25
+ if (typeIsObject) objTypeCache.set(type, newComponent);
26
+ else stringTypeCache.set(type, newComponent);
27
+ return newComponent;
28
+ }
29
+ const shouldWrapTagType = (type) => {
30
+ if (typeof type === "string") return root_store_default.componentRegistry.hasComponent(type);
31
+ return type != null && (typeof type === "object" || typeof type === "function");
32
+ };
33
+ function jsxDEV(type, props, key, isStaticChildren, source, self) {
34
+ const sourceId = props?.[SOURCE_ID_ATTRIBUTE];
35
+ try {
36
+ if (sourceId && isEditMode() && shouldWrapTagType(type)) {
37
+ const CachedWrappedComponent = getOrSetCachedWrappedComponent(type);
38
+ tracker.reportJSXActivity();
39
+ return reactJsxDEV(CachedWrappedComponent, props, `${key}-${sourceId}`, isStaticChildren, source, self);
40
+ }
41
+ } catch (e) {
42
+ console.error("Error during JSX wrap", e);
43
+ }
44
+ return reactJsxDEV(type, props, key, isStaticChildren, source, self);
45
+ }
46
+ //#endregion
47
+ //#region src/jsx-dev-runtime/index.ts
48
+ const Fragment = ReactJsxDevRuntime.Fragment;
49
+ //#endregion
50
+ export { Fragment, jsxDEV };
51
+
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["rootStore"],"sources":["../../src/jsx-dev-runtime/jsx-dev-runtime.ts","../../src/jsx-dev-runtime/index.ts"],"sourcesContent":["import * as ReactJsxDevRuntime from \"react/jsx-dev-runtime\";\n\nimport { SOURCE_ID_ATTRIBUTE } from \"@superblocksteam/library-shared\";\n\nimport { makeWrappedComponent } from \"../edit-mode/jsx-wrapper.js\";\nimport ApiHmrTracker from \"../lib/internal-details/lib/features/api-hmr-tracker.js\";\nimport rootStore from \"../lib/internal-details/lib/root-store.js\";\n\nconst reactJsxDEV = (ReactJsxDevRuntime as any).jsxDEV;\n\ndeclare global {\n interface Window {\n __SUPERBLOCKS_EDIT_MODE__?: boolean;\n _SB_VIEW_MODE?: string;\n }\n}\n\nfunction isEditMode(): boolean {\n if (typeof window === \"undefined\") return false;\n\n if (window.__SUPERBLOCKS_EDIT_MODE__ !== undefined) {\n return window.__SUPERBLOCKS_EDIT_MODE__;\n }\n\n const viewMode = window._SB_VIEW_MODE;\n if (viewMode === \"dev\") {\n window.__SUPERBLOCKS_EDIT_MODE__ = true;\n return true;\n }\n\n const envMode = import.meta.env?.MODE;\n const isEdit = envMode === \"local-dev\";\n window.__SUPERBLOCKS_EDIT_MODE__ = isEdit;\n return isEdit;\n}\n\nconst objTypeCache = new WeakMap<any, any>();\nconst stringTypeCache = new Map<string, any>();\n\ntype SupportedElementType = React.ElementType | string;\n\nfunction getOrSetCachedWrappedComponent(type: SupportedElementType) {\n const typeIsObject =\n (typeof type === \"object\" || typeof type === \"function\") && type !== null;\n const cachedType = typeIsObject\n ? objTypeCache.get(type)\n : stringTypeCache.get(type);\n if (cachedType) {\n return cachedType;\n }\n const newComponent = makeWrappedComponent(type);\n if (typeIsObject) {\n objTypeCache.set(type, newComponent);\n } else {\n stringTypeCache.set(type, newComponent);\n }\n return newComponent;\n}\n\nconst shouldWrapTagType = (type: unknown): type is SupportedElementType => {\n if (typeof type === \"string\") {\n return rootStore.componentRegistry.hasComponent(type);\n }\n return (\n type != null && (typeof type === \"object\" || typeof type === \"function\")\n );\n};\n\nexport function jsxDEV(\n type: any,\n props: any,\n key: any,\n isStaticChildren: any,\n source: any,\n self: any,\n) {\n const sourceId = props?.[SOURCE_ID_ATTRIBUTE];\n try {\n if (sourceId && isEditMode() && shouldWrapTagType(type)) {\n const CachedWrappedComponent = getOrSetCachedWrappedComponent(\n type satisfies SupportedElementType,\n );\n ApiHmrTracker.reportJSXActivity();\n return reactJsxDEV(\n CachedWrappedComponent,\n props,\n `${key}-${sourceId}`,\n isStaticChildren,\n source,\n self,\n );\n }\n } catch (e) {\n console.error(\"Error during JSX wrap\", e);\n }\n return reactJsxDEV(type, props, key, isStaticChildren, source, self);\n}\n","import * as ReactJsxDevRuntime from \"react/jsx-dev-runtime\";\n\nexport const Fragment = (ReactJsxDevRuntime as any).Fragment;\nexport { jsxDEV } from \"./jsx-dev-runtime.js\";\n"],"mappings":";;;;;AAQA,MAAM,cAAe,mBAA2B;AAShD,SAAS,aAAsB;AAC7B,KAAI,OAAO,WAAW,YAAa,QAAO;AAE1C,KAAI,OAAO,8BAA8B,KAAA,EACvC,QAAO,OAAO;AAIhB,KADiB,OAAO,kBACP,OAAO;AACtB,SAAO,4BAA4B;AACnC,SAAO;;CAIT,MAAM,SAAS;AACf,QAAO,4BAA4B;AACnC,QAAO;;AAGT,MAAM,+BAAe,IAAI,SAAmB;AAC5C,MAAM,kCAAkB,IAAI,KAAkB;AAI9C,SAAS,+BAA+B,MAA4B;CAClE,MAAM,gBACH,OAAO,SAAS,YAAY,OAAO,SAAS,eAAe,SAAS;CACvE,MAAM,aAAa,eACf,aAAa,IAAI,KAAK,GACtB,gBAAgB,IAAI,KAAK;AAC7B,KAAI,WACF,QAAO;CAET,MAAM,eAAe,qBAAqB,KAAK;AAC/C,KAAI,aACF,cAAa,IAAI,MAAM,aAAa;KAEpC,iBAAgB,IAAI,MAAM,aAAa;AAEzC,QAAO;;AAGT,MAAM,qBAAqB,SAAgD;AACzE,KAAI,OAAO,SAAS,SAClB,QAAOA,mBAAU,kBAAkB,aAAa,KAAK;AAEvD,QACE,QAAQ,SAAS,OAAO,SAAS,YAAY,OAAO,SAAS;;AAIjE,SAAgB,OACd,MACA,OACA,KACA,kBACA,QACA,MACA;CACA,MAAM,WAAW,QAAQ;AACzB,KAAI;AACF,MAAI,YAAY,YAAY,IAAI,kBAAkB,KAAK,EAAE;GACvD,MAAM,yBAAyB,+BAC7B,KACD;AACD,WAAc,mBAAmB;AACjC,UAAO,YACL,wBACA,OACA,GAAG,IAAI,GAAG,YACV,kBACA,QACA,KACD;;UAEI,GAAG;AACV,UAAQ,MAAM,yBAAyB,EAAE;;AAE3C,QAAO,YAAY,MAAM,OAAO,KAAK,kBAAkB,QAAQ,KAAK;;;;AC7FtE,MAAa,WAAY,mBAA2B"}
@@ -0,0 +1,7 @@
1
+ //#region src/jsx-runtime/index.d.ts
2
+ declare const jsx: any;
3
+ declare const jsxs: any;
4
+ declare const Fragment: any;
5
+ //#endregion
6
+ export { Fragment, jsx, jsxs };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/jsx-runtime/index.ts"],"mappings":";cAEa,GAAA;AAAA,cACA,IAAA;AAAA,cACA,QAAA"}
@@ -0,0 +1,9 @@
1
+ import * as ReactJsxRuntime from "react/jsx-runtime";
2
+ //#region src/jsx-runtime/index.ts
3
+ const jsx = ReactJsxRuntime.jsx;
4
+ const jsxs = ReactJsxRuntime.jsxs;
5
+ const Fragment = ReactJsxRuntime.Fragment;
6
+ //#endregion
7
+ export { Fragment, jsx, jsxs };
8
+
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/jsx-runtime/index.ts"],"sourcesContent":["import * as ReactJsxRuntime from \"react/jsx-runtime\";\n\nexport const jsx = (ReactJsxRuntime as any).jsx;\nexport const jsxs = (ReactJsxRuntime as any).jsxs;\nexport const Fragment = (ReactJsxRuntime as any).Fragment;\n"],"mappings":";;AAEA,MAAa,MAAO,gBAAwB;AAC5C,MAAa,OAAQ,gBAAwB;AAC7C,MAAa,WAAY,gBAAwB"}