@harbour-enterprises/superdoc 1.0.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-DJ7BWUbW.cjs → PdfViewer-C3_5zd7y.cjs} +2 -2
- package/dist/chunks/{PdfViewer-BfEwF25T.es.js → PdfViewer-OoqzzuS4.es.js} +2 -2
- package/dist/chunks/{eventemitter3-ByBH0NYV.es.js → eventemitter3-CcXAdeql.es.js} +1 -1
- package/dist/chunks/{eventemitter3-CFCpOk3d.cjs → eventemitter3-DQmQUge-.cjs} +1 -1
- package/dist/chunks/{index-BCZ82zY5.es.js → index-BwFit1xu.es.js} +112 -41
- package/dist/chunks/{index-DJrRlj1_-HA-nVwDO.es.js → index-CDIpuWy0-DcqcEnVR.es.js} +1 -1
- package/dist/chunks/{index-DJrRlj1_-E5dmStMF.cjs → index-CDIpuWy0-v1ZRfNmH.cjs} +1 -1
- package/dist/chunks/{index-DMwWcmrk.cjs → index-CVDEHD5c.cjs} +112 -41
- package/dist/chunks/{jszip-BwsONqK5.es.js → jszip-5vvIqAEE.es.js} +1 -1
- package/dist/chunks/{jszip-B99MTu59.cjs → jszip-BdEez1WM.cjs} +1 -1
- package/dist/chunks/{super-editor.es-Bo_fWMy6.cjs → super-editor.es-CWr0w1Tk.cjs} +37747 -20889
- package/dist/chunks/{super-editor.es-MRWI4sfo.es.js → super-editor.es-Ddl20DOa.es.js} +37747 -20889
- package/dist/chunks/{vue-CztqUvm1.es.js → vue-Dysv_7z5.es.js} +101 -12
- package/dist/chunks/{vue-ARQSyfaw.cjs → vue-jWLMl8Ts.cjs} +89 -0
- package/dist/chunks/xml-js-ClO_jHnq.es.js +2 -0
- package/dist/chunks/xml-js-Dz51sEbr.cjs +3 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
- package/dist/packages/superdoc/src/composables/use-document.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +2 -2
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts +11 -0
- package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +66 -3
- 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 +90 -51
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CflxlFnM.js → converter-CuIVo-Y-.js} +7295 -811
- package/dist/super-editor/chunks/{docx-zipper-DKWL4mo2.js → docx-zipper-D24ieyrf.js} +15 -11
- package/dist/super-editor/chunks/{editor-B9V7oJbW.js → editor-DyocbwIp.js} +18722 -8867
- package/dist/super-editor/chunks/{index-DJrRlj1_.js → index-CDIpuWy0.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-B5WlPN4s.js → toolbar-WQTQjgeN.js} +36 -22
- 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 +2 -2
- package/dist/super-editor/style.css +57 -18
- package/dist/super-editor/super-editor.es.js +1025 -226
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +4 -4
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +37527 -20522
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-BZPSMmVo.es.js +0 -2
- package/dist/chunks/xml-js-DQa4Ye5C.cjs +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1,
|
|
1
|
+
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-CuIVo-Y-.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
|
}
|
|
@@ -2385,19 +2385,24 @@ class DocxZipper {
|
|
|
2385
2385
|
const u8 = await zipEntry.async("uint8array");
|
|
2386
2386
|
const content = ensureXmlString(u8);
|
|
2387
2387
|
this.files.push({ name, content });
|
|
2388
|
-
} else if (name.startsWith("word/media") && name !== "word/media/" || zipEntry.name.startsWith("media") && zipEntry.name !== "media/" || name.startsWith("media") && name !== "media/") {
|
|
2388
|
+
} else if (name.startsWith("word/media") && name !== "word/media/" || zipEntry.name.startsWith("media") && zipEntry.name !== "media/" || name.startsWith("media") && name !== "media/" || name.startsWith("word/embeddings") && name !== "word/embeddings/") {
|
|
2389
2389
|
if (isNode) {
|
|
2390
2390
|
const buffer = await zipEntry.async("nodebuffer");
|
|
2391
2391
|
const fileBase64 = buffer.toString("base64");
|
|
2392
2392
|
this.mediaFiles[name] = fileBase64;
|
|
2393
2393
|
} else {
|
|
2394
|
-
const blob = await zipEntry.async("blob");
|
|
2395
|
-
const extension = this.getFileExtension(name);
|
|
2396
2394
|
const fileBase64 = await zipEntry.async("base64");
|
|
2397
|
-
this.
|
|
2398
|
-
const
|
|
2399
|
-
|
|
2400
|
-
|
|
2395
|
+
const extension = this.getFileExtension(name)?.toLowerCase();
|
|
2396
|
+
const imageTypes = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "bmp", "tiff", "emf", "wmf", "svg", "webp"]);
|
|
2397
|
+
if (imageTypes.has(extension)) {
|
|
2398
|
+
this.mediaFiles[name] = `data:image/${extension};base64,${fileBase64}`;
|
|
2399
|
+
const blob = await zipEntry.async("blob");
|
|
2400
|
+
const fileObj = new File([blob], name, { type: blob.type });
|
|
2401
|
+
const imageUrl = URL.createObjectURL(fileObj);
|
|
2402
|
+
this.media[name] = imageUrl;
|
|
2403
|
+
} else {
|
|
2404
|
+
this.mediaFiles[name] = fileBase64;
|
|
2405
|
+
}
|
|
2401
2406
|
}
|
|
2402
2407
|
} else if (name.startsWith("word/fonts") && name !== "word/fonts/") {
|
|
2403
2408
|
const uint8array = await zipEntry.async("uint8array");
|
|
@@ -2416,9 +2421,8 @@ class DocxZipper {
|
|
|
2416
2421
|
*/
|
|
2417
2422
|
async updateContentTypes(docx, media, fromJson, updatedDocs = {}) {
|
|
2418
2423
|
const additionalPartNames = Object.keys(updatedDocs || {});
|
|
2419
|
-
const
|
|
2420
|
-
|
|
2421
|
-
}).filter(Boolean);
|
|
2424
|
+
const imageExts = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "bmp", "tiff", "emf", "wmf", "svg", "webp"]);
|
|
2425
|
+
const newMediaTypes = Object.keys(media).map((name) => this.getFileExtension(name)).filter((ext) => ext && imageExts.has(ext));
|
|
2422
2426
|
const contentTypesPath = "[Content_Types].xml";
|
|
2423
2427
|
let contentTypesXml;
|
|
2424
2428
|
if (fromJson) {
|