@shbernal/ts-pptx 4.1.0 → 5.0.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 +11 -11
- package/dist/anim-presets-Qbgh8uut.js +55 -0
- package/dist/anim-presets-Qbgh8uut.js.map +1 -0
- package/dist/{autopage-D4kyVp11.js → autopage-DqZ37VpL.js} +11 -12
- package/dist/autopage-DqZ37VpL.js.map +1 -0
- package/dist/{binary-string-CKVAYI3M.js → binary-string-Ba8VM3b9.js} +3 -4
- package/dist/binary-string-Ba8VM3b9.js.map +1 -0
- package/dist/{body-insets-kVHmjGc6.js → body-insets-BDHymJvz.js} +7 -9
- package/dist/body-insets-BDHymJvz.js.map +1 -0
- package/dist/browser.d.ts +24 -16
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +19 -19
- package/dist/browser.js.map +1 -1
- package/dist/{image-size-DwDbakcl.js → chart-metadata-CwiTTcJq.js} +576 -538
- package/dist/chart-metadata-CwiTTcJq.js.map +1 -0
- package/dist/{clip-DHDlnHUq.d.ts → clip-ISfCMtWA.d.ts} +6 -10
- package/dist/clip-ISfCMtWA.d.ts.map +1 -0
- package/dist/{notes-BcT571R4.js → comments-CKIZYRbZ.js} +517 -389
- package/dist/comments-CKIZYRbZ.js.map +1 -0
- package/dist/{diagnostics-DiMmBU8P.d.ts → diagnostics-MoA4MBq5.d.ts} +52 -50
- package/dist/diagnostics-MoA4MBq5.d.ts.map +1 -0
- package/dist/{embedded-fonts-CI_YGW2d.d.ts → embedded-fonts-U7HIIhPO.d.ts} +4 -6
- package/dist/embedded-fonts-U7HIIhPO.d.ts.map +1 -0
- package/dist/{entry-compose-6hF9aTmT.d.ts → entry-compose-CiakSt-f.d.ts} +53 -74
- package/dist/entry-compose-CiakSt-f.d.ts.map +1 -0
- package/dist/{errors-Da2nXCJm.js → entry-errors-JMthgJ2g.js} +41 -25
- package/dist/entry-errors-JMthgJ2g.js.map +1 -0
- package/dist/{table-cell-margins-PDshga8T.js → enums-BP9wsb9Q.js} +42 -45
- package/dist/enums-BP9wsb9Q.js.map +1 -0
- package/dist/{enums-DQRpVOLh.d.ts → enums-PcXr3o3J.d.ts} +11 -12
- package/dist/{enums-DQRpVOLh.d.ts.map → enums-PcXr3o3J.d.ts.map} +1 -1
- package/dist/families.d.ts +24 -26
- package/dist/families.d.ts.map +1 -1
- package/dist/families.js +3 -4
- package/dist/{fit-CcXbg__l.js → fit-Bpmzep6O.js} +60 -52
- package/dist/fit-Bpmzep6O.js.map +1 -0
- package/dist/{font-metrics-CBGmhLo0.d.ts → font-metrics-DTppw4t3.d.ts} +61 -37
- package/dist/font-metrics-DTppw4t3.d.ts.map +1 -0
- package/dist/{grid-9B2w5EaY.js → grid-DUIMxjfl.js} +23 -26
- package/dist/grid-DUIMxjfl.js.map +1 -0
- package/dist/{html-dom-DvJmuHt2.js → html-dom-LZCgntnJ.js} +42 -43
- package/dist/html-dom-LZCgntnJ.js.map +1 -0
- package/dist/html.d.ts +53 -9
- package/dist/html.d.ts.map +1 -1
- package/dist/html.js +12 -13
- package/dist/html.js.map +1 -1
- package/dist/index.d.ts +21 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +14 -16
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +18 -19
- package/dist/inspect.js.map +1 -1
- package/dist/{text-anchor-BgLPbwbL.js → lock-attrs-CSQnFDHP.js} +62 -12
- package/dist/lock-attrs-CSQnFDHP.js.map +1 -0
- package/dist/math.d.ts +2 -4
- package/dist/math.d.ts.map +1 -1
- package/dist/math.js +12 -13
- package/dist/math.js.map +1 -1
- package/dist/measure.d.ts +23 -12
- package/dist/measure.d.ts.map +1 -1
- package/dist/measure.js +3 -3
- package/dist/node.d.ts +21 -13
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +12 -12
- package/dist/node.js.map +1 -1
- package/dist/{options-internal-WqgMf720.js → options-internal-BWgmLPdx.js} +4 -5
- package/dist/options-internal-BWgmLPdx.js.map +1 -0
- package/dist/{package-KoEgVwII.d.ts → package-CANBWuSm.d.ts} +4 -12
- package/dist/package-CANBWuSm.d.ts.map +1 -0
- package/dist/{playbtn-CUqQdoDf.js → playbtn-BQZFJir9.js} +4 -5
- package/dist/playbtn-BQZFJir9.js.map +1 -0
- package/dist/{pres-BA9_lJbY.d.ts → pres-BkEkUAEM.d.ts} +383 -230
- package/dist/pres-BkEkUAEM.d.ts.map +1 -0
- package/dist/{presentation-Cyl74rq2.js → presentation-4Ggq0_Xa.js} +408 -288
- package/dist/presentation-4Ggq0_Xa.js.map +1 -0
- package/dist/{presentation-types-B3VQH4Bz.d.ts → presentation-types-BgnZR-0a.d.ts} +1104 -457
- package/dist/presentation-types-BgnZR-0a.d.ts.map +1 -0
- package/dist/read.d.ts +18 -13
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +4 -4
- package/dist/script.d.ts +116 -65
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +2697 -777
- package/dist/script.js.map +1 -1
- package/dist/{shapes-BcyFdZpp.js → shapes-CAPOjU0Q.js} +1556 -487
- package/dist/shapes-CAPOjU0Q.js.map +1 -0
- package/dist/{slide-BqPtyKmb.d.ts → slide-BmT4kMoO.d.ts} +94 -86
- package/dist/slide-BmT4kMoO.d.ts.map +1 -0
- package/dist/{slide-size-BalTjFuv.js → slide-size-SkScz1ig.js} +2 -3
- package/dist/{slide-size-BalTjFuv.js.map → slide-size-SkScz1ig.js.map} +1 -1
- package/dist/{table-dom-CVbvUfgh.js → table-dom-BYga4FYY.js} +3 -4
- package/dist/{table-dom-CVbvUfgh.js.map → table-dom-BYga4FYY.js.map} +1 -1
- package/dist/{text-BvFFMMFQ.js → text-Dz0ArGIp.js} +365 -318
- package/dist/text-Dz0ArGIp.js.map +1 -0
- package/dist/{transition-speed-kUEWDWTx.js → transition-speed-CNJ0fSpQ.js} +2 -3
- package/dist/{transition-speed-kUEWDWTx.js.map → transition-speed-CNJ0fSpQ.js.map} +1 -1
- package/dist/{units-internal-DFcUYjh3.js → units-internal-BR3a4cIi.js} +26 -29
- package/dist/units-internal-BR3a4cIi.js.map +1 -0
- package/dist/{zip-CYZ0F6BV.js → zip-7JTh61LX.js} +8 -10
- package/dist/zip-7JTh61LX.js.map +1 -0
- package/dist/{zip-CTll_dr0.d.ts → zip-uUjs9Cqx.d.ts} +4 -6
- package/dist/zip-uUjs9Cqx.d.ts.map +1 -0
- package/dist/zip.d.ts +3 -3
- package/dist/zip.js +3 -3
- package/dist/{zoom-BoNyOlPm.js → zoom-CSSeOwM8.js} +1153 -583
- package/dist/zoom-CSSeOwM8.js.map +1 -0
- package/package.json +20 -21
- package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +27 -74
- package/dist/autopage-D4kyVp11.js.map +0 -1
- package/dist/binary-string-CKVAYI3M.js.map +0 -1
- package/dist/body-insets-kVHmjGc6.js.map +0 -1
- package/dist/clip-DHDlnHUq.d.ts.map +0 -1
- package/dist/diagnostics-DiMmBU8P.d.ts.map +0 -1
- package/dist/embedded-fonts-CI_YGW2d.d.ts.map +0 -1
- package/dist/entry-compose-6hF9aTmT.d.ts.map +0 -1
- package/dist/errors-Da2nXCJm.js.map +0 -1
- package/dist/fit-CcXbg__l.js.map +0 -1
- package/dist/font-metrics-CBGmhLo0.d.ts.map +0 -1
- package/dist/grid-9B2w5EaY.js.map +0 -1
- package/dist/html-dom-DvJmuHt2.js.map +0 -1
- package/dist/image-size-DwDbakcl.js.map +0 -1
- package/dist/notes-BcT571R4.js.map +0 -1
- package/dist/options-internal-WqgMf720.js.map +0 -1
- package/dist/package-KoEgVwII.d.ts.map +0 -1
- package/dist/playbtn-CUqQdoDf.js.map +0 -1
- package/dist/pres-BA9_lJbY.d.ts.map +0 -1
- package/dist/presentation-Cyl74rq2.js.map +0 -1
- package/dist/presentation-types-B3VQH4Bz.d.ts.map +0 -1
- package/dist/shapes-BcyFdZpp.js.map +0 -1
- package/dist/slide-BqPtyKmb.d.ts.map +0 -1
- package/dist/table-cell-margins-PDshga8T.js.map +0 -1
- package/dist/text-BvFFMMFQ.js.map +0 -1
- package/dist/text-anchor-BgLPbwbL.js.map +0 -1
- package/dist/units-internal-DFcUYjh3.js.map +0 -1
- package/dist/zip-CTll_dr0.d.ts.map +0 -1
- package/dist/zip-CYZ0F6BV.js.map +0 -1
- package/dist/zoom-BoNyOlPm.js.map +0 -1
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
//#region src/codes.d.ts
|
|
2
1
|
/**
|
|
3
|
-
* The library's condition vocabulary
|
|
2
|
+
* The library's condition vocabulary: one registry covering both surfaces a problem can take.
|
|
4
3
|
*
|
|
5
4
|
* A **code** names a *condition*, in `area/condition` form. The same condition keeps the same code
|
|
6
5
|
* whichever way it reaches the consumer: as a non-fatal {@link Diagnostic} (see `diagnostics.ts`)
|
|
7
|
-
* or as a thrown {@link
|
|
6
|
+
* or as a thrown {@link PptxTsError} (see `errors.ts`). `coord/non-finite` means "a coordinate was
|
|
8
7
|
* `NaN`/`Infinity`" in both directions, and a consumer that special-cases it only has to learn the
|
|
9
8
|
* one string.
|
|
10
9
|
*
|
|
11
10
|
* **A code is API; the message that carries it is not.** Adding a code is back-compatible;
|
|
12
11
|
* removing or renaming one is a breaking change. Every union here is closed, so a new warning or
|
|
13
|
-
* throw site cannot be written without naming its condition in this file
|
|
12
|
+
* throw site cannot be written without naming its condition in this file. That is the enforcement
|
|
14
13
|
* mechanism for keeping the vocabulary curated rather than accumulated. Reuse an existing code when
|
|
15
14
|
* the condition is genuinely the same, even if the wording differs and even if it is reported from
|
|
16
15
|
* a different entry point.
|
|
17
16
|
*
|
|
18
|
-
* The error codes are grouped by the {@link
|
|
17
|
+
* The error codes are grouped by the {@link PptxTsError} subclass that carries them, not by area,
|
|
19
18
|
* because that pairing is type-enforced: `new MediaError('coord/non-finite', …)` does not compile.
|
|
20
19
|
* A condition that can genuinely arrive under two different classes needs two codes, because the
|
|
21
20
|
* class is part of what the consumer branches on.
|
|
22
21
|
*
|
|
23
|
-
* This module is types only
|
|
22
|
+
* This module is types only. It emits no runtime code, so importing it can never create an import
|
|
24
23
|
* cycle and `diagnostics.ts` keeps the "safe to use from anywhere" property its header claims.
|
|
25
24
|
*/
|
|
26
25
|
/**
|
|
27
26
|
* The stable identifier for a non-fatal condition the library reports and then works around.
|
|
28
27
|
*
|
|
29
28
|
* Codes are shared across entry points where the *condition* is the same even though the message
|
|
30
|
-
* differs
|
|
29
|
+
* differs. An image whose natural size cannot be measured reports
|
|
31
30
|
* `image/unmeasurable-natural-size` whether it came from `addImage` or from `Picture.setImage`.
|
|
32
31
|
*/
|
|
33
|
-
type DiagnosticCode = 'object-name/empty' | 'object-name/control-characters' | 'object-name/too-long' | 'object-name/duplicate' | 'animation/target-index-out-of-range' | 'animation/target-not-found' | 'animation/target-missing' | 'animation/unknown-preset' | 'chart/invalid-axis-time-unit' | 'chart/non-finite-value' | 'chart/error-bars-missing-values' | 'chart/axis-type-conflict' | 'chart/invalid-metadata' | 'chart/invalid-metadata-key' | 'chart/invalid-metadata-value' | 'chart/option-out-of-range' | 'chart/option-not-on-axis' | 'chart/option-not-supported' | 'chart/invalid-option-value' | 'chart/invalid-subtotal-index' | 'chart/symbol-size-out-of-range' | 'chart/invalid-grid-line-size' | 'chart/invalid-grid-line-style' | 'chart/invalid-grid-line-cap' | 'chart/layout-out-of-range' | 'chart/stock-series-count' | 'chart/point-count-mismatch' | 'chart/point-index-out-of-range' | 'comment/missing-author' | 'comment/missing-text' | 'connector/bends-ignored-for-straight' | 'connector/adj-out-of-range' | 'connector/unresolved-binding' | 'group/unsupported-child' | 'group/unrecognized-child' | 'group/no-children' | 'group/partial-frame' | 'family/child-not-composed' | 'image-fill/missing-source' | 'image-fill/missing-base64-header' | 'image-fill/svg-unsupported' | 'image-fill/unresolved-media' | 'preview-image/missing-base64-header' | 'background/missing-base64-header' | 'image/crop-and-sizing-conflict' | 'image/unmeasurable-natural-size' | 'image/bilevel-threshold-out-of-range' | 'table/invalid-border' | 'table/invalid-outer-border' | 'table/invalid-horz-overflow' | 'table/invalid-cell3d' | 'table/col-width-count-mismatch' | 'table/invalid-col-width' | 'table/span-out-of-range' | 'table/cell-past-grid' | 'table/autopage-height-too-small' | 'table/autopage-rowspan-too-tall' | 'table/invalid-row-height' | 'table/invalid-margin' | 'table/invalid-header-row-count' | 'text/invalid-valign' | 'text/invalid-vertical' | 'text/invalid-warp' | 'text/invalid-columns' | 'text/invalid-column-spacing' | 'text/invalid-indent-level' | 'text/invalid-fit-percentage' | 'text/invalid-strike' | 'text/invalid-caps' | 'text/invalid-underline' | 'text/invalid-tab-alignment' | 'text/char-spacing-out-of-range' | 'text/line-spacing-out-of-range' | 'text/paragraph-margin-out-of-range' | 'text/paragraph-indent-out-of-range' | 'font/size-out-of-range' | 'bullet/size-out-of-range' | 'bullet/image-missing-base64-header' | 'bullet/image-embed-failed' | 'bullet/invalid-character-code' | 'bullet/start-at-out-of-range' | 'bullet/invalid-number-type' | 'transition/unknown-type' | 'transition/unknown-variant' | 'zoom/missing-target' | 'zoom/unresolved-target' | 'zoom/missing-section-title' | 'zoom/section-not-found' | 'zoom/section-empty' | 'zoom/no-sections-to-summarize' | 'zoom/transition-duration-out-of-range' | 'color/not-a-string' | 'color/invalid-value' | 'color/empty-string' | 'shadow/invalid-type' | 'shadow/angle-out-of-range' | 'glow/size-out-of-range' | 'shadow/blur-out-of-range' | 'shadow/offset-out-of-range' | 'shadow/transparency-out-of-range' | 'shadow/color-has-hash' | 'geometry/invalid-shape-adjust' | 'geometry/shape-adjust-overridden' | 'geometry/arc-node-point-ignored' | 'shape/degenerate-extent' | 'frame/zero-extent' | 'geometry/invalid-guide' | 'geometry/unknown-guide-operation' | 'geometry/invalid-connection-site' | 'border/unknown-key' | 'border/invalid-dash-type' | 'line/invalid-arrow-type' | 'object-lock/unsupported-on-shape' | 'media/load-failed' | 'media/svg-preview-failed' | 'model3d/preview-missing' | 'media/invalid-loop-count' | 'theme/invalid-color-override' | 'master/invalid-text-style-font-size' | 'master/invalid-text-style-length' | 'master/too-many-text-style-levels' | 'notes/hyperlink-slide-unsupported' | 'html/image-missing-source' | 'section/missing-argument' | 'section/missing-title' | 'section/duplicate-title' | 'section/invalid-order' | 'slide/section-not-found' | 'slide/master-not-found' | 'slide/removed-link-target' | 'layout/invalid-definition' | 'core/revision-not-a-whole-number' | 'diagram/drawing-cache-not-updated' | 'diagram/point-has-no-text-body' | 'inspect/group-transform-missing' | 'inspect/group-transform-degenerate' | 'measure/shrink-unmeasured' | 'measure/resize-unmeasured' | 'measure/heuristic-metrics' | 'measure/uncovered-codepoints' | 'margin/legacy-points' | 'gradient/center-out-of-range' | 'transparency/out-of-range' | 'opacity/out-of-range' | 'line/width-out-of-range' | 'coord/bare-number-is-inches' | 'layout/size-out-of-range';
|
|
32
|
+
type DiagnosticCode = 'object-name/empty' | 'object-name/control-characters' | 'object-name/too-long' | 'object-name/duplicate' | 'animation/target-index-out-of-range' | 'animation/target-not-found' | 'animation/target-missing' | 'animation/unknown-preset' | 'chart/invalid-axis-time-unit' | 'chart/non-finite-value' | 'chart/error-bars-missing-values' | 'chart/axis-type-conflict' | 'chart/invalid-metadata' | 'chart/invalid-metadata-key' | 'chart/invalid-metadata-value' | 'chart/option-out-of-range' | 'chart/option-not-on-axis' | 'chart/option-not-supported' | 'chart/invalid-option-value' | 'chart/invalid-subtotal-index' | 'chart/symbol-size-out-of-range' | 'chart/invalid-grid-line-size' | 'chart/invalid-grid-line-style' | 'chart/invalid-grid-line-cap' | 'chart/layout-out-of-range' | 'chart/stock-series-count' | 'chart/point-count-mismatch' | 'chart/point-index-out-of-range' | 'comment/missing-author' | 'comment/missing-text' | 'connector/bends-ignored-for-straight' | 'connector/adj-out-of-range' | 'connector/unresolved-binding' | 'group/unsupported-child' | 'group/unrecognized-child' | 'group/no-children' | 'group/partial-frame' | 'family/child-not-composed' | 'image-fill/missing-source' | 'image-fill/missing-base64-header' | 'image-fill/svg-unsupported' | 'image-fill/unresolved-media' | 'preview-image/missing-base64-header' | 'background/missing-base64-header' | 'image/crop-and-sizing-conflict' | 'image/unmeasurable-natural-size' | 'image/bilevel-threshold-out-of-range' | 'table/invalid-border' | 'table/invalid-outer-border' | 'table/invalid-horz-overflow' | 'table/invalid-cell3d' | 'table/col-width-count-mismatch' | 'table/invalid-col-width' | 'table/span-out-of-range' | 'table/cell-past-grid' | 'table/autopage-height-too-small' | 'table/autopage-rowspan-too-tall' | 'table/invalid-row-height' | 'table/invalid-margin' | 'table/invalid-header-row-count' | 'table/option-not-supported' | 'text/invalid-valign' | 'text/invalid-vertical' | 'text/invalid-warp' | 'text/invalid-columns' | 'text/invalid-column-spacing' | 'text/invalid-indent-level' | 'text/invalid-fit-percentage' | 'text/invalid-strike' | 'text/invalid-caps' | 'text/invalid-underline' | 'text/invalid-tab-alignment' | 'text/char-spacing-out-of-range' | 'text/kerning-out-of-range' | 'text/line-spacing-out-of-range' | 'text/paragraph-margin-out-of-range' | 'text/paragraph-indent-out-of-range' | 'font/size-out-of-range' | 'bullet/size-out-of-range' | 'bullet/image-missing-base64-header' | 'bullet/image-embed-failed' | 'bullet/invalid-character-code' | 'bullet/start-at-out-of-range' | 'bullet/invalid-number-type' | 'transition/unknown-type' | 'transition/unknown-variant' | 'zoom/missing-target' | 'zoom/unresolved-target' | 'zoom/missing-section-title' | 'zoom/section-not-found' | 'zoom/section-empty' | 'zoom/no-sections-to-summarize' | 'zoom/transition-duration-out-of-range' | 'color/not-a-string' | 'color/invalid-value' | 'color/empty-string' | 'shadow/invalid-type' | 'shadow/angle-out-of-range' | 'glow/size-out-of-range' | 'shadow/blur-out-of-range' | 'shadow/offset-out-of-range' | 'shadow/transparency-out-of-range' | 'shadow/color-has-hash' | 'geometry/invalid-shape-adjust' | 'geometry/shape-adjust-overridden' | 'geometry/arc-node-point-ignored' | 'shape/degenerate-extent' | 'frame/zero-extent' | 'geometry/invalid-guide' | 'geometry/unknown-guide-operation' | 'geometry/invalid-connection-site' | 'border/unknown-key' | 'border/invalid-dash-type' | 'line/invalid-arrow-type' | 'object-lock/unsupported-on-shape' | 'media/load-failed' | 'media/svg-preview-failed' | 'model3d/preview-missing' | 'media/invalid-loop-count' | 'media/option-not-supported' | 'theme/invalid-color-override' | 'master/invalid-text-style-font-size' | 'master/invalid-text-style-length' | 'master/too-many-text-style-levels' | 'notes/hyperlink-slide-unsupported' | 'html/image-missing-source' | 'section/missing-argument' | 'section/missing-title' | 'section/duplicate-title' | 'section/invalid-order' | 'slide/section-not-found' | 'slide/master-not-found' | 'slide/removed-link-target' | 'layout/invalid-definition' | 'core/revision-not-a-whole-number' | 'diagram/drawing-cache-not-updated' | 'diagram/point-has-no-text-body' | 'inspect/group-transform-missing' | 'inspect/group-transform-degenerate' | 'measure/shrink-unmeasured' | 'measure/resize-unmeasured' | 'measure/heuristic-metrics' | 'measure/uncovered-codepoints' | 'margin/legacy-points' | 'gradient/center-out-of-range' | 'transparency/out-of-range' | 'opacity/out-of-range' | 'line/width-out-of-range' | 'coord/bare-number-is-inches' | 'layout/size-out-of-range';
|
|
34
33
|
/**
|
|
35
34
|
* Conditions carried by `InvalidOptionError`: the caller passed something the library cannot use.
|
|
36
35
|
*
|
|
37
|
-
* This is the largest group by design
|
|
38
|
-
* (`
|
|
36
|
+
* This is the largest group by design: the project's stated policy is to throw rather than coerce
|
|
37
|
+
* (`docs/contributing/development.md` → "Warn or throw?"), so most throws are here.
|
|
39
38
|
*/
|
|
40
|
-
type InvalidOptionErrorCode = 'coord/non-finite' | 'percent/non-finite' | 'coord/not-positive' | 'coord/invalid-format' | 'coord/out-of-range' | 'bullet/start-at-not-a-number' | 'presentation/first-slide-num-not-an-integer' | 'geometry/arc-angle-non-finite' | 'shadow/angle-non-finite' | 'chart/missing-type' | 'chart/option-non-finite' | 'chart/unknown-type' | 'chart/secondary-axis-unused' | 'chart/axis-count-mismatch' | 'chart/too-many-columns' | 'chart/bubble-in-combo' | 'shape/missing-type' | 'shape/unknown-preset' | 'connector/missing-endpoints' | 'connector/invalid-type' | 'connector/invalid-bends' | 'connector/adj-count-mismatch' | 'connector/adj-non-finite' | 'connector/invalid-binding-name' | 'connector/invalid-connection-site' | 'line/invalid-cap' | 'group/missing-object-names' | 'group/invalid-object-name' | 'group/duplicate-object-name' | 'group/unresolved-object-name' | 'group/ambiguous-object-name' | 'gradient/angle-non-finite' | 'gradient/too-few-stops' | 'gradient/stop-position-non-finite' | 'gradient/stop-position-out-of-range' | 'gradient/rotate-with-shape-not-boolean' | 'gradient/scaled-not-boolean' | 'pattern-fill/missing-pattern' | 'pattern-fill/invalid-preset' | 'image/missing-source' | 'image/path-not-a-string' | 'image/data-not-a-string' | 'image/missing-base64-header' | 'image/crop-window-overflows' | 'image/crop-inset-out-of-range' | 'image/crop-insets-exceed-extent' | 'media/missing-source' | 'media/missing-base64-header' | 'media/cover-missing-base64-header' | 'media/online-missing-link' | 'ole/missing-source' | 'ole/invalid-image-size' | 'zoom/invalid-transition-duration' | 'transition/invalid-time' | 'transition/sound-unsupported' | 'model3d/missing-source' | 'model3d/invalid-camera' | 'model3d/invalid-fov' | 'model3d/invalid-scale' | 'layout/invalid-definition' | 'table/rows-not-an-array' | 'table/rows-not-nested' | 'table/invalid-style-id' | 'table/invalid-cell-anchor' | 'table/invalid-cell-vert' | 'table/invalid-cell-overflow' | 'table/invalid-cell-margin' | 'table/invalid-cell-border' | 'table/row-index-out-of-range' | 'table/column-index-out-of-range' | 'table/merge-range-invalid' | 'hyperlink/not-an-object' | 'hyperlink/missing-target' | 'hyperlink/conflicting-targets' | 'hyperlink/invalid-slide' | 'slide/link-past-last-slide' | 'text/invalid-text' | 'clip/invalid-shape' | 'html/no-document' | 'html/table-not-found' | 'html/table-has-no-cells' | 'color/invalid-hex' | 'color/invalid-scheme-token' | 'text/invalid-underline' | 'slide/index-out-of-range' | 'slide/foreign-target' | 'slide/id-space-exhausted' | 'shape/index-out-of-range' | 'layout/ambiguous-name' | 'layout/not-found' | 'layout/foreign-handle' | 'import/slide-size-mismatch' | 'import/slide-size-unknown' | 'import/unresolved-slide-link' | 'import/destination-missing-master' | 'import/destination-missing-layout' | 'import/output-index-conflict' | 'import/output-index-out-of-range' | 'import/rescale-conflict' | 'image/undeterminable-extension' | 'image/undeterminable-type' | 'image/missing-content-type' | 'image/fit-needs-extent' | 'font/size-not-positive' | 'script/unresolved-asset-reference' | 'script/non-finite-literal' | 'package/duplicate-part-name' | 'part/not-xml' | 'relationship/duplicate-id' | 'relationship/not-found' | 'relationship/external-has-no-partname' | 'oxml/unknown-namespace-prefix' | 'oxml/invalid-qname' | 'font/missing-typeface' | 'font/invalid-style-slot' | 'font/invalid-base64' | 'font/missing-source' | 'font/collection-index-out-of-range' | 'font/collection-face-not-found' | 'layout/unknown' | 'master/missing-title' | 'math/invalid-latex' | 'math/invalid-mathml' | 'zip/unsupported-input' | 'zip/unsupported-output';
|
|
39
|
+
type InvalidOptionErrorCode = 'coord/non-finite' | 'percent/non-finite' | 'coord/not-positive' | 'coord/invalid-format' | 'coord/out-of-range' | 'bullet/start-at-not-a-number' | 'presentation/first-slide-num-not-an-integer' | 'geometry/arc-angle-non-finite' | 'shadow/angle-non-finite' | 'chart/missing-type' | 'chart/option-non-finite' | 'chart/unknown-type' | 'chart/secondary-axis-unused' | 'chart/axis-count-mismatch' | 'chart/too-many-columns' | 'chart/bubble-in-combo' | 'shape/missing-type' | 'shape/unknown-preset' | 'connector/missing-endpoints' | 'connector/invalid-type' | 'connector/invalid-bends' | 'connector/adj-count-mismatch' | 'connector/adj-non-finite' | 'connector/invalid-binding-name' | 'connector/invalid-connection-site' | 'line/invalid-cap' | 'group/missing-object-names' | 'group/invalid-object-name' | 'group/duplicate-object-name' | 'group/unresolved-object-name' | 'group/ambiguous-object-name' | 'gradient/angle-non-finite' | 'gradient/too-few-stops' | 'gradient/stop-position-non-finite' | 'gradient/stop-position-out-of-range' | 'gradient/rotate-with-shape-not-boolean' | 'gradient/scaled-not-boolean' | 'pattern-fill/missing-pattern' | 'pattern-fill/invalid-preset' | 'image/missing-source' | 'image/path-not-a-string' | 'image/data-not-a-string' | 'image/missing-base64-header' | 'image/crop-window-overflows' | 'image/crop-inset-out-of-range' | 'image/crop-insets-exceed-extent' | 'placeholder/invalid-idx' | 'placeholder/invalid-type' | 'media/missing-source' | 'media/missing-base64-header' | 'media/cover-missing-base64-header' | 'media/online-missing-link' | 'ole/missing-source' | 'ole/invalid-image-size' | 'zoom/invalid-transition-duration' | 'transition/invalid-time' | 'transition/sound-unsupported' | 'model3d/missing-source' | 'model3d/invalid-camera' | 'model3d/invalid-fov' | 'model3d/invalid-scale' | 'layout/invalid-definition' | 'table/rows-not-an-array' | 'table/rows-not-nested' | 'table/invalid-style-id' | 'table/invalid-cell-anchor' | 'table/invalid-cell-vert' | 'table/invalid-cell-overflow' | 'table/invalid-cell-margin' | 'table/invalid-cell-border' | 'table/row-index-out-of-range' | 'table/column-index-out-of-range' | 'table/merge-range-invalid' | 'hyperlink/not-an-object' | 'hyperlink/missing-target' | 'hyperlink/conflicting-targets' | 'hyperlink/invalid-slide' | 'hyperlink/invalid-action' | 'slide/link-past-last-slide' | 'text/invalid-text' | 'clip/invalid-shape' | 'html/no-document' | 'html/table-not-found' | 'html/table-has-no-cells' | 'color/invalid-hex' | 'color/invalid-scheme-token' | 'text/invalid-underline' | 'slide/index-out-of-range' | 'slide/foreign-target' | 'slide/id-space-exhausted' | 'shape/index-out-of-range' | 'layout/missing' | 'layout/ambiguous-name' | 'layout/not-found' | 'layout/foreign-handle' | 'import/slide-size-mismatch' | 'import/slide-size-unknown' | 'import/unresolved-slide-link' | 'import/destination-missing-master' | 'import/destination-missing-layout' | 'import/output-index-conflict' | 'import/output-index-out-of-range' | 'import/rescale-conflict' | 'image/undeterminable-extension' | 'image/undeterminable-type' | 'image/missing-content-type' | 'image/fit-needs-extent' | 'font/size-not-positive' | 'script/unresolved-asset-reference' | 'script/non-finite-literal' | 'package/duplicate-part-name' | 'part/not-xml' | 'relationship/duplicate-id' | 'relationship/not-found' | 'relationship/external-has-no-partname' | 'oxml/unknown-namespace-prefix' | 'oxml/invalid-qname' | 'font/missing-typeface' | 'font/invalid-style-slot' | 'font/invalid-base64' | 'font/missing-source' | 'font/collection-index-out-of-range' | 'font/collection-face-not-found' | 'layout/unknown' | 'master/missing-title' | 'math/invalid-latex' | 'math/invalid-mathml' | 'zip/unsupported-input' | 'zip/unsupported-output';
|
|
41
40
|
/**
|
|
42
41
|
* Conditions carried by `UnsupportedFeatureError`: the request is well-formed, but this build,
|
|
43
42
|
* runtime, or shape cannot express it. Distinct from `InvalidOptionError` because the caller did
|
|
44
|
-
* nothing wrong
|
|
43
|
+
* nothing wrong: the answer is "not here", not "not like that".
|
|
45
44
|
*/
|
|
46
45
|
type UnsupportedFeatureErrorCode = 'gradient/type-unsupported' | 'line/image-fill-unsupported' | 'group/kind-not-groupable' | 'shape/element-unsupported' | 'shape/fill-unsupported' | 'shape/line-unsupported' | 'shape/no-text-frame' | 'math/missing-optional-peer' | 'font/opentype-unavailable' | 'zip/filesystem-unavailable' | 'runtime/file-output-unavailable' | 'family/not-composed';
|
|
47
46
|
/**
|
|
@@ -59,18 +58,18 @@ type PackageReadErrorCode = 'zip/not-a-zip-archive' | 'zip/file-read-failed' | '
|
|
|
59
58
|
type MediaErrorCode = 'media/load-failed' | 'font/fetch-failed' | 'font/read-failed' | 'font/parse-failed' | 'media/fetch-failed' | 'media/read-failed' | 'media/decode-failed' | 'media/svg-preview-failed';
|
|
60
59
|
/**
|
|
61
60
|
* Conditions carried by `InternalError`: an invariant the library maintains itself did not hold.
|
|
62
|
-
* Reaching one is a bug in pptx-ts, not something a consumer can fix by changing their input
|
|
61
|
+
* Reaching one is a bug in pptx-ts, not something a consumer can fix by changing their input,
|
|
63
62
|
* which is exactly why it is worth being able to tell apart from the four classes above.
|
|
64
63
|
*/
|
|
65
|
-
type InternalErrorCode = 'layout/default-not-registered' | 'slide/rel-index-out-of-range' | 'slide/part-already-in-deck' | 'import/part-went-missing' | 'import/slide-link-not-placed' | 'import/rescale-mode-changed' | 'chart/type-not-routed' | 'slide/object-type-not-routed' | 'ooxml/member-not-in-sequence' | 'slide/link-target-not-a-number' | 'hyperlink/not-validated' | 'animation/timing-scaffold-failed' | 'media/rel-ids-not-consecutive' | 'oxml/node-has-no-document' | 'oxml/node-has-no-parent';
|
|
64
|
+
type InternalErrorCode = 'layout/default-not-registered' | 'slide/rel-index-out-of-range' | 'comment/not-resolved' | 'slide/part-already-in-deck' | 'import/part-went-missing' | 'import/slide-link-not-placed' | 'import/rescale-mode-changed' | 'chart/type-not-routed' | 'slide/object-type-not-routed' | 'ooxml/member-not-in-sequence' | 'slide/link-target-not-a-number' | 'hyperlink/not-validated' | 'animation/timing-scaffold-failed' | 'media/rel-ids-not-consecutive' | 'oxml/node-has-no-document' | 'oxml/node-has-no-parent';
|
|
66
65
|
/**
|
|
67
|
-
* Every condition the library can throw. See {@link
|
|
66
|
+
* Every condition the library can throw. See {@link PptxTsCode} for the whole vocabulary.
|
|
68
67
|
*
|
|
69
68
|
* **Which of these is worth reporting upstream.** An `InternalErrorCode` always is, and the error
|
|
70
69
|
* carrying it says so at runtime. A `PackageReadErrorCode` on a file that opens cleanly in
|
|
71
70
|
* PowerPoint, a `MediaErrorCode` on an asset every other tool loads, and an
|
|
72
71
|
* `UnsupportedFeatureErrorCode` for something PowerPoint can plainly express are all gaps on our
|
|
73
|
-
* side rather than bad input
|
|
72
|
+
* side rather than bad input. The project's supported bar is "the output opens cleanly in
|
|
74
73
|
* Microsoft PowerPoint", and it reads in both directions. An `InvalidOptionErrorCode` is worth
|
|
75
74
|
* reporting only if the deck it refused is one PowerPoint can express.
|
|
76
75
|
*
|
|
@@ -78,11 +77,9 @@ type InternalErrorCode = 'layout/default-not-registered' | 'slide/rel-index-out-
|
|
|
78
77
|
*/
|
|
79
78
|
type ErrorCode = InvalidOptionErrorCode | UnsupportedFeatureErrorCode | PackageReadErrorCode | MediaErrorCode | InternalErrorCode;
|
|
80
79
|
/** Every condition the library can report, warned or thrown. */
|
|
81
|
-
type
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
/** Extra context accepted by every {@link TsPptxError} constructor. */
|
|
85
|
-
interface TsPptxErrorOptions extends ErrorOptions {
|
|
80
|
+
type PptxTsCode = DiagnosticCode | ErrorCode;
|
|
81
|
+
/** Extra context accepted by every {@link PptxTsError} constructor. */
|
|
82
|
+
interface PptxTsErrorOptions extends ErrorOptions {
|
|
86
83
|
/**
|
|
87
84
|
* Structured context for the condition, when a site has any to give. Mirrors `Diagnostic.detail`
|
|
88
85
|
* so the same condition looks the same whether it was warned or thrown.
|
|
@@ -93,11 +90,11 @@ interface TsPptxErrorOptions extends ErrorOptions {
|
|
|
93
90
|
* Base class for every error pptx-ts throws.
|
|
94
91
|
*
|
|
95
92
|
* Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch
|
|
96
|
-
* on {@link
|
|
93
|
+
* on {@link PptxTsError.code}, to react to something specific. It is never thrown directly: every
|
|
97
94
|
* site picks one of the five subclasses.
|
|
98
95
|
*/
|
|
99
|
-
declare class
|
|
100
|
-
/** Stable condition identifier
|
|
96
|
+
declare class PptxTsError extends Error {
|
|
97
|
+
/** Stable condition identifier (see {@link ErrorCode}). Branch on this, not on the text. */
|
|
101
98
|
readonly code: ErrorCode;
|
|
102
99
|
/** Structured context for the condition, when the throwing site had any to give. */
|
|
103
100
|
readonly detail?: Readonly<Record<string, unknown>>;
|
|
@@ -106,55 +103,55 @@ declare class TsPptxError extends Error {
|
|
|
106
103
|
* @param message - explanation for a human reading a stack trace; not part of the contract
|
|
107
104
|
* @param options - standard `cause`, plus optional structured `detail`
|
|
108
105
|
*/
|
|
109
|
-
constructor(code: ErrorCode, message: string, options?:
|
|
106
|
+
constructor(code: ErrorCode, message: string, options?: PptxTsErrorOptions);
|
|
110
107
|
}
|
|
111
108
|
/**
|
|
112
|
-
* The caller passed something the library cannot use
|
|
109
|
+
* The caller passed something the library cannot use: a non-finite coordinate, an unknown enum
|
|
113
110
|
* value, a required option left out, a value outside its legal range.
|
|
114
111
|
*
|
|
115
112
|
* This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate
|
|
116
113
|
* result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses
|
|
117
114
|
* instead. Reaching one means the calling code needs to change.
|
|
118
115
|
*/
|
|
119
|
-
declare class InvalidOptionError extends
|
|
116
|
+
declare class InvalidOptionError extends PptxTsError {
|
|
120
117
|
readonly code: InvalidOptionErrorCode;
|
|
121
|
-
constructor(code: InvalidOptionErrorCode, message: string, options?:
|
|
118
|
+
constructor(code: InvalidOptionErrorCode, message: string, options?: PptxTsErrorOptions);
|
|
122
119
|
}
|
|
123
120
|
/**
|
|
124
121
|
* The request is well-formed but cannot be expressed here: an optional peer dependency is not
|
|
125
122
|
* installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the
|
|
126
123
|
* library emits.
|
|
127
124
|
*
|
|
128
|
-
* Distinct from {@link InvalidOptionError} because the caller did nothing wrong
|
|
129
|
-
* "not here", not "not like that"
|
|
125
|
+
* Distinct from {@link InvalidOptionError} because the caller did nothing wrong (the answer is
|
|
126
|
+
* "not here", not "not like that"), and the fix is usually to install something or pick a different
|
|
130
127
|
* approach rather than to correct a value.
|
|
131
128
|
*/
|
|
132
|
-
declare class UnsupportedFeatureError extends
|
|
129
|
+
declare class UnsupportedFeatureError extends PptxTsError {
|
|
133
130
|
readonly code: UnsupportedFeatureErrorCode;
|
|
134
|
-
constructor(code: UnsupportedFeatureErrorCode, message: string, options?:
|
|
131
|
+
constructor(code: UnsupportedFeatureErrorCode, message: string, options?: PptxTsErrorOptions);
|
|
135
132
|
}
|
|
136
133
|
/**
|
|
137
134
|
* The bytes handed to the library are not a package it can read, or a part inside one is
|
|
138
|
-
* structurally malformed
|
|
135
|
+
* structurally malformed: a missing `[Content_Types].xml`, a relationship pointing at nothing, a
|
|
139
136
|
* slide part with no root element.
|
|
140
137
|
*
|
|
141
138
|
* Always about *input*. A problem with something the library is being asked to produce is an
|
|
142
139
|
* {@link InvalidOptionError}.
|
|
143
140
|
*/
|
|
144
|
-
declare class PackageReadError extends
|
|
141
|
+
declare class PackageReadError extends PptxTsError {
|
|
145
142
|
readonly code: PackageReadErrorCode;
|
|
146
|
-
constructor(code: PackageReadErrorCode, message: string, options?:
|
|
143
|
+
constructor(code: PackageReadErrorCode, message: string, options?: PptxTsErrorOptions);
|
|
147
144
|
}
|
|
148
145
|
/**
|
|
149
146
|
* A referenced image, font, or audio/video resource could not be fetched, read, or decoded.
|
|
150
147
|
*
|
|
151
148
|
* Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points
|
|
152
|
-
* at*, not in the package structure
|
|
149
|
+
* at*, not in the package structure (a broken URL, an unreadable path, a corrupt font file), and
|
|
153
150
|
* a consumer typically retries or substitutes rather than rejecting the deck.
|
|
154
151
|
*/
|
|
155
|
-
declare class MediaError extends
|
|
152
|
+
declare class MediaError extends PptxTsError {
|
|
156
153
|
readonly code: MediaErrorCode;
|
|
157
|
-
constructor(code: MediaErrorCode, message: string, options?:
|
|
154
|
+
constructor(code: MediaErrorCode, message: string, options?: PptxTsErrorOptions);
|
|
158
155
|
}
|
|
159
156
|
/**
|
|
160
157
|
* An invariant the library maintains itself did not hold.
|
|
@@ -165,23 +162,29 @@ declare class MediaError extends TsPptxError {
|
|
|
165
162
|
*
|
|
166
163
|
* It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`
|
|
167
164
|
* below the invariant that broke. The constructor is where that lives so a throw site added later
|
|
168
|
-
* inherits it
|
|
165
|
+
* inherits it. The alternative, a notice pasted at each of the sites, is one every future site can
|
|
169
166
|
* forget. Every other class leaves `message` exactly as given: a malformed package is the routine
|
|
170
167
|
* outcome for a library that reads untrusted files, and a "report this" banner on each corrupt
|
|
171
168
|
* input would train callers to ignore the one banner that always means something.
|
|
172
169
|
*
|
|
173
|
-
* This does not make the message API
|
|
170
|
+
* This does not make the message API (see the class doc on {@link PptxTsError}). Branch on
|
|
174
171
|
* `instanceof` or on {@link InternalError.code}, never on the text.
|
|
175
172
|
*/
|
|
176
|
-
declare class InternalError extends
|
|
173
|
+
declare class InternalError extends PptxTsError {
|
|
177
174
|
readonly code: InternalErrorCode;
|
|
178
|
-
constructor(code: InternalErrorCode, message: string, options?:
|
|
175
|
+
constructor(code: InternalErrorCode, message: string, options?: PptxTsErrorOptions);
|
|
179
176
|
}
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
/** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */
|
|
178
|
+
declare const TsPptxError: typeof PptxTsError;
|
|
179
|
+
/** @deprecated Renamed to {@link PptxTsError}. This alias is removed in v5. */
|
|
180
|
+
type TsPptxError = PptxTsError;
|
|
181
|
+
/** @deprecated Renamed to {@link PptxTsErrorOptions}. This alias is removed in v5. */
|
|
182
|
+
type TsPptxErrorOptions = PptxTsErrorOptions;
|
|
183
|
+
/** @deprecated Renamed to {@link PptxTsCode}. This alias is removed in v5. */
|
|
184
|
+
type TsPptxCode = PptxTsCode;
|
|
182
185
|
/** One diagnostic emitted by the library. */
|
|
183
186
|
interface Diagnostic {
|
|
184
|
-
/** Stable condition identifier
|
|
187
|
+
/** Stable condition identifier; see {@link DiagnosticCode}. Branch on this, not on the text. */
|
|
185
188
|
readonly code: DiagnosticCode;
|
|
186
189
|
/** Human-readable explanation. Free to change in any release; do not parse it. */
|
|
187
190
|
readonly message: string;
|
|
@@ -189,7 +192,7 @@ interface Diagnostic {
|
|
|
189
192
|
* Structured context for the condition, when a site has any to give.
|
|
190
193
|
*
|
|
191
194
|
* Every rejection of an `ST_` enum value populates it: `checkEnumOrWarn` (`ooxml/check-enum.ts`)
|
|
192
|
-
* carries `received`
|
|
195
|
+
* carries `received` (the value the caller passed) and `valid`, the whole legal list, plus
|
|
193
196
|
* whatever the call site adds. That reaches a handler for a line dash type, a table cell's 3-D
|
|
194
197
|
* preset and a table's horizontal overflow, among others. Nothing else populates it yet, so a
|
|
195
198
|
* handler must still treat the field as optional and must not assume a particular key is there
|
|
@@ -234,11 +237,10 @@ declare function setDiagnosticHandler(next: DiagnosticHandler | null): void;
|
|
|
234
237
|
* building decks from user input accumulates one entry per distinct bad value with no way to
|
|
235
238
|
* release them.
|
|
236
239
|
*
|
|
237
|
-
* This does not touch the handler
|
|
240
|
+
* This does not touch the handler. {@link setDiagnosticHandler} owns that, and the two are
|
|
238
241
|
* reset independently on purpose: a host usually installs its handler once and wants it to
|
|
239
242
|
* survive.
|
|
240
243
|
*/
|
|
241
244
|
declare function resetDiagnosticState(): void;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
//# sourceMappingURL=diagnostics-DiMmBU8P.d.ts.map
|
|
245
|
+
export { UnsupportedFeatureErrorCode as S, InternalErrorCode as _, TsPptxCode as a, PackageReadErrorCode as b, InternalError as c, PackageReadError as d, PptxTsError as f, ErrorCode as g, DiagnosticCode as h, setDiagnosticHandler as i, InvalidOptionError as l, UnsupportedFeatureError as m, DiagnosticHandler as n, TsPptxError as o, PptxTsErrorOptions as p, resetDiagnosticState as r, TsPptxErrorOptions as s, Diagnostic as t, MediaError as u, InvalidOptionErrorCode as v, PptxTsCode as x, MediaErrorCode as y };
|
|
246
|
+
//# sourceMappingURL=diagnostics-MoA4MBq5.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics-MoA4MBq5.d.ts","names":[],"sources":["../src/codes.ts","../src/errors.ts","../src/entry-errors.ts","../src/diagnostics.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCY;;;;;;;KAiLA;;;;;;KA+KA;;;;;;KAwBA;;;;;;;KAkCA;;;;;;KAwBA;;;;;;;;;;;;;;KAqEA,YACT,yBACA,8BACA,uBACA,iBACA;;KAGS,aAAa,iBAAiB;;UCnfzB,2BAA2B;;;;;WAKlC,SAAS,SAAS;;;;;;;;;cAUf,oBAAoB;;WAEvB,MAAM;;WAGN,SAAS,SAAS;;;;;;EAO3B,YAAY,MAAM,WAAW,iBAAiB,UAAU;;;;;;;;;;cAmB5C,2BAA2B;WACtB,MAAM;EACvB,YAAY,MAAM,wBAAwB,iBAAiB,UAAU;;;;;;;;;;;cAczD,gCAAgC;WAC3B,MAAM;EACvB,YAAY,MAAM,6BAA6B,iBAAiB,UAAU;;;;;;;;;;cAa9D,yBAAyB;WACpB,MAAM;EACvB,YAAY,MAAM,sBAAsB,iBAAiB,UAAU;;;;;;;;;cAYvD,mBAAmB;WACd,MAAM;EACvB,YAAY,MAAM,gBAAgB,iBAAiB,UAAU;;;;;;;;;;;;;;;;;;;cAkCjD,sBAAsB;WACjB,MAAM;EACvB,YAAY,MAAM,mBAAmB,iBAAiB,UAAU;;;cCtIpD,oBAAW;;KAEZ,cAAc;;KAEd,qBAAqB;;KAErB,aAAa;;UCzBR;;WAEP,MAAM;;WAEN;;;;;;;;;;;WAWA,SAAS,SAAS;;;KAIhB,qBAAqB,YAAY;;;;;;;;;;;;;;;;;;;;;;;iBAkC7B,qBAAqB,MAAM;;;;;;;;;;;;;;;;;iBAwD3B"}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/embedded-fonts.d.ts
|
|
1
|
+
import { vn as EMBEDDED_FONT_SLOTS } from "./pres-BkEkUAEM.js";
|
|
3
2
|
type EmbeddedFontSlot = (typeof EMBEDDED_FONT_SLOTS)[number];
|
|
4
3
|
/** One embeddable face: a slot plus the raw font bytes (absent in pure read-side merges). */
|
|
5
4
|
interface EmbeddedFontFace {
|
|
6
5
|
slot: EmbeddedFontSlot;
|
|
7
6
|
bytes?: Uint8Array;
|
|
8
7
|
}
|
|
9
|
-
/** A typeface family with 1..4 embedded faces
|
|
8
|
+
/** A typeface family with 1..4 embedded faces: one `p:embeddedFont` entry. */
|
|
10
9
|
interface EmbeddedFont {
|
|
11
|
-
/** `p:font/@typeface
|
|
10
|
+
/** `p:font/@typeface`. MUST match the family name used in run/`fontFace` typefaces or PowerPoint won't bind it. */
|
|
12
11
|
typeface: string;
|
|
13
12
|
panose?: string;
|
|
14
13
|
pitchFamily?: number;
|
|
15
14
|
charset?: number;
|
|
16
15
|
faces: EmbeddedFontFace[];
|
|
17
16
|
}
|
|
18
|
-
//#endregion
|
|
19
17
|
export { EmbeddedFontFace as n, EmbeddedFontSlot as r, EmbeddedFont as t };
|
|
20
|
-
//# sourceMappingURL=embedded-fonts-
|
|
18
|
+
//# sourceMappingURL=embedded-fonts-U7HIIhPO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedded-fonts-U7HIIhPO.d.ts","names":[],"sources":["../src/embedded-fonts.ts"],"mappings":";KAyCY,2BAA2B;;UAGtB;EAChB,MAAM;EACN,QAAQ;;;UAIQ;;EAEhB;EACA;EACA;EACA;EACA,OAAO"}
|