themelia-react-ui 2.0.5 → 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 +76 -0
- package/MIGRATION.md +119 -0
- package/README.md +13 -6
- package/dist/{accordion-B9MHG0cT.js → accordion-0tQUZ20r.js} +7 -7
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-Dr8K-ghE.js → action-menu-C0gjzLyE.js} +7 -7
- package/dist/{action-menu-Dr8K-ghE.js.map → action-menu-C0gjzLyE.js.map} +1 -1
- package/dist/{ai-artifact-C58tQcBy.js → ai-artifact-CGGpQryR.js} +172 -157
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/{app-shell-B_IuNWOo.js → app-shell-EHuuRDGy.js} +5 -5
- package/dist/{app-shell-B_IuNWOo.js.map → app-shell-EHuuRDGy.js.map} +1 -1
- package/dist/{attachment-Dg_69lPS.js → attachment-BCpA4e7i.js} +8 -8
- package/dist/{attachment-Dg_69lPS.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-DTkkshS8.js → auth-B0girIk_.js} +15 -15
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-CeZaFmNH.js → avatar-B9Jnp-T-.js} +3 -3
- package/dist/{avatar-CeZaFmNH.js.map → avatar-B9Jnp-T-.js.map} +1 -1
- package/dist/{badge-xIiV_E7f.js → badge-wWauMgAt.js} +3 -3
- package/dist/{badge-xIiV_E7f.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 +1 -1
- 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 +1 -1
- 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 +8 -8
- 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 +6 -6
- 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 +195 -188
- 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 +7 -7
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +5 -5
- 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 +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-Cb8cuvyy.js → batch-action-bar-BoqWIIpV.js} +5 -5
- package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-BoqWIIpV.js.map} +1 -1
- package/dist/blocks/admin.js +17 -17
- package/dist/blocks/ai.js +227 -221
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +424 -449
- 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 +225 -220
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-J-K2kl4c.js → breadcrumbs-Bp9Ke7kd.js} +4 -4
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-S2Cubiiz.js → button-ChBovTx0.js} +2 -2
- package/dist/{button-S2Cubiiz.js.map → button-ChBovTx0.js.map} +1 -1
- package/dist/{buttons-BedGfygC.js → buttons-DeW0bQeK.js} +6 -6
- package/dist/{buttons-BedGfygC.js.map → buttons-DeW0bQeK.js.map} +1 -1
- package/dist/{cards-rNX1M4Xn.js → cards-CNXnmvV5.js} +8 -8
- package/dist/{cards-rNX1M4Xn.js.map → cards-CNXnmvV5.js.map} +1 -1
- package/dist/{cascader-B1MiqkBq.js → cascader-CrAl9zD5.js} +15 -15
- package/dist/{cascader-B1MiqkBq.js.map → cascader-CrAl9zD5.js.map} +1 -1
- package/dist/{chart-Darg_0Kv.js → chart-I7ROnsl8.js} +5 -5
- package/dist/{chart-Darg_0Kv.js.map → chart-I7ROnsl8.js.map} +1 -1
- package/dist/{checkbox-fflqmODR.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-fflqmODR.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-DHGtx0QV.js} +122 -110
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-BzmM9Eig.js → code-block-BSJyq9e-.js} +7 -7
- package/dist/{code-block-BzmM9Eig.js.map → code-block-BSJyq9e-.js.map} +1 -1
- package/dist/{collapsible-BkAI_XD4.js → collapsible-BzJ91LUG.js} +3 -3
- package/dist/{collapsible-BkAI_XD4.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-gDh1v6O4.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-gDh1v6O4.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/{combobox-BEx0vJgF.js → combobox-Bcvu5J8O.js} +11 -10
- package/dist/{combobox-BEx0vJgF.js.map → combobox-Bcvu5J8O.js.map} +1 -1
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-CrlPIL6m.js → command-9e52NPgK.js} +6 -6
- package/dist/{command-CrlPIL6m.js.map → command-9e52NPgK.js.map} +1 -1
- package/dist/{comments-Dmpp0YIc.js → comments-BsgErEqd.js} +33 -28
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
- 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/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/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-numeric/coordinates-input.d.ts +4 -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/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sidebar/sidebar.d.ts +2 -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-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 +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -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/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +18 -11
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- 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/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/filters.types.d.ts +3 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/utils/filter-utils.d.ts +5 -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 +6 -0
- package/dist/components/features/media-library/media-library.types.d.ts +36 -8
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- 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/products.types.d.ts +2 -2
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +1 -1
- package/dist/components/features/resource/resource.types.d.ts +2 -0
- 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/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
- 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/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 +17 -1
- package/dist/components/layout/header/header.types.d.ts +3 -2
- package/dist/components/layout/layout.types.d.ts +5 -3
- 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/settings/settings.d.ts +1 -1
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +3 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.types.d.ts +2 -0
- 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/{containers-CIxwbZt5.js → containers-CSdc32h9.js} +2 -2
- package/dist/{containers-CIxwbZt5.js.map → containers-CSdc32h9.js.map} +1 -1
- package/dist/{copyable-DIznBqiT.js → copyable-3fdHfMR3.js} +4 -4
- package/dist/{copyable-DIznBqiT.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-BdgCAw8T.js → data-display-Cmj-xZYl.js} +16 -15
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Cq8ioE4o.js → date-Br0FicVv.js} +4 -4
- package/dist/{date-Cq8ioE4o.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-KsZLw9Ov.js → display-CT_N2a3w.js} +7 -7
- package/dist/{display-KsZLw9Ov.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-C08iIugv.js} +6 -6
- package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-C08iIugv.js.map} +1 -1
- package/dist/features/activities.js +283 -270
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +40 -27
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +126 -126
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +24 -19
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +129 -125
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +16 -20
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +18 -28
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +331 -314
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1044 -866
- 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 +978 -964
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +159 -152
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +74 -71
- 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 +400 -399
- 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-DWcNcOjh.js → field-affordance-recipes-D6H7tVJi.js} +2 -2
- package/dist/{field-affordance-recipes-DWcNcOjh.js.map → field-affordance-recipes-D6H7tVJi.js.map} +1 -1
- 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-DzgSJpMK.js → filters-Dl80yYtN.js} +763 -605
- 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-Bs2qFUeE.js → form-sizing-CgcrUbLU.js} +2 -2
- package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-CgcrUbLU.js.map} +1 -1
- package/dist/{forms-C0RGnJTe.js → forms-B3W8CH7-.js} +8 -8
- package/dist/{forms-C0RGnJTe.js.map → forms-B3W8CH7-.js.map} +1 -1
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-DMMxG__r.js → header-ZIIsRKxP.js} +113 -113
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-DB6CJ4MR.js → hooks-BitHSh-Y.js} +3 -3
- package/dist/{hooks-DB6CJ4MR.js.map → hooks-BitHSh-Y.js.map} +1 -1
- package/dist/{icon-badge-DZF-YjQp.js → icon-badge-npxF1SLX.js} +2 -2
- package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{input-CvyDQlY7.js → input-7KAc7XQL.js} +6 -6
- package/dist/{input-CvyDQlY7.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/{input-DMBwAZmr.js → input-DIREVYHs.js} +3 -3
- package/dist/{input-DMBwAZmr.js.map → input-DIREVYHs.js.map} +1 -1
- 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-DjCcM18E.js → item-FfWnaYST.js} +99 -98
- 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 +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- 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/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +6 -6
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-C-vChPmE.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-C-vChPmE.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-0_4nWuI-.js → mentions-qOnedSt4.js} +236 -167
- 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-C3MkU-Om.js → metadata-list-XkqZ_UXH.js} +11 -11
- package/dist/{metadata-list-C3MkU-Om.js.map → metadata-list-XkqZ_UXH.js.map} +1 -1
- package/dist/{navigation-DaRjthVk.js → navigation-BgtPJAhi.js} +119 -119
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/{navigation-C90-oQFq.js → navigation-Bt-v7rWP.js} +52 -46
- package/dist/navigation-Bt-v7rWP.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-CRU3kGuk.js → number-CYqBcrSj.js} +78 -86
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-BQCA2Zn2.js} +7 -7
- package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-BQCA2Zn2.js.map} +1 -1
- package/dist/{overlays-BSgCtM2v.js → overlays-CC8zI3Du.js} +264 -260
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/{page-DUUKDAjo.js → page-BoQ1VaFJ.js} +13 -13
- package/dist/{page-DUUKDAjo.js.map → page-BoQ1VaFJ.js.map} +1 -1
- package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-DIKspJfx.js} +4 -4
- package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-DIKspJfx.js.map} +1 -1
- package/dist/{pagination-CgCjElfu.js → pagination-Br8TdV9A.js} +4 -4
- package/dist/{pagination-CgCjElfu.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/{popover-B85RenIl.js → popover-k8TdUcAt.js} +10 -10
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-DJ0AkUan.js} +2 -2
- package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-DJ0AkUan.js.map} +1 -1
- package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-DyUXqUtD.js} +2 -2
- package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-DyUXqUtD.js.map} +1 -1
- package/dist/{primitives-ByWgGUgt.js → primitives-BkkQjYl7.js} +22 -17
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BJhQP9WX.js → progress-DZFXXzPs.js} +4 -4
- package/dist/{progress-BJhQP9WX.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-tOc7B3hw.js → receipt-C7LhOg7Q.js} +6 -6
- package/dist/{receipt-tOc7B3hw.js.map → receipt-C7LhOg7Q.js.map} +1 -1
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/rich-text-editor-CAurDwT5.js +1273 -0
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-laT3tpBT.js → rich-text-editor-toolbar-DbXig7Jk.js} +36 -35
- 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-B0dB2cBi.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-Bb17I4pu.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-Bb17I4pu.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-Ct_WSWTJ.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-Ct_WSWTJ.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-BGPERY55.js → sheet-C4DHsgLk.js} +6 -6
- package/dist/{sheet-BGPERY55.js.map → sheet-C4DHsgLk.js.map} +1 -1
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/{sidebar-f9gRWXIR.js → sidebar-CmD6a-HK.js} +16 -13
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/{skeleton-BapcJd9C.js → skeleton-DDgdhmu9.js} +5 -5
- package/dist/{skeleton-BapcJd9C.js.map → skeleton-DDgdhmu9.js.map} +1 -1
- package/dist/{smart-card-CW0hjetE.js → smart-card-B6vLxqa_.js} +8 -8
- package/dist/{smart-card-CW0hjetE.js.map → smart-card-B6vLxqa_.js.map} +1 -1
- package/dist/{structure-DuxKl954.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-DuxKl954.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-CFOWY9pQ.js → table-CBonSdTp.js} +534 -486
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-B4TE7iOV.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/{tabs-e7ko9S2o.js → tabs-C4Kr_hCr.js} +50 -49
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-B1culiSK.js → text-inputs-jdkS3ReG.js} +9 -9
- package/dist/{text-inputs-B1culiSK.js.map → text-inputs-jdkS3ReG.js.map} +1 -1
- package/dist/{timelines-D3Sl9ueq.js → timelines-CoPwdJP0.js} +10 -10
- package/dist/{timelines-D3Sl9ueq.js.map → timelines-CoPwdJP0.js.map} +1 -1
- package/dist/{tooltip-8wz5S_Zr.js → tooltip-31NwIpTo.js} +4 -4
- package/dist/{tooltip-8wz5S_Zr.js.map → tooltip-31NwIpTo.js.map} +1 -1
- package/dist/{tree-CzUJHnFs.js → tree-CeYVzdFE.js} +6 -6
- package/dist/{tree-CzUJHnFs.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-BQnine1k.js → typography-C7-YMW1S.js} +2 -2
- package/dist/{typography-BQnine1k.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/{upload-BOW6U2tI.js → upload-Hdm5gObf.js} +303 -291
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-qUXn1ykN.js → upload-queue-D0sYPuqo.js} +8 -8
- package/dist/{upload-queue-qUXn1ykN.js.map → upload-queue-D0sYPuqo.js.map} +1 -1
- package/dist/{usage-card-BeSLY0i0.js → usage-card-9s8hLDfn.js} +9 -9
- package/dist/{usage-card-BeSLY0i0.js.map → usage-card-9s8hLDfn.js.map} +1 -1
- package/dist/{utils-B6kKb8jB.js → utils-DhuoqFy4.js} +31 -37
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/{value-inputs-skdVB2zh.js → value-inputs-D3aPgq9H.js} +15 -15
- package/dist/{value-inputs-skdVB2zh.js.map → value-inputs-D3aPgq9H.js.map} +1 -1
- package/dist/{value-typography-uAmWUAL1.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-DHeHv0qw.js → workspace-CC8Vchiu.js} +12 -12
- package/dist/{workspace-DHeHv0qw.js.map → workspace-CC8Vchiu.js.map} +1 -1
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/references/agents-md.md +19 -19
- package/docs/consumer-skill/references/analytics.md +15 -0
- package/docs/consumer-skill/references/component-contracts.json +14724 -13057
- package/docs/consumer-skill/references/composition.md +21 -4
- package/docs/consumer-skill/references/design-contract.md +1 -0
- package/docs/consumer-skill/references/installation.md +51 -8
- package/docs/consumer-skill/references/integration.md +24 -1
- package/docs/consumer-skill/references/public-api.json +172 -34
- package/docs/consumer-skill/references/review.md +51 -11
- package/docs/consumer-skill/references/rhf-workflows.md +72 -0
- package/docs/consumer-skill/references/theming.md +7 -2
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +144 -30
- package/docs/consumer-skill/scripts/setup-skills.mjs +46 -9
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-B9MHG0cT.js.map +0 -1
- package/dist/ai-artifact-C58tQcBy.js.map +0 -1
- package/dist/auth-DTkkshS8.js.map +0 -1
- package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
- package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
- package/dist/combobox-BwzoXFSG.js +0 -884
- package/dist/combobox-BwzoXFSG.js.map +0 -1
- package/dist/comments-Dmpp0YIc.js.map +0 -1
- package/dist/data-display-BdgCAw8T.js.map +0 -1
- package/dist/date-picker-RlIzKom_.js +0 -1551
- package/dist/date-picker-RlIzKom_.js.map +0 -1
- package/dist/date-pickers-DY-CpXS1.js +0 -179
- package/dist/date-pickers-DY-CpXS1.js.map +0 -1
- package/dist/feedback-Dm4izqFn.js +0 -240
- package/dist/feedback-Dm4izqFn.js.map +0 -1
- package/dist/filters-DzgSJpMK.js.map +0 -1
- package/dist/form-field-BriWAXyg.js +0 -63
- package/dist/form-field-BriWAXyg.js.map +0 -1
- package/dist/forms-numeric-DIhghX1Q.js +0 -910
- package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
- package/dist/header-DMMxG__r.js.map +0 -1
- package/dist/item-DjCcM18E.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-0_4nWuI-.js.map +0 -1
- package/dist/message-g8p7eVtN.js +0 -128
- package/dist/message-g8p7eVtN.js.map +0 -1
- package/dist/navigation-C90-oQFq.js.map +0 -1
- package/dist/navigation-DaRjthVk.js.map +0 -1
- package/dist/number-CRU3kGuk.js.map +0 -1
- package/dist/overlays-BSgCtM2v.js.map +0 -1
- package/dist/popover-B85RenIl.js.map +0 -1
- package/dist/primitives-ByWgGUgt.js.map +0 -1
- package/dist/rich-text-Dth5E882.js +0 -78
- package/dist/rich-text-Dth5E882.js.map +0 -1
- package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
- package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
- package/dist/rich-text-editor-toolbar-laT3tpBT.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-Bar5wiSo.js +0 -167
- package/dist/settings-Bar5wiSo.js.map +0 -1
- package/dist/sidebar-D-JYMMbY.js +0 -686
- package/dist/sidebar-D-JYMMbY.js.map +0 -1
- package/dist/sidebar-f9gRWXIR.js.map +0 -1
- package/dist/table-B4TE7iOV.js.map +0 -1
- package/dist/table-CFOWY9pQ.js.map +0 -1
- package/dist/tabs-e7ko9S2o.js.map +0 -1
- package/dist/upload-BOW6U2tI.js.map +0 -1
- package/dist/utils-B6kKb8jB.js.map +0 -1
- package/dist/value-typography-uAmWUAL1.js.map +0 -1
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStrings as e } from "./lib/strings.js";
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import { n } from "./buttons-
|
|
5
|
-
import { c as r, o as i, t as a } from "./typography-
|
|
3
|
+
import { t } from "./utils-DhuoqFy4.js";
|
|
4
|
+
import { n } from "./buttons-DeW0bQeK.js";
|
|
5
|
+
import { c as r, o as i, t as a } from "./typography-C7-YMW1S.js";
|
|
6
6
|
import { t as o } from "./focus-recipes-B653VaLq.js";
|
|
7
|
-
import { t as s } from "./structure-
|
|
8
|
-
import { a as c } from "./surface-recipes-
|
|
9
|
-
import { i as l, n as u, r as d, t as f } from "./popover.recipes-
|
|
10
|
-
import { t as p } from "./interaction-recipes-
|
|
11
|
-
import {
|
|
7
|
+
import { t as s } from "./structure-DZJ2wbAU.js";
|
|
8
|
+
import { a as c } from "./surface-recipes-C8mNycaY.js";
|
|
9
|
+
import { i as l, n as u, r as d, t as f } from "./popover.recipes-DJ0AkUan.js";
|
|
10
|
+
import { t as p } from "./interaction-recipes-4wZ2tvfb.js";
|
|
11
|
+
import { n as m } from "./sanitize-html-BWkH4dLM.js";
|
|
12
12
|
import { t as h } from "./content-typography-CnwgMJ37.js";
|
|
13
|
-
import { t as g } from "./
|
|
14
|
-
import {
|
|
15
|
-
import { i as
|
|
16
|
-
import { t as T } from "./
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
13
|
+
import { t as g } from "./rich-text-tree-BqyQ_7-R.js";
|
|
14
|
+
import { t as _ } from "./badge-wWauMgAt.js";
|
|
15
|
+
import { a as v, i as y, n as b, o as x, r as S, t as C } from "./command-9e52NPgK.js";
|
|
16
|
+
import { i as w, t as T } from "./popover-k8TdUcAt.js";
|
|
17
|
+
import { t as E } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
18
|
+
import { useCallback as D, useEffect as O, useId as k, useMemo as A, useRef as j, useState as M } from "react";
|
|
19
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
20
|
+
import { Loader2 as I } from "lucide-react";
|
|
21
|
+
import { fromHtml as L } from "hast-util-from-html";
|
|
20
22
|
//#region src/components/features/mentions/hooks/use-mentions-search.ts
|
|
21
|
-
function
|
|
23
|
+
function R(e) {
|
|
22
24
|
return !!(e && e.name === "AbortError");
|
|
23
25
|
}
|
|
24
|
-
function
|
|
25
|
-
let { resources: t, onResourceSearch: n, initialMentions: r, debounceMs: i = 300, onError: a } = e, o = JSON.stringify(Object.keys(t ?? {})), s =
|
|
26
|
-
P.current = t, F.current = n,
|
|
26
|
+
function z(e = {}) {
|
|
27
|
+
let { resources: t, onResourceSearch: n, initialMentions: r, debounceMs: i = 300, onError: a } = e, o = JSON.stringify(Object.keys(t ?? {})), s = A(() => JSON.parse(o), [o]), [c, l] = M(() => s[0] ?? null), [u, d] = M(!1), [f, p] = M(""), [m, h] = M({}), [g, _] = M(!1), [v, y] = M(null), [b, x] = M({}), [S, C] = M(0), [w, T] = M(() => r ? [...r] : []), k = j(0), N = j(null), P = j(t), F = j(n), I = j(a);
|
|
28
|
+
P.current = t, F.current = n, I.current = a, O(() => {
|
|
27
29
|
if (s.length === 0) {
|
|
28
30
|
l(null);
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
31
33
|
(!c || !s.includes(c)) && l(s[0]);
|
|
32
34
|
}, [c, s]);
|
|
33
|
-
let
|
|
35
|
+
let L = A(() => c && t ? t[c] ?? null : null, [c, t]), z = D(async (e, t, n) => {
|
|
34
36
|
let r = P.current?.[e];
|
|
35
37
|
if (r?.search) return (await r.search(t, {
|
|
36
38
|
kind: e,
|
|
@@ -53,9 +55,8 @@ function L(e = {}) {
|
|
|
53
55
|
...t,
|
|
54
56
|
kind: e
|
|
55
57
|
})) : [];
|
|
56
|
-
}, []), B =
|
|
58
|
+
}, []), B = E((e, t, n, r) => {
|
|
57
59
|
(async () => {
|
|
58
|
-
_(!0);
|
|
59
60
|
try {
|
|
60
61
|
let i = await Promise.all(e.map(async (e) => {
|
|
61
62
|
try {
|
|
@@ -72,15 +73,15 @@ function L(e = {}) {
|
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
}));
|
|
75
|
-
if (n !==
|
|
76
|
+
if (n !== k.current || r.aborted) return;
|
|
76
77
|
let a = {}, o = {}, s = null;
|
|
77
|
-
for (let e of i) a[e.kind] = e.list, e.error !== null && !
|
|
78
|
+
for (let e of i) a[e.kind] = e.list, e.error !== null && !R(e.error) && (o[e.kind] = e.error, s ??= e.error, I.current?.(e.error, {
|
|
78
79
|
query: t,
|
|
79
80
|
kind: e.kind
|
|
80
81
|
}));
|
|
81
82
|
h(a), x(o), y(s);
|
|
82
83
|
} finally {
|
|
83
|
-
n ===
|
|
84
|
+
n === k.current && !r.aborted && _(!1);
|
|
84
85
|
}
|
|
85
86
|
})();
|
|
86
87
|
}, i);
|
|
@@ -91,8 +92,8 @@ function L(e = {}) {
|
|
|
91
92
|
e.abort(), N.current === e && (N.current = null);
|
|
92
93
|
};
|
|
93
94
|
if (s.length === 0) return h({}), _(!1), y(null), x({}), t;
|
|
94
|
-
let n = ++
|
|
95
|
-
return y(null), x({}), B(s, f, n, e.signal), () => {
|
|
95
|
+
let n = ++k.current;
|
|
96
|
+
return _(!0), y(null), x({}), B(s, f, n, e.signal), () => {
|
|
96
97
|
B.cancel(), t();
|
|
97
98
|
};
|
|
98
99
|
}, [
|
|
@@ -119,13 +120,13 @@ function L(e = {}) {
|
|
|
119
120
|
}, []), U = D((e) => {
|
|
120
121
|
p(e);
|
|
121
122
|
}, []), W = D((e) => {
|
|
122
|
-
|
|
123
|
+
T((t) => t.some((t) => t.id === e.id) ? t : [...t, e]);
|
|
123
124
|
}, []), G = D((e) => {
|
|
124
|
-
|
|
125
|
+
T((t) => t.filter((t) => t.id !== e));
|
|
125
126
|
}, []), K = D((e) => {
|
|
126
|
-
|
|
127
|
+
T([...e]);
|
|
127
128
|
}, []), q = D(() => {
|
|
128
|
-
N.current?.abort(),
|
|
129
|
+
N.current?.abort(), T([]), p(""), d(!1), h({}), _(!1), y(null), x({}), k.current++;
|
|
129
130
|
}, []), J = D((e) => {
|
|
130
131
|
let n = e.kind ?? c, r = `${n}:${e.id}`, i = t?.[n], a = e.href ?? i?.buildHref?.(e), o = {
|
|
131
132
|
id: r,
|
|
@@ -144,10 +145,10 @@ function L(e = {}) {
|
|
|
144
145
|
kinds: s,
|
|
145
146
|
activeKind: c,
|
|
146
147
|
setActiveKind: H,
|
|
147
|
-
activeResource:
|
|
148
|
+
activeResource: L,
|
|
148
149
|
query: f,
|
|
149
150
|
setQuery: U,
|
|
150
|
-
suggestions:
|
|
151
|
+
suggestions: A(() => c ? m[c] ?? [] : [], [c, m]),
|
|
151
152
|
suggestionsByKind: m,
|
|
152
153
|
isLoading: g,
|
|
153
154
|
error: v,
|
|
@@ -166,20 +167,20 @@ function L(e = {}) {
|
|
|
166
167
|
}
|
|
167
168
|
//#endregion
|
|
168
169
|
//#region src/components/features/mentions/utils/build-mention-html.ts
|
|
169
|
-
function
|
|
170
|
+
function B(e, t) {
|
|
170
171
|
let n = String(e.label ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), r = String(e.id).replace(/"/g, """), i = String(e.kind).replace(/"/g, """), a = t?.tone ? String(t.tone).replace(/"/g, """) : "", o = t?.triggerChar ?? (e.kind === "user" ? "@" : "");
|
|
171
172
|
return `<span class="rsc-mention" data-ref-id="${r}" data-ref-kind="${i}"${a ? ` data-ref-tone="${a}"` : ""} contenteditable="false">${o}${n}</span> `;
|
|
172
173
|
}
|
|
173
174
|
//#endregion
|
|
174
175
|
//#region src/components/features/mentions/hooks/use-mentions.ts
|
|
175
|
-
function
|
|
176
|
-
let t = e.resources, n = e.onResourceSearch, r =
|
|
176
|
+
function V(e = {}) {
|
|
177
|
+
let t = e.resources, n = e.onResourceSearch, r = z({
|
|
177
178
|
...e,
|
|
178
179
|
resources: t,
|
|
179
180
|
onResourceSearch: n
|
|
180
|
-
}), [i, a] =
|
|
181
|
-
a(e), e || (
|
|
182
|
-
}, [r]),
|
|
181
|
+
}), [i, a] = M(!1), [o, s] = M(!1), c = k(), [l, u] = M(null), d = j(null), f = j(null), p = j(null), m = D((e) => {
|
|
182
|
+
a(e), e || (d.current = null, p.current = null, s(!1), u(null), r.setManualKindOverride(!1));
|
|
183
|
+
}, [r]), h = e.editorRef, g = D(() => {
|
|
183
184
|
if (!t) return;
|
|
184
185
|
let e = {};
|
|
185
186
|
for (let [n, r] of Object.entries(t)) {
|
|
@@ -187,60 +188,106 @@ function z(e = {}) {
|
|
|
187
188
|
typeof t == "string" && t.length > 0 && (e[t] = n);
|
|
188
189
|
}
|
|
189
190
|
if (Object.keys(e).length === 0) return;
|
|
190
|
-
let n =
|
|
191
|
-
if (
|
|
192
|
-
|
|
191
|
+
let n = h?.current?.getCaretContext();
|
|
192
|
+
if (n && f.current === n.textBefore) return;
|
|
193
|
+
if (f.current = null, !n) {
|
|
194
|
+
d.current && (d.current = null, m(!1));
|
|
193
195
|
return;
|
|
194
196
|
}
|
|
195
|
-
let i = Object.keys(e).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(""), o = RegExp(`(?:^|\\s)([${i}])([\\p{L}\\p{N}_-]*)$`, "u"),
|
|
196
|
-
if (!
|
|
197
|
-
|
|
197
|
+
let i = Object.keys(e).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(""), o = RegExp(`(?:^|\\s)([${i}])([\\p{L}\\p{N}_-]*)$`, "u"), c = n.textBefore.match(o);
|
|
198
|
+
if (!c) {
|
|
199
|
+
d.current && (d.current = null, m(!1));
|
|
198
200
|
return;
|
|
199
201
|
}
|
|
200
|
-
let
|
|
201
|
-
|
|
202
|
-
kind:
|
|
203
|
-
triggerChar:
|
|
204
|
-
consumedLength:
|
|
205
|
-
}, s(!0),
|
|
202
|
+
let l = c[1], u = c[2] ?? "", g = e[l], _ = l.length + u.length;
|
|
203
|
+
d.current = {
|
|
204
|
+
kind: g,
|
|
205
|
+
triggerChar: l,
|
|
206
|
+
consumedLength: _
|
|
207
|
+
}, s(!0), p.current !== l && (r.activeKind !== g && r.setActiveKind(g), r.setManualKindOverride(!1), p.current = l), r.query !== u && r.setQuery(u), a(!0);
|
|
206
208
|
}, [
|
|
207
|
-
|
|
209
|
+
h,
|
|
208
210
|
t,
|
|
209
211
|
r,
|
|
210
|
-
|
|
211
|
-
]),
|
|
212
|
-
let n = r.selectSuggestion(e), i =
|
|
212
|
+
m
|
|
213
|
+
]), _ = D((e) => {
|
|
214
|
+
let n = r.selectSuggestion(e), i = d.current, a = t?.[n.kind]?.tone, o = B(n, {
|
|
213
215
|
triggerChar: i?.triggerChar,
|
|
214
216
|
tone: a
|
|
215
217
|
});
|
|
216
|
-
return i && i.consumedLength > 0 &&
|
|
218
|
+
return i && i.consumedLength > 0 && h?.current ? (h.current.replaceBeforeCaret(i.consumedLength, o), d.current = null) : h?.current && h.current.insertHTML(o), m(!1), n;
|
|
217
219
|
}, [
|
|
218
|
-
|
|
220
|
+
h,
|
|
219
221
|
t,
|
|
220
222
|
r,
|
|
221
|
-
|
|
223
|
+
m
|
|
224
|
+
]), v = i && o, y = v && !r.isLoading && l && l.query === r.query && l.kind === r.activeKind ? r.suggestions.findIndex((e) => e.id === l.id) : -1, b = v && !r.isLoading && r.suggestions.length > 0 ? {
|
|
225
|
+
listboxId: c,
|
|
226
|
+
activeOptionId: y < 0 ? void 0 : `${c}-option-${y}`
|
|
227
|
+
} : void 0, x = D(() => {
|
|
228
|
+
f.current = h?.current?.getCaretContext()?.textBefore ?? null, m(!1);
|
|
229
|
+
}, [h, m]), S = D((e) => {
|
|
230
|
+
if (!v || e.defaultPrevented || e.isComposing || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return !1;
|
|
231
|
+
if (e.key === "Escape") x();
|
|
232
|
+
else if (!r.isLoading && r.suggestions.length > 0 && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
233
|
+
let t = r.suggestions.length, n = e.key === "ArrowDown" ? (y + 1) % t : y <= 0 ? t - 1 : y - 1, i = r.suggestions[n];
|
|
234
|
+
if (!i) return !1;
|
|
235
|
+
u({
|
|
236
|
+
id: i.id,
|
|
237
|
+
query: r.query,
|
|
238
|
+
kind: r.activeKind
|
|
239
|
+
});
|
|
240
|
+
} else if ((e.key === "Enter" || e.key === "Tab") && y >= 0) {
|
|
241
|
+
let e = r.suggestions[y];
|
|
242
|
+
if (!e) return !1;
|
|
243
|
+
_(e);
|
|
244
|
+
} else return !1;
|
|
245
|
+
return e.preventDefault(), e.stopPropagation(), !0;
|
|
246
|
+
}, [
|
|
247
|
+
y,
|
|
248
|
+
x,
|
|
249
|
+
v,
|
|
250
|
+
_,
|
|
251
|
+
r.activeKind,
|
|
252
|
+
r.isLoading,
|
|
253
|
+
r.query,
|
|
254
|
+
r.suggestions
|
|
255
|
+
]), C = D((e) => {
|
|
256
|
+
if (!v) return;
|
|
257
|
+
let t = e.relatedTarget, n = e.currentTarget.ownerDocument.getElementById(`${c}-panel`);
|
|
258
|
+
t instanceof Element && e.currentTarget.contains(t) && (t.closest("[contenteditable=\"true\"]") || n?.contains(t)) || x();
|
|
259
|
+
}, [
|
|
260
|
+
x,
|
|
261
|
+
v,
|
|
262
|
+
c
|
|
222
263
|
]);
|
|
223
264
|
return {
|
|
224
265
|
...r,
|
|
225
266
|
pickerOpen: i,
|
|
226
|
-
setPickerOpen:
|
|
267
|
+
setPickerOpen: m,
|
|
227
268
|
triggerActive: o,
|
|
228
|
-
handleCaretChange:
|
|
229
|
-
|
|
269
|
+
handleCaretChange: g,
|
|
270
|
+
inlineOpen: v,
|
|
271
|
+
listboxId: c,
|
|
272
|
+
activeIndex: y,
|
|
273
|
+
suggestionPopup: b,
|
|
274
|
+
handleKeyDown: S,
|
|
275
|
+
handleBlur: C,
|
|
276
|
+
pickSuggestion: _
|
|
230
277
|
};
|
|
231
278
|
}
|
|
232
279
|
//#endregion
|
|
233
280
|
//#region src/components/features/mentions/partials/mention-chip.tsx
|
|
234
|
-
var
|
|
281
|
+
var H = {
|
|
235
282
|
primary: "secondary",
|
|
236
283
|
success: "success",
|
|
237
284
|
warning: "warning",
|
|
238
285
|
destructive: "destructive",
|
|
239
286
|
info: "info",
|
|
240
287
|
secondary: "secondary"
|
|
241
|
-
},
|
|
242
|
-
if (n?.renderChip) return /* @__PURE__ */ N
|
|
243
|
-
let l =
|
|
288
|
+
}, U = ({ mention: e, resource: n, asLink: i = !0, onClick: o, trailing: s, className: c }) => {
|
|
289
|
+
if (n?.renderChip) return /* @__PURE__ */ P(N, { children: n.renderChip(e) });
|
|
290
|
+
let l = H[n?.tone ?? "secondary"] ?? H.secondary, u = n?.icon, d = /* @__PURE__ */ F(_, {
|
|
244
291
|
tone: l,
|
|
245
292
|
size: "sm",
|
|
246
293
|
inline: !0,
|
|
@@ -248,11 +295,11 @@ var B = {
|
|
|
248
295
|
"data-ref-kind": e.kind,
|
|
249
296
|
className: t("mention-chip--component", "align-[-0.15em] cursor-default whitespace-nowrap", c),
|
|
250
297
|
children: [
|
|
251
|
-
u ? /* @__PURE__ */
|
|
298
|
+
u ? /* @__PURE__ */ P(u, {
|
|
252
299
|
className: "size-icon-sm shrink-0",
|
|
253
300
|
"aria-hidden": !0
|
|
254
301
|
}) : null,
|
|
255
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ P(r, {
|
|
256
303
|
tag: "span",
|
|
257
304
|
size: "inherit",
|
|
258
305
|
weight: "medium",
|
|
@@ -263,7 +310,7 @@ var B = {
|
|
|
263
310
|
s
|
|
264
311
|
]
|
|
265
312
|
});
|
|
266
|
-
return i && e.href ? /* @__PURE__ */
|
|
313
|
+
return i && e.href ? /* @__PURE__ */ P(a, {
|
|
267
314
|
href: e.href,
|
|
268
315
|
size: "inherit",
|
|
269
316
|
underline: !1,
|
|
@@ -272,69 +319,41 @@ var B = {
|
|
|
272
319
|
onClick: o,
|
|
273
320
|
className: "inline align-baseline no-underline",
|
|
274
321
|
children: d
|
|
275
|
-
}) : o ? /* @__PURE__ */
|
|
322
|
+
}) : o ? /* @__PURE__ */ P("span", {
|
|
276
323
|
onClick: o,
|
|
277
324
|
className: "inline align-baseline",
|
|
278
325
|
children: d
|
|
279
326
|
}) : d;
|
|
280
|
-
},
|
|
281
|
-
function U(e) {
|
|
282
|
-
if (!e) return [];
|
|
283
|
-
let t = [], n = 0, r;
|
|
284
|
-
for (H.lastIndex = 0; (r = H.exec(e)) !== null;) {
|
|
285
|
-
let [i, , , a] = r, o = e.slice(n, r.index);
|
|
286
|
-
o.length > 0 && t.push({
|
|
287
|
-
kind: "html",
|
|
288
|
-
value: o
|
|
289
|
-
}), t.push({
|
|
290
|
-
kind: "mention",
|
|
291
|
-
refId: a,
|
|
292
|
-
fallback: i
|
|
293
|
-
}), n = r.index + i.length;
|
|
294
|
-
}
|
|
295
|
-
let i = e.slice(n);
|
|
296
|
-
return i.length > 0 && t.push({
|
|
297
|
-
kind: "html",
|
|
298
|
-
value: i
|
|
299
|
-
}), t;
|
|
300
|
-
}
|
|
301
|
-
//#endregion
|
|
302
|
-
//#region src/components/features/mentions/partials/mention-content.tsx
|
|
303
|
-
var W = h;
|
|
327
|
+
}, W = h;
|
|
304
328
|
function G(e) {
|
|
305
|
-
let { html: n, mentions: i, resources: a, renderMention: o, sanitizer: s, className: c, prose: l = !0 } = e, u = a, d = s ? s(n ?? "") : m(n ?? ""), f = /* @__PURE__ */ new Map();
|
|
329
|
+
let { html: n, mentions: i, resources: a, renderMention: o, sanitizer: s, className: c, prose: l = !0 } = e, u = a, d = s ? L(s(n ?? ""), { fragment: !0 }) : m(n ?? ""), f = /* @__PURE__ */ new Map();
|
|
306
330
|
for (let e of i ?? []) f.set(e.id, e);
|
|
307
|
-
let p =
|
|
308
|
-
kind: "html",
|
|
309
|
-
value: d
|
|
310
|
-
}], h = (e) => {
|
|
331
|
+
let p = (e) => {
|
|
311
332
|
if (o) return o(e);
|
|
312
333
|
let t = u?.[e.kind];
|
|
313
|
-
return /* @__PURE__ */
|
|
334
|
+
return /* @__PURE__ */ P(U, {
|
|
314
335
|
mention: e,
|
|
315
336
|
resource: t
|
|
316
337
|
});
|
|
317
|
-
},
|
|
318
|
-
if (e.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
return /* @__PURE__ */ N("span", { dangerouslySetInnerHTML: { __html: e.value } }, `html-${t}`);
|
|
338
|
+
}, h = g(d, void 0, (e) => {
|
|
339
|
+
if (e.tagName !== "span" && e.tagName !== "a") return;
|
|
340
|
+
let t = e.properties.dataRefId, n = typeof t == "string" ? f.get(t) : void 0;
|
|
341
|
+
return n ? /* @__PURE__ */ P(N, { children: p(n) }) : void 0;
|
|
323
342
|
});
|
|
324
|
-
return l ? /* @__PURE__ */
|
|
343
|
+
return l ? /* @__PURE__ */ P(r, {
|
|
325
344
|
tag: "div",
|
|
326
345
|
className: t("mention-content--component", W, c),
|
|
327
|
-
children:
|
|
328
|
-
}) : /* @__PURE__ */ N
|
|
346
|
+
children: h
|
|
347
|
+
}) : /* @__PURE__ */ P(N, { children: h });
|
|
329
348
|
}
|
|
330
349
|
//#endregion
|
|
331
350
|
//#region src/components/features/mentions/partials/mention-kind-toggles.tsx
|
|
332
351
|
function K({ kinds: e, activeKind: t, resources: i, counts: a, onKindChange: o }) {
|
|
333
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ P("div", {
|
|
334
353
|
className: "mention-kind-toggles--component flex flex-wrap gap-space-xs",
|
|
335
354
|
children: e.map((e) => {
|
|
336
355
|
let s = i?.[e], c = s?.icon, l = e === t, u = a?.[e]?.length ?? 0;
|
|
337
|
-
return /* @__PURE__ */
|
|
356
|
+
return /* @__PURE__ */ F(n, {
|
|
338
357
|
type: "button",
|
|
339
358
|
"aria-pressed": l,
|
|
340
359
|
tone: "secondary",
|
|
@@ -343,15 +362,15 @@ function K({ kinds: e, activeKind: t, resources: i, counts: a, onKindChange: o }
|
|
|
343
362
|
className: l ? p.togglePressed : p.toggleHoverButton,
|
|
344
363
|
onClick: () => o(e),
|
|
345
364
|
children: [
|
|
346
|
-
c ? /* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
365
|
+
c ? /* @__PURE__ */ P(c, { className: "size-icon-sm" }) : null,
|
|
366
|
+
/* @__PURE__ */ P(r, {
|
|
348
367
|
tag: "span",
|
|
349
368
|
size: "inherit",
|
|
350
369
|
weight: "medium",
|
|
351
370
|
className: "text-inherit",
|
|
352
371
|
children: s?.label ?? String(e)
|
|
353
372
|
}),
|
|
354
|
-
u > 0 && /* @__PURE__ */
|
|
373
|
+
u > 0 && /* @__PURE__ */ P(r, {
|
|
355
374
|
tag: "span",
|
|
356
375
|
size: "xs",
|
|
357
376
|
type: "secondary",
|
|
@@ -377,61 +396,61 @@ var q = {
|
|
|
377
396
|
};
|
|
378
397
|
//#endregion
|
|
379
398
|
//#region src/components/features/mentions/partials/mention-picker.tsx
|
|
380
|
-
function Y({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: u, query: d, setQuery: f, suggestions: p, loading: m, onSelect: h, strings: g, className:
|
|
399
|
+
function Y({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: u, query: d, setQuery: f, suggestions: p, loading: m, onSelect: h, strings: g, className: _ }) {
|
|
381
400
|
let E = e(q, g);
|
|
382
|
-
return n ? /* @__PURE__ */
|
|
401
|
+
return n ? /* @__PURE__ */ F(T, {
|
|
383
402
|
align: "start",
|
|
384
403
|
inset: "flush",
|
|
385
404
|
type: "menu",
|
|
386
|
-
className: t("mention-picker--component", l.md, "gap-0 overflow-hidden",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
405
|
+
className: t("mention-picker--component", l.md, "gap-0 overflow-hidden", _),
|
|
406
|
+
children: [/* @__PURE__ */ P(w, { children: /* @__PURE__ */ F(s, {
|
|
388
407
|
gap: "sm",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ P(i, { children: E.title }), c.length > 1 && /* @__PURE__ */ P(K, {
|
|
390
409
|
kinds: c,
|
|
391
410
|
activeKind: a,
|
|
392
411
|
resources: u,
|
|
393
412
|
onKindChange: o
|
|
394
413
|
})]
|
|
395
|
-
}) }), /* @__PURE__ */
|
|
414
|
+
}) }), /* @__PURE__ */ F(C, {
|
|
396
415
|
shouldFilter: !1,
|
|
397
416
|
inset: "flush",
|
|
398
417
|
className: "rounded-none",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ P(y, {
|
|
400
419
|
placeholder: E.searchPlaceholder,
|
|
401
420
|
value: d,
|
|
402
421
|
onValueChange: f
|
|
403
|
-
}), /* @__PURE__ */
|
|
404
|
-
m ? /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ F(x, { children: [
|
|
423
|
+
m ? /* @__PURE__ */ F(s, {
|
|
405
424
|
direction: "horizontal",
|
|
406
425
|
align: "center",
|
|
407
426
|
gap: "sm",
|
|
408
427
|
className: "px-row-x py-row-y text-muted-foreground",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ P(I, {
|
|
410
429
|
className: "size-icon-sm animate-spin",
|
|
411
430
|
"aria-hidden": !0
|
|
412
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ P(r, {
|
|
413
432
|
tag: "span",
|
|
414
433
|
size: "xs",
|
|
415
434
|
type: "secondary",
|
|
416
435
|
children: E.loading
|
|
417
436
|
})]
|
|
418
437
|
}) : null,
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ P(b, { children: E.empty }),
|
|
439
|
+
/* @__PURE__ */ P(S, { children: p.map((e) => {
|
|
421
440
|
let t = e.kind ?? a ?? "";
|
|
422
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ P(v, {
|
|
423
442
|
value: `${t}:${e.id}`,
|
|
424
443
|
onSelect: () => h(e),
|
|
425
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ F(s, {
|
|
426
445
|
gap: "dense",
|
|
427
446
|
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ P(r, {
|
|
429
448
|
tag: "span",
|
|
430
449
|
type: "inherit",
|
|
431
450
|
weight: "medium",
|
|
432
451
|
className: "truncate",
|
|
433
452
|
children: e.label
|
|
434
|
-
}), e.description ? /* @__PURE__ */
|
|
453
|
+
}), e.description ? /* @__PURE__ */ P(r, {
|
|
435
454
|
tag: "span",
|
|
436
455
|
size: "xs",
|
|
437
456
|
type: "secondary",
|
|
@@ -447,90 +466,104 @@ function Y({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: u, q
|
|
|
447
466
|
}
|
|
448
467
|
//#endregion
|
|
449
468
|
//#region src/components/features/mentions/partials/mention-inline-suggestions.tsx
|
|
450
|
-
function X({ open: n, activeKind: a, setActiveKind: m, kinds: h, resources: g, suggestionsByKind: _, suggestions: v,
|
|
451
|
-
let
|
|
452
|
-
return
|
|
469
|
+
function X({ open: n, activeKind: a, setActiveKind: m, kinds: h, resources: g, suggestionsByKind: _, suggestions: v, listboxId: y, activeIndex: b = -1, loading: x, query: S, onManualKindChange: C, onSelect: w, strings: T, className: E }) {
|
|
470
|
+
let D = e(J, T), k = j(null), A = y && x ? [] : v;
|
|
471
|
+
return O(() => {
|
|
472
|
+
k.current?.scrollIntoView?.({ block: "nearest" });
|
|
473
|
+
}, [
|
|
474
|
+
b,
|
|
475
|
+
n,
|
|
476
|
+
v
|
|
477
|
+
]), n ? /* @__PURE__ */ F("div", {
|
|
478
|
+
id: y ? `${y}-panel` : void 0,
|
|
453
479
|
onMouseDown: (e) => e.preventDefault(),
|
|
454
|
-
className: t("mention-inline-suggestions--component", d.surface, "absolute left-0 top-full z-50 mt-space-xs max-w-full", l.lg, "overflow-hidden",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
480
|
+
className: t("mention-inline-suggestions--component", d.surface, "absolute left-0 top-full z-50 mt-space-xs max-w-full", l.lg, "overflow-hidden", E),
|
|
481
|
+
children: [/* @__PURE__ */ P("div", {
|
|
456
482
|
className: t("mention-inline-suggestions--header", d.menuRegion, c.anchored.header),
|
|
457
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ F(s, {
|
|
458
484
|
gap: "sm",
|
|
459
485
|
className: d.menuCopyInset,
|
|
460
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ F(s, {
|
|
461
487
|
direction: "horizontal",
|
|
462
488
|
align: "baseline",
|
|
463
489
|
justify: "between",
|
|
464
490
|
gap: "md",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
491
|
+
children: [/* @__PURE__ */ P(i, { children: D.title }), S ? /* @__PURE__ */ F(r, {
|
|
466
492
|
tag: "span",
|
|
467
493
|
size: "xs",
|
|
468
494
|
type: "secondary",
|
|
469
495
|
className: "truncate font-mono",
|
|
470
496
|
children: [
|
|
471
497
|
"“",
|
|
472
|
-
|
|
498
|
+
S,
|
|
473
499
|
"”"
|
|
474
500
|
]
|
|
475
501
|
}) : null]
|
|
476
|
-
}), h.length > 1 && /* @__PURE__ */
|
|
502
|
+
}), h.length > 1 && /* @__PURE__ */ P(K, {
|
|
477
503
|
kinds: h,
|
|
478
504
|
activeKind: a,
|
|
479
505
|
resources: g,
|
|
480
506
|
counts: _,
|
|
481
507
|
onKindChange: (e) => {
|
|
482
|
-
m(e),
|
|
508
|
+
m(e), C?.();
|
|
483
509
|
}
|
|
484
510
|
})]
|
|
485
511
|
})
|
|
486
|
-
}), /* @__PURE__ */
|
|
512
|
+
}), /* @__PURE__ */ F("div", {
|
|
513
|
+
id: y,
|
|
487
514
|
className: t("mention-inline-suggestions--list max-h-72 overflow-y-auto", d.menu),
|
|
488
|
-
...
|
|
515
|
+
...A.length > 0 ? {
|
|
489
516
|
role: "listbox",
|
|
490
|
-
"aria-label":
|
|
517
|
+
"aria-label": D.title
|
|
491
518
|
} : {},
|
|
492
519
|
children: [
|
|
493
|
-
|
|
520
|
+
x ? /* @__PURE__ */ F(s, {
|
|
494
521
|
direction: "horizontal",
|
|
495
522
|
align: "center",
|
|
496
523
|
gap: "sm",
|
|
497
524
|
className: "px-row-x py-row-y text-muted-foreground",
|
|
498
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ P(I, {
|
|
499
526
|
className: "size-icon-sm animate-spin",
|
|
500
527
|
"aria-hidden": !0
|
|
501
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ P(r, {
|
|
502
529
|
tag: "span",
|
|
503
530
|
size: "xs",
|
|
504
531
|
type: "secondary",
|
|
505
|
-
|
|
532
|
+
role: "status",
|
|
533
|
+
children: D.loading
|
|
506
534
|
})]
|
|
507
535
|
}) : null,
|
|
508
|
-
!
|
|
536
|
+
!x && v.length === 0 ? /* @__PURE__ */ P(r, {
|
|
509
537
|
tag: "div",
|
|
510
538
|
size: "xs",
|
|
511
539
|
type: "secondary",
|
|
512
540
|
className: "px-row-x py-row-y",
|
|
513
|
-
|
|
541
|
+
role: "status",
|
|
542
|
+
children: D.empty
|
|
514
543
|
}) : null,
|
|
515
|
-
|
|
516
|
-
let
|
|
517
|
-
return /* @__PURE__ */
|
|
544
|
+
A.map((e, n) => {
|
|
545
|
+
let i = e.kind ?? a ?? "", c = n === b;
|
|
546
|
+
return /* @__PURE__ */ P("button", {
|
|
518
547
|
type: "button",
|
|
519
548
|
role: "option",
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
549
|
+
id: y ? `${y}-option-${n}` : void 0,
|
|
550
|
+
tabIndex: y ? -1 : void 0,
|
|
551
|
+
ref: c ? k : void 0,
|
|
552
|
+
"aria-selected": c,
|
|
553
|
+
"data-highlighted": c || void 0,
|
|
554
|
+
"data-ref-id": `${i}:${e.id}`,
|
|
555
|
+
onClick: () => w(e),
|
|
556
|
+
className: t("mention-inline-suggestions--option w-full min-w-0 text-inherit text-left", p.nativeButtonReset, u("compact"), f.interactive, f.highlighted, p.rowHover, o.inset),
|
|
557
|
+
children: /* @__PURE__ */ F(s, {
|
|
525
558
|
gap: "dense",
|
|
526
559
|
className: "min-w-0 flex-1",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ P(r, {
|
|
528
561
|
tag: "span",
|
|
529
562
|
type: "inherit",
|
|
530
563
|
weight: "medium",
|
|
531
564
|
className: "truncate",
|
|
532
565
|
children: e.label
|
|
533
|
-
}), e.description ? /* @__PURE__ */
|
|
566
|
+
}), e.description ? /* @__PURE__ */ P(r, {
|
|
534
567
|
tag: "span",
|
|
535
568
|
size: "xs",
|
|
536
569
|
type: "secondary",
|
|
@@ -538,24 +571,60 @@ function X({ open: n, activeKind: a, setActiveKind: m, kinds: h, resources: g, s
|
|
|
538
571
|
children: e.description
|
|
539
572
|
}) : null]
|
|
540
573
|
})
|
|
541
|
-
}, `${
|
|
574
|
+
}, `${i}:${e.id}`);
|
|
542
575
|
})
|
|
543
576
|
]
|
|
544
577
|
})]
|
|
545
578
|
}) : null;
|
|
546
579
|
}
|
|
547
580
|
//#endregion
|
|
581
|
+
//#region src/components/features/mentions/utils/split-html-by-mentions.ts
|
|
582
|
+
function Z(e) {
|
|
583
|
+
if (!e) return [];
|
|
584
|
+
let t = [];
|
|
585
|
+
function n(e) {
|
|
586
|
+
for (let r of e) {
|
|
587
|
+
if (r.type !== "element") continue;
|
|
588
|
+
let e = r.properties.dataRefId, i = r.position?.start.offset, a = r.position?.end.offset;
|
|
589
|
+
(r.tagName === "span" || r.tagName === "a") && typeof e == "string" && e && i !== void 0 && a !== void 0 ? t.push({
|
|
590
|
+
refId: e,
|
|
591
|
+
start: i,
|
|
592
|
+
end: a
|
|
593
|
+
}) : n(r.children);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
n(L(e, { fragment: !0 }).children);
|
|
597
|
+
let r = [], i = 0;
|
|
598
|
+
for (let { refId: n, start: a, end: o } of t.sort((e, t) => e.start - t.start)) {
|
|
599
|
+
if (a < i) continue;
|
|
600
|
+
let t = e.slice(i, a);
|
|
601
|
+
t.length > 0 && r.push({
|
|
602
|
+
kind: "html",
|
|
603
|
+
value: t
|
|
604
|
+
}), r.push({
|
|
605
|
+
kind: "mention",
|
|
606
|
+
refId: n,
|
|
607
|
+
fallback: e.slice(a, o)
|
|
608
|
+
}), i = o;
|
|
609
|
+
}
|
|
610
|
+
let a = e.slice(i);
|
|
611
|
+
return a.length > 0 && r.push({
|
|
612
|
+
kind: "html",
|
|
613
|
+
value: a
|
|
614
|
+
}), r;
|
|
615
|
+
}
|
|
616
|
+
//#endregion
|
|
548
617
|
//#region src/components/features/mentions/utils/parse-mentions-from-html.ts
|
|
549
|
-
var
|
|
550
|
-
function
|
|
618
|
+
var Q = /<(?:span|a)\b[^>]*?data-ref-id\s*=\s*"([^"]+)"[^>]*?>([\s\S]*?)<\/(?:span|a)>/gi, $ = /data-ref-kind\s*=\s*"([^"]+)"/i;
|
|
619
|
+
function ee(e) {
|
|
551
620
|
let t = [];
|
|
552
621
|
if (!e) return t;
|
|
553
622
|
let n = /* @__PURE__ */ new Set(), r;
|
|
554
|
-
for (
|
|
623
|
+
for (Q.lastIndex = 0; (r = Q.exec(e)) !== null;) {
|
|
555
624
|
let [e, i, a] = r;
|
|
556
625
|
if (n.has(i)) continue;
|
|
557
626
|
n.add(i);
|
|
558
|
-
let o = e.match(
|
|
627
|
+
let o = e.match($)?.[1] ?? i.split(":")[0] ?? "", s = (a ?? "").replace(/<[^>]*>/g, "").replace(/ /g, " ").replace(/^[@#$&%!~]\s*/, "").trim();
|
|
559
628
|
t.push({
|
|
560
629
|
id: i,
|
|
561
630
|
kind: o,
|
|
@@ -565,6 +634,6 @@ function $(e) {
|
|
|
565
634
|
return t;
|
|
566
635
|
}
|
|
567
636
|
//#endregion
|
|
568
|
-
export {
|
|
637
|
+
export { J as a, U as c, z as d, Y as i, V as l, Z as n, q as o, X as r, G as s, ee as t, B as u };
|
|
569
638
|
|
|
570
|
-
//# sourceMappingURL=mentions-
|
|
639
|
+
//# sourceMappingURL=mentions-qOnedSt4.js.map
|