pptx-viewer-core 1.1.31 → 1.1.32

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/cli/index.js CHANGED
Binary file
Binary file
package/dist/index.d.mts CHANGED
@@ -3537,7 +3537,23 @@ declare function resolveModel3DMimeType(modelPath: string): string | undefined;
3537
3537
  * - Load: normalize Strict URIs to Transitional for internal processing
3538
3538
  * - Save: convert Transitional URIs back to Strict for round-trip fidelity
3539
3539
  *
3540
- * Reference: ECMA-376 5th Edition, Part 1, Annex A & B.
3540
+ * Only the markup-language families defined by ISO/IEC 29500-1 (Fundamentals
3541
+ * and Markup Language Reference) are remapped between conformance classes:
3542
+ * `presentationml`, `drawingml`, `spreadsheetml`, `wordprocessingml`,
3543
+ * `officeDocument` (including its relationship-type URIs), `schemaLibrary`, and
3544
+ * `descriptions`. This matches the authoritative translation table the Open XML
3545
+ * SDK applies when opening a Strict package.
3546
+ *
3547
+ * The Open Packaging Conventions (ISO/IEC 29500-2: `package/*` content-types and
3548
+ * relationships, and the OPC-defined relationship types such as
3549
+ * core-properties and digital-signature) and Markup Compatibility & Extensibility
3550
+ * (ISO/IEC 29500-3: `markup-compatibility/2006`) are SHARED, conformance-INDEPENDENT
3551
+ * specifications. Real Office "Strict Open XML" files keep those namespaces and
3552
+ * relationship types in their canonical `schemas.openxmlformats.org` form even
3553
+ * though the markup inside the parts uses Strict (`purl.oclc.org`) namespaces.
3554
+ * They are therefore intentionally NOT remapped here, in either direction.
3555
+ *
3556
+ * Reference: ECMA-376 5th Edition, Part 1, Annex A & B; ISO/IEC 29500 Parts 2-4.
3541
3557
  */
3542
3558
  /** OOXML conformance class. */
3543
3559
  type OoxmlConformanceClass = 'strict' | 'transitional';
package/dist/index.d.ts CHANGED
@@ -3537,7 +3537,23 @@ declare function resolveModel3DMimeType(modelPath: string): string | undefined;
3537
3537
  * - Load: normalize Strict URIs to Transitional for internal processing
3538
3538
  * - Save: convert Transitional URIs back to Strict for round-trip fidelity
3539
3539
  *
3540
- * Reference: ECMA-376 5th Edition, Part 1, Annex A & B.
3540
+ * Only the markup-language families defined by ISO/IEC 29500-1 (Fundamentals
3541
+ * and Markup Language Reference) are remapped between conformance classes:
3542
+ * `presentationml`, `drawingml`, `spreadsheetml`, `wordprocessingml`,
3543
+ * `officeDocument` (including its relationship-type URIs), `schemaLibrary`, and
3544
+ * `descriptions`. This matches the authoritative translation table the Open XML
3545
+ * SDK applies when opening a Strict package.
3546
+ *
3547
+ * The Open Packaging Conventions (ISO/IEC 29500-2: `package/*` content-types and
3548
+ * relationships, and the OPC-defined relationship types such as
3549
+ * core-properties and digital-signature) and Markup Compatibility & Extensibility
3550
+ * (ISO/IEC 29500-3: `markup-compatibility/2006`) are SHARED, conformance-INDEPENDENT
3551
+ * specifications. Real Office "Strict Open XML" files keep those namespaces and
3552
+ * relationship types in their canonical `schemas.openxmlformats.org` form even
3553
+ * though the markup inside the parts uses Strict (`purl.oclc.org`) namespaces.
3554
+ * They are therefore intentionally NOT remapped here, in either direction.
3555
+ *
3556
+ * Reference: ECMA-376 5th Edition, Part 1, Annex A & B; ISO/IEC 29500 Parts 2-4.
3541
3557
  */
3542
3558
  /** OOXML conformance class. */
3543
3559
  type OoxmlConformanceClass = 'strict' | 'transitional';
package/dist/index.js CHANGED
@@ -12010,7 +12010,11 @@ var PptxSaveConstantsFactory = class {
12010
12010
  slideAudioRelationshipType: "http://purl.oclc.org/ooxml/officeDocument/relationships/audio",
12011
12011
  slideCommentRelationshipType: "http://purl.oclc.org/ooxml/officeDocument/relationships/comments",
12012
12012
  slideNotesRelationshipType: "http://purl.oclc.org/ooxml/officeDocument/relationships/notesSlide",
12013
- relationshipsNamespace: "http://purl.oclc.org/ooxml/package/relationships",
12013
+ // The OPC relationships namespace (the xmlns of .rels parts) is
12014
+ // conformance-independent: real Strict packages keep the canonical
12015
+ // schemas.openxmlformats.org form. Only the relationship *type*
12016
+ // URIs above switch to Strict. See strict-namespace-map.ts.
12017
+ relationshipsNamespace: "http://schemas.openxmlformats.org/package/2006/relationships",
12014
12018
  // Content types are NOT namespace-dependent; they stay the same
12015
12019
  // in both Strict and Transitional conformance.
12016
12020
  slideContentType: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
@@ -20182,26 +20186,27 @@ var NAMESPACE_PAIRS = [
20182
20186
  "http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes",
20183
20187
  "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
20184
20188
  ],
20185
- // -- Package-level relationships --
20189
+ // -- OfficeDocument document relationship --
20190
+ // (Other OPC-defined relationship types - package/relationships,
20191
+ // core-properties, digital-signature - are conformance-independent and
20192
+ // intentionally omitted; see the module header.)
20186
20193
  [
20187
20194
  "http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument",
20188
20195
  "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
20189
20196
  ],
20197
+ // -- Schema Library --
20190
20198
  [
20191
- "http://purl.oclc.org/ooxml/package/relationships",
20192
- "http://schemas.openxmlformats.org/package/2006/relationships"
20199
+ "http://purl.oclc.org/ooxml/schemaLibrary/main",
20200
+ "http://schemas.openxmlformats.org/schemaLibrary/2006/main"
20193
20201
  ],
20202
+ // -- Content-type descriptions (note the distinct transitional host) --
20194
20203
  [
20195
- "http://purl.oclc.org/ooxml/package/relationships/metadata/core-properties",
20196
- "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
20204
+ "http://purl.oclc.org/ooxml/descriptions/base",
20205
+ "http://descriptions.openxmlformats.org/description/base"
20197
20206
  ],
20198
20207
  [
20199
- "http://purl.oclc.org/ooxml/package/relationships/digital-signature/origin",
20200
- "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
20201
- ],
20202
- [
20203
- "http://purl.oclc.org/ooxml/package/relationships/digital-signature/signature",
20204
- "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature"
20208
+ "http://purl.oclc.org/ooxml/descriptions/full",
20209
+ "http://descriptions.openxmlformats.org/description/full"
20205
20210
  ],
20206
20211
  // -- SpreadsheetML (for embedded charts / workbooks) --
20207
20212
  [
@@ -20212,11 +20217,6 @@ var NAMESPACE_PAIRS = [
20212
20217
  [
20213
20218
  "http://purl.oclc.org/ooxml/wordprocessingml/main",
20214
20219
  "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
20215
- ],
20216
- // -- Markup Compatibility --
20217
- [
20218
- "http://purl.oclc.org/ooxml/markup-compatibility/2006",
20219
- "http://schemas.openxmlformats.org/markup-compatibility/2006"
20220
20220
  ]
20221
20221
  ];
20222
20222
  var STRICT_TO_TRANSITIONAL_NS = new Map(NAMESPACE_PAIRS);
@@ -20230,7 +20230,8 @@ var ALGORITHMIC_FAMILIES = /* @__PURE__ */ new Set([
20230
20230
  "drawingml",
20231
20231
  "spreadsheetml",
20232
20232
  "wordprocessingml",
20233
- "officeDocument"
20233
+ "officeDocument",
20234
+ "schemaLibrary"
20234
20235
  ]);
20235
20236
  function deriveTransitionalUri(uri) {
20236
20237
  if (!uri.startsWith(STRICT_BASE)) {
@@ -36300,6 +36301,12 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
36300
36301
  xmlLookupService: this.xmlLookupService
36301
36302
  });
36302
36303
  this.deduplicateExtensionLists(this.presentationData);
36304
+ if (effectiveConformance === "transitional") {
36305
+ const presentationNode = this.presentationData["p:presentation"];
36306
+ if (presentationNode && "@_conformance" in presentationNode) {
36307
+ delete presentationNode["@_conformance"];
36308
+ }
36309
+ }
36303
36310
  const presentationXml2 = this.builder.build(this.presentationData);
36304
36311
  this.zip.file("ppt/presentation.xml", presentationXml2);
36305
36312
  }
package/dist/index.mjs CHANGED
@@ -12005,7 +12005,11 @@ var PptxSaveConstantsFactory = class {
12005
12005
  slideAudioRelationshipType: "http://purl.oclc.org/ooxml/officeDocument/relationships/audio",
12006
12006
  slideCommentRelationshipType: "http://purl.oclc.org/ooxml/officeDocument/relationships/comments",
12007
12007
  slideNotesRelationshipType: "http://purl.oclc.org/ooxml/officeDocument/relationships/notesSlide",
12008
- relationshipsNamespace: "http://purl.oclc.org/ooxml/package/relationships",
12008
+ // The OPC relationships namespace (the xmlns of .rels parts) is
12009
+ // conformance-independent: real Strict packages keep the canonical
12010
+ // schemas.openxmlformats.org form. Only the relationship *type*
12011
+ // URIs above switch to Strict. See strict-namespace-map.ts.
12012
+ relationshipsNamespace: "http://schemas.openxmlformats.org/package/2006/relationships",
12009
12013
  // Content types are NOT namespace-dependent; they stay the same
12010
12014
  // in both Strict and Transitional conformance.
12011
12015
  slideContentType: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
@@ -20177,26 +20181,27 @@ var NAMESPACE_PAIRS = [
20177
20181
  "http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes",
20178
20182
  "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
20179
20183
  ],
20180
- // -- Package-level relationships --
20184
+ // -- OfficeDocument document relationship --
20185
+ // (Other OPC-defined relationship types - package/relationships,
20186
+ // core-properties, digital-signature - are conformance-independent and
20187
+ // intentionally omitted; see the module header.)
20181
20188
  [
20182
20189
  "http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument",
20183
20190
  "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
20184
20191
  ],
20192
+ // -- Schema Library --
20185
20193
  [
20186
- "http://purl.oclc.org/ooxml/package/relationships",
20187
- "http://schemas.openxmlformats.org/package/2006/relationships"
20194
+ "http://purl.oclc.org/ooxml/schemaLibrary/main",
20195
+ "http://schemas.openxmlformats.org/schemaLibrary/2006/main"
20188
20196
  ],
20197
+ // -- Content-type descriptions (note the distinct transitional host) --
20189
20198
  [
20190
- "http://purl.oclc.org/ooxml/package/relationships/metadata/core-properties",
20191
- "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
20199
+ "http://purl.oclc.org/ooxml/descriptions/base",
20200
+ "http://descriptions.openxmlformats.org/description/base"
20192
20201
  ],
20193
20202
  [
20194
- "http://purl.oclc.org/ooxml/package/relationships/digital-signature/origin",
20195
- "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
20196
- ],
20197
- [
20198
- "http://purl.oclc.org/ooxml/package/relationships/digital-signature/signature",
20199
- "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature"
20203
+ "http://purl.oclc.org/ooxml/descriptions/full",
20204
+ "http://descriptions.openxmlformats.org/description/full"
20200
20205
  ],
20201
20206
  // -- SpreadsheetML (for embedded charts / workbooks) --
20202
20207
  [
@@ -20207,11 +20212,6 @@ var NAMESPACE_PAIRS = [
20207
20212
  [
20208
20213
  "http://purl.oclc.org/ooxml/wordprocessingml/main",
20209
20214
  "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
20210
- ],
20211
- // -- Markup Compatibility --
20212
- [
20213
- "http://purl.oclc.org/ooxml/markup-compatibility/2006",
20214
- "http://schemas.openxmlformats.org/markup-compatibility/2006"
20215
20215
  ]
20216
20216
  ];
20217
20217
  var STRICT_TO_TRANSITIONAL_NS = new Map(NAMESPACE_PAIRS);
@@ -20225,7 +20225,8 @@ var ALGORITHMIC_FAMILIES = /* @__PURE__ */ new Set([
20225
20225
  "drawingml",
20226
20226
  "spreadsheetml",
20227
20227
  "wordprocessingml",
20228
- "officeDocument"
20228
+ "officeDocument",
20229
+ "schemaLibrary"
20229
20230
  ]);
20230
20231
  function deriveTransitionalUri(uri) {
20231
20232
  if (!uri.startsWith(STRICT_BASE)) {
@@ -36295,6 +36296,12 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
36295
36296
  xmlLookupService: this.xmlLookupService
36296
36297
  });
36297
36298
  this.deduplicateExtensionLists(this.presentationData);
36299
+ if (effectiveConformance === "transitional") {
36300
+ const presentationNode = this.presentationData["p:presentation"];
36301
+ if (presentationNode && "@_conformance" in presentationNode) {
36302
+ delete presentationNode["@_conformance"];
36303
+ }
36304
+ }
36298
36305
  const presentationXml2 = this.builder.build(this.presentationData);
36299
36306
  this.zip.file("ppt/presentation.xml", presentationXml2);
36300
36307
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-viewer-core",
3
- "version": "1.1.31",
3
+ "version": "1.1.32",
4
4
  "description": "PowerPoint PPTX engine: parse, edit, serialize, and convert .pptx files. Framework-agnostic TypeScript SDK.",
5
5
  "keywords": [
6
6
  "converter",