@bendyline/squisq-formats 2.8.15 → 2.8.16
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/README.md +1 -1
- package/THIRD_PARTY_LICENSES.txt +369 -0
- package/dist/{chunk-BBB7FCK7.js → chunk-KZUP6TIV.js} +1 -1
- package/dist/{chunk-NQNIFIDP.js → chunk-NNNHOTVM.js} +174 -53
- package/dist/{chunk-S5VXWSRR.js → chunk-SWLDHEZI.js} +13 -7
- package/dist/cjkFontData.generated-LJKMYRHP.js +16 -0
- package/dist/emojiFontData.generated-EPQOUGVZ.js +16 -0
- package/dist/hangulFontData.generated-CVLPZH2N.js +16 -0
- package/dist/index.js +4 -4
- package/dist/outside-in/index.js +2 -2
- package/dist/pdf/index.d.ts +37 -17
- package/dist/pdf/index.js +1 -1
- package/dist/pptx/index.js +1 -1
- package/dist/registry/index.js +1 -1
- package/package.json +6 -3
- /package/dist/{chunk-KHRX22VW.js → chunk-LSUMEIQ7.js} +0 -0
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-KZUP6TIV.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-LSUMEIQ7.js";
|
|
49
49
|
import {
|
|
50
50
|
ConversionError
|
|
51
51
|
} from "./chunk-KXOZMWBS.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
markdownDocToPptx,
|
|
61
61
|
pptxToDoc,
|
|
62
62
|
pptxToMarkdownDoc
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-SWLDHEZI.js";
|
|
64
64
|
import "./chunk-6N2J7C2B.js";
|
|
65
65
|
import "./chunk-WMIDXNGR.js";
|
|
66
66
|
import "./chunk-DHAK4PII.js";
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
markdownDocToPdf,
|
|
97
97
|
pdfToDoc,
|
|
98
98
|
pdfToMarkdownDoc
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-NNNHOTVM.js";
|
|
100
100
|
import "./chunk-34KECNZO.js";
|
|
101
101
|
import "./chunk-DTJQK7U7.js";
|
|
102
102
|
import "./chunk-IIQYS2YH.js";
|
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-KZUP6TIV.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-LSUMEIQ7.js";
|
|
19
19
|
import "../chunk-KXOZMWBS.js";
|
|
20
20
|
import "../chunk-7AWFHP5U.js";
|
|
21
21
|
export {
|
package/dist/pdf/index.d.ts
CHANGED
|
@@ -6,30 +6,47 @@ import { ContentContainer } from '@bendyline/squisq/storage';
|
|
|
6
6
|
* Unicode text for PDF export.
|
|
7
7
|
*
|
|
8
8
|
* The 14 standard PDF fonts encode only WinAnsi (see `winAnsi.ts`), so Greek,
|
|
9
|
-
* Cyrillic, Vietnamese, arrows, math, box drawing and most symbols
|
|
10
|
-
* reach the page as `?` or an ASCII stand-in. When a document holds
|
|
11
|
-
* the writer embeds
|
|
12
|
-
*
|
|
9
|
+
* Cyrillic, Vietnamese, arrows, math, box drawing, CJK, emoji and most symbols
|
|
10
|
+
* used to reach the page as `?` or an ASCII stand-in. When a document holds
|
|
11
|
+
* such text, the writer embeds Unicode fonts beside the standard ones and
|
|
12
|
+
* draws those characters with them. The bundled faces are DejaVu Sans for
|
|
13
|
+
* alphabets and symbols, monochrome Noto Emoji, Noto Sans SC for Chinese and
|
|
14
|
+
* Japanese, and Noto Sans KR for Korean; each of the last three loads only for
|
|
15
|
+
* a document with text in its scripts.
|
|
13
16
|
*
|
|
14
17
|
* Text is split into runs, each with the font that draws it:
|
|
15
18
|
* - characters WinAnsi encodes keep the standard font, so ordinary Latin text
|
|
16
19
|
* looks exactly as it did before;
|
|
17
|
-
* - a word
|
|
18
|
-
* punctuation match rather than alternating faces mid-word;
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* - a word the main Unicode face can draw is drawn in it whole, so its letters
|
|
21
|
+
* and punctuation match rather than alternating faces mid-word;
|
|
22
|
+
* - otherwise each character (a letter with its marks, a whole emoji sequence)
|
|
23
|
+
* takes the first face that draws it: the emoji face first for one shown as
|
|
24
|
+
* emoji, last for one the other faces draw as text;
|
|
25
|
+
* - a character no face can draw still goes through the WinAnsi sanitizer,
|
|
26
|
+
* which replaces it and counts it toward the export's one warning.
|
|
22
27
|
*/
|
|
23
28
|
|
|
29
|
+
type FontBytes = Uint8Array | ArrayBuffer;
|
|
24
30
|
/**
|
|
25
31
|
* TrueType or OpenType bytes for the faces that draw what the standard fonts
|
|
26
32
|
* cannot. Bold falls back to `regular`, and `mono` (used for code) to
|
|
27
33
|
* `regular` as well.
|
|
28
34
|
*/
|
|
29
35
|
interface PdfUnicodeFonts {
|
|
30
|
-
regular:
|
|
31
|
-
bold?:
|
|
32
|
-
mono?:
|
|
36
|
+
regular: FontBytes;
|
|
37
|
+
bold?: FontBytes;
|
|
38
|
+
mono?: FontBytes;
|
|
39
|
+
/**
|
|
40
|
+
* Draws emoji: tried first for a character shown as emoji (🙂, or a heart
|
|
41
|
+
* with the emoji variation selector), and last for one the other faces draw
|
|
42
|
+
* as text (♥).
|
|
43
|
+
*/
|
|
44
|
+
emoji?: FontBytes;
|
|
45
|
+
/**
|
|
46
|
+
* Further faces, tried in order for what none of the faces above can draw.
|
|
47
|
+
* Every style shares them. The bundled set puts CJK here.
|
|
48
|
+
*/
|
|
49
|
+
fallbacks?: readonly FontBytes[];
|
|
33
50
|
}
|
|
34
51
|
|
|
35
52
|
/**
|
|
@@ -40,7 +57,8 @@ interface PdfUnicodeFonts {
|
|
|
40
57
|
* headings, paragraphs, inline formatting, lists, code blocks,
|
|
41
58
|
* blockquotes, tables, thematic breaks, and hyperlinks.
|
|
42
59
|
*
|
|
43
|
-
* Uses the standard PDF fonts for authored text
|
|
60
|
+
* Uses the standard PDF fonts for authored text. Embeds (subset) Unicode
|
|
61
|
+
* fonts only for text those cannot encode (see `unicodeText.ts`), and Font
|
|
44
62
|
* Awesome only when the document contains an inline icon.
|
|
45
63
|
*
|
|
46
64
|
* @example
|
|
@@ -106,10 +124,12 @@ interface PdfExportOptions {
|
|
|
106
124
|
onWarning?: (message: string) => void;
|
|
107
125
|
/**
|
|
108
126
|
* Fonts that draw what the standard PDF fonts cannot encode — Greek,
|
|
109
|
-
* Cyrillic, Vietnamese, arrows, math, box drawing, symbols
|
|
110
|
-
* bundled DejaVu Sans faces,
|
|
111
|
-
*
|
|
112
|
-
*
|
|
127
|
+
* Cyrillic, Vietnamese, arrows, math, box drawing, symbols, emoji, Chinese,
|
|
128
|
+
* Japanese and Korean. Default: the bundled DejaVu Sans faces, plus Noto
|
|
129
|
+
* Emoji, Noto Sans SC and Noto Sans KR for a document with text in their
|
|
130
|
+
* scripts, embedded (subset) only in a document that has such text. Pass
|
|
131
|
+
* your own faces to cover other scripts, or `false` to keep the standard
|
|
132
|
+
* fonts alone and replace those characters.
|
|
113
133
|
*/
|
|
114
134
|
unicodeFonts?: PdfUnicodeFonts | false;
|
|
115
135
|
}
|
package/dist/pdf/index.js
CHANGED
package/dist/pptx/index.js
CHANGED
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.16",
|
|
4
4
|
"description": "Document format converters — DOCX, PDF, OOXML import/export",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -130,12 +130,12 @@
|
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
"scripts": {
|
|
133
|
-
"build": "tsup && node ../../scripts/generate-bundle-licenses.mjs . @fortawesome/fontawesome-free dejavu-fonts-ttf && node ../../scripts/remove-empty-chunks.mjs dist",
|
|
133
|
+
"build": "tsup && node ../../scripts/generate-bundle-licenses.mjs . @fortawesome/fontawesome-free dejavu-fonts-ttf @expo-google-fonts/noto-emoji @expo-google-fonts/noto-sans-sc @expo-google-fonts/noto-sans-kr && node ../../scripts/remove-empty-chunks.mjs dist",
|
|
134
134
|
"dev": "concurrently -n js,dts -c blue,gray -r \"tsup --watch --no-dts --no-clean\" \"tsup --watch --dts-only --no-clean\"",
|
|
135
135
|
"typecheck": "tsc --noEmit"
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@bendyline/squisq": "2.13.
|
|
138
|
+
"@bendyline/squisq": "2.13.14",
|
|
139
139
|
"@pdf-lib/fontkit": "1.1.1",
|
|
140
140
|
"@pdf-lib/upng": "1.0.1",
|
|
141
141
|
"@xmldom/xmldom": "0.9.12",
|
|
@@ -152,6 +152,9 @@
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
"devDependencies": {
|
|
155
|
+
"@expo-google-fonts/noto-emoji": "0.4.8",
|
|
156
|
+
"@expo-google-fonts/noto-sans-kr": "0.4.4",
|
|
157
|
+
"@expo-google-fonts/noto-sans-sc": "0.4.4",
|
|
155
158
|
"@fortawesome/fontawesome-free": "7.3.1",
|
|
156
159
|
"dejavu-fonts-ttf": "2.37.3",
|
|
157
160
|
"hyparquet": "1.31.2",
|
|
File without changes
|