@harbour-enterprises/superdoc 0.26.0 → 0.27.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.
Files changed (35) hide show
  1. package/dist/chunks/{PdfViewer-CqvKvsyF.es.js → PdfViewer-BYzQ-Z8r.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-CrhOgpnE.cjs → PdfViewer-CaR2rmuW.cjs} +1 -1
  3. package/dist/chunks/{index-DOcW6GE6.es.js → index-DATrA3lt.es.js} +3 -3
  4. package/dist/chunks/{index-DoYL2HX3.cjs → index-EIErxDyE.cjs} +3 -3
  5. package/dist/chunks/{super-editor.es-CMlOhpVU.cjs → super-editor.es-DXEbSokY.cjs} +3365 -794
  6. package/dist/chunks/{super-editor.es-DHf3YrSR.es.js → super-editor.es-DtgJu0CH.es.js} +3360 -789
  7. package/dist/core/types/index.d.ts.map +1 -1
  8. package/dist/style.css +9 -0
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-Ceppmafv.js → converter-BupPKWvT.js} +238 -7
  11. package/dist/super-editor/chunks/{docx-zipper-WM-MgP-0.js → docx-zipper-B_zB1qvo.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-DLSIAlHn.js → editor-ByRd7RN8.js} +2557 -217
  13. package/dist/super-editor/chunks/{toolbar-C-kgsiMl.js → toolbar-BOxA8SfG.js} +2 -2
  14. package/dist/super-editor/converter.es.js +1 -1
  15. package/dist/super-editor/docx-zipper.es.js +2 -2
  16. package/dist/super-editor/editor.es.js +3 -3
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/style.css +9 -0
  19. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts +6 -0
  20. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/encode-image-node-helpers.d.ts +14 -0
  21. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/wp/helpers/vector-shape-helpers.d.ts +38 -0
  22. package/dist/super-editor/super-editor/src/extensions/index.d.ts +2 -1
  23. package/dist/super-editor/super-editor/src/extensions/tab/helpers/tabDecorations.d.ts +4 -3
  24. package/dist/super-editor/super-editor/src/extensions/vector-shape/VectorShapeView.d.ts +27 -0
  25. package/dist/super-editor/super-editor/src/extensions/vector-shape/index.d.ts +1 -0
  26. package/dist/super-editor/super-editor/src/extensions/vector-shape/vector-shape.d.ts +2 -0
  27. package/dist/super-editor/super-editor.es.js +6 -6
  28. package/dist/super-editor/toolbar.es.js +2 -2
  29. package/dist/super-editor.cjs +1 -1
  30. package/dist/super-editor.es.js +1 -1
  31. package/dist/superdoc.cjs +2 -2
  32. package/dist/superdoc.es.js +2 -2
  33. package/dist/superdoc.umd.js +3440 -869
  34. package/dist/superdoc.umd.js.map +1 -1
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;YACN,MAAM,GAAG,IAAI;;;;;;;;;cAKb,OAAO;;;;iBACP,MAAM;;;;eACN,MAAM;;;;sBACN,MAAM;;;;;;SAKN,MAAM;;;;UACN,MAAM;;;;WACN,IAAI,GAAG,IAAI,GAAG,IAAI;;;;WAClB,MAAM;;;;UACN,MAAM;;;;gBACN,OAAO;;;;WACP,OAAO,KAAK,EAAE,GAAG;;;;eACjB,OAAO,sBAAsB,EAAE,kBAAkB;;;;;;eAM5D;QAQqC,kBAAkB,GAR5C,CAAC,MAAM,EAAE;YAClB,UAAU,EAAE,MAAM,CAAC;YACnB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,UAAU,CAAC,EAAE,OAAO,CAAC;YACrB,OAAO,CAAC,EAAE,MAAS,IAAI,CAAC;YACxB,aAAa,CAAC,EAAE,MAAS,IAAI,CAAC;YAC9B,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC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KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI;;;;2BAClC,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;;;;8BACzC,CAAC,MAAM,EAAE,EAAE,KAAC,GAAA;;;;aACZ,MAAM;;;;uBACN,KAAQ;;;;iBACR,OAAO;;;;YACP,MAAM;;;;oBACN,KAAQ;;;;eACR,OAAO;;;;wBACP,CAAS,IAAI,EAAJ,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;;;;eAC/B,IAAI;;;;aACJ,OAAO;;;;gCACP,OAAO;;;;;;;;yBAEP,OAAO;;;;WACP,MAAM;;;;eACN,MAAM;;;;cACN,OAAO"}
package/dist/style.css CHANGED
@@ -1569,6 +1569,15 @@ on the right if it is inside shape textbox.
1569
1569
  .ProseMirror.view-mode .sd-structured-content-draggable {
1570
1570
  display: none;
1571
1571
  }
1572
+ .sd-vector-shape {
1573
+ display: inline-block;
1574
+ vertical-align: bottom;
1575
+ }
1576
+ .sd-vector-shape svg {
1577
+ width: 100%;
1578
+ height: 100%;
1579
+ display: block;
1580
+ }
1572
1581
 
1573
1582
  .alignment-buttons[data-v-d84f57b6] {
1574
1583
  display: flex;
@@ -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-Ceppmafv.js";
3
- import { _ as _export_sfc } from "./chunks/editor-DLSIAlHn.js";
2
+ import { T as TextSelection } from "./chunks/converter-BupPKWvT.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-ByRd7RN8.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 = {}) {
@@ -28846,7 +28846,167 @@ function sdtNodeTypeStrategy(node) {
28846
28846
  }
28847
28847
  return { type: "unknown", handler: null };
28848
28848
  }
28849
+ function getThemeColor(name) {
28850
+ const colors = {
28851
+ accent1: "#5b9bd5",
28852
+ accent2: "#ed7d31",
28853
+ accent3: "#a5a5a5",
28854
+ accent4: "#ffc000",
28855
+ accent5: "#4472c4",
28856
+ accent6: "#70ad47",
28857
+ dk1: "#000000",
28858
+ lt1: "#ffffff",
28859
+ dk2: "#1f497d",
28860
+ lt2: "#eeece1",
28861
+ text1: "#000000",
28862
+ text2: "#1f497d",
28863
+ background1: "#ffffff",
28864
+ background2: "#eeece1"
28865
+ };
28866
+ return colors[name] ?? "#000000";
28867
+ }
28868
+ function applyColorModifier(hexColor, modifier, value) {
28869
+ const r = parseInt(hexColor.slice(1, 3), 16);
28870
+ const g = parseInt(hexColor.slice(3, 5), 16);
28871
+ const b2 = parseInt(hexColor.slice(5, 7), 16);
28872
+ const percent = parseInt(value) / 1e5;
28873
+ let newR, newG, newB;
28874
+ if (modifier === "shade" || modifier === "lumMod") {
28875
+ newR = r * percent;
28876
+ newG = g * percent;
28877
+ newB = b2 * percent;
28878
+ } else if (modifier === "tint") {
28879
+ newR = r + (255 - r) * (1 - percent);
28880
+ newG = g + (255 - g) * (1 - percent);
28881
+ newB = b2 + (255 - b2) * (1 - percent);
28882
+ } else if (modifier === "lumOff") {
28883
+ const offset = 255 * percent;
28884
+ newR = r + offset;
28885
+ newG = g + offset;
28886
+ newB = b2 + offset;
28887
+ } else {
28888
+ return hexColor;
28889
+ }
28890
+ const clamp = (n) => Math.max(0, Math.min(255, Math.round(n)));
28891
+ const toHex = (n) => n.toString(16).padStart(2, "0");
28892
+ newR = clamp(newR);
28893
+ newG = clamp(newG);
28894
+ newB = clamp(newB);
28895
+ const result = `#${toHex(newR)}${toHex(newG)}${toHex(newB)}`;
28896
+ return result;
28897
+ }
28898
+ function extractStrokeWidth(spPr) {
28899
+ const ln = spPr?.elements?.find((el) => el.name === "a:ln");
28900
+ const w2 = ln?.attributes?.["w"];
28901
+ return w2 ? emuToPixels(w2) : 1;
28902
+ }
28903
+ function extractStrokeColor(spPr, style) {
28904
+ const ln = spPr?.elements?.find((el) => el.name === "a:ln");
28905
+ if (ln) {
28906
+ const noFill = ln.elements?.find((el) => el.name === "a:noFill");
28907
+ if (noFill) return null;
28908
+ const solidFill = ln.elements?.find((el) => el.name === "a:solidFill");
28909
+ if (solidFill) {
28910
+ const schemeClr2 = solidFill.elements?.find((el) => el.name === "a:schemeClr");
28911
+ if (schemeClr2) {
28912
+ const themeName2 = schemeClr2.attributes?.["val"];
28913
+ let color2 = getThemeColor(themeName2);
28914
+ const modifiers2 = schemeClr2.elements || [];
28915
+ modifiers2.forEach((mod) => {
28916
+ if (mod.name === "a:shade") {
28917
+ color2 = applyColorModifier(color2, "shade", mod.attributes["val"]);
28918
+ } else if (mod.name === "a:tint") {
28919
+ color2 = applyColorModifier(color2, "tint", mod.attributes["val"]);
28920
+ } else if (mod.name === "a:lumMod") {
28921
+ color2 = applyColorModifier(color2, "lumMod", mod.attributes["val"]);
28922
+ }
28923
+ });
28924
+ return color2;
28925
+ }
28926
+ const srgbClr = solidFill.elements?.find((el) => el.name === "a:srgbClr");
28927
+ if (srgbClr) {
28928
+ return "#" + srgbClr.attributes?.["val"];
28929
+ }
28930
+ }
28931
+ }
28932
+ if (!style) return "#000000";
28933
+ const lnRef = style.elements?.find((el) => el.name === "a:lnRef");
28934
+ if (!lnRef) return "#000000";
28935
+ const schemeClr = lnRef.elements?.find((el) => el.name === "a:schemeClr");
28936
+ if (!schemeClr) return "#000000";
28937
+ const themeName = schemeClr.attributes?.["val"];
28938
+ let color = getThemeColor(themeName);
28939
+ const modifiers = schemeClr.elements || [];
28940
+ modifiers.forEach((mod) => {
28941
+ if (mod.name === "a:shade") {
28942
+ color = applyColorModifier(color, "shade", mod.attributes["val"]);
28943
+ } else if (mod.name === "a:tint") {
28944
+ color = applyColorModifier(color, "tint", mod.attributes["val"]);
28945
+ } else if (mod.name === "a:lumMod") {
28946
+ color = applyColorModifier(color, "lumMod", mod.attributes["val"]);
28947
+ } else if (mod.name === "a:lumOff") {
28948
+ color = applyColorModifier(color, "lumOff", mod.attributes["val"]);
28949
+ }
28950
+ });
28951
+ return color;
28952
+ }
28953
+ function extractFillColor(spPr, style) {
28954
+ const noFill = spPr?.elements?.find((el) => el.name === "a:noFill");
28955
+ if (noFill) return null;
28956
+ const solidFill = spPr?.elements?.find((el) => el.name === "a:solidFill");
28957
+ if (solidFill) {
28958
+ const schemeClr2 = solidFill.elements?.find((el) => el.name === "a:schemeClr");
28959
+ if (schemeClr2) {
28960
+ const themeName2 = schemeClr2.attributes?.["val"];
28961
+ let color2 = getThemeColor(themeName2);
28962
+ const modifiers2 = schemeClr2.elements || [];
28963
+ modifiers2.forEach((mod) => {
28964
+ if (mod.name === "a:shade") {
28965
+ color2 = applyColorModifier(color2, "shade", mod.attributes["val"]);
28966
+ } else if (mod.name === "a:tint") {
28967
+ color2 = applyColorModifier(color2, "tint", mod.attributes["val"]);
28968
+ } else if (mod.name === "a:lumMod") {
28969
+ color2 = applyColorModifier(color2, "lumMod", mod.attributes["val"]);
28970
+ } else if (mod.name === "a:lumOff") {
28971
+ color2 = applyColorModifier(color2, "lumOff", mod.attributes["val"]);
28972
+ }
28973
+ });
28974
+ return color2;
28975
+ }
28976
+ const srgbClr = solidFill.elements?.find((el) => el.name === "a:srgbClr");
28977
+ if (srgbClr) {
28978
+ return "#" + srgbClr.attributes?.["val"];
28979
+ }
28980
+ }
28981
+ const gradFill = spPr?.elements?.find((el) => el.name === "a:gradFill");
28982
+ if (gradFill) {
28983
+ return "#cccccc";
28984
+ }
28985
+ const blipFill = spPr?.elements?.find((el) => el.name === "a:blipFill");
28986
+ if (blipFill) {
28987
+ return "#cccccc";
28988
+ }
28989
+ if (!style) return "#5b9bd5";
28990
+ const fillRef = style.elements?.find((el) => el.name === "a:fillRef");
28991
+ if (!fillRef) return "#5b9bd5";
28992
+ const schemeClr = fillRef.elements?.find((el) => el.name === "a:schemeClr");
28993
+ if (!schemeClr) return "#5b9bd5";
28994
+ const themeName = schemeClr.attributes?.["val"];
28995
+ let color = getThemeColor(themeName);
28996
+ const modifiers = schemeClr.elements || [];
28997
+ modifiers.forEach((mod) => {
28998
+ if (mod.name === "a:shade") {
28999
+ color = applyColorModifier(color, "shade", mod.attributes["val"]);
29000
+ } else if (mod.name === "a:tint") {
29001
+ color = applyColorModifier(color, "tint", mod.attributes["val"]);
29002
+ } else if (mod.name === "a:lumMod") {
29003
+ color = applyColorModifier(color, "lumMod", mod.attributes["val"]);
29004
+ }
29005
+ });
29006
+ return color;
29007
+ }
28849
29008
  const DRAWING_XML_TAG = "w:drawing";
29009
+ const SHAPE_URI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
28850
29010
  function handleImageNode(node, params, isAnchor) {
28851
29011
  const { docx, filename } = params;
28852
29012
  const { attributes } = node;
@@ -28964,8 +29124,7 @@ function handleImageNode(node, params, isAnchor) {
28964
29124
  const graphic = node.elements.find((el) => el.name === "a:graphic");
28965
29125
  const graphicData = graphic?.elements.find((el) => el.name === "a:graphicData");
28966
29126
  const { uri: uri2 } = graphicData?.attributes || {};
28967
- const shapeURI = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
28968
- if (!!uri2 && uri2 === shapeURI) {
29127
+ if (!!uri2 && uri2 === SHAPE_URI) {
28969
29128
  const shapeMarginOffset = {
28970
29129
  left: positionHValue,
28971
29130
  horizontal: positionHValue,
@@ -29049,9 +29208,14 @@ const handleShapeDrawing = (params, node, graphicData, size, padding, marginOffs
29049
29208
  node.elements.find((el) => el.name === "wp:docPr");
29050
29209
  const spPr = wsp.elements.find((el) => el.name === "wps:spPr");
29051
29210
  const prstGeom = spPr?.elements.find((el) => el.name === "a:prstGeom");
29052
- if (!!prstGeom && prstGeom.attributes["prst"] === "rect" && !textBoxContent) {
29211
+ const shapeType = prstGeom?.attributes["prst"];
29212
+ if (shapeType === "rect" && !textBoxContent) {
29053
29213
  return getRectangleShape(params, spPr);
29054
29214
  }
29215
+ if (shapeType && !textBoxContent) {
29216
+ const result = getVectorShape({ params, node, graphicData });
29217
+ if (result) return result;
29218
+ }
29055
29219
  if (!textBoxContent) {
29056
29220
  return buildShapePlaceholder(node, size, padding, marginOffset, "drawing");
29057
29221
  }
@@ -29130,6 +29294,52 @@ const buildShapePlaceholder = (node, size, padding, marginOffset, shapeType) =>
29130
29294
  attrs
29131
29295
  };
29132
29296
  };
29297
+ function getVectorShape({ params, node, graphicData }) {
29298
+ const schemaAttrs = {};
29299
+ const drawingNode = params.nodes?.[0];
29300
+ if (drawingNode?.name === "w:drawing") {
29301
+ schemaAttrs.drawingContent = drawingNode;
29302
+ }
29303
+ const wsp = graphicData.elements?.find((el) => el.name === "wps:wsp");
29304
+ if (!wsp) {
29305
+ return null;
29306
+ }
29307
+ const spPr = wsp.elements?.find((el) => el.name === "wps:spPr");
29308
+ if (!spPr) {
29309
+ return null;
29310
+ }
29311
+ const prstGeom = spPr.elements?.find((el) => el.name === "a:prstGeom");
29312
+ const shapeKind = prstGeom?.attributes?.["prst"];
29313
+ if (!shapeKind) {
29314
+ console.warn("Shape kind not found");
29315
+ }
29316
+ schemaAttrs.kind = shapeKind;
29317
+ const xfrm = spPr.elements?.find((el) => el.name === "a:xfrm");
29318
+ const extent = xfrm?.elements?.find((el) => el.name === "a:ext");
29319
+ const width = extent?.attributes?.["cx"] ? emuToPixels(extent.attributes["cx"]) : 100;
29320
+ const height = extent?.attributes?.["cy"] ? emuToPixels(extent.attributes["cy"]) : 100;
29321
+ const rotation = xfrm?.attributes?.["rot"] ? rotToDegrees(xfrm.attributes["rot"]) : 0;
29322
+ const flipH = xfrm?.attributes?.["flipH"] === "1";
29323
+ const flipV = xfrm?.attributes?.["flipV"] === "1";
29324
+ const style = wsp.elements?.find((el) => el.name === "wps:style");
29325
+ const fillColor = extractFillColor(spPr, style);
29326
+ const strokeColor = extractStrokeColor(spPr, style);
29327
+ const strokeWidth = extractStrokeWidth(spPr);
29328
+ return {
29329
+ type: "vectorShape",
29330
+ attrs: {
29331
+ ...schemaAttrs,
29332
+ width,
29333
+ height,
29334
+ rotation,
29335
+ flipH,
29336
+ flipV,
29337
+ fillColor,
29338
+ strokeColor,
29339
+ strokeWidth
29340
+ }
29341
+ };
29342
+ }
29133
29343
  function handleAnchorNode(params) {
29134
29344
  const { node } = params.extraParams;
29135
29345
  if (node.name !== "wp:anchor") {
@@ -29414,6 +29624,24 @@ function addNewImageRelationship(params, imagePath) {
29414
29624
  params.relationships.push(newRel);
29415
29625
  return newId;
29416
29626
  }
29627
+ function translateVectorShape(params) {
29628
+ const { node } = params;
29629
+ const { drawingContent } = node.attrs;
29630
+ const drawing = {
29631
+ name: "w:drawing",
29632
+ elements: [...drawingContent ? [...drawingContent.elements || []] : []]
29633
+ };
29634
+ const choice = {
29635
+ name: "mc:Choice",
29636
+ attributes: { Requires: "wps" },
29637
+ elements: [drawing]
29638
+ };
29639
+ const result = {
29640
+ name: "mc:AlternateContent",
29641
+ elements: [choice]
29642
+ };
29643
+ return result;
29644
+ }
29417
29645
  function translateAnchorNode(params) {
29418
29646
  const { attrs } = params.node;
29419
29647
  const anchorElements = [];
@@ -31783,11 +32011,13 @@ function handleVRectImport({ pNode, pict }) {
31783
32011
  schemaAttrs.style = rectStyle;
31784
32012
  }
31785
32013
  const size = {};
32014
+ const isFullWidthHR = rectAttrs["o:hr"] === "t" || rectAttrs["o:hrstd"] === "t";
31786
32015
  if (parsedStyle.width !== void 0) {
31787
- const inlineWidth = parsePointsToPixels(parsedStyle.width);
31788
- size.width = inlineWidth;
31789
- if (rectAttrs["o:hr"] === "t" && !inlineWidth) {
32016
+ if (isFullWidthHR) {
31790
32017
  size.width = "100%";
32018
+ } else {
32019
+ const inlineWidth = parsePointsToPixels(parsedStyle.width);
32020
+ size.width = inlineWidth;
31791
32021
  }
31792
32022
  }
31793
32023
  if (parsedStyle.height !== void 0) {
@@ -34018,6 +34248,7 @@ function exportSchemaToJson(params) {
34018
34248
  shapeContainer: translator,
34019
34249
  shapeTextbox: translator,
34020
34250
  contentBlock: translator,
34251
+ vectorShape: translateVectorShape,
34021
34252
  structuredContent: translator$8,
34022
34253
  structuredContentBlock: translator$8,
34023
34254
  documentPartObject: translator$8,
@@ -35231,7 +35462,7 @@ const _SuperConverter = class _SuperConverter {
35231
35462
  static getStoredSuperdocVersion(docx) {
35232
35463
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35233
35464
  }
35234
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.25.0") {
35465
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.26.0") {
35235
35466
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35236
35467
  }
35237
35468
  /**
@@ -1,4 +1,4 @@
1
- import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-Ceppmafv.js";
1
+ import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-BupPKWvT.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
  }