@bendyline/squisq-formats 2.6.0 → 2.6.1
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-VDTGQ4MW.js → chunk-2OCP46K5.js} +10 -3
- package/dist/{chunk-EEDQRZ2M.js → chunk-POO3PJFH.js} +6 -2
- package/dist/html/index.d.ts +2 -2
- package/dist/html/index.js +1 -1
- package/dist/{import-C7c9tQHK.d.ts → import-D59rxNTj.d.ts} +6 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/outside-in/index.d.ts +3 -3
- package/dist/outside-in/index.js +2 -2
- package/dist/registry/index.d.ts +3 -3
- package/dist/registry/index.js +1 -1
- package/dist/{types-Dzd_5H2A.d.ts → types-BD23kHNG.d.ts} +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-GRKQTQOF.js → chunk-JPU5GPGG.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convert,
|
|
3
3
|
defaultRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JPU5GPGG.js";
|
|
5
5
|
import {
|
|
6
6
|
ConversionError
|
|
7
7
|
} from "./chunk-KXOZMWBS.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
stringifyMarkdown
|
|
15
15
|
} from "@bendyline/squisq/markdown";
|
|
16
16
|
import { MemoryContentContainer } from "@bendyline/squisq/storage";
|
|
17
|
-
var OUTSIDE_IN_FORMAT_IDS = ["html", "docx", "pdf", "pptx", "xlsx"];
|
|
17
|
+
var OUTSIDE_IN_FORMAT_IDS = ["html", "docx", "pdf", "pptx", "xlsx", "csv"];
|
|
18
18
|
var OUTSIDE_IN_FORMAT_SET = new Set(OUTSIDE_IN_FORMAT_IDS);
|
|
19
19
|
var OUTSIDE_IN_VERSION_KEY = "squisq-outside-in";
|
|
20
20
|
var OUTSIDE_IN_OUTPUT_KEY = "squisq-output";
|
|
@@ -215,8 +215,15 @@ async function importOutsideInDocument(source, options = {}) {
|
|
|
215
215
|
const layout = requireLayout(source.targetPath);
|
|
216
216
|
const data = arrayBufferOf(source.data);
|
|
217
217
|
const registry = options.registry ?? defaultRegistry();
|
|
218
|
-
const
|
|
218
|
+
const importOptions = layout.format === "csv" ? {
|
|
219
219
|
...options,
|
|
220
|
+
formatOptions: {
|
|
221
|
+
...options.formatOptions,
|
|
222
|
+
csv: { ...options.formatOptions?.csv, sidecar: "never" }
|
|
223
|
+
}
|
|
224
|
+
} : options;
|
|
225
|
+
const imported = await importMarkdownDocument(data, layout, registry, {
|
|
226
|
+
...importOptions,
|
|
220
227
|
registry,
|
|
221
228
|
from: layout.format
|
|
222
229
|
});
|
|
@@ -151,6 +151,7 @@ function generateInlineHtml(doc, options) {
|
|
|
151
151
|
autoPlay = false,
|
|
152
152
|
showCodeCopyButton = false,
|
|
153
153
|
captionStyle,
|
|
154
|
+
captionPosition,
|
|
154
155
|
themeId,
|
|
155
156
|
themeRegistry
|
|
156
157
|
} = options;
|
|
@@ -192,7 +193,8 @@ ${mode === "static" ? "#squisq-root{display:block}" : ""}
|
|
|
192
193
|
mode: ${JSON.stringify(mode)},
|
|
193
194
|
images: images,
|
|
194
195
|
autoPlay: ${JSON.stringify(autoPlay)},${captionStyle ? `
|
|
195
|
-
captionStyle: ${JSON.stringify(captionStyle)},` : ""}
|
|
196
|
+
captionStyle: ${JSON.stringify(captionStyle)},` : ""}${captionPosition ? `
|
|
197
|
+
captionPosition: ${JSON.stringify(captionPosition)},` : ""}
|
|
196
198
|
showCodeCopyButton: ${JSON.stringify(showCodeCopyButton)},
|
|
197
199
|
basePath: ${JSON.stringify(basePath)}
|
|
198
200
|
});
|
|
@@ -211,6 +213,7 @@ function generateExternalHtml(doc, options) {
|
|
|
211
213
|
autoPlay = false,
|
|
212
214
|
showCodeCopyButton = false,
|
|
213
215
|
captionStyle,
|
|
216
|
+
captionPosition,
|
|
214
217
|
themeId,
|
|
215
218
|
themeRegistry,
|
|
216
219
|
basePath = "."
|
|
@@ -246,7 +249,8 @@ ${mode === "static" ? "#squisq-root{display:block}" : ""}
|
|
|
246
249
|
images: images,
|
|
247
250
|
audio: audio,
|
|
248
251
|
autoPlay: ${JSON.stringify(autoPlay)},${captionStyle ? `
|
|
249
|
-
captionStyle: ${JSON.stringify(captionStyle)},` : ""}
|
|
252
|
+
captionStyle: ${JSON.stringify(captionStyle)},` : ""}${captionPosition ? `
|
|
253
|
+
captionPosition: ${JSON.stringify(captionPosition)},` : ""}
|
|
250
254
|
showCodeCopyButton: ${JSON.stringify(showCodeCopyButton)},
|
|
251
255
|
basePath: ${JSON.stringify(basePath)}
|
|
252
256
|
});
|
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, g as generateExternalHtml, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from '../import-
|
|
2
|
+
import { H as HtmlExportOptions } from '../import-D59rxNTj.js';
|
|
3
|
+
export { a as HtmlImportOptions, c as collectImagePaths, g as generateExternalHtml, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from '../import-D59rxNTj.js';
|
|
4
4
|
import { HtmlPolicy, MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/html/index.js
CHANGED
|
@@ -59,6 +59,11 @@ interface HtmlExportOptions {
|
|
|
59
59
|
* lower-third. Omitted = captions off (mount default).
|
|
60
60
|
*/
|
|
61
61
|
captionStyle?: 'standard' | 'social';
|
|
62
|
+
/**
|
|
63
|
+
* Caption placement over the frame, passed through to `SquisqPlayer.mount`.
|
|
64
|
+
* Omitted = the style's classic spot (standard: top; social: lower band).
|
|
65
|
+
*/
|
|
66
|
+
captionPosition?: 'top' | 'center' | 'bottom';
|
|
62
67
|
/**
|
|
63
68
|
* Squisq theme ID to apply (e.g., 'documentary', 'cinematic').
|
|
64
69
|
* When set, the theme is assigned to the Doc before rendering,
|
|
@@ -81,7 +86,7 @@ declare function collectImagePaths(doc: Doc): Set<string>;
|
|
|
81
86
|
* @param options - Export options (playerScript is not embedded, referenced via src)
|
|
82
87
|
* @returns Complete HTML string
|
|
83
88
|
*/
|
|
84
|
-
declare function generateExternalHtml(doc: Doc, options: Pick<HtmlExportOptions, 'mode' | 'title' | 'autoPlay' | 'showCodeCopyButton' | 'captionStyle' | 'themeId' | 'themeRegistry' | 'basePath'> & {
|
|
89
|
+
declare function generateExternalHtml(doc: Doc, options: Pick<HtmlExportOptions, 'mode' | 'title' | 'autoPlay' | 'showCodeCopyButton' | 'captionStyle' | 'captionPosition' | 'themeId' | 'themeRegistry' | 'basePath'> & {
|
|
85
90
|
/** Relative path to the player JS file (e.g., 'squisq-player.js') */
|
|
86
91
|
playerScriptPath: string;
|
|
87
92
|
/** Map of original image paths to their rewritten relative paths in the ZIP */
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export { PdfExportOptions, PdfImportOptions, configurePdfWorker, docToPdf, markd
|
|
|
6
6
|
export { HtmlZipExportOptions, docToHtml, docToHtmlZip } from './html/index.js';
|
|
7
7
|
export { EpubExportOptions, docToEpub, markdownDocToEpub } from './epub/index.js';
|
|
8
8
|
export { ExtractedFileTheme, InferSourceFormat, InferThemeOptions, InferredFileTheme, compileExtractedTheme, inferThemeFromFile } from './infer/index.js';
|
|
9
|
-
export { B as BUILTIN_FORMAT_IDS, a as BuiltinFormatOptions, C as ConversionLimits, b as ConversionResult, c as ConvertOptions, d as ConvertSource, D as DEFAULT_CONVERSION_LIMITS, e as DbkFormatOptions, F as FormatDefinition, f as FormatId, g as FormatRegistry, M as MarkdownFormatOptions, N as NormalizedInput, P as PreparedConversion, h as PreparedExportOptions, r as resolveConversionLimits } from './types-
|
|
9
|
+
export { B as BUILTIN_FORMAT_IDS, a as BuiltinFormatOptions, C as ConversionLimits, b as ConversionResult, c as ConvertOptions, d as ConvertSource, D as DEFAULT_CONVERSION_LIMITS, e as DbkFormatOptions, F as FormatDefinition, f as FormatId, g as FormatRegistry, M as MarkdownFormatOptions, N as NormalizedInput, P as PreparedConversion, h as PreparedExportOptions, r as resolveConversionLimits } from './types-BD23kHNG.js';
|
|
10
10
|
export { ConversionError, ConversionErrorCode, ConversionErrorOptions, convert, createRegistry, defaultFormats, defaultRegistry, prepareConversion } from './registry/index.js';
|
|
11
11
|
export { ImportedOutsideInDocument, OUTSIDE_IN_FORMAT_IDS, OUTSIDE_IN_UPDATE_FROM_MARKDOWN_KEY, OutsideInFormatId, OutsideInLayout, OutsideInMetadata, RenderOutsideInOptions, chooseOutsideInMarkdownPath, importOutsideInDocument, isOutsideInMarkdownEditingEnabled, isOutsideInTargetPath, readOutsideInMetadata, renderOutsideInDocument, resolveOutsideInLayout, withOutsideInMarkdownEditing, withOutsideInMetadata } from './outside-in/index.js';
|
|
12
12
|
export { Z as ZipSafetyError, a as ZipSafetyErrorCode, b as ZipSafetyErrorOptions, c as ZipSafetyLimits } from './zipLimits-BOKCB7qk.js';
|
|
13
|
-
export { H as HtmlExportOptions, a as HtmlImportOptions, c as collectImagePaths, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from './import-
|
|
13
|
+
export { H as HtmlExportOptions, a as HtmlImportOptions, c as collectImagePaths, h as htmlToMarkdown, b as htmlToMarkdownDoc, d as htmlToMarkdownDocSync } from './import-D59rxNTj.js';
|
|
14
14
|
export { P as PptxExportOptions, a as PptxImportOptions, d as docToPptx, m as markdownDocToPptx, p as pptxToMarkdownDoc } from './import-C16E8Y4X.js';
|
|
15
15
|
export { X as XlsxExportOptions, a as XlsxImportOptions, b as XlsxTable, c as XlsxTableColumn, d as XlsxTablesOptions, e as docToXlsx, g as gridToTables, m as markdownDocToXlsx, x as xlsxToMarkdownDoc, f as xlsxToTables } from './export-6iQXd-lQ.js';
|
|
16
16
|
import '@bendyline/squisq/schemas';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
htmlToMarkdown,
|
|
6
6
|
htmlToMarkdownDoc,
|
|
7
7
|
htmlToMarkdownDocSync
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-POO3PJFH.js";
|
|
9
9
|
import {
|
|
10
10
|
docToEpub,
|
|
11
11
|
markdownDocToEpub
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveOutsideInLayout,
|
|
32
32
|
withOutsideInMarkdownEditing,
|
|
33
33
|
withOutsideInMetadata
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2OCP46K5.js";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_CONVERSION_LIMITS,
|
|
37
37
|
convert,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
defaultRegistry,
|
|
41
41
|
prepareConversion,
|
|
42
42
|
resolveConversionLimits
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-JPU5GPGG.js";
|
|
44
44
|
import {
|
|
45
45
|
ConversionError
|
|
46
46
|
} from "./chunk-KXOZMWBS.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
2
2
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
3
|
-
import { c as ConvertOptions, b as ConversionResult } from '../types-
|
|
3
|
+
import { c as ConvertOptions, b as ConversionResult } from '../types-BD23kHNG.js';
|
|
4
4
|
import '@bendyline/squisq/schemas';
|
|
5
5
|
import '@bendyline/squisq/transform';
|
|
6
6
|
import '../docx/index.js';
|
|
@@ -10,7 +10,7 @@ import '../import-C16E8Y4X.js';
|
|
|
10
10
|
import '../export-6iQXd-lQ.js';
|
|
11
11
|
import '../csv/index.js';
|
|
12
12
|
import '../pdf/index.js';
|
|
13
|
-
import '../import-
|
|
13
|
+
import '../import-D59rxNTj.js';
|
|
14
14
|
import '../epub/index.js';
|
|
15
15
|
import '../container/index.js';
|
|
16
16
|
|
|
@@ -30,7 +30,7 @@ import '../container/index.js';
|
|
|
30
30
|
* the portable path/frontmatter contract plus registry-backed import/export.
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
declare const OUTSIDE_IN_FORMAT_IDS: readonly ["html", "docx", "pdf", "pptx", "xlsx"];
|
|
33
|
+
declare const OUTSIDE_IN_FORMAT_IDS: readonly ["html", "docx", "pdf", "pptx", "xlsx", "csv"];
|
|
34
34
|
type OutsideInFormatId = (typeof OUTSIDE_IN_FORMAT_IDS)[number];
|
|
35
35
|
declare const OUTSIDE_IN_UPDATE_FROM_MARKDOWN_KEY = "squisq-updatefrommarkdown";
|
|
36
36
|
interface OutsideInLayout {
|
package/dist/outside-in/index.js
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
resolveOutsideInLayout,
|
|
11
11
|
withOutsideInMarkdownEditing,
|
|
12
12
|
withOutsideInMetadata
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-2OCP46K5.js";
|
|
14
|
+
import "../chunk-JPU5GPGG.js";
|
|
15
15
|
import "../chunk-KXOZMWBS.js";
|
|
16
16
|
import "../chunk-7AWFHP5U.js";
|
|
17
17
|
export {
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as FormatId, g as FormatRegistry, F as FormatDefinition, d as ConvertSource, c as ConvertOptions, b as ConversionResult, P as PreparedConversion } from '../types-
|
|
2
|
-
export { B as BUILTIN_FORMAT_IDS, a as BuiltinFormatOptions, C as ConversionLimits, D as DEFAULT_CONVERSION_LIMITS, e as DbkFormatOptions, M as MarkdownFormatOptions, N as NormalizedInput, h as PreparedExportOptions, r as resolveConversionLimits } from '../types-
|
|
1
|
+
import { f as FormatId, g as FormatRegistry, F as FormatDefinition, d as ConvertSource, c as ConvertOptions, b as ConversionResult, P as PreparedConversion } from '../types-BD23kHNG.js';
|
|
2
|
+
export { B as BUILTIN_FORMAT_IDS, a as BuiltinFormatOptions, C as ConversionLimits, D as DEFAULT_CONVERSION_LIMITS, e as DbkFormatOptions, M as MarkdownFormatOptions, N as NormalizedInput, h as PreparedExportOptions, r as resolveConversionLimits } from '../types-BD23kHNG.js';
|
|
3
3
|
import '@bendyline/squisq/schemas';
|
|
4
4
|
import '@bendyline/squisq/transform';
|
|
5
5
|
import '@bendyline/squisq/markdown';
|
|
@@ -11,7 +11,7 @@ import '../import-C16E8Y4X.js';
|
|
|
11
11
|
import '../export-6iQXd-lQ.js';
|
|
12
12
|
import '../csv/index.js';
|
|
13
13
|
import '../pdf/index.js';
|
|
14
|
-
import '../import-
|
|
14
|
+
import '../import-D59rxNTj.js';
|
|
15
15
|
import '../epub/index.js';
|
|
16
16
|
import '../container/index.js';
|
|
17
17
|
|
package/dist/registry/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { a as PptxImportOptions, P as PptxExportOptions } from './import-C16E8Y4
|
|
|
7
7
|
import { j as XlsxContainerOptions, X as XlsxExportOptions } from './export-6iQXd-lQ.js';
|
|
8
8
|
import { CsvContainerOptions, 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-D59rxNTj.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-formats",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Document format converters — DOCX, PDF, OOXML import/export",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"typecheck": "tsc --noEmit"
|
|
116
116
|
},
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@bendyline/squisq": "2.11.
|
|
118
|
+
"@bendyline/squisq": "2.11.1",
|
|
119
119
|
"@pdf-lib/fontkit": "1.1.1",
|
|
120
120
|
"@pdf-lib/upng": "1.0.1",
|
|
121
121
|
"@xmldom/xmldom": "0.9.12",
|
|
File without changes
|