themelia-react-ui 2.0.4 → 2.0.6
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/CHANGELOG.md +211 -0
- package/MIGRATION.md +119 -0
- package/README.md +122 -20
- package/dist/{accordion-96o0pN62.js → accordion-0tQUZ20r.js} +13 -13
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-C0gjzLyE.js} +48 -45
- package/dist/action-menu-C0gjzLyE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-CGGpQryR.js} +281 -230
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/app-shell-EHuuRDGy.js +321 -0
- package/dist/app-shell-EHuuRDGy.js.map +1 -0
- package/dist/{attachment-DkoqHPPl.js → attachment-BCpA4e7i.js} +10 -10
- package/dist/{attachment-DkoqHPPl.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-B0girIk_.js} +49 -52
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-B9Jnp-T-.js} +8 -8
- package/dist/avatar-B9Jnp-T-.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-wWauMgAt.js} +5 -5
- package/dist/{badge-DErMA7ul.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +200 -193
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +8 -8
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +6 -6
- package/dist/base/spinner.js.map +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-CdfIkCsV.js → batch-action-bar-BoqWIIpV.js} +7 -7
- package/dist/batch-action-bar-BoqWIIpV.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +267 -247
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +537 -543
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1330 -1250
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-Bp9Ke7kd.js} +7 -7
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-DkmK-z8E.js → button-ChBovTx0.js} +3 -3
- package/dist/button-ChBovTx0.js.map +1 -0
- package/dist/{buttons-BbfzgczK.js → buttons-DeW0bQeK.js} +16 -16
- package/dist/buttons-DeW0bQeK.js.map +1 -0
- package/dist/cards-CNXnmvV5.js +69 -0
- package/dist/cards-CNXnmvV5.js.map +1 -0
- package/dist/cascader-CrAl9zD5.js +439 -0
- package/dist/cascader-CrAl9zD5.js.map +1 -0
- package/dist/chart-I7ROnsl8.js +162 -0
- package/dist/chart-I7ROnsl8.js.map +1 -0
- package/dist/{checkbox-CzYUTPeJ.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/choice-inputs-DHGtx0QV.js +789 -0
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BSJyq9e-.js} +9 -9
- package/dist/code-block-BSJyq9e-.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BzJ91LUG.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/combobox-Bcvu5J8O.js +363 -0
- package/dist/combobox-Bcvu5J8O.js.map +1 -0
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-9e52NPgK.js} +11 -11
- package/dist/command-9e52NPgK.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-BsgErEqd.js} +44 -39
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +3 -4
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/choice-types.d.ts +5 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +8 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +29 -5
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +5 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +26 -13
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +6 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +5 -3
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +25 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +8 -0
- package/dist/components/features/media-library/media-library.types.d.ts +50 -12
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +4 -4
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +45 -8
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +6 -2
- package/dist/components/features/resource/resource.types.d.ts +14 -1
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +18 -2
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +9 -8
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +10 -3
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +38 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +6 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +50 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/{containers-CRmHf7GP.js → containers-CSdc32h9.js} +26 -18
- package/dist/containers-CSdc32h9.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-CnGCZdX4.js → copyable-3fdHfMR3.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-Cmj-xZYl.js} +271 -279
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Br0FicVv.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-BB4BL_-K.js → display-CT_N2a3w.js} +9 -9
- package/dist/{display-BB4BL_-K.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/dropdown-menu-C08iIugv.js +194 -0
- package/dist/dropdown-menu-C08iIugv.js.map +1 -0
- package/dist/features/activities.js +388 -326
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +46 -32
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +130 -130
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +243 -239
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +197 -199
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +168 -143
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +19 -30
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +369 -343
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1202 -975
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1270 -1183
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +160 -153
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +119 -113
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +470 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-D6H7tVJi.js} +5 -5
- package/dist/field-affordance-recipes-D6H7tVJi.js.map +1 -0
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/filters-Dl80yYtN.js +2415 -0
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-CgcrUbLU.js} +5 -5
- package/dist/form-sizing-CgcrUbLU.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-B3W8CH7-.js} +17 -13
- package/dist/forms-B3W8CH7-.js.map +1 -0
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-BA697l4a.js → header-ZIIsRKxP.js} +145 -141
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-BQ-L7Uu2.js → hooks-BitHSh-Y.js} +27 -15
- package/dist/hooks-BitHSh-Y.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-npxF1SLX.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-7KAc7XQL.js} +9 -9
- package/dist/{input-Cdw4k0fb.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/input-DIREVYHs.js +21 -0
- package/dist/input-DIREVYHs.js.map +1 -0
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/item-FfWnaYST.js +278 -0
- package/dist/item-FfWnaYST.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +12 -12
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/affordance-geometry.generated.d.ts +35 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +18 -15
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-qOnedSt4.js} +237 -168
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-XkqZ_UXH.js} +64 -64
- package/dist/metadata-list-XkqZ_UXH.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-BgtPJAhi.js +288 -0
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/navigation-Bt-v7rWP.js +261 -0
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CYqBcrSj.js} +79 -87
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js +172 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js.map +1 -0
- package/dist/overlays-CC8zI3Du.js +1017 -0
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/page-BoQ1VaFJ.js +331 -0
- package/dist/page-BoQ1VaFJ.js.map +1 -0
- package/dist/page-header-commands-DIKspJfx.js +193 -0
- package/dist/page-header-commands-DIKspJfx.js.map +1 -0
- package/dist/{pagination-Ch8X_47u.js → pagination-Br8TdV9A.js} +7 -7
- package/dist/{pagination-Ch8X_47u.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/popover-k8TdUcAt.js +201 -0
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-BYaCdFhf.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DJ0AkUan.js} +19 -12
- package/dist/popover.recipes-DJ0AkUan.js.map +1 -0
- package/dist/portal-recipes-DyUXqUtD.js +9 -0
- package/dist/portal-recipes-DyUXqUtD.js.map +1 -0
- package/dist/{primitives-Du64iDbb.js → primitives-BkkQjYl7.js} +23 -18
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-DZFXXzPs.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-C7LhOg7Q.js} +7 -7
- package/dist/receipt-C7LhOg7Q.js.map +1 -0
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-CAurDwT5.js} +501 -424
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js +99 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/sheet-C4DHsgLk.js +250 -0
- package/dist/sheet-C4DHsgLk.js.map +1 -0
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/sidebar-CmD6a-HK.js +1004 -0
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/skeleton-DDgdhmu9.js +265 -0
- package/dist/skeleton-DDgdhmu9.js.map +1 -0
- package/dist/smart-card-B6vLxqa_.js +617 -0
- package/dist/smart-card-B6vLxqa_.js.map +1 -0
- package/dist/{structure-C0V0_Fyf.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CBonSdTp.js} +573 -519
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-CpvnzJn9.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/tabs-C4Kr_hCr.js +192 -0
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-jdkS3ReG.js} +18 -18
- package/dist/text-inputs-jdkS3ReG.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.js → timelines-CoPwdJP0.js} +13 -12
- package/dist/timelines-CoPwdJP0.js.map +1 -0
- package/dist/tooltip-31NwIpTo.js +113 -0
- package/dist/tooltip-31NwIpTo.js.map +1 -0
- package/dist/{tree-CV11PURP.js → tree-CeYVzdFE.js} +9 -9
- package/dist/{tree-CV11PURP.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-C7-YMW1S.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-C9SA0X-8.js → upload-Hdm5gObf.js} +309 -296
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-D0sYPuqo.js} +16 -14
- package/dist/upload-queue-D0sYPuqo.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-9s8hLDfn.js} +24 -17
- package/dist/usage-card-9s8hLDfn.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-DhuoqFy4.js} +255 -165
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/value-inputs-D3aPgq9H.js +980 -0
- package/dist/value-inputs-D3aPgq9H.js.map +1 -0
- package/dist/{value-typography-ClupF0Gz.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-9EFVXUyk.js → workspace-CC8Vchiu.js} +51 -50
- package/dist/workspace-CC8Vchiu.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +21 -19
- package/docs/consumer-skill/references/analytics.md +33 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +21249 -14205
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +177 -32
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +12 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +62 -8
- package/docs/consumer-skill/references/integration.md +59 -1
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +3044 -445
- package/docs/consumer-skill/references/review.md +87 -10
- package/docs/consumer-skill/references/rhf-workflows.md +79 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +24 -20
- package/docs/consumer-skill/references/tokens.json +9 -9
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +176 -26
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +79 -7
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/breadcrumbs-B-WFKecD.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js +0 -776
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js +0 -877
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/comments-Di4w0H_S.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js +0 -1542
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/date-pickers-cj8IXbDC.js +0 -179
- package/dist/date-pickers-cj8IXbDC.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js +0 -239
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js +0 -2209
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-field-CsgRmdit.js +0 -63
- package/dist/form-field-CsgRmdit.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js +0 -906
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js +0 -277
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-RKOQaaIB.js.map +0 -1
- package/dist/message-INU2xsxu.js +0 -128
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js +0 -269
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/number-E_OiIfJz.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/primitives-Du64iDbb.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-CLJEf76s.js +0 -78
- package/dist/rich-text-CLJEf76s.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js +0 -94
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-BA2iboic.js +0 -174
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-CpvnzJn9.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js +0 -191
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/value-typography-ClupF0Gz.js.map +0 -1
- package/dist/workspace-9EFVXUyk.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { interpolateString as e, useStrings as t } from "./lib/strings.js";
|
|
3
|
-
import { t as n } from "./utils-
|
|
4
|
-
import { n as r } from "./buttons-
|
|
5
|
-
import { c as i } from "./typography-
|
|
6
|
-
import { t as a } from "./structure-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import { n as f, t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { forwardRef as p, useCallback as m, useEffect as h, useId as
|
|
3
|
+
import { t as n } from "./utils-DhuoqFy4.js";
|
|
4
|
+
import { n as r } from "./buttons-DeW0bQeK.js";
|
|
5
|
+
import { c as i } from "./typography-C7-YMW1S.js";
|
|
6
|
+
import { t as a } from "./structure-DZJ2wbAU.js";
|
|
7
|
+
import { r as o, t as s } from "./sanitize-html-BWkH4dLM.js";
|
|
8
|
+
import { g as c } from "./primitives-BkkQjYl7.js";
|
|
9
|
+
import { t as l } from "./number-CYqBcrSj.js";
|
|
10
|
+
import { t as u } from "./input-7KAc7XQL.js";
|
|
11
|
+
import { t as d } from "./form-field-CAPdwdnZ.js";
|
|
12
|
+
import { n as ee } from "./field-control-attributes-B6i335wr.js";
|
|
13
|
+
import { n as f, t as te } from "./rich-text-editor-toolbar-DbXig7Jk.js";
|
|
14
|
+
import { t as ne } from "./rich-text-editor.strings-CB59ekH2.js";
|
|
15
|
+
import { forwardRef as p, useCallback as m, useEffect as h, useId as re, useImperativeHandle as ie, useLayoutEffect as ae, useMemo as g, useRef as _, useState as v } from "react";
|
|
16
16
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
17
|
-
import { AlertCircle as
|
|
18
|
-
import * as C from "@tiptap/react";
|
|
19
|
-
import * as me from "@tiptap/starter-kit";
|
|
17
|
+
import { AlertCircle as S, Bold as oe, ImagePlus as C, Italic as se, List as ce, ListOrdered as le, Loader2 as ue, Quote as de, Redo2 as fe, Strikethrough as pe, Undo2 as me } from "lucide-react";
|
|
20
18
|
import { createPortal as he } from "react-dom";
|
|
19
|
+
import * as w from "@tiptap/react";
|
|
20
|
+
import * as T from "@tiptap/starter-kit";
|
|
21
21
|
//#region src/components/features/rich-text-editor/partials/caret-helpers.ts
|
|
22
22
|
function ge() {
|
|
23
23
|
if (typeof window > "u") return null;
|
|
@@ -52,13 +52,13 @@ function ge() {
|
|
|
52
52
|
function _e(e, t, n, r) {
|
|
53
53
|
if (typeof window > "u") return;
|
|
54
54
|
if (e) {
|
|
55
|
-
let { selection:
|
|
56
|
-
if (!
|
|
57
|
-
let
|
|
55
|
+
let { selection: r } = e.state;
|
|
56
|
+
if (!r.empty) return;
|
|
57
|
+
let i = r.from - Math.min(t, r.$from.parentOffset);
|
|
58
58
|
e.chain().focus().insertContentAt({
|
|
59
|
-
from:
|
|
60
|
-
to:
|
|
61
|
-
}, n).run()
|
|
59
|
+
from: i,
|
|
60
|
+
to: r.from
|
|
61
|
+
}, n).run();
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
let i = window.getSelection();
|
|
@@ -71,7 +71,7 @@ function _e(e, t, n, r) {
|
|
|
71
71
|
let e = Math.min(c, o);
|
|
72
72
|
if (c -= e, o -= e, o === 0) break;
|
|
73
73
|
}
|
|
74
|
-
let e =
|
|
74
|
+
let e = ye(s);
|
|
75
75
|
if (!e) break;
|
|
76
76
|
s = e, c = e.textContent?.length ?? 0;
|
|
77
77
|
}
|
|
@@ -80,7 +80,7 @@ function _e(e, t, n, r) {
|
|
|
80
80
|
let u = document.createRange().createContextualFragment(n);
|
|
81
81
|
l.insertNode(u), i.collapseToEnd();
|
|
82
82
|
let d = s?.parentElement?.closest?.("[contenteditable=\"true\"]") ?? null;
|
|
83
|
-
d && r(d.innerHTML);
|
|
83
|
+
d && r?.(d.innerHTML);
|
|
84
84
|
}
|
|
85
85
|
function ve(e, t) {
|
|
86
86
|
if (typeof window > "u" || !e) return;
|
|
@@ -99,7 +99,7 @@ function ve(e, t) {
|
|
|
99
99
|
let i = document.createRange().createContextualFragment(t);
|
|
100
100
|
r.insertNode(i), r.collapse(!1), n.removeAllRanges(), n.addRange(r);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function ye(e) {
|
|
103
103
|
let t = e;
|
|
104
104
|
for (; t;) {
|
|
105
105
|
if (t.previousSibling) {
|
|
@@ -113,10 +113,10 @@ function w(e) {
|
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/components/features/rich-text-editor/partials/counts-footer.tsx
|
|
116
|
-
function
|
|
116
|
+
function be({ text: e, maxLength: t, strings: r, className: a }) {
|
|
117
117
|
let o = e.length, s = e.trim().length > 0 ? e.trim().split(/\s+/).length : 0, u = typeof t == "number" && o > t;
|
|
118
118
|
return /* @__PURE__ */ x("div", {
|
|
119
|
-
className: n("counts-footer-text--component border-border flex items-center justify-end gap-space-lg border-t px-
|
|
119
|
+
className: n("counts-footer-text--component border-border flex items-center justify-end gap-space-lg border-t px-surface-xs py-space-sm", a),
|
|
120
120
|
children: [/* @__PURE__ */ x(i, {
|
|
121
121
|
tag: "span",
|
|
122
122
|
size: "xs",
|
|
@@ -155,43 +155,60 @@ function T({ text: e, maxLength: t, strings: r, className: a }) {
|
|
|
155
155
|
})]
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
|
|
159
|
-
function
|
|
158
|
+
be.displayName = "CountsFooterText";
|
|
159
|
+
function xe({ editor: e, sourceMode: t, sourceValue: n, maxLength: r, strings: i }) {
|
|
160
160
|
let a = t ? n.replace(/<[^>]*>/g, "") : e?.getText() ?? "";
|
|
161
|
-
return /* @__PURE__ */ b(
|
|
161
|
+
return /* @__PURE__ */ b(be, {
|
|
162
162
|
text: a,
|
|
163
163
|
maxLength: r,
|
|
164
164
|
strings: i
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
xe.displayName = "CountsFooter";
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/components/features/rich-text-editor/partials/editor-field-aria.ts
|
|
170
|
+
function Se(e, t, n) {
|
|
171
|
+
return t ? {
|
|
172
|
+
role: "combobox",
|
|
173
|
+
"aria-label": e,
|
|
174
|
+
"aria-expanded": "true",
|
|
175
|
+
"aria-haspopup": "listbox",
|
|
176
|
+
"aria-autocomplete": "list",
|
|
177
|
+
"aria-controls": t,
|
|
178
|
+
...n ? { "aria-activedescendant": n } : {}
|
|
179
|
+
} : {
|
|
180
|
+
role: "textbox",
|
|
181
|
+
"aria-label": e,
|
|
182
|
+
"aria-multiline": "true"
|
|
183
|
+
};
|
|
184
|
+
}
|
|
168
185
|
//#endregion
|
|
169
186
|
//#region src/components/features/rich-text-editor/partials/html-helpers.ts
|
|
170
|
-
function
|
|
187
|
+
function E(e) {
|
|
171
188
|
let t = e.trim();
|
|
172
189
|
return t === "" || t === "<p></p>" || t === "<p><br></p>" ? "" : t;
|
|
173
190
|
}
|
|
174
|
-
function
|
|
175
|
-
let t =
|
|
191
|
+
function D(e) {
|
|
192
|
+
let t = E(e);
|
|
176
193
|
return t === "" ? "<p></p>" : t;
|
|
177
194
|
}
|
|
178
195
|
//#endregion
|
|
179
196
|
//#region src/components/features/rich-text-editor/partials/inline-reference-node.ts
|
|
180
|
-
var
|
|
181
|
-
function
|
|
197
|
+
var Ce = "rsc-mention inline-reference--chip", we = "inlineReference";
|
|
198
|
+
function Te(e) {
|
|
182
199
|
return ({ editor: t }) => t.commands.command(({ tr: t, state: n }) => {
|
|
183
200
|
let { selection: r } = n;
|
|
184
201
|
if (!r.empty) return !1;
|
|
185
202
|
let { $from: i } = r, a = e === "backward" ? i.nodeBefore : i.nodeAfter;
|
|
186
|
-
if (a?.type.name !==
|
|
203
|
+
if (a?.type.name !== we) return !1;
|
|
187
204
|
let o = e === "backward" ? i.pos - a.nodeSize : i.pos;
|
|
188
205
|
return t.delete(o, o + a.nodeSize), !0;
|
|
189
206
|
});
|
|
190
207
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
193
|
-
return
|
|
194
|
-
name:
|
|
208
|
+
var Ee = null;
|
|
209
|
+
function De() {
|
|
210
|
+
return Ee ??= w.Node.create({
|
|
211
|
+
name: we,
|
|
195
212
|
group: "inline",
|
|
196
213
|
inline: !0,
|
|
197
214
|
atom: !0,
|
|
@@ -227,7 +244,7 @@ function N() {
|
|
|
227
244
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
228
245
|
return [
|
|
229
246
|
"span",
|
|
230
|
-
|
|
247
|
+
w.mergeAttributes({
|
|
231
248
|
class: "rsc-mention",
|
|
232
249
|
contenteditable: "false"
|
|
233
250
|
}, t),
|
|
@@ -240,33 +257,33 @@ function N() {
|
|
|
240
257
|
addNodeView() {
|
|
241
258
|
return ({ node: e }) => {
|
|
242
259
|
let t = document.createElement("span");
|
|
243
|
-
return t.className =
|
|
260
|
+
return t.className = Ce, t.setAttribute("contenteditable", "false"), t.setAttribute("data-ref-id", String(e.attrs.id ?? "")), e.attrs.kind && t.setAttribute("data-ref-kind", String(e.attrs.kind)), e.attrs.tone && t.setAttribute("data-ref-tone", String(e.attrs.tone)), t.textContent = String(e.attrs.label ?? ""), { dom: t };
|
|
244
261
|
};
|
|
245
262
|
},
|
|
246
263
|
addKeyboardShortcuts() {
|
|
247
264
|
return {
|
|
248
|
-
Backspace:
|
|
249
|
-
Delete:
|
|
265
|
+
Backspace: Te("backward"),
|
|
266
|
+
Delete: Te("forward")
|
|
250
267
|
};
|
|
251
268
|
}
|
|
252
|
-
}),
|
|
269
|
+
}), Ee;
|
|
253
270
|
}
|
|
254
|
-
var
|
|
255
|
-
function
|
|
256
|
-
return e.includes("data-rte-upload") ? e.replace(
|
|
271
|
+
var O = "data-rte-upload", Oe = "rich-text-editor--upload my-space-xs flex min-h-control items-center rounded-radius border border-dashed border-input bg-muted/30 px-row-x py-row-y", k = RegExp(`<span[^>]*\\b${O}="[^"]*"[^>]*>[\\s\\S]*?</span>`, "g");
|
|
272
|
+
function ke(e) {
|
|
273
|
+
return e.includes("data-rte-upload") ? e.replace(k, "") : e;
|
|
257
274
|
}
|
|
258
|
-
function
|
|
275
|
+
function A(e, t) {
|
|
259
276
|
let n = e.type.toLowerCase(), r = e.name.toLowerCase();
|
|
260
277
|
return t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean).some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
|
|
261
278
|
}
|
|
262
|
-
function
|
|
279
|
+
function Ae(e) {
|
|
263
280
|
return e.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").trim();
|
|
264
281
|
}
|
|
265
|
-
function
|
|
282
|
+
function je(e) {
|
|
266
283
|
return Array.from(e?.files ?? []).filter((e) => e.type.startsWith("image/"));
|
|
267
284
|
}
|
|
268
|
-
var
|
|
269
|
-
function
|
|
285
|
+
var j = 0;
|
|
286
|
+
function Me(t, n, r) {
|
|
270
287
|
let [i, a] = v([]), [s, c] = v(null), l = _(/* @__PURE__ */ new Map());
|
|
271
288
|
h(() => () => {
|
|
272
289
|
for (let e of l.current.values()) e.controller?.abort();
|
|
@@ -293,7 +310,7 @@ function Se(t, n, r) {
|
|
|
293
310
|
let c = n.current?.findPlaceholder(e);
|
|
294
311
|
u(e), c && n.current?.resolvePlaceholder(e, {
|
|
295
312
|
src: s,
|
|
296
|
-
alt: a.alt ??
|
|
313
|
+
alt: a.alt ?? Ae(r.file.name),
|
|
297
314
|
width: a.width,
|
|
298
315
|
height: a.height
|
|
299
316
|
});
|
|
@@ -317,14 +334,14 @@ function Se(t, n, r) {
|
|
|
317
334
|
if (!t) return;
|
|
318
335
|
let a = t.accept ?? "image/png,image/jpeg,image/gif,image/webp", o = [];
|
|
319
336
|
for (let s of i) {
|
|
320
|
-
let i =
|
|
337
|
+
let i = A(s, a) ? t.maxSize && s.size > t.maxSize ? r.tooLarge : null : r.unsupported;
|
|
321
338
|
if (i) {
|
|
322
339
|
let n = e(i, { name: s.name });
|
|
323
340
|
o.push(n), t.onError?.(Error(n), s);
|
|
324
341
|
continue;
|
|
325
342
|
}
|
|
326
|
-
|
|
327
|
-
let c = `upload-${
|
|
343
|
+
j += 1;
|
|
344
|
+
let c = `upload-${j}`;
|
|
328
345
|
l.current.set(c, { file: s }), n.current?.insertPlaceholder(c), d(c);
|
|
329
346
|
}
|
|
330
347
|
c(o.length > 0 ? o.join(" ") : null);
|
|
@@ -346,7 +363,7 @@ function Se(t, n, r) {
|
|
|
346
363
|
}, [n, u])
|
|
347
364
|
};
|
|
348
365
|
}
|
|
349
|
-
function
|
|
366
|
+
function M({ upload: t, strings: n, onRetry: o, onRemove: s }) {
|
|
350
367
|
let c = t.status === "error";
|
|
351
368
|
return /* @__PURE__ */ x(a, {
|
|
352
369
|
direction: "horizontal",
|
|
@@ -356,10 +373,10 @@ function z({ upload: t, strings: n, onRetry: o, onRemove: s }) {
|
|
|
356
373
|
className: "rich-text-editor--upload-status w-full min-w-0",
|
|
357
374
|
"data-status": t.status,
|
|
358
375
|
children: [
|
|
359
|
-
c ? /* @__PURE__ */ b(
|
|
376
|
+
c ? /* @__PURE__ */ b(S, {
|
|
360
377
|
className: "size-icon shrink-0 text-destructive",
|
|
361
378
|
"aria-hidden": "true"
|
|
362
|
-
}) : /* @__PURE__ */ b(
|
|
379
|
+
}) : /* @__PURE__ */ b(ue, {
|
|
363
380
|
className: "size-icon shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none",
|
|
364
381
|
"aria-hidden": "true"
|
|
365
382
|
}),
|
|
@@ -387,10 +404,10 @@ function z({ upload: t, strings: n, onRetry: o, onRemove: s }) {
|
|
|
387
404
|
]
|
|
388
405
|
});
|
|
389
406
|
}
|
|
390
|
-
function
|
|
407
|
+
function Ne({ queue: e, adapterRef: t, strings: n }) {
|
|
391
408
|
return /* @__PURE__ */ b(y, { children: e.uploads.map((r) => {
|
|
392
409
|
let i = t.current?.findPlaceholder(r.id);
|
|
393
|
-
return i ? he(/* @__PURE__ */ b(
|
|
410
|
+
return i ? he(/* @__PURE__ */ b(M, {
|
|
394
411
|
upload: r,
|
|
395
412
|
strings: n,
|
|
396
413
|
onRetry: () => e.retry(r.id),
|
|
@@ -398,14 +415,14 @@ function Ce({ queue: e, adapterRef: t, strings: n }) {
|
|
|
398
415
|
}), i, r.id) : null;
|
|
399
416
|
}) });
|
|
400
417
|
}
|
|
401
|
-
function
|
|
418
|
+
function Pe(e, t, n, r) {
|
|
402
419
|
let i = _(null), a = _(r);
|
|
403
420
|
a.current = r;
|
|
404
421
|
let o = !!e;
|
|
405
422
|
return {
|
|
406
423
|
item: g(() => o ? {
|
|
407
424
|
id: "insert-image",
|
|
408
|
-
icon:
|
|
425
|
+
icon: C,
|
|
409
426
|
label: t.insert,
|
|
410
427
|
toggle: !1,
|
|
411
428
|
onClick: () => {
|
|
@@ -427,11 +444,11 @@ function we(e, t, n, r) {
|
|
|
427
444
|
}) : null
|
|
428
445
|
};
|
|
429
446
|
}
|
|
430
|
-
function
|
|
431
|
-
let l =
|
|
447
|
+
function Fe({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s, strings: c }) {
|
|
448
|
+
let l = re();
|
|
432
449
|
return e === null && !o ? null : /* @__PURE__ */ x(a, {
|
|
433
450
|
gap: "sm",
|
|
434
|
-
className: "rich-text-editor--image-details border-t border-border/60 px-
|
|
451
|
+
className: "rich-text-editor--image-details border-t border-border/60 px-surface-xs py-space-sm",
|
|
435
452
|
children: [!!o && /* @__PURE__ */ x(a, {
|
|
436
453
|
direction: "horizontal",
|
|
437
454
|
align: "center",
|
|
@@ -476,13 +493,13 @@ function Te({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s
|
|
|
476
493
|
}
|
|
477
494
|
//#endregion
|
|
478
495
|
//#region src/components/features/rich-text-editor/partials/image-nodes.ts
|
|
479
|
-
function
|
|
496
|
+
function N(e) {
|
|
480
497
|
let t = Number(e);
|
|
481
498
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
482
499
|
}
|
|
483
|
-
var
|
|
484
|
-
function
|
|
485
|
-
return
|
|
500
|
+
var Ie = null, P = null;
|
|
501
|
+
function Le() {
|
|
502
|
+
return Ie ??= w.Node.create({
|
|
486
503
|
name: "image",
|
|
487
504
|
group: "inline",
|
|
488
505
|
inline: !0,
|
|
@@ -502,11 +519,11 @@ function U() {
|
|
|
502
519
|
title: { default: null },
|
|
503
520
|
width: {
|
|
504
521
|
default: null,
|
|
505
|
-
parseHTML: (e) =>
|
|
522
|
+
parseHTML: (e) => N(e.getAttribute("width"))
|
|
506
523
|
},
|
|
507
524
|
height: {
|
|
508
525
|
default: null,
|
|
509
|
-
parseHTML: (e) =>
|
|
526
|
+
parseHTML: (e) => N(e.getAttribute("height"))
|
|
510
527
|
}
|
|
511
528
|
};
|
|
512
529
|
},
|
|
@@ -518,12 +535,12 @@ function U() {
|
|
|
518
535
|
},
|
|
519
536
|
renderHTML({ HTMLAttributes: e }) {
|
|
520
537
|
let t = o(e.src);
|
|
521
|
-
return ["img",
|
|
538
|
+
return ["img", w.mergeAttributes(e, { src: t ?? null })];
|
|
522
539
|
}
|
|
523
|
-
}),
|
|
540
|
+
}), Ie;
|
|
524
541
|
}
|
|
525
|
-
function
|
|
526
|
-
return
|
|
542
|
+
function Re() {
|
|
543
|
+
return P ??= w.Node.create({
|
|
527
544
|
name: "imageUpload",
|
|
528
545
|
group: "inline",
|
|
529
546
|
inline: !0,
|
|
@@ -536,150 +553,180 @@ function W() {
|
|
|
536
553
|
return [];
|
|
537
554
|
},
|
|
538
555
|
renderHTML({ node: e }) {
|
|
539
|
-
return ["span", { [
|
|
556
|
+
return ["span", { [O]: e.attrs.id }];
|
|
540
557
|
},
|
|
541
558
|
addNodeView() {
|
|
542
559
|
return ({ node: e }) => {
|
|
543
560
|
let t = document.createElement("span");
|
|
544
|
-
return t.setAttribute(
|
|
561
|
+
return t.setAttribute(O, String(e.attrs.id)), t.setAttribute("contenteditable", "false"), t.className = Oe, {
|
|
545
562
|
dom: t,
|
|
546
563
|
ignoreMutation: () => !0,
|
|
547
564
|
stopEvent: () => !0
|
|
548
565
|
};
|
|
549
566
|
};
|
|
550
567
|
}
|
|
551
|
-
}),
|
|
568
|
+
}), P;
|
|
552
569
|
}
|
|
553
570
|
//#endregion
|
|
554
571
|
//#region src/components/features/rich-text-editor/partials/rich-text-editor-tiptap.tsx
|
|
555
|
-
function
|
|
556
|
-
return
|
|
572
|
+
function F(e) {
|
|
573
|
+
return E(ke(e?.getHTML() ?? ""));
|
|
557
574
|
}
|
|
558
|
-
var
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
let
|
|
575
|
+
var ze = w.EditorContent, Be = w.useEditor, I = w.useEditorState, Ve = "default" in T ? T.default : T, L = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, bodyHeight: s, minHeight: c, maxHeight: l, disabled: u = !1, invalid: d, id: p, onBlur: re, "aria-label": y, "aria-labelledby": S, "aria-describedby": C, "aria-invalid": ue, showCounts: he = !1, maxLength: w, extraToolbarItems: T, toolbarTrailing: ve, footerSlot: ye, hideSourceToggle: be = !1, autoFocus: Ce = !1, className: we, onCaretChange: Te, onEditorKeyDown: Ee, suggestionPopup: O, strings: Oe, images: k }, ke) {
|
|
576
|
+
let A = t(ne, Oe), { ariaInvalid: Ae } = ee(d, ue), j = !!k, M = _(null), N = _(null), [Ie, P] = v(!1), [L, R] = v(!1), z = _(null), [B, He] = v(""), Ue = _(!1), V = _(E(e)), H = _(Te);
|
|
577
|
+
H.current = Te;
|
|
578
|
+
let U = u ? void 0 : Ee, We = _(U);
|
|
579
|
+
ae(() => {
|
|
580
|
+
We.current = U;
|
|
581
|
+
}, [U]);
|
|
582
|
+
let W = O?.listboxId, Ge = O?.activeOptionId, G = y ?? A.editorLabel, K = g(() => {
|
|
583
|
+
let e = {
|
|
584
|
+
"data-slot": "editor-field",
|
|
585
|
+
class: f.editable
|
|
586
|
+
}, t = {
|
|
587
|
+
...Se(G, W, Ge),
|
|
588
|
+
id: p,
|
|
589
|
+
"aria-labelledby": S,
|
|
590
|
+
"aria-describedby": C,
|
|
591
|
+
"aria-invalid": Ae
|
|
592
|
+
};
|
|
593
|
+
for (let [n, r] of Object.entries(t)) r !== void 0 && (e[n] = String(r));
|
|
594
|
+
return e;
|
|
595
|
+
}, [
|
|
596
|
+
Ge,
|
|
597
|
+
C,
|
|
598
|
+
Ae,
|
|
599
|
+
S,
|
|
600
|
+
G,
|
|
601
|
+
p,
|
|
602
|
+
W
|
|
603
|
+
]), q = Be({
|
|
562
604
|
extensions: g(() => [
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
...
|
|
566
|
-
], [
|
|
567
|
-
content:
|
|
568
|
-
editable: !
|
|
605
|
+
Ve,
|
|
606
|
+
De(),
|
|
607
|
+
...j ? [Le(), Re()] : []
|
|
608
|
+
], [j]),
|
|
609
|
+
content: D(e),
|
|
610
|
+
editable: !u,
|
|
569
611
|
immediatelyRender: !1,
|
|
570
|
-
autofocus:
|
|
612
|
+
autofocus: Ce ? "end" : !1,
|
|
571
613
|
onFocus: () => {
|
|
572
|
-
|
|
614
|
+
Ue.current = !0, P(!0);
|
|
573
615
|
},
|
|
574
616
|
onBlur: () => {
|
|
575
|
-
|
|
617
|
+
Ue.current = !1, P(!1);
|
|
576
618
|
},
|
|
577
619
|
onUpdate: ({ editor: e }) => {
|
|
578
|
-
|
|
579
|
-
let t =
|
|
580
|
-
|
|
620
|
+
M.current?.prune();
|
|
621
|
+
let t = F(e);
|
|
622
|
+
t !== V.current && (V.current = t, r(t)), Ue.current && H.current?.();
|
|
581
623
|
},
|
|
582
624
|
editorProps: {
|
|
625
|
+
handleKeyDown: (e, t) => We.current?.(t) ? (t.preventDefault(), t.stopPropagation(), !0) : !1,
|
|
583
626
|
handlePaste: (e, t) => {
|
|
584
|
-
let n =
|
|
585
|
-
return !
|
|
627
|
+
let n = je(t.clipboardData);
|
|
628
|
+
return !M.current || !J.current || n.length === 0 ? !1 : (M.current.addFiles(n), !0);
|
|
586
629
|
},
|
|
587
630
|
handleDrop: (e, t, n, r) => {
|
|
588
|
-
let i =
|
|
589
|
-
if (r || !
|
|
631
|
+
let i = je(t.dataTransfer);
|
|
632
|
+
if (r || !M.current || !J.current || i.length === 0) return !1;
|
|
590
633
|
let a = e.posAtCoords({
|
|
591
634
|
left: t.clientX,
|
|
592
635
|
top: t.clientY
|
|
593
636
|
});
|
|
594
|
-
return a &&
|
|
637
|
+
return a && N.current?.commands.setTextSelection(a.pos), M.current.addFiles(i), !0;
|
|
595
638
|
},
|
|
596
|
-
attributes:
|
|
597
|
-
role: "textbox",
|
|
598
|
-
"aria-label": k.editorLabel,
|
|
599
|
-
"aria-multiline": "true",
|
|
600
|
-
class: s
|
|
601
|
-
}
|
|
639
|
+
attributes: K
|
|
602
640
|
}
|
|
603
|
-
}, [
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
641
|
+
}, [j]);
|
|
642
|
+
ae(() => {
|
|
643
|
+
q && q.options.editorProps.attributes !== K && q.setOptions({ editorProps: {
|
|
644
|
+
...q.options.editorProps,
|
|
645
|
+
attributes: K
|
|
646
|
+
} });
|
|
647
|
+
}, [q, K]), h(() => {
|
|
648
|
+
if (!q) return;
|
|
649
|
+
let t = F(q), n = E(e);
|
|
650
|
+
V.current = n, t !== n && q.chain().setMeta("addToHistory", !1).setContent(D(n), { emitUpdate: !1 }).run();
|
|
651
|
+
}, [q, e]), h(() => {
|
|
652
|
+
q && L && He(q.getHTML());
|
|
653
|
+
}, [
|
|
654
|
+
q,
|
|
655
|
+
L,
|
|
656
|
+
e
|
|
657
|
+
]), h(() => {
|
|
658
|
+
q && q.setEditable(!u, !1);
|
|
659
|
+
}, [u, q]), h(() => {
|
|
611
660
|
if (typeof document > "u") return;
|
|
612
661
|
let e = () => {
|
|
613
|
-
|
|
662
|
+
Ue.current && H.current?.();
|
|
614
663
|
};
|
|
615
664
|
return document.addEventListener("selectionchange", e), () => document.removeEventListener("selectionchange", e);
|
|
616
|
-
}, []),
|
|
665
|
+
}, []), ie(ke, () => ({
|
|
617
666
|
focus: () => {
|
|
618
|
-
|
|
667
|
+
z.current ? z.current.focus() : q?.chain().focus().run();
|
|
619
668
|
},
|
|
620
|
-
getHTML: () =>
|
|
669
|
+
getHTML: () => F(q),
|
|
621
670
|
setHTML: (e) => {
|
|
622
|
-
let t =
|
|
623
|
-
|
|
671
|
+
let t = E(e);
|
|
672
|
+
V.current = t, q?.commands.setContent(D(t), { emitUpdate: !1 }), r(t);
|
|
624
673
|
},
|
|
625
674
|
insertHTML: (e) => {
|
|
626
|
-
|
|
675
|
+
q && q.chain().focus().insertContent(e).run();
|
|
627
676
|
},
|
|
628
|
-
isEmpty: () =>
|
|
677
|
+
isEmpty: () => F(q) === "",
|
|
629
678
|
clear: () => {
|
|
630
|
-
|
|
679
|
+
V.current = "", q?.commands.setContent("<p></p>", { emitUpdate: !1 }), r("");
|
|
631
680
|
},
|
|
632
681
|
getCaretContext: () => ge(),
|
|
633
682
|
replaceBeforeCaret: (e, t) => {
|
|
634
|
-
_e(
|
|
635
|
-
z.current = D(e), r(z.current);
|
|
636
|
-
});
|
|
683
|
+
q && _e(q, e, t);
|
|
637
684
|
}
|
|
638
|
-
}), [
|
|
639
|
-
let
|
|
640
|
-
|
|
685
|
+
}), [q, r]), N.current = q ?? null;
|
|
686
|
+
let J = _(k);
|
|
687
|
+
J.current = k;
|
|
641
688
|
let Y = m(() => {
|
|
642
|
-
if (!
|
|
643
|
-
let e =
|
|
644
|
-
e !==
|
|
645
|
-
}, [
|
|
689
|
+
if (!q) return;
|
|
690
|
+
let e = F(q);
|
|
691
|
+
e !== V.current && (V.current = e, r(e));
|
|
692
|
+
}, [q, r]), Ke = m((e) => {
|
|
646
693
|
let t = null;
|
|
647
|
-
return
|
|
694
|
+
return q?.state.doc.descendants((n, r) => (!t && e(n) && (t = {
|
|
648
695
|
pos: r,
|
|
649
696
|
node: n
|
|
650
697
|
}), !t)), t;
|
|
651
|
-
}, [
|
|
652
|
-
|
|
698
|
+
}, [q]), qe = _(null);
|
|
699
|
+
qe.current = q ? {
|
|
653
700
|
insertPlaceholder: (e) => {
|
|
654
|
-
|
|
701
|
+
q.chain().focus().insertContent({
|
|
655
702
|
type: "imageUpload",
|
|
656
703
|
attrs: { id: e }
|
|
657
704
|
}).run();
|
|
658
705
|
},
|
|
659
|
-
findPlaceholder: (e) =>
|
|
706
|
+
findPlaceholder: (e) => q.view.dom.querySelector(`[data-rte-upload="${e}"]`),
|
|
660
707
|
resolvePlaceholder: (e, t) => {
|
|
661
|
-
let n =
|
|
708
|
+
let n = Ke((t) => t.type.name === "imageUpload" && t.attrs.id === e);
|
|
662
709
|
if (!n) return;
|
|
663
|
-
let r =
|
|
710
|
+
let r = q.schema.nodes.image.create({
|
|
664
711
|
src: t.src,
|
|
665
712
|
alt: t.alt ?? "",
|
|
666
713
|
width: t.width ?? null,
|
|
667
714
|
height: t.height ?? null
|
|
668
715
|
});
|
|
669
|
-
|
|
716
|
+
q.view.dispatch(q.state.tr.replaceWith(n.pos, n.pos + n.node.nodeSize, r)), Y();
|
|
670
717
|
},
|
|
671
718
|
removePlaceholder: (e) => {
|
|
672
|
-
let t =
|
|
673
|
-
t && (
|
|
719
|
+
let t = Ke((t) => t.type.name === "imageUpload" && t.attrs.id === e);
|
|
720
|
+
t && (q.view.dispatch(q.state.tr.delete(t.pos, t.pos + t.node.nodeSize)), Y());
|
|
674
721
|
}
|
|
675
722
|
} : null;
|
|
676
|
-
let
|
|
677
|
-
|
|
678
|
-
let
|
|
723
|
+
let X = Me(k, qe, A.images);
|
|
724
|
+
M.current = j ? X : null;
|
|
725
|
+
let Z = Pe(k, A.images, X.addFiles), Je = g(() => Z.item ? [Z.item, ...T ?? []] : T, [T, Z.item]), [Q, Ye] = v(null);
|
|
679
726
|
h(() => {
|
|
680
|
-
if (!
|
|
727
|
+
if (!q || !j) return;
|
|
681
728
|
let e = () => {
|
|
682
|
-
let e =
|
|
729
|
+
let e = q.state.selection, t = null;
|
|
683
730
|
if (e.node?.type.name === "image") t = {
|
|
684
731
|
pos: e.from,
|
|
685
732
|
alt: String(e.node.attrs.alt ?? "")
|
|
@@ -694,196 +741,206 @@ var K = C.EditorContent, q = C.useEditor, J = "default" in me ? me.default : me,
|
|
|
694
741
|
alt: String(r.attrs.alt ?? "")
|
|
695
742
|
});
|
|
696
743
|
}
|
|
697
|
-
|
|
744
|
+
Ye(t);
|
|
698
745
|
};
|
|
699
|
-
return
|
|
700
|
-
|
|
746
|
+
return q.on("selectionUpdate", e), q.on("update", e), () => {
|
|
747
|
+
q.off("selectionUpdate", e), q.off("update", e);
|
|
701
748
|
};
|
|
702
|
-
}, [
|
|
703
|
-
let
|
|
704
|
-
...
|
|
705
|
-
...
|
|
706
|
-
maxHeight:
|
|
749
|
+
}, [q, j]);
|
|
750
|
+
let Xe = f.bodyMinHeight[s ?? (o ? "control" : "document")], Ze = g(() => ({
|
|
751
|
+
...c ? { minHeight: c } : {},
|
|
752
|
+
...l ? {
|
|
753
|
+
maxHeight: l,
|
|
707
754
|
overflowY: "auto"
|
|
708
755
|
} : {}
|
|
709
|
-
}), [
|
|
710
|
-
|
|
711
|
-
if (F) {
|
|
712
|
-
let e = O(I);
|
|
713
|
-
V.commands.setContent(e, { emitUpdate: !1 });
|
|
714
|
-
let t = D(I);
|
|
715
|
-
z.current = t, r(t), be(!1);
|
|
716
|
-
} else L(V.getHTML()), be(!0);
|
|
717
|
-
}
|
|
756
|
+
}), [l, c]), Qe = m(() => {
|
|
757
|
+
q && (L ? (B !== q.getHTML() && (q.commands.setContent(D(B), { emitUpdate: !1 }), Y()), R(!1)) : (He(q.getHTML()), R(!0)));
|
|
718
758
|
}, [
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
]),
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
759
|
+
q,
|
|
760
|
+
Y,
|
|
761
|
+
L,
|
|
762
|
+
B
|
|
763
|
+
]), $ = I({
|
|
764
|
+
editor: q,
|
|
765
|
+
selector: ({ editor: e }) => ({
|
|
766
|
+
bold: e?.isActive("bold") ?? !1,
|
|
767
|
+
italic: e?.isActive("italic") ?? !1,
|
|
768
|
+
strike: e?.isActive("strike") ?? !1,
|
|
769
|
+
bulletList: e?.isActive("bulletList") ?? !1,
|
|
770
|
+
orderedList: e?.isActive("orderedList") ?? !1,
|
|
771
|
+
blockquote: e?.isActive("blockquote") ?? !1,
|
|
772
|
+
canUndo: e?.can().undo() ?? !1,
|
|
773
|
+
canRedo: e?.can().redo() ?? !1,
|
|
774
|
+
extraActive: Je?.map((e) => e.isActive?.() ?? !1)
|
|
775
|
+
})
|
|
776
|
+
}), $e = g(() => [
|
|
729
777
|
{
|
|
730
778
|
id: "bold",
|
|
731
|
-
icon:
|
|
732
|
-
label:
|
|
733
|
-
isActive: () =>
|
|
779
|
+
icon: oe,
|
|
780
|
+
label: A.toolbar.bold,
|
|
781
|
+
isActive: () => $?.bold ?? !1,
|
|
734
782
|
toggle: !0,
|
|
735
|
-
run: () =>
|
|
783
|
+
run: () => q?.chain().focus().toggleBold().run()
|
|
736
784
|
},
|
|
737
785
|
{
|
|
738
786
|
id: "italic",
|
|
739
|
-
icon:
|
|
740
|
-
label:
|
|
741
|
-
isActive: () =>
|
|
787
|
+
icon: se,
|
|
788
|
+
label: A.toolbar.italic,
|
|
789
|
+
isActive: () => $?.italic ?? !1,
|
|
742
790
|
toggle: !0,
|
|
743
|
-
run: () =>
|
|
791
|
+
run: () => q?.chain().focus().toggleItalic().run()
|
|
744
792
|
},
|
|
745
793
|
{
|
|
746
794
|
id: "strike",
|
|
747
|
-
icon:
|
|
748
|
-
label:
|
|
749
|
-
isActive: () =>
|
|
795
|
+
icon: pe,
|
|
796
|
+
label: A.toolbar.strike,
|
|
797
|
+
isActive: () => $?.strike ?? !1,
|
|
750
798
|
toggle: !0,
|
|
751
|
-
run: () =>
|
|
799
|
+
run: () => q?.chain().focus().toggleStrike().run()
|
|
752
800
|
},
|
|
753
801
|
{
|
|
754
802
|
id: "bullet-list",
|
|
755
|
-
icon:
|
|
756
|
-
label:
|
|
757
|
-
isActive: () =>
|
|
803
|
+
icon: ce,
|
|
804
|
+
label: A.toolbar.bulletList,
|
|
805
|
+
isActive: () => $?.bulletList ?? !1,
|
|
758
806
|
toggle: !0,
|
|
759
|
-
run: () =>
|
|
807
|
+
run: () => q?.chain().focus().toggleBulletList().run()
|
|
760
808
|
},
|
|
761
809
|
{
|
|
762
810
|
id: "ordered-list",
|
|
763
|
-
icon:
|
|
764
|
-
label:
|
|
765
|
-
isActive: () =>
|
|
811
|
+
icon: le,
|
|
812
|
+
label: A.toolbar.orderedList,
|
|
813
|
+
isActive: () => $?.orderedList ?? !1,
|
|
766
814
|
toggle: !0,
|
|
767
|
-
run: () =>
|
|
815
|
+
run: () => q?.chain().focus().toggleOrderedList().run()
|
|
768
816
|
},
|
|
769
817
|
{
|
|
770
818
|
id: "blockquote",
|
|
771
|
-
icon:
|
|
772
|
-
label:
|
|
773
|
-
isActive: () =>
|
|
819
|
+
icon: de,
|
|
820
|
+
label: A.toolbar.blockquote,
|
|
821
|
+
isActive: () => $?.blockquote ?? !1,
|
|
774
822
|
toggle: !0,
|
|
775
|
-
run: () =>
|
|
823
|
+
run: () => q?.chain().focus().toggleBlockquote().run()
|
|
776
824
|
},
|
|
777
825
|
{
|
|
778
826
|
id: "undo",
|
|
779
|
-
icon:
|
|
780
|
-
label:
|
|
827
|
+
icon: me,
|
|
828
|
+
label: A.toolbar.undo,
|
|
781
829
|
isActive: () => !1,
|
|
782
|
-
run: () =>
|
|
783
|
-
disabled:
|
|
830
|
+
run: () => q?.chain().focus().undo().run(),
|
|
831
|
+
disabled: !$?.canUndo
|
|
784
832
|
},
|
|
785
833
|
{
|
|
786
834
|
id: "redo",
|
|
787
|
-
icon:
|
|
788
|
-
label:
|
|
835
|
+
icon: fe,
|
|
836
|
+
label: A.toolbar.redo,
|
|
789
837
|
isActive: () => !1,
|
|
790
|
-
run: () =>
|
|
791
|
-
disabled:
|
|
838
|
+
run: () => q?.chain().focus().redo().run(),
|
|
839
|
+
disabled: !$?.canRedo
|
|
792
840
|
}
|
|
793
|
-
], [
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
841
|
+
], [
|
|
842
|
+
q,
|
|
843
|
+
A,
|
|
844
|
+
$
|
|
845
|
+
]), et = he && q ? /* @__PURE__ */ b(xe, {
|
|
846
|
+
editor: q,
|
|
847
|
+
sourceMode: L,
|
|
848
|
+
sourceValue: B,
|
|
849
|
+
maxLength: w,
|
|
850
|
+
strings: A
|
|
851
|
+
}) : null, tt = typeof a == "string" ? a : "", nt = tt.length > 0 && !Ie && q?.isEmpty ? /* @__PURE__ */ b(i, {
|
|
800
852
|
tag: "span",
|
|
801
853
|
size: "sm",
|
|
802
854
|
type: "secondary",
|
|
803
|
-
className:
|
|
804
|
-
children:
|
|
855
|
+
className: f.placeholder,
|
|
856
|
+
children: tt
|
|
805
857
|
}) : null;
|
|
806
858
|
return /* @__PURE__ */ x("div", {
|
|
807
|
-
|
|
859
|
+
onBlur: re && ((e) => {
|
|
860
|
+
e.currentTarget.contains(e.relatedTarget) || re(e);
|
|
861
|
+
}),
|
|
862
|
+
className: n(f.frame, u && f.disabled, we),
|
|
808
863
|
children: [
|
|
809
|
-
/* @__PURE__ */ b(
|
|
810
|
-
buttons:
|
|
811
|
-
extraToolbarItems:
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
864
|
+
/* @__PURE__ */ b(te, {
|
|
865
|
+
buttons: $e,
|
|
866
|
+
extraToolbarItems: Je,
|
|
867
|
+
extraToolbarActive: $?.extraActive,
|
|
868
|
+
hideSourceToggle: be,
|
|
869
|
+
sourceMode: L,
|
|
870
|
+
toggleSourceMode: Qe,
|
|
871
|
+
disabled: u,
|
|
872
|
+
hasEditor: !!q,
|
|
873
|
+
toolbarTrailing: ve,
|
|
874
|
+
strings: A
|
|
819
875
|
}),
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
876
|
+
L ? /* @__PURE__ */ b("textarea", {
|
|
877
|
+
ref: z,
|
|
878
|
+
id: p,
|
|
879
|
+
"data-slot": "editor-field",
|
|
880
|
+
"aria-label": y ?? A.sourceLabel,
|
|
881
|
+
"aria-labelledby": S,
|
|
882
|
+
"aria-describedby": C,
|
|
883
|
+
"aria-invalid": Ae,
|
|
884
|
+
value: B,
|
|
885
|
+
onChange: (e) => He(e.target.value),
|
|
886
|
+
disabled: u,
|
|
825
887
|
spellCheck: !1,
|
|
826
|
-
className: n(f.source,
|
|
827
|
-
style:
|
|
888
|
+
className: n(f.source, Xe, u && "cursor-not-allowed"),
|
|
889
|
+
style: Ze
|
|
828
890
|
}) : /* @__PURE__ */ x("div", {
|
|
829
|
-
className: n("relative",
|
|
830
|
-
style:
|
|
831
|
-
children: [
|
|
832
|
-
editor:
|
|
891
|
+
className: n("relative", Xe),
|
|
892
|
+
style: Ze,
|
|
893
|
+
children: [nt, /* @__PURE__ */ b(ze, {
|
|
894
|
+
editor: q,
|
|
833
895
|
className: f.content
|
|
834
896
|
})]
|
|
835
897
|
}),
|
|
836
|
-
|
|
898
|
+
j && /* @__PURE__ */ b(Fe, {
|
|
837
899
|
alt: Q ? Q.alt : null,
|
|
838
900
|
onAltChange: (e) => {
|
|
839
|
-
|
|
840
|
-
let t = V.state.doc.nodeAt(Q.pos);
|
|
841
|
-
t?.type.name === "image" && (V.view.dispatch(V.state.tr.setNodeMarkup(Q.pos, void 0, {
|
|
842
|
-
...t.attrs,
|
|
843
|
-
alt: e
|
|
844
|
-
})), $({
|
|
901
|
+
q && Q && q.state.doc.nodeAt(Q.pos)?.type.name === "image" && (q.view.dispatch(q.state.tr.setNodeAttribute(Q.pos, "alt", e)), Ye({
|
|
845
902
|
...Q,
|
|
846
903
|
alt: e
|
|
847
904
|
}), Y());
|
|
848
905
|
},
|
|
849
906
|
onRemove: () => {
|
|
850
|
-
if (!
|
|
851
|
-
let e =
|
|
852
|
-
e?.type.name === "image" && (
|
|
907
|
+
if (!q || !Q) return;
|
|
908
|
+
let e = q.state.doc.nodeAt(Q.pos);
|
|
909
|
+
e?.type.name === "image" && (q.view.dispatch(q.state.tr.delete(Q.pos, Q.pos + e.nodeSize)), Ye(null), Y(), q.commands.focus());
|
|
853
910
|
},
|
|
854
|
-
notice:
|
|
855
|
-
onDismissNotice:
|
|
856
|
-
strings:
|
|
911
|
+
notice: X.notice,
|
|
912
|
+
onDismissNotice: X.dismissNotice,
|
|
913
|
+
strings: A.images
|
|
857
914
|
}),
|
|
858
|
-
!!
|
|
859
|
-
className: "
|
|
860
|
-
children:
|
|
915
|
+
!!ye && /* @__PURE__ */ b("div", {
|
|
916
|
+
className: n(f.regionX, "pb-space-md pt-space-xs"),
|
|
917
|
+
children: ye
|
|
861
918
|
}),
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
queue:
|
|
866
|
-
adapterRef:
|
|
867
|
-
strings:
|
|
919
|
+
et,
|
|
920
|
+
Z.input,
|
|
921
|
+
j && /* @__PURE__ */ b(Ne, {
|
|
922
|
+
queue: X,
|
|
923
|
+
adapterRef: qe,
|
|
924
|
+
strings: A.images
|
|
868
925
|
})
|
|
869
926
|
]
|
|
870
927
|
});
|
|
871
928
|
});
|
|
872
|
-
|
|
873
|
-
var
|
|
929
|
+
L.displayName = "TiptapRichTextEditor";
|
|
930
|
+
var R = ((e) => typeof e == "function" || typeof e == "object" && !!e && "$$typeof" in e)(ze) && typeof Be == "function" && typeof I == "function" && typeof Ve == "object" && !!Ve;
|
|
874
931
|
//#endregion
|
|
875
932
|
//#region src/components/features/rich-text-editor/partials/rich-text-editor-fallback.tsx
|
|
876
|
-
function
|
|
933
|
+
function z(e) {
|
|
877
934
|
if (!e) return "";
|
|
878
935
|
if (!e.querySelector("[data-rte-upload]")) return e.innerHTML;
|
|
879
936
|
let t = e.cloneNode(!0);
|
|
880
|
-
for (let e of Array.from(t.querySelectorAll(`[${
|
|
937
|
+
for (let e of Array.from(t.querySelectorAll(`[${O}]`))) e.remove();
|
|
881
938
|
return t.innerHTML;
|
|
882
939
|
}
|
|
883
|
-
function
|
|
940
|
+
function B(e) {
|
|
884
941
|
for (let t of Array.from(e.querySelectorAll("img"))) o(t.getAttribute("src")) || t.remove();
|
|
885
942
|
}
|
|
886
|
-
function
|
|
943
|
+
function He(e) {
|
|
887
944
|
let t = window.getSelection();
|
|
888
945
|
if (!t || t.rangeCount === 0) return null;
|
|
889
946
|
let n = t.getRangeAt(0);
|
|
@@ -893,7 +950,7 @@ function De(e) {
|
|
|
893
950
|
let { startContainer: r, startOffset: i } = n;
|
|
894
951
|
return (r.nodeType === Node.TEXT_NODE ? [i === 0 ? r.previousSibling : null, i === (r.textContent?.length ?? 0) ? r.nextSibling : null] : [r.childNodes[i - 1] ?? null, r.childNodes[i] ?? null]).find((e) => e instanceof HTMLImageElement) ?? null;
|
|
895
952
|
}
|
|
896
|
-
function
|
|
953
|
+
function Ue(e, t) {
|
|
897
954
|
let n = document, r = n.caretRangeFromPoint?.(e, t) ?? null;
|
|
898
955
|
if (!r) {
|
|
899
956
|
let i = n.caretPositionFromPoint?.(e, t);
|
|
@@ -904,124 +961,124 @@ function Oe(e, t) {
|
|
|
904
961
|
let i = window.getSelection();
|
|
905
962
|
i?.removeAllRanges(), i?.addRange(r);
|
|
906
963
|
}
|
|
907
|
-
var
|
|
908
|
-
let
|
|
909
|
-
|
|
910
|
-
let
|
|
911
|
-
|
|
964
|
+
var V = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, bodyHeight: c, minHeight: l, maxHeight: u, disabled: d = !1, invalid: p, id: re, onBlur: ae, "aria-label": y, "aria-labelledby": S, "aria-describedby": C, "aria-invalid": ue, showCounts: he = !1, maxLength: w, extraToolbarItems: T, toolbarTrailing: ye, footerSlot: xe, hideSourceToggle: Ce = !1, autoFocus: we = !1, className: Te, onCaretChange: Ee, onEditorKeyDown: De, suggestionPopup: k, strings: ke, images: A }, Ae) {
|
|
965
|
+
let j = t(ne, ke), { ariaInvalid: M } = ee(p, ue), N = _(null), Ie = _(null), [P, Le] = v(null), [Re, F] = v(""), [ze, Be] = v(!1), [I, Ve] = v(!1), L = _(null), [R, V] = v(""), H = _(E(e)), U = _(Ee);
|
|
966
|
+
U.current = Ee;
|
|
967
|
+
let We = m((e) => {
|
|
968
|
+
N.current = e, e && e.innerHTML === "" && (e.innerHTML = D(H.current));
|
|
912
969
|
}, []);
|
|
913
970
|
h(() => {
|
|
914
|
-
let t =
|
|
915
|
-
if (!t ||
|
|
916
|
-
let n =
|
|
917
|
-
|
|
918
|
-
}, [
|
|
919
|
-
|
|
920
|
-
}, [
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
971
|
+
let t = N.current;
|
|
972
|
+
if (!t || ze) return;
|
|
973
|
+
let n = D(e);
|
|
974
|
+
E(z(t)) !== E(n) && (t.innerHTML = n), H.current = E(e);
|
|
975
|
+
}, [ze, e]), h(() => {
|
|
976
|
+
I && (H.current = E(e), V(D(e)));
|
|
977
|
+
}, [I, e]), h(() => {
|
|
978
|
+
we && N.current?.focus();
|
|
979
|
+
}, [we]);
|
|
980
|
+
let W = m(() => {
|
|
981
|
+
let e = N.current, t = E(z(e));
|
|
982
|
+
H.current = t, r(t), U.current?.();
|
|
983
|
+
}, [r]), Ge = _(null);
|
|
984
|
+
Ge.current = {
|
|
926
985
|
insertPlaceholder: (e) => {
|
|
927
|
-
let t =
|
|
986
|
+
let t = N.current;
|
|
928
987
|
if (!t) return;
|
|
929
|
-
let n =
|
|
988
|
+
let n = Ie.current;
|
|
930
989
|
if (n && t.contains(n.commonAncestorContainer) && !t.contains(document.activeElement)) {
|
|
931
990
|
t.focus();
|
|
932
991
|
let e = window.getSelection();
|
|
933
992
|
e?.removeAllRanges(), e?.addRange(n);
|
|
934
993
|
}
|
|
935
|
-
ve(t, `<span ${
|
|
994
|
+
ve(t, `<span ${O}="${e}" contenteditable="false" class="${Oe}"></span>`);
|
|
936
995
|
},
|
|
937
|
-
findPlaceholder: (e) =>
|
|
996
|
+
findPlaceholder: (e) => N.current?.querySelector(`[data-rte-upload="${e}"]`) ?? null,
|
|
938
997
|
resolvePlaceholder: (e, t) => {
|
|
939
|
-
let n =
|
|
998
|
+
let n = N.current?.querySelector(`[${O}="${e}"]`);
|
|
940
999
|
if (!n) return;
|
|
941
1000
|
let r = document.createElement("img");
|
|
942
|
-
r.setAttribute("src", t.src), r.setAttribute("alt", t.alt ?? ""), t.width && r.setAttribute("width", String(t.width)), t.height && r.setAttribute("height", String(t.height)), n.replaceWith(r),
|
|
1001
|
+
r.setAttribute("src", t.src), r.setAttribute("alt", t.alt ?? ""), t.width && r.setAttribute("width", String(t.width)), t.height && r.setAttribute("height", String(t.height)), n.replaceWith(r), W();
|
|
943
1002
|
},
|
|
944
1003
|
removePlaceholder: (e) => {
|
|
945
|
-
|
|
1004
|
+
N.current?.querySelector(`[${O}="${e}"]`)?.remove(), W();
|
|
946
1005
|
}
|
|
947
1006
|
};
|
|
948
|
-
let
|
|
1007
|
+
let G = Me(A, Ge, j.images), K = Pe(A, j.images, G.addFiles, () => {
|
|
949
1008
|
let e = window.getSelection(), t = e && e.rangeCount > 0 ? e.getRangeAt(0) : null;
|
|
950
|
-
|
|
951
|
-
}),
|
|
952
|
-
let e =
|
|
953
|
-
if (!
|
|
1009
|
+
Ie.current = t && N.current?.contains(t.commonAncestorContainer) ? t.cloneRange() : null;
|
|
1010
|
+
}), q = g(() => K.item ? [K.item, ...T ?? []] : T, [T, K.item]), J = m(() => {
|
|
1011
|
+
let e = N.current;
|
|
1012
|
+
if (!A || !e) return;
|
|
954
1013
|
let t = window.getSelection();
|
|
955
1014
|
if (t && t.rangeCount > 0 && !e.contains(t.getRangeAt(0).commonAncestorContainer)) return;
|
|
956
|
-
let n =
|
|
957
|
-
|
|
958
|
-
}, [
|
|
1015
|
+
let n = He(e);
|
|
1016
|
+
Le(n), F(n?.getAttribute("alt") ?? "");
|
|
1017
|
+
}, [A]);
|
|
959
1018
|
h(() => {
|
|
960
|
-
if (
|
|
961
|
-
}, [
|
|
962
|
-
let
|
|
963
|
-
let e =
|
|
964
|
-
|
|
1019
|
+
if (A && typeof document < "u") return document.addEventListener("selectionchange", J), () => document.removeEventListener("selectionchange", J);
|
|
1020
|
+
}, [A, J]);
|
|
1021
|
+
let Y = m(() => {
|
|
1022
|
+
let e = N.current;
|
|
1023
|
+
A && e && (B(e), G.prune(), P && !P.isConnected && Le(null)), W();
|
|
965
1024
|
}, [
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1025
|
+
P,
|
|
1026
|
+
W,
|
|
1027
|
+
A,
|
|
1028
|
+
G
|
|
970
1029
|
]);
|
|
971
|
-
|
|
972
|
-
focus: () =>
|
|
973
|
-
getHTML: () =>
|
|
1030
|
+
ie(Ae, () => ({
|
|
1031
|
+
focus: () => (L.current ?? N.current)?.focus(),
|
|
1032
|
+
getHTML: () => E(z(N.current)),
|
|
974
1033
|
setHTML: (e) => {
|
|
975
|
-
let t =
|
|
976
|
-
|
|
1034
|
+
let t = E(e);
|
|
1035
|
+
H.current = t, N.current && (N.current.innerHTML = D(t)), r(t);
|
|
977
1036
|
},
|
|
978
1037
|
insertHTML: (e) => {
|
|
979
|
-
ve(
|
|
1038
|
+
ve(N.current, e), W();
|
|
980
1039
|
},
|
|
981
|
-
isEmpty: () =>
|
|
1040
|
+
isEmpty: () => E(z(N.current)) === "",
|
|
982
1041
|
clear: () => {
|
|
983
|
-
|
|
1042
|
+
H.current = "", N.current && (N.current.innerHTML = "<p></p>"), r("");
|
|
984
1043
|
},
|
|
985
1044
|
getCaretContext: () => ge(),
|
|
986
1045
|
replaceBeforeCaret: (e, t) => {
|
|
987
|
-
_e(null, e, t, () =>
|
|
1046
|
+
_e(null, e, t, () => W());
|
|
988
1047
|
}
|
|
989
|
-
}), [
|
|
990
|
-
let
|
|
1048
|
+
}), [W, r]);
|
|
1049
|
+
let Ke = f.bodyMinHeight[c ?? (o ? "control" : "document")], qe = g(() => ({
|
|
991
1050
|
...l ? { minHeight: l } : {},
|
|
992
1051
|
...u ? {
|
|
993
1052
|
maxHeight: u,
|
|
994
1053
|
overflowY: "auto"
|
|
995
1054
|
} : {}
|
|
996
|
-
}), [u, l]),
|
|
997
|
-
if (
|
|
998
|
-
let e =
|
|
999
|
-
|
|
1055
|
+
}), [u, l]), X = m(() => {
|
|
1056
|
+
if (I) {
|
|
1057
|
+
let e = document.createElement("template");
|
|
1058
|
+
e.innerHTML = s(R, { images: !!A });
|
|
1059
|
+
let t = E(e.innerHTML);
|
|
1060
|
+
t !== H.current && (H.current = t, r(t)), Ve(!1);
|
|
1000
1061
|
return;
|
|
1001
1062
|
}
|
|
1002
|
-
|
|
1063
|
+
V(N.current?.innerHTML ?? D(e)), Ve(!0);
|
|
1003
1064
|
}, [
|
|
1065
|
+
A,
|
|
1004
1066
|
r,
|
|
1005
|
-
|
|
1006
|
-
|
|
1067
|
+
I,
|
|
1068
|
+
R,
|
|
1007
1069
|
e
|
|
1008
|
-
]),
|
|
1009
|
-
let t = e.target.value;
|
|
1010
|
-
H(t);
|
|
1011
|
-
let n = D(t);
|
|
1012
|
-
U.current = n, r(n);
|
|
1013
|
-
}, [r]), Ne = typeof a == "string" ? a : "", Pe = D(U.current) === "" && J.uploads.length === 0, Fe = Ne.length > 0 && !L && Pe ? /* @__PURE__ */ b(i, {
|
|
1070
|
+
]), Z = typeof a == "string" ? a : "", Je = E(H.current) === "" && G.uploads.length === 0, Q = Z.length > 0 && !ze && Je ? /* @__PURE__ */ b(i, {
|
|
1014
1071
|
tag: "span",
|
|
1015
1072
|
size: "sm",
|
|
1016
1073
|
type: "secondary",
|
|
1017
|
-
className:
|
|
1018
|
-
children:
|
|
1019
|
-
}) : null,
|
|
1074
|
+
className: f.placeholder,
|
|
1075
|
+
children: Z
|
|
1076
|
+
}) : null, Ye = g(() => [
|
|
1020
1077
|
{
|
|
1021
1078
|
id: "bold",
|
|
1022
1079
|
toggle: !0,
|
|
1023
|
-
icon:
|
|
1024
|
-
label:
|
|
1080
|
+
icon: oe,
|
|
1081
|
+
label: j.toolbar.bold,
|
|
1025
1082
|
isActive: () => !1,
|
|
1026
1083
|
run: () => void 0,
|
|
1027
1084
|
disabled: !0
|
|
@@ -1029,8 +1086,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
|
|
|
1029
1086
|
{
|
|
1030
1087
|
id: "italic",
|
|
1031
1088
|
toggle: !0,
|
|
1032
|
-
icon:
|
|
1033
|
-
label:
|
|
1089
|
+
icon: se,
|
|
1090
|
+
label: j.toolbar.italic,
|
|
1034
1091
|
isActive: () => !1,
|
|
1035
1092
|
run: () => void 0,
|
|
1036
1093
|
disabled: !0
|
|
@@ -1038,8 +1095,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
|
|
|
1038
1095
|
{
|
|
1039
1096
|
id: "strike",
|
|
1040
1097
|
toggle: !0,
|
|
1041
|
-
icon:
|
|
1042
|
-
label:
|
|
1098
|
+
icon: pe,
|
|
1099
|
+
label: j.toolbar.strike,
|
|
1043
1100
|
isActive: () => !1,
|
|
1044
1101
|
run: () => void 0,
|
|
1045
1102
|
disabled: !0
|
|
@@ -1047,8 +1104,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
|
|
|
1047
1104
|
{
|
|
1048
1105
|
id: "bullet-list",
|
|
1049
1106
|
toggle: !0,
|
|
1050
|
-
icon:
|
|
1051
|
-
label:
|
|
1107
|
+
icon: ce,
|
|
1108
|
+
label: j.toolbar.bulletList,
|
|
1052
1109
|
isActive: () => !1,
|
|
1053
1110
|
run: () => void 0,
|
|
1054
1111
|
disabled: !0
|
|
@@ -1056,8 +1113,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
|
|
|
1056
1113
|
{
|
|
1057
1114
|
id: "ordered-list",
|
|
1058
1115
|
toggle: !0,
|
|
1059
|
-
icon:
|
|
1060
|
-
label:
|
|
1116
|
+
icon: le,
|
|
1117
|
+
label: j.toolbar.orderedList,
|
|
1061
1118
|
isActive: () => !1,
|
|
1062
1119
|
run: () => void 0,
|
|
1063
1120
|
disabled: !0
|
|
@@ -1065,132 +1122,152 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
|
|
|
1065
1122
|
{
|
|
1066
1123
|
id: "blockquote",
|
|
1067
1124
|
toggle: !0,
|
|
1068
|
-
icon:
|
|
1069
|
-
label:
|
|
1125
|
+
icon: de,
|
|
1126
|
+
label: j.toolbar.blockquote,
|
|
1070
1127
|
isActive: () => !1,
|
|
1071
1128
|
run: () => void 0,
|
|
1072
1129
|
disabled: !0
|
|
1073
1130
|
},
|
|
1074
1131
|
{
|
|
1075
1132
|
id: "undo",
|
|
1076
|
-
icon:
|
|
1077
|
-
label:
|
|
1133
|
+
icon: me,
|
|
1134
|
+
label: j.toolbar.undo,
|
|
1078
1135
|
isActive: () => !1,
|
|
1079
1136
|
run: () => void 0,
|
|
1080
1137
|
disabled: !0
|
|
1081
1138
|
},
|
|
1082
1139
|
{
|
|
1083
1140
|
id: "redo",
|
|
1084
|
-
icon:
|
|
1085
|
-
label:
|
|
1141
|
+
icon: fe,
|
|
1142
|
+
label: j.toolbar.redo,
|
|
1086
1143
|
isActive: () => !1,
|
|
1087
1144
|
run: () => void 0,
|
|
1088
1145
|
disabled: !0
|
|
1089
1146
|
}
|
|
1090
|
-
], [
|
|
1091
|
-
text:
|
|
1092
|
-
maxLength:
|
|
1093
|
-
strings:
|
|
1147
|
+
], [j]), Xe = I ? R.replace(/<[^>]*>/g, "") : N.current?.innerText ?? E(e).replace(/<[^>]*>/g, ""), Ze = he ? /* @__PURE__ */ b(be, {
|
|
1148
|
+
text: Xe,
|
|
1149
|
+
maxLength: w,
|
|
1150
|
+
strings: j
|
|
1094
1151
|
}) : null;
|
|
1095
1152
|
return /* @__PURE__ */ x("div", {
|
|
1096
|
-
|
|
1153
|
+
onBlur: ae && ((e) => {
|
|
1154
|
+
e.currentTarget.contains(e.relatedTarget) || ae(e);
|
|
1155
|
+
}),
|
|
1156
|
+
className: n(f.frame, d && f.disabled, Te),
|
|
1097
1157
|
children: [
|
|
1098
|
-
/* @__PURE__ */ b(
|
|
1099
|
-
buttons:
|
|
1100
|
-
extraToolbarItems:
|
|
1101
|
-
hideSourceToggle:
|
|
1102
|
-
sourceMode:
|
|
1103
|
-
toggleSourceMode:
|
|
1158
|
+
/* @__PURE__ */ b(te, {
|
|
1159
|
+
buttons: Ye,
|
|
1160
|
+
extraToolbarItems: q,
|
|
1161
|
+
hideSourceToggle: Ce,
|
|
1162
|
+
sourceMode: I,
|
|
1163
|
+
toggleSourceMode: X,
|
|
1104
1164
|
disabled: d,
|
|
1105
1165
|
hasEditor: !0,
|
|
1106
|
-
toolbarTrailing:
|
|
1107
|
-
strings:
|
|
1166
|
+
toolbarTrailing: ye,
|
|
1167
|
+
strings: j
|
|
1108
1168
|
}),
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1169
|
+
I ? /* @__PURE__ */ b("textarea", {
|
|
1170
|
+
ref: L,
|
|
1171
|
+
id: re,
|
|
1172
|
+
"data-slot": "editor-field",
|
|
1173
|
+
"aria-label": y ?? j.sourceLabel,
|
|
1174
|
+
"aria-labelledby": S,
|
|
1175
|
+
"aria-describedby": C,
|
|
1176
|
+
"aria-invalid": M,
|
|
1177
|
+
value: R,
|
|
1178
|
+
onChange: (e) => V(e.target.value),
|
|
1113
1179
|
disabled: d,
|
|
1114
1180
|
spellCheck: !1,
|
|
1115
|
-
className: n(f.source,
|
|
1116
|
-
style:
|
|
1181
|
+
className: n(f.source, Ke, d && "cursor-not-allowed"),
|
|
1182
|
+
style: qe
|
|
1117
1183
|
}) : /* @__PURE__ */ x("div", {
|
|
1118
|
-
className: n("relative",
|
|
1119
|
-
style:
|
|
1120
|
-
children: [
|
|
1121
|
-
ref:
|
|
1122
|
-
|
|
1123
|
-
"
|
|
1124
|
-
|
|
1184
|
+
className: n("relative", Ke),
|
|
1185
|
+
style: qe,
|
|
1186
|
+
children: [Q, /* @__PURE__ */ b("div", {
|
|
1187
|
+
ref: We,
|
|
1188
|
+
id: re,
|
|
1189
|
+
"data-slot": "editor-field",
|
|
1190
|
+
...Se(y ?? j.editorLabel, k?.listboxId, k?.activeOptionId),
|
|
1191
|
+
"aria-labelledby": S,
|
|
1192
|
+
"aria-describedby": C,
|
|
1193
|
+
"aria-invalid": M,
|
|
1125
1194
|
contentEditable: !d,
|
|
1126
1195
|
suppressContentEditableWarning: !0,
|
|
1127
|
-
onInput:
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1196
|
+
onInput: Y,
|
|
1197
|
+
onKeyDown: De && !d ? (e) => {
|
|
1198
|
+
De(e.nativeEvent) && (e.preventDefault(), e.stopPropagation());
|
|
1199
|
+
} : void 0,
|
|
1200
|
+
onKeyUp: () => U.current?.(),
|
|
1201
|
+
onMouseUp: () => U.current?.(),
|
|
1202
|
+
onClick: A ? (e) => {
|
|
1131
1203
|
if (!(e.target instanceof HTMLImageElement)) return;
|
|
1132
1204
|
let t = document.createRange();
|
|
1133
1205
|
t.selectNode(e.target);
|
|
1134
1206
|
let n = window.getSelection();
|
|
1135
1207
|
n?.removeAllRanges(), n?.addRange(t);
|
|
1136
1208
|
} : void 0,
|
|
1137
|
-
onPaste:
|
|
1138
|
-
let t =
|
|
1139
|
-
t.length !== 0 && (e.preventDefault(),
|
|
1209
|
+
onPaste: A ? (e) => {
|
|
1210
|
+
let t = je(e.clipboardData);
|
|
1211
|
+
t.length !== 0 && (e.preventDefault(), G.addFiles(t));
|
|
1140
1212
|
} : void 0,
|
|
1141
|
-
onDragOver:
|
|
1213
|
+
onDragOver: A ? (e) => {
|
|
1142
1214
|
Array.from(e.dataTransfer.types).includes("Files") && e.preventDefault();
|
|
1143
1215
|
} : void 0,
|
|
1144
|
-
onDrop:
|
|
1145
|
-
let t =
|
|
1146
|
-
t.length !== 0 && (e.preventDefault(),
|
|
1216
|
+
onDrop: A ? (e) => {
|
|
1217
|
+
let t = je(e.dataTransfer);
|
|
1218
|
+
t.length !== 0 && (e.preventDefault(), N.current?.focus(), Ue(e.clientX, e.clientY), G.addFiles(t));
|
|
1147
1219
|
} : void 0,
|
|
1148
|
-
onFocus: () =>
|
|
1149
|
-
onBlur: () =>
|
|
1150
|
-
className: n(
|
|
1220
|
+
onFocus: () => Be(!0),
|
|
1221
|
+
onBlur: () => Be(!1),
|
|
1222
|
+
className: n(f.editable, "h-full min-h-full", d && "cursor-not-allowed")
|
|
1151
1223
|
})]
|
|
1152
1224
|
}),
|
|
1153
|
-
!!
|
|
1154
|
-
alt:
|
|
1225
|
+
!!A && /* @__PURE__ */ b(Fe, {
|
|
1226
|
+
alt: P ? Re : null,
|
|
1155
1227
|
onAltChange: (e) => {
|
|
1156
|
-
|
|
1228
|
+
F(e), P?.setAttribute("alt", e), W();
|
|
1157
1229
|
},
|
|
1158
1230
|
onRemove: () => {
|
|
1159
|
-
|
|
1231
|
+
P?.remove(), Le(null), W(), N.current?.focus();
|
|
1160
1232
|
},
|
|
1161
|
-
notice:
|
|
1162
|
-
onDismissNotice:
|
|
1163
|
-
strings:
|
|
1233
|
+
notice: G.notice,
|
|
1234
|
+
onDismissNotice: G.dismissNotice,
|
|
1235
|
+
strings: j.images
|
|
1164
1236
|
}),
|
|
1165
|
-
!!
|
|
1166
|
-
className: "
|
|
1167
|
-
children:
|
|
1237
|
+
!!xe && /* @__PURE__ */ b("div", {
|
|
1238
|
+
className: n(f.regionX, "pb-space-md pt-space-xs"),
|
|
1239
|
+
children: xe
|
|
1168
1240
|
}),
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
/* @__PURE__ */ b(
|
|
1172
|
-
queue:
|
|
1173
|
-
adapterRef:
|
|
1174
|
-
strings:
|
|
1241
|
+
Ze,
|
|
1242
|
+
K.input,
|
|
1243
|
+
/* @__PURE__ */ b(Ne, {
|
|
1244
|
+
queue: G,
|
|
1245
|
+
adapterRef: Ge,
|
|
1246
|
+
strings: j.images
|
|
1175
1247
|
})
|
|
1176
1248
|
]
|
|
1177
1249
|
});
|
|
1178
1250
|
});
|
|
1179
|
-
|
|
1251
|
+
V.displayName = "FallbackRichTextEditor";
|
|
1180
1252
|
//#endregion
|
|
1181
1253
|
//#region src/components/features/rich-text-editor/rich-text-editor.tsx
|
|
1182
|
-
var
|
|
1183
|
-
return
|
|
1184
|
-
...
|
|
1185
|
-
ref:
|
|
1186
|
-
}) : /* @__PURE__ */ b(
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
})
|
|
1254
|
+
var H = p(function({ name: e, ...t }, r) {
|
|
1255
|
+
return /* @__PURE__ */ x(y, { children: [R ? /* @__PURE__ */ b(L, {
|
|
1256
|
+
...t,
|
|
1257
|
+
ref: r
|
|
1258
|
+
}) : /* @__PURE__ */ b(V, {
|
|
1259
|
+
...t,
|
|
1260
|
+
ref: r,
|
|
1261
|
+
className: n("rich-text-editor--component", t.className)
|
|
1262
|
+
}), e && /* @__PURE__ */ b("input", {
|
|
1263
|
+
type: "hidden",
|
|
1264
|
+
name: e,
|
|
1265
|
+
value: t.value,
|
|
1266
|
+
disabled: t.disabled
|
|
1267
|
+
})] });
|
|
1191
1268
|
});
|
|
1192
|
-
|
|
1269
|
+
H.displayName = "RichTextEditor";
|
|
1193
1270
|
//#endregion
|
|
1194
|
-
export {
|
|
1271
|
+
export { be as n, H as t };
|
|
1195
1272
|
|
|
1196
|
-
//# sourceMappingURL=rich-text-editor-
|
|
1273
|
+
//# sourceMappingURL=rich-text-editor-CAurDwT5.js.map
|