themelia-react-ui 2.0.0 → 2.0.1
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 +351 -0
- package/README.md +26 -13
- package/dist/{accordion-CQXVcd7Q.js → accordion-B6a3vVgA.js} +84 -82
- package/dist/accordion-B6a3vVgA.js.map +1 -0
- package/dist/action-menu-TzCoSlwL.js +280 -0
- package/dist/action-menu-TzCoSlwL.js.map +1 -0
- package/dist/{affordance-geometry.generated-CCIXb2A1.js → affordance-geometry.generated-B5iu-Mkr.js} +3 -2
- package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +1 -0
- package/dist/{ai-artifact-2PQ2fItc.js → ai-artifact-BMJdv-6q.js} +379 -376
- package/dist/ai-artifact-BMJdv-6q.js.map +1 -0
- package/dist/{app-shell-BE_j8-AT.js → app-shell-ZK5RWdo6.js} +4 -4
- package/dist/{app-shell-BE_j8-AT.js.map → app-shell-ZK5RWdo6.js.map} +1 -1
- package/dist/attachment-BtfhGm8i.js +245 -0
- package/dist/attachment-BtfhGm8i.js.map +1 -0
- package/dist/{auth-M3vGMgDR.js → auth-CYxKfo69.js} +237 -235
- package/dist/auth-CYxKfo69.js.map +1 -0
- package/dist/{avatar-djdaaQ_s.js → avatar-BBnEJIx8.js} +66 -65
- package/dist/avatar-BBnEJIx8.js.map +1 -0
- package/dist/badge-MrKVNzW9.js +93 -0
- package/dist/badge-MrKVNzW9.js.map +1 -0
- 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 +3 -0
- package/dist/base/buttons.js +2 -3
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +13 -13
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +103 -115
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +3 -3
- 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 +7 -7
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +17 -17
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +3 -0
- 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 +171 -170
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +147 -137
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +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 +2 -2
- 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 +2 -2
- package/dist/batch-action-bar-BZGDG-Si.js +104 -0
- package/dist/batch-action-bar-BZGDG-Si.js.map +1 -0
- package/dist/blocks/admin.js +173 -171
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +266 -263
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +440 -438
- 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 +1945 -1266
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +3 -2
- package/dist/blocks/onboarding.js +50 -49
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +25 -25
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/breadcrumbs-D5t7I023.js +129 -0
- package/dist/breadcrumbs-D5t7I023.js.map +1 -0
- package/dist/{button-R9CCoH7A.js → button-QYwiyhD2.js} +15 -14
- package/dist/button-QYwiyhD2.js.map +1 -0
- package/dist/{button-BS3KDg00.js → buttons-SbIcm1HJ.js} +200 -213
- package/dist/buttons-SbIcm1HJ.js.map +1 -0
- package/dist/{cards-QoJ4syG9.js → cards-CiiHpKYd.js} +8 -8
- package/dist/cards-CiiHpKYd.js.map +1 -0
- package/dist/{chart-DwYRKKc-.js → chart-QfrARkXl.js} +5 -5
- package/dist/{chart-DwYRKKc-.js.map → chart-QfrARkXl.js.map} +1 -1
- package/dist/checkbox-DhB6K0bK.js +36 -0
- package/dist/checkbox-DhB6K0bK.js.map +1 -0
- package/dist/choice-inputs-t6w3ATNz.js +766 -0
- package/dist/choice-inputs-t6w3ATNz.js.map +1 -0
- package/dist/code-block-Dgbu-CU3.js +185 -0
- package/dist/code-block-Dgbu-CU3.js.map +1 -0
- package/dist/{collapsible-oMUGM4tr.js → collapsible-D8AEGU1-.js} +4 -4
- package/dist/{collapsible-oMUGM4tr.js.map → collapsible-D8AEGU1-.js.map} +1 -1
- package/dist/{collection-content-Ys-OZOkY.js → collection-content-uK16Grv0.js} +3 -3
- package/dist/{collection-content-Ys-OZOkY.js.map → collection-content-uK16Grv0.js.map} +1 -1
- package/dist/{combobox-6dvVny2q.js → combobox-2Ic8N9bL.js} +74 -68
- package/dist/combobox-2Ic8N9bL.js.map +1 -0
- package/dist/{combobox-CB7039j7.js → combobox-DLl0bfiq.js} +307 -305
- package/dist/combobox-DLl0bfiq.js.map +1 -0
- package/dist/{command-kPMPjIxJ.js → command-kNR20o7x.js} +7 -7
- package/dist/{command-kPMPjIxJ.js.map → command-kNR20o7x.js.map} +1 -1
- package/dist/{comments-You0Bzbr.js → comments-BpDuCUUu.js} +341 -339
- package/dist/comments-BpDuCUUu.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +21 -4
- package/dist/components/base/action-menu/action-menu.recipes.d.ts +21 -0
- package/dist/components/base/action-menu/index.d.ts +1 -0
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/batch-action-bar/batch-action-bar.d.ts +50 -0
- package/dist/components/base/batch-action-bar/batch-action-bar.strings.d.ts +20 -0
- package/dist/components/base/batch-action-bar/index.d.ts +8 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
- package/dist/components/base/buttons/button.recipes.d.ts +2 -2
- package/dist/components/base/choice-inputs/checkbox.d.ts +2 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +18 -6
- package/dist/components/base/display/alert-dialog.d.ts +6 -5
- package/dist/components/base/display/dialog.d.ts +4 -8
- package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
- package/dist/components/base/forms/form-sizing.d.ts +15 -12
- package/dist/components/base/metadata-list/index.d.ts +12 -0
- package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.d.ts +28 -25
- package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-value.d.ts +2 -2
- package/dist/components/base/navigation/index.d.ts +1 -1
- package/dist/components/base/navigation/page-header/index.d.ts +1 -0
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +73 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +26 -3
- package/dist/components/base/sheet/sheet.d.ts +4 -8
- package/dist/components/base/signature-pad/signature-pad.types.d.ts +5 -1
- package/dist/components/base/signature-pad/signature-pad.utils.d.ts +11 -3
- package/dist/components/base/text-inputs/field-clear-button.d.ts +6 -0
- package/dist/components/base/upload/upload.recipes.d.ts +25 -3
- package/dist/components/base/value-inputs/index.d.ts +5 -5
- package/dist/components/base/value-inputs/tags-input.d.ts +36 -12
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +2 -1
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +3 -1
- package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +6 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +16 -4
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +5 -0
- package/dist/components/blocks/commerce/fulfillment-group/index.d.ts +2 -0
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +43 -0
- package/dist/components/blocks/commerce/index.d.ts +13 -5
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +4 -2
- package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +2 -1
- package/dist/components/blocks/commerce/order-customer/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +5 -0
- package/dist/components/blocks/commerce/order-customer/types.d.ts +48 -0
- package/dist/components/blocks/commerce/order-header/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-header/order-header.d.ts +5 -0
- package/dist/components/blocks/commerce/order-header/types.d.ts +37 -0
- package/dist/components/blocks/commerce/order-line-item/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-line-item/order-line-item.d.ts +5 -0
- package/dist/components/blocks/commerce/order-line-item/types.d.ts +46 -0
- package/dist/components/blocks/commerce/order-summary/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-summary/order-summary.d.ts +5 -0
- package/dist/components/blocks/commerce/order-summary/types.d.ts +42 -0
- package/dist/components/blocks/commerce/order-transactions/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-transactions/order-transactions.d.ts +5 -0
- package/dist/components/blocks/commerce/order-transactions/types.d.ts +46 -0
- package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +9 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +12 -1
- package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +3 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +6 -3
- package/dist/components/blocks/commerce/shared/address-lines.d.ts +21 -0
- package/dist/components/blocks/commerce/shared/line-thumbnail.d.ts +9 -0
- package/dist/components/blocks/commerce/shared/order-status.d.ts +51 -0
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +27 -6
- package/dist/components/blocks/commerce/summary-panel/amount-row.d.ts +2 -0
- package/dist/components/blocks/commerce/summary-panel/index.d.ts +3 -0
- package/dist/components/blocks/commerce/summary-panel/summary-panel.d.ts +2 -0
- package/dist/components/blocks/commerce/summary-panel/types.d.ts +26 -0
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +2 -1
- package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
- package/dist/components/features/activities/partials/activity-row.d.ts +6 -2
- package/dist/components/features/activities/partials/tone-tokens.d.ts +0 -6
- package/dist/components/features/global-search/partials/global-search-group-heading.d.ts +15 -0
- package/dist/components/features/global-search/partials/tone-palettes.d.ts +0 -5
- package/dist/components/features/kanban/kanban.d.ts +1 -1
- package/dist/components/features/kanban/kanban.strings.d.ts +1 -1
- package/dist/components/features/kanban/kanban.types.d.ts +2 -2
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/index.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 +4 -0
- package/dist/components/features/media-library/media-library.types.d.ts +74 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- package/dist/components/features/mentions/partials/mention-kind-toggles.d.ts +16 -0
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/dialog.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +3 -3
- package/dist/components/features/overlays/overlays.types.d.ts +20 -0
- package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
- package/dist/components/features/products/components/product-details-card.d.ts +5 -0
- package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
- package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
- package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
- package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
- package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
- package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
- package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
- package/dist/components/features/products/components/product-variant-action-menu.d.ts +23 -1
- package/dist/components/features/products/products.types.d.ts +9 -2
- package/dist/components/features/resource/index.d.ts +1 -1
- package/dist/components/features/resource/resource.d.ts +1 -1
- package/dist/components/features/resource/resource.types.d.ts +34 -6
- package/dist/components/features/rich-text-editor/index.d.ts +2 -1
- package/dist/components/features/rich-text-editor/partials/image-nodes.d.ts +13 -0
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +66 -0
- package/dist/components/features/rich-text-editor/partials/inline-reference-node.d.ts +19 -0
- 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.strings.d.ts +14 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +45 -0
- package/dist/components/features/rich-text-editor/use-rich-text-images.d.ts +18 -0
- package/dist/components/features/sync/index.d.ts +26 -3
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +32 -7
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +33 -36
- package/dist/components/layout/page/partials/page-actions.d.ts +1 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +16 -2
- package/dist/components/layout/workspace/workspace.types.d.ts +21 -4
- package/dist/components/typography/rich-text/index.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +19 -0
- package/dist/components/typography/rich-text/rich-text.d.ts +16 -0
- package/dist/components/typography/text-link.d.ts +4 -3
- package/dist/components/ui/checkbox.d.ts +4 -3
- package/dist/components/ui/overlay.recipes.d.ts +0 -9
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/{containers-D_L4mTVb.js → containers-DmWiJa2I.js} +36 -35
- package/dist/containers-DmWiJa2I.js.map +1 -0
- package/dist/{copyable-DDjTeW_j.js → copyable-B3Gwgdqc.js} +6 -6
- package/dist/{copyable-DDjTeW_j.js.map → copyable-B3Gwgdqc.js.map} +1 -1
- package/dist/data-display-DafIvCl5.js +960 -0
- package/dist/data-display-DafIvCl5.js.map +1 -0
- package/dist/{date-uf3z37Nm.js → date-BgK3bTdo.js} +5 -5
- package/dist/{date-uf3z37Nm.js.map → date-BgK3bTdo.js.map} +1 -1
- package/dist/date-picker-CF-DtUpF.js +1529 -0
- package/dist/date-picker-CF-DtUpF.js.map +1 -0
- package/dist/{date-pickers-CnFCb0n2.js → date-pickers-BmzxJl5l.js} +19 -19
- package/dist/{date-pickers-CnFCb0n2.js.map → date-pickers-BmzxJl5l.js.map} +1 -1
- package/dist/{display-DrdvPwF0.js → display-DsQTVzMz.js} +88 -87
- package/dist/display-DsQTVzMz.js.map +1 -0
- package/dist/{dropdown-menu-CURh59jb.js → dropdown-menu-E2qmdC7o.js} +7 -7
- package/dist/{dropdown-menu-CURh59jb.js.map → dropdown-menu-E2qmdC7o.js.map} +1 -1
- package/dist/features/activities.js +414 -501
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +170 -169
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- 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 +139 -138
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +73 -71
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +278 -275
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +307 -310
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +95 -97
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +56 -57
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +918 -825
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1115 -1122
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +202 -194
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +25 -25
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +77 -69
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +30 -11
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +33 -33
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +397 -396
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-C7nR0UtT.js → feedback-qNuMBtRH.js} +84 -83
- package/dist/feedback-qNuMBtRH.js.map +1 -0
- package/dist/{field-affordance-recipes-CkOCdE2y.js → field-affordance-recipes-qQeIf4lG.js} +8 -6
- package/dist/field-affordance-recipes-qQeIf4lG.js.map +1 -0
- package/dist/field-state-recipes-BVA2CWHo.js +12 -0
- package/dist/field-state-recipes-BVA2CWHo.js.map +1 -0
- package/dist/{filters-Da-gNPsE.js → filters-BkHH53uv.js} +565 -563
- package/dist/filters-BkHH53uv.js.map +1 -0
- package/dist/focus-recipes-B653VaLq.js +12 -0
- package/dist/focus-recipes-B653VaLq.js.map +1 -0
- package/dist/{form-field-VZRULhUK.js → form-field-DUt4UxSV.js} +4 -4
- package/dist/{form-field-VZRULhUK.js.map → form-field-DUt4UxSV.js.map} +1 -1
- package/dist/{form-sizing-uWP4lzVh.js → form-sizing-By94KzXE.js} +19 -15
- package/dist/form-sizing-By94KzXE.js.map +1 -0
- package/dist/{forms-DDeEnXSY.js → forms-Bzha-Y3B.js} +22 -22
- package/dist/{forms-DDeEnXSY.js.map → forms-Bzha-Y3B.js.map} +1 -1
- package/dist/{forms-numeric-D3CO60IF.js → forms-numeric-C0bvjRPZ.js} +265 -264
- package/dist/forms-numeric-C0bvjRPZ.js.map +1 -0
- package/dist/{header-2ycNqGOR.js → header-BOefOKd1.js} +47 -51
- package/dist/header-BOefOKd1.js.map +1 -0
- package/dist/{hooks-DQ5SPwZw.js → hooks-9k_TtmKh.js} +2 -2
- package/dist/{hooks-DQ5SPwZw.js.map → hooks-9k_TtmKh.js.map} +1 -1
- package/dist/{http-CdEIHyQf.js → http-D_6rOnzU.js} +2 -2
- package/dist/{http-CdEIHyQf.js.map → http-D_6rOnzU.js.map} +1 -1
- package/dist/icon-badge-CAuKupo9.js +55 -0
- package/dist/icon-badge-CAuKupo9.js.map +1 -0
- package/dist/index.js +7 -7
- package/dist/input-DWhBBBww.js +262 -0
- package/dist/input-DWhBBBww.js.map +1 -0
- package/dist/{input-BoLm9Hks.js → input-Ddi_LSYv.js} +3 -3
- package/dist/{input-BoLm9Hks.js.map → input-Ddi_LSYv.js.map} +1 -1
- package/dist/interaction-recipes-CHr0dJUs.js +24 -0
- package/dist/interaction-recipes-CHr0dJUs.js.map +1 -0
- package/dist/{item-xzh8Df65.js → item-DEmDiTlD.js} +98 -97
- package/dist/item-DEmDiTlD.js.map +1 -0
- package/dist/layer-recipes-CCpklYME.js +13 -0
- package/dist/layer-recipes-CCpklYME.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 +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +1 -0
- package/dist/lib/field-affordance-recipes.d.ts +6 -1
- package/dist/lib/field-state-recipes.d.ts +9 -8
- package/dist/lib/focus-recipes.d.ts +24 -0
- package/dist/lib/interaction-recipes.d.ts +35 -0
- package/dist/lib/layer-recipes.d.ts +19 -0
- package/dist/lib/motion-recipes.d.ts +1 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -0
- package/dist/lib/safe-image-src.d.ts +10 -0
- package/dist/lib/sanitize-html.d.ts +15 -3
- package/dist/lib/surface-recipes.d.ts +47 -7
- package/dist/lib/token-merge.generated.d.ts +9 -6
- package/dist/lib/tone-recipes.d.ts +79 -0
- package/dist/lib/ui-provider/hooks.d.ts +2 -1
- package/dist/lib/ui-provider/index.d.ts +2 -2
- package/dist/lib/ui-provider/types.d.ts +9 -0
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-DcTtAaeC.js +203 -0
- package/dist/media-gallery-DcTtAaeC.js.map +1 -0
- package/dist/mentions-D-uyCh01.js +568 -0
- package/dist/mentions-D-uyCh01.js.map +1 -0
- package/dist/{message-YfFmbXNP.js → message-CdHgIWKf.js} +5 -5
- package/dist/{message-YfFmbXNP.js.map → message-CdHgIWKf.js.map} +1 -1
- package/dist/metadata-list-X5rYAKSB.js +394 -0
- package/dist/metadata-list-X5rYAKSB.js.map +1 -0
- package/dist/{motion-recipes-B6jKXEcN.js → motion-recipes-ChBg4HBq.js} +3 -2
- package/dist/{motion-recipes-B6jKXEcN.js.map → motion-recipes-ChBg4HBq.js.map} +1 -1
- package/dist/navigation-D3KwXmaq.js +145 -0
- package/dist/navigation-D3KwXmaq.js.map +1 -0
- package/dist/navigation-HJf5zxlH.js +268 -0
- package/dist/navigation-HJf5zxlH.js.map +1 -0
- package/dist/{navigation-row-recipes-DlU-4QYO.js → navigation-row-recipes-BVowojQw.js} +2 -2
- package/dist/{navigation-row-recipes-DlU-4QYO.js.map → navigation-row-recipes-BVowojQw.js.map} +1 -1
- package/dist/{number-CKRBYmZK.js → number-DMhe-Vsk.js} +5 -5
- package/dist/{number-CKRBYmZK.js.map → number-DMhe-Vsk.js.map} +1 -1
- package/dist/overflow-tab-bar-sQHXLlwQ.js +280 -0
- package/dist/overflow-tab-bar-sQHXLlwQ.js.map +1 -0
- package/dist/overlay.recipes-8GHqmlb4.js +6 -0
- package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
- package/dist/overlays-I0axtYA6.js +999 -0
- package/dist/overlays-I0axtYA6.js.map +1 -0
- package/dist/page-B5dTH9gE.js +224 -0
- package/dist/page-B5dTH9gE.js.map +1 -0
- package/dist/page-header-commands-DjzFEq3E.js +126 -0
- package/dist/page-header-commands-DjzFEq3E.js.map +1 -0
- package/dist/{pagination-Cm0jqa3I.js → pagination-3bPA_a6K.js} +15 -15
- package/dist/{pagination-Cm0jqa3I.js.map → pagination-3bPA_a6K.js.map} +1 -1
- package/dist/{popover-Dcv_9jxr.js → popover-Di55PyAI.js} +8 -8
- package/dist/popover-Di55PyAI.js.map +1 -0
- package/dist/{popover-menu-DnRFKnHP.js → popover-menu-B71Tn2Qz.js} +6 -6
- package/dist/{popover-menu-DnRFKnHP.js.map → popover-menu-B71Tn2Qz.js.map} +1 -1
- package/dist/{popover.recipes-wmbvL8Ah.js → popover.recipes-Bdyhj2db.js} +2 -2
- package/dist/{popover.recipes-wmbvL8Ah.js.map → popover.recipes-Bdyhj2db.js.map} +1 -1
- package/dist/{primitives-BHrwQXFC.js → primitives-B-CkiEMU.js} +5 -5
- package/dist/{primitives-BHrwQXFC.js.map → primitives-B-CkiEMU.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-Br9WTFya.js → progress-rnS8-uAW.js} +9 -9
- package/dist/{progress-Br9WTFya.js.map → progress-rnS8-uAW.js.map} +1 -1
- package/dist/{receipt-CV89q1fs.js → receipt-D0oswZ0p.js} +6 -6
- package/dist/{receipt-CV89q1fs.js.map → receipt-D0oswZ0p.js.map} +1 -1
- package/dist/rich-text-DvGulsNJ.js +78 -0
- package/dist/rich-text-DvGulsNJ.js.map +1 -0
- package/dist/rich-text-editor-sMU_Scqm.js +1204 -0
- package/dist/rich-text-editor-sMU_Scqm.js.map +1 -0
- package/dist/rich-text-editor.recipes-CadiF_Uu.js +88 -0
- package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +1 -0
- package/dist/rich-text-editor.strings-CB59ekH2.js +38 -0
- package/dist/rich-text-editor.strings-CB59ekH2.js.map +1 -0
- package/dist/safe-image-src-C6kQSMBZ.js +17 -0
- package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
- package/dist/sanitize-html-DsQmI48u.js +92 -0
- package/dist/sanitize-html-DsQmI48u.js.map +1 -0
- package/dist/scroll-area-Bt_vXY2b.js +48 -0
- package/dist/scroll-area-Bt_vXY2b.js.map +1 -0
- package/dist/{separator-Do5GWDYi.js → separator-C8DlRGwF.js} +3 -3
- package/dist/{separator-Do5GWDYi.js.map → separator-C8DlRGwF.js.map} +1 -1
- package/dist/{separator-BMEvwnSX.js → separator-CYHnjsAb.js} +2 -2
- package/dist/{separator-BMEvwnSX.js.map → separator-CYHnjsAb.js.map} +1 -1
- package/dist/services/actions/action-adapters.d.ts +18 -0
- package/dist/services/actions/index.d.ts +1 -1
- package/dist/services/actions.js +16 -4
- package/dist/services/actions.js.map +1 -1
- package/dist/settings-CQW3b-Cu.js +170 -0
- package/dist/settings-CQW3b-Cu.js.map +1 -0
- package/dist/sheet-4SEvVYzA.js +210 -0
- package/dist/sheet-4SEvVYzA.js.map +1 -0
- package/dist/{sidebar-Crc9M9JV.js → sidebar-C7WWR29L.js} +180 -179
- package/dist/sidebar-C7WWR29L.js.map +1 -0
- package/dist/{sidebar-Cb8WzOvE.js → sidebar-d7Dg80ln.js} +16 -16
- package/dist/sidebar-d7Dg80ln.js.map +1 -0
- package/dist/{skeleton-DVMXr15h.js → skeleton-Cz890JZF.js} +9 -9
- package/dist/{skeleton-DVMXr15h.js.map → skeleton-Cz890JZF.js.map} +1 -1
- package/dist/smart-card-lFKxn5Hu.js +595 -0
- package/dist/smart-card-lFKxn5Hu.js.map +1 -0
- package/dist/{spinner-CmTAbEp0.js → spinner-fa3h1Aif.js} +7 -7
- package/dist/{spinner-CmTAbEp0.js.map → spinner-fa3h1Aif.js.map} +1 -1
- package/dist/{structure-hzCW-XsV.js → structure-DC2dygdA.js} +2 -2
- package/dist/{structure-hzCW-XsV.js.map → structure-DC2dygdA.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/surface-recipes-BKRVW8Os.js +43 -0
- package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
- package/dist/{table-D6zKeYQX.js → table-CIKyLUsy.js} +59 -58
- package/dist/table-CIKyLUsy.js.map +1 -0
- package/dist/table-CrcLN9Io.js +1458 -0
- package/dist/table-CrcLN9Io.js.map +1 -0
- package/dist/{tabs-Dk8E_knt.js → tabs-DwBJfjxX.js} +58 -57
- package/dist/tabs-DwBJfjxX.js.map +1 -0
- package/dist/{text-inputs-BFpku0Qd.js → text-inputs-aaK9wcDT.js} +74 -79
- package/dist/text-inputs-aaK9wcDT.js.map +1 -0
- package/dist/theme.css +3 -3
- package/dist/{timelines-CxuAFIc2.js → timelines-C_SBwHNP.js} +153 -150
- package/dist/timelines-C_SBwHNP.js.map +1 -0
- package/dist/tone-recipes-CPoExcTE.js +70 -0
- package/dist/tone-recipes-CPoExcTE.js.map +1 -0
- package/dist/tooltip-CsfgrfS7.js +111 -0
- package/dist/tooltip-CsfgrfS7.js.map +1 -0
- package/dist/{tree-BotPlyiD.js → tree-BiKhg8AY.js} +68 -66
- package/dist/tree-BiKhg8AY.js.map +1 -0
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-DTRkE9zL.js +117 -0
- package/dist/typography-DTRkE9zL.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-D2_TeLqw.js → ui-provider-1D_NSYzO.js} +11 -3
- package/dist/ui-provider-1D_NSYzO.js.map +1 -0
- package/dist/ui-provider.js +3 -3
- package/dist/{upload-B0WHW7ak.js → upload-BO8-CLN6.js} +209 -209
- package/dist/upload-BO8-CLN6.js.map +1 -0
- package/dist/{upload-queue-BHZ_wBfd.js → upload-queue-EOC8g1gf.js} +109 -111
- package/dist/upload-queue-EOC8g1gf.js.map +1 -0
- package/dist/upload.recipes-BbxTqrCT.js +61 -0
- package/dist/upload.recipes-BbxTqrCT.js.map +1 -0
- package/dist/{usage-card-U0YBLTNT.js → usage-card-obRaBskq.js} +46 -46
- package/dist/{usage-card-U0YBLTNT.js.map → usage-card-obRaBskq.js.map} +1 -1
- package/dist/{utils-Cospvlj1.js → utils-l5LpDw2z.js} +56 -24
- package/dist/utils-l5LpDw2z.js.map +1 -0
- package/dist/value-inputs-TAYMX111.js +947 -0
- package/dist/value-inputs-TAYMX111.js.map +1 -0
- package/dist/{value-typography-Deb3yQZg.js → value-typography-b8wpz1eX.js} +2 -2
- package/dist/{value-typography-Deb3yQZg.js.map → value-typography-b8wpz1eX.js.map} +1 -1
- package/dist/workspace-DH0v0KcB.js +407 -0
- package/dist/workspace-DH0v0KcB.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +19 -20
- package/docs/consumer-skill/examples/app-layout.tsx +1 -1
- package/docs/consumer-skill/examples/composition.tsx +3 -3
- package/docs/consumer-skill/examples/detail.tsx +59 -12
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/receipt.tsx +2 -2
- package/docs/consumer-skill/examples/scoped-directory.tsx +1 -1
- package/docs/consumer-skill/examples/website.tsx +1 -1
- package/docs/consumer-skill/references/agents-md.md +33 -0
- package/docs/consumer-skill/references/analytics.md +1 -1
- package/docs/consumer-skill/references/composition.md +51 -8
- package/docs/consumer-skill/references/design-contract.md +12 -3
- package/docs/consumer-skill/references/installation.md +11 -1
- package/docs/consumer-skill/references/public-api.json +847 -447
- package/docs/consumer-skill/references/review.md +25 -5
- package/docs/consumer-skill/references/theming.md +8 -4
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/references/workflows.md +29 -10
- package/docs/consumer-skill/scripts/composition-policy.mjs +41 -11
- package/docs/consumer-skill/scripts/surface-policy.mjs +139 -5
- package/package.json +10 -2
- package/dist/accordion-CQXVcd7Q.js.map +0 -1
- package/dist/action-menu-BTpyPWJ2.js +0 -264
- package/dist/action-menu-BTpyPWJ2.js.map +0 -1
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +0 -1
- package/dist/ai-artifact-2PQ2fItc.js.map +0 -1
- package/dist/attachment-q69dlt5Y.js +0 -244
- package/dist/attachment-q69dlt5Y.js.map +0 -1
- package/dist/auth-M3vGMgDR.js.map +0 -1
- package/dist/avatar-djdaaQ_s.js.map +0 -1
- package/dist/badge-0tATj-tW.js +0 -92
- package/dist/badge-0tATj-tW.js.map +0 -1
- package/dist/breadcrumbs-BG_FfMK4.js +0 -128
- package/dist/breadcrumbs-BG_FfMK4.js.map +0 -1
- package/dist/button-BS3KDg00.js.map +0 -1
- package/dist/button-R9CCoH7A.js.map +0 -1
- package/dist/buttons-DS0ZIwJ_.js +0 -99
- package/dist/buttons-DS0ZIwJ_.js.map +0 -1
- package/dist/cards-QoJ4syG9.js.map +0 -1
- package/dist/checkbox-B7ygNTYp.js +0 -35
- package/dist/checkbox-B7ygNTYp.js.map +0 -1
- package/dist/choice-inputs-DrJ17tpL.js +0 -752
- package/dist/choice-inputs-DrJ17tpL.js.map +0 -1
- package/dist/code-block-CD0B7M93.js +0 -183
- package/dist/code-block-CD0B7M93.js.map +0 -1
- package/dist/combobox-6dvVny2q.js.map +0 -1
- package/dist/combobox-CB7039j7.js.map +0 -1
- package/dist/comments-You0Bzbr.js.map +0 -1
- package/dist/components/layout/page/partials/page-header-commands.d.ts +0 -13
- package/dist/containers-D_L4mTVb.js.map +0 -1
- package/dist/data-display-3xWQUnMA.js +0 -1335
- package/dist/data-display-3xWQUnMA.js.map +0 -1
- package/dist/date-picker-DrDFj8Lo.js +0 -1527
- package/dist/date-picker-DrDFj8Lo.js.map +0 -1
- package/dist/display-DrdvPwF0.js.map +0 -1
- package/dist/feedback-C7nR0UtT.js.map +0 -1
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +0 -1
- package/dist/field-state-recipes-C-MFBX_8.js +0 -11
- package/dist/field-state-recipes-C-MFBX_8.js.map +0 -1
- package/dist/filters-Da-gNPsE.js.map +0 -1
- package/dist/form-sizing-uWP4lzVh.js.map +0 -1
- package/dist/forms-numeric-D3CO60IF.js.map +0 -1
- package/dist/header-2ycNqGOR.js.map +0 -1
- package/dist/icon-badge-DKlaKXoo.js +0 -53
- package/dist/icon-badge-DKlaKXoo.js.map +0 -1
- package/dist/input-DhQdBnV3.js +0 -255
- package/dist/input-DhQdBnV3.js.map +0 -1
- package/dist/item-xzh8Df65.js.map +0 -1
- package/dist/media-gallery-DQUQ0m3O.js +0 -201
- package/dist/media-gallery-DQUQ0m3O.js.map +0 -1
- package/dist/mentions-DwnO1hh4.js +0 -564
- package/dist/mentions-DwnO1hh4.js.map +0 -1
- package/dist/navigation-Cbp5V8gG.js +0 -264
- package/dist/navigation-Cbp5V8gG.js.map +0 -1
- package/dist/navigation-Cs1npsPm.js +0 -300
- package/dist/navigation-Cs1npsPm.js.map +0 -1
- package/dist/overlay.recipes-CNO2S9V6.js +0 -34
- package/dist/overlay.recipes-CNO2S9V6.js.map +0 -1
- package/dist/overlays-DhZO7N-I.js +0 -994
- package/dist/overlays-DhZO7N-I.js.map +0 -1
- package/dist/page-C6R_8jFt.js +0 -325
- package/dist/page-C6R_8jFt.js.map +0 -1
- package/dist/page-header-hUTzcRZX.js +0 -112
- package/dist/page-header-hUTzcRZX.js.map +0 -1
- package/dist/popover-Dcv_9jxr.js.map +0 -1
- package/dist/rich-text-editor-CF8QYt5p.js +0 -574
- package/dist/rich-text-editor-CF8QYt5p.js.map +0 -1
- package/dist/rich-text-editor.recipes-CnrbmTS1.js +0 -81
- package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +0 -1
- package/dist/rich-text-editor.strings-BpnIQgMl.js +0 -25
- package/dist/rich-text-editor.strings-BpnIQgMl.js.map +0 -1
- package/dist/rich-text-j-FGAeZW.js +0 -32
- package/dist/rich-text-j-FGAeZW.js.map +0 -1
- package/dist/sanitize-html-BG9FGe-j.js +0 -64
- package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
- package/dist/scroll-area-DRdr16Pt.js +0 -47
- package/dist/scroll-area-DRdr16Pt.js.map +0 -1
- package/dist/settings-DHk0L2MF.js +0 -161
- package/dist/settings-DHk0L2MF.js.map +0 -1
- package/dist/sheet-DRFNY1_D.js +0 -207
- package/dist/sheet-DRFNY1_D.js.map +0 -1
- package/dist/sidebar-Cb8WzOvE.js.map +0 -1
- package/dist/sidebar-Crc9M9JV.js.map +0 -1
- package/dist/smart-card-Bek-TwUp.js +0 -599
- package/dist/smart-card-Bek-TwUp.js.map +0 -1
- package/dist/surface-recipes-DOdoBXGm.js +0 -28
- package/dist/surface-recipes-DOdoBXGm.js.map +0 -1
- package/dist/table-D6zKeYQX.js.map +0 -1
- package/dist/table-Dn4XSrSB.js +0 -1444
- package/dist/table-Dn4XSrSB.js.map +0 -1
- package/dist/tabs-Dk8E_knt.js.map +0 -1
- package/dist/text-inputs-BFpku0Qd.js.map +0 -1
- package/dist/timelines-CxuAFIc2.js.map +0 -1
- package/dist/tree-BotPlyiD.js.map +0 -1
- package/dist/typography-CAr3dQhX.js +0 -116
- package/dist/typography-CAr3dQhX.js.map +0 -1
- package/dist/ui-provider-D2_TeLqw.js.map +0 -1
- package/dist/upload-B0WHW7ak.js.map +0 -1
- package/dist/upload-queue-BHZ_wBfd.js.map +0 -1
- package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
- package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
- package/dist/utils-Cospvlj1.js.map +0 -1
- package/dist/value-inputs-CjfzGMsN.js +0 -854
- package/dist/value-inputs-CjfzGMsN.js.map +0 -1
- package/dist/workspace-YoFjXi6i.js +0 -394
- package/dist/workspace-YoFjXi6i.js.map +0 -1
- /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useStrings as e } from "./lib/strings.js";
|
|
3
|
+
import { t } from "./utils-l5LpDw2z.js";
|
|
4
|
+
import { n } from "./buttons-SbIcm1HJ.js";
|
|
5
|
+
import { a as r, s as i, t as a } from "./typography-DTRkE9zL.js";
|
|
6
|
+
import { t as o } from "./focus-recipes-B653VaLq.js";
|
|
7
|
+
import { t as s } from "./structure-DC2dygdA.js";
|
|
8
|
+
import { a as c } from "./surface-recipes-BKRVW8Os.js";
|
|
9
|
+
import { n as l, r as u, t as d } from "./popover.recipes-Bdyhj2db.js";
|
|
10
|
+
import { t as f } from "./interaction-recipes-CHr0dJUs.js";
|
|
11
|
+
import { t as p } from "./sanitize-html-DsQmI48u.js";
|
|
12
|
+
import { t as m } from "./content-typography-CnwgMJ37.js";
|
|
13
|
+
import { t as h } from "./badge-MrKVNzW9.js";
|
|
14
|
+
import { a as g, i as _, n as v, o as y, r as b, t as x } from "./command-kNR20o7x.js";
|
|
15
|
+
import { i as S, t as C } from "./popover-Di55PyAI.js";
|
|
16
|
+
import { t as w } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
17
|
+
import { Fragment as T, useCallback as E, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
18
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
19
|
+
import { Loader2 as P } from "lucide-react";
|
|
20
|
+
//#region src/components/features/mentions/hooks/use-mentions-search.ts
|
|
21
|
+
function F(e) {
|
|
22
|
+
return !!(e && e.name === "AbortError");
|
|
23
|
+
}
|
|
24
|
+
function I(e = {}) {
|
|
25
|
+
let { resources: t, onResourceSearch: n, initialMentions: r, debounceMs: i = 300, onError: a } = e, o = JSON.stringify(Object.keys(t ?? {})), s = O(() => JSON.parse(o), [o]), [c, l] = A(() => s[0] ?? null), [u, d] = A(!1), [f, p] = A(""), [m, h] = A({}), [g, _] = A(!1), [v, y] = A(null), [b, x] = A({}), [S, C] = A(0), [T, j] = A(() => r ? [...r] : []), M = k(0), N = k(null), P = k(t), I = k(n), L = k(a);
|
|
26
|
+
P.current = t, I.current = n, L.current = a, D(() => {
|
|
27
|
+
if (s.length === 0) {
|
|
28
|
+
l(null);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
(!c || !s.includes(c)) && l(s[0]);
|
|
32
|
+
}, [c, s]);
|
|
33
|
+
let R = O(() => c && t ? t[c] ?? null : null, [c, t]), z = E(async (e, t, n) => {
|
|
34
|
+
let r = P.current?.[e];
|
|
35
|
+
if (r?.search) return (await r.search(t, {
|
|
36
|
+
kind: e,
|
|
37
|
+
signal: n
|
|
38
|
+
})).map((t) => ({
|
|
39
|
+
...t,
|
|
40
|
+
kind: e
|
|
41
|
+
}));
|
|
42
|
+
if (r?.suggestions) {
|
|
43
|
+
let n = r.suggestions;
|
|
44
|
+
return (t.trim().length === 0 ? n : n.filter((e) => e.label.toLowerCase().includes(t.toLowerCase()))).map((t) => ({
|
|
45
|
+
...t,
|
|
46
|
+
kind: e
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
return I.current ? (await I.current(t, e, {
|
|
50
|
+
kind: e,
|
|
51
|
+
signal: n
|
|
52
|
+
})).map((t) => ({
|
|
53
|
+
...t,
|
|
54
|
+
kind: e
|
|
55
|
+
})) : [];
|
|
56
|
+
}, []), B = w((e, t, n, r) => {
|
|
57
|
+
(async () => {
|
|
58
|
+
_(!0);
|
|
59
|
+
try {
|
|
60
|
+
let i = await Promise.all(e.map(async (e) => {
|
|
61
|
+
try {
|
|
62
|
+
return {
|
|
63
|
+
kind: e,
|
|
64
|
+
list: await z(e, t, r),
|
|
65
|
+
error: null
|
|
66
|
+
};
|
|
67
|
+
} catch (t) {
|
|
68
|
+
return {
|
|
69
|
+
kind: e,
|
|
70
|
+
list: [],
|
|
71
|
+
error: t
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}));
|
|
75
|
+
if (n !== M.current || r.aborted) return;
|
|
76
|
+
let a = {}, o = {}, s = null;
|
|
77
|
+
for (let e of i) a[e.kind] = e.list, e.error !== null && !F(e.error) && (o[e.kind] = e.error, s ??= e.error, L.current?.(e.error, {
|
|
78
|
+
query: t,
|
|
79
|
+
kind: e.kind
|
|
80
|
+
}));
|
|
81
|
+
h(a), x(o), y(s);
|
|
82
|
+
} finally {
|
|
83
|
+
n === M.current && !r.aborted && _(!1);
|
|
84
|
+
}
|
|
85
|
+
})();
|
|
86
|
+
}, i);
|
|
87
|
+
D(() => {
|
|
88
|
+
let e = new AbortController();
|
|
89
|
+
N.current = e;
|
|
90
|
+
let t = () => {
|
|
91
|
+
e.abort(), N.current === e && (N.current = null);
|
|
92
|
+
};
|
|
93
|
+
if (s.length === 0) return h({}), _(!1), y(null), x({}), t;
|
|
94
|
+
let n = ++M.current;
|
|
95
|
+
return y(null), x({}), B(s, f, n, e.signal), () => {
|
|
96
|
+
B.cancel(), t();
|
|
97
|
+
};
|
|
98
|
+
}, [
|
|
99
|
+
s,
|
|
100
|
+
f,
|
|
101
|
+
S,
|
|
102
|
+
B
|
|
103
|
+
]);
|
|
104
|
+
let V = E(() => {
|
|
105
|
+
C((e) => e + 1);
|
|
106
|
+
}, []);
|
|
107
|
+
D(() => {
|
|
108
|
+
if (u || !c || (m[c] ?? []).length > 0) return;
|
|
109
|
+
let e = s.find((e) => (m[e]?.length ?? 0) > 0);
|
|
110
|
+
e && e !== c && l(e);
|
|
111
|
+
}, [
|
|
112
|
+
c,
|
|
113
|
+
s,
|
|
114
|
+
u,
|
|
115
|
+
m
|
|
116
|
+
]);
|
|
117
|
+
let H = E((e) => {
|
|
118
|
+
l(e);
|
|
119
|
+
}, []), U = E((e) => {
|
|
120
|
+
p(e);
|
|
121
|
+
}, []), W = E((e) => {
|
|
122
|
+
j((t) => t.some((t) => t.id === e.id) ? t : [...t, e]);
|
|
123
|
+
}, []), G = E((e) => {
|
|
124
|
+
j((t) => t.filter((t) => t.id !== e));
|
|
125
|
+
}, []), K = E((e) => {
|
|
126
|
+
j([...e]);
|
|
127
|
+
}, []), q = E(() => {
|
|
128
|
+
N.current?.abort(), j([]), p(""), d(!1), h({}), _(!1), y(null), x({}), M.current++;
|
|
129
|
+
}, []), J = E((e) => {
|
|
130
|
+
let n = e.kind ?? c, r = `${n}:${e.id}`, i = t?.[n], a = e.href ?? i?.buildHref?.(e), o = {
|
|
131
|
+
id: r,
|
|
132
|
+
kind: n,
|
|
133
|
+
label: e.label,
|
|
134
|
+
href: a,
|
|
135
|
+
data: e.data
|
|
136
|
+
};
|
|
137
|
+
return W(o), o;
|
|
138
|
+
}, [
|
|
139
|
+
c,
|
|
140
|
+
W,
|
|
141
|
+
t
|
|
142
|
+
]);
|
|
143
|
+
return {
|
|
144
|
+
kinds: s,
|
|
145
|
+
activeKind: c,
|
|
146
|
+
setActiveKind: H,
|
|
147
|
+
activeResource: R,
|
|
148
|
+
query: f,
|
|
149
|
+
setQuery: U,
|
|
150
|
+
suggestions: O(() => c ? m[c] ?? [] : [], [c, m]),
|
|
151
|
+
suggestionsByKind: m,
|
|
152
|
+
isLoading: g,
|
|
153
|
+
error: v,
|
|
154
|
+
isError: v !== null,
|
|
155
|
+
errorsByKind: b,
|
|
156
|
+
retry: V,
|
|
157
|
+
mentions: T,
|
|
158
|
+
addMention: W,
|
|
159
|
+
removeMention: G,
|
|
160
|
+
setMentions: K,
|
|
161
|
+
reset: q,
|
|
162
|
+
selectSuggestion: J,
|
|
163
|
+
manualKindOverride: u,
|
|
164
|
+
setManualKindOverride: d
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/features/mentions/utils/build-mention-html.ts
|
|
169
|
+
function L(e, t) {
|
|
170
|
+
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
|
+
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
|
+
//#endregion
|
|
174
|
+
//#region src/components/features/mentions/hooks/use-mentions.ts
|
|
175
|
+
function R(e = {}) {
|
|
176
|
+
let t = e.resources, n = e.onResourceSearch, r = I({
|
|
177
|
+
...e,
|
|
178
|
+
resources: t,
|
|
179
|
+
onResourceSearch: n
|
|
180
|
+
}), [i, a] = A(!1), [o, s] = A(!1), c = k(null), l = k(null), u = E((e) => {
|
|
181
|
+
a(e), e || (c.current = null, l.current = null, s(!1), r.setManualKindOverride(!1));
|
|
182
|
+
}, [r]), d = e.editorRef, f = E(() => {
|
|
183
|
+
if (!t) return;
|
|
184
|
+
let e = {};
|
|
185
|
+
for (let [n, r] of Object.entries(t)) {
|
|
186
|
+
let t = r?.trigger;
|
|
187
|
+
typeof t == "string" && t.length > 0 && (e[t] = n);
|
|
188
|
+
}
|
|
189
|
+
if (Object.keys(e).length === 0) return;
|
|
190
|
+
let n = d?.current?.getCaretContext();
|
|
191
|
+
if (!n) {
|
|
192
|
+
c.current && (c.current = null, u(!1));
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
let i = Object.keys(e).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(""), o = RegExp(`(?:^|\\s)([${i}])([\\p{L}\\p{N}_-]*)$`, "u"), f = n.textBefore.match(o);
|
|
196
|
+
if (!f) {
|
|
197
|
+
c.current && (c.current = null, u(!1));
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
let p = f[1], m = f[2] ?? "", h = e[p], g = p.length + m.length;
|
|
201
|
+
c.current = {
|
|
202
|
+
kind: h,
|
|
203
|
+
triggerChar: p,
|
|
204
|
+
consumedLength: g
|
|
205
|
+
}, s(!0), l.current !== p && (r.activeKind !== h && r.setActiveKind(h), r.setManualKindOverride(!1), l.current = p), r.query !== m && r.setQuery(m), a(!0);
|
|
206
|
+
}, [
|
|
207
|
+
d,
|
|
208
|
+
t,
|
|
209
|
+
r,
|
|
210
|
+
u
|
|
211
|
+
]), p = E((e) => {
|
|
212
|
+
let n = r.selectSuggestion(e), i = c.current, a = t?.[n.kind]?.tone, o = L(n, {
|
|
213
|
+
triggerChar: i?.triggerChar,
|
|
214
|
+
tone: a
|
|
215
|
+
});
|
|
216
|
+
return i && i.consumedLength > 0 && d?.current ? (d.current.replaceBeforeCaret(i.consumedLength, o), c.current = null) : d?.current && d.current.insertHTML(o), u(!1), n;
|
|
217
|
+
}, [
|
|
218
|
+
d,
|
|
219
|
+
t,
|
|
220
|
+
r,
|
|
221
|
+
u
|
|
222
|
+
]);
|
|
223
|
+
return {
|
|
224
|
+
...r,
|
|
225
|
+
pickerOpen: i,
|
|
226
|
+
setPickerOpen: u,
|
|
227
|
+
triggerActive: o,
|
|
228
|
+
handleCaretChange: f,
|
|
229
|
+
pickSuggestion: p
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/components/features/mentions/partials/mention-chip.tsx
|
|
234
|
+
var z = {
|
|
235
|
+
primary: "secondary",
|
|
236
|
+
success: "success",
|
|
237
|
+
warning: "warning",
|
|
238
|
+
destructive: "destructive",
|
|
239
|
+
info: "info",
|
|
240
|
+
secondary: "secondary"
|
|
241
|
+
}, B = ({ mention: e, resource: n, asLink: r = !0, onClick: o, trailing: s, className: c }) => {
|
|
242
|
+
if (n?.renderChip) return /* @__PURE__ */ M(j, { children: n.renderChip(e) });
|
|
243
|
+
let l = z[n?.tone ?? "secondary"] ?? z.secondary, u = n?.icon, d = /* @__PURE__ */ N(h, {
|
|
244
|
+
tone: l,
|
|
245
|
+
size: "sm",
|
|
246
|
+
inline: !0,
|
|
247
|
+
"data-ref-id": e.id,
|
|
248
|
+
"data-ref-kind": e.kind,
|
|
249
|
+
className: t("mention-chip--component", "align-[-0.15em] cursor-default whitespace-nowrap", c),
|
|
250
|
+
children: [
|
|
251
|
+
u ? /* @__PURE__ */ M(u, {
|
|
252
|
+
className: "size-icon-sm shrink-0",
|
|
253
|
+
"aria-hidden": !0
|
|
254
|
+
}) : null,
|
|
255
|
+
/* @__PURE__ */ M(i, {
|
|
256
|
+
tag: "span",
|
|
257
|
+
size: "inherit",
|
|
258
|
+
weight: "medium",
|
|
259
|
+
lineHeight: "none",
|
|
260
|
+
className: "max-w-[14rem] truncate text-inherit",
|
|
261
|
+
children: e.label
|
|
262
|
+
}),
|
|
263
|
+
s
|
|
264
|
+
]
|
|
265
|
+
});
|
|
266
|
+
return r && e.href ? /* @__PURE__ */ M(a, {
|
|
267
|
+
href: e.href,
|
|
268
|
+
size: "inherit",
|
|
269
|
+
underline: !1,
|
|
270
|
+
target: "_blank",
|
|
271
|
+
rel: "noreferrer noopener",
|
|
272
|
+
onClick: o,
|
|
273
|
+
className: "inline align-baseline no-underline hover:opacity-90",
|
|
274
|
+
children: d
|
|
275
|
+
}) : o ? /* @__PURE__ */ M("span", {
|
|
276
|
+
onClick: o,
|
|
277
|
+
className: "inline align-baseline",
|
|
278
|
+
children: d
|
|
279
|
+
}) : d;
|
|
280
|
+
}, V = /<(span|a)\b([^>]*?)data-ref-id\s*=\s*"([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi;
|
|
281
|
+
function H(e) {
|
|
282
|
+
if (!e) return [];
|
|
283
|
+
let t = [], n = 0, r;
|
|
284
|
+
for (V.lastIndex = 0; (r = V.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 U = m;
|
|
304
|
+
function W(e) {
|
|
305
|
+
let { html: n, mentions: r, resources: a, renderMention: o, sanitizer: s, className: c, prose: l = !0 } = e, u = a, d = s ? s(n ?? "") : p(n ?? ""), f = /* @__PURE__ */ new Map();
|
|
306
|
+
for (let e of r ?? []) f.set(e.id, e);
|
|
307
|
+
let m = f.size > 0 ? H(d) : [{
|
|
308
|
+
kind: "html",
|
|
309
|
+
value: d
|
|
310
|
+
}], h = (e) => {
|
|
311
|
+
if (o) return o(e);
|
|
312
|
+
let t = u?.[e.kind];
|
|
313
|
+
return /* @__PURE__ */ M(B, {
|
|
314
|
+
mention: e,
|
|
315
|
+
resource: t
|
|
316
|
+
});
|
|
317
|
+
}, g = m.map((e, t) => {
|
|
318
|
+
if (e.kind === "mention") {
|
|
319
|
+
let n = f.get(e.refId);
|
|
320
|
+
return n ? /* @__PURE__ */ M(T, { children: h(n) }, `ref-${t}-${e.refId}`) : /* @__PURE__ */ M("span", { dangerouslySetInnerHTML: { __html: e.fallback } }, `fallback-${t}`);
|
|
321
|
+
}
|
|
322
|
+
return /* @__PURE__ */ M("span", { dangerouslySetInnerHTML: { __html: e.value } }, `html-${t}`);
|
|
323
|
+
});
|
|
324
|
+
return l ? /* @__PURE__ */ M(i, {
|
|
325
|
+
tag: "div",
|
|
326
|
+
className: t("mention-content--component", U, c),
|
|
327
|
+
children: g
|
|
328
|
+
}) : /* @__PURE__ */ M(j, { children: g });
|
|
329
|
+
}
|
|
330
|
+
//#endregion
|
|
331
|
+
//#region src/components/features/mentions/partials/mention-kind-toggles.tsx
|
|
332
|
+
function G({ kinds: e, activeKind: t, resources: r, counts: a, onKindChange: o }) {
|
|
333
|
+
return /* @__PURE__ */ M("div", {
|
|
334
|
+
className: "mention-kind-toggles--component flex flex-wrap gap-space-xs",
|
|
335
|
+
children: e.map((e) => {
|
|
336
|
+
let s = r?.[e], c = s?.icon, l = e === t, u = a?.[e]?.length ?? 0;
|
|
337
|
+
return /* @__PURE__ */ N(n, {
|
|
338
|
+
type: "button",
|
|
339
|
+
"aria-pressed": l,
|
|
340
|
+
tone: "secondary",
|
|
341
|
+
buttonStyle: "ghost",
|
|
342
|
+
size: "sm",
|
|
343
|
+
className: l ? f.togglePressed : f.toggleHoverButton,
|
|
344
|
+
onClick: () => o(e),
|
|
345
|
+
children: [
|
|
346
|
+
c ? /* @__PURE__ */ M(c, { className: "size-icon-sm" }) : null,
|
|
347
|
+
/* @__PURE__ */ M(i, {
|
|
348
|
+
tag: "span",
|
|
349
|
+
size: "inherit",
|
|
350
|
+
weight: "medium",
|
|
351
|
+
className: "text-inherit",
|
|
352
|
+
children: s?.label ?? String(e)
|
|
353
|
+
}),
|
|
354
|
+
u > 0 && /* @__PURE__ */ M(i, {
|
|
355
|
+
tag: "span",
|
|
356
|
+
size: "xs",
|
|
357
|
+
type: "secondary",
|
|
358
|
+
className: "tabular-nums",
|
|
359
|
+
children: u
|
|
360
|
+
})
|
|
361
|
+
]
|
|
362
|
+
}, e);
|
|
363
|
+
})
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/components/features/mentions/mentions.strings.ts
|
|
368
|
+
var K = {
|
|
369
|
+
title: "Insert reference",
|
|
370
|
+
searchPlaceholder: "Search…",
|
|
371
|
+
empty: "No matches.",
|
|
372
|
+
loading: "Searching…"
|
|
373
|
+
}, q = {
|
|
374
|
+
title: "Insert reference",
|
|
375
|
+
empty: "No matches.",
|
|
376
|
+
loading: "Searching…"
|
|
377
|
+
};
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/components/features/mentions/partials/mention-picker.tsx
|
|
380
|
+
function J({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: l, query: u, setQuery: d, suggestions: f, loading: p, onSelect: m, strings: h, className: w }) {
|
|
381
|
+
let T = e(K, h);
|
|
382
|
+
return n ? /* @__PURE__ */ N(C, {
|
|
383
|
+
align: "start",
|
|
384
|
+
inset: "flush",
|
|
385
|
+
type: "menu",
|
|
386
|
+
className: t("mention-picker--component", "w-72 gap-0 overflow-hidden", w),
|
|
387
|
+
children: [/* @__PURE__ */ M(S, { children: /* @__PURE__ */ N(s, {
|
|
388
|
+
gap: "sm",
|
|
389
|
+
children: [/* @__PURE__ */ M(r, { children: T.title }), c.length > 1 && /* @__PURE__ */ M(G, {
|
|
390
|
+
kinds: c,
|
|
391
|
+
activeKind: a,
|
|
392
|
+
resources: l,
|
|
393
|
+
onKindChange: o
|
|
394
|
+
})]
|
|
395
|
+
}) }), /* @__PURE__ */ N(x, {
|
|
396
|
+
shouldFilter: !1,
|
|
397
|
+
inset: "flush",
|
|
398
|
+
className: "rounded-none",
|
|
399
|
+
children: [/* @__PURE__ */ M(_, {
|
|
400
|
+
placeholder: T.searchPlaceholder,
|
|
401
|
+
value: u,
|
|
402
|
+
onValueChange: d
|
|
403
|
+
}), /* @__PURE__ */ N(y, { children: [
|
|
404
|
+
p ? /* @__PURE__ */ N(s, {
|
|
405
|
+
direction: "horizontal",
|
|
406
|
+
align: "center",
|
|
407
|
+
gap: "sm",
|
|
408
|
+
className: "px-row-x py-row-y text-muted-foreground",
|
|
409
|
+
children: [/* @__PURE__ */ M(P, {
|
|
410
|
+
className: "size-icon-sm animate-spin",
|
|
411
|
+
"aria-hidden": !0
|
|
412
|
+
}), /* @__PURE__ */ M(i, {
|
|
413
|
+
tag: "span",
|
|
414
|
+
size: "xs",
|
|
415
|
+
type: "secondary",
|
|
416
|
+
children: T.loading
|
|
417
|
+
})]
|
|
418
|
+
}) : null,
|
|
419
|
+
/* @__PURE__ */ M(v, { children: T.empty }),
|
|
420
|
+
/* @__PURE__ */ M(b, { children: f.map((e) => {
|
|
421
|
+
let t = e.kind ?? a ?? "";
|
|
422
|
+
return /* @__PURE__ */ M(g, {
|
|
423
|
+
value: `${t}:${e.id}`,
|
|
424
|
+
onSelect: () => m(e),
|
|
425
|
+
children: /* @__PURE__ */ N(s, {
|
|
426
|
+
gap: "dense",
|
|
427
|
+
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
428
|
+
children: [/* @__PURE__ */ M(i, {
|
|
429
|
+
tag: "span",
|
|
430
|
+
weight: "medium",
|
|
431
|
+
className: "truncate",
|
|
432
|
+
children: e.label
|
|
433
|
+
}), e.description ? /* @__PURE__ */ M(i, {
|
|
434
|
+
tag: "span",
|
|
435
|
+
size: "xs",
|
|
436
|
+
type: "secondary",
|
|
437
|
+
className: "truncate",
|
|
438
|
+
children: e.description
|
|
439
|
+
}) : null]
|
|
440
|
+
})
|
|
441
|
+
}, `${t}:${e.id}`);
|
|
442
|
+
}) })
|
|
443
|
+
] })]
|
|
444
|
+
})]
|
|
445
|
+
}) : null;
|
|
446
|
+
}
|
|
447
|
+
//#endregion
|
|
448
|
+
//#region src/components/features/mentions/partials/mention-inline-suggestions.tsx
|
|
449
|
+
function Y({ open: n, activeKind: a, setActiveKind: p, kinds: m, resources: h, suggestionsByKind: g, suggestions: _, loading: v, query: y, onManualKindChange: b, onSelect: x, strings: S, className: C }) {
|
|
450
|
+
let w = e(q, S);
|
|
451
|
+
return n ? /* @__PURE__ */ N("div", {
|
|
452
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
453
|
+
className: t("mention-inline-suggestions--component", u.surface, "absolute left-0 top-full z-50 mt-space-xs w-80 max-w-[min(theme(spacing.96),100%)]", "overflow-hidden", C),
|
|
454
|
+
children: [/* @__PURE__ */ M("div", {
|
|
455
|
+
className: t("mention-inline-suggestions--header", u.menuRegion, c.anchored.header),
|
|
456
|
+
children: /* @__PURE__ */ N(s, {
|
|
457
|
+
gap: "sm",
|
|
458
|
+
className: "px-row-x",
|
|
459
|
+
children: [/* @__PURE__ */ N(s, {
|
|
460
|
+
direction: "horizontal",
|
|
461
|
+
align: "baseline",
|
|
462
|
+
justify: "between",
|
|
463
|
+
gap: "md",
|
|
464
|
+
children: [/* @__PURE__ */ M(r, { children: w.title }), y ? /* @__PURE__ */ N(i, {
|
|
465
|
+
tag: "span",
|
|
466
|
+
size: "xs",
|
|
467
|
+
type: "secondary",
|
|
468
|
+
className: "truncate font-mono",
|
|
469
|
+
children: [
|
|
470
|
+
"“",
|
|
471
|
+
y,
|
|
472
|
+
"”"
|
|
473
|
+
]
|
|
474
|
+
}) : null]
|
|
475
|
+
}), m.length > 1 && /* @__PURE__ */ M(G, {
|
|
476
|
+
kinds: m,
|
|
477
|
+
activeKind: a,
|
|
478
|
+
resources: h,
|
|
479
|
+
counts: g,
|
|
480
|
+
onKindChange: (e) => {
|
|
481
|
+
p(e), b?.();
|
|
482
|
+
}
|
|
483
|
+
})]
|
|
484
|
+
})
|
|
485
|
+
}), /* @__PURE__ */ N("div", {
|
|
486
|
+
className: t("mention-inline-suggestions--list max-h-72 overflow-y-auto", u.menu),
|
|
487
|
+
..._.length > 0 ? {
|
|
488
|
+
role: "listbox",
|
|
489
|
+
"aria-label": w.title
|
|
490
|
+
} : {},
|
|
491
|
+
children: [
|
|
492
|
+
v ? /* @__PURE__ */ N(s, {
|
|
493
|
+
direction: "horizontal",
|
|
494
|
+
align: "center",
|
|
495
|
+
gap: "sm",
|
|
496
|
+
className: "px-row-x py-row-y text-muted-foreground",
|
|
497
|
+
children: [/* @__PURE__ */ M(P, {
|
|
498
|
+
className: "size-icon-sm animate-spin",
|
|
499
|
+
"aria-hidden": !0
|
|
500
|
+
}), /* @__PURE__ */ M(i, {
|
|
501
|
+
tag: "span",
|
|
502
|
+
size: "xs",
|
|
503
|
+
type: "secondary",
|
|
504
|
+
children: w.loading
|
|
505
|
+
})]
|
|
506
|
+
}) : null,
|
|
507
|
+
!v && _.length === 0 ? /* @__PURE__ */ M(i, {
|
|
508
|
+
tag: "div",
|
|
509
|
+
size: "xs",
|
|
510
|
+
type: "secondary",
|
|
511
|
+
className: "px-row-x py-row-y",
|
|
512
|
+
children: w.empty
|
|
513
|
+
}) : null,
|
|
514
|
+
_.map((e) => {
|
|
515
|
+
let n = e.kind ?? a ?? "";
|
|
516
|
+
return /* @__PURE__ */ M("button", {
|
|
517
|
+
type: "button",
|
|
518
|
+
role: "option",
|
|
519
|
+
"aria-selected": !1,
|
|
520
|
+
"data-ref-id": `${n}:${e.id}`,
|
|
521
|
+
onClick: () => x(e),
|
|
522
|
+
className: t("mention-inline-suggestions--option w-full min-w-0 cursor-pointer border-0 bg-transparent text-left", l("compact"), d.interactive, f.rowHover, o.inset),
|
|
523
|
+
children: /* @__PURE__ */ N(s, {
|
|
524
|
+
gap: "dense",
|
|
525
|
+
className: "min-w-0 flex-1",
|
|
526
|
+
children: [/* @__PURE__ */ M(i, {
|
|
527
|
+
tag: "span",
|
|
528
|
+
weight: "medium",
|
|
529
|
+
className: "truncate",
|
|
530
|
+
children: e.label
|
|
531
|
+
}), e.description ? /* @__PURE__ */ M(i, {
|
|
532
|
+
tag: "span",
|
|
533
|
+
size: "xs",
|
|
534
|
+
type: "secondary",
|
|
535
|
+
className: "truncate",
|
|
536
|
+
children: e.description
|
|
537
|
+
}) : null]
|
|
538
|
+
})
|
|
539
|
+
}, `${n}:${e.id}`);
|
|
540
|
+
})
|
|
541
|
+
]
|
|
542
|
+
})]
|
|
543
|
+
}) : null;
|
|
544
|
+
}
|
|
545
|
+
//#endregion
|
|
546
|
+
//#region src/components/features/mentions/utils/parse-mentions-from-html.ts
|
|
547
|
+
var X = /<(?:span|a)\b[^>]*?data-ref-id\s*=\s*"([^"]+)"[^>]*?>([\s\S]*?)<\/(?:span|a)>/gi, Z = /data-ref-kind\s*=\s*"([^"]+)"/i;
|
|
548
|
+
function Q(e) {
|
|
549
|
+
let t = [];
|
|
550
|
+
if (!e) return t;
|
|
551
|
+
let n = /* @__PURE__ */ new Set(), r;
|
|
552
|
+
for (X.lastIndex = 0; (r = X.exec(e)) !== null;) {
|
|
553
|
+
let [e, i, a] = r;
|
|
554
|
+
if (n.has(i)) continue;
|
|
555
|
+
n.add(i);
|
|
556
|
+
let o = e.match(Z)?.[1] ?? i.split(":")[0] ?? "", s = (a ?? "").replace(/<[^>]*>/g, "").replace(/ /g, " ").replace(/^[@#$&%!~]\s*/, "").trim();
|
|
557
|
+
t.push({
|
|
558
|
+
id: i,
|
|
559
|
+
kind: o,
|
|
560
|
+
label: s
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
return t;
|
|
564
|
+
}
|
|
565
|
+
//#endregion
|
|
566
|
+
export { K as a, B as c, I as d, q as i, R as l, Y as n, W as o, J as r, H as s, Q as t, L as u };
|
|
567
|
+
|
|
568
|
+
//# sourceMappingURL=mentions-D-uyCh01.js.map
|