pptx-react-viewer 1.1.6 → 1.1.7
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/{PowerPointViewer-CX0a7wz_.d.mts → PowerPointViewer-C5jGuKGB.d.mts} +3 -1
- package/dist/{PowerPointViewer-CX0a7wz_.d.ts → PowerPointViewer-C5jGuKGB.d.ts} +3 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1224 -454
- package/dist/index.mjs +1225 -455
- package/dist/pptx-viewer.css +1 -1
- package/dist/viewer/index.d.mts +6 -25
- package/dist/viewer/index.d.ts +6 -25
- package/dist/viewer/index.js +1224 -454
- package/dist/viewer/index.mjs +1225 -455
- package/node_modules/emf-converter/package.json +1 -1
- package/node_modules/mtx-decompressor/package.json +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-CTDG-t_z.d.ts → SvgExporter-BtZczTlB.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-BTkk4oNQ.d.mts → SvgExporter-D4mBWJHE.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
- package/node_modules/pptx-viewer-core/dist/index.d.mts +108 -19
- package/node_modules/pptx-viewer-core/dist/index.d.ts +108 -19
- package/node_modules/pptx-viewer-core/dist/index.js +532 -306
- package/node_modules/pptx-viewer-core/dist/index.mjs +524 -307
- package/node_modules/pptx-viewer-core/dist/{presentation-4fhI3din.d.mts → presentation-nZxgWvXq.d.mts} +40 -1
- package/node_modules/pptx-viewer-core/dist/{presentation-4fhI3din.d.ts → presentation-nZxgWvXq.d.ts} +40 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-C89Jn6S0.d.mts → text-operations-DCTGMltY.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-B9EwbptL.d.ts → text-operations-DYmhoi7U.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/package.json +1 -1
- package/package.json +4 -4
|
@@ -98,7 +98,42 @@ interface ShadowEffect {
|
|
|
98
98
|
/** Whether shadow rotates with shape. */
|
|
99
99
|
rotateWithShape?: boolean;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Strongly-typed parsed XML node from fast-xml-parser.
|
|
103
|
+
*
|
|
104
|
+
* The parser is configured with `attributeNamePrefix: '@_'`,
|
|
105
|
+
* `parseAttributeValue: false`, and `parseTagValue: false`, so attribute and
|
|
106
|
+
* text values are always strings at runtime. This type encodes that:
|
|
107
|
+
*
|
|
108
|
+
* - **Attributes** — keys matching `` `@_${string}` `` return
|
|
109
|
+
* `string | undefined` directly.
|
|
110
|
+
* - **Text content** — `#text` returns `string | undefined`.
|
|
111
|
+
* - **Child elements** — any other string key returns
|
|
112
|
+
* `XmlObject | XmlObject[] | string | undefined`. The union reflects that
|
|
113
|
+
* fast-xml-parser may emit an object (single child), an array (repeated
|
|
114
|
+
* children), or a bare string (text-only element collapsed by the parser).
|
|
115
|
+
*
|
|
116
|
+
* For traversal, prefer the helpers in {@link ./../utils/xml-access} —
|
|
117
|
+
* `xmlChild` / `xmlChildren` / `xmlAttr` / `xmlText` / `xmlPath` — which
|
|
118
|
+
* narrow the union and normalize the single-vs-array duality. Direct
|
|
119
|
+
* indexing works for attributes (typed as string) but chained child access
|
|
120
|
+
* (`obj['p:spPr']?.['a:xfrm']`) requires the helpers or a narrowing cast
|
|
121
|
+
* because TypeScript cannot index into the `XmlObject[] | string` part of
|
|
122
|
+
* the union.
|
|
123
|
+
*/
|
|
124
|
+
interface XmlObject {
|
|
125
|
+
/** Attributes (`@_`-prefixed keys) are always strings at runtime. */
|
|
126
|
+
[attr: `@_${string}`]: string | undefined;
|
|
127
|
+
/** Element text content surfaces under `#text` when present. */
|
|
128
|
+
'#text'?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Child elements keyed by their (namespaced) tag name. fast-xml-parser
|
|
131
|
+
* emits a single object for unique elements, an array for repeated ones,
|
|
132
|
+
* and a bare string for elements collapsed to their text content. Use
|
|
133
|
+
* the helpers in `utils/xml-access` to narrow this union.
|
|
134
|
+
*/
|
|
135
|
+
[child: string]: XmlObject | XmlObject[] | string | undefined;
|
|
136
|
+
}
|
|
102
137
|
/**
|
|
103
138
|
* Discriminant values for the `type` field on {@link PptxElement}.
|
|
104
139
|
*
|
|
@@ -5099,6 +5134,8 @@ interface PptxSlide {
|
|
|
5099
5134
|
id: string;
|
|
5100
5135
|
rId: string;
|
|
5101
5136
|
sourceSlideId?: string;
|
|
5137
|
+
/** Optional author-supplied slide name (set via `SlideBuilder.setName`). */
|
|
5138
|
+
name?: string;
|
|
5102
5139
|
layoutPath?: string;
|
|
5103
5140
|
layoutName?: string;
|
|
5104
5141
|
slideNumber: number;
|
|
@@ -5191,6 +5228,8 @@ interface PptxLayoutOption {
|
|
|
5191
5228
|
name: string;
|
|
5192
5229
|
/** Standard layout type from `p:sldLayout/@type` (e.g. "obj", "twoColTx", "blank"). */
|
|
5193
5230
|
type?: string;
|
|
5231
|
+
/** ZIP path of the slide master this layout belongs to. */
|
|
5232
|
+
masterPath?: string;
|
|
5194
5233
|
}
|
|
5195
5234
|
/**
|
|
5196
5235
|
* Header, footer, date-time, and slide-number placeholders.
|
package/node_modules/pptx-viewer-core/dist/{presentation-4fhI3din.d.ts → presentation-nZxgWvXq.d.ts}
RENAMED
|
@@ -98,7 +98,42 @@ interface ShadowEffect {
|
|
|
98
98
|
/** Whether shadow rotates with shape. */
|
|
99
99
|
rotateWithShape?: boolean;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Strongly-typed parsed XML node from fast-xml-parser.
|
|
103
|
+
*
|
|
104
|
+
* The parser is configured with `attributeNamePrefix: '@_'`,
|
|
105
|
+
* `parseAttributeValue: false`, and `parseTagValue: false`, so attribute and
|
|
106
|
+
* text values are always strings at runtime. This type encodes that:
|
|
107
|
+
*
|
|
108
|
+
* - **Attributes** — keys matching `` `@_${string}` `` return
|
|
109
|
+
* `string | undefined` directly.
|
|
110
|
+
* - **Text content** — `#text` returns `string | undefined`.
|
|
111
|
+
* - **Child elements** — any other string key returns
|
|
112
|
+
* `XmlObject | XmlObject[] | string | undefined`. The union reflects that
|
|
113
|
+
* fast-xml-parser may emit an object (single child), an array (repeated
|
|
114
|
+
* children), or a bare string (text-only element collapsed by the parser).
|
|
115
|
+
*
|
|
116
|
+
* For traversal, prefer the helpers in {@link ./../utils/xml-access} —
|
|
117
|
+
* `xmlChild` / `xmlChildren` / `xmlAttr` / `xmlText` / `xmlPath` — which
|
|
118
|
+
* narrow the union and normalize the single-vs-array duality. Direct
|
|
119
|
+
* indexing works for attributes (typed as string) but chained child access
|
|
120
|
+
* (`obj['p:spPr']?.['a:xfrm']`) requires the helpers or a narrowing cast
|
|
121
|
+
* because TypeScript cannot index into the `XmlObject[] | string` part of
|
|
122
|
+
* the union.
|
|
123
|
+
*/
|
|
124
|
+
interface XmlObject {
|
|
125
|
+
/** Attributes (`@_`-prefixed keys) are always strings at runtime. */
|
|
126
|
+
[attr: `@_${string}`]: string | undefined;
|
|
127
|
+
/** Element text content surfaces under `#text` when present. */
|
|
128
|
+
'#text'?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Child elements keyed by their (namespaced) tag name. fast-xml-parser
|
|
131
|
+
* emits a single object for unique elements, an array for repeated ones,
|
|
132
|
+
* and a bare string for elements collapsed to their text content. Use
|
|
133
|
+
* the helpers in `utils/xml-access` to narrow this union.
|
|
134
|
+
*/
|
|
135
|
+
[child: string]: XmlObject | XmlObject[] | string | undefined;
|
|
136
|
+
}
|
|
102
137
|
/**
|
|
103
138
|
* Discriminant values for the `type` field on {@link PptxElement}.
|
|
104
139
|
*
|
|
@@ -5099,6 +5134,8 @@ interface PptxSlide {
|
|
|
5099
5134
|
id: string;
|
|
5100
5135
|
rId: string;
|
|
5101
5136
|
sourceSlideId?: string;
|
|
5137
|
+
/** Optional author-supplied slide name (set via `SlideBuilder.setName`). */
|
|
5138
|
+
name?: string;
|
|
5102
5139
|
layoutPath?: string;
|
|
5103
5140
|
layoutName?: string;
|
|
5104
5141
|
slideNumber: number;
|
|
@@ -5191,6 +5228,8 @@ interface PptxLayoutOption {
|
|
|
5191
5228
|
name: string;
|
|
5192
5229
|
/** Standard layout type from `p:sldLayout/@type` (e.g. "obj", "twoColTx", "blank"). */
|
|
5193
5230
|
type?: string;
|
|
5231
|
+
/** ZIP path of the slide master this layout belongs to. */
|
|
5232
|
+
masterPath?: string;
|
|
5194
5233
|
}
|
|
5195
5234
|
/**
|
|
5196
5235
|
* Header, footer, date-time, and slide-number placeholders.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptx-react-viewer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "React-based PowerPoint viewer, editor, and canvas export — depends on pptx-viewer-core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"editor",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"clsx": "^2.1.1",
|
|
60
60
|
"dompurify": "^3.4.2",
|
|
61
|
-
"emf-converter": "^1.1.
|
|
61
|
+
"emf-converter": "^1.1.7",
|
|
62
62
|
"html2canvas-pro": "^2.0.2",
|
|
63
|
-
"mtx-decompressor": "^1.1.
|
|
64
|
-
"pptx-viewer-core": "^1.1.
|
|
63
|
+
"mtx-decompressor": "^1.1.7",
|
|
64
|
+
"pptx-viewer-core": "^1.1.7",
|
|
65
65
|
"tailwind-merge": "^3.5.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|