@bendyline/squisq-formats 2.8.12 → 2.8.14
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/{chunk-D2JA3MLG.js → chunk-BBB7FCK7.js} +1 -1
- package/dist/{chunk-VKLJUHC2.js → chunk-MF4ZQQJ7.js} +5 -5
- package/dist/docx/index.js +1 -1
- package/dist/index.js +3 -3
- package/dist/outside-in/index.js +2 -2
- package/dist/registry/index.js +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-JINVU6QA.js → chunk-KHRX22VW.js} +0 -0
|
@@ -193,6 +193,7 @@ var BULLET_NUM_FORMATS = /* @__PURE__ */ new Set(["bullet", "none"]);
|
|
|
193
193
|
var DEFAULT_FONT = "Calibri";
|
|
194
194
|
var DEFAULT_HEADING_FONT = "Calibri Light";
|
|
195
195
|
var DEFAULT_FONT_SIZE_HALF_POINTS = 22;
|
|
196
|
+
var PARAGRAPH_SPACING_AFTER_TWIPS = 160;
|
|
196
197
|
var DEFAULT_CODE_FONT = "Consolas";
|
|
197
198
|
var DEFAULT_CODE_FONT_SIZE = 20;
|
|
198
199
|
var HEADING_FONT_SIZES = {
|
|
@@ -588,10 +589,9 @@ function convertTableRow(row, ctx, isHeader, align) {
|
|
|
588
589
|
}
|
|
589
590
|
function convertTableCell(cell, ctx, isHeader, align) {
|
|
590
591
|
const runs = convertInlines(cell.children, ctx, bodyFormat(ctx));
|
|
591
|
-
const rPr = isHeader ? "<w:rPr><w:b/></w:rPr>" : "";
|
|
592
592
|
const jcMap = { left: "left", center: "center", right: "right" };
|
|
593
593
|
const jc = align ? `<w:jc w:val="${jcMap[align]}"/>` : "";
|
|
594
|
-
const pPr =
|
|
594
|
+
const pPr = `<w:pPr><w:spacing w:after="0"/>${jc}</w:pPr>`;
|
|
595
595
|
return `<w:tc><w:p>${pPr}${runs}</w:p></w:tc>`;
|
|
596
596
|
}
|
|
597
597
|
function convertThematicBreak() {
|
|
@@ -868,10 +868,10 @@ function buildStylesXml(options, ctx) {
|
|
|
868
868
|
const headingFont = ctx.headingFont;
|
|
869
869
|
const bodyColorXml = ctx.bodyColor ? `<w:color w:val="${ctx.bodyColor}"/>` : "";
|
|
870
870
|
const quoteColor = ctx.mutedColor ?? "404040";
|
|
871
|
-
return xmlDeclaration() + `<w:styles xmlns:w="${NS_WML}"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:ascii="${escapeXml(font)}" w:hAnsi="${escapeXml(font)}" w:eastAsia="${escapeXml(font)}" w:cs="${escapeXml(font)}"/>` + bodyColorXml + `<w:sz w:val="${DEFAULT_FONT_SIZE_HALF_POINTS}"/><w:szCs w:val="${DEFAULT_FONT_SIZE_HALF_POINTS}"/></w:rPr></w:rPrDefault><w:pPrDefault/></w:docDefaults><w:style w:type="paragraph" w:default="1" w:styleId="Normal"><w:name w:val="Normal"/><w:qFormat/>` + (bodyColorXml ? `<w:rPr>${bodyColorXml}</w:rPr>` : "") + `</w:style>` + // Heading styles
|
|
871
|
+
return xmlDeclaration() + `<w:styles xmlns:w="${NS_WML}"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:ascii="${escapeXml(font)}" w:hAnsi="${escapeXml(font)}" w:eastAsia="${escapeXml(font)}" w:cs="${escapeXml(font)}"/>` + bodyColorXml + `<w:sz w:val="${DEFAULT_FONT_SIZE_HALF_POINTS}"/><w:szCs w:val="${DEFAULT_FONT_SIZE_HALF_POINTS}"/></w:rPr></w:rPrDefault><w:pPrDefault><w:pPr><w:spacing w:after="${PARAGRAPH_SPACING_AFTER_TWIPS}"/></w:pPr></w:pPrDefault></w:docDefaults><w:style w:type="paragraph" w:default="1" w:styleId="Normal"><w:name w:val="Normal"/><w:qFormat/>` + (bodyColorXml ? `<w:rPr>${bodyColorXml}</w:rPr>` : "") + `</w:style>` + // Heading styles
|
|
872
872
|
buildHeadingStyles(headingFont, ctx.headingColor) + // Quote style — muted text color from theme.textMuted (falls back
|
|
873
873
|
// to a neutral grey when no theme is supplied).
|
|
874
|
-
`<w:style w:type="paragraph" w:styleId="Quote"><w:name w:val="Quote"/><w:basedOn w:val="Normal"/><w:pPr><w:ind w:left="720"/></w:pPr><w:rPr><w:i/><w:color w:val="${quoteColor}"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Code"><w:name w:val="Code"/><w:basedOn w:val="Normal"/><w:rPr><w:rFonts w:ascii="${DEFAULT_CODE_FONT}" w:hAnsi="${DEFAULT_CODE_FONT}"/><w:sz w:val="${DEFAULT_CODE_FONT_SIZE}"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="ListParagraph"><w:name w:val="List Paragraph"/><w:basedOn w:val="Normal"/><w:pPr><w:ind w:left="720"/></w:pPr></w:style><w:style w:type="character" w:styleId="Hyperlink"><w:name w:val="Hyperlink"/><w:rPr><w:color w:val="${HYPERLINK_COLOR}"/><w:u w:val="single"/></w:rPr></w:style><w:style w:type="character" w:styleId="FootnoteReference"><w:name w:val="footnote reference"/><w:rPr><w:vertAlign w:val="superscript"/></w:rPr></w:style><w:style w:type="table" w:styleId="TableGrid"><w:name w:val="Table Grid"/><w:tblPr><w:tblBorders><w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/></w:tblBorders></w:tblPr></w:style></w:styles>`;
|
|
874
|
+
`<w:style w:type="paragraph" w:styleId="Quote"><w:name w:val="Quote"/><w:basedOn w:val="Normal"/><w:pPr><w:ind w:left="720"/></w:pPr><w:rPr><w:i/><w:color w:val="${quoteColor}"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Code"><w:name w:val="Code"/><w:basedOn w:val="Normal"/><w:pPr><w:contextualSpacing/></w:pPr><w:rPr><w:rFonts w:ascii="${DEFAULT_CODE_FONT}" w:hAnsi="${DEFAULT_CODE_FONT}"/><w:sz w:val="${DEFAULT_CODE_FONT_SIZE}"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="ListParagraph"><w:name w:val="List Paragraph"/><w:basedOn w:val="Normal"/><w:pPr><w:ind w:left="720"/><w:contextualSpacing/></w:pPr></w:style><w:style w:type="character" w:styleId="Hyperlink"><w:name w:val="Hyperlink"/><w:rPr><w:color w:val="${HYPERLINK_COLOR}"/><w:u w:val="single"/></w:rPr></w:style><w:style w:type="character" w:styleId="FootnoteReference"><w:name w:val="footnote reference"/><w:rPr><w:vertAlign w:val="superscript"/></w:rPr></w:style><w:style w:type="table" w:styleId="TableGrid"><w:name w:val="Table Grid"/><w:tblPr><w:tblBorders><w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/><w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/></w:tblBorders></w:tblPr></w:style></w:styles>`;
|
|
875
875
|
}
|
|
876
876
|
function buildHeadingStyles(headingFont, headingColor) {
|
|
877
877
|
let result = "";
|
|
@@ -879,7 +879,7 @@ function buildHeadingStyles(headingFont, headingColor) {
|
|
|
879
879
|
const styleId = DEPTH_TO_STYLE_ID[depth];
|
|
880
880
|
const fontSize = HEADING_FONT_SIZES[depth] ?? 22;
|
|
881
881
|
const colorXml = headingColor ? `<w:color w:val="${headingColor}"/>` : "";
|
|
882
|
-
result += `<w:style w:type="paragraph" w:styleId="${styleId}"><w:name w:val="heading ${depth}"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:qFormat/><w:pPr><w:
|
|
882
|
+
result += `<w:style w:type="paragraph" w:styleId="${styleId}"><w:name w:val="heading ${depth}"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:qFormat/><w:pPr><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="${depth - 1}"/></w:pPr><w:rPr><w:rFonts w:ascii="${escapeXml(headingFont)}" w:hAnsi="${escapeXml(headingFont)}"/><w:b/>` + colorXml + `<w:sz w:val="${fontSize}"/><w:szCs w:val="${fontSize}"/></w:rPr></w:style>`;
|
|
883
883
|
}
|
|
884
884
|
return result;
|
|
885
885
|
}
|
package/dist/docx/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
renderOutsideInDocument,
|
|
30
30
|
withOutsideInMarkdownEditing,
|
|
31
31
|
withOutsideInMetadata
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BBB7FCK7.js";
|
|
33
33
|
import {
|
|
34
34
|
OUTSIDE_IN_FORMAT_IDS,
|
|
35
35
|
OUTSIDE_IN_OUTPUT_TEMPLATE_KEY,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
defaultRegistry,
|
|
46
46
|
prepareConversion,
|
|
47
47
|
resolveConversionLimits
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-KHRX22VW.js";
|
|
49
49
|
import {
|
|
50
50
|
ConversionError
|
|
51
51
|
} from "./chunk-KXOZMWBS.js";
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
docxToDoc,
|
|
55
55
|
docxToMarkdownDoc,
|
|
56
56
|
markdownDocToDocx
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-MF4ZQQJ7.js";
|
|
58
58
|
import {
|
|
59
59
|
docToPptx,
|
|
60
60
|
markdownDocToPptx,
|
package/dist/outside-in/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
renderOutsideInDocument,
|
|
8
8
|
withOutsideInMarkdownEditing,
|
|
9
9
|
withOutsideInMetadata
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-BBB7FCK7.js";
|
|
11
11
|
import {
|
|
12
12
|
OUTSIDE_IN_FORMAT_IDS,
|
|
13
13
|
OUTSIDE_IN_OUTPUT_TEMPLATE_KEY,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isOutsideInTargetPath,
|
|
16
16
|
resolveOutsideInLayout
|
|
17
17
|
} from "../chunk-WJTC5OD6.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-KHRX22VW.js";
|
|
19
19
|
import "../chunk-KXOZMWBS.js";
|
|
20
20
|
import "../chunk-7AWFHP5U.js";
|
|
21
21
|
export {
|
package/dist/registry/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-formats",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.14",
|
|
4
4
|
"description": "Document format converters — DOCX, PDF, OOXML import/export",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"typecheck": "tsc --noEmit"
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@bendyline/squisq": "2.13.
|
|
138
|
+
"@bendyline/squisq": "2.13.12",
|
|
139
139
|
"@pdf-lib/fontkit": "1.1.1",
|
|
140
140
|
"@pdf-lib/upng": "1.0.1",
|
|
141
141
|
"@xmldom/xmldom": "0.9.12",
|
|
File without changes
|