@superblocksteam/library 2.0.28 → 2.0.29-next.0
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,42 @@
|
|
|
1
|
+
import type { Section } from "../lib/user-facing/properties-panel/props-builder.js";
|
|
2
|
+
/**
|
|
3
|
+
* Check if a property should be excluded from documentation generation
|
|
4
|
+
*/
|
|
5
|
+
export declare function isPropertyExcluded(componentName: string, propertyName: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Check if a property is readable (has .readable() or .readAndWrite())
|
|
8
|
+
*/
|
|
9
|
+
export declare function isPropertyReadable(prop: any): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Check if a property is writable (has .readAndWrite())
|
|
12
|
+
*/
|
|
13
|
+
export declare function isPropertyWritable(prop: any): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a property is an event property (has type "event")
|
|
16
|
+
*/
|
|
17
|
+
export declare function isPropertyEvent(prop: any): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get custom type definition for a property, if one exists
|
|
20
|
+
*/
|
|
21
|
+
export declare function getCustomPropertyType(componentName: string, propertyName: string): string | undefined;
|
|
22
|
+
export declare function formatDefaultValue(value: any): string | undefined;
|
|
23
|
+
export declare function getDescription(prop: any): string | undefined;
|
|
24
|
+
export declare function getDefaultValue(prop: any, propName: string): any;
|
|
25
|
+
export declare function guessTypeString(prop: any, key: string, componentName?: string): string;
|
|
26
|
+
export declare function generateInterfaceFromNestedProps(nestedProps: any, interfaceName: string, componentName?: string): string;
|
|
27
|
+
export declare function getRecordValueType(prop: any, key: string, componentName?: string): string;
|
|
28
|
+
export type PropContainer = {
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
defaultValue: any;
|
|
32
|
+
isReadonly?: boolean;
|
|
33
|
+
description?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare function generateComponentDocs(component: {
|
|
36
|
+
name: string;
|
|
37
|
+
props: Record<string, Section<any>>;
|
|
38
|
+
}): {
|
|
39
|
+
lines: string[];
|
|
40
|
+
derivedProps: PropContainer[];
|
|
41
|
+
metaProps: PropContainer[];
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { FromChildToParentMessageTypesMap } from "../lib/index.js";
|
|
2
|
+
import type { StreamEvent, RouteInfo } from "../lib/internal-details/lib/types.js";
|
|
3
|
+
import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
|
|
4
|
+
import type { AiContextMode, EditOperationPayload, EditOperationType, GeneratedTheme, SbElement, SbInstance, Theme } from "@superblocksteam/library-shared/types";
|
|
5
|
+
export interface SuperblocksParentBridgeInterface {
|
|
6
|
+
connected(): void;
|
|
7
|
+
sendReady(): void;
|
|
8
|
+
sendNotification(type: "success" | "error" | "info" | "warning", message: string, description?: string): void;
|
|
9
|
+
selectWidgets(sourceIds: SbElement[]): void;
|
|
10
|
+
editOpRequest<T extends EditOperationType>(type: T, payload: EditOperationPayload<T>["payload"]): void;
|
|
11
|
+
undo(): void;
|
|
12
|
+
redo(): void;
|
|
13
|
+
sendStreamedApiEvent(event: StreamEvent, apiName: string): void;
|
|
14
|
+
sendStreamedApiMessage(message: any, apiName: string): void;
|
|
15
|
+
setApiStarted(apiName: string): void;
|
|
16
|
+
setApiResponse(apiName: string, response: unknown): void;
|
|
17
|
+
navigateTo(path: string, newWindow?: boolean): void;
|
|
18
|
+
updateTheme(theme: Theme, generatedTheme: GeneratedTheme): void;
|
|
19
|
+
updatePropertiesPanels(updates: Record<string, PropertiesPanelDefinition>): void;
|
|
20
|
+
addPropertiesPanel(id: string, definition: PropertiesPanelDefinition): void;
|
|
21
|
+
initializeEditorSyncedStore(payload: FromChildToParentMessageTypesMap["codeMode/editor-synced-store/init"]): void;
|
|
22
|
+
updateEditorSyncedStore(payload: FromChildToParentMessageTypesMap["codeMode/editor-synced-store/update"]): void;
|
|
23
|
+
resolvePromise(callbackId: string, payload: unknown): void;
|
|
24
|
+
rejectPromise(callbackId: string, payload: unknown): void;
|
|
25
|
+
canvasClicked(): void;
|
|
26
|
+
registerContextMenuClick(sourceId: SbElement, clientX: number, clientY: number): void;
|
|
27
|
+
updateRoute(routeInfo: RouteInfo): void;
|
|
28
|
+
socketError(message: string): void;
|
|
29
|
+
addComponentToAiContext(sourceId: SbElement, instanceId: SbInstance): void;
|
|
30
|
+
toggleComponentInAiContext(sourceId: SbElement, instanceId: SbInstance): void;
|
|
31
|
+
setAiContextMode(mode: AiContextMode): void;
|
|
32
|
+
}
|
|
33
|
+
export declare class DeployedParentBridge implements SuperblocksParentBridgeInterface {
|
|
34
|
+
navigateTo(url: string, newWindow?: boolean): void;
|
|
35
|
+
connected(): void;
|
|
36
|
+
sendReady(): void;
|
|
37
|
+
sendNotification(_type: "success" | "error" | "info" | "warning", _message: string, _description?: string): void;
|
|
38
|
+
selectWidgets(_sourceIds: SbElement[]): void;
|
|
39
|
+
editOpRequest<T extends EditOperationType>(_type: T, _payload: EditOperationPayload<T>["payload"]): void;
|
|
40
|
+
undo(): void;
|
|
41
|
+
redo(): void;
|
|
42
|
+
sendStreamedApiEvent(_event: StreamEvent, _apiName: string): void;
|
|
43
|
+
sendStreamedApiMessage(_message: any, _apiName: string): void;
|
|
44
|
+
setApiStarted(_apiName: string): void;
|
|
45
|
+
setApiResponse(_apiName: string, _response: unknown): void;
|
|
46
|
+
updateTheme(_theme: Theme, _generatedTheme: GeneratedTheme): void;
|
|
47
|
+
updatePropertiesPanels(_updates: Record<string, PropertiesPanelDefinition>): void;
|
|
48
|
+
addPropertiesPanel(_id: string, _definition: PropertiesPanelDefinition): void;
|
|
49
|
+
initializeEditorSyncedStore(_payload: FromChildToParentMessageTypesMap["codeMode/editor-synced-store/init"]): void;
|
|
50
|
+
updateEditorSyncedStore(_payload: FromChildToParentMessageTypesMap["codeMode/editor-synced-store/update"]): void;
|
|
51
|
+
resolvePromise(_callbackId: string, _payload: unknown): void;
|
|
52
|
+
rejectPromise(_callbackId: string, _payload: unknown): void;
|
|
53
|
+
canvasClicked(): void;
|
|
54
|
+
registerContextMenuClick(_sourceId: SbElement, _clientX: number, _clientY: number): void;
|
|
55
|
+
updateRoute(routeInfo: RouteInfo): void;
|
|
56
|
+
socketError(_message: string): void;
|
|
57
|
+
addComponentToAiContext(_sourceId: SbElement): void;
|
|
58
|
+
toggleComponentInAiContext(_sourceId: SbElement, _instanceId: SbInstance): void;
|
|
59
|
+
setAiContextMode(_mode: AiContextMode): void;
|
|
60
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropertyInfo, SbElement, SourceLocation } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export declare const generateUniqueName: (componentType: string) => string;
|
|
3
|
+
export default function createComponent({ componentType, parent, scopeName, baseProperties, skipSecondaryComponentsCreation, // will only create the primary component. Secondary components are usually trigger components (e.g: Button that triggers the modal)
|
|
4
|
+
otherComponentsUpdates, }: {
|
|
5
|
+
componentType: string;
|
|
6
|
+
parent: SourceLocation;
|
|
7
|
+
scopeName: string;
|
|
8
|
+
baseProperties?: Record<string, PropertyInfo>;
|
|
9
|
+
skipSecondaryComponentsCreation?: boolean;
|
|
10
|
+
otherComponentsUpdates?: Record<SbElement, Record<string, PropertyInfo>>;
|
|
11
|
+
}): Promise<SbElement | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const debugLogId: (id: string) => {
|
|
2
|
+
id: string;
|
|
3
|
+
idType: string;
|
|
4
|
+
meta: import("./features/runtime-widgets-manager.js").RuntimeWidgetMeta;
|
|
5
|
+
anyInstanceId?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
id: string;
|
|
8
|
+
idType: string;
|
|
9
|
+
anyInstanceId: `I-${string}`;
|
|
10
|
+
meta: import("./features/runtime-widgets-manager.js").RuntimeWidgetMeta | undefined;
|
|
11
|
+
} | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
declare const DroppableWidget: ((props: {
|
|
4
|
+
instanceId: SbInstance;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
dropTargetRef?: React.RefObject<HTMLElement | null>;
|
|
7
|
+
}) => React.JSX.Element) & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default DroppableWidget;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { GridDropInfo, RectLike } from "./types.js";
|
|
2
|
+
import type { RootStore } from "../../lib/internal-details/lib/root-store.js";
|
|
3
|
+
import type { DragAndDropManager } from "../features/drag-and-drop-store.js";
|
|
4
|
+
import type { RuntimeWidgetMeta } from "../features/runtime-widgets-manager.js";
|
|
5
|
+
import type { ClientRect } from "@dnd-kit/core";
|
|
6
|
+
import type { Padding } from "@superblocksteam/library-shared/types";
|
|
7
|
+
type GridInfo = {
|
|
8
|
+
targetColumns: number;
|
|
9
|
+
tileWidth: number;
|
|
10
|
+
tileHeight: number;
|
|
11
|
+
targetHeightGU: number;
|
|
12
|
+
targetPadding: Padding;
|
|
13
|
+
};
|
|
14
|
+
export declare class GridManager {
|
|
15
|
+
private root;
|
|
16
|
+
private dnd;
|
|
17
|
+
constructor(root: RootStore, dnd: DragAndDropManager);
|
|
18
|
+
private get draggedInstanceId();
|
|
19
|
+
refreshPositionsAndGetDropConstraints(): GridDropInfo;
|
|
20
|
+
getGridInfo(runtimeWidget: RuntimeWidgetMeta, targetRect: ClientRect): GridInfo | null;
|
|
21
|
+
private get lazyTargetGridInfo();
|
|
22
|
+
private getGridPositionFromRect;
|
|
23
|
+
getGridPositionInfo({ positionRect, targetRect, targetGridInfo, includePadding, }: {
|
|
24
|
+
positionRect: RectLike<number>;
|
|
25
|
+
targetRect: ClientRect;
|
|
26
|
+
targetGridInfo: GridInfo;
|
|
27
|
+
includePadding: boolean;
|
|
28
|
+
}): {
|
|
29
|
+
xGU: number;
|
|
30
|
+
yGU: number;
|
|
31
|
+
widthGU: number;
|
|
32
|
+
heightGU: number;
|
|
33
|
+
tileWidth: number;
|
|
34
|
+
tileHeight: number;
|
|
35
|
+
targetPadding: import("@superblocksteam/library-shared/types").Spacing;
|
|
36
|
+
};
|
|
37
|
+
get lazyChildGridPositionsGU(): Record<`I-${string}`, {
|
|
38
|
+
xGU: number;
|
|
39
|
+
yGU: number;
|
|
40
|
+
widthGU: number;
|
|
41
|
+
heightGU: number;
|
|
42
|
+
tileWidth: number;
|
|
43
|
+
tileHeight: number;
|
|
44
|
+
targetPadding: import("@superblocksteam/library-shared/types").Spacing;
|
|
45
|
+
} | null>;
|
|
46
|
+
get lazyActiveRectGU(): {
|
|
47
|
+
xGU: number;
|
|
48
|
+
yGU: number;
|
|
49
|
+
widthGU: number;
|
|
50
|
+
heightGU: number;
|
|
51
|
+
tileWidth: number;
|
|
52
|
+
tileHeight: number;
|
|
53
|
+
targetPadding: import("@superblocksteam/library-shared/types").Spacing;
|
|
54
|
+
} | null;
|
|
55
|
+
get lazyIsFreePos(): boolean;
|
|
56
|
+
adjustDragRectForCollisions(collidingRect: ClientRect | null): ClientRect | null;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GURectLike } from "./types.js";
|
|
2
|
+
export declare const isRectIntersecting: (rect1: GURectLike, rect2: GURectLike) => boolean;
|
|
3
|
+
export declare const isCollidingByCoordinate: (rect1: GURectLike, rect2: GURectLike) => {
|
|
4
|
+
left: boolean;
|
|
5
|
+
right: boolean;
|
|
6
|
+
top: boolean;
|
|
7
|
+
bottom: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GridDropInfo } from "./types.js";
|
|
2
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare const handleGridDrop: ({ gridDropInfo, draggedId, dropTargetId, isDraggingNewComponent, newComponentType, }: {
|
|
4
|
+
gridDropInfo: GridDropInfo;
|
|
5
|
+
draggedId: SbInstance | undefined | null;
|
|
6
|
+
dropTargetId: SbInstance;
|
|
7
|
+
isDraggingNewComponent: boolean;
|
|
8
|
+
newComponentType: string | null | undefined;
|
|
9
|
+
}) => Promise<SbElement | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StackDropInfo } from "./types.js";
|
|
2
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare const handleStackDrop: ({ dropInfo, draggedId, dropTargetId, isDraggingNewComponent, newComponentType, }: {
|
|
4
|
+
dropInfo: StackDropInfo;
|
|
5
|
+
draggedId: SbInstance | undefined | null;
|
|
6
|
+
dropTargetId: SbInstance;
|
|
7
|
+
isDraggingNewComponent: boolean;
|
|
8
|
+
newComponentType: string | null | undefined;
|
|
9
|
+
}) => Promise<SbElement | undefined>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useDroppable } from "@dnd-kit/core";
|
|
2
|
+
import type { ComponentDroppableData } from "../types";
|
|
3
|
+
import "react";
|
|
4
|
+
export declare function useComponentDroppable({ instanceId, rootInstanceId, depth, disabled, }: ComponentDroppableData & {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
}): ReturnType<typeof useDroppable>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useHandleDnDEvents: () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StackDropInfo } from "./types.js";
|
|
2
|
+
import type { RootStore } from "../../lib/internal-details/lib/root-store.js";
|
|
3
|
+
import type { DragAndDropManager } from "../features/drag-and-drop-store.js";
|
|
4
|
+
export declare class StackManager {
|
|
5
|
+
private root;
|
|
6
|
+
private dnd;
|
|
7
|
+
constructor(root: RootStore, dnd: DragAndDropManager);
|
|
8
|
+
refreshPositionsAndGetDropIndex(): StackDropInfo;
|
|
9
|
+
get lazyDropInfo(): StackDropInfo;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RectLike, StackDropInfo } from "./types.js";
|
|
2
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare const computeDragInfo: (params: {
|
|
4
|
+
isVertical: boolean;
|
|
5
|
+
childrenNodes: Array<[id: SbInstance, child: RectLike<number>]>;
|
|
6
|
+
baseRect: RectLike<number>;
|
|
7
|
+
draggedItemPos: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
draggedInstance: SbInstance;
|
|
12
|
+
selectedInstances: SbInstance[];
|
|
13
|
+
}) => undefined | StackDropInfo;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { OutputItem } from "../../lib/user-facing/components/grid/calculations/calculate-constraints.js";
|
|
2
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export type ComponentDraggableData = {
|
|
4
|
+
instanceId: SbInstance;
|
|
5
|
+
};
|
|
6
|
+
export type ComponentDroppableData = {
|
|
7
|
+
instanceId: SbInstance;
|
|
8
|
+
rootInstanceId?: SbInstance;
|
|
9
|
+
depth: number;
|
|
10
|
+
};
|
|
11
|
+
export type RectLike<T> = {
|
|
12
|
+
top: T;
|
|
13
|
+
left: T;
|
|
14
|
+
bottom: T;
|
|
15
|
+
right: T;
|
|
16
|
+
width: T;
|
|
17
|
+
height: T;
|
|
18
|
+
};
|
|
19
|
+
export type StackDropInfo = {
|
|
20
|
+
insertionIndex: undefined;
|
|
21
|
+
placeholders: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
insertionIndex: number;
|
|
24
|
+
placeholders: StackPlaceholderPos[];
|
|
25
|
+
noopDrop: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type StackPlaceholderPos = {
|
|
28
|
+
isActive?: boolean;
|
|
29
|
+
left: number;
|
|
30
|
+
top: number;
|
|
31
|
+
width?: number | string;
|
|
32
|
+
height?: number | string;
|
|
33
|
+
};
|
|
34
|
+
export type GURectLike = {
|
|
35
|
+
xGU: number;
|
|
36
|
+
yGU: number;
|
|
37
|
+
widthGU: number;
|
|
38
|
+
heightGU: number;
|
|
39
|
+
};
|
|
40
|
+
export type GridDropInfo = {
|
|
41
|
+
constraintsByInstanceId: Record<SbInstance, OutputItem>;
|
|
42
|
+
isValid: true;
|
|
43
|
+
} | {
|
|
44
|
+
isValid: false;
|
|
45
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type PropertyInfo } from "@superblocksteam/library-shared";
|
|
2
|
+
import type { Dim } from "@superblocksteam/library-shared";
|
|
3
|
+
declare const detachedComponentTypeList: readonly ["Modal", "Slideout"];
|
|
4
|
+
export type DetachedComponentType = (typeof detachedComponentTypeList)[number];
|
|
5
|
+
export declare const DetachedComponentTypes: Set<string>;
|
|
6
|
+
export declare const isDragAndDropTypeValid: ({ draggedType, dropTargetType, dropTargetEmpty, isDraggingNewComponent, }: {
|
|
7
|
+
draggedType: string;
|
|
8
|
+
dropTargetType: string;
|
|
9
|
+
dropTargetEmpty: boolean;
|
|
10
|
+
isDraggingNewComponent: boolean;
|
|
11
|
+
}) => boolean;
|
|
12
|
+
export declare const isTypeDroppable: (type: string) => boolean;
|
|
13
|
+
export declare const isTypeDraggable: (type: string) => boolean;
|
|
14
|
+
export declare const isContentDraggable: (type: string) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Uses `allowedChildren` config from the ChildrenProp to determine if the component should be wrapped.
|
|
17
|
+
* @param type - the type of the component being created
|
|
18
|
+
* @param parentType - the type of the parent component
|
|
19
|
+
* @returns
|
|
20
|
+
* - [false] if the component should not be wrapped
|
|
21
|
+
* - [true, wrapInType] if the component should be wrapped in the given type
|
|
22
|
+
*/
|
|
23
|
+
export declare function shouldWrapComponent(type: string, parentType: string | undefined): [false] | [true, string];
|
|
24
|
+
export declare const filterSafeStackDimensionProperties: (existingProps: {
|
|
25
|
+
width?: Dim;
|
|
26
|
+
height?: Dim;
|
|
27
|
+
size?: Dim;
|
|
28
|
+
}) => {
|
|
29
|
+
width?: PropertyInfo;
|
|
30
|
+
height?: PropertyInfo;
|
|
31
|
+
size?: PropertyInfo;
|
|
32
|
+
};
|
|
33
|
+
export declare const filterSafeGridDimensionProperties: (existingProps: {
|
|
34
|
+
width?: Dim;
|
|
35
|
+
height?: Dim;
|
|
36
|
+
size?: Dim;
|
|
37
|
+
}) => {
|
|
38
|
+
width?: PropertyInfo;
|
|
39
|
+
height?: PropertyInfo;
|
|
40
|
+
size?: PropertyInfo;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ViteMessageKind } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import { AiManager } from "./features/ai-store.js";
|
|
3
|
+
import ConnectionManager from "./features/connection-manager.js";
|
|
4
|
+
import InteractionLayerManager from "./features/interaction-layer-manager.js";
|
|
5
|
+
import OperationManager from "./features/operation-store.js";
|
|
6
|
+
import PropertiesPanelManager from "./features/properties-panel-manager.js";
|
|
7
|
+
import RuntimeEntitiesManager from "./features/runtime-entities-manager.js";
|
|
8
|
+
import UIStore from "./features/ui-store.js";
|
|
9
|
+
import type { RootStore } from "../lib/internal-details/lib/root-store.js";
|
|
10
|
+
import type { ViteMessage } from "@superblocksteam/library-shared/types";
|
|
11
|
+
export declare class EditStore {
|
|
12
|
+
ui: UIStore;
|
|
13
|
+
operationManager: OperationManager;
|
|
14
|
+
propertiesPanelManager: PropertiesPanelManager;
|
|
15
|
+
runtimeEntitiesManager: RuntimeEntitiesManager;
|
|
16
|
+
interactionLayerManager: InteractionLayerManager;
|
|
17
|
+
connectionManager: ConnectionManager;
|
|
18
|
+
ai: AiManager;
|
|
19
|
+
isInitialized: boolean;
|
|
20
|
+
recordingInitialized: boolean;
|
|
21
|
+
currentImportError: {
|
|
22
|
+
importPath: string;
|
|
23
|
+
error: string;
|
|
24
|
+
stack: string;
|
|
25
|
+
} | null;
|
|
26
|
+
private viteMessageListeners;
|
|
27
|
+
constructor(rootStore: RootStore);
|
|
28
|
+
setIsInitialized(isInitialized: boolean): void;
|
|
29
|
+
setupImportErrorListener(): void;
|
|
30
|
+
onViteMessage<T extends ViteMessageKind, Message extends Extract<ViteMessage, {
|
|
31
|
+
kind: T;
|
|
32
|
+
}>>(kind: T, callback: (message: Message) => void): () => void;
|
|
33
|
+
triggerViteMessage<T extends ViteMessageKind, Message extends Extract<ViteMessage, {
|
|
34
|
+
kind: T;
|
|
35
|
+
}>>(kind: T, message: Message): void;
|
|
36
|
+
startRecording(recording: {
|
|
37
|
+
userId: string;
|
|
38
|
+
appId: string;
|
|
39
|
+
sessionRecordingKey: string;
|
|
40
|
+
}): void;
|
|
41
|
+
}
|
|
42
|
+
export declare function initializeEditStore(): void;
|
|
43
|
+
declare global {
|
|
44
|
+
interface Window {
|
|
45
|
+
__SUPERBLOCKS_EDITOR_HOOK__: EditStore;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ChildFunction } from "./features/runtime-widgets-manager.js";
|
|
3
|
+
import type { IdentifierInfo } from "../lib/internal-details/lib/features/name-manager.js";
|
|
4
|
+
import type { SbInstance } from "@superblocksteam/library-shared/types";
|
|
5
|
+
export declare const createAnchorNameStyle: (props: {
|
|
6
|
+
instanceId: SbInstance;
|
|
7
|
+
}) => React.CSSProperties | undefined;
|
|
8
|
+
declare const EditWrapper: React.FunctionComponent<{
|
|
9
|
+
type: string;
|
|
10
|
+
children: React.ReactNode[] | ChildFunction;
|
|
11
|
+
widgetProps: Record<string, unknown>;
|
|
12
|
+
isCustomComponent: boolean;
|
|
13
|
+
component: React.FC<any>;
|
|
14
|
+
identifier: IdentifierInfo;
|
|
15
|
+
isDroppable: boolean;
|
|
16
|
+
dropTargetRef?: React.RefObject<HTMLElement | null>;
|
|
17
|
+
}>;
|
|
18
|
+
export default EditWrapper;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const EXTENDED_CLICKABLE_AREA_DELTA = 6;
|
|
2
|
+
export declare const EXTENDED_CLICKABLE_ANCHOR_CSS: {
|
|
3
|
+
top: string;
|
|
4
|
+
left: string;
|
|
5
|
+
right: string;
|
|
6
|
+
bottom: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const EXTENDED_CLICKABLE_ANCHOR_CLIP_PATH = "polygon(\n 0% 0%, 0% 100%, 100% 100%, 100% 0%,\n 0% 0%, 6px 6px, calc(100% - 6px) 6px, \n calc(100% - 6px) calc(100% - 6px), 6px calc(100% - 6px), 6px 6px\n )";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AiContextMode } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type RuntimeEntitiesManager from "./runtime-entities-manager";
|
|
3
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
4
|
+
export declare class AiManager {
|
|
5
|
+
private readonly runtimeEntitiesManager;
|
|
6
|
+
private _isTaggingEnabled;
|
|
7
|
+
private _isEditing;
|
|
8
|
+
private _editingComponents;
|
|
9
|
+
private _contextMode;
|
|
10
|
+
private _targetedComponents;
|
|
11
|
+
private _targetedInstances;
|
|
12
|
+
constructor(runtimeEntitiesManager: RuntimeEntitiesManager);
|
|
13
|
+
getIsTaggingEnabled(): boolean;
|
|
14
|
+
setIsTaggingEnabled(isTaggingEnabled: boolean): void;
|
|
15
|
+
getAiContextMode(): AiContextMode;
|
|
16
|
+
shouldToggleComponentInAiContext(): boolean;
|
|
17
|
+
getTargetedComponents(): `SB-${string}`[];
|
|
18
|
+
isEditingComponent(id: SbElement): boolean;
|
|
19
|
+
isTargetingComponent(id: SbElement): boolean;
|
|
20
|
+
startEditing(): void;
|
|
21
|
+
setEditingComponents(components: SbElement[]): void;
|
|
22
|
+
finishEditing(): void;
|
|
23
|
+
setAiContextMode(mode: AiContextMode, components?: SbElement[]): void;
|
|
24
|
+
addTargetedInstance(instanceId: SbInstance): void;
|
|
25
|
+
toggleTargetedInstance(instanceId: SbInstance): void;
|
|
26
|
+
isTargetedInstance(instanceId: SbInstance): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Returns true if we are targeting a different instance of the same source id, since in some cases we want to keep
|
|
29
|
+
* the same source targeted, but just highlight another instance of it
|
|
30
|
+
*/
|
|
31
|
+
isAlternateSourceIdTarget(sourceId: SbElement, instanceId: SbInstance): boolean;
|
|
32
|
+
private removeAllSharedInstances;
|
|
33
|
+
private removeAllInstancesForSource;
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ConnectionStatus = "pre-init" | "disconnected" | "connecting" | "connected";
|
|
2
|
+
declare class ConnectionManager {
|
|
3
|
+
connectionStatus: ConnectionStatus;
|
|
4
|
+
constructor();
|
|
5
|
+
initializeSocket(): void;
|
|
6
|
+
connect(): void;
|
|
7
|
+
disconnect(): void;
|
|
8
|
+
}
|
|
9
|
+
export default ConnectionManager;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { GridManager } from "../dnd/grid-store.js";
|
|
2
|
+
import { StackManager } from "../dnd/stack-store.js";
|
|
3
|
+
import type { RootStore } from "../../lib/internal-details/lib/root-store.js";
|
|
4
|
+
import type { ClientRect } from "@dnd-kit/core";
|
|
5
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
6
|
+
type DNDFeatures = {
|
|
7
|
+
dragAndDrop?: boolean;
|
|
8
|
+
nudging?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare class DragAndDropManager {
|
|
11
|
+
private root;
|
|
12
|
+
stack: StackManager;
|
|
13
|
+
grid: GridManager;
|
|
14
|
+
private _dropTargetInstanceId;
|
|
15
|
+
private _isDragging;
|
|
16
|
+
private _isDraggingNewComponent;
|
|
17
|
+
private _activeDragRect;
|
|
18
|
+
private _activeTargetRect;
|
|
19
|
+
private _draggingWidgetSize;
|
|
20
|
+
private _dragToCanvasComponentType;
|
|
21
|
+
private _validRootIds;
|
|
22
|
+
private _shouldResizePage;
|
|
23
|
+
private _invalidDropTarget;
|
|
24
|
+
private _perWidgetFeatures;
|
|
25
|
+
widgetPositions: Record<SbInstance, ClientRect>;
|
|
26
|
+
constructor(root: RootStore);
|
|
27
|
+
get isDragging(): boolean;
|
|
28
|
+
get isDraggingNewComponent(): boolean;
|
|
29
|
+
get draggingWidgetSize(): {
|
|
30
|
+
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
};
|
|
33
|
+
get dropTargetId(): `I-${string}` | null;
|
|
34
|
+
get activeDragRect(): ClientRect | null;
|
|
35
|
+
get activeTargetRect(): ClientRect | null;
|
|
36
|
+
get shouldResizePage(): boolean;
|
|
37
|
+
get dropTargetWidgetType(): string | undefined;
|
|
38
|
+
get isDropTargetGridLike(): boolean;
|
|
39
|
+
get isDropTargetStackLike(): boolean;
|
|
40
|
+
get draggedWidgetType(): string | null | undefined;
|
|
41
|
+
get dragToCanvasComponentType(): string | null;
|
|
42
|
+
get validRootIds(): `I-${string}`[] | null;
|
|
43
|
+
get invalidDropTarget(): boolean;
|
|
44
|
+
canDragWidget(instanceId: SbInstance): boolean;
|
|
45
|
+
canNudgeWidget(instanceId: SbInstance): boolean;
|
|
46
|
+
setWidgetFeatures(id: SbElement, features: Partial<DNDFeatures>): void;
|
|
47
|
+
setIsDragging(isDragging: boolean): void;
|
|
48
|
+
/**
|
|
49
|
+
* Indicates a drag of a new component into the canvas (e.g: from the sidebar)
|
|
50
|
+
* Used to handle the dragging preview, and the drop handling
|
|
51
|
+
*/
|
|
52
|
+
startNewComponentDrag({ componentType }: {
|
|
53
|
+
componentType: string | null;
|
|
54
|
+
}): void;
|
|
55
|
+
cancelNewComponentDrag(): void;
|
|
56
|
+
setValidRootIds(ids: SbInstance[]): void;
|
|
57
|
+
setInvalidDropTarget(invalid: boolean): void;
|
|
58
|
+
setDropTargetId(id: SbInstance | null): void;
|
|
59
|
+
setActiveDragRect(collidingRect: ClientRect | null): void;
|
|
60
|
+
setActiveTargetRect(rect: ClientRect | null): void;
|
|
61
|
+
setWidgetPosition(id: SbInstance, rect: ClientRect | null): void;
|
|
62
|
+
updateChildPositions(id: SbInstance): void;
|
|
63
|
+
private getPageElement;
|
|
64
|
+
resizePageIfNeeded(): void;
|
|
65
|
+
private restorePageDimensions;
|
|
66
|
+
}
|
|
67
|
+
export {};
|