themelia-react-ui 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +417 -0
- package/README.md +67 -16
- package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
- package/dist/app-shell-BE_j8-AT.js.map +1 -0
- package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
- package/dist/attachment-q69dlt5Y.js.map +1 -0
- package/dist/auth-M3vGMgDR.js +723 -0
- package/dist/auth-M3vGMgDR.js.map +1 -0
- package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.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/buttons.js +3 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +33 -35
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +246 -222
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +94 -92
- 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/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +53 -53
- 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 +84 -82
- 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 +7 -7
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +228 -219
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +182 -212
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +665 -620
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +2 -2
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1439 -1553
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +88 -97
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
- package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
- package/dist/button-BS3KDg00.js +674 -0
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
- package/dist/button-R9CCoH7A.js.map +1 -0
- package/dist/buttons-DS0ZIwJ_.js +99 -0
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
- package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/chart-DwYRKKc-.js +152 -0
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
- package/dist/code-block-CD0B7M93.js.map +1 -0
- package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/combobox-6dvVny2q.js +272 -0
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/combobox-CB7039j7.js +865 -0
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.recipes.d.ts +10 -19
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
- package/dist/components/base/cards/card.recipes.d.ts +13 -5
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
- package/dist/components/base/cards/smart-card.types.d.ts +1 -1
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
- package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-field.d.ts +1 -0
- package/dist/components/base/forms/form-sizing.d.ts +35 -3
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/table/index.d.ts +1 -1
- package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/types.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/combobox/components/error-message.d.ts +1 -1
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
- package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.types.d.ts +9 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +46 -22
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.d.ts +0 -1
- package/dist/components/layout/page/page.types.d.ts +62 -6
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +13 -2
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +37 -5
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/container.recipes-D9t8MHR3.js +27 -0
- package/dist/container.recipes-D9t8MHR3.js.map +1 -0
- package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
- package/dist/containers-D_L4mTVb.js.map +1 -0
- package/dist/control-group-recipes-DBXmfh2E.js +21 -0
- package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
- package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
- package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/data-display-3xWQUnMA.js +1335 -0
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +177 -163
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +187 -183
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- 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 +25 -23
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +353 -355
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +346 -354
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +225 -227
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +29 -29
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +59 -58
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +898 -900
- 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 +1412 -1444
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +51 -49
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +103 -97
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +13 -13
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +187 -183
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +508 -503
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
- package/dist/form-field-VZRULhUK.js.map +1 -0
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
- package/dist/http-CdEIHyQf.js.map +1 -0
- package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
- package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-BoLm9Hks.js +20 -0
- package/dist/input-BoLm9Hks.js.map +1 -0
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/input-DhQdBnV3.js.map +1 -0
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.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 +46 -10
- package/dist/lib/control-group-recipes.d.ts +22 -0
- package/dist/lib/field-affordance-recipes.d.ts +70 -2
- package/dist/lib/field-state-recipes.d.ts +6 -4
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/navigation-row-recipes.d.ts +3 -2
- package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
- package/dist/lib/surface-recipes.d.ts +13 -8
- package/dist/lib/token-merge.generated.d.ts +144 -2
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +9 -4
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-DQUQ0m3O.js +201 -0
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
- package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/message-YfFmbXNP.js +127 -0
- package/dist/message-YfFmbXNP.js.map +1 -0
- package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/navigation-Cs1npsPm.js +300 -0
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
- package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
- package/dist/pagination-Cm0jqa3I.js.map +1 -0
- package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
- package/dist/popover-Dcv_9jxr.js.map +1 -0
- package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
- package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
- package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/rich-text-editor-CF8QYt5p.js +574 -0
- package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
- package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
- package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
- package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
- package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/smart-card-Bek-TwUp.js +599 -0
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/table-Dn4XSrSB.js +1444 -0
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/tabs-Dk8E_knt.js +189 -0
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/text-inputs-BFpku0Qd.js +331 -0
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +90 -124
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
- package/dist/usage-card-U0YBLTNT.js.map +1 -0
- package/dist/utils-Cospvlj1.js +4445 -0
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +123 -119
- package/docs/consumer-skill/examples/analytics.tsx +34 -0
- package/docs/consumer-skill/examples/app-layout.tsx +42 -14
- package/docs/consumer-skill/examples/detail.tsx +20 -5
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +37 -3
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/examples/website.tsx +56 -0
- package/docs/consumer-skill/references/analytics.md +70 -0
- package/docs/consumer-skill/references/composition.md +195 -9
- package/docs/consumer-skill/references/design-contract.md +33 -7
- package/docs/consumer-skill/references/discovery.md +80 -5
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +46 -1
- package/docs/consumer-skill/references/public-api.json +2083 -237
- package/docs/consumer-skill/references/review.md +74 -6
- package/docs/consumer-skill/references/theming.md +59 -8
- package/docs/consumer-skill/references/tokens.json +180 -9
- package/docs/consumer-skill/references/workflows.md +34 -0
- package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
- package/docs/consumer-skill/scripts/discovery.mjs +69 -9
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
- package/package.json +11 -6
- package/dist/accordion-B-5Focs8.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js +0 -265
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
- package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
- package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
- package/dist/app-shell-at8Kt4l_.js.map +0 -1
- package/dist/attachment-BO2R47wn.js.map +0 -1
- package/dist/auth-OFwWSAap.js +0 -704
- package/dist/auth-OFwWSAap.js.map +0 -1
- package/dist/avatar-Bpzty83c.js.map +0 -1
- package/dist/badge-BZXZT9wd.js.map +0 -1
- package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
- package/dist/button-BS6l5JUw.js.map +0 -1
- package/dist/buttons-Co6GavvM.js +0 -674
- package/dist/buttons-Co6GavvM.js.map +0 -1
- package/dist/chart-DVfcwQu6.js +0 -149
- package/dist/chart-DVfcwQu6.js.map +0 -1
- package/dist/checkbox-BavDRjF7.js +0 -34
- package/dist/checkbox-BavDRjF7.js.map +0 -1
- package/dist/choice-inputs-CC7XqPQO.js +0 -619
- package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
- package/dist/code-block-xHKbAJDj.js.map +0 -1
- package/dist/combobox-DEbdr-3u.js +0 -273
- package/dist/combobox-DEbdr-3u.js.map +0 -1
- package/dist/combobox-xv3yJbzl.js +0 -850
- package/dist/combobox-xv3yJbzl.js.map +0 -1
- package/dist/command-C0xe7u9B.js.map +0 -1
- package/dist/comments-DviPLnwy.js.map +0 -1
- package/dist/containers-6s-ucRQQ.js.map +0 -1
- package/dist/data-display-cWIRdeaf.js +0 -1129
- package/dist/data-display-cWIRdeaf.js.map +0 -1
- package/dist/date-BFNMnrS5.js +0 -140
- package/dist/date-BFNMnrS5.js.map +0 -1
- package/dist/date-picker-CA6ogMQB.js +0 -1521
- package/dist/date-picker-CA6ogMQB.js.map +0 -1
- package/dist/date-pickers-BPIKLdsD.js +0 -224
- package/dist/date-pickers-BPIKLdsD.js.map +0 -1
- package/dist/display-CFM5myut.js.map +0 -1
- package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
- package/dist/feedback-DWUkgEjR.js.map +0 -1
- package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
- package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-BhsUtsxW.js.map +0 -1
- package/dist/form-field-Bn7ZH1rA.js.map +0 -1
- package/dist/form-sizing-BWs70_a2.js +0 -100
- package/dist/form-sizing-BWs70_a2.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B7pzS25o.js.map +0 -1
- package/dist/forms-numeric-BUBxELBv.js +0 -867
- package/dist/forms-numeric-BUBxELBv.js.map +0 -1
- package/dist/header-C59QZyxV.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-WwYQZJzG.js +0 -202
- package/dist/input-WwYQZJzG.js.map +0 -1
- package/dist/input-ci9fIgFH.js +0 -20
- package/dist/input-ci9fIgFH.js.map +0 -1
- package/dist/item-pJ0GsOiJ.js +0 -257
- package/dist/item-pJ0GsOiJ.js.map +0 -1
- package/dist/media-gallery-DhDRgnVZ.js +0 -200
- package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
- package/dist/message-COsdEvXT.js +0 -108
- package/dist/message-COsdEvXT.js.map +0 -1
- package/dist/navigation-BUIn2Qxx.js.map +0 -1
- package/dist/navigation-DBEu4POU.js +0 -267
- package/dist/navigation-DBEu4POU.js.map +0 -1
- package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
- package/dist/number-BNT_BIzJ.js +0 -269
- package/dist/number-BNT_BIzJ.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-B11wZka6.js +0 -982
- package/dist/overlays-B11wZka6.js.map +0 -1
- package/dist/page-BV6ioQg3.js +0 -202
- package/dist/page-BV6ioQg3.js.map +0 -1
- package/dist/page-header-DQRa0jug.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-CoLDEg19.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js +0 -330
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/progress-BOe8l_FZ.js.map +0 -1
- package/dist/rich-text-editor-CoVrTiSv.js +0 -575
- package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
- package/dist/scroll-area-BheMQ270.js.map +0 -1
- package/dist/select-B2mb-qN2.js +0 -108
- package/dist/select-B2mb-qN2.js.map +0 -1
- package/dist/separator-Gk_WXH-l.js.map +0 -1
- package/dist/settings-BnCyyPOJ.js.map +0 -1
- package/dist/sheet-B-q914Ad.js +0 -205
- package/dist/sheet-B-q914Ad.js.map +0 -1
- package/dist/sidebar-C_2p3Tfj.js +0 -501
- package/dist/sidebar-C_2p3Tfj.js.map +0 -1
- package/dist/sidebar-DPR7fmqN.js.map +0 -1
- package/dist/smart-card-CYLn46e6.js +0 -578
- package/dist/smart-card-CYLn46e6.js.map +0 -1
- package/dist/spinner-BY9HbUEh.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js +0 -27
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-BS39xnlq.js +0 -1424
- package/dist/table-BS39xnlq.js.map +0 -1
- package/dist/table-DnlAJ-xR.js +0 -146
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/tabs-B5cNMWiP.js +0 -187
- package/dist/tabs-B5cNMWiP.js.map +0 -1
- package/dist/text-inputs-Dh9XGyiS.js +0 -331
- package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-B9ICkQcV.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-Cv8MT-82.js +0 -96
- package/dist/typography-Cv8MT-82.js.map +0 -1
- package/dist/ui-provider-CftIB6TY.js.map +0 -1
- package/dist/upload-D8Za5x_c.js.map +0 -1
- package/dist/upload-queue-hIIYBLS7.js.map +0 -1
- package/dist/usage-card-DnmnJ58D.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-DX2dbxjj.js +0 -824
- package/dist/value-inputs-DX2dbxjj.js.map +0 -1
- package/dist/workspace-C1PZmk8L.js.map +0 -1
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e, o as t } from "./ui-provider-
|
|
2
|
+
import { a as e, o as t } from "./ui-provider-D2_TeLqw.js";
|
|
3
3
|
import { interpolateString as n, useStrings as r } from "./lib/strings.js";
|
|
4
|
-
import { t as i } from "./utils-
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import { t as p } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as _ } from "./
|
|
11
|
-
import { t as v } from "./
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { i as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { t as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
4
|
+
import { t as i } from "./utils-Cospvlj1.js";
|
|
5
|
+
import { t as a } from "./buttons-DS0ZIwJ_.js";
|
|
6
|
+
import { a as o, s, t as c } from "./typography-CAr3dQhX.js";
|
|
7
|
+
import { a as l, c as u, o as d, s as f, t as p } from "./button-BS3KDg00.js";
|
|
8
|
+
import { t as m } from "./structure-hzCW-XsV.js";
|
|
9
|
+
import { t as h } from "./row-recipes-DL8n7t_b.js";
|
|
10
|
+
import { i as g, t as _ } from "./overlays-DhZO7N-I.js";
|
|
11
|
+
import { t as v } from "./sanitize-html-BG9FGe-j.js";
|
|
12
|
+
import { t as y } from "./content-typography-CnwgMJ37.js";
|
|
13
|
+
import { t as b } from "./rich-text-j-FGAeZW.js";
|
|
14
|
+
import { g as x, i as S } from "./primitives-BHrwQXFC.js";
|
|
15
|
+
import { n as C, t as w } from "./number-CKRBYmZK.js";
|
|
16
|
+
import { i as ee } from "./date-uf3z37Nm.js";
|
|
17
|
+
import { i as T, n as E, s as D } from "./avatar-djdaaQ_s.js";
|
|
18
|
+
import { t as O } from "./badge-0tATj-tW.js";
|
|
19
|
+
import { t as k } from "./field-affordance-recipes-CkOCdE2y.js";
|
|
20
|
+
import { c as te, o as ne } from "./popover-Dcv_9jxr.js";
|
|
21
|
+
import { l as re } from "./data-display-3xWQUnMA.js";
|
|
22
|
+
import { t as ie } from "./rich-text-editor-CF8QYt5p.js";
|
|
23
|
+
import { l as A, n as ae, o as j, r as oe, t as se } from "./mentions-DwnO1hh4.js";
|
|
24
|
+
import { Fragment as M, createElement as ce, forwardRef as N, memo as P, useCallback as F, useEffect as I, useImperativeHandle as L, useMemo as R, useRef as z, useState as B } from "react";
|
|
22
25
|
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
23
|
-
import { AtSign as
|
|
26
|
+
import { AtSign as le, CornerDownRight as ue, File as W, FileText as de, Image as G, Loader2 as fe, MessageCircle as K, Paperclip as pe, Pencil as q, Pin as J, Smile as me, Trash2 as he, X as Y } from "lucide-react";
|
|
24
27
|
//#region src/components/features/comments/comments.strings.ts
|
|
25
|
-
var
|
|
28
|
+
var X = {
|
|
26
29
|
title: "Comments",
|
|
27
30
|
subtitle: "",
|
|
28
31
|
empty: "No comments yet.",
|
|
@@ -70,10 +73,10 @@ var J = {
|
|
|
70
73
|
};
|
|
71
74
|
//#endregion
|
|
72
75
|
//#region src/components/features/comments/comments-provider.tsx
|
|
73
|
-
function Y(e) {
|
|
74
|
-
return r(J, e);
|
|
75
|
-
}
|
|
76
76
|
function ge(e) {
|
|
77
|
+
return r(X, e);
|
|
78
|
+
}
|
|
79
|
+
function _e(e) {
|
|
77
80
|
let n = t();
|
|
78
81
|
return R(() => ({
|
|
79
82
|
getMediaUrl: e?.getMediaUrl,
|
|
@@ -84,16 +87,16 @@ function ge(e) {
|
|
|
84
87
|
}
|
|
85
88
|
//#endregion
|
|
86
89
|
//#region src/components/features/comments/hooks/use-comments.ts
|
|
87
|
-
function
|
|
88
|
-
let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a } = e, [o, s] = B({ kind: "idle" }), [c, l] = B(!1), u = z(!1), [d, f] = B({}), [p, m] = B(0), h =
|
|
90
|
+
function ve(e = {}) {
|
|
91
|
+
let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a } = e, [o, s] = B({ kind: "idle" }), [c, l] = B(!1), u = z(!1), [d, f] = B({}), [p, m] = B(0), h = F((e) => {
|
|
89
92
|
u.current = e, l(e);
|
|
90
|
-
}, []), g =
|
|
93
|
+
}, []), g = F(() => {
|
|
91
94
|
m((e) => e + 1), s({ kind: "idle" }), f({}), h(!1);
|
|
92
95
|
}, [h]), _ = R(() => ({
|
|
93
96
|
setErrors: f,
|
|
94
97
|
reset: g,
|
|
95
98
|
setSubmitting: h
|
|
96
|
-
}), [g, h]), v =
|
|
99
|
+
}), [g, h]), v = F((e) => {
|
|
97
100
|
try {
|
|
98
101
|
a?.(e);
|
|
99
102
|
} catch {}
|
|
@@ -103,23 +106,23 @@ function X(e = {}) {
|
|
|
103
106
|
isSubmitting: c,
|
|
104
107
|
formErrors: d,
|
|
105
108
|
resetKey: p,
|
|
106
|
-
startReply:
|
|
109
|
+
startReply: F((e) => {
|
|
107
110
|
e.id && (f({}), s({
|
|
108
111
|
kind: "replying",
|
|
109
112
|
commentId: e.id,
|
|
110
113
|
authorName: e.user?.name
|
|
111
114
|
}));
|
|
112
115
|
}, []),
|
|
113
|
-
startEdit:
|
|
116
|
+
startEdit: F((e) => {
|
|
114
117
|
e.id && (f({}), s({
|
|
115
118
|
kind: "editing",
|
|
116
119
|
comment: e
|
|
117
120
|
}));
|
|
118
121
|
}, []),
|
|
119
|
-
cancelComposerMode:
|
|
122
|
+
cancelComposerMode: F(() => {
|
|
120
123
|
g();
|
|
121
124
|
}, [g]),
|
|
122
|
-
submit:
|
|
125
|
+
submit: F(async (e) => {
|
|
123
126
|
if (o.kind === "editing" && o.comment.id) {
|
|
124
127
|
if (!n || u.current) return;
|
|
125
128
|
let t = {
|
|
@@ -158,7 +161,7 @@ function X(e = {}) {
|
|
|
158
161
|
v,
|
|
159
162
|
h
|
|
160
163
|
]),
|
|
161
|
-
deleteComment:
|
|
164
|
+
deleteComment: F(async (e) => {
|
|
162
165
|
if (r && e) try {
|
|
163
166
|
await r(e), i?.("delete", { commentId: e });
|
|
164
167
|
} catch (e) {
|
|
@@ -175,49 +178,49 @@ function X(e = {}) {
|
|
|
175
178
|
}
|
|
176
179
|
//#endregion
|
|
177
180
|
//#region src/components/features/comments/partials/comment-attachment-chip.tsx
|
|
178
|
-
function
|
|
179
|
-
return e.mimeType?.startsWith("image/") ?
|
|
181
|
+
function ye(e) {
|
|
182
|
+
return e.mimeType?.startsWith("image/") ? G : e.mimeType === "application/pdf" || e.mimeType?.startsWith("text/") ? de : e.mimeType ? W : pe;
|
|
180
183
|
}
|
|
181
|
-
var
|
|
182
|
-
let p = r(
|
|
184
|
+
var be = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: o, accessors: l, strings: u, compact: d = !1, className: f }) => {
|
|
185
|
+
let p = r(X, u), m = l?.getMediaUrl?.(e) ?? e.url, g = l?.getMediaName?.(e) ?? e.name ?? p.attachmentFallback, _ = ye(e), v = e.status === "uploading", y = e.status === "failed", b = v ? /* @__PURE__ */ U(x, {
|
|
183
186
|
size: "xs",
|
|
184
187
|
className: "shrink-0",
|
|
185
|
-
children: [p.attachmentUploadingLabel, typeof e.progress == "number" ? /* @__PURE__ */ U(V, { children: [" ", /* @__PURE__ */ H(
|
|
188
|
+
children: [p.attachmentUploadingLabel, typeof e.progress == "number" ? /* @__PURE__ */ U(V, { children: [" ", /* @__PURE__ */ H(C, {
|
|
186
189
|
value: Math.round(e.progress),
|
|
187
190
|
scaled: !0,
|
|
188
191
|
size: "xs",
|
|
189
192
|
align: "left",
|
|
190
193
|
type: "secondary"
|
|
191
194
|
})] }) : null]
|
|
192
|
-
}) :
|
|
195
|
+
}) : y ? /* @__PURE__ */ H(x, {
|
|
193
196
|
size: "xs",
|
|
194
197
|
className: "shrink-0",
|
|
195
198
|
children: e.error ?? p.attachmentFailedLabel
|
|
196
|
-
}) : typeof e.size == "number" ? /* @__PURE__ */ H(
|
|
199
|
+
}) : typeof e.size == "number" ? /* @__PURE__ */ H(S, {
|
|
197
200
|
value: e.size,
|
|
198
201
|
size: "xs",
|
|
199
202
|
className: "shrink-0"
|
|
200
|
-
}) : null,
|
|
203
|
+
}) : null, w = i("comment-attachment-chip--component", "relative inline-flex min-w-0 max-w-[20rem] items-center gap-space-sm rounded-radius", "ring-1 ring-inset transition-colors", d ? "px-control-xs" : "px-control-sm", h.compact, y ? "bg-destructive/[0.04] ring-destructive/30 hover:bg-destructive/[0.08]" : "bg-foreground/[0.03] ring-border/60 hover:bg-foreground/[0.06]", f), ee = v ? /* @__PURE__ */ H(fe, {
|
|
201
204
|
className: i("shrink-0 animate-spin text-muted-foreground", "size-icon-md"),
|
|
202
205
|
"aria-hidden": !0
|
|
203
|
-
}) : /* @__PURE__ */ H(
|
|
204
|
-
className: i("shrink-0", "size-icon-md",
|
|
206
|
+
}) : /* @__PURE__ */ H(_, {
|
|
207
|
+
className: i("shrink-0", "size-icon-md", y ? "text-destructive" : "text-muted-foreground"),
|
|
205
208
|
"aria-hidden": !0
|
|
206
209
|
}), T = /* @__PURE__ */ U("span", {
|
|
207
210
|
className: "inline-flex min-w-0 items-baseline gap-space-sm",
|
|
208
|
-
children: [/* @__PURE__ */ H(
|
|
211
|
+
children: [/* @__PURE__ */ H(s, {
|
|
209
212
|
tag: "span",
|
|
210
213
|
size: "xs",
|
|
211
214
|
weight: "medium",
|
|
212
|
-
className: i("truncate",
|
|
213
|
-
children:
|
|
214
|
-
}),
|
|
215
|
+
className: i("truncate", y && "text-destructive"),
|
|
216
|
+
children: g
|
|
217
|
+
}), b]
|
|
215
218
|
});
|
|
216
219
|
return /* @__PURE__ */ U("div", {
|
|
217
|
-
className:
|
|
220
|
+
className: w,
|
|
218
221
|
children: [
|
|
219
|
-
|
|
220
|
-
m && !
|
|
222
|
+
ee,
|
|
223
|
+
m && !v && !y ? /* @__PURE__ */ H(c, {
|
|
221
224
|
href: m,
|
|
222
225
|
size: "inherit",
|
|
223
226
|
underline: !1,
|
|
@@ -227,21 +230,19 @@ var ve = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: a, accessors:
|
|
|
227
230
|
"aria-label": p.attachmentDownloadLabel,
|
|
228
231
|
children: T
|
|
229
232
|
}) : T,
|
|
230
|
-
|
|
233
|
+
v && typeof e.progress == "number" && /* @__PURE__ */ H("div", {
|
|
231
234
|
className: "bg-primary/15 absolute bottom-0 left-2 right-2 h-px overflow-hidden rounded-full",
|
|
232
235
|
children: /* @__PURE__ */ H("div", {
|
|
233
236
|
className: "bg-primary h-full transition-[width]",
|
|
234
237
|
style: { width: `${Math.min(100, Math.max(0, e.progress))}%` }
|
|
235
238
|
})
|
|
236
239
|
}),
|
|
237
|
-
|
|
240
|
+
y && o && /* @__PURE__ */ H(a, {
|
|
238
241
|
type: "button",
|
|
239
|
-
tone: "destructive",
|
|
240
|
-
buttonStyle: "ghost",
|
|
241
242
|
size: "sm",
|
|
242
|
-
onClick: () =>
|
|
243
|
-
className: "
|
|
244
|
-
children: /* @__PURE__ */ H(
|
|
243
|
+
onClick: () => o(e.id),
|
|
244
|
+
className: "shrink-0 text-destructive decoration-destructive/30 hover:decoration-destructive/60",
|
|
245
|
+
children: /* @__PURE__ */ H(s, {
|
|
245
246
|
tag: "span",
|
|
246
247
|
size: "xs",
|
|
247
248
|
weight: "medium",
|
|
@@ -249,287 +250,308 @@ var ve = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: a, accessors:
|
|
|
249
250
|
children: p.attachmentRetryLabel
|
|
250
251
|
})
|
|
251
252
|
}),
|
|
252
|
-
t && n && /* @__PURE__ */ H(
|
|
253
|
+
t && n && /* @__PURE__ */ H("button", {
|
|
253
254
|
type: "button",
|
|
254
|
-
tone: "secondary",
|
|
255
|
-
buttonStyle: "ghost",
|
|
256
|
-
size: "sm",
|
|
257
|
-
iconOnly: !0,
|
|
258
255
|
onClick: () => n(e.id),
|
|
259
|
-
className:
|
|
256
|
+
className: i(k.target, k.focus, k.toggle),
|
|
260
257
|
"aria-label": p.attachmentRemoveLabel,
|
|
261
258
|
title: p.attachmentRemoveLabel,
|
|
262
|
-
children: /* @__PURE__ */ H(
|
|
259
|
+
children: /* @__PURE__ */ H(Y, {
|
|
260
|
+
className: k.icon,
|
|
261
|
+
"aria-hidden": "true"
|
|
262
|
+
})
|
|
263
263
|
})
|
|
264
264
|
]
|
|
265
265
|
});
|
|
266
|
+
}, xe = {
|
|
267
|
+
attachmentTooLargeError: X.attachmentTooLargeError,
|
|
268
|
+
attachmentTooManyError: X.attachmentTooManyError,
|
|
269
|
+
attachmentFailedLabel: X.attachmentFailedLabel
|
|
266
270
|
};
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
function Se(e = {}) {
|
|
272
|
+
let { onUpload: t, maxSize: n, maxFiles: i, disabled: a, initialAttachments: o, onValueChange: s, onError: c, strings: l } = e, u = r(xe, l), [d, f] = B(() => o ? [...o] : []), p = z(/* @__PURE__ */ new Map()), m = z(/* @__PURE__ */ new Map()), h = z(d), g = F((e) => {
|
|
273
|
+
let t = [...e];
|
|
274
|
+
h.current = t, f(t);
|
|
275
|
+
}, []), _ = z(s);
|
|
276
|
+
_.current = s;
|
|
277
|
+
let v = F((e, t) => {
|
|
278
|
+
g(h.current.map((n) => n.id === e ? {
|
|
274
279
|
...n,
|
|
275
280
|
...t
|
|
276
281
|
} : n));
|
|
277
|
-
}, []),
|
|
278
|
-
|
|
279
|
-
}, []),
|
|
280
|
-
if (!t) return;
|
|
282
|
+
}, [g]), y = F((e) => {
|
|
283
|
+
g(e);
|
|
284
|
+
}, [g]), b = F((e, n) => {
|
|
285
|
+
if (!t || !m.current.has(e)) return;
|
|
281
286
|
let r = new AbortController();
|
|
282
|
-
|
|
287
|
+
p.current.set(e, { controller: r }), v(e, {
|
|
283
288
|
status: "uploading",
|
|
284
289
|
progress: 0,
|
|
285
290
|
error: void 0
|
|
286
291
|
}), t({
|
|
287
292
|
file: n,
|
|
288
293
|
onProgress: (t) => {
|
|
289
|
-
|
|
294
|
+
r.signal.aborted || v(e, { progress: t });
|
|
290
295
|
},
|
|
291
296
|
signal: r.signal
|
|
292
297
|
}).then((t) => {
|
|
293
|
-
|
|
298
|
+
r.signal.aborted || (p.current.delete(e), v(e, {
|
|
294
299
|
...t,
|
|
295
300
|
id: e,
|
|
296
301
|
status: "uploaded",
|
|
297
302
|
progress: 100,
|
|
298
303
|
error: void 0
|
|
299
|
-
});
|
|
304
|
+
}));
|
|
300
305
|
}).catch((t) => {
|
|
301
|
-
if (
|
|
302
|
-
let n = t instanceof Error ? t.message :
|
|
303
|
-
|
|
306
|
+
if (p.current.delete(e), r.signal.aborted) return;
|
|
307
|
+
let n = t instanceof Error ? t.message : u.attachmentFailedLabel;
|
|
308
|
+
v(e, {
|
|
304
309
|
status: "failed",
|
|
305
310
|
error: n
|
|
306
|
-
}),
|
|
311
|
+
}), c?.(n);
|
|
307
312
|
});
|
|
308
313
|
}, [
|
|
309
|
-
|
|
314
|
+
c,
|
|
310
315
|
t,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
if (typeof n == "number" && e.size > n) {
|
|
323
|
-
s?.("File is too large.");
|
|
324
|
-
continue;
|
|
325
|
-
}
|
|
326
|
-
let i = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `att-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
327
|
-
d.current.set(i, e), t.push({
|
|
328
|
-
id: i,
|
|
329
|
-
name: e.name,
|
|
330
|
-
size: e.size,
|
|
331
|
-
mimeType: e.type,
|
|
332
|
-
status: "uploading",
|
|
333
|
-
progress: 0
|
|
334
|
-
}), queueMicrotask(() => h(i, e));
|
|
316
|
+
u.attachmentFailedLabel,
|
|
317
|
+
v
|
|
318
|
+
]), x = F((e) => {
|
|
319
|
+
if (a || !t) return;
|
|
320
|
+
let r = Array.from(e);
|
|
321
|
+
if (r.length === 0) return;
|
|
322
|
+
let o = [...h.current], s = [];
|
|
323
|
+
for (let e of r) {
|
|
324
|
+
if (typeof i == "number" && o.length >= i) {
|
|
325
|
+
c?.(u.attachmentTooManyError);
|
|
326
|
+
break;
|
|
335
327
|
}
|
|
336
|
-
|
|
337
|
-
|
|
328
|
+
if (typeof n == "number" && e.size > n) {
|
|
329
|
+
c?.(u.attachmentTooLargeError);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
let t = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `att-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
333
|
+
m.current.set(t, e), o.push({
|
|
334
|
+
id: t,
|
|
335
|
+
name: e.name,
|
|
336
|
+
size: e.size,
|
|
337
|
+
mimeType: e.type,
|
|
338
|
+
status: "uploading",
|
|
339
|
+
progress: 0
|
|
340
|
+
}), s.push({
|
|
341
|
+
id: t,
|
|
342
|
+
file: e
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
g(o);
|
|
346
|
+
for (let { id: e, file: t } of s) queueMicrotask(() => b(e, t));
|
|
338
347
|
}, [
|
|
339
|
-
|
|
348
|
+
b,
|
|
349
|
+
g,
|
|
350
|
+
a,
|
|
340
351
|
i,
|
|
341
|
-
r,
|
|
342
352
|
n,
|
|
343
|
-
|
|
344
|
-
t
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
353
|
+
c,
|
|
354
|
+
t,
|
|
355
|
+
u.attachmentTooLargeError,
|
|
356
|
+
u.attachmentTooManyError
|
|
357
|
+
]), S = F((e) => {
|
|
358
|
+
let t = p.current.get(e);
|
|
359
|
+
t && (t.controller.abort(), p.current.delete(e)), m.current.delete(e), g(h.current.filter((t) => t.id !== e));
|
|
360
|
+
}, [g]), C = F((e) => {
|
|
361
|
+
let t = m.current.get(e);
|
|
362
|
+
t && b(e, t);
|
|
363
|
+
}, [b]), w = F(() => {
|
|
364
|
+
for (let e of p.current.values()) e.controller.abort();
|
|
365
|
+
p.current.clear(), m.current.clear(), g([]);
|
|
366
|
+
}, [g]);
|
|
367
|
+
return I(() => {
|
|
368
|
+
_.current?.(d);
|
|
369
|
+
}, [d]), I(() => {
|
|
370
|
+
let e = p.current, t = m.current;
|
|
359
371
|
return () => {
|
|
360
372
|
for (let t of e.values()) t.controller.abort();
|
|
373
|
+
t.clear();
|
|
361
374
|
};
|
|
362
375
|
}, []), {
|
|
363
|
-
attachments:
|
|
364
|
-
uploadedAttachments: R(() =>
|
|
365
|
-
isUploading: R(() =>
|
|
366
|
-
addFiles:
|
|
367
|
-
removeAttachment:
|
|
368
|
-
retryAttachment:
|
|
369
|
-
setAttachments:
|
|
370
|
-
reset:
|
|
376
|
+
attachments: d,
|
|
377
|
+
uploadedAttachments: R(() => d.filter((e) => e.status === "uploaded" || !e.status), [d]),
|
|
378
|
+
isUploading: R(() => d.some((e) => e.status === "uploading"), [d]),
|
|
379
|
+
addFiles: x,
|
|
380
|
+
removeAttachment: S,
|
|
381
|
+
retryAttachment: C,
|
|
382
|
+
setAttachments: y,
|
|
383
|
+
reset: w
|
|
371
384
|
};
|
|
372
385
|
}
|
|
373
386
|
//#endregion
|
|
374
387
|
//#region src/components/features/comments/partials/comment-composer.tsx
|
|
375
|
-
function
|
|
388
|
+
function Ce(e) {
|
|
376
389
|
return !e || typeof e != "string" ? !1 : e.replace(/<[^>]*>/g, "").trim().length > 0;
|
|
377
390
|
}
|
|
378
|
-
var Z =
|
|
379
|
-
let C =
|
|
391
|
+
var Z = N(function({ context: e, canComment: t = !0, submitting: n = !1, errors: r, resetKey: i = 0, onSubmit: a, onCancel: o, editingComment: c, replyingTo: l, strings: u, resources: d, onResourceSearch: f, attachments: h, maxAttachments: g, allowAttachments: _, initialValues: v, autoFocus: y = !1, inlineSubmit: b = !0, placeholder: x }, S) {
|
|
392
|
+
let C = ge(u), w = d, ee = f, T = _ ?? !0, E = h?.maxFiles ?? g ?? 5, D = R(() => ({
|
|
380
393
|
...h,
|
|
381
|
-
maxFiles:
|
|
382
|
-
disabled: h?.disabled === !0 || !
|
|
394
|
+
maxFiles: E,
|
|
395
|
+
disabled: h?.disabled === !0 || !T
|
|
383
396
|
}), [
|
|
384
|
-
|
|
397
|
+
T,
|
|
385
398
|
h,
|
|
386
|
-
|
|
387
|
-
]),
|
|
399
|
+
E
|
|
400
|
+
]), O = z(null), [k, re] = B(() => v?.content ?? c?.content ?? ""), [j, M] = B(null), [ce, N] = B(null), P = A({
|
|
388
401
|
resources: w,
|
|
389
|
-
onResourceSearch:
|
|
390
|
-
editorRef:
|
|
402
|
+
onResourceSearch: ee,
|
|
403
|
+
editorRef: O,
|
|
391
404
|
initialMentions: v?.references ?? c?.references
|
|
392
|
-
}),
|
|
393
|
-
...
|
|
394
|
-
initialAttachments: v?.attachments ?? void 0
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
405
|
+
}), F = Se({
|
|
406
|
+
...D,
|
|
407
|
+
initialAttachments: v?.attachments ?? void 0,
|
|
408
|
+
strings: C,
|
|
409
|
+
onError: N
|
|
410
|
+
}), V = () => {
|
|
411
|
+
F.reset(), N(null), o?.();
|
|
412
|
+
};
|
|
413
|
+
L(S, () => ({
|
|
414
|
+
focus: () => O.current?.focus(),
|
|
398
415
|
clear: () => {
|
|
399
|
-
|
|
416
|
+
O.current?.clear(), P.reset(), F.reset(), M(null), N(null);
|
|
400
417
|
},
|
|
401
418
|
setBody: (e) => {
|
|
402
|
-
|
|
419
|
+
O.current?.setHTML(e);
|
|
403
420
|
}
|
|
404
|
-
}), [
|
|
405
|
-
|
|
421
|
+
}), [F, P]), I(() => {
|
|
422
|
+
O.current?.setHTML(v?.content ?? ""), P.setMentions(v?.references ?? []), F.reset(), F.setAttachments(v?.attachments ?? []), M(null), N(null);
|
|
406
423
|
}, [
|
|
407
424
|
e.id,
|
|
408
425
|
e.type,
|
|
409
426
|
i
|
|
410
|
-
]),
|
|
427
|
+
]), I(() => {
|
|
411
428
|
if (!c) return;
|
|
412
|
-
|
|
429
|
+
O.current?.setHTML(c.content ?? ""), P.setMentions(c.references ?? []);
|
|
413
430
|
let e = (c.attachments ?? []).filter((e) => !!e);
|
|
414
|
-
|
|
415
|
-
}, [c?.id]),
|
|
416
|
-
r?.content &&
|
|
431
|
+
F.reset(), F.setAttachments(e), N(null);
|
|
432
|
+
}, [c?.id]), I(() => {
|
|
433
|
+
r?.content && M(r.content);
|
|
417
434
|
}, [r]);
|
|
418
|
-
let
|
|
419
|
-
if (t?.preventDefault(), n ||
|
|
420
|
-
let r =
|
|
421
|
-
if (!
|
|
422
|
-
|
|
435
|
+
let ue = (t) => {
|
|
436
|
+
if (t?.preventDefault(), n || F.isUploading) return;
|
|
437
|
+
let r = O.current?.getHTML() ?? k;
|
|
438
|
+
if (!Ce(r)) {
|
|
439
|
+
M(C.invalidContent);
|
|
423
440
|
return;
|
|
424
441
|
}
|
|
425
|
-
|
|
442
|
+
M(null), a({
|
|
426
443
|
content: r,
|
|
427
444
|
commentableId: e.id,
|
|
428
445
|
commentableType: e.type,
|
|
429
446
|
moduleKey: e.moduleKey,
|
|
430
447
|
contentType: "html",
|
|
431
|
-
references:
|
|
432
|
-
attachments:
|
|
448
|
+
references: P.mentions,
|
|
449
|
+
attachments: F.uploadedAttachments,
|
|
433
450
|
replyToId: l?.commentId ?? v?.replyToId,
|
|
434
451
|
editingId: c?.id
|
|
435
452
|
});
|
|
436
|
-
},
|
|
437
|
-
e &&
|
|
438
|
-
},
|
|
453
|
+
}, W = z(null), de = () => W.current?.click(), G = (e) => {
|
|
454
|
+
e?.length && (N(null), F.addFiles(e));
|
|
455
|
+
}, K = F.attachments.length > 0, q = !!c, J = !q && !!l, me = n ? C.composerSubmitting : q ? C.composerSave : C.composerSubmit, he = q ? /* @__PURE__ */ H(we, {
|
|
439
456
|
label: C.composerEditingEyebrow,
|
|
440
457
|
closeLabel: C.composerCancel,
|
|
441
|
-
onClose: o
|
|
442
|
-
}) :
|
|
443
|
-
label:
|
|
458
|
+
onClose: o ? V : void 0
|
|
459
|
+
}) : J ? /* @__PURE__ */ H(we, {
|
|
460
|
+
label: Q(C.composerReplyingEyebrow, l.authorName),
|
|
444
461
|
closeLabel: C.composerCancel,
|
|
445
|
-
onClose: o
|
|
446
|
-
}) : null,
|
|
462
|
+
onClose: o ? V : void 0
|
|
463
|
+
}) : null, Y = R(() => {
|
|
447
464
|
let e = [];
|
|
448
465
|
return w && Object.keys(w).length > 0 && e.push({
|
|
449
466
|
id: "reference",
|
|
450
|
-
icon:
|
|
467
|
+
icon: le,
|
|
451
468
|
label: C.composerReferenceLabel,
|
|
452
|
-
onClick: () =>
|
|
453
|
-
}),
|
|
469
|
+
onClick: () => P.setPickerOpen(!0)
|
|
470
|
+
}), D?.onUpload && !D.disabled && e.push({
|
|
454
471
|
id: "attachment",
|
|
455
|
-
icon:
|
|
472
|
+
icon: pe,
|
|
456
473
|
label: C.composerAttachmentLabel,
|
|
457
|
-
onClick:
|
|
474
|
+
onClick: de
|
|
458
475
|
}), e;
|
|
459
476
|
}, [
|
|
460
477
|
w,
|
|
461
|
-
|
|
462
|
-
|
|
478
|
+
D?.onUpload,
|
|
479
|
+
D?.disabled,
|
|
463
480
|
C.composerReferenceLabel,
|
|
464
481
|
C.composerAttachmentLabel
|
|
465
482
|
]);
|
|
466
483
|
if (!t) return null;
|
|
467
|
-
let
|
|
484
|
+
let X = /* @__PURE__ */ H(p, {
|
|
485
|
+
tone: "primary",
|
|
468
486
|
type: "button",
|
|
469
|
-
onClick: () =>
|
|
470
|
-
disabled: n ||
|
|
471
|
-
icon: n ?
|
|
487
|
+
onClick: () => ue(),
|
|
488
|
+
disabled: n || F.isUploading,
|
|
489
|
+
icon: n ? fe : void 0,
|
|
472
490
|
children: me
|
|
473
|
-
}),
|
|
491
|
+
}), _e = q || J || o ? /* @__PURE__ */ H(p, {
|
|
474
492
|
type: "button",
|
|
475
493
|
tone: "secondary",
|
|
476
494
|
buttonStyle: "ghost",
|
|
477
|
-
onClick:
|
|
495
|
+
onClick: V,
|
|
478
496
|
disabled: n,
|
|
479
497
|
children: C.composerCancel
|
|
480
|
-
}) : null,
|
|
498
|
+
}) : null, ve = K ? /* @__PURE__ */ H(m, {
|
|
481
499
|
direction: "horizontal",
|
|
482
500
|
wrap: !0,
|
|
483
501
|
align: "center",
|
|
484
502
|
gap: "sm",
|
|
485
|
-
children:
|
|
503
|
+
children: F.attachments.map((e) => /* @__PURE__ */ H(be, {
|
|
486
504
|
attachment: e,
|
|
487
505
|
editable: !0,
|
|
488
|
-
onRemove:
|
|
489
|
-
|
|
490
|
-
|
|
506
|
+
onRemove: (e) => {
|
|
507
|
+
N(null), F.removeAttachment(e);
|
|
508
|
+
},
|
|
509
|
+
onRetry: (e) => {
|
|
510
|
+
N(null), F.retryAttachment(e);
|
|
511
|
+
},
|
|
512
|
+
strings: u
|
|
491
513
|
}, e.id))
|
|
492
|
-
}) : null,
|
|
493
|
-
return /* @__PURE__ */ U(
|
|
514
|
+
}) : null, ye = K ? ve : null, xe = b !== !1 && !q && !J ? X : null, Z = b === !1 || q || J;
|
|
515
|
+
return /* @__PURE__ */ U(m, {
|
|
494
516
|
render: /* @__PURE__ */ H("form", {}),
|
|
495
517
|
gap: "md",
|
|
496
|
-
onSubmit:
|
|
518
|
+
onSubmit: ue,
|
|
497
519
|
className: "comment-composer--component",
|
|
498
520
|
children: [
|
|
499
521
|
he,
|
|
500
522
|
/* @__PURE__ */ H("input", {
|
|
501
|
-
ref:
|
|
523
|
+
ref: W,
|
|
502
524
|
type: "file",
|
|
503
525
|
multiple: !0,
|
|
504
526
|
hidden: !0,
|
|
505
|
-
accept:
|
|
527
|
+
accept: D?.accept,
|
|
506
528
|
onChange: (e) => {
|
|
507
|
-
|
|
529
|
+
G(e.target.files), e.target.value = "";
|
|
508
530
|
}
|
|
509
531
|
}),
|
|
510
|
-
!
|
|
511
|
-
open:
|
|
512
|
-
onOpenChange:
|
|
513
|
-
children: [/* @__PURE__ */ H(
|
|
532
|
+
!P.triggerActive && /* @__PURE__ */ U(ne, {
|
|
533
|
+
open: P.pickerOpen,
|
|
534
|
+
onOpenChange: P.setPickerOpen,
|
|
535
|
+
children: [/* @__PURE__ */ H(te, { render: /* @__PURE__ */ H(p, {
|
|
514
536
|
type: "button",
|
|
515
537
|
tone: "secondary",
|
|
516
538
|
buttonStyle: "ghost",
|
|
517
539
|
className: "sr-only",
|
|
518
540
|
tabIndex: -1,
|
|
519
541
|
children: C.composerReferenceLabel
|
|
520
|
-
}) }), /* @__PURE__ */ H(
|
|
521
|
-
open:
|
|
522
|
-
activeKind:
|
|
542
|
+
}) }), /* @__PURE__ */ H(oe, {
|
|
543
|
+
open: P.pickerOpen,
|
|
544
|
+
activeKind: P.activeKind,
|
|
523
545
|
setActiveKind: (e) => {
|
|
524
|
-
|
|
546
|
+
P.setActiveKind(e), P.setManualKindOverride(!0);
|
|
525
547
|
},
|
|
526
|
-
kinds:
|
|
548
|
+
kinds: P.kinds,
|
|
527
549
|
resources: w,
|
|
528
|
-
query:
|
|
529
|
-
setQuery:
|
|
530
|
-
suggestions:
|
|
531
|
-
loading:
|
|
532
|
-
onSelect:
|
|
550
|
+
query: P.query,
|
|
551
|
+
setQuery: P.setQuery,
|
|
552
|
+
suggestions: P.suggestions,
|
|
553
|
+
loading: P.isLoading,
|
|
554
|
+
onSelect: P.pickSuggestion,
|
|
533
555
|
strings: {
|
|
534
556
|
title: C.composerReferenceMenuTitle,
|
|
535
557
|
searchPlaceholder: C.composerReferenceSearchPlaceholder,
|
|
@@ -540,38 +562,38 @@ var Z = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors:
|
|
|
540
562
|
}),
|
|
541
563
|
/* @__PURE__ */ U("div", {
|
|
542
564
|
className: "comment-composer--editor relative",
|
|
543
|
-
children: [/* @__PURE__ */ H(
|
|
544
|
-
ref:
|
|
545
|
-
value:
|
|
565
|
+
children: [/* @__PURE__ */ H(ie, {
|
|
566
|
+
ref: O,
|
|
567
|
+
value: k,
|
|
546
568
|
onValueChange: (e) => {
|
|
547
|
-
|
|
548
|
-
let t =
|
|
569
|
+
re(e);
|
|
570
|
+
let t = se(e), n = P.mentions;
|
|
549
571
|
if (n.map((e) => e.id).join("|") !== t.map((e) => e.id).join("|")) {
|
|
550
572
|
let e = new Map(n.map((e) => [e.id, e])), r = t.map((t) => e.get(t.id) ?? t);
|
|
551
|
-
|
|
573
|
+
P.setMentions(r);
|
|
552
574
|
}
|
|
553
575
|
},
|
|
554
576
|
placeholder: x ?? C.composerPlaceholder,
|
|
555
577
|
strings: { editorLabel: x ?? C.composerPlaceholder },
|
|
556
578
|
minHeight: "3rem",
|
|
557
|
-
autoFocus: y ||
|
|
558
|
-
extraToolbarItems:
|
|
559
|
-
toolbarTrailing:
|
|
560
|
-
footerSlot:
|
|
561
|
-
onCaretChange:
|
|
562
|
-
}), /* @__PURE__ */ H(
|
|
563
|
-
open:
|
|
564
|
-
activeKind:
|
|
579
|
+
autoFocus: y || q || J,
|
|
580
|
+
extraToolbarItems: Y,
|
|
581
|
+
toolbarTrailing: xe,
|
|
582
|
+
footerSlot: ye,
|
|
583
|
+
onCaretChange: P.handleCaretChange
|
|
584
|
+
}), /* @__PURE__ */ H(ae, {
|
|
585
|
+
open: P.triggerActive && P.pickerOpen,
|
|
586
|
+
activeKind: P.activeKind,
|
|
565
587
|
setActiveKind: (e) => {
|
|
566
|
-
|
|
588
|
+
P.setActiveKind(e), P.setManualKindOverride(!0);
|
|
567
589
|
},
|
|
568
|
-
kinds:
|
|
590
|
+
kinds: P.kinds,
|
|
569
591
|
resources: w,
|
|
570
|
-
query:
|
|
571
|
-
suggestions:
|
|
572
|
-
suggestionsByKind:
|
|
573
|
-
loading:
|
|
574
|
-
onSelect:
|
|
592
|
+
query: P.query,
|
|
593
|
+
suggestions: P.suggestions,
|
|
594
|
+
suggestionsByKind: P.suggestionsByKind,
|
|
595
|
+
loading: P.isLoading,
|
|
596
|
+
onSelect: P.pickSuggestion,
|
|
575
597
|
strings: {
|
|
576
598
|
title: C.composerReferenceMenuTitle,
|
|
577
599
|
empty: C.composerReferenceEmpty,
|
|
@@ -579,49 +601,55 @@ var Z = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors:
|
|
|
579
601
|
}
|
|
580
602
|
})]
|
|
581
603
|
}),
|
|
582
|
-
|
|
604
|
+
ce && /* @__PURE__ */ H(s, {
|
|
605
|
+
role: "alert",
|
|
583
606
|
size: "xs",
|
|
584
607
|
type: "error",
|
|
585
|
-
|
|
608
|
+
className: "comment-composer--attachment-error",
|
|
609
|
+
children: ce
|
|
586
610
|
}),
|
|
587
|
-
|
|
611
|
+
j && /* @__PURE__ */ H(s, {
|
|
612
|
+
size: "xs",
|
|
613
|
+
type: "error",
|
|
614
|
+
children: j
|
|
615
|
+
}),
|
|
616
|
+
Z && /* @__PURE__ */ U(m, {
|
|
588
617
|
direction: "horizontal",
|
|
589
618
|
align: "center",
|
|
590
619
|
justify: "end",
|
|
591
620
|
gap: "md",
|
|
592
621
|
className: "comment-composer--footer-actions",
|
|
593
|
-
children: [
|
|
622
|
+
children: [_e, X]
|
|
594
623
|
})
|
|
595
624
|
]
|
|
596
625
|
});
|
|
597
626
|
});
|
|
598
|
-
function
|
|
627
|
+
function we({ label: e, closeLabel: t, onClose: n }) {
|
|
599
628
|
return /* @__PURE__ */ U("div", {
|
|
600
|
-
className: "bg-muted/40 ring-border/60 flex items-center justify-between rounded px-
|
|
601
|
-
children: [/* @__PURE__ */ H(
|
|
629
|
+
className: i("comment-composer--eyebrow bg-muted/40 ring-border/60 flex min-w-0 items-center justify-between gap-space-sm rounded-radius px-row-x ring-1 ring-inset", h.compact),
|
|
630
|
+
children: [/* @__PURE__ */ H(o, { children: e }), n ? /* @__PURE__ */ H("button", {
|
|
602
631
|
type: "button",
|
|
603
|
-
tone: "secondary",
|
|
604
|
-
buttonStyle: "ghost",
|
|
605
|
-
size: "sm",
|
|
606
|
-
iconOnly: !0,
|
|
607
632
|
onClick: n,
|
|
608
|
-
className:
|
|
633
|
+
className: i(k.target, k.focus, k.toggle),
|
|
609
634
|
"aria-label": t,
|
|
610
|
-
children: /* @__PURE__ */ H(
|
|
635
|
+
children: /* @__PURE__ */ H(Y, {
|
|
636
|
+
className: k.icon,
|
|
637
|
+
"aria-hidden": "true"
|
|
638
|
+
})
|
|
611
639
|
}) : null]
|
|
612
640
|
});
|
|
613
641
|
}
|
|
614
|
-
function
|
|
642
|
+
function Q(e, t) {
|
|
615
643
|
return n(e, { name: t }, { missing: "empty" });
|
|
616
644
|
}
|
|
617
645
|
//#endregion
|
|
618
646
|
//#region src/components/features/comments/partials/comment-empty.tsx
|
|
619
|
-
var
|
|
620
|
-
let r =
|
|
621
|
-
return /* @__PURE__ */ H(
|
|
647
|
+
var $ = ({ strings: e, icon: t, className: n }) => {
|
|
648
|
+
let r = ge(e);
|
|
649
|
+
return /* @__PURE__ */ H(re, {
|
|
622
650
|
title: r.empty,
|
|
623
651
|
description: r.emptyHint || !1,
|
|
624
|
-
media: t ?? /* @__PURE__ */ H(
|
|
652
|
+
media: t ?? /* @__PURE__ */ H(K, {
|
|
625
653
|
className: "size-icon",
|
|
626
654
|
"aria-hidden": "true"
|
|
627
655
|
}),
|
|
@@ -632,10 +660,10 @@ var Q = ({ strings: e, icon: t, className: n }) => {
|
|
|
632
660
|
};
|
|
633
661
|
//#endregion
|
|
634
662
|
//#region src/components/features/comments/partials/comment-content.tsx
|
|
635
|
-
function
|
|
663
|
+
function Te(e) {
|
|
636
664
|
let { comment: t, resources: n, renderReference: r, sanitizer: i } = e, a = t.contentType ?? t.content_type ?? "text";
|
|
637
665
|
if (a === "rich") {
|
|
638
|
-
let e =
|
|
666
|
+
let e = Ee(t.content);
|
|
639
667
|
return e ? /* @__PURE__ */ H("div", {
|
|
640
668
|
className: "comment-content--component",
|
|
641
669
|
children: e
|
|
@@ -651,48 +679,48 @@ function Ce(e) {
|
|
|
651
679
|
sanitizer: i
|
|
652
680
|
})
|
|
653
681
|
});
|
|
654
|
-
let o =
|
|
655
|
-
return /* @__PURE__ */ H(
|
|
682
|
+
let o = ke(t.content ?? "");
|
|
683
|
+
return /* @__PURE__ */ H(s, {
|
|
656
684
|
className: "comment-content--component whitespace-pre-line",
|
|
657
685
|
children: o
|
|
658
686
|
});
|
|
659
687
|
}
|
|
660
|
-
function
|
|
688
|
+
function Ee(e) {
|
|
661
689
|
if (!e) return null;
|
|
662
690
|
try {
|
|
663
691
|
let t = JSON.parse(e);
|
|
664
|
-
return !t || !Array.isArray(t.blocks) || t.blocks.length === 0 ? null : /* @__PURE__ */ H(
|
|
692
|
+
return !t || !Array.isArray(t.blocks) || t.blocks.length === 0 ? null : /* @__PURE__ */ H(s, {
|
|
665
693
|
tag: "div",
|
|
666
|
-
className:
|
|
667
|
-
children: t.blocks.map((e, t) => /* @__PURE__ */ H(
|
|
694
|
+
className: y,
|
|
695
|
+
children: t.blocks.map((e, t) => /* @__PURE__ */ H(M, { children: De(e) }, e.id ?? `${e.type}-${t}`))
|
|
668
696
|
});
|
|
669
697
|
} catch {
|
|
670
|
-
let t =
|
|
671
|
-
return /* @__PURE__ */ H(
|
|
698
|
+
let t = ke(e);
|
|
699
|
+
return /* @__PURE__ */ H(s, {
|
|
672
700
|
className: "whitespace-pre-line",
|
|
673
701
|
children: t
|
|
674
702
|
});
|
|
675
703
|
}
|
|
676
704
|
}
|
|
677
|
-
function
|
|
705
|
+
function De(e) {
|
|
678
706
|
let t = e.data ?? {};
|
|
679
707
|
switch (e.type) {
|
|
680
708
|
case "paragraph": {
|
|
681
709
|
let e = String(t.text ?? "").trim();
|
|
682
710
|
if (!e) return null;
|
|
683
|
-
let n =
|
|
711
|
+
let n = v(e);
|
|
684
712
|
return n ? /* @__PURE__ */ H("p", { dangerouslySetInnerHTML: { __html: n } }) : null;
|
|
685
713
|
}
|
|
686
714
|
case "header": {
|
|
687
|
-
let e =
|
|
688
|
-
return e ?
|
|
715
|
+
let e = Oe(String(t.text ?? "")), n = Number(t.level ?? 3);
|
|
716
|
+
return e ? ce(`h${Math.min(Math.max(n, 1), 6)}`, null, e) : null;
|
|
689
717
|
}
|
|
690
718
|
case "list": {
|
|
691
|
-
let e = (Array.isArray(t.items) ? t.items : []).map((e) =>
|
|
692
|
-
return e.length === 0 ? null : t.style === "ordered" ? /* @__PURE__ */ H("ol", { children: e.map((e, t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(
|
|
719
|
+
let e = (Array.isArray(t.items) ? t.items : []).map((e) => Oe(String(e ?? ""))).filter((e) => e.length > 0);
|
|
720
|
+
return e.length === 0 ? null : t.style === "ordered" ? /* @__PURE__ */ H("ol", { children: e.map((e, t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(s, {
|
|
693
721
|
tag: "span",
|
|
694
722
|
children: e
|
|
695
|
-
}) }, `${e}-${t}`)) }) : /* @__PURE__ */ H("ul", { children: e.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(
|
|
723
|
+
}) }, `${e}-${t}`)) }) : /* @__PURE__ */ H("ul", { children: e.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(s, {
|
|
696
724
|
tag: "span",
|
|
697
725
|
children: e
|
|
698
726
|
}) }, e)) });
|
|
@@ -700,16 +728,16 @@ function Te(e) {
|
|
|
700
728
|
case "quote": {
|
|
701
729
|
let e = String(t.text ?? "").trim();
|
|
702
730
|
if (!e) return null;
|
|
703
|
-
let n =
|
|
731
|
+
let n = Oe(String(t.caption ?? ""));
|
|
704
732
|
return /* @__PURE__ */ U("blockquote", {
|
|
705
733
|
className: "italic",
|
|
706
|
-
children: [/* @__PURE__ */ H(
|
|
734
|
+
children: [/* @__PURE__ */ H(b, {
|
|
707
735
|
tag: "div",
|
|
708
736
|
html: e,
|
|
709
737
|
type: "secondary"
|
|
710
738
|
}), n.length > 0 && /* @__PURE__ */ H("cite", {
|
|
711
739
|
className: "mt-1 block not-italic",
|
|
712
|
-
children: /* @__PURE__ */ U(
|
|
740
|
+
children: /* @__PURE__ */ U(s, {
|
|
713
741
|
tag: "span",
|
|
714
742
|
size: "xs",
|
|
715
743
|
type: "secondary",
|
|
@@ -724,7 +752,7 @@ function Te(e) {
|
|
|
724
752
|
"aria-hidden": "true"
|
|
725
753
|
});
|
|
726
754
|
default: {
|
|
727
|
-
let e =
|
|
755
|
+
let e = Oe(String(t.text ?? ""));
|
|
728
756
|
return e ? /* @__PURE__ */ H("p", {
|
|
729
757
|
className: "whitespace-pre-line",
|
|
730
758
|
children: e
|
|
@@ -732,10 +760,10 @@ function Te(e) {
|
|
|
732
760
|
}
|
|
733
761
|
}
|
|
734
762
|
}
|
|
735
|
-
function
|
|
763
|
+
function Oe(e) {
|
|
736
764
|
return e.replace(/<[^>]*>/g, "").trim();
|
|
737
765
|
}
|
|
738
|
-
function
|
|
766
|
+
function ke(e) {
|
|
739
767
|
if (typeof e != "string") return "";
|
|
740
768
|
let t = e.trim();
|
|
741
769
|
if (t === "") return "";
|
|
@@ -748,151 +776,148 @@ function Ee(e) {
|
|
|
748
776
|
}
|
|
749
777
|
//#endregion
|
|
750
778
|
//#region src/components/features/comments/partials/comment-item.tsx
|
|
751
|
-
var
|
|
752
|
-
let
|
|
753
|
-
getMediaUrl:
|
|
754
|
-
getMediaName:
|
|
755
|
-
getStatusLabel:
|
|
756
|
-
formatRelativeTime:
|
|
757
|
-
}),
|
|
758
|
-
if (!
|
|
759
|
-
let e =
|
|
760
|
-
return e === "" ?
|
|
761
|
-
}, [
|
|
762
|
-
|
|
763
|
-
}, [
|
|
779
|
+
var Ae = "?", je = (e) => e?.url, Me = (e) => e?.name, Ne = (e) => e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "), Pe = P(function({ comment: e, canModerate: t, onDelete: r, onAttachmentRemove: a, onEdit: o, onPinToggle: c, onReact: h, onReply: v, allowReactions: y, allowReplies: b, sanitizer: x, strings: S, getMediaUrl: C, getMediaName: te, getStatusLabel: ne, formatRelativeTime: re, resources: ie, renderAttachment: A, renderReference: ae }) {
|
|
780
|
+
let j = ge(S), oe = y ?? !0, se = b ?? !0, M = _e({
|
|
781
|
+
getMediaUrl: C,
|
|
782
|
+
getMediaName: te,
|
|
783
|
+
getStatusLabel: ne,
|
|
784
|
+
formatRelativeTime: re
|
|
785
|
+
}), ce = M.getMediaUrl ?? je, N = M.getMediaName ?? Me, P = M.getStatusLabel ?? Ne, I = M.formatRelativeTime, L = e.user?.name ?? j.fallbackAuthor, z = e.user?.avatar ?? void 0, V = R(() => {
|
|
786
|
+
if (!L) return Ae;
|
|
787
|
+
let e = L.trim();
|
|
788
|
+
return e === "" ? Ae : e.charAt(0).toUpperCase();
|
|
789
|
+
}, [L]), le = R(() => Array.isArray(e.tagsArray) ? e.tagsArray.filter((e) => typeof e == "string") : e.tagsArray && typeof e.tagsArray == "object" ? Object.values(e.tagsArray).filter((e) => typeof e == "string") : [], [e.tagsArray]), W = R(() => (e.attachments ?? []).filter((e) => !!e && typeof e == "object"), [e.attachments]), de = oe ? e.reactions ?? [] : [], G = e.isPinned === !0, fe = e.isEdited === !0, K = e.status && e.status !== "active", pe = K && e.status ? P(e.status) : null, Y = e.canDelete === !0 || t === !0, ve = e.canEdit === !0 || t === !0, ye = !!se && !!v && !!e.id, xe = !!oe && !!h && !!e.id, Se = !!c && !!t, Ce = !!ve && !!o && !!e.id, Z = !!Y && !!r && !!e.id, we = ye || xe || Se || Ce || Z, Q = g(), [$, Ee] = B(null), De = F((e) => {
|
|
790
|
+
Ee(e), Q.show();
|
|
791
|
+
}, [Q]), Oe = W.length > 0;
|
|
764
792
|
return /* @__PURE__ */ U("article", {
|
|
765
|
-
className: i("comment-item--component group relative overflow-hidden rounded-radius border transition-colors", "border-border/60 bg-card hover:bg-muted/30
|
|
793
|
+
className: i("comment-item--component group relative overflow-hidden rounded-radius border transition-colors", "border-border/60 bg-card hover:bg-muted/30 p-surface"),
|
|
766
794
|
"data-comment-id": e.id,
|
|
767
|
-
children: [/* @__PURE__ */ U(
|
|
795
|
+
children: [/* @__PURE__ */ U(m, {
|
|
768
796
|
direction: "horizontal",
|
|
769
797
|
align: "start",
|
|
770
798
|
gap: "lg",
|
|
771
799
|
className: "min-w-0",
|
|
772
|
-
children: [/* @__PURE__ */ U(
|
|
800
|
+
children: [/* @__PURE__ */ U(E, {
|
|
773
801
|
className: "mt-0.5 size-avatar shrink-0",
|
|
774
|
-
children: [!!
|
|
775
|
-
src:
|
|
776
|
-
alt:
|
|
777
|
-
}), /* @__PURE__ */ H(
|
|
802
|
+
children: [!!z && /* @__PURE__ */ H(D, {
|
|
803
|
+
src: z,
|
|
804
|
+
alt: L
|
|
805
|
+
}), /* @__PURE__ */ H(T, {
|
|
778
806
|
className: "bg-muted text-muted-foreground text-xs font-medium",
|
|
779
|
-
children:
|
|
807
|
+
children: V
|
|
780
808
|
})]
|
|
781
809
|
}), /* @__PURE__ */ U("div", {
|
|
782
810
|
className: "comment-item--body min-w-0 flex-1",
|
|
783
811
|
children: [
|
|
784
|
-
/* @__PURE__ */ U(
|
|
812
|
+
/* @__PURE__ */ U(m, {
|
|
785
813
|
direction: "horizontal",
|
|
786
814
|
align: "baseline",
|
|
787
815
|
gap: "md",
|
|
788
816
|
className: "min-w-0",
|
|
789
817
|
children: [
|
|
790
|
-
/* @__PURE__ */ H(
|
|
818
|
+
/* @__PURE__ */ H(s, {
|
|
791
819
|
tag: "span",
|
|
792
820
|
weight: "semibold",
|
|
793
821
|
className: "truncate",
|
|
794
|
-
children:
|
|
822
|
+
children: L
|
|
795
823
|
}),
|
|
796
|
-
!!
|
|
824
|
+
!!G && /* @__PURE__ */ H(f, {
|
|
797
825
|
delayDuration: 0,
|
|
798
|
-
children: /* @__PURE__ */ U(
|
|
826
|
+
children: /* @__PURE__ */ U(l, { children: [/* @__PURE__ */ H(u, {
|
|
799
827
|
render: /* @__PURE__ */ H("span", { className: "inline-flex shrink-0 self-center" }),
|
|
800
|
-
children: /* @__PURE__ */ H(
|
|
801
|
-
className: "text-
|
|
828
|
+
children: /* @__PURE__ */ H(J, {
|
|
829
|
+
className: "text-muted-foreground size-icon-sm",
|
|
802
830
|
"aria-hidden": !0
|
|
803
831
|
})
|
|
804
|
-
}), /* @__PURE__ */ H(
|
|
832
|
+
}), /* @__PURE__ */ H(d, {
|
|
805
833
|
side: "top",
|
|
806
834
|
className: "text-xs",
|
|
807
|
-
children:
|
|
835
|
+
children: j.pinned
|
|
808
836
|
})] })
|
|
809
837
|
}),
|
|
810
|
-
/* @__PURE__ */ H(
|
|
838
|
+
/* @__PURE__ */ H(ee, {
|
|
811
839
|
value: e.createdAt,
|
|
812
|
-
formatRelativeTime:
|
|
840
|
+
formatRelativeTime: I,
|
|
813
841
|
size: "xs",
|
|
814
842
|
className: "shrink-0 tabular-nums"
|
|
815
843
|
}),
|
|
816
|
-
!!fe && /* @__PURE__ */ H(
|
|
844
|
+
!!fe && /* @__PURE__ */ H(s, {
|
|
817
845
|
tag: "span",
|
|
818
846
|
size: "xs",
|
|
819
847
|
type: "secondary",
|
|
820
848
|
className: "shrink-0",
|
|
821
|
-
children:
|
|
849
|
+
children: j.edited
|
|
822
850
|
}),
|
|
823
|
-
!!
|
|
851
|
+
!!K && !!pe && /* @__PURE__ */ H(O, {
|
|
824
852
|
size: "sm",
|
|
825
853
|
tone: "secondary",
|
|
826
854
|
className: "self-center",
|
|
827
|
-
children:
|
|
855
|
+
children: pe
|
|
828
856
|
})
|
|
829
857
|
]
|
|
830
858
|
}),
|
|
831
859
|
/* @__PURE__ */ H("div", {
|
|
832
860
|
className: "mt-1 leading-relaxed",
|
|
833
|
-
children: /* @__PURE__ */ H(
|
|
861
|
+
children: /* @__PURE__ */ H(Te, {
|
|
834
862
|
comment: e,
|
|
835
|
-
resources:
|
|
836
|
-
renderReference:
|
|
863
|
+
resources: ie,
|
|
864
|
+
renderReference: ae,
|
|
837
865
|
sanitizer: x
|
|
838
866
|
})
|
|
839
867
|
}),
|
|
840
868
|
le.length > 0 && /* @__PURE__ */ H("div", {
|
|
841
869
|
className: "mt-space-md flex flex-wrap gap-space-sm",
|
|
842
|
-
children: le.map((e) => /* @__PURE__ */ H(
|
|
870
|
+
children: le.map((e) => /* @__PURE__ */ H(O, {
|
|
843
871
|
size: "sm",
|
|
844
872
|
tone: "secondary",
|
|
845
873
|
children: e
|
|
846
874
|
}, e))
|
|
847
875
|
}),
|
|
848
|
-
|
|
876
|
+
Oe && /* @__PURE__ */ H("div", {
|
|
849
877
|
className: "mt-space-md flex flex-wrap gap-space-sm",
|
|
850
|
-
children:
|
|
851
|
-
if (
|
|
852
|
-
let t = !!
|
|
853
|
-
return /* @__PURE__ */ H(
|
|
878
|
+
children: W.map((e) => {
|
|
879
|
+
if (A) return /* @__PURE__ */ H("div", { children: A(e) }, e.id ?? e.name);
|
|
880
|
+
let t = !!a && !!e.id && Y;
|
|
881
|
+
return /* @__PURE__ */ H(be, {
|
|
854
882
|
attachment: e,
|
|
855
883
|
editable: t,
|
|
856
|
-
onRemove: t ? () =>
|
|
884
|
+
onRemove: t ? () => De(e.id) : void 0,
|
|
857
885
|
accessors: {
|
|
858
|
-
getMediaUrl:
|
|
859
|
-
getMediaName:
|
|
886
|
+
getMediaUrl: ce,
|
|
887
|
+
getMediaName: N
|
|
860
888
|
},
|
|
861
|
-
strings:
|
|
889
|
+
strings: S
|
|
862
890
|
}, e.id ?? e.name);
|
|
863
891
|
})
|
|
864
892
|
}),
|
|
865
|
-
de.length > 0 && /* @__PURE__ */ H(
|
|
893
|
+
de.length > 0 && /* @__PURE__ */ H(m, {
|
|
866
894
|
direction: "horizontal",
|
|
867
895
|
wrap: !0,
|
|
868
896
|
align: "center",
|
|
869
897
|
gap: "xs",
|
|
870
898
|
className: "mt-space-md",
|
|
871
|
-
children: de.map((t) => /* @__PURE__ */ H(
|
|
899
|
+
children: de.map((t) => /* @__PURE__ */ H("button", {
|
|
872
900
|
type: "button",
|
|
873
|
-
"aria-label": n(
|
|
901
|
+
"aria-label": n(j.reactionLabel ?? X.reactionLabel, {
|
|
874
902
|
emoji: t.emoji,
|
|
875
903
|
count: t.count
|
|
876
904
|
}),
|
|
877
905
|
"aria-pressed": t.mine ?? !1,
|
|
878
|
-
|
|
879
|
-
buttonStyle: "ghost",
|
|
880
|
-
size: "sm",
|
|
881
|
-
onClick: () => _ && e.id ? _(e.id, t.emoji) : void 0,
|
|
906
|
+
onClick: () => h && e.id ? h(e.id, t.emoji) : void 0,
|
|
882
907
|
title: t.users?.join(", "),
|
|
883
|
-
className:
|
|
884
|
-
children: /* @__PURE__ */ U(
|
|
908
|
+
className: i(k.inline, k.focus),
|
|
909
|
+
children: /* @__PURE__ */ U(O, {
|
|
885
910
|
size: "sm",
|
|
886
|
-
tone: t.mine ? "
|
|
911
|
+
tone: t.mine ? "info" : "secondary",
|
|
887
912
|
className: "cursor-pointer transition-colors hover:opacity-90",
|
|
888
|
-
children: [/* @__PURE__ */ H(
|
|
913
|
+
children: [/* @__PURE__ */ H(s, {
|
|
889
914
|
tag: "span",
|
|
890
915
|
size: "inherit",
|
|
891
916
|
lineHeight: "none",
|
|
892
917
|
className: "text-inherit",
|
|
893
918
|
"aria-hidden": !0,
|
|
894
919
|
children: t.emoji
|
|
895
|
-
}), /* @__PURE__ */ H(
|
|
920
|
+
}), /* @__PURE__ */ H(w, {
|
|
896
921
|
value: t.count,
|
|
897
922
|
size: "inherit",
|
|
898
923
|
align: "left",
|
|
@@ -901,54 +926,54 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
|
|
|
901
926
|
})
|
|
902
927
|
}, t.emoji))
|
|
903
928
|
}),
|
|
904
|
-
|
|
905
|
-
className: i("comment-item--actions relative mt-space-md ms-auto w-fit max-w-full flex-wrap opacity-100 transition-opacity", "group-hover:opacity-100 focus-within:opacity-100", "inline-flex items-center gap-space-2xs
|
|
929
|
+
we && /* @__PURE__ */ U("div", {
|
|
930
|
+
className: i("comment-item--actions relative mt-space-md ms-auto w-fit max-w-full flex-wrap opacity-100 transition-opacity", "group-hover:opacity-100 focus-within:opacity-100", "inline-flex items-center gap-space-2xs"),
|
|
906
931
|
children: [
|
|
907
|
-
ye && /* @__PURE__ */ H(
|
|
932
|
+
ye && /* @__PURE__ */ H(p, {
|
|
908
933
|
type: "button",
|
|
909
934
|
size: "sm",
|
|
910
935
|
iconOnly: !0,
|
|
911
936
|
tone: "secondary",
|
|
912
937
|
buttonStyle: "ghost",
|
|
913
938
|
onClick: () => e.id && v(e.id),
|
|
914
|
-
title:
|
|
915
|
-
"aria-label":
|
|
916
|
-
children: /* @__PURE__ */ H(
|
|
939
|
+
title: j.replyLabel,
|
|
940
|
+
"aria-label": j.replyLabel,
|
|
941
|
+
children: /* @__PURE__ */ H(ue, { className: "size-icon-md" })
|
|
917
942
|
}),
|
|
918
|
-
|
|
943
|
+
xe && /* @__PURE__ */ H(p, {
|
|
919
944
|
type: "button",
|
|
920
945
|
size: "sm",
|
|
921
946
|
iconOnly: !0,
|
|
922
947
|
tone: "secondary",
|
|
923
948
|
buttonStyle: "ghost",
|
|
924
|
-
onClick: () => e.id &&
|
|
925
|
-
title:
|
|
926
|
-
"aria-label":
|
|
949
|
+
onClick: () => e.id && h(e.id, "👍"),
|
|
950
|
+
title: j.addReactionLabel,
|
|
951
|
+
"aria-label": j.addReactionLabel,
|
|
927
952
|
children: /* @__PURE__ */ H(me, { className: "size-icon-md" })
|
|
928
953
|
}),
|
|
929
|
-
|
|
954
|
+
Se && /* @__PURE__ */ H(p, {
|
|
930
955
|
type: "button",
|
|
931
956
|
size: "sm",
|
|
932
957
|
iconOnly: !0,
|
|
933
958
|
tone: "secondary",
|
|
934
959
|
buttonStyle: "ghost",
|
|
935
|
-
onClick: () =>
|
|
936
|
-
title:
|
|
937
|
-
"aria-label":
|
|
938
|
-
children: /* @__PURE__ */ H(
|
|
960
|
+
onClick: () => c(e),
|
|
961
|
+
title: G ? j.unpinLabel : j.pinLabel,
|
|
962
|
+
"aria-label": G ? j.unpinLabel : j.pinLabel,
|
|
963
|
+
children: /* @__PURE__ */ H(J, { className: i("size-icon-md", G && "text-foreground") })
|
|
939
964
|
}),
|
|
940
|
-
|
|
965
|
+
Ce && /* @__PURE__ */ H(p, {
|
|
941
966
|
type: "button",
|
|
942
967
|
size: "sm",
|
|
943
968
|
iconOnly: !0,
|
|
944
969
|
tone: "secondary",
|
|
945
970
|
buttonStyle: "ghost",
|
|
946
|
-
title:
|
|
947
|
-
"aria-label":
|
|
948
|
-
onClick: () =>
|
|
949
|
-
children: /* @__PURE__ */ H(
|
|
971
|
+
title: j.editLabel,
|
|
972
|
+
"aria-label": j.editLabel,
|
|
973
|
+
onClick: () => o(e),
|
|
974
|
+
children: /* @__PURE__ */ H(q, { className: "size-icon-md" })
|
|
950
975
|
}),
|
|
951
|
-
|
|
976
|
+
Z && /* @__PURE__ */ H(p, {
|
|
952
977
|
type: "button",
|
|
953
978
|
size: "sm",
|
|
954
979
|
iconOnly: !0,
|
|
@@ -956,31 +981,31 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
|
|
|
956
981
|
buttonStyle: "ghost",
|
|
957
982
|
className: "hover:bg-destructive/10 hover:text-destructive",
|
|
958
983
|
onClick: () => r(e.id),
|
|
959
|
-
title:
|
|
960
|
-
"aria-label":
|
|
984
|
+
title: j.deleteLabel,
|
|
985
|
+
"aria-label": j.deleteLabel,
|
|
961
986
|
children: /* @__PURE__ */ H(he, { className: "size-icon-md" })
|
|
962
987
|
})
|
|
963
988
|
]
|
|
964
989
|
})
|
|
965
990
|
]
|
|
966
991
|
})]
|
|
967
|
-
}), !!
|
|
968
|
-
...
|
|
992
|
+
}), !!a && /* @__PURE__ */ H(_, {
|
|
993
|
+
...Q.overlayProps,
|
|
969
994
|
destructive: !0,
|
|
970
|
-
title:
|
|
971
|
-
description:
|
|
972
|
-
strings: { confirm:
|
|
995
|
+
title: j.confirmRemoveAttachmentTitle,
|
|
996
|
+
description: j.confirmRemoveAttachmentDescription,
|
|
997
|
+
strings: { confirm: j.attachmentRemoveLabel },
|
|
973
998
|
onConfirm: () => {
|
|
974
|
-
|
|
999
|
+
$ && e.id && a(e.id, $);
|
|
975
1000
|
}
|
|
976
1001
|
})]
|
|
977
1002
|
});
|
|
978
|
-
}),
|
|
979
|
-
return e.length ? /* @__PURE__ */ H(
|
|
1003
|
+
}), Fe = function({ comments: e, canModerate: t, onDelete: n, onAttachmentRemove: r, onEdit: i, onPinToggle: a, onReact: o, onReply: s, allowReactions: c, allowReplies: l, sanitizer: u, strings: d, getMediaUrl: f, getMediaName: p, getStatusLabel: h, formatRelativeTime: g, resources: _, renderItem: v, renderAttachment: y, renderReference: b, emptySlot: x }) {
|
|
1004
|
+
return e.length ? /* @__PURE__ */ H(m, {
|
|
980
1005
|
gap: "sm",
|
|
981
1006
|
className: "comment-timeline--component",
|
|
982
|
-
children: e.map((e,
|
|
983
|
-
let x = /* @__PURE__ */ H(
|
|
1007
|
+
children: e.map((e, m) => {
|
|
1008
|
+
let x = /* @__PURE__ */ H(Pe, {
|
|
984
1009
|
comment: e,
|
|
985
1010
|
canModerate: t,
|
|
986
1011
|
onDelete: n,
|
|
@@ -994,7 +1019,7 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
|
|
|
994
1019
|
sanitizer: u,
|
|
995
1020
|
strings: d,
|
|
996
1021
|
getMediaUrl: f,
|
|
997
|
-
getMediaName:
|
|
1022
|
+
getMediaName: p,
|
|
998
1023
|
getStatusLabel: h,
|
|
999
1024
|
formatRelativeTime: g,
|
|
1000
1025
|
resources: _,
|
|
@@ -1008,20 +1033,20 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
|
|
|
1008
1033
|
onAttachmentRemove: r,
|
|
1009
1034
|
onEdit: i,
|
|
1010
1035
|
defaultItem: x
|
|
1011
|
-
}) }, e.id ?? `comment-${
|
|
1036
|
+
}) }, e.id ?? `comment-${m}`) : /* @__PURE__ */ H("div", { children: x }, e.id ?? `comment-${m}`);
|
|
1012
1037
|
})
|
|
1013
|
-
}) : /* @__PURE__ */ H(V, { children: x ?? /* @__PURE__ */ H(
|
|
1038
|
+
}) : /* @__PURE__ */ H(V, { children: x ?? /* @__PURE__ */ H($, { strings: d }) });
|
|
1014
1039
|
};
|
|
1015
1040
|
//#endregion
|
|
1016
1041
|
//#region src/components/features/comments/comments.tsx
|
|
1017
|
-
function
|
|
1018
|
-
let n = e(), r = t.composerPosition ?? n.composerPosition ?? "top", a = t.maxAttachments ?? 5, o = t.allowAttachments ?? !0,
|
|
1042
|
+
function Ie(t) {
|
|
1043
|
+
let n = e(), r = t.composerPosition ?? n.composerPosition ?? "top", a = t.maxAttachments ?? 5, o = t.allowAttachments ?? !0, c = t.allowReactions ?? !0, l = t.allowReplies ?? !0, u = t.canComment ?? !1, d = t.canModerate ?? !1, f = t.onPinToggle, p = t.resources, h = t.attachments, v = ge(t.strings), y = t.title === void 0 ? v.title : t.title, b = t.confirmDelete ?? !0, x = g(), [S, C] = B(null), w = ve({
|
|
1019
1044
|
onSubmit: t.onSubmit,
|
|
1020
1045
|
onUpdate: t.onUpdate,
|
|
1021
1046
|
onDelete: t.onDelete,
|
|
1022
1047
|
onAfterMutate: t.onAfterMutate,
|
|
1023
1048
|
onError: t.onError
|
|
1024
|
-
}),
|
|
1049
|
+
}), ee = F((e) => {
|
|
1025
1050
|
if (!b) {
|
|
1026
1051
|
w.deleteComment(e);
|
|
1027
1052
|
return;
|
|
@@ -1031,19 +1056,19 @@ function Ne(t) {
|
|
|
1031
1056
|
b,
|
|
1032
1057
|
w,
|
|
1033
1058
|
x
|
|
1034
|
-
]),
|
|
1035
|
-
let t =
|
|
1036
|
-
t &&
|
|
1059
|
+
]), T = w.startReply, E = t.comments, D = t.onReply, O = F((e) => {
|
|
1060
|
+
let t = E.find((t) => t.id === e);
|
|
1061
|
+
t && T(t), D?.(e);
|
|
1037
1062
|
}, [
|
|
1063
|
+
E,
|
|
1038
1064
|
D,
|
|
1039
|
-
|
|
1040
|
-
E
|
|
1065
|
+
T
|
|
1041
1066
|
]), k = w.composerMode.kind === "editing" ? w.composerMode.comment : void 0, te = w.composerMode.kind === "replying" ? {
|
|
1042
1067
|
commentId: w.composerMode.commentId,
|
|
1043
1068
|
authorName: w.composerMode.authorName
|
|
1044
|
-
} : void 0,
|
|
1069
|
+
} : void 0, ne = t.composerSlot ?? (u ? /* @__PURE__ */ H(Z, {
|
|
1045
1070
|
context: t.context,
|
|
1046
|
-
canComment:
|
|
1071
|
+
canComment: u,
|
|
1047
1072
|
submitting: w.isSubmitting,
|
|
1048
1073
|
errors: w.formErrors,
|
|
1049
1074
|
resetKey: w.resetKey,
|
|
@@ -1052,67 +1077,67 @@ function Ne(t) {
|
|
|
1052
1077
|
onCancel: w.composerMode.kind === "idle" ? void 0 : w.cancelComposerMode,
|
|
1053
1078
|
onSubmit: w.submit,
|
|
1054
1079
|
strings: t.strings,
|
|
1055
|
-
resources:
|
|
1080
|
+
resources: p,
|
|
1056
1081
|
onResourceSearch: t.onResourceSearch,
|
|
1057
|
-
attachments:
|
|
1082
|
+
attachments: h,
|
|
1058
1083
|
maxAttachments: a,
|
|
1059
1084
|
allowAttachments: o
|
|
1060
|
-
}) : null),
|
|
1085
|
+
}) : null), re = /* @__PURE__ */ H(Fe, {
|
|
1061
1086
|
comments: t.comments,
|
|
1062
1087
|
canModerate: d,
|
|
1063
|
-
onDelete: t.onDelete ?
|
|
1088
|
+
onDelete: t.onDelete ? ee : void 0,
|
|
1064
1089
|
onAttachmentRemove: t.onAttachmentRemove,
|
|
1065
|
-
onEdit:
|
|
1090
|
+
onEdit: u && t.onUpdate ? w.startEdit : void 0,
|
|
1066
1091
|
onPinToggle: f,
|
|
1067
1092
|
onReact: t.onReact,
|
|
1068
|
-
onReply:
|
|
1069
|
-
allowReactions:
|
|
1070
|
-
allowReplies:
|
|
1093
|
+
onReply: u && l ? O : void 0,
|
|
1094
|
+
allowReactions: c,
|
|
1095
|
+
allowReplies: l,
|
|
1071
1096
|
sanitizer: t.sanitizer,
|
|
1072
1097
|
strings: t.strings,
|
|
1073
1098
|
getMediaUrl: t.getMediaUrl,
|
|
1074
1099
|
getMediaName: t.getMediaName,
|
|
1075
1100
|
getStatusLabel: t.getStatusLabel,
|
|
1076
1101
|
formatRelativeTime: t.formatRelativeTime,
|
|
1077
|
-
resources:
|
|
1102
|
+
resources: p,
|
|
1078
1103
|
renderItem: t.renderItem,
|
|
1079
1104
|
renderAttachment: t.renderAttachment,
|
|
1080
1105
|
renderReference: t.renderReference,
|
|
1081
|
-
emptySlot: t.emptySlot ?? /* @__PURE__ */ H(
|
|
1082
|
-
}),
|
|
1106
|
+
emptySlot: t.emptySlot ?? /* @__PURE__ */ H($, { strings: t.strings })
|
|
1107
|
+
}), ie = ne ? /* @__PURE__ */ H("div", { children: ne }) : null, A = /* @__PURE__ */ U(m, {
|
|
1083
1108
|
gap: "xl",
|
|
1084
1109
|
className: "comments--body",
|
|
1085
1110
|
children: [
|
|
1086
1111
|
t.headerSlot,
|
|
1087
|
-
r === "top" &&
|
|
1088
|
-
|
|
1089
|
-
r === "bottom" &&
|
|
1112
|
+
r === "top" && ie,
|
|
1113
|
+
re,
|
|
1114
|
+
r === "bottom" && ie,
|
|
1090
1115
|
t.footerSlot
|
|
1091
1116
|
]
|
|
1092
1117
|
});
|
|
1093
|
-
if (t.bare) return
|
|
1094
|
-
let
|
|
1095
|
-
return /* @__PURE__ */ U(
|
|
1118
|
+
if (t.bare) return A;
|
|
1119
|
+
let ae = typeof y == "string" ? y : void 0;
|
|
1120
|
+
return /* @__PURE__ */ U(m, {
|
|
1096
1121
|
render: /* @__PURE__ */ H("section", {}),
|
|
1097
1122
|
gap: "lg",
|
|
1098
1123
|
"data-component": "comments",
|
|
1099
1124
|
"data-slot": "comments",
|
|
1100
1125
|
className: i("comments--component", t.className),
|
|
1101
|
-
"aria-label":
|
|
1126
|
+
"aria-label": ae,
|
|
1102
1127
|
children: [
|
|
1103
|
-
!(y === !1 || !y && !v.subtitle) && /* @__PURE__ */ U(
|
|
1128
|
+
!(y === !1 || !y && !v.subtitle) && /* @__PURE__ */ U(m, {
|
|
1104
1129
|
gap: "normal",
|
|
1105
1130
|
className: "comments--header",
|
|
1106
|
-
children: [!!y && /* @__PURE__ */ H(
|
|
1131
|
+
children: [!!y && /* @__PURE__ */ H(s, {
|
|
1107
1132
|
weight: "semibold",
|
|
1108
1133
|
children: y
|
|
1109
|
-
}), !!v.subtitle && /* @__PURE__ */ H(
|
|
1134
|
+
}), !!v.subtitle && /* @__PURE__ */ H(s, {
|
|
1110
1135
|
type: "secondary",
|
|
1111
1136
|
children: v.subtitle
|
|
1112
1137
|
})]
|
|
1113
1138
|
}),
|
|
1114
|
-
|
|
1115
|
-
!!(b && t.onDelete) && /* @__PURE__ */ H(
|
|
1139
|
+
A,
|
|
1140
|
+
!!(b && t.onDelete) && /* @__PURE__ */ H(_, {
|
|
1116
1141
|
...x.overlayProps,
|
|
1117
1142
|
destructive: !0,
|
|
1118
1143
|
title: v.confirmDeleteTitle,
|
|
@@ -1127,6 +1152,6 @@ function Ne(t) {
|
|
|
1127
1152
|
});
|
|
1128
1153
|
}
|
|
1129
1154
|
//#endregion
|
|
1130
|
-
export {
|
|
1155
|
+
export { $ as a, Se as c, _e as d, ge as f, Te as i, be as l, Fe as n, Z as o, X as p, Pe as r, Q as s, Ie as t, ve as u };
|
|
1131
1156
|
|
|
1132
|
-
//# sourceMappingURL=comments-
|
|
1157
|
+
//# sourceMappingURL=comments-You0Bzbr.js.map
|