@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,52 @@
|
|
|
1
|
+
import { BlockContent } from "./types.mjs";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/client/blocks/block-renderer.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Block renderer function type.
|
|
9
|
+
* Consumers provide their own renderers mapped by block type.
|
|
10
|
+
*/
|
|
11
|
+
type BlockRendererFn = (props: {
|
|
12
|
+
id: string;
|
|
13
|
+
type: string;
|
|
14
|
+
values: Record<string, unknown>;
|
|
15
|
+
data?: Record<string, unknown>;
|
|
16
|
+
children?: React$1.ReactNode;
|
|
17
|
+
}) => React$1.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Props for BlockRenderer component.
|
|
20
|
+
*/
|
|
21
|
+
type BlockRendererProps = {
|
|
22
|
+
/** Block content from API (tree + values) */
|
|
23
|
+
content: BlockContent;
|
|
24
|
+
/** Block renderers mapped by type */
|
|
25
|
+
renderers: Record<string, BlockRendererFn>;
|
|
26
|
+
/** Prefetched data by block ID (optional, for SSR) */
|
|
27
|
+
data?: Record<string, unknown>;
|
|
28
|
+
/** Currently selected block ID (for editor mode) */
|
|
29
|
+
selectedBlockId?: string | null;
|
|
30
|
+
/** Block click handler (for editor mode) */
|
|
31
|
+
onBlockClick?: (blockId: string) => void;
|
|
32
|
+
/** Custom class name for the container */
|
|
33
|
+
className?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Renders a tree of blocks.
|
|
37
|
+
*
|
|
38
|
+
* Iterates through the block tree and renders each block using its
|
|
39
|
+
* registered renderer component. Layout blocks receive their rendered
|
|
40
|
+
* children as the `children` prop.
|
|
41
|
+
*/
|
|
42
|
+
declare function BlockRenderer({
|
|
43
|
+
content,
|
|
44
|
+
renderers,
|
|
45
|
+
data,
|
|
46
|
+
selectedBlockId,
|
|
47
|
+
onBlockClick,
|
|
48
|
+
className
|
|
49
|
+
}: BlockRendererProps): react_jsx_runtime24.JSX.Element | null;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { BlockRenderer, BlockRendererProps };
|
|
52
|
+
//# sourceMappingURL=block-renderer.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-renderer.d.mts","names":[],"sources":["../../../src/client/blocks/block-renderer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;KA8BY,eAAA;;;UAGH;SACD;aACI,OAAA,CAAM;MACZ,OAAA,CAAM;;;;KAKA,kBAAA;;WAEF;;aAEE,eAAe;;SAEnB;;;;;;;;;;;;;;;iBAgBQ,aAAA;;;;;;;GAOb,qBAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { BlockScopeProvider } from "../preview/block-scope-context.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/blocks/block-renderer.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Renders a tree of blocks.
|
|
7
|
+
*
|
|
8
|
+
* Iterates through the block tree and renders each block using its
|
|
9
|
+
* registered renderer component. Layout blocks receive their rendered
|
|
10
|
+
* children as the `children` prop.
|
|
11
|
+
*/
|
|
12
|
+
function BlockRenderer({ content, renderers, data = {}, selectedBlockId, onBlockClick, className }) {
|
|
13
|
+
/**
|
|
14
|
+
* Recursively render a block node.
|
|
15
|
+
*/
|
|
16
|
+
function renderBlock(node) {
|
|
17
|
+
const renderFn = renderers[node.type];
|
|
18
|
+
if (!renderFn) {
|
|
19
|
+
if (process.env.NODE_ENV !== "production") console.warn(`[BlockRenderer] No renderer found for block type "${node.type}"`);
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const values = content._values[node.id] || {};
|
|
23
|
+
const blockData = data[node.id];
|
|
24
|
+
node.id;
|
|
25
|
+
const renderedChildren = node.children.length > 0 ? node.children.map(renderBlock) : void 0;
|
|
26
|
+
const handleClick = onBlockClick ? (e) => {
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
onBlockClick(node.id);
|
|
29
|
+
} : void 0;
|
|
30
|
+
const blockElement = /* @__PURE__ */ jsx(BlockScopeProvider, {
|
|
31
|
+
blockId: node.id,
|
|
32
|
+
basePath: "content._values",
|
|
33
|
+
children: renderFn({
|
|
34
|
+
id: node.id,
|
|
35
|
+
type: node.type,
|
|
36
|
+
values,
|
|
37
|
+
data: blockData,
|
|
38
|
+
children: renderedChildren
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
if (handleClick) return /* @__PURE__ */ jsx("div", {
|
|
42
|
+
"data-block-id": node.id,
|
|
43
|
+
"data-block-type": node.type,
|
|
44
|
+
onClick: handleClick,
|
|
45
|
+
onKeyDown: (e) => {
|
|
46
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
onBlockClick?.(node.id);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
role: "button",
|
|
52
|
+
tabIndex: 0,
|
|
53
|
+
className: "cursor-pointer",
|
|
54
|
+
children: blockElement
|
|
55
|
+
}, node.id);
|
|
56
|
+
return /* @__PURE__ */ jsx("div", {
|
|
57
|
+
"data-block-id": node.id,
|
|
58
|
+
"data-block-type": node.type,
|
|
59
|
+
children: blockElement
|
|
60
|
+
}, node.id);
|
|
61
|
+
}
|
|
62
|
+
if (!content?._tree?.length) return null;
|
|
63
|
+
return /* @__PURE__ */ jsx("div", {
|
|
64
|
+
className,
|
|
65
|
+
children: content._tree.map(renderBlock)
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { BlockRenderer };
|
|
71
|
+
//# sourceMappingURL=block-renderer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-renderer.mjs","names":[],"sources":["../../../src/client/blocks/block-renderer.tsx"],"sourcesContent":["/**\n * BlockRenderer Component\n *\n * Renders a tree of blocks using registered block definitions.\n * Each block type has a renderer component that receives the block's values.\n *\n * @example\n * ```tsx\n * import { BlockRenderer } from \"@questpie/admin/client\";\n * import { blocks } from \"~/admin/blocks\";\n *\n * function PageContent({ page }) {\n * return (\n * <BlockRenderer\n * content={page.content}\n * blocks={blocks}\n * />\n * );\n * }\n * ```\n */\n\nimport type * as React from \"react\";\nimport { BlockScopeProvider } from \"../preview/block-scope-context.js\";\nimport type { BlockContent, BlockNode } from \"./types\";\n\n/**\n * Block renderer function type.\n * Consumers provide their own renderers mapped by block type.\n */\nexport type BlockRendererFn = (props: {\n\tid: string;\n\ttype: string;\n\tvalues: Record<string, unknown>;\n\tdata?: Record<string, unknown>;\n\tchildren?: React.ReactNode;\n}) => React.ReactNode;\n\n/**\n * Props for BlockRenderer component.\n */\nexport type BlockRendererProps = {\n\t/** Block content from API (tree + values) */\n\tcontent: BlockContent;\n\t/** Block renderers mapped by type */\n\trenderers: Record<string, BlockRendererFn>;\n\t/** Prefetched data by block ID (optional, for SSR) */\n\tdata?: Record<string, unknown>;\n\t/** Currently selected block ID (for editor mode) */\n\tselectedBlockId?: string | null;\n\t/** Block click handler (for editor mode) */\n\tonBlockClick?: (blockId: string) => void;\n\t/** Custom class name for the container */\n\tclassName?: string;\n};\n\n/**\n * Renders a tree of blocks.\n *\n * Iterates through the block tree and renders each block using its\n * registered renderer component. Layout blocks receive their rendered\n * children as the `children` prop.\n */\nexport function BlockRenderer({\n\tcontent,\n\trenderers,\n\tdata = {},\n\tselectedBlockId,\n\tonBlockClick,\n\tclassName,\n}: BlockRendererProps) {\n\t/**\n\t * Recursively render a block node.\n\t */\n\tfunction renderBlock(node: BlockNode): React.ReactNode {\n\t\tconst renderFn = renderers[node.type];\n\n\t\tif (!renderFn) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`[BlockRenderer] No renderer found for block type \"${node.type}\"`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tconst values = content._values[node.id] || {};\n\t\tconst blockData = data[node.id] as Record<string, unknown> | undefined;\n\t\tconst isSelected = selectedBlockId === node.id;\n\n\t\t// Render children for layout blocks\n\t\tconst renderedChildren =\n\t\t\tnode.children.length > 0 ? node.children.map(renderBlock) : undefined;\n\n\t\tconst handleClick = onBlockClick\n\t\t\t? (e: React.MouseEvent) => {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tonBlockClick(node.id);\n\t\t\t\t}\n\t\t\t: undefined;\n\n\t\tconst blockElement = (\n\t\t\t<BlockScopeProvider blockId={node.id} basePath=\"content._values\">\n\t\t\t\t{renderFn({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: node.type,\n\t\t\t\t\tvalues,\n\t\t\t\t\tdata: blockData,\n\t\t\t\t\tchildren: renderedChildren,\n\t\t\t\t})}\n\t\t\t</BlockScopeProvider>\n\t\t);\n\n\t\t// Wrap in interactive container when in editor mode\n\t\tif (handleClick) {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tkey={node.id}\n\t\t\t\t\tdata-block-id={node.id}\n\t\t\t\t\tdata-block-type={node.type}\n\t\t\t\t\tonClick={handleClick}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tonBlockClick?.(node.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t>\n\t\t\t\t\t{blockElement}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div key={node.id} data-block-id={node.id} data-block-type={node.type}>\n\t\t\t\t{blockElement}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (!content?._tree?.length) {\n\t\treturn null;\n\t}\n\n\treturn <div className={className}>{content._tree.map(renderBlock)}</div>;\n}\n\nexport default BlockRenderer;\n"],"mappings":";;;;;;;;;;;AA+DA,SAAgB,cAAc,EAC7B,SACA,WACA,OAAO,EAAE,EACT,iBACA,cACA,aACsB;;;;CAItB,SAAS,YAAY,MAAkC;EACtD,MAAM,WAAW,UAAU,KAAK;AAEhC,MAAI,CAAC,UAAU;AACd,OAAI,QAAQ,IAAI,aAAa,aAC5B,SAAQ,KACP,qDAAqD,KAAK,KAAK,GAC/D;AAEF,UAAO;;EAGR,MAAM,SAAS,QAAQ,QAAQ,KAAK,OAAO,EAAE;EAC7C,MAAM,YAAY,KAAK,KAAK;AACT,EAAoB,KAAK;EAG5C,MAAM,mBACL,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,IAAI,YAAY,GAAG;EAE7D,MAAM,cAAc,gBAChB,MAAwB;AACzB,KAAE,iBAAiB;AACnB,gBAAa,KAAK,GAAG;MAErB;EAEH,MAAM,eACL,oBAAC;GAAmB,SAAS,KAAK;GAAI,UAAS;aAC7C,SAAS;IACT,IAAI,KAAK;IACT,MAAM,KAAK;IACX;IACA,MAAM;IACN,UAAU;IACV,CAAC;IACkB;AAItB,MAAI,YACH,QACC,oBAAC;GAEA,iBAAe,KAAK;GACpB,mBAAiB,KAAK;GACtB,SAAS;GACT,YAAY,MAAM;AACjB,QAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;AACvC,OAAE,gBAAgB;AAClB,oBAAe,KAAK,GAAG;;;GAGzB,MAAK;GACL,UAAU;GACV,WAAU;aAET;KAdI,KAAK,GAeL;AAIR,SACC,oBAAC;GAAkB,iBAAe,KAAK;GAAI,mBAAiB,KAAK;aAC/D;KADQ,KAAK,GAET;;AAIR,KAAI,CAAC,SAAS,OAAO,OACpB,QAAO;AAGR,QAAO,oBAAC;EAAe;YAAY,QAAQ,MAAM,IAAI,YAAY;GAAO"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AllBlockData, AllBlockValues, BlockComponentProps, BlockPrefetchData, BlockRegistry, BlockRendererComponent, BlockRendererDefinition, BlockRendererProps, BlockValues, ExtractBlockFieldValues, ExtractBlockPrefetchData, ExtractServerBlocks, ServerBlockNames, createBlockRegistry } from "./block-registry.mjs";
|
|
2
|
+
import { BlockCategory, BlockContent, BlockNode, BlockRendererProps as BlockRendererProps$1, EMPTY_BLOCK_CONTENT, isBlockContent } from "./types.mjs";
|
|
3
|
+
import { BlockRenderer, BlockRendererProps as BlockRendererProps$2 } from "./block-renderer.mjs";
|
|
4
|
+
import { BlockPrefetchContext, BlockPrefetchError, BlockPrefetchParams, BlockPrefetchResult, TypedBlockPrefetch, prefetchBlockData } from "./prefetch.mjs";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BlockContent } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/client/blocks/prefetch.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated No longer needed. Server auto-expands relation/upload fields.
|
|
7
|
+
*/
|
|
8
|
+
type BlockPrefetchContext<TCms = unknown> = {
|
|
9
|
+
cms: TCms;
|
|
10
|
+
locale: string;
|
|
11
|
+
defaultLocale: string;
|
|
12
|
+
request?: Request;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated No longer needed. Server auto-expands relation/upload fields.
|
|
16
|
+
*/
|
|
17
|
+
type BlockPrefetchParams<TCms = unknown> = BlockPrefetchContext<TCms> & {
|
|
18
|
+
id: string;
|
|
19
|
+
values: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated No longer needed. Server auto-expands relation/upload fields.
|
|
23
|
+
*/
|
|
24
|
+
type BlockPrefetchResult = Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated No longer needed. Server auto-expands relation/upload fields
|
|
27
|
+
* and supports manual prefetch via `.blocks({ name: { block, prefetch } })`.
|
|
28
|
+
*/
|
|
29
|
+
declare function prefetchBlockData<TCms = unknown>(content: BlockContent | null | undefined, _blocks: Record<string, unknown>, _context: BlockPrefetchContext<TCms>): Promise<BlockPrefetchResult>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated No longer needed. Server handles block data fetching.
|
|
32
|
+
*/
|
|
33
|
+
declare class BlockPrefetchError extends Error {
|
|
34
|
+
readonly blockId: string;
|
|
35
|
+
readonly blockType: string;
|
|
36
|
+
readonly cause: unknown;
|
|
37
|
+
constructor(blockId: string, blockType: string, cause: unknown);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated No longer needed. Server handles block data fetching.
|
|
41
|
+
*/
|
|
42
|
+
type TypedBlockPrefetch<TData, TCms = unknown> = (params: BlockPrefetchParams<TCms>) => Promise<TData>;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { BlockPrefetchContext, BlockPrefetchError, BlockPrefetchParams, BlockPrefetchResult, TypedBlockPrefetch, prefetchBlockData };
|
|
45
|
+
//# sourceMappingURL=prefetch.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefetch.d.mts","names":[],"sources":["../../../src/client/blocks/prefetch.ts"],"sourcesContent":[],"mappings":";;;;;;;KA+BY;OACL;;;YAGK;;;;;KAMA,sCAAsC,qBAAqB;;UAE7D;;;;;KAME,mBAAA,GAAsB;;;;;iBAMZ,2CACX,0CACA,mCACC,qBAAqB,QAC9B,QAAQ;;;;cAYE,kBAAA,SAA2B,KAAA;;;;;;;;;KAgB5B,qDACF,oBAAoB,UACzB,QAAQ"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/client/blocks/prefetch.ts
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated No longer needed. Server auto-expands relation/upload fields
|
|
4
|
+
* and supports manual prefetch via `.blocks({ name: { block, prefetch } })`.
|
|
5
|
+
*/
|
|
6
|
+
async function prefetchBlockData(content, _blocks, _context) {
|
|
7
|
+
console.warn("[prefetchBlockData] Deprecated: Client-side block prefetch is no longer needed. Block data is now automatically fetched by the server afterRead hook. Remove this call — data is available via the `data` prop in block renderers.");
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated No longer needed. Server handles block data fetching.
|
|
12
|
+
*/
|
|
13
|
+
var BlockPrefetchError = class extends Error {
|
|
14
|
+
constructor(blockId, blockType, cause) {
|
|
15
|
+
const message = cause instanceof Error ? cause.message : "Unknown prefetch error";
|
|
16
|
+
super(`Block prefetch failed for "${blockType}" (${blockId}): ${message}`);
|
|
17
|
+
this.blockId = blockId;
|
|
18
|
+
this.blockType = blockType;
|
|
19
|
+
this.cause = cause;
|
|
20
|
+
this.name = "BlockPrefetchError";
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { BlockPrefetchError, prefetchBlockData };
|
|
26
|
+
//# sourceMappingURL=prefetch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefetch.mjs","names":["blockId: string","blockType: string","cause: unknown"],"sources":["../../../src/client/blocks/prefetch.ts"],"sourcesContent":["/**\n * Client Block Prefetch Utilities\n *\n * @deprecated Client-side block prefetch is no longer needed.\n * Block data is now automatically handled by the server:\n *\n * 1. **Auto-expansion**: Relation/upload fields are automatically expanded\n * to full records in the afterRead hook. No configuration needed.\n *\n * 2. **Manual prefetch**: For custom data, define prefetch in `.blocks()`:\n * ```ts\n * .blocks({\n * featuredPosts: {\n * block: featuredPostsBlock,\n * prefetch: async ({ values, ctx }) => ({ ... }),\n * },\n * })\n * ```\n *\n * Both populate `_data[blockId]` in the API response, which is\n * automatically available as the `data` prop in block renderers.\n *\n * These exports are kept for backwards compatibility but will be\n * removed in a future version.\n */\n\nimport type { BlockContent, BlockNode } from \"./types.js\";\n\n/**\n * @deprecated No longer needed. Server auto-expands relation/upload fields.\n */\nexport type BlockPrefetchContext<TCms = unknown> = {\n cms: TCms;\n locale: string;\n defaultLocale: string;\n request?: Request;\n};\n\n/**\n * @deprecated No longer needed. Server auto-expands relation/upload fields.\n */\nexport type BlockPrefetchParams<TCms = unknown> = BlockPrefetchContext<TCms> & {\n id: string;\n values: Record<string, unknown>;\n};\n\n/**\n * @deprecated No longer needed. Server auto-expands relation/upload fields.\n */\nexport type BlockPrefetchResult = Record<string, unknown>;\n\n/**\n * @deprecated No longer needed. Server auto-expands relation/upload fields\n * and supports manual prefetch via `.blocks({ name: { block, prefetch } })`.\n */\nexport async function prefetchBlockData<TCms = unknown>(\n content: BlockContent | null | undefined,\n _blocks: Record<string, unknown>,\n _context: BlockPrefetchContext<TCms>,\n): Promise<BlockPrefetchResult> {\n console.warn(\n \"[prefetchBlockData] Deprecated: Client-side block prefetch is no longer needed. \" +\n \"Block data is now automatically fetched by the server afterRead hook. \" +\n \"Remove this call — data is available via the `data` prop in block renderers.\",\n );\n return {};\n}\n\n/**\n * @deprecated No longer needed. Server handles block data fetching.\n */\nexport class BlockPrefetchError extends Error {\n constructor(\n public readonly blockId: string,\n public readonly blockType: string,\n public readonly cause: unknown,\n ) {\n const message =\n cause instanceof Error ? cause.message : \"Unknown prefetch error\";\n super(`Block prefetch failed for \"${blockType}\" (${blockId}): ${message}`);\n this.name = \"BlockPrefetchError\";\n }\n}\n\n/**\n * @deprecated No longer needed. Server handles block data fetching.\n */\nexport type TypedBlockPrefetch<TData, TCms = unknown> = (\n params: BlockPrefetchParams<TCms>,\n) => Promise<TData>;\n"],"mappings":";;;;;AAuDA,eAAsB,kBACpB,SACA,SACA,UAC8B;AAC9B,SAAQ,KACN,qOAGD;AACD,QAAO,EAAE;;;;;AAMX,IAAa,qBAAb,cAAwC,MAAM;CAC5C,YACE,AAAgBA,SAChB,AAAgBC,WAChB,AAAgBC,OAChB;EACA,MAAM,UACJ,iBAAiB,QAAQ,MAAM,UAAU;AAC3C,QAAM,8BAA8B,UAAU,KAAK,QAAQ,KAAK,UAAU;EAN1D;EACA;EACA;AAKhB,OAAK,OAAO"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/client/blocks/types.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Block node in the tree structure.
|
|
7
|
+
* Represents a single block instance with its position and children.
|
|
8
|
+
*/
|
|
9
|
+
type BlockNode = {
|
|
10
|
+
/** Unique block instance ID (UUID) */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Block type name (e.g., "hero", "columns", "text") */
|
|
13
|
+
type: string;
|
|
14
|
+
/** Child blocks (for layout blocks that accept children) */
|
|
15
|
+
children: BlockNode[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Block content structure stored in JSONB.
|
|
19
|
+
* This is the shape of data stored in the database and passed to BlockRenderer.
|
|
20
|
+
*
|
|
21
|
+
* After server-side prefetch (afterRead hook), `_data` is populated with:
|
|
22
|
+
* - Auto-expanded relation/upload fields
|
|
23
|
+
* - Manual prefetch data from `.blocks()` registration
|
|
24
|
+
*/
|
|
25
|
+
type BlockContent = {
|
|
26
|
+
/** Block tree with hierarchy and order */
|
|
27
|
+
_tree: BlockNode[];
|
|
28
|
+
/** Block values indexed by block ID */
|
|
29
|
+
_values: Record<string, Record<string, unknown>>;
|
|
30
|
+
/** Prefetched data from server (populated by afterRead hook) */
|
|
31
|
+
_data?: Record<string, Record<string, unknown>>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Block category for organization in the block picker.
|
|
35
|
+
* Categories help users find blocks quickly when adding new content.
|
|
36
|
+
*/
|
|
37
|
+
type BlockCategory = "layout" | "content" | "media" | "sections" | "interactive" | (string & {});
|
|
38
|
+
/**
|
|
39
|
+
* Props passed to block renderer components.
|
|
40
|
+
* Each block receives these props when being rendered.
|
|
41
|
+
*
|
|
42
|
+
* @template TValues - Block field values type (inferred from `.fields()`)
|
|
43
|
+
* @template TData - Prefetch data type (inferred from `.prefetch()`)
|
|
44
|
+
*/
|
|
45
|
+
type BlockRendererProps<TValues = Record<string, unknown>, TData = Record<string, unknown>> = {
|
|
46
|
+
/** Block instance ID */
|
|
47
|
+
id: string;
|
|
48
|
+
/** Block field values (merged with i18n for current locale) */
|
|
49
|
+
values: TValues;
|
|
50
|
+
/** Data from server prefetch (populated via afterRead hook into _data[blockId]) */
|
|
51
|
+
data?: TData;
|
|
52
|
+
/** Rendered child blocks (for layout blocks) */
|
|
53
|
+
children?: React$1.ReactNode;
|
|
54
|
+
/** Whether this block is currently selected in the editor */
|
|
55
|
+
isSelected?: boolean;
|
|
56
|
+
/** Whether rendering in preview mode */
|
|
57
|
+
isPreview?: boolean;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Empty block content for initialization.
|
|
61
|
+
*/
|
|
62
|
+
declare const EMPTY_BLOCK_CONTENT: BlockContent;
|
|
63
|
+
/**
|
|
64
|
+
* Check if a value is a valid BlockContent structure.
|
|
65
|
+
*/
|
|
66
|
+
declare function isBlockContent(value: unknown): value is BlockContent;
|
|
67
|
+
//#endregion
|
|
68
|
+
export { BlockCategory, BlockContent, BlockNode, BlockRendererProps, EMPTY_BLOCK_CONTENT, isBlockContent };
|
|
69
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/client/blocks/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4CA;AAeY,KA7CA,SAAA,GA6CA;EACA;EACF,EAAA,EAAA,MAAA;EAKA;EAED,IAAA,EAAA,MAAA;EAEI;EAAe,QAAA,EAlDhB,SAkDgB,EAAA;AAU5B,CAAA;AAQA;;;;;;;;KAzDY,YAAA;;SAEH;;WAEE,eAAe;;UAEhB,eAAe;;;;;;KAOb,aAAA;;;;;;;;KAeA,6BACA,iCACF;;;;UAKA;;SAED;;aAEI,OAAA,CAAM;;;;;;;;;cAUN,qBAAqB;;;;iBAQlB,cAAA,2BAAyC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/client/blocks/types.ts
|
|
2
|
+
/**
|
|
3
|
+
* Empty block content for initialization.
|
|
4
|
+
*/
|
|
5
|
+
const EMPTY_BLOCK_CONTENT = {
|
|
6
|
+
_tree: [],
|
|
7
|
+
_values: {}
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Check if a value is a valid BlockContent structure.
|
|
11
|
+
*/
|
|
12
|
+
function isBlockContent(value) {
|
|
13
|
+
if (value == null || typeof value !== "object") return false;
|
|
14
|
+
const obj = value;
|
|
15
|
+
return Array.isArray(obj._tree) && typeof obj._values === "object" && obj._values !== null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { EMPTY_BLOCK_CONTENT, isBlockContent };
|
|
20
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","names":["EMPTY_BLOCK_CONTENT: BlockContent"],"sources":["../../../src/client/blocks/types.ts"],"sourcesContent":["/**\n * Block System Types\n *\n * Core types for the visual page building system.\n * Server stores blocks as JSONB with $i18n markers - these types\n * define the client-side structure and rendering.\n */\n\nimport type * as React from \"react\";\n\n/**\n * Block node in the tree structure.\n * Represents a single block instance with its position and children.\n */\nexport type BlockNode = {\n /** Unique block instance ID (UUID) */\n id: string;\n /** Block type name (e.g., \"hero\", \"columns\", \"text\") */\n type: string;\n /** Child blocks (for layout blocks that accept children) */\n children: BlockNode[];\n};\n\n/**\n * Block content structure stored in JSONB.\n * This is the shape of data stored in the database and passed to BlockRenderer.\n *\n * After server-side prefetch (afterRead hook), `_data` is populated with:\n * - Auto-expanded relation/upload fields\n * - Manual prefetch data from `.blocks()` registration\n */\nexport type BlockContent = {\n /** Block tree with hierarchy and order */\n _tree: BlockNode[];\n /** Block values indexed by block ID */\n _values: Record<string, Record<string, unknown>>;\n /** Prefetched data from server (populated by afterRead hook) */\n _data?: Record<string, Record<string, unknown>>;\n};\n\n/**\n * Block category for organization in the block picker.\n * Categories help users find blocks quickly when adding new content.\n */\nexport type BlockCategory =\n | \"layout\" // Columns, Grid, Container, Section\n | \"content\" // Text, Heading, List, Quote\n | \"media\" // Image, Video, Gallery, Audio\n | \"sections\" // Hero, Features, Testimonials, CTA\n | \"interactive\" // Form, Accordion, Tabs, Carousel\n | (string & {}); // Custom categories\n\n/**\n * Props passed to block renderer components.\n * Each block receives these props when being rendered.\n *\n * @template TValues - Block field values type (inferred from `.fields()`)\n * @template TData - Prefetch data type (inferred from `.prefetch()`)\n */\nexport type BlockRendererProps<\n TValues = Record<string, unknown>,\n TData = Record<string, unknown>,\n> = {\n /** Block instance ID */\n id: string;\n /** Block field values (merged with i18n for current locale) */\n values: TValues;\n /** Data from server prefetch (populated via afterRead hook into _data[blockId]) */\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 * Empty block content for initialization.\n */\nexport const EMPTY_BLOCK_CONTENT: BlockContent = {\n _tree: [],\n _values: {},\n};\n\n/**\n * Check if a value is a valid BlockContent structure.\n */\nexport function isBlockContent(value: unknown): value is BlockContent {\n if (value == null || typeof value !== \"object\") return false;\n const obj = value as Record<string, unknown>;\n return (\n Array.isArray(obj._tree) &&\n typeof obj._values === \"object\" &&\n obj._values !== null\n );\n}\n\n"],"mappings":";;;;AAgFA,MAAaA,sBAAoC;CAC/C,OAAO,EAAE;CACT,SAAS,EAAE;CACZ;;;;AAKD,SAAgB,eAAe,OAAuC;AACpE,KAAI,SAAS,QAAQ,OAAO,UAAU,SAAU,QAAO;CACvD,MAAM,MAAM;AACZ,QACE,MAAM,QAAQ,IAAI,MAAM,IACxB,OAAO,IAAI,YAAY,YACvB,IAAI,YAAY"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { MaybeLazyComponent } from "./types/common.mjs";
|
|
2
|
+
import { PageBuilder } from "./page/page.mjs";
|
|
3
|
+
import { DefaultViewsConfig } from "./types/views.mjs";
|
|
4
|
+
import { WidgetBuilder } from "./widget/widget.mjs";
|
|
5
|
+
import { AdminBuilderState, FilterEditViews, FilterListViews } from "./admin-types.mjs";
|
|
6
|
+
import { Prettify, SetProperty, TypeMerge, UnsetProperty } from "questpie/shared";
|
|
7
|
+
|
|
8
|
+
//#region src/client/builder/admin-builder.d.ts
|
|
9
|
+
|
|
10
|
+
declare class AdminBuilder<TState extends AdminBuilderState> {
|
|
11
|
+
readonly state: TState;
|
|
12
|
+
constructor(state: TState);
|
|
13
|
+
static empty<TApp = any>(): AdminBuilder<{
|
|
14
|
+
"~app": TApp;
|
|
15
|
+
fields: {};
|
|
16
|
+
components: {};
|
|
17
|
+
listViews: {};
|
|
18
|
+
editViews: {};
|
|
19
|
+
pages: {};
|
|
20
|
+
widgets: {};
|
|
21
|
+
blocks: {};
|
|
22
|
+
translations: {};
|
|
23
|
+
locale: {
|
|
24
|
+
default: string;
|
|
25
|
+
supported: string[];
|
|
26
|
+
};
|
|
27
|
+
defaultViews: {};
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Register field definitions
|
|
31
|
+
*/
|
|
32
|
+
fields<TNewFields extends Record<string, any>>(fields: TNewFields): AdminBuilder<SetProperty<TState, "fields", Prettify<TypeMerge<TState["fields"], TNewFields>>>>;
|
|
33
|
+
/**
|
|
34
|
+
* Register component implementations
|
|
35
|
+
*/
|
|
36
|
+
components<TNewComponents extends Record<string, any>>(components: TNewComponents): AdminBuilder<SetProperty<TState, "components", Prettify<TypeMerge<TState["components"], TNewComponents>>>>;
|
|
37
|
+
/**
|
|
38
|
+
* Register view definitions (auto-sorted by kind)
|
|
39
|
+
*/
|
|
40
|
+
views<TNewViews extends Record<string, any>>(views: TNewViews): AdminBuilder<Prettify<TypeMerge<UnsetProperty<TState, "listViews" | "editViews">, {
|
|
41
|
+
listViews: Prettify<TypeMerge<TState["listViews"], FilterListViews<TNewViews>>>;
|
|
42
|
+
editViews: Prettify<TypeMerge<TState["editViews"], FilterEditViews<TNewViews>>>;
|
|
43
|
+
}>>>;
|
|
44
|
+
/**
|
|
45
|
+
* Register widget definitions
|
|
46
|
+
*/
|
|
47
|
+
widgets<TNewWidgets extends Record<string, any>>(widgets: TNewWidgets): AdminBuilder<SetProperty<TState, "widgets", Prettify<TypeMerge<TState["widgets"], TNewWidgets>>>>;
|
|
48
|
+
/**
|
|
49
|
+
* Register page definitions
|
|
50
|
+
*/
|
|
51
|
+
pages<TNewPages extends Record<string, any>>(pages: TNewPages): AdminBuilder<SetProperty<TState, "pages", Prettify<TypeMerge<TState["pages"], TNewPages>>>>;
|
|
52
|
+
/**
|
|
53
|
+
* Compose another builder (merge modules)
|
|
54
|
+
*/
|
|
55
|
+
use<TOther extends AdminBuilder<any>>(other: TOther): AdminBuilder<Prettify<TypeMerge<UnsetProperty<TState, "fields" | "listViews" | "editViews" | "widgets" | "pages" | "components">, {
|
|
56
|
+
fields: Prettify<TypeMerge<TState["fields"], TOther["state"]["fields"]>>;
|
|
57
|
+
listViews: Prettify<TypeMerge<TState["listViews"], TOther["state"]["listViews"]>>;
|
|
58
|
+
editViews: Prettify<TypeMerge<TState["editViews"], TOther["state"]["editViews"]>>;
|
|
59
|
+
widgets: Prettify<TypeMerge<TState["widgets"], TOther["state"]["widgets"]>>;
|
|
60
|
+
pages: Prettify<TypeMerge<TState["pages"], TOther["state"]["pages"]>>;
|
|
61
|
+
components: Prettify<TypeMerge<TState["components"], TOther["state"]["components"]>>;
|
|
62
|
+
}>>>;
|
|
63
|
+
/**
|
|
64
|
+
* Set default views config
|
|
65
|
+
*/
|
|
66
|
+
defaultViews<TDefaultViews extends DefaultViewsConfig>(config: TDefaultViews): AdminBuilder<SetProperty<TState, "defaultViews", Prettify<TypeMerge<TState["defaultViews"], TDefaultViews>>>>;
|
|
67
|
+
/**
|
|
68
|
+
* Create a page definition
|
|
69
|
+
*
|
|
70
|
+
* Creates a custom admin page outside of collections/globals.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const builder = qa<AppCMS>().use(adminModule);
|
|
75
|
+
*
|
|
76
|
+
* const analyticsPage = builder.page("analytics", {
|
|
77
|
+
* component: AnalyticsPage,
|
|
78
|
+
* })
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
page<TName extends string, TComponent extends MaybeLazyComponent>(name: TName, config: {
|
|
82
|
+
component: TComponent;
|
|
83
|
+
}): PageBuilder<{
|
|
84
|
+
name: TName;
|
|
85
|
+
component: TComponent;
|
|
86
|
+
path: undefined;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* Create a widget definition
|
|
90
|
+
*
|
|
91
|
+
* Creates a dashboard widget.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const builder = qa<AppCMS>().use(adminModule);
|
|
96
|
+
*
|
|
97
|
+
* const statsWidget = builder.widget("stats", {
|
|
98
|
+
* component: StatsWidget,
|
|
99
|
+
* })
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
widget<TName extends string, TComponent extends MaybeLazyComponent>(name: TName, config: {
|
|
103
|
+
component: TComponent;
|
|
104
|
+
}): WidgetBuilder<{
|
|
105
|
+
name: TName;
|
|
106
|
+
"~config": any;
|
|
107
|
+
component: TComponent;
|
|
108
|
+
}>;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { AdminBuilder };
|
|
112
|
+
//# sourceMappingURL=admin-builder.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-builder.d.mts","names":[],"sources":["../../../src/client/builder/admin-builder.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AA4BU,cAJG,YAIH,CAAA,eAJ+B,iBAI/B,CAAA,CAAA;EADmB,SAAA,KAAA,EAFO,MAEP;EA+BF,WAAA,CAAA,KAAA,EAjCS,MAiCT;EACjB,OAAA,KAAA,CAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAhCmB,YAgCnB,CAAA;IAGP,MAAA,EAlCO,IAkCP;IAEmB,MAAA,EAAA,CAAA,CAAA;IAAkB,UAAA,EAAA,CAAA,CAAA;IAA5B,SAAA,EAAA,CAAA,CAAA;IAAT,SAAA,EAAA,CAAA,CAAA;IAHD,KAAA,EAAA,CAAA,CAAA;IADE,OAAA,EAAA,CAAA,CAAA;IAmB+B,MAAA,EAAA,CAAA,CAAA;IACrB,YAAA,EAAA,CAAA,CAAA;IAGX,MAAA,EAAA;MAEmB,OAAA,EAAA,MAAA;MAAsB,SAAA,EAAA,MAAA,EAAA;IAAhC,CAAA;IAAT,YAAA,EAAA,CAAA,CAAA;EAHD,CAAA,CAAA;EADE;;;EAwBc,MAAA,CAAA,mBA/CS,MA+CT,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,MAAA,EA9CR,UA8CQ,CAAA,EA7Cd,YA6Cc,CA5ChB,WA4CgB,CA3Cf,MA2Ce,EAAA,QAAA,EAzCf,QAyCe,CAzCN,SAyCM,CAzCI,MAyCJ,CAAA,QAAA,CAAA,EAzCsB,UAyCtB,CAAA,CAAA,CAAA,CAAA;EAAd;;;EAGiC,UAAA,CAAA,uBA7BF,MA6BE,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,UAAA,EA5BvB,cA4BuB,CAAA,EA3BjC,YA2BiC,CA1BnC,WA0BmC,CAzBlC,MAyBkC,EAAA,YAAA,EAvBlC,QAuBkC,CAvBzB,SAuByB,CAvBf,MAuBe,CAAA,YAAA,CAAA,EAvBO,cAuBP,CAAA,CAAA,CAAA,CAAA;EAA/B;;;EAG+C,KAAA,CAAA,kBAX5B,MAW4B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAV5C,SAU4C,CAAA,EATjD,YASiD,CARnD,QAQmD,CAPlD,SAOkD,CANjD,aAMiD,CANnC,MAMmC,EAAA,WAAA,GAAA,WAAA,CAAA,EAAA;IAAhB,SAAA,EAJrB,QAIqB,CAH/B,SAG+B,CAHrB,MAGqB,CAAA,WAAA,CAAA,EAHA,eAGA,CAHgB,SAGhB,CAAA,CAAA,CAAA;IAA/B,SAAA,EADU,QACV,CAAA,SAAA,CAAU,MAAV,CAAA,WAAA,CAAA,EAA+B,eAA/B,CAA+C,SAA/C,CAAA,CAAA,CAAA;EADU,CAAA,CAAA,CAAA,CAAA;EANb;;;EAoC0B,OAAA,CAAA,oBAAA,MAAA,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,OAAA,EAClB,WADkB,CAAA,EAEzB,YAFyB,CAG3B,WAH2B,CAI1B,MAJ0B,EAAA,SAAA,EAM1B,QAN0B,CAMjB,SANiB,CAMP,MANO,CAAA,SAAA,CAAA,EAMY,WANZ,CAAA,CAAA,CAAA,CAAA;EAClB;;;EAK8B,KAAA,CAAA,kBAehB,MAfgB,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAgBhC,SAhBgC,CAAA,EAiBrC,YAjBqC,CAkBvC,WAlBuC,CAmBtC,MAnBsC,EAAA,OAAA,EAqBtC,QArBsC,CAqB7B,SArB6B,CAqBnB,MArBmB,CAAA,OAAA,CAAA,EAqBF,SArBE,CAAA,CAAA,CAAA,CAAA;EAA7B;;;EAJR,GAAA,CAAA,eAwCgB,YAxChB,CAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAyCK,MAzCL,CAAA,EA0CA,YA1CA,CA2CF,QA3CE,CA4CD,SA5CC,CA6CA,aA7CA,CA8CC,MA9CD,EAAA,QAAA,GAAA,WAAA,GAAA,WAAA,GAAA,SAAA,GAAA,OAAA,GAAA,YAAA,CAAA,EAAA;IAmBqB,MAAA,EAoCZ,QApCY,CAqCnB,SArCmB,CAqCT,MArCS,CAAA,QAAA,CAAA,EAqCS,MArCT,CAAA,OAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA;IAChB,SAAA,EAsCO,QAtCP,CAuCH,SAvCG,CAuCO,MAvCP,CAAA,WAAA,CAAA,EAuC4B,MAvC5B,CAAA,OAAA,CAAA,CAAA,WAAA,CAAA,CAAA,CAAA;IAGN,SAAA,EAsCa,QAtCb,CAuCG,SAvCH,CAuCa,MAvCb,CAAA,WAAA,CAAA,EAuCkC,MAvClC,CAAA,OAAA,CAAA,CAAA,WAAA,CAAA,CAAA,CAAA;IAEmB,OAAA,EAuCR,QAvCQ,CAwChB,SAxCgB,CAwCN,MAxCM,CAAA,SAAA,CAAA,EAwCa,MAxCb,CAAA,OAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA;IAAiB,KAAA,EA0C3B,QA1C2B,CA0ClB,SA1CkB,CA0CR,MA1CQ,CAAA,OAAA,CAAA,EA0CS,MA1CT,CAAA,OAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA;IAA3B,UAAA,EA2CK,QA3CL,CA4CN,SA5CM,CA4CI,MA5CJ,CAAA,YAAA,CAAA,EA4C0B,MA5C1B,CAAA,OAAA,CAAA,CAAA,YAAA,CAAA,CAAA,CAAA;EAAT,CAAA,CAAA,CAAA,CAAA;EAHD;;;EAmBO,YAAA,CAAA,sBAkD2B,kBAlD3B,CAAA,CAAA,MAAA,EAmDC,aAnDD,CAAA,EAoDL,YApDK,CAqDP,WArDO,CAsDN,MAtDM,EAAA,cAAA,EAwDN,QAxDM,CAwDG,SAxDH,CAwDa,MAxDb,CAAA,cAAA,CAAA,EAwDqC,aAxDrC,CAAA,CAAA,CAAA,CAAA;EAKJ;;;;;;;;;;;;;;EAmBW,IAAA,CAAA,cAAA,MAAA,EAAA,mBA0D+B,kBA1D/B,CAAA,CAAA,IAAA,EA2DR,KA3DQ,EAAA,MAAA,EAAA;IAAmB,SAAA,EA4DZ,UA5DY;EAA7B,CAAA,CAAA,EA6DF,WA7DE,CAAA;IADQ,IAAA,EA+DN,KA/DM;IAGiB,SAAA,EA6DlB,UA7DkB;IAAiB,IAAA,EAAA,SAAA;EAA3B,CAAA,CAAA;EAAT;;;;;;;;;;;;;;EA8BT,MAAA,CAAA,cAAA,MAAA,EAAA,mBAmD8C,kBAnD9C,CAAA,CAAA,IAAA,EAoDK,KApDL,EAAA,MAAA,EAAA;IAHD,SAAA,EAwDqB,UAxDrB;EADE,CAAA,CAAA,EA0DA,aA1DA,CAAA;IA8B2C,IAAA,EA6BvC,KA7BuC;IACvC,SAAA,EAAA,GAAA;IACe,SAAA,EA6BV,UA7BU;EAEf,CAAA,CAAA"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { page } from "./page/page.mjs";
|
|
2
|
+
import { widget } from "./widget/widget.mjs";
|
|
3
|
+
import { DEFAULT_LOCALE_CONFIG } from "questpie/shared";
|
|
4
|
+
|
|
5
|
+
//#region src/client/builder/admin-builder.ts
|
|
6
|
+
/**
|
|
7
|
+
* Admin Builder
|
|
8
|
+
*
|
|
9
|
+
* Main builder class - same pattern as QuestpieBuilder.
|
|
10
|
+
* Single generic TState pattern.
|
|
11
|
+
*/
|
|
12
|
+
var AdminBuilder = class AdminBuilder {
|
|
13
|
+
constructor(state) {
|
|
14
|
+
this.state = state;
|
|
15
|
+
}
|
|
16
|
+
static empty() {
|
|
17
|
+
return new AdminBuilder({
|
|
18
|
+
"~app": void 0,
|
|
19
|
+
fields: {},
|
|
20
|
+
components: {},
|
|
21
|
+
listViews: {},
|
|
22
|
+
editViews: {},
|
|
23
|
+
pages: {},
|
|
24
|
+
widgets: {},
|
|
25
|
+
blocks: {},
|
|
26
|
+
translations: {},
|
|
27
|
+
locale: DEFAULT_LOCALE_CONFIG,
|
|
28
|
+
defaultViews: {}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Register field definitions
|
|
33
|
+
*/
|
|
34
|
+
fields(fields) {
|
|
35
|
+
return new AdminBuilder({
|
|
36
|
+
...this.state,
|
|
37
|
+
fields: {
|
|
38
|
+
...this.state.fields,
|
|
39
|
+
...fields
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Register component implementations
|
|
45
|
+
*/
|
|
46
|
+
components(components) {
|
|
47
|
+
return new AdminBuilder({
|
|
48
|
+
...this.state,
|
|
49
|
+
components: {
|
|
50
|
+
...this.state.components,
|
|
51
|
+
...components
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Register view definitions (auto-sorted by kind)
|
|
57
|
+
*/
|
|
58
|
+
views(views) {
|
|
59
|
+
const listViews = {};
|
|
60
|
+
const editViews = {};
|
|
61
|
+
for (const [name, def] of Object.entries(views)) {
|
|
62
|
+
const kind = def.kind;
|
|
63
|
+
if (kind === "list") listViews[name] = def;
|
|
64
|
+
else if (kind === "edit") editViews[name] = def;
|
|
65
|
+
}
|
|
66
|
+
return new AdminBuilder({
|
|
67
|
+
...this.state,
|
|
68
|
+
listViews: {
|
|
69
|
+
...this.state.listViews,
|
|
70
|
+
...listViews
|
|
71
|
+
},
|
|
72
|
+
editViews: {
|
|
73
|
+
...this.state.editViews,
|
|
74
|
+
...editViews
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Register widget definitions
|
|
80
|
+
*/
|
|
81
|
+
widgets(widgets) {
|
|
82
|
+
return new AdminBuilder({
|
|
83
|
+
...this.state,
|
|
84
|
+
widgets: {
|
|
85
|
+
...this.state.widgets,
|
|
86
|
+
...widgets
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Register page definitions
|
|
92
|
+
*/
|
|
93
|
+
pages(pages) {
|
|
94
|
+
return new AdminBuilder({
|
|
95
|
+
...this.state,
|
|
96
|
+
pages: {
|
|
97
|
+
...this.state.pages,
|
|
98
|
+
...pages
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Compose another builder (merge modules)
|
|
104
|
+
*/
|
|
105
|
+
use(other) {
|
|
106
|
+
const otherState = other.state;
|
|
107
|
+
return new AdminBuilder({
|
|
108
|
+
...this.state,
|
|
109
|
+
fields: {
|
|
110
|
+
...this.state.fields,
|
|
111
|
+
...otherState.fields
|
|
112
|
+
},
|
|
113
|
+
listViews: {
|
|
114
|
+
...this.state.listViews,
|
|
115
|
+
...otherState.listViews
|
|
116
|
+
},
|
|
117
|
+
editViews: {
|
|
118
|
+
...this.state.editViews,
|
|
119
|
+
...otherState.editViews
|
|
120
|
+
},
|
|
121
|
+
widgets: {
|
|
122
|
+
...this.state.widgets,
|
|
123
|
+
...otherState.widgets
|
|
124
|
+
},
|
|
125
|
+
pages: {
|
|
126
|
+
...this.state.pages,
|
|
127
|
+
...otherState.pages
|
|
128
|
+
},
|
|
129
|
+
components: {
|
|
130
|
+
...this.state.components,
|
|
131
|
+
...otherState.components
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Set default views config
|
|
137
|
+
*/
|
|
138
|
+
defaultViews(config) {
|
|
139
|
+
return new AdminBuilder({
|
|
140
|
+
...this.state,
|
|
141
|
+
defaultViews: {
|
|
142
|
+
...this.state.defaultViews || {},
|
|
143
|
+
...config
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Create a page definition
|
|
149
|
+
*
|
|
150
|
+
* Creates a custom admin page outside of collections/globals.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const builder = qa<AppCMS>().use(adminModule);
|
|
155
|
+
*
|
|
156
|
+
* const analyticsPage = builder.page("analytics", {
|
|
157
|
+
* component: AnalyticsPage,
|
|
158
|
+
* })
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
page(name, config) {
|
|
162
|
+
return page(name, config);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Create a widget definition
|
|
166
|
+
*
|
|
167
|
+
* Creates a dashboard widget.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const builder = qa<AppCMS>().use(adminModule);
|
|
172
|
+
*
|
|
173
|
+
* const statsWidget = builder.widget("stats", {
|
|
174
|
+
* component: StatsWidget,
|
|
175
|
+
* })
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
widget(name, config) {
|
|
179
|
+
return widget(name, config);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
//#endregion
|
|
184
|
+
export { AdminBuilder };
|
|
185
|
+
//# sourceMappingURL=admin-builder.mjs.map
|