@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,280 @@
|
|
|
1
|
+
import { useTranslation } from "../../../i18n/hooks.mjs";
|
|
2
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
3
|
+
import { Button } from "../../ui/button.mjs";
|
|
4
|
+
import { TableControls } from "./table-controls.mjs";
|
|
5
|
+
import { Icon } from "@iconify/react";
|
|
6
|
+
import * as React$1 from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/client/components/fields/rich-text-editor/toolbar.tsx
|
|
10
|
+
/**
|
|
11
|
+
* RichText Editor Toolbar Components
|
|
12
|
+
*
|
|
13
|
+
* Icon-based toolbar using Iconify icons (Phosphor set) for a clean, modern UI.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Icon mapping for all editor actions
|
|
17
|
+
*/
|
|
18
|
+
const EDITOR_ICONS = {
|
|
19
|
+
undo: "ph:arrow-counter-clockwise",
|
|
20
|
+
redo: "ph:arrow-clockwise",
|
|
21
|
+
bold: "ph:text-b",
|
|
22
|
+
italic: "ph:text-italic",
|
|
23
|
+
underline: "ph:text-underline",
|
|
24
|
+
strikethrough: "ph:text-strikethrough",
|
|
25
|
+
code: "ph:code",
|
|
26
|
+
heading: "ph:text-h",
|
|
27
|
+
bulletList: "ph:list-bullets",
|
|
28
|
+
orderedList: "ph:list-numbers",
|
|
29
|
+
blockquote: "ph:quotes",
|
|
30
|
+
codeBlock: "ph:code-block",
|
|
31
|
+
horizontalRule: "ph:minus-circle",
|
|
32
|
+
link: "ph:link",
|
|
33
|
+
image: "ph:image",
|
|
34
|
+
table: "ph:table",
|
|
35
|
+
alignLeft: "ph:text-align-left",
|
|
36
|
+
alignCenter: "ph:text-align-center",
|
|
37
|
+
alignRight: "ph:text-align-right",
|
|
38
|
+
alignJustify: "ph:text-align-justify"
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Icon-based toolbar button with tooltip showing keyboard shortcuts
|
|
42
|
+
*/
|
|
43
|
+
function ToolbarButton({ active, disabled, title, onClick, icon: iconName, children, shortcut, className, ...rest }) {
|
|
44
|
+
const tooltipText = React$1.useMemo(() => {
|
|
45
|
+
if (!title && !shortcut) return void 0;
|
|
46
|
+
if (shortcut) return `${title || ""} (${shortcut})`.trim();
|
|
47
|
+
return title;
|
|
48
|
+
}, [title, shortcut]);
|
|
49
|
+
const iconSuffix = active ? "-fill" : "";
|
|
50
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
51
|
+
type: "button",
|
|
52
|
+
variant: "ghost",
|
|
53
|
+
size: iconName ? "icon-xs" : "xs",
|
|
54
|
+
"data-active": active,
|
|
55
|
+
title: tooltipText,
|
|
56
|
+
disabled,
|
|
57
|
+
onClick,
|
|
58
|
+
className: cn("text-muted-foreground hover:text-foreground hover:bg-transparent", "data-[active=true]:text-foreground data-[active=true]:bg-transparent", "aria-expanded:bg-transparent", className),
|
|
59
|
+
...rest,
|
|
60
|
+
children: iconName ? /* @__PURE__ */ jsx(Icon, {
|
|
61
|
+
icon: `${iconName}${iconSuffix}`,
|
|
62
|
+
width: 16,
|
|
63
|
+
height: 16
|
|
64
|
+
}) : children
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Toolbar button group with divider
|
|
69
|
+
*/
|
|
70
|
+
function ToolbarGroup({ children }) {
|
|
71
|
+
return /* @__PURE__ */ jsx("div", {
|
|
72
|
+
className: "flex items-center gap-1",
|
|
73
|
+
children
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Main toolbar component with icon-based buttons
|
|
78
|
+
*/
|
|
79
|
+
function RichTextToolbar({ editor, features, disabled, headingValue, onHeadingChange, onLinkClick, onImageClick, onTableClick, inTable }) {
|
|
80
|
+
const { t } = useTranslation();
|
|
81
|
+
const isEditable = !disabled;
|
|
82
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex flex-wrap items-center gap-1.5 border-b bg-muted/30 p-1.5",
|
|
84
|
+
children: [
|
|
85
|
+
features.history && /* @__PURE__ */ jsxs(ToolbarGroup, { children: [/* @__PURE__ */ jsx(ToolbarButton, {
|
|
86
|
+
icon: EDITOR_ICONS.undo,
|
|
87
|
+
disabled: !isEditable || !editor.can().undo(),
|
|
88
|
+
title: t("editor.undo"),
|
|
89
|
+
shortcut: "⌘Z",
|
|
90
|
+
onClick: () => editor.chain().focus().undo().run()
|
|
91
|
+
}), /* @__PURE__ */ jsx(ToolbarButton, {
|
|
92
|
+
icon: EDITOR_ICONS.redo,
|
|
93
|
+
disabled: !isEditable || !editor.can().redo(),
|
|
94
|
+
title: t("editor.redo"),
|
|
95
|
+
shortcut: "⌘⇧Z",
|
|
96
|
+
onClick: () => editor.chain().focus().redo().run()
|
|
97
|
+
})] }),
|
|
98
|
+
features.heading && /* @__PURE__ */ jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxs("select", {
|
|
99
|
+
className: "h-6 rounded-sm border border-input/80 bg-input/20 px-2 text-xs",
|
|
100
|
+
value: headingValue,
|
|
101
|
+
onChange: (event) => onHeadingChange(event.target.value),
|
|
102
|
+
disabled: !isEditable,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("option", {
|
|
105
|
+
value: "paragraph",
|
|
106
|
+
children: "Paragraph"
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsx("option", {
|
|
109
|
+
value: "1",
|
|
110
|
+
children: "Heading 1"
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ jsx("option", {
|
|
113
|
+
value: "2",
|
|
114
|
+
children: "Heading 2"
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ jsx("option", {
|
|
117
|
+
value: "3",
|
|
118
|
+
children: "Heading 3"
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ jsx("option", {
|
|
121
|
+
value: "4",
|
|
122
|
+
children: "Heading 4"
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ jsx("option", {
|
|
125
|
+
value: "5",
|
|
126
|
+
children: "Heading 5"
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ jsx("option", {
|
|
129
|
+
value: "6",
|
|
130
|
+
children: "Heading 6"
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}) }),
|
|
134
|
+
/* @__PURE__ */ jsxs(ToolbarGroup, { children: [
|
|
135
|
+
features.bold && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
136
|
+
icon: EDITOR_ICONS.bold,
|
|
137
|
+
active: editor.isActive("bold"),
|
|
138
|
+
disabled: !isEditable,
|
|
139
|
+
title: t("editor.bold"),
|
|
140
|
+
shortcut: "⌘B",
|
|
141
|
+
onClick: () => editor.chain().focus().toggleBold().run()
|
|
142
|
+
}),
|
|
143
|
+
features.italic && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
144
|
+
icon: EDITOR_ICONS.italic,
|
|
145
|
+
active: editor.isActive("italic"),
|
|
146
|
+
disabled: !isEditable,
|
|
147
|
+
title: t("editor.italic"),
|
|
148
|
+
shortcut: "⌘I",
|
|
149
|
+
onClick: () => editor.chain().focus().toggleItalic().run()
|
|
150
|
+
}),
|
|
151
|
+
features.underline && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
152
|
+
icon: EDITOR_ICONS.underline,
|
|
153
|
+
active: editor.isActive("underline"),
|
|
154
|
+
disabled: !isEditable,
|
|
155
|
+
title: t("editor.underline"),
|
|
156
|
+
shortcut: "⌘U",
|
|
157
|
+
onClick: () => editor.chain().focus().toggleUnderline().run()
|
|
158
|
+
}),
|
|
159
|
+
features.strike && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
160
|
+
icon: EDITOR_ICONS.strikethrough,
|
|
161
|
+
active: editor.isActive("strike"),
|
|
162
|
+
disabled: !isEditable,
|
|
163
|
+
title: t("editor.strikethrough"),
|
|
164
|
+
onClick: () => editor.chain().focus().toggleStrike().run()
|
|
165
|
+
}),
|
|
166
|
+
features.code && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
167
|
+
icon: EDITOR_ICONS.code,
|
|
168
|
+
active: editor.isActive("code"),
|
|
169
|
+
disabled: !isEditable,
|
|
170
|
+
title: t("editor.code"),
|
|
171
|
+
shortcut: "⌘E",
|
|
172
|
+
onClick: () => editor.chain().focus().toggleCode().run()
|
|
173
|
+
}),
|
|
174
|
+
features.codeBlock && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
175
|
+
icon: EDITOR_ICONS.codeBlock,
|
|
176
|
+
active: editor.isActive("codeBlock"),
|
|
177
|
+
disabled: !isEditable,
|
|
178
|
+
title: t("editor.codeBlock"),
|
|
179
|
+
onClick: () => editor.chain().focus().toggleCodeBlock().run()
|
|
180
|
+
})
|
|
181
|
+
] }),
|
|
182
|
+
/* @__PURE__ */ jsxs(ToolbarGroup, { children: [
|
|
183
|
+
features.bulletList && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
184
|
+
icon: EDITOR_ICONS.bulletList,
|
|
185
|
+
active: editor.isActive("bulletList"),
|
|
186
|
+
disabled: !isEditable,
|
|
187
|
+
title: t("editor.unorderedList"),
|
|
188
|
+
onClick: () => editor.chain().focus().toggleBulletList().run()
|
|
189
|
+
}),
|
|
190
|
+
features.orderedList && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
191
|
+
icon: EDITOR_ICONS.orderedList,
|
|
192
|
+
active: editor.isActive("orderedList"),
|
|
193
|
+
disabled: !isEditable,
|
|
194
|
+
title: t("editor.orderedList"),
|
|
195
|
+
onClick: () => editor.chain().focus().toggleOrderedList().run()
|
|
196
|
+
}),
|
|
197
|
+
features.blockquote && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
198
|
+
icon: EDITOR_ICONS.blockquote,
|
|
199
|
+
active: editor.isActive("blockquote"),
|
|
200
|
+
disabled: !isEditable,
|
|
201
|
+
title: t("editor.quote"),
|
|
202
|
+
onClick: () => editor.chain().focus().toggleBlockquote().run()
|
|
203
|
+
}),
|
|
204
|
+
features.horizontalRule && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
205
|
+
icon: EDITOR_ICONS.horizontalRule,
|
|
206
|
+
disabled: !isEditable,
|
|
207
|
+
title: t("editor.horizontalRule"),
|
|
208
|
+
onClick: () => editor.chain().focus().setHorizontalRule().run()
|
|
209
|
+
})
|
|
210
|
+
] }),
|
|
211
|
+
features.align && /* @__PURE__ */ jsxs(ToolbarGroup, { children: [
|
|
212
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
213
|
+
icon: EDITOR_ICONS.alignLeft,
|
|
214
|
+
active: editor.isActive({ textAlign: "left" }),
|
|
215
|
+
disabled: !isEditable,
|
|
216
|
+
title: t("editor.alignLeft"),
|
|
217
|
+
onClick: () => editor.chain().focus().setTextAlign("left").run()
|
|
218
|
+
}),
|
|
219
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
220
|
+
icon: EDITOR_ICONS.alignCenter,
|
|
221
|
+
active: editor.isActive({ textAlign: "center" }),
|
|
222
|
+
disabled: !isEditable,
|
|
223
|
+
title: t("editor.alignCenter"),
|
|
224
|
+
onClick: () => editor.chain().focus().setTextAlign("center").run()
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
227
|
+
icon: EDITOR_ICONS.alignRight,
|
|
228
|
+
active: editor.isActive({ textAlign: "right" }),
|
|
229
|
+
disabled: !isEditable,
|
|
230
|
+
title: t("editor.alignRight"),
|
|
231
|
+
onClick: () => editor.chain().focus().setTextAlign("right").run()
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
234
|
+
icon: EDITOR_ICONS.alignJustify,
|
|
235
|
+
active: editor.isActive({ textAlign: "justify" }),
|
|
236
|
+
disabled: !isEditable,
|
|
237
|
+
title: t("editor.alignJustify"),
|
|
238
|
+
onClick: () => editor.chain().focus().setTextAlign("justify").run()
|
|
239
|
+
})
|
|
240
|
+
] }),
|
|
241
|
+
/* @__PURE__ */ jsxs(ToolbarGroup, { children: [
|
|
242
|
+
features.link && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
243
|
+
icon: EDITOR_ICONS.link,
|
|
244
|
+
active: editor.isActive("link"),
|
|
245
|
+
disabled: !isEditable,
|
|
246
|
+
title: t("editor.link"),
|
|
247
|
+
shortcut: "⌘K",
|
|
248
|
+
onClick: onLinkClick
|
|
249
|
+
}),
|
|
250
|
+
features.image && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
251
|
+
icon: EDITOR_ICONS.image,
|
|
252
|
+
disabled: !isEditable,
|
|
253
|
+
title: t("editor.image"),
|
|
254
|
+
onClick: onImageClick
|
|
255
|
+
}),
|
|
256
|
+
features.table && (features.tableControls ? /* @__PURE__ */ jsx(TableControls, {
|
|
257
|
+
editor,
|
|
258
|
+
disabled: !isEditable,
|
|
259
|
+
inTable,
|
|
260
|
+
triggerButton: /* @__PURE__ */ jsx(ToolbarButton, {
|
|
261
|
+
icon: EDITOR_ICONS.table,
|
|
262
|
+
active: inTable,
|
|
263
|
+
disabled: !isEditable,
|
|
264
|
+
title: t("editor.table")
|
|
265
|
+
})
|
|
266
|
+
}) : /* @__PURE__ */ jsx(ToolbarButton, {
|
|
267
|
+
icon: EDITOR_ICONS.table,
|
|
268
|
+
active: inTable,
|
|
269
|
+
disabled: !isEditable,
|
|
270
|
+
title: t("editor.table"),
|
|
271
|
+
onClick: onTableClick
|
|
272
|
+
}))
|
|
273
|
+
] })
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
//#endregion
|
|
279
|
+
export { EDITOR_ICONS, RichTextToolbar, ToolbarButton };
|
|
280
|
+
//# sourceMappingURL=toolbar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.mjs","names":["React"],"sources":["../../../../../src/client/components/fields/rich-text-editor/toolbar.tsx"],"sourcesContent":["/**\n * RichText Editor Toolbar Components\n *\n * Icon-based toolbar using Iconify icons (Phosphor set) for a clean, modern UI.\n */\n\nimport { Icon } from \"@iconify/react\";\nimport type { Editor } from \"@tiptap/core\";\nimport * as React from \"react\";\n\nimport { useTranslation } from \"../../../i18n/hooks\";\nimport { cn } from \"../../../utils\";\nimport { Button } from \"../../ui/button\";\nimport { TableControls } from \"./table-controls\";\nimport type { RichTextFeatures } from \"./types\";\n\n/**\n * Icon mapping for all editor actions\n */\nexport const EDITOR_ICONS = {\n undo: \"ph:arrow-counter-clockwise\",\n redo: \"ph:arrow-clockwise\",\n bold: \"ph:text-b\",\n italic: \"ph:text-italic\",\n underline: \"ph:text-underline\",\n strikethrough: \"ph:text-strikethrough\",\n code: \"ph:code\",\n heading: \"ph:text-h\",\n bulletList: \"ph:list-bullets\",\n orderedList: \"ph:list-numbers\",\n blockquote: \"ph:quotes\",\n codeBlock: \"ph:code-block\",\n horizontalRule: \"ph:minus-circle\",\n link: \"ph:link\",\n image: \"ph:image\",\n table: \"ph:table\",\n alignLeft: \"ph:text-align-left\",\n alignCenter: \"ph:text-align-center\",\n alignRight: \"ph:text-align-right\",\n alignJustify: \"ph:text-align-justify\",\n} as const;\n\nexport type ToolbarButtonProps = {\n active?: boolean;\n disabled?: boolean;\n title?: string;\n onClick?: () => void;\n icon?: string;\n children?: React.ReactNode;\n shortcut?: string;\n className?: string;\n} & Omit<\n React.ComponentProps<typeof Button>,\n \"variant\" | \"size\" | \"type\" | \"children\" | \"onClick\" | \"disabled\" | \"title\"\n>;\n\n/**\n * Icon-based toolbar button with tooltip showing keyboard shortcuts\n */\nexport function ToolbarButton({\n active,\n disabled,\n title,\n onClick,\n icon: iconName,\n children,\n shortcut,\n className,\n ...rest\n}: ToolbarButtonProps) {\n const tooltipText = React.useMemo(() => {\n if (!title && !shortcut) return undefined;\n if (shortcut) return `${title || \"\"} (${shortcut})`.trim();\n return title;\n }, [title, shortcut]);\n\n const iconSuffix = active ? \"-fill\" : \"\";\n const buttonSize = iconName ? \"icon-xs\" : \"xs\";\n\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size={buttonSize}\n data-active={active}\n title={tooltipText}\n disabled={disabled}\n onClick={onClick}\n className={cn(\n \"text-muted-foreground hover:text-foreground hover:bg-transparent\",\n \"data-[active=true]:text-foreground data-[active=true]:bg-transparent\",\n \"aria-expanded:bg-transparent\",\n className,\n )}\n {...rest}\n >\n {iconName ? (\n <Icon icon={`${iconName}${iconSuffix}`} width={16} height={16} />\n ) : (\n children\n )}\n </Button>\n );\n}\n\n/**\n * Toolbar button group with divider\n */\nexport function ToolbarGroup({ children }: { children: React.ReactNode }) {\n return <div className=\"flex items-center gap-1\">{children}</div>;\n}\n\nexport type RichTextToolbarProps = {\n editor: Editor;\n features: Required<RichTextFeatures>;\n disabled?: boolean;\n headingValue: string;\n onHeadingChange: (value: string) => void;\n onLinkClick: () => void;\n onImageClick: () => void;\n onTableClick: () => void;\n inTable: boolean;\n};\n\n/**\n * Main toolbar component with icon-based buttons\n */\nexport function RichTextToolbar({\n editor,\n features,\n disabled,\n headingValue,\n onHeadingChange,\n onLinkClick,\n onImageClick,\n onTableClick,\n inTable,\n}: RichTextToolbarProps) {\n const { t } = useTranslation();\n const isEditable = !disabled;\n\n return (\n <div className=\"flex flex-wrap items-center gap-1.5 border-b bg-muted/30 p-1.5\">\n {/* History Controls */}\n {features.history && (\n <ToolbarGroup>\n <ToolbarButton\n icon={EDITOR_ICONS.undo}\n disabled={!isEditable || !editor.can().undo()}\n title={t(\"editor.undo\")}\n shortcut=\"⌘Z\"\n onClick={() => editor.chain().focus().undo().run()}\n />\n <ToolbarButton\n icon={EDITOR_ICONS.redo}\n disabled={!isEditable || !editor.can().redo()}\n title={t(\"editor.redo\")}\n shortcut=\"⌘⇧Z\"\n onClick={() => editor.chain().focus().redo().run()}\n />\n </ToolbarGroup>\n )}\n\n {/* Heading Dropdown */}\n {features.heading && (\n <ToolbarGroup>\n <select\n className=\"h-6 rounded-sm border border-input/80 bg-input/20 px-2 text-xs\"\n value={headingValue}\n onChange={(event) => onHeadingChange(event.target.value)}\n disabled={!isEditable}\n >\n <option value=\"paragraph\">Paragraph</option>\n <option value=\"1\">Heading 1</option>\n <option value=\"2\">Heading 2</option>\n <option value=\"3\">Heading 3</option>\n <option value=\"4\">Heading 4</option>\n <option value=\"5\">Heading 5</option>\n <option value=\"6\">Heading 6</option>\n </select>\n </ToolbarGroup>\n )}\n\n {/* Text Formatting */}\n <ToolbarGroup>\n {features.bold && (\n <ToolbarButton\n icon={EDITOR_ICONS.bold}\n active={editor.isActive(\"bold\")}\n disabled={!isEditable}\n title={t(\"editor.bold\")}\n shortcut=\"⌘B\"\n onClick={() => editor.chain().focus().toggleBold().run()}\n />\n )}\n {features.italic && (\n <ToolbarButton\n icon={EDITOR_ICONS.italic}\n active={editor.isActive(\"italic\")}\n disabled={!isEditable}\n title={t(\"editor.italic\")}\n shortcut=\"⌘I\"\n onClick={() => editor.chain().focus().toggleItalic().run()}\n />\n )}\n {features.underline && (\n <ToolbarButton\n icon={EDITOR_ICONS.underline}\n active={editor.isActive(\"underline\")}\n disabled={!isEditable}\n title={t(\"editor.underline\")}\n shortcut=\"⌘U\"\n onClick={() => editor.chain().focus().toggleUnderline().run()}\n />\n )}\n {features.strike && (\n <ToolbarButton\n icon={EDITOR_ICONS.strikethrough}\n active={editor.isActive(\"strike\")}\n disabled={!isEditable}\n title={t(\"editor.strikethrough\")}\n onClick={() => editor.chain().focus().toggleStrike().run()}\n />\n )}\n {features.code && (\n <ToolbarButton\n icon={EDITOR_ICONS.code}\n active={editor.isActive(\"code\")}\n disabled={!isEditable}\n title={t(\"editor.code\")}\n shortcut=\"⌘E\"\n onClick={() => editor.chain().focus().toggleCode().run()}\n />\n )}\n {features.codeBlock && (\n <ToolbarButton\n icon={EDITOR_ICONS.codeBlock}\n active={editor.isActive(\"codeBlock\")}\n disabled={!isEditable}\n title={t(\"editor.codeBlock\")}\n onClick={() => editor.chain().focus().toggleCodeBlock().run()}\n />\n )}\n </ToolbarGroup>\n\n {/* Lists & Blocks */}\n <ToolbarGroup>\n {features.bulletList && (\n <ToolbarButton\n icon={EDITOR_ICONS.bulletList}\n active={editor.isActive(\"bulletList\")}\n disabled={!isEditable}\n title={t(\"editor.unorderedList\")}\n onClick={() => editor.chain().focus().toggleBulletList().run()}\n />\n )}\n {features.orderedList && (\n <ToolbarButton\n icon={EDITOR_ICONS.orderedList}\n active={editor.isActive(\"orderedList\")}\n disabled={!isEditable}\n title={t(\"editor.orderedList\")}\n onClick={() => editor.chain().focus().toggleOrderedList().run()}\n />\n )}\n {features.blockquote && (\n <ToolbarButton\n icon={EDITOR_ICONS.blockquote}\n active={editor.isActive(\"blockquote\")}\n disabled={!isEditable}\n title={t(\"editor.quote\")}\n onClick={() => editor.chain().focus().toggleBlockquote().run()}\n />\n )}\n {features.horizontalRule && (\n <ToolbarButton\n icon={EDITOR_ICONS.horizontalRule}\n disabled={!isEditable}\n title={t(\"editor.horizontalRule\")}\n onClick={() => editor.chain().focus().setHorizontalRule().run()}\n />\n )}\n </ToolbarGroup>\n\n {/* Text Alignment */}\n {features.align && (\n <ToolbarGroup>\n <ToolbarButton\n icon={EDITOR_ICONS.alignLeft}\n active={editor.isActive({ textAlign: \"left\" })}\n disabled={!isEditable}\n title={t(\"editor.alignLeft\")}\n onClick={() => editor.chain().focus().setTextAlign(\"left\").run()}\n />\n <ToolbarButton\n icon={EDITOR_ICONS.alignCenter}\n active={editor.isActive({ textAlign: \"center\" })}\n disabled={!isEditable}\n title={t(\"editor.alignCenter\")}\n onClick={() => editor.chain().focus().setTextAlign(\"center\").run()}\n />\n <ToolbarButton\n icon={EDITOR_ICONS.alignRight}\n active={editor.isActive({ textAlign: \"right\" })}\n disabled={!isEditable}\n title={t(\"editor.alignRight\")}\n onClick={() => editor.chain().focus().setTextAlign(\"right\").run()}\n />\n <ToolbarButton\n icon={EDITOR_ICONS.alignJustify}\n active={editor.isActive({ textAlign: \"justify\" })}\n disabled={!isEditable}\n title={t(\"editor.alignJustify\")}\n onClick={() => editor.chain().focus().setTextAlign(\"justify\").run()}\n />\n </ToolbarGroup>\n )}\n\n {/* Media & Links */}\n <ToolbarGroup>\n {features.link && (\n <ToolbarButton\n icon={EDITOR_ICONS.link}\n active={editor.isActive(\"link\")}\n disabled={!isEditable}\n title={t(\"editor.link\")}\n shortcut=\"⌘K\"\n onClick={onLinkClick}\n />\n )}\n {features.image && (\n <ToolbarButton\n icon={EDITOR_ICONS.image}\n disabled={!isEditable}\n title={t(\"editor.image\")}\n onClick={onImageClick}\n />\n )}\n {features.table &&\n (features.tableControls ? (\n <TableControls\n editor={editor}\n disabled={!isEditable}\n inTable={inTable}\n triggerButton={\n <ToolbarButton\n icon={EDITOR_ICONS.table}\n active={inTable}\n disabled={!isEditable}\n title={t(\"editor.table\")}\n />\n }\n />\n ) : (\n <ToolbarButton\n icon={EDITOR_ICONS.table}\n active={inTable}\n disabled={!isEditable}\n title={t(\"editor.table\")}\n onClick={onTableClick}\n />\n ))}\n </ToolbarGroup>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAa,eAAe;CAC1B,MAAM;CACN,MAAM;CACN,MAAM;CACN,QAAQ;CACR,WAAW;CACX,eAAe;CACf,MAAM;CACN,SAAS;CACT,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,WAAW;CACX,gBAAgB;CAChB,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,aAAa;CACb,YAAY;CACZ,cAAc;CACf;;;;AAmBD,SAAgB,cAAc,EAC5B,QACA,UACA,OACA,SACA,MAAM,UACN,UACA,UACA,WACA,GAAG,QACkB;CACrB,MAAM,cAAcA,QAAM,cAAc;AACtC,MAAI,CAAC,SAAS,CAAC,SAAU,QAAO;AAChC,MAAI,SAAU,QAAO,GAAG,SAAS,GAAG,IAAI,SAAS,GAAG,MAAM;AAC1D,SAAO;IACN,CAAC,OAAO,SAAS,CAAC;CAErB,MAAM,aAAa,SAAS,UAAU;AAGtC,QACE,oBAAC;EACC,MAAK;EACL,SAAQ;EACR,MANe,WAAW,YAAY;EAOtC,eAAa;EACb,OAAO;EACG;EACD;EACT,WAAW,GACT,oEACA,wEACA,gCACA,UACD;EACD,GAAI;YAEH,WACC,oBAAC;GAAK,MAAM,GAAG,WAAW;GAAc,OAAO;GAAI,QAAQ;IAAM,GAEjE;GAEK;;;;;AAOb,SAAgB,aAAa,EAAE,YAA2C;AACxE,QAAO,oBAAC;EAAI,WAAU;EAA2B;GAAe;;;;;AAkBlE,SAAgB,gBAAgB,EAC9B,QACA,UACA,UACA,cACA,iBACA,aACA,cACA,cACA,WACuB;CACvB,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,aAAa,CAAC;AAEpB,QACE,qBAAC;EAAI,WAAU;;GAEZ,SAAS,WACR,qBAAC,2BACC,oBAAC;IACC,MAAM,aAAa;IACnB,UAAU,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,MAAM;IAC7C,OAAO,EAAE,cAAc;IACvB,UAAS;IACT,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;KAClD,EACF,oBAAC;IACC,MAAM,aAAa;IACnB,UAAU,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,MAAM;IAC7C,OAAO,EAAE,cAAc;IACvB,UAAS;IACT,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;KAClD,IACW;GAIhB,SAAS,WACR,oBAAC,0BACC,qBAAC;IACC,WAAU;IACV,OAAO;IACP,WAAW,UAAU,gBAAgB,MAAM,OAAO,MAAM;IACxD,UAAU,CAAC;;KAEX,oBAAC;MAAO,OAAM;gBAAY;OAAkB;KAC5C,oBAAC;MAAO,OAAM;gBAAI;OAAkB;KACpC,oBAAC;MAAO,OAAM;gBAAI;OAAkB;KACpC,oBAAC;MAAO,OAAM;gBAAI;OAAkB;KACpC,oBAAC;MAAO,OAAM;gBAAI;OAAkB;KACpC,oBAAC;MAAO,OAAM;gBAAI;OAAkB;KACpC,oBAAC;MAAO,OAAM;gBAAI;OAAkB;;KAC7B,GACI;GAIjB,qBAAC;IACE,SAAS,QACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,OAAO;KAC/B,UAAU,CAAC;KACX,OAAO,EAAE,cAAc;KACvB,UAAS;KACT,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK;MACxD;IAEH,SAAS,UACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,SAAS;KACjC,UAAU,CAAC;KACX,OAAO,EAAE,gBAAgB;KACzB,UAAS;KACT,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK;MAC1D;IAEH,SAAS,aACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,YAAY;KACpC,UAAU,CAAC;KACX,OAAO,EAAE,mBAAmB;KAC5B,UAAS;KACT,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK;MAC7D;IAEH,SAAS,UACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,SAAS;KACjC,UAAU,CAAC;KACX,OAAO,EAAE,uBAAuB;KAChC,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK;MAC1D;IAEH,SAAS,QACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,OAAO;KAC/B,UAAU,CAAC;KACX,OAAO,EAAE,cAAc;KACvB,UAAS;KACT,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK;MACxD;IAEH,SAAS,aACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,YAAY;KACpC,UAAU,CAAC;KACX,OAAO,EAAE,mBAAmB;KAC5B,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK;MAC7D;OAES;GAGf,qBAAC;IACE,SAAS,cACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,aAAa;KACrC,UAAU,CAAC;KACX,OAAO,EAAE,uBAAuB;KAChC,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK;MAC9D;IAEH,SAAS,eACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,cAAc;KACtC,UAAU,CAAC;KACX,OAAO,EAAE,qBAAqB;KAC9B,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK;MAC/D;IAEH,SAAS,cACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,aAAa;KACrC,UAAU,CAAC;KACX,OAAO,EAAE,eAAe;KACxB,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK;MAC9D;IAEH,SAAS,kBACR,oBAAC;KACC,MAAM,aAAa;KACnB,UAAU,CAAC;KACX,OAAO,EAAE,wBAAwB;KACjC,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK;MAC/D;OAES;GAGd,SAAS,SACR,qBAAC;IACC,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,EAAE,WAAW,QAAQ,CAAC;KAC9C,UAAU,CAAC;KACX,OAAO,EAAE,mBAAmB;KAC5B,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,OAAO,CAAC,KAAK;MAChE;IACF,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,EAAE,WAAW,UAAU,CAAC;KAChD,UAAU,CAAC;KACX,OAAO,EAAE,qBAAqB;KAC9B,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,SAAS,CAAC,KAAK;MAClE;IACF,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,EAAE,WAAW,SAAS,CAAC;KAC/C,UAAU,CAAC;KACX,OAAO,EAAE,oBAAoB;KAC7B,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,QAAQ,CAAC,KAAK;MACjE;IACF,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,EAAE,WAAW,WAAW,CAAC;KACjD,UAAU,CAAC;KACX,OAAO,EAAE,sBAAsB;KAC/B,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,UAAU,CAAC,KAAK;MACnE;OACW;GAIjB,qBAAC;IACE,SAAS,QACR,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ,OAAO,SAAS,OAAO;KAC/B,UAAU,CAAC;KACX,OAAO,EAAE,cAAc;KACvB,UAAS;KACT,SAAS;MACT;IAEH,SAAS,SACR,oBAAC;KACC,MAAM,aAAa;KACnB,UAAU,CAAC;KACX,OAAO,EAAE,eAAe;KACxB,SAAS;MACT;IAEH,SAAS,UACP,SAAS,gBACR,oBAAC;KACS;KACR,UAAU,CAAC;KACF;KACT,eACE,oBAAC;MACC,MAAM,aAAa;MACnB,QAAQ;MACR,UAAU,CAAC;MACX,OAAO,EAAE,eAAe;OACxB;MAEJ,GAEF,oBAAC;KACC,MAAM,aAAa;KACnB,QAAQ;KACR,UAAU,CAAC;KACX,OAAO,EAAE,eAAe;KACxB,SAAS;MACT;OAEO;;GACX"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { FieldComponentProps } from "../../../builder/types/field-types.mjs";
|
|
2
|
+
import "../../../builder/index.mjs";
|
|
3
|
+
import { RichTextPreset } from "./presets.mjs";
|
|
4
|
+
import { Extension } from "@tiptap/core";
|
|
5
|
+
|
|
6
|
+
//#region src/client/components/fields/rich-text-editor/types.d.ts
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Feature toggles for the RichText editor
|
|
10
|
+
*/
|
|
11
|
+
type RichTextFeatures = {
|
|
12
|
+
toolbar?: boolean;
|
|
13
|
+
bubbleMenu?: boolean;
|
|
14
|
+
slashCommands?: boolean;
|
|
15
|
+
history?: boolean;
|
|
16
|
+
heading?: boolean;
|
|
17
|
+
bold?: boolean;
|
|
18
|
+
italic?: boolean;
|
|
19
|
+
underline?: boolean;
|
|
20
|
+
strike?: boolean;
|
|
21
|
+
code?: boolean;
|
|
22
|
+
codeBlock?: boolean;
|
|
23
|
+
blockquote?: boolean;
|
|
24
|
+
bulletList?: boolean;
|
|
25
|
+
orderedList?: boolean;
|
|
26
|
+
horizontalRule?: boolean;
|
|
27
|
+
align?: boolean;
|
|
28
|
+
link?: boolean;
|
|
29
|
+
image?: boolean;
|
|
30
|
+
table?: boolean;
|
|
31
|
+
tableControls?: boolean;
|
|
32
|
+
characterCount?: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Props for the RichTextEditor component
|
|
36
|
+
*/
|
|
37
|
+
interface RichTextEditorProps extends FieldComponentProps<any> {
|
|
38
|
+
/**
|
|
39
|
+
* Custom Tiptap extensions
|
|
40
|
+
*/
|
|
41
|
+
extensions?: Extension[];
|
|
42
|
+
/**
|
|
43
|
+
* Preset configuration (minimal, simple, standard, advanced)
|
|
44
|
+
* Can be overridden by features prop
|
|
45
|
+
*/
|
|
46
|
+
preset?: RichTextPreset;
|
|
47
|
+
/**
|
|
48
|
+
* Feature toggles (overrides preset)
|
|
49
|
+
*/
|
|
50
|
+
features?: RichTextFeatures;
|
|
51
|
+
/**
|
|
52
|
+
* Show character count
|
|
53
|
+
*/
|
|
54
|
+
showCharacterCount?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Max character limit
|
|
57
|
+
*/
|
|
58
|
+
maxCharacters?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Enable image uploads
|
|
61
|
+
*/
|
|
62
|
+
enableImages?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Image upload handler
|
|
65
|
+
*/
|
|
66
|
+
onImageUpload?: (file: File) => Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Target collection for image uploads
|
|
69
|
+
*/
|
|
70
|
+
imageCollection?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Enable media library picker for images
|
|
73
|
+
*/
|
|
74
|
+
enableMediaLibrary?: boolean;
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { RichTextEditorProps, RichTextFeatures };
|
|
78
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../../src/client/components/fields/rich-text-editor/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAWA;AAsDA;;AAUW,KAhEC,gBAAA,GAgED;EAKE,OAAA,CAAA,EAAA,OAAA;EAoBY,UAAA,CAAA,EAAA,OAAA;EAAS,aAAA,CAAA,EAAA,OAAA;EAnCW,OAAA,CAAA,EAAA,OAAA;EAAmB,OAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;UAA/C,mBAAA,SAA4B;;;;eAI9B;;;;;WAMJ;;;;aAKE;;;;;;;;;;;;;;;;yBAoBY,SAAS"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/client/components/fields/rich-text-editor/types.ts
|
|
2
|
+
/**
|
|
3
|
+
* Default feature configuration (all enabled)
|
|
4
|
+
*/
|
|
5
|
+
const defaultFeatures = {
|
|
6
|
+
toolbar: true,
|
|
7
|
+
bubbleMenu: true,
|
|
8
|
+
slashCommands: true,
|
|
9
|
+
history: true,
|
|
10
|
+
heading: true,
|
|
11
|
+
bold: true,
|
|
12
|
+
italic: true,
|
|
13
|
+
underline: true,
|
|
14
|
+
strike: true,
|
|
15
|
+
code: true,
|
|
16
|
+
codeBlock: true,
|
|
17
|
+
blockquote: true,
|
|
18
|
+
bulletList: true,
|
|
19
|
+
orderedList: true,
|
|
20
|
+
horizontalRule: true,
|
|
21
|
+
align: true,
|
|
22
|
+
link: true,
|
|
23
|
+
image: true,
|
|
24
|
+
table: true,
|
|
25
|
+
tableControls: true,
|
|
26
|
+
characterCount: true
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { defaultFeatures };
|
|
31
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","names":["defaultFeatures: Required<RichTextFeatures>"],"sources":["../../../../../src/client/components/fields/rich-text-editor/types.ts"],"sourcesContent":["/**\n * RichText Editor Type Definitions\n */\n\nimport type { Editor, Extension as TiptapExtension } from \"@tiptap/core\";\nimport type { FieldComponentProps } from \"../../../builder\";\nimport type { RichTextPreset } from \"./presets\";\n\n/**\n * Feature toggles for the RichText editor\n */\nexport type RichTextFeatures = {\n toolbar?: boolean;\n bubbleMenu?: boolean;\n slashCommands?: boolean;\n history?: boolean;\n heading?: boolean;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n strike?: boolean;\n code?: boolean;\n codeBlock?: boolean;\n blockquote?: boolean;\n bulletList?: boolean;\n orderedList?: boolean;\n horizontalRule?: boolean;\n align?: boolean;\n link?: boolean;\n image?: boolean;\n table?: boolean;\n tableControls?: boolean;\n characterCount?: boolean;\n};\n\n/**\n * Default feature configuration (all enabled)\n */\nexport const defaultFeatures: Required<RichTextFeatures> = {\n toolbar: true,\n bubbleMenu: true,\n slashCommands: true,\n history: true,\n heading: true,\n bold: true,\n italic: true,\n underline: true,\n strike: true,\n code: true,\n codeBlock: true,\n blockquote: true,\n bulletList: true,\n orderedList: true,\n horizontalRule: true,\n align: true,\n link: true,\n image: true,\n table: true,\n tableControls: true,\n characterCount: true,\n};\n\n/**\n * Props for the RichTextEditor component\n */\nexport interface RichTextEditorProps extends FieldComponentProps<any> {\n /**\n * Custom Tiptap extensions\n */\n extensions?: TiptapExtension[];\n\n /**\n * Preset configuration (minimal, simple, standard, advanced)\n * Can be overridden by features prop\n */\n preset?: RichTextPreset;\n\n /**\n * Feature toggles (overrides preset)\n */\n features?: RichTextFeatures;\n\n /**\n * Show character count\n */\n showCharacterCount?: boolean;\n\n /**\n * Max character limit\n */\n maxCharacters?: number;\n\n /**\n * Enable image uploads\n */\n enableImages?: boolean;\n\n /**\n * Image upload handler\n */\n onImageUpload?: (file: File) => Promise<string>;\n\n /**\n * Target collection for image uploads\n */\n imageCollection?: string;\n\n /**\n * Enable media library picker for images\n */\n enableMediaLibrary?: boolean;\n}\n\n/**\n * Output value type (always TipTap JSON)\n */\nexport type OutputValue = Record<string, any>;\n\n/**\n * Slash command item\n */\nexport type SlashCommandItem = {\n title: string;\n description?: string;\n keywords?: string[];\n command: (editor: Editor) => void;\n};\n\n/**\n * Slash command list props\n */\nexport type SlashCommandListProps = {\n items: SlashCommandItem[];\n command: (item: SlashCommandItem) => void;\n};\n\n/**\n * Slash command list handle (ref API)\n */\nexport type SlashCommandListHandle = {\n onKeyDown: (props: { event: KeyboardEvent }) => boolean;\n};\n"],"mappings":";;;;AAsCA,MAAaA,kBAA8C;CACzD,SAAS;CACT,YAAY;CACZ,eAAe;CACf,SAAS;CACT,SAAS;CACT,MAAM;CACN,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,MAAM;CACN,WAAW;CACX,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,gBAAgB;CAChB,OAAO;CACP,MAAM;CACN,OAAO;CACP,OAAO;CACP,eAAe;CACf,gBAAgB;CACjB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/client/components/fields/rich-text-editor/utils.ts
|
|
2
|
+
/**
|
|
3
|
+
* Get the current heading level or "paragraph"
|
|
4
|
+
*/
|
|
5
|
+
function getHeadingLevel(editor) {
|
|
6
|
+
if (!editor) return "paragraph";
|
|
7
|
+
for (let level = 1; level <= 6; level += 1) if (editor.isActive("heading", { level })) return String(level);
|
|
8
|
+
return "paragraph";
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get output as TipTap JSON.
|
|
12
|
+
*/
|
|
13
|
+
function getOutput(editor) {
|
|
14
|
+
return editor.getJSON();
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Compare two output values for equality
|
|
18
|
+
*/
|
|
19
|
+
function isSameValue(a, b) {
|
|
20
|
+
if (a === b) return true;
|
|
21
|
+
if (!a || !b) return false;
|
|
22
|
+
try {
|
|
23
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get character and word count from editor
|
|
30
|
+
*/
|
|
31
|
+
function getCharacterCount(editor) {
|
|
32
|
+
if (!editor) return {
|
|
33
|
+
characters: 0,
|
|
34
|
+
words: 0
|
|
35
|
+
};
|
|
36
|
+
const storage = editor.storage;
|
|
37
|
+
if (storage?.characterCount) return {
|
|
38
|
+
characters: storage.characterCount.characters(),
|
|
39
|
+
words: storage.characterCount.words()
|
|
40
|
+
};
|
|
41
|
+
const text = editor.getText();
|
|
42
|
+
const words = text.trim().length ? text.trim().split(/\s+/).length : 0;
|
|
43
|
+
return {
|
|
44
|
+
characters: text.length,
|
|
45
|
+
words
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { getCharacterCount, getHeadingLevel, getOutput, isSameValue };
|
|
51
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../src/client/components/fields/rich-text-editor/utils.ts"],"sourcesContent":["/**\n * RichText Editor Utility Functions\n */\n\nimport type { Editor } from \"@tiptap/core\";\n\nimport type { OutputValue } from \"./types\";\n\n/**\n * Get the current heading level or \"paragraph\"\n */\nexport function getHeadingLevel(editor: Editor | null): string {\n if (!editor) return \"paragraph\";\n for (let level = 1; level <= 6; level += 1) {\n if (editor.isActive(\"heading\", { level })) {\n return String(level);\n }\n }\n return \"paragraph\";\n}\n\n/**\n * Get output as TipTap JSON.\n */\nexport function getOutput(editor: Editor): OutputValue {\n return editor.getJSON();\n}\n\n/**\n * Compare two output values for equality\n */\nexport function isSameValue(\n a: OutputValue | undefined,\n b: OutputValue | undefined,\n): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n try {\n return JSON.stringify(a) === JSON.stringify(b);\n } catch {\n return false;\n }\n}\n\n/**\n * Get character and word count from editor\n */\nexport function getCharacterCount(editor: Editor | null): {\n characters: number;\n words: number;\n} {\n if (!editor) return { characters: 0, words: 0 };\n const storage = editor.storage as any;\n if (storage?.characterCount) {\n return {\n characters: storage.characterCount.characters(),\n words: storage.characterCount.words(),\n };\n }\n const text = editor.getText();\n const words = text.trim().length ? text.trim().split(/\\s+/).length : 0;\n return { characters: text.length, words };\n}\n"],"mappings":";;;;AAWA,SAAgB,gBAAgB,QAA+B;AAC7D,KAAI,CAAC,OAAQ,QAAO;AACpB,MAAK,IAAI,QAAQ,GAAG,SAAS,GAAG,SAAS,EACvC,KAAI,OAAO,SAAS,WAAW,EAAE,OAAO,CAAC,CACvC,QAAO,OAAO,MAAM;AAGxB,QAAO;;;;;AAMT,SAAgB,UAAU,QAA6B;AACrD,QAAO,OAAO,SAAS;;;;;AAMzB,SAAgB,YACd,GACA,GACS;AACT,KAAI,MAAM,EAAG,QAAO;AACpB,KAAI,CAAC,KAAK,CAAC,EAAG,QAAO;AACrB,KAAI;AACF,SAAO,KAAK,UAAU,EAAE,KAAK,KAAK,UAAU,EAAE;SACxC;AACN,SAAO;;;;;;AAOX,SAAgB,kBAAkB,QAGhC;AACA,KAAI,CAAC,OAAQ,QAAO;EAAE,YAAY;EAAG,OAAO;EAAG;CAC/C,MAAM,UAAU,OAAO;AACvB,KAAI,SAAS,eACX,QAAO;EACL,YAAY,QAAQ,eAAe,YAAY;EAC/C,OAAO,QAAQ,eAAe,OAAO;EACtC;CAEH,MAAM,OAAO,OAAO,SAAS;CAC7B,MAAM,QAAQ,KAAK,MAAM,CAAC,SAAS,KAAK,MAAM,CAAC,MAAM,MAAM,CAAC,SAAS;AACrE,QAAO;EAAE,YAAY,KAAK;EAAQ;EAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RichTextEditorProps } from "./rich-text-editor/types.mjs";
|
|
2
|
+
import "./rich-text-editor/index.mjs";
|
|
3
|
+
import * as react_jsx_runtime221 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/client/components/fields/rich-text-field.d.ts
|
|
6
|
+
declare function RichTextField({
|
|
7
|
+
name,
|
|
8
|
+
control,
|
|
9
|
+
onChange,
|
|
10
|
+
...props
|
|
11
|
+
}: RichTextEditorProps): react_jsx_runtime221.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { RichTextField };
|
|
14
|
+
//# sourceMappingURL=rich-text-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-text-field.d.mts","names":[],"sources":["../../../../src/client/components/fields/rich-text-field.tsx"],"sourcesContent":[],"mappings":";;;;;iBAKgB,aAAA;;;;;GAKb,sBAAmB,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useResolvedControl } from "./field-utils.mjs";
|
|
2
|
+
import { RichTextEditor } from "./rich-text-editor/index.mjs";
|
|
3
|
+
import { Controller } from "react-hook-form";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/client/components/fields/rich-text-field.tsx
|
|
7
|
+
function RichTextField({ name, control, onChange, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
9
|
+
name,
|
|
10
|
+
control: useResolvedControl(control),
|
|
11
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsx(RichTextEditor, {
|
|
12
|
+
...props,
|
|
13
|
+
name,
|
|
14
|
+
value: field.value,
|
|
15
|
+
onChange: (value) => {
|
|
16
|
+
field.onChange(value);
|
|
17
|
+
onChange?.(value);
|
|
18
|
+
},
|
|
19
|
+
error: fieldState.error?.message
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { RichTextField };
|
|
26
|
+
//# sourceMappingURL=rich-text-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-text-field.mjs","names":[],"sources":["../../../../src/client/components/fields/rich-text-field.tsx"],"sourcesContent":["import { Controller } from \"react-hook-form\";\nimport { useResolvedControl } from \"./field-utils\";\nimport type { RichTextEditorProps } from \"./rich-text-editor\";\nimport { RichTextEditor } from \"./rich-text-editor\";\n\nexport function RichTextField({\n name,\n control,\n onChange,\n ...props\n}: RichTextEditorProps) {\n const resolvedControl = useResolvedControl(control);\n\n return (\n <Controller\n name={name}\n control={resolvedControl}\n render={({ field, fieldState }) => (\n <RichTextEditor\n {...props}\n name={name}\n value={field.value}\n onChange={(value) => {\n field.onChange(value);\n onChange?.(value);\n }}\n error={fieldState.error?.message}\n />\n )}\n />\n );\n}\n"],"mappings":";;;;;;AAKA,SAAgB,cAAc,EAC5B,MACA,SACA,UACA,GAAG,SACmB;AAGtB,QACE,oBAAC;EACO;EACN,SALoB,mBAAmB,QAAQ;EAM/C,SAAS,EAAE,OAAO,iBAChB,oBAAC;GACC,GAAI;GACE;GACN,OAAO,MAAM;GACb,WAAW,UAAU;AACnB,UAAM,SAAS,MAAM;AACrB,eAAW,MAAM;;GAEnB,OAAO,WAAW,OAAO;IACzB;GAEJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SelectFieldProps } from "./field-types.mjs";
|
|
2
|
+
import * as react_jsx_runtime222 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/components/fields/select-field.d.ts
|
|
5
|
+
declare function SelectField<TValue extends string = string>({
|
|
6
|
+
name,
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
placeholder,
|
|
10
|
+
required,
|
|
11
|
+
disabled,
|
|
12
|
+
localized,
|
|
13
|
+
locale,
|
|
14
|
+
control,
|
|
15
|
+
className,
|
|
16
|
+
options,
|
|
17
|
+
loadOptions,
|
|
18
|
+
multiple,
|
|
19
|
+
clearable,
|
|
20
|
+
maxSelections,
|
|
21
|
+
emptyMessage
|
|
22
|
+
}: SelectFieldProps<TValue>): react_jsx_runtime222.JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { SelectField };
|
|
25
|
+
//# sourceMappingURL=select-field.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-field.d.mts","names":[],"sources":["../../../../src/client/components/fields/select-field.tsx"],"sourcesContent":[],"mappings":";;;;iBAOgB;;;;;;;;;;;;;;;;;GAiBb,iBAAiB,UAAO,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useResolvedControl } from "./field-utils.mjs";
|
|
2
|
+
import { SelectMulti } from "../primitives/select-multi.mjs";
|
|
3
|
+
import { SelectSingle } from "../primitives/select-single.mjs";
|
|
4
|
+
import { FieldWrapper } from "./field-wrapper.mjs";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/client/components/fields/select-field.tsx
|
|
9
|
+
function SelectField({ name, label, description, placeholder, required, disabled, localized, locale, control, className, options, loadOptions, multiple, clearable, maxSelections, emptyMessage }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
11
|
+
name,
|
|
12
|
+
control: useResolvedControl(control),
|
|
13
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsx(FieldWrapper, {
|
|
14
|
+
name,
|
|
15
|
+
label,
|
|
16
|
+
description,
|
|
17
|
+
required,
|
|
18
|
+
disabled,
|
|
19
|
+
localized,
|
|
20
|
+
locale,
|
|
21
|
+
error: fieldState.error?.message,
|
|
22
|
+
children: multiple ? /* @__PURE__ */ jsx(SelectMulti, {
|
|
23
|
+
id: name,
|
|
24
|
+
value: Array.isArray(field.value) ? field.value : [],
|
|
25
|
+
onChange: field.onChange,
|
|
26
|
+
options,
|
|
27
|
+
loadOptions,
|
|
28
|
+
maxSelections,
|
|
29
|
+
emptyMessage,
|
|
30
|
+
placeholder,
|
|
31
|
+
disabled,
|
|
32
|
+
"aria-invalid": !!fieldState.error,
|
|
33
|
+
className
|
|
34
|
+
}) : /* @__PURE__ */ jsx(SelectSingle, {
|
|
35
|
+
id: name,
|
|
36
|
+
value: field.value ?? null,
|
|
37
|
+
onChange: field.onChange,
|
|
38
|
+
options,
|
|
39
|
+
loadOptions,
|
|
40
|
+
clearable,
|
|
41
|
+
emptyMessage,
|
|
42
|
+
placeholder,
|
|
43
|
+
disabled,
|
|
44
|
+
"aria-invalid": !!fieldState.error,
|
|
45
|
+
className
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { SelectField };
|
|
53
|
+
//# sourceMappingURL=select-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-field.mjs","names":[],"sources":["../../../../src/client/components/fields/select-field.tsx"],"sourcesContent":["import { Controller } from \"react-hook-form\";\nimport { SelectMulti } from \"../primitives/select-multi\";\nimport { SelectSingle } from \"../primitives/select-single\";\nimport type { SelectFieldProps } from \"./field-types\";\nimport { useResolvedControl } from \"./field-utils\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\nexport function SelectField<TValue extends string = string>({\n name,\n label,\n description,\n placeholder,\n required,\n disabled,\n localized,\n locale,\n control,\n className,\n options,\n loadOptions,\n multiple,\n clearable,\n maxSelections,\n emptyMessage,\n}: SelectFieldProps<TValue>) {\n const resolvedControl = useResolvedControl(control);\n\n return (\n <Controller\n name={name}\n control={resolvedControl}\n render={({ field, fieldState }) => (\n <FieldWrapper\n name={name}\n label={label}\n description={description}\n required={required}\n disabled={disabled}\n localized={localized}\n locale={locale}\n error={fieldState.error?.message}\n >\n {multiple ? (\n <SelectMulti<TValue>\n id={name}\n value={Array.isArray(field.value) ? field.value : []}\n onChange={field.onChange}\n options={options}\n loadOptions={loadOptions}\n maxSelections={maxSelections}\n emptyMessage={emptyMessage}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={!!fieldState.error}\n className={className}\n />\n ) : (\n <SelectSingle<TValue>\n id={name}\n value={field.value ?? null}\n onChange={field.onChange}\n options={options}\n loadOptions={loadOptions}\n clearable={clearable}\n emptyMessage={emptyMessage}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={!!fieldState.error}\n className={className}\n />\n )}\n </FieldWrapper>\n )}\n />\n );\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,YAA4C,EAC1D,MACA,OACA,aACA,aACA,UACA,UACA,WACA,QACA,SACA,WACA,SACA,aACA,UACA,WACA,eACA,gBAC2B;AAG3B,QACE,oBAAC;EACO;EACN,SALoB,mBAAmB,QAAQ;EAM/C,SAAS,EAAE,OAAO,iBAChB,oBAAC;GACO;GACC;GACM;GACH;GACA;GACC;GACH;GACR,OAAO,WAAW,OAAO;aAExB,WACC,oBAAC;IACC,IAAI;IACJ,OAAO,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,QAAQ,EAAE;IACpD,UAAU,MAAM;IACP;IACI;IACE;IACD;IACD;IACH;IACV,gBAAc,CAAC,CAAC,WAAW;IAChB;KACX,GAEF,oBAAC;IACC,IAAI;IACJ,OAAO,MAAM,SAAS;IACtB,UAAU,MAAM;IACP;IACI;IACF;IACG;IACD;IACH;IACV,gBAAc,CAAC,CAAC,WAAW;IAChB;KACX;IAES;GAEjB"}
|