@superblocksteam/library 2.0.33 → 2.0.34-next.1
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/dist-types/app-internal.d.ts +4 -0
- package/dist-types/docs-utils/generate-docs-utils.d.ts +42 -0
- package/dist-types/docs-utils/generate-docs.d.ts +2 -0
- package/dist-types/docs-utils/generate-docs.test.d.ts +1 -0
- package/dist-types/edit-mode/base-editor-bridge.d.ts +60 -0
- package/dist-types/edit-mode/collisions-layer.d.ts +3 -0
- package/dist-types/edit-mode/create-component.d.ts +11 -0
- package/dist-types/edit-mode/create-component.test.d.ts +1 -0
- package/dist-types/edit-mode/debug-tools.d.ts +11 -0
- package/dist-types/edit-mode/dnd/collision-detection.d.ts +3 -0
- package/dist-types/edit-mode/dnd/dnd-provider.d.ts +4 -0
- package/dist-types/edit-mode/dnd/draggable-widget.d.ts +7 -0
- package/dist-types/edit-mode/dnd/drop-layer.d.ts +5 -0
- package/dist-types/edit-mode/dnd/droppable-widget.d.ts +10 -0
- package/dist-types/edit-mode/dnd/get-allowed-children.d.ts +2 -0
- package/dist-types/edit-mode/dnd/grid-drop.d.ts +4 -0
- package/dist-types/edit-mode/dnd/grid-store.d.ts +58 -0
- package/dist-types/edit-mode/dnd/grid-utils.d.ts +8 -0
- package/dist-types/edit-mode/dnd/handle-grid-drop.d.ts +9 -0
- package/dist-types/edit-mode/dnd/handle-stack-drop.d.ts +9 -0
- package/dist-types/edit-mode/dnd/hooks/use-component-draggable.d.ts +5 -0
- package/dist-types/edit-mode/dnd/hooks/use-component-droppable.d.ts +6 -0
- package/dist-types/edit-mode/dnd/hooks/use-handle-dnd-events.d.ts +1 -0
- package/dist-types/edit-mode/dnd/hooks/use-widget-node-ref.d.ts +2 -0
- package/dist-types/edit-mode/dnd/new-components-drag-layer.d.ts +6 -0
- package/dist-types/edit-mode/dnd/stack-drop.d.ts +4 -0
- package/dist-types/edit-mode/dnd/stack-store.d.ts +10 -0
- package/dist-types/edit-mode/dnd/stack-utils.d.ts +13 -0
- package/dist-types/edit-mode/dnd/types.d.ts +45 -0
- package/dist-types/edit-mode/dnd/utils.d.ts +42 -0
- package/dist-types/edit-mode/dnd/utils.test.d.ts +1 -0
- package/dist-types/edit-mode/duplicated-name-popover.d.ts +7 -0
- package/dist-types/edit-mode/edit-store.d.ts +47 -0
- package/dist-types/edit-mode/edit-wrapper.d.ts +18 -0
- package/dist-types/edit-mode/editor-hotkeys.d.ts +3 -0
- package/dist-types/edit-mode/extended-clickable-area.d.ts +8 -0
- package/dist-types/edit-mode/features/ai-store.d.ts +34 -0
- package/dist-types/edit-mode/features/connection-manager.d.ts +9 -0
- package/dist-types/edit-mode/features/drag-and-drop-store.d.ts +67 -0
- package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +23 -0
- package/dist-types/edit-mode/features/operation-store.d.ts +64 -0
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +45 -0
- package/dist-types/edit-mode/features/resizing-store.d.ts +54 -0
- package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +95 -0
- package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +59 -0
- package/dist-types/edit-mode/features/ui-store.d.ts +49 -0
- package/dist-types/edit-mode/get-edit-store.d.ts +6 -0
- package/dist-types/edit-mode/hooks/use-register-source-element.d.ts +2 -0
- package/dist-types/edit-mode/identifier-context.d.ts +6 -0
- package/dist-types/edit-mode/iframe-wrappers.d.ts +5 -0
- package/dist-types/edit-mode/import-error-notification.d.ts +1 -0
- package/dist-types/edit-mode/interaction-layer/interaction-add-section-button.d.ts +4 -0
- package/dist-types/edit-mode/interaction-layer/interaction-layer.d.ts +11 -0
- package/dist-types/edit-mode/interaction-layer/interaction-rect-actions.d.ts +9 -0
- package/dist-types/edit-mode/interaction-layer/interaction-rect-handles.d.ts +7 -0
- package/dist-types/edit-mode/interaction-layer/interaction-rect-name-pill.d.ts +13 -0
- package/dist-types/edit-mode/interaction-layer/interaction-rect.d.ts +49 -0
- package/dist-types/edit-mode/interaction-utils.d.ts +8 -0
- package/dist-types/edit-mode/mobx-sync/create-patch.d.ts +2 -0
- package/dist-types/edit-mode/mobx-sync/create-patch.test.d.ts +1 -0
- package/dist-types/edit-mode/mobx-sync/deep-observe.d.ts +24 -0
- package/dist-types/edit-mode/mobx-sync/mobx-editor-sync.d.ts +23 -0
- package/dist-types/edit-mode/mobx-sync/mobx-editor-sync.test.d.ts +1 -0
- package/dist-types/edit-mode/noop-editor-bridge.d.ts +1 -0
- package/dist-types/edit-mode/properties.d.ts +13 -0
- package/dist-types/edit-mode/resize-capabilities.d.ts +5 -0
- package/dist-types/edit-mode/right-click-menu/right-click-menu.d.ts +14 -0
- package/dist-types/edit-mode/roots.d.ts +19 -0
- package/dist-types/edit-mode/runtime-children.d.ts +14 -0
- package/dist-types/edit-mode/sb-component-from-meta.d.ts +2 -0
- package/dist-types/edit-mode/source-update-api.d.ts +19 -0
- package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +40 -0
- package/dist-types/edit-mode/vite.d.ts +4 -0
- package/dist-types/internal-testing/components/api.d.ts +3 -0
- package/dist-types/internal-testing/components/broken-app.d.ts +3 -0
- package/dist-types/internal-testing/components/button.d.ts +1 -0
- package/dist-types/internal-testing/components/checkbox.d.ts +1 -0
- package/dist-types/internal-testing/components/container.d.ts +1 -0
- package/dist-types/internal-testing/components/date-picker.d.ts +1 -0
- package/dist-types/internal-testing/components/dropdown.d.ts +1 -0
- package/dist-types/internal-testing/components/form.d.ts +1 -0
- package/dist-types/internal-testing/components/icon.d.ts +1 -0
- package/dist-types/internal-testing/components/image.d.ts +1 -0
- package/dist-types/internal-testing/components/import-error.d.ts +1 -0
- package/dist-types/internal-testing/components/input.d.ts +1 -0
- package/dist-types/internal-testing/components/key-value.d.ts +1 -0
- package/dist-types/internal-testing/components/modal.d.ts +3 -0
- package/dist-types/internal-testing/components/section-column.d.ts +1 -0
- package/dist-types/internal-testing/components/slideout.d.ts +3 -0
- package/dist-types/internal-testing/components/switch.d.ts +1 -0
- package/dist-types/internal-testing/components/table.d.ts +3 -0
- package/dist-types/internal-testing/components/timer.d.ts +3 -0
- package/dist-types/internal-testing/components/variable.d.ts +3 -0
- package/dist-types/internal-testing/utils.d.ts +5 -0
- package/dist-types/internal-testing/widgets.d.ts +2 -0
- package/dist-types/lib/hooks/use-alignment-styles.d.ts +9 -0
- package/dist-types/lib/hooks/use-cached-value.d.ts +11 -0
- package/dist-types/lib/hooks/use-callback-as-ref.d.ts +1 -0
- package/dist-types/lib/hooks/use-component-min-size.d.ts +29 -0
- package/dist-types/lib/hooks/use-deep-memo.d.ts +9 -0
- package/dist-types/lib/hooks/use-editor-hotkeys.d.ts +3 -0
- package/dist-types/lib/hooks/use-element-rect.d.ts +7 -0
- package/dist-types/lib/hooks/use-key-pressed.d.ts +1 -0
- package/dist-types/lib/hooks/use-observer-memo.d.ts +14 -0
- package/dist-types/lib/hooks/use-observer-memo.test.d.ts +1 -0
- package/dist-types/lib/hooks/use-pointer-down-outside.d.ts +15 -0
- package/dist-types/lib/hooks/use-stable-effect.d.ts +22 -0
- package/dist-types/lib/hooks/use-stable-effect.test.d.ts +1 -0
- package/dist-types/lib/index.d.ts +44 -0
- package/dist-types/lib/internal-details/actions-context.d.ts +9 -0
- package/dist-types/lib/internal-details/app-wrappers.d.ts +5 -0
- package/dist-types/lib/internal-details/component-info-context.d.ts +10 -0
- package/dist-types/lib/internal-details/component-suspense-style-context.d.ts +10 -0
- package/dist-types/lib/internal-details/css-constants.d.ts +4 -0
- package/dist-types/lib/internal-details/entities-state.d.ts +11 -0
- package/dist-types/lib/internal-details/entities.d.ts +5 -0
- package/dist-types/lib/internal-details/env.d.ts +1 -0
- package/dist-types/lib/internal-details/external-stack-child.d.ts +13 -0
- package/dist-types/lib/internal-details/identifier-normalizer.d.ts +8 -0
- package/dist-types/lib/internal-details/internal-components/common.d.ts +13 -0
- package/dist-types/lib/internal-details/internal-components/error-boundary/index.d.ts +18 -0
- package/dist-types/lib/internal-details/internal-components/route-load-error.d.ts +1 -0
- package/dist-types/lib/internal-details/is-edit-mode.d.ts +1 -0
- package/dist-types/lib/internal-details/is-sb-component.d.ts +11 -0
- package/dist-types/lib/internal-details/lib/devtools/devtools-consolidated.d.ts +5 -0
- package/dist-types/lib/internal-details/lib/devtools/index.d.ts +4 -0
- package/dist-types/lib/internal-details/lib/devtools/serialize-store-data.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +91 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts +6 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +22 -0
- package/dist-types/lib/internal-details/lib/evaluator/compute-engines.test.d.ts +6 -0
- package/dist-types/lib/internal-details/lib/evaluator/create-global-object.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/evaluator/create-scope-proxy.d.ts +3 -0
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +26 -0
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +96 -0
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/entity-types.d.ts +16 -0
- package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +8 -0
- package/dist-types/lib/internal-details/lib/evaluator/names.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/evaluator/sanitize-object.d.ts +6 -0
- package/dist-types/lib/internal-details/lib/evaluator/sanitize-object.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/suspense-helpers.d.ts +8 -0
- package/dist-types/lib/internal-details/lib/evaluator/suspense-helpers.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +36 -0
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.test.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/features/api-store.d.ts +51 -0
- package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +79 -0
- package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +62 -0
- package/dist-types/lib/internal-details/lib/features/injected-features.d.ts +8 -0
- package/dist-types/lib/internal-details/lib/features/name-manager.d.ts +38 -0
- package/dist-types/lib/internal-details/lib/features/type-defs-utils.d.ts +3 -0
- package/dist-types/lib/internal-details/lib/iframe.d.ts +44 -0
- package/dist-types/lib/internal-details/lib/mobx-cached-getter.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/resolve-id-singleton.d.ts +4 -0
- package/dist-types/lib/internal-details/lib/root-store.d.ts +35 -0
- package/dist-types/lib/internal-details/lib/suspense/suspense-fallback.d.ts +11 -0
- package/dist-types/lib/internal-details/lib/throttle.d.ts +4 -0
- package/dist-types/lib/internal-details/lib/types.d.ts +298 -0
- package/dist-types/lib/internal-details/location-store.d.ts +13 -0
- package/dist-types/lib/internal-details/reactive-component.d.ts +11 -0
- package/dist-types/lib/internal-details/remove-bindings.d.ts +1 -0
- package/dist-types/lib/internal-details/routing.d.ts +2 -0
- package/dist-types/lib/internal-details/sb-wrapper.d.ts +98 -0
- package/dist-types/lib/internal-details/sb-wrapper.test.d.ts +1 -0
- package/dist-types/lib/internal-details/scope/global.d.ts +11 -0
- package/dist-types/lib/internal-details/scope/scope-context.d.ts +8 -0
- package/dist-types/lib/internal-details/scope/scope.d.ts +12 -0
- package/dist-types/lib/internal-details/scope/types.d.ts +48 -0
- package/dist-types/lib/internal-details/size.d.ts +1 -0
- package/dist-types/lib/internal-details/theme-context.d.ts +8 -0
- package/dist-types/lib/internal-details/use-track-runtime-widget.d.ts +15 -0
- package/dist-types/lib/internal-details/utils/is-local-link.d.ts +1 -0
- package/dist-types/lib/internal-details/utils/navigation.d.ts +20 -0
- package/dist-types/lib/tracing/context-utils.d.ts +4 -0
- package/dist-types/lib/tracing/early-console-buffer.d.ts +21 -0
- package/dist-types/lib/tracing/logs.d.ts +11 -0
- package/dist-types/lib/triggers/base.d.ts +16 -0
- package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +12 -0
- package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +3 -0
- package/dist-types/lib/triggers/implementations/call-function.d.ts +15 -0
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +14 -0
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +14 -0
- package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +16 -0
- package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +16 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +12 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +14 -0
- package/dist-types/lib/triggers/implementations/navigate/utils.d.ts +2 -0
- package/dist-types/lib/triggers/implementations/run-js.d.ts +11 -0
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +13 -0
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +10 -0
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +14 -0
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +13 -0
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +13 -0
- package/dist-types/lib/triggers/registry.d.ts +5 -0
- package/dist-types/lib/triggers/run-event-handlers.d.ts +10 -0
- package/dist-types/lib/user-facing/component-base/components/autolinked-text.d.ts +8 -0
- package/dist-types/lib/user-facing/component-base/components/button.d.ts +47 -0
- package/dist-types/lib/user-facing/component-base/components/checkbox.d.ts +12 -0
- package/dist-types/lib/user-facing/component-base/components/dropdown-select.d.ts +4 -0
- package/dist-types/lib/user-facing/component-base/components/dynamic-svg.d.ts +10 -0
- package/dist-types/lib/user-facing/component-base/components/expand-button.d.ts +8 -0
- package/dist-types/lib/user-facing/component-base/components/loading-animator.d.ts +4 -0
- package/dist-types/lib/user-facing/component-base/components/plain-link.d.ts +1 -0
- package/dist-types/lib/user-facing/component-base/components/popper.d.ts +20 -0
- package/dist-types/lib/user-facing/component-base/components/search-component.d.ts +19 -0
- package/dist-types/lib/user-facing/component-base/components/span-trunc-middle.d.ts +9 -0
- package/dist-types/lib/user-facing/component-base/components/switch.d.ts +6 -0
- package/dist-types/lib/user-facing/component-base/components/video.d.ts +19 -0
- package/dist-types/lib/user-facing/component-base/constants.d.ts +18 -0
- package/dist-types/lib/user-facing/component-base/error/error-inline-message.d.ts +36 -0
- package/dist-types/lib/user-facing/component-base/error/error-tooltip.d.ts +11 -0
- package/dist-types/lib/user-facing/component-base/error/error-utils.d.ts +13 -0
- package/dist-types/lib/user-facing/component-base/error/widget-errors-wrapper.d.ts +15 -0
- package/dist-types/lib/user-facing/component-base/error-boundary.d.ts +18 -0
- package/dist-types/lib/user-facing/component-base/sb-component.d.ts +21 -0
- package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +8 -0
- package/dist-types/lib/user-facing/component-base/styles/hover-styles.d.ts +10 -0
- package/dist-types/lib/user-facing/component-base/styles/input-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/component-base/use-passthrough-props.d.ts +6 -0
- package/dist-types/lib/user-facing/component-base/utils/format-utils.d.ts +37 -0
- package/dist-types/lib/user-facing/component-base/utils/format-utils.test.d.ts +1 -0
- package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +20 -0
- package/dist-types/lib/user-facing/component-base/utils/input-validation.test.d.ts +1 -0
- package/dist-types/lib/user-facing/components/button/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/button/index.d.ts +81 -0
- package/dist-types/lib/user-facing/components/button/props.d.ts +46 -0
- package/dist-types/lib/user-facing/components/checkbox/checkbox-component.d.ts +9 -0
- package/dist-types/lib/user-facing/components/checkbox/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/checkbox/index.d.ts +93 -0
- package/dist-types/lib/user-facing/components/checkbox/props.d.ts +49 -0
- package/dist-types/lib/user-facing/components/checkbox/types.d.ts +19 -0
- package/dist-types/lib/user-facing/components/column/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/column/index.d.ts +73 -0
- package/dist-types/lib/user-facing/components/column/props.d.ts +36 -0
- package/dist-types/lib/user-facing/components/container/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/container/index.d.ts +88 -0
- package/dist-types/lib/user-facing/components/container/props.d.ts +46 -0
- package/dist-types/lib/user-facing/components/custom/context.d.ts +11 -0
- package/dist-types/lib/user-facing/components/custom/index.d.ts +1 -0
- package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +45 -0
- package/dist-types/lib/user-facing/components/date-picker/constants.d.ts +8 -0
- package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +36 -0
- package/dist-types/lib/user-facing/components/date-picker/date-picker.d.ts +2 -0
- package/dist-types/lib/user-facing/components/date-picker/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/date-picker/index.d.ts +141 -0
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +74 -0
- package/dist-types/lib/user-facing/components/date-picker/props.test-d.d.ts +1 -0
- package/dist-types/lib/user-facing/components/date-picker/side-effects.d.ts +3 -0
- package/dist-types/lib/user-facing/components/date-picker/types.d.ts +43 -0
- package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +35 -0
- package/dist-types/lib/user-facing/components/dropdown/constants.d.ts +5 -0
- package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +106 -0
- package/dist-types/lib/user-facing/components/dropdown/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/dropdown/index.d.ts +150 -0
- package/dist-types/lib/user-facing/components/dropdown/multi-dropdown.d.ts +18 -0
- package/dist-types/lib/user-facing/components/dropdown/normalize-values.d.ts +2 -0
- package/dist-types/lib/user-facing/components/dropdown/normalize-values.test.d.ts +1 -0
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +79 -0
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +88 -0
- package/dist-types/lib/user-facing/components/dropdown/utils.d.ts +8 -0
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-constraints.d.ts +26 -0
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-row-positions.d.ts +2 -0
- package/dist-types/lib/user-facing/components/grid/calculations/calculate-row-positions.test.d.ts +1 -0
- package/dist-types/lib/user-facing/components/grid/calculations/order-constraints.d.ts +2 -0
- package/dist-types/lib/user-facing/components/grid/index.d.ts +43 -0
- package/dist-types/lib/user-facing/components/grid/use-height-observer.d.ts +5 -0
- package/dist-types/lib/user-facing/components/icon/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/icon/index.d.ts +47 -0
- package/dist-types/lib/user-facing/components/icon/props.d.ts +28 -0
- package/dist-types/lib/user-facing/components/image/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/image/image-component.d.ts +40 -0
- package/dist-types/lib/user-facing/components/image/index.d.ts +65 -0
- package/dist-types/lib/user-facing/components/image/props.d.ts +43 -0
- package/dist-types/lib/user-facing/components/input/constants.d.ts +24 -0
- package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +4 -0
- package/dist-types/lib/user-facing/components/input/derived.test.d.ts +1 -0
- package/dist-types/lib/user-facing/components/input/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/input/index.d.ts +187 -0
- package/dist-types/lib/user-facing/components/input/input-component.d.ts +58 -0
- package/dist-types/lib/user-facing/components/input/props.d.ts +98 -0
- package/dist-types/lib/user-facing/components/input/styles.d.ts +6 -0
- package/dist-types/lib/user-facing/components/input/types.d.ts +45 -0
- package/dist-types/lib/user-facing/components/input/utils.d.ts +15 -0
- package/dist-types/lib/user-facing/components/input/utils.test.d.ts +1 -0
- package/dist-types/lib/user-facing/components/key-value/components/key-styles.d.ts +3 -0
- package/dist-types/lib/user-facing/components/key-value/components/property-key.d.ts +7 -0
- package/dist-types/lib/user-facing/components/key-value/components/property-value.d.ts +12 -0
- package/dist-types/lib/user-facing/components/key-value/components/value-styles.d.ts +6 -0
- package/dist-types/lib/user-facing/components/key-value/constants.d.ts +7 -0
- package/dist-types/lib/user-facing/components/key-value/derived-properties.d.ts +1 -0
- package/dist-types/lib/user-facing/components/key-value/editor.d.ts +3 -0
- package/dist-types/lib/user-facing/components/key-value/index.d.ts +6 -0
- package/dist-types/lib/user-facing/components/key-value/key-value-component.d.ts +2 -0
- package/dist-types/lib/user-facing/components/key-value/properties-props.d.ts +45 -0
- package/dist-types/lib/user-facing/components/key-value/props.d.ts +38 -0
- package/dist-types/lib/user-facing/components/key-value/styles.d.ts +22 -0
- package/dist-types/lib/user-facing/components/key-value/types.d.ts +106 -0
- package/dist-types/lib/user-facing/components/key-value/utils.d.ts +11 -0
- package/dist-types/lib/user-facing/components/modal/constants.d.ts +8 -0
- package/dist-types/lib/user-facing/components/modal/editor-config.d.ts +2 -0
- package/dist-types/lib/user-facing/components/modal/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/modal/index.d.ts +85 -0
- package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +37 -0
- package/dist-types/lib/user-facing/components/modal/props.d.ts +45 -0
- package/dist-types/lib/user-facing/components/page/editor.d.ts +2 -0
- package/dist-types/lib/user-facing/components/page/index.d.ts +39 -0
- package/dist-types/lib/user-facing/components/page/props.d.ts +22 -0
- package/dist-types/lib/user-facing/components/page/register-page.d.ts +3 -0
- package/dist-types/lib/user-facing/components/pixel-input/index.d.ts +7 -0
- package/dist-types/lib/user-facing/components/section/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/section/index.d.ts +49 -0
- package/dist-types/lib/user-facing/components/section/props.d.ts +28 -0
- package/dist-types/lib/user-facing/components/slideout/constants.d.ts +10 -0
- package/dist-types/lib/user-facing/components/slideout/editor-config.d.ts +2 -0
- package/dist-types/lib/user-facing/components/slideout/editor-template.d.ts +3 -0
- package/dist-types/lib/user-facing/components/slideout/index.d.ts +85 -0
- package/dist-types/lib/user-facing/components/slideout/props.d.ts +46 -0
- package/dist-types/lib/user-facing/components/slideout/slideout-component.d.ts +31 -0
- package/dist-types/lib/user-facing/components/stack/index.d.ts +69 -0
- package/dist-types/lib/user-facing/components/stack/styles.d.ts +11 -0
- package/dist-types/lib/user-facing/components/switch/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/switch/index.d.ts +95 -0
- package/dist-types/lib/user-facing/components/switch/props.d.ts +50 -0
- package/dist-types/lib/user-facing/components/switch/switch-component.d.ts +5 -0
- package/dist-types/lib/user-facing/components/switch/types.d.ts +19 -0
- package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +278 -0
- package/dist-types/lib/user-facing/components/table/components/autotooltip-component.d.ts +17 -0
- package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +16 -0
- package/dist-types/lib/user-facing/components/table/components/column-settings.d.ts +11 -0
- package/dist-types/lib/user-facing/components/table/components/edit-cell.d.ts +15 -0
- package/dist-types/lib/user-facing/components/table/components/edit-checkbox-cell.d.ts +11 -0
- package/dist-types/lib/user-facing/components/table/components/edit-date-cell.d.ts +12 -0
- package/dist-types/lib/user-facing/components/table/components/edit-input-cell.d.ts +14 -0
- package/dist-types/lib/user-facing/components/table/components/edit-multi-select-cell.d.ts +13 -0
- package/dist-types/lib/user-facing/components/table/components/edit-single-select-cell.d.ts +13 -0
- package/dist-types/lib/user-facing/components/table/components/edit-utils.d.ts +28 -0
- package/dist-types/lib/user-facing/components/table/components/editable-link-cell.d.ts +20 -0
- package/dist-types/lib/user-facing/components/table/components/filter-popover-content.d.ts +37 -0
- package/dist-types/lib/user-facing/components/table/components/popover-video.d.ts +5 -0
- package/dist-types/lib/user-facing/components/table/components/table-action-icon.d.ts +13 -0
- package/dist-types/lib/user-facing/components/table/components/table-column-header-button.d.ts +19 -0
- package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +15 -0
- package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +40 -0
- package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +63 -0
- package/dist-types/lib/user-facing/components/table/components/table-loading-state.d.ts +11 -0
- package/dist-types/lib/user-facing/components/table/components/table-pagination-input.d.ts +10 -0
- package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +18 -0
- package/dist-types/lib/user-facing/components/table/components/table-row-context-menu.d.ts +17 -0
- package/dist-types/lib/user-facing/components/table/components/table-tag.d.ts +25 -0
- package/dist-types/lib/user-facing/components/table/constants.d.ts +91 -0
- package/dist-types/lib/user-facing/components/table/default-table-data.d.ts +71 -0
- package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +20 -0
- package/dist-types/lib/user-facing/components/table/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/table/index.d.ts +721 -0
- package/dist-types/lib/user-facing/components/table/props.d.ts +364 -0
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +101 -0
- package/dist-types/lib/user-facing/components/table/table-manager.d.ts +23 -0
- package/dist-types/lib/user-facing/components/table/table-styles.d.ts +73 -0
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +148 -0
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +149 -0
- package/dist-types/lib/user-facing/components/table/types.d.ts +447 -0
- package/dist-types/lib/user-facing/components/table/use-sticky.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/utils.d.ts +2 -0
- package/dist-types/lib/user-facing/components/text/editor.d.ts +5 -0
- package/dist-types/lib/user-facing/components/text/index.d.ts +111 -0
- package/dist-types/lib/user-facing/components/text/long-text-button.d.ts +8 -0
- package/dist-types/lib/user-facing/components/text/props.d.ts +67 -0
- package/dist-types/lib/user-facing/components/text/styles.d.ts +2 -0
- package/dist-types/lib/user-facing/components/text/utils.d.ts +26 -0
- package/dist-types/lib/user-facing/constants.d.ts +2 -0
- package/dist-types/lib/user-facing/entities/api/index.d.ts +14 -0
- package/dist-types/lib/user-facing/entities/api/props.d.ts +29 -0
- package/dist-types/lib/user-facing/entities/api/props.test.d.ts +1 -0
- package/dist-types/lib/user-facing/entities/api/suspensible-api.d.ts +21 -0
- package/dist-types/lib/user-facing/entities/timer/index.d.ts +16 -0
- package/dist-types/lib/user-facing/entities/timer/props.d.ts +19 -0
- package/dist-types/lib/user-facing/entities/variable/index.d.ts +14 -0
- package/dist-types/lib/user-facing/entities/variable/props.d.ts +13 -0
- package/dist-types/lib/user-facing/error-pages/constants.d.ts +10 -0
- package/dist-types/lib/user-facing/error-pages/error-component.d.ts +17 -0
- package/dist-types/lib/user-facing/error-pages/page-not-found.d.ts +10 -0
- package/dist-types/lib/user-facing/event-flow.d.ts +107 -0
- package/dist-types/lib/user-facing/event-flow.test.d.ts +1 -0
- package/dist-types/lib/user-facing/global-functions.d.ts +25 -0
- package/dist-types/lib/user-facing/hooks/use-dialog-editing.d.ts +14 -0
- package/dist-types/lib/user-facing/hooks/use-editor.d.ts +42 -0
- package/dist-types/lib/user-facing/hooks/use-theme.d.ts +3 -0
- package/dist-types/lib/user-facing/hooks/use-update-properties.d.ts +1 -0
- package/dist-types/lib/user-facing/icons/constants.d.ts +8 -0
- package/dist-types/lib/user-facing/icons/encoded.d.ts +1 -0
- package/dist-types/lib/user-facing/icons/helpers.d.ts +21 -0
- package/dist-types/lib/user-facing/icons/index.d.ts +2 -0
- package/dist-types/lib/user-facing/internal-index.d.ts +4 -0
- package/dist-types/lib/user-facing/layers.d.ts +42 -0
- package/dist-types/lib/user-facing/properties-panel/constants.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +9 -0
- package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.test.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/helpers.test.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +24 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +8 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +44 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +129 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/loading.d.ts +2 -0
- package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +5 -0
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +308 -0
- package/dist-types/lib/user-facing/properties-panel/props-builder.test-d.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/props-builder.test.d.ts +1 -0
- package/dist-types/lib/user-facing/properties-panel/props-panel-utils.d.ts +3 -0
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +34 -0
- package/dist-types/lib/user-facing/sb-provider.d.ts +11 -0
- package/dist-types/lib/user-facing/state/computed.d.ts +2 -0
- package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +4 -0
- package/dist-types/lib/user-facing/state/create-scope.d.ts +17 -0
- package/dist-types/lib/user-facing/state/types.d.ts +10 -0
- package/dist-types/lib/user-facing/styling/color-utils.d.ts +13 -0
- package/dist-types/lib/user-facing/styling/colors.d.ts +67 -0
- package/dist-types/lib/user-facing/styling/style-as-class.d.ts +1 -0
- package/dist-types/lib/user-facing/styling/styles.d.ts +4 -0
- package/dist-types/lib/user-facing/styling/widget-label-styles.d.ts +11 -0
- package/dist-types/lib/user-facing/themes/classnames.d.ts +72 -0
- package/dist-types/lib/user-facing/themes/constants.d.ts +87 -0
- package/dist-types/lib/user-facing/themes/default-theme.d.ts +8 -0
- package/dist-types/lib/user-facing/themes/generate-border-css.d.ts +25 -0
- package/dist-types/lib/user-facing/themes/generate-border-styles.d.ts +15 -0
- package/dist-types/lib/user-facing/themes/generate-class-name.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generate-colors.d.ts +45 -0
- package/dist-types/lib/user-facing/themes/generate-colors.test.d.ts +1 -0
- package/dist-types/lib/user-facing/themes/generate-theme.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/generate-typographies.d.ts +5 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/button-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/container-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/datepicker-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/dropdown-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/editor-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/generate-component-styles.d.ts +16 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/generate-padding-style.d.ts +19 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/icon-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/input-styles.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/paginator-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/popper-styles.d.ts +2 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/styles-utils.d.ts +1 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/text-styles.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/theme-styles.d.ts +5 -0
- package/dist-types/lib/user-facing/themes/generatedStyles/utils.d.ts +23 -0
- package/dist-types/lib/user-facing/themes/index.d.ts +5 -0
- package/dist-types/lib/user-facing/themes/layers.d.ts +6 -0
- package/dist-types/lib/user-facing/themes/padding-constants.d.ts +10 -0
- package/dist-types/lib/user-facing/themes/typeface-constants.d.ts +3 -0
- package/dist-types/lib/user-facing/themes/typefaces/utils.d.ts +28 -0
- package/dist-types/lib/user-facing/themes/typefaces/utils.test.d.ts +1 -0
- package/dist-types/lib/user-facing/themes/typeography/typography-utils.d.ts +33 -0
- package/dist-types/lib/user-facing/themes/typeography/typography-utils.test.d.ts +1 -0
- package/dist-types/lib/user-facing/themes/typeography/use-typography-styling.d.ts +15 -0
- package/dist-types/lib/user-facing/themes/typography-constants.d.ts +34 -0
- package/dist-types/lib/user-facing/themes/utils.d.ts +15 -0
- package/dist-types/lib/user-facing/types.d.ts +17 -0
- package/dist-types/lib/user-facing/utils/create-svg-data-uri.d.ts +9 -0
- package/dist-types/lib/user-facing/utils/form.d.ts +10 -0
- package/dist-types/lib/user-facing/utils/notification.d.ts +16 -0
- package/dist-types/lib/utils/children.d.ts +3 -0
- package/dist-types/lib/utils/clean-object.d.ts +5 -0
- package/dist-types/lib/utils/clean-object.test.d.ts +1 -0
- package/dist-types/lib/utils/fast-clone.d.ts +1 -0
- package/dist-types/lib/utils/generate-id.d.ts +1 -0
- package/dist-types/lib/utils/get-component-layout.d.ts +3 -0
- package/dist-types/lib/utils/is-component-grid.d.ts +2 -0
- package/dist-types/lib/utils/is-component-stacklike.d.ts +2 -0
- package/dist-types/lib/utils/is-component-type-detached.d.ts +1 -0
- package/dist-types/lib/utils/is-component-vstack.d.ts +2 -0
- package/dist-types/lib/utils/keyboard-shortcuts.d.ts +3 -0
- package/dist-types/lib/utils/shallow-equal.d.ts +1 -0
- package/dist-types/lib/utils/widget-wrapper-naming.d.ts +6 -0
- package/dist-types/lib/utils.d.ts +4 -0
- package/dist-types/main.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
|
+
declare class InteractionLayerManager {
|
|
3
|
+
/**
|
|
4
|
+
* The id of the root element that is currently being interacted with
|
|
5
|
+
* the root can be Page, Modal or Slideout
|
|
6
|
+
* If set to undefined, the interaction layer will be the Page
|
|
7
|
+
* if set to the detached component id, the inteactoin layer will be disabled on the page
|
|
8
|
+
*/
|
|
9
|
+
activeRootInstanceId: SbInstance | undefined;
|
|
10
|
+
sourceIdElements: Map<`I-${string}`, {
|
|
11
|
+
sourceId: SbElement;
|
|
12
|
+
element: HTMLElement;
|
|
13
|
+
}>;
|
|
14
|
+
constructor();
|
|
15
|
+
setActiveRootInstanceId(rootInstanceId: SbInstance | undefined): void;
|
|
16
|
+
setSourceIdElement(el: HTMLElement, sourceId: SbElement): undefined | SbInstance;
|
|
17
|
+
removeSourceIdElement(instanceId: SbInstance): void;
|
|
18
|
+
getSourceIdElements(sourceId: SbElement): Array<{
|
|
19
|
+
element: HTMLElement;
|
|
20
|
+
instanceId: SbInstance;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export default InteractionLayerManager;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { CreateRequest, DeleteRequest, EditOperationPayload, EditOperations, EditOperationType, PropertyInfo, ReparentRequest, SbElement, SetPropertiesRequest, SetPropertyRequest, SourceLocation } from "@superblocksteam/library-shared/types";
|
|
2
|
+
type OptimisticOperation<P> = {
|
|
3
|
+
type: keyof EditOperations;
|
|
4
|
+
payload: P;
|
|
5
|
+
id: string;
|
|
6
|
+
callback?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type ReparentTransaction = OptimisticOperation<ReparentRequest>;
|
|
9
|
+
type SetPropertiesTransaction = OptimisticOperation<SetPropertiesRequest>;
|
|
10
|
+
type SetPropertyTransaction = OptimisticOperation<SetPropertyRequest>;
|
|
11
|
+
type CreateComponentTransaction = OptimisticOperation<CreateRequest>;
|
|
12
|
+
type DeleteComponentsTransaction = OptimisticOperation<DeleteRequest>;
|
|
13
|
+
type PendingTransaction = ReparentTransaction | SetPropertiesTransaction | SetPropertyTransaction | CreateComponentTransaction | DeleteComponentsTransaction;
|
|
14
|
+
declare class OperationManager {
|
|
15
|
+
private pendingTransactions;
|
|
16
|
+
private waitingForBatch;
|
|
17
|
+
private batchOperations;
|
|
18
|
+
private batchOperationTransactionId;
|
|
19
|
+
visibleSourceIds: string[];
|
|
20
|
+
constructor();
|
|
21
|
+
get allPendingTransactions(): PendingTransaction[];
|
|
22
|
+
get pendingReparentOperations(): ReparentTransaction[];
|
|
23
|
+
get pendingDeleteOperations(): DeleteComponentsTransaction[];
|
|
24
|
+
get pendingSetPropertiesOperations(): SetPropertiesTransaction[];
|
|
25
|
+
get hasPendingOperations(): boolean;
|
|
26
|
+
get allNames(): never[];
|
|
27
|
+
private executeOrAddToBatch;
|
|
28
|
+
private addPendingTransaction;
|
|
29
|
+
clearPendingTransactions(transactionIds: string[]): void;
|
|
30
|
+
batchUpdate(performOperations: () => void): void;
|
|
31
|
+
createComponent(payload: CreateRequest): void;
|
|
32
|
+
dropComponent(action: {
|
|
33
|
+
from: {
|
|
34
|
+
source: SourceLocation;
|
|
35
|
+
};
|
|
36
|
+
to: {
|
|
37
|
+
source: SourceLocation;
|
|
38
|
+
};
|
|
39
|
+
propsToChange?: Record<string, PropertyInfo>;
|
|
40
|
+
}): void;
|
|
41
|
+
deleteComponents(sourceIds: SbElement[]): void;
|
|
42
|
+
acknowledgeEditOperation(operation: EditOperationPayload<EditOperationType>): void;
|
|
43
|
+
writeRuntimeProperties(sourceId: SbElement, transactionId: string, updates: Record<string, PropertyInfo<unknown>>): void;
|
|
44
|
+
setWidgetProperties({ sourceId, properties, callback, }: {
|
|
45
|
+
sourceId: SbElement;
|
|
46
|
+
properties: Record<string, PropertyInfo<unknown>>;
|
|
47
|
+
callback?: () => void;
|
|
48
|
+
}): void;
|
|
49
|
+
setWidgetProperty({ sourceId, property, value, callback, }: {
|
|
50
|
+
sourceId: SbElement;
|
|
51
|
+
property: string;
|
|
52
|
+
value: PropertyInfo<unknown>;
|
|
53
|
+
callback?: () => void;
|
|
54
|
+
}): void;
|
|
55
|
+
renameWidget(params: {
|
|
56
|
+
sourceId: SbElement;
|
|
57
|
+
newName: string;
|
|
58
|
+
renameInAst?: boolean;
|
|
59
|
+
}): void;
|
|
60
|
+
ensureFilesSynced(): Promise<void>;
|
|
61
|
+
generateSourceId(): `SB-${string}`;
|
|
62
|
+
private canDeleteComponents;
|
|
63
|
+
}
|
|
64
|
+
export default OperationManager;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type PropertyInfo, type SbElement, type SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { EditStore } from "../edit-store.js";
|
|
3
|
+
import type RuntimeEntitiesManager from "./runtime-entities-manager.js";
|
|
4
|
+
import type { IEntityManager } from "../../lib/internal-details/lib/evaluator/base-entity-manager.js";
|
|
5
|
+
import type { ComponentRegistry } from "../../lib/internal-details/lib/features/component-registry.js";
|
|
6
|
+
import type { Prop, PropertiesDefinition } from "../../lib/user-facing/properties-panel/props-builder.js";
|
|
7
|
+
import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
|
|
8
|
+
declare class PropertiesPanelManager {
|
|
9
|
+
readonly editStore: EditStore;
|
|
10
|
+
readonly runtimeEntitiesManager: RuntimeEntitiesManager;
|
|
11
|
+
readonly entityManager: IEntityManager;
|
|
12
|
+
readonly componentsManager: ComponentRegistry;
|
|
13
|
+
private propertiesDefinitions;
|
|
14
|
+
private propertiesPanelTrackerDisposer;
|
|
15
|
+
private nonDynamicPropertyPanels;
|
|
16
|
+
private _propertyLookupCache;
|
|
17
|
+
private removeHotReloadListener;
|
|
18
|
+
constructor(editStore: EditStore, runtimeEntitiesManager: RuntimeEntitiesManager, entityManager: IEntityManager, componentsManager: ComponentRegistry);
|
|
19
|
+
getPropertiesPanel(scopeId: string, instanceId: SbInstance): PropertiesPanelDefinition;
|
|
20
|
+
trackPropertiesPanel(scopeId: string, instanceId: SbInstance, sourceId: string): void;
|
|
21
|
+
untrackPropertiesPanel(): void;
|
|
22
|
+
getPropertiesDefinition(type: string): PropertiesDefinition | undefined;
|
|
23
|
+
setPropertiesDefinition(widgetType: string, propertiesDefinition: PropertiesDefinition): void;
|
|
24
|
+
updatePropertiesDefinitionForType(type: string): void;
|
|
25
|
+
getNonDynamicPropertiesPanels(): {
|
|
26
|
+
[k: string]: PropertiesPanelDefinition;
|
|
27
|
+
};
|
|
28
|
+
computeSideEffectsForPropertyUpdate(payload: {
|
|
29
|
+
sourceId: SbElement;
|
|
30
|
+
updates: Record<string, PropertyInfo<unknown>>;
|
|
31
|
+
}): Record<`SB-${string}`, {
|
|
32
|
+
props?: Record<string, PropertyInfo<unknown>>;
|
|
33
|
+
meta?: Record<string, unknown>;
|
|
34
|
+
}>;
|
|
35
|
+
private cachedPropertyLookupForType;
|
|
36
|
+
getPropertyForPath(widgetType: string, path: string): Prop<any, any, undefined> | null;
|
|
37
|
+
/**
|
|
38
|
+
* When a custom component's source code is updated, we want to update the properties definition for that component.
|
|
39
|
+
* In order to do that, we need to listen to vite's hot reload events. We can't put import.meta.hot calls in the library
|
|
40
|
+
* because Vite just compiled all of those out in library builds, so we inject a listener from the plugin instead.
|
|
41
|
+
* https://github.com/vitejs/vite/blob/v6.2/packages/vite/src/node/plugins/define.ts#L37
|
|
42
|
+
*/
|
|
43
|
+
private attachHotReloadListener;
|
|
44
|
+
}
|
|
45
|
+
export default PropertiesPanelManager;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Dim } from "@superblocksteam/library-shared";
|
|
2
|
+
import type { RootStore } from "../../lib/internal-details/lib/root-store.js";
|
|
3
|
+
import type { SbElement, SbInstance, Padding } from "@superblocksteam/library-shared/types";
|
|
4
|
+
type GU = {
|
|
5
|
+
xGU: number;
|
|
6
|
+
yGU: number;
|
|
7
|
+
widthGU: number;
|
|
8
|
+
heightGU: number;
|
|
9
|
+
};
|
|
10
|
+
type ResizeState = {
|
|
11
|
+
instanceId: SbInstance;
|
|
12
|
+
sourceId: SbElement;
|
|
13
|
+
dragStartX: number;
|
|
14
|
+
dragStartY: number;
|
|
15
|
+
start: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
marginLeft: number;
|
|
19
|
+
marginTop: number;
|
|
20
|
+
};
|
|
21
|
+
resizedPosition: string;
|
|
22
|
+
widthToUpdate: Dim | null;
|
|
23
|
+
marginLeftToUpdate: Dim | null;
|
|
24
|
+
heightToUpdate: Dim | null;
|
|
25
|
+
marginTopToUpdate: Dim | null;
|
|
26
|
+
gridUnitWidth: number;
|
|
27
|
+
gridUnitHeight: number;
|
|
28
|
+
potentialCollisions: Record<SbInstance, GU>;
|
|
29
|
+
widgetGU: GU | null;
|
|
30
|
+
isApplyingResize: boolean;
|
|
31
|
+
parentPadding?: Padding;
|
|
32
|
+
};
|
|
33
|
+
export declare class ResizingManager {
|
|
34
|
+
private root;
|
|
35
|
+
private _activeResizes;
|
|
36
|
+
constructor(root: RootStore);
|
|
37
|
+
get activeResize(): ResizeState | null | undefined;
|
|
38
|
+
startResizing(dragStartX: number, dragStartY: number, instanceId: SbInstance, position: string): void;
|
|
39
|
+
private calculatePotentialCollisions;
|
|
40
|
+
private calculateDimension;
|
|
41
|
+
private handleResizeDimension;
|
|
42
|
+
private isColliding;
|
|
43
|
+
resizeWidget(currentX: number, currentY: number, instanceId: SbInstance, canResizeWidth: boolean, canResizeHeight: boolean): void;
|
|
44
|
+
pendingResize(sourceId: SbElement): {
|
|
45
|
+
width: Dim | null;
|
|
46
|
+
height: Dim | null;
|
|
47
|
+
marginLeft: Dim | null;
|
|
48
|
+
marginTop: Dim | null;
|
|
49
|
+
} | null;
|
|
50
|
+
get hasAnyPendingResize(): boolean;
|
|
51
|
+
get pendingResizes(): ResizeState[];
|
|
52
|
+
applyResize(instanceId: SbInstance): void;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import RuntimeWidgetsManager from "./runtime-widgets-manager.js";
|
|
2
|
+
import type { ChildElement, RuntimeWidgetMeta } from "./runtime-widgets-manager.js";
|
|
3
|
+
import type { IEntityManager } from "../../lib/internal-details/lib/evaluator/base-entity-manager.js";
|
|
4
|
+
import type { IdentifierInfo, NameManager } from "../../lib/internal-details/lib/features/name-manager.js";
|
|
5
|
+
import type { CreateRequest, DeleteRequest, SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
6
|
+
declare class RuntimeEntitiesManager {
|
|
7
|
+
readonly nameManager: NameManager;
|
|
8
|
+
readonly entityManager: IEntityManager;
|
|
9
|
+
widgets: RuntimeWidgetsManager;
|
|
10
|
+
entitiesWithLocalBindings: Set<string>;
|
|
11
|
+
constructor(nameManager: NameManager, entityManager: IEntityManager);
|
|
12
|
+
processRootWidget(params: {
|
|
13
|
+
rootIdentifier: IdentifierInfo;
|
|
14
|
+
rootProps: Record<string, unknown>;
|
|
15
|
+
rootType: string;
|
|
16
|
+
fallbackScopeId: string;
|
|
17
|
+
isInCustomComponent: boolean;
|
|
18
|
+
parentInstanceId?: SbInstance;
|
|
19
|
+
}): void;
|
|
20
|
+
addOptimisticCreateWidget(createRequest: CreateRequest): void;
|
|
21
|
+
private getOptimisticWidgetMeta;
|
|
22
|
+
getEditorWidgetMeta(instanceId: SbInstance): RuntimeWidgetMeta | undefined;
|
|
23
|
+
getEditorWidgetSourceId(instanceId: SbInstance): `SB-${string}` | undefined;
|
|
24
|
+
getEditorWidgetScopeId(instanceId: SbInstance): string | undefined;
|
|
25
|
+
getAnyEditorWidgetMeta(sourceId: SbElement): RuntimeWidgetMeta | undefined;
|
|
26
|
+
getEditorWidgetName(instanceId: SbInstance): string | undefined;
|
|
27
|
+
getEditorWidgetType(instanceId: SbInstance): string | undefined;
|
|
28
|
+
getEditorWidgetChildrenMeta(instanceId: SbInstance): Array<RuntimeWidgetMeta>;
|
|
29
|
+
setEntitiesWithLocalBindings(entities: string[]): void;
|
|
30
|
+
doesEntityHaveLocalBindings(entity: SbInstance): boolean;
|
|
31
|
+
private getOptimisticWidgetChildrenIds;
|
|
32
|
+
private getParentSourceId;
|
|
33
|
+
private get relevantChildrenOperationsMap();
|
|
34
|
+
private getChildrenWithOptimisticUpdates;
|
|
35
|
+
getEditorWidgetChildren(instanceId: SbInstance): ChildElement[];
|
|
36
|
+
hasEditOperationsPending(): boolean;
|
|
37
|
+
getPendingOperations(): ({
|
|
38
|
+
instanceId: SbInstance;
|
|
39
|
+
sourceId: SbElement;
|
|
40
|
+
dragStartX: number;
|
|
41
|
+
dragStartY: number;
|
|
42
|
+
start: {
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
marginLeft: number;
|
|
46
|
+
marginTop: number;
|
|
47
|
+
};
|
|
48
|
+
resizedPosition: string;
|
|
49
|
+
widthToUpdate: import("@superblocksteam/library-shared").Dim | null;
|
|
50
|
+
marginLeftToUpdate: import("@superblocksteam/library-shared").Dim | null;
|
|
51
|
+
heightToUpdate: import("@superblocksteam/library-shared").Dim | null;
|
|
52
|
+
marginTopToUpdate: import("@superblocksteam/library-shared").Dim | null;
|
|
53
|
+
gridUnitWidth: number;
|
|
54
|
+
gridUnitHeight: number;
|
|
55
|
+
potentialCollisions: Record<SbInstance, {
|
|
56
|
+
xGU: number;
|
|
57
|
+
yGU: number;
|
|
58
|
+
widthGU: number;
|
|
59
|
+
heightGU: number;
|
|
60
|
+
}>;
|
|
61
|
+
widgetGU: {
|
|
62
|
+
xGU: number;
|
|
63
|
+
yGU: number;
|
|
64
|
+
widthGU: number;
|
|
65
|
+
heightGU: number;
|
|
66
|
+
} | null;
|
|
67
|
+
isApplyingResize: boolean;
|
|
68
|
+
parentPadding?: import("@superblocksteam/library-shared/types").Padding;
|
|
69
|
+
} | (import("./operation-store.js").ReparentTransaction | {
|
|
70
|
+
type: keyof import("@superblocksteam/library-shared/types").EditOperations;
|
|
71
|
+
payload: import("@superblocksteam/library-shared/types").SetPropertiesRequest;
|
|
72
|
+
id: string;
|
|
73
|
+
callback?: () => void;
|
|
74
|
+
} | {
|
|
75
|
+
type: keyof import("@superblocksteam/library-shared/types").EditOperations;
|
|
76
|
+
payload: import("@superblocksteam/library-shared/types").SetPropertyRequest;
|
|
77
|
+
id: string;
|
|
78
|
+
callback?: () => void;
|
|
79
|
+
} | {
|
|
80
|
+
type: keyof import("@superblocksteam/library-shared/types").EditOperations;
|
|
81
|
+
payload: CreateRequest;
|
|
82
|
+
id: string;
|
|
83
|
+
callback?: () => void;
|
|
84
|
+
} | {
|
|
85
|
+
type: keyof import("@superblocksteam/library-shared/types").EditOperations;
|
|
86
|
+
payload: DeleteRequest;
|
|
87
|
+
id: string;
|
|
88
|
+
callback?: () => void;
|
|
89
|
+
}))[];
|
|
90
|
+
getScopeIdForSourceId(sourceId: SbElement): string | undefined;
|
|
91
|
+
applySideEffects(changes: Record<string, Record<string, unknown>>, scopeId: string): void;
|
|
92
|
+
isChildOf(childId: SbInstance, parentId: SbInstance): boolean;
|
|
93
|
+
getClosestAncestorByType(id: SbInstance, type: string): RuntimeWidgetMeta | undefined;
|
|
94
|
+
}
|
|
95
|
+
export default RuntimeEntitiesManager;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Name } from "../../lib/internal-details/lib/evaluator/names.js";
|
|
3
|
+
import type { IdentifierInfo, NameManager } from "../../lib/internal-details/lib/features/name-manager.js";
|
|
4
|
+
import type { CreateRequest, SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
5
|
+
import type { ReactNode } from "react";
|
|
6
|
+
export type ChildFunction = React.FunctionComponent;
|
|
7
|
+
export type ChildElement = {
|
|
8
|
+
isSupportedElement: true;
|
|
9
|
+
isSbComponent: boolean;
|
|
10
|
+
value: SbInstance;
|
|
11
|
+
} | {
|
|
12
|
+
isSupportedElement: false;
|
|
13
|
+
isSbComponent: false;
|
|
14
|
+
value: ChildFunction;
|
|
15
|
+
};
|
|
16
|
+
export type RuntimeWidgetMeta = {
|
|
17
|
+
instanceId: SbInstance;
|
|
18
|
+
sourceId: SbElement;
|
|
19
|
+
rootInstanceId: SbInstance;
|
|
20
|
+
isSbComponent: boolean;
|
|
21
|
+
isInCustomComponent: boolean;
|
|
22
|
+
isOptimistic: boolean;
|
|
23
|
+
node?: ReactNode;
|
|
24
|
+
scopeId?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
name?: Name;
|
|
27
|
+
props?: Record<string, unknown>;
|
|
28
|
+
children?: ChildElement[];
|
|
29
|
+
parentInstanceId?: SbInstance;
|
|
30
|
+
isUnmounted?: boolean;
|
|
31
|
+
};
|
|
32
|
+
declare class RuntimeWidgetsManager {
|
|
33
|
+
readonly nameManager: NameManager;
|
|
34
|
+
private widgets;
|
|
35
|
+
private sourceIdCount;
|
|
36
|
+
private sourceToInstanceIdSample;
|
|
37
|
+
constructor(nameManager: NameManager);
|
|
38
|
+
private setWidgetMeta;
|
|
39
|
+
getAnyInstanceIdForSourceId(sourceId: SbElement): `I-${string}`;
|
|
40
|
+
getAllInstanceIdsForSourceId(sourceId: SbElement): `I-${string}`[];
|
|
41
|
+
getSourceIdForInstanceId(instanceId: SbInstance): `SB-${string}`;
|
|
42
|
+
processRoot(params: {
|
|
43
|
+
rootIdentifier: IdentifierInfo;
|
|
44
|
+
rootProps: Record<string, unknown>;
|
|
45
|
+
rootType: string;
|
|
46
|
+
isInCustomComponent: boolean;
|
|
47
|
+
fallbackScopeId: string;
|
|
48
|
+
parentInstanceId?: SbInstance;
|
|
49
|
+
}): void;
|
|
50
|
+
addWidgetFromPayload(details: {
|
|
51
|
+
rootInstanceId: SbInstance;
|
|
52
|
+
parentInstanceId: SbInstance;
|
|
53
|
+
}, createRequest: CreateRequest): void;
|
|
54
|
+
getMeta(id: SbInstance): RuntimeWidgetMeta | undefined;
|
|
55
|
+
getSourceIdCount(sourceId: SbElement): number;
|
|
56
|
+
isChildOf(childId: SbInstance, parentId: SbInstance): boolean;
|
|
57
|
+
getClosestAncestorByType(instanceId: SbInstance, type: string): RuntimeWidgetMeta | undefined;
|
|
58
|
+
}
|
|
59
|
+
export default RuntimeWidgetsManager;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DragAndDropManager } from "./drag-and-drop-store.js";
|
|
2
|
+
import { ResizingManager } from "./resizing-store.js";
|
|
3
|
+
import type { RootStore } from "../../lib/internal-details/lib/root-store.js";
|
|
4
|
+
import type { EditStore } from "../edit-store.js";
|
|
5
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
6
|
+
declare class UIStore {
|
|
7
|
+
readonly root: RootStore;
|
|
8
|
+
readonly editStore: EditStore;
|
|
9
|
+
dnd: DragAndDropManager;
|
|
10
|
+
resizing: ResizingManager;
|
|
11
|
+
private _selectedSourceIds;
|
|
12
|
+
private _selectedInstanceIds;
|
|
13
|
+
private _focusedSourceId;
|
|
14
|
+
private _focusedInstanceId;
|
|
15
|
+
private _rootInstanceData;
|
|
16
|
+
private newComponentSelectPromise;
|
|
17
|
+
constructor(root: RootStore, editStore: EditStore);
|
|
18
|
+
isSourceSelected(sourceId: SbElement): boolean;
|
|
19
|
+
isInstanceSelected(instanceId: SbInstance): boolean;
|
|
20
|
+
isSourceFocused(sourceId: SbElement): boolean;
|
|
21
|
+
isInstanceFocused(instanceId: SbInstance): boolean;
|
|
22
|
+
getSelectedSourceIds(): SbElement[];
|
|
23
|
+
getSelectedInstanceIds(): SbInstance[];
|
|
24
|
+
getRootDataByInstanceId(instanceId: SbInstance): {
|
|
25
|
+
sourceId: SbElement;
|
|
26
|
+
isPageRoot: boolean;
|
|
27
|
+
} | undefined;
|
|
28
|
+
addRootInstanceId(instanceId: SbInstance, sourceId: SbElement, isPageRoot: boolean): void;
|
|
29
|
+
removeRootInstanceId(instanceId: SbInstance): void;
|
|
30
|
+
isInstancePageRoot(instanceId: SbInstance): boolean | undefined;
|
|
31
|
+
private get focusedSourceId();
|
|
32
|
+
private get focusedInstanceId();
|
|
33
|
+
getFocusedSourceId(): SbElement | null;
|
|
34
|
+
getFocusedInstanceId(): SbInstance | null;
|
|
35
|
+
setSelectedSourceIds(sourceIds: SbElement[]): void;
|
|
36
|
+
setSelectedInstanceIds(ids: SbInstance[]): void;
|
|
37
|
+
setFocusedInstanceId(instanceId: SbInstance | null): void;
|
|
38
|
+
setFocusedSourceId(sourceId: SbElement | null): void;
|
|
39
|
+
selectWidget(instanceId: SbInstance | null, _addToSelection?: boolean): void;
|
|
40
|
+
/**
|
|
41
|
+
* This is cursed because component selection actually needs to be done by instance ids, but
|
|
42
|
+
* instance IDs are only guaranteed to be stable after the component is rendered, while source IDs
|
|
43
|
+
* are assigned by the source tracker.
|
|
44
|
+
*
|
|
45
|
+
* If _any_ other selection comes in before we select something, we will cancel this reaction
|
|
46
|
+
*/
|
|
47
|
+
selectNewComponentBySourceId(sourceId: SbElement, instanceIdsToIgnore?: Set<`I-${string}`>): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
export default UIStore;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IdentifierInfo } from "../lib/internal-details/lib/features/name-manager";
|
|
2
|
+
export declare function useParentIdentifier(): IdentifierInfo | null | undefined;
|
|
3
|
+
export declare function ParentIdentifierProvider({ identifier, children, }: {
|
|
4
|
+
identifier: IdentifierInfo;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const FullPageSpinner: import("styled-components").StyledComponent<React.FC<import("@blueprintjs/core").SpinnerProps<HTMLElement>>, any, {}, never>;
|
|
3
|
+
declare const Auth0Wrapper: (props: React.PropsWithChildren) => React.JSX.Element;
|
|
4
|
+
declare const EmbedWrapper: (props: React.PropsWithChildren) => React.JSX.Element;
|
|
5
|
+
export { EmbedWrapper, Auth0Wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImportErrorNotification: import("react").FunctionComponent<object>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export type RootType = "Page" | "Modal" | "Slideout";
|
|
4
|
+
declare const InteractionLayer: ((props: {
|
|
5
|
+
rootType: RootType;
|
|
6
|
+
rootInstanceId: SbInstance;
|
|
7
|
+
rootName?: string;
|
|
8
|
+
}) => React.JSX.Element | null) & {
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default InteractionLayer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export declare function InteractionRectActions(props: {
|
|
3
|
+
instanceId: SbInstance;
|
|
4
|
+
displayName: string;
|
|
5
|
+
anyIsDragging: boolean;
|
|
6
|
+
enableDragging: boolean;
|
|
7
|
+
type: "SELECTED" | "FOCUSED" | "ERROR" | "TARGETED";
|
|
8
|
+
isVisible?: boolean;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export declare const NotifierTooltipBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const InteractionRectHandles: (props: {
|
|
4
|
+
instanceId: SbInstance;
|
|
5
|
+
isDragging: boolean;
|
|
6
|
+
selectionType: "SELECTED" | "FOCUSED" | "ERROR" | "TARGETED";
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
declare const NamePill: ((props: {
|
|
4
|
+
instanceId: SbInstance;
|
|
5
|
+
displayName: string;
|
|
6
|
+
anyIsDragging: boolean;
|
|
7
|
+
enableDragging: boolean;
|
|
8
|
+
type: "SELECTED" | "FOCUSED" | "ERROR" | "TARGETED";
|
|
9
|
+
isVisible?: boolean;
|
|
10
|
+
}) => React.JSX.Element) & {
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default NamePill;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AiContextMode, type SbElement, type SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { RootType } from "./interaction-layer.jsx";
|
|
4
|
+
import type { IdentifierInfo } from "../../lib/internal-details/lib/features/name-manager.js";
|
|
5
|
+
type SelectionInfo = {
|
|
6
|
+
sourceId: SbElement;
|
|
7
|
+
instanceId: SbInstance;
|
|
8
|
+
displayName: string;
|
|
9
|
+
selectionType: "SELECTED" | "FOCUSED" | "TARGETED";
|
|
10
|
+
type: string | undefined;
|
|
11
|
+
isVisible?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const isWidgetInCurrentLayer: ({ instanceId, rootType, rootInstanceId, }: {
|
|
14
|
+
instanceId: SbInstance;
|
|
15
|
+
rootType: RootType;
|
|
16
|
+
rootInstanceId: SbInstance;
|
|
17
|
+
}) => boolean;
|
|
18
|
+
export declare const useWidgetErrors: (params: {
|
|
19
|
+
widgetScopesToNamesToIds: Record<string, Record<string, Record<SbInstance, IdentifierInfo>>>;
|
|
20
|
+
rootType: RootType;
|
|
21
|
+
rootInstanceId: SbInstance;
|
|
22
|
+
scopeId: string;
|
|
23
|
+
}) => Record<SbInstance, {
|
|
24
|
+
name: string;
|
|
25
|
+
error: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const useSelectionElements: (params: {
|
|
28
|
+
focusedSourceId: SbElement | null;
|
|
29
|
+
selectedSourceIds: SbElement[];
|
|
30
|
+
focusedInstanceId: SbInstance | null;
|
|
31
|
+
selectedInstanceIds: SbInstance[];
|
|
32
|
+
targetedSourceIds: SbElement[];
|
|
33
|
+
rootType: RootType;
|
|
34
|
+
rootId: SbInstance;
|
|
35
|
+
aiContextMode: AiContextMode;
|
|
36
|
+
}) => SelectionInfo[];
|
|
37
|
+
export declare const InteractionRectTargetBorder: ({ instanceId, }: {
|
|
38
|
+
instanceId: SbInstance;
|
|
39
|
+
}) => React.JSX.Element;
|
|
40
|
+
export declare const InteractionRect: (props: {
|
|
41
|
+
displayName: string;
|
|
42
|
+
isDragging: boolean;
|
|
43
|
+
instanceId: SbInstance;
|
|
44
|
+
selectionType: "SELECTED" | "FOCUSED" | "ERROR" | "TARGETED";
|
|
45
|
+
hideRectBorder?: boolean;
|
|
46
|
+
isVisible?: boolean;
|
|
47
|
+
type?: string;
|
|
48
|
+
}) => React.JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export declare const getBoundingBoxForWidget: (instanceId: SbInstance) => DOMRect | undefined;
|
|
3
|
+
export declare const getFirstInstanceElement: (element: HTMLElement) => {
|
|
4
|
+
element: HTMLElement;
|
|
5
|
+
instanceId: SbInstance;
|
|
6
|
+
} | null;
|
|
7
|
+
export declare const getWidgetNode: (instanceId: SbInstance) => HTMLElement | null;
|
|
8
|
+
export declare const getIsComponentInInteractionLayer: (instanceId: SbInstance | null) => boolean | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IObjectDidChange, IArrayDidChange, IMapDidChange } from "mobx";
|
|
2
|
+
export type IDisposer = () => void;
|
|
3
|
+
type IChange = IObjectDidChange | IArrayDidChange | IMapDidChange;
|
|
4
|
+
export type ObserveListener<T> = (change: IChange, path: string, root: T) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Given an object, deeply observes the given object.
|
|
7
|
+
* It is like `observe` from mobx, but applied recursively, including all future children.
|
|
8
|
+
*
|
|
9
|
+
* Note that the given object cannot ever contain cycles and should be a tree.
|
|
10
|
+
*
|
|
11
|
+
* As benefit: path and root will be provided in the callback, so the signature of the listener is
|
|
12
|
+
* (change, path, root) => void
|
|
13
|
+
*
|
|
14
|
+
* The returned disposer can be invoked to clean up the listener
|
|
15
|
+
*
|
|
16
|
+
* deepObserve cannot be used on computed values.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const disposer = deepObserve(target, (change, path) => {
|
|
20
|
+
* console.dir(change)
|
|
21
|
+
* })
|
|
22
|
+
*/
|
|
23
|
+
export declare function deepObserve<T = any>(target: T, listener: ObserveListener<T>): IDisposer;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { KeyToState } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export interface MobXEditorSyncOptions<SID extends keyof KeyToState = keyof KeyToState, OUTPUT extends KeyToState[SID] = KeyToState[SID], STORE = OUTPUT> {
|
|
3
|
+
storeId: SID & string;
|
|
4
|
+
store: STORE;
|
|
5
|
+
/**
|
|
6
|
+
* A function that takes the store and returns a view/projection of the store.
|
|
7
|
+
* This is useful for syncing only a subset of the store in a different shape.
|
|
8
|
+
*/
|
|
9
|
+
projection?: (store: STORE) => OUTPUT;
|
|
10
|
+
/**
|
|
11
|
+
* When provided, only patches under these keys are forwarded.
|
|
12
|
+
* Other changes are dropped.
|
|
13
|
+
*/
|
|
14
|
+
keys?: Record<keyof OUTPUT, true>;
|
|
15
|
+
/**
|
|
16
|
+
* Debounce time in milliseconds.
|
|
17
|
+
*/
|
|
18
|
+
debounce?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Syncs a mobx store to the editor automatically through postmessage
|
|
22
|
+
*/
|
|
23
|
+
export declare function startEditorSync<SID extends keyof KeyToState = keyof KeyToState, OUTPUT extends KeyToState[SID] = KeyToState[SID], STORE = any>(options: MobXEditorSyncOptions<SID, OUTPUT, STORE>): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Name } from "../lib/internal-details/lib/evaluator/names.js";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the actual value from a PropertyInfo object.
|
|
4
|
+
* This will parse the value based on the type of property.
|
|
5
|
+
* @param property - The property to get the value from.
|
|
6
|
+
* @returns The parsed value of the property.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPropertyValue({ entityKey, property, name, scopeId, }: {
|
|
9
|
+
property: unknown;
|
|
10
|
+
entityKey?: string;
|
|
11
|
+
name?: Name;
|
|
12
|
+
scopeId?: string;
|
|
13
|
+
}): unknown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SbElement } from "@superblocksteam/library-shared/types";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
interface RightClickMenuProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
componentName: string;
|
|
7
|
+
sourceId: SbElement;
|
|
8
|
+
scopeName: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}
|
|
11
|
+
declare const RightClickMenuWrapper: React.FC<RightClickMenuProps & {
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export default RightClickMenuWrapper;
|