@harbour-enterprises/superdoc 1.0.0-beta.60 → 1.0.0-beta.62
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-4-HewDUK.cjs → PdfViewer-Dm3bZ_1B.cjs} +1 -1
- package/dist/chunks/{PdfViewer-C4HeazGQ.es.js → PdfViewer-rmkhzY1H.es.js} +1 -1
- package/dist/chunks/{index-BKfoD32c.es.js → index-5vPj3xiM.es.js} +13 -6
- package/dist/chunks/{index-9qSCXVF1.cjs → index-VQNmJYMh.cjs} +13 -6
- package/dist/chunks/{index-GAzIoyrZ-C17wg4bM.cjs → index-XOsGE2PW-BL-ekicF.cjs} +1 -1
- package/dist/chunks/{index-GAzIoyrZ-zhiF5zMK.es.js → index-XOsGE2PW-hNAnvmsK.es.js} +1 -1
- package/dist/chunks/{super-editor.es-CJ3Aw1GR.es.js → super-editor.es-BIEE4joF.es.js} +756 -144
- package/dist/chunks/{super-editor.es-DCHFBNql.cjs → super-editor.es-CxtR72x8.cjs} +756 -144
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/style.css +44 -56
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DZ7Tkh7u.js → converter-Bo9KIIo_.js} +165 -47
- package/dist/super-editor/chunks/{docx-zipper-CZQWEuyi.js → docx-zipper-Cw0Rbwvk.js} +1 -1
- package/dist/super-editor/chunks/{editor-CDMuD1Nx.js → editor-v-i8Oo_X.js} +531 -36
- package/dist/super-editor/chunks/{index-GAzIoyrZ.js → index-XOsGE2PW.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-DL3rTlKm.js → toolbar-CiKH0Ttu.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 +17 -29
- package/dist/super-editor/super-editor.es.js +96 -94
- 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 +768 -149
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,CAAC,CACgB;IA4ExC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IAhFD,qBAAqB;IACrB,SADW,MAAM,CACT;IAER,qBAAqB;IACrB,OADW,IAAI,EAAE,CACX;IAEN,4CAA4C;IAC5C,MADW,OAAO,KAAK,EAAE,GAAG,GAAG,SAAS,CACnC;IAEL,4EAA4E;IAC5E,UADW,OAAO,sBAAsB,EAAE,kBAAkB,GAAG,SAAS,CAC/D;IAET,qBAAqB;IACrB,QADW,MAAM,CA4Df;IAiDA,wCAA6B;IAC7B,+BAAmB;IAMnB,gBAA+C;IAC/C,6BAAgC;IAchC,yCAA4B;IAE5B,YAAkB;IAElB,2BAAuC;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAAwB;IACxB,4BAAkB;IASlB,iCAAqB;IAErB,8BAA6C;IAC7C,oDAA4C;IAM9C;;;OAGG;IACH,+BAFa,MAAM,CAIlB;IAED;;;MAKC;IAED;;;OAGG;IACH,eAFa,WAAW,GAAG,IAAI,CAO9B;IAsFC,SAAc;IACd,WAAkB;IAKlB,mBAAkC;IAClC,mBAAkC;IAClC,2BAAkD;IAuClD,qCAA2B;IA8D7B;;;;OAIG;IACH,oBAHW,MAAM,GACJ,IAAI,CAKhB;IAED;;;;OAIG;IACH,iCAFa,IAAI,CAIhB;IAED;;;;;OAKG;IACH,kCAHG;QAAsB,KAAK,EAAnB,KAAK;QACU,MAAM,EAArB,MAAM;KAChB,QAKA;IAED;;;OAGG;IACH,6BAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,kBAFa,IAAI,CAMhB;IAED;;;;OAIG;IACH,oCAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;;OAIG;IACH,8BAHW,MAAM,GACJ,IAAI,CAMhB;IAED;;;OAGG;IACH,0BAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,iCAFW,OAAO,QAIjB;IAMD;;;;OAIG;IACH,wBAHW,MAAM,GACJ,IAAI,CAQhB;IAED;;;;OAIG;IACH,eAFa,IAAI,
|
|
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,CAAC,CACgB;IA4ExC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IAhFD,qBAAqB;IACrB,SADW,MAAM,CACT;IAER,qBAAqB;IACrB,OADW,IAAI,EAAE,CACX;IAEN,4CAA4C;IAC5C,MADW,OAAO,KAAK,EAAE,GAAG,GAAG,SAAS,CACnC;IAEL,4EAA4E;IAC5E,UADW,OAA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AAC,IAAI,EAAE,CAAC,CAY3B;IAED;;;OAGG;IACH,WAFa,IAAI,CAiChB;IAED;;;OAGG;IACH,SAFa,IAAI,CAahB;IAED;;;;OAIG;IACH,oCAHW,OAAO,GACL,IAAI,CAMhB;IAED;;;;;;;OAOG;IACH,oCAJG;QAAwB,IAAI,EAApB,MAAM;QACU,IAAI,EAApB,MAAM;KACd,GAAU,IAAI,CAUhB;;CACF;mBA7hCa,OAAO,SAAS,EAAE,IAAI;8BACtB,OAAO,SAAS,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"}
|
package/dist/style.css
CHANGED
|
@@ -2189,7 +2189,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2189
2189
|
margin: 4px 0;
|
|
2190
2190
|
}
|
|
2191
2191
|
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
|
2192
|
-
.vertical-indicator[data-v-
|
|
2192
|
+
.vertical-indicator[data-v-b9f4f30a] {
|
|
2193
2193
|
position: absolute;
|
|
2194
2194
|
height: 0px;
|
|
2195
2195
|
min-width: 1px;
|
|
@@ -2197,7 +2197,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2197
2197
|
top: 20px;
|
|
2198
2198
|
z-index: 100;
|
|
2199
2199
|
}
|
|
2200
|
-
.margin-handle[data-v-
|
|
2200
|
+
.margin-handle[data-v-b9f4f30a] {
|
|
2201
2201
|
width: 56px;
|
|
2202
2202
|
min-width: 5px;
|
|
2203
2203
|
max-width: 5px;
|
|
@@ -2208,32 +2208,27 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2208
2208
|
margin-left: -2px;
|
|
2209
2209
|
border-radius: 4px 4px 0 0;
|
|
2210
2210
|
transition: background-color 250ms ease;
|
|
2211
|
+
z-index: 10;
|
|
2211
2212
|
}
|
|
2212
|
-
.margin-handle[data-v-
|
|
2213
|
+
.margin-handle[data-v-b9f4f30a]:hover {
|
|
2213
2214
|
background-color: var(--ruler-handle-active-color);
|
|
2214
2215
|
}
|
|
2215
|
-
.ruler[data-v-
|
|
2216
|
-
max-height: 25px;
|
|
2216
|
+
.ruler[data-v-b9f4f30a] {
|
|
2217
2217
|
height: 25px;
|
|
2218
|
-
|
|
2219
|
-
display: flex;
|
|
2218
|
+
width: var(--ruler-width, 8.5in);
|
|
2220
2219
|
margin: 0;
|
|
2221
2220
|
padding: 0;
|
|
2222
|
-
align-items: var(--alignment);
|
|
2223
2221
|
box-sizing: border-box;
|
|
2224
2222
|
position: relative;
|
|
2225
2223
|
color: #666;
|
|
2226
2224
|
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
left: 0;
|
|
2231
|
-
width: 1px;
|
|
2232
|
-
height: 100%;
|
|
2233
|
-
background-color: var(--color);
|
|
2225
|
+
|
|
2226
|
+
/* Tick marks - using absolute positioning from ruler-core */
|
|
2227
|
+
.ruler-tick[data-v-b9f4f30a] {
|
|
2234
2228
|
pointer-events: none;
|
|
2229
|
+
user-select: none;
|
|
2235
2230
|
}
|
|
2236
|
-
.numbering[data-v-
|
|
2231
|
+
.numbering[data-v-b9f4f30a] {
|
|
2237
2232
|
position: absolute;
|
|
2238
2233
|
top: -16px;
|
|
2239
2234
|
left: -2px;
|
|
@@ -2241,13 +2236,6 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2241
2236
|
pointer-events: none;
|
|
2242
2237
|
user-select: none;
|
|
2243
2238
|
}
|
|
2244
|
-
.ruler-section[data-v-79f9a944] {
|
|
2245
|
-
position: relative;
|
|
2246
|
-
display: flex;
|
|
2247
|
-
align-items: var(--alignment);
|
|
2248
|
-
pointer-events: none;
|
|
2249
|
-
user-select: none;
|
|
2250
|
-
}
|
|
2251
2239
|
|
|
2252
2240
|
/* @remarks - popover adds a slight shadow, this can be removed if needed */
|
|
2253
2241
|
.generic-popover[data-v-157855b5] {
|
|
@@ -2343,10 +2331,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2343
2331
|
box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
|
|
2344
2332
|
}
|
|
2345
2333
|
|
|
2346
|
-
.editor-element[data-v-
|
|
2334
|
+
.editor-element[data-v-cb3fe66f] {
|
|
2347
2335
|
position: relative;
|
|
2348
2336
|
}
|
|
2349
|
-
.super-editor-container[data-v-
|
|
2337
|
+
.super-editor-container[data-v-cb3fe66f] {
|
|
2350
2338
|
width: auto;
|
|
2351
2339
|
height: auto;
|
|
2352
2340
|
min-width: 8in;
|
|
@@ -2355,14 +2343,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2355
2343
|
display: flex;
|
|
2356
2344
|
flex-direction: column;
|
|
2357
2345
|
}
|
|
2358
|
-
.ruler[data-v-
|
|
2346
|
+
.ruler[data-v-cb3fe66f] {
|
|
2359
2347
|
margin-bottom: 2px;
|
|
2360
2348
|
}
|
|
2361
|
-
.super-editor[data-v-
|
|
2349
|
+
.super-editor[data-v-cb3fe66f] {
|
|
2362
2350
|
color: initial;
|
|
2363
2351
|
overflow: hidden;
|
|
2364
2352
|
}
|
|
2365
|
-
.placeholder-editor[data-v-
|
|
2353
|
+
.placeholder-editor[data-v-cb3fe66f] {
|
|
2366
2354
|
position: absolute;
|
|
2367
2355
|
top: 0;
|
|
2368
2356
|
left: 0;
|
|
@@ -2374,7 +2362,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
2374
2362
|
background-color: white;
|
|
2375
2363
|
box-sizing: border-box;
|
|
2376
2364
|
}
|
|
2377
|
-
.placeholder-title[data-v-
|
|
2365
|
+
.placeholder-title[data-v-cb3fe66f] {
|
|
2378
2366
|
display: flex;
|
|
2379
2367
|
justify-content: center;
|
|
2380
2368
|
margin-bottom: 40px;
|
|
@@ -2543,46 +2531,46 @@ img[data-v-7dd69850] {
|
|
|
2543
2531
|
display: none;
|
|
2544
2532
|
}
|
|
2545
2533
|
|
|
2546
|
-
.superdoc[data-v-
|
|
2534
|
+
.superdoc[data-v-e229774d] {
|
|
2547
2535
|
display: flex;
|
|
2548
2536
|
}
|
|
2549
|
-
.right-sidebar[data-v-
|
|
2537
|
+
.right-sidebar[data-v-e229774d] {
|
|
2550
2538
|
min-width: 320px;
|
|
2551
2539
|
}
|
|
2552
|
-
.floating-comments[data-v-
|
|
2540
|
+
.floating-comments[data-v-e229774d] {
|
|
2553
2541
|
min-width: 300px;
|
|
2554
2542
|
width: 300px;
|
|
2555
2543
|
}
|
|
2556
|
-
.superdoc__layers[data-v-
|
|
2544
|
+
.superdoc__layers[data-v-e229774d] {
|
|
2557
2545
|
height: 100%;
|
|
2558
2546
|
position: relative;
|
|
2559
2547
|
box-sizing: border-box;
|
|
2560
2548
|
}
|
|
2561
|
-
.superdoc__document[data-v-
|
|
2549
|
+
.superdoc__document[data-v-e229774d] {
|
|
2562
2550
|
width: 100%;
|
|
2563
2551
|
position: relative;
|
|
2564
2552
|
}
|
|
2565
|
-
.superdoc__sub-document[data-v-
|
|
2553
|
+
.superdoc__sub-document[data-v-e229774d] {
|
|
2566
2554
|
width: 100%;
|
|
2567
2555
|
position: relative;
|
|
2568
2556
|
}
|
|
2569
|
-
.superdoc__selection-layer[data-v-
|
|
2557
|
+
.superdoc__selection-layer[data-v-e229774d] {
|
|
2570
2558
|
position: absolute;
|
|
2571
2559
|
min-width: 100%;
|
|
2572
2560
|
min-height: 100%;
|
|
2573
2561
|
z-index: 10;
|
|
2574
2562
|
pointer-events: none;
|
|
2575
2563
|
}
|
|
2576
|
-
.superdoc__temp-selection[data-v-
|
|
2564
|
+
.superdoc__temp-selection[data-v-e229774d] {
|
|
2577
2565
|
position: absolute;
|
|
2578
2566
|
}
|
|
2579
|
-
.superdoc__comments-layer[data-v-
|
|
2567
|
+
.superdoc__comments-layer[data-v-e229774d] {
|
|
2580
2568
|
/* position: absolute; */
|
|
2581
2569
|
top: 0;
|
|
2582
2570
|
height: 100%;
|
|
2583
2571
|
position: relative;
|
|
2584
2572
|
}
|
|
2585
|
-
.superdoc__right-sidebar[data-v-
|
|
2573
|
+
.superdoc__right-sidebar[data-v-e229774d] {
|
|
2586
2574
|
width: 320px;
|
|
2587
2575
|
min-width: 320px;
|
|
2588
2576
|
padding: 0 10px;
|
|
@@ -2592,14 +2580,14 @@ img[data-v-7dd69850] {
|
|
|
2592
2580
|
}
|
|
2593
2581
|
|
|
2594
2582
|
/* Tools styles */
|
|
2595
|
-
.tools[data-v-
|
|
2583
|
+
.tools[data-v-e229774d] {
|
|
2596
2584
|
position: absolute;
|
|
2597
2585
|
z-index: 3;
|
|
2598
2586
|
display: flex;
|
|
2599
2587
|
flex-direction: column;
|
|
2600
2588
|
gap: 6px;
|
|
2601
2589
|
}
|
|
2602
|
-
.tools .tool-icon[data-v-
|
|
2590
|
+
.tools .tool-icon[data-v-e229774d] {
|
|
2603
2591
|
font-size: 20px;
|
|
2604
2592
|
border-radius: 12px;
|
|
2605
2593
|
border: none;
|
|
@@ -2607,7 +2595,7 @@ img[data-v-7dd69850] {
|
|
|
2607
2595
|
background-color: #dbdbdb;
|
|
2608
2596
|
cursor: pointer;
|
|
2609
2597
|
}
|
|
2610
|
-
.tools-item[data-v-
|
|
2598
|
+
.tools-item[data-v-e229774d] {
|
|
2611
2599
|
display: flex;
|
|
2612
2600
|
align-items: center;
|
|
2613
2601
|
justify-content: center;
|
|
@@ -2617,10 +2605,10 @@ img[data-v-7dd69850] {
|
|
|
2617
2605
|
border-radius: 12px;
|
|
2618
2606
|
cursor: pointer;
|
|
2619
2607
|
}
|
|
2620
|
-
.tools-item i[data-v-
|
|
2608
|
+
.tools-item i[data-v-e229774d] {
|
|
2621
2609
|
cursor: pointer;
|
|
2622
2610
|
}
|
|
2623
|
-
.superdoc__tools-icon[data-v-
|
|
2611
|
+
.superdoc__tools-icon[data-v-e229774d] {
|
|
2624
2612
|
width: 20px;
|
|
2625
2613
|
height: 20px;
|
|
2626
2614
|
flex-shrink: 0;
|
|
@@ -2635,15 +2623,15 @@ img[data-v-7dd69850] {
|
|
|
2635
2623
|
|
|
2636
2624
|
/* 834px is iPad screen size in portrait orientation */
|
|
2637
2625
|
@media (max-width: 834px) {
|
|
2638
|
-
.superdoc .superdoc__layers[data-v-
|
|
2626
|
+
.superdoc .superdoc__layers[data-v-e229774d] {
|
|
2639
2627
|
margin: 0;
|
|
2640
2628
|
border: 0 !important;
|
|
2641
2629
|
box-shadow: none;
|
|
2642
2630
|
}
|
|
2643
|
-
.superdoc__sub-document[data-v-
|
|
2631
|
+
.superdoc__sub-document[data-v-e229774d] {
|
|
2644
2632
|
max-width: 100%;
|
|
2645
2633
|
}
|
|
2646
|
-
.superdoc__right-sidebar[data-v-
|
|
2634
|
+
.superdoc__right-sidebar[data-v-e229774d] {
|
|
2647
2635
|
padding: 10px;
|
|
2648
2636
|
width: 55px;
|
|
2649
2637
|
position: relative;
|
|
@@ -2651,7 +2639,7 @@ img[data-v-7dd69850] {
|
|
|
2651
2639
|
}
|
|
2652
2640
|
|
|
2653
2641
|
/* AI Writer styles */
|
|
2654
|
-
.ai-writer-container[data-v-
|
|
2642
|
+
.ai-writer-container[data-v-e229774d] {
|
|
2655
2643
|
position: fixed;
|
|
2656
2644
|
z-index: 1000;
|
|
2657
2645
|
background: white;
|
|
@@ -2669,13 +2657,13 @@ img[data-v-7dd69850] {
|
|
|
2669
2657
|
} */
|
|
2670
2658
|
|
|
2671
2659
|
/* Tools styles */
|
|
2672
|
-
.tools[data-v-
|
|
2660
|
+
.tools[data-v-e229774d] {
|
|
2673
2661
|
position: absolute;
|
|
2674
2662
|
z-index: 3;
|
|
2675
2663
|
display: flex;
|
|
2676
2664
|
gap: 6px;
|
|
2677
2665
|
}
|
|
2678
|
-
.tools .tool-icon[data-v-
|
|
2666
|
+
.tools .tool-icon[data-v-e229774d] {
|
|
2679
2667
|
font-size: 20px;
|
|
2680
2668
|
border-radius: 12px;
|
|
2681
2669
|
border: none;
|
|
@@ -2683,7 +2671,7 @@ img[data-v-7dd69850] {
|
|
|
2683
2671
|
background-color: #dbdbdb;
|
|
2684
2672
|
cursor: pointer;
|
|
2685
2673
|
}
|
|
2686
|
-
.tools-item[data-v-
|
|
2674
|
+
.tools-item[data-v-e229774d] {
|
|
2687
2675
|
display: flex;
|
|
2688
2676
|
align-items: center;
|
|
2689
2677
|
justify-content: center;
|
|
@@ -2694,18 +2682,18 @@ img[data-v-7dd69850] {
|
|
|
2694
2682
|
border-radius: 12px;
|
|
2695
2683
|
cursor: pointer;
|
|
2696
2684
|
}
|
|
2697
|
-
.tools-item i[data-v-
|
|
2685
|
+
.tools-item i[data-v-e229774d] {
|
|
2698
2686
|
cursor: pointer;
|
|
2699
2687
|
}
|
|
2700
|
-
.superdoc__tools-icon[data-v-
|
|
2688
|
+
.superdoc__tools-icon[data-v-e229774d] {
|
|
2701
2689
|
width: 20px;
|
|
2702
2690
|
height: 20px;
|
|
2703
2691
|
flex-shrink: 0;
|
|
2704
2692
|
}
|
|
2705
|
-
.ai-tool > svg[data-v-
|
|
2693
|
+
.ai-tool > svg[data-v-e229774d] {
|
|
2706
2694
|
fill: transparent;
|
|
2707
2695
|
}
|
|
2708
|
-
.ai-tool[data-v-
|
|
2696
|
+
.ai-tool[data-v-e229774d]::before {
|
|
2709
2697
|
content: '';
|
|
2710
2698
|
position: absolute;
|
|
2711
2699
|
width: 20px;
|
|
@@ -2726,7 +2714,7 @@ img[data-v-7dd69850] {
|
|
|
2726
2714
|
filter: brightness(1.2);
|
|
2727
2715
|
transition: filter 0.2s ease;
|
|
2728
2716
|
}
|
|
2729
|
-
.ai-tool[data-v-
|
|
2717
|
+
.ai-tool[data-v-e229774d]:hover::before {
|
|
2730
2718
|
filter: brightness(1.3);
|
|
2731
2719
|
}
|
|
2732
2720
|
|
|
@@ -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-Bo9KIIo_.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-v-i8Oo_X.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 = {}) {
|
|
@@ -42431,11 +42431,71 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42431
42431
|
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
42432
42432
|
}
|
|
42433
42433
|
/**
|
|
42434
|
-
*
|
|
42434
|
+
* Checks if an element name matches the expected local name, with or without namespace prefix.
|
|
42435
|
+
* This helper supports custom namespace prefixes in DOCX files (e.g., 'op:Properties', 'custom:property').
|
|
42436
|
+
*
|
|
42437
|
+
* @private
|
|
42438
|
+
* @static
|
|
42439
|
+
* @param {string|undefined|null} elementName - The element name to check (may include namespace prefix)
|
|
42440
|
+
* @param {string} expectedLocalName - The expected local name without prefix
|
|
42441
|
+
* @returns {boolean} True if the element name matches (with or without prefix)
|
|
42442
|
+
*
|
|
42443
|
+
* @example
|
|
42444
|
+
* // Exact match without prefix
|
|
42445
|
+
* _matchesElementName('Properties', 'Properties') // => true
|
|
42446
|
+
*
|
|
42447
|
+
* @example
|
|
42448
|
+
* // Match with namespace prefix
|
|
42449
|
+
* _matchesElementName('op:Properties', 'Properties') // => true
|
|
42450
|
+
* _matchesElementName('custom:property', 'property') // => true
|
|
42451
|
+
*
|
|
42452
|
+
* @example
|
|
42453
|
+
* // No match
|
|
42454
|
+
* _matchesElementName('SomeOtherElement', 'Properties') // => false
|
|
42455
|
+
* _matchesElementName(':Properties', 'Properties') // => false (empty prefix)
|
|
42456
|
+
*/
|
|
42457
|
+
static _matchesElementName(elementName, expectedLocalName) {
|
|
42458
|
+
if (!elementName || typeof elementName !== "string") return false;
|
|
42459
|
+
if (!expectedLocalName) return false;
|
|
42460
|
+
if (elementName === expectedLocalName) return true;
|
|
42461
|
+
if (elementName.endsWith(`:${expectedLocalName}`)) {
|
|
42462
|
+
const prefix = elementName.slice(0, -(expectedLocalName.length + 1));
|
|
42463
|
+
return prefix.length > 0;
|
|
42464
|
+
}
|
|
42465
|
+
return false;
|
|
42466
|
+
}
|
|
42467
|
+
/**
|
|
42468
|
+
* Generic method to get a stored custom property from docx.
|
|
42469
|
+
* Supports both standard and custom namespace prefixes (e.g., 'op:Properties', 'custom:property').
|
|
42470
|
+
*
|
|
42435
42471
|
* @static
|
|
42436
42472
|
* @param {Array} docx - Array of docx file objects
|
|
42437
42473
|
* @param {string} propertyName - Name of the property to retrieve
|
|
42438
42474
|
* @returns {string|null} The property value or null if not found
|
|
42475
|
+
*
|
|
42476
|
+
* Returns null in the following cases:
|
|
42477
|
+
* - docx array is empty or doesn't contain 'docProps/custom.xml'
|
|
42478
|
+
* - custom.xml cannot be parsed
|
|
42479
|
+
* - Properties element is not found (with or without namespace prefix)
|
|
42480
|
+
* - Property with the specified name is not found
|
|
42481
|
+
* - Property has malformed structure (missing nested elements or text)
|
|
42482
|
+
* - Any error occurs during parsing or retrieval
|
|
42483
|
+
*
|
|
42484
|
+
* @example
|
|
42485
|
+
* // Standard property without namespace prefix
|
|
42486
|
+
* const version = SuperConverter.getStoredCustomProperty(docx, 'SuperdocVersion');
|
|
42487
|
+
* // => '1.2.3'
|
|
42488
|
+
*
|
|
42489
|
+
* @example
|
|
42490
|
+
* // Property with namespace prefix (e.g., from Office 365)
|
|
42491
|
+
* const guid = SuperConverter.getStoredCustomProperty(docx, 'DocumentGuid');
|
|
42492
|
+
* // Works with both 'Properties' and 'op:Properties' elements
|
|
42493
|
+
* // => 'abc-123-def-456'
|
|
42494
|
+
*
|
|
42495
|
+
* @example
|
|
42496
|
+
* // Non-existent property
|
|
42497
|
+
* const missing = SuperConverter.getStoredCustomProperty(docx, 'NonExistent');
|
|
42498
|
+
* // => null
|
|
42439
42499
|
*/
|
|
42440
42500
|
static getStoredCustomProperty(docx, propertyName) {
|
|
42441
42501
|
try {
|
|
@@ -42444,10 +42504,16 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42444
42504
|
const converter = new _SuperConverter();
|
|
42445
42505
|
const content = customXml.content;
|
|
42446
42506
|
const contentJson = converter.parseXmlToJson(content);
|
|
42447
|
-
const properties = contentJson
|
|
42448
|
-
if (!properties
|
|
42449
|
-
const property = properties.elements.find(
|
|
42507
|
+
const properties = contentJson?.elements?.find((el) => _SuperConverter._matchesElementName(el.name, "Properties"));
|
|
42508
|
+
if (!properties?.elements) return null;
|
|
42509
|
+
const property = properties.elements.find(
|
|
42510
|
+
(el) => _SuperConverter._matchesElementName(el.name, "property") && el.attributes?.name === propertyName
|
|
42511
|
+
);
|
|
42450
42512
|
if (!property) return null;
|
|
42513
|
+
if (!property.elements?.[0]?.elements?.[0]?.text) {
|
|
42514
|
+
console.warn(`Malformed property structure for "${propertyName}"`);
|
|
42515
|
+
return null;
|
|
42516
|
+
}
|
|
42451
42517
|
return property.elements[0].elements[0].text;
|
|
42452
42518
|
} catch (e) {
|
|
42453
42519
|
console.warn(`Error getting custom property ${propertyName}:`, e);
|
|
@@ -42455,60 +42521,112 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42455
42521
|
}
|
|
42456
42522
|
}
|
|
42457
42523
|
/**
|
|
42458
|
-
* Generic method to set a stored custom property in docx
|
|
42524
|
+
* Generic method to set a stored custom property in docx.
|
|
42525
|
+
* Supports both standard and custom namespace prefixes (e.g., 'op:Properties', 'custom:property').
|
|
42526
|
+
*
|
|
42459
42527
|
* @static
|
|
42460
|
-
* @param {Object} docx - The docx object to store the property in
|
|
42528
|
+
* @param {Object} docx - The docx object to store the property in (converted XML structure)
|
|
42461
42529
|
* @param {string} propertyName - Name of the property
|
|
42462
42530
|
* @param {string|Function} value - Value or function that returns the value
|
|
42463
42531
|
* @param {boolean} preserveExisting - If true, won't overwrite existing values
|
|
42464
|
-
* @returns {string} The stored value
|
|
42532
|
+
* @returns {string|null} The stored value, or null if Properties element is not found
|
|
42533
|
+
*
|
|
42534
|
+
* @throws {Error} If an error occurs during property setting (logged as warning)
|
|
42535
|
+
*
|
|
42536
|
+
* @example
|
|
42537
|
+
* // Set a new property
|
|
42538
|
+
* const value = SuperConverter.setStoredCustomProperty(docx, 'MyProperty', 'MyValue');
|
|
42539
|
+
* // => 'MyValue'
|
|
42540
|
+
*
|
|
42541
|
+
* @example
|
|
42542
|
+
* // Set a property with a function
|
|
42543
|
+
* const guid = SuperConverter.setStoredCustomProperty(docx, 'DocumentGuid', () => uuidv4());
|
|
42544
|
+
* // => 'abc-123-def-456'
|
|
42545
|
+
*
|
|
42546
|
+
* @example
|
|
42547
|
+
* // Preserve existing value
|
|
42548
|
+
* SuperConverter.setStoredCustomProperty(docx, 'MyProperty', 'NewValue', true);
|
|
42549
|
+
* // => 'MyValue' (original value preserved)
|
|
42550
|
+
*
|
|
42551
|
+
* @example
|
|
42552
|
+
* // Works with namespace prefixes
|
|
42553
|
+
* // If docx has 'op:Properties' and 'op:property' elements, this will handle them correctly
|
|
42554
|
+
* const version = SuperConverter.setStoredCustomProperty(docx, 'Version', '2.0.0');
|
|
42555
|
+
* // => '2.0.0'
|
|
42465
42556
|
*/
|
|
42466
42557
|
static setStoredCustomProperty(docx, propertyName, value, preserveExisting = false) {
|
|
42467
|
-
|
|
42468
|
-
|
|
42469
|
-
|
|
42470
|
-
|
|
42471
|
-
|
|
42472
|
-
|
|
42473
|
-
|
|
42474
|
-
|
|
42475
|
-
|
|
42476
|
-
|
|
42477
|
-
|
|
42478
|
-
|
|
42479
|
-
|
|
42480
|
-
|
|
42481
|
-
|
|
42482
|
-
|
|
42483
|
-
|
|
42484
|
-
|
|
42485
|
-
|
|
42486
|
-
|
|
42487
|
-
|
|
42488
|
-
|
|
42489
|
-
|
|
42490
|
-
|
|
42491
|
-
|
|
42492
|
-
name:
|
|
42493
|
-
|
|
42494
|
-
|
|
42495
|
-
|
|
42496
|
-
|
|
42497
|
-
|
|
42498
|
-
|
|
42499
|
-
|
|
42500
|
-
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42504
|
-
|
|
42558
|
+
try {
|
|
42559
|
+
const customLocation = "docProps/custom.xml";
|
|
42560
|
+
if (!docx[customLocation]) docx[customLocation] = generateCustomXml();
|
|
42561
|
+
const customXml = docx[customLocation];
|
|
42562
|
+
const properties = customXml.elements?.find((el) => _SuperConverter._matchesElementName(el.name, "Properties"));
|
|
42563
|
+
if (!properties) return null;
|
|
42564
|
+
if (!properties.elements) properties.elements = [];
|
|
42565
|
+
let property = properties.elements.find(
|
|
42566
|
+
(el) => _SuperConverter._matchesElementName(el.name, "property") && el.attributes?.name === propertyName
|
|
42567
|
+
);
|
|
42568
|
+
if (property && preserveExisting) {
|
|
42569
|
+
if (!property.elements?.[0]?.elements?.[0]?.text) {
|
|
42570
|
+
console.warn(`Malformed existing property structure for "${propertyName}"`);
|
|
42571
|
+
return null;
|
|
42572
|
+
}
|
|
42573
|
+
return property.elements[0].elements[0].text;
|
|
42574
|
+
}
|
|
42575
|
+
const finalValue = typeof value === "function" ? value() : value;
|
|
42576
|
+
if (!property) {
|
|
42577
|
+
const existingPids = properties.elements.filter((el) => el.attributes?.pid).map((el) => parseInt(el.attributes.pid, 10)).filter(Number.isInteger);
|
|
42578
|
+
const pid = existingPids.length > 0 ? Math.max(...existingPids) + 1 : 2;
|
|
42579
|
+
property = {
|
|
42580
|
+
type: "element",
|
|
42581
|
+
name: "property",
|
|
42582
|
+
attributes: {
|
|
42583
|
+
name: propertyName,
|
|
42584
|
+
fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
|
|
42585
|
+
pid
|
|
42586
|
+
},
|
|
42587
|
+
elements: [
|
|
42588
|
+
{
|
|
42589
|
+
type: "element",
|
|
42590
|
+
name: "vt:lpwstr",
|
|
42591
|
+
elements: [
|
|
42592
|
+
{
|
|
42593
|
+
type: "text",
|
|
42594
|
+
text: finalValue
|
|
42595
|
+
}
|
|
42596
|
+
]
|
|
42597
|
+
}
|
|
42598
|
+
]
|
|
42599
|
+
};
|
|
42600
|
+
properties.elements.push(property);
|
|
42601
|
+
} else {
|
|
42602
|
+
if (!property.elements?.[0]?.elements?.[0]) {
|
|
42603
|
+
console.warn(`Malformed property structure for "${propertyName}", recreating structure`);
|
|
42604
|
+
property.elements = [
|
|
42605
|
+
{
|
|
42606
|
+
type: "element",
|
|
42607
|
+
name: "vt:lpwstr",
|
|
42608
|
+
elements: [
|
|
42609
|
+
{
|
|
42610
|
+
type: "text",
|
|
42611
|
+
text: finalValue
|
|
42612
|
+
}
|
|
42613
|
+
]
|
|
42614
|
+
}
|
|
42615
|
+
];
|
|
42616
|
+
} else {
|
|
42617
|
+
property.elements[0].elements[0].text = finalValue;
|
|
42618
|
+
}
|
|
42619
|
+
}
|
|
42620
|
+
return finalValue;
|
|
42621
|
+
} catch (e) {
|
|
42622
|
+
console.warn(`Error setting custom property ${propertyName}:`, e);
|
|
42623
|
+
return null;
|
|
42505
42624
|
}
|
|
42506
|
-
return finalValue;
|
|
42507
42625
|
}
|
|
42508
42626
|
static getStoredSuperdocVersion(docx) {
|
|
42509
42627
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42510
42628
|
}
|
|
42511
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.
|
|
42629
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.62") {
|
|
42512
42630
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
42513
42631
|
}
|
|
42514
42632
|
/**
|
|
@@ -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-Bo9KIIo_.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
|
}
|