@nxgt/material 3.57.0 → 3.59.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 +32 -0
- package/README.md +33 -1
- package/dist/{async-slice-B3RMgJUn.js → async-slice-Cmvxrvn9.js} +2 -2
- package/dist/{background-BtSZsTvY.js → background-qdnet2A5.js} +124 -83
- package/dist/backgrounds.js +1 -1
- package/dist/barcode.js +440 -0
- package/dist/{button-hnUZpzYu.js → button-Deo7l4wM.js} +97 -74
- package/dist/{callout-view-C6voDS00.js → callout-view-C7UznnDW.js} +1 -1
- package/dist/charts.js +1531 -1489
- package/dist/{chip-kplPa8ZV.js → chip-BlmIjpiD.js} +2 -2
- package/dist/{code-editor-Ba61Cd-g.js → code-editor-BYEpBp_U.js} +312 -282
- package/dist/code-editor.js +14 -14
- package/dist/{code-language-items-CsDC4Ky4.js → code-language-items-Cqk4Fq61.js} +2 -2
- package/dist/components/components.css +1 -0
- package/dist/components/ui/widgets/barcode/barcode.css +112 -0
- package/dist/{components-BgckuX2C.js → components-BsKpeqVX.js} +28688 -25977
- package/dist/components.js +26 -26
- package/dist/{convert-XAkWyO8-.js → convert-7g-F5cNf.js} +1 -1
- package/dist/{dialog-DS8O4Kkb.js → dialog-1BstKBvt.js} +4 -4
- package/dist/dnd.js +1 -1
- package/dist/draw-animate.js +1 -1
- package/dist/{dropdown-menu-CvVQJpsn.js → dropdown-menu-hoaocAS7.js} +1 -1
- package/dist/editor-viewer.js +1 -1
- package/dist/editor.js +715 -607
- package/dist/empty-state-DEG9h7xk.js +139 -0
- package/dist/{escape-owner-BJvicDmr.js → escape-owner-BvLBo_Al.js} +22 -22
- package/dist/{field-blur-Cnjk0o9A.js → field-blur-BkeYPaWi.js} +1 -1
- package/dist/{field-blur-context-CYlx9KnB.js → field-blur-context-Ba7iZVm_.js} +1 -1
- package/dist/{headless-extensions-CvmdhANJ.js → headless-extensions-B1NAgmkE.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-DW4XnExA.js → hover-card-C5DTU9P_.js} +2 -2
- package/dist/{i18n-provider-DBr59j1p.js → i18n-provider-BJDI-A5w.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-4FMy66AC.js → icon-badge-9ZE6k7cn.js} +3 -3
- package/dist/{icon-button-QF7smCoV.js → icon-button-AwJtCkV5.js} +59 -59
- package/dist/{illustration-B4_W-OUS.js → illustration-DjZXUFbz.js} +11 -11
- package/dist/illustrations.js +1 -1
- package/dist/lib/backgrounds/background/background.d.ts +1 -1
- package/dist/lib/backgrounds/background/partials/use-background-scenes.d.ts +22 -0
- package/dist/lib/backgrounds/background/partials/use-themed-background.d.ts +304 -0
- package/dist/lib/barcode/index.d.ts +15 -0
- package/dist/lib/components/ui/actions/action-card/action-card-semantics-branches.d.ts +63 -0
- package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +0 -4
- package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +3 -1
- package/dist/lib/components/ui/actions/action-card/use-action-card.d.ts +80 -0
- package/dist/lib/components/ui/actions/button/button-busy.d.ts +8 -0
- package/dist/lib/components/ui/actions/button/button.classes.d.ts +7 -0
- package/dist/lib/components/ui/actions/index.d.ts +1 -0
- package/dist/lib/components/ui/actions/load-more-footer/index.d.ts +1 -0
- package/dist/lib/components/ui/actions/load-more-footer/load-more-footer.d.ts +24 -0
- package/dist/lib/components/ui/actions/toolbar/use-toolbar-state.d.ts +22 -0
- package/dist/lib/components/ui/collections/data-grid/columns/column-check.d.ts +15 -0
- package/dist/lib/components/ui/collections/data-grid/columns/column-edit.d.ts +1 -12
- package/dist/lib/components/ui/collections/data-grid/editors/editor-props.d.ts +20 -0
- package/dist/lib/components/ui/collections/data-grid/editors/editor-route-key.d.ts +11 -0
- package/dist/lib/components/ui/collections/data-grid/partials/grid-cell-access.d.ts +26 -0
- package/dist/lib/components/ui/collections/data-grid/partials/grid-header-name.d.ts +15 -0
- package/dist/lib/components/ui/collections/data-grid/partials/header-menu-button.d.ts +17 -0
- package/dist/lib/components/ui/collections/data-grid/partials/open-header-menu.d.ts +14 -0
- package/dist/lib/components/ui/collections/data-grid/partials/width-field.d.ts +18 -0
- package/dist/lib/components/ui/collections/data-grid/phone/phone-item.d.ts +2 -2
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-card-list.d.ts +17 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/list-bar-clear.d.ts +10 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/list-bar-in-row.d.ts +18 -0
- package/dist/lib/components/ui/collections/data-table/partials/page-button.d.ts +12 -0
- package/dist/lib/components/ui/collections/data-table/partials/page-icon-control.d.ts +21 -0
- package/dist/lib/components/ui/collections/data-table/partials/pager-buttons.d.ts +7 -0
- package/dist/lib/components/ui/collections/data-table/use-data-table-setup.d.ts +36 -0
- package/dist/lib/components/ui/collections/facet-group/partials/facet-group-header.d.ts +11 -0
- package/dist/lib/components/ui/collections/filter/filter-field-config-base.utils.d.ts +13 -0
- package/dist/lib/components/ui/collections/filter/filter-field-config-choice.utils.d.ts +5 -0
- package/dist/lib/components/ui/collections/filter/filter-field-config-value.utils.d.ts +5 -0
- package/dist/lib/components/ui/collections/filter/filter-field-config.utils.d.ts +6 -0
- package/dist/lib/components/ui/collections/filter/filter-legacy.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/filter-persistence-url-value.utils.d.ts +9 -0
- package/dist/lib/components/ui/collections/filter/filter-schema.utils.d.ts +1 -5
- package/dist/lib/components/ui/collections/filter/filter-validation-presets.utils.d.ts +24 -0
- package/dist/lib/components/ui/collections/filter/filter-validation-rules.utils.d.ts +11 -0
- package/dist/lib/components/ui/collections/filter/filter-validation.utils.d.ts +1 -23
- package/dist/lib/components/ui/collections/filter/partials/filter-field-special.d.ts +8 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-form-field-variant.d.ts +10 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-group-fields.d.ts +5 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-legacy-variant.d.ts +3 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-preset-fields.d.ts +9 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-presets-menu-items.d.ts +13 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-presets-menu.d.ts +5 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-presets-save-dialog.d.ts +7 -0
- package/dist/lib/components/ui/collections/filter/partials/filter-presets-save-trigger.d.ts +7 -0
- package/dist/lib/components/ui/collections/filter/query/types.d.ts +3 -39
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-options.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-value.d.ts +2 -2
- package/dist/lib/components/ui/collections/filter/query/view-types.d.ts +40 -0
- package/dist/lib/components/ui/collections/filter/sections/use-filter-search.d.ts +14 -0
- package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +7483 -0
- package/dist/lib/components/ui/collections/list-pane/partials/list-pane-body.d.ts +12 -0
- package/dist/lib/components/ui/collections/list-pane/partials/list-pane-item-content.d.ts +15 -0
- package/dist/lib/components/ui/collections/list-pane/partials/list-pane-search.d.ts +8 -0
- package/dist/lib/components/ui/collections/pagination/pagination-bar-pages.d.ts +8 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-action-button.d.ts +26 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +13 -11
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-entries.d.ts +11 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-focus.d.ts +1 -28
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-keys.d.ts +37 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-grid-paging.d.ts +8 -0
- package/dist/lib/components/ui/collections/server-table/types-filter.d.ts +70 -0
- package/dist/lib/components/ui/collections/server-table/types-states.d.ts +42 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +4 -110
- package/dist/lib/components/ui/collections/tree/tree-expand-button.d.ts +6 -0
- package/dist/lib/components/ui/collections/tree/use-tree-keys.d.ts +14 -0
- package/dist/lib/components/ui/collections/tree/use-tree-select.d.ts +14 -0
- package/dist/lib/components/ui/collections/tree/use-tree.d.ts +5 -4
- package/dist/lib/components/ui/dates/calendar/calendar-year-button.d.ts +10 -0
- package/dist/lib/components/ui/dates/calendar/calendar-year-nav.d.ts +9 -0
- package/dist/lib/components/ui/dates/date-field/date-field-parts.d.ts +78 -0
- package/dist/lib/components/ui/dates/date-range-field/partials/date-range-body-scroll.d.ts +15 -0
- package/dist/lib/components/ui/dates/date-range-field/partials/preview-calendar-props.d.ts +11 -0
- package/dist/lib/components/ui/dates/date-range-field/partials/use-cancel-range.d.ts +6 -0
- package/dist/lib/components/ui/dates/date-range-field/use-end-on.d.ts +12 -0
- package/dist/lib/components/ui/dates/date-range-field/use-typed-range.d.ts +2 -3
- package/dist/lib/components/ui/dates/mini-month/partials/mini-month-day.d.ts +8 -0
- package/dist/lib/components/ui/dates/mini-month/partials/mini-month-head.d.ts +18 -0
- package/dist/lib/components/ui/dates/mini-month/partials/mini-month-markers.d.ts +5 -0
- package/dist/lib/components/ui/dates/mini-month/partials/use-grid-focus.d.ts +11 -0
- package/dist/lib/components/ui/dates/picker-trigger/typed-box-parts.d.ts +12 -0
- package/dist/lib/components/ui/dates/time-field/partials/use-time-field-model.d.ts +14 -5
- package/dist/lib/components/ui/dates/time-picker/partials/time-column.d.ts +13 -0
- package/dist/lib/components/ui/display/cards/cards.stories.data.detail.d.ts +9 -0
- package/dist/lib/components/ui/display/cards/cards.stories.data.feed.d.ts +7 -0
- package/dist/lib/components/ui/display/cards/cards.stories.data.intro.d.ts +11 -0
- package/dist/lib/components/ui/display/cards/types-detail.d.ts +74 -0
- package/dist/lib/components/ui/display/cards/types-feed.d.ts +41 -0
- package/dist/lib/components/ui/display/cards/types-intro.d.ts +76 -0
- package/dist/lib/components/ui/display/cards/types.d.ts +3 -187
- package/dist/lib/components/ui/display/code/code-block-parts.d.ts +16 -0
- package/dist/lib/components/ui/display/enrolment-secret/enrolment-secret-manual.d.ts +9 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-start.d.ts +11 -0
- package/dist/lib/components/ui/display/event-chip/event-chip-content.d.ts +12 -0
- package/dist/lib/components/ui/display/param-table/param-table-views.d.ts +19 -0
- package/dist/lib/components/ui/display/recovery-codes/partials/use-recovery-codes-actions.d.ts +22 -0
- package/dist/lib/components/ui/display/recovery-codes-status/partials/recovery-codes-status-plain.d.ts +13 -0
- package/dist/lib/components/ui/feedback/alert-dialog/alert-dialog-actions.d.ts +6 -0
- package/dist/lib/components/ui/feedback/alert-dialog/alert-dialog.d.ts +1 -3
- package/dist/lib/components/ui/feedback/confirm-dialog/use-confirm-action.d.ts +16 -0
- package/dist/lib/components/ui/feedback/confirmation-dialog/use-confirmation-form.d.ts +18 -0
- package/dist/lib/components/ui/feedback/countdown-timer/countdown-timer.d.ts +5 -3
- package/dist/lib/components/ui/feedback/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/notification-row/partials/notification-row-body.d.ts +10 -0
- package/dist/lib/components/ui/feedback/notification-row/partials/notification-row-dot.d.ts +2 -0
- package/dist/lib/components/ui/feedback/notification-row/partials/notification-row-open.d.ts +5 -0
- package/dist/lib/components/ui/feedback/notifications/notifications-model.d.ts +59 -0
- package/dist/lib/components/ui/feedback/notifications/use-notifications-chrome.d.ts +17 -0
- package/dist/lib/components/ui/feedback/notifications/use-notifications.d.ts +4 -38
- package/dist/lib/components/ui/feedback/page-load-failed/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/page-load-failed/page-load-failed.d.ts +15 -0
- package/dist/lib/components/ui/feedback/spinner/spinner-variants.d.ts +5 -0
- package/dist/lib/components/ui/feedback/spinner/spinner.d.ts +1 -5
- package/dist/lib/components/ui/feedback/state-frame/state-frame-text.d.ts +10 -0
- package/dist/lib/components/ui/feedback/state-frame/use-state-media.d.ts +14 -0
- package/dist/lib/components/ui/feedback/step-dots/step-dot.d.ts +13 -0
- package/dist/lib/components/ui/feedback/step-dots/step-dots.d.ts +2 -1
- package/dist/lib/components/ui/feedback/step-up-dialog/describe-by.d.ts +4 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/use-step-up-view.d.ts +34 -0
- package/dist/lib/components/ui/fields/attributes/attribute-form/attribute-options-form-fields.d.ts +7 -0
- package/dist/lib/components/ui/fields/attributes/attributes-list/attribute-tile.d.ts +11 -0
- package/dist/lib/components/ui/fields/attributes/partials/editor-rows.d.ts +15 -0
- package/dist/lib/components/ui/fields/contacts/partials/contact-groups.d.ts +20 -0
- package/dist/lib/components/ui/fields/contacts/partials/contact-tile.d.ts +13 -0
- package/dist/lib/components/ui/fields/contacts/partials/dialog-actions.d.ts +14 -0
- package/dist/lib/components/ui/fields/contacts/partials/dialog-fields.d.ts +14 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/country-field/iso-codes-1.d.ts +2 -0
- package/dist/lib/components/ui/fields/country-field/iso-codes-2.d.ts +2 -0
- package/dist/lib/components/ui/fields/country-field/iso-codes-3.d.ts +2 -0
- package/dist/lib/components/ui/fields/currency-field/use-currency-amount.d.ts +17 -0
- package/dist/lib/components/ui/fields/field/render-choice-field.d.ts +3 -0
- package/dist/lib/components/ui/fields/inline-edit/inline-edit-display.d.ts +12 -0
- package/dist/lib/components/ui/fields/inline-edit/inline-edit-editor.d.ts +14 -0
- package/dist/lib/components/ui/fields/inline-edit/use-inline-edit.d.ts +19 -0
- package/dist/lib/components/ui/fields/opening-hours/logic/missing-days.d.ts +3 -0
- package/dist/lib/components/ui/fields/opening-hours/partials/day-switch.d.ts +14 -0
- package/dist/lib/components/ui/fields/opening-hours/partials/dialog-actions.d.ts +13 -0
- package/dist/lib/components/ui/fields/opening-hours/partials/dialog-fields.d.ts +14 -0
- package/dist/lib/components/ui/fields/opening-hours/partials/hours-actions.d.ts +9 -0
- package/dist/lib/components/ui/fields/opening-hours/partials/hours-tile.d.ts +11 -0
- package/dist/lib/components/ui/fields/opening-hours/partials/week-rows.d.ts +14 -0
- package/dist/lib/components/ui/fields/opening-hours/use-hours-editor.d.ts +1 -0
- package/dist/lib/components/ui/fields/phone-field/phone-country-list.d.ts +10 -0
- package/dist/lib/components/ui/fields/phone-field/phone-dial-button.d.ts +10 -0
- package/dist/lib/components/ui/fields/phone-field/phone-number-input.d.ts +19 -0
- package/dist/lib/components/ui/fields/phone-field/use-phone-value.d.ts +17 -0
- package/dist/lib/components/ui/fields/postal-address/postal-address-dialog-actions.d.ts +14 -0
- package/dist/lib/components/ui/fields/postal-address/postal-address-dialog-fields.d.ts +10 -0
- package/dist/lib/components/ui/fields/rating-field/rating-color.d.ts +4 -0
- package/dist/lib/components/ui/fields/rating-field/rating-field.d.ts +1 -4
- package/dist/lib/components/ui/fields/rating-field/rating-star.d.ts +22 -0
- package/dist/lib/components/ui/fields/rating-field/use-rating.d.ts +16 -0
- package/dist/lib/components/ui/fields/search-field/search-box.d.ts +11 -0
- package/dist/lib/components/ui/fields/search-field/use-search-value.d.ts +21 -0
- package/dist/lib/components/ui/fields/slider/slider-control-row.d.ts +10 -0
- package/dist/lib/components/ui/fields/slider/slider-group-props.d.ts +16 -0
- package/dist/lib/components/ui/fields/slider/slider-group.d.ts +14 -0
- package/dist/lib/components/ui/fields/slider/slider-horizontal.d.ts +3 -0
- package/dist/lib/components/ui/fields/slider/slider-vertical.d.ts +3 -0
- package/dist/lib/components/ui/fields/slider/slider.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/use-slider-value.d.ts +10 -0
- package/dist/lib/components/ui/fields/textarea-field/textarea-footer.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/activity-content-header.d.ts +15 -0
- package/dist/lib/components/ui/layout/app-shell/app-header-menu.d.ts +5 -0
- package/dist/lib/components/ui/layout/app-shell/band-boxes.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-shell/collect-content.d.ts +24 -0
- package/dist/lib/components/ui/layout/app-shell/keep-inside-checker.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/page-title-focus.d.ts +32 -0
- package/dist/lib/components/ui/layout/app-shell/page-title-scope.d.ts +53 -0
- package/dist/lib/components/ui/layout/app-shell/page-title.d.ts +2 -82
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +3 -13
- package/dist/lib/components/ui/layout/app-shell/watch-content.d.ts +2 -18
- package/dist/lib/components/ui/layout/auth-card/auth-card-parts.d.ts +25 -0
- package/dist/lib/components/ui/layout/doc/partials/doc-header-parts.d.ts +18 -0
- package/dist/lib/components/ui/layout/doc/partials/doc-header.d.ts +2 -4
- package/dist/lib/components/ui/layout/doc/partials/doc-nav-parts.d.ts +11 -0
- package/dist/lib/components/ui/layout/doc/use-doc-effects.d.ts +23 -0
- package/dist/lib/components/ui/layout/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item-content.d.ts +7 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item.d.ts +2 -47
- package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item.types.d.ts +54 -0
- package/dist/lib/components/ui/layout/sticky-action-bar/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/sticky-action-bar/keyboard-inset.d.ts +17 -0
- package/dist/lib/components/ui/layout/sticky-action-bar/sticky-action-bar.d.ts +17 -0
- package/dist/lib/components/ui/layout/sticky-action-bar/use-keyboard-inset.d.ts +8 -0
- package/dist/lib/components/ui/layout/toc/toc-list.d.ts +16 -0
- package/dist/lib/components/ui/media/compare-slider/partials/compare-slider-handle.d.ts +9 -0
- package/dist/lib/components/ui/media/compare-slider/use-compare-slider.d.ts +22 -0
- package/dist/lib/components/ui/media/file-list/file-list-field.d.ts +1 -1
- package/dist/lib/components/ui/media/file-list/partials/file-list-dropzone.d.ts +13 -0
- package/dist/lib/components/ui/media/file-list/partials/file-list-input.d.ts +11 -0
- package/dist/lib/components/ui/media/file-list/partials/file-list-items.d.ts +14 -0
- package/dist/lib/components/ui/media/file-list/partials/file-list-row-actions.d.ts +12 -0
- package/dist/lib/components/ui/media/file-list/use-file-list-field.d.ts +33 -0
- package/dist/lib/components/ui/media/galleries/partials/gallery-chrome-toolbar.d.ts +2 -6
- package/dist/lib/components/ui/media/galleries/partials/gallery-chrome-zoom.d.ts +2 -0
- package/dist/lib/components/ui/media/galleries/partials/gallery-featured-arrows.d.ts +2 -0
- package/dist/lib/components/ui/media/galleries/partials/gallery-tile-media.d.ts +17 -0
- package/dist/lib/components/ui/media/galleries/partials/gallery-viewer-button.d.ts +6 -0
- package/dist/lib/components/ui/media/galleries/use-gallery-navigation.d.ts +18 -0
- package/dist/lib/components/ui/media/galleries/use-gallery-sync.d.ts +15 -0
- package/dist/lib/components/ui/media/image-cropper/partials/image-cropper-actions.d.ts +12 -0
- package/dist/lib/components/ui/media/image-cropper/partials/image-cropper-controls.d.ts +8 -0
- package/dist/lib/components/ui/media/image-cropper/partials/image-cropper-stage.d.ts +12 -0
- package/dist/lib/components/ui/media/image-cropper/use-image-cropper.d.ts +34 -0
- package/dist/lib/components/ui/media/image-editor/image-editor.slice.d.ts +43 -43
- package/dist/lib/components/ui/media/image-editor/image-editor.stage-gestures.d.ts +29 -0
- package/dist/lib/components/ui/media/image-editor/image-editor.stage-paint.d.ts +17 -0
- package/dist/lib/components/ui/media/image-editor/partials/crop-aspect-picker.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/partials/crop-orientation.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/partials/editor-export-options.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/partials/editor-file-info.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/partials/editor-history-buttons.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/partials/markup-brush-section.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/partials/markup-tool-picker.d.ts +2 -0
- package/dist/lib/components/ui/media/image-editor/types-edits.d.ts +106 -0
- package/dist/lib/components/ui/media/image-editor/types-session.d.ts +58 -0
- package/dist/lib/components/ui/media/image-editor/types.d.ts +4 -163
- package/dist/lib/components/ui/media/image-editor/use-crop-frame.d.ts +26 -0
- package/dist/lib/components/ui/media/image-editor/use-image-editor-keys.d.ts +4 -0
- package/dist/lib/components/ui/media/image-editor/use-image-editor.d.ts +10 -10
- package/dist/lib/components/ui/media/image-editor/use-markup-text.d.ts +10 -0
- package/dist/lib/components/ui/media/image-editor/use-stage-layer-key.d.ts +6 -0
- package/dist/lib/components/ui/media/image-editor/use-stage-pointer.d.ts +2 -3
- package/dist/lib/components/ui/media/media-player/partials/panels/transcript-follow.d.ts +7 -0
- package/dist/lib/components/ui/media/media-player/partials/panels/transcript-notice.d.ts +7 -0
- package/dist/lib/components/ui/media/media-player/partials/panels/use-search-announcement.d.ts +6 -0
- package/dist/lib/components/ui/media/media-player/partials/playlist-item.d.ts +13 -0
- package/dist/lib/components/ui/media/pdf-reader/partials/search-nav-buttons.d.ts +4 -0
- package/dist/lib/components/ui/media/pdf-reader/use-reader-chrome-state.d.ts +35 -0
- package/dist/lib/components/ui/media/pdf-reader/use-reader-chrome-value.d.ts +14 -0
- package/dist/lib/components/ui/media/upload/network-upload-field/network-upload-dropzone-body.d.ts +8 -0
- package/dist/lib/components/ui/primitives/segmented-input/segmented-input-cells.d.ts +20 -0
- package/dist/lib/components/ui/primitives/segmented-input/use-segment-paste.d.ts +17 -0
- package/dist/lib/components/ui/primitives/segmented-input/use-segmented-keys.d.ts +17 -0
- package/dist/lib/components/ui/selection/autocomplete/autocomplete-equality.d.ts +7 -0
- package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-chips.d.ts +2 -19
- package/dist/lib/components/ui/selection/autocomplete/types.d.ts +19 -1
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-handlers.d.ts +5 -6
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-leave.d.ts +14 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-picks.d.ts +17 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-typing.d.ts +14 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +3 -3
- package/dist/lib/components/ui/selection/checkbox-group/checkbox-group.d.ts +2 -23
- package/dist/lib/components/ui/selection/checkbox-group/partials/checkbox-group-options.d.ts +10 -0
- package/dist/lib/components/ui/selection/checkbox-group/types.d.ts +23 -0
- package/dist/lib/components/ui/selection/color-swatches/color-swatches.d.ts +2 -1
- package/dist/lib/components/ui/selection/color-swatches/color-swatches.utils.d.ts +3 -0
- package/dist/lib/components/ui/selection/color-swatches/partials/color-swatch-button.d.ts +13 -0
- package/dist/lib/components/ui/selection/color-swatches/partials/color-swatch-styles.d.ts +3 -0
- package/dist/lib/components/ui/selection/color-swatches/partials/custom-color-swatch.d.ts +11 -0
- package/dist/lib/components/ui/selection/color-swatches/types.d.ts +1 -0
- package/dist/lib/components/ui/selection/combobox-field/combobox-field.d.ts +3 -48
- package/dist/lib/components/ui/selection/combobox-field/partials/combobox-field-input.d.ts +4 -0
- package/dist/lib/components/ui/selection/combobox-field/types.d.ts +47 -0
- package/dist/lib/components/ui/selection/combobox-field/use-combobox-field-aria.d.ts +15 -0
- package/dist/lib/components/ui/selection/combobox-field/use-combobox-field-items.d.ts +1 -1
- package/dist/lib/components/ui/selection/combobox-field/use-typed-query.d.ts +8 -0
- package/dist/lib/components/ui/selection/option-tile/use-status-text.d.ts +3 -0
- package/dist/lib/components/ui/selection/radio-group/partials/radio-group-options.d.ts +7 -0
- package/dist/lib/components/ui/selection/radio-group/partials/radio-group-parts.d.ts +4 -0
- package/dist/lib/components/ui/selection/radio-group/radio-group.d.ts +3 -24
- package/dist/lib/components/ui/selection/radio-group/types.d.ts +22 -0
- package/dist/lib/components/ui/selection/sortable-list/partials/sortable-list-footer.d.ts +4 -0
- package/dist/lib/components/ui/selection/sortable-list/partials/sortable-list-frame.d.ts +20 -0
- package/dist/lib/components/ui/selection/sortable-list/partials/sortable-list-row-parts.d.ts +20 -0
- package/dist/lib/components/ui/selection/sortable-list/partials/sortable-list-row-props.d.ts +298 -0
- package/dist/lib/components/ui/selection/sortable-list/use-sortable-list-chrome.d.ts +20 -0
- package/dist/lib/components/ui/selection/sortable-list/use-sortable-list-data.d.ts +20 -0
- package/dist/lib/components/ui/selection/sortable-list/use-sortable-list-grab.d.ts +15 -0
- package/dist/lib/components/ui/selection/sortable-list/use-sortable-list-moves.d.ts +18 -0
- package/dist/lib/components/ui/selection/sortable-list/use-sortable-list.d.ts +7 -8
- package/dist/lib/components/ui/selection/switcher/partials/switcher-recent.d.ts +11 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-row-body.d.ts +8 -0
- package/dist/lib/components/ui/selection/switcher/switcher-list-keys.d.ts +17 -0
- package/dist/lib/components/ui/selection/switcher/switcher.d.ts +1 -1
- package/dist/lib/components/ui/selection/switcher/use-switcher-clip.d.ts +9 -0
- package/dist/lib/components/ui/selection/switcher/use-switcher-list-focus.d.ts +14 -0
- package/dist/lib/components/ui/selection/switcher/use-switcher-open.d.ts +9 -0
- package/dist/lib/components/ui/selection/switcher/use-switcher-panel.d.ts +24 -0
- package/dist/lib/components/ui/selection/switcher/use-switcher.d.ts +326 -0
- package/dist/lib/components/ui/selection/transfer-list/partials/transfer-list-frame.d.ts +19 -0
- package/dist/lib/components/ui/selection/transfer-list/partials/transfer-list-item-row.d.ts +2 -3
- package/dist/lib/components/ui/selection/transfer-list/partials/transfer-list-listbox.d.ts +5 -0
- package/dist/lib/components/ui/selection/transfer-list/partials/transfer-list-row-parts.d.ts +16 -0
- package/dist/lib/components/ui/selection/transfer-list/partials/transfer-list-row-props.d.ts +283 -0
- package/dist/lib/components/ui/selection/transfer-list/transfer-list.keyboard.d.ts +3 -2
- package/dist/lib/components/ui/selection/transfer-list/use-transfer-list-actions.d.ts +3 -2
- package/dist/lib/components/ui/selection/transfer-list/use-transfer-list-checks.d.ts +18 -0
- package/dist/lib/components/ui/selection/transfer-list/use-transfer-list-derived.d.ts +14 -0
- package/dist/lib/components/ui/selection/transfer-list/use-transfer-list.d.ts +1 -1
- package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-chips.d.ts +9 -0
- package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-trigger-button.d.ts +15 -0
- package/dist/lib/components/ui/widgets/barcode/barcode-error.d.ts +4 -0
- package/dist/lib/components/ui/widgets/barcode/barcode-geometry.d.ts +22 -0
- package/dist/lib/components/ui/widgets/barcode/barcode.d.ts +31 -0
- package/dist/lib/components/ui/widgets/barcode/code128.d.ts +15 -0
- package/dist/lib/components/ui/widgets/barcode/datamatrix-placement.d.ts +7 -0
- package/dist/lib/components/ui/widgets/barcode/datamatrix-rs.d.ts +2 -0
- package/dist/lib/components/ui/widgets/barcode/datamatrix-tables.d.ts +13 -0
- package/dist/lib/components/ui/widgets/barcode/datamatrix.d.ts +10 -0
- package/dist/lib/components/ui/widgets/barcode/encode.d.ts +12 -0
- package/dist/lib/components/ui/widgets/barcode/index.d.ts +6 -0
- package/dist/lib/components/ui/widgets/barcode/label-length.d.ts +4 -0
- package/dist/lib/components/ui/widgets/barcode/label-sheet.d.ts +37 -0
- package/dist/lib/components/ui/widgets/chat/chat-message.d.ts +1 -1
- package/dist/lib/components/ui/widgets/chat/chat-message.view.d.ts +32 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-composer-notices.d.ts +8 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-composer-surface.d.ts +11 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-conversation-item-skeleton.d.ts +4 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-conversation-item-text.d.ts +10 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-inbox-list.d.ts +8 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-inbox-thread.d.ts +11 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-message-action-menus.d.ts +17 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-message-body.d.ts +6 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-scroll-to-latest.d.ts +7 -0
- package/dist/lib/components/ui/widgets/chat/partials/chat-typing-row.d.ts +9 -0
- package/dist/lib/components/ui/widgets/chat/use-chat-inbox-pane.d.ts +13 -0
- package/dist/lib/components/ui/widgets/chat/use-chat-widget-open.d.ts +19 -0
- package/dist/lib/components/ui/widgets/code-editor/toolbar/code-view-tools.d.ts +10 -0
- package/dist/lib/components/ui/widgets/code-editor/use-monaco-options.d.ts +9 -0
- package/dist/lib/components/ui/widgets/editor/extensions/custom/accordion/accordion-item-actions.d.ts +7 -0
- package/dist/lib/components/ui/widgets/editor/extensions/custom/action-card/action-card-tile.d.ts +10 -0
- package/dist/lib/components/ui/widgets/editor/extensions/custom/select-card/select-card-tile.d.ts +11 -0
- package/dist/lib/components/ui/widgets/editor/extensions/custom/select-card/toggle-selection.d.ts +3 -0
- package/dist/lib/components/ui/widgets/editor/extensions/custom/shared/use-node-list.d.ts +11 -0
- package/dist/lib/components/ui/widgets/editor/extensions/emoji/use-emoji-groups.d.ts +13 -0
- package/dist/lib/components/ui/widgets/editor/presets/compact-editor-parts.d.ts +10 -0
- package/dist/lib/components/ui/widgets/editor/presets/document-editor-frame-parts.d.ts +19 -0
- package/dist/lib/components/ui/widgets/editor/presets/document-editor-layout.d.ts +5 -0
- package/dist/lib/components/ui/widgets/editor/presets/document-editor-overlays.d.ts +6 -0
- package/dist/lib/components/ui/widgets/editor/presets/document-editor-page-parts.d.ts +25 -0
- package/dist/lib/components/ui/widgets/editor/presets/rich-chat-composer/composer-class.d.ts +8 -0
- package/dist/lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/composer-toolbar.d.ts +6 -0
- package/dist/lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/format-buttons.d.ts +8 -0
- package/dist/lib/components/ui/widgets/editor/presets/use-document-features.d.ts +15 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/question-body.d.ts +5 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/question-content.d.ts +3 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/question-extras.d.ts +10 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/question-outcome.d.ts +7 -0
- package/dist/lib/components/ui/widgets/education/questions/question-options.keyboard.d.ts +17 -0
- package/dist/lib/components/ui/widgets/education/questions/question.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/types.d.ts +3 -2
- package/dist/lib/components/ui/widgets/education/quizzes/partials/quiz-shortcuts.d.ts +6 -0
- package/dist/lib/components/ui/widgets/education/quizzes/partials/results-actions.d.ts +7 -0
- package/dist/lib/components/ui/widgets/education/quizzes/partials/results-ring.d.ts +5 -0
- package/dist/lib/components/ui/widgets/education/quizzes/quiz.flow.d.ts +29 -0
- package/dist/lib/components/ui/widgets/education/quizzes/quiz.slice.d.ts +3 -0
- package/dist/lib/components/ui/widgets/education/quizzes/use-quiz-actions.d.ts +20 -0
- package/dist/lib/components/ui/widgets/education/quizzes/use-quiz-flow.d.ts +29 -0
- package/dist/lib/components/ui/widgets/education/quizzes/use-quiz-lifecycle.d.ts +12 -0
- package/dist/lib/components/ui/widgets/education/quizzes/use-quiz.d.ts +2 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/calendar-step-buttons.d.ts +2 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/month-day-cell-class.d.ts +9 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/month-day-parts.d.ts +12 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-month-day.d.ts +26 -0
- package/dist/lib/components/ui/widgets/kanban/kanban.drag.d.ts +15 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-card-tile.d.ts +7 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-column-cards.d.ts +8 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-drag-preview.d.ts +8 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-group-header.d.ts +8 -0
- package/dist/lib/components/ui/widgets/kanban/use-kanban-item-actions.d.ts +20 -0
- package/dist/lib/components/ui/widgets/native-charts/core/base-props-types.d.ts +64 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference-geometry.d.ts +62 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference-types.d.ts +35 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference.d.ts +1 -56
- package/dist/lib/components/ui/widgets/native-charts/core/types.d.ts +2 -96
- package/dist/lib/components/ui/widgets/native-charts/hooks/use-model-parts.d.ts +20 -0
- package/dist/lib/components/ui/widgets/native-charts/hooks/use-model-shown.d.ts +23 -0
- package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/line-strokes.d.ts +10 -0
- package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/use-line-reveal.d.ts +9 -0
- package/dist/lib/i18n/resources/en/en.d.ts +12 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +13 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +12 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +13 -1
- package/dist/lib/i18n/resources/resources.d.ts +24 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/map/components/partials/default-location.d.ts +2 -0
- package/dist/lib/map/components/partials/location-dialog.d.ts +17 -0
- package/dist/lib/print/components/print-document/print-document.d.ts +2 -37
- package/dist/lib/print/components/print-document/print-document.types.d.ts +37 -0
- package/dist/lib/print/components/print-document/use-print-context.d.ts +11 -0
- package/dist/lib/print/components/print-section.d.ts +8 -1
- package/dist/lib.js +55 -48
- package/dist/main.js +43 -43
- package/dist/map.js +91 -74
- package/dist/material.css +1 -1
- package/dist/{nxgt-theme-ivgNca3z.js → nxgt-theme-DA1IQe0O.js} +5 -5
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +123 -108
- package/dist/{public-DVZJVdxD.js → public-CLkf8uky.js} +368 -338
- package/dist/{render-json-BOhvPnSv.js → render-json-COvAkihK.js} +3 -3
- package/dist/{rich-code-block-DL5-9JIi.js → rich-code-block-hJexXOdk.js} +5 -5
- package/dist/{rich-text-viewer-W15XIwah.js → rich-text-viewer-CXJp584B.js} +3 -3
- package/dist/{sortable-provider-DrpBwx75.js → sortable-provider-DE-MSfeJ.js} +2 -2
- package/dist/{spinner-D4XGdse6.js → spinner-CquTUxzt.js} +3 -1
- package/dist/{stored-language-C89mti-z.js → stored-language-BDzGeEAm.js} +22 -2
- package/dist/theme-picker.js +3 -3
- package/dist/{theme-toggle-BFhqLmgx.js → theme-toggle-DBgsBw8S.js} +1 -1
- package/dist/themes.js +1 -1
- package/dist/{toolbar-items-SZ5pyAFz.js → toolbar-items-Bm1baIp6.js} +578 -567
- package/dist/{translate-material-BkqnImND.js → translate-material-Q67GD4co.js} +2 -2
- package/dist/{translator-B5fId5Rw.js → translator-CBhGdYun.js} +1 -1
- package/dist/{use-chat-composer-BG5B4DGB.js → use-chat-composer-Cx7Q_KOV.js} +8929 -8650
- package/dist/{use-heading-spy-51GQw8tH.js → use-heading-spy-COxCWqWF.js} +1 -1
- package/dist/{use-material-translation-BQOr4Oks.js → use-material-translation-BZAy_ffS.js} +2 -2
- package/dist/use-shape-morph-BKA_R5P5.js +35 -0
- package/dist/{youtube-node-OWSNlYCc.js → youtube-node-A3NPAPgK.js} +27 -27
- package/docs/README.md +1 -0
- package/docs/components/buttons-and-actions.md +37 -0
- package/docs/components/feedback-and-status.md +30 -4
- package/docs/components/navigation-and-layout.md +47 -0
- package/docs/components/rich-widgets.md +34 -3
- package/docs/guides/barcode.md +203 -0
- package/docs/guides/data-grid.md +11 -1
- package/docs/guides/printing.md +28 -3
- package/docs/previews/buttons-actions-loadmorefooter.webp +0 -0
- package/docs/previews/feedback-status-pageloadfailed.webp +0 -0
- package/docs/previews/navigation-layout-stickyactionbar.webp +0 -0
- package/docs/roadmap.md +18 -3
- package/docs/troubleshooting.md +62 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/widgets/barcode/barcode.css +112 -0
- package/package.json +10 -3
- package/dist/empty-state-4gmbCkcw.js +0 -117
- package/dist/use-shape-morph-DXdy2X5g.js +0 -35
package/dist/editor.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
2
|
import { t } from "./utils-BLfntITJ.js";
|
|
3
|
-
import {
|
|
4
|
-
import { f as
|
|
5
|
-
import { c as
|
|
6
|
-
import { c as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { r as
|
|
11
|
-
import { a as
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as
|
|
14
|
-
import { t as
|
|
15
|
-
import { Ft as
|
|
3
|
+
import { $ as n, A as r, C as i, Cr as a, D as o, Dn as s, E as c, Fn as l, G as u, Gn as d, In as f, J as p, Ji as m, Jn as h, K as g, Kn as _, Ln as v, M as y, N as b, Nn as x, O as S, On as C, Pn as w, Q as ee, Qn as T, R as E, Rn as D, S as O, Sn as te, T as ne, U as re, W as ie, X as ae, Y as oe, Yi as se, Yn as ce, Z as le, Zn as k, _n as ue, a as de, c as fe, cn as pe, d as me, et as he, g as ge, gr as _e, hr as ve, i as ye, j as be, k as xe, kn as Se, l as Ce, ln as we, m as Te, p as Ee, q as De, qi as Oe, qn as ke, s as Ae, sn as je, t as Me, vn as Ne, w as Pe, wr as Fe, x as Ie, xn as Le, z as Re } from "./use-chat-composer-Cx7Q_KOV.js";
|
|
4
|
+
import { f as ze } from "./dialog-1BstKBvt.js";
|
|
5
|
+
import { c as Be, i as Ve, n as He, o as Ue, r as We, s as Ge, t as Ke, u as A } from "./dropdown-menu-hoaocAS7.js";
|
|
6
|
+
import { c as qe, o as Je, s as Ye } from "./toolbar-items-Bm1baIp6.js";
|
|
7
|
+
import { n as Xe, t as j } from "./button-Deo7l4wM.js";
|
|
8
|
+
import { t as M } from "./use-material-translation-BZAy_ffS.js";
|
|
9
|
+
import { t as N } from "./icon-button-AwJtCkV5.js";
|
|
10
|
+
import { r as Ze, t as Qe } from "./field-blur-BkeYPaWi.js";
|
|
11
|
+
import { a as $e, s as P } from "./dist-C3GR7kJd.js";
|
|
12
|
+
import { n as et, t as tt } from "./toggle-group-BkH23Jk4.js";
|
|
13
|
+
import { n as nt } from "./icon-badge-9ZE6k7cn.js";
|
|
14
|
+
import { t as rt } from "./use-mobile-BDro060N.js";
|
|
15
|
+
import { Ft as it, Ht as at, Nt as ot, Ot as st, St as ct, bt as F, ht as I, mt as L, n as R, wt as z, xt as lt, yt as ut } from "./dist-moutbfbd.js";
|
|
16
16
|
import { t as dt } from "./markdown-Dw_uH7j7.js";
|
|
17
17
|
import { n as ft, r as B, t as pt } from "./create-store-Dqp-PLLn.js";
|
|
18
|
-
import {
|
|
19
|
-
import { a as gt, i as _t, n as vt, r as yt } from "./convert-
|
|
20
|
-
import { d as bt, n as xt, r as St, u as Ct } from "./headless-extensions-
|
|
21
|
-
import { t as wt } from "./render-json-
|
|
18
|
+
import { W as mt, w as ht } from "./youtube-node-A3NPAPgK.js";
|
|
19
|
+
import { a as gt, i as _t, n as vt, r as yt } from "./convert-7g-F5cNf.js";
|
|
20
|
+
import { d as bt, n as xt, r as St, u as Ct } from "./headless-extensions-B1NAgmkE.js";
|
|
21
|
+
import { t as wt } from "./render-json-COvAkihK.js";
|
|
22
22
|
import { n as Tt, r as Et } from "./collab-colors-CDkjUVoQ.js";
|
|
23
23
|
import { Suspense as Dt, lazy as Ot, useCallback as V, useEffect as H, useId as kt, useLayoutEffect as At, useMemo as U, useRef as W, useState as G, useSyncExternalStore as K } from "react";
|
|
24
24
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
@@ -227,7 +227,7 @@ function Ln(e, t) {
|
|
|
227
227
|
} } }), [e, t]);
|
|
228
228
|
}
|
|
229
229
|
function Rn({ editor: e, controller: t, label: n, slot: r = "editor-assistant", locked: i, onDismiss: a, children: o }) {
|
|
230
|
-
let s =
|
|
230
|
+
let s = rt(), c = Ln(e, t);
|
|
231
231
|
return s ? jt(/* @__PURE__ */ J("section", {
|
|
232
232
|
role: "dialog",
|
|
233
233
|
"aria-label": n,
|
|
@@ -235,10 +235,10 @@ function Rn({ editor: e, controller: t, label: n, slot: r = "editor-assistant",
|
|
|
235
235
|
"data-layout": "sheet",
|
|
236
236
|
className: "fixed inset-x-2 bottom-[max(0.5rem,env(safe-area-inset-bottom))] z-50 max-h-[75svh] overflow-y-auto overscroll-contain rounded-2xl border bg-popover p-3 text-popover-foreground shadow-lg",
|
|
237
237
|
children: o
|
|
238
|
-
}), document.body) : /* @__PURE__ */ Y(
|
|
238
|
+
}), document.body) : /* @__PURE__ */ Y(Je, {
|
|
239
239
|
open: !0,
|
|
240
240
|
onOpenChange: (e) => !e && a("outside"),
|
|
241
|
-
children: [/* @__PURE__ */ J(
|
|
241
|
+
children: [/* @__PURE__ */ J(Ye, { virtualRef: c }), /* @__PURE__ */ J(qe, {
|
|
242
242
|
role: "dialog",
|
|
243
243
|
"aria-label": n,
|
|
244
244
|
"data-slot": r,
|
|
@@ -268,7 +268,7 @@ function zn(e) {
|
|
|
268
268
|
e.preventDefault(), t[i]?.focus();
|
|
269
269
|
}
|
|
270
270
|
function Bn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
271
|
-
let { t: r } =
|
|
271
|
+
let { t: r } = M(), [i, a] = G(null), o = U(() => In(i?.actions ?? e, t), [
|
|
272
272
|
i,
|
|
273
273
|
e,
|
|
274
274
|
t
|
|
@@ -304,7 +304,7 @@ function Bn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
function Vn({ onAsk: e }) {
|
|
307
|
-
let { t } =
|
|
307
|
+
let { t } = M(), [n, r] = G(""), i = W(null);
|
|
308
308
|
H(() => i.current?.focus({ preventScroll: !0 }), []);
|
|
309
309
|
let a = () => {
|
|
310
310
|
let t = n.trim();
|
|
@@ -312,7 +312,7 @@ function Vn({ onAsk: e }) {
|
|
|
312
312
|
};
|
|
313
313
|
return /* @__PURE__ */ Y("div", {
|
|
314
314
|
className: "flex items-center gap-1.5",
|
|
315
|
-
children: [/* @__PURE__ */ J(
|
|
315
|
+
children: [/* @__PURE__ */ J(ze, {
|
|
316
316
|
ref: i,
|
|
317
317
|
value: n,
|
|
318
318
|
"aria-label": t("material.editor.assistant.ask-label", "Ask the assistant"),
|
|
@@ -322,7 +322,7 @@ function Vn({ onAsk: e }) {
|
|
|
322
322
|
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), a());
|
|
323
323
|
},
|
|
324
324
|
className: "h-9 min-w-0 flex-1"
|
|
325
|
-
}), /* @__PURE__ */ J(
|
|
325
|
+
}), /* @__PURE__ */ J(N, {
|
|
326
326
|
variant: "filled",
|
|
327
327
|
"aria-label": t("material.editor.assistant.send", "Send"),
|
|
328
328
|
disabled: !n.trim(),
|
|
@@ -387,7 +387,7 @@ async function Gn(e) {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
function Kn({ text: e }) {
|
|
390
|
-
let { t } =
|
|
390
|
+
let { t } = M(), [n, r] = G(!1);
|
|
391
391
|
return H(() => {
|
|
392
392
|
if (!n) return;
|
|
393
393
|
let e = setTimeout(() => r(!1), 1600);
|
|
@@ -400,7 +400,7 @@ function Kn({ text: e }) {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
function qn({ state: e, on: t }) {
|
|
403
|
-
let { t: n } =
|
|
403
|
+
let { t: n } = M(), r = W(null);
|
|
404
404
|
return H(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ Y("div", {
|
|
405
405
|
className: "flex flex-wrap items-center gap-1.5",
|
|
406
406
|
children: [
|
|
@@ -437,7 +437,7 @@ function qn({ state: e, on: t }) {
|
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
function Jn({ state: e, on: t }) {
|
|
440
|
-
let { t: n } =
|
|
440
|
+
let { t: n } = M(), r = W(null);
|
|
441
441
|
return H(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ Y("div", {
|
|
442
442
|
className: "grid gap-2",
|
|
443
443
|
children: [/* @__PURE__ */ J("p", {
|
|
@@ -471,7 +471,7 @@ function Jn({ state: e, on: t }) {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
function Yn({ editor: e, state: t, on: n, status: r }) {
|
|
474
|
-
let { t: i } =
|
|
474
|
+
let { t: i } = M(), a = W(null), o = t.phase === "streaming";
|
|
475
475
|
return H(() => {
|
|
476
476
|
o && a.current?.focus({ preventScroll: !0 });
|
|
477
477
|
}, [o]), /* @__PURE__ */ Y("div", {
|
|
@@ -498,7 +498,7 @@ function Yn({ editor: e, state: t, on: n, status: r }) {
|
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-stage.tsx
|
|
500
500
|
function Xn({ label: e, onDiscard: t }) {
|
|
501
|
-
let { t: n } =
|
|
501
|
+
let { t: n } = M();
|
|
502
502
|
return /* @__PURE__ */ Y("div", {
|
|
503
503
|
className: "flex items-center gap-2",
|
|
504
504
|
children: [
|
|
@@ -510,7 +510,7 @@ function Xn({ label: e, onDiscard: t }) {
|
|
|
510
510
|
className: "min-w-0 flex-1 truncate font-medium text-sm",
|
|
511
511
|
children: e
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */ J(
|
|
513
|
+
/* @__PURE__ */ J(N, {
|
|
514
514
|
variant: "ghost",
|
|
515
515
|
"aria-label": n("material.editor.assistant.discard", "Discard"),
|
|
516
516
|
onClick: t,
|
|
@@ -539,7 +539,7 @@ function Zn({ editor: e, state: t, actions: n, onChoose: r, on: i }) {
|
|
|
539
539
|
}) : null;
|
|
540
540
|
}
|
|
541
541
|
function Qn({ note: e }) {
|
|
542
|
-
let { t } =
|
|
542
|
+
let { t } = M();
|
|
543
543
|
return e ? /* @__PURE__ */ J("p", {
|
|
544
544
|
role: "status",
|
|
545
545
|
"data-slot": "editor-assistant-note",
|
|
@@ -548,12 +548,12 @@ function Qn({ note: e }) {
|
|
|
548
548
|
}) : null;
|
|
549
549
|
}
|
|
550
550
|
function $n({ phase: e, stopped: t }) {
|
|
551
|
-
let { t: n } =
|
|
551
|
+
let { t: n } = M(), r = n("material.editor.assistant.writing", "Writing…");
|
|
552
552
|
return /* @__PURE__ */ J("div", {
|
|
553
553
|
role: "status",
|
|
554
554
|
"data-slot": "editor-assistant-status",
|
|
555
555
|
className: "flex min-h-6 items-center gap-2 text-muted-foreground text-xs",
|
|
556
|
-
children: e === "streaming" ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
556
|
+
children: e === "streaming" ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Ee, {
|
|
557
557
|
label: r,
|
|
558
558
|
className: "size-6"
|
|
559
559
|
}), r] }) : t ? n("material.editor.assistant.stopped", "Stopped") : n("material.editor.assistant.ready", "Answer ready")
|
|
@@ -602,11 +602,11 @@ function ar(e) {
|
|
|
602
602
|
//#endregion
|
|
603
603
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-panel.tsx
|
|
604
604
|
function or(e) {
|
|
605
|
-
let { handle: t, chrome: n } =
|
|
605
|
+
let { handle: t, chrome: n } = k(), r = t.features.some((e) => e.key === "assistant");
|
|
606
606
|
return !t.editor || !r || n.state.panel !== "assistant" ? null : /* @__PURE__ */ J(sr, {});
|
|
607
607
|
}
|
|
608
608
|
function sr() {
|
|
609
|
-
let { t: e, language: t } =
|
|
609
|
+
let { t: e, language: t } = M(), { handle: n } = k(), r = n.editor, i = er(r), a = ar(r), o = i?.controller, s = U(() => Fn(i?.actions, e), [i?.actions, e]);
|
|
610
610
|
if (H(() => (o?.getState().phase === "idle" && o.begin(), () => o?.reset()), [o]), !o || a.phase === "idle") return null;
|
|
611
611
|
let c = (e) => {
|
|
612
612
|
o.close(), e !== "outside" && r.commands.focus();
|
|
@@ -649,7 +649,7 @@ function sr() {
|
|
|
649
649
|
//#region lib/components/ui/widgets/editor/extensions/collab/use-presence.ts
|
|
650
650
|
var cr = [], lr = () => () => {};
|
|
651
651
|
function ur() {
|
|
652
|
-
let { editor: e } =
|
|
652
|
+
let { editor: e } = k().handle;
|
|
653
653
|
return dr(e);
|
|
654
654
|
}
|
|
655
655
|
function dr(e) {
|
|
@@ -691,20 +691,20 @@ function pr({ user: e }) {
|
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
693
|
function mr({ status: e, max: n = 4, className: r }) {
|
|
694
|
-
let { t: i } =
|
|
694
|
+
let { t: i } = M(), a = ur();
|
|
695
695
|
if (!e && a.length === 0) return null;
|
|
696
696
|
let [o, s, c] = e ? fr[e] : [];
|
|
697
697
|
return /* @__PURE__ */ Y("div", {
|
|
698
698
|
"data-slot": "editor-presence",
|
|
699
699
|
"data-status": e,
|
|
700
700
|
className: t("flex items-center gap-3", r),
|
|
701
|
-
children: [s && o && /* @__PURE__ */ J(
|
|
701
|
+
children: [s && o && /* @__PURE__ */ J(Ie, {
|
|
702
702
|
tone: o,
|
|
703
703
|
pulse: e === "connecting",
|
|
704
704
|
role: "status",
|
|
705
705
|
className: "text-muted-foreground text-xs",
|
|
706
706
|
children: i(s, c)
|
|
707
|
-
}), a.length > 0 && /* @__PURE__ */ J(
|
|
707
|
+
}), a.length > 0 && /* @__PURE__ */ J(Te, {
|
|
708
708
|
size: "sm",
|
|
709
709
|
max: n,
|
|
710
710
|
role: "group",
|
|
@@ -719,7 +719,7 @@ var hr = "[&_textarea]:min-w-0", gr = (e) => e.key === "Enter" && (e.metaKey ||
|
|
|
719
719
|
//#endregion
|
|
720
720
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer-form.tsx
|
|
721
721
|
function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
722
|
-
let { t: a } =
|
|
722
|
+
let { t: a } = M(), o = e.error === "invalid-id" ? a("material.editor.comments.invalid-id", "The adapter answered a thread id that is not allowed.") : e.error;
|
|
723
723
|
return /* @__PURE__ */ Y("form", {
|
|
724
724
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2.5",
|
|
725
725
|
onSubmit: (e) => {
|
|
@@ -733,7 +733,7 @@ function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
733
733
|
className: "line-clamp-2 border-s-2 ps-2 text-muted-foreground text-xs italic",
|
|
734
734
|
children: e.quote
|
|
735
735
|
}),
|
|
736
|
-
/* @__PURE__ */ J(
|
|
736
|
+
/* @__PURE__ */ J(D, {
|
|
737
737
|
className: hr,
|
|
738
738
|
"aria-label": a("material.editor.comments.body-label", "Comment"),
|
|
739
739
|
placeholder: a("material.editor.comments.placeholder", "Write a comment…"),
|
|
@@ -760,13 +760,13 @@ function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
function vr({ pending: e, empty: t, onDismiss: n }) {
|
|
763
|
-
let { t: r } =
|
|
763
|
+
let { t: r } = M();
|
|
764
764
|
return /* @__PURE__ */ Y("div", {
|
|
765
765
|
className: "flex justify-end gap-2",
|
|
766
766
|
children: [/* @__PURE__ */ J(j, {
|
|
767
767
|
type: "button",
|
|
768
768
|
size: "sm",
|
|
769
|
-
variant:
|
|
769
|
+
variant: Xe,
|
|
770
770
|
disabled: e,
|
|
771
771
|
onClick: n,
|
|
772
772
|
children: r("material.editor.comments.cancel", "Cancel")
|
|
@@ -809,7 +809,7 @@ var wr = {
|
|
|
809
809
|
deleted: ["deleted-notice", "Thread deleted"]
|
|
810
810
|
};
|
|
811
811
|
function Tr({ editor: e }) {
|
|
812
|
-
let { t } =
|
|
812
|
+
let { t } = M(), { notice: n } = Cr(e), r = n ? wr[n.kind] : null;
|
|
813
813
|
return /* @__PURE__ */ J("div", {
|
|
814
814
|
role: "status",
|
|
815
815
|
"aria-live": "polite",
|
|
@@ -821,7 +821,7 @@ function Tr({ editor: e }) {
|
|
|
821
821
|
//#endregion
|
|
822
822
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer.tsx
|
|
823
823
|
function Er(e) {
|
|
824
|
-
let { handle: t } =
|
|
824
|
+
let { handle: t } = k(), { editor: n } = t;
|
|
825
825
|
return !n || !X(n) ? null : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Dr, { editor: n }), /* @__PURE__ */ J(Tr, { editor: n })] });
|
|
826
826
|
}
|
|
827
827
|
function Dr({ editor: e }) {
|
|
@@ -832,7 +832,7 @@ function Dr({ editor: e }) {
|
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
function Or({ editor: e, controller: t }) {
|
|
835
|
-
let { t: n } =
|
|
835
|
+
let { t: n } = M(), { chrome: r } = k(), i = Cr(e).composer, { actions: a } = r;
|
|
836
836
|
H(() => (a.setBubbleSuppressed(!0), () => {
|
|
837
837
|
a.setBubbleSuppressed(!1);
|
|
838
838
|
}), [a]);
|
|
@@ -867,14 +867,14 @@ function kr(e, t) {
|
|
|
867
867
|
return !n || !(t instanceof Element) ? !1 : n.contains(t) ? !0 : n.getAttribute("aria-expanded") === "true" && !!t.closest("[role=\"menu\"]");
|
|
868
868
|
}
|
|
869
869
|
function Ar({ id: e, children: t, ...n }) {
|
|
870
|
-
let { chrome: r, toolbarRef: i } =
|
|
870
|
+
let { chrome: r, toolbarRef: i } = k(), a = r.state.panel === e, [o, s] = G();
|
|
871
871
|
return At(() => {
|
|
872
872
|
let e = i.current, t = e?.getAttribute("aria-orientation") === "vertical" ? getComputedStyle(e).direction === "rtl" ? "left" : "right" : void 0;
|
|
873
873
|
t !== o && s(t);
|
|
874
|
-
}), /* @__PURE__ */ Y(
|
|
874
|
+
}), /* @__PURE__ */ Y(Je, {
|
|
875
875
|
open: a,
|
|
876
876
|
onOpenChange: (t) => t ? r.actions.openPanel(e) : r.actions.closePanel(),
|
|
877
|
-
children: [/* @__PURE__ */ J(
|
|
877
|
+
children: [/* @__PURE__ */ J(Ye, { virtualRef: i }), /* @__PURE__ */ J(qe, {
|
|
878
878
|
"data-panel": e,
|
|
879
879
|
side: o,
|
|
880
880
|
align: "start",
|
|
@@ -895,15 +895,15 @@ function Ar({ id: e, children: t, ...n }) {
|
|
|
895
895
|
//#endregion
|
|
896
896
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-status.tsx
|
|
897
897
|
function jr({ state: e, controller: t, count: n }) {
|
|
898
|
-
let { t: r } =
|
|
899
|
-
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ J(
|
|
898
|
+
let { t: r } = M();
|
|
899
|
+
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ J(Fe, {
|
|
900
900
|
label: r("material.editor.comments.show-resolved", "Show resolved"),
|
|
901
901
|
checked: e.showResolved,
|
|
902
902
|
onCheckedChange: t.setShowResolved
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
905
|
function Mr({ state: e, empty: t }) {
|
|
906
|
-
let { t: n } =
|
|
906
|
+
let { t: n } = M(), r = null;
|
|
907
907
|
return e.phase === "loading" ? r = n("material.editor.comments.loading", "Loading comments…") : e.phase === "failed" ? r = n("material.editor.comments.load-failed", "Comments could not be loaded: {message}", { message: e.loadError ?? "" }) : t && (r = n("material.editor.comments.empty", "No comments yet")), r ? /* @__PURE__ */ J("p", {
|
|
908
908
|
role: e.phase === "failed" ? "alert" : void 0,
|
|
909
909
|
className: "px-1 text-muted-foreground text-sm",
|
|
@@ -913,10 +913,10 @@ function Mr({ state: e, empty: t }) {
|
|
|
913
913
|
//#endregion
|
|
914
914
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-edit-form.tsx
|
|
915
915
|
function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
916
|
-
let { t: i } =
|
|
916
|
+
let { t: i } = M();
|
|
917
917
|
return /* @__PURE__ */ Y("div", {
|
|
918
918
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2",
|
|
919
|
-
children: [/* @__PURE__ */ J(
|
|
919
|
+
children: [/* @__PURE__ */ J(D, {
|
|
920
920
|
className: hr,
|
|
921
921
|
"aria-label": i("material.editor.comments.body-label", "Comment"),
|
|
922
922
|
value: e,
|
|
@@ -935,7 +935,7 @@ function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
|
935
935
|
children: i("material.editor.comments.save", "Save")
|
|
936
936
|
}), /* @__PURE__ */ J(j, {
|
|
937
937
|
size: "sm",
|
|
938
|
-
variant:
|
|
938
|
+
variant: Xe,
|
|
939
939
|
onClick: r,
|
|
940
940
|
children: i("material.editor.comments.cancel", "Cancel")
|
|
941
941
|
})]
|
|
@@ -1006,7 +1006,7 @@ function Yr(e, t, n) {
|
|
|
1006
1006
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-entry.tsx
|
|
1007
1007
|
var Xr = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase()).join("");
|
|
1008
1008
|
function Zr({ comment: e, pending: t, onEdit: n }) {
|
|
1009
|
-
let { t: r, language: i } =
|
|
1009
|
+
let { t: r, language: i } = M();
|
|
1010
1010
|
return /* @__PURE__ */ Y("div", {
|
|
1011
1011
|
className: "flex items-center gap-2",
|
|
1012
1012
|
children: [
|
|
@@ -1062,11 +1062,11 @@ function Qr({ comment: e, editable: n, onEdit: r }) {
|
|
|
1062
1062
|
//#endregion
|
|
1063
1063
|
//#region lib/components/ui/widgets/editor/extensions/comments/thread-reply.tsx
|
|
1064
1064
|
function $r({ thread: e, controller: t, canRemove: n }) {
|
|
1065
|
-
let { t: r } =
|
|
1065
|
+
let { t: r } = M(), [i, a] = G(""), o = async () => {
|
|
1066
1066
|
let n = i;
|
|
1067
1067
|
n.trim() && (a(""), await t.reply(e.id, n) || a(n));
|
|
1068
1068
|
};
|
|
1069
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
1069
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(D, {
|
|
1070
1070
|
className: hr,
|
|
1071
1071
|
"aria-label": r("material.editor.comments.reply-label", "Reply to this thread"),
|
|
1072
1072
|
placeholder: r("material.editor.comments.reply-placeholder", "Reply…"),
|
|
@@ -1107,7 +1107,7 @@ function $r({ thread: e, controller: t, canRemove: n }) {
|
|
|
1107
1107
|
//#endregion
|
|
1108
1108
|
//#region lib/components/ui/widgets/editor/extensions/comments/thread-card.tsx
|
|
1109
1109
|
function ei(e) {
|
|
1110
|
-
let { thread: n, controller: r, active: i, detached: a, error: o, user: s } = e, { t: c } =
|
|
1110
|
+
let { thread: n, controller: r, active: i, detached: a, error: o, user: s } = e, { t: c } = M(), l = n.comments[0]?.author.id === s?.id && !!s;
|
|
1111
1111
|
return /* @__PURE__ */ Y("section", {
|
|
1112
1112
|
ref: e.cardRef,
|
|
1113
1113
|
"data-slot": "comment-thread",
|
|
@@ -1151,7 +1151,7 @@ function ei(e) {
|
|
|
1151
1151
|
//#endregion
|
|
1152
1152
|
//#region lib/components/ui/widgets/editor/extensions/comments/detached-threads.tsx
|
|
1153
1153
|
function ti({ views: e }) {
|
|
1154
|
-
let { t } =
|
|
1154
|
+
let { t } = M(), { controller: n, state: r, detached: i } = e;
|
|
1155
1155
|
return !n || i.length === 0 ? null : /* @__PURE__ */ Y("section", {
|
|
1156
1156
|
"data-slot": "comment-detached",
|
|
1157
1157
|
className: "grid gap-2",
|
|
@@ -1466,7 +1466,7 @@ function _i(e) {
|
|
|
1466
1466
|
//#endregion
|
|
1467
1467
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-panel.tsx
|
|
1468
1468
|
function vi(e) {
|
|
1469
|
-
let { handle: t, chrome: n } =
|
|
1469
|
+
let { handle: t, chrome: n } = k(), { editor: r } = t;
|
|
1470
1470
|
return !r || !X(r) ? null : /* @__PURE__ */ J(Ar, {
|
|
1471
1471
|
id: "comments",
|
|
1472
1472
|
className: "max-h-[min(36rem,80svh)] w-96 max-w-[92vw] overflow-y-auto p-3",
|
|
@@ -1475,11 +1475,11 @@ function vi(e) {
|
|
|
1475
1475
|
});
|
|
1476
1476
|
}
|
|
1477
1477
|
function yi({ editor: e }) {
|
|
1478
|
-
let { t } =
|
|
1478
|
+
let { t } = M(), n = _i(e), { controller: r, state: i, anchored: a } = n, o = W(null);
|
|
1479
1479
|
if (H(() => {
|
|
1480
1480
|
o.current?.querySelector("[data-active]")?.scrollIntoView({ block: "nearest" });
|
|
1481
1481
|
}, [i.activeId]), !r) return null;
|
|
1482
|
-
let s = (e, t) => /* @__PURE__ */ J(
|
|
1482
|
+
let s = (e, t) => /* @__PURE__ */ J(N, {
|
|
1483
1483
|
variant: "ghost",
|
|
1484
1484
|
"aria-label": t,
|
|
1485
1485
|
tooltip: t,
|
|
@@ -1630,11 +1630,11 @@ function Ei(e, t, n, r) {
|
|
|
1630
1630
|
//#endregion
|
|
1631
1631
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-rail.tsx
|
|
1632
1632
|
function Di(e) {
|
|
1633
|
-
let { handle: t } =
|
|
1633
|
+
let { handle: t } = k(), { editor: n } = t;
|
|
1634
1634
|
return !n || !X(n) ? null : /* @__PURE__ */ J(Oi, { editor: n });
|
|
1635
1635
|
}
|
|
1636
1636
|
function Oi({ editor: e }) {
|
|
1637
|
-
let { t } =
|
|
1637
|
+
let { t } = M(), n = _i(e), { controller: r, state: i, anchored: a } = n, o = W(null), { layout: s, cardRef: c } = Ei(e, o, a.map((e) => ({
|
|
1638
1638
|
id: e.id,
|
|
1639
1639
|
from: i.anchors[e.id]?.from ?? 0
|
|
1640
1640
|
})), i.activeId);
|
|
@@ -1778,7 +1778,7 @@ function Pi(e, t) {
|
|
|
1778
1778
|
}
|
|
1779
1779
|
var Fi = (e) => Pi(e.doc, e.selection.head);
|
|
1780
1780
|
function Ii(e, t) {
|
|
1781
|
-
let n = t.node.isAtom ? ut.create(e.doc, t.pos) :
|
|
1781
|
+
let n = t.node.isAtom ? ut.create(e.doc, t.pos) : z.near(e.doc.resolve(t.pos + 1));
|
|
1782
1782
|
return e.setSelection(n);
|
|
1783
1783
|
}
|
|
1784
1784
|
function Li(e, t, n = Fi(e)) {
|
|
@@ -1788,7 +1788,7 @@ function Li(e, t, n = Fi(e)) {
|
|
|
1788
1788
|
let { tr: i } = e, a = e.selection.head, o = e.selection.anchor, s = t === 1 ? n.pos : n.pos - r.nodeSize, c = t === 1 ? n.pos + n.node.nodeSize + r.nodeSize : n.pos + n.node.nodeSize, l = t === 1 ? [r, n.node] : [n.node, r];
|
|
1789
1789
|
i.replaceWith(s, c, l);
|
|
1790
1790
|
let u = t === 1 ? r.nodeSize : -r.nodeSize;
|
|
1791
|
-
return a >= n.pos && a <= n.pos + n.node.nodeSize && e.selection instanceof
|
|
1791
|
+
return a >= n.pos && a <= n.pos + n.node.nodeSize && e.selection instanceof z ? i.setSelection(z.create(i.doc, o + u, a + u)) : e.selection instanceof ut && i.setSelection(ut.create(i.doc, n.pos + u)), i.scrollIntoView();
|
|
1792
1792
|
}
|
|
1793
1793
|
function Ri(e, t = Fi(e)) {
|
|
1794
1794
|
if (!t) return null;
|
|
@@ -1808,7 +1808,7 @@ function zi(e, t = Fi(e)) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
n.delete(t.pos, r);
|
|
1810
1810
|
let i = Math.min(t.pos, n.doc.content.size);
|
|
1811
|
-
return n.setSelection(
|
|
1811
|
+
return n.setSelection(z.near(n.doc.resolve(i), -1)).scrollIntoView();
|
|
1812
1812
|
}
|
|
1813
1813
|
//#endregion
|
|
1814
1814
|
//#region lib/components/ui/widgets/editor/extensions/block/block-menu.tsx
|
|
@@ -1817,42 +1817,42 @@ function Bi(e, t) {
|
|
|
1817
1817
|
n && e.view.dispatch(n), e.isDestroyed || e.commands.focus();
|
|
1818
1818
|
}
|
|
1819
1819
|
function Vi({ editor: e, block: t }) {
|
|
1820
|
-
let { t: n } =
|
|
1820
|
+
let { t: n } = M(), { doc: r } = e.state, i = () => ({
|
|
1821
1821
|
...t,
|
|
1822
1822
|
node: r.child(t.index)
|
|
1823
1823
|
});
|
|
1824
1824
|
return /* @__PURE__ */ Y(q, { children: [
|
|
1825
|
-
/* @__PURE__ */ Y(
|
|
1825
|
+
/* @__PURE__ */ Y(We, { children: [/* @__PURE__ */ J(Ve, { children: n("material.editor.block.turn-into", "Turn into") }), Ni(e).map((t) => /* @__PURE__ */ Y(A, {
|
|
1826
1826
|
onSelect: () => t.run(e),
|
|
1827
1827
|
children: [/* @__PURE__ */ J(t.icon, {}), n(t.key, t.label)]
|
|
1828
1828
|
}, t.id))] }),
|
|
1829
|
-
/* @__PURE__ */ J(
|
|
1830
|
-
/* @__PURE__ */ Y(
|
|
1831
|
-
/* @__PURE__ */ Y(
|
|
1829
|
+
/* @__PURE__ */ J(Ue, {}),
|
|
1830
|
+
/* @__PURE__ */ Y(We, { children: [
|
|
1831
|
+
/* @__PURE__ */ Y(A, {
|
|
1832
1832
|
onSelect: () => Bi(e, () => Ri(e.state, i())),
|
|
1833
1833
|
children: [/* @__PURE__ */ J(Ht, {}), n("material.editor.block.duplicate", "Duplicate")]
|
|
1834
1834
|
}),
|
|
1835
|
-
/* @__PURE__ */ Y(
|
|
1835
|
+
/* @__PURE__ */ Y(A, {
|
|
1836
1836
|
disabled: t.index === 0,
|
|
1837
1837
|
onSelect: () => Bi(e, () => Li(e.state, -1, i())),
|
|
1838
1838
|
children: [
|
|
1839
1839
|
/* @__PURE__ */ J(Nt, {}),
|
|
1840
1840
|
n("material.editor.block.move-up", "Move up"),
|
|
1841
|
-
/* @__PURE__ */ J(
|
|
1841
|
+
/* @__PURE__ */ J(Ge, { children: "⌥⇧↑" })
|
|
1842
1842
|
]
|
|
1843
1843
|
}),
|
|
1844
|
-
/* @__PURE__ */ Y(
|
|
1844
|
+
/* @__PURE__ */ Y(A, {
|
|
1845
1845
|
disabled: t.index >= r.childCount - 1,
|
|
1846
1846
|
onSelect: () => Bi(e, () => Li(e.state, 1, i())),
|
|
1847
1847
|
children: [
|
|
1848
1848
|
/* @__PURE__ */ J(Mt, {}),
|
|
1849
1849
|
n("material.editor.block.move-down", "Move down"),
|
|
1850
|
-
/* @__PURE__ */ J(
|
|
1850
|
+
/* @__PURE__ */ J(Ge, { children: "⌥⇧↓" })
|
|
1851
1851
|
]
|
|
1852
1852
|
})
|
|
1853
1853
|
] }),
|
|
1854
|
-
/* @__PURE__ */ J(
|
|
1855
|
-
/* @__PURE__ */ Y(
|
|
1854
|
+
/* @__PURE__ */ J(Ue, {}),
|
|
1855
|
+
/* @__PURE__ */ Y(A, {
|
|
1856
1856
|
variant: "error",
|
|
1857
1857
|
onSelect: () => Bi(e, () => zi(e.state, i())),
|
|
1858
1858
|
children: [/* @__PURE__ */ J(vn, {}), n("material.editor.block.delete", "Delete")]
|
|
@@ -1914,7 +1914,7 @@ function Hi(e, t, n) {
|
|
|
1914
1914
|
//#endregion
|
|
1915
1915
|
//#region lib/components/ui/widgets/editor/partials/editor-block-handle.tsx
|
|
1916
1916
|
function Ui({ children: e, className: t }) {
|
|
1917
|
-
let { handle: n } =
|
|
1917
|
+
let { handle: n } = k(), r = n.features.some((e) => e.key === "dragHandle");
|
|
1918
1918
|
return !n.editor || !r ? /* @__PURE__ */ J("div", {
|
|
1919
1919
|
className: t,
|
|
1920
1920
|
children: e
|
|
@@ -1925,7 +1925,7 @@ function Ui({ children: e, className: t }) {
|
|
|
1925
1925
|
});
|
|
1926
1926
|
}
|
|
1927
1927
|
function Wi({ editor: e, children: n, className: r }) {
|
|
1928
|
-
let { chrome: i } =
|
|
1928
|
+
let { chrome: i } = k(), a = W(null), o = P({
|
|
1929
1929
|
editor: e,
|
|
1930
1930
|
selector: (e) => e.editor.isEditable
|
|
1931
1931
|
}), s = i.state.panel === "block" && o, { active: c, hover: l, unhover: u } = Hi(e, a, s);
|
|
@@ -1943,24 +1943,24 @@ function Wi({ editor: e, children: n, className: r }) {
|
|
|
1943
1943
|
});
|
|
1944
1944
|
}
|
|
1945
1945
|
function Gi({ editor: e, active: n, open: r }) {
|
|
1946
|
-
let { t: i } =
|
|
1946
|
+
let { t: i } = M(), { chrome: a } = k();
|
|
1947
1947
|
return /* @__PURE__ */ Y("div", {
|
|
1948
1948
|
"data-slot": "editor-block-handle",
|
|
1949
1949
|
"data-open": r || void 0,
|
|
1950
1950
|
style: { top: n.top },
|
|
1951
1951
|
className: t("absolute end-full me-1.5 flex items-center opacity-0 transition-opacity duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none", "group-hover/blocks:opacity-100 group-focus-within/blocks:opacity-100 data-open:opacity-100", "@max-xl:invisible not-pointer-fine:invisible"),
|
|
1952
|
-
children: [/* @__PURE__ */ J(
|
|
1952
|
+
children: [/* @__PURE__ */ J(N, {
|
|
1953
1953
|
variant: "ghost",
|
|
1954
1954
|
className: "size-6 text-muted-foreground",
|
|
1955
1955
|
tooltip: i("material.editor.block.add", "Add a block below"),
|
|
1956
1956
|
onClick: () => ki(e, n),
|
|
1957
1957
|
children: /* @__PURE__ */ J(on, {})
|
|
1958
|
-
}), /* @__PURE__ */ Y(
|
|
1958
|
+
}), /* @__PURE__ */ Y(Ke, {
|
|
1959
1959
|
open: r,
|
|
1960
1960
|
onOpenChange: (e) => e ? a.actions.openPanel("block") : a.actions.closePanel(),
|
|
1961
|
-
children: [/* @__PURE__ */ J(
|
|
1961
|
+
children: [/* @__PURE__ */ J(Be, {
|
|
1962
1962
|
asChild: !0,
|
|
1963
|
-
children: /* @__PURE__ */ J(
|
|
1963
|
+
children: /* @__PURE__ */ J(N, {
|
|
1964
1964
|
variant: "ghost",
|
|
1965
1965
|
draggable: !0,
|
|
1966
1966
|
className: "size-6 cursor-grab text-muted-foreground active:cursor-grabbing",
|
|
@@ -1974,7 +1974,7 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1974
1974
|
onDragStart: (t) => Ai(e, n, t.nativeEvent),
|
|
1975
1975
|
children: /* @__PURE__ */ J(Kt, {})
|
|
1976
1976
|
})
|
|
1977
|
-
}), /* @__PURE__ */ J(
|
|
1977
|
+
}), /* @__PURE__ */ J(He, {
|
|
1978
1978
|
align: "start",
|
|
1979
1979
|
onCloseAutoFocus: (t) => {
|
|
1980
1980
|
t.preventDefault(), e.isDestroyed || e.commands.focus();
|
|
@@ -1990,7 +1990,7 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1990
1990
|
//#endregion
|
|
1991
1991
|
//#region lib/components/ui/widgets/editor/extensions/find/find-fields.tsx
|
|
1992
1992
|
function Ki({ find: e }) {
|
|
1993
|
-
let { t } =
|
|
1993
|
+
let { t } = M(), n = "";
|
|
1994
1994
|
return e.term && (n = e.total === 0 ? t("material.editor.find.none", "No results") : t("material.editor.find.count", "{current} of {total}", {
|
|
1995
1995
|
current: e.current + 1,
|
|
1996
1996
|
total: e.total
|
|
@@ -2002,14 +2002,14 @@ function Ki({ find: e }) {
|
|
|
2002
2002
|
});
|
|
2003
2003
|
}
|
|
2004
2004
|
function qi({ find: e }) {
|
|
2005
|
-
let { t } =
|
|
2006
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
2005
|
+
let { t } = M();
|
|
2006
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(me, {
|
|
2007
2007
|
size: "sm",
|
|
2008
2008
|
"aria-label": t("material.editor.find.match-case", "Match case"),
|
|
2009
2009
|
pressed: e.caseSensitive,
|
|
2010
2010
|
onPressedChange: e.setCaseSensitive,
|
|
2011
2011
|
children: /* @__PURE__ */ J(Ft, {})
|
|
2012
|
-
}), /* @__PURE__ */ J(
|
|
2012
|
+
}), /* @__PURE__ */ J(me, {
|
|
2013
2013
|
size: "sm",
|
|
2014
2014
|
"aria-label": t("material.editor.find.whole-word", "Whole word"),
|
|
2015
2015
|
pressed: e.wholeWord,
|
|
@@ -2018,15 +2018,15 @@ function qi({ find: e }) {
|
|
|
2018
2018
|
})] });
|
|
2019
2019
|
}
|
|
2020
2020
|
function Ji({ disabled: e, onStep: t }) {
|
|
2021
|
-
let { t: n } =
|
|
2022
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
2021
|
+
let { t: n } = M();
|
|
2022
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(N, {
|
|
2023
2023
|
variant: "ghost",
|
|
2024
2024
|
className: "size-8",
|
|
2025
2025
|
tooltip: n("material.editor.find.previous", "Previous match"),
|
|
2026
2026
|
disabled: e,
|
|
2027
2027
|
onClick: () => t(-1),
|
|
2028
2028
|
children: /* @__PURE__ */ J(Bt, {})
|
|
2029
|
-
}), /* @__PURE__ */ J(
|
|
2029
|
+
}), /* @__PURE__ */ J(N, {
|
|
2030
2030
|
variant: "ghost",
|
|
2031
2031
|
className: "size-8",
|
|
2032
2032
|
tooltip: n("material.editor.find.next", "Next match"),
|
|
@@ -2036,11 +2036,11 @@ function Ji({ disabled: e, onStep: t }) {
|
|
|
2036
2036
|
})] });
|
|
2037
2037
|
}
|
|
2038
2038
|
function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replaceOpen: a, canReplace: o = !0, onToggleReplace: s }) {
|
|
2039
|
-
let { t: c } =
|
|
2039
|
+
let { t: c } = M();
|
|
2040
2040
|
return /* @__PURE__ */ Y("div", {
|
|
2041
2041
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2042
2042
|
children: [
|
|
2043
|
-
/* @__PURE__ */ J(
|
|
2043
|
+
/* @__PURE__ */ J(ze, {
|
|
2044
2044
|
ref: t,
|
|
2045
2045
|
type: "search",
|
|
2046
2046
|
"aria-label": c("material.editor.find.find", "Find"),
|
|
@@ -2051,7 +2051,7 @@ function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2051
2051
|
className: "h-8 min-w-0 flex-1 basis-40 sm:max-w-64"
|
|
2052
2052
|
}),
|
|
2053
2053
|
/* @__PURE__ */ J(qi, { find: e }),
|
|
2054
|
-
o && /* @__PURE__ */ J(
|
|
2054
|
+
o && /* @__PURE__ */ J(N, {
|
|
2055
2055
|
variant: "ghost",
|
|
2056
2056
|
className: "size-8",
|
|
2057
2057
|
"aria-pressed": a,
|
|
@@ -2064,7 +2064,7 @@ function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2064
2064
|
disabled: e.total === 0,
|
|
2065
2065
|
onStep: n
|
|
2066
2066
|
}),
|
|
2067
|
-
/* @__PURE__ */ J(
|
|
2067
|
+
/* @__PURE__ */ J(N, {
|
|
2068
2068
|
variant: "ghost",
|
|
2069
2069
|
className: "ms-auto size-8",
|
|
2070
2070
|
tooltip: c("material.editor.find.close", "Close"),
|
|
@@ -2109,7 +2109,7 @@ function ra(e, t, n) {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
//#endregion
|
|
2111
2111
|
//#region lib/components/ui/widgets/editor/extensions/find/find-state.ts
|
|
2112
|
-
var Z = new
|
|
2112
|
+
var Z = new lt("nxgtFind"), ia = "";
|
|
2113
2113
|
function aa(e) {
|
|
2114
2114
|
let t = [];
|
|
2115
2115
|
return e.descendants((e, n) => e.isTextblock ? (t.push({
|
|
@@ -2118,18 +2118,18 @@ function aa(e) {
|
|
|
2118
2118
|
}), !1) : !0), t;
|
|
2119
2119
|
}
|
|
2120
2120
|
function oa(e, t) {
|
|
2121
|
-
return
|
|
2121
|
+
return I.create(e, t.map((e) => L.inline(e.from, e.to, { class: "nxgt-find-match" })));
|
|
2122
2122
|
}
|
|
2123
2123
|
function sa(e, t) {
|
|
2124
2124
|
let n = t.matches[t.current];
|
|
2125
|
-
return n ?
|
|
2125
|
+
return n ? I.create(e, [L.inline(n.from, n.to, { class: "nxgt-find-current" })]) : I.empty;
|
|
2126
2126
|
}
|
|
2127
2127
|
var ca = () => ({
|
|
2128
2128
|
...Xi,
|
|
2129
2129
|
term: "",
|
|
2130
2130
|
matches: [],
|
|
2131
2131
|
current: -1,
|
|
2132
|
-
decorations:
|
|
2132
|
+
decorations: I.empty
|
|
2133
2133
|
});
|
|
2134
2134
|
function la(e, t, n) {
|
|
2135
2135
|
let r = ta(aa(e), t.term, t);
|
|
@@ -2191,7 +2191,7 @@ function da(e, t, n) {
|
|
|
2191
2191
|
}), !1)), n && (n.blocks += r.length), s.push(...ta(r, t.term, t));
|
|
2192
2192
|
}
|
|
2193
2193
|
let c = [...a, ...s].sort((e, t) => e.from - t.from);
|
|
2194
|
-
s.length > 0 && (o = o.add(e.doc, s.map((e) =>
|
|
2194
|
+
s.length > 0 && (o = o.add(e.doc, s.map((e) => L.inline(e.from, e.to, { class: "nxgt-find-match" }))));
|
|
2195
2195
|
let l = t.current >= 0 && t.matches.length === c.length ? Math.min(t.current, c.length - 1) : na(c, e.selection.from);
|
|
2196
2196
|
return {
|
|
2197
2197
|
...t,
|
|
@@ -2210,7 +2210,7 @@ function pa(e) {
|
|
|
2210
2210
|
return /\n/.test(i) ? "" : i;
|
|
2211
2211
|
}
|
|
2212
2212
|
function ma(e) {
|
|
2213
|
-
let [t, n] = G(() => pa(e)), [r, i] = G(!1), [a, o] = G(!1), s =
|
|
2213
|
+
let [t, n] = G(() => pa(e)), [r, i] = G(!1), [a, o] = G(!1), s = P({
|
|
2214
2214
|
editor: e,
|
|
2215
2215
|
selector: ({ editor: e }) => {
|
|
2216
2216
|
let { matches: t, current: n } = fa(e.state);
|
|
@@ -2247,11 +2247,11 @@ function ma(e) {
|
|
|
2247
2247
|
//#endregion
|
|
2248
2248
|
//#region lib/components/ui/widgets/editor/partials/editor-find-panel.tsx
|
|
2249
2249
|
function ha({ className: e }) {
|
|
2250
|
-
let { handle: t, chrome: n } =
|
|
2250
|
+
let { handle: t, chrome: n } = k(), { editor: r } = t, i = n.state.panel === "find", a = t.features.some((e) => e.key === "find");
|
|
2251
2251
|
return !r || !i || !a ? null : /* @__PURE__ */ J(ga, { className: e });
|
|
2252
2252
|
}
|
|
2253
2253
|
function ga({ className: e }) {
|
|
2254
|
-
let { t } =
|
|
2254
|
+
let { t } = M(), { handle: n, chrome: r } = k(), i = n.editor, a = ma(i), o = W(null), s = P({
|
|
2255
2255
|
editor: i,
|
|
2256
2256
|
selector: (e) => e.editor.isEditable
|
|
2257
2257
|
}), c = s && r.state.findReplace;
|
|
@@ -2286,11 +2286,11 @@ function ga({ className: e }) {
|
|
|
2286
2286
|
});
|
|
2287
2287
|
}
|
|
2288
2288
|
function _a({ editor: e, find: t }) {
|
|
2289
|
-
let { t: n } =
|
|
2289
|
+
let { t: n } = M(), [r, i] = G("");
|
|
2290
2290
|
return /* @__PURE__ */ Y("div", {
|
|
2291
2291
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2292
2292
|
children: [
|
|
2293
|
-
/* @__PURE__ */ J(
|
|
2293
|
+
/* @__PURE__ */ J(ze, {
|
|
2294
2294
|
"aria-label": n("material.editor.find.replace", "Replace"),
|
|
2295
2295
|
placeholder: n("material.editor.find.replace", "Replace"),
|
|
2296
2296
|
value: r,
|
|
@@ -2320,8 +2320,8 @@ function _a({ editor: e, find: t }) {
|
|
|
2320
2320
|
//#endregion
|
|
2321
2321
|
//#region lib/components/ui/widgets/editor/partials/editor-focus-exit.tsx
|
|
2322
2322
|
function va({ className: e }) {
|
|
2323
|
-
let { t: n } =
|
|
2324
|
-
return r.state.focusMode ? /* @__PURE__ */ J(
|
|
2323
|
+
let { t: n } = M(), { chrome: r, handle: i } = k();
|
|
2324
|
+
return r.state.focusMode ? /* @__PURE__ */ J(N, {
|
|
2325
2325
|
variant: "ghost",
|
|
2326
2326
|
"data-slot": "editor-focus-exit",
|
|
2327
2327
|
className: t("size-8 bg-card/80 backdrop-blur", e),
|
|
@@ -2338,7 +2338,7 @@ var ya = (e) => e.trim() ? e.trim().split(/\s+/).length : 0, ba = (e) => e <= 0
|
|
|
2338
2338
|
//#endregion
|
|
2339
2339
|
//#region lib/components/ui/widgets/editor/core/use-editor-stats.ts
|
|
2340
2340
|
function xa(e) {
|
|
2341
|
-
return
|
|
2341
|
+
return P({
|
|
2342
2342
|
editor: e.editor,
|
|
2343
2343
|
selector: ({ editor: e }) => {
|
|
2344
2344
|
let t = e?.storage.characterCount, n = t?.words?.() ?? ya(e?.getText() ?? ""), r = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -2359,7 +2359,7 @@ function xa(e) {
|
|
|
2359
2359
|
//#endregion
|
|
2360
2360
|
//#region lib/components/ui/widgets/editor/partials/editor-stats.tsx
|
|
2361
2361
|
function Sa({ readingTime: e = !0 }) {
|
|
2362
|
-
let { t } =
|
|
2362
|
+
let { t } = M(), { handle: n } = k(), r = xa(n), { words: i } = r;
|
|
2363
2363
|
return /* @__PURE__ */ Y("p", {
|
|
2364
2364
|
"data-slot": "editor-stats",
|
|
2365
2365
|
className: "flex flex-wrap gap-x-2",
|
|
@@ -2384,7 +2384,7 @@ var Ca = {
|
|
|
2384
2384
|
unsaved: ["material.editor.footer.unsaved", "Unsaved changes"]
|
|
2385
2385
|
};
|
|
2386
2386
|
function wa({ className: n, status: r, actions: i, readingTime: a = !0 }) {
|
|
2387
|
-
let { t: o } =
|
|
2387
|
+
let { t: o } = M(), s = typeof r == "string" && r in Ca, [c, l] = s ? Ca[r] : [];
|
|
2388
2388
|
return /* @__PURE__ */ Y("div", {
|
|
2389
2389
|
"data-slot": "editor-footer",
|
|
2390
2390
|
className: t("flex flex-wrap items-center gap-x-3 gap-y-2 text-muted-foreground text-sm", n),
|
|
@@ -2433,7 +2433,7 @@ function Ea(e, t) {
|
|
|
2433
2433
|
//#region lib/components/ui/widgets/editor/extensions/outline/use-outline.ts
|
|
2434
2434
|
var Da = 120, Oa = 700, ka = () => window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
2435
2435
|
function Aa(e) {
|
|
2436
|
-
let t =
|
|
2436
|
+
let t = P({
|
|
2437
2437
|
editor: e,
|
|
2438
2438
|
selector: ({ editor: e }) => Ta(e.state.doc)
|
|
2439
2439
|
}), [n, r] = G(0), i = W(0);
|
|
@@ -2479,7 +2479,7 @@ var ja = {
|
|
|
2479
2479
|
3: "ps-8"
|
|
2480
2480
|
};
|
|
2481
2481
|
function Ma({ className: e, onNavigate: t }) {
|
|
2482
|
-
let { handle: n } =
|
|
2482
|
+
let { handle: n } = k();
|
|
2483
2483
|
return n.editor ? /* @__PURE__ */ J(Na, {
|
|
2484
2484
|
editor: n.editor,
|
|
2485
2485
|
className: e,
|
|
@@ -2487,7 +2487,7 @@ function Ma({ className: e, onNavigate: t }) {
|
|
|
2487
2487
|
}) : null;
|
|
2488
2488
|
}
|
|
2489
2489
|
function Na({ editor: e, className: n, onNavigate: r }) {
|
|
2490
|
-
let { t: i } =
|
|
2490
|
+
let { t: i } = M(), { items: a, active: o, goTo: s } = Aa(e);
|
|
2491
2491
|
return /* @__PURE__ */ Y("nav", {
|
|
2492
2492
|
"aria-label": i("material.editor.outline", "Outline"),
|
|
2493
2493
|
"data-slot": "editor-outline",
|
|
@@ -2516,7 +2516,7 @@ function Na({ editor: e, className: n, onNavigate: r }) {
|
|
|
2516
2516
|
//#endregion
|
|
2517
2517
|
//#region lib/components/ui/widgets/editor/partials/editor-outline-panel.tsx
|
|
2518
2518
|
function Pa(e) {
|
|
2519
|
-
let { handle: t, chrome: n } =
|
|
2519
|
+
let { handle: t, chrome: n } = k();
|
|
2520
2520
|
return t.features.some((e) => e.key === "outline") ? /* @__PURE__ */ J(Ar, {
|
|
2521
2521
|
id: "outline",
|
|
2522
2522
|
className: "w-72 max-w-[92vw] p-2",
|
|
@@ -2527,7 +2527,7 @@ function Pa(e) {
|
|
|
2527
2527
|
//#region lib/components/ui/widgets/editor/extensions/upload/use-editor-uploads.ts
|
|
2528
2528
|
var Fa = 0, Ia = 1e6;
|
|
2529
2529
|
function La(e) {
|
|
2530
|
-
let t =
|
|
2530
|
+
let t = v(e.editor)?.queue, n = K(V((e) => t?.subscribe(e) ?? (() => {}), [t]), () => {
|
|
2531
2531
|
if (!t) return Fa;
|
|
2532
2532
|
let e = t.list(), n = e.filter((e) => e.status === "error").length;
|
|
2533
2533
|
return (e.length - n) * Ia + n;
|
|
@@ -2571,10 +2571,10 @@ function Va(e) {
|
|
|
2571
2571
|
//#endregion
|
|
2572
2572
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-button.tsx
|
|
2573
2573
|
function Ha({ editor: e }) {
|
|
2574
|
-
let { t } =
|
|
2574
|
+
let { t } = M(), { chrome: n } = k(), r = ir(e), i = n.state.panel === "assistant";
|
|
2575
2575
|
if (!r || !e.isEditable) return null;
|
|
2576
2576
|
let a = t("material.editor.assistant.title", "Assistant");
|
|
2577
|
-
return /* @__PURE__ */ J(
|
|
2577
|
+
return /* @__PURE__ */ J(d, {
|
|
2578
2578
|
"data-slot": "editor-assistant-button",
|
|
2579
2579
|
variant: i ? "filled" : "tonal",
|
|
2580
2580
|
"aria-label": a,
|
|
@@ -2868,7 +2868,7 @@ async function so(e, t) {
|
|
|
2868
2868
|
}
|
|
2869
2869
|
//#endregion
|
|
2870
2870
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-extension.ts
|
|
2871
|
-
var co =
|
|
2871
|
+
var co = R.create({
|
|
2872
2872
|
name: "assistant",
|
|
2873
2873
|
addStorage: () => ({}),
|
|
2874
2874
|
onBeforeCreate() {
|
|
@@ -2890,14 +2890,14 @@ var co = L.create({
|
|
|
2890
2890
|
n.follow = qa(e, () => r.getState().phase === "idle" ? null : r.getState().range, r.subscribe);
|
|
2891
2891
|
},
|
|
2892
2892
|
addProseMirrorPlugins() {
|
|
2893
|
-
let e = new
|
|
2894
|
-
return [new
|
|
2893
|
+
let e = new lt("assistantRange"), t = () => this.storage.controller;
|
|
2894
|
+
return [new F({
|
|
2895
2895
|
key: e,
|
|
2896
2896
|
props: { decorations: (e) => {
|
|
2897
2897
|
let n = t()?.getState();
|
|
2898
2898
|
if (!n || n.phase === "idle" || !n.hasSelection) return null;
|
|
2899
2899
|
let { from: r, to: i } = n.range;
|
|
2900
|
-
return r >= i || i > e.doc.content.size ? null :
|
|
2900
|
+
return r >= i || i > e.doc.content.size ? null : I.create(e.doc, [L.inline(r, i, { class: "nxgt-assistant-range" })]);
|
|
2901
2901
|
} },
|
|
2902
2902
|
view: (n) => {
|
|
2903
2903
|
let r = () => {
|
|
@@ -2984,10 +2984,10 @@ function po(e, t) {
|
|
|
2984
2984
|
//#endregion
|
|
2985
2985
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-buttons.tsx
|
|
2986
2986
|
function mo({ editor: e }) {
|
|
2987
|
-
let { t } =
|
|
2987
|
+
let { t } = M(), n = Sr(e);
|
|
2988
2988
|
if (!n) return null;
|
|
2989
2989
|
let r = t("material.editor.comments.comment", "Comment");
|
|
2990
|
-
return /* @__PURE__ */ J(
|
|
2990
|
+
return /* @__PURE__ */ J(d, {
|
|
2991
2991
|
"data-slot": "editor-comment-button",
|
|
2992
2992
|
variant: "ghost",
|
|
2993
2993
|
"aria-label": r,
|
|
@@ -2999,10 +2999,10 @@ function mo({ editor: e }) {
|
|
|
2999
2999
|
});
|
|
3000
3000
|
}
|
|
3001
3001
|
function ho({ editor: e }) {
|
|
3002
|
-
let { t } =
|
|
3002
|
+
let { t } = M(), { chrome: n } = k(), r = Cr(e);
|
|
3003
3003
|
if (!X(e)) return null;
|
|
3004
3004
|
let i = n.state.panel === "comments", a = mi(r).length, o = t("material.editor.comments.count", "Comments ({count})", { count: a });
|
|
3005
|
-
return /* @__PURE__ */ J(
|
|
3005
|
+
return /* @__PURE__ */ J(d, {
|
|
3006
3006
|
"data-slot": "editor-comments-button",
|
|
3007
3007
|
variant: i ? "filled" : "ghost",
|
|
3008
3008
|
"aria-label": o,
|
|
@@ -3048,11 +3048,11 @@ function xo(e, t) {
|
|
|
3048
3048
|
let o = a.attrs.threadId, s = n.get(o);
|
|
3049
3049
|
if (s === void 0 || s && !t.showResolved) continue;
|
|
3050
3050
|
let c = [yo];
|
|
3051
|
-
s && c.push(`${yo}-resolved`), o === t.activeId && c.push(`${yo}-active`), r.push(
|
|
3051
|
+
s && c.push(`${yo}-resolved`), o === t.activeId && c.push(`${yo}-active`), r.push(L.inline(i, i + e.nodeSize, { class: c.join(" ") }));
|
|
3052
3052
|
}
|
|
3053
3053
|
});
|
|
3054
3054
|
let i = t.composer?.range;
|
|
3055
|
-
return i && i.from < i.to && i.to <= e.content.size && r.push(
|
|
3055
|
+
return i && i.from < i.to && i.to <= e.content.size && r.push(L.inline(i.from, i.to, { class: `${yo} ${yo}-active` })), I.create(e, r);
|
|
3056
3056
|
}
|
|
3057
3057
|
//#endregion
|
|
3058
3058
|
//#region lib/components/ui/widgets/editor/extensions/comments/strip-comment-marks.ts
|
|
@@ -3063,15 +3063,15 @@ var So = (e) => {
|
|
|
3063
3063
|
let n = e.marks.filter((e) => e.type.name !== "comment");
|
|
3064
3064
|
t.push(n.length === e.marks.length ? e : e.mark(n));
|
|
3065
3065
|
} else t.push(e.copy(So(e.content)));
|
|
3066
|
-
}),
|
|
3067
|
-
}, Co = (e) => new
|
|
3066
|
+
}), it.fromArray(t);
|
|
3067
|
+
}, Co = (e) => new at(So(e.content), e.openStart, e.openEnd), wo = (e) => e?.dragging?.move === !0, To = (e, t) => wo(t) ? e : Co(e), Eo = new lt("comments"), Do = (e, t) => {
|
|
3068
3068
|
let n = [];
|
|
3069
3069
|
for (let r = e; r && r !== t; r = r.parentElement) {
|
|
3070
3070
|
let e = r.getAttribute?.("data-comment-thread");
|
|
3071
3071
|
e && n.push(e);
|
|
3072
3072
|
}
|
|
3073
3073
|
return n;
|
|
3074
|
-
}, Oo =
|
|
3074
|
+
}, Oo = R.create({
|
|
3075
3075
|
name: "comments",
|
|
3076
3076
|
addExtensions: () => [xt],
|
|
3077
3077
|
addStorage: () => ({}),
|
|
@@ -3110,7 +3110,7 @@ var So = (e) => {
|
|
|
3110
3110
|
},
|
|
3111
3111
|
addProseMirrorPlugins() {
|
|
3112
3112
|
let e = () => this.storage.controller, t = null;
|
|
3113
|
-
return [new
|
|
3113
|
+
return [new F({
|
|
3114
3114
|
key: Eo,
|
|
3115
3115
|
props: {
|
|
3116
3116
|
transformPasted: To,
|
|
@@ -3185,7 +3185,7 @@ var So = (e) => {
|
|
|
3185
3185
|
name: "comments",
|
|
3186
3186
|
extensions: () => [xt],
|
|
3187
3187
|
markdown: "native"
|
|
3188
|
-
}), No =
|
|
3188
|
+
}), No = R.create({
|
|
3189
3189
|
name: "nxgtBlockKeys",
|
|
3190
3190
|
addKeyboardShortcuts() {
|
|
3191
3191
|
let e = (e) => () => {
|
|
@@ -3210,8 +3210,8 @@ var So = (e) => {
|
|
|
3210
3210
|
//#endregion
|
|
3211
3211
|
//#region lib/components/ui/widgets/editor/extensions/find/find-button.tsx
|
|
3212
3212
|
function Fo({ editor: e }) {
|
|
3213
|
-
let { t } =
|
|
3214
|
-
return /* @__PURE__ */ J(
|
|
3213
|
+
let { t } = M(), { chrome: n } = k(), r = n.state.panel === "find";
|
|
3214
|
+
return /* @__PURE__ */ J(d, {
|
|
3215
3215
|
variant: r ? "filled" : "ghost",
|
|
3216
3216
|
"aria-pressed": r,
|
|
3217
3217
|
tooltip: t("material.editor.find.title", "Find and replace"),
|
|
@@ -3221,7 +3221,7 @@ function Fo({ editor: e }) {
|
|
|
3221
3221
|
}
|
|
3222
3222
|
//#endregion
|
|
3223
3223
|
//#region lib/components/ui/widgets/editor/extensions/find/find-plugin.ts
|
|
3224
|
-
var Io = () => new
|
|
3224
|
+
var Io = () => new F({
|
|
3225
3225
|
key: Z,
|
|
3226
3226
|
state: {
|
|
3227
3227
|
init: ca,
|
|
@@ -3236,7 +3236,7 @@ var Io = () => new P({
|
|
|
3236
3236
|
props: { decorations: (e) => Z.getState(e)?.decorations }
|
|
3237
3237
|
}), Lo = () => {
|
|
3238
3238
|
let e;
|
|
3239
|
-
return new
|
|
3239
|
+
return new F({ props: { decorations(t) {
|
|
3240
3240
|
let n = Z.getState(t);
|
|
3241
3241
|
if (!n) return;
|
|
3242
3242
|
if (e?.state === n && e.doc === t.doc) return e.set;
|
|
@@ -3247,7 +3247,7 @@ var Io = () => new P({
|
|
|
3247
3247
|
set: r
|
|
3248
3248
|
}, r;
|
|
3249
3249
|
} } });
|
|
3250
|
-
}, Ro =
|
|
3250
|
+
}, Ro = R.create({
|
|
3251
3251
|
name: "nxgtFind",
|
|
3252
3252
|
addProseMirrorPlugins() {
|
|
3253
3253
|
return [Io(), Lo()];
|
|
@@ -3258,7 +3258,7 @@ var Io = () => new P({
|
|
|
3258
3258
|
findStep: (e) => ({ state: t, tr: n, dispatch: r }) => {
|
|
3259
3259
|
let { matches: i, current: a } = fa(t), o = ra(i.length, a, e), s = i[o];
|
|
3260
3260
|
if (!s) return !1;
|
|
3261
|
-
let c =
|
|
3261
|
+
let c = z.create(n.doc, s.from, s.to);
|
|
3262
3262
|
return r?.(n.setSelection(c).scrollIntoView().setMeta(Z, { current: o })), !0;
|
|
3263
3263
|
},
|
|
3264
3264
|
replaceCurrent: (e) => ({ editor: t, state: n, tr: r, dispatch: i }) => {
|
|
@@ -3267,7 +3267,7 @@ var Io = () => new P({
|
|
|
3267
3267
|
if (!s) return !1;
|
|
3268
3268
|
r.insertText(e, s.from, s.to);
|
|
3269
3269
|
let c = s.from + e.length;
|
|
3270
|
-
return r.setSelection(
|
|
3270
|
+
return r.setSelection(z.create(r.doc, c)).scrollIntoView(), i?.(r), !0;
|
|
3271
3271
|
},
|
|
3272
3272
|
replaceAll: (e) => ({ editor: t, state: n, tr: r, dispatch: i }) => {
|
|
3273
3273
|
if (!t.isEditable) return !1;
|
|
@@ -3309,8 +3309,8 @@ var Io = () => new P({
|
|
|
3309
3309
|
//#endregion
|
|
3310
3310
|
//#region lib/components/ui/widgets/editor/extensions/focus-mode/focus-mode-button.tsx
|
|
3311
3311
|
function Vo({ editor: e }) {
|
|
3312
|
-
let { t } =
|
|
3313
|
-
return /* @__PURE__ */ J(
|
|
3312
|
+
let { t } = M(), { chrome: n } = k(), r = n.state.focusMode;
|
|
3313
|
+
return /* @__PURE__ */ J(d, {
|
|
3314
3314
|
variant: r ? "filled" : "ghost",
|
|
3315
3315
|
"aria-pressed": r,
|
|
3316
3316
|
tooltip: t("material.editor.focus-mode", "Focus mode"),
|
|
@@ -3342,14 +3342,14 @@ var Ho = () => B({
|
|
|
3342
3342
|
//#endregion
|
|
3343
3343
|
//#region lib/components/ui/widgets/editor/extensions/marks/inline-code-button.tsx
|
|
3344
3344
|
function Uo({ editor: e }) {
|
|
3345
|
-
let { t } =
|
|
3345
|
+
let { t } = M(), n = P({
|
|
3346
3346
|
editor: e,
|
|
3347
3347
|
selector: (e) => ({
|
|
3348
3348
|
isCode: e.editor.isActive("code") ?? !1,
|
|
3349
3349
|
canCode: e.editor.can().chain().toggleCode().run() ?? !1
|
|
3350
3350
|
})
|
|
3351
3351
|
});
|
|
3352
|
-
return /* @__PURE__ */ J(
|
|
3352
|
+
return /* @__PURE__ */ J(d, {
|
|
3353
3353
|
variant: n.isCode ? "filled" : "ghost",
|
|
3354
3354
|
"aria-pressed": n.isCode,
|
|
3355
3355
|
tooltip: t("material.editor.code", "Inline code"),
|
|
@@ -3379,12 +3379,12 @@ var Wo = () => B({
|
|
|
3379
3379
|
}],
|
|
3380
3380
|
requires: ["marks"],
|
|
3381
3381
|
markdown: "native"
|
|
3382
|
-
}), Go =
|
|
3382
|
+
}), Go = R.create({
|
|
3383
3383
|
name: "markdownPaste",
|
|
3384
3384
|
addProseMirrorPlugins() {
|
|
3385
3385
|
let { editor: e } = this, t = !1;
|
|
3386
|
-
return [new
|
|
3387
|
-
key: new
|
|
3386
|
+
return [new F({
|
|
3387
|
+
key: new lt("markdownPaste"),
|
|
3388
3388
|
props: {
|
|
3389
3389
|
handleKeyDown: (e, n) => (t = n.shiftKey && (n.metaKey || n.ctrlKey) && n.key.toLowerCase() === "v", !1),
|
|
3390
3390
|
handleDOMEvents: { keyup: () => (t = !1, !1) },
|
|
@@ -3415,8 +3415,8 @@ var Wo = () => B({
|
|
|
3415
3415
|
//#endregion
|
|
3416
3416
|
//#region lib/components/ui/widgets/editor/extensions/outline/outline-button.tsx
|
|
3417
3417
|
function Jo({ editor: e }) {
|
|
3418
|
-
let { t } =
|
|
3419
|
-
return /* @__PURE__ */ J(
|
|
3418
|
+
let { t } = M(), { chrome: n } = k(), r = n.state.panel === "outline";
|
|
3419
|
+
return /* @__PURE__ */ J(d, {
|
|
3420
3420
|
variant: r ? "filled" : "ghost",
|
|
3421
3421
|
"aria-pressed": r,
|
|
3422
3422
|
tooltip: t("material.editor.outline", "Outline"),
|
|
@@ -3443,37 +3443,37 @@ var Yo = () => B({
|
|
|
3443
3443
|
//#endregion
|
|
3444
3444
|
//#region lib/components/ui/widgets/editor/extensions/upload/image-alt-button.tsx
|
|
3445
3445
|
function Xo({ editor: e }) {
|
|
3446
|
-
let { t } =
|
|
3446
|
+
let { t } = M(), n = P({
|
|
3447
3447
|
editor: e,
|
|
3448
3448
|
selector: (e) => e.editor.getAttributes("image").alt ?? ""
|
|
3449
|
-
}), [r, i] = G(""), [
|
|
3450
|
-
return /* @__PURE__ */ Y(
|
|
3451
|
-
open:
|
|
3449
|
+
}), [r, i] = G(""), [o, s] = G(!1), { trigger: c, onCloseAutoFocus: l } = le(), u = t("material.editor.upload.alt", "Alt text");
|
|
3450
|
+
return /* @__PURE__ */ Y(ve, {
|
|
3451
|
+
open: o,
|
|
3452
3452
|
onOpenChange: (e) => {
|
|
3453
|
-
|
|
3453
|
+
s(e), e && i(n);
|
|
3454
3454
|
},
|
|
3455
|
-
children: [/* @__PURE__ */ J(
|
|
3455
|
+
children: [/* @__PURE__ */ J(a, {
|
|
3456
3456
|
asChild: !0,
|
|
3457
|
-
ref:
|
|
3458
|
-
children: /* @__PURE__ */ J(
|
|
3457
|
+
ref: c,
|
|
3458
|
+
children: /* @__PURE__ */ J(d, {
|
|
3459
3459
|
variant: "ghost",
|
|
3460
|
-
tooltip:
|
|
3461
|
-
"aria-label":
|
|
3460
|
+
tooltip: u,
|
|
3461
|
+
"aria-label": u,
|
|
3462
3462
|
className: "rounded size-7",
|
|
3463
3463
|
more: { kind: "dialog" },
|
|
3464
3464
|
children: /* @__PURE__ */ J(gn, {})
|
|
3465
3465
|
})
|
|
3466
|
-
}), /* @__PURE__ */ Y(
|
|
3466
|
+
}), /* @__PURE__ */ Y(_e, {
|
|
3467
3467
|
className: "flex size-max flex-col gap-2 p-2",
|
|
3468
|
-
onCloseAutoFocus:
|
|
3469
|
-
children: [/* @__PURE__ */ J(
|
|
3468
|
+
onCloseAutoFocus: l,
|
|
3469
|
+
children: [/* @__PURE__ */ J(nt, {
|
|
3470
3470
|
value: r,
|
|
3471
3471
|
label: t("material.editor.upload.alt-label", "Describe the image"),
|
|
3472
3472
|
onChange: (e) => i(e.target.value)
|
|
3473
3473
|
}), /* @__PURE__ */ J(j, {
|
|
3474
3474
|
variant: "tonal",
|
|
3475
3475
|
onClick: () => {
|
|
3476
|
-
e.chain().focus().updateAttributes("image", { alt: r }).run(),
|
|
3476
|
+
e.chain().focus().updateAttributes("image", { alt: r }).run(), s(!1);
|
|
3477
3477
|
},
|
|
3478
3478
|
children: t("material.editor.upload.alt-apply", "Apply")
|
|
3479
3479
|
})]
|
|
@@ -3516,7 +3516,7 @@ function os() {
|
|
|
3516
3516
|
}
|
|
3517
3517
|
//#endregion
|
|
3518
3518
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widgets.ts
|
|
3519
|
-
var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) =>
|
|
3519
|
+
var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) => L.widget(e, () => {
|
|
3520
3520
|
let { element: e, destroy: n } = t.build(t.id);
|
|
3521
3521
|
return ss.set(e, n), e;
|
|
3522
3522
|
}, {
|
|
@@ -3530,9 +3530,9 @@ var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) => I.widget(e, () => {
|
|
|
3530
3530
|
destroy: (e) => ss.get(e)?.()
|
|
3531
3531
|
}), ls = {
|
|
3532
3532
|
cards: [],
|
|
3533
|
-
decorations:
|
|
3533
|
+
decorations: I.empty,
|
|
3534
3534
|
orphaned: []
|
|
3535
|
-
}, us = (e, t) => t.length ?
|
|
3535
|
+
}, us = (e, t) => t.length ? I.create(e, t.map((e) => cs(e.pos, e))) : I.empty, ds = (e) => e.steps.some((t, n) => t instanceof st && t.from === 0 && t.to === e.docs[n].content.size), fs = (e) => {
|
|
3536
3536
|
let t = !1;
|
|
3537
3537
|
return e.content.descendants((e) => ((e.isText || e.isLeaf) && (t = !0), !t)), t;
|
|
3538
3538
|
};
|
|
@@ -3624,12 +3624,12 @@ function _s(e, t) {
|
|
|
3624
3624
|
}
|
|
3625
3625
|
function vs(e, t) {
|
|
3626
3626
|
if (e.isDestroyed) return;
|
|
3627
|
-
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i =
|
|
3627
|
+
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i = ct.findFrom(r, 1, !0) ?? ct.findFrom(r, -1, !0) ?? ct.near(r, -1);
|
|
3628
3628
|
e.view.dispatch(e.state.tr.setSelection(i)), e.commands.focus();
|
|
3629
3629
|
}
|
|
3630
3630
|
//#endregion
|
|
3631
3631
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-plugin.ts
|
|
3632
|
-
var $ = new
|
|
3632
|
+
var $ = new lt("upload");
|
|
3633
3633
|
function ys(e, t) {
|
|
3634
3634
|
let n = e.doc.resolve(Math.min(t ?? e.selection.to, e.doc.content.size)), r = n.parent;
|
|
3635
3635
|
return !r.isTextblock || n.depth === 0 ? {
|
|
@@ -3654,7 +3654,7 @@ var bs = (e, t) => {
|
|
|
3654
3654
|
end: t
|
|
3655
3655
|
} });
|
|
3656
3656
|
function ws({ onFiles: e, onOrphans: t }) {
|
|
3657
|
-
return new
|
|
3657
|
+
return new F({
|
|
3658
3658
|
key: $,
|
|
3659
3659
|
state: {
|
|
3660
3660
|
init: () => ls,
|
|
@@ -3746,7 +3746,7 @@ function Fs(e, t, n, r) {
|
|
|
3746
3746
|
if (!a) return;
|
|
3747
3747
|
let o = _s(e, t), s = a.from;
|
|
3748
3748
|
try {
|
|
3749
|
-
let o = e.schema.nodeFromJSON(Ns(e, n, r)), c = i.doc.nodeAt(a.from), l = a.spec.replaceEmpty && Ps(c), u = l ? a.from :
|
|
3749
|
+
let o = e.schema.nodeFromJSON(Ns(e, n, r)), c = i.doc.nodeAt(a.from), l = a.spec.replaceEmpty && Ps(c), u = l ? a.from : ot(i.doc, a.from, o.type) ?? ms(i.doc, a.from), d = l ? u + (c?.nodeSize ?? 0) : u, f = i.tr.replaceWith(u, d, o);
|
|
3750
3750
|
s = f.mapping.map(d, 1), e.view.dispatch(f.setMeta($, Cs(t, s)));
|
|
3751
3751
|
} catch {
|
|
3752
3752
|
e.view.dispatch(i.tr.setMeta($, Ss(t)));
|
|
@@ -3771,7 +3771,7 @@ function Ls({ accept: e, multiple: t, label: n }, r) {
|
|
|
3771
3771
|
//#endregion
|
|
3772
3772
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-actions.tsx
|
|
3773
3773
|
function Rs({ id: e, name: t, failed: n, retryable: r, storage: i }) {
|
|
3774
|
-
let { t: a } =
|
|
3774
|
+
let { t: a } = M(), o = n ? a("material.editor.upload.remove", "Remove {name}", { name: t }) : a("material.editor.upload.cancel", "Cancel upload of {name}", { name: t });
|
|
3775
3775
|
return /* @__PURE__ */ Y("div", {
|
|
3776
3776
|
className: "ms-auto flex shrink-0 items-center gap-1",
|
|
3777
3777
|
children: [n && r && /* @__PURE__ */ Y(j, {
|
|
@@ -3779,7 +3779,7 @@ function Rs({ id: e, name: t, failed: n, retryable: r, storage: i }) {
|
|
|
3779
3779
|
size: "sm",
|
|
3780
3780
|
onClick: () => i.retry(e),
|
|
3781
3781
|
children: [/* @__PURE__ */ J(ln, {}), a("material.editor.upload.retry", "Retry")]
|
|
3782
|
-
}), /* @__PURE__ */ J(
|
|
3782
|
+
}), /* @__PURE__ */ J(N, {
|
|
3783
3783
|
variant: "ghost",
|
|
3784
3784
|
tooltip: o,
|
|
3785
3785
|
"aria-label": o,
|
|
@@ -3800,7 +3800,7 @@ function zs({ previewUrl: e, busy: n }) {
|
|
|
3800
3800
|
}) : /* @__PURE__ */ J(Wt, {
|
|
3801
3801
|
"aria-hidden": "true",
|
|
3802
3802
|
className: "size-5"
|
|
3803
|
-
}), n && /* @__PURE__ */ J(
|
|
3803
|
+
}), n && /* @__PURE__ */ J(Ee, {
|
|
3804
3804
|
"aria-hidden": "true",
|
|
3805
3805
|
"aria-label": void 0,
|
|
3806
3806
|
contained: !0,
|
|
@@ -3819,7 +3819,7 @@ function Bs(e, t, n) {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
}
|
|
3821
3821
|
function Vs({ id: e, storage: n, maxSize: r }) {
|
|
3822
|
-
let { t: i } =
|
|
3822
|
+
let { t: i } = M(), { queue: a } = n, o = K(a.subscribe, () => a.get(e), () => void 0);
|
|
3823
3823
|
if (!o) return null;
|
|
3824
3824
|
let s = o.file.name, c = o.status === "error";
|
|
3825
3825
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -3844,7 +3844,7 @@ function Vs({ id: e, storage: n, maxSize: r }) {
|
|
|
3844
3844
|
role: "alert",
|
|
3845
3845
|
className: "text-xs text-error-text",
|
|
3846
3846
|
children: Bs(i, o.failure, r)
|
|
3847
|
-
}) : /* @__PURE__ */ J(
|
|
3847
|
+
}) : /* @__PURE__ */ J(T, {
|
|
3848
3848
|
value: o.progress === void 0 ? null : o.progress * 100,
|
|
3849
3849
|
"aria-label": i("material.editor.upload.uploading", "Uploading {name}", { name: s }),
|
|
3850
3850
|
className: "mt-1.5"
|
|
@@ -3863,7 +3863,7 @@ function Vs({ id: e, storage: n, maxSize: r }) {
|
|
|
3863
3863
|
//#endregion
|
|
3864
3864
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widget.tsx
|
|
3865
3865
|
function Hs(e, t, n, r) {
|
|
3866
|
-
let i = new
|
|
3866
|
+
let i = new $e(Vs, {
|
|
3867
3867
|
editor: e,
|
|
3868
3868
|
props: {
|
|
3869
3869
|
id: r,
|
|
@@ -4059,7 +4059,7 @@ function Zs(e) {
|
|
|
4059
4059
|
}
|
|
4060
4060
|
//#endregion
|
|
4061
4061
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-extension.ts
|
|
4062
|
-
var Qs = /* @__PURE__ */ new WeakMap(), $s =
|
|
4062
|
+
var Qs = /* @__PURE__ */ new WeakMap(), $s = R.create({
|
|
4063
4063
|
name: "upload",
|
|
4064
4064
|
addStorage: () => ({}),
|
|
4065
4065
|
onBeforeCreate() {
|
|
@@ -4118,18 +4118,18 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = L.create({
|
|
|
4118
4118
|
order: 61,
|
|
4119
4119
|
priority: 30,
|
|
4120
4120
|
kind: "panel",
|
|
4121
|
-
when: (e) => !!
|
|
4122
|
-
render:
|
|
4121
|
+
when: (e) => !!v(e)?.ownsImage,
|
|
4122
|
+
render: ae
|
|
4123
4123
|
}],
|
|
4124
4124
|
bubble: [{
|
|
4125
4125
|
id: "image-alt",
|
|
4126
4126
|
order: 35,
|
|
4127
4127
|
priority: 60,
|
|
4128
4128
|
kind: "panel",
|
|
4129
|
-
when: (e) => !!
|
|
4129
|
+
when: (e) => !!v(e) && e.isActive("image"),
|
|
4130
4130
|
render: Xo
|
|
4131
4131
|
}],
|
|
4132
|
-
slash:
|
|
4132
|
+
slash: f("image"),
|
|
4133
4133
|
markdown: "native"
|
|
4134
4134
|
} : {
|
|
4135
4135
|
name: "upload",
|
|
@@ -4137,91 +4137,91 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = L.create({
|
|
|
4137
4137
|
markdown: "native"
|
|
4138
4138
|
});
|
|
4139
4139
|
}, tc = {
|
|
4140
|
-
accordion:
|
|
4141
|
-
actionCard:
|
|
4140
|
+
accordion: x,
|
|
4141
|
+
actionCard: Se,
|
|
4142
4142
|
assistant: fo,
|
|
4143
|
-
blocks:
|
|
4144
|
-
callout:
|
|
4145
|
-
checkboxGroup:
|
|
4146
|
-
codeBlock:
|
|
4147
|
-
color:
|
|
4143
|
+
blocks: C,
|
|
4144
|
+
callout: s,
|
|
4145
|
+
checkboxGroup: te,
|
|
4146
|
+
codeBlock: Le,
|
|
4147
|
+
color: Ne,
|
|
4148
4148
|
comments: Mo,
|
|
4149
|
-
count:
|
|
4149
|
+
count: ue,
|
|
4150
4150
|
dragHandle: Po,
|
|
4151
|
-
emoji:
|
|
4151
|
+
emoji: pe,
|
|
4152
4152
|
find: Bo,
|
|
4153
4153
|
focusMode: Ho,
|
|
4154
|
-
fontFamily:
|
|
4155
|
-
gallery:
|
|
4156
|
-
headings:
|
|
4157
|
-
highlight:
|
|
4158
|
-
image:
|
|
4154
|
+
fontFamily: je,
|
|
4155
|
+
gallery: he,
|
|
4156
|
+
headings: n,
|
|
4157
|
+
highlight: ee,
|
|
4158
|
+
image: oe,
|
|
4159
4159
|
inlineCode: Wo,
|
|
4160
|
-
link:
|
|
4161
|
-
lists:
|
|
4160
|
+
link: p,
|
|
4161
|
+
lists: De,
|
|
4162
4162
|
markdownPaste: qo,
|
|
4163
|
-
marks:
|
|
4164
|
-
mention:
|
|
4163
|
+
marks: re,
|
|
4164
|
+
mention: Re,
|
|
4165
4165
|
outline: Yo,
|
|
4166
|
-
placeholder:
|
|
4166
|
+
placeholder: E,
|
|
4167
4167
|
radioGroup: b,
|
|
4168
4168
|
selectCard: y,
|
|
4169
4169
|
selectChip: be,
|
|
4170
|
-
slash:
|
|
4170
|
+
slash: r,
|
|
4171
4171
|
table: xe,
|
|
4172
|
-
textAlign:
|
|
4172
|
+
textAlign: S,
|
|
4173
4173
|
upload: ec,
|
|
4174
4174
|
youtube: o
|
|
4175
4175
|
}, nc = (...e) => (t) => [...t, ...e], rc = (...e) => (t) => t.filter((t) => !e.includes(t.key ?? t.name)), ic = () => [
|
|
4176
|
-
|
|
4176
|
+
Se(),
|
|
4177
4177
|
be(),
|
|
4178
4178
|
y(),
|
|
4179
|
-
|
|
4179
|
+
te(),
|
|
4180
4180
|
b()
|
|
4181
4181
|
], ac = () => [
|
|
4182
|
-
|
|
4183
|
-
a(),
|
|
4184
|
-
ae(),
|
|
4185
|
-
n(),
|
|
4186
|
-
we(),
|
|
4187
|
-
Oe(),
|
|
4188
|
-
Re(),
|
|
4189
|
-
se(),
|
|
4190
|
-
pe(),
|
|
4191
|
-
ie(),
|
|
4192
|
-
g(),
|
|
4182
|
+
s(),
|
|
4193
4183
|
x(),
|
|
4184
|
+
he(),
|
|
4185
|
+
r(),
|
|
4186
|
+
Ne(),
|
|
4187
|
+
je(),
|
|
4188
|
+
re(),
|
|
4189
|
+
n(),
|
|
4194
4190
|
C(),
|
|
4195
|
-
Ee(),
|
|
4196
|
-
qo(),
|
|
4197
|
-
ne(),
|
|
4198
4191
|
p(),
|
|
4192
|
+
ee(),
|
|
4193
|
+
S(),
|
|
4194
|
+
E(),
|
|
4195
|
+
ue(),
|
|
4196
|
+
qo(),
|
|
4197
|
+
De(),
|
|
4198
|
+
oe(),
|
|
4199
4199
|
ec(),
|
|
4200
4200
|
o(),
|
|
4201
|
-
|
|
4201
|
+
pe({ suggest: !0 }),
|
|
4202
4202
|
xe(),
|
|
4203
|
-
|
|
4203
|
+
Le(),
|
|
4204
4204
|
Bo(),
|
|
4205
4205
|
Ho(),
|
|
4206
4206
|
Po(),
|
|
4207
4207
|
Mo()
|
|
4208
4208
|
], oc = () => [
|
|
4209
|
-
|
|
4209
|
+
re({ compact: !0 }),
|
|
4210
4210
|
Wo(),
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4211
|
+
p(),
|
|
4212
|
+
E(),
|
|
4213
|
+
ue(),
|
|
4214
4214
|
qo(),
|
|
4215
|
-
|
|
4215
|
+
De(),
|
|
4216
4216
|
ec()
|
|
4217
4217
|
], sc = () => [
|
|
4218
|
-
|
|
4218
|
+
re({ compact: !0 }),
|
|
4219
4219
|
Wo(),
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4220
|
+
p(),
|
|
4221
|
+
E(),
|
|
4222
|
+
ue(),
|
|
4223
|
+
pe({ suggest: !0 }),
|
|
4224
|
+
Re()
|
|
4225
4225
|
];
|
|
4226
4226
|
//#endregion
|
|
4227
4227
|
//#region lib/components/ui/widgets/editor/extensions/assistant/use-assistant-feature.ts
|
|
@@ -4239,7 +4239,7 @@ function cc(e, t) {
|
|
|
4239
4239
|
//#endregion
|
|
4240
4240
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-signal.tsx
|
|
4241
4241
|
function lc({ onChange: e }) {
|
|
4242
|
-
let { handle: t } =
|
|
4242
|
+
let { handle: t } = k(), n = La(t).pending > 0, r = W(e), i = W(!1);
|
|
4243
4243
|
return H(() => {
|
|
4244
4244
|
r.current = e;
|
|
4245
4245
|
}, [e]), H(() => {
|
|
@@ -4276,7 +4276,7 @@ function dc(e, t) {
|
|
|
4276
4276
|
//#endregion
|
|
4277
4277
|
//#region lib/components/ui/widgets/editor/partials/editor-character-count.tsx
|
|
4278
4278
|
function fc({ className: e }) {
|
|
4279
|
-
let { t: n } =
|
|
4279
|
+
let { t: n } = M(), { handle: r } = k(), i = P({
|
|
4280
4280
|
editor: r.editor,
|
|
4281
4281
|
selector: ({ editor: e }) => {
|
|
4282
4282
|
let t = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -4319,10 +4319,9 @@ function pc(e, t) {
|
|
|
4319
4319
|
}, [e, t]), n;
|
|
4320
4320
|
}
|
|
4321
4321
|
//#endregion
|
|
4322
|
-
//#region lib/components/ui/widgets/editor/presets/
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
let { t: r } = A();
|
|
4322
|
+
//#region lib/components/ui/widgets/editor/presets/document-editor-frame-parts.tsx
|
|
4323
|
+
function mc({ side: e, children: n }) {
|
|
4324
|
+
let { t: r } = M();
|
|
4326
4325
|
return /* @__PURE__ */ J("aside", {
|
|
4327
4326
|
"aria-label": r("material.editor.outline-region", "Document outline"),
|
|
4328
4327
|
"data-slot": "document-editor-rail",
|
|
@@ -4334,53 +4333,70 @@ function xc({ side: e, children: n }) {
|
|
|
4334
4333
|
})
|
|
4335
4334
|
});
|
|
4336
4335
|
}
|
|
4337
|
-
function
|
|
4338
|
-
|
|
4336
|
+
function hc(e, n, r) {
|
|
4337
|
+
return t("@container relative overflow-clip border bg-card text-card-foreground shadow-xs", e === "expressive" ? "rounded-(--nxgt-shape-corner-xl)" : "rounded-[20px]", "transition-colors duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none focus-within:border-primary/60 dark:focus-within:border-primary-indicator", n && "flex flex-col", r);
|
|
4338
|
+
}
|
|
4339
|
+
function gc({ presence: e, panels: t, children: n }) {
|
|
4340
|
+
return /* @__PURE__ */ Y("div", {
|
|
4341
|
+
"data-slot": "document-editor-toolbar",
|
|
4342
|
+
className: "sticky top-0 z-10 grid gap-2 border-b bg-card/95 px-3 py-2 backdrop-blur empty:hidden",
|
|
4343
|
+
children: [
|
|
4344
|
+
e && /* @__PURE__ */ J("div", {
|
|
4345
|
+
className: "flex justify-end empty:hidden",
|
|
4346
|
+
children: e
|
|
4347
|
+
}),
|
|
4348
|
+
n,
|
|
4349
|
+
t
|
|
4350
|
+
]
|
|
4351
|
+
});
|
|
4352
|
+
}
|
|
4353
|
+
function _c({ children: e }) {
|
|
4354
|
+
let { t } = M();
|
|
4355
|
+
return /* @__PURE__ */ J("aside", {
|
|
4356
|
+
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4357
|
+
"data-slot": "document-editor-comments",
|
|
4358
|
+
className: "w-72 shrink-0 border-s bg-muted/20 p-3",
|
|
4359
|
+
children: e
|
|
4360
|
+
});
|
|
4361
|
+
}
|
|
4362
|
+
//#endregion
|
|
4363
|
+
//#region lib/components/ui/widgets/editor/presets/toolbar-looks.ts
|
|
4364
|
+
var vc = t("[&_button[aria-pressed=true]]:rounded-full [&_button[data-variant=filled]]:rounded-full", "[&_button[aria-pressed=true]]:bg-(--tb-on) [&_button[data-variant=filled]]:bg-(--tb-on)", "[&_button[aria-pressed=true]]:text-(--tb-on-fg) [&_button[data-variant=filled]]:text-(--tb-on-fg)", "[&_button[aria-pressed=true]_svg]:stroke-(--tb-on-fg) [&_button[data-variant=filled]_svg]:stroke-(--tb-on-fg)", "[&_button[aria-pressed=true]_svg]:text-(--tb-on-fg) [&_button[data-variant=filled]_svg]:text-(--tb-on-fg)", "[&_button[aria-pressed=true]_svg]:stroke-[2.6] [&_button[data-variant=filled]_svg]:stroke-[2.6]"), yc = t("[&_button[data-toolbar-fit][data-variant=filled]:not([aria-pressed])]:bg-(--tb-on)", "[&_button[data-toolbar-fit][data-variant=filled]:not([aria-pressed])]:text-(--tb-on-fg)"), bc = t("gap-x-2 gap-y-1.5", "**:data-group-id:gap-0 **:data-group-id:rounded-xl", "**:data-group-id:bg-muted/60 **:data-group-id:p-0.5", "[&_button[data-variant]]:rounded-md", vc, yc), xc = t("items-center gap-1 **:data-group-id:gap-1", "[--tb-item:2.25rem] [&_button[data-variant]]:rounded-full [&_[data-toolbar-more]]:rounded-full", vc, yc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), Sc = t(bc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), Cc = t(bc, "**:data-[group=outline]:@4xl:hidden", "**:data-[group=comments]:@5xl:hidden"), wc = 56;
|
|
4365
|
+
function Tc({ toolbar: e, bar: n, panels: r, footer: i, outline: a, comments: o, presence: s, outlineSide: c = "start", className: l, children: u }) {
|
|
4366
|
+
let { chrome: d, handle: f, look: p } = k(), m = f.features.some((e) => e.key === "dragHandle"), h = d.state.focusMode, g = W(null), _ = pc(g, wc), v = a && !h && _, y = pc(g, 64), b = o && !h && y;
|
|
4339
4367
|
return /* @__PURE__ */ Y("div", {
|
|
4340
|
-
ref:
|
|
4368
|
+
ref: g,
|
|
4341
4369
|
"data-slot": "document-editor",
|
|
4342
|
-
"data-look":
|
|
4370
|
+
"data-look": p,
|
|
4343
4371
|
"data-layout": "docked",
|
|
4344
|
-
className:
|
|
4372
|
+
className: hc(p, !!n, l),
|
|
4345
4373
|
children: [
|
|
4346
|
-
/* @__PURE__ */
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
children:
|
|
4350
|
-
s && /* @__PURE__ */ J("div", {
|
|
4351
|
-
className: "flex justify-end empty:hidden",
|
|
4352
|
-
children: s
|
|
4353
|
-
}),
|
|
4354
|
-
!g && e,
|
|
4355
|
-
r
|
|
4356
|
-
]
|
|
4374
|
+
/* @__PURE__ */ J(gc, {
|
|
4375
|
+
presence: s,
|
|
4376
|
+
panels: r,
|
|
4377
|
+
children: !h && e
|
|
4357
4378
|
}),
|
|
4358
4379
|
/* @__PURE__ */ J(va, { className: "absolute end-3 top-3 z-20" }),
|
|
4359
|
-
!
|
|
4380
|
+
!h && n,
|
|
4360
4381
|
/* @__PURE__ */ Y("div", {
|
|
4361
4382
|
className: "flex",
|
|
4362
4383
|
children: [
|
|
4363
|
-
|
|
4384
|
+
v && c === "start" && /* @__PURE__ */ J(mc, {
|
|
4364
4385
|
side: "start",
|
|
4365
4386
|
children: a
|
|
4366
4387
|
}),
|
|
4367
4388
|
/* @__PURE__ */ J("div", {
|
|
4368
|
-
className: t("min-w-0 flex-1 px-5 py-6 @xl:px-10 @xl:py-10",
|
|
4389
|
+
className: t("min-w-0 flex-1 px-5 py-6 @xl:px-10 @xl:py-10", m && "@xl:pointer-fine:ps-16"),
|
|
4369
4390
|
children: /* @__PURE__ */ J("div", {
|
|
4370
4391
|
className: "mx-auto w-full max-w-[680px]",
|
|
4371
4392
|
children: u
|
|
4372
4393
|
})
|
|
4373
4394
|
}),
|
|
4374
|
-
|
|
4395
|
+
v && c === "end" && /* @__PURE__ */ J(mc, {
|
|
4375
4396
|
side: "end",
|
|
4376
4397
|
children: a
|
|
4377
4398
|
}),
|
|
4378
|
-
|
|
4379
|
-
"aria-label": d("material.editor.comments.title", "Comments"),
|
|
4380
|
-
"data-slot": "document-editor-comments",
|
|
4381
|
-
className: "w-72 shrink-0 border-s bg-muted/20 p-3",
|
|
4382
|
-
children: o
|
|
4383
|
-
})
|
|
4399
|
+
b && /* @__PURE__ */ J(_c, { children: o })
|
|
4384
4400
|
]
|
|
4385
4401
|
}),
|
|
4386
4402
|
i && /* @__PURE__ */ J("div", {
|
|
@@ -4391,11 +4407,57 @@ function Sc({ toolbar: e, bar: n, panels: r, footer: i, outline: a, comments: o,
|
|
|
4391
4407
|
});
|
|
4392
4408
|
}
|
|
4393
4409
|
//#endregion
|
|
4410
|
+
//#region lib/components/ui/widgets/editor/presets/toolbar-looks-expressive.ts
|
|
4411
|
+
var Ec = "**:data-[group=outline]:@4xl:hidden", Dc = "**:data-[group=outline]:@6xl:hidden", Oc = "**:data-[group=comments]:@5xl:hidden", kc = t(Ec, Oc), Ac = t(Dc, Oc), jc = t("items-center", Dc, Oc);
|
|
4412
|
+
function Mc(e, t) {
|
|
4413
|
+
return e === "expressive" ? kc : t;
|
|
4414
|
+
}
|
|
4415
|
+
function Nc(e) {
|
|
4416
|
+
return e === "expressive" ? {
|
|
4417
|
+
docked: Ac,
|
|
4418
|
+
rail: jc
|
|
4419
|
+
} : {
|
|
4420
|
+
docked: Sc,
|
|
4421
|
+
rail: xc
|
|
4422
|
+
};
|
|
4423
|
+
}
|
|
4424
|
+
function Pc(e, n) {
|
|
4425
|
+
return e === "expressive" ? "rounded-[20px]" : t("rounded-xl shadow-xs", "focus-within:border-primary/60 dark:focus-within:border-primary-indicator focus-within:ring-[3px] focus-within:ring-primary/15", n && "border-error");
|
|
4426
|
+
}
|
|
4427
|
+
function Fc(e) {
|
|
4428
|
+
return e === "expressive" ? "" : "border-b bg-muted/30 px-2 py-1.5";
|
|
4429
|
+
}
|
|
4430
|
+
//#endregion
|
|
4431
|
+
//#region lib/components/ui/widgets/editor/presets/compact-editor-parts.tsx
|
|
4432
|
+
function Ic({ look: e }) {
|
|
4433
|
+
return /* @__PURE__ */ J("div", {
|
|
4434
|
+
"data-slot": "compact-editor-toolbar",
|
|
4435
|
+
"data-look": e,
|
|
4436
|
+
className: Fc(e),
|
|
4437
|
+
children: /* @__PURE__ */ J(O, {
|
|
4438
|
+
dividers: !1,
|
|
4439
|
+
density: "compact",
|
|
4440
|
+
className: Mc(e, Cc)
|
|
4441
|
+
})
|
|
4442
|
+
});
|
|
4443
|
+
}
|
|
4444
|
+
function Lc({ actions: e }) {
|
|
4445
|
+
return /* @__PURE__ */ Y("div", {
|
|
4446
|
+
"data-slot": "compact-editor-footer",
|
|
4447
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-2 border-t px-3 py-2",
|
|
4448
|
+
children: [/* @__PURE__ */ J(fc, {}), e && /* @__PURE__ */ J("div", {
|
|
4449
|
+
"data-slot": "editor-actions",
|
|
4450
|
+
className: "ms-auto flex items-center gap-2",
|
|
4451
|
+
children: e
|
|
4452
|
+
})]
|
|
4453
|
+
});
|
|
4454
|
+
}
|
|
4455
|
+
//#endregion
|
|
4394
4456
|
//#region lib/components/ui/widgets/editor/presets/preset-features.ts
|
|
4395
|
-
var
|
|
4396
|
-
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t,
|
|
4457
|
+
var Rc = (e) => (t) => {
|
|
4458
|
+
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t, Re()] : t);
|
|
4397
4459
|
return [...i && !o.some((e) => e.key === "outline") ? [...o, Yo()] : o, ...a.filter((e) => !!e)];
|
|
4398
|
-
},
|
|
4460
|
+
}, zc = [
|
|
4399
4461
|
"min-h-[1lh]",
|
|
4400
4462
|
"min-h-[2lh]",
|
|
4401
4463
|
"min-h-[3lh]",
|
|
@@ -4404,7 +4466,7 @@ var Cc = (e) => (t) => {
|
|
|
4404
4466
|
"min-h-[6lh]",
|
|
4405
4467
|
"min-h-[8lh]",
|
|
4406
4468
|
"min-h-[10lh]"
|
|
4407
|
-
],
|
|
4469
|
+
], Bc = [
|
|
4408
4470
|
"max-h-[1lh]",
|
|
4409
4471
|
"max-h-[2lh]",
|
|
4410
4472
|
"max-h-[3lh]",
|
|
@@ -4415,7 +4477,7 @@ var Cc = (e) => (t) => {
|
|
|
4415
4477
|
"max-h-[10lh]",
|
|
4416
4478
|
"max-h-[12lh]",
|
|
4417
4479
|
"max-h-[16lh]"
|
|
4418
|
-
],
|
|
4480
|
+
], Vc = [
|
|
4419
4481
|
1,
|
|
4420
4482
|
2,
|
|
4421
4483
|
3,
|
|
@@ -4424,7 +4486,7 @@ var Cc = (e) => (t) => {
|
|
|
4424
4486
|
6,
|
|
4425
4487
|
8,
|
|
4426
4488
|
10
|
|
4427
|
-
],
|
|
4489
|
+
], Hc = [
|
|
4428
4490
|
1,
|
|
4429
4491
|
2,
|
|
4430
4492
|
3,
|
|
@@ -4435,80 +4497,50 @@ var Cc = (e) => (t) => {
|
|
|
4435
4497
|
10,
|
|
4436
4498
|
12,
|
|
4437
4499
|
16
|
|
4438
|
-
],
|
|
4500
|
+
], Uc = (e, t) => {
|
|
4439
4501
|
let n = 0;
|
|
4440
4502
|
return e.forEach((e, r) => {
|
|
4441
4503
|
e <= t && (n = r);
|
|
4442
4504
|
}), n;
|
|
4443
4505
|
};
|
|
4444
|
-
function
|
|
4445
|
-
let n =
|
|
4446
|
-
return `${
|
|
4447
|
-
}
|
|
4448
|
-
//#endregion
|
|
4449
|
-
//#region lib/components/ui/widgets/editor/presets/toolbar-looks-expressive.ts
|
|
4450
|
-
var Ac = "**:data-[group=outline]:@4xl:hidden", jc = "**:data-[group=outline]:@6xl:hidden", Mc = "**:data-[group=comments]:@5xl:hidden", Nc = t(Ac, Mc), Pc = t(jc, Mc), Fc = t("items-center", jc, Mc);
|
|
4451
|
-
function Ic(e, t) {
|
|
4452
|
-
return e === "expressive" ? Nc : t;
|
|
4453
|
-
}
|
|
4454
|
-
function Lc(e) {
|
|
4455
|
-
return e === "expressive" ? {
|
|
4456
|
-
docked: Pc,
|
|
4457
|
-
rail: Fc
|
|
4458
|
-
} : {
|
|
4459
|
-
docked: vc,
|
|
4460
|
-
rail: _c
|
|
4461
|
-
};
|
|
4462
|
-
}
|
|
4463
|
-
function Rc(e, n) {
|
|
4464
|
-
return e === "expressive" ? "rounded-[20px]" : t("rounded-xl shadow-xs", "focus-within:border-primary/60 dark:focus-within:border-primary-indicator focus-within:ring-[3px] focus-within:ring-primary/15", n && "border-error");
|
|
4465
|
-
}
|
|
4466
|
-
function zc(e) {
|
|
4467
|
-
return e === "expressive" ? "" : "border-b bg-muted/30 px-2 py-1.5";
|
|
4506
|
+
function Wc(e = 2, t = 8) {
|
|
4507
|
+
let n = Uc(Vc, e), r = Vc[n] ?? 1, i = Uc(Hc, Math.max(t, r));
|
|
4508
|
+
return `${zc[n]} ${Bc[i]} overflow-y-auto`;
|
|
4468
4509
|
}
|
|
4469
4510
|
//#endregion
|
|
4470
4511
|
//#region lib/components/ui/widgets/editor/presets/compact-editor.tsx
|
|
4471
|
-
function
|
|
4472
|
-
let { t: S } =
|
|
4473
|
-
return /* @__PURE__ */ Y(
|
|
4512
|
+
function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: a = !0, look: o = "expressive", actions: s, onUpload: l, uploadOptions: u, onUploadingChange: d, onAssist: f, assistOptions: p, label: m, helperText: h, error: g, required: v, className: y, attributes: b, ...x }) {
|
|
4513
|
+
let { t: S } = M(), C = U(oc, []), w = uc(l, u), ee = cc(f, p), T = !!s || !!x.characterLimit;
|
|
4514
|
+
return /* @__PURE__ */ Y(_, {
|
|
4474
4515
|
...x,
|
|
4475
4516
|
look: o,
|
|
4476
|
-
features:
|
|
4517
|
+
features: Rc({
|
|
4477
4518
|
features: e,
|
|
4478
4519
|
mentions: x.mentions,
|
|
4479
|
-
extra: [
|
|
4520
|
+
extra: [w, ee]
|
|
4480
4521
|
}),
|
|
4481
4522
|
defaults: C,
|
|
4482
4523
|
attributes: {
|
|
4483
|
-
class: t("nxgt-prose text-[0.9375rem] leading-relaxed focus:outline-none",
|
|
4524
|
+
class: t("nxgt-prose text-[0.9375rem] leading-relaxed focus:outline-none", Wc(n, r)),
|
|
4484
4525
|
"aria-label": S("material.editor.comment", "Comment"),
|
|
4485
4526
|
...b
|
|
4486
4527
|
},
|
|
4487
4528
|
children: [
|
|
4488
|
-
/* @__PURE__ */ J(
|
|
4529
|
+
/* @__PURE__ */ J(Pe, {
|
|
4489
4530
|
label: m,
|
|
4490
|
-
helperText:
|
|
4491
|
-
error:
|
|
4531
|
+
helperText: h,
|
|
4532
|
+
error: g,
|
|
4492
4533
|
required: v,
|
|
4493
4534
|
className: y,
|
|
4494
4535
|
children: /* @__PURE__ */ Y("div", {
|
|
4495
4536
|
"data-slot": "compact-editor",
|
|
4496
|
-
"data-invalid":
|
|
4537
|
+
"data-invalid": g || void 0,
|
|
4497
4538
|
"data-look": o,
|
|
4498
|
-
className: t("overflow-clip border bg-card text-card-foreground transition-colors duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none",
|
|
4539
|
+
className: t("overflow-clip border bg-card text-card-foreground transition-colors duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none", Pc(o, g)),
|
|
4499
4540
|
children: [
|
|
4500
|
-
a && /* @__PURE__ */ J(
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
className: zc(o),
|
|
4504
|
-
children: /* @__PURE__ */ J(T, {
|
|
4505
|
-
dividers: !1,
|
|
4506
|
-
density: "compact",
|
|
4507
|
-
className: Ic(o, yc)
|
|
4508
|
-
})
|
|
4509
|
-
}),
|
|
4510
|
-
/* @__PURE__ */ J(E, { className: "px-3 py-2.5" }),
|
|
4511
|
-
D && /* @__PURE__ */ J(Vc, { actions: s })
|
|
4541
|
+
a && /* @__PURE__ */ J(Ic, { look: o }),
|
|
4542
|
+
/* @__PURE__ */ J(ne, { className: "px-3 py-2.5" }),
|
|
4543
|
+
T && /* @__PURE__ */ J(Lc, { actions: s })
|
|
4512
4544
|
]
|
|
4513
4545
|
})
|
|
4514
4546
|
}),
|
|
@@ -4519,30 +4551,19 @@ function Bc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: a = !0, look
|
|
|
4519
4551
|
]
|
|
4520
4552
|
});
|
|
4521
4553
|
}
|
|
4522
|
-
function Vc({ actions: e }) {
|
|
4523
|
-
return /* @__PURE__ */ Y("div", {
|
|
4524
|
-
"data-slot": "compact-editor-footer",
|
|
4525
|
-
className: "flex flex-wrap items-center gap-x-3 gap-y-2 border-t px-3 py-2",
|
|
4526
|
-
children: [/* @__PURE__ */ J(fc, {}), e && /* @__PURE__ */ J("div", {
|
|
4527
|
-
"data-slot": "editor-actions",
|
|
4528
|
-
className: "ms-auto flex items-center gap-2",
|
|
4529
|
-
children: e
|
|
4530
|
-
})]
|
|
4531
|
-
});
|
|
4532
|
-
}
|
|
4533
4554
|
//#endregion
|
|
4534
4555
|
//#region lib/components/ui/widgets/editor/presets/compact-editor-form-field.tsx
|
|
4535
|
-
function
|
|
4536
|
-
return /* @__PURE__ */ J(
|
|
4556
|
+
function Kc({ control: e, name: n, ...r }) {
|
|
4557
|
+
return /* @__PURE__ */ J(Ze, {
|
|
4537
4558
|
control: e,
|
|
4538
4559
|
name: n,
|
|
4539
|
-
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(
|
|
4560
|
+
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(Qe, {
|
|
4540
4561
|
onBlur: e.onBlur,
|
|
4541
4562
|
focusRef: e.ref,
|
|
4542
|
-
children: /* @__PURE__ */ J(
|
|
4563
|
+
children: /* @__PURE__ */ J(Gc, {
|
|
4543
4564
|
...r,
|
|
4544
4565
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
4545
|
-
value: e.value ??
|
|
4566
|
+
value: e.value ?? ce(r.format ?? "html"),
|
|
4546
4567
|
onChange: (t) => e.onChange(t),
|
|
4547
4568
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
4548
4569
|
error: n.invalid,
|
|
@@ -4552,41 +4573,10 @@ function Hc({ control: e, name: n, ...r }) {
|
|
|
4552
4573
|
});
|
|
4553
4574
|
}
|
|
4554
4575
|
//#endregion
|
|
4555
|
-
//#region lib/components/ui/widgets/editor/extensions/comments/comments-adapter-sync.tsx
|
|
4556
|
-
function Uc({ adapter: e }) {
|
|
4557
|
-
let { handle: t } = O(), n = Sr(t.editor);
|
|
4558
|
-
return H(() => n?.checkAdapter(), [n, e]), null;
|
|
4559
|
-
}
|
|
4560
|
-
//#endregion
|
|
4561
|
-
//#region lib/components/ui/widgets/editor/extensions/comments/use-comments-feature.ts
|
|
4562
|
-
function Wc(e) {
|
|
4563
|
-
let t = W(e);
|
|
4564
|
-
At(() => {
|
|
4565
|
-
t.current = e;
|
|
4566
|
-
}, [e]);
|
|
4567
|
-
let n = !!e?.adapter;
|
|
4568
|
-
return U(() => {
|
|
4569
|
-
if (n) return Mo({
|
|
4570
|
-
get adapter() {
|
|
4571
|
-
return t.current?.adapter;
|
|
4572
|
-
},
|
|
4573
|
-
get currentUser() {
|
|
4574
|
-
return t.current?.currentUser;
|
|
4575
|
-
},
|
|
4576
|
-
get allowCommentsWhenReadOnly() {
|
|
4577
|
-
return t.current?.allowCommentsWhenReadOnly;
|
|
4578
|
-
},
|
|
4579
|
-
get showResolved() {
|
|
4580
|
-
return t.current?.showResolved;
|
|
4581
|
-
}
|
|
4582
|
-
});
|
|
4583
|
-
}, [n]);
|
|
4584
|
-
}
|
|
4585
|
-
//#endregion
|
|
4586
4576
|
//#region lib/components/ui/widgets/editor/partials/page-mode-switch.tsx
|
|
4587
|
-
function
|
|
4588
|
-
let { t: n } =
|
|
4589
|
-
return /* @__PURE__ */ Y(
|
|
4577
|
+
function qc({ value: e, onChange: t }) {
|
|
4578
|
+
let { t: n } = M();
|
|
4579
|
+
return /* @__PURE__ */ Y(tt, {
|
|
4590
4580
|
type: "single",
|
|
4591
4581
|
variant: "segmented",
|
|
4592
4582
|
size: "sm",
|
|
@@ -4595,15 +4585,15 @@ function Gc({ value: e, onChange: t }) {
|
|
|
4595
4585
|
"aria-label": n("material.editor.page.mode", "View"),
|
|
4596
4586
|
"data-slot": "editor-page-mode",
|
|
4597
4587
|
children: [
|
|
4598
|
-
/* @__PURE__ */ J(
|
|
4588
|
+
/* @__PURE__ */ J(et, {
|
|
4599
4589
|
value: "write",
|
|
4600
4590
|
children: n("material.editor.page.write", "Write")
|
|
4601
4591
|
}),
|
|
4602
|
-
/* @__PURE__ */ J(
|
|
4592
|
+
/* @__PURE__ */ J(et, {
|
|
4603
4593
|
value: "preview",
|
|
4604
4594
|
children: n("material.editor.page.preview", "Preview")
|
|
4605
4595
|
}),
|
|
4606
|
-
/* @__PURE__ */ J(
|
|
4596
|
+
/* @__PURE__ */ J(et, {
|
|
4607
4597
|
value: "markdown",
|
|
4608
4598
|
children: n("material.editor.page.markdown", "Markdown")
|
|
4609
4599
|
})
|
|
@@ -4612,9 +4602,9 @@ function Gc({ value: e, onChange: t }) {
|
|
|
4612
4602
|
}
|
|
4613
4603
|
//#endregion
|
|
4614
4604
|
//#region lib/components/ui/widgets/editor/partials/page-mode-views.tsx
|
|
4615
|
-
var
|
|
4616
|
-
function
|
|
4617
|
-
let { handle: e } =
|
|
4605
|
+
var Jc = Ot(() => import("./rich-text-viewer-CXJp584B.js").then((e) => e.n).then((e) => ({ default: e.RichTextViewer })));
|
|
4606
|
+
function Yc() {
|
|
4607
|
+
let { handle: e } = k(), { editor: t } = e, n = P({
|
|
4618
4608
|
editor: t,
|
|
4619
4609
|
selector: (e) => e.editor?.state.doc ?? null,
|
|
4620
4610
|
equalityFn: (e, t) => e === t
|
|
@@ -4625,62 +4615,104 @@ function qc() {
|
|
|
4625
4615
|
e.isEmpty
|
|
4626
4616
|
]);
|
|
4627
4617
|
}
|
|
4628
|
-
function
|
|
4618
|
+
function Xc({ children: e }) {
|
|
4629
4619
|
return /* @__PURE__ */ J("p", {
|
|
4630
4620
|
"data-slot": "editor-page-empty",
|
|
4631
4621
|
className: "text-muted-foreground text-sm",
|
|
4632
4622
|
children: e
|
|
4633
4623
|
});
|
|
4634
4624
|
}
|
|
4635
|
-
function
|
|
4636
|
-
let { t: n } =
|
|
4625
|
+
function Zc({ json: e, components: t }) {
|
|
4626
|
+
let { t: n } = M(), { look: r } = k(), i = n("material.editor.page.empty", "Nothing to show yet.");
|
|
4637
4627
|
return e ? /* @__PURE__ */ J(Dt, {
|
|
4638
|
-
fallback: /* @__PURE__ */ J(
|
|
4639
|
-
children: /* @__PURE__ */ J(
|
|
4628
|
+
fallback: /* @__PURE__ */ J(Xc, { children: n("material.editor.page.loading", "Loading…") }),
|
|
4629
|
+
children: /* @__PURE__ */ J(Jc, {
|
|
4640
4630
|
value: e,
|
|
4641
4631
|
format: "json",
|
|
4642
4632
|
components: t,
|
|
4643
4633
|
look: r
|
|
4644
4634
|
})
|
|
4645
|
-
}) : /* @__PURE__ */ J(
|
|
4635
|
+
}) : /* @__PURE__ */ J(Xc, { children: i });
|
|
4646
4636
|
}
|
|
4647
|
-
function
|
|
4648
|
-
let { t } =
|
|
4637
|
+
function Qc({ json: e }) {
|
|
4638
|
+
let { t } = M(), { handle: n } = k(), [r, i] = G(null), a = n.editor?.extensionManager.extensions;
|
|
4649
4639
|
return H(() => {
|
|
4650
4640
|
let t = !0;
|
|
4651
4641
|
if (!e) {
|
|
4652
4642
|
i("");
|
|
4653
4643
|
return;
|
|
4654
4644
|
}
|
|
4655
|
-
return import("./convert-
|
|
4645
|
+
return import("./convert-7g-F5cNf.js").then((e) => e.t).then((t) => t.toMarkdown(e, { extensions: a })).then((e) => t && i(e)).catch(() => t && i("")), () => {
|
|
4656
4646
|
t = !1;
|
|
4657
4647
|
};
|
|
4658
|
-
}, [e, a]), r === null ? /* @__PURE__ */ J(
|
|
4648
|
+
}, [e, a]), r === null ? /* @__PURE__ */ J(Xc, { children: t("material.editor.page.loading", "Loading…") }) : r.trim() ? /* @__PURE__ */ J("pre", {
|
|
4659
4649
|
"data-slot": "editor-page-markdown",
|
|
4660
4650
|
tabIndex: 0,
|
|
4661
4651
|
className: "m-0 overflow-x-auto whitespace-pre-wrap break-words font-mono text-sm leading-relaxed",
|
|
4662
4652
|
children: /* @__PURE__ */ J("code", { children: r })
|
|
4663
|
-
}) : /* @__PURE__ */ J(
|
|
4653
|
+
}) : /* @__PURE__ */ J(Xc, { children: t("material.editor.page.empty", "Nothing to show yet.") });
|
|
4664
4654
|
}
|
|
4665
|
-
function
|
|
4666
|
-
let n =
|
|
4667
|
-
return e === "preview" ? /* @__PURE__ */ J(
|
|
4655
|
+
function $c({ mode: e, components: t }) {
|
|
4656
|
+
let n = Yc();
|
|
4657
|
+
return e === "preview" ? /* @__PURE__ */ J(Zc, {
|
|
4668
4658
|
json: n,
|
|
4669
4659
|
components: t
|
|
4670
|
-
}) : /* @__PURE__ */ J(
|
|
4660
|
+
}) : /* @__PURE__ */ J(Qc, { json: n });
|
|
4671
4661
|
}
|
|
4672
4662
|
//#endregion
|
|
4673
4663
|
//#region lib/components/ui/widgets/editor/presets/page-classes.ts
|
|
4674
|
-
function
|
|
4664
|
+
function el(e, n) {
|
|
4675
4665
|
return t("@container relative isolate overflow-clip bg-(--page-tint) text-card-foreground", n && "flex flex-col", e ? "rounded-(--nxgt-shape-corner-xl) border-0 [--page-tint:color-mix(in_oklab,var(--primary)_9%,var(--background))]" : "rounded-[20px] border [--page-tint:color-mix(in_oklab,var(--primary)_7%,var(--background))]");
|
|
4676
4666
|
}
|
|
4677
|
-
function
|
|
4667
|
+
function tl(e, n) {
|
|
4678
4668
|
return t("mx-auto w-full max-w-[52rem] bg-card px-4 py-8 transition-colors duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none", e ? "rounded-(--nxgt-shape-corner-xl-plus) border-0 shadow-none focus-within:ring-[3px] focus-within:ring-primary/50 forced-colors:focus-within:outline-2 forced-colors:focus-within:outline-[Highlight]" : "rounded-3xl border shadow-xs", "@md:px-5", !e && "focus-within:border-primary/60 dark:focus-within:border-primary-indicator", "@2xl:px-10 @2xl:py-12 @6xl:px-14", n && "@xl:pointer-fine:ps-16 @6xl:pointer-fine:ps-20");
|
|
4679
4669
|
}
|
|
4680
4670
|
//#endregion
|
|
4671
|
+
//#region lib/components/ui/widgets/editor/presets/document-editor-page-parts.tsx
|
|
4672
|
+
function nl({ mode: e, onModeChange: t, showSwitch: n, presence: r, panels: i, children: a }) {
|
|
4673
|
+
return /* @__PURE__ */ Y("div", {
|
|
4674
|
+
"data-slot": "document-editor-toolbar",
|
|
4675
|
+
className: "sticky top-0 z-10 grid gap-2 bg-(--page-tint)/85 px-2 py-2 backdrop-blur @2xl:px-6",
|
|
4676
|
+
children: [
|
|
4677
|
+
n && /* @__PURE__ */ Y("div", {
|
|
4678
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
4679
|
+
children: [/* @__PURE__ */ J(qc, {
|
|
4680
|
+
value: e,
|
|
4681
|
+
onChange: t
|
|
4682
|
+
}), r]
|
|
4683
|
+
}),
|
|
4684
|
+
a,
|
|
4685
|
+
i
|
|
4686
|
+
]
|
|
4687
|
+
});
|
|
4688
|
+
}
|
|
4689
|
+
function rl({ expressive: e, handleGutter: t, mode: n, previewComponents: r, children: i }) {
|
|
4690
|
+
let a = n === "write";
|
|
4691
|
+
return /* @__PURE__ */ J("article", {
|
|
4692
|
+
"data-slot": "document-editor-sheet",
|
|
4693
|
+
className: tl(e, t),
|
|
4694
|
+
children: /* @__PURE__ */ Y("div", {
|
|
4695
|
+
className: "mx-auto w-full max-w-[680px]",
|
|
4696
|
+
children: [/* @__PURE__ */ J("div", {
|
|
4697
|
+
hidden: !a,
|
|
4698
|
+
children: i
|
|
4699
|
+
}), !a && /* @__PURE__ */ J($c, {
|
|
4700
|
+
mode: n,
|
|
4701
|
+
components: r
|
|
4702
|
+
})]
|
|
4703
|
+
})
|
|
4704
|
+
});
|
|
4705
|
+
}
|
|
4706
|
+
function il({ floating: e, children: n }) {
|
|
4707
|
+
return /* @__PURE__ */ J("div", {
|
|
4708
|
+
className: t("border-t px-4 py-2.5 @2xl:px-8", e && "order-3"),
|
|
4709
|
+
children: n
|
|
4710
|
+
});
|
|
4711
|
+
}
|
|
4712
|
+
//#endregion
|
|
4681
4713
|
//#region lib/components/ui/widgets/editor/presets/page-rails.tsx
|
|
4682
|
-
function
|
|
4683
|
-
let { t: n } =
|
|
4714
|
+
function al({ children: e, fab: t }) {
|
|
4715
|
+
let { t: n } = M();
|
|
4684
4716
|
return t === void 0 ? /* @__PURE__ */ J("aside", {
|
|
4685
4717
|
"aria-label": n("material.editor.tools", "Tools"),
|
|
4686
4718
|
"data-slot": "document-editor-tools",
|
|
@@ -4699,8 +4731,8 @@ function el({ children: e, fab: t }) {
|
|
|
4699
4731
|
}), t]
|
|
4700
4732
|
});
|
|
4701
4733
|
}
|
|
4702
|
-
function
|
|
4703
|
-
let { t: n } =
|
|
4734
|
+
function ol({ side: e, children: t }) {
|
|
4735
|
+
let { t: n } = M();
|
|
4704
4736
|
return /* @__PURE__ */ J("aside", {
|
|
4705
4737
|
"aria-label": n("material.editor.outline-region", "Document outline"),
|
|
4706
4738
|
"data-slot": "document-editor-rail",
|
|
@@ -4709,8 +4741,8 @@ function tl({ side: e, children: t }) {
|
|
|
4709
4741
|
children: t
|
|
4710
4742
|
});
|
|
4711
4743
|
}
|
|
4712
|
-
function
|
|
4713
|
-
let { t } =
|
|
4744
|
+
function sl({ children: e }) {
|
|
4745
|
+
let { t } = M();
|
|
4714
4746
|
return /* @__PURE__ */ J("aside", {
|
|
4715
4747
|
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4716
4748
|
"data-slot": "document-editor-comments",
|
|
@@ -4718,70 +4750,56 @@ function nl({ children: e }) {
|
|
|
4718
4750
|
children: e
|
|
4719
4751
|
});
|
|
4720
4752
|
}
|
|
4721
|
-
function
|
|
4722
|
-
let { chrome: m, handle: h, look: g } =
|
|
4753
|
+
function cl({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, panels: o, footer: s, outline: c, comments: l, presence: u, outlineSide: d = "start", className: f, children: p }) {
|
|
4754
|
+
let { chrome: m, handle: h, look: g } = k(), _ = g === "expressive", v = h.features.some((e) => e.key === "dragHandle"), y = m.state.focusMode, b = W(null), [x, S] = G("write"), C = x === "write", w = pc(b, 64), ee = pc(b, 72), T = C && !y, E = T && w && r, D = !!(n && T && !E), O = c && T && ee, te = l && T && w;
|
|
4723
4755
|
return /* @__PURE__ */ Y("div", {
|
|
4724
4756
|
ref: b,
|
|
4725
4757
|
"data-slot": "document-editor",
|
|
4726
4758
|
"data-look": g,
|
|
4727
4759
|
"data-layout": "page",
|
|
4728
4760
|
"data-mode": x,
|
|
4729
|
-
className: t(
|
|
4761
|
+
className: t(el(_, D), f),
|
|
4730
4762
|
children: [
|
|
4731
|
-
/* @__PURE__ */
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
value: x,
|
|
4739
|
-
onChange: S
|
|
4740
|
-
}), u]
|
|
4741
|
-
}),
|
|
4742
|
-
T && !E && e,
|
|
4743
|
-
C && o
|
|
4744
|
-
]
|
|
4763
|
+
/* @__PURE__ */ J(nl, {
|
|
4764
|
+
mode: x,
|
|
4765
|
+
onModeChange: S,
|
|
4766
|
+
showSwitch: !y,
|
|
4767
|
+
presence: u,
|
|
4768
|
+
panels: C && o,
|
|
4769
|
+
children: T && !E && e
|
|
4745
4770
|
}),
|
|
4746
4771
|
/* @__PURE__ */ J(va, { className: "absolute end-3 top-3 z-20" }),
|
|
4747
4772
|
D && n,
|
|
4748
4773
|
/* @__PURE__ */ Y("div", {
|
|
4749
4774
|
className: "flex items-start gap-4 px-2 pb-6 @2xl:gap-6 @2xl:px-6",
|
|
4750
4775
|
children: [
|
|
4751
|
-
E && /* @__PURE__ */ J(
|
|
4776
|
+
E && /* @__PURE__ */ J(al, {
|
|
4752
4777
|
fab: i,
|
|
4753
4778
|
children: r
|
|
4754
4779
|
}),
|
|
4755
|
-
|
|
4780
|
+
O && d === "start" && /* @__PURE__ */ J(ol, {
|
|
4756
4781
|
side: "start",
|
|
4757
4782
|
children: c
|
|
4758
4783
|
}),
|
|
4759
4784
|
/* @__PURE__ */ J("div", {
|
|
4760
4785
|
className: "min-w-0 flex-1",
|
|
4761
|
-
children: /* @__PURE__ */ J(
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
hidden: !C,
|
|
4768
|
-
children: p
|
|
4769
|
-
}), !C && /* @__PURE__ */ J(Zc, {
|
|
4770
|
-
mode: x,
|
|
4771
|
-
components: a
|
|
4772
|
-
})]
|
|
4773
|
-
})
|
|
4786
|
+
children: /* @__PURE__ */ J(rl, {
|
|
4787
|
+
expressive: _,
|
|
4788
|
+
handleGutter: v,
|
|
4789
|
+
mode: x,
|
|
4790
|
+
previewComponents: a,
|
|
4791
|
+
children: p
|
|
4774
4792
|
})
|
|
4775
4793
|
}),
|
|
4776
|
-
|
|
4794
|
+
O && d === "end" && /* @__PURE__ */ J(ol, {
|
|
4777
4795
|
side: "end",
|
|
4778
4796
|
children: c
|
|
4779
4797
|
}),
|
|
4780
|
-
|
|
4798
|
+
te && /* @__PURE__ */ J(sl, { children: l })
|
|
4781
4799
|
]
|
|
4782
4800
|
}),
|
|
4783
|
-
s && /* @__PURE__ */ J(
|
|
4784
|
-
|
|
4801
|
+
s && /* @__PURE__ */ J(il, {
|
|
4802
|
+
floating: D,
|
|
4785
4803
|
children: s
|
|
4786
4804
|
})
|
|
4787
4805
|
]
|
|
@@ -4789,7 +4807,7 @@ function rl({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, pan
|
|
|
4789
4807
|
}
|
|
4790
4808
|
//#endregion
|
|
4791
4809
|
//#region lib/components/ui/widgets/editor/partials/toolbar-floating-groups.ts
|
|
4792
|
-
var
|
|
4810
|
+
var ll = {
|
|
4793
4811
|
"upload-image": "image",
|
|
4794
4812
|
gallery: "gallery",
|
|
4795
4813
|
table: "table",
|
|
@@ -4800,7 +4818,7 @@ var il = {
|
|
|
4800
4818
|
"select-card": "select-card",
|
|
4801
4819
|
"checkbox-group": "checkbox-group",
|
|
4802
4820
|
"radio-group": "radio-group"
|
|
4803
|
-
},
|
|
4821
|
+
}, ul = {
|
|
4804
4822
|
marks: 100,
|
|
4805
4823
|
link: 85,
|
|
4806
4824
|
lists: 80,
|
|
@@ -4810,44 +4828,44 @@ var il = {
|
|
|
4810
4828
|
"marks-extra": 60,
|
|
4811
4829
|
history: 50
|
|
4812
4830
|
};
|
|
4813
|
-
function
|
|
4814
|
-
return e.some((e) => e.name === "slash") ?
|
|
4831
|
+
function dl(e) {
|
|
4832
|
+
return e.some((e) => e.name === "slash") ? w(e.flatMap((e) => e.slash ?? [])) : [];
|
|
4815
4833
|
}
|
|
4816
|
-
function
|
|
4834
|
+
function fl(e, t) {
|
|
4817
4835
|
let n = new Set(t.map((e) => e.id));
|
|
4818
4836
|
return e.filter((e) => {
|
|
4819
|
-
let t =
|
|
4837
|
+
let t = ll[e.id];
|
|
4820
4838
|
return !t || !n.has(t);
|
|
4821
4839
|
});
|
|
4822
4840
|
}
|
|
4823
|
-
function
|
|
4824
|
-
return
|
|
4841
|
+
function pl(e, t) {
|
|
4842
|
+
return fl(e, t).flatMap((e) => e.id === "marks" && e.render === ie ? [{
|
|
4825
4843
|
...e,
|
|
4826
|
-
render:
|
|
4844
|
+
render: g
|
|
4827
4845
|
}, {
|
|
4828
4846
|
...e,
|
|
4829
4847
|
id: "marks-extra",
|
|
4830
4848
|
order: e.order + .5,
|
|
4831
|
-
render:
|
|
4849
|
+
render: u
|
|
4832
4850
|
}] : [e]).map((e) => ({
|
|
4833
4851
|
...e,
|
|
4834
|
-
priority:
|
|
4852
|
+
priority: ul[e.id] ?? e.priority
|
|
4835
4853
|
}));
|
|
4836
4854
|
}
|
|
4837
4855
|
//#endregion
|
|
4838
4856
|
//#region lib/components/ui/widgets/editor/partials/use-toolbar-shown.ts
|
|
4839
|
-
function
|
|
4840
|
-
let { handle: e, chrome: t } =
|
|
4841
|
-
return !!
|
|
4857
|
+
function ml() {
|
|
4858
|
+
let { handle: e, chrome: t } = k();
|
|
4859
|
+
return !!P({
|
|
4842
4860
|
editor: e.editor,
|
|
4843
|
-
selector: (e) => !!(e.editor?.isEditable &&
|
|
4861
|
+
selector: (e) => !!(e.editor?.isEditable && ke.selectShowToolbar(t.state))
|
|
4844
4862
|
});
|
|
4845
4863
|
}
|
|
4846
4864
|
//#endregion
|
|
4847
4865
|
//#region lib/components/ui/widgets/editor/partials/editor-insert-fab.tsx
|
|
4848
|
-
function
|
|
4849
|
-
let { t: e } =
|
|
4850
|
-
return !n || !o || a.length === 0 ? null : /* @__PURE__ */ J(
|
|
4866
|
+
function hl() {
|
|
4867
|
+
let { t: e } = M(), { handle: t } = k(), { editor: n, features: r } = t, i = W(!1), a = U(() => l(dl(r), "", e), [r, e]), o = ml();
|
|
4868
|
+
return !n || !o || a.length === 0 ? null : /* @__PURE__ */ J(se, {
|
|
4851
4869
|
"data-slot": "editor-insert-fab",
|
|
4852
4870
|
label: e("material.editor.insert", "Insert"),
|
|
4853
4871
|
items: a.map((e) => ({
|
|
@@ -4873,24 +4891,24 @@ function ul() {
|
|
|
4873
4891
|
}
|
|
4874
4892
|
//#endregion
|
|
4875
4893
|
//#region lib/components/ui/widgets/editor/partials/editor-floating-bar.tsx
|
|
4876
|
-
function
|
|
4877
|
-
let { handle: t } =
|
|
4878
|
-
return
|
|
4894
|
+
function gl({ className: e }) {
|
|
4895
|
+
let { handle: t } = k(), n = U(() => dl(t.features), [t.features]), r = V((e) => pl(e, n), [n]);
|
|
4896
|
+
return ml() ? /* @__PURE__ */ J("div", {
|
|
4879
4897
|
"data-slot": "editor-floating-bar",
|
|
4880
4898
|
className: "nxgt-editor-bar",
|
|
4881
|
-
children: /* @__PURE__ */ Y(
|
|
4899
|
+
children: /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J(O, {
|
|
4882
4900
|
variant: "floating",
|
|
4883
4901
|
dividers: !1,
|
|
4884
4902
|
className: e,
|
|
4885
4903
|
groupsFor: r
|
|
4886
|
-
}), /* @__PURE__ */ J(
|
|
4904
|
+
}), /* @__PURE__ */ J(hl, {})] })
|
|
4887
4905
|
}) : null;
|
|
4888
4906
|
}
|
|
4889
4907
|
//#endregion
|
|
4890
4908
|
//#region lib/components/ui/widgets/editor/partials/editor-rail-toolbar.tsx
|
|
4891
|
-
function
|
|
4892
|
-
let { handle: n } =
|
|
4893
|
-
return /* @__PURE__ */ J(
|
|
4909
|
+
function _l({ floating: e, className: t }) {
|
|
4910
|
+
let { handle: n } = k(), r = U(() => e ? dl(n.features) : [], [e, n.features]), i = V((e) => fl(e, r), [r]);
|
|
4911
|
+
return /* @__PURE__ */ J(O, {
|
|
4894
4912
|
orientation: "vertical",
|
|
4895
4913
|
variant: e ? "floating" : void 0,
|
|
4896
4914
|
className: t,
|
|
@@ -4899,20 +4917,20 @@ function fl({ floating: e, className: t }) {
|
|
|
4899
4917
|
}
|
|
4900
4918
|
//#endregion
|
|
4901
4919
|
//#region lib/components/ui/widgets/editor/presets/document-editor-slots.tsx
|
|
4902
|
-
function
|
|
4903
|
-
let u = t === "page", d =
|
|
4920
|
+
function vl({ look: e, layout: t, previewComponents: n, outline: r, comments: i, collaboration: a, collaborationStatus: o, footer: s, status: c, actions: l }) {
|
|
4921
|
+
let u = t === "page", d = Nc(e), f = e === "expressive";
|
|
4904
4922
|
return {
|
|
4905
|
-
toolbar: f ? void 0 : /* @__PURE__ */ J(
|
|
4923
|
+
toolbar: f ? void 0 : /* @__PURE__ */ J(O, {
|
|
4906
4924
|
dividers: !1,
|
|
4907
|
-
className: u ? d.docked :
|
|
4925
|
+
className: u ? d.docked : Mc(e, Cc)
|
|
4908
4926
|
}),
|
|
4909
|
-
bar: f ? /* @__PURE__ */ J(
|
|
4927
|
+
bar: f ? /* @__PURE__ */ J(gl, { className: u ? Ac : kc }) : void 0,
|
|
4910
4928
|
previewComponents: n,
|
|
4911
|
-
rail: u ? /* @__PURE__ */ J(
|
|
4929
|
+
rail: u ? /* @__PURE__ */ J(_l, {
|
|
4912
4930
|
floating: f,
|
|
4913
4931
|
className: d.rail
|
|
4914
4932
|
}) : void 0,
|
|
4915
|
-
railFab: u && f ? /* @__PURE__ */ J(
|
|
4933
|
+
railFab: u && f ? /* @__PURE__ */ J(hl, {}) : void 0,
|
|
4916
4934
|
panels: /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(ha, {}), /* @__PURE__ */ J(Pa, {})] }),
|
|
4917
4935
|
outline: r ? /* @__PURE__ */ J(Ma, {}) : void 0,
|
|
4918
4936
|
comments: i ? /* @__PURE__ */ J(Di, {}) : void 0,
|
|
@@ -4925,74 +4943,139 @@ function pl({ look: e, layout: t, previewComponents: n, outline: r, comments: i,
|
|
|
4925
4943
|
};
|
|
4926
4944
|
}
|
|
4927
4945
|
//#endregion
|
|
4928
|
-
//#region lib/components/ui/widgets/editor/presets/document-editor.tsx
|
|
4929
|
-
function
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4946
|
+
//#region lib/components/ui/widgets/editor/presets/document-editor-layout.tsx
|
|
4947
|
+
function yl(e) {
|
|
4948
|
+
return /* @__PURE__ */ J(e.layout === "page" ? cl : Tc, {
|
|
4949
|
+
...vl(e),
|
|
4950
|
+
children: /* @__PURE__ */ J(Ui, { children: /* @__PURE__ */ J(ne, {}) })
|
|
4951
|
+
});
|
|
4952
|
+
}
|
|
4953
|
+
//#endregion
|
|
4954
|
+
//#region lib/components/ui/widgets/editor/extensions/comments/comments-adapter-sync.tsx
|
|
4955
|
+
function bl({ adapter: e }) {
|
|
4956
|
+
let { handle: t } = k(), n = Sr(t.editor);
|
|
4957
|
+
return H(() => n?.checkAdapter(), [n, e]), null;
|
|
4958
|
+
}
|
|
4959
|
+
//#endregion
|
|
4960
|
+
//#region lib/components/ui/widgets/editor/presets/document-editor-overlays.tsx
|
|
4961
|
+
function xl({ onUpload: e, onUploadingChange: t, withComments: n, commentsAdapter: r }) {
|
|
4962
|
+
return /* @__PURE__ */ Y(q, { children: [
|
|
4963
|
+
e && /* @__PURE__ */ J(lc, { onChange: t }),
|
|
4964
|
+
/* @__PURE__ */ J(c, {}),
|
|
4965
|
+
/* @__PURE__ */ J(i, {}),
|
|
4966
|
+
/* @__PURE__ */ J(or, {}),
|
|
4967
|
+
/* @__PURE__ */ J(vi, {}),
|
|
4968
|
+
/* @__PURE__ */ J(Er, {}),
|
|
4969
|
+
n && /* @__PURE__ */ J(bl, { adapter: r })
|
|
4970
|
+
] });
|
|
4971
|
+
}
|
|
4972
|
+
//#endregion
|
|
4973
|
+
//#region lib/components/ui/widgets/editor/extensions/comments/use-comments-feature.ts
|
|
4974
|
+
function Sl(e) {
|
|
4975
|
+
let t = W(e);
|
|
4976
|
+
At(() => {
|
|
4977
|
+
t.current = e;
|
|
4978
|
+
}, [e]);
|
|
4979
|
+
let n = !!e?.adapter;
|
|
4980
|
+
return U(() => {
|
|
4981
|
+
if (n) return Mo({
|
|
4982
|
+
get adapter() {
|
|
4983
|
+
return t.current?.adapter;
|
|
4984
|
+
},
|
|
4985
|
+
get currentUser() {
|
|
4986
|
+
return t.current?.currentUser;
|
|
4987
|
+
},
|
|
4988
|
+
get allowCommentsWhenReadOnly() {
|
|
4989
|
+
return t.current?.allowCommentsWhenReadOnly;
|
|
4990
|
+
},
|
|
4991
|
+
get showResolved() {
|
|
4992
|
+
return t.current?.showResolved;
|
|
4993
|
+
}
|
|
4994
|
+
});
|
|
4995
|
+
}, [n]);
|
|
4996
|
+
}
|
|
4997
|
+
//#endregion
|
|
4998
|
+
//#region lib/components/ui/widgets/editor/presets/use-document-features.ts
|
|
4999
|
+
function Cl({ features: e, mentions: t, outline: n, onUpload: r, uploadOptions: i, onAssist: a, assistOptions: o, comments: s, collaboration: c }) {
|
|
5000
|
+
let l = U(ac, []), u = uc(r, i), d = cc(a, o), f = Sl(s);
|
|
5001
|
+
return {
|
|
5002
|
+
defaults: l,
|
|
5003
|
+
commentsFeature: f,
|
|
5004
|
+
editorFeatures: Rc({
|
|
4935
5005
|
features: e,
|
|
4936
|
-
mentions:
|
|
4937
|
-
outline:
|
|
5006
|
+
mentions: t,
|
|
5007
|
+
outline: n,
|
|
4938
5008
|
extra: [
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
5009
|
+
u,
|
|
5010
|
+
d,
|
|
5011
|
+
f,
|
|
5012
|
+
c
|
|
4943
5013
|
]
|
|
4944
|
-
})
|
|
4945
|
-
|
|
5014
|
+
})
|
|
5015
|
+
};
|
|
5016
|
+
}
|
|
5017
|
+
//#endregion
|
|
5018
|
+
//#region lib/components/ui/widgets/editor/presets/document-editor.tsx
|
|
5019
|
+
function wl({ features: e, layout: n = "docked", look: r = "expressive", previewComponents: i, status: a, actions: o, footer: s = !0, outline: c = !1, onUpload: l, uploadOptions: u, onUploadingChange: d, onAssist: f, assistOptions: p, comments: m, collaboration: h, collaborationStatus: g, label: v, helperText: y, error: b, required: x, className: S, attributes: C, ...w }) {
|
|
5020
|
+
let { defaults: ee, commentsFeature: T, editorFeatures: E } = Cl({
|
|
5021
|
+
features: e,
|
|
5022
|
+
mentions: w.mentions,
|
|
5023
|
+
outline: c,
|
|
5024
|
+
onUpload: l,
|
|
5025
|
+
uploadOptions: u,
|
|
5026
|
+
onAssist: f,
|
|
5027
|
+
assistOptions: p,
|
|
5028
|
+
comments: m,
|
|
5029
|
+
collaboration: h
|
|
5030
|
+
});
|
|
5031
|
+
return /* @__PURE__ */ Y(_, {
|
|
5032
|
+
...w,
|
|
5033
|
+
look: r,
|
|
5034
|
+
features: E,
|
|
5035
|
+
defaults: ee,
|
|
4946
5036
|
attributes: {
|
|
4947
5037
|
class: t("nxgt-prose min-h-64 focus:outline-none"),
|
|
4948
|
-
...
|
|
5038
|
+
...C
|
|
4949
5039
|
},
|
|
4950
|
-
children: [
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
/* @__PURE__ */ J(c, {}),
|
|
4975
|
-
/* @__PURE__ */ J(i, {}),
|
|
4976
|
-
/* @__PURE__ */ J(or, {}),
|
|
4977
|
-
/* @__PURE__ */ J(vi, {}),
|
|
4978
|
-
/* @__PURE__ */ J(Er, {}),
|
|
4979
|
-
re && /* @__PURE__ */ J(Uc, { adapter: _?.adapter })
|
|
4980
|
-
]
|
|
5040
|
+
children: [/* @__PURE__ */ J(Pe, {
|
|
5041
|
+
label: v,
|
|
5042
|
+
helperText: y,
|
|
5043
|
+
error: b,
|
|
5044
|
+
required: x,
|
|
5045
|
+
className: S,
|
|
5046
|
+
children: /* @__PURE__ */ J(yl, {
|
|
5047
|
+
layout: n,
|
|
5048
|
+
look: r,
|
|
5049
|
+
previewComponents: i,
|
|
5050
|
+
outline: c,
|
|
5051
|
+
comments: !!T,
|
|
5052
|
+
collaboration: !!h,
|
|
5053
|
+
collaborationStatus: g,
|
|
5054
|
+
footer: s,
|
|
5055
|
+
status: a,
|
|
5056
|
+
actions: o
|
|
5057
|
+
})
|
|
5058
|
+
}), /* @__PURE__ */ J(xl, {
|
|
5059
|
+
onUpload: l,
|
|
5060
|
+
onUploadingChange: d,
|
|
5061
|
+
commentsAdapter: T ? m?.adapter : void 0,
|
|
5062
|
+
withComments: !!T
|
|
5063
|
+
})]
|
|
4981
5064
|
});
|
|
4982
5065
|
}
|
|
4983
5066
|
//#endregion
|
|
4984
5067
|
//#region lib/components/ui/widgets/editor/presets/document-editor-form-field.tsx
|
|
4985
|
-
function
|
|
4986
|
-
return /* @__PURE__ */ J(
|
|
5068
|
+
function Tl({ control: e, name: n, ...r }) {
|
|
5069
|
+
return /* @__PURE__ */ J(Ze, {
|
|
4987
5070
|
control: e,
|
|
4988
5071
|
name: n,
|
|
4989
|
-
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(
|
|
5072
|
+
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(Qe, {
|
|
4990
5073
|
onBlur: e.onBlur,
|
|
4991
5074
|
focusRef: e.ref,
|
|
4992
|
-
children: /* @__PURE__ */ J(
|
|
5075
|
+
children: /* @__PURE__ */ J(wl, {
|
|
4993
5076
|
...r,
|
|
4994
5077
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
4995
|
-
value: e.value ??
|
|
5078
|
+
value: e.value ?? ce(r.format ?? "html"),
|
|
4996
5079
|
onChange: (t) => e.onChange(t),
|
|
4997
5080
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
4998
5081
|
error: n.invalid,
|
|
@@ -5002,8 +5085,13 @@ function hl({ control: e, name: n, ...r }) {
|
|
|
5002
5085
|
});
|
|
5003
5086
|
}
|
|
5004
5087
|
//#endregion
|
|
5088
|
+
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/composer-class.ts
|
|
5089
|
+
function El({ pill: e, look: n, editable: r, className: i }) {
|
|
5090
|
+
return t("@container flex w-full min-w-0 flex-wrap items-end gap-x-1 gap-y-1.5 border bg-card p-2 text-card-foreground shadow-xs", "transition-[border-color,box-shadow,border-radius] duration-(--nxgt-motion-effects-default-duration) ease-effects-default motion-reduce:transition-none", "focus-within:border-primary/60 dark:focus-within:border-primary-indicator focus-within:ring-[3px] focus-within:ring-primary/15", e ? "rounded-full ps-2.5" : n === "expressive" ? "rounded-[1.75rem]" : "rounded-[1.375rem]", !r && "opacity-70", i);
|
|
5091
|
+
}
|
|
5092
|
+
//#endregion
|
|
5005
5093
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/composer-notices.tsx
|
|
5006
|
-
function
|
|
5094
|
+
function Dl({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled: i, onAttachmentsChange: a }) {
|
|
5007
5095
|
return /* @__PURE__ */ Y(q, { children: [
|
|
5008
5096
|
e && /* @__PURE__ */ J("div", {
|
|
5009
5097
|
role: "alert",
|
|
@@ -5017,7 +5105,7 @@ function gl({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled
|
|
|
5017
5105
|
onCancel: n
|
|
5018
5106
|
})
|
|
5019
5107
|
}),
|
|
5020
|
-
/* @__PURE__ */ J(
|
|
5108
|
+
/* @__PURE__ */ J(fe, {
|
|
5021
5109
|
attachments: r,
|
|
5022
5110
|
isDisabled: i,
|
|
5023
5111
|
onAttachmentsChange: a,
|
|
@@ -5026,21 +5114,35 @@ function gl({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled
|
|
|
5026
5114
|
] });
|
|
5027
5115
|
}
|
|
5028
5116
|
//#endregion
|
|
5117
|
+
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/composer-toolbar.tsx
|
|
5118
|
+
function Ol({ id: e, look: t }) {
|
|
5119
|
+
return /* @__PURE__ */ J("div", {
|
|
5120
|
+
id: e,
|
|
5121
|
+
"data-slot": "rich-chat-composer-toolbar",
|
|
5122
|
+
className: "w-full px-1",
|
|
5123
|
+
children: /* @__PURE__ */ J(O, {
|
|
5124
|
+
dividers: !1,
|
|
5125
|
+
density: "compact",
|
|
5126
|
+
className: Mc(t, Cc)
|
|
5127
|
+
})
|
|
5128
|
+
});
|
|
5129
|
+
}
|
|
5130
|
+
//#endregion
|
|
5029
5131
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-control.tsx
|
|
5030
|
-
function
|
|
5031
|
-
let { t: s } =
|
|
5032
|
-
return !a || i ? /* @__PURE__ */ J(
|
|
5132
|
+
function kl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSchedule: a, squircle: o }) {
|
|
5133
|
+
let { t: s } = M();
|
|
5134
|
+
return !a || i ? /* @__PURE__ */ J(Ae, {
|
|
5033
5135
|
sendLabel: e,
|
|
5034
5136
|
stopLabel: t,
|
|
5035
5137
|
isDisabled: n,
|
|
5036
5138
|
isEmpty: r,
|
|
5037
5139
|
onStop: i,
|
|
5038
5140
|
shape: o ? "squircle" : "round"
|
|
5039
|
-
}) : /* @__PURE__ */ J(
|
|
5141
|
+
}) : /* @__PURE__ */ J(m, {
|
|
5040
5142
|
type: "submit",
|
|
5041
5143
|
disabled: n || r,
|
|
5042
5144
|
menuLabel: s("material.editor.send-options", "Send options"),
|
|
5043
|
-
menu: /* @__PURE__ */ J(
|
|
5145
|
+
menu: /* @__PURE__ */ J(A, {
|
|
5044
5146
|
onSelect: a,
|
|
5045
5147
|
children: s("material.editor.schedule", "Schedule…")
|
|
5046
5148
|
}),
|
|
@@ -5049,71 +5151,78 @@ function _l({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSc
|
|
|
5049
5151
|
}
|
|
5050
5152
|
//#endregion
|
|
5051
5153
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-on-enter.tsx
|
|
5052
|
-
function
|
|
5053
|
-
return e.nativeEvent.keyCode !== 229 &&
|
|
5154
|
+
function Al(e, t) {
|
|
5155
|
+
return e.nativeEvent.keyCode !== 229 && Me(e, t);
|
|
5054
5156
|
}
|
|
5055
|
-
function
|
|
5056
|
-
let { handle: o } =
|
|
5157
|
+
function jl({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i, children: a }) {
|
|
5158
|
+
let { handle: o } = k();
|
|
5057
5159
|
return /* @__PURE__ */ J("div", {
|
|
5058
5160
|
"data-slot": "rich-chat-composer-input",
|
|
5059
5161
|
className: i,
|
|
5060
5162
|
onFocus: r,
|
|
5061
5163
|
onKeyDownCapture: (r) => {
|
|
5062
|
-
|
|
5164
|
+
Al(r, t) && (o.suggestions.getSnapshot()?.entries.length || (r.preventDefault(), r.stopPropagation(), n || e()));
|
|
5063
5165
|
},
|
|
5064
5166
|
children: a
|
|
5065
5167
|
});
|
|
5066
5168
|
}
|
|
5067
5169
|
//#endregion
|
|
5170
|
+
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/format-buttons.tsx
|
|
5171
|
+
function Ml({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r }) {
|
|
5172
|
+
let { t: i } = M(), { editor: a } = k().handle, o = i("material.editor.formatting-toggle", "Text formatting"), s = i("material.editor.mention", "Mention someone");
|
|
5173
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(N, {
|
|
5174
|
+
variant: "ghost",
|
|
5175
|
+
color: "default",
|
|
5176
|
+
tooltip: o,
|
|
5177
|
+
"aria-label": o,
|
|
5178
|
+
"aria-pressed": e,
|
|
5179
|
+
morph: "none",
|
|
5180
|
+
"aria-controls": e ? t : void 0,
|
|
5181
|
+
onClick: n,
|
|
5182
|
+
className: "size-8 shrink-0 rounded aria-pressed:bg-primary/10 aria-pressed:text-primary-text",
|
|
5183
|
+
children: /* @__PURE__ */ J(Ft, {})
|
|
5184
|
+
}), r && /* @__PURE__ */ J(N, {
|
|
5185
|
+
variant: "ghost",
|
|
5186
|
+
color: "default",
|
|
5187
|
+
tooltip: s,
|
|
5188
|
+
"aria-label": s,
|
|
5189
|
+
onClick: () => a?.chain().focus().insertContent("@").run(),
|
|
5190
|
+
className: "size-8 shrink-0 rounded",
|
|
5191
|
+
children: /* @__PURE__ */ J(Pt, {})
|
|
5192
|
+
})] });
|
|
5193
|
+
}
|
|
5194
|
+
//#endregion
|
|
5068
5195
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/tools-row.tsx
|
|
5069
|
-
function
|
|
5070
|
-
let {
|
|
5196
|
+
function Nl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionable: a, attach: o, actions: s }) {
|
|
5197
|
+
let { handle: c } = k(), { editor: l } = c;
|
|
5071
5198
|
return /* @__PURE__ */ Y("div", {
|
|
5072
5199
|
"data-slot": "rich-chat-composer-tools",
|
|
5073
5200
|
className: t("flex min-w-0 items-end gap-1", e ? "order-1" : "flex-1"),
|
|
5074
|
-
children: [/* @__PURE__ */ J(
|
|
5201
|
+
children: [/* @__PURE__ */ J(Ce, {
|
|
5075
5202
|
...o,
|
|
5076
|
-
actions: /* @__PURE__ */ Y(q, { children: [
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
"aria-pressed": n,
|
|
5083
|
-
morph: "none",
|
|
5084
|
-
"aria-controls": n ? r : void 0,
|
|
5085
|
-
onClick: i,
|
|
5086
|
-
className: "size-8 shrink-0 rounded aria-pressed:bg-primary/10 aria-pressed:text-primary-text",
|
|
5087
|
-
children: /* @__PURE__ */ J(Ft, {})
|
|
5088
|
-
}),
|
|
5089
|
-
a && /* @__PURE__ */ J(M, {
|
|
5090
|
-
variant: "ghost",
|
|
5091
|
-
color: "default",
|
|
5092
|
-
tooltip: f,
|
|
5093
|
-
"aria-label": f,
|
|
5094
|
-
onClick: () => u?.chain().focus().insertContent("@").run(),
|
|
5095
|
-
className: "size-8 shrink-0 rounded",
|
|
5096
|
-
children: /* @__PURE__ */ J(Pt, {})
|
|
5097
|
-
}),
|
|
5098
|
-
s
|
|
5099
|
-
] })] })
|
|
5203
|
+
actions: /* @__PURE__ */ Y(q, { children: [l?.storage.emoji && /* @__PURE__ */ J(we, { editor: l }), !e && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Ml, {
|
|
5204
|
+
formatOpen: n,
|
|
5205
|
+
toolbarId: r,
|
|
5206
|
+
onFormatToggle: i,
|
|
5207
|
+
mentionable: a
|
|
5208
|
+
}), s] })] })
|
|
5100
5209
|
}), !e && /* @__PURE__ */ J(fc, { className: "ms-auto self-center px-2" })]
|
|
5101
5210
|
});
|
|
5102
5211
|
}
|
|
5103
5212
|
//#endregion
|
|
5104
5213
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-editor.ts
|
|
5105
|
-
function
|
|
5106
|
-
let { t: s } =
|
|
5214
|
+
function Pl({ features: e, minRows: n = 1, maxRows: r = 8, placeholder: i, attributes: a, ...o }) {
|
|
5215
|
+
let { t: s } = M(), c = U(() => sc().map((e) => e.name === "emoji" ? {
|
|
5107
5216
|
...e,
|
|
5108
5217
|
toolbar: void 0
|
|
5109
5218
|
} : e), []);
|
|
5110
|
-
return
|
|
5219
|
+
return h({
|
|
5111
5220
|
...o,
|
|
5112
5221
|
features: e ?? c,
|
|
5113
5222
|
defaults: c,
|
|
5114
5223
|
placeholder: i ?? s("material.chat.placeholder", "Type a message…"),
|
|
5115
5224
|
attributes: {
|
|
5116
|
-
class: t("nxgt-prose text-[0.9375rem] leading-normal focus:outline-none [&>*+*]:mt-2",
|
|
5225
|
+
class: t("nxgt-prose text-[0.9375rem] leading-normal focus:outline-none [&>*+*]:mt-2", Wc(n, r)),
|
|
5117
5226
|
"aria-label": s("material.chat.message", "Message"),
|
|
5118
5227
|
...a
|
|
5119
5228
|
}
|
|
@@ -5121,8 +5230,8 @@ function xl({ features: e, minRows: n = 1, maxRows: r = 8, placeholder: i, attri
|
|
|
5121
5230
|
}
|
|
5122
5231
|
//#endregion
|
|
5123
5232
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-pill.ts
|
|
5124
|
-
var
|
|
5125
|
-
function
|
|
5233
|
+
var Fl = "[data-radix-popper-content-wrapper], [role=\"dialog\"]";
|
|
5234
|
+
function Il({ collapsed: e, occupied: t, files: n }) {
|
|
5126
5235
|
let [r, i] = G(!1), [a, o] = G(!1), s = kt();
|
|
5127
5236
|
return {
|
|
5128
5237
|
pill: e === "auto" && !a && !t && !r,
|
|
@@ -5141,14 +5250,14 @@ function Cl({ collapsed: e, occupied: t, files: n }) {
|
|
|
5141
5250
|
},
|
|
5142
5251
|
onBlur: (e) => {
|
|
5143
5252
|
let t = e.relatedTarget;
|
|
5144
|
-
e.currentTarget.contains(t) || t?.closest(
|
|
5253
|
+
e.currentTarget.contains(t) || t?.closest(Fl) || o(!1);
|
|
5145
5254
|
}
|
|
5146
5255
|
}
|
|
5147
5256
|
};
|
|
5148
5257
|
}
|
|
5149
5258
|
//#endregion
|
|
5150
5259
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/build-message.ts
|
|
5151
|
-
async function
|
|
5260
|
+
async function Ll(e, t) {
|
|
5152
5261
|
let n = e.getValue(), r = e.getJSON(), i = e.getExtensions?.();
|
|
5153
5262
|
return {
|
|
5154
5263
|
value: n,
|
|
@@ -5157,11 +5266,11 @@ async function wl(e, t) {
|
|
|
5157
5266
|
attachments: t
|
|
5158
5267
|
};
|
|
5159
5268
|
}
|
|
5160
|
-
var
|
|
5269
|
+
var Rl = (e, t) => e.trim().length > 0 || t > 0;
|
|
5161
5270
|
//#endregion
|
|
5162
5271
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-send.ts
|
|
5163
|
-
function
|
|
5164
|
-
let { t: s } =
|
|
5272
|
+
function zl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSchedule: a, onError: o }) {
|
|
5273
|
+
let { t: s } = M(), [c, l] = G(!1), u = W(!1), d = () => Ll({
|
|
5165
5274
|
getValue: () => e.getValue(),
|
|
5166
5275
|
getJSON: () => e.editor?.getJSON() ?? { type: "doc" },
|
|
5167
5276
|
getExtensions: () => e.editor?.extensionManager.extensions
|
|
@@ -5199,20 +5308,20 @@ function El({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSche
|
|
|
5199
5308
|
}
|
|
5200
5309
|
//#endregion
|
|
5201
5310
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-rich-chat-composer.ts
|
|
5202
|
-
function
|
|
5311
|
+
function Bl({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1, isLoading: a = !1, accept: o, maxFiles: s, attachments: c, onAttachmentsChange: l }) {
|
|
5203
5312
|
let [u, d] = G([]), f = c ?? u, p = (e) => {
|
|
5204
5313
|
c === void 0 && d(e), l?.(e);
|
|
5205
|
-
}, m = W(null), h =
|
|
5314
|
+
}, m = W(null), h = ye({
|
|
5206
5315
|
attachments: f,
|
|
5207
5316
|
accept: o,
|
|
5208
5317
|
maxFiles: s,
|
|
5209
5318
|
disabled: i,
|
|
5210
5319
|
isLoading: a,
|
|
5211
5320
|
onAttachmentsChange: p
|
|
5212
|
-
}), g = !
|
|
5321
|
+
}), g = !Rl(P({
|
|
5213
5322
|
editor: e.editor,
|
|
5214
5323
|
selector: (e) => (e.editor?.getText().trim().length ?? 0) > 0
|
|
5215
|
-
}) ?? !1 ? "x" : "", f.length), _ =
|
|
5324
|
+
}) ?? !1 ? "x" : "", f.length), _ = zl({
|
|
5216
5325
|
handle: e,
|
|
5217
5326
|
attachments: f,
|
|
5218
5327
|
blocked: g || h.isDisabled,
|
|
@@ -5237,11 +5346,11 @@ function Dl({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1,
|
|
|
5237
5346
|
}
|
|
5238
5347
|
//#endregion
|
|
5239
5348
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer.ts
|
|
5240
|
-
function
|
|
5241
|
-
let { t } =
|
|
5349
|
+
function Vl(e) {
|
|
5350
|
+
let { t } = M(), { disabled: n = !1, isLoading: r = !1, collapsed: i = "never" } = e, a = !n && !r, o = Pl({
|
|
5242
5351
|
...e,
|
|
5243
5352
|
editable: a
|
|
5244
|
-
}), s =
|
|
5353
|
+
}), s = Bl({
|
|
5245
5354
|
...e,
|
|
5246
5355
|
handle: o
|
|
5247
5356
|
}), { files: c, attachments: l } = s;
|
|
@@ -5249,7 +5358,7 @@ function Ol(e) {
|
|
|
5249
5358
|
handle: o,
|
|
5250
5359
|
editable: a,
|
|
5251
5360
|
composer: s,
|
|
5252
|
-
ui:
|
|
5361
|
+
ui: Il({
|
|
5253
5362
|
collapsed: i,
|
|
5254
5363
|
occupied: !o.isEmpty || !!e.replyTo || l.length > 0,
|
|
5255
5364
|
files: c
|
|
@@ -5268,47 +5377,46 @@ function Ol(e) {
|
|
|
5268
5377
|
}
|
|
5269
5378
|
//#endregion
|
|
5270
5379
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/rich-chat-composer.tsx
|
|
5271
|
-
function
|
|
5272
|
-
let { t: n } =
|
|
5380
|
+
function Hl(e) {
|
|
5381
|
+
let { t: n } = M(), { mentions: r, replyTo: a, onCancelReply: o, actions: s, className: l } = e, { sendOnEnter: u = !0, sendLabel: d, isLoading: f = !1 } = e, { look: p = "expressive" } = e, { handle: m, editable: h, composer: g, ui: v, attach: y } = Vl(e), { files: b, attachments: x } = g, { pill: S } = v;
|
|
5273
5382
|
return /* @__PURE__ */ J("form", {
|
|
5274
5383
|
"data-slot": "rich-chat-composer",
|
|
5275
5384
|
"data-look": p,
|
|
5276
5385
|
"data-collapsed": S || void 0,
|
|
5277
|
-
onSubmit:
|
|
5386
|
+
onSubmit: g.handleSubmit,
|
|
5278
5387
|
...v.formEvents,
|
|
5279
|
-
className:
|
|
5280
|
-
|
|
5388
|
+
className: El({
|
|
5389
|
+
pill: S,
|
|
5390
|
+
look: p,
|
|
5391
|
+
editable: h,
|
|
5392
|
+
className: l
|
|
5393
|
+
}),
|
|
5394
|
+
children: /* @__PURE__ */ Y(_, {
|
|
5281
5395
|
editor: m,
|
|
5282
5396
|
className: "contents",
|
|
5283
5397
|
look: p,
|
|
5284
5398
|
children: [
|
|
5285
|
-
/* @__PURE__ */ J(
|
|
5286
|
-
error: b.errorMessage ??
|
|
5399
|
+
/* @__PURE__ */ J(Dl, {
|
|
5400
|
+
error: b.errorMessage ?? g.sendError,
|
|
5287
5401
|
replyTo: a,
|
|
5288
5402
|
onCancelReply: o,
|
|
5289
5403
|
attachments: x,
|
|
5290
5404
|
isDisabled: b.isDisabled,
|
|
5291
|
-
onAttachmentsChange:
|
|
5405
|
+
onAttachmentsChange: g.setAttachments
|
|
5292
5406
|
}),
|
|
5293
|
-
/* @__PURE__ */ J(
|
|
5407
|
+
/* @__PURE__ */ J(jl, {
|
|
5294
5408
|
className: t("min-w-0 px-2 py-1", S ? "order-2 flex-1" : "w-full"),
|
|
5295
5409
|
onFocus: v.activate,
|
|
5296
|
-
onSend: () => void
|
|
5410
|
+
onSend: () => void g.send(),
|
|
5297
5411
|
sendOnEnter: u,
|
|
5298
|
-
disabled: !
|
|
5299
|
-
children: /* @__PURE__ */ J(
|
|
5412
|
+
disabled: !h,
|
|
5413
|
+
children: /* @__PURE__ */ J(ne, {})
|
|
5300
5414
|
}),
|
|
5301
|
-
v.formatOpen && !S && /* @__PURE__ */ J(
|
|
5415
|
+
v.formatOpen && !S && /* @__PURE__ */ J(Ol, {
|
|
5302
5416
|
id: v.toolbarId,
|
|
5303
|
-
|
|
5304
|
-
className: "w-full px-1",
|
|
5305
|
-
children: /* @__PURE__ */ J(T, {
|
|
5306
|
-
dividers: !1,
|
|
5307
|
-
density: "compact",
|
|
5308
|
-
className: Ic(p, yc)
|
|
5309
|
-
})
|
|
5417
|
+
look: p
|
|
5310
5418
|
}),
|
|
5311
|
-
/* @__PURE__ */ J(
|
|
5419
|
+
/* @__PURE__ */ J(Nl, {
|
|
5312
5420
|
pill: S,
|
|
5313
5421
|
formatOpen: v.formatOpen,
|
|
5314
5422
|
toolbarId: v.toolbarId,
|
|
@@ -5319,13 +5427,13 @@ function kl(e) {
|
|
|
5319
5427
|
}),
|
|
5320
5428
|
/* @__PURE__ */ J("div", {
|
|
5321
5429
|
className: t("shrink-0", S && "order-3"),
|
|
5322
|
-
children: /* @__PURE__ */ J(
|
|
5430
|
+
children: /* @__PURE__ */ J(kl, {
|
|
5323
5431
|
sendLabel: d ?? n("material.chat.send", "Send"),
|
|
5324
5432
|
stopLabel: n("material.chat.composer.stop", "Stop generating"),
|
|
5325
5433
|
disabled: b.isDisabled,
|
|
5326
|
-
empty:
|
|
5434
|
+
empty: g.empty,
|
|
5327
5435
|
onStop: f ? e.onStop : void 0,
|
|
5328
|
-
onSchedule:
|
|
5436
|
+
onSchedule: g.schedule,
|
|
5329
5437
|
squircle: p === "expressive"
|
|
5330
5438
|
})
|
|
5331
5439
|
}),
|
|
@@ -5337,10 +5445,10 @@ function kl(e) {
|
|
|
5337
5445
|
}
|
|
5338
5446
|
//#endregion
|
|
5339
5447
|
//#region lib/components/ui/widgets/editor/index.ts
|
|
5340
|
-
var
|
|
5341
|
-
Root:
|
|
5342
|
-
Content:
|
|
5343
|
-
Toolbar:
|
|
5448
|
+
var Ul = {
|
|
5449
|
+
Root: _,
|
|
5450
|
+
Content: ne,
|
|
5451
|
+
Toolbar: O,
|
|
5344
5452
|
Panel: Ar,
|
|
5345
5453
|
AssistantPanel: or,
|
|
5346
5454
|
BubbleMenu: c,
|
|
@@ -5354,8 +5462,8 @@ var Al = {
|
|
|
5354
5462
|
FindPanel: ha,
|
|
5355
5463
|
BlockHandle: Ui,
|
|
5356
5464
|
FocusExit: va,
|
|
5357
|
-
Field:
|
|
5465
|
+
Field: Pe,
|
|
5358
5466
|
Presence: mr
|
|
5359
5467
|
};
|
|
5360
5468
|
//#endregion
|
|
5361
|
-
export {
|
|
5469
|
+
export { Gc as CompactEditor, Kc as CompactEditorFormField, wl as DocumentEditor, Tl as DocumentEditorFormField, Ul as Editor, or as EditorAssistantPanel, Ui as EditorBlockHandle, c as EditorBubbleMenu, Er as EditorCommentComposer, vi as EditorCommentsPanel, Di as EditorCommentsRail, ne as EditorContent, Pe as EditorField, ha as EditorFindPanel, va as EditorFocusExit, wa as EditorFooter, Ma as EditorOutline, Pa as EditorOutlinePanel, Ar as EditorPanel, mr as EditorPresence, _ as EditorRoot, i as EditorSuggestionList, O as EditorToolbar, Hl as RichChatComposer, sc as chatKit, oc as compactKit, B as defineFeature, ac as documentKit, tc as editorFeatures, ic as formNodesKit, vt as fromMarkdown, Va as looksLikeMarkdown, yt as toHtml, _t as toJson, gt as toMarkdown, h as useEditor, k as useEditorContext, ur as useEditorPresence, xa as useEditorStats, La as useEditorUploads, nc as withFeatures, rc as withoutFeatures };
|