@bendyline/squisq-cli 2.6.0 → 2.7.0

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.
@@ -16,7 +16,7 @@ import {
16
16
  renderDocToMp4,
17
17
  resolveDashboardDimensions,
18
18
  validateDashboardImageDimensions
19
- } from "./chunk-2ZJW7F62.js";
19
+ } from "./chunk-3VRG7RDV.js";
20
20
  import {
21
21
  GIF_EXPORT_DEFAULTS,
22
22
  framesToGifNative,
package/dist/api.d.ts CHANGED
@@ -105,6 +105,13 @@ interface ReadInputOptions {
105
105
  inferTheme?: boolean;
106
106
  /** Derive custom layout templates from PPTX slide layouts. Default true. */
107
107
  inferLayouts?: boolean;
108
+ /**
109
+ * Split each XLSX worksheet into its contiguous data islands, one anchored
110
+ * block per island. Default true.
111
+ */
112
+ xlsxRegions?: boolean;
113
+ /** Emit the companion formulas table for XLSX regions that have one. Default true. */
114
+ xlsxFormulas?: boolean;
108
115
  }
109
116
  /**
110
117
  * Read input from a file path (markdown, JSON Doc, ZIP/DBK container, folder,
package/dist/api.js CHANGED
@@ -756,7 +756,9 @@ async function readViaImporter(filePath, def, options) {
756
756
  formatOptions: {
757
757
  [def.id]: {
758
758
  inferTheme: options?.inferTheme !== false,
759
- inferLayouts: options?.inferLayouts !== false
759
+ inferLayouts: options?.inferLayouts !== false,
760
+ regions: options?.xlsxRegions !== false,
761
+ formulas: options?.xlsxFormulas !== false
760
762
  }
761
763
  }
762
764
  };
@@ -331,7 +331,7 @@ function mp4Format() {
331
331
  const animationsEnabled = typeof mp4Opts.animationsEnabled === "boolean" ? mp4Opts.animationsEnabled : MP4_DEFAULTS.animationsEnabled;
332
332
  const outputPath = join(tmpdir(), `squisq-mp4-${randomBytes(8).toString("hex")}.mp4`);
333
333
  try {
334
- const { renderDocToMp4: renderDocToMp42 } = await import("./api-O3IMGDPH.js");
334
+ const { renderDocToMp4: renderDocToMp42 } = await import("./api-7LSZM24X.js");
335
335
  await renderDocToMp42(input.doc, input.container, {
336
336
  outputPath,
337
337
  fps,
@@ -372,7 +372,7 @@ function gifFormat() {
372
372
  const defaultHeight = portrait ? GIF_DEFAULTS.width : GIF_DEFAULTS.height;
373
373
  const outputPath = join(tmpdir(), `squisq-gif-${randomBytes(8).toString("hex")}.gif`);
374
374
  try {
375
- const { renderDocToGif: renderDocToGif2 } = await import("./api-O3IMGDPH.js");
375
+ const { renderDocToGif: renderDocToGif2 } = await import("./api-7LSZM24X.js");
376
376
  const result = await renderDocToGif2(input.doc, input.container, {
377
377
  outputPath,
378
378
  fps: typeof gifOpts.fps === "number" ? gifOpts.fps : GIF_DEFAULTS.fps,
@@ -415,7 +415,7 @@ function pngFormat() {
415
415
  async exportDoc(input, options) {
416
416
  options.signal?.throwIfAborted();
417
417
  const pngOpts = options.formatOptions?.png ?? {};
418
- const { renderDocToDashboardPng: renderDocToDashboardPng2 } = await import("./api-O3IMGDPH.js");
418
+ const { renderDocToDashboardPng: renderDocToDashboardPng2 } = await import("./api-7LSZM24X.js");
419
419
  const result = await renderDocToDashboardPng2(input.doc, input.container, {
420
420
  resolution: pngOpts.resolution,
421
421
  width: pngOpts.width,
@@ -753,7 +753,9 @@ async function readViaImporter(filePath, def, options) {
753
753
  formatOptions: {
754
754
  [def.id]: {
755
755
  inferTheme: options?.inferTheme !== false,
756
- inferLayouts: options?.inferLayouts !== false
756
+ inferLayouts: options?.inferLayouts !== false,
757
+ regions: options?.xlsxRegions !== false,
758
+ formulas: options?.xlsxFormulas !== false
757
759
  }
758
760
  }
759
761
  };
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  renderDocToDashboardPng,
10
10
  renderDocToGif,
11
11
  renderDocToMp4
12
- } from "./chunk-2ZJW7F62.js";
12
+ } from "./chunk-3VRG7RDV.js";
13
13
  import "./chunk-GGVASRPG.js";
14
14
 
15
15
  // src/index.ts
@@ -213,7 +213,13 @@ function registerConvertCommand(program2) {
213
213
  ).option(
214
214
  "--no-infer-theme",
215
215
  "Do not infer a Squisq theme from an office input file (PPTX theme colors/fonts)"
216
- ).option("--no-infer-layouts", "Do not derive custom layout templates from PPTX slide layouts").option("--animations", "Enable slide animations/transitions in rendered media").option("--no-animations", "Disable slide animations/transitions in rendered media").action(async (inputPath, opts) => {
216
+ ).option("--no-infer-layouts", "Do not derive custom layout templates from PPTX slide layouts").option(
217
+ "--no-xlsx-regions",
218
+ "Import each XLSX worksheet as one whole-sheet table instead of splitting it into its data islands"
219
+ ).option(
220
+ "--no-xlsx-formulas",
221
+ "Do not emit the companion formulas table for XLSX regions that contain formulas"
222
+ ).option("--animations", "Enable slide animations/transitions in rendered media").option("--no-animations", "Disable slide animations/transitions in rendered media").action(async (inputPath, opts) => {
217
223
  try {
218
224
  await runConvert(inputPath, opts);
219
225
  } catch (err) {
@@ -267,7 +273,9 @@ async function runConvert(inputPath, opts) {
267
273
  console.error(`Reading: ${resolvedInput}`);
268
274
  const result = await readInput(resolvedInput, {
269
275
  inferTheme: opts.inferTheme,
270
- inferLayouts: opts.inferLayouts
276
+ inferLayouts: opts.inferLayouts,
277
+ xlsxRegions: opts.xlsxRegions,
278
+ xlsxFormulas: opts.xlsxFormulas
271
279
  });
272
280
  if (opts.theme) {
273
281
  await assertValidThemeId(opts.theme, result);