@harbour-enterprises/superdoc 2.0.0-next.2 → 2.0.0-next.21
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-CWO98Qls.cjs → PdfViewer-B4os0dhm.cjs} +1 -1
- package/dist/chunks/{PdfViewer-C4xgIIbF.es.js → PdfViewer-CvJZenVo.es.js} +1 -1
- package/dist/chunks/{index-BqPa6D4q-Dulj8zfc.cjs → index--w_Fk0WX-Bd420t19.cjs} +1 -1
- package/dist/chunks/{index-BqPa6D4q-8U4x8RP6.es.js → index--w_Fk0WX-D_kNY98j.es.js} +1 -1
- package/dist/chunks/{index-BY-3Vl72.cjs → index-BaspZNUO.cjs} +4 -6
- package/dist/chunks/{index-s9GUR_Gc.es.js → index-bocgaXi5.es.js} +4 -6
- package/dist/chunks/{super-editor.es-CT28vUbx.es.js → super-editor.es-CHiYj0m5.es.js} +1050 -245
- package/dist/chunks/{super-editor.es-BM-ulSRj.cjs → super-editor.es-KouCN1a9.cjs} +1050 -245
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +173 -0
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
- package/dist/style.css +14 -6
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CDlAWcRu.js → converter-De_h0rq-.js} +49 -9
- package/dist/super-editor/chunks/{docx-zipper-B2VXuf8h.js → docx-zipper-CKQFze2s.js} +1 -1
- package/dist/super-editor/chunks/{editor-B4Q_tNET.js → editor-BJljVUQD.js} +994 -239
- package/dist/super-editor/chunks/{index-BqPa6D4q.js → index--w_Fk0WX.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BD-lDCLr.js → toolbar-Br3J_GSc.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 +14 -6
- package/dist/super-editor/super-editor.es.js +19 -9
- 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 +1053 -250
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ export class SuperDoc extends EventEmitter<string | symbol, any> {
|
|
|
36
36
|
colors: string[] | undefined;
|
|
37
37
|
user: import("./types").User | undefined;
|
|
38
38
|
socket: any;
|
|
39
|
-
isDev:
|
|
39
|
+
isDev: boolean | undefined;
|
|
40
40
|
activeEditor: {
|
|
41
41
|
extensionStorage: {};
|
|
42
42
|
presentationEditor: any;
|
|
@@ -229,8 +229,8 @@ export class SuperDoc extends EventEmitter<string | symbol, any> {
|
|
|
229
229
|
} | null | undefined;
|
|
230
230
|
comments: any[] | undefined;
|
|
231
231
|
readyEditors: number | undefined;
|
|
232
|
-
isLocked:
|
|
233
|
-
lockedBy:
|
|
232
|
+
isLocked: boolean | undefined;
|
|
233
|
+
lockedBy: import("./types").User | null | undefined;
|
|
234
234
|
/**
|
|
235
235
|
* Get the number of editors that are required for this superdoc
|
|
236
236
|
* @returns {number} The number of required editors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../../../../src/core/SuperDoc.js"],"names":[],"mappings":"AAsBA,6CAA6C;AAC7C,mEAAmE;AACnE,qDAAqD;AACrD,mDAAmD;AACnD,iDAAiD;AACjD,6DAA6D;AAC7D,iDAAiD;AACjD,6DAA6D;AAE7D;;;;;;GAMG;AACH;IACE,4BAA4B;IAC5B,qBADW,KAAK,CAAC,MAAM,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S,EAAE,eAAe;uBACjC,OAAO,SAAS,EAAE,QAAQ;sBAC1B,OAAO,SAAS,EAAE,OAAO;qBACzB,OAAO,SAAS,EAAE,MAAM;2BACxB,OAAO,SAAS,EAAE,YAAY;qBAC9B,OAAO,SAAS,EAAE,MAAM;2BACxB,OAAO,SAAS,EAAE,YAAY;6BA3Bf,eAAe;8BAMd,iEAAiE"}
|
|
@@ -482,7 +482,180 @@ export type Config = {
|
|
|
482
482
|
* The font-family to use for all SuperDoc UI surfaces
|
|
483
483
|
* (toolbar, comments UI, dropdowns, tooltips, etc.). This ensures consistent typography across the entire application
|
|
484
484
|
* and helps match your application's design system. The value should be a valid CSS font-family string.
|
|
485
|
+
* Example (system fonts):
|
|
486
|
+
* uiDisplayFallbackFont: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
487
|
+
* Example (custom font):
|
|
488
|
+
* uiDisplayFallbackFont: '"Inter", Arial, sans-serif'
|
|
485
489
|
*/
|
|
486
490
|
uiDisplayFallbackFont?: string | undefined;
|
|
491
|
+
/**
|
|
492
|
+
* Whether the SuperDoc is in development mode
|
|
493
|
+
*/
|
|
494
|
+
isDev?: boolean | undefined;
|
|
495
|
+
/**
|
|
496
|
+
* Telemetry configuration
|
|
497
|
+
*/
|
|
498
|
+
telemetry?: TelemetryConfig | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* Layout engine overrides passed through to PresentationEditor (page size, margins, virtualization, zoom, debug label, etc.)
|
|
501
|
+
*/
|
|
502
|
+
layoutEngineOptions?: {
|
|
503
|
+
/**
|
|
504
|
+
* Optional override for paginated track-changes rendering (e.g., `{ mode: 'final' }` to force final view or `{ enabled: false }` to strip metadata entirely)
|
|
505
|
+
*/
|
|
506
|
+
trackedChanges?: Object | undefined;
|
|
507
|
+
} | undefined;
|
|
508
|
+
/**
|
|
509
|
+
* Callback before an editor is created
|
|
510
|
+
*/
|
|
511
|
+
onEditorBeforeCreate?: ((editor: Editor) => void) | undefined;
|
|
512
|
+
/**
|
|
513
|
+
* Callback after an editor is created
|
|
514
|
+
*/
|
|
515
|
+
onEditorCreate?: ((editor: Editor) => void) | undefined;
|
|
516
|
+
/**
|
|
517
|
+
* Callback when a transaction is made
|
|
518
|
+
*/
|
|
519
|
+
onTransaction?: ((params: {
|
|
520
|
+
editor: Editor;
|
|
521
|
+
transaction: any;
|
|
522
|
+
duration: number;
|
|
523
|
+
}) => void) | undefined;
|
|
524
|
+
/**
|
|
525
|
+
* Callback after an editor is destroyed
|
|
526
|
+
*/
|
|
527
|
+
onEditorDestroy?: (() => void) | undefined;
|
|
528
|
+
/**
|
|
529
|
+
* Callback when there is an error in the content
|
|
530
|
+
*/
|
|
531
|
+
onContentError?: ((params: {
|
|
532
|
+
error: object;
|
|
533
|
+
editor: Editor;
|
|
534
|
+
documentId: string;
|
|
535
|
+
file: File;
|
|
536
|
+
}) => void) | undefined;
|
|
537
|
+
/**
|
|
538
|
+
* Callback when the SuperDoc is ready
|
|
539
|
+
*/
|
|
540
|
+
onReady?: ((editor: {
|
|
541
|
+
superdoc: SuperDoc;
|
|
542
|
+
}) => void) | undefined;
|
|
543
|
+
/**
|
|
544
|
+
* Callback when comments are updated
|
|
545
|
+
*/
|
|
546
|
+
onCommentsUpdate?: ((params: {
|
|
547
|
+
type: string;
|
|
548
|
+
data: object;
|
|
549
|
+
}) => void) | undefined;
|
|
550
|
+
/**
|
|
551
|
+
* Callback when awareness is updated
|
|
552
|
+
*/
|
|
553
|
+
onAwarenessUpdate?: ((params: {
|
|
554
|
+
context: SuperDoc;
|
|
555
|
+
states: any[];
|
|
556
|
+
}) => void) | undefined;
|
|
557
|
+
/**
|
|
558
|
+
* Callback when the SuperDoc is locked
|
|
559
|
+
*/
|
|
560
|
+
onLocked?: ((params: {
|
|
561
|
+
isLocked: boolean;
|
|
562
|
+
lockedBy: User;
|
|
563
|
+
}) => void) | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* Callback when the PDF document is ready
|
|
566
|
+
*/
|
|
567
|
+
onPdfDocumentReady?: (() => void) | undefined;
|
|
568
|
+
/**
|
|
569
|
+
* Callback when the sidebar is toggled
|
|
570
|
+
*/
|
|
571
|
+
onSidebarToggle?: ((isOpened: boolean) => void) | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* Callback when collaboration is ready
|
|
574
|
+
*/
|
|
575
|
+
onCollaborationReady?: ((params: {
|
|
576
|
+
editor: Editor;
|
|
577
|
+
}) => void) | undefined;
|
|
578
|
+
/**
|
|
579
|
+
* Callback when document is updated
|
|
580
|
+
*/
|
|
581
|
+
onEditorUpdate?: ((params: {
|
|
582
|
+
editor: Editor;
|
|
583
|
+
}) => void) | undefined;
|
|
584
|
+
/**
|
|
585
|
+
* Callback when an exception is thrown
|
|
586
|
+
*/
|
|
587
|
+
onException?: ((params: {
|
|
588
|
+
error: Error;
|
|
589
|
+
}) => void) | undefined;
|
|
590
|
+
/**
|
|
591
|
+
* Callback when the comments list is rendered
|
|
592
|
+
*/
|
|
593
|
+
onCommentsListChange?: ((params: {
|
|
594
|
+
isRendered: boolean;
|
|
595
|
+
}) => void) | undefined;
|
|
596
|
+
/**
|
|
597
|
+
* Callback when the list definitions change
|
|
598
|
+
*/
|
|
599
|
+
onListDefinitionsChange?: ((params: {}) => any) | undefined;
|
|
600
|
+
/**
|
|
601
|
+
* The format of the document (docx, pdf, html)
|
|
602
|
+
*/
|
|
603
|
+
format?: string | undefined;
|
|
604
|
+
/**
|
|
605
|
+
* The extensions to load for the editor
|
|
606
|
+
*/
|
|
607
|
+
editorExtensions?: Object[] | undefined;
|
|
608
|
+
/**
|
|
609
|
+
* Whether the SuperDoc is internal
|
|
610
|
+
*/
|
|
611
|
+
isInternal?: boolean | undefined;
|
|
612
|
+
/**
|
|
613
|
+
* The title of the SuperDoc
|
|
614
|
+
*/
|
|
615
|
+
title?: string | undefined;
|
|
616
|
+
/**
|
|
617
|
+
* The conversations to load
|
|
618
|
+
*/
|
|
619
|
+
conversations?: Object[] | undefined;
|
|
620
|
+
/**
|
|
621
|
+
* Whether the SuperDoc is locked
|
|
622
|
+
*/
|
|
623
|
+
isLocked?: boolean | undefined;
|
|
624
|
+
/**
|
|
625
|
+
* The function to handle image uploads
|
|
626
|
+
*/
|
|
627
|
+
handleImageUpload?: ((arg0: File) => Promise<string>) | undefined;
|
|
628
|
+
/**
|
|
629
|
+
* The user who locked the SuperDoc
|
|
630
|
+
*/
|
|
631
|
+
lockedBy?: User | undefined;
|
|
632
|
+
/**
|
|
633
|
+
* Whether to show the ruler in the editor
|
|
634
|
+
*/
|
|
635
|
+
rulers?: boolean | undefined;
|
|
636
|
+
/**
|
|
637
|
+
* Whether to suppress default styles in docx mode
|
|
638
|
+
*/
|
|
639
|
+
suppressDefaultDocxStyles?: boolean | undefined;
|
|
640
|
+
/**
|
|
641
|
+
* Provided JSON to override content with
|
|
642
|
+
*/
|
|
643
|
+
jsonOverride?: Object | undefined;
|
|
644
|
+
/**
|
|
645
|
+
* Whether to disable slash / right-click custom context menu
|
|
646
|
+
*/
|
|
647
|
+
disableContextMenu?: boolean | undefined;
|
|
648
|
+
/**
|
|
649
|
+
* HTML content to initialize the editor with
|
|
650
|
+
*/
|
|
651
|
+
html?: string | undefined;
|
|
652
|
+
/**
|
|
653
|
+
* Markdown content to initialize the editor with
|
|
654
|
+
*/
|
|
655
|
+
markdown?: string | undefined;
|
|
656
|
+
/**
|
|
657
|
+
* Whether to enable debug mode
|
|
658
|
+
*/
|
|
659
|
+
isDebug?: boolean | undefined;
|
|
487
660
|
};
|
|
488
661
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAeN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAaE,MAAM,wBAAwB,IAAI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AM,CAAA;KAAE,KAAK,IAAI;;;;+BAC3B;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;4BAC3B;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI;;;;qCACzB;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;;;;wCAChC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOF,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../../../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2Ca,MAAM,KACJ,IAAI;qBAiBN,MAAM,KACJ,MAAM;0CAUR,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA8Ld;QAAuB,SAAS,EAAxB,MAAM;QACS,UAAU;QACV,eAAe;KACtC,KAAU,MAAM;;0DAqDhB;QAAuB,QAAQ,EAAvB,MAAM;KACd,KAAU,IAAI;sCAyEJ,IAAI;;;;;6CAzFJ,IAAI;4EAsGd;QAAsB,QAAQ;QACP,UAAU;KACjC,KAAU,IAAI;;+
|
|
1
|
+
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../../../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2Ca,MAAM,KACJ,IAAI;qBAiBN,MAAM,KACJ,MAAM;0CAUR,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA8Ld;QAAuB,SAAS,EAAxB,MAAM;QACS,UAAU;QACV,eAAe;KACtC,KAAU,MAAM;;0DAqDhB;QAAuB,QAAQ,EAAvB,MAAM;KACd,KAAU,IAAI;sCAyEJ,IAAI;;;;;6CAzFJ,IAAI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ode .sd-structured-content-draggable {
|
|
1545
1545
|
display: none;
|
|
1546
1546
|
}
|
|
1547
|
+
.presentation-editor--viewing .sd-structured-content,
|
|
1548
|
+
.presentation-editor--viewing .sd-structured-content-block {
|
|
1549
|
+
padding: 0;
|
|
1550
|
+
border: none;
|
|
1551
|
+
}
|
|
1552
|
+
.presentation-editor--viewing .sd-structured-content-draggable {
|
|
1553
|
+
display: none;
|
|
1554
|
+
}
|
|
1547
1555
|
.sd-vector-shape {
|
|
1548
1556
|
display: inline-block;
|
|
1549
1557
|
vertical-align: bottom;
|
|
@@ -2332,10 +2340,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2332
2340
|
box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
|
|
2333
2341
|
}
|
|
2334
2342
|
|
|
2335
|
-
.editor-element[data-v-
|
|
2343
|
+
.editor-element[data-v-c9a3c876] {
|
|
2336
2344
|
position: relative;
|
|
2337
2345
|
}
|
|
2338
|
-
.super-editor-container[data-v-
|
|
2346
|
+
.super-editor-container[data-v-c9a3c876] {
|
|
2339
2347
|
width: auto;
|
|
2340
2348
|
height: auto;
|
|
2341
2349
|
min-width: 8in;
|
|
@@ -2344,14 +2352,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2344
2352
|
display: flex;
|
|
2345
2353
|
flex-direction: column;
|
|
2346
2354
|
}
|
|
2347
|
-
.ruler[data-v-
|
|
2355
|
+
.ruler[data-v-c9a3c876] {
|
|
2348
2356
|
margin-bottom: 2px;
|
|
2349
2357
|
}
|
|
2350
|
-
.super-editor[data-v-
|
|
2358
|
+
.super-editor[data-v-c9a3c876] {
|
|
2351
2359
|
color: initial;
|
|
2352
2360
|
overflow: hidden;
|
|
2353
2361
|
}
|
|
2354
|
-
.placeholder-editor[data-v-
|
|
2362
|
+
.placeholder-editor[data-v-c9a3c876] {
|
|
2355
2363
|
position: absolute;
|
|
2356
2364
|
top: 0;
|
|
2357
2365
|
left: 0;
|
|
@@ -2363,7 +2371,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2363
2371
|
background-color: white;
|
|
2364
2372
|
box-sizing: border-box;
|
|
2365
2373
|
}
|
|
2366
|
-
.placeholder-title[data-v-
|
|
2374
|
+
.placeholder-title[data-v-c9a3c876] {
|
|
2367
2375
|
display: flex;
|
|
2368
2376
|
justify-content: center;
|
|
2369
2377
|
margin-bottom: 40px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-De_h0rq-.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-BJljVUQD.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -38535,8 +38535,6 @@ const decode$7 = (params) => {
|
|
|
38535
38535
|
);
|
|
38536
38536
|
const isInternal = parentComment?.isInternal || originalComment.isInternal;
|
|
38537
38537
|
if (commentsExportType === "external" && isInternal) return;
|
|
38538
|
-
const isResolved = !!originalComment.resolvedTime;
|
|
38539
|
-
if (isResolved) return;
|
|
38540
38538
|
if (node.type !== "commentRangeStart" && node.type !== "commentRangeEnd") {
|
|
38541
38539
|
return;
|
|
38542
38540
|
}
|
|
@@ -39205,11 +39203,15 @@ const encode$1 = (params, encodedAttrs = {}) => {
|
|
|
39205
39203
|
}
|
|
39206
39204
|
if (elements.length === 1) {
|
|
39207
39205
|
text = elements[0].text;
|
|
39208
|
-
const
|
|
39206
|
+
const docXmlSpace = params.converter?.documentAttributes?.["xml:space"];
|
|
39207
|
+
const xmlSpace = encodedAttrs.xmlSpace ?? attributes?.["xml:space"] ?? elements[0]?.attributes?.["xml:space"] ?? docXmlSpace;
|
|
39209
39208
|
if (xmlSpace !== "preserve" && typeof text === "string") {
|
|
39210
39209
|
text = text.replace(/^[ \t\n\r]+/, "").replace(/[ \t\n\r]+$/, "");
|
|
39211
39210
|
}
|
|
39212
39211
|
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
39212
|
+
if (xmlSpace !== "preserve" && typeof text === "string" && !text.trim()) {
|
|
39213
|
+
return null;
|
|
39214
|
+
}
|
|
39213
39215
|
} else if (!elements.length && encodedAttrs.xmlSpace === "preserve") {
|
|
39214
39216
|
text = " ";
|
|
39215
39217
|
} else return null;
|
|
@@ -42503,8 +42505,46 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42503
42505
|
this.declaration = this.initialJSON?.declaration;
|
|
42504
42506
|
this.resolveDocumentGuid();
|
|
42505
42507
|
}
|
|
42508
|
+
/**
|
|
42509
|
+
* Parses XML content into JSON format while preserving whitespace-only text runs.
|
|
42510
|
+
*
|
|
42511
|
+
* This method wraps xml-js's xml2json parser with additional preprocessing to prevent
|
|
42512
|
+
* the parser from dropping whitespace-only content in <w:t> and <w:delText> elements.
|
|
42513
|
+
* This is critical for correctly handling documents that rely on document-level
|
|
42514
|
+
* xml:space="preserve" rather than per-element attributes, which is common in
|
|
42515
|
+
* PDF-to-DOCX converted documents.
|
|
42516
|
+
*
|
|
42517
|
+
* The whitespace preservation strategy:
|
|
42518
|
+
* 1. Before parsing, wraps whitespace-only content with [[sdspace]] placeholders
|
|
42519
|
+
* 2. xml-js parser preserves the placeholder-wrapped text
|
|
42520
|
+
* 3. During text node processing (t-translator.js), placeholders are removed
|
|
42521
|
+
*
|
|
42522
|
+
* @param {string} xml - The XML string to parse
|
|
42523
|
+
* @returns {Object} The parsed JSON representation of the XML document
|
|
42524
|
+
*
|
|
42525
|
+
* @example
|
|
42526
|
+
* // Handles whitespace-only text runs
|
|
42527
|
+
* const xml = '<w:t> </w:t>';
|
|
42528
|
+
* const result = parseXmlToJson(xml);
|
|
42529
|
+
* // Result preserves the space: { elements: [{ text: '[[sdspace]] [[sdspace]]' }] }
|
|
42530
|
+
*
|
|
42531
|
+
* @example
|
|
42532
|
+
* // Handles elements with attributes
|
|
42533
|
+
* const xml = '<w:t xml:space="preserve"> text </w:t>';
|
|
42534
|
+
* const result = parseXmlToJson(xml);
|
|
42535
|
+
* // Preserves content and attributes
|
|
42536
|
+
*
|
|
42537
|
+
* @example
|
|
42538
|
+
* // Handles both w:t and w:delText elements
|
|
42539
|
+
* const xml = '<w:delText> </w:delText>';
|
|
42540
|
+
* const result = parseXmlToJson(xml);
|
|
42541
|
+
* // Preserves whitespace in deleted text
|
|
42542
|
+
*/
|
|
42506
42543
|
parseXmlToJson(xml) {
|
|
42507
|
-
const newXml = xml.replace(
|
|
42544
|
+
const newXml = xml.replace(
|
|
42545
|
+
/(<w:(?:t|delText)(?:\s[^>]*)?>)(\s+)(<\/w:(?:t|delText)>)/g,
|
|
42546
|
+
"$1[[sdspace]]$2[[sdspace]]$3"
|
|
42547
|
+
);
|
|
42508
42548
|
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
42509
42549
|
}
|
|
42510
42550
|
/**
|
|
@@ -42727,7 +42767,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42727
42767
|
static getStoredSuperdocVersion(docx) {
|
|
42728
42768
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42729
42769
|
}
|
|
42730
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "2.0.0-next.
|
|
42770
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "2.0.0-next.21") {
|
|
42731
42771
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
42732
42772
|
}
|
|
42733
42773
|
/**
|
|
@@ -43452,10 +43492,10 @@ export {
|
|
|
43452
43492
|
v4 as a0,
|
|
43453
43493
|
TrackFormatMarkName as a1,
|
|
43454
43494
|
comments_module_events as a2,
|
|
43455
|
-
|
|
43456
|
-
|
|
43457
|
-
|
|
43458
|
-
|
|
43495
|
+
objectIncludes as a3,
|
|
43496
|
+
AddMarkStep as a4,
|
|
43497
|
+
RemoveMarkStep as a5,
|
|
43498
|
+
findMark as a6,
|
|
43459
43499
|
twipsToLines as a7,
|
|
43460
43500
|
pixelsToTwips as a8,
|
|
43461
43501
|
helpers as a9,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-De_h0rq-.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|