@bendyline/squisq-formats 2.8.15 → 2.8.17
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-MF4ZQQJ7.js → chunk-BGQDPDCD.js} +12 -3
- package/dist/{chunk-BBB7FCK7.js → chunk-JB3ZVN7D.js} +1 -1
- package/dist/{chunk-NQNIFIDP.js → chunk-NNNHOTVM.js} +174 -53
- package/dist/{chunk-S5VXWSRR.js → chunk-PIEDORQL.js} +375 -55
- package/dist/{chunk-ZJERBWTB.js → chunk-WPLCWAN3.js} +10 -4
- package/dist/cjkFontData.generated-LJKMYRHP.js +16 -0
- package/dist/docx/index.js +1 -1
- package/dist/emojiFontData.generated-EPQOUGVZ.js +16 -0
- package/dist/epub/index.js +1 -1
- package/dist/hangulFontData.generated-CVLPZH2N.js +16 -0
- package/dist/index.js +6 -6
- 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-2IG4BEAX.js} +0 -0
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ const imported = await pdfToMarkdownDoc(pdfBuffer);
|
|
|
87
87
|
const container = await pdfToContainer(pdfBuffer);
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
**Fidelity:** export uses pdf-lib's standard 14 fonts (`themeId` affects colors only). Text they cannot encode — Greek, Cyrillic, Vietnamese, arrows, math, box drawing, symbols — is drawn with
|
|
90
|
+
**Fidelity:** export uses pdf-lib's standard 14 fonts (`themeId` affects colors only). Text they cannot encode — Greek, Cyrillic, Vietnamese, arrows, math, box drawing, symbols — is drawn with embedded Unicode fonts: the bundled DejaVu Sans faces, plus monochrome Noto Emoji, Noto Sans SC and Noto Sans KR for emoji, Chinese, Japanese and Korean, each loaded and subset only for a document that needs it (`unicodeFonts` supplies your own faces, or `false` turns this off). Scripts none of these cover, such as Thai, are still replaced, and reported once through `onWarning`. Chinese and Japanese lines break between characters. Lines break at a `<br>` (the only line break a table cell can hold), table columns are sized to their content, and a word too long for its line or cell breaks between characters. Pages stay white for printing. Theme text, heading, and link colors are retained when they meet 4.5:1 contrast against both white paper and the shaded table header; otherwise the exporter uses its default dark ink for that role. This also applies to inherited and custom themes. Pass `images` (keyed by the markdown URL, as for DOCX) to draw PNG and JPEG images that stand alone in a paragraph; other images print as an `[Image: alt]` note. PDF has no semantic structure, so import is heuristic and best-effort: headings are detected by font size, and tables / code blocks / blockquotes / links via the `detectTables` / `detectCodeBlocks` / `detectBlockquotes` / `detectLinks` options (all default true). `pdfToMarkdownDoc` is text-only; `pdfToContainer` also extracts embedded XObject and inline raster images in browsers and Node, placed **by page** — each image is inserted after the last content block from its page (image-only pages fall back to the nearest preceding page with content, else the document end). Placement is page-level only; masks, vector artwork, and images that PDF.js cannot expose as decoded pixels are not emitted.
|
|
91
91
|
|
|
92
92
|
### Diagrams as pictures
|
|
93
93
|
|
package/THIRD_PARTY_LICENSES.txt
CHANGED
|
@@ -5,9 +5,378 @@ and notice files are reproduced verbatim. When an npm tarball omits its
|
|
|
5
5
|
repository license, the pinned upstream copy is vendored and identified below.
|
|
6
6
|
|
|
7
7
|
COMPONENTS
|
|
8
|
+
- @expo-google-fonts/noto-emoji@0.4.8 (MIT AND OFL-1.1); files: LICENSE, LICENSE_FONT
|
|
9
|
+
- @expo-google-fonts/noto-sans-kr@0.4.4 (MIT AND OFL-1.1); files: LICENSE, LICENSE_FONT
|
|
10
|
+
- @expo-google-fonts/noto-sans-sc@0.4.4 (MIT AND OFL-1.1); files: LICENSE, LICENSE_FONT
|
|
8
11
|
- @fortawesome/fontawesome-free@7.3.1 ((CC-BY-4.0 AND OFL-1.1 AND MIT)); files: LICENSE.txt
|
|
9
12
|
- dejavu-fonts-ttf@2.37.3 (SEE LICENSE IN README.md AND LICENSE); files: LICENSE
|
|
10
13
|
|
|
14
|
+
==============================================================================
|
|
15
|
+
@expo-google-fonts/noto-emoji@0.4.8 - LICENSE
|
|
16
|
+
==============================================================================
|
|
17
|
+
MIT License
|
|
18
|
+
|
|
19
|
+
Copyright (c) 2020 Expo
|
|
20
|
+
|
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
23
|
+
in the Software without restriction, including without limitation the rights
|
|
24
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
26
|
+
furnished to do so, subject to the following conditions:
|
|
27
|
+
|
|
28
|
+
The above copyright notice and this permission notice shall be included in all
|
|
29
|
+
copies or substantial portions of the Software.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
32
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
33
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
34
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
36
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
|
+
SOFTWARE.
|
|
38
|
+
|
|
39
|
+
==============================================================================
|
|
40
|
+
@expo-google-fonts/noto-emoji@0.4.8 - LICENSE_FONT
|
|
41
|
+
==============================================================================
|
|
42
|
+
Copyright 2013 Google LLC
|
|
43
|
+
|
|
44
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
45
|
+
This license is copied below, and is also available with a FAQ at:
|
|
46
|
+
https://scripts.sil.org/OFL
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
-----------------------------------------------------------
|
|
50
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
51
|
+
-----------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
PREAMBLE
|
|
54
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
55
|
+
development of collaborative font projects, to support the font creation
|
|
56
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
57
|
+
open framework in which fonts may be shared and improved in partnership
|
|
58
|
+
with others.
|
|
59
|
+
|
|
60
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
61
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
62
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
63
|
+
redistributed and/or sold with any software provided that any reserved
|
|
64
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
65
|
+
however, cannot be released under any other type of license. The
|
|
66
|
+
requirement for fonts to remain under this license does not apply
|
|
67
|
+
to any document created using the fonts or their derivatives.
|
|
68
|
+
|
|
69
|
+
DEFINITIONS
|
|
70
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
71
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
72
|
+
include source files, build scripts and documentation.
|
|
73
|
+
|
|
74
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
75
|
+
copyright statement(s).
|
|
76
|
+
|
|
77
|
+
"Original Version" refers to the collection of Font Software components as
|
|
78
|
+
distributed by the Copyright Holder(s).
|
|
79
|
+
|
|
80
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
81
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
82
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
83
|
+
new environment.
|
|
84
|
+
|
|
85
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
86
|
+
writer or other person who contributed to the Font Software.
|
|
87
|
+
|
|
88
|
+
PERMISSION & CONDITIONS
|
|
89
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
90
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
91
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
92
|
+
Software, subject to the following conditions:
|
|
93
|
+
|
|
94
|
+
1) Neither the Font Software nor any of its individual components,
|
|
95
|
+
in Original or Modified Versions, may be sold by itself.
|
|
96
|
+
|
|
97
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
98
|
+
redistributed and/or sold with any software, provided that each copy
|
|
99
|
+
contains the above copyright notice and this license. These can be
|
|
100
|
+
included either as stand-alone text files, human-readable headers or
|
|
101
|
+
in the appropriate machine-readable metadata fields within text or
|
|
102
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
103
|
+
|
|
104
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
105
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
106
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
107
|
+
presented to the users.
|
|
108
|
+
|
|
109
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
110
|
+
Software shall not be used to promote, endorse or advertise any
|
|
111
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
112
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
113
|
+
permission.
|
|
114
|
+
|
|
115
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
116
|
+
must be distributed entirely under this license, and must not be
|
|
117
|
+
distributed under any other license. The requirement for fonts to
|
|
118
|
+
remain under this license does not apply to any document created
|
|
119
|
+
using the Font Software.
|
|
120
|
+
|
|
121
|
+
TERMINATION
|
|
122
|
+
This license becomes null and void if any of the above conditions are
|
|
123
|
+
not met.
|
|
124
|
+
|
|
125
|
+
DISCLAIMER
|
|
126
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
127
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
128
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
129
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
130
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
131
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
132
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
133
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
134
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
135
|
+
|
|
136
|
+
==============================================================================
|
|
137
|
+
@expo-google-fonts/noto-sans-kr@0.4.4 - LICENSE
|
|
138
|
+
==============================================================================
|
|
139
|
+
MIT License
|
|
140
|
+
|
|
141
|
+
Copyright (c) 2020 Expo
|
|
142
|
+
|
|
143
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
144
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
145
|
+
in the Software without restriction, including without limitation the rights
|
|
146
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
147
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
148
|
+
furnished to do so, subject to the following conditions:
|
|
149
|
+
|
|
150
|
+
The above copyright notice and this permission notice shall be included in all
|
|
151
|
+
copies or substantial portions of the Software.
|
|
152
|
+
|
|
153
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
154
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
155
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
156
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
157
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
158
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
159
|
+
SOFTWARE.
|
|
160
|
+
|
|
161
|
+
==============================================================================
|
|
162
|
+
@expo-google-fonts/noto-sans-kr@0.4.4 - LICENSE_FONT
|
|
163
|
+
==============================================================================
|
|
164
|
+
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
|
|
165
|
+
|
|
166
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
167
|
+
This license is copied below, and is also available with a FAQ at:
|
|
168
|
+
https://scripts.sil.org/OFL
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
-----------------------------------------------------------
|
|
172
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
173
|
+
-----------------------------------------------------------
|
|
174
|
+
|
|
175
|
+
PREAMBLE
|
|
176
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
177
|
+
development of collaborative font projects, to support the font creation
|
|
178
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
179
|
+
open framework in which fonts may be shared and improved in partnership
|
|
180
|
+
with others.
|
|
181
|
+
|
|
182
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
183
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
184
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
185
|
+
redistributed and/or sold with any software provided that any reserved
|
|
186
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
187
|
+
however, cannot be released under any other type of license. The
|
|
188
|
+
requirement for fonts to remain under this license does not apply
|
|
189
|
+
to any document created using the fonts or their derivatives.
|
|
190
|
+
|
|
191
|
+
DEFINITIONS
|
|
192
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
193
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
194
|
+
include source files, build scripts and documentation.
|
|
195
|
+
|
|
196
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
197
|
+
copyright statement(s).
|
|
198
|
+
|
|
199
|
+
"Original Version" refers to the collection of Font Software components as
|
|
200
|
+
distributed by the Copyright Holder(s).
|
|
201
|
+
|
|
202
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
203
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
204
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
205
|
+
new environment.
|
|
206
|
+
|
|
207
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
208
|
+
writer or other person who contributed to the Font Software.
|
|
209
|
+
|
|
210
|
+
PERMISSION & CONDITIONS
|
|
211
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
212
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
213
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
214
|
+
Software, subject to the following conditions:
|
|
215
|
+
|
|
216
|
+
1) Neither the Font Software nor any of its individual components,
|
|
217
|
+
in Original or Modified Versions, may be sold by itself.
|
|
218
|
+
|
|
219
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
220
|
+
redistributed and/or sold with any software, provided that each copy
|
|
221
|
+
contains the above copyright notice and this license. These can be
|
|
222
|
+
included either as stand-alone text files, human-readable headers or
|
|
223
|
+
in the appropriate machine-readable metadata fields within text or
|
|
224
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
225
|
+
|
|
226
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
227
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
228
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
229
|
+
presented to the users.
|
|
230
|
+
|
|
231
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
232
|
+
Software shall not be used to promote, endorse or advertise any
|
|
233
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
234
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
235
|
+
permission.
|
|
236
|
+
|
|
237
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
238
|
+
must be distributed entirely under this license, and must not be
|
|
239
|
+
distributed under any other license. The requirement for fonts to
|
|
240
|
+
remain under this license does not apply to any document created
|
|
241
|
+
using the Font Software.
|
|
242
|
+
|
|
243
|
+
TERMINATION
|
|
244
|
+
This license becomes null and void if any of the above conditions are
|
|
245
|
+
not met.
|
|
246
|
+
|
|
247
|
+
DISCLAIMER
|
|
248
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
249
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
250
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
251
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
252
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
253
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
254
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
255
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
256
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
257
|
+
|
|
258
|
+
==============================================================================
|
|
259
|
+
@expo-google-fonts/noto-sans-sc@0.4.4 - LICENSE
|
|
260
|
+
==============================================================================
|
|
261
|
+
MIT License
|
|
262
|
+
|
|
263
|
+
Copyright (c) 2020 Expo
|
|
264
|
+
|
|
265
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
266
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
267
|
+
in the Software without restriction, including without limitation the rights
|
|
268
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
269
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
270
|
+
furnished to do so, subject to the following conditions:
|
|
271
|
+
|
|
272
|
+
The above copyright notice and this permission notice shall be included in all
|
|
273
|
+
copies or substantial portions of the Software.
|
|
274
|
+
|
|
275
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
276
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
277
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
278
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
279
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
280
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
281
|
+
SOFTWARE.
|
|
282
|
+
|
|
283
|
+
==============================================================================
|
|
284
|
+
@expo-google-fonts/noto-sans-sc@0.4.4 - LICENSE_FONT
|
|
285
|
+
==============================================================================
|
|
286
|
+
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
|
|
287
|
+
|
|
288
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
289
|
+
This license is copied below, and is also available with a FAQ at:
|
|
290
|
+
https://scripts.sil.org/OFL
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
-----------------------------------------------------------
|
|
294
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
295
|
+
-----------------------------------------------------------
|
|
296
|
+
|
|
297
|
+
PREAMBLE
|
|
298
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
299
|
+
development of collaborative font projects, to support the font creation
|
|
300
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
301
|
+
open framework in which fonts may be shared and improved in partnership
|
|
302
|
+
with others.
|
|
303
|
+
|
|
304
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
305
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
306
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
307
|
+
redistributed and/or sold with any software provided that any reserved
|
|
308
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
309
|
+
however, cannot be released under any other type of license. The
|
|
310
|
+
requirement for fonts to remain under this license does not apply
|
|
311
|
+
to any document created using the fonts or their derivatives.
|
|
312
|
+
|
|
313
|
+
DEFINITIONS
|
|
314
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
315
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
316
|
+
include source files, build scripts and documentation.
|
|
317
|
+
|
|
318
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
319
|
+
copyright statement(s).
|
|
320
|
+
|
|
321
|
+
"Original Version" refers to the collection of Font Software components as
|
|
322
|
+
distributed by the Copyright Holder(s).
|
|
323
|
+
|
|
324
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
325
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
326
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
327
|
+
new environment.
|
|
328
|
+
|
|
329
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
330
|
+
writer or other person who contributed to the Font Software.
|
|
331
|
+
|
|
332
|
+
PERMISSION & CONDITIONS
|
|
333
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
334
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
335
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
336
|
+
Software, subject to the following conditions:
|
|
337
|
+
|
|
338
|
+
1) Neither the Font Software nor any of its individual components,
|
|
339
|
+
in Original or Modified Versions, may be sold by itself.
|
|
340
|
+
|
|
341
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
342
|
+
redistributed and/or sold with any software, provided that each copy
|
|
343
|
+
contains the above copyright notice and this license. These can be
|
|
344
|
+
included either as stand-alone text files, human-readable headers or
|
|
345
|
+
in the appropriate machine-readable metadata fields within text or
|
|
346
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
347
|
+
|
|
348
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
349
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
350
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
351
|
+
presented to the users.
|
|
352
|
+
|
|
353
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
354
|
+
Software shall not be used to promote, endorse or advertise any
|
|
355
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
356
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
357
|
+
permission.
|
|
358
|
+
|
|
359
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
360
|
+
must be distributed entirely under this license, and must not be
|
|
361
|
+
distributed under any other license. The requirement for fonts to
|
|
362
|
+
remain under this license does not apply to any document created
|
|
363
|
+
using the Font Software.
|
|
364
|
+
|
|
365
|
+
TERMINATION
|
|
366
|
+
This license becomes null and void if any of the above conditions are
|
|
367
|
+
not met.
|
|
368
|
+
|
|
369
|
+
DISCLAIMER
|
|
370
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
371
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
372
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
373
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
374
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
375
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
376
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
377
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
378
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
379
|
+
|
|
11
380
|
==============================================================================
|
|
12
381
|
@fortawesome/fontawesome-free@7.3.1 - LICENSE.txt
|
|
13
382
|
==============================================================================
|
|
@@ -570,12 +570,13 @@ function convertCodeBlock(node) {
|
|
|
570
570
|
return parts.join("");
|
|
571
571
|
}
|
|
572
572
|
function convertTable(node, ctx) {
|
|
573
|
+
const columnCount = Math.max(1, ...node.children.map((row) => row.children.length));
|
|
573
574
|
const rows = [];
|
|
574
575
|
for (let ri = 0; ri < node.children.length; ri++) {
|
|
575
576
|
const row = node.children[ri];
|
|
576
577
|
rows.push(convertTableRow(row, ctx, ri === 0, node.align));
|
|
577
578
|
}
|
|
578
|
-
return `<w:tbl><w:tblPr><w:tblStyle w:val="TableGrid"/><w:tblW w:w="0" w:type="auto"/><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:tblGrid
|
|
579
|
+
return `<w:tbl><w:tblPr><w:tblStyle w:val="TableGrid"/><w:tblW w:w="0" w:type="auto"/><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:tblGrid>${"<w:gridCol/>".repeat(columnCount)}</w:tblGrid>` + rows.join("") + `</w:tbl>`;
|
|
579
580
|
}
|
|
580
581
|
function convertTableRow(row, ctx, isHeader, align) {
|
|
581
582
|
const cells = [];
|
|
@@ -588,11 +589,19 @@ function convertTableRow(row, ctx, isHeader, align) {
|
|
|
588
589
|
return `<w:tr>${trPr}${cells.join("")}</w:tr>`;
|
|
589
590
|
}
|
|
590
591
|
function convertTableCell(cell, ctx, isHeader, align) {
|
|
591
|
-
const
|
|
592
|
+
const format = isHeader ? { ...bodyFormat(ctx), bold: true } : bodyFormat(ctx);
|
|
593
|
+
const runs = convertInlines(cell.children, ctx, format);
|
|
592
594
|
const jcMap = { left: "left", center: "center", right: "right" };
|
|
593
595
|
const jc = align ? `<w:jc w:val="${jcMap[align]}"/>` : "";
|
|
594
596
|
const pPr = `<w:pPr><w:spacing w:after="0"/>${jc}</w:pPr>`;
|
|
595
|
-
|
|
597
|
+
const tcPr = isHeader ? `<w:tcPr><w:shd w:val="clear" w:color="auto" w:fill="${tableHeaderFill(ctx)}"/></w:tcPr>` : "";
|
|
598
|
+
return `<w:tc>${tcPr}<w:p>${pPr}${runs}</w:p></w:tc>`;
|
|
599
|
+
}
|
|
600
|
+
function tableHeaderFill(ctx) {
|
|
601
|
+
const channels = (hex, fallback) => (/^[0-9a-f]{6}$/i.test(hex ?? "") ? hex : fallback).match(/../g).map((pair) => parseInt(pair, 16));
|
|
602
|
+
const page = channels(ctx.backgroundColor, "FFFFFF");
|
|
603
|
+
const ink = channels(ctx.bodyColor, "000000");
|
|
604
|
+
return page.map((channel, index) => Math.round(channel + (ink[index] - channel) * 0.1)).map((channel) => channel.toString(16).padStart(2, "0")).join("").toUpperCase();
|
|
596
605
|
}
|
|
597
606
|
function convertThematicBreak() {
|
|
598
607
|
return `<w:p><w:pPr><w:pBdr><w:bottom w:val="single" w:sz="6" w:space="1" w:color="auto"/></w:pBdr></w:pPr></w:p>`;
|