@nxgt/material 3.93.0 → 3.95.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 +50 -0
- package/README.md +8 -3
- package/dist/{alert-dialog-D37eph4I.js → alert-dialog-D4r0Kn9h.js} +1 -1
- package/dist/{async-slice-BSqwhAj-.js → async-slice-Bx438UlG.js} +1 -1
- package/dist/{button-CG9SBAT-.js → button-Z_xcg10A.js} +1 -1
- package/dist/{calculator-YD3I3y-I.js → calculator-DGxClOmW.js} +10 -10
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-Cjec9zi7.js → calculator-segment-DQE1EFdw.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-BbUSBl3i.js → chip-Bb9SM3Ly.js} +2 -2
- package/dist/{code-editor-ZEM7AAcs.js → code-editor-Cw-dOrn2.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-CAuHPrHd.js → code-language-items-BVfxGKiv.js} +2 -2
- package/dist/components/components.css +7 -1
- package/dist/components/theme-tokens.css +7 -0
- package/dist/components/ui/dates/duration-field/duration-field-expressive.css +2 -63
- package/dist/components/ui/dates/picker-trigger/typed-box-expressive.css +30 -21
- package/dist/components/ui/fields/number-field/number-field-score.css +151 -0
- package/dist/components/ui/fields/quantity-field/quantity-field.css +117 -0
- package/dist/components/ui/primitives/field-box/field-box-parts.css +1 -2
- package/dist/components/ui/primitives/field-box/field-box-tokens.css +54 -36
- package/dist/components/ui/primitives/field-box/field-box.css +44 -86
- package/dist/components/ui/primitives/field-box/field-stepper.css +129 -0
- package/dist/{components-CuFTrmGy.js → components-5n6qa3vr.js} +19380 -18872
- package/dist/components.js +37 -38
- package/dist/{conversion-variant-DmEtTCSP.js → conversion-variant-BjIJep32.js} +4 -4
- package/dist/currency-field-DzLtJtDI.js +303 -0
- package/dist/{dialog-Jhpx6ulb.js → dialog-CFuONiW5.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-nl0Q3tQ2.js → dropdown-menu-BvtBDoSD.js} +1 -1
- package/dist/editor.js +442 -442
- package/dist/{empty-state-mrJuqph3.js → empty-state-n2zb23YG.js} +1 -1
- package/dist/{financial-variant-P8gFA9aI.js → financial-variant-CniddOSL.js} +7 -7
- package/dist/{hooks-CjSpziWf.js → hooks-zyRsvilJ.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BNb1M8ij.js → hover-card-BJ15hu7B.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-CVMHwdFm.js → icon-badge-B2ns44Cz.js} +1 -1
- package/dist/{icon-button-Ch0PThsa.js → icon-button-BG438okX.js} +1 -1
- package/dist/lib/components/ui/display/entity-header/entity-metadata.d.ts +0 -7
- package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +2 -1
- package/dist/lib/components/ui/display/markdown/markdown.d.ts +2 -2
- package/dist/lib/components/ui/display/markdown/rehype-katex-classes.d.ts +21 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/index.d.ts +2 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-preview.d.ts +6 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-syntax-help.d.ts +4 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-tabs.d.ts +13 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-textarea-field.d.ts +23 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-textarea-form-field.d.ts +3 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/use-text-value.d.ts +6 -0
- package/dist/lib/components/ui/fields/number-field/number-control.d.ts +10 -3
- package/dist/lib/components/ui/fields/number-field/number-field-base.d.ts +2 -0
- package/dist/lib/components/ui/fields/number-field/number-field.d.ts +7 -1
- package/dist/lib/components/ui/fields/number-field/number-field.types.d.ts +13 -0
- package/dist/lib/components/ui/fields/number-field/number-score-control.d.ts +19 -0
- package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +16 -2
- package/dist/lib/components/ui/fields/quantity-field/quantity-field.d.ts +4 -3
- package/dist/lib/components/ui/fields/quantity-field/quantity-row.d.ts +5 -9
- package/dist/lib/components/ui/fields/quantity-field/quantity-unit-menu.d.ts +19 -0
- package/dist/lib/components/ui/fields/quantity-field/quantity-unit.d.ts +11 -4
- package/dist/lib/components/ui/fields/quantity-field/use-unit-chip-name.d.ts +14 -0
- package/dist/lib/components/ui/fields/switch/partials/switch-row.d.ts +2 -2
- package/dist/lib/components/ui/fields/switch/switch.d.ts +2 -2
- package/dist/lib/components/ui/fields/text-field/text-field-units.d.ts +22 -0
- package/dist/lib/components/ui/fields/text-field/text-field.d.ts +9 -0
- package/dist/lib/components/ui/fields/verification-code/partials/code-surface.d.ts +13 -6
- package/dist/lib/components/ui/fields/verification-code/partials/recovery-input.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-group.d.ts +12 -0
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +7 -0
- package/dist/lib/components/ui/primitives/input-group/input-group.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/partials/question-hints.d.ts +9 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/question-reveal.d.ts +13 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/rich-text.d.ts +17 -0
- package/dist/lib/components/ui/widgets/education/questions/types.d.ts +40 -1
- package/dist/lib/i18n/resources/en/en.d.ts +29 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +31 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +29 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +31 -2
- package/dist/lib/i18n/resources/resources.d.ts +58 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +53 -54
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/percent-field-CeDpzUTS.js +137 -0
- package/dist/{picker-surface-CoNsDWxX.js → picker-surface-Cr2n42qv.js} +4 -4
- package/dist/{popover-BA1U82Wk.js → popover-XBAX2Shp.js} +1 -1
- package/dist/{pos-types-BQqv-kb6.js → pos-types-BFVWeJki.js} +1 -1
- package/dist/{pos-variant-D043n5y8.js → pos-variant-DWB8Bc12.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-jneMqtLs.js → programmer-variant-B-wPnDeX.js} +2 -2
- package/dist/{public-DgrbdeZj.js → public-D1bH-KPQ.js} +9 -9
- package/dist/{rich-code-block-CGNjHawR.js → rich-code-block-DP2RT7pV.js} +5 -5
- package/dist/{scientific-variant-1L7brNNT.js → scientific-variant-BP08Mo0g.js} +2 -2
- package/dist/{sortable-provider-DZLV_svg.js → sortable-provider-CHGZrS0f.js} +2 -2
- package/dist/{spinner-CQqRWxAW.js → spinner-rk8J5y9O.js} +1 -1
- package/dist/styles.css +2 -0
- package/dist/{tabs-DQTx3C8e.js → tabs-nuYLggwC.js} +1 -1
- package/dist/text-field-DxKSPY0T.js +154 -0
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-3NQ3VmJH.js → theme-toggle-5waw9Wk8.js} +1 -1
- package/dist/{toolbar-items-BYCdJGUf.js → toolbar-items-Bo-nMzKJ.js} +4 -4
- package/dist/{translate-material-jxfcGlD5.js → translate-material-H5GMStyF.js} +1 -1
- package/dist/{translator-6XuDmqUJ.js → translator-gdpQeToI.js} +62 -4
- package/dist/{use-chat-composer-1eb4I1kM.js → use-chat-composer-yTODkjut.js} +24 -25
- package/dist/{use-heading-spy-CzPujlKr.js → use-heading-spy-n_wPa5jC.js} +4 -4
- package/dist/{use-material-translation-BUPqNmAg.js → use-material-translation-BW5HZMwt.js} +1 -1
- package/dist/{use-return-focus-B_enQxp5.js → use-return-focus-BC4sGh1b.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/data-display.md +7 -6
- package/docs/components/date-and-time.md +25 -23
- package/docs/components/form-fields.md +119 -26
- package/docs/components/navigation-and-layout.md +1 -1
- package/docs/components/rich-widgets.md +29 -0
- package/docs/guides/app-shell.md +15 -0
- package/docs/guides/csp.md +20 -8
- package/docs/guides/field-look-2-x.md +10 -4
- package/docs/guides/field-look-refined.md +130 -0
- package/docs/guides/forms.md +1 -0
- package/docs/guides/i18n.md +1 -1
- package/docs/guides/layouts.md +2 -1
- package/docs/guides/theming.md +39 -31
- package/docs/previews/backgrounds-icons-quiet-band.webp +0 -0
- package/docs/previews/backgrounds-icons.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/buttons-actions-actioncard.webp +0 -0
- package/docs/previews/buttons-actions-backlink.webp +0 -0
- package/docs/previews/buttons-actions-button.webp +0 -0
- package/docs/previews/buttons-actions-buttongroup.webp +0 -0
- package/docs/previews/buttons-actions-fab.webp +0 -0
- package/docs/previews/buttons-actions-fabmenu.webp +0 -0
- package/docs/previews/buttons-actions-iconbutton.webp +0 -0
- package/docs/previews/buttons-actions-languageswitcher.webp +0 -0
- package/docs/previews/buttons-actions-linkbutton.webp +0 -0
- package/docs/previews/buttons-actions-loadmorebutton.webp +0 -0
- package/docs/previews/buttons-actions-loadmorefooter.webp +0 -0
- package/docs/previews/buttons-actions-responsivebutton.webp +0 -0
- package/docs/previews/buttons-actions-scrolltolatestbutton.webp +0 -0
- package/docs/previews/buttons-actions-scrolltotop.webp +0 -0
- package/docs/previews/buttons-actions-splitbutton.webp +0 -0
- package/docs/previews/buttons-actions-themetoggle.webp +0 -0
- package/docs/previews/buttons-actions-toolbar-density-and-keyboard.webp +0 -0
- package/docs/previews/buttons-actions-toolbar.webp +0 -0
- package/docs/previews/data-display-accordioncard.webp +0 -0
- package/docs/previews/data-display-apiendpoint.webp +0 -0
- package/docs/previews/data-display-apioperation.webp +0 -0
- package/docs/previews/data-display-avatar.webp +0 -0
- package/docs/previews/data-display-badge.webp +0 -0
- package/docs/previews/data-display-card-presets.webp +0 -0
- package/docs/previews/data-display-changehistory.webp +0 -0
- package/docs/previews/data-display-chip.webp +0 -0
- package/docs/previews/data-display-codegroup.webp +0 -0
- package/docs/previews/data-display-description.webp +0 -0
- package/docs/previews/data-display-enrolmentcard.webp +0 -0
- package/docs/previews/data-display-enrolmentsecret.webp +0 -0
- package/docs/previews/data-display-entityheader.webp +0 -0
- package/docs/previews/data-display-metric-cards.webp +0 -0
- package/docs/previews/data-display-periodcards.webp +0 -0
- package/docs/previews/data-display-recoverycodes.webp +0 -0
- package/docs/previews/data-display-recoverycodesstatus.webp +0 -0
- package/docs/previews/data-display-secretcard.webp +0 -0
- package/docs/previews/data-display-terminal.webp +0 -0
- package/docs/previews/data-display-timeline.webp +0 -0
- package/docs/previews/data-display-tonevalue.webp +0 -0
- package/docs/previews/data-display-votetally.webp +0 -0
- package/docs/previews/data-table-filter-lists-datagrid.webp +0 -0
- package/docs/previews/data-table-filter-lists-datatable.webp +0 -0
- package/docs/previews/data-table-filter-lists-daygroupedlist.webp +0 -0
- package/docs/previews/data-table-filter-lists-drag-and-drop.webp +0 -0
- package/docs/previews/data-table-filter-lists-facetgroup.webp +0 -0
- package/docs/previews/data-table-filter-lists-filter.webp +0 -0
- package/docs/previews/data-table-filter-lists-listempty.webp +0 -0
- package/docs/previews/data-table-filter-lists-listpane.webp +0 -0
- package/docs/previews/data-table-filter-lists-markinglist.webp +0 -0
- package/docs/previews/data-table-filter-lists-pagination.webp +0 -0
- package/docs/previews/data-table-filter-lists-servertable.webp +0 -0
- package/docs/previews/data-table-filter-lists-tree.webp +0 -0
- package/docs/previews/date-time-agefield.webp +0 -0
- package/docs/previews/date-time-calendar-expressive.webp +0 -0
- package/docs/previews/date-time-calendar.webp +0 -0
- package/docs/previews/date-time-datefield.webp +0 -0
- package/docs/previews/date-time-daterangefield.webp +0 -0
- package/docs/previews/date-time-durationfield.webp +0 -0
- package/docs/previews/date-time-fields-expressive.webp +0 -0
- package/docs/previews/date-time-halfdayrangefield.webp +0 -0
- package/docs/previews/date-time-nowindicator.webp +0 -0
- package/docs/previews/date-time-timefield.webp +0 -0
- package/docs/previews/date-time-timepicker-tiles.webp +0 -0
- package/docs/previews/date-time-timepicker.webp +0 -0
- package/docs/previews/feedback-status-alert.webp +0 -0
- package/docs/previews/feedback-status-alertdialog.webp +0 -0
- package/docs/previews/feedback-status-celebration.webp +0 -0
- package/docs/previews/feedback-status-circularprogress.webp +0 -0
- package/docs/previews/feedback-status-confirmationdialog.webp +0 -0
- package/docs/previews/feedback-status-confirmdialog.webp +0 -0
- package/docs/previews/feedback-status-countdowntimer.webp +0 -0
- package/docs/previews/feedback-status-customalertdialog.webp +0 -0
- package/docs/previews/feedback-status-customdialog.webp +0 -0
- package/docs/previews/feedback-status-emptystate.webp +0 -0
- package/docs/previews/feedback-status-errorstate.webp +0 -0
- package/docs/previews/feedback-status-hydrateloading.webp +0 -0
- package/docs/previews/feedback-status-illustration-education.webp +0 -0
- package/docs/previews/feedback-status-illustration-game.webp +0 -0
- package/docs/previews/feedback-status-illustration-health.webp +0 -0
- package/docs/previews/feedback-status-illustration.webp +0 -0
- package/docs/previews/feedback-status-notificationrow.webp +0 -0
- package/docs/previews/feedback-status-notifications.webp +0 -0
- package/docs/previews/feedback-status-pageloadfailed.webp +0 -0
- package/docs/previews/feedback-status-progress.webp +0 -0
- package/docs/previews/feedback-status-skeleton.webp +0 -0
- package/docs/previews/feedback-status-spinner.webp +0 -0
- package/docs/previews/feedback-status-stalenotice.webp +0 -0
- package/docs/previews/feedback-status-stepupdialog-retry.webp +0 -0
- package/docs/previews/feedback-status-stepupdialog.webp +0 -0
- package/docs/previews/feedback-status-toast.webp +0 -0
- package/docs/previews/feedback-status-typingindicator.webp +0 -0
- package/docs/previews/feedback-status-unsaveddialog.webp +0 -0
- package/docs/previews/form-fields-attributes.webp +0 -0
- package/docs/previews/form-fields-choicelistfield.webp +0 -0
- package/docs/previews/form-fields-colorfield.webp +0 -0
- package/docs/previews/form-fields-contacts.webp +0 -0
- package/docs/previews/form-fields-countryfield.webp +0 -0
- package/docs/previews/form-fields-currencyfield.webp +0 -0
- package/docs/previews/form-fields-emailfield.webp +0 -0
- package/docs/previews/form-fields-field.webp +0 -0
- package/docs/previews/form-fields-formsection.webp +0 -0
- package/docs/previews/form-fields-inlineedit.webp +0 -0
- package/docs/previews/form-fields-inputgroupfield.webp +0 -0
- package/docs/previews/form-fields-localizedtextfields.webp +0 -0
- package/docs/previews/form-fields-markdowntextareafield.webp +0 -0
- package/docs/previews/form-fields-numberfield.webp +0 -0
- package/docs/previews/form-fields-openinghours.webp +0 -0
- package/docs/previews/form-fields-otpfield.webp +0 -0
- package/docs/previews/form-fields-passwordfield.webp +0 -0
- package/docs/previews/form-fields-percentfield.webp +0 -0
- package/docs/previews/form-fields-phonefield.webp +0 -0
- package/docs/previews/form-fields-postaladdress.webp +0 -0
- package/docs/previews/form-fields-repeatablegroup.webp +0 -0
- package/docs/previews/form-fields-searchfield.webp +0 -0
- package/docs/previews/form-fields-slider.webp +0 -0
- package/docs/previews/form-fields-switch.webp +0 -0
- package/docs/previews/form-fields-textareafield.webp +0 -0
- package/docs/previews/form-fields-textfield.webp +0 -0
- package/docs/previews/form-fields-timezonefield.webp +0 -0
- package/docs/previews/form-fields-urlfield.webp +0 -0
- package/docs/previews/form-fields-verificationcode.webp +0 -0
- package/docs/previews/foundations-themes-gallery.webp +0 -0
- package/docs/previews/foundations-themes-icon-motifs.webp +0 -0
- package/docs/previews/foundations-themes-nesting.webp +0 -0
- package/docs/previews/foundations-themes-provider.webp +0 -0
- package/docs/previews/foundations-themes-themepicker.webp +0 -0
- package/docs/previews/guides-i18n-i18nprovider.webp +0 -0
- package/docs/previews/guides-i18n-translated-components.webp +0 -0
- package/docs/previews/media-files-audioplayer.webp +0 -0
- package/docs/previews/media-files-camera.webp +0 -0
- package/docs/previews/media-files-carousel.webp +0 -0
- package/docs/previews/media-files-filelist.webp +0 -0
- package/docs/previews/media-files-filelistfield.webp +0 -0
- package/docs/previews/media-files-filepreview.webp +0 -0
- package/docs/previews/media-files-gallery-image-lists.webp +0 -0
- package/docs/previews/media-files-gallery-video.webp +0 -0
- package/docs/previews/media-files-gallery-viewer.webp +0 -0
- package/docs/previews/media-files-gallery.webp +0 -0
- package/docs/previews/media-files-imagecropper.webp +0 -0
- package/docs/previews/media-files-imageeditor.webp +0 -0
- package/docs/previews/media-files-imagefield.webp +0 -0
- package/docs/previews/media-files-lightboxgallery.webp +0 -0
- package/docs/previews/media-files-map.webp +0 -0
- package/docs/previews/media-files-mediaplayer.webp +0 -0
- package/docs/previews/media-files-mediaplayerhost.webp +0 -0
- package/docs/previews/media-files-mediaplayerlightbox.webp +0 -0
- package/docs/previews/media-files-mediaplayermini.webp +0 -0
- package/docs/previews/media-files-minigallery.webp +0 -0
- package/docs/previews/media-files-pdfreader.webp +0 -0
- package/docs/previews/media-files-uploadfield.webp +0 -0
- package/docs/previews/navigation-layout-appshell-blue-moon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
- package/docs/previews/navigation-layout-appshell-page-ground.webp +0 -0
- package/docs/previews/navigation-layout-appshell-themes.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-authcard-split.webp +0 -0
- package/docs/previews/navigation-layout-authcard.webp +0 -0
- package/docs/previews/navigation-layout-background.webp +0 -0
- package/docs/previews/navigation-layout-breadcrumb.webp +0 -0
- package/docs/previews/navigation-layout-doc-api.webp +0 -0
- package/docs/previews/navigation-layout-doc-blocks.webp +0 -0
- package/docs/previews/navigation-layout-doc.webp +0 -0
- package/docs/previews/navigation-layout-editorlayout.webp +0 -0
- package/docs/previews/navigation-layout-hero.webp +0 -0
- package/docs/previews/navigation-layout-landinglayout.webp +0 -0
- package/docs/previews/navigation-layout-listdetailslayout.webp +0 -0
- package/docs/previews/navigation-layout-pager.webp +0 -0
- package/docs/previews/navigation-layout-recordpage.webp +0 -0
- package/docs/previews/navigation-layout-settingslayout.webp +0 -0
- package/docs/previews/navigation-layout-sidebar.webp +0 -0
- package/docs/previews/navigation-layout-steps.webp +0 -0
- package/docs/previews/navigation-layout-stickyactionbar.webp +0 -0
- package/docs/previews/navigation-layout-threadlayout-pages.webp +0 -0
- package/docs/previews/navigation-layout-toc.webp +0 -0
- package/docs/previews/overlays-menus-contextmenu.webp +0 -0
- package/docs/previews/overlays-menus-dialog.webp +0 -0
- package/docs/previews/overlays-menus-drawer.webp +0 -0
- package/docs/previews/overlays-menus-dropdownmenu.webp +0 -0
- package/docs/previews/overlays-menus-hovercard.webp +0 -0
- package/docs/previews/overlays-menus-popover.webp +0 -0
- package/docs/previews/overlays-menus-sheet.webp +0 -0
- package/docs/previews/overlays-menus-tooltip.webp +0 -0
- package/docs/previews/primitives-accordion.webp +0 -0
- package/docs/previews/primitives-card.webp +0 -0
- package/docs/previews/primitives-collapsible.webp +0 -0
- package/docs/previews/primitives-extendedlabel.webp +0 -0
- package/docs/previews/primitives-helpertext.webp +0 -0
- package/docs/previews/primitives-input.webp +0 -0
- package/docs/previews/primitives-inputgroup.webp +0 -0
- package/docs/previews/primitives-label.webp +0 -0
- package/docs/previews/primitives-scrollarea.webp +0 -0
- package/docs/previews/primitives-segmentednav.webp +0 -0
- package/docs/previews/primitives-tabs.webp +0 -0
- package/docs/previews/primitives-tabsnav.webp +0 -0
- package/docs/previews/primitives-textarea.webp +0 -0
- package/docs/previews/primitives-toggle.webp +0 -0
- package/docs/previews/primitives-togglegroup.webp +0 -0
- package/docs/previews/primitives-typography.webp +0 -0
- package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
- package/docs/previews/rich-widgets-chat-action-proposal.webp +0 -0
- package/docs/previews/rich-widgets-chat-advanced.webp +0 -0
- package/docs/previews/rich-widgets-chat-composer.webp +0 -0
- package/docs/previews/rich-widgets-chat-inbox.webp +0 -0
- package/docs/previews/rich-widgets-chat-overview.webp +0 -0
- package/docs/previews/rich-widgets-chat-thread.webp +0 -0
- package/docs/previews/rich-widgets-chat-widget.webp +0 -0
- package/docs/previews/rich-widgets-codeeditor.webp +0 -0
- package/docs/previews/rich-widgets-compacteditor.webp +0 -0
- package/docs/previews/rich-widgets-documenteditor.webp +0 -0
- package/docs/previews/rich-widgets-drawing.webp +0 -0
- package/docs/previews/rich-widgets-emojipicker.webp +0 -0
- package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
- package/docs/previews/rich-widgets-kanban-phone-layout.webp +0 -0
- package/docs/previews/rich-widgets-kanban.webp +0 -0
- package/docs/previews/rich-widgets-mentionlist.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-areachart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-barchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-combochart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-donutchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-funnelchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-heatmapchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-linechart-reference.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-linechart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-palette.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-piechart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-radarchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-radialbarchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-scatterchart.webp +0 -0
- package/docs/previews/rich-widgets-questioncard-rich-content.webp +0 -0
- package/docs/previews/rich-widgets-questionmediaview.webp +0 -0
- package/docs/previews/rich-widgets-questionnavigator.webp +0 -0
- package/docs/previews/rich-widgets-quiz.webp +0 -0
- package/docs/previews/rich-widgets-richchatcomposer.webp +0 -0
- package/docs/previews/rich-widgets-richtexteditor.webp +0 -0
- package/docs/previews/rich-widgets-richtextviewer.webp +0 -0
- package/docs/previews/selection-choice-autocomplete.webp +0 -0
- package/docs/previews/selection-choice-checkbox.webp +0 -0
- package/docs/previews/selection-choice-checkboxgroup.webp +0 -0
- package/docs/previews/selection-choice-checkcardfield.webp +0 -0
- package/docs/previews/selection-choice-chipgroupfield.webp +0 -0
- package/docs/previews/selection-choice-choicecardgroup.webp +0 -0
- package/docs/previews/selection-choice-combobox.webp +0 -0
- package/docs/previews/selection-choice-comboboxfield.webp +0 -0
- package/docs/previews/selection-choice-optiontile.webp +0 -0
- package/docs/previews/selection-choice-radiogroup.webp +0 -0
- package/docs/previews/selection-choice-select.webp +0 -0
- package/docs/previews/selection-choice-selectfield.webp +0 -0
- package/docs/previews/selection-choice-sortablelist.webp +0 -0
- package/docs/previews/selection-choice-switcher.webp +0 -0
- package/docs/previews/selection-choice-transferlist.webp +0 -0
- package/docs/previews/selection-choice-treeselectfield.webp +0 -0
- package/docs/roadmap.md +13 -10
- package/docs/troubleshooting.md +66 -6
- package/lib/components/components.css +7 -1
- package/lib/components/theme-tokens.css +7 -0
- package/lib/components/ui/dates/duration-field/duration-field-expressive.css +2 -63
- package/lib/components/ui/dates/picker-trigger/typed-box-expressive.css +30 -21
- package/lib/components/ui/fields/number-field/number-field-score.css +151 -0
- package/lib/components/ui/fields/quantity-field/quantity-field.css +117 -0
- package/lib/components/ui/primitives/field-box/field-box-parts.css +1 -2
- package/lib/components/ui/primitives/field-box/field-box-tokens.css +54 -36
- package/lib/components/ui/primitives/field-box/field-box.css +44 -86
- package/lib/components/ui/primitives/field-box/field-stepper.css +129 -0
- package/lib/styles.css +2 -0
- package/lib/themes/ambre.css +5 -1
- package/lib/themes/ardoise.css +5 -1
- package/lib/themes/bleumono.css +5 -1
- package/lib/themes/bluemoon.css +5 -1
- package/lib/themes/corail.css +5 -1
- package/lib/themes/foret.css +5 -1
- package/lib/themes/lavande.css +5 -1
- package/lib/themes/menthe.css +5 -1
- package/lib/themes/ocean.css +5 -1
- package/lib/themes/pink.css +5 -1
- package/lib/themes/prune.css +5 -1
- package/lib/themes/sable.css +5 -1
- package/lib/themes/slate.css +5 -1
- package/lib/themes/teal.css +5 -1
- package/package.json +2 -2
- package/dist/currency-field-CabGnVO9.js +0 -289
- package/dist/input-group-CPMSQcBx.js +0 -70
- package/dist/percent-field-TWyupyr_.js +0 -14
- package/dist/text-field-BAdY-kpO.js +0 -59
package/dist/editor.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
2
|
import { t } from "./utils-BLfntITJ.js";
|
|
3
|
-
import { A as n, Ai as r, An as i, Bn as a, C as o, Cn as s, D as c, Dn as l, E as u, G as d,
|
|
4
|
-
import { c as
|
|
5
|
-
import { c as
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { Ft as
|
|
3
|
+
import { A as n, Ai as r, An as i, Bn as a, C as o, Cn as s, D as c, Dn as l, E as u, G as d, H as f, Hn as p, I as m, J as h, K as g, Kn as _, L as v, Mi as y, Mn as b, O as x, On as S, Q as C, S as w, Sn as T, T as E, U as D, Un as ee, V as O, Vn as k, W as te, Wn as ne, X as re, Y as ie, Z as ae, a as oe, an as se, b as A, c as ce, d as le, dn as ue, fn as de, gn as fe, hn as pe, i as me, j as he, ji as ge, jn as _e, k as ve, kn as ye, l as be, on as xe, p as Se, pr as Ce, q as we, qn as Te, s as Ee, sn as De, t as Oe, v as ke, w as Ae, x as je, xn as Me, y as Ne } from "./use-chat-composer-yTODkjut.js";
|
|
4
|
+
import { c as Pe, l as Fe, n as Ie, t as Le } from "./alert-dialog-D4r0Kn9h.js";
|
|
5
|
+
import { c as Re, i as ze, n as Be, o as Ve, r as He, s as Ue, t as We, u as j } from "./dropdown-menu-BvtBDoSD.js";
|
|
6
|
+
import { n as Ge, r as Ke, t as qe } from "./popover-XBAX2Shp.js";
|
|
7
|
+
import { n as Je, t as M } from "./button-Z_xcg10A.js";
|
|
8
|
+
import { t as N } from "./use-material-translation-BW5HZMwt.js";
|
|
9
|
+
import { t as P } from "./icon-button-BG438okX.js";
|
|
10
|
+
import { a as Ye, s as F } from "./dist-C3GR7kJd.js";
|
|
11
|
+
import { n as Xe, t as Ze } from "./toggle-group-CVMxEpWi.js";
|
|
12
|
+
import { t as Qe } from "./input-CC2joTjB.js";
|
|
13
|
+
import { t as $e } from "./text-field-DxKSPY0T.js";
|
|
14
|
+
import { t as et } from "./use-mobile-BDro060N.js";
|
|
15
|
+
import { Ft as tt, Ht as nt, Nt as rt, Ot as it, St as at, bt as I, ht as L, mt as R, n as z, wt as B, xt as ot, yt as st } from "./dist-moutbfbd.js";
|
|
16
16
|
import { t as ct } from "./markdown-Dw_uH7j7.js";
|
|
17
17
|
import { n as lt, r as V, t as ut } from "./create-store-Dqp-PLLn.js";
|
|
18
18
|
import { W as dt, w as ft } from "./youtube-node-A3NPAPgK.js";
|
|
@@ -229,7 +229,7 @@ function Rn(e, t) {
|
|
|
229
229
|
} } }), [e, t]);
|
|
230
230
|
}
|
|
231
231
|
function zn({ editor: e, controller: t, label: n, slot: r = "editor-assistant", locked: i, onDismiss: a, children: o }) {
|
|
232
|
-
let s =
|
|
232
|
+
let s = et(), c = Rn(e, t);
|
|
233
233
|
return s ? Mt(/* @__PURE__ */ J("section", {
|
|
234
234
|
role: "dialog",
|
|
235
235
|
"aria-label": n,
|
|
@@ -237,10 +237,10 @@ function zn({ editor: e, controller: t, label: n, slot: r = "editor-assistant",
|
|
|
237
237
|
"data-layout": "sheet",
|
|
238
238
|
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",
|
|
239
239
|
children: o
|
|
240
|
-
}), document.body) : /* @__PURE__ */ Y(
|
|
240
|
+
}), document.body) : /* @__PURE__ */ Y(qe, {
|
|
241
241
|
open: !0,
|
|
242
242
|
onOpenChange: (e) => !e && a("outside"),
|
|
243
|
-
children: [/* @__PURE__ */ J(
|
|
243
|
+
children: [/* @__PURE__ */ J(Ge, { virtualRef: c }), /* @__PURE__ */ J(Ke, {
|
|
244
244
|
role: "dialog",
|
|
245
245
|
"aria-label": n,
|
|
246
246
|
"data-slot": r,
|
|
@@ -270,7 +270,7 @@ function Bn(e) {
|
|
|
270
270
|
e.preventDefault(), t[i]?.focus();
|
|
271
271
|
}
|
|
272
272
|
function Vn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
273
|
-
let { t: r } =
|
|
273
|
+
let { t: r } = N(), [i, a] = K(null), o = W(() => Ln(i?.actions ?? e, t), [
|
|
274
274
|
i,
|
|
275
275
|
e,
|
|
276
276
|
t
|
|
@@ -306,7 +306,7 @@ function Vn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
function Hn({ onAsk: e }) {
|
|
309
|
-
let { t } =
|
|
309
|
+
let { t } = N(), [n, r] = K(""), i = G(null);
|
|
310
310
|
U(() => i.current?.focus({ preventScroll: !0 }), []);
|
|
311
311
|
let a = () => {
|
|
312
312
|
let t = n.trim();
|
|
@@ -314,7 +314,7 @@ function Hn({ onAsk: e }) {
|
|
|
314
314
|
};
|
|
315
315
|
return /* @__PURE__ */ Y("div", {
|
|
316
316
|
className: "flex items-center gap-1.5",
|
|
317
|
-
children: [/* @__PURE__ */ J(
|
|
317
|
+
children: [/* @__PURE__ */ J(Qe, {
|
|
318
318
|
ref: i,
|
|
319
319
|
value: n,
|
|
320
320
|
"aria-label": t("material.editor.assistant.ask-label", "Ask the assistant"),
|
|
@@ -324,7 +324,7 @@ function Hn({ onAsk: e }) {
|
|
|
324
324
|
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), a());
|
|
325
325
|
},
|
|
326
326
|
className: "h-9 min-w-0 flex-1"
|
|
327
|
-
}), /* @__PURE__ */ J(
|
|
327
|
+
}), /* @__PURE__ */ J(P, {
|
|
328
328
|
variant: "filled",
|
|
329
329
|
"aria-label": t("material.editor.assistant.send", "Send"),
|
|
330
330
|
disabled: !n.trim(),
|
|
@@ -389,12 +389,12 @@ async function Kn(e) {
|
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
function qn({ text: e }) {
|
|
392
|
-
let { t } =
|
|
392
|
+
let { t } = N(), [n, r] = K(!1);
|
|
393
393
|
return U(() => {
|
|
394
394
|
if (!n) return;
|
|
395
395
|
let e = setTimeout(() => r(!1), 1600);
|
|
396
396
|
return () => clearTimeout(e);
|
|
397
|
-
}, [n]), /* @__PURE__ */ Y(
|
|
397
|
+
}, [n]), /* @__PURE__ */ Y(M, {
|
|
398
398
|
variant: "ghost",
|
|
399
399
|
size: "sm",
|
|
400
400
|
onClick: async () => r(await Kn(e)),
|
|
@@ -402,18 +402,18 @@ function qn({ text: e }) {
|
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
404
|
function Jn({ state: e, on: t }) {
|
|
405
|
-
let { t: n } =
|
|
405
|
+
let { t: n } = N(), r = G(null);
|
|
406
406
|
return U(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ Y("div", {
|
|
407
407
|
className: "flex flex-wrap items-center gap-1.5",
|
|
408
408
|
children: [
|
|
409
|
-
e.hasSelection && /* @__PURE__ */ Y(
|
|
409
|
+
e.hasSelection && /* @__PURE__ */ Y(M, {
|
|
410
410
|
ref: r,
|
|
411
411
|
size: "sm",
|
|
412
412
|
disabled: e.applying,
|
|
413
413
|
onClick: () => t.onApply("replace"),
|
|
414
414
|
children: [/* @__PURE__ */ J(ln, {}), n("material.editor.assistant.replace", "Replace selection")]
|
|
415
415
|
}),
|
|
416
|
-
/* @__PURE__ */ Y(
|
|
416
|
+
/* @__PURE__ */ Y(M, {
|
|
417
417
|
ref: e.hasSelection ? void 0 : r,
|
|
418
418
|
variant: e.hasSelection ? "outlined" : "filled",
|
|
419
419
|
size: "sm",
|
|
@@ -422,14 +422,14 @@ function Jn({ state: e, on: t }) {
|
|
|
422
422
|
children: [/* @__PURE__ */ J(Wt, {}), n("material.editor.assistant.insert-below", "Insert below")]
|
|
423
423
|
}),
|
|
424
424
|
/* @__PURE__ */ J(qn, { text: e.text }),
|
|
425
|
-
/* @__PURE__ */ Y(
|
|
425
|
+
/* @__PURE__ */ Y(M, {
|
|
426
426
|
variant: "ghost",
|
|
427
427
|
size: "sm",
|
|
428
428
|
disabled: e.applying,
|
|
429
429
|
onClick: t.onRetry,
|
|
430
430
|
children: [/* @__PURE__ */ J(un, {}), n("material.editor.assistant.retry", "Retry")]
|
|
431
431
|
}),
|
|
432
|
-
/* @__PURE__ */ Y(
|
|
432
|
+
/* @__PURE__ */ Y(M, {
|
|
433
433
|
variant: "ghost",
|
|
434
434
|
size: "sm",
|
|
435
435
|
onClick: t.onDiscard,
|
|
@@ -439,7 +439,7 @@ function Jn({ state: e, on: t }) {
|
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
441
|
function Yn({ state: e, on: t }) {
|
|
442
|
-
let { t: n } =
|
|
442
|
+
let { t: n } = N(), r = G(null);
|
|
443
443
|
return U(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ Y("div", {
|
|
444
444
|
className: "grid gap-2",
|
|
445
445
|
children: [/* @__PURE__ */ J("p", {
|
|
@@ -450,19 +450,19 @@ function Yn({ state: e, on: t }) {
|
|
|
450
450
|
}), /* @__PURE__ */ Y("div", {
|
|
451
451
|
className: "flex flex-wrap items-center gap-1.5",
|
|
452
452
|
children: [
|
|
453
|
-
/* @__PURE__ */ Y(
|
|
453
|
+
/* @__PURE__ */ Y(M, {
|
|
454
454
|
ref: r,
|
|
455
455
|
size: "sm",
|
|
456
456
|
onClick: t.onRetry,
|
|
457
457
|
children: [/* @__PURE__ */ J(un, {}), n("material.editor.assistant.retry", "Retry")]
|
|
458
458
|
}),
|
|
459
|
-
/* @__PURE__ */ J(
|
|
459
|
+
/* @__PURE__ */ J(M, {
|
|
460
460
|
variant: "ghost",
|
|
461
461
|
size: "sm",
|
|
462
462
|
onClick: t.onBack,
|
|
463
463
|
children: n("material.editor.assistant.back", "Back")
|
|
464
464
|
}),
|
|
465
|
-
/* @__PURE__ */ J(
|
|
465
|
+
/* @__PURE__ */ J(M, {
|
|
466
466
|
variant: "ghost",
|
|
467
467
|
size: "sm",
|
|
468
468
|
onClick: t.onDiscard,
|
|
@@ -473,7 +473,7 @@ function Yn({ state: e, on: t }) {
|
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
function Xn({ editor: e, state: t, on: n, status: r }) {
|
|
476
|
-
let { t: i } =
|
|
476
|
+
let { t: i } = N(), a = G(null), o = t.phase === "streaming";
|
|
477
477
|
return U(() => {
|
|
478
478
|
o && a.current?.focus({ preventScroll: !0 });
|
|
479
479
|
}, [o]), /* @__PURE__ */ Y("div", {
|
|
@@ -484,7 +484,7 @@ function Xn({ editor: e, state: t, on: n, status: r }) {
|
|
|
484
484
|
editor: e,
|
|
485
485
|
markdown: t.text
|
|
486
486
|
}),
|
|
487
|
-
o ? /* @__PURE__ */ J("div", { children: /* @__PURE__ */ Y(
|
|
487
|
+
o ? /* @__PURE__ */ J("div", { children: /* @__PURE__ */ Y(M, {
|
|
488
488
|
ref: a,
|
|
489
489
|
variant: "tonal",
|
|
490
490
|
size: "sm",
|
|
@@ -500,7 +500,7 @@ function Xn({ editor: e, state: t, on: n, status: r }) {
|
|
|
500
500
|
//#endregion
|
|
501
501
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-stage.tsx
|
|
502
502
|
function Zn({ label: e, onDiscard: t }) {
|
|
503
|
-
let { t: n } =
|
|
503
|
+
let { t: n } = N();
|
|
504
504
|
return /* @__PURE__ */ Y("div", {
|
|
505
505
|
className: "flex items-center gap-2",
|
|
506
506
|
children: [
|
|
@@ -512,7 +512,7 @@ function Zn({ label: e, onDiscard: t }) {
|
|
|
512
512
|
className: "min-w-0 flex-1 truncate font-medium text-sm",
|
|
513
513
|
children: e
|
|
514
514
|
}),
|
|
515
|
-
/* @__PURE__ */ J(
|
|
515
|
+
/* @__PURE__ */ J(P, {
|
|
516
516
|
variant: "ghost",
|
|
517
517
|
"aria-label": n("material.editor.assistant.discard", "Discard"),
|
|
518
518
|
onClick: t,
|
|
@@ -541,7 +541,7 @@ function Qn({ editor: e, state: t, actions: n, onChoose: r, on: i }) {
|
|
|
541
541
|
}) : null;
|
|
542
542
|
}
|
|
543
543
|
function $n({ note: e }) {
|
|
544
|
-
let { t } =
|
|
544
|
+
let { t } = N();
|
|
545
545
|
return e ? /* @__PURE__ */ J("p", {
|
|
546
546
|
role: "status",
|
|
547
547
|
"data-slot": "editor-assistant-note",
|
|
@@ -550,12 +550,12 @@ function $n({ note: e }) {
|
|
|
550
550
|
}) : null;
|
|
551
551
|
}
|
|
552
552
|
function er({ phase: e, stopped: t }) {
|
|
553
|
-
let { t: n } =
|
|
553
|
+
let { t: n } = N(), r = n("material.editor.assistant.writing", "Writing…");
|
|
554
554
|
return /* @__PURE__ */ J("div", {
|
|
555
555
|
role: "status",
|
|
556
556
|
"data-slot": "editor-assistant-status",
|
|
557
557
|
className: "flex min-h-6 items-center gap-2 text-muted-foreground text-xs",
|
|
558
|
-
children: e === "streaming" ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
558
|
+
children: e === "streaming" ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Ne, {
|
|
559
559
|
label: r,
|
|
560
560
|
className: "size-6"
|
|
561
561
|
}), r] }) : t ? n("material.editor.assistant.stopped", "Stopped") : n("material.editor.assistant.ready", "Answer ready")
|
|
@@ -604,32 +604,32 @@ function or(e) {
|
|
|
604
604
|
//#endregion
|
|
605
605
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-panel.tsx
|
|
606
606
|
function sr(e) {
|
|
607
|
-
let { handle: t, chrome: n } =
|
|
607
|
+
let { handle: t, chrome: n } = _(), r = t.features.some((e) => e.key === "assistant");
|
|
608
608
|
return !t.editor || !r || n.state.panel !== "assistant" ? null : /* @__PURE__ */ J(cr, {});
|
|
609
609
|
}
|
|
610
610
|
function cr() {
|
|
611
|
-
let { t: e, language: t } =
|
|
611
|
+
let { t: e, language: t } = N(), { handle: n } = _(), r = n.editor, i = tr(r), a = or(r), o = i?.controller, s = W(() => In(i?.actions, e), [i?.actions, e]);
|
|
612
612
|
if (U(() => (o?.getState().phase === "idle" && o.begin(), () => o?.reset()), [o]), !o || a.phase === "idle") return null;
|
|
613
613
|
let c = (e) => {
|
|
614
614
|
o.close(), e !== "outside" && r.commands.focus();
|
|
615
615
|
}, l = () => c("discard"), u = (e) => void o.run({
|
|
616
616
|
...e,
|
|
617
617
|
locale: t ?? "en"
|
|
618
|
-
}), d = (e) => void o.apply(async (t) => await An(r, a.text, t, e, { allowMedia: i?.allowMedia }) ? "done" : r.isEditable ? "nothing" : "read-only"),
|
|
618
|
+
}), d = (e) => void o.apply(async (t) => await An(r, a.text, t, e, { allowMedia: i?.allowMedia }) ? "done" : r.isEditable ? "nothing" : "read-only"), f = (e) => {
|
|
619
619
|
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), c("escape"));
|
|
620
|
-
},
|
|
620
|
+
}, p = e("material.editor.assistant.title", "Assistant");
|
|
621
621
|
return /* @__PURE__ */ J(zn, {
|
|
622
622
|
editor: r,
|
|
623
623
|
controller: o,
|
|
624
|
-
label:
|
|
624
|
+
label: p,
|
|
625
625
|
locked: a.phase !== "menu",
|
|
626
626
|
onDismiss: c,
|
|
627
627
|
children: /* @__PURE__ */ Y("div", {
|
|
628
628
|
ref: o.setPanel,
|
|
629
|
-
onKeyDown:
|
|
629
|
+
onKeyDown: f,
|
|
630
630
|
className: "grid gap-2.5",
|
|
631
631
|
children: [/* @__PURE__ */ J(Zn, {
|
|
632
|
-
label: a.run?.label ??
|
|
632
|
+
label: a.run?.label ?? p,
|
|
633
633
|
onDiscard: l
|
|
634
634
|
}), /* @__PURE__ */ J(Qn, {
|
|
635
635
|
editor: r,
|
|
@@ -651,7 +651,7 @@ function cr() {
|
|
|
651
651
|
//#region lib/components/ui/widgets/editor/extensions/collab/use-presence.ts
|
|
652
652
|
var lr = [], ur = () => () => {};
|
|
653
653
|
function dr() {
|
|
654
|
-
let { editor: e } =
|
|
654
|
+
let { editor: e } = _().handle;
|
|
655
655
|
return fr(e);
|
|
656
656
|
}
|
|
657
657
|
function fr(e) {
|
|
@@ -683,7 +683,7 @@ function mr({ user: e }) {
|
|
|
683
683
|
"aria-label": e.name,
|
|
684
684
|
title: e.name,
|
|
685
685
|
className: "flex",
|
|
686
|
-
children: /* @__PURE__ */ J(
|
|
686
|
+
children: /* @__PURE__ */ J(Se, { fallback: /* @__PURE__ */ J("span", {
|
|
687
687
|
ref: (t) => {
|
|
688
688
|
t?.style.setProperty("--nxgt-collab-color", e.color), t?.style.setProperty("--nxgt-collab-fg", Et(e.color));
|
|
689
689
|
},
|
|
@@ -693,20 +693,20 @@ function mr({ user: e }) {
|
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
function hr({ status: e, max: n = 4, className: r }) {
|
|
696
|
-
let { t: i } =
|
|
696
|
+
let { t: i } = N(), a = dr();
|
|
697
697
|
if (!e && a.length === 0) return null;
|
|
698
698
|
let [o, s, c] = e ? pr[e] : [];
|
|
699
699
|
return /* @__PURE__ */ Y("div", {
|
|
700
700
|
"data-slot": "editor-presence",
|
|
701
701
|
"data-status": e,
|
|
702
702
|
className: t("flex items-center gap-3", r),
|
|
703
|
-
children: [s && o && /* @__PURE__ */ J(
|
|
703
|
+
children: [s && o && /* @__PURE__ */ J(ke, {
|
|
704
704
|
tone: o,
|
|
705
705
|
pulse: e === "connecting",
|
|
706
706
|
role: "status",
|
|
707
707
|
className: "text-muted-foreground text-xs",
|
|
708
708
|
children: i(s, c)
|
|
709
|
-
}), a.length > 0 && /* @__PURE__ */ J(
|
|
709
|
+
}), a.length > 0 && /* @__PURE__ */ J(le, {
|
|
710
710
|
size: "sm",
|
|
711
711
|
max: n,
|
|
712
712
|
role: "group",
|
|
@@ -721,7 +721,7 @@ var gr = "[&_textarea]:min-w-0", _r = (e) => e.key === "Enter" && (e.metaKey ||
|
|
|
721
721
|
//#endregion
|
|
722
722
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer-form.tsx
|
|
723
723
|
function vr({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
724
|
-
let { t: a } =
|
|
724
|
+
let { t: a } = N(), o = e.error === "invalid-id" ? a("material.editor.comments.invalid-id", "The adapter answered a thread id that is not allowed.") : e.error;
|
|
725
725
|
return /* @__PURE__ */ Y("form", {
|
|
726
726
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2.5",
|
|
727
727
|
onSubmit: (e) => {
|
|
@@ -762,17 +762,17 @@ function vr({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
764
|
function yr({ pending: e, empty: t, onDismiss: n }) {
|
|
765
|
-
let { t: r } =
|
|
765
|
+
let { t: r } = N();
|
|
766
766
|
return /* @__PURE__ */ Y("div", {
|
|
767
767
|
className: "flex justify-end gap-2",
|
|
768
|
-
children: [/* @__PURE__ */ J(
|
|
768
|
+
children: [/* @__PURE__ */ J(M, {
|
|
769
769
|
type: "button",
|
|
770
770
|
size: "sm",
|
|
771
|
-
variant:
|
|
771
|
+
variant: Je,
|
|
772
772
|
disabled: e,
|
|
773
773
|
onClick: n,
|
|
774
774
|
children: r("material.editor.comments.cancel", "Cancel")
|
|
775
|
-
}), /* @__PURE__ */ J(
|
|
775
|
+
}), /* @__PURE__ */ J(M, {
|
|
776
776
|
type: "submit",
|
|
777
777
|
size: "sm",
|
|
778
778
|
loading: e,
|
|
@@ -811,7 +811,7 @@ var Tr = {
|
|
|
811
811
|
deleted: ["deleted-notice", "Thread deleted"]
|
|
812
812
|
};
|
|
813
813
|
function Er({ editor: e }) {
|
|
814
|
-
let { t } =
|
|
814
|
+
let { t } = N(), { notice: n } = wr(e), r = n ? Tr[n.kind] : null;
|
|
815
815
|
return /* @__PURE__ */ J("div", {
|
|
816
816
|
role: "status",
|
|
817
817
|
"aria-live": "polite",
|
|
@@ -823,7 +823,7 @@ function Er({ editor: e }) {
|
|
|
823
823
|
//#endregion
|
|
824
824
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer.tsx
|
|
825
825
|
function Dr(e) {
|
|
826
|
-
let { handle: t } =
|
|
826
|
+
let { handle: t } = _(), { editor: n } = t;
|
|
827
827
|
return !n || !X(n) ? null : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Or, { editor: n }), /* @__PURE__ */ J(Er, { editor: n })] });
|
|
828
828
|
}
|
|
829
829
|
function Or({ editor: e }) {
|
|
@@ -834,7 +834,7 @@ function Or({ editor: e }) {
|
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
836
|
function kr({ editor: e, controller: t }) {
|
|
837
|
-
let { t: n } =
|
|
837
|
+
let { t: n } = N(), { chrome: r } = _(), i = wr(e).composer, { actions: a } = r;
|
|
838
838
|
U(() => (a.setBubbleSuppressed(!0), () => {
|
|
839
839
|
a.setBubbleSuppressed(!1);
|
|
840
840
|
}), [a]);
|
|
@@ -869,14 +869,14 @@ function Ar(e, t) {
|
|
|
869
869
|
return !n || !(t instanceof Element) ? !1 : n.contains(t) ? !0 : n.getAttribute("aria-expanded") === "true" && !!t.closest("[role=\"menu\"]");
|
|
870
870
|
}
|
|
871
871
|
function jr({ id: e, children: t, ...n }) {
|
|
872
|
-
let { chrome: r, toolbarRef: i } =
|
|
872
|
+
let { chrome: r, toolbarRef: i } = _(), a = r.state.panel === e, [o, s] = K();
|
|
873
873
|
return At(() => {
|
|
874
874
|
let e = i.current, t = e?.getAttribute("aria-orientation") === "vertical" ? getComputedStyle(e).direction === "rtl" ? "left" : "right" : void 0;
|
|
875
875
|
t !== o && s(t);
|
|
876
|
-
}), /* @__PURE__ */ Y(
|
|
876
|
+
}), /* @__PURE__ */ Y(qe, {
|
|
877
877
|
open: a,
|
|
878
878
|
onOpenChange: (t) => t ? r.actions.openPanel(e) : r.actions.closePanel(),
|
|
879
|
-
children: [/* @__PURE__ */ J(
|
|
879
|
+
children: [/* @__PURE__ */ J(Ge, { virtualRef: i }), /* @__PURE__ */ J(Ke, {
|
|
880
880
|
"data-panel": e,
|
|
881
881
|
side: o,
|
|
882
882
|
align: "start",
|
|
@@ -897,15 +897,15 @@ function jr({ id: e, children: t, ...n }) {
|
|
|
897
897
|
//#endregion
|
|
898
898
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-status.tsx
|
|
899
899
|
function Mr({ state: e, controller: t, count: n }) {
|
|
900
|
-
let { t: r } =
|
|
901
|
-
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ J(
|
|
900
|
+
let { t: r } = N();
|
|
901
|
+
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ J(Ce, {
|
|
902
902
|
label: r("material.editor.comments.show-resolved", "Show resolved"),
|
|
903
903
|
checked: e.showResolved,
|
|
904
904
|
onCheckedChange: t.setShowResolved
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
function Nr({ state: e, empty: t }) {
|
|
908
|
-
let { t: n } =
|
|
908
|
+
let { t: n } = N(), r = null;
|
|
909
909
|
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", {
|
|
910
910
|
role: e.phase === "failed" ? "alert" : void 0,
|
|
911
911
|
className: "px-1 text-muted-foreground text-sm",
|
|
@@ -915,7 +915,7 @@ function Nr({ state: e, empty: t }) {
|
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-edit-form.tsx
|
|
917
917
|
function Pr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
918
|
-
let { t: i } =
|
|
918
|
+
let { t: i } = N();
|
|
919
919
|
return /* @__PURE__ */ Y("div", {
|
|
920
920
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2",
|
|
921
921
|
children: [/* @__PURE__ */ J(b, {
|
|
@@ -930,14 +930,14 @@ function Pr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
|
930
930
|
}
|
|
931
931
|
}), /* @__PURE__ */ Y("div", {
|
|
932
932
|
className: "flex gap-2",
|
|
933
|
-
children: [/* @__PURE__ */ J(
|
|
933
|
+
children: [/* @__PURE__ */ J(M, {
|
|
934
934
|
size: "sm",
|
|
935
935
|
disabled: !e.trim(),
|
|
936
936
|
onClick: n,
|
|
937
937
|
children: i("material.editor.comments.save", "Save")
|
|
938
|
-
}), /* @__PURE__ */ J(
|
|
938
|
+
}), /* @__PURE__ */ J(M, {
|
|
939
939
|
size: "sm",
|
|
940
|
-
variant:
|
|
940
|
+
variant: Je,
|
|
941
941
|
onClick: r,
|
|
942
942
|
children: i("material.editor.comments.cancel", "Cancel")
|
|
943
943
|
})]
|
|
@@ -1008,11 +1008,11 @@ function Xr(e, t, n) {
|
|
|
1008
1008
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-entry.tsx
|
|
1009
1009
|
var Zr = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase()).join("");
|
|
1010
1010
|
function Qr({ comment: e, pending: t, onEdit: n }) {
|
|
1011
|
-
let { t: r, language: i } =
|
|
1011
|
+
let { t: r, language: i } = N();
|
|
1012
1012
|
return /* @__PURE__ */ Y("div", {
|
|
1013
1013
|
className: "flex items-center gap-2",
|
|
1014
1014
|
children: [
|
|
1015
|
-
/* @__PURE__ */ J(
|
|
1015
|
+
/* @__PURE__ */ J(Se, {
|
|
1016
1016
|
src: dt(e.author.avatarUrl),
|
|
1017
1017
|
alt: "",
|
|
1018
1018
|
fallback: Zr(e.author.name),
|
|
@@ -1027,7 +1027,7 @@ function Qr({ comment: e, pending: t, onEdit: n }) {
|
|
|
1027
1027
|
className: "shrink-0 text-muted-foreground text-xs",
|
|
1028
1028
|
children: t ? r("material.editor.comments.sending", "Sending…") : Xr(e.createdAt, Date.now(), i)
|
|
1029
1029
|
}),
|
|
1030
|
-
n && !t && /* @__PURE__ */ J(
|
|
1030
|
+
n && !t && /* @__PURE__ */ J(M, {
|
|
1031
1031
|
variant: "ghost",
|
|
1032
1032
|
size: "xs",
|
|
1033
1033
|
className: "ms-auto",
|
|
@@ -1064,7 +1064,7 @@ function $r({ comment: e, editable: n, onEdit: r }) {
|
|
|
1064
1064
|
//#endregion
|
|
1065
1065
|
//#region lib/components/ui/widgets/editor/extensions/comments/thread-reply.tsx
|
|
1066
1066
|
function ei({ thread: e, controller: t, canRemove: n }) {
|
|
1067
|
-
let { t: r } =
|
|
1067
|
+
let { t: r } = N(), [i, a] = K(""), o = async () => {
|
|
1068
1068
|
let n = i;
|
|
1069
1069
|
n.trim() && (a(""), await t.reply(e.id, n) || a(n));
|
|
1070
1070
|
};
|
|
@@ -1081,7 +1081,7 @@ function ei({ thread: e, controller: t, canRemove: n }) {
|
|
|
1081
1081
|
}), /* @__PURE__ */ Y("div", {
|
|
1082
1082
|
className: "flex flex-wrap gap-2",
|
|
1083
1083
|
children: [
|
|
1084
|
-
/* @__PURE__ */ J(
|
|
1084
|
+
/* @__PURE__ */ J(M, {
|
|
1085
1085
|
size: "sm",
|
|
1086
1086
|
variant: "outlined",
|
|
1087
1087
|
color: "default",
|
|
@@ -1089,13 +1089,13 @@ function ei({ thread: e, controller: t, canRemove: n }) {
|
|
|
1089
1089
|
onClick: () => void o(),
|
|
1090
1090
|
children: r("material.editor.comments.reply", "Reply")
|
|
1091
1091
|
}),
|
|
1092
|
-
/* @__PURE__ */ J(
|
|
1092
|
+
/* @__PURE__ */ J(M, {
|
|
1093
1093
|
size: "sm",
|
|
1094
1094
|
variant: "tonal",
|
|
1095
1095
|
onClick: () => void t.resolve(e.id, !e.resolved),
|
|
1096
1096
|
children: e.resolved ? r("material.editor.comments.reopen", "Reopen") : r("material.editor.comments.resolve", "Resolve")
|
|
1097
1097
|
}),
|
|
1098
|
-
n && /* @__PURE__ */ J(
|
|
1098
|
+
n && /* @__PURE__ */ J(M, {
|
|
1099
1099
|
size: "sm",
|
|
1100
1100
|
variant: "ghost",
|
|
1101
1101
|
color: "error",
|
|
@@ -1109,7 +1109,7 @@ function ei({ thread: e, controller: t, canRemove: n }) {
|
|
|
1109
1109
|
//#endregion
|
|
1110
1110
|
//#region lib/components/ui/widgets/editor/extensions/comments/thread-card.tsx
|
|
1111
1111
|
function ti(e) {
|
|
1112
|
-
let { thread: n, controller: r, active: i, detached: a, error: o, user: s } = e, { t: c } =
|
|
1112
|
+
let { thread: n, controller: r, active: i, detached: a, error: o, user: s } = e, { t: c } = N(), l = n.comments[0]?.author.id === s?.id && !!s;
|
|
1113
1113
|
return /* @__PURE__ */ Y("section", {
|
|
1114
1114
|
ref: e.cardRef,
|
|
1115
1115
|
"data-slot": "comment-thread",
|
|
@@ -1153,7 +1153,7 @@ function ti(e) {
|
|
|
1153
1153
|
//#endregion
|
|
1154
1154
|
//#region lib/components/ui/widgets/editor/extensions/comments/detached-threads.tsx
|
|
1155
1155
|
function ni({ views: e }) {
|
|
1156
|
-
let { t } =
|
|
1156
|
+
let { t } = N(), { controller: n, state: r, detached: i } = e;
|
|
1157
1157
|
return !n || i.length === 0 ? null : /* @__PURE__ */ Y("section", {
|
|
1158
1158
|
"data-slot": "comment-detached",
|
|
1159
1159
|
className: "grid gap-2",
|
|
@@ -1468,7 +1468,7 @@ function vi(e) {
|
|
|
1468
1468
|
//#endregion
|
|
1469
1469
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-panel.tsx
|
|
1470
1470
|
function yi(e) {
|
|
1471
|
-
let { handle: t, chrome: n } =
|
|
1471
|
+
let { handle: t, chrome: n } = _(), { editor: r } = t;
|
|
1472
1472
|
return !r || !X(r) ? null : /* @__PURE__ */ J(jr, {
|
|
1473
1473
|
id: "comments",
|
|
1474
1474
|
className: "max-h-[min(36rem,80svh)] w-96 max-w-[92vw] overflow-y-auto p-3",
|
|
@@ -1477,11 +1477,11 @@ function yi(e) {
|
|
|
1477
1477
|
});
|
|
1478
1478
|
}
|
|
1479
1479
|
function bi({ editor: e }) {
|
|
1480
|
-
let { t } =
|
|
1480
|
+
let { t } = N(), n = vi(e), { controller: r, state: i, anchored: a } = n, o = G(null);
|
|
1481
1481
|
if (U(() => {
|
|
1482
1482
|
o.current?.querySelector("[data-active]")?.scrollIntoView({ block: "nearest" });
|
|
1483
1483
|
}, [i.activeId]), !r) return null;
|
|
1484
|
-
let s = (e, t) => /* @__PURE__ */ J(
|
|
1484
|
+
let s = (e, t) => /* @__PURE__ */ J(P, {
|
|
1485
1485
|
variant: "ghost",
|
|
1486
1486
|
"aria-label": t,
|
|
1487
1487
|
tooltip: t,
|
|
@@ -1632,11 +1632,11 @@ function Di(e, t, n, r) {
|
|
|
1632
1632
|
//#endregion
|
|
1633
1633
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-rail.tsx
|
|
1634
1634
|
function Oi(e) {
|
|
1635
|
-
let { handle: t } =
|
|
1635
|
+
let { handle: t } = _(), { editor: n } = t;
|
|
1636
1636
|
return !n || !X(n) ? null : /* @__PURE__ */ J(ki, { editor: n });
|
|
1637
1637
|
}
|
|
1638
1638
|
function ki({ editor: e }) {
|
|
1639
|
-
let { t } =
|
|
1639
|
+
let { t } = N(), n = vi(e), { controller: r, state: i, anchored: a } = n, o = G(null), { layout: s, cardRef: c } = Di(e, o, a.map((e) => ({
|
|
1640
1640
|
id: e.id,
|
|
1641
1641
|
from: i.anchors[e.id]?.from ?? 0
|
|
1642
1642
|
})), i.activeId);
|
|
@@ -1780,7 +1780,7 @@ function Fi(e, t) {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
var Ii = (e) => Fi(e.doc, e.selection.head);
|
|
1782
1782
|
function Li(e, t) {
|
|
1783
|
-
let n = t.node.isAtom ? st.create(e.doc, t.pos) :
|
|
1783
|
+
let n = t.node.isAtom ? st.create(e.doc, t.pos) : B.near(e.doc.resolve(t.pos + 1));
|
|
1784
1784
|
return e.setSelection(n);
|
|
1785
1785
|
}
|
|
1786
1786
|
function Ri(e, t, n = Ii(e)) {
|
|
@@ -1790,7 +1790,7 @@ function Ri(e, t, n = Ii(e)) {
|
|
|
1790
1790
|
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];
|
|
1791
1791
|
i.replaceWith(s, c, l);
|
|
1792
1792
|
let u = t === 1 ? r.nodeSize : -r.nodeSize;
|
|
1793
|
-
return a >= n.pos && a <= n.pos + n.node.nodeSize && e.selection instanceof
|
|
1793
|
+
return a >= n.pos && a <= n.pos + n.node.nodeSize && e.selection instanceof B ? i.setSelection(B.create(i.doc, o + u, a + u)) : e.selection instanceof st && i.setSelection(st.create(i.doc, n.pos + u)), i.scrollIntoView();
|
|
1794
1794
|
}
|
|
1795
1795
|
function zi(e, t = Ii(e)) {
|
|
1796
1796
|
if (!t) return null;
|
|
@@ -1810,7 +1810,7 @@ function Bi(e, t = Ii(e)) {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
n.delete(t.pos, r);
|
|
1812
1812
|
let i = Math.min(t.pos, n.doc.content.size);
|
|
1813
|
-
return n.setSelection(
|
|
1813
|
+
return n.setSelection(B.near(n.doc.resolve(i), -1)).scrollIntoView();
|
|
1814
1814
|
}
|
|
1815
1815
|
//#endregion
|
|
1816
1816
|
//#region lib/components/ui/widgets/editor/extensions/block/block-menu.tsx
|
|
@@ -1819,42 +1819,42 @@ function Vi(e, t) {
|
|
|
1819
1819
|
n && e.view.dispatch(n), e.isDestroyed || e.commands.focus();
|
|
1820
1820
|
}
|
|
1821
1821
|
function Hi({ editor: e, block: t }) {
|
|
1822
|
-
let { t: n } =
|
|
1822
|
+
let { t: n } = N(), { doc: r } = e.state, i = () => ({
|
|
1823
1823
|
...t,
|
|
1824
1824
|
node: r.child(t.index)
|
|
1825
1825
|
});
|
|
1826
1826
|
return /* @__PURE__ */ Y(q, { children: [
|
|
1827
|
-
/* @__PURE__ */ Y(
|
|
1827
|
+
/* @__PURE__ */ Y(He, { children: [/* @__PURE__ */ J(ze, { children: n("material.editor.block.turn-into", "Turn into") }), Pi(e).map((t) => /* @__PURE__ */ Y(j, {
|
|
1828
1828
|
onSelect: () => t.run(e),
|
|
1829
1829
|
children: [/* @__PURE__ */ J(t.icon, {}), n(t.key, t.label)]
|
|
1830
1830
|
}, t.id))] }),
|
|
1831
|
-
/* @__PURE__ */ J(
|
|
1832
|
-
/* @__PURE__ */ Y(
|
|
1833
|
-
/* @__PURE__ */ Y(
|
|
1831
|
+
/* @__PURE__ */ J(Ve, {}),
|
|
1832
|
+
/* @__PURE__ */ Y(He, { children: [
|
|
1833
|
+
/* @__PURE__ */ Y(j, {
|
|
1834
1834
|
onSelect: () => Vi(e, () => zi(e.state, i())),
|
|
1835
1835
|
children: [/* @__PURE__ */ J(Ut, {}), n("material.editor.block.duplicate", "Duplicate")]
|
|
1836
1836
|
}),
|
|
1837
|
-
/* @__PURE__ */ Y(
|
|
1837
|
+
/* @__PURE__ */ Y(j, {
|
|
1838
1838
|
disabled: t.index === 0,
|
|
1839
1839
|
onSelect: () => Vi(e, () => Ri(e.state, -1, i())),
|
|
1840
1840
|
children: [
|
|
1841
1841
|
/* @__PURE__ */ J(Pt, {}),
|
|
1842
1842
|
n("material.editor.block.move-up", "Move up"),
|
|
1843
|
-
/* @__PURE__ */ J(
|
|
1843
|
+
/* @__PURE__ */ J(Ue, { children: "⌥⇧↑" })
|
|
1844
1844
|
]
|
|
1845
1845
|
}),
|
|
1846
|
-
/* @__PURE__ */ Y(
|
|
1846
|
+
/* @__PURE__ */ Y(j, {
|
|
1847
1847
|
disabled: t.index >= r.childCount - 1,
|
|
1848
1848
|
onSelect: () => Vi(e, () => Ri(e.state, 1, i())),
|
|
1849
1849
|
children: [
|
|
1850
1850
|
/* @__PURE__ */ J(Nt, {}),
|
|
1851
1851
|
n("material.editor.block.move-down", "Move down"),
|
|
1852
|
-
/* @__PURE__ */ J(
|
|
1852
|
+
/* @__PURE__ */ J(Ue, { children: "⌥⇧↓" })
|
|
1853
1853
|
]
|
|
1854
1854
|
})
|
|
1855
1855
|
] }),
|
|
1856
|
-
/* @__PURE__ */ J(
|
|
1857
|
-
/* @__PURE__ */ Y(
|
|
1856
|
+
/* @__PURE__ */ J(Ve, {}),
|
|
1857
|
+
/* @__PURE__ */ Y(j, {
|
|
1858
1858
|
variant: "error",
|
|
1859
1859
|
onSelect: () => Vi(e, () => Bi(e.state, i())),
|
|
1860
1860
|
children: [/* @__PURE__ */ J(yn, {}), n("material.editor.block.delete", "Delete")]
|
|
@@ -1916,7 +1916,7 @@ function Ui(e, t, n) {
|
|
|
1916
1916
|
//#endregion
|
|
1917
1917
|
//#region lib/components/ui/widgets/editor/partials/editor-block-handle.tsx
|
|
1918
1918
|
function Wi({ children: e, className: t }) {
|
|
1919
|
-
let { handle: n } =
|
|
1919
|
+
let { handle: n } = _(), r = n.features.some((e) => e.key === "dragHandle");
|
|
1920
1920
|
return !n.editor || !r ? /* @__PURE__ */ J("div", {
|
|
1921
1921
|
className: t,
|
|
1922
1922
|
children: e
|
|
@@ -1927,7 +1927,7 @@ function Wi({ children: e, className: t }) {
|
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
1929
|
function Gi({ editor: e, children: n, className: r }) {
|
|
1930
|
-
let { chrome: i } =
|
|
1930
|
+
let { chrome: i } = _(), a = G(null), o = F({
|
|
1931
1931
|
editor: e,
|
|
1932
1932
|
selector: (e) => e.editor.isEditable
|
|
1933
1933
|
}), s = i.state.panel === "block" && o, { active: c, hover: l, unhover: u } = Ui(e, a, s);
|
|
@@ -1945,24 +1945,24 @@ function Gi({ editor: e, children: n, className: r }) {
|
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
1947
|
function Ki({ editor: e, active: n, open: r }) {
|
|
1948
|
-
let { t: i } =
|
|
1948
|
+
let { t: i } = N(), { chrome: a } = _();
|
|
1949
1949
|
return /* @__PURE__ */ Y("div", {
|
|
1950
1950
|
"data-slot": "editor-block-handle",
|
|
1951
1951
|
"data-open": r || void 0,
|
|
1952
1952
|
style: { top: n.top },
|
|
1953
1953
|
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"),
|
|
1954
|
-
children: [/* @__PURE__ */ J(
|
|
1954
|
+
children: [/* @__PURE__ */ J(P, {
|
|
1955
1955
|
variant: "ghost",
|
|
1956
1956
|
className: "size-6 text-muted-foreground",
|
|
1957
1957
|
tooltip: i("material.editor.block.add", "Add a block below"),
|
|
1958
1958
|
onClick: () => Ai(e, n),
|
|
1959
1959
|
children: /* @__PURE__ */ J(sn, {})
|
|
1960
|
-
}), /* @__PURE__ */ Y(
|
|
1960
|
+
}), /* @__PURE__ */ Y(We, {
|
|
1961
1961
|
open: r,
|
|
1962
1962
|
onOpenChange: (e) => e ? a.actions.openPanel("block") : a.actions.closePanel(),
|
|
1963
|
-
children: [/* @__PURE__ */ J(
|
|
1963
|
+
children: [/* @__PURE__ */ J(Re, {
|
|
1964
1964
|
asChild: !0,
|
|
1965
|
-
children: /* @__PURE__ */ J(
|
|
1965
|
+
children: /* @__PURE__ */ J(P, {
|
|
1966
1966
|
variant: "ghost",
|
|
1967
1967
|
draggable: !0,
|
|
1968
1968
|
className: "size-6 cursor-grab text-muted-foreground active:cursor-grabbing",
|
|
@@ -1976,7 +1976,7 @@ function Ki({ editor: e, active: n, open: r }) {
|
|
|
1976
1976
|
onDragStart: (t) => ji(e, n, t.nativeEvent),
|
|
1977
1977
|
children: /* @__PURE__ */ J(qt, {})
|
|
1978
1978
|
})
|
|
1979
|
-
}), /* @__PURE__ */ J(
|
|
1979
|
+
}), /* @__PURE__ */ J(Be, {
|
|
1980
1980
|
align: "start",
|
|
1981
1981
|
onCloseAutoFocus: (t) => {
|
|
1982
1982
|
t.preventDefault(), e.isDestroyed || e.commands.focus();
|
|
@@ -1992,7 +1992,7 @@ function Ki({ editor: e, active: n, open: r }) {
|
|
|
1992
1992
|
//#endregion
|
|
1993
1993
|
//#region lib/components/ui/widgets/editor/extensions/find/find-fields.tsx
|
|
1994
1994
|
function qi({ find: e }) {
|
|
1995
|
-
let { t } =
|
|
1995
|
+
let { t } = N(), n = "";
|
|
1996
1996
|
return e.term && (n = e.total === 0 ? t("material.editor.find.none", "No results") : t("material.editor.find.count", "{current} of {total}", {
|
|
1997
1997
|
current: e.current + 1,
|
|
1998
1998
|
total: e.total
|
|
@@ -2004,7 +2004,7 @@ function qi({ find: e }) {
|
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
2006
|
function Ji({ find: e }) {
|
|
2007
|
-
let { t } =
|
|
2007
|
+
let { t } = N();
|
|
2008
2008
|
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(ht, {
|
|
2009
2009
|
size: "sm",
|
|
2010
2010
|
"aria-label": t("material.editor.find.match-case", "Match case"),
|
|
@@ -2020,15 +2020,15 @@ function Ji({ find: e }) {
|
|
|
2020
2020
|
})] });
|
|
2021
2021
|
}
|
|
2022
2022
|
function Yi({ disabled: e, onStep: t }) {
|
|
2023
|
-
let { t: n } =
|
|
2024
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
2023
|
+
let { t: n } = N();
|
|
2024
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(P, {
|
|
2025
2025
|
variant: "ghost",
|
|
2026
2026
|
className: "size-8",
|
|
2027
2027
|
tooltip: n("material.editor.find.previous", "Previous match"),
|
|
2028
2028
|
disabled: e,
|
|
2029
2029
|
onClick: () => t(-1),
|
|
2030
2030
|
children: /* @__PURE__ */ J(Vt, {})
|
|
2031
|
-
}), /* @__PURE__ */ J(
|
|
2031
|
+
}), /* @__PURE__ */ J(P, {
|
|
2032
2032
|
variant: "ghost",
|
|
2033
2033
|
className: "size-8",
|
|
2034
2034
|
tooltip: n("material.editor.find.next", "Next match"),
|
|
@@ -2038,11 +2038,11 @@ function Yi({ disabled: e, onStep: t }) {
|
|
|
2038
2038
|
})] });
|
|
2039
2039
|
}
|
|
2040
2040
|
function Xi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replaceOpen: a, canReplace: o = !0, onToggleReplace: s }) {
|
|
2041
|
-
let { t: c } =
|
|
2041
|
+
let { t: c } = N();
|
|
2042
2042
|
return /* @__PURE__ */ Y("div", {
|
|
2043
2043
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2044
2044
|
children: [
|
|
2045
|
-
/* @__PURE__ */ J(
|
|
2045
|
+
/* @__PURE__ */ J(Qe, {
|
|
2046
2046
|
ref: t,
|
|
2047
2047
|
type: "search",
|
|
2048
2048
|
"aria-label": c("material.editor.find.find", "Find"),
|
|
@@ -2053,7 +2053,7 @@ function Xi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2053
2053
|
className: "h-8 min-w-0 flex-1 basis-40 sm:max-w-64"
|
|
2054
2054
|
}),
|
|
2055
2055
|
/* @__PURE__ */ J(Ji, { find: e }),
|
|
2056
|
-
o && /* @__PURE__ */ J(
|
|
2056
|
+
o && /* @__PURE__ */ J(P, {
|
|
2057
2057
|
variant: "ghost",
|
|
2058
2058
|
className: "size-8",
|
|
2059
2059
|
"aria-pressed": a,
|
|
@@ -2066,7 +2066,7 @@ function Xi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2066
2066
|
disabled: e.total === 0,
|
|
2067
2067
|
onStep: n
|
|
2068
2068
|
}),
|
|
2069
|
-
/* @__PURE__ */ J(
|
|
2069
|
+
/* @__PURE__ */ J(P, {
|
|
2070
2070
|
variant: "ghost",
|
|
2071
2071
|
className: "ms-auto size-8",
|
|
2072
2072
|
tooltip: c("material.editor.find.close", "Close"),
|
|
@@ -2111,7 +2111,7 @@ function ia(e, t, n) {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
//#endregion
|
|
2113
2113
|
//#region lib/components/ui/widgets/editor/extensions/find/find-state.ts
|
|
2114
|
-
var Z = new
|
|
2114
|
+
var Z = new ot("nxgtFind"), aa = "";
|
|
2115
2115
|
function oa(e) {
|
|
2116
2116
|
let t = [];
|
|
2117
2117
|
return e.descendants((e, n) => e.isTextblock ? (t.push({
|
|
@@ -2120,18 +2120,18 @@ function oa(e) {
|
|
|
2120
2120
|
}), !1) : !0), t;
|
|
2121
2121
|
}
|
|
2122
2122
|
function sa(e, t) {
|
|
2123
|
-
return
|
|
2123
|
+
return L.create(e, t.map((e) => R.inline(e.from, e.to, { class: "nxgt-find-match" })));
|
|
2124
2124
|
}
|
|
2125
2125
|
function ca(e, t) {
|
|
2126
2126
|
let n = t.matches[t.current];
|
|
2127
|
-
return n ?
|
|
2127
|
+
return n ? L.create(e, [R.inline(n.from, n.to, { class: "nxgt-find-current" })]) : L.empty;
|
|
2128
2128
|
}
|
|
2129
2129
|
var la = () => ({
|
|
2130
2130
|
...Zi,
|
|
2131
2131
|
term: "",
|
|
2132
2132
|
matches: [],
|
|
2133
2133
|
current: -1,
|
|
2134
|
-
decorations:
|
|
2134
|
+
decorations: L.empty
|
|
2135
2135
|
});
|
|
2136
2136
|
function ua(e, t, n) {
|
|
2137
2137
|
let r = na(oa(e), t.term, t);
|
|
@@ -2193,7 +2193,7 @@ function fa(e, t, n) {
|
|
|
2193
2193
|
}), !1)), n && (n.blocks += r.length), s.push(...na(r, t.term, t));
|
|
2194
2194
|
}
|
|
2195
2195
|
let c = [...a, ...s].sort((e, t) => e.from - t.from);
|
|
2196
|
-
s.length > 0 && (o = o.add(e.doc, s.map((e) =>
|
|
2196
|
+
s.length > 0 && (o = o.add(e.doc, s.map((e) => R.inline(e.from, e.to, { class: "nxgt-find-match" }))));
|
|
2197
2197
|
let l = t.current >= 0 && t.matches.length === c.length ? Math.min(t.current, c.length - 1) : ra(c, e.selection.from);
|
|
2198
2198
|
return {
|
|
2199
2199
|
...t,
|
|
@@ -2212,7 +2212,7 @@ function ma(e) {
|
|
|
2212
2212
|
return /\n/.test(i) ? "" : i;
|
|
2213
2213
|
}
|
|
2214
2214
|
function ha(e) {
|
|
2215
|
-
let [t, n] = K(() => ma(e)), [r, i] = K(!1), [a, o] = K(!1), s =
|
|
2215
|
+
let [t, n] = K(() => ma(e)), [r, i] = K(!1), [a, o] = K(!1), s = F({
|
|
2216
2216
|
editor: e,
|
|
2217
2217
|
selector: ({ editor: e }) => {
|
|
2218
2218
|
let { matches: t, current: n } = pa(e.state);
|
|
@@ -2249,11 +2249,11 @@ function ha(e) {
|
|
|
2249
2249
|
//#endregion
|
|
2250
2250
|
//#region lib/components/ui/widgets/editor/partials/editor-find-panel.tsx
|
|
2251
2251
|
function ga({ className: e }) {
|
|
2252
|
-
let { handle: t, chrome: n } =
|
|
2252
|
+
let { handle: t, chrome: n } = _(), { editor: r } = t, i = n.state.panel === "find", a = t.features.some((e) => e.key === "find");
|
|
2253
2253
|
return !r || !i || !a ? null : /* @__PURE__ */ J(_a, { className: e });
|
|
2254
2254
|
}
|
|
2255
2255
|
function _a({ className: e }) {
|
|
2256
|
-
let { t } =
|
|
2256
|
+
let { t } = N(), { handle: n, chrome: r } = _(), i = n.editor, a = ha(i), o = G(null), s = F({
|
|
2257
2257
|
editor: i,
|
|
2258
2258
|
selector: (e) => e.editor.isEditable
|
|
2259
2259
|
}), c = s && r.state.findReplace;
|
|
@@ -2288,11 +2288,11 @@ function _a({ className: e }) {
|
|
|
2288
2288
|
});
|
|
2289
2289
|
}
|
|
2290
2290
|
function va({ editor: e, find: t }) {
|
|
2291
|
-
let { t: n } =
|
|
2291
|
+
let { t: n } = N(), [r, i] = K("");
|
|
2292
2292
|
return /* @__PURE__ */ Y("div", {
|
|
2293
2293
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2294
2294
|
children: [
|
|
2295
|
-
/* @__PURE__ */ J(
|
|
2295
|
+
/* @__PURE__ */ J(Qe, {
|
|
2296
2296
|
"aria-label": n("material.editor.find.replace", "Replace"),
|
|
2297
2297
|
placeholder: n("material.editor.find.replace", "Replace"),
|
|
2298
2298
|
value: r,
|
|
@@ -2302,14 +2302,14 @@ function va({ editor: e, find: t }) {
|
|
|
2302
2302
|
},
|
|
2303
2303
|
className: "h-8 min-w-0 flex-1 basis-40 sm:max-w-64"
|
|
2304
2304
|
}),
|
|
2305
|
-
/* @__PURE__ */ J(
|
|
2305
|
+
/* @__PURE__ */ J(M, {
|
|
2306
2306
|
variant: "tonal",
|
|
2307
2307
|
size: "sm",
|
|
2308
2308
|
disabled: t.total === 0,
|
|
2309
2309
|
onClick: () => e.commands.replaceCurrent(r),
|
|
2310
2310
|
children: n("material.editor.find.replace-one", "Replace")
|
|
2311
2311
|
}),
|
|
2312
|
-
/* @__PURE__ */ J(
|
|
2312
|
+
/* @__PURE__ */ J(M, {
|
|
2313
2313
|
variant: "tonal",
|
|
2314
2314
|
size: "sm",
|
|
2315
2315
|
disabled: t.total === 0,
|
|
@@ -2322,8 +2322,8 @@ function va({ editor: e, find: t }) {
|
|
|
2322
2322
|
//#endregion
|
|
2323
2323
|
//#region lib/components/ui/widgets/editor/partials/editor-focus-exit.tsx
|
|
2324
2324
|
function ya({ className: e }) {
|
|
2325
|
-
let { t: n } =
|
|
2326
|
-
return r.state.focusMode ? /* @__PURE__ */ J(
|
|
2325
|
+
let { t: n } = N(), { chrome: r, handle: i } = _();
|
|
2326
|
+
return r.state.focusMode ? /* @__PURE__ */ J(P, {
|
|
2327
2327
|
variant: "ghost",
|
|
2328
2328
|
"data-slot": "editor-focus-exit",
|
|
2329
2329
|
className: t("size-8 bg-card/80 backdrop-blur", e),
|
|
@@ -2340,7 +2340,7 @@ var ba = (e) => e.trim() ? e.trim().split(/\s+/).length : 0, xa = (e) => e <= 0
|
|
|
2340
2340
|
//#endregion
|
|
2341
2341
|
//#region lib/components/ui/widgets/editor/core/use-editor-stats.ts
|
|
2342
2342
|
function Sa(e) {
|
|
2343
|
-
return
|
|
2343
|
+
return F({
|
|
2344
2344
|
editor: e.editor,
|
|
2345
2345
|
selector: ({ editor: e }) => {
|
|
2346
2346
|
let t = e?.storage.characterCount, n = t?.words?.() ?? ba(e?.getText() ?? ""), r = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -2361,7 +2361,7 @@ function Sa(e) {
|
|
|
2361
2361
|
//#endregion
|
|
2362
2362
|
//#region lib/components/ui/widgets/editor/partials/editor-stats.tsx
|
|
2363
2363
|
function Ca({ readingTime: e = !0 }) {
|
|
2364
|
-
let { t } =
|
|
2364
|
+
let { t } = N(), { handle: n } = _(), r = Sa(n), { words: i } = r;
|
|
2365
2365
|
return /* @__PURE__ */ Y("p", {
|
|
2366
2366
|
"data-slot": "editor-stats",
|
|
2367
2367
|
className: "flex flex-wrap gap-x-2",
|
|
@@ -2386,7 +2386,7 @@ var wa = {
|
|
|
2386
2386
|
unsaved: ["material.editor.footer.unsaved", "Unsaved changes"]
|
|
2387
2387
|
};
|
|
2388
2388
|
function Ta({ className: n, status: r, actions: i, readingTime: a = !0 }) {
|
|
2389
|
-
let { t: o } =
|
|
2389
|
+
let { t: o } = N(), s = typeof r == "string" && r in wa, [c, l] = s ? wa[r] : [];
|
|
2390
2390
|
return /* @__PURE__ */ Y("div", {
|
|
2391
2391
|
"data-slot": "editor-footer",
|
|
2392
2392
|
className: t("flex flex-wrap items-center gap-x-3 gap-y-2 text-muted-foreground text-sm", n),
|
|
@@ -2435,7 +2435,7 @@ function Da(e, t) {
|
|
|
2435
2435
|
//#region lib/components/ui/widgets/editor/extensions/outline/use-outline.ts
|
|
2436
2436
|
var Oa = 120, ka = 700, Aa = () => window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
2437
2437
|
function ja(e) {
|
|
2438
|
-
let t =
|
|
2438
|
+
let t = F({
|
|
2439
2439
|
editor: e,
|
|
2440
2440
|
selector: ({ editor: e }) => Ea(e.state.doc)
|
|
2441
2441
|
}), [n, r] = K(0), i = G(0);
|
|
@@ -2481,7 +2481,7 @@ var Ma = {
|
|
|
2481
2481
|
3: "ps-8"
|
|
2482
2482
|
};
|
|
2483
2483
|
function Na({ className: e, onNavigate: t }) {
|
|
2484
|
-
let { handle: n } =
|
|
2484
|
+
let { handle: n } = _();
|
|
2485
2485
|
return n.editor ? /* @__PURE__ */ J(Pa, {
|
|
2486
2486
|
editor: n.editor,
|
|
2487
2487
|
className: e,
|
|
@@ -2489,7 +2489,7 @@ function Na({ className: e, onNavigate: t }) {
|
|
|
2489
2489
|
}) : null;
|
|
2490
2490
|
}
|
|
2491
2491
|
function Pa({ editor: e, className: n, onNavigate: r }) {
|
|
2492
|
-
let { t: i } =
|
|
2492
|
+
let { t: i } = N(), { items: a, active: o, goTo: s } = ja(e);
|
|
2493
2493
|
return /* @__PURE__ */ Y("nav", {
|
|
2494
2494
|
"aria-label": i("material.editor.outline", "Outline"),
|
|
2495
2495
|
"data-slot": "editor-outline",
|
|
@@ -2518,7 +2518,7 @@ function Pa({ editor: e, className: n, onNavigate: r }) {
|
|
|
2518
2518
|
//#endregion
|
|
2519
2519
|
//#region lib/components/ui/widgets/editor/partials/editor-outline-panel.tsx
|
|
2520
2520
|
function Fa(e) {
|
|
2521
|
-
let { handle: t, chrome: n } =
|
|
2521
|
+
let { handle: t, chrome: n } = _();
|
|
2522
2522
|
return t.features.some((e) => e.key === "outline") ? /* @__PURE__ */ J(jr, {
|
|
2523
2523
|
id: "outline",
|
|
2524
2524
|
className: "w-72 max-w-[92vw] p-2",
|
|
@@ -2529,7 +2529,7 @@ function Fa(e) {
|
|
|
2529
2529
|
//#region lib/components/ui/widgets/editor/extensions/upload/use-editor-uploads.ts
|
|
2530
2530
|
var Ia = 0, La = 1e6;
|
|
2531
2531
|
function Ra(e) {
|
|
2532
|
-
let t =
|
|
2532
|
+
let t = _e(e.editor)?.queue, n = jt(H((e) => t?.subscribe(e) ?? (() => {}), [t]), () => {
|
|
2533
2533
|
if (!t) return Ia;
|
|
2534
2534
|
let e = t.list(), n = e.filter((e) => e.status === "error").length;
|
|
2535
2535
|
return (e.length - n) * La + n;
|
|
@@ -2573,16 +2573,16 @@ function Ha(e) {
|
|
|
2573
2573
|
//#endregion
|
|
2574
2574
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-button.tsx
|
|
2575
2575
|
function Ua({ editor: e }) {
|
|
2576
|
-
let { t } =
|
|
2576
|
+
let { t } = N(), { chrome: n } = _(), r = ar(e), i = n.state.panel === "assistant";
|
|
2577
2577
|
if (!r || !e.isEditable) return null;
|
|
2578
|
-
let
|
|
2579
|
-
return /* @__PURE__ */ J(
|
|
2578
|
+
let o = t("material.editor.assistant.title", "Assistant");
|
|
2579
|
+
return /* @__PURE__ */ J(a, {
|
|
2580
2580
|
"data-slot": "editor-assistant-button",
|
|
2581
2581
|
variant: i ? "filled" : "tonal",
|
|
2582
|
-
"aria-label":
|
|
2582
|
+
"aria-label": o,
|
|
2583
2583
|
"aria-haspopup": "dialog",
|
|
2584
2584
|
"aria-expanded": i,
|
|
2585
|
-
tooltip:
|
|
2585
|
+
tooltip: o,
|
|
2586
2586
|
onMouseDown: (e) => e.preventDefault(),
|
|
2587
2587
|
onClick: () => i ? r.close() : r.open(),
|
|
2588
2588
|
children: /* @__PURE__ */ J(pn, {})
|
|
@@ -2870,7 +2870,7 @@ async function co(e, t) {
|
|
|
2870
2870
|
}
|
|
2871
2871
|
//#endregion
|
|
2872
2872
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-extension.ts
|
|
2873
|
-
var lo =
|
|
2873
|
+
var lo = z.create({
|
|
2874
2874
|
name: "assistant",
|
|
2875
2875
|
addStorage: () => ({}),
|
|
2876
2876
|
onBeforeCreate() {
|
|
@@ -2892,14 +2892,14 @@ var lo = R.create({
|
|
|
2892
2892
|
n.follow = Ja(e, () => r.getState().phase === "idle" ? null : r.getState().range, r.subscribe);
|
|
2893
2893
|
},
|
|
2894
2894
|
addProseMirrorPlugins() {
|
|
2895
|
-
let e = new
|
|
2896
|
-
return [new
|
|
2895
|
+
let e = new ot("assistantRange"), t = () => this.storage.controller;
|
|
2896
|
+
return [new I({
|
|
2897
2897
|
key: e,
|
|
2898
2898
|
props: { decorations: (e) => {
|
|
2899
2899
|
let n = t()?.getState();
|
|
2900
2900
|
if (!n || n.phase === "idle" || !n.hasSelection) return null;
|
|
2901
2901
|
let { from: r, to: i } = n.range;
|
|
2902
|
-
return r >= i || i > e.doc.content.size ? null :
|
|
2902
|
+
return r >= i || i > e.doc.content.size ? null : L.create(e.doc, [R.inline(r, i, { class: "nxgt-assistant-range" })]);
|
|
2903
2903
|
} },
|
|
2904
2904
|
view: (n) => {
|
|
2905
2905
|
let r = () => {
|
|
@@ -2986,10 +2986,10 @@ function mo(e, t) {
|
|
|
2986
2986
|
//#endregion
|
|
2987
2987
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-buttons.tsx
|
|
2988
2988
|
function ho({ editor: e }) {
|
|
2989
|
-
let { t } =
|
|
2989
|
+
let { t } = N(), n = Cr(e);
|
|
2990
2990
|
if (!n) return null;
|
|
2991
2991
|
let r = t("material.editor.comments.comment", "Comment");
|
|
2992
|
-
return /* @__PURE__ */ J(
|
|
2992
|
+
return /* @__PURE__ */ J(a, {
|
|
2993
2993
|
"data-slot": "editor-comment-button",
|
|
2994
2994
|
variant: "ghost",
|
|
2995
2995
|
"aria-label": r,
|
|
@@ -3001,16 +3001,16 @@ function ho({ editor: e }) {
|
|
|
3001
3001
|
});
|
|
3002
3002
|
}
|
|
3003
3003
|
function go({ editor: e }) {
|
|
3004
|
-
let { t } =
|
|
3004
|
+
let { t } = N(), { chrome: n } = _(), r = wr(e);
|
|
3005
3005
|
if (!X(e)) return null;
|
|
3006
|
-
let i = n.state.panel === "comments",
|
|
3007
|
-
return /* @__PURE__ */ J(
|
|
3006
|
+
let i = n.state.panel === "comments", o = hi(r).length, s = t("material.editor.comments.count", "Comments ({count})", { count: o });
|
|
3007
|
+
return /* @__PURE__ */ J(a, {
|
|
3008
3008
|
"data-slot": "editor-comments-button",
|
|
3009
3009
|
variant: i ? "filled" : "ghost",
|
|
3010
|
-
"aria-label":
|
|
3010
|
+
"aria-label": s,
|
|
3011
3011
|
"aria-haspopup": "dialog",
|
|
3012
3012
|
"aria-expanded": i,
|
|
3013
|
-
tooltip:
|
|
3013
|
+
tooltip: s,
|
|
3014
3014
|
onClick: (t) => {
|
|
3015
3015
|
n.actions.togglePanel("comments"), i && mo(t, e);
|
|
3016
3016
|
},
|
|
@@ -3050,11 +3050,11 @@ function So(e, t) {
|
|
|
3050
3050
|
let o = a.attrs.threadId, s = n.get(o);
|
|
3051
3051
|
if (s === void 0 || s && !t.showResolved) continue;
|
|
3052
3052
|
let c = [bo];
|
|
3053
|
-
s && c.push(`${bo}-resolved`), o === t.activeId && c.push(`${bo}-active`), r.push(
|
|
3053
|
+
s && c.push(`${bo}-resolved`), o === t.activeId && c.push(`${bo}-active`), r.push(R.inline(i, i + e.nodeSize, { class: c.join(" ") }));
|
|
3054
3054
|
}
|
|
3055
3055
|
});
|
|
3056
3056
|
let i = t.composer?.range;
|
|
3057
|
-
return i && i.from < i.to && i.to <= e.content.size && r.push(
|
|
3057
|
+
return i && i.from < i.to && i.to <= e.content.size && r.push(R.inline(i.from, i.to, { class: `${bo} ${bo}-active` })), L.create(e, r);
|
|
3058
3058
|
}
|
|
3059
3059
|
//#endregion
|
|
3060
3060
|
//#region lib/components/ui/widgets/editor/extensions/comments/strip-comment-marks.ts
|
|
@@ -3065,15 +3065,15 @@ var Co = (e) => {
|
|
|
3065
3065
|
let n = e.marks.filter((e) => e.type.name !== "comment");
|
|
3066
3066
|
t.push(n.length === e.marks.length ? e : e.mark(n));
|
|
3067
3067
|
} else t.push(e.copy(Co(e.content)));
|
|
3068
|
-
}),
|
|
3069
|
-
}, wo = (e) => new
|
|
3068
|
+
}), tt.fromArray(t);
|
|
3069
|
+
}, wo = (e) => new nt(Co(e.content), e.openStart, e.openEnd), To = (e) => e?.dragging?.move === !0, Eo = (e, t) => To(t) ? e : wo(e), Do = new ot("comments"), Oo = (e, t) => {
|
|
3070
3070
|
let n = [];
|
|
3071
3071
|
for (let r = e; r && r !== t; r = r.parentElement) {
|
|
3072
3072
|
let e = r.getAttribute?.("data-comment-thread");
|
|
3073
3073
|
e && n.push(e);
|
|
3074
3074
|
}
|
|
3075
3075
|
return n;
|
|
3076
|
-
}, ko =
|
|
3076
|
+
}, ko = z.create({
|
|
3077
3077
|
name: "comments",
|
|
3078
3078
|
addExtensions: () => [xt],
|
|
3079
3079
|
addStorage: () => ({}),
|
|
@@ -3112,7 +3112,7 @@ var Co = (e) => {
|
|
|
3112
3112
|
},
|
|
3113
3113
|
addProseMirrorPlugins() {
|
|
3114
3114
|
let e = () => this.storage.controller, t = null;
|
|
3115
|
-
return [new
|
|
3115
|
+
return [new I({
|
|
3116
3116
|
key: Do,
|
|
3117
3117
|
props: {
|
|
3118
3118
|
transformPasted: Eo,
|
|
@@ -3187,7 +3187,7 @@ var Co = (e) => {
|
|
|
3187
3187
|
name: "comments",
|
|
3188
3188
|
extensions: () => [xt],
|
|
3189
3189
|
markdown: "native"
|
|
3190
|
-
}), Po =
|
|
3190
|
+
}), Po = z.create({
|
|
3191
3191
|
name: "nxgtBlockKeys",
|
|
3192
3192
|
addKeyboardShortcuts() {
|
|
3193
3193
|
let e = (e) => () => {
|
|
@@ -3212,8 +3212,8 @@ var Co = (e) => {
|
|
|
3212
3212
|
//#endregion
|
|
3213
3213
|
//#region lib/components/ui/widgets/editor/extensions/find/find-button.tsx
|
|
3214
3214
|
function Io({ editor: e }) {
|
|
3215
|
-
let { t } =
|
|
3216
|
-
return /* @__PURE__ */ J(
|
|
3215
|
+
let { t } = N(), { chrome: n } = _(), r = n.state.panel === "find";
|
|
3216
|
+
return /* @__PURE__ */ J(a, {
|
|
3217
3217
|
variant: r ? "filled" : "ghost",
|
|
3218
3218
|
"aria-pressed": r,
|
|
3219
3219
|
tooltip: t("material.editor.find.title", "Find and replace"),
|
|
@@ -3223,7 +3223,7 @@ function Io({ editor: e }) {
|
|
|
3223
3223
|
}
|
|
3224
3224
|
//#endregion
|
|
3225
3225
|
//#region lib/components/ui/widgets/editor/extensions/find/find-plugin.ts
|
|
3226
|
-
var Lo = () => new
|
|
3226
|
+
var Lo = () => new I({
|
|
3227
3227
|
key: Z,
|
|
3228
3228
|
state: {
|
|
3229
3229
|
init: la,
|
|
@@ -3238,7 +3238,7 @@ var Lo = () => new F({
|
|
|
3238
3238
|
props: { decorations: (e) => Z.getState(e)?.decorations }
|
|
3239
3239
|
}), Ro = () => {
|
|
3240
3240
|
let e;
|
|
3241
|
-
return new
|
|
3241
|
+
return new I({ props: { decorations(t) {
|
|
3242
3242
|
let n = Z.getState(t);
|
|
3243
3243
|
if (!n) return;
|
|
3244
3244
|
if (e?.state === n && e.doc === t.doc) return e.set;
|
|
@@ -3249,7 +3249,7 @@ var Lo = () => new F({
|
|
|
3249
3249
|
set: r
|
|
3250
3250
|
}, r;
|
|
3251
3251
|
} } });
|
|
3252
|
-
}, zo =
|
|
3252
|
+
}, zo = z.create({
|
|
3253
3253
|
name: "nxgtFind",
|
|
3254
3254
|
addProseMirrorPlugins() {
|
|
3255
3255
|
return [Lo(), Ro()];
|
|
@@ -3260,7 +3260,7 @@ var Lo = () => new F({
|
|
|
3260
3260
|
findStep: (e) => ({ state: t, tr: n, dispatch: r }) => {
|
|
3261
3261
|
let { matches: i, current: a } = pa(t), o = ia(i.length, a, e), s = i[o];
|
|
3262
3262
|
if (!s) return !1;
|
|
3263
|
-
let c =
|
|
3263
|
+
let c = B.create(n.doc, s.from, s.to);
|
|
3264
3264
|
return r?.(n.setSelection(c).scrollIntoView().setMeta(Z, { current: o })), !0;
|
|
3265
3265
|
},
|
|
3266
3266
|
replaceCurrent: (e) => ({ editor: t, state: n, tr: r, dispatch: i }) => {
|
|
@@ -3269,7 +3269,7 @@ var Lo = () => new F({
|
|
|
3269
3269
|
if (!s) return !1;
|
|
3270
3270
|
r.insertText(e, s.from, s.to);
|
|
3271
3271
|
let c = s.from + e.length;
|
|
3272
|
-
return r.setSelection(
|
|
3272
|
+
return r.setSelection(B.create(r.doc, c)).scrollIntoView(), i?.(r), !0;
|
|
3273
3273
|
},
|
|
3274
3274
|
replaceAll: (e) => ({ editor: t, state: n, tr: r, dispatch: i }) => {
|
|
3275
3275
|
if (!t.isEditable) return !1;
|
|
@@ -3311,8 +3311,8 @@ var Lo = () => new F({
|
|
|
3311
3311
|
//#endregion
|
|
3312
3312
|
//#region lib/components/ui/widgets/editor/extensions/focus-mode/focus-mode-button.tsx
|
|
3313
3313
|
function Ho({ editor: e }) {
|
|
3314
|
-
let { t } =
|
|
3315
|
-
return /* @__PURE__ */ J(
|
|
3314
|
+
let { t } = N(), { chrome: n } = _(), r = n.state.focusMode;
|
|
3315
|
+
return /* @__PURE__ */ J(a, {
|
|
3316
3316
|
variant: r ? "filled" : "ghost",
|
|
3317
3317
|
"aria-pressed": r,
|
|
3318
3318
|
tooltip: t("material.editor.focus-mode", "Focus mode"),
|
|
@@ -3344,14 +3344,14 @@ var Uo = () => V({
|
|
|
3344
3344
|
//#endregion
|
|
3345
3345
|
//#region lib/components/ui/widgets/editor/extensions/marks/inline-code-button.tsx
|
|
3346
3346
|
function Wo({ editor: e }) {
|
|
3347
|
-
let { t } =
|
|
3347
|
+
let { t } = N(), n = F({
|
|
3348
3348
|
editor: e,
|
|
3349
3349
|
selector: (e) => ({
|
|
3350
3350
|
isCode: e.editor.isActive("code") ?? !1,
|
|
3351
3351
|
canCode: e.editor.can().chain().toggleCode().run() ?? !1
|
|
3352
3352
|
})
|
|
3353
3353
|
});
|
|
3354
|
-
return /* @__PURE__ */ J(
|
|
3354
|
+
return /* @__PURE__ */ J(a, {
|
|
3355
3355
|
variant: n.isCode ? "filled" : "ghost",
|
|
3356
3356
|
"aria-pressed": n.isCode,
|
|
3357
3357
|
tooltip: t("material.editor.code", "Inline code"),
|
|
@@ -3381,12 +3381,12 @@ var Go = () => V({
|
|
|
3381
3381
|
}],
|
|
3382
3382
|
requires: ["marks"],
|
|
3383
3383
|
markdown: "native"
|
|
3384
|
-
}), Ko =
|
|
3384
|
+
}), Ko = z.create({
|
|
3385
3385
|
name: "markdownPaste",
|
|
3386
3386
|
addProseMirrorPlugins() {
|
|
3387
3387
|
let { editor: e } = this, t = !1;
|
|
3388
|
-
return [new
|
|
3389
|
-
key: new
|
|
3388
|
+
return [new I({
|
|
3389
|
+
key: new ot("markdownPaste"),
|
|
3390
3390
|
props: {
|
|
3391
3391
|
handleKeyDown: (e, n) => (t = n.shiftKey && (n.metaKey || n.ctrlKey) && n.key.toLowerCase() === "v", !1),
|
|
3392
3392
|
handleDOMEvents: { keyup: () => (t = !1, !1) },
|
|
@@ -3417,8 +3417,8 @@ var Go = () => V({
|
|
|
3417
3417
|
//#endregion
|
|
3418
3418
|
//#region lib/components/ui/widgets/editor/extensions/outline/outline-button.tsx
|
|
3419
3419
|
function Yo({ editor: e }) {
|
|
3420
|
-
let { t } =
|
|
3421
|
-
return /* @__PURE__ */ J(
|
|
3420
|
+
let { t } = N(), { chrome: n } = _(), r = n.state.panel === "outline";
|
|
3421
|
+
return /* @__PURE__ */ J(a, {
|
|
3422
3422
|
variant: r ? "filled" : "ghost",
|
|
3423
3423
|
"aria-pressed": r,
|
|
3424
3424
|
tooltip: t("material.editor.outline", "Outline"),
|
|
@@ -3445,43 +3445,43 @@ var Xo = () => V({
|
|
|
3445
3445
|
//#endregion
|
|
3446
3446
|
//#region lib/components/ui/widgets/editor/extensions/upload/image-alt-button.tsx
|
|
3447
3447
|
function Zo({ editor: e }) {
|
|
3448
|
-
let { t } =
|
|
3448
|
+
let { t } = N(), n = F({
|
|
3449
3449
|
editor: e,
|
|
3450
3450
|
selector: (e) => e.editor.getAttributes("image").alt ?? ""
|
|
3451
|
-
}), [r, i] = K(""), [
|
|
3452
|
-
return /* @__PURE__ */ Y(
|
|
3453
|
-
open:
|
|
3451
|
+
}), [r, i] = K(""), [o, s] = K(!1), { trigger: c, onCloseAutoFocus: l } = ie(), u = t("material.editor.upload.alt", "Alt text");
|
|
3452
|
+
return /* @__PURE__ */ Y(Le, {
|
|
3453
|
+
open: o,
|
|
3454
3454
|
onOpenChange: (e) => {
|
|
3455
|
-
|
|
3455
|
+
s(e), e && i(n);
|
|
3456
3456
|
},
|
|
3457
|
-
children: [/* @__PURE__ */ J(
|
|
3457
|
+
children: [/* @__PURE__ */ J(Fe, {
|
|
3458
3458
|
asChild: !0,
|
|
3459
|
-
ref:
|
|
3460
|
-
children: /* @__PURE__ */ J(
|
|
3459
|
+
ref: c,
|
|
3460
|
+
children: /* @__PURE__ */ J(a, {
|
|
3461
3461
|
variant: "ghost",
|
|
3462
|
-
tooltip:
|
|
3463
|
-
"aria-label":
|
|
3462
|
+
tooltip: u,
|
|
3463
|
+
"aria-label": u,
|
|
3464
3464
|
className: "rounded size-7",
|
|
3465
3465
|
more: { kind: "dialog" },
|
|
3466
3466
|
children: /* @__PURE__ */ J(_n, {})
|
|
3467
3467
|
})
|
|
3468
|
-
}), /* @__PURE__ */ Y(
|
|
3468
|
+
}), /* @__PURE__ */ Y(Ie, {
|
|
3469
3469
|
className: "flex size-max flex-col gap-2 p-2",
|
|
3470
|
-
onCloseAutoFocus:
|
|
3470
|
+
onCloseAutoFocus: l,
|
|
3471
3471
|
children: [
|
|
3472
|
-
/* @__PURE__ */ J(
|
|
3472
|
+
/* @__PURE__ */ J(Pe, {
|
|
3473
3473
|
className: "sr-only",
|
|
3474
|
-
children:
|
|
3474
|
+
children: u
|
|
3475
3475
|
}),
|
|
3476
|
-
/* @__PURE__ */ J(
|
|
3476
|
+
/* @__PURE__ */ J($e, {
|
|
3477
3477
|
value: r,
|
|
3478
3478
|
label: t("material.editor.upload.alt-label", "Describe the image"),
|
|
3479
3479
|
onChange: (e) => i(e.target.value)
|
|
3480
3480
|
}),
|
|
3481
|
-
/* @__PURE__ */ J(
|
|
3481
|
+
/* @__PURE__ */ J(M, {
|
|
3482
3482
|
variant: "tonal",
|
|
3483
3483
|
onClick: () => {
|
|
3484
|
-
e.chain().focus().updateAttributes("image", { alt: r }).run(),
|
|
3484
|
+
e.chain().focus().updateAttributes("image", { alt: r }).run(), s(!1);
|
|
3485
3485
|
},
|
|
3486
3486
|
children: t("material.editor.upload.alt-apply", "Apply")
|
|
3487
3487
|
})
|
|
@@ -3525,7 +3525,7 @@ function ss() {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
//#endregion
|
|
3527
3527
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widgets.ts
|
|
3528
|
-
var cs = /* @__PURE__ */ new WeakMap(), ls = (e, t) =>
|
|
3528
|
+
var cs = /* @__PURE__ */ new WeakMap(), ls = (e, t) => R.widget(e, () => {
|
|
3529
3529
|
let { element: e, destroy: n } = t.build(t.id);
|
|
3530
3530
|
return cs.set(e, n), e;
|
|
3531
3531
|
}, {
|
|
@@ -3539,9 +3539,9 @@ var cs = /* @__PURE__ */ new WeakMap(), ls = (e, t) => L.widget(e, () => {
|
|
|
3539
3539
|
destroy: (e) => cs.get(e)?.()
|
|
3540
3540
|
}), us = {
|
|
3541
3541
|
cards: [],
|
|
3542
|
-
decorations:
|
|
3542
|
+
decorations: L.empty,
|
|
3543
3543
|
orphaned: []
|
|
3544
|
-
}, ds = (e, t) => t.length ?
|
|
3544
|
+
}, ds = (e, t) => t.length ? L.create(e, t.map((e) => ls(e.pos, e))) : L.empty, fs = (e) => e.steps.some((t, n) => t instanceof it && t.from === 0 && t.to === e.docs[n].content.size), ps = (e) => {
|
|
3545
3545
|
let t = !1;
|
|
3546
3546
|
return e.content.descendants((e) => ((e.isText || e.isLeaf) && (t = !0), !t)), t;
|
|
3547
3547
|
};
|
|
@@ -3633,12 +3633,12 @@ function vs(e, t) {
|
|
|
3633
3633
|
}
|
|
3634
3634
|
function ys(e, t) {
|
|
3635
3635
|
if (e.isDestroyed) return;
|
|
3636
|
-
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i =
|
|
3636
|
+
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i = at.findFrom(r, 1, !0) ?? at.findFrom(r, -1, !0) ?? at.near(r, -1);
|
|
3637
3637
|
e.view.dispatch(e.state.tr.setSelection(i)), e.commands.focus();
|
|
3638
3638
|
}
|
|
3639
3639
|
//#endregion
|
|
3640
3640
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-plugin.ts
|
|
3641
|
-
var $ = new
|
|
3641
|
+
var $ = new ot("upload");
|
|
3642
3642
|
function bs(e, t) {
|
|
3643
3643
|
let n = e.doc.resolve(Math.min(t ?? e.selection.to, e.doc.content.size)), r = n.parent;
|
|
3644
3644
|
return !r.isTextblock || n.depth === 0 ? {
|
|
@@ -3663,7 +3663,7 @@ var xs = (e, t) => {
|
|
|
3663
3663
|
end: t
|
|
3664
3664
|
} });
|
|
3665
3665
|
function Ts({ onFiles: e, onOrphans: t }) {
|
|
3666
|
-
return new
|
|
3666
|
+
return new I({
|
|
3667
3667
|
key: $,
|
|
3668
3668
|
state: {
|
|
3669
3669
|
init: () => us,
|
|
@@ -3755,7 +3755,7 @@ function Is(e, t, n, r) {
|
|
|
3755
3755
|
if (!a) return;
|
|
3756
3756
|
let o = vs(e, t), s = a.from;
|
|
3757
3757
|
try {
|
|
3758
|
-
let o = e.schema.nodeFromJSON(Ps(e, n, r)), c = i.doc.nodeAt(a.from), l = a.spec.replaceEmpty && Fs(c), u = l ? a.from :
|
|
3758
|
+
let o = e.schema.nodeFromJSON(Ps(e, n, r)), c = i.doc.nodeAt(a.from), l = a.spec.replaceEmpty && Fs(c), u = l ? a.from : rt(i.doc, a.from, o.type) ?? hs(i.doc, a.from), d = l ? u + (c?.nodeSize ?? 0) : u, f = i.tr.replaceWith(u, d, o);
|
|
3759
3759
|
s = f.mapping.map(d, 1), e.view.dispatch(f.setMeta($, ws(t, s)));
|
|
3760
3760
|
} catch {
|
|
3761
3761
|
e.view.dispatch(i.tr.setMeta($, Cs(t)));
|
|
@@ -3780,15 +3780,15 @@ function Rs({ accept: e, multiple: t, label: n }, r) {
|
|
|
3780
3780
|
//#endregion
|
|
3781
3781
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-actions.tsx
|
|
3782
3782
|
function zs({ id: e, name: t, failed: n, retryable: r, storage: i }) {
|
|
3783
|
-
let { t: a } =
|
|
3783
|
+
let { t: a } = N(), o = n ? a("material.editor.upload.remove", "Remove {name}", { name: t }) : a("material.editor.upload.cancel", "Cancel upload of {name}", { name: t });
|
|
3784
3784
|
return /* @__PURE__ */ Y("div", {
|
|
3785
3785
|
className: "ms-auto flex shrink-0 items-center gap-1",
|
|
3786
|
-
children: [n && r && /* @__PURE__ */ Y(
|
|
3786
|
+
children: [n && r && /* @__PURE__ */ Y(M, {
|
|
3787
3787
|
variant: "tonal",
|
|
3788
3788
|
size: "sm",
|
|
3789
3789
|
onClick: () => i.retry(e),
|
|
3790
3790
|
children: [/* @__PURE__ */ J(un, {}), a("material.editor.upload.retry", "Retry")]
|
|
3791
|
-
}), /* @__PURE__ */ J(
|
|
3791
|
+
}), /* @__PURE__ */ J(P, {
|
|
3792
3792
|
variant: "ghost",
|
|
3793
3793
|
tooltip: o,
|
|
3794
3794
|
"aria-label": o,
|
|
@@ -3809,7 +3809,7 @@ function Bs({ previewUrl: e, busy: n }) {
|
|
|
3809
3809
|
}) : /* @__PURE__ */ J(Gt, {
|
|
3810
3810
|
"aria-hidden": "true",
|
|
3811
3811
|
className: "size-5"
|
|
3812
|
-
}), n && /* @__PURE__ */ J(
|
|
3812
|
+
}), n && /* @__PURE__ */ J(Ne, {
|
|
3813
3813
|
"aria-hidden": "true",
|
|
3814
3814
|
"aria-label": void 0,
|
|
3815
3815
|
contained: !0,
|
|
@@ -3828,7 +3828,7 @@ function Vs(e, t, n) {
|
|
|
3828
3828
|
}
|
|
3829
3829
|
}
|
|
3830
3830
|
function Hs({ id: e, storage: n, maxSize: r }) {
|
|
3831
|
-
let { t: i } =
|
|
3831
|
+
let { t: i } = N(), { queue: a } = n, o = jt(a.subscribe, () => a.get(e), () => void 0);
|
|
3832
3832
|
if (!o) return null;
|
|
3833
3833
|
let s = o.file.name, c = o.status === "error";
|
|
3834
3834
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -3853,7 +3853,7 @@ function Hs({ id: e, storage: n, maxSize: r }) {
|
|
|
3853
3853
|
role: "alert",
|
|
3854
3854
|
className: "text-xs text-error-text",
|
|
3855
3855
|
children: Vs(i, o.failure, r)
|
|
3856
|
-
}) : /* @__PURE__ */ J(
|
|
3856
|
+
}) : /* @__PURE__ */ J(Te, {
|
|
3857
3857
|
value: o.progress === void 0 ? null : o.progress * 100,
|
|
3858
3858
|
"aria-label": i("material.editor.upload.uploading", "Uploading {name}", { name: s }),
|
|
3859
3859
|
className: "mt-1.5"
|
|
@@ -3872,7 +3872,7 @@ function Hs({ id: e, storage: n, maxSize: r }) {
|
|
|
3872
3872
|
//#endregion
|
|
3873
3873
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widget.tsx
|
|
3874
3874
|
function Us(e, t, n, r) {
|
|
3875
|
-
let i = new
|
|
3875
|
+
let i = new Ye(Hs, {
|
|
3876
3876
|
editor: e,
|
|
3877
3877
|
props: {
|
|
3878
3878
|
id: r,
|
|
@@ -4068,7 +4068,7 @@ function Qs(e) {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
//#endregion
|
|
4070
4070
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-extension.ts
|
|
4071
|
-
var $s = /* @__PURE__ */ new WeakMap(), ec =
|
|
4071
|
+
var $s = /* @__PURE__ */ new WeakMap(), ec = z.create({
|
|
4072
4072
|
name: "upload",
|
|
4073
4073
|
addStorage: () => ({}),
|
|
4074
4074
|
onBeforeCreate() {
|
|
@@ -4127,15 +4127,15 @@ var $s = /* @__PURE__ */ new WeakMap(), ec = R.create({
|
|
|
4127
4127
|
order: 61,
|
|
4128
4128
|
priority: 30,
|
|
4129
4129
|
kind: "panel",
|
|
4130
|
-
when: (e) => !!
|
|
4131
|
-
render:
|
|
4130
|
+
when: (e) => !!_e(e)?.ownsImage,
|
|
4131
|
+
render: h
|
|
4132
4132
|
}],
|
|
4133
4133
|
bubble: [{
|
|
4134
4134
|
id: "image-alt",
|
|
4135
4135
|
order: 35,
|
|
4136
4136
|
priority: 60,
|
|
4137
4137
|
kind: "panel",
|
|
4138
|
-
when: (e) => !!
|
|
4138
|
+
when: (e) => !!_e(e) && e.isActive("image"),
|
|
4139
4139
|
render: Zo
|
|
4140
4140
|
}],
|
|
4141
4141
|
slash: i("image"),
|
|
@@ -4149,88 +4149,88 @@ var $s = /* @__PURE__ */ new WeakMap(), ec = R.create({
|
|
|
4149
4149
|
accordion: l,
|
|
4150
4150
|
actionCard: s,
|
|
4151
4151
|
assistant: po,
|
|
4152
|
-
blocks:
|
|
4153
|
-
callout:
|
|
4154
|
-
checkboxGroup:
|
|
4155
|
-
codeBlock:
|
|
4156
|
-
color:
|
|
4152
|
+
blocks: T,
|
|
4153
|
+
callout: Me,
|
|
4154
|
+
checkboxGroup: fe,
|
|
4155
|
+
codeBlock: pe,
|
|
4156
|
+
color: de,
|
|
4157
4157
|
comments: No,
|
|
4158
|
-
count:
|
|
4158
|
+
count: ue,
|
|
4159
4159
|
dragHandle: Fo,
|
|
4160
|
-
emoji:
|
|
4160
|
+
emoji: xe,
|
|
4161
4161
|
find: Vo,
|
|
4162
4162
|
focusMode: Uo,
|
|
4163
|
-
fontFamily:
|
|
4164
|
-
gallery:
|
|
4165
|
-
headings:
|
|
4166
|
-
highlight:
|
|
4167
|
-
image:
|
|
4163
|
+
fontFamily: se,
|
|
4164
|
+
gallery: C,
|
|
4165
|
+
headings: ae,
|
|
4166
|
+
highlight: re,
|
|
4167
|
+
image: we,
|
|
4168
4168
|
inlineCode: Go,
|
|
4169
|
-
link:
|
|
4169
|
+
link: g,
|
|
4170
4170
|
lists: d,
|
|
4171
4171
|
markdownPaste: Jo,
|
|
4172
|
-
marks:
|
|
4173
|
-
mention:
|
|
4172
|
+
marks: O,
|
|
4173
|
+
mention: v,
|
|
4174
4174
|
outline: Xo,
|
|
4175
|
-
placeholder:
|
|
4176
|
-
radioGroup:
|
|
4175
|
+
placeholder: m,
|
|
4176
|
+
radioGroup: he,
|
|
4177
4177
|
selectCard: n,
|
|
4178
|
-
selectChip:
|
|
4178
|
+
selectChip: ve,
|
|
4179
4179
|
slash: x,
|
|
4180
4180
|
table: c,
|
|
4181
4181
|
textAlign: u,
|
|
4182
4182
|
upload: tc,
|
|
4183
|
-
youtube:
|
|
4183
|
+
youtube: E
|
|
4184
4184
|
}, rc = (...e) => (t) => [...t, ...e], ic = (...e) => (t) => t.filter((t) => !e.includes(t.key ?? t.name)), ac = () => [
|
|
4185
4185
|
s(),
|
|
4186
|
-
|
|
4186
|
+
ve(),
|
|
4187
4187
|
n(),
|
|
4188
|
-
|
|
4189
|
-
|
|
4188
|
+
fe(),
|
|
4189
|
+
he()
|
|
4190
4190
|
], oc = () => [
|
|
4191
|
-
|
|
4191
|
+
Me(),
|
|
4192
4192
|
l(),
|
|
4193
|
-
|
|
4193
|
+
C(),
|
|
4194
4194
|
x(),
|
|
4195
|
-
fe(),
|
|
4196
|
-
ce(),
|
|
4197
|
-
D(),
|
|
4198
|
-
oe(),
|
|
4199
|
-
w(),
|
|
4200
|
-
_(),
|
|
4201
|
-
ie(),
|
|
4202
|
-
u(),
|
|
4203
|
-
h(),
|
|
4204
4195
|
de(),
|
|
4196
|
+
se(),
|
|
4197
|
+
O(),
|
|
4198
|
+
ae(),
|
|
4199
|
+
T(),
|
|
4200
|
+
g(),
|
|
4201
|
+
re(),
|
|
4202
|
+
u(),
|
|
4203
|
+
m(),
|
|
4204
|
+
ue(),
|
|
4205
4205
|
Jo(),
|
|
4206
4206
|
d(),
|
|
4207
|
-
|
|
4207
|
+
we(),
|
|
4208
4208
|
tc(),
|
|
4209
|
-
|
|
4210
|
-
|
|
4209
|
+
E(),
|
|
4210
|
+
xe({ suggest: !0 }),
|
|
4211
4211
|
c(),
|
|
4212
|
-
|
|
4212
|
+
pe(),
|
|
4213
4213
|
Vo(),
|
|
4214
4214
|
Uo(),
|
|
4215
4215
|
Fo(),
|
|
4216
4216
|
No()
|
|
4217
4217
|
], sc = () => [
|
|
4218
|
-
|
|
4218
|
+
O({ compact: !0 }),
|
|
4219
4219
|
Go(),
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4220
|
+
g(),
|
|
4221
|
+
m(),
|
|
4222
|
+
ue(),
|
|
4223
4223
|
Jo(),
|
|
4224
4224
|
d(),
|
|
4225
4225
|
tc()
|
|
4226
4226
|
], cc = () => [
|
|
4227
|
-
|
|
4227
|
+
O({ compact: !0 }),
|
|
4228
4228
|
Go(),
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4229
|
+
g(),
|
|
4230
|
+
m(),
|
|
4231
|
+
ue(),
|
|
4232
|
+
xe({ suggest: !0 }),
|
|
4233
|
+
v()
|
|
4234
4234
|
];
|
|
4235
4235
|
//#endregion
|
|
4236
4236
|
//#region lib/components/ui/widgets/editor/extensions/assistant/use-assistant-feature.ts
|
|
@@ -4248,7 +4248,7 @@ function lc(e, t) {
|
|
|
4248
4248
|
//#endregion
|
|
4249
4249
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-signal.tsx
|
|
4250
4250
|
function uc({ onChange: e }) {
|
|
4251
|
-
let { handle: t } =
|
|
4251
|
+
let { handle: t } = _(), n = Ra(t).pending > 0, r = G(e), i = G(!1);
|
|
4252
4252
|
return U(() => {
|
|
4253
4253
|
r.current = e;
|
|
4254
4254
|
}, [e]), U(() => {
|
|
@@ -4285,7 +4285,7 @@ function fc(e, t) {
|
|
|
4285
4285
|
//#endregion
|
|
4286
4286
|
//#region lib/components/ui/widgets/editor/partials/editor-character-count.tsx
|
|
4287
4287
|
function pc({ className: e }) {
|
|
4288
|
-
let { t: n } =
|
|
4288
|
+
let { t: n } = N(), { handle: r } = _(), i = F({
|
|
4289
4289
|
editor: r.editor,
|
|
4290
4290
|
selector: ({ editor: e }) => {
|
|
4291
4291
|
let t = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -4330,7 +4330,7 @@ function mc(e, t) {
|
|
|
4330
4330
|
//#endregion
|
|
4331
4331
|
//#region lib/components/ui/widgets/editor/presets/document-editor-frame-parts.tsx
|
|
4332
4332
|
function hc({ side: e, children: n }) {
|
|
4333
|
-
let { t: r } =
|
|
4333
|
+
let { t: r } = N();
|
|
4334
4334
|
return /* @__PURE__ */ J("aside", {
|
|
4335
4335
|
"aria-label": r("material.editor.outline-region", "Document outline"),
|
|
4336
4336
|
"data-slot": "document-editor-rail",
|
|
@@ -4360,7 +4360,7 @@ function _c({ presence: e, panels: t, children: n }) {
|
|
|
4360
4360
|
});
|
|
4361
4361
|
}
|
|
4362
4362
|
function vc({ children: e }) {
|
|
4363
|
-
let { t } =
|
|
4363
|
+
let { t } = N();
|
|
4364
4364
|
return /* @__PURE__ */ J("aside", {
|
|
4365
4365
|
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4366
4366
|
"data-slot": "document-editor-comments",
|
|
@@ -4372,21 +4372,21 @@ function vc({ children: e }) {
|
|
|
4372
4372
|
//#region lib/components/ui/widgets/editor/presets/toolbar-looks.ts
|
|
4373
4373
|
var yc = 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]"), bc = 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)"), xc = 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", yc, bc), Sc = t("items-center gap-1 **:data-group-id:gap-1", "[--tb-item:2.25rem] [&_button[data-variant]]:rounded-full [&_[data-toolbar-more]]:rounded-full", yc, bc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), Cc = t(xc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), wc = t(xc, "**:data-[group=outline]:@4xl:hidden", "**:data-[group=comments]:@5xl:hidden"), Tc = 56;
|
|
4374
4374
|
function Ec({ toolbar: e, bar: n, panels: r, footer: i, outline: a, comments: o, presence: s, outlineSide: c = "start", className: l, children: u }) {
|
|
4375
|
-
let { chrome: d, handle:
|
|
4375
|
+
let { chrome: d, handle: f, look: p } = _(), m = f.features.some((e) => e.key === "dragHandle"), h = d.state.focusMode, g = G(null), v = mc(g, Tc), y = a && !h && v, b = mc(g, 64), x = o && !h && b;
|
|
4376
4376
|
return /* @__PURE__ */ Y("div", {
|
|
4377
|
-
ref:
|
|
4377
|
+
ref: g,
|
|
4378
4378
|
"data-slot": "document-editor",
|
|
4379
|
-
"data-look":
|
|
4379
|
+
"data-look": p,
|
|
4380
4380
|
"data-layout": "docked",
|
|
4381
|
-
className: gc(
|
|
4381
|
+
className: gc(p, !!n, l),
|
|
4382
4382
|
children: [
|
|
4383
4383
|
/* @__PURE__ */ J(_c, {
|
|
4384
4384
|
presence: s,
|
|
4385
4385
|
panels: r,
|
|
4386
|
-
children: !
|
|
4386
|
+
children: !h && e
|
|
4387
4387
|
}),
|
|
4388
4388
|
/* @__PURE__ */ J(ya, { className: "absolute end-3 top-3 z-20" }),
|
|
4389
|
-
!
|
|
4389
|
+
!h && n,
|
|
4390
4390
|
/* @__PURE__ */ Y("div", {
|
|
4391
4391
|
className: "flex",
|
|
4392
4392
|
children: [
|
|
@@ -4395,7 +4395,7 @@ function Ec({ toolbar: e, bar: n, panels: r, footer: i, outline: a, comments: o,
|
|
|
4395
4395
|
children: a
|
|
4396
4396
|
}),
|
|
4397
4397
|
/* @__PURE__ */ J("div", {
|
|
4398
|
-
className: t("min-w-0 flex-1 px-5 py-6 @xl:px-10 @xl:py-10",
|
|
4398
|
+
className: t("min-w-0 flex-1 px-5 py-6 @xl:px-10 @xl:py-10", m && "@xl:pointer-fine:ps-16"),
|
|
4399
4399
|
children: /* @__PURE__ */ J("div", {
|
|
4400
4400
|
className: "mx-auto w-full max-w-[680px]",
|
|
4401
4401
|
children: u
|
|
@@ -4443,7 +4443,7 @@ function Lc({ look: e }) {
|
|
|
4443
4443
|
"data-slot": "compact-editor-toolbar",
|
|
4444
4444
|
"data-look": e,
|
|
4445
4445
|
className: Ic(e),
|
|
4446
|
-
children: /* @__PURE__ */ J(
|
|
4446
|
+
children: /* @__PURE__ */ J(A, {
|
|
4447
4447
|
dividers: !1,
|
|
4448
4448
|
density: "compact",
|
|
4449
4449
|
className: Nc(e, wc)
|
|
@@ -4464,7 +4464,7 @@ function Rc({ actions: e }) {
|
|
|
4464
4464
|
//#endregion
|
|
4465
4465
|
//#region lib/components/ui/widgets/editor/presets/preset-features.ts
|
|
4466
4466
|
var zc = (e) => (t) => {
|
|
4467
|
-
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t,
|
|
4467
|
+
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t, v()] : t);
|
|
4468
4468
|
return [...i && !o.some((e) => e.key === "outline") ? [...o, Xo()] : o, ...a.filter((e) => !!e)];
|
|
4469
4469
|
}, Bc = [
|
|
4470
4470
|
"min-h-[1lh]",
|
|
@@ -4518,44 +4518,44 @@ function Gc(e = 2, t = 8) {
|
|
|
4518
4518
|
}
|
|
4519
4519
|
//#endregion
|
|
4520
4520
|
//#region lib/components/ui/widgets/editor/presets/compact-editor.tsx
|
|
4521
|
-
function Kc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look:
|
|
4522
|
-
let { t:
|
|
4523
|
-
return /* @__PURE__ */ Y(
|
|
4524
|
-
...
|
|
4525
|
-
look:
|
|
4521
|
+
function Kc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look: a = "expressive", actions: s, onUpload: c, uploadOptions: l, onUploadingChange: u, onAssist: d, assistOptions: f, label: p, helperText: m, error: h, required: g, className: _, attributes: v, ...y }) {
|
|
4522
|
+
let { t: b } = N(), x = W(sc, []), S = dc(c, l), C = lc(d, f), T = !!s || !!y.characterLimit;
|
|
4523
|
+
return /* @__PURE__ */ Y(k, {
|
|
4524
|
+
...y,
|
|
4525
|
+
look: a,
|
|
4526
4526
|
features: zc({
|
|
4527
4527
|
features: e,
|
|
4528
|
-
mentions:
|
|
4529
|
-
extra: [
|
|
4528
|
+
mentions: y.mentions,
|
|
4529
|
+
extra: [S, C]
|
|
4530
4530
|
}),
|
|
4531
|
-
defaults:
|
|
4531
|
+
defaults: x,
|
|
4532
4532
|
attributes: {
|
|
4533
4533
|
class: t("nxgt-prose text-[0.9375rem] leading-relaxed focus:outline-none", Gc(n, r)),
|
|
4534
|
-
"aria-label":
|
|
4535
|
-
...
|
|
4534
|
+
"aria-label": b("material.editor.comment", "Comment"),
|
|
4535
|
+
...v
|
|
4536
4536
|
},
|
|
4537
4537
|
children: [
|
|
4538
|
-
/* @__PURE__ */ J(
|
|
4539
|
-
label:
|
|
4540
|
-
helperText:
|
|
4541
|
-
error:
|
|
4542
|
-
required:
|
|
4543
|
-
className:
|
|
4538
|
+
/* @__PURE__ */ J(w, {
|
|
4539
|
+
label: p,
|
|
4540
|
+
helperText: m,
|
|
4541
|
+
error: h,
|
|
4542
|
+
required: g,
|
|
4543
|
+
className: _,
|
|
4544
4544
|
children: /* @__PURE__ */ Y("div", {
|
|
4545
4545
|
"data-slot": "compact-editor",
|
|
4546
|
-
"data-invalid":
|
|
4547
|
-
"data-look":
|
|
4548
|
-
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", Fc(
|
|
4546
|
+
"data-invalid": h || void 0,
|
|
4547
|
+
"data-look": a,
|
|
4548
|
+
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", Fc(a, h)),
|
|
4549
4549
|
children: [
|
|
4550
|
-
i && /* @__PURE__ */ J(Lc, { look:
|
|
4550
|
+
i && /* @__PURE__ */ J(Lc, { look: a }),
|
|
4551
4551
|
/* @__PURE__ */ J(o, { className: "px-3 py-2.5" }),
|
|
4552
|
-
|
|
4552
|
+
T && /* @__PURE__ */ J(Rc, { actions: s })
|
|
4553
4553
|
]
|
|
4554
4554
|
})
|
|
4555
4555
|
}),
|
|
4556
|
-
|
|
4556
|
+
c && /* @__PURE__ */ J(uc, { onChange: u }),
|
|
4557
|
+
/* @__PURE__ */ J(Ae, {}),
|
|
4557
4558
|
/* @__PURE__ */ J(je, {}),
|
|
4558
|
-
/* @__PURE__ */ J(Me, {}),
|
|
4559
4559
|
/* @__PURE__ */ J(sr, {})
|
|
4560
4560
|
]
|
|
4561
4561
|
});
|
|
@@ -4572,7 +4572,7 @@ function qc({ control: e, name: n, ...r }) {
|
|
|
4572
4572
|
children: /* @__PURE__ */ J(Kc, {
|
|
4573
4573
|
...r,
|
|
4574
4574
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
4575
|
-
value: e.value ??
|
|
4575
|
+
value: e.value ?? ne(r.format ?? "html"),
|
|
4576
4576
|
onChange: (t) => e.onChange(t),
|
|
4577
4577
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
4578
4578
|
error: n.invalid,
|
|
@@ -4584,8 +4584,8 @@ function qc({ control: e, name: n, ...r }) {
|
|
|
4584
4584
|
//#endregion
|
|
4585
4585
|
//#region lib/components/ui/widgets/editor/partials/page-mode-switch.tsx
|
|
4586
4586
|
function Jc({ value: e, onChange: t }) {
|
|
4587
|
-
let { t: n } =
|
|
4588
|
-
return /* @__PURE__ */ Y(
|
|
4587
|
+
let { t: n } = N();
|
|
4588
|
+
return /* @__PURE__ */ Y(Ze, {
|
|
4589
4589
|
type: "single",
|
|
4590
4590
|
variant: "segmented",
|
|
4591
4591
|
size: "sm",
|
|
@@ -4594,15 +4594,15 @@ function Jc({ value: e, onChange: t }) {
|
|
|
4594
4594
|
"aria-label": n("material.editor.page.mode", "View"),
|
|
4595
4595
|
"data-slot": "editor-page-mode",
|
|
4596
4596
|
children: [
|
|
4597
|
-
/* @__PURE__ */ J(
|
|
4597
|
+
/* @__PURE__ */ J(Xe, {
|
|
4598
4598
|
value: "write",
|
|
4599
4599
|
children: n("material.editor.page.write", "Write")
|
|
4600
4600
|
}),
|
|
4601
|
-
/* @__PURE__ */ J(
|
|
4601
|
+
/* @__PURE__ */ J(Xe, {
|
|
4602
4602
|
value: "preview",
|
|
4603
4603
|
children: n("material.editor.page.preview", "Preview")
|
|
4604
4604
|
}),
|
|
4605
|
-
/* @__PURE__ */ J(
|
|
4605
|
+
/* @__PURE__ */ J(Xe, {
|
|
4606
4606
|
value: "markdown",
|
|
4607
4607
|
children: n("material.editor.page.markdown", "Markdown")
|
|
4608
4608
|
})
|
|
@@ -4613,7 +4613,7 @@ function Jc({ value: e, onChange: t }) {
|
|
|
4613
4613
|
//#region lib/components/ui/widgets/editor/partials/page-mode-views.tsx
|
|
4614
4614
|
var Yc = Ot(() => import("./rich-text-viewer-CXJp584B.js").then((e) => e.n).then((e) => ({ default: e.RichTextViewer })));
|
|
4615
4615
|
function Xc() {
|
|
4616
|
-
let { handle: e } =
|
|
4616
|
+
let { handle: e } = _(), { editor: t } = e, n = F({
|
|
4617
4617
|
editor: t,
|
|
4618
4618
|
selector: (e) => e.editor?.state.doc ?? null,
|
|
4619
4619
|
equalityFn: (e, t) => e === t
|
|
@@ -4632,7 +4632,7 @@ function Zc({ children: e }) {
|
|
|
4632
4632
|
});
|
|
4633
4633
|
}
|
|
4634
4634
|
function Qc({ json: e, components: t }) {
|
|
4635
|
-
let { t: n } =
|
|
4635
|
+
let { t: n } = N(), { look: r } = _(), i = n("material.editor.page.empty", "Nothing to show yet.");
|
|
4636
4636
|
return e ? /* @__PURE__ */ J(Dt, {
|
|
4637
4637
|
fallback: /* @__PURE__ */ J(Zc, { children: n("material.editor.page.loading", "Loading…") }),
|
|
4638
4638
|
children: /* @__PURE__ */ J(Yc, {
|
|
@@ -4644,7 +4644,7 @@ function Qc({ json: e, components: t }) {
|
|
|
4644
4644
|
}) : /* @__PURE__ */ J(Zc, { children: i });
|
|
4645
4645
|
}
|
|
4646
4646
|
function $c({ json: e }) {
|
|
4647
|
-
let { t } =
|
|
4647
|
+
let { t } = N(), { handle: n } = _(), [r, i] = K(null), a = n.editor?.extensionManager.extensions;
|
|
4648
4648
|
return U(() => {
|
|
4649
4649
|
let t = !0;
|
|
4650
4650
|
if (!e) {
|
|
@@ -4721,7 +4721,7 @@ function al({ floating: e, children: n }) {
|
|
|
4721
4721
|
//#endregion
|
|
4722
4722
|
//#region lib/components/ui/widgets/editor/presets/page-rails.tsx
|
|
4723
4723
|
function ol({ children: e, fab: t }) {
|
|
4724
|
-
let { t: n } =
|
|
4724
|
+
let { t: n } = N();
|
|
4725
4725
|
return t === void 0 ? /* @__PURE__ */ J("aside", {
|
|
4726
4726
|
"aria-label": n("material.editor.tools", "Tools"),
|
|
4727
4727
|
"data-slot": "document-editor-tools",
|
|
@@ -4741,7 +4741,7 @@ function ol({ children: e, fab: t }) {
|
|
|
4741
4741
|
});
|
|
4742
4742
|
}
|
|
4743
4743
|
function sl({ side: e, children: t }) {
|
|
4744
|
-
let { t: n } =
|
|
4744
|
+
let { t: n } = N();
|
|
4745
4745
|
return /* @__PURE__ */ J("aside", {
|
|
4746
4746
|
"aria-label": n("material.editor.outline-region", "Document outline"),
|
|
4747
4747
|
"data-slot": "document-editor-rail",
|
|
@@ -4751,7 +4751,7 @@ function sl({ side: e, children: t }) {
|
|
|
4751
4751
|
});
|
|
4752
4752
|
}
|
|
4753
4753
|
function cl({ children: e }) {
|
|
4754
|
-
let { t } =
|
|
4754
|
+
let { t } = N();
|
|
4755
4755
|
return /* @__PURE__ */ J("aside", {
|
|
4756
4756
|
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4757
4757
|
"data-slot": "document-editor-comments",
|
|
@@ -4759,34 +4759,34 @@ function cl({ children: e }) {
|
|
|
4759
4759
|
children: e
|
|
4760
4760
|
});
|
|
4761
4761
|
}
|
|
4762
|
-
function ll({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, panels: o, footer: s, outline: c, comments: l, presence: u, outlineSide: d = "start", className:
|
|
4763
|
-
let { chrome:
|
|
4762
|
+
function ll({ 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 }) {
|
|
4763
|
+
let { chrome: m, handle: h, look: g } = _(), v = g === "expressive", y = h.features.some((e) => e.key === "dragHandle"), b = m.state.focusMode, x = G(null), [S, C] = K("write"), w = S === "write", T = mc(x, 64), E = mc(x, 72), D = w && !b, ee = D && T && r, O = !!(n && D && !ee), k = c && D && E, te = l && D && T;
|
|
4764
4764
|
return /* @__PURE__ */ Y("div", {
|
|
4765
4765
|
ref: x,
|
|
4766
4766
|
"data-slot": "document-editor",
|
|
4767
|
-
"data-look":
|
|
4767
|
+
"data-look": g,
|
|
4768
4768
|
"data-layout": "page",
|
|
4769
4769
|
"data-mode": S,
|
|
4770
|
-
className: t(tl(v,
|
|
4770
|
+
className: t(tl(v, O), f),
|
|
4771
4771
|
children: [
|
|
4772
4772
|
/* @__PURE__ */ J(rl, {
|
|
4773
4773
|
mode: S,
|
|
4774
|
-
onModeChange:
|
|
4774
|
+
onModeChange: C,
|
|
4775
4775
|
showSwitch: !b,
|
|
4776
4776
|
presence: u,
|
|
4777
|
-
panels:
|
|
4778
|
-
children:
|
|
4777
|
+
panels: w && o,
|
|
4778
|
+
children: D && !ee && e
|
|
4779
4779
|
}),
|
|
4780
4780
|
/* @__PURE__ */ J(ya, { className: "absolute end-3 top-3 z-20" }),
|
|
4781
|
-
|
|
4781
|
+
O && n,
|
|
4782
4782
|
/* @__PURE__ */ Y("div", {
|
|
4783
4783
|
className: "flex items-start gap-4 px-2 pb-6 @2xl:gap-6 @2xl:px-6",
|
|
4784
4784
|
children: [
|
|
4785
|
-
|
|
4785
|
+
ee && /* @__PURE__ */ J(ol, {
|
|
4786
4786
|
fab: i,
|
|
4787
4787
|
children: r
|
|
4788
4788
|
}),
|
|
4789
|
-
|
|
4789
|
+
k && d === "start" && /* @__PURE__ */ J(sl, {
|
|
4790
4790
|
side: "start",
|
|
4791
4791
|
children: c
|
|
4792
4792
|
}),
|
|
@@ -4797,18 +4797,18 @@ function ll({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, pan
|
|
|
4797
4797
|
handleGutter: y,
|
|
4798
4798
|
mode: S,
|
|
4799
4799
|
previewComponents: a,
|
|
4800
|
-
children:
|
|
4800
|
+
children: p
|
|
4801
4801
|
})
|
|
4802
4802
|
}),
|
|
4803
|
-
|
|
4803
|
+
k && d === "end" && /* @__PURE__ */ J(sl, {
|
|
4804
4804
|
side: "end",
|
|
4805
4805
|
children: c
|
|
4806
4806
|
}),
|
|
4807
|
-
|
|
4807
|
+
te && /* @__PURE__ */ J(cl, { children: l })
|
|
4808
4808
|
]
|
|
4809
4809
|
}),
|
|
4810
4810
|
s && /* @__PURE__ */ J(al, {
|
|
4811
|
-
floating:
|
|
4811
|
+
floating: O,
|
|
4812
4812
|
children: s
|
|
4813
4813
|
})
|
|
4814
4814
|
]
|
|
@@ -4848,14 +4848,14 @@ function pl(e, t) {
|
|
|
4848
4848
|
});
|
|
4849
4849
|
}
|
|
4850
4850
|
function ml(e, t) {
|
|
4851
|
-
return pl(e, t).flatMap((e) => e.id === "marks" && e.render ===
|
|
4851
|
+
return pl(e, t).flatMap((e) => e.id === "marks" && e.render === f ? [{
|
|
4852
4852
|
...e,
|
|
4853
|
-
render:
|
|
4853
|
+
render: te
|
|
4854
4854
|
}, {
|
|
4855
4855
|
...e,
|
|
4856
4856
|
id: "marks-extra",
|
|
4857
4857
|
order: e.order + .5,
|
|
4858
|
-
render:
|
|
4858
|
+
render: D
|
|
4859
4859
|
}] : [e]).map((e) => ({
|
|
4860
4860
|
...e,
|
|
4861
4861
|
priority: dl[e.id] ?? e.priority
|
|
@@ -4864,17 +4864,17 @@ function ml(e, t) {
|
|
|
4864
4864
|
//#endregion
|
|
4865
4865
|
//#region lib/components/ui/widgets/editor/partials/use-toolbar-shown.ts
|
|
4866
4866
|
function hl() {
|
|
4867
|
-
let { handle: e, chrome: t } =
|
|
4868
|
-
return !!
|
|
4867
|
+
let { handle: e, chrome: t } = _();
|
|
4868
|
+
return !!F({
|
|
4869
4869
|
editor: e.editor,
|
|
4870
|
-
selector: (e) => !!(e.editor?.isEditable &&
|
|
4870
|
+
selector: (e) => !!(e.editor?.isEditable && p.selectShowToolbar(t.state))
|
|
4871
4871
|
});
|
|
4872
4872
|
}
|
|
4873
4873
|
//#endregion
|
|
4874
4874
|
//#region lib/components/ui/widgets/editor/partials/editor-insert-fab.tsx
|
|
4875
4875
|
function gl() {
|
|
4876
|
-
let { t: e } =
|
|
4877
|
-
return !n || !o || a.length === 0 ? null : /* @__PURE__ */ J(
|
|
4876
|
+
let { t: e } = N(), { handle: t } = _(), { editor: n, features: r } = t, i = G(!1), a = W(() => ye(fl(r), "", e), [r, e]), o = hl();
|
|
4877
|
+
return !n || !o || a.length === 0 ? null : /* @__PURE__ */ J(y, {
|
|
4878
4878
|
"data-slot": "editor-insert-fab",
|
|
4879
4879
|
label: e("material.editor.insert", "Insert"),
|
|
4880
4880
|
items: a.map((e) => ({
|
|
@@ -4901,23 +4901,23 @@ function gl() {
|
|
|
4901
4901
|
//#endregion
|
|
4902
4902
|
//#region lib/components/ui/widgets/editor/partials/editor-floating-bar.tsx
|
|
4903
4903
|
function _l({ className: e }) {
|
|
4904
|
-
let { handle: t } =
|
|
4904
|
+
let { handle: t } = _(), n = W(() => fl(t.features), [t.features]), i = H((e) => ml(e, n), [n]);
|
|
4905
4905
|
return hl() ? /* @__PURE__ */ J("div", {
|
|
4906
4906
|
"data-slot": "editor-floating-bar",
|
|
4907
4907
|
className: "nxgt-editor-bar",
|
|
4908
|
-
children: /* @__PURE__ */ Y(
|
|
4908
|
+
children: /* @__PURE__ */ Y(r, { children: [/* @__PURE__ */ J(A, {
|
|
4909
4909
|
variant: "floating",
|
|
4910
4910
|
dividers: !1,
|
|
4911
4911
|
className: e,
|
|
4912
|
-
groupsFor:
|
|
4912
|
+
groupsFor: i
|
|
4913
4913
|
}), /* @__PURE__ */ J(gl, {})] })
|
|
4914
4914
|
}) : null;
|
|
4915
4915
|
}
|
|
4916
4916
|
//#endregion
|
|
4917
4917
|
//#region lib/components/ui/widgets/editor/partials/editor-rail-toolbar.tsx
|
|
4918
4918
|
function vl({ floating: e, className: t }) {
|
|
4919
|
-
let { handle: n } =
|
|
4920
|
-
return /* @__PURE__ */ J(
|
|
4919
|
+
let { handle: n } = _(), r = W(() => e ? fl(n.features) : [], [e, n.features]), i = H((e) => pl(e, r), [r]);
|
|
4920
|
+
return /* @__PURE__ */ J(A, {
|
|
4921
4921
|
orientation: "vertical",
|
|
4922
4922
|
variant: e ? "floating" : void 0,
|
|
4923
4923
|
className: t,
|
|
@@ -4929,7 +4929,7 @@ function vl({ floating: e, className: t }) {
|
|
|
4929
4929
|
function yl({ look: e, layout: t, previewComponents: n, outline: r, comments: i, collaboration: a, collaborationStatus: o, footer: s, status: c, actions: l }) {
|
|
4930
4930
|
let u = t === "page", d = Pc(e), f = e === "expressive";
|
|
4931
4931
|
return {
|
|
4932
|
-
toolbar: f ? void 0 : /* @__PURE__ */ J(
|
|
4932
|
+
toolbar: f ? void 0 : /* @__PURE__ */ J(A, {
|
|
4933
4933
|
dividers: !1,
|
|
4934
4934
|
className: u ? d.docked : Nc(e, wc)
|
|
4935
4935
|
}),
|
|
@@ -4962,7 +4962,7 @@ function bl(e) {
|
|
|
4962
4962
|
//#endregion
|
|
4963
4963
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-adapter-sync.tsx
|
|
4964
4964
|
function xl({ adapter: e }) {
|
|
4965
|
-
let { handle: t } =
|
|
4965
|
+
let { handle: t } = _(), n = Cr(t.editor);
|
|
4966
4966
|
return U(() => n?.checkAdapter(), [n, e]), null;
|
|
4967
4967
|
}
|
|
4968
4968
|
//#endregion
|
|
@@ -4970,8 +4970,8 @@ function xl({ adapter: e }) {
|
|
|
4970
4970
|
function Sl({ onUpload: e, onUploadingChange: t, withComments: n, commentsAdapter: r }) {
|
|
4971
4971
|
return /* @__PURE__ */ Y(q, { children: [
|
|
4972
4972
|
e && /* @__PURE__ */ J(uc, { onChange: t }),
|
|
4973
|
+
/* @__PURE__ */ J(Ae, {}),
|
|
4973
4974
|
/* @__PURE__ */ J(je, {}),
|
|
4974
|
-
/* @__PURE__ */ J(Me, {}),
|
|
4975
4975
|
/* @__PURE__ */ J(sr, {}),
|
|
4976
4976
|
/* @__PURE__ */ J(yi, {}),
|
|
4977
4977
|
/* @__PURE__ */ J(Dr, {}),
|
|
@@ -5025,50 +5025,50 @@ function wl({ features: e, mentions: t, outline: n, onUpload: r, uploadOptions:
|
|
|
5025
5025
|
}
|
|
5026
5026
|
//#endregion
|
|
5027
5027
|
//#region lib/components/ui/widgets/editor/presets/document-editor.tsx
|
|
5028
|
-
function Tl({ features: e, layout: n = "docked", look: r = "expressive", previewComponents: i, status:
|
|
5029
|
-
let { defaults:
|
|
5028
|
+
function Tl({ 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: _, helperText: v, error: y, required: b, className: x, attributes: S, ...C }) {
|
|
5029
|
+
let { defaults: T, commentsFeature: E, editorFeatures: D } = wl({
|
|
5030
5030
|
features: e,
|
|
5031
|
-
mentions:
|
|
5032
|
-
outline:
|
|
5033
|
-
onUpload:
|
|
5034
|
-
uploadOptions:
|
|
5035
|
-
onAssist:
|
|
5036
|
-
assistOptions:
|
|
5037
|
-
comments:
|
|
5038
|
-
collaboration:
|
|
5031
|
+
mentions: C.mentions,
|
|
5032
|
+
outline: c,
|
|
5033
|
+
onUpload: l,
|
|
5034
|
+
uploadOptions: u,
|
|
5035
|
+
onAssist: f,
|
|
5036
|
+
assistOptions: p,
|
|
5037
|
+
comments: m,
|
|
5038
|
+
collaboration: h
|
|
5039
5039
|
});
|
|
5040
|
-
return /* @__PURE__ */ Y(
|
|
5041
|
-
...
|
|
5040
|
+
return /* @__PURE__ */ Y(k, {
|
|
5041
|
+
...C,
|
|
5042
5042
|
look: r,
|
|
5043
|
-
features:
|
|
5044
|
-
defaults:
|
|
5043
|
+
features: D,
|
|
5044
|
+
defaults: T,
|
|
5045
5045
|
attributes: {
|
|
5046
5046
|
class: t("nxgt-prose min-h-64 focus:outline-none"),
|
|
5047
|
-
...
|
|
5047
|
+
...S
|
|
5048
5048
|
},
|
|
5049
|
-
children: [/* @__PURE__ */ J(
|
|
5050
|
-
label:
|
|
5051
|
-
helperText:
|
|
5052
|
-
error:
|
|
5053
|
-
required:
|
|
5054
|
-
className:
|
|
5049
|
+
children: [/* @__PURE__ */ J(w, {
|
|
5050
|
+
label: _,
|
|
5051
|
+
helperText: v,
|
|
5052
|
+
error: y,
|
|
5053
|
+
required: b,
|
|
5054
|
+
className: x,
|
|
5055
5055
|
children: /* @__PURE__ */ J(bl, {
|
|
5056
5056
|
layout: n,
|
|
5057
5057
|
look: r,
|
|
5058
5058
|
previewComponents: i,
|
|
5059
|
-
outline:
|
|
5060
|
-
comments: !!
|
|
5061
|
-
collaboration: !!
|
|
5062
|
-
collaborationStatus:
|
|
5063
|
-
footer:
|
|
5064
|
-
status:
|
|
5065
|
-
actions:
|
|
5059
|
+
outline: c,
|
|
5060
|
+
comments: !!E,
|
|
5061
|
+
collaboration: !!h,
|
|
5062
|
+
collaborationStatus: g,
|
|
5063
|
+
footer: s,
|
|
5064
|
+
status: a,
|
|
5065
|
+
actions: o
|
|
5066
5066
|
})
|
|
5067
5067
|
}), /* @__PURE__ */ J(Sl, {
|
|
5068
|
-
onUpload:
|
|
5069
|
-
onUploadingChange:
|
|
5070
|
-
commentsAdapter:
|
|
5071
|
-
withComments: !!
|
|
5068
|
+
onUpload: l,
|
|
5069
|
+
onUploadingChange: d,
|
|
5070
|
+
commentsAdapter: E ? m?.adapter : void 0,
|
|
5071
|
+
withComments: !!E
|
|
5072
5072
|
})]
|
|
5073
5073
|
});
|
|
5074
5074
|
}
|
|
@@ -5084,7 +5084,7 @@ function El({ control: e, name: n, ...r }) {
|
|
|
5084
5084
|
children: /* @__PURE__ */ J(Tl, {
|
|
5085
5085
|
...r,
|
|
5086
5086
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
5087
|
-
value: e.value ??
|
|
5087
|
+
value: e.value ?? ne(r.format ?? "html"),
|
|
5088
5088
|
onChange: (t) => e.onChange(t),
|
|
5089
5089
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
5090
5090
|
error: n.invalid,
|
|
@@ -5109,12 +5109,12 @@ function Ol({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled
|
|
|
5109
5109
|
}),
|
|
5110
5110
|
t && /* @__PURE__ */ J("div", {
|
|
5111
5111
|
className: "w-full",
|
|
5112
|
-
children: /* @__PURE__ */ J(
|
|
5112
|
+
children: /* @__PURE__ */ J(oe, {
|
|
5113
5113
|
replyTo: t,
|
|
5114
5114
|
onCancel: n
|
|
5115
5115
|
})
|
|
5116
5116
|
}),
|
|
5117
|
-
/* @__PURE__ */ J(
|
|
5117
|
+
/* @__PURE__ */ J(ce, {
|
|
5118
5118
|
attachments: r,
|
|
5119
5119
|
isDisabled: i,
|
|
5120
5120
|
onAttachmentsChange: a,
|
|
@@ -5129,7 +5129,7 @@ function kl({ id: e, look: t }) {
|
|
|
5129
5129
|
id: e,
|
|
5130
5130
|
"data-slot": "rich-chat-composer-toolbar",
|
|
5131
5131
|
className: "w-full px-1",
|
|
5132
|
-
children: /* @__PURE__ */ J(
|
|
5132
|
+
children: /* @__PURE__ */ J(A, {
|
|
5133
5133
|
dividers: !1,
|
|
5134
5134
|
density: "compact",
|
|
5135
5135
|
className: Nc(t, wc)
|
|
@@ -5138,22 +5138,22 @@ function kl({ id: e, look: t }) {
|
|
|
5138
5138
|
}
|
|
5139
5139
|
//#endregion
|
|
5140
5140
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-control.tsx
|
|
5141
|
-
function Al({ sendLabel: e, stopLabel: t, disabled: n, empty:
|
|
5142
|
-
let { t:
|
|
5143
|
-
return !
|
|
5141
|
+
function Al({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSchedule: a, squircle: o }) {
|
|
5142
|
+
let { t: s } = N();
|
|
5143
|
+
return !a || i ? /* @__PURE__ */ J(Ee, {
|
|
5144
5144
|
sendLabel: e,
|
|
5145
5145
|
stopLabel: t,
|
|
5146
5146
|
isDisabled: n,
|
|
5147
|
-
isEmpty:
|
|
5148
|
-
onStop:
|
|
5149
|
-
shape:
|
|
5150
|
-
}) : /* @__PURE__ */ J(
|
|
5147
|
+
isEmpty: r,
|
|
5148
|
+
onStop: i,
|
|
5149
|
+
shape: o ? "squircle" : "round"
|
|
5150
|
+
}) : /* @__PURE__ */ J(ge, {
|
|
5151
5151
|
type: "submit",
|
|
5152
|
-
disabled: n ||
|
|
5153
|
-
menuLabel:
|
|
5154
|
-
menu: /* @__PURE__ */ J(
|
|
5155
|
-
onSelect:
|
|
5156
|
-
children:
|
|
5152
|
+
disabled: n || r,
|
|
5153
|
+
menuLabel: s("material.editor.send-options", "Send options"),
|
|
5154
|
+
menu: /* @__PURE__ */ J(j, {
|
|
5155
|
+
onSelect: a,
|
|
5156
|
+
children: s("material.editor.schedule", "Schedule…")
|
|
5157
5157
|
}),
|
|
5158
5158
|
children: e
|
|
5159
5159
|
});
|
|
@@ -5161,10 +5161,10 @@ function Al({ sendLabel: e, stopLabel: t, disabled: n, empty: i, onStop: a, onSc
|
|
|
5161
5161
|
//#endregion
|
|
5162
5162
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-on-enter.tsx
|
|
5163
5163
|
function jl(e, t) {
|
|
5164
|
-
return e.nativeEvent.keyCode !== 229 &&
|
|
5164
|
+
return e.nativeEvent.keyCode !== 229 && Oe(e, t);
|
|
5165
5165
|
}
|
|
5166
5166
|
function Ml({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i, children: a }) {
|
|
5167
|
-
let { handle: o } =
|
|
5167
|
+
let { handle: o } = _();
|
|
5168
5168
|
return /* @__PURE__ */ J("div", {
|
|
5169
5169
|
"data-slot": "rich-chat-composer-input",
|
|
5170
5170
|
className: i,
|
|
@@ -5178,8 +5178,8 @@ function Ml({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i,
|
|
|
5178
5178
|
//#endregion
|
|
5179
5179
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/format-buttons.tsx
|
|
5180
5180
|
function Nl({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r }) {
|
|
5181
|
-
let { t: i } =
|
|
5182
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
5181
|
+
let { t: i } = N(), { editor: a } = _().handle, o = i("material.editor.formatting-toggle", "Text formatting"), s = i("material.editor.mention", "Mention someone");
|
|
5182
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(P, {
|
|
5183
5183
|
variant: "ghost",
|
|
5184
5184
|
color: "default",
|
|
5185
5185
|
tooltip: o,
|
|
@@ -5190,7 +5190,7 @@ function Nl({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r })
|
|
|
5190
5190
|
onClick: n,
|
|
5191
5191
|
className: "size-8 shrink-0 rounded aria-pressed:bg-primary/10 aria-pressed:text-primary-text",
|
|
5192
5192
|
children: /* @__PURE__ */ J(It, {})
|
|
5193
|
-
}), r && /* @__PURE__ */ J(
|
|
5193
|
+
}), r && /* @__PURE__ */ J(P, {
|
|
5194
5194
|
variant: "ghost",
|
|
5195
5195
|
color: "default",
|
|
5196
5196
|
tooltip: s,
|
|
@@ -5203,13 +5203,13 @@ function Nl({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r })
|
|
|
5203
5203
|
//#endregion
|
|
5204
5204
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/tools-row.tsx
|
|
5205
5205
|
function Pl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionable: a, attach: o, actions: s }) {
|
|
5206
|
-
let { handle: c } =
|
|
5206
|
+
let { handle: c } = _(), { editor: l } = c;
|
|
5207
5207
|
return /* @__PURE__ */ Y("div", {
|
|
5208
5208
|
"data-slot": "rich-chat-composer-tools",
|
|
5209
5209
|
className: t("flex min-w-0 items-end gap-1", e ? "order-1" : "flex-1"),
|
|
5210
|
-
children: [/* @__PURE__ */ J(
|
|
5210
|
+
children: [/* @__PURE__ */ J(be, {
|
|
5211
5211
|
...o,
|
|
5212
|
-
actions: /* @__PURE__ */ Y(q, { children: [l?.storage.emoji && /* @__PURE__ */ J(
|
|
5212
|
+
actions: /* @__PURE__ */ Y(q, { children: [l?.storage.emoji && /* @__PURE__ */ J(De, { editor: l }), !e && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Nl, {
|
|
5213
5213
|
formatOpen: n,
|
|
5214
5214
|
toolbarId: r,
|
|
5215
5215
|
onFormatToggle: i,
|
|
@@ -5221,11 +5221,11 @@ function Pl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionab
|
|
|
5221
5221
|
//#endregion
|
|
5222
5222
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-editor.ts
|
|
5223
5223
|
function Fl({ features: e, minRows: n = 1, maxRows: r = 8, placeholder: i, attributes: a, ...o }) {
|
|
5224
|
-
let { t: s } =
|
|
5224
|
+
let { t: s } = N(), c = W(() => cc().map((e) => e.name === "emoji" ? {
|
|
5225
5225
|
...e,
|
|
5226
5226
|
toolbar: void 0
|
|
5227
5227
|
} : e), []);
|
|
5228
|
-
return
|
|
5228
|
+
return ee({
|
|
5229
5229
|
...o,
|
|
5230
5230
|
features: e ?? c,
|
|
5231
5231
|
defaults: c,
|
|
@@ -5279,7 +5279,7 @@ var zl = (e, t) => e.trim().length > 0 || t > 0;
|
|
|
5279
5279
|
//#endregion
|
|
5280
5280
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-send.ts
|
|
5281
5281
|
function Bl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSchedule: a, onError: o }) {
|
|
5282
|
-
let { t: s } =
|
|
5282
|
+
let { t: s } = N(), [c, l] = K(!1), u = G(!1), d = () => Rl({
|
|
5283
5283
|
getValue: () => e.getValue(),
|
|
5284
5284
|
getJSON: () => e.editor?.getJSON() ?? { type: "doc" },
|
|
5285
5285
|
getExtensions: () => e.editor?.extensionManager.extensions
|
|
@@ -5320,14 +5320,14 @@ function Bl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSche
|
|
|
5320
5320
|
function Vl({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1, isLoading: a = !1, accept: o, maxFiles: s, attachments: c, onAttachmentsChange: l }) {
|
|
5321
5321
|
let [u, d] = K([]), f = c ?? u, p = (e) => {
|
|
5322
5322
|
c === void 0 && d(e), l?.(e);
|
|
5323
|
-
}, m = G(null), h =
|
|
5323
|
+
}, m = G(null), h = me({
|
|
5324
5324
|
attachments: f,
|
|
5325
5325
|
accept: o,
|
|
5326
5326
|
maxFiles: s,
|
|
5327
5327
|
disabled: i,
|
|
5328
5328
|
isLoading: a,
|
|
5329
5329
|
onAttachmentsChange: p
|
|
5330
|
-
}), g = !zl(
|
|
5330
|
+
}), g = !zl(F({
|
|
5331
5331
|
editor: e.editor,
|
|
5332
5332
|
selector: (e) => (e.editor?.getText().trim().length ?? 0) > 0
|
|
5333
5333
|
}) ?? !1 ? "x" : "", f.length), _ = Bl({
|
|
@@ -5356,7 +5356,7 @@ function Vl({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1,
|
|
|
5356
5356
|
//#endregion
|
|
5357
5357
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer.ts
|
|
5358
5358
|
function Hl(e) {
|
|
5359
|
-
let { t } =
|
|
5359
|
+
let { t } = N(), { disabled: n = !1, isLoading: r = !1, collapsed: i = "never" } = e, a = !n && !r, o = Fl({
|
|
5360
5360
|
...e,
|
|
5361
5361
|
editable: a
|
|
5362
5362
|
}), s = Vl({
|
|
@@ -5387,67 +5387,67 @@ function Hl(e) {
|
|
|
5387
5387
|
//#endregion
|
|
5388
5388
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/rich-chat-composer.tsx
|
|
5389
5389
|
function Ul(e) {
|
|
5390
|
-
let { t: n } =
|
|
5390
|
+
let { t: n } = N(), { mentions: r, replyTo: i, onCancelReply: a, actions: s, className: c } = e, { sendOnEnter: l = !0, sendLabel: u, isLoading: d = !1 } = e, { look: f = "expressive" } = e, { handle: p, editable: m, composer: h, ui: g, attach: _ } = Hl(e), { files: v, attachments: y } = h, { pill: b } = g;
|
|
5391
5391
|
return /* @__PURE__ */ J("form", {
|
|
5392
5392
|
"data-slot": "rich-chat-composer",
|
|
5393
|
-
"data-look":
|
|
5394
|
-
"data-collapsed":
|
|
5395
|
-
onSubmit:
|
|
5396
|
-
...
|
|
5393
|
+
"data-look": f,
|
|
5394
|
+
"data-collapsed": b || void 0,
|
|
5395
|
+
onSubmit: h.handleSubmit,
|
|
5396
|
+
...g.formEvents,
|
|
5397
5397
|
className: Dl({
|
|
5398
|
-
pill:
|
|
5399
|
-
look:
|
|
5400
|
-
editable:
|
|
5401
|
-
className:
|
|
5398
|
+
pill: b,
|
|
5399
|
+
look: f,
|
|
5400
|
+
editable: m,
|
|
5401
|
+
className: c
|
|
5402
5402
|
}),
|
|
5403
|
-
children: /* @__PURE__ */ Y(
|
|
5404
|
-
editor:
|
|
5403
|
+
children: /* @__PURE__ */ Y(k, {
|
|
5404
|
+
editor: p,
|
|
5405
5405
|
className: "contents",
|
|
5406
|
-
look:
|
|
5406
|
+
look: f,
|
|
5407
5407
|
children: [
|
|
5408
5408
|
/* @__PURE__ */ J(Ol, {
|
|
5409
|
-
error:
|
|
5409
|
+
error: v.errorMessage ?? h.sendError,
|
|
5410
5410
|
replyTo: i,
|
|
5411
|
-
onCancelReply:
|
|
5412
|
-
attachments:
|
|
5413
|
-
isDisabled:
|
|
5414
|
-
onAttachmentsChange:
|
|
5411
|
+
onCancelReply: a,
|
|
5412
|
+
attachments: y,
|
|
5413
|
+
isDisabled: v.isDisabled,
|
|
5414
|
+
onAttachmentsChange: h.setAttachments
|
|
5415
5415
|
}),
|
|
5416
5416
|
/* @__PURE__ */ J(Ml, {
|
|
5417
|
-
className: t("min-w-0 px-2 py-1",
|
|
5418
|
-
onFocus:
|
|
5419
|
-
onSend: () => void
|
|
5420
|
-
sendOnEnter:
|
|
5421
|
-
disabled: !
|
|
5417
|
+
className: t("min-w-0 px-2 py-1", b ? "order-2 flex-1" : "w-full"),
|
|
5418
|
+
onFocus: g.activate,
|
|
5419
|
+
onSend: () => void h.send(),
|
|
5420
|
+
sendOnEnter: l,
|
|
5421
|
+
disabled: !m,
|
|
5422
5422
|
children: /* @__PURE__ */ J(o, {})
|
|
5423
5423
|
}),
|
|
5424
|
-
|
|
5425
|
-
id:
|
|
5426
|
-
look:
|
|
5424
|
+
g.formatOpen && !b && /* @__PURE__ */ J(kl, {
|
|
5425
|
+
id: g.toolbarId,
|
|
5426
|
+
look: f
|
|
5427
5427
|
}),
|
|
5428
5428
|
/* @__PURE__ */ J(Pl, {
|
|
5429
|
-
pill:
|
|
5430
|
-
formatOpen:
|
|
5431
|
-
toolbarId:
|
|
5432
|
-
onFormatToggle:
|
|
5429
|
+
pill: b,
|
|
5430
|
+
formatOpen: g.formatOpen,
|
|
5431
|
+
toolbarId: g.toolbarId,
|
|
5432
|
+
onFormatToggle: g.toggleFormat,
|
|
5433
5433
|
mentionable: !!r?.length,
|
|
5434
|
-
actions:
|
|
5435
|
-
attach:
|
|
5434
|
+
actions: s,
|
|
5435
|
+
attach: _
|
|
5436
5436
|
}),
|
|
5437
5437
|
/* @__PURE__ */ J("div", {
|
|
5438
|
-
className: t("shrink-0",
|
|
5438
|
+
className: t("shrink-0", b && "order-3"),
|
|
5439
5439
|
children: /* @__PURE__ */ J(Al, {
|
|
5440
|
-
sendLabel:
|
|
5440
|
+
sendLabel: u ?? n("material.chat.send", "Send"),
|
|
5441
5441
|
stopLabel: n("material.chat.composer.stop", "Stop generating"),
|
|
5442
|
-
disabled:
|
|
5443
|
-
empty:
|
|
5444
|
-
onStop:
|
|
5445
|
-
onSchedule:
|
|
5446
|
-
squircle:
|
|
5442
|
+
disabled: v.isDisabled,
|
|
5443
|
+
empty: h.empty,
|
|
5444
|
+
onStop: d ? e.onStop : void 0,
|
|
5445
|
+
onSchedule: h.schedule,
|
|
5446
|
+
squircle: f === "expressive"
|
|
5447
5447
|
})
|
|
5448
5448
|
}),
|
|
5449
|
-
/* @__PURE__ */ J(
|
|
5450
|
-
/* @__PURE__ */ J(
|
|
5449
|
+
/* @__PURE__ */ J(Ae, {}),
|
|
5450
|
+
/* @__PURE__ */ J(je, {})
|
|
5451
5451
|
]
|
|
5452
5452
|
})
|
|
5453
5453
|
});
|
|
@@ -5455,24 +5455,24 @@ function Ul(e) {
|
|
|
5455
5455
|
//#endregion
|
|
5456
5456
|
//#region lib/components/ui/widgets/editor/index.ts
|
|
5457
5457
|
var Wl = {
|
|
5458
|
-
Root:
|
|
5458
|
+
Root: k,
|
|
5459
5459
|
Content: o,
|
|
5460
|
-
Toolbar:
|
|
5460
|
+
Toolbar: A,
|
|
5461
5461
|
Panel: jr,
|
|
5462
5462
|
AssistantPanel: sr,
|
|
5463
|
-
BubbleMenu:
|
|
5463
|
+
BubbleMenu: Ae,
|
|
5464
5464
|
CommentsRail: Oi,
|
|
5465
5465
|
CommentsPanel: yi,
|
|
5466
5466
|
CommentComposer: Dr,
|
|
5467
|
-
SuggestionList:
|
|
5467
|
+
SuggestionList: je,
|
|
5468
5468
|
Footer: Ta,
|
|
5469
5469
|
Outline: Na,
|
|
5470
5470
|
OutlinePanel: Fa,
|
|
5471
5471
|
FindPanel: ga,
|
|
5472
5472
|
BlockHandle: Wi,
|
|
5473
5473
|
FocusExit: ya,
|
|
5474
|
-
Field:
|
|
5474
|
+
Field: w,
|
|
5475
5475
|
Presence: hr
|
|
5476
5476
|
};
|
|
5477
5477
|
//#endregion
|
|
5478
|
-
export { Kc as CompactEditor, qc as CompactEditorFormField, Tl as DocumentEditor, El as DocumentEditorFormField, Wl as Editor, sr as EditorAssistantPanel, Wi as EditorBlockHandle,
|
|
5478
|
+
export { Kc as CompactEditor, qc as CompactEditorFormField, Tl as DocumentEditor, El as DocumentEditorFormField, Wl as Editor, sr as EditorAssistantPanel, Wi as EditorBlockHandle, Ae as EditorBubbleMenu, Dr as EditorCommentComposer, yi as EditorCommentsPanel, Oi as EditorCommentsRail, o as EditorContent, w as EditorField, ga as EditorFindPanel, ya as EditorFocusExit, Ta as EditorFooter, Na as EditorOutline, Fa as EditorOutlinePanel, jr as EditorPanel, hr as EditorPresence, k as EditorRoot, je as EditorSuggestionList, A as EditorToolbar, Ul as RichChatComposer, cc as chatKit, sc as compactKit, V as defineFeature, oc as documentKit, nc as editorFeatures, ac as formNodesKit, vt as fromMarkdown, Ha as looksLikeMarkdown, yt as toHtml, _t as toJson, gt as toMarkdown, ee as useEditor, _ as useEditorContext, dr as useEditorPresence, Sa as useEditorStats, Ra as useEditorUploads, rc as withFeatures, ic as withoutFeatures };
|