@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.
- package/README.md +1 -26
- package/dist/build-manifest-BQAcrmit.js +6 -0
- package/dist/build-manifest-BQAcrmit.js.map +1 -0
- package/dist/devtools-consolidated-C5sXwPGD.js +156 -0
- package/dist/devtools-consolidated-C5sXwPGD.js.map +1 -0
- package/dist/early-console-buffer-BJWsc4E3.js +133 -0
- package/dist/early-console-buffer-BJWsc4E3.js.map +1 -0
- package/dist/jsx-dev-runtime/index.d.ts +14 -0
- package/dist/jsx-dev-runtime/index.d.ts.map +1 -0
- package/dist/jsx-dev-runtime/index.js +52 -0
- package/dist/jsx-dev-runtime/index.js.map +1 -0
- package/dist/jsx-runtime/index.d.ts +7 -0
- package/dist/jsx-runtime/index.d.ts.map +1 -0
- package/dist/jsx-runtime/index.js +9 -0
- package/dist/jsx-runtime/index.js.map +1 -0
- package/dist/jsx-wrapper-CAKd0FsI.js +638 -0
- package/dist/jsx-wrapper-CAKd0FsI.js.map +1 -0
- package/dist/lib/index.d.ts +2336 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +7677 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/logs-DwKJqoRc.js +29 -0
- package/dist/logs-DwKJqoRc.js.map +1 -0
- package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
- package/dist/root-store-DFc-KUI6.js +3845 -0
- package/dist/root-store-DFc-KUI6.js.map +1 -0
- package/dist/sdk-api-discovery-ChkM2xTd.js +366 -0
- package/dist/sdk-api-discovery-ChkM2xTd.js.map +1 -0
- package/dist/style.css +355 -0
- package/dist/utils-Blrvh8kW.js +61 -0
- package/dist/utils-Blrvh8kW.js.map +1 -0
- package/package.json +79 -105
- package/dist/allPaths-CCZMME3l.js +0 -17
- package/dist/allPaths-CCZMME3l.js.map +0 -1
- package/dist/allPaths-CHXNxDVP.js +0 -17
- package/dist/allPaths-CHXNxDVP.js.map +0 -1
- package/dist/allPathsLoader-DTWFaGcd.js +0 -22
- package/dist/allPathsLoader-DTWFaGcd.js.map +0 -1
- package/dist/allPathsLoader-Fr8EhLGp.js +0 -22
- package/dist/allPathsLoader-Fr8EhLGp.js.map +0 -1
- package/dist/icons-BrNMuu_I.js +0 -40
- package/dist/icons-BrNMuu_I.js.map +0 -1
- package/dist/index-BxzKdlqH.js +0 -1353
- package/dist/index-BxzKdlqH.js.map +0 -1
- package/dist/index-DIJYif9G.js +0 -1341
- package/dist/index-DIJYif9G.js.map +0 -1
- package/dist/index-DIn-fanT.js +0 -1353
- package/dist/index-DIn-fanT.js.map +0 -1
- package/dist/index-LHtbj0-V.js +0 -1341
- package/dist/index-LHtbj0-V.js.map +0 -1
- package/dist/index-U0oPeutu.js +0 -189889
- package/dist/index-U0oPeutu.js.map +0 -1
- package/dist/index.css +0 -34239
- package/dist/index.js +0 -164
- package/dist/index.js.map +0 -1
- package/dist/splitPathsBySizeLoader-DHk6oFvg.js +0 -34
- package/dist/splitPathsBySizeLoader-DHk6oFvg.js.map +0 -1
- package/dist/splitPathsBySizeLoader-PcZVWYaJ.js +0 -34
- package/dist/splitPathsBySizeLoader-PcZVWYaJ.js.map +0 -1
- package/dist-types/app-internal.d.ts +0 -4
- package/dist-types/docs-utils/generate-docs.d.ts +0 -2
- package/dist-types/edit-mode/collisions-layer.d.ts +0 -3
- package/dist-types/edit-mode/create-component.d.ts +0 -8
- package/dist-types/edit-mode/debug-tools.d.ts +0 -11
- package/dist-types/edit-mode/dnd/collision-detection.d.ts +0 -3
- package/dist-types/edit-mode/dnd/dnd-provider.d.ts +0 -4
- package/dist-types/edit-mode/dnd/draggable-widget.d.ts +0 -7
- package/dist-types/edit-mode/dnd/drop-layer.d.ts +0 -5
- package/dist-types/edit-mode/dnd/droppable-widget.d.ts +0 -10
- package/dist-types/edit-mode/dnd/grid-drop.d.ts +0 -4
- package/dist-types/edit-mode/dnd/grid-store.d.ts +0 -33
- package/dist-types/edit-mode/dnd/grid-utils.d.ts +0 -8
- package/dist-types/edit-mode/dnd/handle-grid-drop.d.ts +0 -9
- package/dist-types/edit-mode/dnd/handle-stack-drop.d.ts +0 -9
- package/dist-types/edit-mode/dnd/hooks/use-component-draggable.d.ts +0 -5
- package/dist-types/edit-mode/dnd/hooks/use-component-droppable.d.ts +0 -6
- package/dist-types/edit-mode/dnd/hooks/use-handle-dnd-events.d.ts +0 -1
- package/dist-types/edit-mode/dnd/hooks/use-widget-node-ref.d.ts +0 -2
- package/dist-types/edit-mode/dnd/new-components-drag-layer.d.ts +0 -6
- package/dist-types/edit-mode/dnd/stack-drop.d.ts +0 -4
- package/dist-types/edit-mode/dnd/stack-store.d.ts +0 -10
- package/dist-types/edit-mode/dnd/stack-utils.d.ts +0 -13
- package/dist-types/edit-mode/dnd/types.d.ts +0 -45
- package/dist-types/edit-mode/dnd/utils.d.ts +0 -13
- package/dist-types/edit-mode/duplicated-name-popover.d.ts +0 -7
- package/dist-types/edit-mode/edit-store.d.ts +0 -28
- package/dist-types/edit-mode/edit-wrapper.d.ts +0 -18
- package/dist-types/edit-mode/editor-hotkeys.d.ts +0 -3
- package/dist-types/edit-mode/features/connection-manager.d.ts +0 -10
- package/dist-types/edit-mode/features/drag-and-drop-store.d.ts +0 -69
- package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +0 -17
- package/dist-types/edit-mode/features/operation-store.d.ts +0 -49
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +0 -31
- package/dist-types/edit-mode/features/resizing-store.d.ts +0 -53
- package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +0 -94
- package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +0 -55
- package/dist-types/edit-mode/features/ui-store.d.ts +0 -41
- package/dist-types/edit-mode/hooks/use-register-source-element.d.ts +0 -2
- package/dist-types/edit-mode/iframe-wrappers.d.ts +0 -4
- package/dist-types/edit-mode/interaction-add-section-button.d.ts +0 -4
- package/dist-types/edit-mode/interaction-layer.d.ts +0 -11
- package/dist-types/edit-mode/interaction-rect-handles.d.ts +0 -7
- package/dist-types/edit-mode/interaction-rect-name-pill.d.ts +0 -13
- package/dist-types/edit-mode/interaction-rect.d.ts +0 -44
- package/dist-types/edit-mode/interaction-utils.d.ts +0 -4
- package/dist-types/edit-mode/mobx-sync/create-patch.d.ts +0 -2
- package/dist-types/edit-mode/mobx-sync/deep-observe.d.ts +0 -24
- package/dist-types/edit-mode/mobx-sync/mobx-editor-sync.d.ts +0 -23
- package/dist-types/edit-mode/properties.d.ts +0 -13
- package/dist-types/edit-mode/resize-capabilities.d.ts +0 -5
- package/dist-types/edit-mode/right-click-menu/right-click-menu.d.ts +0 -14
- package/dist-types/edit-mode/roots.d.ts +0 -9
- package/dist-types/edit-mode/runtime-children.d.ts +0 -14
- package/dist-types/edit-mode/sb-component-from-meta.d.ts +0 -2
- package/dist-types/edit-mode/source-update-api.d.ts +0 -26
- package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +0 -34
- package/dist-types/internal-testing/components/api.d.ts +0 -3
- package/dist-types/internal-testing/components/button.d.ts +0 -1
- package/dist-types/internal-testing/components/checkbox.d.ts +0 -1
- package/dist-types/internal-testing/components/container.d.ts +0 -1
- package/dist-types/internal-testing/components/date-picker.d.ts +0 -1
- package/dist-types/internal-testing/components/dropdown.d.ts +0 -1
- package/dist-types/internal-testing/components/icon.d.ts +0 -1
- package/dist-types/internal-testing/components/image.d.ts +0 -1
- package/dist-types/internal-testing/components/input.d.ts +0 -1
- package/dist-types/internal-testing/components/key-value.d.ts +0 -1
- package/dist-types/internal-testing/components/modal.d.ts +0 -1
- package/dist-types/internal-testing/components/section-column.d.ts +0 -1
- package/dist-types/internal-testing/components/switch.d.ts +0 -1
- package/dist-types/internal-testing/components/table.d.ts +0 -1
- package/dist-types/internal-testing/components/timer.d.ts +0 -3
- package/dist-types/internal-testing/components/variable.d.ts +0 -3
- package/dist-types/internal-testing/utils.d.ts +0 -5
- package/dist-types/internal-testing/widgets.d.ts +0 -2
- package/dist-types/lib/hooks/use-alignment-styles.d.ts +0 -9
- package/dist-types/lib/hooks/use-cached-value.d.ts +0 -11
- package/dist-types/lib/hooks/use-callback-as-ref.d.ts +0 -1
- package/dist-types/lib/hooks/use-deep-memo.d.ts +0 -9
- package/dist-types/lib/hooks/use-editor-hotkeys.d.ts +0 -3
- package/dist-types/lib/hooks/use-element-rect.d.ts +0 -7
- package/dist-types/lib/hooks/use-observer-memo.d.ts +0 -14
- package/dist-types/lib/hooks/use-observer-memo.test.d.ts +0 -1
- package/dist-types/lib/hooks/use-pointer-down-outside.d.ts +0 -15
- package/dist-types/lib/hooks/use-stable-effect.d.ts +0 -22
- package/dist-types/lib/hooks/use-stable-effect.test.d.ts +0 -1
- package/dist-types/lib/index.d.ts +0 -40
- package/dist-types/lib/internal-details/actions-context.d.ts +0 -9
- package/dist-types/lib/internal-details/component-info-context.d.ts +0 -10
- package/dist-types/lib/internal-details/entities-state.d.ts +0 -10
- package/dist-types/lib/internal-details/entities.d.ts +0 -5
- package/dist-types/lib/internal-details/env.d.ts +0 -1
- package/dist-types/lib/internal-details/identifier-normalizer.d.ts +0 -9
- package/dist-types/lib/internal-details/is-sb-component.d.ts +0 -7
- package/dist-types/lib/internal-details/lib/devtools.d.ts +0 -1
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +0 -97
- package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.d.ts +0 -2
- package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts +0 -6
- package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +0 -20
- package/dist-types/lib/internal-details/lib/evaluator/create-global-object.d.ts +0 -7
- package/dist-types/lib/internal-details/lib/evaluator/create-scope-proxy.d.ts +0 -2
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +0 -27
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +0 -83
- package/dist-types/lib/internal-details/lib/evaluator/entity-types.d.ts +0 -16
- package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +0 -7
- package/dist-types/lib/internal-details/lib/evaluator/names.d.ts +0 -7
- package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +0 -2
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +0 -32
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.d.ts +0 -1
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.test.d.ts +0 -1
- package/dist-types/lib/internal-details/lib/features/api-store.d.ts +0 -36
- package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +0 -77
- package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +0 -27
- package/dist-types/lib/internal-details/lib/features/injected-features.d.ts +0 -8
- package/dist-types/lib/internal-details/lib/features/name-manager.d.ts +0 -36
- package/dist-types/lib/internal-details/lib/iframe.d.ts +0 -44
- package/dist-types/lib/internal-details/lib/mobx-cached-getter.d.ts +0 -1
- package/dist-types/lib/internal-details/lib/resolve-id-singleton.d.ts +0 -4
- package/dist-types/lib/internal-details/lib/root-store.d.ts +0 -30
- package/dist-types/lib/internal-details/lib/throttle.d.ts +0 -2
- package/dist-types/lib/internal-details/lib/types.d.ts +0 -226
- package/dist-types/lib/internal-details/reactive-component.d.ts +0 -10
- package/dist-types/lib/internal-details/sb-wrapper-notes.d.ts +0 -1
- package/dist-types/lib/internal-details/sb-wrapper.d.ts +0 -14
- package/dist-types/lib/internal-details/scope/global.d.ts +0 -9
- package/dist-types/lib/internal-details/scope/scope-context.d.ts +0 -8
- package/dist-types/lib/internal-details/scope/scope.d.ts +0 -12
- package/dist-types/lib/internal-details/size.d.ts +0 -1
- package/dist-types/lib/internal-details/theme-context.d.ts +0 -8
- package/dist-types/lib/internal-details/use-track-runtime-widget.d.ts +0 -15
- package/dist-types/lib/sb-trigger.d.ts +0 -53
- package/dist-types/lib/triggers/base.d.ts +0 -17
- package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +0 -19
- package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +0 -21
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +0 -17
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +0 -17
- package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +0 -20
- package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +0 -20
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +0 -28
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +0 -23
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +0 -26
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +0 -18
- package/dist-types/lib/triggers/implementations/run-js.d.ts +0 -18
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +0 -17
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +0 -22
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +0 -15
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +0 -18
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +0 -17
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +0 -17
- package/dist-types/lib/triggers/registry.d.ts +0 -174
- package/dist-types/lib/triggers/run-event-handlers.d.ts +0 -10
- package/dist-types/lib/user-facing/component-base/components/autolinked-text.d.ts +0 -8
- package/dist-types/lib/user-facing/component-base/components/button.d.ts +0 -46
- package/dist-types/lib/user-facing/component-base/components/checkbox.d.ts +0 -12
- package/dist-types/lib/user-facing/component-base/components/dropdown-select.d.ts +0 -4
- package/dist-types/lib/user-facing/component-base/components/dynamic-svg.d.ts +0 -10
- package/dist-types/lib/user-facing/component-base/components/expand-button.d.ts +0 -8
- package/dist-types/lib/user-facing/component-base/components/loading-animator.d.ts +0 -4
- package/dist-types/lib/user-facing/component-base/components/plain-link.d.ts +0 -1
- package/dist-types/lib/user-facing/component-base/components/popper.d.ts +0 -20
- package/dist-types/lib/user-facing/component-base/components/search-component.d.ts +0 -19
- package/dist-types/lib/user-facing/component-base/components/span-trunc-middle.d.ts +0 -9
- package/dist-types/lib/user-facing/component-base/components/switch.d.ts +0 -6
- package/dist-types/lib/user-facing/component-base/constants.d.ts +0 -18
- package/dist-types/lib/user-facing/component-base/error/error-inline-message.d.ts +0 -36
- package/dist-types/lib/user-facing/component-base/error/error-tooltip.d.ts +0 -11
- package/dist-types/lib/user-facing/component-base/error/error-utils.d.ts +0 -13
- package/dist-types/lib/user-facing/component-base/error/widget-errors-wrapper.d.ts +0 -15
- package/dist-types/lib/user-facing/component-base/error-boundary.d.ts +0 -18
- package/dist-types/lib/user-facing/component-base/sb-component.d.ts +0 -18
- package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +0 -16
- package/dist-types/lib/user-facing/component-base/styles/hover-styles.d.ts +0 -10
- package/dist-types/lib/user-facing/component-base/styles/input-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/component-base/use-passthrough-props.d.ts +0 -6
- package/dist-types/lib/user-facing/component-base/utils/format-utils.d.ts +0 -37
- package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +0 -17
- package/dist-types/lib/user-facing/components/button/index.d.ts +0 -37
- package/dist-types/lib/user-facing/components/button/props.d.ts +0 -48
- package/dist-types/lib/user-facing/components/checkbox/checkbox-component.d.ts +0 -9
- package/dist-types/lib/user-facing/components/checkbox/index.d.ts +0 -43
- package/dist-types/lib/user-facing/components/checkbox/props.d.ts +0 -44
- package/dist-types/lib/user-facing/components/checkbox/types.d.ts +0 -19
- package/dist-types/lib/user-facing/components/column/index.d.ts +0 -51
- package/dist-types/lib/user-facing/components/column/props.d.ts +0 -45
- package/dist-types/lib/user-facing/components/container/index.d.ts +0 -63
- package/dist-types/lib/user-facing/components/container/props.d.ts +0 -58
- package/dist-types/lib/user-facing/components/custom/context.d.ts +0 -11
- package/dist-types/lib/user-facing/components/custom/index.d.ts +0 -2
- package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +0 -27
- package/dist-types/lib/user-facing/components/date-picker/constants.d.ts +0 -8
- package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +0 -29
- package/dist-types/lib/user-facing/components/date-picker/date-picker.d.ts +0 -2
- package/dist-types/lib/user-facing/components/date-picker/index.d.ts +0 -63
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +0 -65
- package/dist-types/lib/user-facing/components/date-picker/props.test-d.d.ts +0 -1
- package/dist-types/lib/user-facing/components/date-picker/side-effects.d.ts +0 -3
- package/dist-types/lib/user-facing/components/date-picker/types.d.ts +0 -40
- package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +0 -24
- package/dist-types/lib/user-facing/components/dropdown/constants.d.ts +0 -5
- package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +0 -106
- package/dist-types/lib/user-facing/components/dropdown/index.d.ts +0 -73
- package/dist-types/lib/user-facing/components/dropdown/multi-dropdown.d.ts +0 -18
- package/dist-types/lib/user-facing/components/dropdown/normalize-values.d.ts +0 -2
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +0 -76
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +0 -89
- package/dist-types/lib/user-facing/components/dropdown/utils.d.ts +0 -8
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-constraints.d.ts +0 -26
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-row-positions.d.ts +0 -2
- package/dist-types/lib/user-facing/components/grid/calculations/order-constraints.d.ts +0 -2
- package/dist-types/lib/user-facing/components/grid/index.d.ts +0 -36
- package/dist-types/lib/user-facing/components/grid/use-height-observer.d.ts +0 -5
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +0 -1
- package/dist-types/lib/user-facing/components/icon/index.d.ts +0 -22
- package/dist-types/lib/user-facing/components/icon/props.d.ts +0 -24
- package/dist-types/lib/user-facing/components/image/image-component.d.ts +0 -38
- package/dist-types/lib/user-facing/components/image/index.d.ts +0 -29
- package/dist-types/lib/user-facing/components/image/props.d.ts +0 -39
- package/dist-types/lib/user-facing/components/input/constants.d.ts +0 -24
- package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +0 -5
- package/dist-types/lib/user-facing/components/input/index.d.ts +0 -96
- package/dist-types/lib/user-facing/components/input/input-component.d.ts +0 -57
- package/dist-types/lib/user-facing/components/input/props.d.ts +0 -100
- package/dist-types/lib/user-facing/components/input/styles.d.ts +0 -6
- package/dist-types/lib/user-facing/components/input/types.d.ts +0 -45
- package/dist-types/lib/user-facing/components/input/utils.d.ts +0 -15
- package/dist-types/lib/user-facing/components/key-value/components/key-styles.d.ts +0 -3
- package/dist-types/lib/user-facing/components/key-value/components/property-key.d.ts +0 -7
- package/dist-types/lib/user-facing/components/key-value/components/property-value.d.ts +0 -12
- package/dist-types/lib/user-facing/components/key-value/components/value-styles.d.ts +0 -6
- package/dist-types/lib/user-facing/components/key-value/constants.d.ts +0 -7
- package/dist-types/lib/user-facing/components/key-value/derived-properties.d.ts +0 -1
- package/dist-types/lib/user-facing/components/key-value/index.d.ts +0 -6
- package/dist-types/lib/user-facing/components/key-value/key-value-component.d.ts +0 -2
- package/dist-types/lib/user-facing/components/key-value/properties-props.d.ts +0 -45
- package/dist-types/lib/user-facing/components/key-value/props.d.ts +0 -38
- package/dist-types/lib/user-facing/components/key-value/styles.d.ts +0 -22
- package/dist-types/lib/user-facing/components/key-value/types.d.ts +0 -106
- package/dist-types/lib/user-facing/components/key-value/utils.d.ts +0 -11
- package/dist-types/lib/user-facing/components/modal/constants.d.ts +0 -8
- package/dist-types/lib/user-facing/components/modal/index.d.ts +0 -49
- package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +0 -37
- package/dist-types/lib/user-facing/components/modal/props.d.ts +0 -46
- package/dist-types/lib/user-facing/components/page/index.d.ts +0 -13
- package/dist-types/lib/user-facing/components/page/props.d.ts +0 -15
- package/dist-types/lib/user-facing/components/page/register-page.d.ts +0 -2
- package/dist-types/lib/user-facing/components/section/index.d.ts +0 -22
- package/dist-types/lib/user-facing/components/section/props.d.ts +0 -25
- package/dist-types/lib/user-facing/components/slideout/index.d.ts +0 -1
- package/dist-types/lib/user-facing/components/slideout/props.d.ts +0 -15
- package/dist-types/lib/user-facing/components/stack/index.d.ts +0 -60
- package/dist-types/lib/user-facing/components/switch/index.d.ts +0 -44
- package/dist-types/lib/user-facing/components/switch/props.d.ts +0 -45
- package/dist-types/lib/user-facing/components/switch/switch-component.d.ts +0 -5
- package/dist-types/lib/user-facing/components/switch/types.d.ts +0 -19
- package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +0 -178
- package/dist-types/lib/user-facing/components/table/components/autotooltip-component.d.ts +0 -17
- package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +0 -16
- package/dist-types/lib/user-facing/components/table/components/column-settings.d.ts +0 -11
- package/dist-types/lib/user-facing/components/table/components/edit-cell.d.ts +0 -15
- package/dist-types/lib/user-facing/components/table/components/edit-checkbox-cell.d.ts +0 -11
- package/dist-types/lib/user-facing/components/table/components/edit-date-cell.d.ts +0 -12
- package/dist-types/lib/user-facing/components/table/components/edit-input-cell.d.ts +0 -14
- package/dist-types/lib/user-facing/components/table/components/edit-multi-select-cell.d.ts +0 -13
- package/dist-types/lib/user-facing/components/table/components/edit-single-select-cell.d.ts +0 -13
- package/dist-types/lib/user-facing/components/table/components/edit-utils.d.ts +0 -28
- package/dist-types/lib/user-facing/components/table/components/editable-link-cell.d.ts +0 -20
- package/dist-types/lib/user-facing/components/table/components/filter-popover-content.d.ts +0 -37
- package/dist-types/lib/user-facing/components/table/components/popover-video.d.ts +0 -5
- package/dist-types/lib/user-facing/components/table/components/table-action-icon.d.ts +0 -13
- package/dist-types/lib/user-facing/components/table/components/table-column-header-button.d.ts +0 -19
- package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +0 -15
- package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +0 -40
- package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +0 -62
- package/dist-types/lib/user-facing/components/table/components/table-loading-state.d.ts +0 -11
- package/dist-types/lib/user-facing/components/table/components/table-pagination-input.d.ts +0 -10
- package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +0 -18
- package/dist-types/lib/user-facing/components/table/components/table-row-context-menu.d.ts +0 -17
- package/dist-types/lib/user-facing/components/table/components/table-tag.d.ts +0 -25
- package/dist-types/lib/user-facing/components/table/constants.d.ts +0 -111
- package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +0 -20
- package/dist-types/lib/user-facing/components/table/index.d.ts +0 -255
- package/dist-types/lib/user-facing/components/table/props.d.ts +0 -259
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +0 -100
- package/dist-types/lib/user-facing/components/table/table-manager.d.ts +0 -23
- package/dist-types/lib/user-facing/components/table/table-styles.d.ts +0 -78
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +0 -147
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +0 -148
- package/dist-types/lib/user-facing/components/table/types.d.ts +0 -471
- package/dist-types/lib/user-facing/components/table/use-sticky.d.ts +0 -1
- package/dist-types/lib/user-facing/components/table/utils.d.ts +0 -2
- package/dist-types/lib/user-facing/components/text/index.d.ts +0 -51
- package/dist-types/lib/user-facing/components/text/long-text-button.d.ts +0 -8
- package/dist-types/lib/user-facing/components/text/props.d.ts +0 -60
- package/dist-types/lib/user-facing/components/text/styles.d.ts +0 -2
- package/dist-types/lib/user-facing/components/text/utils.d.ts +0 -25
- package/dist-types/lib/user-facing/constants.d.ts +0 -2
- package/dist-types/lib/user-facing/entities/api/index.d.ts +0 -14
- package/dist-types/lib/user-facing/entities/api/props.d.ts +0 -20
- package/dist-types/lib/user-facing/entities/timer/index.d.ts +0 -16
- package/dist-types/lib/user-facing/entities/timer/props.d.ts +0 -19
- package/dist-types/lib/user-facing/entities/variable/index.d.ts +0 -14
- package/dist-types/lib/user-facing/entities/variable/props.d.ts +0 -13
- package/dist-types/lib/user-facing/global-functions.d.ts +0 -23
- package/dist-types/lib/user-facing/hooks/use-editor.d.ts +0 -42
- package/dist-types/lib/user-facing/hooks/use-update-properties.d.ts +0 -1
- package/dist-types/lib/user-facing/icons/constants.d.ts +0 -8
- package/dist-types/lib/user-facing/icons/encoded.d.ts +0 -1
- package/dist-types/lib/user-facing/icons/helpers.d.ts +0 -21
- package/dist-types/lib/user-facing/icons/index.d.ts +0 -2
- package/dist-types/lib/user-facing/internal-index.d.ts +0 -4
- package/dist-types/lib/user-facing/layers.d.ts +0 -43
- package/dist-types/lib/user-facing/properties-panel/constants.d.ts +0 -1
- package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +0 -5
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +0 -22
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +0 -12
- package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +0 -44
- package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +0 -114
- package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +0 -6
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +0 -253
- package/dist-types/lib/user-facing/properties-panel/props-builder.test-d.d.ts +0 -1
- package/dist-types/lib/user-facing/properties-panel/props-panel-utils.d.ts +0 -3
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +0 -33
- package/dist-types/lib/user-facing/sb-event-flow.d.ts +0 -52
- package/dist-types/lib/user-facing/sb-provider.d.ts +0 -12
- package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +0 -6
- package/dist-types/lib/user-facing/state/create-scope.d.ts +0 -17
- package/dist-types/lib/user-facing/state/sb-computed.d.ts +0 -2
- package/dist-types/lib/user-facing/state/types.d.ts +0 -17
- package/dist-types/lib/user-facing/styling/color-utils.d.ts +0 -13
- package/dist-types/lib/user-facing/styling/colors.d.ts +0 -67
- package/dist-types/lib/user-facing/styling/style-as-class.d.ts +0 -1
- package/dist-types/lib/user-facing/styling/styles.d.ts +0 -4
- package/dist-types/lib/user-facing/styling/widget-label-styles.d.ts +0 -11
- package/dist-types/lib/user-facing/themes/classnames.d.ts +0 -72
- package/dist-types/lib/user-facing/themes/constants.d.ts +0 -80
- package/dist-types/lib/user-facing/themes/default-theme.d.ts +0 -8
- package/dist-types/lib/user-facing/themes/generate-border-css.d.ts +0 -25
- package/dist-types/lib/user-facing/themes/generate-border-styles.d.ts +0 -15
- package/dist-types/lib/user-facing/themes/generate-class-name.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generate-colors.d.ts +0 -45
- package/dist-types/lib/user-facing/themes/generate-theme.d.ts +0 -3
- package/dist-types/lib/user-facing/themes/generate-typographies.d.ts +0 -5
- package/dist-types/lib/user-facing/themes/generatedStyles/button-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/container-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/datepicker-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/dropdown-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/editor-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/generate-component-styles.d.ts +0 -16
- package/dist-types/lib/user-facing/themes/generatedStyles/generate-padding-style.d.ts +0 -19
- package/dist-types/lib/user-facing/themes/generatedStyles/icon-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/input-styles.d.ts +0 -3
- package/dist-types/lib/user-facing/themes/generatedStyles/paginator-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/popper-styles.d.ts +0 -2
- package/dist-types/lib/user-facing/themes/generatedStyles/styles-utils.d.ts +0 -1
- package/dist-types/lib/user-facing/themes/generatedStyles/text-styles.d.ts +0 -3
- package/dist-types/lib/user-facing/themes/generatedStyles/theme-styles.d.ts +0 -5
- package/dist-types/lib/user-facing/themes/generatedStyles/utils.d.ts +0 -23
- package/dist-types/lib/user-facing/themes/index.d.ts +0 -5
- package/dist-types/lib/user-facing/themes/layers.d.ts +0 -6
- package/dist-types/lib/user-facing/themes/padding-constants.d.ts +0 -10
- package/dist-types/lib/user-facing/themes/typeface-constants.d.ts +0 -3
- package/dist-types/lib/user-facing/themes/typefaces/utils.d.ts +0 -28
- package/dist-types/lib/user-facing/themes/typeography/typography-utils.d.ts +0 -33
- package/dist-types/lib/user-facing/themes/typeography/use-typography-styling.d.ts +0 -15
- package/dist-types/lib/user-facing/themes/typography-constants.d.ts +0 -34
- package/dist-types/lib/user-facing/themes/utils.d.ts +0 -16
- package/dist-types/lib/user-facing/types.d.ts +0 -22
- package/dist-types/lib/user-facing/utils/form.d.ts +0 -10
- package/dist-types/lib/utils/clean-object.d.ts +0 -5
- package/dist-types/lib/utils/fast-clone.d.ts +0 -1
- package/dist-types/lib/utils/generate-id.d.ts +0 -1
- package/dist-types/lib/utils/is-user-on-mac.d.ts +0 -1
- package/dist-types/lib/utils/is-widget-grid.d.ts +0 -2
- package/dist-types/lib/utils/is-widget-vstack.d.ts +0 -2
- package/dist-types/lib/utils/shallow-equal.d.ts +0 -1
- package/dist-types/lib/utils/widget-wrapper-naming.d.ts +0 -6
- package/dist-types/main.d.ts +0 -1
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import { E as isEditMode, b as colors, n as root_store_default, v as generateId, x as editorBridge } from "./root-store-DFc-KUI6.js";
|
|
2
|
+
import { reaction } from "mobx";
|
|
3
|
+
import { NO_SELECT_ATTRIBUTE, SELECTOR_ID_ATTRIBUTE, SOURCE_ID_ATTRIBUTE } from "@superblocksteam/library-shared";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import React, { Component, useEffect, useMemo, useRef } from "react";
|
|
6
|
+
import styled, { keyframes } from "styled-components";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Observer } from "mobx-react-lite";
|
|
9
|
+
import polyfill from "@oddbird/css-anchor-positioning/fn";
|
|
10
|
+
//#region src/lib/user-facing/assets/images/clark.svg
|
|
11
|
+
var _path$1, _path2, _path3, _path4, _path5, _path6, _path7, _defs;
|
|
12
|
+
function _extends$1() {
|
|
13
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function(n) {
|
|
14
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
15
|
+
var t = arguments[e];
|
|
16
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
17
|
+
}
|
|
18
|
+
return n;
|
|
19
|
+
}, _extends$1.apply(null, arguments);
|
|
20
|
+
}
|
|
21
|
+
var SvgClark = function SvgClark(props) {
|
|
22
|
+
return /* @__PURE__ */ React$1.createElement("svg", _extends$1({
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
width: 28,
|
|
25
|
+
height: 20,
|
|
26
|
+
fill: "none"
|
|
27
|
+
}, props), _path$1 || (_path$1 = /* @__PURE__ */ React$1.createElement("path", {
|
|
28
|
+
fill: "url(#clark_svg__a)",
|
|
29
|
+
d: "M20.41 1.239a5.16 5.16 0 0 0-4.703 5.413l2.648-.232a2.227 2.227 0 1 1 2.886 2.49l.18 2.062.035.02c.575-.05 1.213-.454 1.57-.748 1.617-1.337 1.71-3.2 1.705-3.672 0-.063.047-.117.11-.123l.27-.024a.18.18 0 0 0 .167-.206c-.068-.444-.304-1.577-1.018-2.419-.064-.074-.019-.194.079-.203l.402-.035c.142-.012.218-.166.13-.28-.492-.64-1.994-2.26-4.46-2.043"
|
|
30
|
+
})), _path2 || (_path2 = /* @__PURE__ */ React$1.createElement("path", {
|
|
31
|
+
fill: "#2A333D",
|
|
32
|
+
d: "M18.333 6.987a2.226 2.226 0 0 0 2.411 2.024l.555-.048c-.612-2.74-1.987-3.551-1.987-3.551.153-.386 1.044-.836 1.044-.836a2.226 2.226 0 0 0-2.023 2.411",
|
|
33
|
+
opacity: .12
|
|
34
|
+
})), _path3 || (_path3 = /* @__PURE__ */ React$1.createElement("path", {
|
|
35
|
+
fill: "url(#clark_svg__b)",
|
|
36
|
+
d: "m6.65 12.564.045.492-.228-2.607A2.338 2.338 0 1 1 8.58 6.587l2.588-.226a5.16 5.16 0 0 0-5.371-3.584c-2.467.216-3.665 2.072-4.039 2.787-.066.127.035.266.177.253l.403-.035c.097-.008.162.102.113.186-.558.953-.593 2.11-.583 2.56a.18.18 0 0 0 .2.173l.27-.023a.12.12 0 0 1 .13.101c.078.467.492 2.285 2.317 3.32.402.228 1.291.515 1.866.465"
|
|
37
|
+
})), _path4 || (_path4 = /* @__PURE__ */ React$1.createElement("path", {
|
|
38
|
+
fill: "#2A333D",
|
|
39
|
+
d: "M9.161 7.938a2.337 2.337 0 0 1-2.124 2.53l-.582.052c.133-2.944 1.406-4.032 1.406-4.032-.227-.371-1.231-.675-1.231-.675A2.337 2.337 0 0 1 9.16 7.938",
|
|
40
|
+
opacity: .12
|
|
41
|
+
})), _path5 || (_path5 = /* @__PURE__ */ React$1.createElement("path", {
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
fillRule: "evenodd",
|
|
44
|
+
d: "M21.72 10.543c-.461-3.366-2.697-6.01-6.685-6.252-.109-.006-.163-.01-.202-.031a.2.2 0 0 1-.078-.084c-.02-.04-.02-.092-.02-.197v-.572a.192.192 0 0 0-.308-.153l-.938.708a.192.192 0 0 1-.309-.154v-.361a.192.192 0 0 0-.318-.145l-.807.717a9 9 0 0 1-.5.431 2 2 0 0 1-.305.2c-.119.069-.414.205-1.004.477-2.794 1.29-4.104 3.885-3.852 6.757.43 4.911 3.404 6.652 8.266 6.226 4.215-.368 7.758-2.469 7.06-7.567M11.64 10.2c.142.62-.16 1.221-.678 1.34-.518.12-1.053-.286-1.197-.907a1.3 1.3 0 0 1-.018-.521.384.384 0 1 0 .376-.667.8.8 0 0 1 .32-.153c.517-.12 1.053.287 1.196.908m7.042-.148c.51-.146.782-.761.606-1.374-.176-.612-.732-.99-1.242-.844a.83.83 0 0 0-.375.23.384.384 0 1 1-.284.713q-.01.211.052.431c.176.613.732.99 1.243.844m-5.448 3.596-.253-2.896a2.08 2.08 0 0 1 4.092-.685l.704 2.82a2.31 2.31 0 1 1-4.543.761",
|
|
45
|
+
clipRule: "evenodd"
|
|
46
|
+
})), _path6 || (_path6 = /* @__PURE__ */ React$1.createElement("path", {
|
|
47
|
+
fill: "url(#clark_svg__c)",
|
|
48
|
+
d: "M13.88 14.096a2.3 2.3 0 0 0 1.847.492 2.3 2.3 0 0 0 1.585-1.066 1.79 1.79 0 0 1-3.431.574",
|
|
49
|
+
opacity: .5
|
|
50
|
+
})), _path7 || (_path7 = /* @__PURE__ */ React$1.createElement("path", {
|
|
51
|
+
fill: "url(#clark_svg__d)",
|
|
52
|
+
d: "M13.191 13.144a2.312 2.312 0 0 0 4.465-.748l.123.491a2.31 2.31 0 1 1-4.544.761z",
|
|
53
|
+
opacity: .5
|
|
54
|
+
})), _defs || (_defs = /* @__PURE__ */ React$1.createElement("defs", null, /* @__PURE__ */ React$1.createElement("linearGradient", {
|
|
55
|
+
id: "clark_svg__a",
|
|
56
|
+
x1: 21.636,
|
|
57
|
+
x2: 17.027,
|
|
58
|
+
y1: 4.149,
|
|
59
|
+
y2: 8.785,
|
|
60
|
+
gradientUnits: "userSpaceOnUse"
|
|
61
|
+
}, /* @__PURE__ */ React$1.createElement("stop", { stopColor: "currentColor" }), /* @__PURE__ */ React$1.createElement("stop", {
|
|
62
|
+
offset: 1,
|
|
63
|
+
stopColor: "currentColor",
|
|
64
|
+
stopOpacity: .84
|
|
65
|
+
})), /* @__PURE__ */ React$1.createElement("linearGradient", {
|
|
66
|
+
id: "clark_svg__b",
|
|
67
|
+
x1: 4.534,
|
|
68
|
+
x2: 10.643,
|
|
69
|
+
y1: 6.603,
|
|
70
|
+
y2: 9.712,
|
|
71
|
+
gradientUnits: "userSpaceOnUse"
|
|
72
|
+
}, /* @__PURE__ */ React$1.createElement("stop", { stopColor: "currentColor" }), /* @__PURE__ */ React$1.createElement("stop", {
|
|
73
|
+
offset: 1,
|
|
74
|
+
stopColor: "currentColor",
|
|
75
|
+
stopOpacity: .84
|
|
76
|
+
})), /* @__PURE__ */ React$1.createElement("linearGradient", {
|
|
77
|
+
id: "clark_svg__c",
|
|
78
|
+
x1: 15.788,
|
|
79
|
+
x2: 16.004,
|
|
80
|
+
y1: 13.866,
|
|
81
|
+
y2: 15.093,
|
|
82
|
+
gradientUnits: "userSpaceOnUse"
|
|
83
|
+
}, /* @__PURE__ */ React$1.createElement("stop", {
|
|
84
|
+
stopColor: "currentColor",
|
|
85
|
+
stopOpacity: .6
|
|
86
|
+
}), /* @__PURE__ */ React$1.createElement("stop", {
|
|
87
|
+
offset: 1,
|
|
88
|
+
stopColor: "currentColor"
|
|
89
|
+
})), /* @__PURE__ */ React$1.createElement("linearGradient", {
|
|
90
|
+
id: "clark_svg__d",
|
|
91
|
+
x1: 15.704,
|
|
92
|
+
x2: 16.07,
|
|
93
|
+
y1: 13.597,
|
|
94
|
+
y2: 15.67,
|
|
95
|
+
gradientUnits: "userSpaceOnUse"
|
|
96
|
+
}, /* @__PURE__ */ React$1.createElement("stop", {
|
|
97
|
+
stopColor: "currentColor",
|
|
98
|
+
stopOpacity: .6
|
|
99
|
+
}), /* @__PURE__ */ React$1.createElement("stop", {
|
|
100
|
+
offset: 1,
|
|
101
|
+
stopColor: "currentColor"
|
|
102
|
+
})))));
|
|
103
|
+
};
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/lib/internal-details/internal-components/common.ts
|
|
106
|
+
const ErrorIconContainer = styled.div`
|
|
107
|
+
width: 60px;
|
|
108
|
+
height: 60px;
|
|
109
|
+
min-width: 60px;
|
|
110
|
+
min-height: 60px;
|
|
111
|
+
background: linear-gradient(135deg, #aab 0%, #000033 50%, #000066 100%);
|
|
112
|
+
border-radius: 16px;
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
margin: 0 auto 16px;
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
animation: scaleIn 0.3s ease-out forwards;
|
|
119
|
+
opacity: 0;
|
|
120
|
+
box-shadow:
|
|
121
|
+
0 0 1px black,
|
|
122
|
+
0 4px 12px rgba(0, 85, 187, 0.15),
|
|
123
|
+
0 2px 4px rgba(0, 85, 187, 0.05);
|
|
124
|
+
|
|
125
|
+
@keyframes scaleIn {
|
|
126
|
+
from {
|
|
127
|
+
transform: scale(0.8);
|
|
128
|
+
opacity: 0;
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
transform: scale(1);
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
`;
|
|
136
|
+
const StyledClarkIcon = styled(SvgClark)`
|
|
137
|
+
width: 54px;
|
|
138
|
+
height: 54px;
|
|
139
|
+
color: white;
|
|
140
|
+
margin-top: 3px;
|
|
141
|
+
margin-left: 1px;
|
|
142
|
+
animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
|
143
|
+
opacity: 0;
|
|
144
|
+
|
|
145
|
+
@keyframes scaleIn {
|
|
146
|
+
0% {
|
|
147
|
+
transform: scale(0.6);
|
|
148
|
+
opacity: 0;
|
|
149
|
+
}
|
|
150
|
+
50% {
|
|
151
|
+
transform: scale(1.1);
|
|
152
|
+
}
|
|
153
|
+
100% {
|
|
154
|
+
transform: scale(1);
|
|
155
|
+
opacity: 1;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
const ErrorTitle = styled.h2`
|
|
160
|
+
font-family: Inter;
|
|
161
|
+
color: rgba(0, 0, 0, 0.85);
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
font-size: 24px;
|
|
164
|
+
line-height: 1.35;
|
|
165
|
+
text-align: center;
|
|
166
|
+
margin-bottom: 6px;
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
`;
|
|
169
|
+
const ErrorMessage = styled.p`
|
|
170
|
+
font-family: Inter;
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
color: #6c7689;
|
|
173
|
+
line-height: 1.5715;
|
|
174
|
+
text-align: center;
|
|
175
|
+
flex-shrink: 0;
|
|
176
|
+
margin-top: 0;
|
|
177
|
+
margin-bottom: 16px;
|
|
178
|
+
`;
|
|
179
|
+
const ErrorDetails = styled.details`
|
|
180
|
+
margin-top: 24px;
|
|
181
|
+
text-align: left;
|
|
182
|
+
background-color: #f9fafb;
|
|
183
|
+
border-radius: 6px;
|
|
184
|
+
padding: 16px;
|
|
185
|
+
box-shadow:
|
|
186
|
+
0px 0px 1px 0px #22272f52,
|
|
187
|
+
0px 1px 3px 0px #22272f1f;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
font-family: Inter;
|
|
190
|
+
|
|
191
|
+
&[open] summary {
|
|
192
|
+
margin-bottom: 12px;
|
|
193
|
+
}
|
|
194
|
+
`;
|
|
195
|
+
const ErrorSummary = styled.summary`
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
font-weight: 500;
|
|
198
|
+
color: #374151;
|
|
199
|
+
font-size: 14px;
|
|
200
|
+
user-select: none;
|
|
201
|
+
`;
|
|
202
|
+
const ErrorStack = styled.pre`
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
color: #dc2626;
|
|
205
|
+
overflow: auto;
|
|
206
|
+
white-space: pre-wrap;
|
|
207
|
+
margin: 16px;
|
|
208
|
+
font-family: monospace;
|
|
209
|
+
`;
|
|
210
|
+
const ErrorContainer = styled.div`
|
|
211
|
+
position: absolute;
|
|
212
|
+
inset: 0;
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: center;
|
|
216
|
+
z-index: 10;
|
|
217
|
+
background: rgba(255, 255, 255, 0.5);
|
|
218
|
+
pointer-events: auto;
|
|
219
|
+
`;
|
|
220
|
+
const ErrorContent = styled.div`
|
|
221
|
+
max-width: 700px;
|
|
222
|
+
padding: 40px;
|
|
223
|
+
overflow-y: auto;
|
|
224
|
+
flex: 1;
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
gap: 20px;
|
|
228
|
+
|
|
229
|
+
opacity: 0;
|
|
230
|
+
animation: fadeIn 0.3s ease-out forwards;
|
|
231
|
+
|
|
232
|
+
@keyframes fadeIn {
|
|
233
|
+
from {
|
|
234
|
+
opacity: 0;
|
|
235
|
+
}
|
|
236
|
+
to {
|
|
237
|
+
opacity: 1;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
`;
|
|
241
|
+
const SecondaryButton = styled.button`
|
|
242
|
+
color: ${colors.GREY_700};
|
|
243
|
+
border: 1px solid ${colors.GREY_100};
|
|
244
|
+
width: fit-content;
|
|
245
|
+
border-radius: 4px;
|
|
246
|
+
padding: 6px 12px;
|
|
247
|
+
cursor: pointer;
|
|
248
|
+
height: fit-content;
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
|
|
251
|
+
&:hover {
|
|
252
|
+
opacity: 0.8;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:active {
|
|
256
|
+
opacity: 0.6;
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
259
|
+
const ActionsContainer = styled.div`
|
|
260
|
+
display: flex;
|
|
261
|
+
gap: 12px;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
`;
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/edit-mode/assets/ai-stars.svg
|
|
267
|
+
var _path;
|
|
268
|
+
function _extends() {
|
|
269
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
270
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
271
|
+
var t = arguments[e];
|
|
272
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
273
|
+
}
|
|
274
|
+
return n;
|
|
275
|
+
}, _extends.apply(null, arguments);
|
|
276
|
+
}
|
|
277
|
+
var SvgAiStars = function SvgAiStars(props) {
|
|
278
|
+
return /* @__PURE__ */ React$1.createElement("svg", _extends({
|
|
279
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
280
|
+
width: 13,
|
|
281
|
+
height: 14,
|
|
282
|
+
fill: "none"
|
|
283
|
+
}, props), _path || (_path = /* @__PURE__ */ React$1.createElement("path", {
|
|
284
|
+
fill: "currentColor",
|
|
285
|
+
fillRule: "evenodd",
|
|
286
|
+
d: "M10.5.9a.6.6 0 0 1 .586.472l.133.605a.4.4 0 0 0 .305.305l.605.132a.6.6 0 0 1 0 1.172l-.605.133a.4.4 0 0 0-.305.305l-.133.605a.6.6 0 0 1-1.172 0l-.132-.605a.4.4 0 0 0-.305-.305l-.605-.133a.6.6 0 0 1 0-1.172l.605-.132a.4.4 0 0 0 .305-.305l.132-.605A.6.6 0 0 1 10.5.9M5.077 3.833a.6.6 0 0 0-1.153 0l-.215.74A2.4 2.4 0 0 1 2.074 6.21l-.741.215a.6.6 0 0 0 0 1.153l.74.215A2.4 2.4 0 0 1 3.71 9.427l.215.74a.6.6 0 0 0 1.153 0l.215-.74a2.4 2.4 0 0 1 1.635-1.635l.74-.215a.6.6 0 0 0 0-1.153l-.74-.215a2.4 2.4 0 0 1-1.635-1.635zm6.01 5.539a.6.6 0 0 0-1.173 0l-.132.605a.4.4 0 0 1-.305.305l-.605.133a.6.6 0 0 0 0 1.172l.605.132a.4.4 0 0 1 .305.305l.132.605a.6.6 0 0 0 1.172 0l.133-.605a.4.4 0 0 1 .305-.305l.605-.132a.6.6 0 0 0 0-1.172l-.605-.133a.4.4 0 0 1-.305-.305z",
|
|
287
|
+
clipRule: "evenodd"
|
|
288
|
+
})));
|
|
289
|
+
};
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/lib/internal-details/internal-components/fix-with-clark-button.tsx
|
|
292
|
+
const MAX_STACK_FRAMES = 10;
|
|
293
|
+
const MAX_PROMPT_LENGTH = 8e3;
|
|
294
|
+
function buildRuntimeErrorPrompt(error) {
|
|
295
|
+
const defaultPrompt = "Fix this error: Unknown error";
|
|
296
|
+
if (!error) return defaultPrompt;
|
|
297
|
+
const [messageLine, ...rawFrames] = error.stack?.split("\n") ?? [];
|
|
298
|
+
const message = (messageLine || error.message || error.toString()).trim();
|
|
299
|
+
const filteredFrames = rawFrames.filter((line) => line && !line.includes("node_modules"));
|
|
300
|
+
const selectedFrames = filteredFrames.slice(0, MAX_STACK_FRAMES);
|
|
301
|
+
const omittedCount = filteredFrames.length - selectedFrames.length;
|
|
302
|
+
const frameSection = [...selectedFrames, ...omittedCount > 0 ? [`... (${omittedCount} additional frame${omittedCount > 1 ? "s" : ""} omitted)`] : []].map((line) => line.trimEnd()).join("\n");
|
|
303
|
+
const prompt = `Fix this error: ${frameSection ? `${message}\n${frameSection}` : message}`;
|
|
304
|
+
if (prompt.length <= MAX_PROMPT_LENGTH) return prompt;
|
|
305
|
+
const suffix = "... (truncated)";
|
|
306
|
+
const availableChars = Math.max(MAX_PROMPT_LENGTH - 15, 0);
|
|
307
|
+
return `${prompt.slice(0, availableChars)}${suffix}`;
|
|
308
|
+
}
|
|
309
|
+
const FixWithClarkButtonContainer = styled.button`
|
|
310
|
+
padding: 6px 12px;
|
|
311
|
+
background-color: ${colors.ACCENT_BLUE_500};
|
|
312
|
+
border-radius: 4px;
|
|
313
|
+
border: none;
|
|
314
|
+
color: white;
|
|
315
|
+
height: fit-content;
|
|
316
|
+
display: flex;
|
|
317
|
+
gap: 4px;
|
|
318
|
+
cursor: pointer;
|
|
319
|
+
transition: opacity 0.2s;
|
|
320
|
+
font-size: 12px;
|
|
321
|
+
align-items: center;
|
|
322
|
+
|
|
323
|
+
&:hover:not(:disabled) {
|
|
324
|
+
opacity: 0.8;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
&:disabled {
|
|
328
|
+
opacity: 0.5;
|
|
329
|
+
cursor: not-allowed;
|
|
330
|
+
}
|
|
331
|
+
`;
|
|
332
|
+
function FixWithClarkButton({ identifier, error, onClick }) {
|
|
333
|
+
const isAiEditing = root_store_default.editStore?.ai.getIsEditing() ?? false;
|
|
334
|
+
const handleFixWithAi = () => {
|
|
335
|
+
onClick?.();
|
|
336
|
+
if (identifier) editorBridge.addComponentToAiContext(identifier.sourceId, identifier.selectorId);
|
|
337
|
+
const prompt = buildRuntimeErrorPrompt(error);
|
|
338
|
+
editorBridge.aiGenerate(prompt, true);
|
|
339
|
+
};
|
|
340
|
+
return /* @__PURE__ */ jsxs(FixWithClarkButtonContainer, {
|
|
341
|
+
onClick: handleFixWithAi,
|
|
342
|
+
disabled: isAiEditing,
|
|
343
|
+
children: [/* @__PURE__ */ jsx(SvgAiStars, {}), " Fix with Clark"]
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/lib/internal-details/css-constants.ts
|
|
348
|
+
const CSS_CLASSES = {
|
|
349
|
+
SUSPENSE_FALLBACK: "sb-suspense-fallback",
|
|
350
|
+
ANCHOR_NAME: "sb-anchor-name"
|
|
351
|
+
};
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/lib/internal-details/lib/suspense/suspense-fallback.tsx
|
|
354
|
+
const shimmerAnimation = keyframes`
|
|
355
|
+
0% {
|
|
356
|
+
background-position: -200px 0;
|
|
357
|
+
}
|
|
358
|
+
100% {
|
|
359
|
+
background-position: calc(200px + 100%) 0;
|
|
360
|
+
}
|
|
361
|
+
`;
|
|
362
|
+
const ShimmerDiv = styled.div`
|
|
363
|
+
min-height: 12px;
|
|
364
|
+
min-width: 12px;
|
|
365
|
+
background-color: ${(props) => props.$backgroundColor};
|
|
366
|
+
border-radius: ${(props) => props.$borderRadius};
|
|
367
|
+
position: relative;
|
|
368
|
+
overflow: hidden;
|
|
369
|
+
background: linear-gradient(
|
|
370
|
+
90deg,
|
|
371
|
+
${(props) => props.$backgroundColor} 25%,
|
|
372
|
+
${(props) => props.$shimmerHighlight} 50%,
|
|
373
|
+
${(props) => props.$backgroundColor} 75%
|
|
374
|
+
);
|
|
375
|
+
background-size: max(100%, 200px) 100%;
|
|
376
|
+
animation: ${shimmerAnimation} 5s infinite linear;
|
|
377
|
+
`;
|
|
378
|
+
/**
|
|
379
|
+
* Default fallback component displayed while components are suspended.
|
|
380
|
+
*/
|
|
381
|
+
function SuspenseFallback({ style, className, noBorderRadius }) {
|
|
382
|
+
const backgroundColor = "#f8f9fa";
|
|
383
|
+
const shimmerHighlight = "#ffffff";
|
|
384
|
+
const borderRadius = noBorderRadius ? "0px" : "4px";
|
|
385
|
+
const classes = useMemo(() => [CSS_CLASSES.ANCHOR_NAME, className].filter(Boolean).join(" "), [className]);
|
|
386
|
+
return /* @__PURE__ */ jsx(ShimmerDiv, {
|
|
387
|
+
$backgroundColor: backgroundColor,
|
|
388
|
+
$shimmerHighlight: shimmerHighlight,
|
|
389
|
+
$borderRadius: borderRadius,
|
|
390
|
+
style: style?.(),
|
|
391
|
+
className: classes,
|
|
392
|
+
"data-test": "suspense-fallback"
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region src/lib/user-facing/component-base/error-boundary.tsx
|
|
397
|
+
const ErrorBoundaryContainer = styled.div`
|
|
398
|
+
background: white;
|
|
399
|
+
padding: 10px;
|
|
400
|
+
display: flex;
|
|
401
|
+
flex-direction: column;
|
|
402
|
+
gap: 8px;
|
|
403
|
+
border: 1px solid ${colors.GREY_100};
|
|
404
|
+
border-left: 3px solid ${colors.RED_500};
|
|
405
|
+
border-radius: 4px;
|
|
406
|
+
width: 100%;
|
|
407
|
+
color: ${colors.GREY_700};
|
|
408
|
+
`;
|
|
409
|
+
const ErrorDetailsContainer = styled.div`
|
|
410
|
+
display: flex;
|
|
411
|
+
flex-direction: column;
|
|
412
|
+
gap: 8px;
|
|
413
|
+
`;
|
|
414
|
+
const ErrorActionsContainer = styled.div`
|
|
415
|
+
display: flex;
|
|
416
|
+
justify-content: flex-end;
|
|
417
|
+
align-items: center;
|
|
418
|
+
gap: 8px;
|
|
419
|
+
`;
|
|
420
|
+
var ErrorBoundary = class extends Component {
|
|
421
|
+
state = {
|
|
422
|
+
id: generateId(),
|
|
423
|
+
hasError: false
|
|
424
|
+
};
|
|
425
|
+
disposeAutoReset;
|
|
426
|
+
static getDerivedStateFromError(e) {
|
|
427
|
+
const error = e instanceof Error ? e : new Error(typeof e === "object" && e !== null ? JSON.stringify(e) : String(e));
|
|
428
|
+
return {
|
|
429
|
+
id: generateId(),
|
|
430
|
+
hasError: true,
|
|
431
|
+
error
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
componentDidCatch(error, errorInfo) {
|
|
435
|
+
if (isEditMode()) root_store_default.editStore?.ai.handleRuntimeError({
|
|
436
|
+
id: this.state.id,
|
|
437
|
+
error: String(error),
|
|
438
|
+
errorInfo,
|
|
439
|
+
identifier: this.props.identifier
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
reset = () => {
|
|
443
|
+
if (isEditMode()) root_store_default.editStore?.ai.clearRuntimeError(this.state.id);
|
|
444
|
+
this.setState({
|
|
445
|
+
hasError: false,
|
|
446
|
+
error: void 0
|
|
447
|
+
});
|
|
448
|
+
};
|
|
449
|
+
componentWillUnmount() {
|
|
450
|
+
if (this.state.hasError && isEditMode()) root_store_default.editStore?.ai.clearRuntimeError(this.state.id);
|
|
451
|
+
this.disposeAutoReset?.();
|
|
452
|
+
}
|
|
453
|
+
handleFixWithClarkInitiated = () => {
|
|
454
|
+
const ai = root_store_default.editStore?.ai;
|
|
455
|
+
if (!ai) return;
|
|
456
|
+
this.disposeAutoReset?.();
|
|
457
|
+
this.disposeAutoReset = void 0;
|
|
458
|
+
let sawStart = ai.getIsEditing();
|
|
459
|
+
this.disposeAutoReset = reaction(() => ai.getIsEditing(), (isEditing) => {
|
|
460
|
+
if (!sawStart && isEditing) sawStart = true;
|
|
461
|
+
if (sawStart && !isEditing) {
|
|
462
|
+
this.reset();
|
|
463
|
+
this.disposeAutoReset?.();
|
|
464
|
+
this.disposeAutoReset = void 0;
|
|
465
|
+
}
|
|
466
|
+
}, {
|
|
467
|
+
fireImmediately: true,
|
|
468
|
+
name: "error-boundary-ai-auto-reset"
|
|
469
|
+
});
|
|
470
|
+
};
|
|
471
|
+
handleFixWithAi() {
|
|
472
|
+
const { identifier } = this.props;
|
|
473
|
+
if (identifier) editorBridge.addComponentToAiContext(identifier.sourceId, identifier.selectorId);
|
|
474
|
+
let prompt = `Fix this error: `;
|
|
475
|
+
if (this.state.error?.stack) {
|
|
476
|
+
const lines = this.state.error.stack.split("\n");
|
|
477
|
+
const nodeModulesIndex = lines.findIndex((line) => line.includes("node_modules"));
|
|
478
|
+
const relevantLines = nodeModulesIndex > -1 ? lines.slice(0, nodeModulesIndex) : lines;
|
|
479
|
+
prompt += relevantLines.slice(0, 5).join("\n");
|
|
480
|
+
} else prompt += this.state.error?.toString();
|
|
481
|
+
editorBridge.aiGenerate(prompt);
|
|
482
|
+
}
|
|
483
|
+
render() {
|
|
484
|
+
if (this.state.hasError) return /* @__PURE__ */ jsx(Observer, { children: () => {
|
|
485
|
+
if (root_store_default.editStore?.ai.getIsEditing() ?? false) return /* @__PURE__ */ jsx(SuspenseFallback, {});
|
|
486
|
+
return /* @__PURE__ */ jsxs(ErrorBoundaryContainer, { children: [/* @__PURE__ */ jsxs(ErrorDetailsContainer, {
|
|
487
|
+
"data-testid": "runtime-error-details",
|
|
488
|
+
children: [/* @__PURE__ */ jsx("h3", { children: this.props.header || "Something went wrong." }), /* @__PURE__ */ jsxs("details", {
|
|
489
|
+
style: { fontSize: "0.8em" },
|
|
490
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
491
|
+
style: { paddingLeft: "0.25rem" },
|
|
492
|
+
children: "Error details"
|
|
493
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
494
|
+
style: {
|
|
495
|
+
marginTop: "0.5rem",
|
|
496
|
+
maxWidth: "100%",
|
|
497
|
+
overflowX: "auto",
|
|
498
|
+
scrollbarWidth: "thin"
|
|
499
|
+
},
|
|
500
|
+
children: /* @__PURE__ */ jsx("pre", {
|
|
501
|
+
style: { color: "gray" },
|
|
502
|
+
children: /* @__PURE__ */ jsx("code", { children: this.state.error?.stack ? this.state.error.stack : this.state.error?.toString() })
|
|
503
|
+
})
|
|
504
|
+
})]
|
|
505
|
+
})]
|
|
506
|
+
}), /* @__PURE__ */ jsxs(ErrorActionsContainer, { children: [isEditMode() && /* @__PURE__ */ jsx(FixWithClarkButton, {
|
|
507
|
+
onClick: this.handleFixWithClarkInitiated,
|
|
508
|
+
error: this.state.error,
|
|
509
|
+
identifier: this.props.identifier
|
|
510
|
+
}), /* @__PURE__ */ jsx(SecondaryButton, {
|
|
511
|
+
onClick: this.reset,
|
|
512
|
+
children: "Try again"
|
|
513
|
+
})] })] });
|
|
514
|
+
} });
|
|
515
|
+
return this.props.children;
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region src/lib/utils/widget-wrapper-naming.ts
|
|
520
|
+
const getWidgetAnchorName = (selectorId) => {
|
|
521
|
+
return `--widget-${selectorId}`;
|
|
522
|
+
};
|
|
523
|
+
const getWidgetRectAnchorName = (selectorId) => {
|
|
524
|
+
return `--widget-rect-${selectorId}`;
|
|
525
|
+
};
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/edit-mode/edit-wrapper.tsx
|
|
528
|
+
if (typeof window !== "undefined" && typeof document.documentElement !== "undefined" && !("anchorName" in document.documentElement.style)) polyfill();
|
|
529
|
+
const createAnchorNameStyle = (props) => {
|
|
530
|
+
return { "--anchor-name": getWidgetAnchorName(props.selectorId) };
|
|
531
|
+
};
|
|
532
|
+
//#endregion
|
|
533
|
+
//#region src/edit-mode/instance-tracker.ts
|
|
534
|
+
/**
|
|
535
|
+
* Tracks and recycles instance numbers for each sourceId to generate stable, unique selector IDs.
|
|
536
|
+
* When components unmount, their instance numbers are released and can be reused.
|
|
537
|
+
*/
|
|
538
|
+
var InstanceTracker = class {
|
|
539
|
+
sourceIdToUsedInstances = /* @__PURE__ */ new Map();
|
|
540
|
+
getNextAvailableInstance(sourceId) {
|
|
541
|
+
const usedInstances = this.sourceIdToUsedInstances.get(sourceId) ?? /* @__PURE__ */ new Set();
|
|
542
|
+
let instance = 0;
|
|
543
|
+
while (usedInstances.has(instance)) instance++;
|
|
544
|
+
usedInstances.add(instance);
|
|
545
|
+
this.sourceIdToUsedInstances.set(sourceId, usedInstances);
|
|
546
|
+
return instance;
|
|
547
|
+
}
|
|
548
|
+
releaseInstance(sourceId, instance) {
|
|
549
|
+
const usedInstances = this.sourceIdToUsedInstances.get(sourceId);
|
|
550
|
+
if (usedInstances) {
|
|
551
|
+
usedInstances.delete(instance);
|
|
552
|
+
if (usedInstances.size === 0) this.sourceIdToUsedInstances.delete(sourceId);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
const instanceTracker = new InstanceTracker();
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region src/edit-mode/jsx-wrapper.tsx
|
|
559
|
+
const JSXContext = React.createContext({
|
|
560
|
+
selectorId: "S-<unknown>",
|
|
561
|
+
sourceId: "SB-<unknown>"
|
|
562
|
+
});
|
|
563
|
+
const makeWrappedComponent = (type) => {
|
|
564
|
+
const isTag = typeof type === "string";
|
|
565
|
+
const isRegisteredSbComponent = root_store_default.componentRegistry.hasComponent(type);
|
|
566
|
+
const Component = React.forwardRef((props, ref) => {
|
|
567
|
+
const { selectorId: parentSelectorId } = useJSXContext();
|
|
568
|
+
const sourceId = props[SOURCE_ID_ATTRIBUTE];
|
|
569
|
+
const noSelect = props[NO_SELECT_ATTRIBUTE];
|
|
570
|
+
const instanceNumberRef = useRef();
|
|
571
|
+
const selectorId = useRef("S-<unknown>");
|
|
572
|
+
if (selectorId.current === "S-<unknown>") {
|
|
573
|
+
instanceNumberRef.current = instanceTracker.getNextAvailableInstance(sourceId);
|
|
574
|
+
selectorId.current = `S-x-${sourceId}-${instanceNumberRef.current}`;
|
|
575
|
+
}
|
|
576
|
+
useEffect(() => {
|
|
577
|
+
root_store_default.editStore?.runtimeTrackingStore.registerComponent(selectorId.current, {
|
|
578
|
+
sourceId,
|
|
579
|
+
type,
|
|
580
|
+
parentSelectorId,
|
|
581
|
+
isSbComponent: isRegisteredSbComponent,
|
|
582
|
+
isHtmlElement: isTag,
|
|
583
|
+
noSelect
|
|
584
|
+
});
|
|
585
|
+
return () => {
|
|
586
|
+
root_store_default.editStore?.runtimeTrackingStore.unregisterComponent(selectorId.current);
|
|
587
|
+
if (instanceNumberRef.current !== void 0) instanceTracker.releaseInstance(sourceId, instanceNumberRef.current);
|
|
588
|
+
};
|
|
589
|
+
}, []);
|
|
590
|
+
useEffect(() => {
|
|
591
|
+
root_store_default.editStore?.runtimeTrackingStore.updatePropsForComponent(selectorId.current, props);
|
|
592
|
+
}, [props]);
|
|
593
|
+
const jsxContext = useMemo(() => ({
|
|
594
|
+
selectorId: selectorId.current,
|
|
595
|
+
sourceId
|
|
596
|
+
}), [sourceId]);
|
|
597
|
+
const selectorProps = { [SELECTOR_ID_ATTRIBUTE]: selectorId.current };
|
|
598
|
+
if (parentSelectorId) selectorProps["data-sb-parent-selector-id"] = parentSelectorId;
|
|
599
|
+
const { style: propsStyle, className: propsClassName } = props;
|
|
600
|
+
const style = useMemo(() => {
|
|
601
|
+
return {
|
|
602
|
+
...propsStyle,
|
|
603
|
+
...createAnchorNameStyle({ selectorId: selectorId.current })
|
|
604
|
+
};
|
|
605
|
+
}, [propsStyle]);
|
|
606
|
+
const className = useMemo(() => {
|
|
607
|
+
return typeof propsClassName === "function" ? (...args) => ["sb-anchor-name", propsClassName(...args)].filter(Boolean).join(" ") : ["sb-anchor-name", propsClassName].filter(Boolean).join(" ");
|
|
608
|
+
}, [propsClassName]);
|
|
609
|
+
const element = React.createElement(type, {
|
|
610
|
+
ref,
|
|
611
|
+
...props,
|
|
612
|
+
...selectorProps,
|
|
613
|
+
className,
|
|
614
|
+
style
|
|
615
|
+
});
|
|
616
|
+
if (!root_store_default.editStore?.isInitialized) return /* @__PURE__ */ jsx(JSXContext.Provider, {
|
|
617
|
+
value: jsxContext,
|
|
618
|
+
children: element
|
|
619
|
+
});
|
|
620
|
+
return /* @__PURE__ */ jsx(JSXContext.Provider, {
|
|
621
|
+
value: jsxContext,
|
|
622
|
+
children: /* @__PURE__ */ jsx(ErrorBoundary, { children: element })
|
|
623
|
+
});
|
|
624
|
+
});
|
|
625
|
+
try {
|
|
626
|
+
Component.displayName = typeof type === "string" ? type : type.displayName || type.name || "Component";
|
|
627
|
+
} catch (e) {
|
|
628
|
+
console.error("Error setting displayName", e);
|
|
629
|
+
}
|
|
630
|
+
return Component;
|
|
631
|
+
};
|
|
632
|
+
const useJSXContext = () => {
|
|
633
|
+
return React.useContext(JSXContext);
|
|
634
|
+
};
|
|
635
|
+
//#endregion
|
|
636
|
+
export { FixWithClarkButton as a, ErrorContent as c, ErrorMessage as d, ErrorStack as f, StyledClarkIcon as g, SecondaryButton as h, getWidgetRectAnchorName as i, ErrorDetails as l, ErrorTitle as m, useJSXContext as n, ActionsContainer as o, ErrorSummary as p, getWidgetAnchorName as r, ErrorContainer as s, makeWrappedComponent as t, ErrorIconContainer as u };
|
|
637
|
+
|
|
638
|
+
//# sourceMappingURL=jsx-wrapper-CAKd0FsI.js.map
|