@bendyline/squisq-formats 2.3.7 → 2.3.9
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-T7M52LHF.js → chunk-VF2AML3R.js} +7 -2
- package/dist/html/index.d.ts +2 -2
- package/dist/html/index.js +3 -1
- package/dist/{import-C8whCC7_.d.ts → import-BhOL4D1B.d.ts} +24 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.js +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-GK23NBPZ.js → chunk-34ER6JR3.js} +0 -0
|
@@ -144,6 +144,7 @@ function generateInlineHtml(doc, options) {
|
|
|
144
144
|
mode = "slideshow",
|
|
145
145
|
title = "Squisq Document",
|
|
146
146
|
autoPlay = false,
|
|
147
|
+
captionStyle,
|
|
147
148
|
themeId,
|
|
148
149
|
themeRegistry
|
|
149
150
|
} = options;
|
|
@@ -184,7 +185,8 @@ ${mode === "static" ? "#squisq-root{display:block}" : ""}
|
|
|
184
185
|
SquisqPlayer.mount(document.getElementById("squisq-root"), doc, {
|
|
185
186
|
mode: ${JSON.stringify(mode)},
|
|
186
187
|
images: images,
|
|
187
|
-
autoPlay: ${JSON.stringify(autoPlay)}
|
|
188
|
+
autoPlay: ${JSON.stringify(autoPlay)},${captionStyle ? `
|
|
189
|
+
captionStyle: ${JSON.stringify(captionStyle)},` : ""}
|
|
188
190
|
basePath: "."
|
|
189
191
|
});
|
|
190
192
|
})();
|
|
@@ -200,6 +202,7 @@ function generateExternalHtml(doc, options) {
|
|
|
200
202
|
mode = "slideshow",
|
|
201
203
|
title = "Squisq Document",
|
|
202
204
|
autoPlay = false,
|
|
205
|
+
captionStyle,
|
|
203
206
|
themeId,
|
|
204
207
|
themeRegistry
|
|
205
208
|
} = options;
|
|
@@ -233,7 +236,8 @@ ${mode === "static" ? "#squisq-root{display:block}" : ""}
|
|
|
233
236
|
mode: ${JSON.stringify(mode)},
|
|
234
237
|
images: images,
|
|
235
238
|
audio: audio,
|
|
236
|
-
autoPlay: ${JSON.stringify(autoPlay)}
|
|
239
|
+
autoPlay: ${JSON.stringify(autoPlay)},${captionStyle ? `
|
|
240
|
+
captionStyle: ${JSON.stringify(captionStyle)},` : ""}
|
|
237
241
|
basePath: "."
|
|
238
242
|
});
|
|
239
243
|
})();
|
|
@@ -1546,6 +1550,7 @@ async function docToHtmlZip(doc, options) {
|
|
|
1546
1550
|
|
|
1547
1551
|
export {
|
|
1548
1552
|
collectImagePaths,
|
|
1553
|
+
generateExternalHtml,
|
|
1549
1554
|
markdownDocToPlainHtml,
|
|
1550
1555
|
markdownDocsToPlainHtmlBundle,
|
|
1551
1556
|
collectLinkRefs,
|
package/dist/html/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme, ThemeRegistry, Doc } from '@bendyline/squisq/schemas';
|
|
2
|
-
import { H as HtmlExportOptions } from '../import-
|
|
3
|
-
export { a as HtmlImportOptions, c as collectImagePaths, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from '../import-
|
|
2
|
+
import { H as HtmlExportOptions } from '../import-BhOL4D1B.js';
|
|
3
|
+
export { a as HtmlImportOptions, c as collectImagePaths, g as generateExternalHtml, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from '../import-BhOL4D1B.js';
|
|
4
4
|
import { HtmlPolicy, MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/html/index.js
CHANGED
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
collectLinkRefs,
|
|
4
4
|
docToHtml,
|
|
5
5
|
docToHtmlZip,
|
|
6
|
+
generateExternalHtml,
|
|
6
7
|
htmlToMarkdown,
|
|
7
8
|
htmlToMarkdownDoc,
|
|
8
9
|
htmlToMarkdownDocSync,
|
|
9
10
|
markdownDocToPlainHtml,
|
|
10
11
|
markdownDocsToHtmlBundle,
|
|
11
12
|
markdownDocsToPlainHtmlBundle
|
|
12
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VF2AML3R.js";
|
|
13
14
|
import {
|
|
14
15
|
arrayBufferToBase64DataUrl,
|
|
15
16
|
extractFilename,
|
|
@@ -23,6 +24,7 @@ export {
|
|
|
23
24
|
docToHtml,
|
|
24
25
|
docToHtmlZip,
|
|
25
26
|
extractFilename,
|
|
27
|
+
generateExternalHtml,
|
|
26
28
|
htmlToMarkdown,
|
|
27
29
|
htmlToMarkdownDoc,
|
|
28
30
|
htmlToMarkdownDocSync,
|
|
@@ -36,6 +36,13 @@ interface HtmlExportOptions {
|
|
|
36
36
|
title?: string;
|
|
37
37
|
/** Auto-play slideshow on load (default: false) */
|
|
38
38
|
autoPlay?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Caption rendering for slideshow playback. Passed through to
|
|
41
|
+
* `SquisqPlayer.mount` — 'social' shows the large centered 3-5 word
|
|
42
|
+
* captions with the active word highlighted; 'standard' the classic
|
|
43
|
+
* lower-third. Omitted = captions off (mount default).
|
|
44
|
+
*/
|
|
45
|
+
captionStyle?: 'standard' | 'social';
|
|
39
46
|
/**
|
|
40
47
|
* Squisq theme ID to apply (e.g., 'documentary', 'cinematic').
|
|
41
48
|
* When set, the theme is assigned to the Doc before rendering,
|
|
@@ -50,6 +57,22 @@ interface HtmlExportOptions {
|
|
|
50
57
|
* Returns a Set of unique relative paths that need to be resolved.
|
|
51
58
|
*/
|
|
52
59
|
declare function collectImagePaths(doc: Doc): Set<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Generate an HTML document that references external JS and image files.
|
|
62
|
+
* Used for ZIP exports where files sit alongside the HTML.
|
|
63
|
+
*
|
|
64
|
+
* @param doc - The Doc to render (image/audio paths should already be rewritten to relative)
|
|
65
|
+
* @param options - Export options (playerScript is not embedded, referenced via src)
|
|
66
|
+
* @returns Complete HTML string
|
|
67
|
+
*/
|
|
68
|
+
declare function generateExternalHtml(doc: Doc, options: Pick<HtmlExportOptions, 'mode' | 'title' | 'autoPlay' | 'captionStyle' | 'themeId' | 'themeRegistry'> & {
|
|
69
|
+
/** Relative path to the player JS file (e.g., 'squisq-player.js') */
|
|
70
|
+
playerScriptPath: string;
|
|
71
|
+
/** Map of original image paths to their rewritten relative paths in the ZIP */
|
|
72
|
+
imagePathMap?: Record<string, string>;
|
|
73
|
+
/** Map of audio segment IDs to their rewritten relative paths in the ZIP */
|
|
74
|
+
audioPathMap?: Record<string, string>;
|
|
75
|
+
}): string;
|
|
53
76
|
|
|
54
77
|
/**
|
|
55
78
|
* HTML Import Module — @bendyline/squisq-formats/html
|
|
@@ -87,4 +110,4 @@ declare function htmlToMarkdownDoc(data: ArrayBuffer | Uint8Array | string, opti
|
|
|
87
110
|
/** Convenience string→string conversion (used for email HTML bodies). */
|
|
88
111
|
declare function htmlToMarkdown(html: string, options?: HtmlImportOptions): string;
|
|
89
112
|
|
|
90
|
-
export { type HtmlExportOptions as H, type HtmlImportOptions as a, htmlToMarkdownDoc as b, collectImagePaths as c, htmlToMarkdownDocSync as d, htmlToMarkdown as h };
|
|
113
|
+
export { type HtmlExportOptions as H, type HtmlImportOptions as a, htmlToMarkdownDoc as b, collectImagePaths as c, htmlToMarkdownDocSync as d, generateExternalHtml as g, htmlToMarkdown as h };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { EpubExportOptions, docToEpub, markdownDocToEpub } from './epub/index.js
|
|
|
8
8
|
export { ExtractedFileTheme, InferSourceFormat, InferThemeOptions, InferredFileTheme, compileExtractedTheme, inferThemeFromFile } from './infer/index.js';
|
|
9
9
|
export { BUILTIN_FORMAT_IDS, BuiltinFormatOptions, ConversionError, ConversionErrorCode, ConversionErrorOptions, ConversionLimits, ConversionResult, ConvertOptions, ConvertSource, DEFAULT_CONVERSION_LIMITS, DbkFormatOptions, FormatDefinition, FormatId, FormatRegistry, MarkdownFormatOptions, NormalizedInput, PreparedConversion, PreparedExportOptions, convert, createRegistry, defaultFormats, defaultRegistry, prepareConversion, resolveConversionLimits } from './registry/index.js';
|
|
10
10
|
export { Z as ZipSafetyError, a as ZipSafetyErrorCode, b as ZipSafetyErrorOptions, c as ZipSafetyLimits } from './zipLimits-BOKCB7qk.js';
|
|
11
|
-
export { H as HtmlExportOptions, a as HtmlImportOptions, c as collectImagePaths, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from './import-
|
|
11
|
+
export { H as HtmlExportOptions, a as HtmlImportOptions, c as collectImagePaths, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from './import-BhOL4D1B.js';
|
|
12
12
|
export { P as PptxExportOptions, a as PptxImportOptions, d as docToPptx, m as markdownDocToPptx, p as pptxToMarkdownDoc } from './import-BhBGQqnz.js';
|
|
13
13
|
export { X as XlsxExportOptions, a as XlsxImportOptions, d as docToXlsx, m as markdownDocToXlsx, x as xlsxToMarkdownDoc } from './export-D9msROJS.js';
|
|
14
14
|
import '@bendyline/squisq/schemas';
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
defaultRegistry,
|
|
12
12
|
prepareConversion,
|
|
13
13
|
resolveConversionLimits
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-34ER6JR3.js";
|
|
15
15
|
import {
|
|
16
16
|
inferThemeFromFile
|
|
17
17
|
} from "./chunk-KMBBO5H7.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
htmlToMarkdown,
|
|
73
73
|
htmlToMarkdownDoc,
|
|
74
74
|
htmlToMarkdownDocSync
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-VF2AML3R.js";
|
|
76
76
|
import "./chunk-6RQOV3B3.js";
|
|
77
77
|
import "./chunk-AONELFLA.js";
|
|
78
78
|
export {
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { a as PptxImportOptions, P as PptxExportOptions } from '../import-BhBGQq
|
|
|
7
7
|
import { a as XlsxImportOptions, X as XlsxExportOptions } from '../export-D9msROJS.js';
|
|
8
8
|
import { CsvImportOptions, CsvExportOptions } from '../csv/index.js';
|
|
9
9
|
import { PdfImportOptions, PdfExportOptions } from '../pdf/index.js';
|
|
10
|
-
import { a as HtmlImportOptions, H as HtmlExportOptions } from '../import-
|
|
10
|
+
import { a as HtmlImportOptions, H as HtmlExportOptions } from '../import-BhOL4D1B.js';
|
|
11
11
|
import { EpubExportOptions } from '../epub/index.js';
|
|
12
12
|
import { ContainerToZipOptions } from '../container/index.js';
|
|
13
13
|
import { c as ZipSafetyLimits } from '../zipLimits-BOKCB7qk.js';
|
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.3.
|
|
3
|
+
"version": "2.3.9",
|
|
4
4
|
"description": "Document format converters — DOCX, PDF, OOXML import/export",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@pdf-lib/fontkit": "1.1.1",
|
|
109
109
|
"@pdf-lib/upng": "1.0.1",
|
|
110
110
|
"@xmldom/xmldom": "0.9.10",
|
|
111
|
-
"@bendyline/squisq": "2.4.
|
|
111
|
+
"@bendyline/squisq": "2.4.4",
|
|
112
112
|
"jszip": "3.10.1",
|
|
113
113
|
"pdf-lib": "1.17.1",
|
|
114
114
|
"pdfjs-dist": "4.10.38"
|
|
File without changes
|