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
|
@@ -1,564 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useStrings as e } from "./lib/strings.js";
|
|
3
|
-
import { t } from "./utils-Cospvlj1.js";
|
|
4
|
-
import { a as n, s as r, t as i } from "./typography-CAr3dQhX.js";
|
|
5
|
-
import { t as a } from "./button-BS3KDg00.js";
|
|
6
|
-
import { t as o } from "./structure-hzCW-XsV.js";
|
|
7
|
-
import { t as s } from "./sanitize-html-BG9FGe-j.js";
|
|
8
|
-
import { t as c } from "./content-typography-CnwgMJ37.js";
|
|
9
|
-
import { t as l } from "./badge-0tATj-tW.js";
|
|
10
|
-
import { a as u, i as d, n as f, o as p, r as m, t as h } from "./command-kPMPjIxJ.js";
|
|
11
|
-
import { i as g, t as _ } from "./popover-Dcv_9jxr.js";
|
|
12
|
-
import { t as v } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
13
|
-
import { Fragment as y, useCallback as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
14
|
-
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
15
|
-
import { Loader2 as O } from "lucide-react";
|
|
16
|
-
//#region src/components/features/mentions/hooks/use-mentions-search.ts
|
|
17
|
-
function k(e) {
|
|
18
|
-
return !!(e && e.name === "AbortError");
|
|
19
|
-
}
|
|
20
|
-
function A(e = {}) {
|
|
21
|
-
let { resources: t, onResourceSearch: n, initialMentions: r, debounceMs: i = 300, onError: a } = e, o = JSON.stringify(Object.keys(t ?? {})), s = S(() => JSON.parse(o), [o]), [c, l] = w(() => s[0] ?? null), [u, d] = w(!1), [f, p] = w(""), [m, h] = w({}), [g, _] = w(!1), [y, T] = w(null), [E, D] = w({}), [O, A] = w(0), [j, M] = w(() => r ? [...r] : []), N = C(0), P = C(null), F = C(t), I = C(n), L = C(a);
|
|
22
|
-
F.current = t, I.current = n, L.current = a, x(() => {
|
|
23
|
-
if (s.length === 0) {
|
|
24
|
-
l(null);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
(!c || !s.includes(c)) && l(s[0]);
|
|
28
|
-
}, [c, s]);
|
|
29
|
-
let R = S(() => c && t ? t[c] ?? null : null, [c, t]), z = b(async (e, t, n) => {
|
|
30
|
-
let r = F.current?.[e];
|
|
31
|
-
if (r?.search) return (await r.search(t, {
|
|
32
|
-
kind: e,
|
|
33
|
-
signal: n
|
|
34
|
-
})).map((t) => ({
|
|
35
|
-
...t,
|
|
36
|
-
kind: e
|
|
37
|
-
}));
|
|
38
|
-
if (r?.suggestions) {
|
|
39
|
-
let n = r.suggestions;
|
|
40
|
-
return (t.trim().length === 0 ? n : n.filter((e) => e.label.toLowerCase().includes(t.toLowerCase()))).map((t) => ({
|
|
41
|
-
...t,
|
|
42
|
-
kind: e
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
return I.current ? (await I.current(t, e, {
|
|
46
|
-
kind: e,
|
|
47
|
-
signal: n
|
|
48
|
-
})).map((t) => ({
|
|
49
|
-
...t,
|
|
50
|
-
kind: e
|
|
51
|
-
})) : [];
|
|
52
|
-
}, []), B = v((e, t, n, r) => {
|
|
53
|
-
(async () => {
|
|
54
|
-
_(!0);
|
|
55
|
-
try {
|
|
56
|
-
let i = await Promise.all(e.map(async (e) => {
|
|
57
|
-
try {
|
|
58
|
-
return {
|
|
59
|
-
kind: e,
|
|
60
|
-
list: await z(e, t, r),
|
|
61
|
-
error: null
|
|
62
|
-
};
|
|
63
|
-
} catch (t) {
|
|
64
|
-
return {
|
|
65
|
-
kind: e,
|
|
66
|
-
list: [],
|
|
67
|
-
error: t
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}));
|
|
71
|
-
if (n !== N.current || r.aborted) return;
|
|
72
|
-
let a = {}, o = {}, s = null;
|
|
73
|
-
for (let e of i) a[e.kind] = e.list, e.error !== null && !k(e.error) && (o[e.kind] = e.error, s ??= e.error, L.current?.(e.error, {
|
|
74
|
-
query: t,
|
|
75
|
-
kind: e.kind
|
|
76
|
-
}));
|
|
77
|
-
h(a), D(o), T(s);
|
|
78
|
-
} finally {
|
|
79
|
-
n === N.current && !r.aborted && _(!1);
|
|
80
|
-
}
|
|
81
|
-
})();
|
|
82
|
-
}, i);
|
|
83
|
-
x(() => {
|
|
84
|
-
let e = new AbortController();
|
|
85
|
-
P.current = e;
|
|
86
|
-
let t = () => {
|
|
87
|
-
e.abort(), P.current === e && (P.current = null);
|
|
88
|
-
};
|
|
89
|
-
if (s.length === 0) return h({}), _(!1), T(null), D({}), t;
|
|
90
|
-
let n = ++N.current;
|
|
91
|
-
return T(null), D({}), B(s, f, n, e.signal), () => {
|
|
92
|
-
B.cancel(), t();
|
|
93
|
-
};
|
|
94
|
-
}, [
|
|
95
|
-
s,
|
|
96
|
-
f,
|
|
97
|
-
O,
|
|
98
|
-
B
|
|
99
|
-
]);
|
|
100
|
-
let V = b(() => {
|
|
101
|
-
A((e) => e + 1);
|
|
102
|
-
}, []);
|
|
103
|
-
x(() => {
|
|
104
|
-
if (u || !c || (m[c] ?? []).length > 0) return;
|
|
105
|
-
let e = s.find((e) => (m[e]?.length ?? 0) > 0);
|
|
106
|
-
e && e !== c && l(e);
|
|
107
|
-
}, [
|
|
108
|
-
c,
|
|
109
|
-
s,
|
|
110
|
-
u,
|
|
111
|
-
m
|
|
112
|
-
]);
|
|
113
|
-
let H = b((e) => {
|
|
114
|
-
l(e);
|
|
115
|
-
}, []), U = b((e) => {
|
|
116
|
-
p(e);
|
|
117
|
-
}, []), W = b((e) => {
|
|
118
|
-
M((t) => t.some((t) => t.id === e.id) ? t : [...t, e]);
|
|
119
|
-
}, []), G = b((e) => {
|
|
120
|
-
M((t) => t.filter((t) => t.id !== e));
|
|
121
|
-
}, []), K = b((e) => {
|
|
122
|
-
M([...e]);
|
|
123
|
-
}, []), q = b(() => {
|
|
124
|
-
P.current?.abort(), M([]), p(""), d(!1), h({}), _(!1), T(null), D({}), N.current++;
|
|
125
|
-
}, []), J = b((e) => {
|
|
126
|
-
let n = e.kind ?? c, r = `${n}:${e.id}`, i = t?.[n], a = e.href ?? i?.buildHref?.(e), o = {
|
|
127
|
-
id: r,
|
|
128
|
-
kind: n,
|
|
129
|
-
label: e.label,
|
|
130
|
-
href: a,
|
|
131
|
-
data: e.data
|
|
132
|
-
};
|
|
133
|
-
return W(o), o;
|
|
134
|
-
}, [
|
|
135
|
-
c,
|
|
136
|
-
W,
|
|
137
|
-
t
|
|
138
|
-
]);
|
|
139
|
-
return {
|
|
140
|
-
kinds: s,
|
|
141
|
-
activeKind: c,
|
|
142
|
-
setActiveKind: H,
|
|
143
|
-
activeResource: R,
|
|
144
|
-
query: f,
|
|
145
|
-
setQuery: U,
|
|
146
|
-
suggestions: S(() => c ? m[c] ?? [] : [], [c, m]),
|
|
147
|
-
suggestionsByKind: m,
|
|
148
|
-
isLoading: g,
|
|
149
|
-
error: y,
|
|
150
|
-
isError: y !== null,
|
|
151
|
-
errorsByKind: E,
|
|
152
|
-
retry: V,
|
|
153
|
-
mentions: j,
|
|
154
|
-
addMention: W,
|
|
155
|
-
removeMention: G,
|
|
156
|
-
setMentions: K,
|
|
157
|
-
reset: q,
|
|
158
|
-
selectSuggestion: J,
|
|
159
|
-
manualKindOverride: u,
|
|
160
|
-
setManualKindOverride: d
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/components/features/mentions/utils/build-mention-html.ts
|
|
165
|
-
function j(e, t) {
|
|
166
|
-
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" ? "@" : "");
|
|
167
|
-
return `<span class="rsc-mention" data-ref-id="${r}" data-ref-kind="${i}"${a ? ` data-ref-tone="${a}"` : ""} contenteditable="false">${o}${n}</span> `;
|
|
168
|
-
}
|
|
169
|
-
//#endregion
|
|
170
|
-
//#region src/components/features/mentions/hooks/use-mentions.ts
|
|
171
|
-
function M(e = {}) {
|
|
172
|
-
let t = e.resources, n = e.onResourceSearch, r = A({
|
|
173
|
-
...e,
|
|
174
|
-
resources: t,
|
|
175
|
-
onResourceSearch: n
|
|
176
|
-
}), [i, a] = w(!1), [o, s] = w(!1), c = C(null), l = C(null), u = b((e) => {
|
|
177
|
-
a(e), e || (c.current = null, l.current = null, s(!1), r.setManualKindOverride(!1));
|
|
178
|
-
}, [r]), d = e.editorRef, f = b(() => {
|
|
179
|
-
if (!t) return;
|
|
180
|
-
let e = {};
|
|
181
|
-
for (let [n, r] of Object.entries(t)) {
|
|
182
|
-
let t = r?.trigger;
|
|
183
|
-
typeof t == "string" && t.length > 0 && (e[t] = n);
|
|
184
|
-
}
|
|
185
|
-
if (Object.keys(e).length === 0) return;
|
|
186
|
-
let n = d?.current?.getCaretContext();
|
|
187
|
-
if (!n) {
|
|
188
|
-
c.current && (c.current = null, u(!1));
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
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);
|
|
192
|
-
if (!f) {
|
|
193
|
-
c.current && (c.current = null, u(!1));
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
let p = f[1], m = f[2] ?? "", h = e[p], g = p.length + m.length;
|
|
197
|
-
c.current = {
|
|
198
|
-
kind: h,
|
|
199
|
-
triggerChar: p,
|
|
200
|
-
consumedLength: g
|
|
201
|
-
}, 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);
|
|
202
|
-
}, [
|
|
203
|
-
d,
|
|
204
|
-
t,
|
|
205
|
-
r,
|
|
206
|
-
u
|
|
207
|
-
]), p = b((e) => {
|
|
208
|
-
let n = r.selectSuggestion(e), i = c.current, a = t?.[n.kind]?.tone, o = j(n, {
|
|
209
|
-
triggerChar: i?.triggerChar,
|
|
210
|
-
tone: a
|
|
211
|
-
});
|
|
212
|
-
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;
|
|
213
|
-
}, [
|
|
214
|
-
d,
|
|
215
|
-
t,
|
|
216
|
-
r,
|
|
217
|
-
u
|
|
218
|
-
]);
|
|
219
|
-
return {
|
|
220
|
-
...r,
|
|
221
|
-
pickerOpen: i,
|
|
222
|
-
setPickerOpen: u,
|
|
223
|
-
triggerActive: o,
|
|
224
|
-
handleCaretChange: f,
|
|
225
|
-
pickSuggestion: p
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/components/features/mentions/partials/mention-chip.tsx
|
|
230
|
-
var N = {
|
|
231
|
-
primary: "secondary",
|
|
232
|
-
success: "success",
|
|
233
|
-
warning: "warning",
|
|
234
|
-
destructive: "destructive",
|
|
235
|
-
info: "info",
|
|
236
|
-
secondary: "secondary"
|
|
237
|
-
}, P = ({ mention: e, resource: n, asLink: a = !0, onClick: o, trailing: s, className: c }) => {
|
|
238
|
-
if (n?.renderChip) return /* @__PURE__ */ E(T, { children: n.renderChip(e) });
|
|
239
|
-
let u = N[n?.tone ?? "secondary"] ?? N.secondary, d = n?.icon, f = /* @__PURE__ */ D(l, {
|
|
240
|
-
tone: u,
|
|
241
|
-
size: "sm",
|
|
242
|
-
inline: !0,
|
|
243
|
-
"data-ref-id": e.id,
|
|
244
|
-
"data-ref-kind": e.kind,
|
|
245
|
-
className: t("mention-chip--component", "align-[-0.15em] cursor-default whitespace-nowrap", c),
|
|
246
|
-
children: [
|
|
247
|
-
d ? /* @__PURE__ */ E(d, {
|
|
248
|
-
className: "size-icon-sm shrink-0",
|
|
249
|
-
"aria-hidden": !0
|
|
250
|
-
}) : null,
|
|
251
|
-
/* @__PURE__ */ E(r, {
|
|
252
|
-
tag: "span",
|
|
253
|
-
size: "inherit",
|
|
254
|
-
weight: "medium",
|
|
255
|
-
lineHeight: "none",
|
|
256
|
-
className: "max-w-[14rem] truncate text-inherit",
|
|
257
|
-
children: e.label
|
|
258
|
-
}),
|
|
259
|
-
s
|
|
260
|
-
]
|
|
261
|
-
});
|
|
262
|
-
return a && e.href ? /* @__PURE__ */ E(i, {
|
|
263
|
-
href: e.href,
|
|
264
|
-
size: "inherit",
|
|
265
|
-
underline: !1,
|
|
266
|
-
target: "_blank",
|
|
267
|
-
rel: "noreferrer noopener",
|
|
268
|
-
onClick: o,
|
|
269
|
-
className: "inline align-baseline no-underline hover:opacity-90",
|
|
270
|
-
children: f
|
|
271
|
-
}) : o ? /* @__PURE__ */ E("span", {
|
|
272
|
-
onClick: o,
|
|
273
|
-
className: "inline align-baseline",
|
|
274
|
-
children: f
|
|
275
|
-
}) : f;
|
|
276
|
-
}, F = /<(span|a)\b([^>]*?)data-ref-id\s*=\s*"([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi;
|
|
277
|
-
function I(e) {
|
|
278
|
-
if (!e) return [];
|
|
279
|
-
let t = [], n = 0, r;
|
|
280
|
-
for (F.lastIndex = 0; (r = F.exec(e)) !== null;) {
|
|
281
|
-
let [i, , , a] = r, o = e.slice(n, r.index);
|
|
282
|
-
o.length > 0 && t.push({
|
|
283
|
-
kind: "html",
|
|
284
|
-
value: o
|
|
285
|
-
}), t.push({
|
|
286
|
-
kind: "mention",
|
|
287
|
-
refId: a,
|
|
288
|
-
fallback: i
|
|
289
|
-
}), n = r.index + i.length;
|
|
290
|
-
}
|
|
291
|
-
let i = e.slice(n);
|
|
292
|
-
return i.length > 0 && t.push({
|
|
293
|
-
kind: "html",
|
|
294
|
-
value: i
|
|
295
|
-
}), t;
|
|
296
|
-
}
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region src/components/features/mentions/partials/mention-content.tsx
|
|
299
|
-
var L = c;
|
|
300
|
-
function R(e) {
|
|
301
|
-
let { html: n, mentions: i, resources: a, renderMention: o, sanitizer: c, className: l, prose: u = !0 } = e, d = a, f = c ? c(n ?? "") : s(n ?? ""), p = /* @__PURE__ */ new Map();
|
|
302
|
-
for (let e of i ?? []) p.set(e.id, e);
|
|
303
|
-
let m = p.size > 0 ? I(f) : [{
|
|
304
|
-
kind: "html",
|
|
305
|
-
value: f
|
|
306
|
-
}], h = (e) => {
|
|
307
|
-
if (o) return o(e);
|
|
308
|
-
let t = d?.[e.kind];
|
|
309
|
-
return /* @__PURE__ */ E(P, {
|
|
310
|
-
mention: e,
|
|
311
|
-
resource: t
|
|
312
|
-
});
|
|
313
|
-
}, g = m.map((e, t) => {
|
|
314
|
-
if (e.kind === "mention") {
|
|
315
|
-
let n = p.get(e.refId);
|
|
316
|
-
return n ? /* @__PURE__ */ E(y, { children: h(n) }, `ref-${t}-${e.refId}`) : /* @__PURE__ */ E("span", { dangerouslySetInnerHTML: { __html: e.fallback } }, `fallback-${t}`);
|
|
317
|
-
}
|
|
318
|
-
return /* @__PURE__ */ E("span", { dangerouslySetInnerHTML: { __html: e.value } }, `html-${t}`);
|
|
319
|
-
});
|
|
320
|
-
return u ? /* @__PURE__ */ E(r, {
|
|
321
|
-
tag: "div",
|
|
322
|
-
className: t("mention-content--component", L, l),
|
|
323
|
-
children: g
|
|
324
|
-
}) : /* @__PURE__ */ E(T, { children: g });
|
|
325
|
-
}
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/components/features/mentions/mentions.strings.ts
|
|
328
|
-
var z = {
|
|
329
|
-
title: "Insert reference",
|
|
330
|
-
searchPlaceholder: "Search…",
|
|
331
|
-
empty: "No matches.",
|
|
332
|
-
loading: "Searching…"
|
|
333
|
-
}, B = {
|
|
334
|
-
title: "Insert reference",
|
|
335
|
-
empty: "No matches.",
|
|
336
|
-
loading: "Searching…"
|
|
337
|
-
};
|
|
338
|
-
//#endregion
|
|
339
|
-
//#region src/components/features/mentions/partials/mention-picker.tsx
|
|
340
|
-
function V({ open: i, activeKind: s, setActiveKind: c, kinds: l, resources: v, query: y, setQuery: b, suggestions: x, loading: S, onSelect: C, strings: w, className: T }) {
|
|
341
|
-
let k = e(z, w);
|
|
342
|
-
return i ? /* @__PURE__ */ D(_, {
|
|
343
|
-
align: "start",
|
|
344
|
-
inset: "flush",
|
|
345
|
-
type: "menu",
|
|
346
|
-
className: t("mention-picker--component", "w-72 gap-0 overflow-hidden", T),
|
|
347
|
-
children: [/* @__PURE__ */ D(g, { children: [/* @__PURE__ */ E(n, { children: k.title }), l.length > 1 && /* @__PURE__ */ E("div", {
|
|
348
|
-
className: "mt-space-md flex flex-wrap gap-space-xs",
|
|
349
|
-
children: l.map((e) => {
|
|
350
|
-
let t = v?.[e], n = t?.icon, i = e === s;
|
|
351
|
-
return /* @__PURE__ */ D(a, {
|
|
352
|
-
type: "button",
|
|
353
|
-
"aria-pressed": i,
|
|
354
|
-
tone: i ? "primary" : "secondary",
|
|
355
|
-
buttonStyle: i ? "solid" : "ghost",
|
|
356
|
-
size: "sm",
|
|
357
|
-
onClick: () => c(e),
|
|
358
|
-
children: [n ? /* @__PURE__ */ E(n, { className: "size-icon" }) : null, /* @__PURE__ */ E(r, {
|
|
359
|
-
tag: "span",
|
|
360
|
-
weight: "medium",
|
|
361
|
-
className: "text-inherit",
|
|
362
|
-
children: t?.label ?? String(e)
|
|
363
|
-
})]
|
|
364
|
-
}, e);
|
|
365
|
-
})
|
|
366
|
-
})] }), /* @__PURE__ */ D(h, {
|
|
367
|
-
shouldFilter: !1,
|
|
368
|
-
inset: "flush",
|
|
369
|
-
className: "rounded-none",
|
|
370
|
-
children: [/* @__PURE__ */ E(d, {
|
|
371
|
-
placeholder: k.searchPlaceholder,
|
|
372
|
-
value: y,
|
|
373
|
-
onValueChange: b
|
|
374
|
-
}), /* @__PURE__ */ D(p, { children: [
|
|
375
|
-
S ? /* @__PURE__ */ D(o, {
|
|
376
|
-
direction: "horizontal",
|
|
377
|
-
align: "center",
|
|
378
|
-
justify: "center",
|
|
379
|
-
gap: "md",
|
|
380
|
-
className: "text-muted-foreground py-space-lg",
|
|
381
|
-
children: [/* @__PURE__ */ E(O, {
|
|
382
|
-
className: "size-icon-md animate-spin",
|
|
383
|
-
"aria-hidden": !0
|
|
384
|
-
}), /* @__PURE__ */ E(r, {
|
|
385
|
-
tag: "span",
|
|
386
|
-
size: "xs",
|
|
387
|
-
type: "secondary",
|
|
388
|
-
children: k.loading
|
|
389
|
-
})]
|
|
390
|
-
}) : null,
|
|
391
|
-
/* @__PURE__ */ E(f, { children: k.empty }),
|
|
392
|
-
/* @__PURE__ */ E(m, { children: x.map((e) => {
|
|
393
|
-
let t = e.kind ?? s ?? "";
|
|
394
|
-
return /* @__PURE__ */ E(u, {
|
|
395
|
-
value: `${t}:${e.id}`,
|
|
396
|
-
onSelect: () => C(e),
|
|
397
|
-
children: /* @__PURE__ */ D(o, {
|
|
398
|
-
gap: "dense",
|
|
399
|
-
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
400
|
-
children: [/* @__PURE__ */ E(r, {
|
|
401
|
-
tag: "span",
|
|
402
|
-
weight: "medium",
|
|
403
|
-
className: "truncate",
|
|
404
|
-
children: e.label
|
|
405
|
-
}), e.description ? /* @__PURE__ */ E(r, {
|
|
406
|
-
tag: "span",
|
|
407
|
-
size: "xs",
|
|
408
|
-
type: "secondary",
|
|
409
|
-
className: "truncate",
|
|
410
|
-
children: e.description
|
|
411
|
-
}) : null]
|
|
412
|
-
})
|
|
413
|
-
}, `${t}:${e.id}`);
|
|
414
|
-
}) })
|
|
415
|
-
] })]
|
|
416
|
-
})]
|
|
417
|
-
}) : null;
|
|
418
|
-
}
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region src/components/features/mentions/partials/mention-inline-suggestions.tsx
|
|
421
|
-
function H({ open: i, activeKind: s, setActiveKind: c, kinds: l, resources: u, suggestionsByKind: d, suggestions: f, loading: p, query: m, onManualKindChange: h, onSelect: g, strings: _, className: v }) {
|
|
422
|
-
let y = e(B, _);
|
|
423
|
-
return i ? /* @__PURE__ */ D("div", {
|
|
424
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
425
|
-
className: t("mention-inline-suggestions--component", "bg-popover text-popover-foreground absolute left-0 top-full z-40 mt-1 w-80 max-w-[min(theme(spacing.96),100%)]", "border-border/60 rounded-radius border shadow-md ring-1 ring-foreground/[0.04]", "overflow-hidden", v),
|
|
426
|
-
children: [/* @__PURE__ */ D("div", {
|
|
427
|
-
className: "border-b border-border/60 p-surface",
|
|
428
|
-
children: [/* @__PURE__ */ D(o, {
|
|
429
|
-
direction: "horizontal",
|
|
430
|
-
align: "baseline",
|
|
431
|
-
justify: "between",
|
|
432
|
-
gap: "md",
|
|
433
|
-
className: "",
|
|
434
|
-
children: [/* @__PURE__ */ E(n, { children: y.title }), m ? /* @__PURE__ */ D(r, {
|
|
435
|
-
tag: "span",
|
|
436
|
-
size: "xs",
|
|
437
|
-
type: "secondary",
|
|
438
|
-
className: "truncate font-mono",
|
|
439
|
-
children: [
|
|
440
|
-
"“",
|
|
441
|
-
m,
|
|
442
|
-
"”"
|
|
443
|
-
]
|
|
444
|
-
}) : null]
|
|
445
|
-
}), l.length > 1 && /* @__PURE__ */ E("div", {
|
|
446
|
-
className: "mt-space-md flex flex-wrap gap-space-xs",
|
|
447
|
-
children: l.map((e) => {
|
|
448
|
-
let n = u?.[e], i = n?.icon, o = e === s, l = d?.[e]?.length ?? 0;
|
|
449
|
-
return /* @__PURE__ */ D(a, {
|
|
450
|
-
type: "button",
|
|
451
|
-
"aria-pressed": o,
|
|
452
|
-
tone: o ? "primary" : "secondary",
|
|
453
|
-
buttonStyle: o ? "solid" : "ghost",
|
|
454
|
-
size: "sm",
|
|
455
|
-
onClick: () => {
|
|
456
|
-
c(e), h?.();
|
|
457
|
-
},
|
|
458
|
-
className: t("gap-space-xs ring-1 ring-inset transition-colors", o ? "bg-primary text-primary-foreground ring-primary" : l > 0 ? "bg-muted text-foreground ring-border/60 hover:bg-muted/80" : "bg-muted/40 text-muted-foreground ring-border/40 hover:bg-muted/60"),
|
|
459
|
-
children: [
|
|
460
|
-
i ? /* @__PURE__ */ E(i, { className: "size-icon-sm" }) : null,
|
|
461
|
-
/* @__PURE__ */ E(r, {
|
|
462
|
-
tag: "span",
|
|
463
|
-
weight: "medium",
|
|
464
|
-
className: "text-inherit",
|
|
465
|
-
children: n?.label ?? String(e)
|
|
466
|
-
}),
|
|
467
|
-
l > 0 && /* @__PURE__ */ E(r, {
|
|
468
|
-
tag: "span",
|
|
469
|
-
size: "xs",
|
|
470
|
-
weight: "medium",
|
|
471
|
-
className: t("text-inherit tabular-nums", o ? "opacity-90" : "opacity-70"),
|
|
472
|
-
children: l
|
|
473
|
-
})
|
|
474
|
-
]
|
|
475
|
-
}, e);
|
|
476
|
-
})
|
|
477
|
-
})]
|
|
478
|
-
}), /* @__PURE__ */ D("div", {
|
|
479
|
-
className: "mention-inline-suggestions--list max-h-72 overflow-y-auto p-surface-xs",
|
|
480
|
-
...f.length > 0 ? {
|
|
481
|
-
role: "listbox",
|
|
482
|
-
"aria-label": y.title
|
|
483
|
-
} : {},
|
|
484
|
-
children: [
|
|
485
|
-
p ? /* @__PURE__ */ D(o, {
|
|
486
|
-
direction: "horizontal",
|
|
487
|
-
align: "center",
|
|
488
|
-
justify: "center",
|
|
489
|
-
gap: "md",
|
|
490
|
-
className: "text-muted-foreground py-space-lg",
|
|
491
|
-
children: [/* @__PURE__ */ E(O, {
|
|
492
|
-
className: "size-icon-md animate-spin",
|
|
493
|
-
"aria-hidden": !0
|
|
494
|
-
}), /* @__PURE__ */ E(r, {
|
|
495
|
-
tag: "span",
|
|
496
|
-
size: "xs",
|
|
497
|
-
type: "secondary",
|
|
498
|
-
children: y.loading
|
|
499
|
-
})]
|
|
500
|
-
}) : null,
|
|
501
|
-
!p && f.length === 0 ? /* @__PURE__ */ E("div", {
|
|
502
|
-
className: "py-space-lg",
|
|
503
|
-
children: /* @__PURE__ */ E(r, {
|
|
504
|
-
type: "secondary",
|
|
505
|
-
children: y.empty
|
|
506
|
-
})
|
|
507
|
-
}) : null,
|
|
508
|
-
f.map((e) => {
|
|
509
|
-
let n = e.kind ?? s ?? "";
|
|
510
|
-
return /* @__PURE__ */ E(a, {
|
|
511
|
-
type: "button",
|
|
512
|
-
tone: "secondary",
|
|
513
|
-
buttonStyle: "ghost",
|
|
514
|
-
size: "md",
|
|
515
|
-
role: "option",
|
|
516
|
-
"data-ref-id": `${n}:${e.id}`,
|
|
517
|
-
onClick: () => g(e),
|
|
518
|
-
className: t("h-auto min-h-0 w-full min-w-0 justify-start gap-space-md px-control-sm py-row-y text-left", "hover:bg-muted/60 focus-visible:bg-muted/60 transition-colors"),
|
|
519
|
-
children: /* @__PURE__ */ D(o, {
|
|
520
|
-
gap: "dense",
|
|
521
|
-
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
522
|
-
children: [/* @__PURE__ */ E(r, {
|
|
523
|
-
tag: "span",
|
|
524
|
-
weight: "medium",
|
|
525
|
-
className: "truncate",
|
|
526
|
-
children: e.label
|
|
527
|
-
}), e.description ? /* @__PURE__ */ E(r, {
|
|
528
|
-
tag: "span",
|
|
529
|
-
size: "xs",
|
|
530
|
-
type: "secondary",
|
|
531
|
-
className: "truncate",
|
|
532
|
-
children: e.description
|
|
533
|
-
}) : null]
|
|
534
|
-
})
|
|
535
|
-
}, `${n}:${e.id}`);
|
|
536
|
-
})
|
|
537
|
-
]
|
|
538
|
-
})]
|
|
539
|
-
}) : null;
|
|
540
|
-
}
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region src/components/features/mentions/utils/parse-mentions-from-html.ts
|
|
543
|
-
var U = /<(?:span|a)\b[^>]*?data-ref-id\s*=\s*"([^"]+)"[^>]*?>([\s\S]*?)<\/(?:span|a)>/gi, W = /data-ref-kind\s*=\s*"([^"]+)"/i;
|
|
544
|
-
function G(e) {
|
|
545
|
-
let t = [];
|
|
546
|
-
if (!e) return t;
|
|
547
|
-
let n = /* @__PURE__ */ new Set(), r;
|
|
548
|
-
for (U.lastIndex = 0; (r = U.exec(e)) !== null;) {
|
|
549
|
-
let [e, i, a] = r;
|
|
550
|
-
if (n.has(i)) continue;
|
|
551
|
-
n.add(i);
|
|
552
|
-
let o = e.match(W)?.[1] ?? i.split(":")[0] ?? "", s = (a ?? "").replace(/<[^>]*>/g, "").replace(/ /g, " ").replace(/^[@#$&%!~]\s*/, "").trim();
|
|
553
|
-
t.push({
|
|
554
|
-
id: i,
|
|
555
|
-
kind: o,
|
|
556
|
-
label: s
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
return t;
|
|
560
|
-
}
|
|
561
|
-
//#endregion
|
|
562
|
-
export { z as a, P as c, A as d, B as i, M as l, H as n, R as o, V as r, I as s, G as t, j as u };
|
|
563
|
-
|
|
564
|
-
//# sourceMappingURL=mentions-DwnO1hh4.js.map
|