@questpie/admin 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +245 -474
- package/dist/_virtual/rolldown_runtime.mjs +18 -0
- package/dist/augmentation.d.mts +315 -0
- package/dist/augmentation.d.mts.map +1 -0
- package/dist/client/blocks/block-registry.d.mts +199 -0
- package/dist/client/blocks/block-registry.d.mts.map +1 -0
- package/dist/client/blocks/block-registry.mjs +88 -0
- package/dist/client/blocks/block-registry.mjs.map +1 -0
- package/dist/client/blocks/block-renderer.d.mts +52 -0
- package/dist/client/blocks/block-renderer.d.mts.map +1 -0
- package/dist/client/blocks/block-renderer.mjs +71 -0
- package/dist/client/blocks/block-renderer.mjs.map +1 -0
- package/dist/client/blocks/index.d.mts +4 -0
- package/dist/client/blocks/prefetch.d.mts +45 -0
- package/dist/client/blocks/prefetch.d.mts.map +1 -0
- package/dist/client/blocks/prefetch.mjs +26 -0
- package/dist/client/blocks/prefetch.mjs.map +1 -0
- package/dist/client/blocks/types.d.mts +69 -0
- package/dist/client/blocks/types.d.mts.map +1 -0
- package/dist/client/blocks/types.mjs +20 -0
- package/dist/client/blocks/types.mjs.map +1 -0
- package/dist/client/builder/admin-builder.d.mts +112 -0
- package/dist/client/builder/admin-builder.d.mts.map +1 -0
- package/dist/client/builder/admin-builder.mjs +185 -0
- package/dist/client/builder/admin-builder.mjs.map +1 -0
- package/dist/client/builder/admin-types.d.mts +73 -0
- package/dist/client/builder/admin-types.d.mts.map +1 -0
- package/dist/client/builder/admin.d.mts +121 -0
- package/dist/client/builder/admin.d.mts.map +1 -0
- package/dist/client/builder/admin.mjs +160 -0
- package/dist/client/builder/admin.mjs.map +1 -0
- package/dist/client/builder/defaults/components.mjs +20 -0
- package/dist/client/builder/defaults/components.mjs.map +1 -0
- package/dist/client/builder/defaults/core.d.mts +354 -0
- package/dist/client/builder/defaults/core.d.mts.map +1 -0
- package/dist/client/builder/defaults/core.mjs +49 -0
- package/dist/client/builder/defaults/core.mjs.map +1 -0
- package/dist/client/builder/defaults/fields.mjs +328 -0
- package/dist/client/builder/defaults/fields.mjs.map +1 -0
- package/dist/client/builder/defaults/pages.mjs +58 -0
- package/dist/client/builder/defaults/pages.mjs.map +1 -0
- package/dist/client/builder/defaults/starter.d.mts +351 -0
- package/dist/client/builder/defaults/starter.d.mts.map +1 -0
- package/dist/client/builder/defaults/starter.mjs +28 -0
- package/dist/client/builder/defaults/starter.mjs.map +1 -0
- package/dist/client/builder/defaults/views.mjs +27 -0
- package/dist/client/builder/defaults/views.mjs.map +1 -0
- package/dist/client/builder/defaults/widgets.mjs +31 -0
- package/dist/client/builder/defaults/widgets.mjs.map +1 -0
- package/dist/client/builder/field/field.d.mts +229 -0
- package/dist/client/builder/field/field.d.mts.map +1 -0
- package/dist/client/builder/field/field.mjs +83 -0
- package/dist/client/builder/field/field.mjs.map +1 -0
- package/dist/client/builder/index.d.mts +36 -0
- package/dist/client/builder/index.d.mts.map +1 -0
- package/dist/client/builder/page/page.d.mts +36 -0
- package/dist/client/builder/page/page.d.mts.map +1 -0
- package/dist/client/builder/page/page.mjs +27 -0
- package/dist/client/builder/page/page.mjs.map +1 -0
- package/dist/client/builder/proxies.d.mts +2 -0
- package/dist/client/builder/proxies.mjs +24 -0
- package/dist/client/builder/proxies.mjs.map +1 -0
- package/dist/client/builder/qa.d.mts +50 -0
- package/dist/client/builder/qa.d.mts.map +1 -0
- package/dist/client/builder/qa.mjs +42 -0
- package/dist/client/builder/qa.mjs.map +1 -0
- package/dist/client/builder/registry.d.mts +70 -0
- package/dist/client/builder/registry.d.mts.map +1 -0
- package/dist/client/builder/types/action-registry.d.mts +2 -0
- package/dist/client/builder/types/action-registry.mjs +142 -0
- package/dist/client/builder/types/action-registry.mjs.map +1 -0
- package/dist/client/builder/types/action-types.d.mts +253 -0
- package/dist/client/builder/types/action-types.d.mts.map +1 -0
- package/dist/client/builder/types/collection-types.d.mts +199 -0
- package/dist/client/builder/types/collection-types.d.mts.map +1 -0
- package/dist/client/builder/types/collection-types.mjs +11 -0
- package/dist/client/builder/types/collection-types.mjs.map +1 -0
- package/dist/client/builder/types/common.d.mts +60 -0
- package/dist/client/builder/types/common.d.mts.map +1 -0
- package/dist/client/builder/types/field-types.d.mts +593 -0
- package/dist/client/builder/types/field-types.d.mts.map +1 -0
- package/dist/client/builder/types/field-types.mjs +19 -0
- package/dist/client/builder/types/field-types.mjs.map +1 -0
- package/dist/client/builder/types/global-types.d.mts +22 -0
- package/dist/client/builder/types/global-types.d.mts.map +1 -0
- package/dist/client/builder/types/ui-config.d.mts +160 -0
- package/dist/client/builder/types/ui-config.d.mts.map +1 -0
- package/dist/client/builder/types/views.d.mts +89 -0
- package/dist/client/builder/types/views.d.mts.map +1 -0
- package/dist/client/builder/types/widget-types.d.mts +563 -0
- package/dist/client/builder/types/widget-types.d.mts.map +1 -0
- package/dist/client/builder/validation.d.mts +3 -0
- package/dist/client/builder/validation.mjs +208 -0
- package/dist/client/builder/validation.mjs.map +1 -0
- package/dist/client/builder/view/view.d.mts +129 -0
- package/dist/client/builder/view/view.d.mts.map +1 -0
- package/dist/client/builder/view/view.mjs +109 -0
- package/dist/client/builder/view/view.mjs.map +1 -0
- package/dist/client/builder/widget/widget.d.mts +33 -0
- package/dist/client/builder/widget/widget.d.mts.map +1 -0
- package/dist/client/builder/widget/widget.mjs +26 -0
- package/dist/client/builder/widget/widget.mjs.map +1 -0
- package/dist/client/components/actions/action-button.d.mts +2 -0
- package/dist/client/components/actions/action-button.mjs +135 -0
- package/dist/client/components/actions/action-button.mjs.map +1 -0
- package/dist/client/components/actions/action-dialog.d.mts +2 -0
- package/dist/client/components/actions/action-dialog.mjs +264 -0
- package/dist/client/components/actions/action-dialog.mjs.map +1 -0
- package/dist/client/components/actions/confirmation-dialog.d.mts +2 -0
- package/dist/client/components/actions/confirmation-dialog.mjs +82 -0
- package/dist/client/components/actions/confirmation-dialog.mjs.map +1 -0
- package/dist/client/components/actions/header-actions.d.mts +2 -0
- package/dist/client/components/actions/header-actions.mjs +117 -0
- package/dist/client/components/actions/header-actions.mjs.map +1 -0
- package/dist/client/components/actions/index.d.mts +4 -0
- package/dist/client/components/admin-link.d.mts +67 -0
- package/dist/client/components/admin-link.d.mts.map +1 -0
- package/dist/client/components/admin-link.mjs +92 -0
- package/dist/client/components/admin-link.mjs.map +1 -0
- package/dist/client/components/auth/auth-guard.d.mts +51 -0
- package/dist/client/components/auth/auth-guard.d.mts.map +1 -0
- package/dist/client/components/auth/auth-guard.mjs +60 -0
- package/dist/client/components/auth/auth-guard.mjs.map +1 -0
- package/dist/client/components/auth/auth-loading.d.mts +36 -0
- package/dist/client/components/auth/auth-loading.d.mts.map +1 -0
- package/dist/client/components/auth/auth-loading.mjs +27 -0
- package/dist/client/components/auth/auth-loading.mjs.map +1 -0
- package/dist/client/components/auth/index.d.mts +2 -0
- package/dist/client/components/blocks/block-canvas.mjs +90 -0
- package/dist/client/components/blocks/block-canvas.mjs.map +1 -0
- package/dist/client/components/blocks/block-editor-context.mjs +58 -0
- package/dist/client/components/blocks/block-editor-context.mjs.map +1 -0
- package/dist/client/components/blocks/block-editor-layout.mjs +82 -0
- package/dist/client/components/blocks/block-editor-layout.mjs.map +1 -0
- package/dist/client/components/blocks/block-editor-provider.mjs +155 -0
- package/dist/client/components/blocks/block-editor-provider.mjs.map +1 -0
- package/dist/client/components/blocks/block-fields-renderer.mjs +70 -0
- package/dist/client/components/blocks/block-fields-renderer.mjs.map +1 -0
- package/dist/client/components/blocks/block-insert-button.mjs +72 -0
- package/dist/client/components/blocks/block-insert-button.mjs.map +1 -0
- package/dist/client/components/blocks/block-item-menu.mjs +161 -0
- package/dist/client/components/blocks/block-item-menu.mjs.map +1 -0
- package/dist/client/components/blocks/block-item.mjs +187 -0
- package/dist/client/components/blocks/block-item.mjs.map +1 -0
- package/dist/client/components/blocks/block-library-sidebar.mjs +190 -0
- package/dist/client/components/blocks/block-library-sidebar.mjs.map +1 -0
- package/dist/client/components/blocks/block-tree.mjs +45 -0
- package/dist/client/components/blocks/block-tree.mjs.map +1 -0
- package/dist/client/components/blocks/block-type-icon.mjs +50 -0
- package/dist/client/components/blocks/block-type-icon.mjs.map +1 -0
- package/dist/client/components/blocks/utils/tree-utils.mjs +186 -0
- package/dist/client/components/blocks/utils/tree-utils.mjs.map +1 -0
- package/dist/client/components/component-renderer.d.mts +125 -0
- package/dist/client/components/component-renderer.d.mts.map +1 -0
- package/dist/client/components/component-renderer.mjs +145 -0
- package/dist/client/components/component-renderer.mjs.map +1 -0
- package/dist/client/components/error-boundary.mjs +92 -0
- package/dist/client/components/error-boundary.mjs.map +1 -0
- package/dist/client/components/fields/array-field.d.mts +44 -0
- package/dist/client/components/fields/array-field.d.mts.map +1 -0
- package/dist/client/components/fields/array-field.mjs +231 -0
- package/dist/client/components/fields/array-field.mjs.map +1 -0
- package/dist/client/components/fields/asset-preview-field.d.mts +52 -0
- package/dist/client/components/fields/asset-preview-field.d.mts.map +1 -0
- package/dist/client/components/fields/asset-preview-field.mjs +60 -0
- package/dist/client/components/fields/asset-preview-field.mjs.map +1 -0
- package/dist/client/components/fields/blocks-field/blocks-field.d.mts +41 -0
- package/dist/client/components/fields/blocks-field/blocks-field.d.mts.map +1 -0
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +101 -0
- package/dist/client/components/fields/blocks-field/blocks-field.mjs.map +1 -0
- package/dist/client/components/fields/blocks-field/index.d.mts +1 -0
- package/dist/client/components/fields/boolean-field.d.mts +30 -0
- package/dist/client/components/fields/boolean-field.d.mts.map +1 -0
- package/dist/client/components/fields/boolean-field.mjs +47 -0
- package/dist/client/components/fields/boolean-field.mjs.map +1 -0
- package/dist/client/components/fields/custom-field.d.mts +3 -0
- package/dist/client/components/fields/date-field.d.mts +22 -0
- package/dist/client/components/fields/date-field.d.mts.map +1 -0
- package/dist/client/components/fields/date-field.mjs +42 -0
- package/dist/client/components/fields/date-field.mjs.map +1 -0
- package/dist/client/components/fields/datetime-field.d.mts +23 -0
- package/dist/client/components/fields/datetime-field.d.mts.map +1 -0
- package/dist/client/components/fields/datetime-field.mjs +43 -0
- package/dist/client/components/fields/datetime-field.mjs.map +1 -0
- package/dist/client/components/fields/email-field.d.mts +19 -0
- package/dist/client/components/fields/email-field.d.mts.map +1 -0
- package/dist/client/components/fields/email-field.mjs +38 -0
- package/dist/client/components/fields/email-field.mjs.map +1 -0
- package/dist/client/components/fields/embedded-collection.d.mts +3 -0
- package/dist/client/components/fields/field-types.d.mts +571 -0
- package/dist/client/components/fields/field-types.d.mts.map +1 -0
- package/dist/client/components/fields/field-utils.d.mts +1 -0
- package/dist/client/components/fields/field-utils.mjs +65 -0
- package/dist/client/components/fields/field-utils.mjs.map +1 -0
- package/dist/client/components/fields/field-wrapper.d.mts +3 -0
- package/dist/client/components/fields/field-wrapper.mjs +49 -0
- package/dist/client/components/fields/field-wrapper.mjs.map +1 -0
- package/dist/client/components/fields/index.d.mts +33 -0
- package/dist/client/components/fields/json-field.d.mts +84 -0
- package/dist/client/components/fields/json-field.d.mts.map +1 -0
- package/dist/client/components/fields/json-field.mjs +248 -0
- package/dist/client/components/fields/json-field.mjs.map +1 -0
- package/dist/client/components/fields/locale-badge.d.mts +1 -0
- package/dist/client/components/fields/locale-badge.mjs +17 -0
- package/dist/client/components/fields/locale-badge.mjs.map +1 -0
- package/dist/client/components/fields/number-field.d.mts +23 -0
- package/dist/client/components/fields/number-field.d.mts.map +1 -0
- package/dist/client/components/fields/number-field.mjs +40 -0
- package/dist/client/components/fields/number-field.mjs.map +1 -0
- package/dist/client/components/fields/object-array-field.d.mts +2 -0
- package/dist/client/components/fields/object-array-field.mjs +313 -0
- package/dist/client/components/fields/object-array-field.mjs.map +1 -0
- package/dist/client/components/fields/object-field.d.mts +32 -0
- package/dist/client/components/fields/object-field.d.mts.map +1 -0
- package/dist/client/components/fields/object-field.mjs +128 -0
- package/dist/client/components/fields/object-field.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/cards-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/cards-display.mjs +140 -0
- package/dist/client/components/fields/relation/displays/cards-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/chips-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/chips-display.mjs +100 -0
- package/dist/client/components/fields/relation/displays/chips-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/grid-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/grid-display.mjs +114 -0
- package/dist/client/components/fields/relation/displays/grid-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/index.d.mts +6 -0
- package/dist/client/components/fields/relation/displays/list-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/list-display.mjs +128 -0
- package/dist/client/components/fields/relation/displays/list-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/table-display.d.mts +2 -0
- package/dist/client/components/fields/relation/displays/table-display.mjs +134 -0
- package/dist/client/components/fields/relation/displays/table-display.mjs.map +1 -0
- package/dist/client/components/fields/relation/displays/types.d.mts +22 -0
- package/dist/client/components/fields/relation/displays/types.d.mts.map +1 -0
- package/dist/client/components/fields/relation/displays/types.mjs +73 -0
- package/dist/client/components/fields/relation/displays/types.mjs.map +1 -0
- package/dist/client/components/fields/relation/index.d.mts +3 -0
- package/dist/client/components/fields/relation/relation-items-display.d.mts +5 -0
- package/dist/client/components/fields/relation/relation-items-display.mjs +47 -0
- package/dist/client/components/fields/relation/relation-items-display.mjs.map +1 -0
- package/dist/client/components/fields/relation-field.d.mts +134 -0
- package/dist/client/components/fields/relation-field.d.mts.map +1 -0
- package/dist/client/components/fields/relation-field.mjs +106 -0
- package/dist/client/components/fields/relation-field.mjs.map +1 -0
- package/dist/client/components/fields/relation-picker.d.mts +4 -0
- package/dist/client/components/fields/relation-picker.mjs +301 -0
- package/dist/client/components/fields/relation-picker.mjs.map +1 -0
- package/dist/client/components/fields/relation-select.d.mts +3 -0
- package/dist/client/components/fields/relation-select.mjs +219 -0
- package/dist/client/components/fields/relation-select.mjs.map +1 -0
- package/dist/client/components/fields/reverse-relation-field.d.mts +2 -0
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +56 -0
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +118 -0
- package/dist/client/components/fields/rich-text-editor/extensions.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +196 -0
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +4 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +187 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +86 -0
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +11 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts.map +1 -0
- package/dist/client/components/fields/rich-text-editor/presets.mjs +124 -0
- package/dist/client/components/fields/rich-text-editor/presets.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +145 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs +124 -0
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +280 -0
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/types.d.mts +78 -0
- package/dist/client/components/fields/rich-text-editor/types.d.mts.map +1 -0
- package/dist/client/components/fields/rich-text-editor/types.mjs +31 -0
- package/dist/client/components/fields/rich-text-editor/types.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/utils.mjs +51 -0
- package/dist/client/components/fields/rich-text-editor/utils.mjs.map +1 -0
- package/dist/client/components/fields/rich-text-editor/variants.d.mts +2 -0
- package/dist/client/components/fields/rich-text-field.d.mts +14 -0
- package/dist/client/components/fields/rich-text-field.d.mts.map +1 -0
- package/dist/client/components/fields/rich-text-field.mjs +26 -0
- package/dist/client/components/fields/rich-text-field.mjs.map +1 -0
- package/dist/client/components/fields/select-field.d.mts +25 -0
- package/dist/client/components/fields/select-field.d.mts.map +1 -0
- package/dist/client/components/fields/select-field.mjs +53 -0
- package/dist/client/components/fields/select-field.mjs.map +1 -0
- package/dist/client/components/fields/status-field.d.mts +2 -0
- package/dist/client/components/fields/text-field.d.mts +22 -0
- package/dist/client/components/fields/text-field.d.mts.map +1 -0
- package/dist/client/components/fields/text-field.mjs +39 -0
- package/dist/client/components/fields/text-field.mjs.map +1 -0
- package/dist/client/components/fields/textarea-field.d.mts +22 -0
- package/dist/client/components/fields/textarea-field.d.mts.map +1 -0
- package/dist/client/components/fields/textarea-field.mjs +39 -0
- package/dist/client/components/fields/textarea-field.mjs.map +1 -0
- package/dist/client/components/fields/time-field.d.mts +20 -0
- package/dist/client/components/fields/time-field.d.mts.map +1 -0
- package/dist/client/components/fields/time-field.mjs +39 -0
- package/dist/client/components/fields/time-field.mjs.map +1 -0
- package/dist/client/components/fields/upload-field.d.mts +97 -0
- package/dist/client/components/fields/upload-field.d.mts.map +1 -0
- package/dist/client/components/fields/upload-field.mjs +497 -0
- package/dist/client/components/fields/upload-field.mjs.map +1 -0
- package/dist/client/components/filter-builder/columns-tab.d.mts +1 -0
- package/dist/client/components/filter-builder/columns-tab.mjs +131 -0
- package/dist/client/components/filter-builder/columns-tab.mjs.map +1 -0
- package/dist/client/components/filter-builder/filter-builder-sheet.d.mts +1 -0
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +157 -0
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs.map +1 -0
- package/dist/client/components/filter-builder/filters-tab.d.mts +1 -0
- package/dist/client/components/filter-builder/filters-tab.mjs +380 -0
- package/dist/client/components/filter-builder/filters-tab.mjs.map +1 -0
- package/dist/client/components/filter-builder/index.d.mts +5 -0
- package/dist/client/components/filter-builder/saved-views-tab.d.mts +1 -0
- package/dist/client/components/filter-builder/saved-views-tab.mjs +125 -0
- package/dist/client/components/filter-builder/saved-views-tab.mjs.map +1 -0
- package/dist/client/components/index.d.mts +80 -0
- package/dist/client/components/locale-switcher.d.mts +2 -0
- package/dist/client/components/locale-switcher.mjs +128 -0
- package/dist/client/components/locale-switcher.mjs.map +1 -0
- package/dist/client/components/media/media-grid.mjs +139 -0
- package/dist/client/components/media/media-grid.mjs.map +1 -0
- package/dist/client/components/media/media-picker-dialog.mjs +255 -0
- package/dist/client/components/media/media-picker-dialog.mjs.map +1 -0
- package/dist/client/components/preview/live-preview-mode.mjs +211 -0
- package/dist/client/components/preview/live-preview-mode.mjs.map +1 -0
- package/dist/client/components/preview/preview-pane.mjs +179 -0
- package/dist/client/components/preview/preview-pane.mjs.map +1 -0
- package/dist/client/components/primitives/asset-preview.mjs +363 -0
- package/dist/client/components/primitives/asset-preview.mjs.map +1 -0
- package/dist/client/components/primitives/checkbox-input.mjs +33 -0
- package/dist/client/components/primitives/checkbox-input.mjs.map +1 -0
- package/dist/client/components/primitives/date-input.mjs +218 -0
- package/dist/client/components/primitives/date-input.mjs.map +1 -0
- package/dist/client/components/primitives/dropzone.mjs +239 -0
- package/dist/client/components/primitives/dropzone.mjs.map +1 -0
- package/dist/client/components/primitives/number-input.mjs +113 -0
- package/dist/client/components/primitives/number-input.mjs.map +1 -0
- package/dist/client/components/primitives/select-multi.mjs +256 -0
- package/dist/client/components/primitives/select-multi.mjs.map +1 -0
- package/dist/client/components/primitives/select-single.mjs +183 -0
- package/dist/client/components/primitives/select-single.mjs.map +1 -0
- package/dist/client/components/primitives/text-input.mjs +40 -0
- package/dist/client/components/primitives/text-input.mjs.map +1 -0
- package/dist/client/components/primitives/textarea-input.mjs +38 -0
- package/dist/client/components/primitives/textarea-input.mjs.map +1 -0
- package/dist/client/components/primitives/time-input.mjs +72 -0
- package/dist/client/components/primitives/time-input.mjs.map +1 -0
- package/dist/client/components/primitives/toggle-input.mjs +31 -0
- package/dist/client/components/primitives/toggle-input.mjs.map +1 -0
- package/dist/client/components/primitives/types.d.mts +14 -0
- package/dist/client/components/primitives/types.d.mts.map +1 -0
- package/dist/client/components/primitives/types.mjs +13 -0
- package/dist/client/components/primitives/types.mjs.map +1 -0
- package/dist/client/components/sheets/index.d.mts +1 -0
- package/dist/client/components/sheets/resource-sheet.d.mts +1 -0
- package/dist/client/components/sheets/resource-sheet.mjs +78 -0
- package/dist/client/components/sheets/resource-sheet.mjs.map +1 -0
- package/dist/client/components/ui/accordion.d.mts +2 -0
- package/dist/client/components/ui/accordion.mjs +50 -0
- package/dist/client/components/ui/accordion.mjs.map +1 -0
- package/dist/client/components/ui/alert.mjs +32 -0
- package/dist/client/components/ui/alert.mjs.map +1 -0
- package/dist/client/components/ui/avatar.d.mts +3 -0
- package/dist/client/components/ui/badge.d.mts +3 -0
- package/dist/client/components/ui/badge.mjs +35 -0
- package/dist/client/components/ui/badge.mjs.map +1 -0
- package/dist/client/components/ui/button.d.mts +3 -0
- package/dist/client/components/ui/button.mjs +49 -0
- package/dist/client/components/ui/button.mjs.map +1 -0
- package/dist/client/components/ui/card.d.mts +2 -0
- package/dist/{card-BKHjBQfw.mjs → client/components/ui/card.mjs} +3 -10
- package/dist/{card-BKHjBQfw.mjs.map → client/components/ui/card.mjs.map} +1 -1
- package/dist/client/components/ui/checkbox.d.mts +2 -0
- package/dist/client/components/ui/checkbox.mjs +27 -0
- package/dist/client/components/ui/checkbox.mjs.map +1 -0
- package/dist/client/components/ui/combobox.d.mts +3 -0
- package/dist/client/components/ui/command.mjs +69 -0
- package/dist/client/components/ui/command.mjs.map +1 -0
- package/dist/client/components/ui/dialog.d.mts +3 -0
- package/dist/client/components/ui/dialog.mjs +83 -0
- package/dist/client/components/ui/dialog.mjs.map +1 -0
- package/dist/client/components/ui/drawer.mjs +75 -0
- package/dist/client/components/ui/drawer.mjs.map +1 -0
- package/dist/client/components/ui/dropdown-menu.d.mts +3 -0
- package/dist/client/components/ui/dropdown-menu.mjs +89 -0
- package/dist/client/components/ui/dropdown-menu.mjs.map +1 -0
- package/dist/client/components/ui/empty-state.mjs +53 -0
- package/dist/client/components/ui/empty-state.mjs.map +1 -0
- package/dist/client/components/ui/field.d.mts +3 -0
- package/dist/client/components/ui/field.mjs +78 -0
- package/dist/client/components/ui/field.mjs.map +1 -0
- package/dist/client/components/ui/input-group.d.mts +4 -0
- package/dist/client/components/ui/input-group.mjs +68 -0
- package/dist/client/components/ui/input-group.mjs.map +1 -0
- package/dist/client/components/ui/input.d.mts +2 -0
- package/dist/client/components/ui/input.mjs +17 -0
- package/dist/client/components/ui/input.mjs.map +1 -0
- package/dist/client/components/ui/kbd.mjs +24 -0
- package/dist/client/components/ui/kbd.mjs.map +1 -0
- package/dist/client/components/ui/label.d.mts +2 -0
- package/dist/client/components/ui/label.mjs +15 -0
- package/dist/client/components/ui/label.mjs.map +1 -0
- package/dist/client/components/ui/popover.d.mts +3 -0
- package/dist/client/components/ui/popover.mjs +49 -0
- package/dist/client/components/ui/popover.mjs.map +1 -0
- package/dist/client/components/ui/responsive-dialog.mjs +102 -0
- package/dist/client/components/ui/responsive-dialog.mjs.map +1 -0
- package/dist/client/components/ui/scroll-area.d.mts +2 -0
- package/dist/client/components/ui/search-input.mjs +74 -0
- package/dist/client/components/ui/search-input.mjs.map +1 -0
- package/dist/client/components/ui/select.d.mts +3 -0
- package/dist/client/components/ui/select.mjs +85 -0
- package/dist/client/components/ui/select.mjs.map +1 -0
- package/dist/client/components/ui/separator.d.mts +2 -0
- package/dist/client/components/ui/separator.mjs +17 -0
- package/dist/client/components/ui/separator.mjs.map +1 -0
- package/dist/client/components/ui/sheet.d.mts +3 -0
- package/dist/client/components/ui/sheet.mjs +78 -0
- package/dist/client/components/ui/sheet.mjs.map +1 -0
- package/dist/client/components/ui/sidebar.d.mts +8 -0
- package/dist/client/components/ui/sidebar.mjs +256 -0
- package/dist/client/components/ui/sidebar.mjs.map +1 -0
- package/dist/client/components/ui/skeleton.d.mts +1 -0
- package/dist/client/components/ui/skeleton.mjs +15 -0
- package/dist/client/components/ui/skeleton.mjs.map +1 -0
- package/dist/client/components/ui/sonner.d.mts +14 -0
- package/dist/client/components/ui/sonner.d.mts.map +1 -0
- package/dist/client/components/ui/sonner.mjs +55 -0
- package/dist/client/components/ui/sonner.mjs.map +1 -0
- package/dist/client/components/ui/spinner.d.mts +1 -0
- package/dist/client/components/ui/spinner.mjs +18 -0
- package/dist/client/components/ui/spinner.mjs.map +1 -0
- package/dist/client/components/ui/switch.d.mts +2 -0
- package/dist/client/components/ui/switch.mjs +23 -0
- package/dist/client/components/ui/switch.mjs.map +1 -0
- package/dist/client/components/ui/table.d.mts +2 -0
- package/dist/client/components/ui/table.mjs +66 -0
- package/dist/client/components/ui/table.mjs.map +1 -0
- package/dist/client/components/ui/tabs.d.mts +3 -0
- package/dist/client/components/ui/tabs.mjs +49 -0
- package/dist/client/components/ui/tabs.mjs.map +1 -0
- package/dist/client/components/ui/textarea.d.mts +2 -0
- package/dist/client/components/ui/textarea.mjs +15 -0
- package/dist/client/components/ui/textarea.mjs.map +1 -0
- package/dist/client/components/ui/toolbar.mjs +54 -0
- package/dist/client/components/ui/toolbar.mjs.map +1 -0
- package/dist/client/components/ui/tooltip.d.mts +2 -0
- package/dist/client/components/ui/tooltip.mjs +45 -0
- package/dist/client/components/ui/tooltip.mjs.map +1 -0
- package/dist/client/components/widgets/chart-widget.d.mts +57 -0
- package/dist/client/components/widgets/chart-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/chart-widget.mjs +282 -0
- package/dist/client/components/widgets/chart-widget.mjs.map +1 -0
- package/dist/client/components/widgets/progress-widget.d.mts +41 -0
- package/dist/client/components/widgets/progress-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/progress-widget.mjs +110 -0
- package/dist/client/components/widgets/progress-widget.mjs.map +1 -0
- package/dist/client/components/widgets/quick-actions-widget.d.mts +29 -0
- package/dist/client/components/widgets/quick-actions-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/quick-actions-widget.mjs +121 -0
- package/dist/client/components/widgets/quick-actions-widget.mjs.map +1 -0
- package/dist/client/components/widgets/recent-items-widget.d.mts +51 -0
- package/dist/client/components/widgets/recent-items-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/recent-items-widget.mjs +101 -0
- package/dist/client/components/widgets/recent-items-widget.mjs.map +1 -0
- package/dist/client/components/widgets/stats-widget.d.mts +55 -0
- package/dist/client/components/widgets/stats-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/stats-widget.mjs +150 -0
- package/dist/client/components/widgets/stats-widget.mjs.map +1 -0
- package/dist/client/components/widgets/table-widget.d.mts +31 -0
- package/dist/client/components/widgets/table-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/table-widget.mjs +139 -0
- package/dist/client/components/widgets/table-widget.mjs.map +1 -0
- package/dist/client/components/widgets/timeline-widget.d.mts +51 -0
- package/dist/client/components/widgets/timeline-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/timeline-widget.mjs +168 -0
- package/dist/client/components/widgets/timeline-widget.mjs.map +1 -0
- package/dist/client/components/widgets/value-widget.d.mts +39 -0
- package/dist/client/components/widgets/value-widget.d.mts.map +1 -0
- package/dist/client/components/widgets/value-widget.mjs +111 -0
- package/dist/client/components/widgets/value-widget.mjs.map +1 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +145 -0
- package/dist/client/components/widgets/widget-skeletons.mjs.map +1 -0
- package/dist/client/context/focus-context.d.mts +88 -0
- package/dist/client/context/focus-context.d.mts.map +1 -0
- package/dist/client/context/focus-context.mjs +178 -0
- package/dist/client/context/focus-context.mjs.map +1 -0
- package/dist/client/contexts/breadcrumb-context.mjs +32 -0
- package/dist/client/contexts/breadcrumb-context.mjs.map +1 -0
- package/dist/client/hooks/typed-hooks.d.mts +84 -0
- package/dist/client/hooks/typed-hooks.d.mts.map +1 -0
- package/dist/client/hooks/typed-hooks.mjs +272 -0
- package/dist/client/hooks/typed-hooks.mjs.map +1 -0
- package/dist/client/hooks/use-action.mjs +201 -0
- package/dist/client/hooks/use-action.mjs.map +1 -0
- package/dist/client/hooks/use-admin-config.mjs +40 -0
- package/dist/client/hooks/use-admin-config.mjs.map +1 -0
- package/dist/client/hooks/use-admin-preferences.mjs +68 -0
- package/dist/client/hooks/use-admin-preferences.mjs.map +1 -0
- package/dist/client/hooks/use-admin-routes.mjs +97 -0
- package/dist/client/hooks/use-admin-routes.mjs.map +1 -0
- package/dist/client/hooks/use-auth.d.mts +98 -0
- package/dist/client/hooks/use-auth.d.mts.map +1 -0
- package/dist/{use-auth-BoLmWtmU.mjs → client/hooks/use-auth.mjs} +3 -3
- package/dist/client/hooks/use-auth.mjs.map +1 -0
- package/dist/client/hooks/use-collection-fields.mjs +32 -0
- package/dist/client/hooks/use-collection-fields.mjs.map +1 -0
- package/dist/client/hooks/use-collection-meta.mjs +121 -0
- package/dist/client/hooks/use-collection-meta.mjs.map +1 -0
- package/dist/client/hooks/use-collection-schema.mjs +67 -0
- package/dist/client/hooks/use-collection-schema.mjs.map +1 -0
- package/dist/client/hooks/use-collection-validation.mjs +74 -0
- package/dist/client/hooks/use-collection-validation.mjs.map +1 -0
- package/dist/client/hooks/use-collection.d.mts +86 -0
- package/dist/client/hooks/use-collection.d.mts.map +1 -0
- package/dist/client/hooks/use-collection.mjs +214 -0
- package/dist/client/hooks/use-collection.mjs.map +1 -0
- package/dist/client/hooks/use-current-user.d.mts +57 -0
- package/dist/client/hooks/use-current-user.d.mts.map +1 -0
- package/dist/client/hooks/use-current-user.mjs +79 -0
- package/dist/client/hooks/use-current-user.mjs.map +1 -0
- package/dist/client/hooks/use-field-hooks.mjs +191 -0
- package/dist/client/hooks/use-field-hooks.mjs.map +1 -0
- package/dist/client/hooks/use-field-options.d.mts +90 -0
- package/dist/client/hooks/use-field-options.d.mts.map +1 -0
- package/dist/client/hooks/use-field-options.mjs +184 -0
- package/dist/client/hooks/use-field-options.mjs.map +1 -0
- package/dist/client/hooks/use-global-fields.mjs +27 -0
- package/dist/client/hooks/use-global-fields.mjs.map +1 -0
- package/dist/client/hooks/use-global-meta.mjs +59 -0
- package/dist/client/hooks/use-global-meta.mjs.map +1 -0
- package/dist/client/hooks/use-global-schema.mjs +33 -0
- package/dist/client/hooks/use-global-schema.mjs.map +1 -0
- package/dist/client/hooks/use-global.d.mts +40 -0
- package/dist/client/hooks/use-global.d.mts.map +1 -0
- package/dist/client/hooks/use-global.mjs +74 -0
- package/dist/client/hooks/use-global.mjs.map +1 -0
- package/dist/client/hooks/use-locks.mjs +245 -0
- package/dist/client/hooks/use-locks.mjs.map +1 -0
- package/dist/client/hooks/use-media-query.d.mts +23 -0
- package/dist/client/hooks/use-media-query.d.mts.map +1 -0
- package/dist/client/hooks/use-media-query.mjs +62 -0
- package/dist/client/hooks/use-media-query.mjs.map +1 -0
- package/dist/client/hooks/use-prefill-params.mjs +47 -0
- package/dist/client/hooks/use-prefill-params.mjs.map +1 -0
- package/dist/client/hooks/use-questpie-query-options.mjs +28 -0
- package/dist/client/hooks/use-questpie-query-options.mjs.map +1 -0
- package/dist/client/hooks/use-reactive-fields.d.mts +75 -0
- package/dist/client/hooks/use-reactive-fields.d.mts.map +1 -0
- package/dist/client/hooks/use-reactive-fields.mjs +164 -0
- package/dist/client/hooks/use-reactive-fields.mjs.map +1 -0
- package/dist/client/hooks/use-realtime-highlight.mjs +96 -0
- package/dist/client/hooks/use-realtime-highlight.mjs.map +1 -0
- package/dist/client/hooks/use-saved-views.mjs +65 -0
- package/dist/client/hooks/use-saved-views.mjs.map +1 -0
- package/dist/client/hooks/use-search.mjs +147 -0
- package/dist/client/hooks/use-search.mjs.map +1 -0
- package/dist/client/hooks/use-server-validation.mjs +199 -0
- package/dist/client/hooks/use-server-validation.mjs.map +1 -0
- package/dist/client/hooks/use-server-widget-data.d.mts +26 -0
- package/dist/client/hooks/use-server-widget-data.d.mts.map +1 -0
- package/dist/client/hooks/use-server-widget-data.mjs +40 -0
- package/dist/client/hooks/use-server-widget-data.mjs.map +1 -0
- package/dist/client/hooks/use-setup-status.d.mts +39 -0
- package/dist/client/hooks/use-setup-status.d.mts.map +1 -0
- package/dist/client/hooks/use-setup-status.mjs +50 -0
- package/dist/client/hooks/use-setup-status.mjs.map +1 -0
- package/dist/client/hooks/use-upload-collection.mjs +32 -0
- package/dist/client/hooks/use-upload-collection.mjs.map +1 -0
- package/dist/client/hooks/use-upload.d.mts +23 -0
- package/dist/client/hooks/use-upload.d.mts.map +1 -0
- package/dist/client/hooks/use-upload.mjs +145 -0
- package/dist/client/hooks/use-upload.mjs.map +1 -0
- package/dist/client/hooks/use-validation-error-map.mjs +53 -0
- package/dist/client/hooks/use-validation-error-map.mjs.map +1 -0
- package/dist/client/hooks/use-view-state.mjs +261 -0
- package/dist/client/hooks/use-view-state.mjs.map +1 -0
- package/dist/client/i18n/hooks.mjs +160 -0
- package/dist/client/i18n/hooks.mjs.map +1 -0
- package/dist/client/i18n/intl-cache.mjs +65 -0
- package/dist/client/i18n/intl-cache.mjs.map +1 -0
- package/dist/client/i18n/messages.mjs +7 -0
- package/dist/client/i18n/messages.mjs.map +1 -0
- package/dist/client/i18n/simple.d.mts +22 -0
- package/dist/client/i18n/simple.d.mts.map +1 -0
- package/dist/client/i18n/simple.mjs +157 -0
- package/dist/client/i18n/simple.mjs.map +1 -0
- package/dist/client/i18n/types.d.mts +110 -0
- package/dist/client/i18n/types.d.mts.map +1 -0
- package/dist/client/lib/utils.d.mts +1 -0
- package/dist/client/lib/utils.mjs +28 -0
- package/dist/client/lib/utils.mjs.map +1 -0
- package/dist/client/preview/block-scope-context.d.mts +74 -0
- package/dist/client/preview/block-scope-context.d.mts.map +1 -0
- package/dist/client/preview/block-scope-context.mjs +93 -0
- package/dist/client/preview/block-scope-context.mjs.map +1 -0
- package/dist/client/preview/index.d.mts +5 -0
- package/dist/client/preview/preview-banner.d.mts +46 -0
- package/dist/client/preview/preview-banner.d.mts.map +1 -0
- package/dist/client/preview/preview-banner.mjs +95 -0
- package/dist/client/preview/preview-banner.mjs.map +1 -0
- package/dist/client/preview/preview-field.d.mts +108 -0
- package/dist/client/preview/preview-field.d.mts.map +1 -0
- package/dist/client/preview/preview-field.mjs +125 -0
- package/dist/client/preview/preview-field.mjs.map +1 -0
- package/dist/client/preview/types.d.mts +115 -0
- package/dist/client/preview/types.d.mts.map +1 -0
- package/dist/client/preview/types.mjs +21 -0
- package/dist/client/preview/types.mjs.map +1 -0
- package/dist/client/preview/use-collection-preview.d.mts +71 -0
- package/dist/client/preview/use-collection-preview.d.mts.map +1 -0
- package/dist/client/preview/use-collection-preview.mjs +114 -0
- package/dist/client/preview/use-collection-preview.mjs.map +1 -0
- package/dist/client/runtime/content-locales-provider.d.mts +1 -0
- package/dist/client/runtime/content-locales-provider.mjs +85 -0
- package/dist/client/runtime/content-locales-provider.mjs.map +1 -0
- package/dist/client/runtime/index.d.mts +7 -0
- package/dist/client/runtime/index.mjs +8 -0
- package/dist/client/runtime/locale-scope.d.mts +2 -0
- package/dist/{runtime-6VZM878K.mjs → client/runtime/locale-scope.mjs} +3 -4
- package/dist/client/runtime/locale-scope.mjs.map +1 -0
- package/dist/client/runtime/provider.d.mts +10107 -0
- package/dist/client/runtime/provider.d.mts.map +1 -0
- package/dist/client/runtime/provider.mjs +229 -0
- package/dist/client/runtime/provider.mjs.map +1 -0
- package/dist/client/runtime/routes.d.mts +49 -0
- package/dist/client/runtime/routes.d.mts.map +1 -0
- package/dist/client/runtime/routes.mjs +107 -0
- package/dist/client/runtime/routes.mjs.map +1 -0
- package/dist/client/runtime/translations-provider.d.mts +2 -0
- package/dist/client/runtime/translations-provider.mjs +181 -0
- package/dist/client/runtime/translations-provider.mjs.map +1 -0
- package/dist/client/scope/index.d.mts +3 -0
- package/dist/client/scope/picker.d.mts +54 -0
- package/dist/client/scope/picker.d.mts.map +1 -0
- package/dist/client/scope/picker.mjs +161 -0
- package/dist/client/scope/picker.mjs.map +1 -0
- package/dist/client/scope/provider.d.mts +104 -0
- package/dist/client/scope/provider.d.mts.map +1 -0
- package/dist/client/scope/provider.mjs +159 -0
- package/dist/client/scope/provider.mjs.map +1 -0
- package/dist/client/scope/types.d.mts +112 -0
- package/dist/client/scope/types.d.mts.map +1 -0
- package/dist/client/styles/index.css +80 -0
- package/dist/client/utils/auto-expand-fields.mjs +65 -0
- package/dist/client/utils/auto-expand-fields.mjs.map +1 -0
- package/dist/client/utils/build-field-definitions-from-schema.mjs +256 -0
- package/dist/client/utils/build-field-definitions-from-schema.mjs.map +1 -0
- package/dist/client/utils/detect-relations.mjs +46 -0
- package/dist/client/utils/detect-relations.mjs.map +1 -0
- package/dist/client/utils/locale-to-flag.d.mts +118 -0
- package/dist/client/utils/locale-to-flag.d.mts.map +1 -0
- package/dist/client/utils/locale-to-flag.mjs +130 -0
- package/dist/client/utils/locale-to-flag.mjs.map +1 -0
- package/dist/client/utils/routes.mjs +196 -0
- package/dist/client/utils/routes.mjs.map +1 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +73 -0
- package/dist/client/views/auth/accept-invite-form.d.mts.map +1 -0
- package/dist/client/views/auth/accept-invite-form.mjs +180 -0
- package/dist/client/views/auth/accept-invite-form.mjs.map +1 -0
- package/dist/client/views/auth/auth-layout.d.mts +44 -0
- package/dist/client/views/auth/auth-layout.d.mts.map +1 -0
- package/dist/client/views/auth/auth-layout.mjs +53 -0
- package/dist/client/views/auth/auth-layout.mjs.map +1 -0
- package/dist/client/views/auth/forgot-password-form.d.mts +59 -0
- package/dist/client/views/auth/forgot-password-form.d.mts.map +1 -0
- package/dist/{forgot-password-page-Bcp-An4Y.mjs → client/views/auth/forgot-password-form.mjs} +22 -89
- package/dist/client/views/auth/forgot-password-form.mjs.map +1 -0
- package/dist/client/views/auth/index.d.mts +7 -0
- package/dist/client/views/auth/invite-form.d.mts +1 -0
- package/dist/client/views/auth/invite-form.mjs +155 -0
- package/dist/client/views/auth/invite-form.mjs.map +1 -0
- package/dist/client/views/auth/login-form.d.mts +76 -0
- package/dist/client/views/auth/login-form.d.mts.map +1 -0
- package/dist/client/views/auth/login-form.mjs +167 -0
- package/dist/client/views/auth/login-form.mjs.map +1 -0
- package/dist/client/views/auth/reset-password-form.d.mts +66 -0
- package/dist/client/views/auth/reset-password-form.d.mts.map +1 -0
- package/dist/client/views/auth/reset-password-form.mjs +188 -0
- package/dist/client/views/auth/reset-password-form.mjs.map +1 -0
- package/dist/client/views/auth/setup-form.d.mts +61 -0
- package/dist/client/views/auth/setup-form.d.mts.map +1 -0
- package/dist/{setup-page-YAP_fzqh.mjs → client/views/auth/setup-form.mjs} +46 -124
- package/dist/client/views/auth/setup-form.mjs.map +1 -0
- package/dist/client/views/collection/auto-form-fields.d.mts +4 -0
- package/dist/client/views/collection/auto-form-fields.mjs +453 -0
- package/dist/client/views/collection/auto-form-fields.mjs.map +1 -0
- package/dist/client/views/collection/bulk-action-toolbar.mjs +291 -0
- package/dist/client/views/collection/bulk-action-toolbar.mjs.map +1 -0
- package/dist/client/views/collection/cells/complex-cells.d.mts +46 -0
- package/dist/client/views/collection/cells/complex-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/complex-cells.mjs +327 -0
- package/dist/client/views/collection/cells/complex-cells.mjs.map +1 -0
- package/dist/client/views/collection/cells/index.d.mts +7 -0
- package/dist/client/views/collection/cells/primitive-cells.d.mts +76 -0
- package/dist/client/views/collection/cells/primitive-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/primitive-cells.mjs +165 -0
- package/dist/client/views/collection/cells/primitive-cells.mjs.map +1 -0
- package/dist/client/views/collection/cells/relation-cells.d.mts +21 -0
- package/dist/client/views/collection/cells/relation-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/relation-cells.mjs +105 -0
- package/dist/client/views/collection/cells/relation-cells.mjs.map +1 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +1 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +189 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs.map +1 -0
- package/dist/client/views/collection/cells/shared/cell-helpers.d.mts +2 -0
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs +78 -0
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs.map +1 -0
- package/dist/client/views/collection/cells/shared/relation-chip.d.mts +1 -0
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +37 -0
- package/dist/client/views/collection/cells/shared/relation-chip.mjs.map +1 -0
- package/dist/client/views/collection/cells/upload-cells.d.mts +25 -0
- package/dist/client/views/collection/cells/upload-cells.d.mts.map +1 -0
- package/dist/client/views/collection/cells/upload-cells.mjs +20 -0
- package/dist/client/views/collection/cells/upload-cells.mjs.map +1 -0
- package/dist/client/views/collection/columns/build-columns.d.mts +2 -0
- package/dist/client/views/collection/columns/build-columns.mjs +156 -0
- package/dist/client/views/collection/columns/build-columns.mjs.map +1 -0
- package/dist/client/views/collection/columns/column-defaults.d.mts +2 -0
- package/dist/client/views/collection/columns/column-defaults.mjs +108 -0
- package/dist/client/views/collection/columns/column-defaults.mjs.map +1 -0
- package/dist/client/views/collection/columns/index.d.mts +3 -0
- package/dist/client/views/collection/columns/types.d.mts +2 -0
- package/dist/client/views/collection/field-context.mjs +127 -0
- package/dist/client/views/collection/field-context.mjs.map +1 -0
- package/dist/client/views/collection/field-renderer.mjs +171 -0
- package/dist/client/views/collection/field-renderer.mjs.map +1 -0
- package/dist/client/views/collection/form-view.d.mts +112 -0
- package/dist/client/views/collection/form-view.d.mts.map +1 -0
- package/dist/client/views/collection/form-view.mjs +903 -0
- package/dist/client/views/collection/form-view.mjs.map +1 -0
- package/dist/client/views/collection/index.d.mts +9 -0
- package/dist/client/views/collection/table-view.d.mts +102 -0
- package/dist/client/views/collection/table-view.d.mts.map +1 -0
- package/dist/client/views/collection/table-view.mjs +695 -0
- package/dist/client/views/collection/table-view.mjs.map +1 -0
- package/dist/client/views/collection/view-skeletons.mjs +121 -0
- package/dist/client/views/collection/view-skeletons.mjs.map +1 -0
- package/dist/client/views/common/global-search.d.mts +1 -0
- package/dist/client/views/common/global-search.mjs +376 -0
- package/dist/client/views/common/global-search.mjs.map +1 -0
- package/dist/client/views/common/index.d.mts +1 -0
- package/dist/client/views/dashboard/dashboard-grid.mjs +385 -0
- package/dist/client/views/dashboard/dashboard-grid.mjs.map +1 -0
- package/dist/client/views/dashboard/dashboard-widget.mjs +178 -0
- package/dist/client/views/dashboard/dashboard-widget.mjs.map +1 -0
- package/dist/client/views/dashboard/widget-card.mjs +159 -0
- package/dist/client/views/dashboard/widget-card.mjs.map +1 -0
- package/dist/client/views/globals/global-form-view.d.mts +74 -0
- package/dist/client/views/globals/global-form-view.d.mts.map +1 -0
- package/dist/client/views/globals/global-form-view.mjs +181 -0
- package/dist/client/views/globals/global-form-view.mjs.map +1 -0
- package/dist/client/views/index.d.mts +28 -0
- package/dist/client/views/layout/admin-layout-provider.d.mts +140 -0
- package/dist/client/views/layout/admin-layout-provider.d.mts.map +1 -0
- package/dist/client/views/layout/admin-layout-provider.mjs +90 -0
- package/dist/client/views/layout/admin-layout-provider.mjs.map +1 -0
- package/dist/client/views/layout/admin-layout.d.mts +151 -0
- package/dist/client/views/layout/admin-layout.d.mts.map +1 -0
- package/dist/client/views/layout/admin-layout.mjs +144 -0
- package/dist/client/views/layout/admin-layout.mjs.map +1 -0
- package/dist/client/views/layout/admin-root.d.mts +7 -0
- package/dist/client/views/layout/admin-router.d.mts +125 -0
- package/dist/client/views/layout/admin-router.d.mts.map +1 -0
- package/dist/client/views/layout/admin-router.mjs +594 -0
- package/dist/client/views/layout/admin-router.mjs.map +1 -0
- package/dist/client/views/layout/admin-sidebar.d.mts +105 -0
- package/dist/client/views/layout/admin-sidebar.d.mts.map +1 -0
- package/dist/client/views/layout/admin-sidebar.mjs +550 -0
- package/dist/client/views/layout/admin-sidebar.mjs.map +1 -0
- package/dist/client/views/layout/admin-topbar.mjs +128 -0
- package/dist/client/views/layout/admin-topbar.mjs.map +1 -0
- package/dist/client/views/layout/index.d.mts +5 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +67 -0
- package/dist/client/views/pages/accept-invite-page.d.mts.map +1 -0
- package/dist/client/views/pages/accept-invite-page.mjs +143 -0
- package/dist/client/views/pages/accept-invite-page.mjs.map +1 -0
- package/dist/client/views/pages/dashboard-page.d.mts +52 -0
- package/dist/client/views/pages/dashboard-page.d.mts.map +1 -0
- package/dist/client/views/pages/dashboard-page.mjs +45 -0
- package/dist/client/views/pages/dashboard-page.mjs.map +1 -0
- package/dist/client/views/pages/forgot-password-page.d.mts +59 -0
- package/dist/client/views/pages/forgot-password-page.d.mts.map +1 -0
- package/dist/client/views/pages/forgot-password-page.mjs +80 -0
- package/dist/client/views/pages/forgot-password-page.mjs.map +1 -0
- package/dist/client/views/pages/index.d.mts +7 -0
- package/dist/client/views/pages/invite-page.d.mts +71 -0
- package/dist/client/views/pages/invite-page.d.mts.map +1 -0
- package/dist/client/views/pages/invite-page.mjs +86 -0
- package/dist/client/views/pages/invite-page.mjs.map +1 -0
- package/dist/client/views/pages/login-page.d.mts +76 -0
- package/dist/client/views/pages/login-page.d.mts.map +1 -0
- package/dist/client/views/pages/login-page.mjs +98 -0
- package/dist/client/views/pages/login-page.mjs.map +1 -0
- package/dist/client/views/pages/reset-password-page.d.mts +66 -0
- package/dist/client/views/pages/reset-password-page.d.mts.map +1 -0
- package/dist/client/views/pages/reset-password-page.mjs +105 -0
- package/dist/client/views/pages/reset-password-page.mjs.map +1 -0
- package/dist/client/views/pages/setup-page.d.mts +64 -0
- package/dist/client/views/pages/setup-page.d.mts.map +1 -0
- package/dist/client/views/pages/setup-page.mjs +91 -0
- package/dist/client/views/pages/setup-page.mjs.map +1 -0
- package/dist/client.d.mts +92 -3
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +54 -12
- package/dist/components/rich-text/index.d.mts +1 -0
- package/dist/components/rich-text/rich-text-renderer.d.mts +104 -0
- package/dist/components/rich-text/rich-text-renderer.d.mts.map +1 -0
- package/dist/components/rich-text/rich-text-renderer.mjs +210 -0
- package/dist/components/rich-text/rich-text-renderer.mjs.map +1 -0
- package/dist/index.d.mts +62 -3
- package/dist/index.mjs +54 -12
- package/dist/server/adapters/nextjs.d.mts +121 -0
- package/dist/server/adapters/nextjs.d.mts.map +1 -0
- package/dist/server/adapters/nextjs.mjs +111 -0
- package/dist/server/adapters/nextjs.mjs.map +1 -0
- package/dist/server/adapters/tanstack.d.mts +133 -0
- package/dist/server/adapters/tanstack.d.mts.map +1 -0
- package/dist/server/adapters/tanstack.mjs +90 -0
- package/dist/server/adapters/tanstack.mjs.map +1 -0
- package/dist/server/augmentation.d.mts +1523 -0
- package/dist/server/augmentation.d.mts.map +1 -0
- package/dist/server/auth-helpers.d.mts +143 -0
- package/dist/server/auth-helpers.d.mts.map +1 -0
- package/dist/server/auth-helpers.mjs +108 -0
- package/dist/server/auth-helpers.mjs.map +1 -0
- package/dist/server/block/block-builder.d.mts +319 -0
- package/dist/server/block/block-builder.d.mts.map +1 -0
- package/dist/server/block/block-builder.mjs +217 -0
- package/dist/server/block/block-builder.mjs.map +1 -0
- package/dist/server/block/index.d.mts +3 -0
- package/dist/server/block/introspection.d.mts +84 -0
- package/dist/server/block/introspection.d.mts.map +1 -0
- package/dist/server/block/introspection.mjs +89 -0
- package/dist/server/block/introspection.mjs.map +1 -0
- package/dist/server/block/prefetch.d.mts +78 -0
- package/dist/server/block/prefetch.d.mts.map +1 -0
- package/dist/server/block/prefetch.mjs +240 -0
- package/dist/server/block/prefetch.mjs.map +1 -0
- package/dist/server/fields/blocks.d.mts +139 -0
- package/dist/server/fields/blocks.d.mts.map +1 -0
- package/dist/server/fields/blocks.mjs +192 -0
- package/dist/server/fields/blocks.mjs.map +1 -0
- package/dist/server/fields/index.d.mts +48 -0
- package/dist/server/fields/index.d.mts.map +1 -0
- package/dist/server/fields/index.mjs +16 -0
- package/dist/server/fields/index.mjs.map +1 -0
- package/dist/server/fields/rich-text.d.mts +135 -0
- package/dist/server/fields/rich-text.d.mts.map +1 -0
- package/dist/server/fields/rich-text.mjs +188 -0
- package/dist/server/fields/rich-text.mjs.map +1 -0
- package/dist/server/i18n/index.d.mts +16 -0
- package/dist/server/i18n/index.d.mts.map +1 -0
- package/dist/server/i18n/index.mjs +44 -0
- package/dist/server/i18n/index.mjs.map +1 -0
- package/dist/server/i18n/messages/cs.mjs +461 -0
- package/dist/server/i18n/messages/cs.mjs.map +1 -0
- package/dist/server/i18n/messages/de.mjs +461 -0
- package/dist/server/i18n/messages/de.mjs.map +1 -0
- package/dist/server/i18n/messages/en.mjs +493 -0
- package/dist/server/i18n/messages/en.mjs.map +1 -0
- package/dist/server/i18n/messages/es.mjs +461 -0
- package/dist/server/i18n/messages/es.mjs.map +1 -0
- package/dist/server/i18n/messages/fr.mjs +461 -0
- package/dist/server/i18n/messages/fr.mjs.map +1 -0
- package/dist/server/i18n/messages/index.mjs +24 -0
- package/dist/server/i18n/messages/index.mjs.map +1 -0
- package/dist/server/i18n/messages/pl.mjs +461 -0
- package/dist/server/i18n/messages/pl.mjs.map +1 -0
- package/dist/server/i18n/messages/pt.mjs +464 -0
- package/dist/server/i18n/messages/pt.mjs.map +1 -0
- package/dist/server/i18n/messages/sk.mjs +490 -0
- package/dist/server/i18n/messages/sk.mjs.map +1 -0
- package/dist/server/index.d.mts +20 -0
- package/dist/server/modules/admin/functions/admin-config.mjs +348 -0
- package/dist/server/modules/admin/functions/admin-config.mjs.map +1 -0
- package/dist/server/modules/admin/functions/execute-action.d.mts +107 -0
- package/dist/server/modules/admin/functions/execute-action.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/execute-action.mjs +331 -0
- package/dist/server/modules/admin/functions/execute-action.mjs.map +1 -0
- package/dist/server/modules/admin/functions/locales.mjs +80 -0
- package/dist/server/modules/admin/functions/locales.mjs.map +1 -0
- package/dist/server/modules/admin/functions/preview.d.mts +70 -0
- package/dist/server/modules/admin/functions/preview.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/preview.mjs +243 -0
- package/dist/server/modules/admin/functions/preview.mjs.map +1 -0
- package/dist/server/modules/admin/functions/reactive.d.mts +99 -0
- package/dist/server/modules/admin/functions/reactive.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/reactive.mjs +378 -0
- package/dist/server/modules/admin/functions/reactive.mjs.map +1 -0
- package/dist/server/modules/admin/functions/setup.d.mts +84 -0
- package/dist/server/modules/admin/functions/setup.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/setup.mjs +131 -0
- package/dist/server/modules/admin/functions/setup.mjs.map +1 -0
- package/dist/server/modules/admin/functions/translations.mjs +125 -0
- package/dist/server/modules/admin/functions/translations.mjs.map +1 -0
- package/dist/server/modules/admin/functions/widget-data.d.mts +33 -0
- package/dist/server/modules/admin/functions/widget-data.d.mts.map +1 -0
- package/dist/server/modules/admin/functions/widget-data.mjs +70 -0
- package/dist/server/modules/admin/functions/widget-data.mjs.map +1 -0
- package/dist/server/modules/admin/index.d.mts +16879 -0
- package/dist/server/modules/admin/index.d.mts.map +1 -0
- package/dist/server/modules/admin/index.mjs +249 -0
- package/dist/server/modules/admin/index.mjs.map +1 -0
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.d.mts +3 -0
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs +48 -0
- package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs.map +1 -0
- package/dist/server/modules/admin-preferences/collections/locks.collection.d.mts +3 -0
- package/dist/server/modules/admin-preferences/collections/locks.collection.mjs +79 -0
- package/dist/server/modules/admin-preferences/collections/locks.collection.mjs.map +1 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts +1490 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts.map +1 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs +57 -0
- package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs.map +1 -0
- package/dist/server/patch.d.mts +100 -0
- package/dist/server/patch.d.mts.map +1 -0
- package/dist/server/patch.mjs +1062 -0
- package/dist/server/patch.mjs.map +1 -0
- package/dist/server.d.mts +21 -250
- package/dist/server.mjs +19 -832
- package/dist/shared/preview-utils.d.mts +54 -0
- package/dist/shared/preview-utils.d.mts.map +1 -0
- package/dist/{preview-utils-BKQ9-TMa.mjs → shared/preview-utils.mjs} +2 -2
- package/dist/shared/preview-utils.mjs.map +1 -0
- package/dist/{saved-views.types-BMsz5mCy.d.mts → shared/types/saved-views.types.d.mts} +7 -2
- package/dist/shared/types/saved-views.types.d.mts.map +1 -0
- package/dist/shared.d.mts +3 -57
- package/dist/shared.mjs +1 -1
- package/package.json +12 -17
- package/dist/auth-layout-M8K8_q5R.mjs +0 -181
- package/dist/auth-layout-M8K8_q5R.mjs.map +0 -1
- package/dist/bulk-upload-dialog-D7w7W1Hl.mjs +0 -273
- package/dist/bulk-upload-dialog-D7w7W1Hl.mjs.map +0 -1
- package/dist/client-B7r47hEd.d.mts +0 -13403
- package/dist/client-B7r47hEd.d.mts.map +0 -1
- package/dist/client-njX1rZmi.mjs +0 -22612
- package/dist/client-njX1rZmi.mjs.map +0 -1
- package/dist/content-locales-provider-BXvuIgfg.mjs +0 -1650
- package/dist/content-locales-provider-BXvuIgfg.mjs.map +0 -1
- package/dist/dashboard-page-B4PGEdc2.mjs +0 -2500
- package/dist/dashboard-page-B4PGEdc2.mjs.map +0 -1
- package/dist/dashboard-page-mCY0pgZv.mjs +0 -3
- package/dist/dropzone-Do3awXKd.mjs +0 -634
- package/dist/dropzone-Do3awXKd.mjs.map +0 -1
- package/dist/forgot-password-page-Bcp-An4Y.mjs.map +0 -1
- package/dist/forgot-password-page-CEwsdLwn.mjs +0 -3
- package/dist/index-BYyqkWtn.d.mts +0 -2753
- package/dist/index-BYyqkWtn.d.mts.map +0 -1
- package/dist/login-page-BUnpCbCa.mjs +0 -3
- package/dist/login-page-CP4gA-dl.mjs +0 -298
- package/dist/login-page-CP4gA-dl.mjs.map +0 -1
- package/dist/preview-utils-BKQ9-TMa.mjs.map +0 -1
- package/dist/reset-password-page-BqfDmLxA.mjs +0 -281
- package/dist/reset-password-page-BqfDmLxA.mjs.map +0 -1
- package/dist/reset-password-page-CufHz3h3.mjs +0 -3
- package/dist/runtime-6VZM878K.mjs.map +0 -1
- package/dist/saved-views.types-BMsz5mCy.d.mts.map +0 -1
- package/dist/server.d.mts.map +0 -1
- package/dist/server.mjs.map +0 -1
- package/dist/setup-page-BNNzt_Z6.mjs +0 -3
- package/dist/setup-page-YAP_fzqh.mjs.map +0 -1
- package/dist/shared.d.mts.map +0 -1
- package/dist/use-auth-BoLmWtmU.mjs.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __exportAll };
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { ReactiveConfig } from "questpie";
|
|
2
|
+
|
|
3
|
+
//#region src/augmentation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Common admin options shared by all fields.
|
|
7
|
+
* Each field-specific admin meta extends this.
|
|
8
|
+
*
|
|
9
|
+
* Supports reactive configurations for dynamic field states:
|
|
10
|
+
* - `hidden`, `readOnly`, `disabled` can be boolean or reactive function
|
|
11
|
+
* - `compute` can auto-generate field values based on other fields
|
|
12
|
+
*/
|
|
13
|
+
interface BaseAdminMeta {
|
|
14
|
+
/**
|
|
15
|
+
* Field width in form (CSS value or number for pixels).
|
|
16
|
+
* @example "100%" | 400 | "50%"
|
|
17
|
+
*/
|
|
18
|
+
width?: string | number;
|
|
19
|
+
/**
|
|
20
|
+
* Column span in grid layout (1-12).
|
|
21
|
+
* @default 12
|
|
22
|
+
*/
|
|
23
|
+
colspan?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
24
|
+
/**
|
|
25
|
+
* Field group for form organization.
|
|
26
|
+
*/
|
|
27
|
+
group?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Display order within group.
|
|
30
|
+
*/
|
|
31
|
+
order?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Hide the field conditionally.
|
|
34
|
+
* - `true`: Always hidden
|
|
35
|
+
* - Function/config: Evaluated on server based on form data
|
|
36
|
+
*
|
|
37
|
+
* @example Static
|
|
38
|
+
* ```ts
|
|
39
|
+
* hidden: true
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example Reactive (short syntax)
|
|
43
|
+
* ```ts
|
|
44
|
+
* hidden: ({ data }) => !data.showAdvanced
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example Reactive (full syntax with deps)
|
|
48
|
+
* ```ts
|
|
49
|
+
* hidden: {
|
|
50
|
+
* handler: ({ data }) => !data.showAdvanced,
|
|
51
|
+
* deps: ['showAdvanced'],
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
hidden?: boolean | ReactiveConfig<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Make field read-only conditionally.
|
|
58
|
+
* - `true`: Always read-only
|
|
59
|
+
* - Function/config: Evaluated on server based on form data
|
|
60
|
+
*
|
|
61
|
+
* @example Reactive
|
|
62
|
+
* ```ts
|
|
63
|
+
* readOnly: ({ data }) => data.status === 'published'
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
readOnly?: boolean | ReactiveConfig<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* Disable the field conditionally.
|
|
69
|
+
* - `true`: Always disabled
|
|
70
|
+
* - Function/config: Evaluated on server based on form data
|
|
71
|
+
*
|
|
72
|
+
* @example Reactive
|
|
73
|
+
* ```ts
|
|
74
|
+
* disabled: ({ data }) => data.isLocked
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
disabled?: boolean | ReactiveConfig<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Compute field value automatically based on other fields.
|
|
80
|
+
* Handler should return the computed value or undefined to keep current.
|
|
81
|
+
* Return null to reset field to null/default.
|
|
82
|
+
*
|
|
83
|
+
* @example Auto-generate slug from title
|
|
84
|
+
* ```ts
|
|
85
|
+
* compute: ({ data }) => slugify(data.title)
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @example With debounce and explicit deps
|
|
89
|
+
* ```ts
|
|
90
|
+
* compute: {
|
|
91
|
+
* handler: ({ data }) => slugify(data.title),
|
|
92
|
+
* deps: ['title'],
|
|
93
|
+
* debounce: 300,
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example Reset on parent change
|
|
98
|
+
* ```ts
|
|
99
|
+
* compute: ({ data, prev }) => {
|
|
100
|
+
* if (data.category !== prev.data.category) {
|
|
101
|
+
* return null; // Reset when category changes
|
|
102
|
+
* }
|
|
103
|
+
* }
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
compute?: ReactiveConfig<any>;
|
|
107
|
+
/**
|
|
108
|
+
* Show this field in list view columns.
|
|
109
|
+
*/
|
|
110
|
+
showInList?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Column width in list view.
|
|
113
|
+
*/
|
|
114
|
+
listWidth?: string | number;
|
|
115
|
+
/**
|
|
116
|
+
* Enable sorting by this field.
|
|
117
|
+
*/
|
|
118
|
+
sortable?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Enable filtering by this field.
|
|
121
|
+
*/
|
|
122
|
+
filterable?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Text field admin options
|
|
126
|
+
*/
|
|
127
|
+
interface TextFieldAdminMeta extends BaseAdminMeta {
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
showCounter?: boolean;
|
|
130
|
+
prefix?: string;
|
|
131
|
+
suffix?: string;
|
|
132
|
+
inputType?: "text" | "email" | "url" | "tel" | "search" | "password";
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Email field admin options
|
|
136
|
+
*/
|
|
137
|
+
interface EmailFieldAdminMeta extends BaseAdminMeta {
|
|
138
|
+
placeholder?: string;
|
|
139
|
+
/** Show domain hint (e.g., "@company.com") */
|
|
140
|
+
domainHint?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* URL field admin options
|
|
144
|
+
*/
|
|
145
|
+
interface UrlFieldAdminMeta extends BaseAdminMeta {
|
|
146
|
+
placeholder?: string;
|
|
147
|
+
/** Show protocol dropdown (http/https) */
|
|
148
|
+
showProtocolDropdown?: boolean;
|
|
149
|
+
/** Default protocol if not provided */
|
|
150
|
+
defaultProtocol?: "http" | "https";
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Textarea field admin options
|
|
154
|
+
*/
|
|
155
|
+
interface TextareaFieldAdminMeta extends BaseAdminMeta {
|
|
156
|
+
placeholder?: string;
|
|
157
|
+
rows?: number;
|
|
158
|
+
autoResize?: boolean;
|
|
159
|
+
richText?: boolean;
|
|
160
|
+
showCounter?: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Number field admin options
|
|
164
|
+
*/
|
|
165
|
+
interface NumberFieldAdminMeta extends BaseAdminMeta {
|
|
166
|
+
placeholder?: string;
|
|
167
|
+
showButtons?: boolean;
|
|
168
|
+
step?: number;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Boolean field admin options
|
|
172
|
+
*/
|
|
173
|
+
interface BooleanFieldAdminMeta extends BaseAdminMeta {
|
|
174
|
+
displayAs?: "checkbox" | "switch";
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Date field admin options
|
|
178
|
+
*/
|
|
179
|
+
interface DateFieldAdminMeta extends BaseAdminMeta {
|
|
180
|
+
placeholder?: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Time field admin options
|
|
184
|
+
*/
|
|
185
|
+
interface TimeFieldAdminMeta extends BaseAdminMeta {
|
|
186
|
+
placeholder?: string;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Select field admin options
|
|
190
|
+
*/
|
|
191
|
+
interface SelectFieldAdminMeta extends BaseAdminMeta {
|
|
192
|
+
displayAs?: "dropdown" | "radio" | "checkbox" | "buttons";
|
|
193
|
+
searchable?: boolean;
|
|
194
|
+
creatable?: boolean;
|
|
195
|
+
clearable?: boolean;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Relation field admin options
|
|
199
|
+
*/
|
|
200
|
+
interface RelationFieldAdminMeta extends BaseAdminMeta {
|
|
201
|
+
displayAs?: "select" | "table" | "cards" | "list";
|
|
202
|
+
displayFields?: string[];
|
|
203
|
+
titleField?: string;
|
|
204
|
+
allowCreate?: boolean;
|
|
205
|
+
allowEdit?: boolean;
|
|
206
|
+
preload?: boolean;
|
|
207
|
+
maxItems?: number;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Object field admin options
|
|
211
|
+
*/
|
|
212
|
+
interface ObjectFieldAdminMeta extends BaseAdminMeta {
|
|
213
|
+
displayAs?: "card" | "section" | "inline";
|
|
214
|
+
collapsible?: boolean;
|
|
215
|
+
defaultCollapsed?: boolean;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Array field admin options
|
|
219
|
+
*/
|
|
220
|
+
interface ArrayFieldAdminMeta extends BaseAdminMeta {
|
|
221
|
+
displayAs?: "list" | "table" | "cards";
|
|
222
|
+
collapsible?: boolean;
|
|
223
|
+
defaultCollapsed?: boolean;
|
|
224
|
+
addLabel?: string;
|
|
225
|
+
emptyMessage?: string;
|
|
226
|
+
maxItems?: number;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* JSON field admin options
|
|
230
|
+
*/
|
|
231
|
+
interface JsonFieldAdminMeta extends BaseAdminMeta {
|
|
232
|
+
/** Show as code editor */
|
|
233
|
+
codeEditor?: boolean;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Upload field admin options
|
|
237
|
+
*/
|
|
238
|
+
interface UploadFieldAdminMeta extends BaseAdminMeta {
|
|
239
|
+
accept?: string;
|
|
240
|
+
dropzoneText?: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Rich text field admin options
|
|
244
|
+
*/
|
|
245
|
+
interface RichTextFieldAdminMeta extends BaseAdminMeta {
|
|
246
|
+
/** Placeholder text when editor is empty */
|
|
247
|
+
placeholder?: string;
|
|
248
|
+
/** Show character count */
|
|
249
|
+
showCharacterCount?: boolean;
|
|
250
|
+
/** Maximum characters allowed */
|
|
251
|
+
maxCharacters?: number;
|
|
252
|
+
/** Minimum characters required */
|
|
253
|
+
minCharacters?: number;
|
|
254
|
+
/** Enable image uploads within editor */
|
|
255
|
+
enableImages?: boolean;
|
|
256
|
+
/** Collection to use for image uploads */
|
|
257
|
+
imageCollection?: string;
|
|
258
|
+
/** Enable media library integration */
|
|
259
|
+
enableMediaLibrary?: boolean;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Blocks field admin options
|
|
263
|
+
*/
|
|
264
|
+
interface BlocksFieldAdminMeta extends BaseAdminMeta {
|
|
265
|
+
/** Label for add block button */
|
|
266
|
+
addLabel?: string;
|
|
267
|
+
/** Message shown when no blocks present */
|
|
268
|
+
emptyMessage?: string;
|
|
269
|
+
/** Maximum number of blocks allowed */
|
|
270
|
+
maxBlocks?: number;
|
|
271
|
+
/** Minimum number of blocks required */
|
|
272
|
+
minBlocks?: number;
|
|
273
|
+
/** Enable drag & drop reordering */
|
|
274
|
+
sortable?: boolean;
|
|
275
|
+
/** Show block type selector as dropdown or grid */
|
|
276
|
+
selectorDisplayAs?: "dropdown" | "grid";
|
|
277
|
+
/** Default collapsed state for blocks */
|
|
278
|
+
defaultCollapsed?: boolean;
|
|
279
|
+
}
|
|
280
|
+
type AnyAdminMeta = TextFieldAdminMeta | TextareaFieldAdminMeta | EmailFieldAdminMeta | UrlFieldAdminMeta | NumberFieldAdminMeta | BooleanFieldAdminMeta | DateFieldAdminMeta | TimeFieldAdminMeta | SelectFieldAdminMeta | RelationFieldAdminMeta | ObjectFieldAdminMeta | ArrayFieldAdminMeta | JsonFieldAdminMeta | UploadFieldAdminMeta | RichTextFieldAdminMeta | BlocksFieldAdminMeta;
|
|
281
|
+
/**
|
|
282
|
+
* Base widget admin meta (common options for all widgets)
|
|
283
|
+
*/
|
|
284
|
+
interface BaseWidgetAdminMeta {
|
|
285
|
+
/** Default grid span */
|
|
286
|
+
span?: number;
|
|
287
|
+
/** Default refresh interval */
|
|
288
|
+
refreshInterval?: number;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Registry interface for widget types.
|
|
292
|
+
* Users can augment this to add custom widget type configs.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```ts
|
|
296
|
+
* declare module "@questpie/admin" {
|
|
297
|
+
* interface WidgetTypeRegistry {
|
|
298
|
+
* myCustomWidget: { fetchFn: (client: any) => Promise<MyData> };
|
|
299
|
+
* }
|
|
300
|
+
* }
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
interface WidgetTypeRegistry {
|
|
304
|
+
stats: {};
|
|
305
|
+
chart: {};
|
|
306
|
+
recentItems: {};
|
|
307
|
+
quickActions: {};
|
|
308
|
+
value: {};
|
|
309
|
+
table: {};
|
|
310
|
+
timeline: {};
|
|
311
|
+
progress: {};
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
export { AnyAdminMeta, ArrayFieldAdminMeta, BaseAdminMeta, BaseWidgetAdminMeta, BooleanFieldAdminMeta, DateFieldAdminMeta, JsonFieldAdminMeta, NumberFieldAdminMeta, ObjectFieldAdminMeta, RelationFieldAdminMeta, SelectFieldAdminMeta, TextFieldAdminMeta, TextareaFieldAdminMeta, TimeFieldAdminMeta, UploadFieldAdminMeta, WidgetTypeRegistry };
|
|
315
|
+
//# sourceMappingURL=augmentation.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"augmentation.d.mts","names":[],"sources":["../src/augmentation.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;UAoEiB,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8CG;;;;;;;;;;;uBAYE;;;;;;;;;;;uBAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8BX;;;;;;;;;;;;;;;;;;;;;UA8BM,kBAAA,SAA2B;;;;;;;;;;UAW3B,mBAAA,SAA4B;;;;;;;;UAS5B,iBAAA,SAA0B;;;;;;;;;;UAW1B,sBAAA,SAA+B;;;;;;;;;;UAW/B,oBAAA,SAA6B;;;;;;;;UAS7B,qBAAA,SAA8B;;;;;;UAO9B,kBAAA,SAA2B;;;;;;UAO3B,kBAAA,SAA2B;;;;;;UAO3B,oBAAA,SAA6B;;;;;;;;;UAU7B,sBAAA,SAA+B;;;;;;;;;;;;UAa/B,oBAAA,SAA6B;;;;;;;;UAS7B,mBAAA,SAA4B;;;;;;;;;;;UAY5B,kBAAA,SAA2B;;;;;;;UAQ3B,oBAAA,SAA6B;;;;;;;UAQ7B,sBAAA,SAA+B;;;;;;;;;;;;;;;;;;;UAoB/B,oBAAA,SAA6B;;;;;;;;;;;;;;;;KAqBlC,YAAA,GACT,qBACA,yBACA,sBACA,oBACA,uBACA,wBACA,qBACA,qBACA,uBACA,yBACA,uBACA,sBACA,qBACA,uBACA,yBACA;;;;UASc,mBAAA;;;;;;;;;;;;;;;;;;;UAoBA,kBAAA"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/client/blocks/block-registry.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Extract blocks from CMS type.
|
|
7
|
+
* Handles the state.blocks structure from QuestpieBuilder.
|
|
8
|
+
*/
|
|
9
|
+
type ExtractServerBlocks<TCMS> = TCMS extends {
|
|
10
|
+
state: {
|
|
11
|
+
blocks: infer B;
|
|
12
|
+
};
|
|
13
|
+
} ? B extends Record<string, any> ? B : Record<string, never> : Record<string, never>;
|
|
14
|
+
/**
|
|
15
|
+
* Get block names from CMS type.
|
|
16
|
+
*/
|
|
17
|
+
type ServerBlockNames<TCMS> = keyof ExtractServerBlocks<TCMS>;
|
|
18
|
+
/**
|
|
19
|
+
* Extract field values type from a server block definition.
|
|
20
|
+
* Looks at the block's state.fields and extracts value types.
|
|
21
|
+
*/
|
|
22
|
+
type ExtractBlockFieldValues<TBlock> = TBlock extends {
|
|
23
|
+
state: {
|
|
24
|
+
fields: infer TFields;
|
|
25
|
+
};
|
|
26
|
+
} ? TFields extends Record<string, {
|
|
27
|
+
$types: {
|
|
28
|
+
value: infer V;
|
|
29
|
+
};
|
|
30
|
+
}> ? { [K in keyof TFields]: TFields[K]["$types"]["value"] } : Record<string, unknown> : Record<string, unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Extract prefetch data type from a server block definition.
|
|
33
|
+
* Looks at the block's state.prefetch return type.
|
|
34
|
+
*/
|
|
35
|
+
type ExtractBlockPrefetchData<TBlock> = TBlock extends {
|
|
36
|
+
state: {
|
|
37
|
+
prefetch: (params: any) => Promise<infer R>;
|
|
38
|
+
};
|
|
39
|
+
} ? R : TBlock extends {
|
|
40
|
+
state: {
|
|
41
|
+
prefetch: (params: any) => infer R;
|
|
42
|
+
};
|
|
43
|
+
} ? R : undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Block values type for a specific block name in a CMS.
|
|
46
|
+
*/
|
|
47
|
+
type BlockValues<TCMS, TBlockName extends keyof ExtractServerBlocks<TCMS>> = ExtractBlockFieldValues<ExtractServerBlocks<TCMS>[TBlockName]>;
|
|
48
|
+
/**
|
|
49
|
+
* Block prefetch data type for a specific block name in a CMS.
|
|
50
|
+
*/
|
|
51
|
+
type BlockPrefetchData<TCMS, TBlockName extends keyof ExtractServerBlocks<TCMS>> = ExtractBlockPrefetchData<ExtractServerBlocks<TCMS>[TBlockName]>;
|
|
52
|
+
/**
|
|
53
|
+
* Props passed to block renderer components.
|
|
54
|
+
*/
|
|
55
|
+
interface BlockRendererProps<TValues = Record<string, unknown>, TData = unknown> {
|
|
56
|
+
/** Block instance ID */
|
|
57
|
+
id: string;
|
|
58
|
+
/** Block field values */
|
|
59
|
+
values: TValues;
|
|
60
|
+
/** Data from server-side prefetch (if block has prefetch defined) */
|
|
61
|
+
data: TData;
|
|
62
|
+
/** Rendered child blocks (for layout blocks) */
|
|
63
|
+
children?: React$1.ReactNode;
|
|
64
|
+
/** Whether this block is currently selected in the editor */
|
|
65
|
+
isSelected?: boolean;
|
|
66
|
+
/** Whether rendering in preview mode */
|
|
67
|
+
isPreview?: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Block renderer component type.
|
|
71
|
+
*/
|
|
72
|
+
type BlockRendererComponent<TValues = Record<string, unknown>, TData = unknown> = React$1.ComponentType<BlockRendererProps<TValues, TData>>;
|
|
73
|
+
/**
|
|
74
|
+
* Block renderer definition.
|
|
75
|
+
*/
|
|
76
|
+
interface BlockRendererDefinition<TValues = Record<string, unknown>, TData = unknown> {
|
|
77
|
+
/** React component for rendering the block */
|
|
78
|
+
component: BlockRendererComponent<TValues, TData>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Type-safe block renderer registry.
|
|
82
|
+
* Tracks which blocks have been registered for type checking.
|
|
83
|
+
*/
|
|
84
|
+
interface BlockRegistry<TCMS, TRegistered extends Record<string, BlockRendererDefinition<any, any>> = Record<string, never>> {
|
|
85
|
+
/**
|
|
86
|
+
* Register a renderer for a block type.
|
|
87
|
+
*
|
|
88
|
+
* @param blockName - Name of the block (must match server block definition)
|
|
89
|
+
* @param definition - Block renderer definition with component
|
|
90
|
+
* @returns Updated registry with the new block registered
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* registry.register("hero", {
|
|
95
|
+
* component: ({ values, data }) => <HeroSection {...values} data={data} />
|
|
96
|
+
* })
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
register<TBlockName extends ServerBlockNames<TCMS> & string>(blockName: TBlockName, definition: BlockRendererDefinition<BlockValues<TCMS, TBlockName>, BlockPrefetchData<TCMS, TBlockName>>): BlockRegistry<TCMS, TRegistered & { [K in TBlockName]: BlockRendererDefinition<BlockValues<TCMS, TBlockName>, BlockPrefetchData<TCMS, TBlockName>> }>;
|
|
100
|
+
/**
|
|
101
|
+
* Get the registered renderers.
|
|
102
|
+
*/
|
|
103
|
+
readonly renderers: TRegistered;
|
|
104
|
+
/**
|
|
105
|
+
* Get a renderer by block name (runtime).
|
|
106
|
+
*/
|
|
107
|
+
getRenderer(blockName: string): BlockRendererDefinition<any, any> | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Check if a block has a registered renderer (runtime).
|
|
110
|
+
*/
|
|
111
|
+
hasRenderer(blockName: string): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Get all registered block names (runtime).
|
|
114
|
+
*/
|
|
115
|
+
getBlockNames(): string[];
|
|
116
|
+
/**
|
|
117
|
+
* Render a block by name (runtime helper).
|
|
118
|
+
*/
|
|
119
|
+
renderBlock(blockName: string, props: Omit<BlockRendererProps<any, any>, "children">, children?: React$1.ReactNode): React$1.ReactNode;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create a new type-safe block renderer registry.
|
|
123
|
+
*
|
|
124
|
+
* The registry infers block value types from the server CMS type,
|
|
125
|
+
* ensuring type safety without duplicating schema definitions.
|
|
126
|
+
*
|
|
127
|
+
* @template TCMS - Server CMS type (e.g., `typeof cms` or `AppCMS`)
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* import { createBlockRegistry } from "@questpie/admin/client";
|
|
132
|
+
* import type { AppCMS } from "@/server/cms";
|
|
133
|
+
*
|
|
134
|
+
* // Create typed registry
|
|
135
|
+
* export const blockRenderers = createBlockRegistry<AppCMS>()
|
|
136
|
+
* .register("hero", {
|
|
137
|
+
* // values is typed: { title: string, subtitle?: string, ... }
|
|
138
|
+
* // data is typed from prefetch return type
|
|
139
|
+
* component: ({ values, data }) => (
|
|
140
|
+
* <section>
|
|
141
|
+
* <h1>{values.title}</h1>
|
|
142
|
+
* {values.subtitle && <p>{values.subtitle}</p>}
|
|
143
|
+
* </section>
|
|
144
|
+
* ),
|
|
145
|
+
* })
|
|
146
|
+
* .register("columns", {
|
|
147
|
+
* component: ({ values, children }) => (
|
|
148
|
+
* <div className={`grid grid-cols-${values.columnCount}`}>
|
|
149
|
+
* {children}
|
|
150
|
+
* </div>
|
|
151
|
+
* ),
|
|
152
|
+
* });
|
|
153
|
+
*
|
|
154
|
+
* // Use in BlockRenderer component
|
|
155
|
+
* function BlockRenderer({ block }: { block: BlockNode }) {
|
|
156
|
+
* return blockRenderers.renderBlock(
|
|
157
|
+
* block.type,
|
|
158
|
+
* { id: block.id, values: blockValues[block.id], data: blockData[block.id] },
|
|
159
|
+
* block.children.map(child => <BlockRenderer key={child.id} block={child} />)
|
|
160
|
+
* );
|
|
161
|
+
* }
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
declare function createBlockRegistry<TCMS>(): BlockRegistry<TCMS, Record<string, never>>;
|
|
165
|
+
/**
|
|
166
|
+
* Extract the component props type for a registered block.
|
|
167
|
+
* Useful when you need to type component props externally.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* type HeroProps = BlockComponentProps<AppCMS, "hero">;
|
|
172
|
+
* // { id: string; values: HeroValues; data: HeroData; children?: ReactNode; ... }
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
type BlockComponentProps<TCMS, TBlockName extends ServerBlockNames<TCMS>> = BlockRendererProps<BlockValues<TCMS, TBlockName>, BlockPrefetchData<TCMS, TBlockName>>;
|
|
176
|
+
/**
|
|
177
|
+
* Helper type to get all possible block value types from CMS.
|
|
178
|
+
* Useful for union types or discriminated unions.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* type AnyBlockValues = AllBlockValues<AppCMS>;
|
|
183
|
+
* // { hero: HeroValues; text: TextValues; columns: ColumnsValues; ... }
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
type AllBlockValues<TCMS> = { [K in ServerBlockNames<TCMS> & string]: BlockValues<TCMS, K> };
|
|
187
|
+
/**
|
|
188
|
+
* Helper type to get all possible block data types from CMS.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```ts
|
|
192
|
+
* type AnyBlockData = AllBlockData<AppCMS>;
|
|
193
|
+
* // { hero: HeroData; featuredPosts: { posts: Post[] }; ... }
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
type AllBlockData<TCMS> = { [K in ServerBlockNames<TCMS> & string]: BlockPrefetchData<TCMS, K> };
|
|
197
|
+
//#endregion
|
|
198
|
+
export { AllBlockData, AllBlockValues, BlockComponentProps, BlockPrefetchData, BlockRegistry, BlockRendererComponent, BlockRendererDefinition, BlockRendererProps, BlockValues, ExtractBlockFieldValues, ExtractBlockPrefetchData, ExtractServerBlocks, ServerBlockNames, createBlockRegistry };
|
|
199
|
+
//# sourceMappingURL=block-registry.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-registry.d.mts","names":[],"sources":["../../../src/client/blocks/block-registry.tsx"],"sourcesContent":[],"mappings":";;;;;;;AA2GA;AACY,KA7DA,mBA6DA,CAAA,IAAA,CAAA,GA7D4B,IA6D5B,SAAA;EAMF,KAAA,EAAA;IAEF,MAAA,EAAA,KAAA,EAAA;EAEK,CAAA;CAAe,GAAA,CAAA,SApEd,MAoEc,CAAA,MAAA,EAAA,GAAA,CAAA,GAAA,CAAA,GAlEtB,MAkEsB,CAAA,MAAA,EAAA,KAAA,CAAA,GAjExB,MAiEwB,CAAA,MAAA,EAAA,KAAA,CAAA;AAU5B;;;AAGoD,KAzExC,gBAyEwC,CAAA,IAAA,CAAA,GAAA,MAzET,mBAyES,CAzEW,IAyEX,CAAA;;;;AAKpD;AACY,KAzEA,uBAyEA,CAAA,MAAA,CAAA,GAzEkC,MAyElC,SAAA;EAIwB,KAAA,EAAA;IAAS,MAAA,EAAA,KAAA,QAAA;EAAhC,CAAA;CAAsB,GAAA,OAAA,SA1Ef,MA0Ee,CAAA,MAAA,EAAA;EAWlB,MAAA,EAAA;IAEoB,KAAA,EAAA,KAAA,EAAA;EAAf,CAAA;CAClB,CAAA,GAAA,QAgB2C,MAvG3B,OAuG2B,GAvGjB,OAuGiB,CAvGT,CAuGS,CAAA,CAAA,QAAA,CAAA,CAAA,OAAA,CAAA,EAAjB,GAtGxB,MAsGwB,CAAA,MAAA,EAAA,OAAA,CAAA,GArG1B,MAqG0B,CAAA,MAAA,EAAA,OAAA,CAAA;;;;;AAIN,KAnGZ,wBAmGY,CAAA,MAAA,CAAA,GAnGuB,MAmGvB,SAAA;EAAM,KAAA,EAAA;IAAxB,QAAA,EAAA,CAAA,MAAA,EAAA,GAAA,EAAA,GAlGgC,OAkGhC,CAAA,KAAA,EAAA,CAAA;EAFU,CAAA;CAKZ,GAAA,CAAA,GAlGA,MAkGA,SAAA;EACA,KAAA,EAAA;IACQ,QAAA,EAAA,CAAA,MAAA,EAAA,GAAA,EAAA,GAAA,KAAA,EAAA;EACQ,CAAA;CAAM,GAAA,CAAA,GAAA,SAAA;;;;AAClB,KA/FI,WA+FJ,CAAA,IAAA,EAAA,mBAAA,MA7FmB,mBA6FnB,CA7FuC,IA6FvC,CAAA,CAAA,GA5FJ,uBA4FI,CA5FoB,mBA4FpB,CA5FwC,IA4FxC,CAAA,CA5F8C,UA4F9C,CAAA,CAAA;;;;AAa0B,KApGtB,iBAoGsB,CAAA,IAAA,EAAA,mBAAA,MAlGP,mBAkGO,CAlGa,IAkGb,CAAA,CAAA,GAjG9B,wBAiG8B,CAjGL,mBAiGK,CAjGe,IAiGf,CAAA,CAjGqB,UAiGrB,CAAA,CAAA;;;;AAmB7B,UA3GY,kBA2GN,CAAA,UA1GC,MA0GD,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,QAAA,OAAA,CAAA,CAAA;EAAS;EAmHJ,EAAA,EAAA,MAAA;EACd;EACA,MAAA,EAzNQ,OAyNR;EAF2C;EAAa,IAAA,EArNlD,KAqNkD;EAqB9C;EAE0B,QAAA,CAAA,EA1OzB,OAAA,CAAM,SA0OmB;EAAjB;EAEP,UAAA,CAAA,EAAA,OAAA;EAAM;EAAlB,SAAA,CAAA,EAAA,OAAA;;;;;AADoB,KAjOV,sBAiOU,CAAA,UAhOV,MAgOU,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,QAAA,OAAA,CAAA,GA9NlB,OAAA,CAAM,aA8NY,CA9NE,kBA8NF,CA9NqB,OA8NrB,EA9N8B,KA8N9B,CAAA,CAAA;AAetB;;;AACsD,UAzOrC,uBAyOqC,CAAA,UAxO1C,MAwO0C,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,QAAA,OAAA,CAAA,CAAA;EAAM;EAAlB,SAAA,EApO7B,sBAoO6B,CApON,OAoOM,EApOG,KAoOH,CAAA;;AAY1C;;;;AACkE,UAtOjD,aAsOiD,CAAA,IAAA,EAAA,oBApO5C,MAoO4C,CAAA,MAAA,EApO7B,uBAoO6B,CAAA,GAAA,EAAA,GAAA,CAAA,CAAA,GAnO9D,MAmO8D,CAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;EAAxB;;;;;;;;;;;;;;8BAnNZ,iBAAiB,2BAChC,wBACC,wBACV,YAAY,MAAM,aAClB,kBAAkB,MAAM,eAEzB,cACD,MACA,sBACQ,aAAa,wBACjB,YAAY,MAAM,aAClB,kBAAkB,MAAM;;;;sBAQV;;;;kCAKY;;;;;;;;;;;;wCAiBvB,KAAK,sDACD,OAAA,CAAM,YAChB,OAAA,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmHK,6BAA6B,cAC3C,MACA;;;;;;;;;;;KAmBU,6CAES,iBAAiB,SAClC,mBACF,YAAY,MAAM,aAClB,kBAAkB,MAAM;;;;;;;;;;;KAad,+BACJ,iBAAiB,iBAAiB,YAAY,MAAM;;;;;;;;;;KAYhD,6BACJ,iBAAiB,iBAAiB,kBAAkB,MAAM"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/client/blocks/block-registry.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Internal class implementing BlockRegistry.
|
|
6
|
+
*/
|
|
7
|
+
var BlockRegistryImpl = class BlockRegistryImpl {
|
|
8
|
+
constructor(renderers = {}) {
|
|
9
|
+
this.renderers = renderers;
|
|
10
|
+
}
|
|
11
|
+
register(blockName, definition) {
|
|
12
|
+
return new BlockRegistryImpl({
|
|
13
|
+
...this.renderers,
|
|
14
|
+
[blockName]: definition
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
getRenderer(blockName) {
|
|
18
|
+
return this.renderers[blockName];
|
|
19
|
+
}
|
|
20
|
+
hasRenderer(blockName) {
|
|
21
|
+
return blockName in this.renderers;
|
|
22
|
+
}
|
|
23
|
+
getBlockNames() {
|
|
24
|
+
return Object.keys(this.renderers);
|
|
25
|
+
}
|
|
26
|
+
renderBlock(blockName, props, children) {
|
|
27
|
+
const renderer = this.getRenderer(blockName);
|
|
28
|
+
if (!renderer) {
|
|
29
|
+
console.warn(`No renderer registered for block type: ${blockName}`);
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const Component = renderer.component;
|
|
33
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
34
|
+
...props,
|
|
35
|
+
children
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Create a new type-safe block renderer registry.
|
|
41
|
+
*
|
|
42
|
+
* The registry infers block value types from the server CMS type,
|
|
43
|
+
* ensuring type safety without duplicating schema definitions.
|
|
44
|
+
*
|
|
45
|
+
* @template TCMS - Server CMS type (e.g., `typeof cms` or `AppCMS`)
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { createBlockRegistry } from "@questpie/admin/client";
|
|
50
|
+
* import type { AppCMS } from "@/server/cms";
|
|
51
|
+
*
|
|
52
|
+
* // Create typed registry
|
|
53
|
+
* export const blockRenderers = createBlockRegistry<AppCMS>()
|
|
54
|
+
* .register("hero", {
|
|
55
|
+
* // values is typed: { title: string, subtitle?: string, ... }
|
|
56
|
+
* // data is typed from prefetch return type
|
|
57
|
+
* component: ({ values, data }) => (
|
|
58
|
+
* <section>
|
|
59
|
+
* <h1>{values.title}</h1>
|
|
60
|
+
* {values.subtitle && <p>{values.subtitle}</p>}
|
|
61
|
+
* </section>
|
|
62
|
+
* ),
|
|
63
|
+
* })
|
|
64
|
+
* .register("columns", {
|
|
65
|
+
* component: ({ values, children }) => (
|
|
66
|
+
* <div className={`grid grid-cols-${values.columnCount}`}>
|
|
67
|
+
* {children}
|
|
68
|
+
* </div>
|
|
69
|
+
* ),
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* // Use in BlockRenderer component
|
|
73
|
+
* function BlockRenderer({ block }: { block: BlockNode }) {
|
|
74
|
+
* return blockRenderers.renderBlock(
|
|
75
|
+
* block.type,
|
|
76
|
+
* { id: block.id, values: blockValues[block.id], data: blockData[block.id] },
|
|
77
|
+
* block.children.map(child => <BlockRenderer key={child.id} block={child} />)
|
|
78
|
+
* );
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
function createBlockRegistry() {
|
|
83
|
+
return new BlockRegistryImpl();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
export { createBlockRegistry };
|
|
88
|
+
//# sourceMappingURL=block-registry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-registry.mjs","names":["renderers: TRegistered"],"sources":["../../../src/client/blocks/block-registry.tsx"],"sourcesContent":["/**\n * Block Renderer Registry\n *\n * Type-safe registry for client-side block renderers that infers\n * value types from server-defined block schemas.\n *\n * Key design principles:\n * 1. Server defines WHAT (block schema, prefetch) - see @questpie/admin/server\n * 2. Client defines HOW (React components for rendering)\n * 3. Types are inferred from server CMS type - no duplication\n *\n * @example\n * ```ts\n * import { createBlockRegistry } from \"@questpie/admin/client\";\n * import type { AppCMS } from \"@/server/cms\";\n *\n * export const blockRenderers = createBlockRegistry<AppCMS>()\n * .register(\"hero\", {\n * // Props are inferred from server block schema!\n * // values: { title: string, subtitle?: string, alignment: \"left\" | \"center\" | \"right\", ... }\n * // data: Awaited<ReturnType<typeof heroBlock.prefetch>>\n * component: ({ values, data }) => (\n * <section className={`hero hero--${values.alignment}`}>\n * <h1>{values.title}</h1>\n * </section>\n * ),\n * })\n * .register(\"featuredPosts\", {\n * component: ({ values, data }) => (\n * <div className=\"featured-posts\">\n * {data?.posts?.map(post => <PostCard key={post.id} post={post} />)}\n * </div>\n * ),\n * });\n * ```\n */\n\nimport type * as React from \"react\";\n\n// ============================================================================\n// Server Block Type Extraction\n// ============================================================================\n\n/**\n * Extract blocks from CMS type.\n * Handles the state.blocks structure from QuestpieBuilder.\n */\nexport type ExtractServerBlocks<TCMS> = TCMS extends {\n state: { blocks: infer B };\n}\n ? B extends Record<string, any>\n ? B\n : Record<string, never>\n : Record<string, never>;\n\n/**\n * Get block names from CMS type.\n */\nexport type ServerBlockNames<TCMS> = keyof ExtractServerBlocks<TCMS>;\n\n/**\n * Extract field values type from a server block definition.\n * Looks at the block's state.fields and extracts value types.\n */\nexport type ExtractBlockFieldValues<TBlock> = TBlock extends {\n state: { fields: infer TFields };\n}\n ? TFields extends Record<string, { $types: { value: infer V } }>\n ? { [K in keyof TFields]: TFields[K][\"$types\"][\"value\"] }\n : Record<string, unknown>\n : Record<string, unknown>;\n\n/**\n * Extract prefetch data type from a server block definition.\n * Looks at the block's state.prefetch return type.\n */\nexport type ExtractBlockPrefetchData<TBlock> = TBlock extends {\n state: { prefetch: (params: any) => Promise<infer R> };\n}\n ? R\n : TBlock extends { state: { prefetch: (params: any) => infer R } }\n ? R\n : undefined;\n\n/**\n * Block values type for a specific block name in a CMS.\n */\nexport type BlockValues<\n TCMS,\n TBlockName extends keyof ExtractServerBlocks<TCMS>,\n> = ExtractBlockFieldValues<ExtractServerBlocks<TCMS>[TBlockName]>;\n\n/**\n * Block prefetch data type for a specific block name in a CMS.\n */\nexport type BlockPrefetchData<\n TCMS,\n TBlockName extends keyof ExtractServerBlocks<TCMS>,\n> = ExtractBlockPrefetchData<ExtractServerBlocks<TCMS>[TBlockName]>;\n\n// ============================================================================\n// Block Renderer Types\n// ============================================================================\n\n/**\n * Props passed to block renderer components.\n */\nexport interface BlockRendererProps<\n TValues = Record<string, unknown>,\n TData = unknown,\n> {\n /** Block instance ID */\n id: string;\n /** Block field values */\n values: TValues;\n /** Data from server-side prefetch (if block has prefetch defined) */\n data: TData;\n /** Rendered child blocks (for layout blocks) */\n children?: React.ReactNode;\n /** Whether this block is currently selected in the editor */\n isSelected?: boolean;\n /** Whether rendering in preview mode */\n isPreview?: boolean;\n}\n\n/**\n * Block renderer component type.\n */\nexport type BlockRendererComponent<\n TValues = Record<string, unknown>,\n TData = unknown,\n> = React.ComponentType<BlockRendererProps<TValues, TData>>;\n\n/**\n * Block renderer definition.\n */\nexport interface BlockRendererDefinition<\n TValues = Record<string, unknown>,\n TData = unknown,\n> {\n /** React component for rendering the block */\n component: BlockRendererComponent<TValues, TData>;\n}\n\n// ============================================================================\n// Block Registry\n// ============================================================================\n\n/**\n * Type-safe block renderer registry.\n * Tracks which blocks have been registered for type checking.\n */\nexport interface BlockRegistry<\n TCMS,\n TRegistered extends Record<string, BlockRendererDefinition<any, any>> =\n Record<string, never>,\n> {\n /**\n * Register a renderer for a block type.\n *\n * @param blockName - Name of the block (must match server block definition)\n * @param definition - Block renderer definition with component\n * @returns Updated registry with the new block registered\n *\n * @example\n * ```ts\n * registry.register(\"hero\", {\n * component: ({ values, data }) => <HeroSection {...values} data={data} />\n * })\n * ```\n */\n register<TBlockName extends ServerBlockNames<TCMS> & string>(\n blockName: TBlockName,\n definition: BlockRendererDefinition<\n BlockValues<TCMS, TBlockName>,\n BlockPrefetchData<TCMS, TBlockName>\n >,\n ): BlockRegistry<\n TCMS,\n TRegistered & {\n [K in TBlockName]: BlockRendererDefinition<\n BlockValues<TCMS, TBlockName>,\n BlockPrefetchData<TCMS, TBlockName>\n >;\n }\n >;\n\n /**\n * Get the registered renderers.\n */\n readonly renderers: TRegistered;\n\n /**\n * Get a renderer by block name (runtime).\n */\n getRenderer(blockName: string): BlockRendererDefinition<any, any> | undefined;\n\n /**\n * Check if a block has a registered renderer (runtime).\n */\n hasRenderer(blockName: string): boolean;\n\n /**\n * Get all registered block names (runtime).\n */\n getBlockNames(): string[];\n\n /**\n * Render a block by name (runtime helper).\n */\n renderBlock(\n blockName: string,\n props: Omit<BlockRendererProps<any, any>, \"children\">,\n children?: React.ReactNode,\n ): React.ReactNode;\n}\n\n// ============================================================================\n// Registry Implementation\n// ============================================================================\n\n/**\n * Internal class implementing BlockRegistry.\n */\nclass BlockRegistryImpl<\n TCMS,\n TRegistered extends Record<string, BlockRendererDefinition<any, any>>,\n> implements BlockRegistry<TCMS, TRegistered> {\n constructor(public readonly renderers: TRegistered = {} as TRegistered) {}\n\n register<TBlockName extends ServerBlockNames<TCMS> & string>(\n blockName: TBlockName,\n definition: BlockRendererDefinition<\n BlockValues<TCMS, TBlockName>,\n BlockPrefetchData<TCMS, TBlockName>\n >,\n ): BlockRegistry<\n TCMS,\n TRegistered & {\n [K in TBlockName]: BlockRendererDefinition<\n BlockValues<TCMS, TBlockName>,\n BlockPrefetchData<TCMS, TBlockName>\n >;\n }\n > {\n return new BlockRegistryImpl({\n ...this.renderers,\n [blockName]: definition,\n } as any);\n }\n\n getRenderer(\n blockName: string,\n ): BlockRendererDefinition<any, any> | undefined {\n return (\n this.renderers as Record<string, BlockRendererDefinition<any, any>>\n )[blockName];\n }\n\n hasRenderer(blockName: string): boolean {\n return blockName in this.renderers;\n }\n\n getBlockNames(): string[] {\n return Object.keys(this.renderers);\n }\n\n renderBlock(\n blockName: string,\n props: Omit<BlockRendererProps<any, any>, \"children\">,\n children?: React.ReactNode,\n ): React.ReactNode {\n const renderer = this.getRenderer(blockName);\n if (!renderer) {\n console.warn(`No renderer registered for block type: ${blockName}`);\n return null;\n }\n const Component = renderer.component;\n return <Component {...props} children={children} />;\n }\n}\n\n// ============================================================================\n// Factory Function\n// ============================================================================\n\n/**\n * Create a new type-safe block renderer registry.\n *\n * The registry infers block value types from the server CMS type,\n * ensuring type safety without duplicating schema definitions.\n *\n * @template TCMS - Server CMS type (e.g., `typeof cms` or `AppCMS`)\n *\n * @example\n * ```ts\n * import { createBlockRegistry } from \"@questpie/admin/client\";\n * import type { AppCMS } from \"@/server/cms\";\n *\n * // Create typed registry\n * export const blockRenderers = createBlockRegistry<AppCMS>()\n * .register(\"hero\", {\n * // values is typed: { title: string, subtitle?: string, ... }\n * // data is typed from prefetch return type\n * component: ({ values, data }) => (\n * <section>\n * <h1>{values.title}</h1>\n * {values.subtitle && <p>{values.subtitle}</p>}\n * </section>\n * ),\n * })\n * .register(\"columns\", {\n * component: ({ values, children }) => (\n * <div className={`grid grid-cols-${values.columnCount}`}>\n * {children}\n * </div>\n * ),\n * });\n *\n * // Use in BlockRenderer component\n * function BlockRenderer({ block }: { block: BlockNode }) {\n * return blockRenderers.renderBlock(\n * block.type,\n * { id: block.id, values: blockValues[block.id], data: blockData[block.id] },\n * block.children.map(child => <BlockRenderer key={child.id} block={child} />)\n * );\n * }\n * ```\n */\nexport function createBlockRegistry<TCMS>(): BlockRegistry<\n TCMS,\n Record<string, never>\n> {\n return new BlockRegistryImpl<TCMS, Record<string, never>>();\n}\n\n// ============================================================================\n// Utility Types for Advanced Usage\n// ============================================================================\n\n/**\n * Extract the component props type for a registered block.\n * Useful when you need to type component props externally.\n *\n * @example\n * ```ts\n * type HeroProps = BlockComponentProps<AppCMS, \"hero\">;\n * // { id: string; values: HeroValues; data: HeroData; children?: ReactNode; ... }\n * ```\n */\nexport type BlockComponentProps<\n TCMS,\n TBlockName extends ServerBlockNames<TCMS>,\n> = BlockRendererProps<\n BlockValues<TCMS, TBlockName>,\n BlockPrefetchData<TCMS, TBlockName>\n>;\n\n/**\n * Helper type to get all possible block value types from CMS.\n * Useful for union types or discriminated unions.\n *\n * @example\n * ```ts\n * type AnyBlockValues = AllBlockValues<AppCMS>;\n * // { hero: HeroValues; text: TextValues; columns: ColumnsValues; ... }\n * ```\n */\nexport type AllBlockValues<TCMS> = {\n [K in ServerBlockNames<TCMS> & string]: BlockValues<TCMS, K>;\n};\n\n/**\n * Helper type to get all possible block data types from CMS.\n *\n * @example\n * ```ts\n * type AnyBlockData = AllBlockData<AppCMS>;\n * // { hero: HeroData; featuredPosts: { posts: Post[] }; ... }\n * ```\n */\nexport type AllBlockData<TCMS> = {\n [K in ServerBlockNames<TCMS> & string]: BlockPrefetchData<TCMS, K>;\n};\n"],"mappings":";;;;;;AAgOA,IAAM,oBAAN,MAAM,kBAGwC;CAC5C,YAAY,AAAgBA,YAAyB,EAAE,EAAiB;EAA5C;;CAE5B,SACE,WACA,YAYA;AACA,SAAO,IAAI,kBAAkB;GAC3B,GAAG,KAAK;IACP,YAAY;GACd,CAAQ;;CAGX,YACE,WAC+C;AAC/C,SACE,KAAK,UACL;;CAGJ,YAAY,WAA4B;AACtC,SAAO,aAAa,KAAK;;CAG3B,gBAA0B;AACxB,SAAO,OAAO,KAAK,KAAK,UAAU;;CAGpC,YACE,WACA,OACA,UACiB;EACjB,MAAM,WAAW,KAAK,YAAY,UAAU;AAC5C,MAAI,CAAC,UAAU;AACb,WAAQ,KAAK,0CAA0C,YAAY;AACnE,UAAO;;EAET,MAAM,YAAY,SAAS;AAC3B,SAAO,oBAAC;GAAU,GAAI;GAAiB;IAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDvD,SAAgB,sBAGd;AACA,QAAO,IAAI,mBAAgD"}
|