themelia-react-ui 1.0.2 → 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 +281 -1
- package/README.md +10 -5
- package/dist/{accordion-BRTcsp8J.js → accordion-CQXVcd7Q.js} +13 -13
- 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-CL84ZN9A.js → affordance-geometry.generated-CCIXb2A1.js} +7 -2
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-2PQ2fItc.js} +171 -176
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-C_fKpljx.js → app-shell-BE_j8-AT.js} +4 -4
- package/dist/{app-shell-C_fKpljx.js.map → app-shell-BE_j8-AT.js.map} +1 -1
- package/dist/{attachment-DbjUWsP0.js → attachment-q69dlt5Y.js} +9 -9
- package/dist/{attachment-DbjUWsP0.js.map → attachment-q69dlt5Y.js.map} +1 -1
- package/dist/{auth-CAQcasMV.js → auth-M3vGMgDR.js} +42 -42
- package/dist/{auth-CAQcasMV.js.map → auth-M3vGMgDR.js.map} +1 -1
- package/dist/{avatar-Bu2HhitA.js → avatar-djdaaQ_s.js} +14 -12
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-CzId1Wlm.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 +2 -2
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +11 -11
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +244 -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 +2 -2
- package/dist/base/display.js +6 -6
- 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 +81 -76
- 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 +42 -42
- 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 +9 -9
- 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 +4 -4
- 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 +229 -220
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +147 -180
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +530 -523
- 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 +1390 -1516
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +82 -91
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-BuYz5SDU.js → breadcrumbs-BG_FfMK4.js} +5 -5
- package/dist/{breadcrumbs-BuYz5SDU.js.map → breadcrumbs-BG_FfMK4.js.map} +1 -1
- package/dist/{button-BZDasD04.js → button-BS3KDg00.js} +185 -162
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BZyfTvwm.js → button-R9CCoH7A.js} +2 -2
- package/dist/{button-BZyfTvwm.js.map → button-R9CCoH7A.js.map} +1 -1
- package/dist/{buttons-D_6KJvEE.js → buttons-DS0ZIwJ_.js} +11 -11
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-qGSErLw_.js → cards-QoJ4syG9.js} +7 -7
- package/dist/{cards-qGSErLw_.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/{chart-Bsc5BICK.js → chart-DwYRKKc-.js} +17 -15
- 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-DzHKRybS.js → code-block-CD0B7M93.js} +19 -19
- package/dist/{code-block-DzHKRybS.js.map → code-block-CD0B7M93.js.map} +1 -1
- package/dist/{collapsible-ClvC7Bj3.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-D6S8cv_n.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-D6S8cv_n.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/{combobox-BFnbJJp3.js → combobox-6dvVny2q.js} +96 -97
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/{combobox-hozNwUcc.js → combobox-CB7039j7.js} +326 -308
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-BnmSchli.js → command-kPMPjIxJ.js} +34 -30
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-u5L0OGip.js → comments-You0Bzbr.js} +349 -348
- 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.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/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/datepicker.types.d.ts +13 -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-sizing.d.ts +32 -0
- 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/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/text-inputs/input-group.d.ts +2 -2
- 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/use-metric-format-options.d.ts +3 -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/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.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/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +42 -19
- 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/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +53 -3
- 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/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 +9 -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 +35 -13
- 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/select.d.ts +3 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/{containers-DqB-bSYE.js → containers-D_L4mTVb.js} +3 -3
- package/dist/{containers-DqB-bSYE.js.map → containers-D_L4mTVb.js.map} +1 -1
- package/dist/{copyable-BTSByfmq.js → copyable-DDjTeW_j.js} +4 -4
- package/dist/{copyable-BTSByfmq.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/{data-display-Bihs9Ven.js → data-display-3xWQUnMA.js} +471 -478
- 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-CS6Hbk18.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +38 -35
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +36 -35
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +325 -326
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +190 -200
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +77 -77
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +8 -8
- package/dist/features/media-library.js +499 -502
- 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 +1216 -1248
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +46 -44
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +96 -88
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +11 -11
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +188 -184
- 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 +469 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-CJkUAapr.js → feedback-C7nR0UtT.js} +9 -10
- 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-DQQpiLWC.js → field-state-recipes-C-MFBX_8.js} +3 -3
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-D6FF8L6s.js → filters-Da-gNPsE.js} +467 -467
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-CZwrkP7m.js → form-field-VZRULhUK.js} +7 -7
- package/dist/{form-field-CZwrkP7m.js.map → form-field-VZRULhUK.js.map} +1 -1
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B5NCbkSC.js → forms-DDeEnXSY.js} +11 -11
- 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-kxruN3RM.js → header-2ycNqGOR.js} +43 -42
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-BrlnCwQd.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-BrlnCwQd.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{icon-badge-Btc6pQrp.js → icon-badge-DKlaKXoo.js} +3 -3
- package/dist/{icon-badge-Btc6pQrp.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{input-vxcaNCYC.js → input-BoLm9Hks.js} +3 -3
- package/dist/{input-vxcaNCYC.js.map → input-BoLm9Hks.js.map} +1 -1
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/{input-SX9V0AL3.js.map → input-DhQdBnV3.js.map} +1 -1
- 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 +6 -1
- package/dist/lib/field-affordance-recipes.d.ts +35 -0
- package/dist/lib/field-state-recipes.d.ts +4 -2
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
- package/dist/lib/surface-recipes.d.ts +8 -6
- package/dist/lib/token-merge.generated.d.ts +11 -11
- 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 +5 -2
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DLp3HAz0.js → media-gallery-DQUQ0m3O.js} +8 -8
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-Cl0Kt_Pd.js → mentions-DwnO1hh4.js} +34 -35
- package/dist/{mentions-Cl0Kt_Pd.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/{message-SZUNB1eX.js → message-YfFmbXNP.js} +5 -5
- package/dist/{message-SZUNB1eX.js.map → message-YfFmbXNP.js.map} +1 -1
- package/dist/{navigation-DyytsLRB.js → navigation-Cbp5V8gG.js} +33 -34
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/{navigation-DnQSNMT0.js → navigation-Cs1npsPm.js} +111 -87
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-DlU-4QYO.js} +2 -2
- package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-DlU-4QYO.js.map} +1 -1
- 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-D8nERkn5.js → page-header-hUTzcRZX.js} +9 -9
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-NLGqRirf.js → pagination-Cm0jqa3I.js} +8 -8
- package/dist/{pagination-NLGqRirf.js.map → pagination-Cm0jqa3I.js.map} +1 -1
- package/dist/{popover-CghIYdQf.js → popover-Dcv_9jxr.js} +6 -6
- package/dist/{popover-CghIYdQf.js.map → popover-Dcv_9jxr.js.map} +1 -1
- package/dist/{popover-menu-B4PoWhRl.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-wmbvL8Ah.js} +2 -2
- package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-wmbvL8Ah.js.map} +1 -1
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BroqrAyV.js → progress-Br9WTFya.js} +7 -7
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BuJynLgf.js → receipt-CV89q1fs.js} +6 -6
- package/dist/{receipt-BuJynLgf.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/{rich-text-editor-BKyG7rWz.js → rich-text-editor-CF8QYt5p.js} +6 -6
- package/dist/{rich-text-editor-BKyG7rWz.js.map → rich-text-editor-CF8QYt5p.js.map} +1 -1
- package/dist/{rich-text-editor.recipes-B72Nfuze.js → rich-text-editor.recipes-CnrbmTS1.js} +4 -4
- package/dist/{rich-text-editor.recipes-B72Nfuze.js.map → rich-text-editor.recipes-CnrbmTS1.js.map} +1 -1
- package/dist/{rich-text-DlxDOtf4.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-DlxDOtf4.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-D-pIhEKl.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-BhtFyo4x.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-BhtFyo4x.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-BNIgG3au.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-DOTOzeZ2.js → settings-DHk0L2MF.js} +17 -17
- 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-CyR4XKwR.js → sidebar-Crc9M9JV.js} +18 -18
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-3F0uhYn3.js → skeleton-DVMXr15h.js} +4 -4
- package/dist/{skeleton-3F0uhYn3.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/{smart-card-DjGVV2xr.js → smart-card-Bek-TwUp.js} +222 -207
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-Cpf7oRkF.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-CRdqVawd.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-CRdqVawd.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-CcRDZiLP.js → table-Dn4XSrSB.js} +348 -348
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/{tabs-BNgu7g0u.js → tabs-Dk8E_knt.js} +14 -13
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/{text-inputs-DsR56TR-.js → text-inputs-BFpku0Qd.js} +150 -149
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +16 -12
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-D1pkt3se.js → timelines-CxuAFIc2.js} +25 -38
- 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-BtmYyMZV.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BtmYyMZV.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-DRPn3qNl.js → ui-provider-D2_TeLqw.js} +20 -21
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CDbYw1WN.js → upload-B0WHW7ak.js} +221 -220
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-CNd_hH_a.js → upload-queue-BHZ_wBfd.js} +59 -62
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-VyJLUwRr.js → usage-card-U0YBLTNT.js} +42 -43
- package/dist/{usage-card-VyJLUwRr.js.map → usage-card-U0YBLTNT.js.map} +1 -1
- package/dist/{utils-BvH9PSmq.js → utils-Cospvlj1.js} +221 -51
- 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-CcR8r-Nt.js → workspace-YoFjXi6i.js} +44 -45
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +51 -38
- package/docs/consumer-skill/examples/app-layout.tsx +2 -4
- package/docs/consumer-skill/examples/detail.tsx +3 -4
- 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 +28 -6
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/references/composition.md +89 -17
- package/docs/consumer-skill/references/discovery.md +4 -0
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +32 -1
- package/docs/consumer-skill/references/public-api.json +111 -70
- package/docs/consumer-skill/references/review.md +20 -4
- package/docs/consumer-skill/references/theming.md +7 -1
- package/docs/consumer-skill/references/tokens.json +5 -2
- package/docs/consumer-skill/references/workflows.md +4 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +93 -2
- package/docs/consumer-skill/scripts/discovery.mjs +11 -3
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/package.json +5 -3
- package/dist/accordion-BRTcsp8J.js.map +0 -1
- package/dist/action-menu-Drxw_vJk.js +0 -265
- package/dist/action-menu-Drxw_vJk.js.map +0 -1
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
- package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
- package/dist/avatar-Bu2HhitA.js.map +0 -1
- package/dist/badge-CzId1Wlm.js.map +0 -1
- package/dist/button-BZDasD04.js.map +0 -1
- package/dist/buttons-D_6KJvEE.js.map +0 -1
- package/dist/chart-Bsc5BICK.js.map +0 -1
- package/dist/checkbox-BQNDjUCh.js +0 -34
- package/dist/checkbox-BQNDjUCh.js.map +0 -1
- package/dist/choice-inputs-Mk3iWbhr.js +0 -725
- package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
- package/dist/combobox-BFnbJJp3.js.map +0 -1
- package/dist/combobox-hozNwUcc.js.map +0 -1
- package/dist/command-BnmSchli.js.map +0 -1
- package/dist/comments-u5L0OGip.js.map +0 -1
- package/dist/data-display-Bihs9Ven.js.map +0 -1
- package/dist/date-DOKhJPu7.js +0 -140
- package/dist/date-DOKhJPu7.js.map +0 -1
- package/dist/date-picker-DzP5HQq7.js +0 -1541
- package/dist/date-picker-DzP5HQq7.js.map +0 -1
- package/dist/date-pickers-BpgGz7S-.js +0 -196
- package/dist/date-pickers-BpgGz7S-.js.map +0 -1
- package/dist/display-CS6Hbk18.js.map +0 -1
- package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
- package/dist/feedback-CJkUAapr.js.map +0 -1
- package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
- package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
- package/dist/filters-D6FF8L6s.js.map +0 -1
- package/dist/form-sizing-QP8aIRaW.js +0 -103
- package/dist/form-sizing-QP8aIRaW.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B5NCbkSC.js.map +0 -1
- package/dist/forms-numeric-Crrm80Lm.js +0 -867
- package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
- package/dist/header-kxruN3RM.js.map +0 -1
- package/dist/input-SX9V0AL3.js +0 -255
- package/dist/item-DE4YnuJx.js +0 -258
- package/dist/item-DE4YnuJx.js.map +0 -1
- package/dist/media-gallery-DLp3HAz0.js.map +0 -1
- package/dist/navigation-DnQSNMT0.js.map +0 -1
- package/dist/navigation-DyytsLRB.js.map +0 -1
- package/dist/number-DasMFWEG.js +0 -269
- package/dist/number-DasMFWEG.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-DUbs1KEi.js +0 -1011
- package/dist/overlays-DUbs1KEi.js.map +0 -1
- package/dist/page-hGmT4nWK.js +0 -213
- package/dist/page-hGmT4nWK.js.map +0 -1
- package/dist/page-header-D8nERkn5.js.map +0 -1
- package/dist/primitives-C7ff0QaI.js +0 -337
- package/dist/primitives-C7ff0QaI.js.map +0 -1
- package/dist/progress-BroqrAyV.js.map +0 -1
- package/dist/scroll-area-D-pIhEKl.js.map +0 -1
- package/dist/separator-BNIgG3au.js.map +0 -1
- package/dist/settings-DOTOzeZ2.js.map +0 -1
- package/dist/sheet-BFhrNehm.js +0 -205
- package/dist/sheet-BFhrNehm.js.map +0 -1
- package/dist/sidebar-CyR4XKwR.js.map +0 -1
- package/dist/sidebar-SvGJ0Zwi.js +0 -506
- package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
- package/dist/smart-card-DjGVV2xr.js.map +0 -1
- package/dist/spinner-Cpf7oRkF.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-Dd__PD-w.js +0 -28
- package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
- package/dist/table-CLtJTxoR.js +0 -147
- package/dist/table-CLtJTxoR.js.map +0 -1
- package/dist/table-CcRDZiLP.js.map +0 -1
- package/dist/tabs-BNgu7g0u.js.map +0 -1
- package/dist/text-inputs-DsR56TR-.js.map +0 -1
- package/dist/text.styles-Q4sGAIgA.js.map +0 -1
- package/dist/timelines-D1pkt3se.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-BxQgiZyw.js +0 -96
- package/dist/typography-BxQgiZyw.js.map +0 -1
- package/dist/ui-provider-DRPn3qNl.js.map +0 -1
- package/dist/upload-CDbYw1WN.js.map +0 -1
- package/dist/upload-queue-CNd_hH_a.js.map +0 -1
- package/dist/utils-BvH9PSmq.js.map +0 -1
- package/dist/value-inputs-D0KCrfVC.js +0 -840
- package/dist/value-inputs-D0KCrfVC.js.map +0 -1
- package/dist/workspace-CcR8r-Nt.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
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 { t as a } from "./buttons-
|
|
6
|
-
import { a as o,
|
|
7
|
-
import { a as l, c as u, o as d, s as f, t as p } from "./button-
|
|
8
|
-
import { t as m } from "./structure-
|
|
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
9
|
import { t as h } from "./row-recipes-DL8n7t_b.js";
|
|
10
|
-
import { i as g, t as _ } from "./overlays-
|
|
10
|
+
import { i as g, t as _ } from "./overlays-DhZO7N-I.js";
|
|
11
11
|
import { t as v } from "./sanitize-html-BG9FGe-j.js";
|
|
12
12
|
import { t as y } from "./content-typography-CnwgMJ37.js";
|
|
13
|
-
import { t as b } from "./rich-text-
|
|
14
|
-
import { g as x, i as S } from "./primitives-
|
|
15
|
-
import { n as C, t as w } from "./number-
|
|
16
|
-
import { i as
|
|
17
|
-
import { i as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { c as
|
|
21
|
-
import { l as
|
|
22
|
-
import { t as
|
|
23
|
-
import { l as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { Fragment as
|
|
26
|
-
import { AtSign as
|
|
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";
|
|
25
|
+
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
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";
|
|
27
27
|
//#region src/components/features/comments/comments.strings.ts
|
|
28
28
|
var X = {
|
|
29
29
|
title: "Comments",
|
|
@@ -73,12 +73,12 @@ var X = {
|
|
|
73
73
|
};
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/components/features/comments/comments-provider.tsx
|
|
76
|
-
function
|
|
76
|
+
function ge(e) {
|
|
77
77
|
return r(X, e);
|
|
78
78
|
}
|
|
79
79
|
function _e(e) {
|
|
80
80
|
let n = t();
|
|
81
|
-
return
|
|
81
|
+
return R(() => ({
|
|
82
82
|
getMediaUrl: e?.getMediaUrl,
|
|
83
83
|
getMediaName: e?.getMediaName,
|
|
84
84
|
getStatusLabel: e?.getStatusLabel,
|
|
@@ -87,16 +87,16 @@ function _e(e) {
|
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/components/features/comments/hooks/use-comments.ts
|
|
90
|
-
function
|
|
91
|
-
let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a } = e, [o, s] =
|
|
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) => {
|
|
92
92
|
u.current = e, l(e);
|
|
93
|
-
}, []), g =
|
|
93
|
+
}, []), g = F(() => {
|
|
94
94
|
m((e) => e + 1), s({ kind: "idle" }), f({}), h(!1);
|
|
95
|
-
}, [h]), _ =
|
|
95
|
+
}, [h]), _ = R(() => ({
|
|
96
96
|
setErrors: f,
|
|
97
97
|
reset: g,
|
|
98
98
|
setSubmitting: h
|
|
99
|
-
}), [g, h]), v =
|
|
99
|
+
}), [g, h]), v = F((e) => {
|
|
100
100
|
try {
|
|
101
101
|
a?.(e);
|
|
102
102
|
} catch {}
|
|
@@ -106,23 +106,23 @@ function Q(e = {}) {
|
|
|
106
106
|
isSubmitting: c,
|
|
107
107
|
formErrors: d,
|
|
108
108
|
resetKey: p,
|
|
109
|
-
startReply:
|
|
109
|
+
startReply: F((e) => {
|
|
110
110
|
e.id && (f({}), s({
|
|
111
111
|
kind: "replying",
|
|
112
112
|
commentId: e.id,
|
|
113
113
|
authorName: e.user?.name
|
|
114
114
|
}));
|
|
115
115
|
}, []),
|
|
116
|
-
startEdit:
|
|
116
|
+
startEdit: F((e) => {
|
|
117
117
|
e.id && (f({}), s({
|
|
118
118
|
kind: "editing",
|
|
119
119
|
comment: e
|
|
120
120
|
}));
|
|
121
121
|
}, []),
|
|
122
|
-
cancelComposerMode:
|
|
122
|
+
cancelComposerMode: F(() => {
|
|
123
123
|
g();
|
|
124
124
|
}, [g]),
|
|
125
|
-
submit:
|
|
125
|
+
submit: F(async (e) => {
|
|
126
126
|
if (o.kind === "editing" && o.comment.id) {
|
|
127
127
|
if (!n || u.current) return;
|
|
128
128
|
let t = {
|
|
@@ -161,7 +161,7 @@ function Q(e = {}) {
|
|
|
161
161
|
v,
|
|
162
162
|
h
|
|
163
163
|
]),
|
|
164
|
-
deleteComment:
|
|
164
|
+
deleteComment: F(async (e) => {
|
|
165
165
|
if (r && e) try {
|
|
166
166
|
await r(e), i?.("delete", { commentId: e });
|
|
167
167
|
} catch (e) {
|
|
@@ -178,37 +178,37 @@ function Q(e = {}) {
|
|
|
178
178
|
}
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region src/components/features/comments/partials/comment-attachment-chip.tsx
|
|
181
|
-
function
|
|
182
|
-
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;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
185
|
-
let p = r(X, u), m = l?.getMediaUrl?.(e) ?? e.url, g = l?.getMediaName?.(e) ?? e.name ?? p.attachmentFallback, _ =
|
|
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, {
|
|
186
186
|
size: "xs",
|
|
187
187
|
className: "shrink-0",
|
|
188
|
-
children: [p.attachmentUploadingLabel, typeof e.progress == "number" ? /* @__PURE__ */
|
|
188
|
+
children: [p.attachmentUploadingLabel, typeof e.progress == "number" ? /* @__PURE__ */ U(V, { children: [" ", /* @__PURE__ */ H(C, {
|
|
189
189
|
value: Math.round(e.progress),
|
|
190
190
|
scaled: !0,
|
|
191
191
|
size: "xs",
|
|
192
192
|
align: "left",
|
|
193
193
|
type: "secondary"
|
|
194
194
|
})] }) : null]
|
|
195
|
-
}) : y ? /* @__PURE__ */
|
|
195
|
+
}) : y ? /* @__PURE__ */ H(x, {
|
|
196
196
|
size: "xs",
|
|
197
197
|
className: "shrink-0",
|
|
198
198
|
children: e.error ?? p.attachmentFailedLabel
|
|
199
|
-
}) : typeof e.size == "number" ? /* @__PURE__ */
|
|
199
|
+
}) : typeof e.size == "number" ? /* @__PURE__ */ H(S, {
|
|
200
200
|
value: e.size,
|
|
201
201
|
size: "xs",
|
|
202
202
|
className: "shrink-0"
|
|
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),
|
|
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, {
|
|
204
204
|
className: i("shrink-0 animate-spin text-muted-foreground", "size-icon-md"),
|
|
205
205
|
"aria-hidden": !0
|
|
206
|
-
}) : /* @__PURE__ */
|
|
206
|
+
}) : /* @__PURE__ */ H(_, {
|
|
207
207
|
className: i("shrink-0", "size-icon-md", y ? "text-destructive" : "text-muted-foreground"),
|
|
208
208
|
"aria-hidden": !0
|
|
209
|
-
}),
|
|
209
|
+
}), T = /* @__PURE__ */ U("span", {
|
|
210
210
|
className: "inline-flex min-w-0 items-baseline gap-space-sm",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ H(s, {
|
|
212
212
|
tag: "span",
|
|
213
213
|
size: "xs",
|
|
214
214
|
weight: "medium",
|
|
@@ -216,11 +216,11 @@ var ye = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: s, accessors:
|
|
|
216
216
|
children: g
|
|
217
217
|
}), b]
|
|
218
218
|
});
|
|
219
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ U("div", {
|
|
220
220
|
className: w,
|
|
221
221
|
children: [
|
|
222
|
-
|
|
223
|
-
m && !v && !y ? /* @__PURE__ */
|
|
222
|
+
ee,
|
|
223
|
+
m && !v && !y ? /* @__PURE__ */ H(c, {
|
|
224
224
|
href: m,
|
|
225
225
|
size: "inherit",
|
|
226
226
|
underline: !1,
|
|
@@ -228,21 +228,21 @@ var ye = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: s, accessors:
|
|
|
228
228
|
rel: "noreferrer noopener",
|
|
229
229
|
className: "inline-flex min-w-0 flex-1 items-baseline gap-space-sm hover:underline",
|
|
230
230
|
"aria-label": p.attachmentDownloadLabel,
|
|
231
|
-
children:
|
|
232
|
-
}) :
|
|
233
|
-
v && typeof e.progress == "number" && /* @__PURE__ */
|
|
231
|
+
children: T
|
|
232
|
+
}) : T,
|
|
233
|
+
v && typeof e.progress == "number" && /* @__PURE__ */ H("div", {
|
|
234
234
|
className: "bg-primary/15 absolute bottom-0 left-2 right-2 h-px overflow-hidden rounded-full",
|
|
235
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ H("div", {
|
|
236
236
|
className: "bg-primary h-full transition-[width]",
|
|
237
237
|
style: { width: `${Math.min(100, Math.max(0, e.progress))}%` }
|
|
238
238
|
})
|
|
239
239
|
}),
|
|
240
|
-
y &&
|
|
240
|
+
y && o && /* @__PURE__ */ H(a, {
|
|
241
241
|
type: "button",
|
|
242
242
|
size: "sm",
|
|
243
|
-
onClick: () =>
|
|
243
|
+
onClick: () => o(e.id),
|
|
244
244
|
className: "shrink-0 text-destructive decoration-destructive/30 hover:decoration-destructive/60",
|
|
245
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ H(s, {
|
|
246
246
|
tag: "span",
|
|
247
247
|
size: "xs",
|
|
248
248
|
weight: "medium",
|
|
@@ -250,38 +250,38 @@ var ye = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: s, accessors:
|
|
|
250
250
|
children: p.attachmentRetryLabel
|
|
251
251
|
})
|
|
252
252
|
}),
|
|
253
|
-
t && n && /* @__PURE__ */
|
|
253
|
+
t && n && /* @__PURE__ */ H("button", {
|
|
254
254
|
type: "button",
|
|
255
255
|
onClick: () => n(e.id),
|
|
256
|
-
className: i(
|
|
256
|
+
className: i(k.target, k.focus, k.toggle),
|
|
257
257
|
"aria-label": p.attachmentRemoveLabel,
|
|
258
258
|
title: p.attachmentRemoveLabel,
|
|
259
|
-
children: /* @__PURE__ */
|
|
260
|
-
className:
|
|
259
|
+
children: /* @__PURE__ */ H(Y, {
|
|
260
|
+
className: k.icon,
|
|
261
261
|
"aria-hidden": "true"
|
|
262
262
|
})
|
|
263
263
|
})
|
|
264
264
|
]
|
|
265
265
|
});
|
|
266
|
-
},
|
|
266
|
+
}, xe = {
|
|
267
267
|
attachmentTooLargeError: X.attachmentTooLargeError,
|
|
268
268
|
attachmentTooManyError: X.attachmentTooManyError,
|
|
269
269
|
attachmentFailedLabel: X.attachmentFailedLabel
|
|
270
270
|
};
|
|
271
|
-
function
|
|
272
|
-
let { onUpload: t, maxSize: n, maxFiles: i, disabled: a, initialAttachments: o, onValueChange: s, onError: c, strings: l } = e, u = r(
|
|
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
273
|
let t = [...e];
|
|
274
274
|
h.current = t, f(t);
|
|
275
|
-
}, []), _ =
|
|
275
|
+
}, []), _ = z(s);
|
|
276
276
|
_.current = s;
|
|
277
|
-
let v =
|
|
277
|
+
let v = F((e, t) => {
|
|
278
278
|
g(h.current.map((n) => n.id === e ? {
|
|
279
279
|
...n,
|
|
280
280
|
...t
|
|
281
281
|
} : n));
|
|
282
|
-
}, [g]), y =
|
|
282
|
+
}, [g]), y = F((e) => {
|
|
283
283
|
g(e);
|
|
284
|
-
}, [g]), b =
|
|
284
|
+
}, [g]), b = F((e, n) => {
|
|
285
285
|
if (!t || !m.current.has(e)) return;
|
|
286
286
|
let r = new AbortController();
|
|
287
287
|
p.current.set(e, { controller: r }), v(e, {
|
|
@@ -315,7 +315,7 @@ function xe(e = {}) {
|
|
|
315
315
|
t,
|
|
316
316
|
u.attachmentFailedLabel,
|
|
317
317
|
v
|
|
318
|
-
]), x =
|
|
318
|
+
]), x = F((e) => {
|
|
319
319
|
if (a || !t) return;
|
|
320
320
|
let r = Array.from(e);
|
|
321
321
|
if (r.length === 0) return;
|
|
@@ -354,19 +354,19 @@ function xe(e = {}) {
|
|
|
354
354
|
t,
|
|
355
355
|
u.attachmentTooLargeError,
|
|
356
356
|
u.attachmentTooManyError
|
|
357
|
-
]), S =
|
|
357
|
+
]), S = F((e) => {
|
|
358
358
|
let t = p.current.get(e);
|
|
359
359
|
t && (t.controller.abort(), p.current.delete(e)), m.current.delete(e), g(h.current.filter((t) => t.id !== e));
|
|
360
|
-
}, [g]), C =
|
|
360
|
+
}, [g]), C = F((e) => {
|
|
361
361
|
let t = m.current.get(e);
|
|
362
362
|
t && b(e, t);
|
|
363
|
-
}, [b]), w =
|
|
363
|
+
}, [b]), w = F(() => {
|
|
364
364
|
for (let e of p.current.values()) e.controller.abort();
|
|
365
365
|
p.current.clear(), m.current.clear(), g([]);
|
|
366
366
|
}, [g]);
|
|
367
|
-
return
|
|
367
|
+
return I(() => {
|
|
368
368
|
_.current?.(d);
|
|
369
|
-
}, [d]),
|
|
369
|
+
}, [d]), I(() => {
|
|
370
370
|
let e = p.current, t = m.current;
|
|
371
371
|
return () => {
|
|
372
372
|
for (let t of e.values()) t.controller.abort();
|
|
@@ -374,8 +374,8 @@ function xe(e = {}) {
|
|
|
374
374
|
};
|
|
375
375
|
}, []), {
|
|
376
376
|
attachments: d,
|
|
377
|
-
uploadedAttachments:
|
|
378
|
-
isUploading:
|
|
377
|
+
uploadedAttachments: R(() => d.filter((e) => e.status === "uploaded" || !e.status), [d]),
|
|
378
|
+
isUploading: R(() => d.some((e) => e.status === "uploading"), [d]),
|
|
379
379
|
addFiles: x,
|
|
380
380
|
removeAttachment: S,
|
|
381
381
|
retryAttachment: C,
|
|
@@ -385,172 +385,173 @@ function xe(e = {}) {
|
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
387
387
|
//#region src/components/features/comments/partials/comment-composer.tsx
|
|
388
|
-
function
|
|
388
|
+
function Ce(e) {
|
|
389
389
|
return !e || typeof e != "string" ? !1 : e.replace(/<[^>]*>/g, "").trim().length > 0;
|
|
390
390
|
}
|
|
391
|
-
var
|
|
392
|
-
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(() => ({
|
|
393
393
|
...h,
|
|
394
|
-
maxFiles:
|
|
395
|
-
disabled: h?.disabled === !0 || !
|
|
394
|
+
maxFiles: E,
|
|
395
|
+
disabled: h?.disabled === !0 || !T
|
|
396
396
|
}), [
|
|
397
|
-
|
|
397
|
+
T,
|
|
398
398
|
h,
|
|
399
|
-
|
|
400
|
-
]),
|
|
399
|
+
E
|
|
400
|
+
]), O = z(null), [k, re] = B(() => v?.content ?? c?.content ?? ""), [j, M] = B(null), [ce, N] = B(null), P = A({
|
|
401
401
|
resources: w,
|
|
402
|
-
onResourceSearch:
|
|
403
|
-
editorRef:
|
|
402
|
+
onResourceSearch: ee,
|
|
403
|
+
editorRef: O,
|
|
404
404
|
initialMentions: v?.references ?? c?.references
|
|
405
|
-
}),
|
|
406
|
-
...
|
|
405
|
+
}), F = Se({
|
|
406
|
+
...D,
|
|
407
407
|
initialAttachments: v?.attachments ?? void 0,
|
|
408
408
|
strings: C,
|
|
409
|
-
onError:
|
|
410
|
-
}),
|
|
411
|
-
|
|
409
|
+
onError: N
|
|
410
|
+
}), V = () => {
|
|
411
|
+
F.reset(), N(null), o?.();
|
|
412
412
|
};
|
|
413
|
-
|
|
414
|
-
focus: () =>
|
|
413
|
+
L(S, () => ({
|
|
414
|
+
focus: () => O.current?.focus(),
|
|
415
415
|
clear: () => {
|
|
416
|
-
|
|
416
|
+
O.current?.clear(), P.reset(), F.reset(), M(null), N(null);
|
|
417
417
|
},
|
|
418
418
|
setBody: (e) => {
|
|
419
|
-
|
|
419
|
+
O.current?.setHTML(e);
|
|
420
420
|
}
|
|
421
|
-
}), [
|
|
422
|
-
|
|
421
|
+
}), [F, P]), I(() => {
|
|
422
|
+
O.current?.setHTML(v?.content ?? ""), P.setMentions(v?.references ?? []), F.reset(), F.setAttachments(v?.attachments ?? []), M(null), N(null);
|
|
423
423
|
}, [
|
|
424
424
|
e.id,
|
|
425
425
|
e.type,
|
|
426
426
|
i
|
|
427
|
-
]),
|
|
427
|
+
]), I(() => {
|
|
428
428
|
if (!c) return;
|
|
429
|
-
|
|
429
|
+
O.current?.setHTML(c.content ?? ""), P.setMentions(c.references ?? []);
|
|
430
430
|
let e = (c.attachments ?? []).filter((e) => !!e);
|
|
431
|
-
|
|
432
|
-
}, [c?.id]),
|
|
433
|
-
r?.content &&
|
|
431
|
+
F.reset(), F.setAttachments(e), N(null);
|
|
432
|
+
}, [c?.id]), I(() => {
|
|
433
|
+
r?.content && M(r.content);
|
|
434
434
|
}, [r]);
|
|
435
|
-
let
|
|
436
|
-
if (t?.preventDefault(), n ||
|
|
437
|
-
let r =
|
|
438
|
-
if (!
|
|
439
|
-
|
|
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);
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
M(null), a({
|
|
443
443
|
content: r,
|
|
444
444
|
commentableId: e.id,
|
|
445
445
|
commentableType: e.type,
|
|
446
446
|
moduleKey: e.moduleKey,
|
|
447
447
|
contentType: "html",
|
|
448
|
-
references:
|
|
449
|
-
attachments:
|
|
448
|
+
references: P.mentions,
|
|
449
|
+
attachments: F.uploadedAttachments,
|
|
450
450
|
replyToId: l?.commentId ?? v?.replyToId,
|
|
451
451
|
editingId: c?.id
|
|
452
452
|
});
|
|
453
|
-
},
|
|
454
|
-
e?.length && (
|
|
455
|
-
},
|
|
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, {
|
|
456
456
|
label: C.composerEditingEyebrow,
|
|
457
457
|
closeLabel: C.composerCancel,
|
|
458
|
-
onClose:
|
|
459
|
-
}) :
|
|
460
|
-
label:
|
|
458
|
+
onClose: o ? V : void 0
|
|
459
|
+
}) : J ? /* @__PURE__ */ H(we, {
|
|
460
|
+
label: Q(C.composerReplyingEyebrow, l.authorName),
|
|
461
461
|
closeLabel: C.composerCancel,
|
|
462
|
-
onClose:
|
|
463
|
-
}) : null,
|
|
462
|
+
onClose: o ? V : void 0
|
|
463
|
+
}) : null, Y = R(() => {
|
|
464
464
|
let e = [];
|
|
465
465
|
return w && Object.keys(w).length > 0 && e.push({
|
|
466
466
|
id: "reference",
|
|
467
|
-
icon:
|
|
467
|
+
icon: le,
|
|
468
468
|
label: C.composerReferenceLabel,
|
|
469
|
-
onClick: () =>
|
|
470
|
-
}),
|
|
469
|
+
onClick: () => P.setPickerOpen(!0)
|
|
470
|
+
}), D?.onUpload && !D.disabled && e.push({
|
|
471
471
|
id: "attachment",
|
|
472
|
-
icon:
|
|
472
|
+
icon: pe,
|
|
473
473
|
label: C.composerAttachmentLabel,
|
|
474
|
-
onClick:
|
|
474
|
+
onClick: de
|
|
475
475
|
}), e;
|
|
476
476
|
}, [
|
|
477
477
|
w,
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
D?.onUpload,
|
|
479
|
+
D?.disabled,
|
|
480
480
|
C.composerReferenceLabel,
|
|
481
481
|
C.composerAttachmentLabel
|
|
482
482
|
]);
|
|
483
483
|
if (!t) return null;
|
|
484
|
-
let X = /* @__PURE__ */
|
|
484
|
+
let X = /* @__PURE__ */ H(p, {
|
|
485
|
+
tone: "primary",
|
|
485
486
|
type: "button",
|
|
486
|
-
onClick: () =>
|
|
487
|
-
disabled: n ||
|
|
488
|
-
icon: n ?
|
|
487
|
+
onClick: () => ue(),
|
|
488
|
+
disabled: n || F.isUploading,
|
|
489
|
+
icon: n ? fe : void 0,
|
|
489
490
|
children: me
|
|
490
|
-
}), _e =
|
|
491
|
+
}), _e = q || J || o ? /* @__PURE__ */ H(p, {
|
|
491
492
|
type: "button",
|
|
492
493
|
tone: "secondary",
|
|
493
494
|
buttonStyle: "ghost",
|
|
494
|
-
onClick:
|
|
495
|
+
onClick: V,
|
|
495
496
|
disabled: n,
|
|
496
497
|
children: C.composerCancel
|
|
497
|
-
}) : null,
|
|
498
|
+
}) : null, ve = K ? /* @__PURE__ */ H(m, {
|
|
498
499
|
direction: "horizontal",
|
|
499
500
|
wrap: !0,
|
|
500
501
|
align: "center",
|
|
501
502
|
gap: "sm",
|
|
502
|
-
children:
|
|
503
|
+
children: F.attachments.map((e) => /* @__PURE__ */ H(be, {
|
|
503
504
|
attachment: e,
|
|
504
505
|
editable: !0,
|
|
505
506
|
onRemove: (e) => {
|
|
506
|
-
|
|
507
|
+
N(null), F.removeAttachment(e);
|
|
507
508
|
},
|
|
508
509
|
onRetry: (e) => {
|
|
509
|
-
|
|
510
|
+
N(null), F.retryAttachment(e);
|
|
510
511
|
},
|
|
511
512
|
strings: u
|
|
512
513
|
}, e.id))
|
|
513
|
-
}) : null,
|
|
514
|
-
return /* @__PURE__ */
|
|
515
|
-
render: /* @__PURE__ */
|
|
514
|
+
}) : null, ye = K ? ve : null, xe = b !== !1 && !q && !J ? X : null, Z = b === !1 || q || J;
|
|
515
|
+
return /* @__PURE__ */ U(m, {
|
|
516
|
+
render: /* @__PURE__ */ H("form", {}),
|
|
516
517
|
gap: "md",
|
|
517
|
-
onSubmit:
|
|
518
|
+
onSubmit: ue,
|
|
518
519
|
className: "comment-composer--component",
|
|
519
520
|
children: [
|
|
520
521
|
he,
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
ref:
|
|
522
|
+
/* @__PURE__ */ H("input", {
|
|
523
|
+
ref: W,
|
|
523
524
|
type: "file",
|
|
524
525
|
multiple: !0,
|
|
525
526
|
hidden: !0,
|
|
526
|
-
accept:
|
|
527
|
+
accept: D?.accept,
|
|
527
528
|
onChange: (e) => {
|
|
528
|
-
|
|
529
|
+
G(e.target.files), e.target.value = "";
|
|
529
530
|
}
|
|
530
531
|
}),
|
|
531
|
-
!
|
|
532
|
-
open:
|
|
533
|
-
onOpenChange:
|
|
534
|
-
children: [/* @__PURE__ */
|
|
532
|
+
!P.triggerActive && /* @__PURE__ */ U(ne, {
|
|
533
|
+
open: P.pickerOpen,
|
|
534
|
+
onOpenChange: P.setPickerOpen,
|
|
535
|
+
children: [/* @__PURE__ */ H(te, { render: /* @__PURE__ */ H(p, {
|
|
535
536
|
type: "button",
|
|
536
537
|
tone: "secondary",
|
|
537
538
|
buttonStyle: "ghost",
|
|
538
539
|
className: "sr-only",
|
|
539
540
|
tabIndex: -1,
|
|
540
541
|
children: C.composerReferenceLabel
|
|
541
|
-
}) }), /* @__PURE__ */
|
|
542
|
-
open:
|
|
543
|
-
activeKind:
|
|
542
|
+
}) }), /* @__PURE__ */ H(oe, {
|
|
543
|
+
open: P.pickerOpen,
|
|
544
|
+
activeKind: P.activeKind,
|
|
544
545
|
setActiveKind: (e) => {
|
|
545
|
-
|
|
546
|
+
P.setActiveKind(e), P.setManualKindOverride(!0);
|
|
546
547
|
},
|
|
547
|
-
kinds:
|
|
548
|
+
kinds: P.kinds,
|
|
548
549
|
resources: w,
|
|
549
|
-
query:
|
|
550
|
-
setQuery:
|
|
551
|
-
suggestions:
|
|
552
|
-
loading:
|
|
553
|
-
onSelect:
|
|
550
|
+
query: P.query,
|
|
551
|
+
setQuery: P.setQuery,
|
|
552
|
+
suggestions: P.suggestions,
|
|
553
|
+
loading: P.isLoading,
|
|
554
|
+
onSelect: P.pickSuggestion,
|
|
554
555
|
strings: {
|
|
555
556
|
title: C.composerReferenceMenuTitle,
|
|
556
557
|
searchPlaceholder: C.composerReferenceSearchPlaceholder,
|
|
@@ -559,40 +560,40 @@ var Ce = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors
|
|
|
559
560
|
}
|
|
560
561
|
})]
|
|
561
562
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ U("div", {
|
|
563
564
|
className: "comment-composer--editor relative",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
565
|
-
ref:
|
|
566
|
-
value:
|
|
565
|
+
children: [/* @__PURE__ */ H(ie, {
|
|
566
|
+
ref: O,
|
|
567
|
+
value: k,
|
|
567
568
|
onValueChange: (e) => {
|
|
568
|
-
|
|
569
|
-
let t =
|
|
569
|
+
re(e);
|
|
570
|
+
let t = se(e), n = P.mentions;
|
|
570
571
|
if (n.map((e) => e.id).join("|") !== t.map((e) => e.id).join("|")) {
|
|
571
572
|
let e = new Map(n.map((e) => [e.id, e])), r = t.map((t) => e.get(t.id) ?? t);
|
|
572
|
-
|
|
573
|
+
P.setMentions(r);
|
|
573
574
|
}
|
|
574
575
|
},
|
|
575
576
|
placeholder: x ?? C.composerPlaceholder,
|
|
576
577
|
strings: { editorLabel: x ?? C.composerPlaceholder },
|
|
577
578
|
minHeight: "3rem",
|
|
578
|
-
autoFocus: y ||
|
|
579
|
-
extraToolbarItems:
|
|
580
|
-
toolbarTrailing:
|
|
581
|
-
footerSlot:
|
|
582
|
-
onCaretChange:
|
|
583
|
-
}), /* @__PURE__ */
|
|
584
|
-
open:
|
|
585
|
-
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,
|
|
586
587
|
setActiveKind: (e) => {
|
|
587
|
-
|
|
588
|
+
P.setActiveKind(e), P.setManualKindOverride(!0);
|
|
588
589
|
},
|
|
589
|
-
kinds:
|
|
590
|
+
kinds: P.kinds,
|
|
590
591
|
resources: w,
|
|
591
|
-
query:
|
|
592
|
-
suggestions:
|
|
593
|
-
suggestionsByKind:
|
|
594
|
-
loading:
|
|
595
|
-
onSelect:
|
|
592
|
+
query: P.query,
|
|
593
|
+
suggestions: P.suggestions,
|
|
594
|
+
suggestionsByKind: P.suggestionsByKind,
|
|
595
|
+
loading: P.isLoading,
|
|
596
|
+
onSelect: P.pickSuggestion,
|
|
596
597
|
strings: {
|
|
597
598
|
title: C.composerReferenceMenuTitle,
|
|
598
599
|
empty: C.composerReferenceEmpty,
|
|
@@ -600,19 +601,19 @@ var Ce = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors
|
|
|
600
601
|
}
|
|
601
602
|
})]
|
|
602
603
|
}),
|
|
603
|
-
|
|
604
|
+
ce && /* @__PURE__ */ H(s, {
|
|
604
605
|
role: "alert",
|
|
605
606
|
size: "xs",
|
|
606
607
|
type: "error",
|
|
607
608
|
className: "comment-composer--attachment-error",
|
|
608
|
-
children:
|
|
609
|
+
children: ce
|
|
609
610
|
}),
|
|
610
|
-
|
|
611
|
+
j && /* @__PURE__ */ H(s, {
|
|
611
612
|
size: "xs",
|
|
612
613
|
type: "error",
|
|
613
|
-
children:
|
|
614
|
+
children: j
|
|
614
615
|
}),
|
|
615
|
-
|
|
616
|
+
Z && /* @__PURE__ */ U(m, {
|
|
616
617
|
direction: "horizontal",
|
|
617
618
|
align: "center",
|
|
618
619
|
justify: "end",
|
|
@@ -623,32 +624,32 @@ var Ce = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors
|
|
|
623
624
|
]
|
|
624
625
|
});
|
|
625
626
|
});
|
|
626
|
-
function
|
|
627
|
-
return /* @__PURE__ */
|
|
627
|
+
function we({ label: e, closeLabel: t, onClose: n }) {
|
|
628
|
+
return /* @__PURE__ */ U("div", {
|
|
628
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),
|
|
629
|
-
children: [/* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ H(o, { children: e }), n ? /* @__PURE__ */ H("button", {
|
|
630
631
|
type: "button",
|
|
631
632
|
onClick: n,
|
|
632
|
-
className: i(
|
|
633
|
+
className: i(k.target, k.focus, k.toggle),
|
|
633
634
|
"aria-label": t,
|
|
634
|
-
children: /* @__PURE__ */
|
|
635
|
-
className:
|
|
635
|
+
children: /* @__PURE__ */ H(Y, {
|
|
636
|
+
className: k.icon,
|
|
636
637
|
"aria-hidden": "true"
|
|
637
638
|
})
|
|
638
639
|
}) : null]
|
|
639
640
|
});
|
|
640
641
|
}
|
|
641
|
-
function
|
|
642
|
+
function Q(e, t) {
|
|
642
643
|
return n(e, { name: t }, { missing: "empty" });
|
|
643
644
|
}
|
|
644
645
|
//#endregion
|
|
645
646
|
//#region src/components/features/comments/partials/comment-empty.tsx
|
|
646
|
-
var
|
|
647
|
-
let r =
|
|
648
|
-
return /* @__PURE__ */
|
|
647
|
+
var $ = ({ strings: e, icon: t, className: n }) => {
|
|
648
|
+
let r = ge(e);
|
|
649
|
+
return /* @__PURE__ */ H(re, {
|
|
649
650
|
title: r.empty,
|
|
650
651
|
description: r.emptyHint || !1,
|
|
651
|
-
media: t ?? /* @__PURE__ */
|
|
652
|
+
media: t ?? /* @__PURE__ */ H(K, {
|
|
652
653
|
className: "size-icon",
|
|
653
654
|
"aria-hidden": "true"
|
|
654
655
|
}),
|
|
@@ -659,18 +660,18 @@ var Te = ({ strings: e, icon: t, className: n }) => {
|
|
|
659
660
|
};
|
|
660
661
|
//#endregion
|
|
661
662
|
//#region src/components/features/comments/partials/comment-content.tsx
|
|
662
|
-
function
|
|
663
|
+
function Te(e) {
|
|
663
664
|
let { comment: t, resources: n, renderReference: r, sanitizer: i } = e, a = t.contentType ?? t.content_type ?? "text";
|
|
664
665
|
if (a === "rich") {
|
|
665
|
-
let e =
|
|
666
|
-
return e ? /* @__PURE__ */
|
|
666
|
+
let e = Ee(t.content);
|
|
667
|
+
return e ? /* @__PURE__ */ H("div", {
|
|
667
668
|
className: "comment-content--component",
|
|
668
669
|
children: e
|
|
669
670
|
}) : null;
|
|
670
671
|
}
|
|
671
|
-
if (a === "html") return /* @__PURE__ */
|
|
672
|
+
if (a === "html") return /* @__PURE__ */ H("div", {
|
|
672
673
|
className: "comment-content--component",
|
|
673
|
-
children: /* @__PURE__ */
|
|
674
|
+
children: /* @__PURE__ */ H(j, {
|
|
674
675
|
html: t.content ?? "",
|
|
675
676
|
mentions: t.references,
|
|
676
677
|
resources: n,
|
|
@@ -678,48 +679,48 @@ function Ee(e) {
|
|
|
678
679
|
sanitizer: i
|
|
679
680
|
})
|
|
680
681
|
});
|
|
681
|
-
let
|
|
682
|
-
return /* @__PURE__ */
|
|
682
|
+
let o = ke(t.content ?? "");
|
|
683
|
+
return /* @__PURE__ */ H(s, {
|
|
683
684
|
className: "comment-content--component whitespace-pre-line",
|
|
684
|
-
children:
|
|
685
|
+
children: o
|
|
685
686
|
});
|
|
686
687
|
}
|
|
687
|
-
function
|
|
688
|
+
function Ee(e) {
|
|
688
689
|
if (!e) return null;
|
|
689
690
|
try {
|
|
690
691
|
let t = JSON.parse(e);
|
|
691
|
-
return !t || !Array.isArray(t.blocks) || t.blocks.length === 0 ? null : /* @__PURE__ */
|
|
692
|
+
return !t || !Array.isArray(t.blocks) || t.blocks.length === 0 ? null : /* @__PURE__ */ H(s, {
|
|
692
693
|
tag: "div",
|
|
693
694
|
className: y,
|
|
694
|
-
children: t.blocks.map((e, t) => /* @__PURE__ */
|
|
695
|
+
children: t.blocks.map((e, t) => /* @__PURE__ */ H(M, { children: De(e) }, e.id ?? `${e.type}-${t}`))
|
|
695
696
|
});
|
|
696
697
|
} catch {
|
|
697
|
-
let t =
|
|
698
|
-
return /* @__PURE__ */
|
|
698
|
+
let t = ke(e);
|
|
699
|
+
return /* @__PURE__ */ H(s, {
|
|
699
700
|
className: "whitespace-pre-line",
|
|
700
701
|
children: t
|
|
701
702
|
});
|
|
702
703
|
}
|
|
703
704
|
}
|
|
704
|
-
function
|
|
705
|
+
function De(e) {
|
|
705
706
|
let t = e.data ?? {};
|
|
706
707
|
switch (e.type) {
|
|
707
708
|
case "paragraph": {
|
|
708
709
|
let e = String(t.text ?? "").trim();
|
|
709
710
|
if (!e) return null;
|
|
710
711
|
let n = v(e);
|
|
711
|
-
return n ? /* @__PURE__ */
|
|
712
|
+
return n ? /* @__PURE__ */ H("p", { dangerouslySetInnerHTML: { __html: n } }) : null;
|
|
712
713
|
}
|
|
713
714
|
case "header": {
|
|
714
|
-
let e =
|
|
715
|
-
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;
|
|
716
717
|
}
|
|
717
718
|
case "list": {
|
|
718
|
-
let e = (Array.isArray(t.items) ? t.items : []).map((e) =>
|
|
719
|
-
return e.length === 0 ? null : t.style === "ordered" ? /* @__PURE__ */
|
|
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, {
|
|
720
721
|
tag: "span",
|
|
721
722
|
children: e
|
|
722
|
-
}) }, `${e}-${t}`)) }) : /* @__PURE__ */
|
|
723
|
+
}) }, `${e}-${t}`)) }) : /* @__PURE__ */ H("ul", { children: e.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(s, {
|
|
723
724
|
tag: "span",
|
|
724
725
|
children: e
|
|
725
726
|
}) }, e)) });
|
|
@@ -727,16 +728,16 @@ function Oe(e) {
|
|
|
727
728
|
case "quote": {
|
|
728
729
|
let e = String(t.text ?? "").trim();
|
|
729
730
|
if (!e) return null;
|
|
730
|
-
let n =
|
|
731
|
-
return /* @__PURE__ */
|
|
731
|
+
let n = Oe(String(t.caption ?? ""));
|
|
732
|
+
return /* @__PURE__ */ U("blockquote", {
|
|
732
733
|
className: "italic",
|
|
733
|
-
children: [/* @__PURE__ */
|
|
734
|
+
children: [/* @__PURE__ */ H(b, {
|
|
734
735
|
tag: "div",
|
|
735
736
|
html: e,
|
|
736
737
|
type: "secondary"
|
|
737
|
-
}), n.length > 0 && /* @__PURE__ */
|
|
738
|
+
}), n.length > 0 && /* @__PURE__ */ H("cite", {
|
|
738
739
|
className: "mt-1 block not-italic",
|
|
739
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ U(s, {
|
|
740
741
|
tag: "span",
|
|
741
742
|
size: "xs",
|
|
742
743
|
type: "secondary",
|
|
@@ -746,23 +747,23 @@ function Oe(e) {
|
|
|
746
747
|
})]
|
|
747
748
|
});
|
|
748
749
|
}
|
|
749
|
-
case "delimiter": return /* @__PURE__ */
|
|
750
|
+
case "delimiter": return /* @__PURE__ */ H("hr", {
|
|
750
751
|
className: "border-dashed",
|
|
751
752
|
"aria-hidden": "true"
|
|
752
753
|
});
|
|
753
754
|
default: {
|
|
754
|
-
let e =
|
|
755
|
-
return e ? /* @__PURE__ */
|
|
755
|
+
let e = Oe(String(t.text ?? ""));
|
|
756
|
+
return e ? /* @__PURE__ */ H("p", {
|
|
756
757
|
className: "whitespace-pre-line",
|
|
757
758
|
children: e
|
|
758
759
|
}) : null;
|
|
759
760
|
}
|
|
760
761
|
}
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
+
function Oe(e) {
|
|
763
764
|
return e.replace(/<[^>]*>/g, "").trim();
|
|
764
765
|
}
|
|
765
|
-
function
|
|
766
|
+
function ke(e) {
|
|
766
767
|
if (typeof e != "string") return "";
|
|
767
768
|
let t = e.trim();
|
|
768
769
|
if (t === "") return "";
|
|
@@ -775,148 +776,148 @@ function Ae(e) {
|
|
|
775
776
|
}
|
|
776
777
|
//#endregion
|
|
777
778
|
//#region src/components/features/comments/partials/comment-item.tsx
|
|
778
|
-
var
|
|
779
|
-
let
|
|
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({
|
|
780
781
|
getMediaUrl: C,
|
|
781
|
-
getMediaName:
|
|
782
|
-
getStatusLabel:
|
|
783
|
-
formatRelativeTime:
|
|
784
|
-
}),
|
|
785
|
-
if (!
|
|
786
|
-
let e =
|
|
787
|
-
return e === "" ?
|
|
788
|
-
}, [
|
|
789
|
-
|
|
790
|
-
}, [
|
|
791
|
-
return /* @__PURE__ */
|
|
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;
|
|
792
|
+
return /* @__PURE__ */ U("article", {
|
|
792
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"),
|
|
793
794
|
"data-comment-id": e.id,
|
|
794
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ U(m, {
|
|
795
796
|
direction: "horizontal",
|
|
796
797
|
align: "start",
|
|
797
798
|
gap: "lg",
|
|
798
799
|
className: "min-w-0",
|
|
799
|
-
children: [/* @__PURE__ */
|
|
800
|
+
children: [/* @__PURE__ */ U(E, {
|
|
800
801
|
className: "mt-0.5 size-avatar shrink-0",
|
|
801
|
-
children: [!!
|
|
802
|
-
src:
|
|
803
|
-
alt:
|
|
804
|
-
}), /* @__PURE__ */
|
|
802
|
+
children: [!!z && /* @__PURE__ */ H(D, {
|
|
803
|
+
src: z,
|
|
804
|
+
alt: L
|
|
805
|
+
}), /* @__PURE__ */ H(T, {
|
|
805
806
|
className: "bg-muted text-muted-foreground text-xs font-medium",
|
|
806
|
-
children:
|
|
807
|
+
children: V
|
|
807
808
|
})]
|
|
808
|
-
}), /* @__PURE__ */
|
|
809
|
+
}), /* @__PURE__ */ U("div", {
|
|
809
810
|
className: "comment-item--body min-w-0 flex-1",
|
|
810
811
|
children: [
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ U(m, {
|
|
812
813
|
direction: "horizontal",
|
|
813
814
|
align: "baseline",
|
|
814
815
|
gap: "md",
|
|
815
816
|
className: "min-w-0",
|
|
816
817
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ H(s, {
|
|
818
819
|
tag: "span",
|
|
819
820
|
weight: "semibold",
|
|
820
821
|
className: "truncate",
|
|
821
|
-
children:
|
|
822
|
+
children: L
|
|
822
823
|
}),
|
|
823
|
-
!!
|
|
824
|
+
!!G && /* @__PURE__ */ H(f, {
|
|
824
825
|
delayDuration: 0,
|
|
825
|
-
children: /* @__PURE__ */
|
|
826
|
-
render: /* @__PURE__ */
|
|
827
|
-
children: /* @__PURE__ */
|
|
828
|
-
className: "text-
|
|
826
|
+
children: /* @__PURE__ */ U(l, { children: [/* @__PURE__ */ H(u, {
|
|
827
|
+
render: /* @__PURE__ */ H("span", { className: "inline-flex shrink-0 self-center" }),
|
|
828
|
+
children: /* @__PURE__ */ H(J, {
|
|
829
|
+
className: "text-muted-foreground size-icon-sm",
|
|
829
830
|
"aria-hidden": !0
|
|
830
831
|
})
|
|
831
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ H(d, {
|
|
832
833
|
side: "top",
|
|
833
834
|
className: "text-xs",
|
|
834
|
-
children:
|
|
835
|
+
children: j.pinned
|
|
835
836
|
})] })
|
|
836
837
|
}),
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ H(ee, {
|
|
838
839
|
value: e.createdAt,
|
|
839
|
-
formatRelativeTime:
|
|
840
|
+
formatRelativeTime: I,
|
|
840
841
|
size: "xs",
|
|
841
842
|
className: "shrink-0 tabular-nums"
|
|
842
843
|
}),
|
|
843
|
-
!!
|
|
844
|
+
!!fe && /* @__PURE__ */ H(s, {
|
|
844
845
|
tag: "span",
|
|
845
846
|
size: "xs",
|
|
846
847
|
type: "secondary",
|
|
847
848
|
className: "shrink-0",
|
|
848
|
-
children:
|
|
849
|
+
children: j.edited
|
|
849
850
|
}),
|
|
850
|
-
!!
|
|
851
|
+
!!K && !!pe && /* @__PURE__ */ H(O, {
|
|
851
852
|
size: "sm",
|
|
852
853
|
tone: "secondary",
|
|
853
854
|
className: "self-center",
|
|
854
|
-
children:
|
|
855
|
+
children: pe
|
|
855
856
|
})
|
|
856
857
|
]
|
|
857
858
|
}),
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ H("div", {
|
|
859
860
|
className: "mt-1 leading-relaxed",
|
|
860
|
-
children: /* @__PURE__ */
|
|
861
|
+
children: /* @__PURE__ */ H(Te, {
|
|
861
862
|
comment: e,
|
|
862
|
-
resources:
|
|
863
|
-
renderReference:
|
|
863
|
+
resources: ie,
|
|
864
|
+
renderReference: ae,
|
|
864
865
|
sanitizer: x
|
|
865
866
|
})
|
|
866
867
|
}),
|
|
867
|
-
|
|
868
|
+
le.length > 0 && /* @__PURE__ */ H("div", {
|
|
868
869
|
className: "mt-space-md flex flex-wrap gap-space-sm",
|
|
869
|
-
children:
|
|
870
|
+
children: le.map((e) => /* @__PURE__ */ H(O, {
|
|
870
871
|
size: "sm",
|
|
871
872
|
tone: "secondary",
|
|
872
873
|
children: e
|
|
873
874
|
}, e))
|
|
874
875
|
}),
|
|
875
|
-
Oe && /* @__PURE__ */
|
|
876
|
+
Oe && /* @__PURE__ */ H("div", {
|
|
876
877
|
className: "mt-space-md flex flex-wrap gap-space-sm",
|
|
877
|
-
children:
|
|
878
|
-
if (
|
|
879
|
-
let t = !!a && !!e.id &&
|
|
880
|
-
return /* @__PURE__ */
|
|
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, {
|
|
881
882
|
attachment: e,
|
|
882
883
|
editable: t,
|
|
883
884
|
onRemove: t ? () => De(e.id) : void 0,
|
|
884
885
|
accessors: {
|
|
885
|
-
getMediaUrl:
|
|
886
|
-
getMediaName:
|
|
886
|
+
getMediaUrl: ce,
|
|
887
|
+
getMediaName: N
|
|
887
888
|
},
|
|
888
889
|
strings: S
|
|
889
890
|
}, e.id ?? e.name);
|
|
890
891
|
})
|
|
891
892
|
}),
|
|
892
|
-
|
|
893
|
+
de.length > 0 && /* @__PURE__ */ H(m, {
|
|
893
894
|
direction: "horizontal",
|
|
894
895
|
wrap: !0,
|
|
895
896
|
align: "center",
|
|
896
897
|
gap: "xs",
|
|
897
898
|
className: "mt-space-md",
|
|
898
|
-
children:
|
|
899
|
+
children: de.map((t) => /* @__PURE__ */ H("button", {
|
|
899
900
|
type: "button",
|
|
900
|
-
"aria-label": n(
|
|
901
|
+
"aria-label": n(j.reactionLabel ?? X.reactionLabel, {
|
|
901
902
|
emoji: t.emoji,
|
|
902
903
|
count: t.count
|
|
903
904
|
}),
|
|
904
905
|
"aria-pressed": t.mine ?? !1,
|
|
905
906
|
onClick: () => h && e.id ? h(e.id, t.emoji) : void 0,
|
|
906
907
|
title: t.users?.join(", "),
|
|
907
|
-
className: i(
|
|
908
|
-
children: /* @__PURE__ */
|
|
908
|
+
className: i(k.inline, k.focus),
|
|
909
|
+
children: /* @__PURE__ */ U(O, {
|
|
909
910
|
size: "sm",
|
|
910
|
-
tone: t.mine ? "
|
|
911
|
+
tone: t.mine ? "info" : "secondary",
|
|
911
912
|
className: "cursor-pointer transition-colors hover:opacity-90",
|
|
912
|
-
children: [/* @__PURE__ */
|
|
913
|
+
children: [/* @__PURE__ */ H(s, {
|
|
913
914
|
tag: "span",
|
|
914
915
|
size: "inherit",
|
|
915
916
|
lineHeight: "none",
|
|
916
917
|
className: "text-inherit",
|
|
917
918
|
"aria-hidden": !0,
|
|
918
919
|
children: t.emoji
|
|
919
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ H(w, {
|
|
920
921
|
value: t.count,
|
|
921
922
|
size: "inherit",
|
|
922
923
|
align: "left",
|
|
@@ -925,54 +926,54 @@ var je = "?", Me = (e) => e?.url, Ne = (e) => e?.name, Pe = (e) => e.charAt(0).t
|
|
|
925
926
|
})
|
|
926
927
|
}, t.emoji))
|
|
927
928
|
}),
|
|
928
|
-
|
|
929
|
-
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"),
|
|
930
931
|
children: [
|
|
931
|
-
|
|
932
|
+
ye && /* @__PURE__ */ H(p, {
|
|
932
933
|
type: "button",
|
|
933
934
|
size: "sm",
|
|
934
935
|
iconOnly: !0,
|
|
935
936
|
tone: "secondary",
|
|
936
937
|
buttonStyle: "ghost",
|
|
937
938
|
onClick: () => e.id && v(e.id),
|
|
938
|
-
title:
|
|
939
|
-
"aria-label":
|
|
940
|
-
children: /* @__PURE__ */
|
|
939
|
+
title: j.replyLabel,
|
|
940
|
+
"aria-label": j.replyLabel,
|
|
941
|
+
children: /* @__PURE__ */ H(ue, { className: "size-icon-md" })
|
|
941
942
|
}),
|
|
942
|
-
|
|
943
|
+
xe && /* @__PURE__ */ H(p, {
|
|
943
944
|
type: "button",
|
|
944
945
|
size: "sm",
|
|
945
946
|
iconOnly: !0,
|
|
946
947
|
tone: "secondary",
|
|
947
948
|
buttonStyle: "ghost",
|
|
948
949
|
onClick: () => e.id && h(e.id, "👍"),
|
|
949
|
-
title:
|
|
950
|
-
"aria-label":
|
|
951
|
-
children: /* @__PURE__ */
|
|
950
|
+
title: j.addReactionLabel,
|
|
951
|
+
"aria-label": j.addReactionLabel,
|
|
952
|
+
children: /* @__PURE__ */ H(me, { className: "size-icon-md" })
|
|
952
953
|
}),
|
|
953
|
-
|
|
954
|
+
Se && /* @__PURE__ */ H(p, {
|
|
954
955
|
type: "button",
|
|
955
956
|
size: "sm",
|
|
956
957
|
iconOnly: !0,
|
|
957
958
|
tone: "secondary",
|
|
958
959
|
buttonStyle: "ghost",
|
|
959
960
|
onClick: () => c(e),
|
|
960
|
-
title:
|
|
961
|
-
"aria-label":
|
|
962
|
-
children: /* @__PURE__ */
|
|
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") })
|
|
963
964
|
}),
|
|
964
|
-
|
|
965
|
+
Ce && /* @__PURE__ */ H(p, {
|
|
965
966
|
type: "button",
|
|
966
967
|
size: "sm",
|
|
967
968
|
iconOnly: !0,
|
|
968
969
|
tone: "secondary",
|
|
969
970
|
buttonStyle: "ghost",
|
|
970
|
-
title:
|
|
971
|
-
"aria-label":
|
|
972
|
-
onClick: () =>
|
|
973
|
-
children: /* @__PURE__ */
|
|
971
|
+
title: j.editLabel,
|
|
972
|
+
"aria-label": j.editLabel,
|
|
973
|
+
onClick: () => o(e),
|
|
974
|
+
children: /* @__PURE__ */ H(q, { className: "size-icon-md" })
|
|
974
975
|
}),
|
|
975
|
-
|
|
976
|
+
Z && /* @__PURE__ */ H(p, {
|
|
976
977
|
type: "button",
|
|
977
978
|
size: "sm",
|
|
978
979
|
iconOnly: !0,
|
|
@@ -980,31 +981,31 @@ var je = "?", Me = (e) => e?.url, Ne = (e) => e?.name, Pe = (e) => e.charAt(0).t
|
|
|
980
981
|
buttonStyle: "ghost",
|
|
981
982
|
className: "hover:bg-destructive/10 hover:text-destructive",
|
|
982
983
|
onClick: () => r(e.id),
|
|
983
|
-
title:
|
|
984
|
-
"aria-label":
|
|
985
|
-
children: /* @__PURE__ */
|
|
984
|
+
title: j.deleteLabel,
|
|
985
|
+
"aria-label": j.deleteLabel,
|
|
986
|
+
children: /* @__PURE__ */ H(he, { className: "size-icon-md" })
|
|
986
987
|
})
|
|
987
988
|
]
|
|
988
989
|
})
|
|
989
990
|
]
|
|
990
991
|
})]
|
|
991
|
-
}), !!a && /* @__PURE__ */
|
|
992
|
-
|
|
992
|
+
}), !!a && /* @__PURE__ */ H(_, {
|
|
993
|
+
...Q.overlayProps,
|
|
993
994
|
destructive: !0,
|
|
994
|
-
title:
|
|
995
|
-
description:
|
|
996
|
-
strings: { confirm:
|
|
995
|
+
title: j.confirmRemoveAttachmentTitle,
|
|
996
|
+
description: j.confirmRemoveAttachmentDescription,
|
|
997
|
+
strings: { confirm: j.attachmentRemoveLabel },
|
|
997
998
|
onConfirm: () => {
|
|
998
|
-
|
|
999
|
+
$ && e.id && a(e.id, $);
|
|
999
1000
|
}
|
|
1000
1001
|
})]
|
|
1001
1002
|
});
|
|
1002
|
-
}),
|
|
1003
|
-
return e.length ? /* @__PURE__ */
|
|
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, {
|
|
1004
1005
|
gap: "sm",
|
|
1005
1006
|
className: "comment-timeline--component",
|
|
1006
1007
|
children: e.map((e, m) => {
|
|
1007
|
-
let x = /* @__PURE__ */
|
|
1008
|
+
let x = /* @__PURE__ */ H(Pe, {
|
|
1008
1009
|
comment: e,
|
|
1009
1010
|
canModerate: t,
|
|
1010
1011
|
onDelete: n,
|
|
@@ -1025,27 +1026,27 @@ var je = "?", Me = (e) => e?.url, Ne = (e) => e?.name, Pe = (e) => e.charAt(0).t
|
|
|
1025
1026
|
renderAttachment: y,
|
|
1026
1027
|
renderReference: b
|
|
1027
1028
|
});
|
|
1028
|
-
return v ? /* @__PURE__ */
|
|
1029
|
+
return v ? /* @__PURE__ */ H("div", { children: v({
|
|
1029
1030
|
comment: e,
|
|
1030
1031
|
canModerate: t ?? !1,
|
|
1031
1032
|
onDelete: n,
|
|
1032
1033
|
onAttachmentRemove: r,
|
|
1033
1034
|
onEdit: i,
|
|
1034
1035
|
defaultItem: x
|
|
1035
|
-
}) }, e.id ?? `comment-${m}`) : /* @__PURE__ */
|
|
1036
|
+
}) }, e.id ?? `comment-${m}`) : /* @__PURE__ */ H("div", { children: x }, e.id ?? `comment-${m}`);
|
|
1036
1037
|
})
|
|
1037
|
-
}) : /* @__PURE__ */
|
|
1038
|
+
}) : /* @__PURE__ */ H(V, { children: x ?? /* @__PURE__ */ H($, { strings: d }) });
|
|
1038
1039
|
};
|
|
1039
1040
|
//#endregion
|
|
1040
1041
|
//#region src/components/features/comments/comments.tsx
|
|
1041
|
-
function
|
|
1042
|
-
let n = e(), r = t.composerPosition ?? n.composerPosition ?? "top", a = t.maxAttachments ?? 5,
|
|
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({
|
|
1043
1044
|
onSubmit: t.onSubmit,
|
|
1044
1045
|
onUpdate: t.onUpdate,
|
|
1045
1046
|
onDelete: t.onDelete,
|
|
1046
1047
|
onAfterMutate: t.onAfterMutate,
|
|
1047
1048
|
onError: t.onError
|
|
1048
|
-
}),
|
|
1049
|
+
}), ee = F((e) => {
|
|
1049
1050
|
if (!b) {
|
|
1050
1051
|
w.deleteComment(e);
|
|
1051
1052
|
return;
|
|
@@ -1055,24 +1056,24 @@ function Le(t) {
|
|
|
1055
1056
|
b,
|
|
1056
1057
|
w,
|
|
1057
1058
|
x
|
|
1058
|
-
]),
|
|
1059
|
-
let t =
|
|
1060
|
-
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);
|
|
1061
1062
|
}, [
|
|
1063
|
+
E,
|
|
1062
1064
|
D,
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
]), A = w.composerMode.kind === "editing" ? w.composerMode.comment : void 0, ee = w.composerMode.kind === "replying" ? {
|
|
1065
|
+
T
|
|
1066
|
+
]), k = w.composerMode.kind === "editing" ? w.composerMode.comment : void 0, te = w.composerMode.kind === "replying" ? {
|
|
1066
1067
|
commentId: w.composerMode.commentId,
|
|
1067
1068
|
authorName: w.composerMode.authorName
|
|
1068
|
-
} : void 0,
|
|
1069
|
+
} : void 0, ne = t.composerSlot ?? (u ? /* @__PURE__ */ H(Z, {
|
|
1069
1070
|
context: t.context,
|
|
1070
1071
|
canComment: u,
|
|
1071
1072
|
submitting: w.isSubmitting,
|
|
1072
1073
|
errors: w.formErrors,
|
|
1073
1074
|
resetKey: w.resetKey,
|
|
1074
|
-
editingComment:
|
|
1075
|
-
replyingTo:
|
|
1075
|
+
editingComment: k,
|
|
1076
|
+
replyingTo: te,
|
|
1076
1077
|
onCancel: w.composerMode.kind === "idle" ? void 0 : w.cancelComposerMode,
|
|
1077
1078
|
onSubmit: w.submit,
|
|
1078
1079
|
strings: t.strings,
|
|
@@ -1080,16 +1081,16 @@ function Le(t) {
|
|
|
1080
1081
|
onResourceSearch: t.onResourceSearch,
|
|
1081
1082
|
attachments: h,
|
|
1082
1083
|
maxAttachments: a,
|
|
1083
|
-
allowAttachments:
|
|
1084
|
-
}) : null),
|
|
1084
|
+
allowAttachments: o
|
|
1085
|
+
}) : null), re = /* @__PURE__ */ H(Fe, {
|
|
1085
1086
|
comments: t.comments,
|
|
1086
1087
|
canModerate: d,
|
|
1087
|
-
onDelete: t.onDelete ?
|
|
1088
|
+
onDelete: t.onDelete ? ee : void 0,
|
|
1088
1089
|
onAttachmentRemove: t.onAttachmentRemove,
|
|
1089
1090
|
onEdit: u && t.onUpdate ? w.startEdit : void 0,
|
|
1090
1091
|
onPinToggle: f,
|
|
1091
1092
|
onReact: t.onReact,
|
|
1092
|
-
onReply: u && l ?
|
|
1093
|
+
onReply: u && l ? O : void 0,
|
|
1093
1094
|
allowReactions: c,
|
|
1094
1095
|
allowReplies: l,
|
|
1095
1096
|
sanitizer: t.sanitizer,
|
|
@@ -1102,41 +1103,41 @@ function Le(t) {
|
|
|
1102
1103
|
renderItem: t.renderItem,
|
|
1103
1104
|
renderAttachment: t.renderAttachment,
|
|
1104
1105
|
renderReference: t.renderReference,
|
|
1105
|
-
emptySlot: t.emptySlot ?? /* @__PURE__ */
|
|
1106
|
-
}),
|
|
1106
|
+
emptySlot: t.emptySlot ?? /* @__PURE__ */ H($, { strings: t.strings })
|
|
1107
|
+
}), ie = ne ? /* @__PURE__ */ H("div", { children: ne }) : null, A = /* @__PURE__ */ U(m, {
|
|
1107
1108
|
gap: "xl",
|
|
1108
1109
|
className: "comments--body",
|
|
1109
1110
|
children: [
|
|
1110
1111
|
t.headerSlot,
|
|
1111
|
-
r === "top" &&
|
|
1112
|
-
|
|
1113
|
-
r === "bottom" &&
|
|
1112
|
+
r === "top" && ie,
|
|
1113
|
+
re,
|
|
1114
|
+
r === "bottom" && ie,
|
|
1114
1115
|
t.footerSlot
|
|
1115
1116
|
]
|
|
1116
1117
|
});
|
|
1117
|
-
if (t.bare) return
|
|
1118
|
-
let
|
|
1119
|
-
return /* @__PURE__ */
|
|
1120
|
-
render: /* @__PURE__ */
|
|
1118
|
+
if (t.bare) return A;
|
|
1119
|
+
let ae = typeof y == "string" ? y : void 0;
|
|
1120
|
+
return /* @__PURE__ */ U(m, {
|
|
1121
|
+
render: /* @__PURE__ */ H("section", {}),
|
|
1121
1122
|
gap: "lg",
|
|
1122
1123
|
"data-component": "comments",
|
|
1123
1124
|
"data-slot": "comments",
|
|
1124
1125
|
className: i("comments--component", t.className),
|
|
1125
|
-
"aria-label":
|
|
1126
|
+
"aria-label": ae,
|
|
1126
1127
|
children: [
|
|
1127
|
-
!(y === !1 || !y && !v.subtitle) && /* @__PURE__ */
|
|
1128
|
+
!(y === !1 || !y && !v.subtitle) && /* @__PURE__ */ U(m, {
|
|
1128
1129
|
gap: "normal",
|
|
1129
1130
|
className: "comments--header",
|
|
1130
|
-
children: [!!y && /* @__PURE__ */
|
|
1131
|
+
children: [!!y && /* @__PURE__ */ H(s, {
|
|
1131
1132
|
weight: "semibold",
|
|
1132
1133
|
children: y
|
|
1133
|
-
}), !!v.subtitle && /* @__PURE__ */
|
|
1134
|
+
}), !!v.subtitle && /* @__PURE__ */ H(s, {
|
|
1134
1135
|
type: "secondary",
|
|
1135
1136
|
children: v.subtitle
|
|
1136
1137
|
})]
|
|
1137
1138
|
}),
|
|
1138
|
-
|
|
1139
|
-
!!(b && t.onDelete) && /* @__PURE__ */
|
|
1139
|
+
A,
|
|
1140
|
+
!!(b && t.onDelete) && /* @__PURE__ */ H(_, {
|
|
1140
1141
|
...x.overlayProps,
|
|
1141
1142
|
destructive: !0,
|
|
1142
1143
|
title: v.confirmDeleteTitle,
|
|
@@ -1151,6 +1152,6 @@ function Le(t) {
|
|
|
1151
1152
|
});
|
|
1152
1153
|
}
|
|
1153
1154
|
//#endregion
|
|
1154
|
-
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 };
|
|
1155
1156
|
|
|
1156
|
-
//# sourceMappingURL=comments-
|
|
1157
|
+
//# sourceMappingURL=comments-You0Bzbr.js.map
|