@superblocksteam/library 1.99.99-next.2
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/LICENSE.txt +87 -0
- package/README.md +108 -0
- package/dist/allPaths-CCZMME3l.js +17 -0
- package/dist/allPaths-CCZMME3l.js.map +1 -0
- package/dist/allPaths-CHXNxDVP.js +17 -0
- package/dist/allPaths-CHXNxDVP.js.map +1 -0
- package/dist/allPathsLoader-DTWFaGcd.js +22 -0
- package/dist/allPathsLoader-DTWFaGcd.js.map +1 -0
- package/dist/allPathsLoader-Fr8EhLGp.js +22 -0
- package/dist/allPathsLoader-Fr8EhLGp.js.map +1 -0
- package/dist/icons-BrNMuu_I.js +40 -0
- package/dist/icons-BrNMuu_I.js.map +1 -0
- package/dist/index-BxzKdlqH.js +1353 -0
- package/dist/index-BxzKdlqH.js.map +1 -0
- package/dist/index-DIJYif9G.js +1341 -0
- package/dist/index-DIJYif9G.js.map +1 -0
- package/dist/index-DIn-fanT.js +1353 -0
- package/dist/index-DIn-fanT.js.map +1 -0
- package/dist/index-LHtbj0-V.js +1341 -0
- package/dist/index-LHtbj0-V.js.map +1 -0
- package/dist/index-U0oPeutu.js +189889 -0
- package/dist/index-U0oPeutu.js.map +1 -0
- package/dist/index.css +34239 -0
- package/dist/index.js +164 -0
- package/dist/index.js.map +1 -0
- package/dist/splitPathsBySizeLoader-DHk6oFvg.js +34 -0
- package/dist/splitPathsBySizeLoader-DHk6oFvg.js.map +1 -0
- package/dist/splitPathsBySizeLoader-PcZVWYaJ.js +34 -0
- package/dist/splitPathsBySizeLoader-PcZVWYaJ.js.map +1 -0
- package/dist-types/app-internal.d.ts +4 -0
- package/dist-types/docs-utils/generate-docs.d.ts +2 -0
- package/dist-types/edit-mode/collisions-layer.d.ts +3 -0
- package/dist-types/edit-mode/create-component.d.ts +8 -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/grid-drop.d.ts +4 -0
- package/dist-types/edit-mode/dnd/grid-store.d.ts +33 -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 +13 -0
- package/dist-types/edit-mode/duplicated-name-popover.d.ts +7 -0
- package/dist-types/edit-mode/edit-store.d.ts +28 -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/features/connection-manager.d.ts +10 -0
- package/dist-types/edit-mode/features/drag-and-drop-store.d.ts +69 -0
- package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +17 -0
- package/dist-types/edit-mode/features/operation-store.d.ts +49 -0
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +31 -0
- package/dist-types/edit-mode/features/resizing-store.d.ts +53 -0
- package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +94 -0
- package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +55 -0
- package/dist-types/edit-mode/features/ui-store.d.ts +41 -0
- package/dist-types/edit-mode/hooks/use-register-source-element.d.ts +2 -0
- package/dist-types/edit-mode/iframe-wrappers.d.ts +4 -0
- package/dist-types/edit-mode/interaction-add-section-button.d.ts +4 -0
- package/dist-types/edit-mode/interaction-layer.d.ts +11 -0
- package/dist-types/edit-mode/interaction-rect-handles.d.ts +7 -0
- package/dist-types/edit-mode/interaction-rect-name-pill.d.ts +13 -0
- package/dist-types/edit-mode/interaction-rect.d.ts +44 -0
- package/dist-types/edit-mode/interaction-utils.d.ts +4 -0
- package/dist-types/edit-mode/mobx-sync/create-patch.d.ts +2 -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/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 +9 -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 +26 -0
- package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +34 -0
- package/dist-types/internal-testing/components/api.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/icon.d.ts +1 -0
- package/dist-types/internal-testing/components/image.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 +1 -0
- package/dist-types/internal-testing/components/section-column.d.ts +1 -0
- package/dist-types/internal-testing/components/switch.d.ts +1 -0
- package/dist-types/internal-testing/components/table.d.ts +1 -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-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-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 +40 -0
- package/dist-types/lib/internal-details/actions-context.d.ts +9 -0
- package/dist-types/lib/internal-details/component-info-context.d.ts +10 -0
- package/dist-types/lib/internal-details/entities-state.d.ts +10 -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/identifier-normalizer.d.ts +9 -0
- package/dist-types/lib/internal-details/is-sb-component.d.ts +7 -0
- package/dist-types/lib/internal-details/lib/devtools.d.ts +1 -0
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +97 -0
- package/dist-types/lib/internal-details/lib/evaluator/binding-extraction.d.ts +2 -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/compute-engines.d.ts +20 -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 +2 -0
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +27 -0
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +83 -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 +7 -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/to-executables-or-values.d.ts +32 -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 +36 -0
- package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +77 -0
- package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +27 -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 +36 -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 +30 -0
- package/dist-types/lib/internal-details/lib/throttle.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/types.d.ts +226 -0
- package/dist-types/lib/internal-details/reactive-component.d.ts +10 -0
- package/dist-types/lib/internal-details/sb-wrapper-notes.d.ts +1 -0
- package/dist-types/lib/internal-details/sb-wrapper.d.ts +14 -0
- package/dist-types/lib/internal-details/scope/global.d.ts +9 -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/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/sb-trigger.d.ts +53 -0
- package/dist-types/lib/triggers/base.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +19 -0
- package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +21 -0
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +20 -0
- package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +20 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +28 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +23 -0
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +26 -0
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/run-js.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +22 -0
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +15 -0
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +18 -0
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +17 -0
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +17 -0
- package/dist-types/lib/triggers/registry.d.ts +174 -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 +46 -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/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 +18 -0
- package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +16 -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/input-validation.d.ts +17 -0
- package/dist-types/lib/user-facing/components/button/index.d.ts +37 -0
- package/dist-types/lib/user-facing/components/button/props.d.ts +48 -0
- package/dist-types/lib/user-facing/components/checkbox/checkbox-component.d.ts +9 -0
- package/dist-types/lib/user-facing/components/checkbox/index.d.ts +43 -0
- package/dist-types/lib/user-facing/components/checkbox/props.d.ts +44 -0
- package/dist-types/lib/user-facing/components/checkbox/types.d.ts +19 -0
- package/dist-types/lib/user-facing/components/column/index.d.ts +51 -0
- package/dist-types/lib/user-facing/components/column/props.d.ts +45 -0
- package/dist-types/lib/user-facing/components/container/index.d.ts +63 -0
- package/dist-types/lib/user-facing/components/container/props.d.ts +58 -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 +2 -0
- package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +27 -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 +29 -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/index.d.ts +63 -0
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +65 -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 +40 -0
- package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +24 -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/index.d.ts +73 -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/props.d.ts +76 -0
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +89 -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/order-constraints.d.ts +2 -0
- package/dist-types/lib/user-facing/components/grid/index.d.ts +36 -0
- package/dist-types/lib/user-facing/components/grid/use-height-observer.d.ts +5 -0
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +1 -0
- package/dist-types/lib/user-facing/components/icon/index.d.ts +22 -0
- package/dist-types/lib/user-facing/components/icon/props.d.ts +24 -0
- package/dist-types/lib/user-facing/components/image/image-component.d.ts +38 -0
- package/dist-types/lib/user-facing/components/image/index.d.ts +29 -0
- package/dist-types/lib/user-facing/components/image/props.d.ts +39 -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 +5 -0
- package/dist-types/lib/user-facing/components/input/index.d.ts +96 -0
- package/dist-types/lib/user-facing/components/input/input-component.d.ts +57 -0
- package/dist-types/lib/user-facing/components/input/props.d.ts +100 -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/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/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/index.d.ts +49 -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 +46 -0
- package/dist-types/lib/user-facing/components/page/index.d.ts +13 -0
- package/dist-types/lib/user-facing/components/page/props.d.ts +15 -0
- package/dist-types/lib/user-facing/components/page/register-page.d.ts +2 -0
- package/dist-types/lib/user-facing/components/section/index.d.ts +22 -0
- package/dist-types/lib/user-facing/components/section/props.d.ts +25 -0
- package/dist-types/lib/user-facing/components/slideout/index.d.ts +1 -0
- package/dist-types/lib/user-facing/components/slideout/props.d.ts +15 -0
- package/dist-types/lib/user-facing/components/stack/index.d.ts +60 -0
- package/dist-types/lib/user-facing/components/switch/index.d.ts +44 -0
- package/dist-types/lib/user-facing/components/switch/props.d.ts +45 -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 +178 -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 +62 -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 +111 -0
- package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +20 -0
- package/dist-types/lib/user-facing/components/table/index.d.ts +255 -0
- package/dist-types/lib/user-facing/components/table/props.d.ts +259 -0
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +100 -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 +78 -0
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +147 -0
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +148 -0
- package/dist-types/lib/user-facing/components/table/types.d.ts +471 -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/index.d.ts +51 -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 +60 -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 +25 -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 +20 -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/global-functions.d.ts +23 -0
- package/dist-types/lib/user-facing/hooks/use-editor.d.ts +42 -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 +43 -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 +5 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +22 -0
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +12 -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 +114 -0
- package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +6 -0
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +253 -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-panel-utils.d.ts +3 -0
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +33 -0
- package/dist-types/lib/user-facing/sb-event-flow.d.ts +52 -0
- package/dist-types/lib/user-facing/sb-provider.d.ts +12 -0
- package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +6 -0
- package/dist-types/lib/user-facing/state/create-scope.d.ts +17 -0
- package/dist-types/lib/user-facing/state/sb-computed.d.ts +2 -0
- package/dist-types/lib/user-facing/state/types.d.ts +17 -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 +80 -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-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/typeography/typography-utils.d.ts +33 -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 +16 -0
- package/dist-types/lib/user-facing/types.d.ts +22 -0
- package/dist-types/lib/user-facing/utils/form.d.ts +10 -0
- package/dist-types/lib/utils/clean-object.d.ts +5 -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/is-user-on-mac.d.ts +1 -0
- package/dist-types/lib/utils/is-widget-grid.d.ts +2 -0
- package/dist-types/lib/utils/is-widget-vstack.d.ts +2 -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/main.d.ts +1 -0
- package/package.json +151 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const lazyFunctionSymbol: unique symbol;
|
|
2
|
+
export type LazyFunction = ((...args: unknown[]) => unknown) & {
|
|
3
|
+
[lazyFunctionSymbol]: true;
|
|
4
|
+
};
|
|
5
|
+
export declare const isLazyFunction: (value: unknown) => value is LazyFunction;
|
|
6
|
+
export declare const LazyFunction: (source: string) => LazyFunction;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
2
|
+
import type { EntityDerivedProp, EntityOutputProp, SingleInputProp, InputProp, EntityFunction } from "./base-entity-manager.js";
|
|
3
|
+
import type { LazyFunction } from "./lazy-function.js";
|
|
4
|
+
import type { DataTypeString } from "@superblocksteam/library-shared/props";
|
|
5
|
+
type ExecutableType = "normal" | "mustache-bindings" | "external-function" | "event" | "lazy-function";
|
|
6
|
+
export type ExecutableOrValue = {
|
|
7
|
+
type: ExecutableType;
|
|
8
|
+
} & ({
|
|
9
|
+
type: "normal";
|
|
10
|
+
value: EntityDerivedProp | EntityOutputProp;
|
|
11
|
+
} | {
|
|
12
|
+
type: "mustache-bindings";
|
|
13
|
+
value: EntityDerivedProp | EntityOutputProp;
|
|
14
|
+
} | {
|
|
15
|
+
type: "external-function";
|
|
16
|
+
value: EntityFunction;
|
|
17
|
+
} | {
|
|
18
|
+
type: "lazy-function";
|
|
19
|
+
value: LazyFunction;
|
|
20
|
+
} | {
|
|
21
|
+
type: "event";
|
|
22
|
+
value: SbEventFlow;
|
|
23
|
+
});
|
|
24
|
+
type PathSchema = {
|
|
25
|
+
path: string;
|
|
26
|
+
};
|
|
27
|
+
type EntitySchema = PathSchema & {
|
|
28
|
+
dataType: DataTypeString;
|
|
29
|
+
};
|
|
30
|
+
export declare const toExecutablesOrValues: <T>(props: InputProp<T>, propsSchema?: EntitySchema[]) => [string, ExecutableOrValue][];
|
|
31
|
+
export declare const toExecutableOrValue: <T>(path: string, value: SingleInputProp<T>, isAnExternalFunction?: boolean) => ExecutableOrValue;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useShallowMobxObserver: <T extends Record<string, unknown>>(obj: T) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type DeleteMeLibraryApi } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { RootStore } from "../root-store.js";
|
|
3
|
+
export type ApiResult<T = any> = {
|
|
4
|
+
data?: T;
|
|
5
|
+
error?: string;
|
|
6
|
+
};
|
|
7
|
+
declare class ApiManager {
|
|
8
|
+
readonly rootStore: RootStore;
|
|
9
|
+
baseUrl: string | undefined;
|
|
10
|
+
private token;
|
|
11
|
+
private accessToken;
|
|
12
|
+
private apisByName;
|
|
13
|
+
private apiNameToDepCandidates;
|
|
14
|
+
private apiNameToApiReferences;
|
|
15
|
+
private runningApiControllers;
|
|
16
|
+
constructor(rootStore: RootStore);
|
|
17
|
+
setTokens(token: string, accessToken: string): void;
|
|
18
|
+
isInitialized(): boolean;
|
|
19
|
+
setAllApis(apis: Record<string, {
|
|
20
|
+
api: DeleteMeLibraryApi;
|
|
21
|
+
scopeId: string;
|
|
22
|
+
}>): void;
|
|
23
|
+
setApiDepCandidates(apiName: string, deps: string[]): void;
|
|
24
|
+
setApiReferences(apiName: string, deps: string[]): void;
|
|
25
|
+
updateApi(api: DeleteMeLibraryApi, scopeId: string): void;
|
|
26
|
+
deleteApi(apiName: string, scopeId?: string): void;
|
|
27
|
+
renameApi({ api, oldName, scopeId, }: {
|
|
28
|
+
api: DeleteMeLibraryApi;
|
|
29
|
+
oldName: string;
|
|
30
|
+
scopeId: string;
|
|
31
|
+
}): void;
|
|
32
|
+
runApi(apiName: string, scopeId: string): Promise<ApiResult>;
|
|
33
|
+
private findError;
|
|
34
|
+
cancelApi(apiName: string, _scopeId: string): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
export default ApiManager;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ViewMode } from "@superblocksteam/shared";
|
|
2
|
+
import type { ApiV2ExecutionRequest, ApiV2ExecutionResponse, ExecutionResponse, StreamEvent } from "../types.js";
|
|
3
|
+
import type { DeleteMeLibraryApi } from "@superblocksteam/library-shared/types";
|
|
4
|
+
import type { Agent, ApiResponseType } from "@superblocksteam/shared";
|
|
5
|
+
export declare function runApi(api: DeleteMeLibraryApi, inputs: Record<string, unknown>, orchestratorUrl: string, token: string, accessToken: string): Promise<unknown>;
|
|
6
|
+
export type ExecuteV2ApiParams = {
|
|
7
|
+
body: ApiV2ExecutionRequest;
|
|
8
|
+
api: DeleteMeLibraryApi;
|
|
9
|
+
environment: string;
|
|
10
|
+
eventType: string;
|
|
11
|
+
notifyOnSystemError: boolean;
|
|
12
|
+
responseType: ApiResponseType;
|
|
13
|
+
onMessage?: (message: any) => void;
|
|
14
|
+
processStreamEvents?: (event: StreamEvent) => void;
|
|
15
|
+
controlFlowOnlyFiles?: FileRequestParam[];
|
|
16
|
+
abortController?: AbortController;
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
agents: Array<Agent>;
|
|
19
|
+
viewMode: ViewMode;
|
|
20
|
+
accessToken: string;
|
|
21
|
+
token: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function executeV2Api(params: ExecuteV2ApiParams): Promise<ExecutionResponse | undefined | void>;
|
|
24
|
+
export declare const HttpMethod: {
|
|
25
|
+
readonly Get: "GET";
|
|
26
|
+
readonly Post: "POST";
|
|
27
|
+
readonly Put: "PUT";
|
|
28
|
+
readonly Patch: "PATCH";
|
|
29
|
+
readonly Delete: "DELETE";
|
|
30
|
+
};
|
|
31
|
+
type HttpMethodName = (typeof HttpMethod)[keyof typeof HttpMethod];
|
|
32
|
+
type FileRequestParam = {
|
|
33
|
+
originalName: string;
|
|
34
|
+
buffer: string;
|
|
35
|
+
encoding: "base64";
|
|
36
|
+
mimetype: "text/plain";
|
|
37
|
+
};
|
|
38
|
+
export interface HttpCallOptions extends BaseCallOptions {
|
|
39
|
+
baseUrl?: string;
|
|
40
|
+
controlFlowOnlyFiles?: FileRequestParam[];
|
|
41
|
+
bodyIsFormData?: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface BaseCallOptions {
|
|
44
|
+
method: HttpMethodName;
|
|
45
|
+
url: string;
|
|
46
|
+
body?: Record<string, any>;
|
|
47
|
+
query?: Record<string, string | string[]>;
|
|
48
|
+
params?: Record<string, unknown>;
|
|
49
|
+
timeout?: number;
|
|
50
|
+
abortController?: AbortController;
|
|
51
|
+
headers?: Record<string, string>;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
priority?: RequestPriority;
|
|
54
|
+
}
|
|
55
|
+
export declare const stream: ({ url, headers, body, onMessage, onComplete, onError, defaultError, method, baseUrl, signal, init: overrideInit, }: {
|
|
56
|
+
url: string;
|
|
57
|
+
init?: RequestInit;
|
|
58
|
+
headers?: Record<string, string>;
|
|
59
|
+
body?: Record<string, any>;
|
|
60
|
+
onMessage: (message: any) => void;
|
|
61
|
+
onComplete: () => void;
|
|
62
|
+
onError: (error: string, statusCode?: number) => void;
|
|
63
|
+
defaultError?: string;
|
|
64
|
+
method?: HttpMethodName;
|
|
65
|
+
baseUrl?: string;
|
|
66
|
+
signal?: AbortSignal;
|
|
67
|
+
}) => Promise<void>;
|
|
68
|
+
export declare class HttpError extends Error {
|
|
69
|
+
code: number;
|
|
70
|
+
critical: boolean;
|
|
71
|
+
constructor(code: number, critical?: boolean, m?: string);
|
|
72
|
+
}
|
|
73
|
+
export declare const parseStreamResult: (streamResult: Array<StreamEvent>, options?: {
|
|
74
|
+
includeFinalOutput?: boolean;
|
|
75
|
+
}) => undefined | ApiV2ExecutionResponse;
|
|
76
|
+
export declare const decodeBytestringsInV2ExecutionResponse: (response: ApiV2ExecutionResponse) => void;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ManagedPropsList } from "../../../user-facing/properties-panel/props-builder.js";
|
|
2
|
+
import type { RootStore } from "../root-store.js";
|
|
3
|
+
import type { ComponentRegistryShareState } from "@superblocksteam/library-shared/types";
|
|
4
|
+
import type * as React from "react";
|
|
5
|
+
export type Type = {
|
|
6
|
+
isSb: symbol;
|
|
7
|
+
sbType: string;
|
|
8
|
+
isDroppable?: boolean;
|
|
9
|
+
} & React.ComponentType<any>;
|
|
10
|
+
export declare class ComponentRegistry implements ComponentRegistryShareState {
|
|
11
|
+
readonly rootStore: RootStore;
|
|
12
|
+
private _typeRegistry;
|
|
13
|
+
private _customComponentRegistry;
|
|
14
|
+
private _managedPropsRegistry;
|
|
15
|
+
constructor(rootStore: RootStore);
|
|
16
|
+
addType(type: string, component: Type): void;
|
|
17
|
+
addCustomComponent(type: string, component: Type): void;
|
|
18
|
+
deleteCustomComponent(type: string): void;
|
|
19
|
+
renameCustomComponent(oldName: string, newName: string): void;
|
|
20
|
+
addManagedProps(type: string, props: ManagedPropsList): void;
|
|
21
|
+
deleteManagedProps(type: string): void;
|
|
22
|
+
get libraryComponentList(): string[];
|
|
23
|
+
get customComponentList(): string[];
|
|
24
|
+
get managedPropsRegistry(): Map<string, ManagedPropsList>;
|
|
25
|
+
getManagedProps(type: string): ManagedPropsList;
|
|
26
|
+
getComponent(type: string): Type | undefined;
|
|
27
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { IEntityManager } from "../evaluator/base-entity-manager.js";
|
|
2
|
+
import type { Name } from "../evaluator/names.js";
|
|
3
|
+
import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
|
|
4
|
+
export type IdentifierInfo = {
|
|
5
|
+
sourceId: SbElement;
|
|
6
|
+
name: Name;
|
|
7
|
+
instanceId: SbInstance;
|
|
8
|
+
scopeId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare class NameManager {
|
|
11
|
+
readonly entityManager: IEntityManager;
|
|
12
|
+
private _identifiers;
|
|
13
|
+
private _scopeToNameToIdentifiers;
|
|
14
|
+
private _allNamesToIdentifiers;
|
|
15
|
+
private _prefixOrderByKey;
|
|
16
|
+
constructor(entityManager: IEntityManager);
|
|
17
|
+
get scopeToNameToIds(): Record<string, Record<string, Record<SbInstance, IdentifierInfo>>>;
|
|
18
|
+
getWidgetName(instanceId: SbInstance): undefined | Name;
|
|
19
|
+
hasEntityWithName(name: string): boolean;
|
|
20
|
+
hasDuplicateNames(scopeId: string, name: string): boolean;
|
|
21
|
+
private nextNameAndIdForCombination;
|
|
22
|
+
private trackIdentifier;
|
|
23
|
+
private untrackIdentifier;
|
|
24
|
+
unregisterIdentifier(instanceId: SbInstance): void;
|
|
25
|
+
getExistingIdentifier(instanceId: SbInstance): IdentifierInfo | undefined;
|
|
26
|
+
registerAndGetIdentifiers(params: {
|
|
27
|
+
sourceId: SbElement | undefined;
|
|
28
|
+
name: string | undefined;
|
|
29
|
+
scopeId: string;
|
|
30
|
+
rootId?: SbInstance;
|
|
31
|
+
existingInstanceId?: SbInstance;
|
|
32
|
+
}): IdentifierInfo;
|
|
33
|
+
private getSharedNameCount;
|
|
34
|
+
changeWidgetName(instanceId: SbInstance, newName?: string): IdentifierInfo | null;
|
|
35
|
+
resetRootOrders(rootId: SbInstance): void;
|
|
36
|
+
}
|
|
@@ -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,30 @@
|
|
|
1
|
+
import ApiManager from "./features/api-store.js";
|
|
2
|
+
import { ComponentRegistry } from "./features/component-registry.js";
|
|
3
|
+
import { NameManager } from "./features/name-manager.js";
|
|
4
|
+
import type { IEntityManager } from "./evaluator/base-entity-manager.js";
|
|
5
|
+
import type { EditStore } from "../../../edit-mode/edit-store.js";
|
|
6
|
+
declare class RootStore {
|
|
7
|
+
apis: ApiManager;
|
|
8
|
+
nameManager: NameManager;
|
|
9
|
+
entityManager: IEntityManager;
|
|
10
|
+
componentRegistry: ComponentRegistry;
|
|
11
|
+
editStore?: EditStore;
|
|
12
|
+
private editorRegisteredCallbacks;
|
|
13
|
+
private apisLoaded;
|
|
14
|
+
private pageScopeLoaded;
|
|
15
|
+
private pageLoadedCallback?;
|
|
16
|
+
constructor();
|
|
17
|
+
setEditStore(editStore: EditStore): void;
|
|
18
|
+
onEditorRegistered(fn: () => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* There is a timing problem here between when the APIs are registered and when the scope entities are registered.
|
|
21
|
+
* Regardless of which one is done first, we need to wait for both before firing page load actions
|
|
22
|
+
*/
|
|
23
|
+
setApisLoaded(): void;
|
|
24
|
+
setPageScopeLoaded(): void;
|
|
25
|
+
private firePageLoadedCallbacks;
|
|
26
|
+
onPageLoaded(fn: () => void): void;
|
|
27
|
+
}
|
|
28
|
+
export type { RootStore };
|
|
29
|
+
declare const _default: RootStore;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
|
|
2
|
+
import type { AppToEditorMessage, DeleteMeLibraryApi, EditOperationPayload, EditOperationType, PayloadAction, PropertyInfo, SbElement, SourceLocation, TransactionInfo } 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 FromParentToChildMessageTypesMap = {
|
|
95
|
+
"sb-init": {
|
|
96
|
+
peerId: string;
|
|
97
|
+
userId?: string;
|
|
98
|
+
};
|
|
99
|
+
"sb-bootstrap-response": {
|
|
100
|
+
appId: string;
|
|
101
|
+
token: string;
|
|
102
|
+
accessToken: string;
|
|
103
|
+
agentUrl: string;
|
|
104
|
+
logContext: Record<string, unknown>;
|
|
105
|
+
};
|
|
106
|
+
"sb-editor-request-bootstrap": void;
|
|
107
|
+
"sb-update-property-with-effects": {
|
|
108
|
+
sourceId: string;
|
|
109
|
+
callbackId: string;
|
|
110
|
+
updates: Record<string, PropertyInfo<unknown>>;
|
|
111
|
+
transaction: TransactionInfo;
|
|
112
|
+
};
|
|
113
|
+
"sb-edit-operation-acknowledge": EditOperationPayload<EditOperationType>;
|
|
114
|
+
"sb-retrieve-property-panel-props": {
|
|
115
|
+
sourceId: string;
|
|
116
|
+
};
|
|
117
|
+
"parent-action-batch": PayloadAction<unknown>[];
|
|
118
|
+
click: void;
|
|
119
|
+
"register-keypress": {
|
|
120
|
+
keys: string;
|
|
121
|
+
options?: any;
|
|
122
|
+
};
|
|
123
|
+
"canvas-scale-update": {
|
|
124
|
+
canvasScaleFactor: number;
|
|
125
|
+
};
|
|
126
|
+
"resolve-promise": unknown;
|
|
127
|
+
"reject-promise": unknown;
|
|
128
|
+
"flash-element": {
|
|
129
|
+
elementId: string;
|
|
130
|
+
};
|
|
131
|
+
"set-theme": {
|
|
132
|
+
theme: unknown;
|
|
133
|
+
updateRedux?: boolean;
|
|
134
|
+
storedTypographies?: unknown;
|
|
135
|
+
};
|
|
136
|
+
getDropTarget: {
|
|
137
|
+
parentId: string;
|
|
138
|
+
};
|
|
139
|
+
keypress: {
|
|
140
|
+
keys: string;
|
|
141
|
+
eventInfo: {
|
|
142
|
+
code: string;
|
|
143
|
+
key: string;
|
|
144
|
+
altKey: boolean;
|
|
145
|
+
ctrlKey: boolean;
|
|
146
|
+
shiftKey: boolean;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
dragstart: Record<string, unknown> & {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
"sb-create-component": {
|
|
153
|
+
componentType: string;
|
|
154
|
+
parent: SourceLocation;
|
|
155
|
+
scopeName: string;
|
|
156
|
+
baseProperties?: Record<string, PropertyInfo>;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export type FromParentToChildMessageTypes = keyof FromParentToChildMessageTypesMap;
|
|
160
|
+
export type FromChildToParentMessageTypesMap = {
|
|
161
|
+
"sb-ready": void;
|
|
162
|
+
"iframe-action-batch": PayloadAction<unknown>[];
|
|
163
|
+
"navigate-to": {
|
|
164
|
+
url: string;
|
|
165
|
+
newWindow?: boolean;
|
|
166
|
+
};
|
|
167
|
+
"sb-iframe-track-changes": Record<string, unknown>;
|
|
168
|
+
"resolve-promise": unknown;
|
|
169
|
+
"reject-promise": unknown;
|
|
170
|
+
"sb-editor-request-bootstrap": void;
|
|
171
|
+
"reload-configs": void;
|
|
172
|
+
"sb-edit-operation-request": EditOperationPayload<EditOperationType>;
|
|
173
|
+
"client:selectWidgets": {
|
|
174
|
+
sourceIds: SbElement[];
|
|
175
|
+
selectingMultiple: boolean;
|
|
176
|
+
};
|
|
177
|
+
getDropTargetResult: {
|
|
178
|
+
offset: XYCoord;
|
|
179
|
+
size: {
|
|
180
|
+
height: number;
|
|
181
|
+
width: number;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
keypress: {
|
|
185
|
+
keys: string;
|
|
186
|
+
eventInfo: {
|
|
187
|
+
code: string;
|
|
188
|
+
key: string;
|
|
189
|
+
altKey: boolean;
|
|
190
|
+
ctrlKey: boolean;
|
|
191
|
+
shiftKey: boolean;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
"register-click": {
|
|
195
|
+
type: string;
|
|
196
|
+
context: {
|
|
197
|
+
clientX: number;
|
|
198
|
+
clientY: number;
|
|
199
|
+
sourceId: string;
|
|
200
|
+
insertionIndexes?: {
|
|
201
|
+
sectionInsertionPosition?: number;
|
|
202
|
+
columnInsertionPosition?: number;
|
|
203
|
+
stackInsertionPosition?: number;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
"api/started-execution": {
|
|
208
|
+
apiName: string;
|
|
209
|
+
};
|
|
210
|
+
"api/set-api-response": {
|
|
211
|
+
apiName: string;
|
|
212
|
+
response: unknown;
|
|
213
|
+
};
|
|
214
|
+
"api/stream-event": {
|
|
215
|
+
event: StreamEvent;
|
|
216
|
+
apiName: string;
|
|
217
|
+
};
|
|
218
|
+
"api/stream-message": {
|
|
219
|
+
message: any;
|
|
220
|
+
apiName: string;
|
|
221
|
+
};
|
|
222
|
+
undo: void;
|
|
223
|
+
redo: void;
|
|
224
|
+
} & AppToEditorMessage<PropertiesPanelDefinition>;
|
|
225
|
+
export type FromChildToParentMessageTypes = keyof FromChildToParentMessageTypesMap;
|
|
226
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IdentifierInfo } from "./lib/features/name-manager.js";
|
|
2
|
+
import type { ChildFunction } from "../../edit-mode/features/runtime-widgets-manager.js";
|
|
3
|
+
declare const ReactiveComponent: import("react").FunctionComponent<{
|
|
4
|
+
children: React.ReactNode | ChildFunction;
|
|
5
|
+
Component: React.FC<any>;
|
|
6
|
+
widgetProps: Record<string, unknown>;
|
|
7
|
+
showErrors?: boolean;
|
|
8
|
+
identifier: IdentifierInfo;
|
|
9
|
+
}>;
|
|
10
|
+
export default ReactiveComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ExternalProps, InternalProps, PropertiesDefinition, RawPropsToExternal } from "../user-facing/properties-panel/props-builder.js";
|
|
3
|
+
import type { AnonymousSbEntity } from "@superblocksteam/library-shared/types";
|
|
4
|
+
export type DropTargetProps = {
|
|
5
|
+
dropTargetRef?: React.RefObject<HTMLDivElement>;
|
|
6
|
+
};
|
|
7
|
+
export declare const registerSbComponent: <PD extends PropertiesDefinition, EP extends ExternalProps<PD> = ExternalProps<PD>, IP extends InternalProps<PD> & DropTargetProps = InternalProps<PD> & DropTargetProps>(type: string, config: {
|
|
8
|
+
container?: boolean;
|
|
9
|
+
customComponent?: boolean;
|
|
10
|
+
propertiesDefinition: PD;
|
|
11
|
+
}, Component: React.FC<IP>) => React.FC<EP>;
|
|
12
|
+
export declare function registerSbEntity<PROPS, PD extends PropertiesDefinition, EP extends ExternalProps<PD> = ExternalProps<PD>>(name: string, config: {
|
|
13
|
+
propertiesDefinition: PD;
|
|
14
|
+
}, Entity: (args: RawPropsToExternal<PROPS>) => EP & AnonymousSbEntity): (args: RawPropsToExternal<PROPS>) => EP & AnonymousSbEntity;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UserAccessibleTheme, Theme as BaseTheme } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export declare const GlobalScope: import("react").FC<import("react").JSX.IntrinsicAttributes & {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}>;
|
|
5
|
+
export type AppTheme = BaseTheme;
|
|
6
|
+
export declare const Theme: UserAccessibleTheme;
|
|
7
|
+
export declare const Global: any;
|
|
8
|
+
export declare const Embed: any;
|
|
9
|
+
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 { SbTimer } from "../../user-facing/entities/timer/index.js";
|
|
4
|
+
import type { SbVariable } from "../../user-facing/entities/variable/index.js";
|
|
5
|
+
import type { SbScopeInstance } 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 SbTimer> | ReturnType<typeof SbVariable> | 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: SbScopeInstance<any>, options?: ScopeOptions): React.FC<React.JSX.IntrinsicAttributes & T>;
|
|
@@ -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;
|