@superblocksteam/library 2.0.32 → 2.0.33-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,44 @@
|
|
|
1
|
+
import type { FromChildToParentMessageTypes, FromChildToParentMessageTypesMap, FromParentToChildMessageTypes, FromParentToChildMessageTypesMap } from "./types.js";
|
|
2
|
+
import type { PayloadAction } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare function isEmbeddedBySuperblocksFirstParty(): boolean;
|
|
4
|
+
/** @deprecated Use editorBridge instead */
|
|
5
|
+
export declare function sendMessageImmediately<MT extends FromChildToParentMessageTypes>(message: {
|
|
6
|
+
type: MT;
|
|
7
|
+
payload?: FromChildToParentMessageTypesMap[MT];
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}, options?: {
|
|
10
|
+
overrideStartTime: number;
|
|
11
|
+
}): void;
|
|
12
|
+
/** @deprecated Use editorBridge instead */
|
|
13
|
+
export declare function queueMessage(message: PayloadAction<unknown>): void;
|
|
14
|
+
declare class SbIframeEventInternal<T = Record<string, any>> extends Event {
|
|
15
|
+
data: {
|
|
16
|
+
payload: T;
|
|
17
|
+
startTime: number;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
constructor(type: FromParentToChildMessageTypes, data: {
|
|
21
|
+
payload: T;
|
|
22
|
+
startTime: number;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
interface MessageHandler extends EventTarget {
|
|
27
|
+
addEventListener<MT extends FromParentToChildMessageTypes>(type: MT, callback: IframeEventHandler<MT>): void;
|
|
28
|
+
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null): void;
|
|
29
|
+
removeEventListener<MT extends FromParentToChildMessageTypes>(type: MT, callback: IframeEventHandler<MT>): void;
|
|
30
|
+
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null): void;
|
|
31
|
+
}
|
|
32
|
+
declare const SbMessageHandler_base: {
|
|
33
|
+
new (): MessageHandler;
|
|
34
|
+
prototype: MessageHandler;
|
|
35
|
+
};
|
|
36
|
+
declare class SbMessageHandler extends SbMessageHandler_base {
|
|
37
|
+
}
|
|
38
|
+
export type IframeEventHandler<MT extends FromParentToChildMessageTypes> = (event: SbIframeEventInternal<FromParentToChildMessageTypesMap[MT]>) => void;
|
|
39
|
+
export declare const iframeMessageHandler: SbMessageHandler;
|
|
40
|
+
export type IframeEvent<T> = T extends FromParentToChildMessageTypes ? MessageEvent<{
|
|
41
|
+
type: T;
|
|
42
|
+
payload: FromParentToChildMessageTypesMap[T];
|
|
43
|
+
}> : never;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const makeMobxCachedGetter: <T, K extends string>(getter: (id: K) => T) => ((id: K) => T);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function addNewPromise(resolver: (...args: any[]) => any, isMultiUse?: boolean, rejecter?: (...args: any[]) => any): string;
|
|
2
|
+
export declare function resolveById(id: string, payload: any): void;
|
|
3
|
+
export declare function rejectById(id: string, payload: any): void;
|
|
4
|
+
export declare function clearMultiCallback(id: string): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LocationStore } from "../location-store.js";
|
|
2
|
+
import ApiManager from "./features/api-store.js";
|
|
3
|
+
import { ComponentRegistry } from "./features/component-registry.js";
|
|
4
|
+
import { NameManager } from "./features/name-manager.js";
|
|
5
|
+
import type { IEntityManager } from "./evaluator/base-entity-manager.js";
|
|
6
|
+
import type { EditStore } from "../../../edit-mode/edit-store.js";
|
|
7
|
+
declare class RootStore {
|
|
8
|
+
apis: ApiManager;
|
|
9
|
+
nameManager: NameManager;
|
|
10
|
+
entityManager: IEntityManager;
|
|
11
|
+
componentRegistry: ComponentRegistry;
|
|
12
|
+
editStore?: EditStore;
|
|
13
|
+
locationStore: LocationStore;
|
|
14
|
+
applicationId: string | undefined;
|
|
15
|
+
userId: string | undefined;
|
|
16
|
+
windowOriginUrl: string | undefined;
|
|
17
|
+
private editorRegisteredCallbacks;
|
|
18
|
+
private apisLoaded;
|
|
19
|
+
private pageScopeLoaded;
|
|
20
|
+
private pageLoadedCallback?;
|
|
21
|
+
constructor();
|
|
22
|
+
setEditStore(editStore: EditStore): void;
|
|
23
|
+
onEditorRegistered(fn: () => void): void;
|
|
24
|
+
/**
|
|
25
|
+
* There is a timing problem here between when the APIs are registered and when the scope entities are registered.
|
|
26
|
+
* Regardless of which one is done first, we need to wait for both before firing page load actions
|
|
27
|
+
*/
|
|
28
|
+
setApisLoaded(): void;
|
|
29
|
+
setPageScopeLoaded(): void;
|
|
30
|
+
private firePageLoadedCallbacks;
|
|
31
|
+
onPageLoaded(fn: () => void): void;
|
|
32
|
+
}
|
|
33
|
+
export type { RootStore };
|
|
34
|
+
declare const _default: RootStore;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
style?: () => CSSProperties;
|
|
5
|
+
noBorderRadius?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Default fallback component displayed while components are suspended.
|
|
9
|
+
*/
|
|
10
|
+
export declare function SuspenseFallback({ style, noBorderRadius }: Props): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function throttle<T extends (...args: any[]) => any>(func: T, delay: number): ((...args: Parameters<T>) => void) & {
|
|
2
|
+
cancel: () => void;
|
|
3
|
+
};
|
|
4
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
|
|
2
|
+
import type { UrlState, AppToEditorMessage, DeleteMeLibraryApi, EditOperationPayload, EditOperationType, PayloadAction, PropertyInfo, SbElement, SourceLocation, TransactionInfo, AiContextMode } from "@superblocksteam/library-shared/types";
|
|
3
|
+
import type { OrchestratorViewMode, PlaceholderInfo } from "@superblocksteam/shared";
|
|
4
|
+
import type { XYCoord } from "react-dnd";
|
|
5
|
+
export type ExecutionError = {
|
|
6
|
+
name?: string;
|
|
7
|
+
message: string;
|
|
8
|
+
formPath: string;
|
|
9
|
+
blockPath: string;
|
|
10
|
+
handled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ExecutionEventRequest = {
|
|
13
|
+
summary: string;
|
|
14
|
+
metadata: {
|
|
15
|
+
placeHoldersInfo?: Record<string, PlaceholderInfo>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type Resolutions = Record<string, // name of the field: eg: "range", for the range field let's say the code is {{[1,2,3]}}
|
|
19
|
+
{
|
|
20
|
+
value: any;
|
|
21
|
+
bindings: any[];
|
|
22
|
+
}>;
|
|
23
|
+
export type ExecutionEvent = {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
start?: Record<string, unknown>;
|
|
28
|
+
end?: {
|
|
29
|
+
performance?: {
|
|
30
|
+
start: string | number;
|
|
31
|
+
finish: string | number;
|
|
32
|
+
total: string | number;
|
|
33
|
+
execution: string | number;
|
|
34
|
+
overhead: string | number;
|
|
35
|
+
};
|
|
36
|
+
error?: ExecutionError;
|
|
37
|
+
output?: {
|
|
38
|
+
result?: any;
|
|
39
|
+
request?: string;
|
|
40
|
+
requestV2?: ExecutionEventRequest;
|
|
41
|
+
stdout?: Array<string>;
|
|
42
|
+
stderr?: Array<string>;
|
|
43
|
+
};
|
|
44
|
+
resolved?: Resolutions;
|
|
45
|
+
};
|
|
46
|
+
parent: string;
|
|
47
|
+
};
|
|
48
|
+
export interface StreamEvent {
|
|
49
|
+
result: {
|
|
50
|
+
event: ExecutionEvent;
|
|
51
|
+
execution: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface ApiV2ExecutionResponse {
|
|
55
|
+
execution: string;
|
|
56
|
+
output?: {
|
|
57
|
+
result: any;
|
|
58
|
+
};
|
|
59
|
+
status: "STATUS_EXECUTING" | "STATUS_COMPLETED" | "STATUS_UNSPECIFIED";
|
|
60
|
+
events?: Array<ExecutionEvent | StreamEvent>;
|
|
61
|
+
errors?: Array<{
|
|
62
|
+
message: string;
|
|
63
|
+
handled?: boolean;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
interface BaseExecutionRequest {
|
|
67
|
+
options: {
|
|
68
|
+
includeEventOutputs: boolean;
|
|
69
|
+
includeEvents: boolean;
|
|
70
|
+
includeResolved: boolean;
|
|
71
|
+
};
|
|
72
|
+
inputs: Record<string, any>;
|
|
73
|
+
}
|
|
74
|
+
interface ApiDefinitionExecutionRequest extends BaseExecutionRequest {
|
|
75
|
+
definition: {
|
|
76
|
+
api: Omit<DeleteMeLibraryApi["apiPb"], "trigger">;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
interface ApiFetchExecutionRequest extends BaseExecutionRequest {
|
|
80
|
+
fetchByPath: {
|
|
81
|
+
path: string;
|
|
82
|
+
applicationId: string;
|
|
83
|
+
branchName: string;
|
|
84
|
+
profile: {
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
87
|
+
viewMode: OrchestratorViewMode;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export type ApiV2ExecutionRequest = ApiDefinitionExecutionRequest | ApiFetchExecutionRequest;
|
|
91
|
+
export type ExecutionResponse = ApiV2ExecutionResponse | {
|
|
92
|
+
systemError: string;
|
|
93
|
+
};
|
|
94
|
+
export type RouteInfo = Omit<UrlState, "host" | "hostname" | "href" | "port" | "protocol">;
|
|
95
|
+
export type RouteChangePayload = Omit<UrlState, "host" | "hostname" | "href" | "pathname" | "port" | "protocol">;
|
|
96
|
+
export type AiUpdatesPayload = {
|
|
97
|
+
parentToChild: {
|
|
98
|
+
type: "start-editing";
|
|
99
|
+
components?: SbElement[];
|
|
100
|
+
} | {
|
|
101
|
+
type: "finish-editing";
|
|
102
|
+
} | {
|
|
103
|
+
type: "update-editing-entities";
|
|
104
|
+
components: SbElement[];
|
|
105
|
+
} | {
|
|
106
|
+
type: "set-ai-context-mode";
|
|
107
|
+
mode: AiContextMode;
|
|
108
|
+
components?: SbElement[];
|
|
109
|
+
} | {
|
|
110
|
+
type: "set-tagging-enabled";
|
|
111
|
+
isTaggingEnabled: boolean;
|
|
112
|
+
};
|
|
113
|
+
childToParent: {
|
|
114
|
+
type: "add-component-to-context";
|
|
115
|
+
component: SbElement;
|
|
116
|
+
} | {
|
|
117
|
+
type: "toggle-component-in-context";
|
|
118
|
+
component: SbElement;
|
|
119
|
+
} | {
|
|
120
|
+
type: "set-ai-context-mode";
|
|
121
|
+
mode: AiContextMode;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export type FromParentToChildMessageTypesMap = {
|
|
125
|
+
"sb-init": {
|
|
126
|
+
peerId: string;
|
|
127
|
+
userId?: string;
|
|
128
|
+
appId: string;
|
|
129
|
+
sessionRecordingKey?: string;
|
|
130
|
+
};
|
|
131
|
+
"sb-bootstrap-response": {
|
|
132
|
+
userId?: string;
|
|
133
|
+
appId: string;
|
|
134
|
+
token: string;
|
|
135
|
+
accessToken: string;
|
|
136
|
+
/** @deprecated Use agentUrls instead */
|
|
137
|
+
agentUrl?: string;
|
|
138
|
+
agentUrls: string[];
|
|
139
|
+
logContext: Record<string, unknown>;
|
|
140
|
+
sessionRecordingKey?: string;
|
|
141
|
+
};
|
|
142
|
+
"sb-editor-request-bootstrap": void;
|
|
143
|
+
"sb-update-active-agents": {
|
|
144
|
+
agentUrls: string[];
|
|
145
|
+
};
|
|
146
|
+
"sb-update-property-with-effects": {
|
|
147
|
+
sourceId: string;
|
|
148
|
+
callbackId: string;
|
|
149
|
+
updates: Record<string, PropertyInfo<unknown>>;
|
|
150
|
+
transaction: TransactionInfo;
|
|
151
|
+
};
|
|
152
|
+
"sb-edit-operation-acknowledge": EditOperationPayload<EditOperationType>;
|
|
153
|
+
"sb-retrieve-property-panel-props": {
|
|
154
|
+
sourceId: string;
|
|
155
|
+
};
|
|
156
|
+
"sb-global-sync": {
|
|
157
|
+
global: Record<string, unknown>;
|
|
158
|
+
};
|
|
159
|
+
"parent-action-batch": PayloadAction<unknown>[];
|
|
160
|
+
click: void;
|
|
161
|
+
"register-keypress": {
|
|
162
|
+
keys: string;
|
|
163
|
+
options?: any;
|
|
164
|
+
};
|
|
165
|
+
"canvas-scale-update": {
|
|
166
|
+
canvasScaleFactor: number;
|
|
167
|
+
};
|
|
168
|
+
"resolve-promise": unknown;
|
|
169
|
+
"reject-promise": unknown;
|
|
170
|
+
"flash-element": {
|
|
171
|
+
elementId: string;
|
|
172
|
+
};
|
|
173
|
+
"set-theme": {
|
|
174
|
+
theme: unknown;
|
|
175
|
+
updateRedux?: boolean;
|
|
176
|
+
storedTypographies?: unknown;
|
|
177
|
+
};
|
|
178
|
+
getDropTarget: {
|
|
179
|
+
parentId: string;
|
|
180
|
+
};
|
|
181
|
+
keypress: {
|
|
182
|
+
keys: string;
|
|
183
|
+
eventInfo: {
|
|
184
|
+
code: string;
|
|
185
|
+
key: string;
|
|
186
|
+
altKey: boolean;
|
|
187
|
+
ctrlKey: boolean;
|
|
188
|
+
shiftKey: boolean;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
dragstart: Record<string, unknown> & {
|
|
192
|
+
type: string;
|
|
193
|
+
};
|
|
194
|
+
"sb-create-component": {
|
|
195
|
+
componentType: string;
|
|
196
|
+
parent: SourceLocation;
|
|
197
|
+
scopeName: string;
|
|
198
|
+
baseProperties?: Record<string, PropertyInfo>;
|
|
199
|
+
skipSecondaryComponentsCreation?: boolean;
|
|
200
|
+
otherComponentsUpdates?: Record<SbElement, Record<string, PropertyInfo>>;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Request a route change in the child
|
|
204
|
+
*/
|
|
205
|
+
"route-change": RouteChangePayload;
|
|
206
|
+
"ai-updates": AiUpdatesPayload["parentToChild"];
|
|
207
|
+
};
|
|
208
|
+
export type FromParentToChildMessageTypes = keyof FromParentToChildMessageTypesMap;
|
|
209
|
+
export type FromChildToParentMessageTypesMap = {
|
|
210
|
+
"sb-ready": void;
|
|
211
|
+
"iframe-action-batch": PayloadAction<unknown>[];
|
|
212
|
+
/**
|
|
213
|
+
* Navigate the parent window to a new URL
|
|
214
|
+
*/
|
|
215
|
+
"navigate-to": {
|
|
216
|
+
url: string;
|
|
217
|
+
newWindow?: boolean;
|
|
218
|
+
};
|
|
219
|
+
"sb-iframe-track-changes": Record<string, unknown>;
|
|
220
|
+
"resolve-promise": unknown;
|
|
221
|
+
"reject-promise": unknown;
|
|
222
|
+
"sb-editor-request-bootstrap": void;
|
|
223
|
+
"reload-configs": void;
|
|
224
|
+
"sb-edit-operation-request": EditOperationPayload<EditOperationType>;
|
|
225
|
+
"client:selectWidgets": {
|
|
226
|
+
sourceIds: SbElement[];
|
|
227
|
+
};
|
|
228
|
+
getDropTargetResult: {
|
|
229
|
+
offset: XYCoord;
|
|
230
|
+
size: {
|
|
231
|
+
height: number;
|
|
232
|
+
width: number;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
keypress: {
|
|
236
|
+
keys: string;
|
|
237
|
+
eventInfo: {
|
|
238
|
+
code: string;
|
|
239
|
+
key: string;
|
|
240
|
+
altKey: boolean;
|
|
241
|
+
ctrlKey: boolean;
|
|
242
|
+
shiftKey: boolean;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
"register-click": {
|
|
246
|
+
type: string;
|
|
247
|
+
context: {
|
|
248
|
+
clientX: number;
|
|
249
|
+
clientY: number;
|
|
250
|
+
sourceId: string;
|
|
251
|
+
insertionIndexes?: {
|
|
252
|
+
sectionInsertionPosition?: number;
|
|
253
|
+
columnInsertionPosition?: number;
|
|
254
|
+
stackInsertionPosition?: number;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
"api/started-execution": {
|
|
259
|
+
apiName: string;
|
|
260
|
+
};
|
|
261
|
+
"api/set-api-response": {
|
|
262
|
+
apiName: string;
|
|
263
|
+
response: unknown;
|
|
264
|
+
};
|
|
265
|
+
"api/stream-event": {
|
|
266
|
+
event: StreamEvent;
|
|
267
|
+
apiName: string;
|
|
268
|
+
};
|
|
269
|
+
"api/stream-message": {
|
|
270
|
+
message: any;
|
|
271
|
+
apiName: string;
|
|
272
|
+
};
|
|
273
|
+
"authenticate-api-request": {
|
|
274
|
+
apiId: string;
|
|
275
|
+
callbackId: string;
|
|
276
|
+
};
|
|
277
|
+
"set-apis-deployed-mode": {
|
|
278
|
+
apis: Array<DeleteMeLibraryApi & {
|
|
279
|
+
scopeId: string;
|
|
280
|
+
}>;
|
|
281
|
+
callbackId: string;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Notify the parent of a route change
|
|
285
|
+
*/
|
|
286
|
+
"route-change": RouteChangePayload;
|
|
287
|
+
"ai-updates": AiUpdatesPayload["childToParent"];
|
|
288
|
+
undo: void;
|
|
289
|
+
redo: void;
|
|
290
|
+
"socket/error": {
|
|
291
|
+
message: string;
|
|
292
|
+
};
|
|
293
|
+
"logout-integration": {
|
|
294
|
+
callbackId: string;
|
|
295
|
+
};
|
|
296
|
+
} & AppToEditorMessage<PropertiesPanelDefinition>;
|
|
297
|
+
export type FromChildToParentMessageTypes = keyof FromChildToParentMessageTypesMap;
|
|
298
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DataRouter, type Location } from "react-router";
|
|
2
|
+
import type { RootStore } from "./lib/root-store.js";
|
|
3
|
+
import type { RouteInfo } from "./lib/types.js";
|
|
4
|
+
import type { Params } from "react-router";
|
|
5
|
+
export declare class LocationStore {
|
|
6
|
+
route?: RouteInfo;
|
|
7
|
+
rootStore: RootStore;
|
|
8
|
+
constructor(rootStore: RootStore);
|
|
9
|
+
updateLocation(location: Location, routes: DataRouter["routes"], params: Readonly<Params<string>>): void;
|
|
10
|
+
sendLocationToEditor(): void;
|
|
11
|
+
updateGlobalScopeUrl(): Promise<void>;
|
|
12
|
+
locationToRouteInfo(location: Location, routes: DataRouter["routes"], params: Readonly<Params<string>>): RouteInfo | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IdentifierInfo } from "./lib/features/name-manager.js";
|
|
2
|
+
import type { ChildFunction } from "../../edit-mode/features/runtime-widgets-manager.js";
|
|
3
|
+
type ReactiveComponentProps = {
|
|
4
|
+
children: React.ReactNode | ChildFunction;
|
|
5
|
+
Component: React.FC<any>;
|
|
6
|
+
widgetProps: Record<string, unknown>;
|
|
7
|
+
showErrors?: boolean;
|
|
8
|
+
identifier: IdentifierInfo;
|
|
9
|
+
};
|
|
10
|
+
declare const WrappedReactiveComponent: (props: ReactiveComponentProps) => import("react").JSX.Element;
|
|
11
|
+
export default WrappedReactiveComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function removeBindings(props: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ExternalProps, InternalProps, PropertiesDefinition, RawPropsToExternal } from "../user-facing/properties-panel/props-builder.js";
|
|
3
|
+
import type { AnonymousSbEntity, CreateChild, PropertyInfo, Catalog, EditorConfig } from "@superblocksteam/library-shared/types";
|
|
4
|
+
export type DropTargetProps = {
|
|
5
|
+
dropTargetRef?: React.RefObject<HTMLDivElement>;
|
|
6
|
+
};
|
|
7
|
+
export type ParentInfo = {
|
|
8
|
+
isGridLike: boolean;
|
|
9
|
+
type?: string;
|
|
10
|
+
};
|
|
11
|
+
export interface CreationContext {
|
|
12
|
+
generateUniqueName: (baseName: string) => string;
|
|
13
|
+
parentInfo: ParentInfo;
|
|
14
|
+
}
|
|
15
|
+
export type PropertyValues<Def extends PropertiesDefinition> = {
|
|
16
|
+
[K in keyof GetAllPropsFromDefinition<Def>]?: PropertyInfo | PropertyValues<Def>;
|
|
17
|
+
};
|
|
18
|
+
type GetAllPropsFromDefinition<Def extends PropertiesDefinition> = {
|
|
19
|
+
[SectionKey in keyof Def]: Def[SectionKey] extends {
|
|
20
|
+
props: infer Props;
|
|
21
|
+
} ? Props extends Record<string, any> ? Props : never : never;
|
|
22
|
+
}[keyof Def];
|
|
23
|
+
export interface EditorTemplate<Def extends PropertiesDefinition> {
|
|
24
|
+
catalog?: Catalog;
|
|
25
|
+
/***
|
|
26
|
+
* Config for the newly created component when added to the canvas from the Editor.
|
|
27
|
+
* @returns a single CreateRequest or an array of CreateRequests.
|
|
28
|
+
*
|
|
29
|
+
* When returning Array<CreateRequests>:
|
|
30
|
+
* - The 1st CreateRequest's type must match the componentType passed to createComponent.
|
|
31
|
+
* - The last CreateRequest's will be the selected component after drag & drop.
|
|
32
|
+
*
|
|
33
|
+
* Example: [Modal, Button]
|
|
34
|
+
* A modal that when drag & dropped on the page will add a trigger button.
|
|
35
|
+
* The modal is closed by default, so the selected component after drop will be the trigger button.
|
|
36
|
+
*/
|
|
37
|
+
create?: (context: CreationContext) => CreateRequest<Def> | Array<CreateRequest<Def>>;
|
|
38
|
+
}
|
|
39
|
+
export interface CreateRequest<Def extends PropertiesDefinition> {
|
|
40
|
+
type: string;
|
|
41
|
+
/**
|
|
42
|
+
* Should it automatically generate a binding?
|
|
43
|
+
* e.g: <Input bind={Input1}>
|
|
44
|
+
*
|
|
45
|
+
* Default is false (no binding)
|
|
46
|
+
*
|
|
47
|
+
* `generateBinding` can also receive a string. e.g: "Input1".
|
|
48
|
+
* This is useful if you need to create children components that rely on the parent's binding (e.g: a button inside a modal to close the modal).
|
|
49
|
+
* To generate these unique names, you can use `context.generateUniqueName` and pass the component type (e.g: "Modal")
|
|
50
|
+
*
|
|
51
|
+
* A good rule of thumb:
|
|
52
|
+
* - Components that expose a user's input should have an automatically generated binding (e.g: Input, Checkbox, Table, etc)
|
|
53
|
+
* - Components that don't expose a user's input should not have an automatically generated binding (e.g: Button, Text, etc)
|
|
54
|
+
*
|
|
55
|
+
* Note:
|
|
56
|
+
* Apps builders can always manually set a binding on the editor or source code.
|
|
57
|
+
*/
|
|
58
|
+
generateBinding?: boolean | string;
|
|
59
|
+
properties?: PropertyValues<Def>;
|
|
60
|
+
createAt?: "root" | "dropLocation";
|
|
61
|
+
children?: CreateChild[];
|
|
62
|
+
}
|
|
63
|
+
export interface ChainableComponent<PD extends PropertiesDefinition, EP extends ExternalProps<PD>> extends React.FC<EP> {
|
|
64
|
+
addEditorTemplate: (config: EditorTemplate<PD>) => ChainableComponent<PD, EP>;
|
|
65
|
+
editorConfig: (config: EditorConfig) => ChainableComponent<PD, EP>;
|
|
66
|
+
isSb: symbol;
|
|
67
|
+
sbType: string;
|
|
68
|
+
displayName: string;
|
|
69
|
+
isCustomComponent: boolean;
|
|
70
|
+
isDroppable: boolean;
|
|
71
|
+
hasExtendedClickArea: boolean;
|
|
72
|
+
propertiesDefinition: PropertiesDefinition;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Register a component to be used with the framework.
|
|
76
|
+
*
|
|
77
|
+
* Returns a chainable component that can be used as a React component and also provides
|
|
78
|
+
* additional methods for editor integration.
|
|
79
|
+
*
|
|
80
|
+
* // TODO: All these params should be migrated to editor template or editorConfig
|
|
81
|
+
* @param type - The string identifier for the component type. This should be unique, is used internally to reference the component, and is also the tag name on source code.
|
|
82
|
+
* @param config - An object containing configuration options for the component:
|
|
83
|
+
* - customComponent (optional): If true, marks this as a custom user-defined component.
|
|
84
|
+
* - hasExtendedClickArea (optional): If true, the component will have an extended clickable area in the editor.
|
|
85
|
+
* - propertiesDefinition: The definition of the component's properties, used for property panel generation and validation.
|
|
86
|
+
* @param Component - The React functional component implementation. Receives internal props (including drop target props) as its argument.
|
|
87
|
+
*
|
|
88
|
+
* @returns A chainable component that can be used as a React component and also provides methods for editor integration (such as addEditorTemplate and editorConfig).
|
|
89
|
+
*/
|
|
90
|
+
export declare const registerComponentInternal: <PD extends PropertiesDefinition, EP extends ExternalProps<PD> = ExternalProps<PD>, IP extends InternalProps<PD> & DropTargetProps = InternalProps<PD> & DropTargetProps>(type: string, config: {
|
|
91
|
+
customComponent?: boolean;
|
|
92
|
+
hasExtendedClickArea?: boolean;
|
|
93
|
+
propertiesDefinition: PD;
|
|
94
|
+
}, Component: React.FC<IP>) => ChainableComponent<PD, EP>;
|
|
95
|
+
export declare function registerEntity<PROPS, PD extends PropertiesDefinition, EP extends ExternalProps<PD> = ExternalProps<PD>>(name: string, config: {
|
|
96
|
+
propertiesDefinition: PD;
|
|
97
|
+
}, Entity: (args: RawPropsToExternal<PROPS>) => EP & AnonymousSbEntity): (args: RawPropsToExternal<PROPS>) => EP & AnonymousSbEntity;
|
|
98
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Global as GlobalType } from "./types.js";
|
|
2
|
+
import type { Theme as BaseTheme, UserAccessibleTheme } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare const GlobalScope: import("react").FC<import("react").JSX.IntrinsicAttributes & {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const updateGlobalScope: (global: Record<string, unknown>) => void;
|
|
7
|
+
export type AppTheme = BaseTheme;
|
|
8
|
+
export declare const Theme: UserAccessibleTheme;
|
|
9
|
+
export declare const Global: GlobalType;
|
|
10
|
+
export declare const Embed: any;
|
|
11
|
+
export declare const Env: any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ScopeId } from "../lib/evaluator/base-entity-manager.js";
|
|
3
|
+
type State = {
|
|
4
|
+
scopeId: ScopeId;
|
|
5
|
+
};
|
|
6
|
+
export declare const ScopeProvider: React.FC<React.PropsWithChildren<State>>;
|
|
7
|
+
export declare const useScope: () => State;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SbApi } from "../../user-facing/entities/api/index.js";
|
|
3
|
+
import type { Timer } from "../../user-facing/entities/timer/index.js";
|
|
4
|
+
import type { StateVar } from "../../user-facing/entities/variable/index.js";
|
|
5
|
+
import type { ScopeInstance } from "../../user-facing/state/types.js";
|
|
6
|
+
import type { SbEvent } from "../entities.js";
|
|
7
|
+
import type { ScopeOptions } from "@superblocksteam/library-shared/types";
|
|
8
|
+
export type ScopedEntity = ReturnType<typeof Timer> | ReturnType<typeof StateVar> | ReturnType<typeof SbEvent> | ReturnType<typeof SbApi>;
|
|
9
|
+
export type Scope = {
|
|
10
|
+
[key: string]: ScopedEntity;
|
|
11
|
+
};
|
|
12
|
+
export declare function registerScope<T>(Component: React.FC<T>, scopeDef: ScopeInstance<any>, options?: ScopeOptions): React.FC<React.JSX.IntrinsicAttributes & T>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { UrlState } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { Profile, RouteDef } from "@superblocksteam/shared";
|
|
3
|
+
export declare const AppMode: {
|
|
4
|
+
readonly EDIT: "EDIT";
|
|
5
|
+
readonly PUBLISHED: "PUBLISHED";
|
|
6
|
+
readonly PREVIEW: "PREVIEW";
|
|
7
|
+
};
|
|
8
|
+
export type AppMode = (typeof AppMode)[keyof typeof AppMode];
|
|
9
|
+
export interface Global {
|
|
10
|
+
mode?: AppMode;
|
|
11
|
+
user?: User;
|
|
12
|
+
URL?: UrlState;
|
|
13
|
+
groups?: Group[];
|
|
14
|
+
deployedAt?: string;
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
selectedProfileId?: string;
|
|
17
|
+
profiles?: Profiles;
|
|
18
|
+
routes?: {
|
|
19
|
+
[id: string]: RouteDef;
|
|
20
|
+
};
|
|
21
|
+
currentRoute?: {
|
|
22
|
+
routeDef: RouteDef;
|
|
23
|
+
params: Record<string, string>;
|
|
24
|
+
};
|
|
25
|
+
app?: {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
type User = {
|
|
31
|
+
name: string;
|
|
32
|
+
email: string;
|
|
33
|
+
id: string;
|
|
34
|
+
groups: Group[];
|
|
35
|
+
username: string;
|
|
36
|
+
metadata: Record<string, unknown>;
|
|
37
|
+
};
|
|
38
|
+
type Group = {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
size: number;
|
|
42
|
+
};
|
|
43
|
+
type Profiles = {
|
|
44
|
+
available: Profile[];
|
|
45
|
+
selected?: Profile;
|
|
46
|
+
default: Profile;
|
|
47
|
+
};
|
|
48
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getWidthInColumns: (itemWidth: number, gridWidth: number, columns: number) => number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { UserAccessibleTheme } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare const ThemeProvider: React.FC<React.PropsWithChildren<{
|
|
4
|
+
theme: UserAccessibleTheme;
|
|
5
|
+
}>>;
|
|
6
|
+
export declare const useTheme: () => {
|
|
7
|
+
theme: UserAccessibleTheme;
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Name } from "./lib/evaluator/names.js";
|
|
2
|
+
import type { ChildFunction } from "../../edit-mode/features/runtime-widgets-manager.js";
|
|
3
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
declare function useTrackRuntimeWidget(instanceId: SbInstance, params: {
|
|
6
|
+
name: Name;
|
|
7
|
+
type: string;
|
|
8
|
+
props: Record<string, unknown> & {
|
|
9
|
+
children?: ReactNode[] | ReactNode | ChildFunction;
|
|
10
|
+
};
|
|
11
|
+
isEditing: boolean;
|
|
12
|
+
scopeId: string;
|
|
13
|
+
sourceId: SbElement;
|
|
14
|
+
}): void;
|
|
15
|
+
export default useTrackRuntimeWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isLocalLink(href: string): boolean;
|