@harbour-enterprises/superdoc 0.29.0 → 0.30.0-next.2
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/dist/chunks/{PdfViewer-DUMZ9x59.es.js → PdfViewer-B_U27-1K.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BVriqvm9.cjs → PdfViewer-DjMr1y41.cjs} +1 -1
- package/dist/chunks/{index-373DqHu6-BLRN3Gja.es.js → index-BJia6SL_-D6cjpcdW.es.js} +1 -1
- package/dist/chunks/{index-373DqHu6-CPe3gPzf.cjs → index-BJia6SL_-O9_RiF6K.cjs} +1 -1
- package/dist/chunks/{index-_cWKslAS.es.js → index-D8F3d1e3.es.js} +3 -3
- package/dist/chunks/{index-DEOkqJcc.cjs → index-uO0JG1KW.cjs} +3 -3
- package/dist/chunks/{super-editor.es-83k0FoXr.es.js → super-editor.es-BjEfFiAF.es.js} +8225 -8225
- package/dist/chunks/{super-editor.es-BkBSpy8W.cjs → super-editor.es-C0Cv2AzF.cjs} +8225 -8225
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/style.css +61 -18
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-B86bAVY0.js → converter-DxPmeV-v.js} +7471 -7799
- package/dist/super-editor/chunks/{docx-zipper-D1VjYtEw.js → docx-zipper-BnnW7IuB.js} +1 -1
- package/dist/super-editor/chunks/{editor-a9U6w_LW.js → editor-B2jkX1wz.js} +430 -106
- package/dist/super-editor/chunks/{index-373DqHu6.js → index-BJia6SL_.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-D0NuB59d.js → toolbar-DFlHgpZd.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +61 -18
- package/dist/super-editor/super-editor/src/components/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/relationship-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/styles.d.ts +24 -0
- package/dist/super-editor/super-editor/src/core/super-converter/styles.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +2 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts +11 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/trackChangesImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +30 -4
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/utils.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/adjustRightInd/adjustRightInd-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/adjustRightInd/adjustRightInd-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/adjustRightInd/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/adjustRightInd/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDE/autoSpaceDE-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDE/autoSpaceDE-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDE/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDE/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDN/autoSpaceDN-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDN/autoSpaceDN-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDN/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/autoSpaceDN/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/b/b-translator.d.ts +1 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/b/b-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bCs/bCs-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bCs/bCs-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bCs/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bCs/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bar/bar-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bar/bar-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bar/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bar/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/between/between-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/between/between-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/between/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/between/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bidi/bidi-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bidi/bidi-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bidi/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/bidi/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/caps/caps-translator.d.ts +1 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/caps/caps-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/color-translator.d.ts +1 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/color-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/contextualSpacing/contextualSpacing-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/contextualSpacing/contextualSpacing-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/contextualSpacing/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/contextualSpacing/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/dstrike/dstrike-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/dstrike/dstrike-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/framePr/framePr-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/framePr/framePr-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/framePr/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/framePr/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/headers-translator.d.ts +0 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/headers-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/i/i-translator.d.ts +1 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/i/i-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ilvl/ilvl-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ilvl/ilvl-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ilvl/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ilvl/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ind/ind-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ind/ind-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ind/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ind/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepLines/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepLines/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepLines/keepLines-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepLines/keepLines-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepNext/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepNext/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepNext/keepNext-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/keepNext/keepNext-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/kinsoku/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/kinsoku/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/kinsoku/kinsoku-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/kinsoku/kinsoku-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/lang/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/lang/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/lang/lang-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/lang/lang-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/mirrorIndents/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/mirrorIndents/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/mirrorIndents/mirrorIndents-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/mirrorIndents/mirrorIndents-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numId/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numId/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numId/numId-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numId/numId-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numPr/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numPr/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numPr/numPr-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/numPr/numPr-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/outlineLvl/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/outlineLvl/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/outlineLvl/outlineLvl-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/outlineLvl/outlineLvl-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/overflowPunct/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/overflowPunct/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/overflowPunct/overflowPunct-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/overflowPunct/overflowPunct-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/index.d.ts +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/legacy-handle-paragraph-node.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pBdr/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pBdr/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pBdr/pBdr-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pBdr/pBdr-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pPr/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pPr/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pPr/pPr-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pPr/pPr-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pStyle/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pStyle/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pStyle/pStyle-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pStyle/pStyle-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pageBreakBefore/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pageBreakBefore/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pageBreakBefore/pageBreakBefore-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pageBreakBefore/pageBreakBefore-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pict/helpers/handle-v-rect-import.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pict/helpers/handle-v-rect-import.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/helpers/helpers.d.ts +1 -37
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/helpers/helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/helpers/index.d.ts +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/r-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/rFonts-translator.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/rFonts-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rStyle/rstyle-translator.d.ts +1 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rStyle/rstyle-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rpr/rpr-translator.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rpr/rpr-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/snapToGrid/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/snapToGrid/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/snapToGrid/snapToGrid-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/snapToGrid/snapToGrid-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/spacing/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/spacing/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/spacing/letter-spacing-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/spacing/letter-spacing-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/spacing/spacing-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/spacing/spacing-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/strike/strike-translator.d.ts +1 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/strike/strike-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressAutoHyphens/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressAutoHyphens/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressAutoHyphens/suppressAutoHyphens-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressAutoHyphens/suppressAutoHyphens-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressLineNumbers/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressLineNumbers/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressLineNumbers/suppressLineNumbers-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressLineNumbers/suppressLineNumbers-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressOverlap/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressOverlap/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressOverlap/suppressOverlap-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/suppressOverlap/suppressOverlap-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sz/sz-translator.d.ts +5 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sz/sz-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/szcs/szcs-translator.d.ts +5 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/szcs/szcs-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-pos.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-pos.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/{w-tab-size.d.ts → w-tab-type.d.ts} +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-type.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tab/tab-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tabs/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tabs/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tabs/tabs-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tabs/tabs-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tblGrid/tblGrid-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textAlignment/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textAlignment/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textAlignment/textAlignment-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textAlignment/textAlignment-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textboxTightWrap/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textboxTightWrap/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textboxTightWrap/textboxTightWrap-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textboxTightWrap/textboxTightWrap-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/topLinePunct/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/topLinePunct/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/topLinePunct/topLinePunct-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/topLinePunct/topLinePunct-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/widowControl/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/widowControl/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/widowControl/widowControl-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/widowControl/widowControl-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/wordWrap/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/wordWrap/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/wordWrap/wordWrap-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/wordWrap/wordWrap-translator.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/encode-image-node-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/index.d.ts +2 -1
- package/dist/super-editor/super-editor/src/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/helpers.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/paragraph/helpers/getDefaultSpacing.d.ts +4 -4
- package/dist/super-editor/super-editor/src/extensions/paragraph/paragraph.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/search/prosemirror-search-patched.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-group/ShapeGroupView.d.ts +22 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/ShapeGroupView.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/index.d.ts +3 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/index.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts +3 -0
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/tab/helpers/tabDecorations.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/utils/headless-helpers.d.ts +1 -0
- package/dist/super-editor/super-editor/src/utils/headless-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +38 -29
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +7991 -7991
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/b/attributes/index.d.ts +0 -4
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/b/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/b/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/b/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/index.d.ts +0 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-theme-color.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-theme-color.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-theme-shade.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-theme-shade.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-theme-tint.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-theme-tint.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/color/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/i/attributes/index.d.ts +0 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/i/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/i/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/i/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/helpers/split-run-properties.d.ts +0 -10
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/helpers/split-run-properties.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/index.d.ts +0 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-ascii.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-ascii.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-cs.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-cs.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-east-asia.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-east-asia.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-hansi.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-hansi.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rFonts/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rStyle/attributes/index.d.ts +0 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rStyle/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rStyle/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rStyle/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rpr/run-property-translators.d.ts +0 -12
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/rpr/run-property-translators.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/strike/attributes/index.d.ts +0 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/strike/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/strike/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/strike/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sz/attributes/index.d.ts +0 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sz/attributes/index.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sz/attributes/w-val.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sz/attributes/w-val.d.ts.map +0 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-size.d.ts.map +0 -1
|
@@ -12,8 +12,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, applyIndentStyling_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as
|
|
16
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as twipsToPixels, an as halfPointToPixels, ao as findParentNodeClosestToPos, ap as docxNumberingHelpers, aq as getListItemStyleDefinitions, ar as parseIndentElement, as as combineIndents, at as eighthPointsToPixels, au as linesToTwips, av as PIXELS_PER_INCH, aw as SelectionRange, ax as Transform, ay as isInTable$1, az as generateDocxRandomId, aA as insertNewRelationship, aB as inchesToPixels } from "./converter-DxPmeV-v.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-BnnW7IuB.js";
|
|
17
17
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
@@ -11701,9 +11701,15 @@ const applyStyleIsolationClass = (target) => {
|
|
|
11701
11701
|
if (!target || !target.classList) return;
|
|
11702
11702
|
target.classList.add(STYLE_ISOLATION_CLASS);
|
|
11703
11703
|
};
|
|
11704
|
+
const isHeadless = (editor) => {
|
|
11705
|
+
return editor?.options?.isHeadless ?? false;
|
|
11706
|
+
};
|
|
11707
|
+
const shouldSkipNodeView = (editor) => {
|
|
11708
|
+
return isHeadless(editor);
|
|
11709
|
+
};
|
|
11704
11710
|
const PaginationPluginKey = new PluginKey("paginationPlugin");
|
|
11705
11711
|
const initPaginationData = async (editor) => {
|
|
11706
|
-
if (!editor.converter) return;
|
|
11712
|
+
if (isHeadless(editor) || !editor.converter) return;
|
|
11707
11713
|
const sectionData = { headers: {}, footers: {} };
|
|
11708
11714
|
const headerIds = editor.converter.headerIds.ids;
|
|
11709
11715
|
const footerIds = editor.converter.footerIds.ids;
|
|
@@ -11839,6 +11845,7 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
|
|
|
11839
11845
|
});
|
|
11840
11846
|
};
|
|
11841
11847
|
const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
|
|
11848
|
+
if (isHeadless(editor)) return;
|
|
11842
11849
|
editor.converter.headerEditors.forEach((item) => {
|
|
11843
11850
|
item.editor.setEditable(isEditMode, false);
|
|
11844
11851
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
@@ -14955,10 +14962,12 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14955
14962
|
};
|
|
14956
14963
|
if ("orientation" in screen && "addEventListener" in screen.orientation) {
|
|
14957
14964
|
screen.orientation.addEventListener("change", handleResize);
|
|
14958
|
-
} else {
|
|
14965
|
+
} else if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
|
14959
14966
|
window.matchMedia("(orientation: portrait)").addEventListener("change", handleResize);
|
|
14960
14967
|
}
|
|
14961
|
-
window.addEventListener
|
|
14968
|
+
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
14969
|
+
window.addEventListener("resize", () => handleResize);
|
|
14970
|
+
}
|
|
14962
14971
|
}
|
|
14963
14972
|
/**
|
|
14964
14973
|
* Get document identifier for telemetry (async - may generate hash)
|
|
@@ -15072,7 +15081,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15072
15081
|
{ default: remarkStringify },
|
|
15073
15082
|
{ default: remarkGfm }
|
|
15074
15083
|
] = await Promise.all([
|
|
15075
|
-
import("./index-
|
|
15084
|
+
import("./index-BJia6SL_.js"),
|
|
15076
15085
|
import("./index-DRCvimau.js"),
|
|
15077
15086
|
import("./index-C_x_N6Uh.js"),
|
|
15078
15087
|
import("./index-D_sWOSiG.js"),
|
|
@@ -15124,7 +15133,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15124
15133
|
this.initDefaultStyles();
|
|
15125
15134
|
hasMadeUpdate = true;
|
|
15126
15135
|
}
|
|
15127
|
-
if (hasMadeUpdate) {
|
|
15136
|
+
if (hasMadeUpdate && !isHeadless(this)) {
|
|
15128
15137
|
const newTr = this.view.state.tr;
|
|
15129
15138
|
newTr.setMeta("forceUpdatePagination", true);
|
|
15130
15139
|
this.view.dispatch(newTr);
|
|
@@ -15290,7 +15299,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15290
15299
|
* @returns {Object | void} Migration results
|
|
15291
15300
|
*/
|
|
15292
15301
|
processCollaborationMigrations() {
|
|
15293
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.
|
|
15302
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.30.0-next.2");
|
|
15294
15303
|
if (!this.options.ydoc) return;
|
|
15295
15304
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
15296
15305
|
let docVersion = metaMap.get("version");
|
|
@@ -15802,16 +15811,18 @@ createView_fn = function(element) {
|
|
|
15802
15811
|
handleClick: __privateMethod(this, _Editor_instances, handleNodeSelection_fn).bind(this),
|
|
15803
15812
|
handleDoubleClick: async (view, pos, event) => {
|
|
15804
15813
|
if (this.options.documentMode !== "editing") return;
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15814
|
+
if (!isHeadless(this)) {
|
|
15815
|
+
const isHeader = hasSomeParentWithClass(event.target, "pagination-section-header");
|
|
15816
|
+
const isFooter = hasSomeParentWithClass(event.target, "pagination-section-footer");
|
|
15817
|
+
if (isHeader || isFooter) {
|
|
15818
|
+
const eventClone = new event.constructor(event.type);
|
|
15819
|
+
event.target.dispatchEvent(eventClone);
|
|
15820
|
+
if (this.options.isHeaderOrFooter && this.options.editable) setWordSelection(view, pos);
|
|
15821
|
+
return;
|
|
15822
|
+
}
|
|
15812
15823
|
}
|
|
15813
15824
|
event.stopPropagation();
|
|
15814
|
-
if (!this.options.editable) {
|
|
15825
|
+
if (!this.options.editable && !isHeadless(this)) {
|
|
15815
15826
|
this.setEditable(true, false);
|
|
15816
15827
|
toggleHeaderFooterEditMode({
|
|
15817
15828
|
editor: this,
|
|
@@ -19361,11 +19372,25 @@ const getSpacingStyle = (spacing) => {
|
|
|
19361
19372
|
...lineHeightStyles
|
|
19362
19373
|
};
|
|
19363
19374
|
};
|
|
19364
|
-
const getSpacingStyleString = (spacing) => {
|
|
19365
|
-
|
|
19375
|
+
const getSpacingStyleString = (spacing, marks) => {
|
|
19376
|
+
let { before, after, line, lineRule, beforeAutospacing, afterAutospacing } = spacing;
|
|
19377
|
+
line = twipsToLines(line);
|
|
19378
|
+
if (lineRule === "exact" && line) {
|
|
19379
|
+
line = String(line);
|
|
19380
|
+
}
|
|
19381
|
+
const textStyleMark = marks?.find((mark) => mark.type === "textStyle");
|
|
19382
|
+
const fontSize = textStyleMark?.attrs?.fontSize;
|
|
19383
|
+
before = twipsToPixels(before);
|
|
19384
|
+
if (beforeAutospacing && fontSize) {
|
|
19385
|
+
before += halfPointToPixels(parseInt(fontSize) * 0.5);
|
|
19386
|
+
}
|
|
19387
|
+
after = twipsToPixels(after);
|
|
19388
|
+
if (afterAutospacing && fontSize) {
|
|
19389
|
+
after += halfPointToPixels(parseInt(fontSize) * 0.5);
|
|
19390
|
+
}
|
|
19366
19391
|
return `
|
|
19367
|
-
${
|
|
19368
|
-
${
|
|
19392
|
+
${before ? `margin-top: ${before}px;` : ""}
|
|
19393
|
+
${after ? `margin-bottom: ${after}px;` : ""}
|
|
19369
19394
|
${line ? getLineHeightValueString(line, "") : ""}
|
|
19370
19395
|
`.trim();
|
|
19371
19396
|
};
|
|
@@ -20490,9 +20515,6 @@ function orderedListSync(editor) {
|
|
|
20490
20515
|
}
|
|
20491
20516
|
});
|
|
20492
20517
|
}
|
|
20493
|
-
const shouldSkipNodeView = (editor) => {
|
|
20494
|
-
return editor.options.isHeadless;
|
|
20495
|
-
};
|
|
20496
20518
|
const ListItem = Node$1.create({
|
|
20497
20519
|
name: "listItem",
|
|
20498
20520
|
content: "paragraph* block*",
|
|
@@ -20705,10 +20727,10 @@ const ListItem = Node$1.create({
|
|
|
20705
20727
|
}
|
|
20706
20728
|
});
|
|
20707
20729
|
const getDefaultSpacing = () => ({
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
line:
|
|
20711
|
-
lineRule:
|
|
20730
|
+
after: null,
|
|
20731
|
+
before: null,
|
|
20732
|
+
line: null,
|
|
20733
|
+
lineRule: "auto"
|
|
20712
20734
|
});
|
|
20713
20735
|
const Paragraph = OxmlNode.create({
|
|
20714
20736
|
name: "paragraph",
|
|
@@ -20737,20 +20759,20 @@ const Paragraph = OxmlNode.create({
|
|
|
20737
20759
|
parseDOM: (element) => {
|
|
20738
20760
|
if (element && element.closest("[data-superdoc-import]")) {
|
|
20739
20761
|
return {
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
line: 1.15,
|
|
20762
|
+
after: pixelsToTwips(11),
|
|
20763
|
+
before: 0,
|
|
20764
|
+
line: linesToTwips(1.15),
|
|
20743
20765
|
lineRule: "auto"
|
|
20744
20766
|
};
|
|
20745
20767
|
}
|
|
20746
20768
|
return void 0;
|
|
20747
20769
|
},
|
|
20748
20770
|
renderDOM: (attrs) => {
|
|
20749
|
-
const { spacing } = attrs;
|
|
20771
|
+
const { spacing, marksAttrs } = attrs;
|
|
20750
20772
|
if (!spacing) return {};
|
|
20751
20773
|
const spacingCopy = { ...spacing };
|
|
20752
20774
|
if (attrs.lineHeight) delete spacingCopy.line;
|
|
20753
|
-
const style = getSpacingStyleString(spacingCopy);
|
|
20775
|
+
const style = getSpacingStyleString(spacingCopy, marksAttrs ?? []);
|
|
20754
20776
|
if (style) return { style };
|
|
20755
20777
|
return {};
|
|
20756
20778
|
}
|
|
@@ -20786,11 +20808,11 @@ const Paragraph = OxmlNode.create({
|
|
|
20786
20808
|
return {};
|
|
20787
20809
|
}
|
|
20788
20810
|
let style = "";
|
|
20789
|
-
if (left2) style += `margin-left: ${left2}px;`;
|
|
20790
|
-
if (right2) style += `margin-right: ${right2}px;`;
|
|
20791
|
-
if (firstLine && !hanging) style += `text-indent: ${firstLine}px;`;
|
|
20792
|
-
if (firstLine && hanging) style += `text-indent: ${firstLine - hanging}px;`;
|
|
20793
|
-
if (!firstLine && hanging) style += `text-indent: ${-hanging}px;`;
|
|
20811
|
+
if (left2) style += `margin-left: ${twipsToPixels(left2)}px;`;
|
|
20812
|
+
if (right2) style += `margin-right: ${twipsToPixels(right2)}px;`;
|
|
20813
|
+
if (firstLine && !hanging) style += `text-indent: ${twipsToPixels(firstLine)}px;`;
|
|
20814
|
+
if (firstLine && hanging) style += `text-indent: ${twipsToPixels(firstLine - hanging)}px;`;
|
|
20815
|
+
if (!firstLine && hanging) style += `text-indent: ${twipsToPixels(-hanging)}px;`;
|
|
20794
20816
|
return { style };
|
|
20795
20817
|
}
|
|
20796
20818
|
},
|
|
@@ -20809,12 +20831,16 @@ const Paragraph = OxmlNode.create({
|
|
|
20809
20831
|
sideOrder.forEach((side) => {
|
|
20810
20832
|
const b = borders[side];
|
|
20811
20833
|
if (!b) return;
|
|
20812
|
-
|
|
20834
|
+
if (["nil", "none", void 0, null].includes(b.val)) {
|
|
20835
|
+
style += `border-${side}: none;`;
|
|
20836
|
+
return;
|
|
20837
|
+
}
|
|
20838
|
+
const width = b.size != null ? `${eighthPointsToPixels(b.size)}px` : "1px";
|
|
20813
20839
|
const cssStyle = valToCss[b.val] || "solid";
|
|
20814
|
-
const color = b.color || "#000000"
|
|
20840
|
+
const color = !b.color || b.color === "auto" ? "#000000" : `#${b.color}`;
|
|
20815
20841
|
style += `border-${side}: ${width} ${cssStyle} ${color};`;
|
|
20816
20842
|
if (b.space != null && side === "bottom") {
|
|
20817
|
-
style += `padding-bottom: ${b.space}px;`;
|
|
20843
|
+
style += `padding-bottom: ${eighthPointsToPixels(b.space)}px;`;
|
|
20818
20844
|
}
|
|
20819
20845
|
});
|
|
20820
20846
|
return style ? { style } : {};
|
|
@@ -20846,15 +20872,14 @@ const Paragraph = OxmlNode.create({
|
|
|
20846
20872
|
paragraphProperties: { rendered: false },
|
|
20847
20873
|
dropcap: { rendered: false },
|
|
20848
20874
|
pageBreakSource: { rendered: false },
|
|
20849
|
-
|
|
20850
|
-
renderDOM: ({
|
|
20851
|
-
|
|
20852
|
-
if (!jc) return {};
|
|
20875
|
+
textAlign: {
|
|
20876
|
+
renderDOM: ({ textAlign }) => {
|
|
20877
|
+
if (!textAlign) return {};
|
|
20853
20878
|
let style = "";
|
|
20854
|
-
if (
|
|
20855
|
-
else if (
|
|
20856
|
-
else if (
|
|
20857
|
-
else if (
|
|
20879
|
+
if (textAlign === "left") style += "text-align: left;";
|
|
20880
|
+
else if (textAlign === "right") style += "text-align: right;";
|
|
20881
|
+
else if (textAlign === "center") style += "text-align: center;";
|
|
20882
|
+
else if (textAlign === "both") style += "text-align: justify;";
|
|
20858
20883
|
return { style };
|
|
20859
20884
|
}
|
|
20860
20885
|
},
|
|
@@ -21201,13 +21226,16 @@ const getTabDecorations = (doc2, view, helpers2, from2 = 0, to = null) => {
|
|
|
21201
21226
|
const tabStop = tabStops.find((stop) => stop.pos > currentWidth && stop.val !== "clear");
|
|
21202
21227
|
if (tabStop) {
|
|
21203
21228
|
tabWidth = tabStop.pos - currentWidth;
|
|
21204
|
-
|
|
21229
|
+
let val = tabStop.val;
|
|
21230
|
+
const aliases = { left: "start", right: "end" };
|
|
21231
|
+
if (aliases[val]) val = aliases[val];
|
|
21232
|
+
if (val === "center" || val === "end" || val === "right") {
|
|
21205
21233
|
const nextTabIndex = findNextTabIndex(flattened, entryIndex + 1);
|
|
21206
21234
|
const segmentStartPos = pos + node.nodeSize;
|
|
21207
21235
|
const segmentEndPos = nextTabIndex === -1 ? startPos + paragraphContext.paragraph.nodeSize - 1 : flattened[nextTabIndex].pos;
|
|
21208
21236
|
const segmentWidth = measureRangeWidth(view, segmentStartPos, segmentEndPos, coordCache, domPosCache);
|
|
21209
|
-
tabWidth -=
|
|
21210
|
-
} else if (
|
|
21237
|
+
tabWidth -= val === "center" ? segmentWidth / 2 : segmentWidth;
|
|
21238
|
+
} else if (val === "decimal" || val === "num") {
|
|
21211
21239
|
const breakChar = tabStop.decimalChar || ".";
|
|
21212
21240
|
const decimalPos = findDecimalBreakPos(flattened, entryIndex + 1, breakChar);
|
|
21213
21241
|
const integralWidth = decimalPos ? measureRangeWidth(view, pos + node.nodeSize, decimalPos, coordCache, domPosCache) : measureRangeWidth(
|
|
@@ -21256,7 +21284,15 @@ function getParagraphContext($pos, cache, helpers2) {
|
|
|
21256
21284
|
if (!cache.has(startPos)) {
|
|
21257
21285
|
let tabStops = [];
|
|
21258
21286
|
if (Array.isArray(node.attrs?.tabStops)) {
|
|
21259
|
-
tabStops = node.attrs.tabStops
|
|
21287
|
+
tabStops = node.attrs.tabStops.map((stop) => {
|
|
21288
|
+
const ref2 = stop?.tab;
|
|
21289
|
+
if (!ref2) return stop || null;
|
|
21290
|
+
return {
|
|
21291
|
+
val: ref2.tabType || "start",
|
|
21292
|
+
pos: twipsToPixels(Number(ref2.pos) || 0),
|
|
21293
|
+
leader: ref2.leader
|
|
21294
|
+
};
|
|
21295
|
+
}).filter(Boolean);
|
|
21260
21296
|
} else {
|
|
21261
21297
|
const style = helpers2.linkedStyles.getStyleById(node.attrs?.styleId);
|
|
21262
21298
|
if (Array.isArray(style?.definition?.styles?.tabStops)) {
|
|
@@ -21357,9 +21393,9 @@ function getIndentWidth(view, paragraphStartPos, indentAttrs = {}, coordCache =
|
|
|
21357
21393
|
}
|
|
21358
21394
|
function calculateIndentFallback(indentAttrs = {}) {
|
|
21359
21395
|
if (!indentAttrs) return 0;
|
|
21360
|
-
const left2 = Number(indentAttrs.left) || 0;
|
|
21361
|
-
const firstLine = Number(indentAttrs.firstLine) || 0;
|
|
21362
|
-
const hanging = Number(indentAttrs.hanging) || 0;
|
|
21396
|
+
const left2 = twipsToPixels(Number(indentAttrs.left) || 0);
|
|
21397
|
+
const firstLine = twipsToPixels(Number(indentAttrs.firstLine) || 0);
|
|
21398
|
+
const hanging = twipsToPixels(Number(indentAttrs.hanging) || 0);
|
|
21363
21399
|
let textIndent = 0;
|
|
21364
21400
|
if (firstLine && hanging) {
|
|
21365
21401
|
textIndent = firstLine - hanging;
|
|
@@ -21367,11 +21403,6 @@ function calculateIndentFallback(indentAttrs = {}) {
|
|
|
21367
21403
|
textIndent = firstLine;
|
|
21368
21404
|
} else if (hanging) {
|
|
21369
21405
|
textIndent = -hanging;
|
|
21370
|
-
} else if (typeof indentAttrs.textIndent === "string") {
|
|
21371
|
-
const match = indentAttrs.textIndent.match(/(-?\d*\.?\d+)in$/);
|
|
21372
|
-
if (match) {
|
|
21373
|
-
textIndent = Number(match[1]) * 96;
|
|
21374
|
-
}
|
|
21375
21406
|
}
|
|
21376
21407
|
if (textIndent) return left2 + textIndent;
|
|
21377
21408
|
if (left2) return left2;
|
|
@@ -26464,7 +26495,7 @@ const FieldAnnotation = Node$1.create({
|
|
|
26464
26495
|
}
|
|
26465
26496
|
if (dispatch) {
|
|
26466
26497
|
commands2.updateFieldAnnotationsAttributes([annotation], attrs);
|
|
26467
|
-
if (this.editor.options.pagination) {
|
|
26498
|
+
if (this.editor.options.pagination && !isHeadless(this.editor)) {
|
|
26468
26499
|
setTimeout(() => {
|
|
26469
26500
|
const newTr = this.editor.view.state.tr;
|
|
26470
26501
|
newTr.setMeta("forceUpdatePagination", true);
|
|
@@ -28401,7 +28432,9 @@ const PageNumber = Node$1.create({
|
|
|
28401
28432
|
const pageNumberNode = schema.nodeFromJSON(pageNumberNodeJSON);
|
|
28402
28433
|
if (dispatch) {
|
|
28403
28434
|
tr.replaceSelectionWith(pageNumberNode, false);
|
|
28404
|
-
|
|
28435
|
+
if (!isHeadless(editor)) {
|
|
28436
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
28437
|
+
}
|
|
28405
28438
|
}
|
|
28406
28439
|
return true;
|
|
28407
28440
|
}
|
|
@@ -31470,6 +31503,255 @@ const VectorShape = Node$1.create({
|
|
|
31470
31503
|
};
|
|
31471
31504
|
}
|
|
31472
31505
|
});
|
|
31506
|
+
class ShapeGroupView {
|
|
31507
|
+
constructor(props) {
|
|
31508
|
+
__publicField(this, "node");
|
|
31509
|
+
__publicField(this, "view");
|
|
31510
|
+
__publicField(this, "getPos");
|
|
31511
|
+
__publicField(this, "decorations");
|
|
31512
|
+
__publicField(this, "innerDecorations");
|
|
31513
|
+
__publicField(this, "editor");
|
|
31514
|
+
__publicField(this, "extension");
|
|
31515
|
+
__publicField(this, "htmlAttributes");
|
|
31516
|
+
__publicField(this, "root");
|
|
31517
|
+
this.node = props.node;
|
|
31518
|
+
this.view = props.editor.view;
|
|
31519
|
+
this.getPos = props.getPos;
|
|
31520
|
+
this.decorations = props.decorations;
|
|
31521
|
+
this.innerDecorations = props.innerDecorations;
|
|
31522
|
+
this.editor = props.editor;
|
|
31523
|
+
this.extension = props.extension;
|
|
31524
|
+
this.htmlAttributes = props.htmlAttributes;
|
|
31525
|
+
this.mount();
|
|
31526
|
+
}
|
|
31527
|
+
mount() {
|
|
31528
|
+
this.buildView();
|
|
31529
|
+
}
|
|
31530
|
+
get dom() {
|
|
31531
|
+
return this.root;
|
|
31532
|
+
}
|
|
31533
|
+
get contentDOM() {
|
|
31534
|
+
return null;
|
|
31535
|
+
}
|
|
31536
|
+
createElement() {
|
|
31537
|
+
const attrs = this.node.attrs;
|
|
31538
|
+
const { groupTransform, shapes, size } = attrs;
|
|
31539
|
+
const container = document.createElement("div");
|
|
31540
|
+
container.classList.add("sd-shape-group");
|
|
31541
|
+
container.setAttribute("data-shape-group", "");
|
|
31542
|
+
const width = size?.width || groupTransform?.width || 300;
|
|
31543
|
+
const height = size?.height || groupTransform?.height || 200;
|
|
31544
|
+
container.style.width = `${width}px`;
|
|
31545
|
+
container.style.height = `${height}px`;
|
|
31546
|
+
container.style.position = "relative";
|
|
31547
|
+
container.style.display = "inline-block";
|
|
31548
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
31549
|
+
svg.setAttribute("version", "1.1");
|
|
31550
|
+
svg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
31551
|
+
svg.setAttribute("width", width.toString());
|
|
31552
|
+
svg.setAttribute("height", height.toString());
|
|
31553
|
+
svg.setAttribute("viewBox", `0 0 ${width} ${height}`);
|
|
31554
|
+
svg.style.display = "block";
|
|
31555
|
+
if (shapes && Array.isArray(shapes)) {
|
|
31556
|
+
shapes.forEach((shape) => {
|
|
31557
|
+
if (shape.shapeType === "vectorShape") {
|
|
31558
|
+
const shapeElement = this.createShapeElement(shape, groupTransform);
|
|
31559
|
+
if (shapeElement) {
|
|
31560
|
+
svg.appendChild(shapeElement);
|
|
31561
|
+
}
|
|
31562
|
+
}
|
|
31563
|
+
});
|
|
31564
|
+
}
|
|
31565
|
+
container.appendChild(svg);
|
|
31566
|
+
return { element: container };
|
|
31567
|
+
}
|
|
31568
|
+
createShapeElement(shape) {
|
|
31569
|
+
const attrs = shape.attrs;
|
|
31570
|
+
if (!attrs) return null;
|
|
31571
|
+
const x = attrs.x || 0;
|
|
31572
|
+
const y = attrs.y || 0;
|
|
31573
|
+
const width = attrs.width || 100;
|
|
31574
|
+
const height = attrs.height || 100;
|
|
31575
|
+
const g = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
31576
|
+
const transforms = [];
|
|
31577
|
+
transforms.push(`translate(${x}, ${y})`);
|
|
31578
|
+
if (attrs.rotation !== 0) {
|
|
31579
|
+
transforms.push(`rotate(${attrs.rotation} ${width / 2} ${height / 2})`);
|
|
31580
|
+
}
|
|
31581
|
+
if (attrs.flipH) {
|
|
31582
|
+
transforms.push(`scale(-1, 1) translate(${-width}, 0)`);
|
|
31583
|
+
}
|
|
31584
|
+
if (attrs.flipV) {
|
|
31585
|
+
transforms.push(`scale(1, -1) translate(0, ${-height})`);
|
|
31586
|
+
}
|
|
31587
|
+
if (transforms.length > 0) {
|
|
31588
|
+
g.setAttribute("transform", transforms.join(" "));
|
|
31589
|
+
}
|
|
31590
|
+
const shapeKind = attrs.kind || "rect";
|
|
31591
|
+
const fillColor = attrs.fillColor || "#5b9bd5";
|
|
31592
|
+
const strokeColor = attrs.strokeColor || "#000000";
|
|
31593
|
+
const strokeWidth = attrs.strokeWidth || 1;
|
|
31594
|
+
try {
|
|
31595
|
+
const svgContent = k({
|
|
31596
|
+
preset: shapeKind,
|
|
31597
|
+
styleOverrides: {
|
|
31598
|
+
fill: fillColor || "none",
|
|
31599
|
+
stroke: strokeColor || "none",
|
|
31600
|
+
strokeWidth: strokeWidth || 0
|
|
31601
|
+
},
|
|
31602
|
+
width,
|
|
31603
|
+
height
|
|
31604
|
+
});
|
|
31605
|
+
if (svgContent) {
|
|
31606
|
+
const tempDiv = document.createElement("div");
|
|
31607
|
+
tempDiv.innerHTML = svgContent;
|
|
31608
|
+
const svgElement = tempDiv.querySelector("svg");
|
|
31609
|
+
if (svgElement) {
|
|
31610
|
+
Array.from(svgElement.children).forEach((child) => {
|
|
31611
|
+
const clonedChild = child.cloneNode(true);
|
|
31612
|
+
if (clonedChild.tagName === "ellipse") {
|
|
31613
|
+
clonedChild.setAttribute("cx", (width / 2).toString());
|
|
31614
|
+
clonedChild.setAttribute("cy", (height / 2).toString());
|
|
31615
|
+
clonedChild.setAttribute("rx", (width / 2).toString());
|
|
31616
|
+
clonedChild.setAttribute("ry", (height / 2).toString());
|
|
31617
|
+
} else if (clonedChild.tagName === "circle") {
|
|
31618
|
+
if (width !== height) {
|
|
31619
|
+
const ellipse = document.createElementNS("http://www.w3.org/2000/svg", "ellipse");
|
|
31620
|
+
ellipse.setAttribute("cx", (width / 2).toString());
|
|
31621
|
+
ellipse.setAttribute("cy", (height / 2).toString());
|
|
31622
|
+
ellipse.setAttribute("rx", (width / 2).toString());
|
|
31623
|
+
ellipse.setAttribute("ry", (height / 2).toString());
|
|
31624
|
+
Array.from(clonedChild.attributes).forEach((attr) => {
|
|
31625
|
+
if (!["cx", "cy", "r"].includes(attr.name)) {
|
|
31626
|
+
ellipse.setAttribute(attr.name, attr.value);
|
|
31627
|
+
}
|
|
31628
|
+
});
|
|
31629
|
+
g.appendChild(ellipse);
|
|
31630
|
+
return;
|
|
31631
|
+
} else {
|
|
31632
|
+
clonedChild.setAttribute("cx", (width / 2).toString());
|
|
31633
|
+
clonedChild.setAttribute("cy", (height / 2).toString());
|
|
31634
|
+
clonedChild.setAttribute("r", (width / 2).toString());
|
|
31635
|
+
}
|
|
31636
|
+
} else if (clonedChild.tagName === "rect") {
|
|
31637
|
+
clonedChild.setAttribute("width", width.toString());
|
|
31638
|
+
clonedChild.setAttribute("height", height.toString());
|
|
31639
|
+
} else if (clonedChild.tagName === "path" && svgElement.hasAttribute("viewBox")) {
|
|
31640
|
+
const viewBox = svgElement.getAttribute("viewBox").split(" ").map(Number);
|
|
31641
|
+
if (viewBox.length === 4) {
|
|
31642
|
+
const [, , vbWidth, vbHeight] = viewBox;
|
|
31643
|
+
const scaleX = width / vbWidth;
|
|
31644
|
+
const scaleY = height / vbHeight;
|
|
31645
|
+
if (scaleX !== 1 || scaleY !== 1) {
|
|
31646
|
+
const pathTransform = `scale(${scaleX}, ${scaleY})`;
|
|
31647
|
+
const existingTransform = clonedChild.getAttribute("transform");
|
|
31648
|
+
clonedChild.setAttribute(
|
|
31649
|
+
"transform",
|
|
31650
|
+
existingTransform ? `${existingTransform} ${pathTransform}` : pathTransform
|
|
31651
|
+
);
|
|
31652
|
+
}
|
|
31653
|
+
}
|
|
31654
|
+
} else if (clonedChild.hasAttribute("width")) {
|
|
31655
|
+
clonedChild.setAttribute("width", width.toString());
|
|
31656
|
+
}
|
|
31657
|
+
if (clonedChild.hasAttribute("height") && clonedChild.tagName !== "ellipse") {
|
|
31658
|
+
clonedChild.setAttribute("height", height.toString());
|
|
31659
|
+
}
|
|
31660
|
+
g.appendChild(clonedChild);
|
|
31661
|
+
});
|
|
31662
|
+
}
|
|
31663
|
+
}
|
|
31664
|
+
} catch (error) {
|
|
31665
|
+
console.warn("Failed to generate shape SVG:", error);
|
|
31666
|
+
const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
31667
|
+
rect.setAttribute("width", width.toString());
|
|
31668
|
+
rect.setAttribute("height", height.toString());
|
|
31669
|
+
rect.setAttribute("fill", fillColor);
|
|
31670
|
+
rect.setAttribute("stroke", strokeColor);
|
|
31671
|
+
rect.setAttribute("stroke-width", strokeWidth.toString());
|
|
31672
|
+
g.appendChild(rect);
|
|
31673
|
+
}
|
|
31674
|
+
return g;
|
|
31675
|
+
}
|
|
31676
|
+
buildView() {
|
|
31677
|
+
const { element } = this.createElement();
|
|
31678
|
+
this.root = element;
|
|
31679
|
+
}
|
|
31680
|
+
update() {
|
|
31681
|
+
return false;
|
|
31682
|
+
}
|
|
31683
|
+
}
|
|
31684
|
+
const ShapeGroup = Node$1.create({
|
|
31685
|
+
name: "shapeGroup",
|
|
31686
|
+
group: "inline",
|
|
31687
|
+
inline: true,
|
|
31688
|
+
atom: true,
|
|
31689
|
+
addOptions() {
|
|
31690
|
+
return {
|
|
31691
|
+
htmlAttributes: {
|
|
31692
|
+
contenteditable: false
|
|
31693
|
+
}
|
|
31694
|
+
};
|
|
31695
|
+
},
|
|
31696
|
+
addAttributes() {
|
|
31697
|
+
return {
|
|
31698
|
+
groupTransform: {
|
|
31699
|
+
default: {},
|
|
31700
|
+
renderDOM: () => ({})
|
|
31701
|
+
},
|
|
31702
|
+
shapes: {
|
|
31703
|
+
default: [],
|
|
31704
|
+
renderDOM: () => ({})
|
|
31705
|
+
},
|
|
31706
|
+
size: {
|
|
31707
|
+
default: null,
|
|
31708
|
+
renderDOM: (attrs) => {
|
|
31709
|
+
if (!attrs.size) return {};
|
|
31710
|
+
const sizeData = {};
|
|
31711
|
+
if (attrs.size.width) sizeData["data-width"] = attrs.size.width;
|
|
31712
|
+
if (attrs.size.height) sizeData["data-height"] = attrs.size.height;
|
|
31713
|
+
return sizeData;
|
|
31714
|
+
}
|
|
31715
|
+
},
|
|
31716
|
+
padding: {
|
|
31717
|
+
default: null,
|
|
31718
|
+
renderDOM: (attrs) => {
|
|
31719
|
+
if (!attrs.padding) return {};
|
|
31720
|
+
const paddingData = {};
|
|
31721
|
+
if (attrs.padding.top != null) paddingData["data-padding-top"] = attrs.padding.top;
|
|
31722
|
+
if (attrs.padding.right != null) paddingData["data-padding-right"] = attrs.padding.right;
|
|
31723
|
+
if (attrs.padding.bottom != null) paddingData["data-padding-bottom"] = attrs.padding.bottom;
|
|
31724
|
+
if (attrs.padding.left != null) paddingData["data-padding-left"] = attrs.padding.left;
|
|
31725
|
+
return paddingData;
|
|
31726
|
+
}
|
|
31727
|
+
},
|
|
31728
|
+
marginOffset: {
|
|
31729
|
+
default: null,
|
|
31730
|
+
renderDOM: (attrs) => {
|
|
31731
|
+
if (!attrs.marginOffset) return {};
|
|
31732
|
+
const offsetData = {};
|
|
31733
|
+
if (attrs.marginOffset.horizontal != null) offsetData["data-offset-x"] = attrs.marginOffset.horizontal;
|
|
31734
|
+
if (attrs.marginOffset.top != null) offsetData["data-offset-y"] = attrs.marginOffset.top;
|
|
31735
|
+
return offsetData;
|
|
31736
|
+
}
|
|
31737
|
+
},
|
|
31738
|
+
drawingContent: {
|
|
31739
|
+
rendered: false
|
|
31740
|
+
}
|
|
31741
|
+
};
|
|
31742
|
+
},
|
|
31743
|
+
parseDOM() {
|
|
31744
|
+
return false;
|
|
31745
|
+
},
|
|
31746
|
+
renderDOM({ htmlAttributes }) {
|
|
31747
|
+
return ["div", Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes, { "data-shape-group": "" })];
|
|
31748
|
+
},
|
|
31749
|
+
addNodeView() {
|
|
31750
|
+
return (props) => {
|
|
31751
|
+
return new ShapeGroupView({ ...props });
|
|
31752
|
+
};
|
|
31753
|
+
}
|
|
31754
|
+
});
|
|
31473
31755
|
const TextStyle = Mark.create({
|
|
31474
31756
|
name: "textStyle",
|
|
31475
31757
|
addOptions() {
|
|
@@ -31557,8 +31839,8 @@ const Bold = Mark.create({
|
|
|
31557
31839
|
value: {
|
|
31558
31840
|
default: null,
|
|
31559
31841
|
renderDOM: (attrs) => {
|
|
31560
|
-
if (
|
|
31561
|
-
if (attrs.value === "0") {
|
|
31842
|
+
if (attrs.value == null) return {};
|
|
31843
|
+
if (attrs.value === "0" || !attrs.value) {
|
|
31562
31844
|
return { style: "font-weight: normal" };
|
|
31563
31845
|
}
|
|
31564
31846
|
return {};
|
|
@@ -31635,8 +31917,8 @@ const Italic = Mark.create({
|
|
|
31635
31917
|
value: {
|
|
31636
31918
|
default: null,
|
|
31637
31919
|
renderDOM: (attrs) => {
|
|
31638
|
-
if (
|
|
31639
|
-
if (attrs.value === "0") return { style: "font-style: normal" };
|
|
31920
|
+
if (attrs.value == null) return {};
|
|
31921
|
+
if (attrs.value === "0" || !attrs.value) return { style: "font-style: normal" };
|
|
31640
31922
|
return {};
|
|
31641
31923
|
}
|
|
31642
31924
|
}
|
|
@@ -31855,7 +32137,7 @@ const Strike = Mark.create({
|
|
|
31855
32137
|
const merged = Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes);
|
|
31856
32138
|
const { value } = mark.attrs;
|
|
31857
32139
|
const { ...rest } = merged || {};
|
|
31858
|
-
if (value === "0") {
|
|
32140
|
+
if (value === "0" || value === false) {
|
|
31859
32141
|
return ["span", rest, 0];
|
|
31860
32142
|
}
|
|
31861
32143
|
return ["s", rest, 0];
|
|
@@ -31898,8 +32180,8 @@ const Strike = Mark.create({
|
|
|
31898
32180
|
value: {
|
|
31899
32181
|
default: null,
|
|
31900
32182
|
renderDOM: (attrs) => {
|
|
31901
|
-
if (
|
|
31902
|
-
if (attrs.value === "0") {
|
|
32183
|
+
if (attrs.value == null) return {};
|
|
32184
|
+
if (attrs.value === "0" || !attrs.value) {
|
|
31903
32185
|
return { style: "text-decoration: none" };
|
|
31904
32186
|
}
|
|
31905
32187
|
return {};
|
|
@@ -36819,6 +37101,10 @@ const Pagination = Extension.create({
|
|
|
36819
37101
|
};
|
|
36820
37102
|
},
|
|
36821
37103
|
addCommands() {
|
|
37104
|
+
const editor = this.editor;
|
|
37105
|
+
if (isHeadless(editor)) {
|
|
37106
|
+
return {};
|
|
37107
|
+
}
|
|
36822
37108
|
return {
|
|
36823
37109
|
insertPageBreak: () => ({ commands: commands2 }) => {
|
|
36824
37110
|
return commands2.insertContent({
|
|
@@ -36829,20 +37115,26 @@ const Pagination = Extension.create({
|
|
|
36829
37115
|
* Toggle pagination on/off
|
|
36830
37116
|
* @returns {void}
|
|
36831
37117
|
*/
|
|
36832
|
-
togglePagination: () => ({ tr, state, dispatch, editor }) => {
|
|
37118
|
+
togglePagination: () => ({ tr, state, dispatch, editor: editor2 }) => {
|
|
36833
37119
|
const isEnabled = PaginationPluginKey.getState(state)?.isEnabled;
|
|
36834
37120
|
tr.setMeta(PaginationPluginKey, { isEnabled: !isEnabled });
|
|
36835
37121
|
if (dispatch) {
|
|
36836
37122
|
dispatch(tr);
|
|
36837
|
-
|
|
37123
|
+
editor2.initDefaultStyles(editor2.element, !isEnabled);
|
|
36838
37124
|
return true;
|
|
36839
37125
|
}
|
|
36840
37126
|
}
|
|
36841
37127
|
};
|
|
36842
37128
|
},
|
|
36843
37129
|
addShortcuts() {
|
|
37130
|
+
const editor = this.editor;
|
|
37131
|
+
if (isHeadless(editor)) {
|
|
37132
|
+
return {};
|
|
37133
|
+
}
|
|
36844
37134
|
return {
|
|
36845
|
-
"Mod-Enter": () =>
|
|
37135
|
+
"Mod-Enter": () => {
|
|
37136
|
+
return editor.commands.insertPageBreak();
|
|
37137
|
+
}
|
|
36846
37138
|
};
|
|
36847
37139
|
},
|
|
36848
37140
|
/**
|
|
@@ -36850,6 +37142,9 @@ const Pagination = Extension.create({
|
|
|
36850
37142
|
*/
|
|
36851
37143
|
addPmPlugins() {
|
|
36852
37144
|
const editor = this.editor;
|
|
37145
|
+
if (isHeadless(editor)) {
|
|
37146
|
+
return [];
|
|
37147
|
+
}
|
|
36853
37148
|
let isUpdating = false;
|
|
36854
37149
|
let shouldUpdate = false;
|
|
36855
37150
|
let hasInitialized = false;
|
|
@@ -36865,7 +37160,7 @@ const Pagination = Extension.create({
|
|
|
36865
37160
|
isReadyToInit: false,
|
|
36866
37161
|
decorations: DecorationSet.empty,
|
|
36867
37162
|
isDebugging,
|
|
36868
|
-
isEnabled: editor.options.pagination
|
|
37163
|
+
isEnabled: editor.options.pagination && !isHeadless(editor)
|
|
36869
37164
|
};
|
|
36870
37165
|
},
|
|
36871
37166
|
apply(tr, oldState, prevEditorState, newEditorState) {
|
|
@@ -36943,6 +37238,7 @@ const Pagination = Extension.create({
|
|
|
36943
37238
|
let previousDecorations = DecorationSet.empty;
|
|
36944
37239
|
return {
|
|
36945
37240
|
update: (view) => {
|
|
37241
|
+
if (isHeadless(editor)) return;
|
|
36946
37242
|
if (!PaginationPluginKey.getState(view.state)?.isEnabled) return;
|
|
36947
37243
|
if (!shouldUpdate || isUpdating) return;
|
|
36948
37244
|
const performPaginationUpdate = () => {
|
|
@@ -36966,6 +37262,7 @@ const Pagination = Extension.create({
|
|
|
36966
37262
|
},
|
|
36967
37263
|
props: {
|
|
36968
37264
|
decorations(state) {
|
|
37265
|
+
if (isHeadless(editor)) return DecorationSet.empty;
|
|
36969
37266
|
const pluginState = PaginationPluginKey.getState(state);
|
|
36970
37267
|
return pluginState.isEnabled ? pluginState.decorations : DecorationSet.empty;
|
|
36971
37268
|
}
|
|
@@ -37334,7 +37631,7 @@ const getHeaderFooterEditorKey = ({ pageNumber, isHeader, isFooter, isFirstHeade
|
|
|
37334
37631
|
return void 0;
|
|
37335
37632
|
};
|
|
37336
37633
|
const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
|
|
37337
|
-
if (editor.options.documentMode !== "editing") return;
|
|
37634
|
+
if (isHeadless(editor) || editor.options.documentMode !== "editing") return;
|
|
37338
37635
|
editor.setEditable(false, false);
|
|
37339
37636
|
toggleHeaderFooterEditMode({
|
|
37340
37637
|
editor,
|
|
@@ -37406,6 +37703,7 @@ function getActualBreakCoords(view, pos, calculatedThreshold) {
|
|
|
37406
37703
|
return actualBreak;
|
|
37407
37704
|
}
|
|
37408
37705
|
const onImageLoad = (editor) => {
|
|
37706
|
+
if (isHeadless(editor)) return;
|
|
37409
37707
|
if (typeof requestAnimationFrame !== "function") return;
|
|
37410
37708
|
requestAnimationFrame(() => {
|
|
37411
37709
|
const newTr = editor.view.state.tr;
|
|
@@ -37710,6 +38008,7 @@ function validRegExp(source) {
|
|
|
37710
38008
|
}
|
|
37711
38009
|
}
|
|
37712
38010
|
const TextContentCache = /* @__PURE__ */ new WeakMap();
|
|
38011
|
+
const transparentInlineNodes = /* @__PURE__ */ new Set(["run", "bookmarkStart"]);
|
|
37713
38012
|
function textContent(node) {
|
|
37714
38013
|
let cached = TextContentCache.get(node);
|
|
37715
38014
|
if (cached) return cached;
|
|
@@ -37718,7 +38017,7 @@ function textContent(node) {
|
|
|
37718
38017
|
let child = node.child(i);
|
|
37719
38018
|
if (child.isText) content += child.text;
|
|
37720
38019
|
else if (child.isLeaf) content += "";
|
|
37721
|
-
else if (child.type && child.type.name
|
|
38020
|
+
else if (child.type && transparentInlineNodes.has(child.type.name)) content += textContent(child);
|
|
37722
38021
|
else content += " " + textContent(child) + " ";
|
|
37723
38022
|
}
|
|
37724
38023
|
TextContentCache.set(node, content);
|
|
@@ -37726,26 +38025,49 @@ function textContent(node) {
|
|
|
37726
38025
|
}
|
|
37727
38026
|
function mapIndexToDocPos(node, start2, index2) {
|
|
37728
38027
|
if (index2 <= 0) return start2;
|
|
37729
|
-
const
|
|
37730
|
-
if (index2 >=
|
|
37731
|
-
|
|
37732
|
-
|
|
37733
|
-
|
|
37734
|
-
|
|
37735
|
-
|
|
37736
|
-
|
|
37737
|
-
const
|
|
37738
|
-
|
|
37739
|
-
|
|
37740
|
-
|
|
37741
|
-
return
|
|
38028
|
+
const fullTextLength = textContent(node).length;
|
|
38029
|
+
if (index2 >= fullTextLength) return start2 + node.content.size;
|
|
38030
|
+
return mapIndexWithinNode(node, start2, index2);
|
|
38031
|
+
}
|
|
38032
|
+
function mapIndexWithinNode(node, start2, index2) {
|
|
38033
|
+
if (index2 <= 0) return start2;
|
|
38034
|
+
let offset2 = start2;
|
|
38035
|
+
for (let i = 0; i < node.childCount; i++) {
|
|
38036
|
+
const child = node.child(i);
|
|
38037
|
+
const childStart = offset2;
|
|
38038
|
+
if (child.isText) {
|
|
38039
|
+
const len = child.text.length;
|
|
38040
|
+
if (index2 <= len) return childStart + index2;
|
|
38041
|
+
index2 -= len;
|
|
38042
|
+
offset2 += child.nodeSize;
|
|
38043
|
+
continue;
|
|
37742
38044
|
}
|
|
37743
|
-
|
|
37744
|
-
|
|
37745
|
-
|
|
37746
|
-
|
|
38045
|
+
if (child.isLeaf) {
|
|
38046
|
+
if (index2 <= 1) return childStart + Math.min(index2, 1);
|
|
38047
|
+
index2 -= 1;
|
|
38048
|
+
offset2 += child.nodeSize;
|
|
38049
|
+
continue;
|
|
38050
|
+
}
|
|
38051
|
+
const isTransparentInline = child.inlineContent && child.type && transparentInlineNodes.has(child.type.name);
|
|
38052
|
+
const innerTextLength = textContent(child).length;
|
|
38053
|
+
if (isTransparentInline) {
|
|
38054
|
+
if (index2 <= innerTextLength) return mapIndexWithinNode(child, childStart + 1, index2);
|
|
38055
|
+
index2 -= innerTextLength;
|
|
38056
|
+
offset2 += child.nodeSize;
|
|
38057
|
+
continue;
|
|
38058
|
+
}
|
|
38059
|
+
const contribution = innerTextLength + 2;
|
|
38060
|
+
const relativeIndex = index2 - 1;
|
|
38061
|
+
if (relativeIndex < 0) return childStart;
|
|
38062
|
+
if (relativeIndex <= innerTextLength) {
|
|
38063
|
+
return mapIndexWithinNode(child, childStart + 1, relativeIndex);
|
|
38064
|
+
}
|
|
38065
|
+
if (relativeIndex === innerTextLength + 1) return childStart + child.nodeSize;
|
|
38066
|
+
index2 -= contribution;
|
|
38067
|
+
offset2 += child.nodeSize;
|
|
38068
|
+
}
|
|
38069
|
+
return start2 + node.content.size;
|
|
37747
38070
|
}
|
|
37748
|
-
const transparentInlineNodes = /* @__PURE__ */ new Set(["run"]);
|
|
37749
38071
|
function scanTextblocks(node, from2, to, f2, nodeStart = 0) {
|
|
37750
38072
|
const isTransparentInline = node.inlineContent && node.type && transparentInlineNodes.has(node.type.name);
|
|
37751
38073
|
if (node.inlineContent && !isTransparentInline) {
|
|
@@ -38221,9 +38543,9 @@ const NodeResizer = Extension.create({
|
|
|
38221
38543
|
return {};
|
|
38222
38544
|
},
|
|
38223
38545
|
addPmPlugins() {
|
|
38224
|
-
const
|
|
38546
|
+
const isHeadless2 = this.editor.options.isHeadless;
|
|
38225
38547
|
const hasDocument = typeof document !== "undefined";
|
|
38226
|
-
if (
|
|
38548
|
+
if (isHeadless2 || !hasDocument) return [];
|
|
38227
38549
|
return [nodeResizer(["image"], this.editor)];
|
|
38228
38550
|
}
|
|
38229
38551
|
});
|
|
@@ -38343,7 +38665,8 @@ const getStarterExtensions = () => {
|
|
|
38343
38665
|
NodeResizer,
|
|
38344
38666
|
CustomSelection,
|
|
38345
38667
|
TextTransform,
|
|
38346
|
-
VectorShape
|
|
38668
|
+
VectorShape,
|
|
38669
|
+
ShapeGroup
|
|
38347
38670
|
];
|
|
38348
38671
|
};
|
|
38349
38672
|
export {
|
|
@@ -38369,17 +38692,18 @@ export {
|
|
|
38369
38692
|
undoDepth as j,
|
|
38370
38693
|
redoDepth as k,
|
|
38371
38694
|
collectTrackedChangesForContext as l,
|
|
38372
|
-
|
|
38373
|
-
|
|
38374
|
-
|
|
38375
|
-
|
|
38376
|
-
|
|
38695
|
+
isHeadless as m,
|
|
38696
|
+
getStarterExtensions as n,
|
|
38697
|
+
getRichTextExtensions as o,
|
|
38698
|
+
Decoration as p,
|
|
38699
|
+
Extension as q,
|
|
38377
38700
|
replaceSelectionWithImagePlaceholder as r,
|
|
38378
38701
|
shouldBypassContextMenu as s,
|
|
38379
|
-
index as t,
|
|
38702
|
+
index$1 as t,
|
|
38380
38703
|
useHighContrastMode as u,
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
-
|
|
38384
|
-
yUndoPluginKey as y
|
|
38704
|
+
index as v,
|
|
38705
|
+
AnnotatorHelpers as w,
|
|
38706
|
+
SectionHelpers as x,
|
|
38707
|
+
yUndoPluginKey as y,
|
|
38708
|
+
getAllowedImageDimensions as z
|
|
38385
38709
|
};
|