@silurus/ooxml 0.1.0 → 0.2.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.
- package/README.md +16 -0
- package/dist/docx-BigKt3jU.cjs +1 -0
- package/dist/docx-Dl67DX0B.js +721 -0
- package/dist/docx.cjs +1 -1
- package/dist/docx.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/pptx-9gGaUMeA.js +1475 -0
- package/dist/pptx-E7x-tlbY.cjs +1 -0
- package/dist/pptx.cjs +1 -1
- package/dist/pptx.mjs +1 -1
- package/dist/types/index.d.ts +21 -1
- package/dist/types/pptx.d.ts +20 -1
- package/dist/xlsx-7RZtVIqa.js +1068 -0
- package/dist/xlsx-BJpXJcKz.cjs +4 -0
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.mjs +1 -1
- package/package.json +1 -1
- package/dist/docx-Bpx5ZIHv.js +0 -721
- package/dist/docx-CVRWUA32.cjs +0 -1
- package/dist/pptx-D3vSvVQ6.js +0 -1475
- package/dist/pptx-DrZBtOP1.cjs +0 -1
- package/dist/xlsx-B-yZ85zA.js +0 -1068
- package/dist/xlsx-BhLRc4om.cjs +0 -4
package/dist/pptx.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pptx-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pptx-E7x-tlbY.cjs`);exports.PptxPresentation=e.r,exports.PptxViewer=e.n,exports.renderSlide=e.i;
|
package/dist/pptx.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n } from "./pptx-
|
|
1
|
+
import { i as e, n as t, r as n } from "./pptx-9gGaUMeA.js";
|
|
2
2
|
export { n as PptxPresentation, t as PptxViewer, e as renderSlide };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -508,6 +508,20 @@ declare interface LineSpacing {
|
|
|
508
508
|
rule: 'auto' | 'exact' | 'atLeast';
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
/** Options for {@link PptxPresentation.load}. */
|
|
512
|
+
declare interface LoadOptions {
|
|
513
|
+
/**
|
|
514
|
+
* Opt in to loading theme-declared webfonts from Google Fonts
|
|
515
|
+
* (`fonts.googleapis.com`). When enabled, end-user IP/User-Agent is sent to
|
|
516
|
+
* Google, which may have privacy/GDPR implications for your application.
|
|
517
|
+
*
|
|
518
|
+
* Default: `false` — the canvas falls back to locally available fonts. Host
|
|
519
|
+
* the required webfonts yourself and reference them via `@font-face` in your
|
|
520
|
+
* application CSS to match the document's theme fonts.
|
|
521
|
+
*/
|
|
522
|
+
useGoogleFonts?: boolean;
|
|
523
|
+
}
|
|
524
|
+
|
|
511
525
|
declare interface MergeCell {
|
|
512
526
|
top: number;
|
|
513
527
|
left: number;
|
|
@@ -637,6 +651,7 @@ export declare namespace pptx {
|
|
|
637
651
|
PptxViewer,
|
|
638
652
|
PptxViewerOptions,
|
|
639
653
|
PptxPresentation,
|
|
654
|
+
LoadOptions,
|
|
640
655
|
RenderSlideOptions,
|
|
641
656
|
renderSlide,
|
|
642
657
|
RenderOptions,
|
|
@@ -681,7 +696,7 @@ declare class PptxPresentation {
|
|
|
681
696
|
private _workerReadyCallbacks;
|
|
682
697
|
private constructor();
|
|
683
698
|
/** Parse a PPTX from URL or ArrayBuffer. */
|
|
684
|
-
static load(source: string | ArrayBuffer): Promise<PptxPresentation>;
|
|
699
|
+
static load(source: string | ArrayBuffer, opts?: LoadOptions): Promise<PptxPresentation>;
|
|
685
700
|
private _waitForWorker;
|
|
686
701
|
private _parse;
|
|
687
702
|
/** Total number of slides in the loaded presentation. */
|
|
@@ -730,6 +745,11 @@ declare interface PptxViewerOptions extends RenderOptions {
|
|
|
730
745
|
onSlideChange?: (index: number, total: number) => void;
|
|
731
746
|
/** Called on parse or render errors */
|
|
732
747
|
onError?: (err: Error) => void;
|
|
748
|
+
/**
|
|
749
|
+
* Opt in to loading theme-declared webfonts from Google Fonts. Off by
|
|
750
|
+
* default — see {@link PptxPresentation.load} for privacy implications.
|
|
751
|
+
*/
|
|
752
|
+
useGoogleFonts?: boolean;
|
|
733
753
|
}
|
|
734
754
|
|
|
735
755
|
declare interface Presentation {
|
package/dist/types/pptx.d.ts
CHANGED
|
@@ -90,6 +90,20 @@ export declare interface LineBreak {
|
|
|
90
90
|
type: 'break';
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/** Options for {@link PptxPresentation.load}. */
|
|
94
|
+
export declare interface LoadOptions {
|
|
95
|
+
/**
|
|
96
|
+
* Opt in to loading theme-declared webfonts from Google Fonts
|
|
97
|
+
* (`fonts.googleapis.com`). When enabled, end-user IP/User-Agent is sent to
|
|
98
|
+
* Google, which may have privacy/GDPR implications for your application.
|
|
99
|
+
*
|
|
100
|
+
* Default: `false` — the canvas falls back to locally available fonts. Host
|
|
101
|
+
* the required webfonts yourself and reference them via `@font-face` in your
|
|
102
|
+
* application CSS to match the document's theme fonts.
|
|
103
|
+
*/
|
|
104
|
+
useGoogleFonts?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
93
107
|
export declare interface NoFill {
|
|
94
108
|
fillType: 'none';
|
|
95
109
|
}
|
|
@@ -194,7 +208,7 @@ export declare class PptxPresentation {
|
|
|
194
208
|
private _workerReadyCallbacks;
|
|
195
209
|
private constructor();
|
|
196
210
|
/** Parse a PPTX from URL or ArrayBuffer. */
|
|
197
|
-
static load(source: string | ArrayBuffer): Promise<PptxPresentation>;
|
|
211
|
+
static load(source: string | ArrayBuffer, opts?: LoadOptions): Promise<PptxPresentation>;
|
|
198
212
|
private _waitForWorker;
|
|
199
213
|
private _parse;
|
|
200
214
|
/** Total number of slides in the loaded presentation. */
|
|
@@ -243,6 +257,11 @@ export declare interface PptxViewerOptions extends RenderOptions {
|
|
|
243
257
|
onSlideChange?: (index: number, total: number) => void;
|
|
244
258
|
/** Called on parse or render errors */
|
|
245
259
|
onError?: (err: Error) => void;
|
|
260
|
+
/**
|
|
261
|
+
* Opt in to loading theme-declared webfonts from Google Fonts. Off by
|
|
262
|
+
* default — see {@link PptxPresentation.load} for privacy implications.
|
|
263
|
+
*/
|
|
264
|
+
useGoogleFonts?: boolean;
|
|
246
265
|
}
|
|
247
266
|
|
|
248
267
|
export declare interface Presentation {
|