ooxml-ui 1.41.0 → 1.43.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.
Files changed (222) hide show
  1. package/dist/base.d.ts +1 -0
  2. package/dist/building-block-styles.d.ts +1 -0
  3. package/dist/chart/data-sheet-keys.d.ts +1 -0
  4. package/dist/chart/data-sheet.d.ts +2 -1
  5. package/dist/chart/format-pane-3d.d.ts +1 -0
  6. package/dist/chart/format-pane-advanced-space.d.ts +1 -0
  7. package/dist/chart/format-pane-analysis.d.ts +1 -0
  8. package/dist/chart/format-pane-common.d.ts +1 -0
  9. package/dist/chart/format-pane-fields.d.ts +1 -0
  10. package/dist/chart/format-pane-fill-line.d.ts +1 -0
  11. package/dist/chart/format-pane-intent.d.ts +1 -0
  12. package/dist/chart/format-pane-locales/de.d.ts +1 -0
  13. package/dist/chart/format-pane-locales/en.d.ts +1 -0
  14. package/dist/chart/format-pane-text.d.ts +1 -0
  15. package/dist/chart/format-pane-translate.d.ts +1 -0
  16. package/dist/chrome/account.d.ts +2 -1
  17. package/dist/chrome/print-preview.d.ts +2 -1
  18. package/dist/chrome/ruler.d.ts +2 -1
  19. package/dist/chrome/status-bar.d.ts +4 -1
  20. package/dist/chrome/status-bar.d.ts.map +1 -1
  21. package/dist/chrome/tab-drag.d.ts +1 -0
  22. package/dist/chrome/task-pane.d.ts +2 -1
  23. package/dist/{chunk-4RFFOPBU.js → chunk-2ZYRZANE.js} +1 -1
  24. package/dist/{chunk-Y6KY34VD.js → chunk-I57TCM2Q.js} +57 -11
  25. package/dist/{chunk-TTT5IQBU.js → chunk-JWBWLGEY.js} +2 -2
  26. package/dist/{chunk-LBIABP4I.js → chunk-M4ARYL3L.js} +1 -1
  27. package/dist/{chunk-7L4NP4HN.js → chunk-NH5ZSZMI.js} +1 -1
  28. package/dist/comments/mentions.d.ts +1 -0
  29. package/dist/comments/types.d.ts +1 -0
  30. package/dist/controls.d.ts +2 -0
  31. package/dist/controls.d.ts.map +1 -1
  32. package/dist/controls.js +1 -1
  33. package/dist/dialog/chart-picker.d.ts +2 -1
  34. package/dist/dialog/dialog-footer.d.ts +2 -1
  35. package/dist/dialog/dialog-session.d.ts +1 -0
  36. package/dist/dialog/dialog.d.ts +2 -1
  37. package/dist/dialog/focus.d.ts +1 -0
  38. package/dist/dialog/message-dialogs.d.ts +1 -0
  39. package/dist/dialog/message-dialogs.d.ts.map +1 -1
  40. package/dist/dialog/options-categories.d.ts +1 -0
  41. package/dist/dialog/options-controls.d.ts +1 -0
  42. package/dist/dialog/progress-dialog.d.ts +2 -1
  43. package/dist/dialog/share-dialog-locales.d.ts +1 -0
  44. package/dist/dialog/share-dialog.d.ts +2 -1
  45. package/dist/docx/locales/en-app.d.ts +5 -0
  46. package/dist/docx/locales/en.d.ts +5 -0
  47. package/dist/docx/localization-strings.d.ts +5 -0
  48. package/dist/docx/title-bar.d.ts +2 -1
  49. package/dist/docx.js +40 -11
  50. package/dist/files/cloud-files-view.d.ts +1 -0
  51. package/dist/files/connected-services.d.ts +2 -1
  52. package/dist/files/open-places.d.ts +2 -1
  53. package/dist/files/save-progress-label.d.ts +23 -0
  54. package/dist/files/save-progress-label.d.ts.map +1 -0
  55. package/dist/fonts/availability.d.ts +1 -0
  56. package/dist/fonts/catalog.d.ts +1 -0
  57. package/dist/fonts/custom-fonts.d.ts +1 -0
  58. package/dist/form/checkbox.d.ts +2 -1
  59. package/dist/form/color-custom.d.ts +2 -1
  60. package/dist/form/color-grid.d.ts +2 -1
  61. package/dist/form/color-input/live-color-leaves.d.ts +1 -0
  62. package/dist/form/radio.d.ts +2 -1
  63. package/dist/form/search-field.d.ts +2 -1
  64. package/dist/form/symbol-picker.d.ts +2 -1
  65. package/dist/form/zoom-slider.d.ts +2 -1
  66. package/dist/image-native-size.d.ts +1 -0
  67. package/dist/index.js +4 -4
  68. package/dist/menu/command-search.d.ts +2 -1
  69. package/dist/menu/context-menu.d.ts +2 -1
  70. package/dist/menu/menu-item.d.ts +2 -1
  71. package/dist/notices/paste-options.d.ts +2 -1
  72. package/dist/notices/toasts.d.ts +2 -1
  73. package/dist/picture-effects.d.ts +1 -0
  74. package/dist/picture-standard-filter.d.ts +1 -0
  75. package/dist/picture-view.d.ts +1 -0
  76. package/dist/pptx/{chunk-JU3ZV73R.mjs → chunk-5BINBXFV.mjs} +2 -2
  77. package/dist/pptx/{chunk-J6PRXB72.mjs → chunk-7FTP7OOA.mjs} +3198 -2003
  78. package/dist/pptx/{chunk-IN46QNJE.mjs → chunk-BA4CJI4U.mjs} +35 -3
  79. package/dist/pptx/{chunk-7XXOLM7H.cjs → chunk-CK6RYGB4.cjs} +37 -2
  80. package/dist/pptx/{chunk-RN3JVXVN.cjs → chunk-P4NVINSK.cjs} +3226 -2014
  81. package/dist/pptx/{chunk-4SZSTDER.cjs → chunk-UGSMMZU6.cjs} +47 -47
  82. package/dist/pptx/{chunk-SF3MYUTD.mjs → chunk-W2QJX2ON.mjs} +5 -0
  83. package/dist/pptx/{chunk-WNDGU3GQ.cjs → chunk-ZHVKGGLQ.cjs} +5 -0
  84. package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
  85. package/dist/pptx/dom/elements/edge-bleed-restore.d.ts +19 -0
  86. package/dist/pptx/dom/elements/edge-bleed-restore.d.ts.map +1 -0
  87. package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
  88. package/dist/pptx/dom/elements/text-shape.d.ts.map +1 -1
  89. package/dist/pptx/dom/index.cjs +441 -398
  90. package/dist/pptx/dom/index.d.ts +1 -0
  91. package/dist/pptx/dom/index.d.ts.map +1 -1
  92. package/dist/pptx/dom/index.mjs +58 -17
  93. package/dist/pptx/export/html2canvas-clone.cjs +6 -6
  94. package/dist/pptx/export/html2canvas-clone.mjs +1 -1
  95. package/dist/pptx/i18n/index.cjs +6 -6
  96. package/dist/pptx/i18n/index.mjs +1 -1
  97. package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
  98. package/dist/pptx/index.cjs +3190 -3110
  99. package/dist/pptx/index.mjs +3 -3
  100. package/dist/pptx/render/connector-path.d.ts +15 -0
  101. package/dist/pptx/render/connector-path.d.ts.map +1 -1
  102. package/dist/pptx/render/connector-style.d.ts +10 -0
  103. package/dist/pptx/render/connector-style.d.ts.map +1 -1
  104. package/dist/pptx/render/controller/index.d.ts +2 -0
  105. package/dist/pptx/render/controller/index.d.ts.map +1 -1
  106. package/dist/pptx/render/controller/save-progress-controller.d.ts +56 -0
  107. package/dist/pptx/render/controller/save-progress-controller.d.ts.map +1 -0
  108. package/dist/pptx/render/device-pixel-stroke.d.ts +43 -6
  109. package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -1
  110. package/dist/pptx/render/effect-profile.d.ts +53 -0
  111. package/dist/pptx/render/effect-profile.d.ts.map +1 -0
  112. package/dist/pptx/render/embedded-fonts-sheet.d.ts +25 -0
  113. package/dist/pptx/render/embedded-fonts-sheet.d.ts.map +1 -0
  114. package/dist/pptx/render/font-line-gap.d.ts +21 -0
  115. package/dist/pptx/render/font-line-gap.d.ts.map +1 -0
  116. package/dist/pptx/render/font-settled.d.ts +14 -0
  117. package/dist/pptx/render/font-settled.d.ts.map +1 -0
  118. package/dist/pptx/render/index.d.ts +2 -0
  119. package/dist/pptx/render/index.d.ts.map +1 -1
  120. package/dist/pptx/render/morph-animation.d.ts +1 -24
  121. package/dist/pptx/render/morph-animation.d.ts.map +1 -1
  122. package/dist/pptx/render/morph-body-carry.d.ts +1 -1
  123. package/dist/pptx/render/morph-body-carry.d.ts.map +1 -1
  124. package/dist/pptx/render/morph-carry.d.ts.map +1 -1
  125. package/dist/pptx/render/morph-effect-carry.d.ts +4 -5
  126. package/dist/pptx/render/morph-effect-carry.d.ts.map +1 -1
  127. package/dist/pptx/render/morph-flip-turn.d.ts.map +1 -1
  128. package/dist/pptx/render/morph-line-carry.d.ts +40 -0
  129. package/dist/pptx/render/morph-line-carry.d.ts.map +1 -0
  130. package/dist/pptx/render/morph-plan-carry.d.ts +41 -0
  131. package/dist/pptx/render/morph-plan-carry.d.ts.map +1 -0
  132. package/dist/pptx/render/morph-plan-channels.d.ts +30 -0
  133. package/dist/pptx/render/morph-plan-channels.d.ts.map +1 -0
  134. package/dist/pptx/render/morph-plan-crossfade.d.ts +23 -0
  135. package/dist/pptx/render/morph-plan-crossfade.d.ts.map +1 -0
  136. package/dist/pptx/render/morph-plan-css.d.ts +62 -0
  137. package/dist/pptx/render/morph-plan-css.d.ts.map +1 -0
  138. package/dist/pptx/render/morph-plan-lift.d.ts +44 -0
  139. package/dist/pptx/render/morph-plan-lift.d.ts.map +1 -0
  140. package/dist/pptx/render/morph-plan-overlay.d.ts +62 -0
  141. package/dist/pptx/render/morph-plan-overlay.d.ts.map +1 -0
  142. package/dist/pptx/render/morph-plan-types.d.ts +208 -0
  143. package/dist/pptx/render/morph-plan-types.d.ts.map +1 -0
  144. package/dist/pptx/render/morph-plan.d.ts +4 -239
  145. package/dist/pptx/render/morph-plan.d.ts.map +1 -1
  146. package/dist/pptx/render/morph-rotation.d.ts +30 -0
  147. package/dist/pptx/render/morph-rotation.d.ts.map +1 -0
  148. package/dist/pptx/render/morph-shape-carry-strands.d.ts +36 -0
  149. package/dist/pptx/render/morph-shape-carry-strands.d.ts.map +1 -0
  150. package/dist/pptx/render/morph-shape-carry.d.ts +5 -0
  151. package/dist/pptx/render/morph-shape-carry.d.ts.map +1 -1
  152. package/dist/pptx/render/morph-soft-edge-blend.d.ts +38 -0
  153. package/dist/pptx/render/morph-soft-edge-blend.d.ts.map +1 -0
  154. package/dist/pptx/render/morph-text-body.d.ts +1 -1
  155. package/dist/pptx/render/morph-text-body.d.ts.map +1 -1
  156. package/dist/pptx/render/morph-text-frame.d.ts +2 -0
  157. package/dist/pptx/render/morph-text-frame.d.ts.map +1 -1
  158. package/dist/pptx/render/morph-text-glyph-plan.d.ts +31 -0
  159. package/dist/pptx/render/morph-text-glyph-plan.d.ts.map +1 -0
  160. package/dist/pptx/render/morph-text-glyphs.d.ts +27 -0
  161. package/dist/pptx/render/morph-text-glyphs.d.ts.map +1 -0
  162. package/dist/pptx/render/morph-text-lines.d.ts +8 -6
  163. package/dist/pptx/render/morph-text-lines.d.ts.map +1 -1
  164. package/dist/pptx/render/morph-text-piece-caps.d.ts +36 -0
  165. package/dist/pptx/render/morph-text-piece-caps.d.ts.map +1 -0
  166. package/dist/pptx/render/morph-text-pieces.d.ts +6 -1
  167. package/dist/pptx/render/morph-text-pieces.d.ts.map +1 -1
  168. package/dist/pptx/render/morph-text-transform.d.ts +2 -0
  169. package/dist/pptx/render/morph-text-transform.d.ts.map +1 -1
  170. package/dist/pptx/render/morph-types.d.ts +11 -2
  171. package/dist/pptx/render/morph-types.d.ts.map +1 -1
  172. package/dist/pptx/render/paragraph-baseline-settle.d.ts +8 -0
  173. package/dist/pptx/render/paragraph-baseline-settle.d.ts.map +1 -0
  174. package/dist/pptx/render/paragraph-baseline.d.ts +82 -13
  175. package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -1
  176. package/dist/pptx/render/paragraph-types.d.ts +6 -0
  177. package/dist/pptx/render/paragraph-types.d.ts.map +1 -1
  178. package/dist/pptx/render/status-bar-state.d.ts +7 -1
  179. package/dist/pptx/render/status-bar-state.d.ts.map +1 -1
  180. package/dist/pptx/render/stroke-outline.d.ts +7 -0
  181. package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
  182. package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -1
  183. package/dist/pptx/render/text-body-layout.d.ts.map +1 -1
  184. package/dist/pptx/render/text-effects.d.ts +6 -11
  185. package/dist/pptx/render/text-effects.d.ts.map +1 -1
  186. package/dist/pptx/render/text-field-substitution.d.ts +13 -14
  187. package/dist/pptx/render/text-field-substitution.d.ts.map +1 -1
  188. package/dist/pptx/render/text-line-height.d.ts +8 -8
  189. package/dist/pptx/render/text-line-height.d.ts.map +1 -1
  190. package/dist/pptx/render/text-paragraph-style.d.ts +13 -0
  191. package/dist/pptx/render/text-paragraph-style.d.ts.map +1 -1
  192. package/dist/pptx/render/text-paragraphs.d.ts.map +1 -1
  193. package/dist/pptx/render/text-shrink-block.d.ts +23 -0
  194. package/dist/pptx/render/text-shrink-block.d.ts.map +1 -0
  195. package/dist/pptx/render/visual-effects.d.ts +3 -1
  196. package/dist/pptx/render/visual-effects.d.ts.map +1 -1
  197. package/dist/pptx/{smartart-insert-preview-GA6ELFRB.mjs → smartart-insert-preview-DXFDFDSC.mjs} +4 -4
  198. package/dist/pptx/{smartart-insert-preview-PQTEVG7C.cjs → smartart-insert-preview-UP6DYY42.cjs} +5 -5
  199. package/dist/pptx/web-components/status-bar.d.ts.map +1 -1
  200. package/dist/render-cache.d.ts +1 -0
  201. package/dist/ribbon/auto-collapse.d.ts +1 -0
  202. package/dist/ribbon/button.d.ts +2 -1
  203. package/dist/ribbon/gallery-styles.d.ts +1 -0
  204. package/dist/ribbon/keytip-run.d.ts +1 -0
  205. package/dist/ribbon/overflow.d.ts +1 -0
  206. package/dist/ribbon/ribbon-section.d.ts +2 -1
  207. package/dist/ribbon/ribbon-stack.d.ts +2 -1
  208. package/dist/ribbon/safe-svg.d.ts +1 -0
  209. package/dist/ribbon/scroll-more.d.ts +1 -0
  210. package/dist/smartart/smartart-picker.d.ts +2 -1
  211. package/dist/smartart/smartart-text-pane-tools.d.ts +1 -0
  212. package/dist/teams.js +2 -2
  213. package/dist/theme-bridge.d.ts +1 -0
  214. package/dist/theme.d.ts +1 -0
  215. package/dist/visio/title-bar.d.ts +3 -1
  216. package/dist/visio/viewer-backstage.d.ts +2 -0
  217. package/dist/visio/viewer-file-commands.d.ts +2 -2
  218. package/dist/visio.js +75 -20
  219. package/dist/xlsx/editor-files.d.ts +1 -1
  220. package/dist/xlsx/title-bar.d.ts +2 -1
  221. package/dist/xlsx.js +21 -12
  222. package/package.json +2 -2
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The strands of a compound outline (`a:ln/@cmpd`: `dbl`, `thickThin`,
3
+ * `thinThick`, `tri`) carried through a resizing Morph.
4
+ *
5
+ * Measured on PowerPoint 16 (`CreateVideo`, 60 fps, 720p, Morph by object): a
6
+ * 12 pt compound line on a rectangle (and a rounded rectangle) growing from
7
+ * 120 x 80 pt to 480 x 240 pt keeps its band proportions on every frame (a
8
+ * `thickThin` edge reads 10 + 3 px at the start, 15 + 4 across the vertical
9
+ * edges at the widest, 10 + 3 again at the end) while the whole line widens
10
+ * and narrows by the same `W(p) * lerp(w / W0, w / W1, p)` an ordinary line
11
+ * follows. Each strand and the gaps between them scale together, so a strand
12
+ * is its own path traced at its offset in the same path units the plain
13
+ * outline carry uses, and the path's anisotropic scale does the rest.
14
+ *
15
+ * Every strand is its own `<path>` of the outline overlay, so each gets its own
16
+ * baked track (the plan rules address them by position).
17
+ *
18
+ * @module render/morph-shape-carry-strands
19
+ */
20
+ import type { PptxElement } from 'ooxml-core/pptx';
21
+ import type { StrokeClipJoin } from './stroke-clip-outset.js';
22
+ /** The offsets of an element's compound strands, when the outline overlay paints them as traced paths. */
23
+ export declare function tracedCompoundOffsets(element: PptxElement): number[] | undefined;
24
+ /** The compound line of a shape, `undefined` for a single line. */
25
+ export declare function compoundLineOf(element: PptxElement): string | undefined;
26
+ /**
27
+ * One keyframes body per strand, each stop carrying the strand's path traced
28
+ * along the stop's outline (`userPathAt`, in the path's user units) and the
29
+ * scale that undoes the journey's anisotropy. `undefined` when a strand cannot
30
+ * be traced at some stop or changes its number of points between stops.
31
+ */
32
+ export declare function bakeStrandStops(progress: readonly number[], offsets: readonly number[], join: StrokeClipJoin, userPathAt: (p: number) => {
33
+ d: string;
34
+ scale: string;
35
+ }): string[] | undefined;
36
+ //# sourceMappingURL=morph-shape-carry-strands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph-shape-carry-strands.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-shape-carry-strands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,0GAA0G;AAC1G,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,SAAS,CAWhF;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAGvE;AAOD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC9B,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrD,MAAM,EAAE,GAAG,SAAS,CAuBtB"}
@@ -53,6 +53,11 @@ export interface MorphShapeCarry {
53
53
  readonly clipKeyframes?: string;
54
54
  /** Baked keyframes body for the outline path, when the outline is carried. */
55
55
  readonly outlineKeyframes?: string;
56
+ /**
57
+ * Baked keyframes bodies for the strands of a compound outline, one per
58
+ * strand in paint order (each strand is a `<path>` of the overlay).
59
+ */
60
+ readonly outlineStrandKeyframes?: readonly string[];
56
61
  /**
57
62
  * Baked keyframes body for the paths of a freeform painted as a vector in
58
63
  * its own path units (`[data-pptx-custom-geometry]`): the geometry per stop.
@@ -1 +1 @@
1
- {"version":3,"file":"morph-shape-carry.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-shape-carry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAkBnD,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,IAAI,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC/B,+F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;IACpD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CAClC;AAUD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,OAAO,CA8BlF;AAsBD;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,cAAc,GAClB,eAAe,GAAG,SAAS,CAwH7B"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A soft edge (`a:softEdge`) dissolved the way PowerPoint dissolves it.
3
+ *
4
+ * Measured on PowerPoint 16 (`CreateVideo`, 60 fps, 720p, Morph by object) on a
5
+ * rectangle with a 20 pt soft edge growing from 200 x 120 pt to 440 x 240 pt:
6
+ * mid-morph there are TWO renders of the shape, each with its own feather
7
+ * scaled with the box (`W(p) / W0` and `W(p) / W1` times the authored radius),
8
+ * and they are cross-dissolved per pixel as `(1 - p) A + p B`. That blend
9
+ * reproduces the feather profile across the edge within 0.002-0.005 coverage at
10
+ * every frame; one feather riding the box is 0.01-0.07 off.
11
+ *
12
+ * The soft edge is an SVG filter fixed in the element's own frame, which no
13
+ * keyframe can reach, so the feather cannot be tweened on one element. But a
14
+ * ghost (the outgoing half, scaled up from its own size) and the incoming half
15
+ * (scaled down from its final size) each carry their own feather in exactly the
16
+ * frame PowerPoint scales it in. Dissolving the two additively is the measured
17
+ * blend, so a soft-edged pair is handed to the crossfade group like restyled
18
+ * text is (see `morph-text-blend` and `morph-crossfade-group`).
19
+ *
20
+ * @module render/morph-soft-edge-blend
21
+ */
22
+ import type { PptxElement } from 'ooxml-core/pptx';
23
+ import type { MorphLiftContext } from './morph-text-blend.js';
24
+ /**
25
+ * Whether a matched pair's soft edge looks different at its two ends: the
26
+ * radius differs, or it is the same radius on a box of another size (the
27
+ * feather scales with the box, so each end is a different render).
28
+ */
29
+ export declare function morphSoftEdgeBlends(from: PptxElement, to: PptxElement): boolean;
30
+ /**
31
+ * Incoming ids of the soft-edged pairs to lift into a crossfade group, plus the
32
+ * shapes that rise into the overlay with them (the same rule as restyled text).
33
+ *
34
+ * @param context - The slides, pairs and what the overlay already paints.
35
+ * @param dissolvingInIds - Incoming ids whose half fades in over its ghost.
36
+ */
37
+ export declare function resolveMorphSoftEdgeLifts(context: MorphLiftContext, dissolvingInIds: ReadonlySet<string>): Set<string>;
38
+ //# sourceMappingURL=morph-soft-edge-blend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph-soft-edge-blend.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-soft-edge-blend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAa3D;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,OAAO,CAc/E;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACxC,OAAO,EAAE,gBAAgB,EACzB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,GAAG,CAAC,MAAM,CAAC,CAwBb"}
@@ -27,5 +27,5 @@ export declare function buildMorphTextBodyPlan(pairs: readonly MorphPair[], cont
27
27
  * Add `body`'s copies to the piece plan the overlay already paints copies
28
28
  * from, so both are hidden, stacked and painted by the same code.
29
29
  */
30
- export declare function mergeMorphTextBodyPlan(into: MorphTextPiecePlan, body: MorphTextBodyPlan): void;
30
+ export declare function mergeMorphTextBodyPlan(into: MorphTextPiecePlan, body: MorphTextPiecePlan): void;
31
31
  //# sourceMappingURL=morph-text-body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"morph-text-body.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-body.ts"],"names":[],"mappings":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;AAG/C,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,qEAAqE;AACrE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC5D,mDAAmD;IACnD,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAClC,6EAA6E;IAC7E,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,CAEzE;AA+CD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACxB,iBAAiB,CAmInB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAa/F"}
@@ -46,6 +46,7 @@
46
46
  import type { PptxElement } from 'ooxml-core/pptx';
47
47
  import type { MorphFontMetrics } from './morph-text-baseline.js';
48
48
  import type { MorphTextMeasure, ReadFrameOptions } from './morph-text-frame-read.js';
49
+ import type { MorphTextInkMeasure } from './morph-text-ink.js';
49
50
  import type { MorphTextAlignment } from './morph-text-transform.js';
50
51
  export type { MorphTextMeasure } from './morph-text-frame-read.js';
51
52
  export { measureMorphTextWithCanvas } from './morph-text-frame-read.js';
@@ -62,5 +63,6 @@ export { morphTextGhostEnd, morphTextGhostStart, morphTextIncomingEnd, morphText
62
63
  */
63
64
  export declare function resolveMorphTextAlignment(fromHalf: PptxElement, toHalf: PptxElement, measure?: MorphTextMeasure, options?: Pick<ReadFrameOptions, 'withBody'> & {
64
65
  metrics?: MorphFontMetrics;
66
+ ink?: MorphTextInkMeasure;
65
67
  }): MorphTextAlignment | undefined;
66
68
  //# sourceMappingURL=morph-text-frame.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"morph-text-frame.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-frame.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAa,MAAM,yBAAyB,CAAC;AAG7F,OAAO,KAAK,EAAc,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,GACb,MAAM,wBAAwB,CAAC;AA8DhC;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,gBAA6C,EACtD,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAO,GAC/E,kBAAkB,GAAG,SAAS,CAoIhC"}
1
+ {"version":3,"file":"morph-text-frame.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-frame.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAa,MAAM,yBAAyB,CAAC;AAG7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAc,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EACN,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,GACb,MAAM,wBAAwB,CAAC;AA8DhC;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,gBAA6C,EACtD,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAC7C,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,GAAG,CAAC,EAAE,mBAAmB,CAAC;CACrB,GACJ,kBAAkB,GAAG,SAAS,CAmJhC"}
@@ -0,0 +1,31 @@
1
+ import type { MorphTextAlignment, MorphTextMeasure } from './morph-text-frame.js';
2
+ import type { MorphGlyphCell } from './morph-text-glyphs.js';
3
+ import type { MorphTextInkMeasure } from './morph-text-ink.js';
4
+ import type { MorphTextPiecePlan } from './morph-text-piece-plan.js';
5
+ import type { MorphPair } from './morph-types.js';
6
+ type Turn = NonNullable<MorphTextAlignment['turn']>;
7
+ type Centres = NonNullable<MorphTextAlignment['centres']>;
8
+ /** A turning pair, resolved for glyph copies. */
9
+ export interface MorphGlyphTurn {
10
+ alignment: MorphTextAlignment & {
11
+ turn: Turn;
12
+ centres: Centres;
13
+ };
14
+ cellsFrom: MorphGlyphCell[];
15
+ cellsTo: MorphGlyphCell[];
16
+ }
17
+ /** Resolve `pair` for glyph copies, or `undefined` when its whole-box turn stands. */
18
+ export declare function resolveMorphGlyphTurn(pair: MorphPair, ghostIds: ReadonlySet<string>, measure?: MorphTextMeasure, ink?: MorphTextInkMeasure | undefined): MorphGlyphTurn | undefined;
19
+ /** The id a glyph copy is painted under. */
20
+ export declare function morphGlyphId(sourceId: string, index: number): string;
21
+ /**
22
+ * The glyph copies of every turning pair whose type changes with its angle.
23
+ *
24
+ * @param pairs - The matched pairs (object mode only).
25
+ * @param ghostIds - Outgoing ids the overlay paints.
26
+ * @param durationMs - The morph's duration.
27
+ * @param measure - Text measurement; defaults to a canvas.
28
+ */
29
+ export declare function buildMorphTextGlyphPlan(pairs: readonly MorphPair[], ghostIds: ReadonlySet<string>, durationMs: number, measure?: MorphTextMeasure): MorphTextPiecePlan;
30
+ export {};
31
+ //# sourceMappingURL=morph-text-glyph-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph-text-glyph-plan.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-glyph-plan.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAOlE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAc/C,KAAK,IAAI,GAAG,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;AAE1D,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC9B,SAAS,EAAE,kBAAkB,GAAG;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACjE,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,sFAAsF;AACtF,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,OAAO,GAAE,gBAA6C,EACtD,GAAG,GAAE,mBAAmB,GAAG,SAEf,GACV,cAAc,GAAG,SAAS,CAwC5B;AA8CD,4CAA4C;AAC5C,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpE;AAMD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACxB,kBAAkB,CA8EpB"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Where each glyph of a one-line text box sits, so a pair that turns while its
3
+ * type changes can be carried glyph by glyph (see `morph-text-glyph-plan`).
4
+ *
5
+ * @module render/morph-text-glyphs
6
+ */
7
+ import type { PptxElement } from 'ooxml-core/pptx';
8
+ import type { MorphTextMeasure } from './morph-text-frame-read.js';
9
+ import type { MorphTextInkMeasure } from './morph-text-ink.js';
10
+ /** One glyph's advance cell, in px from the element's own left edge. */
11
+ export interface MorphGlyphCell {
12
+ /** Index of the glyph in the paragraph's text. */
13
+ index: number;
14
+ x0: number;
15
+ x1: number;
16
+ /** The middle of the glyph's ink (its advance cell and line box where nothing measures ink). */
17
+ cx: number;
18
+ cy: number;
19
+ }
20
+ /** Most glyphs a pair may be split into before it keeps its whole-box turn. */
21
+ export declare const MAX_MORPH_GLYPHS = 48;
22
+ /**
23
+ * The advance cells of the visible glyphs of `element`, or `undefined` when it
24
+ * is not one paragraph on one line of plain text.
25
+ */
26
+ export declare function morphTextGlyphCells(element: PptxElement, measure: MorphTextMeasure, ink?: MorphTextInkMeasure): MorphGlyphCell[] | undefined;
27
+ //# sourceMappingURL=morph-text-glyphs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph-text-glyphs.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-glyphs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,gGAAgG;IAChG,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACX;AAED,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAoBnC;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,gBAAgB,EACzB,GAAG,CAAC,EAAE,mBAAmB,GACvB,cAAc,EAAE,GAAG,SAAS,CA0C9B"}
@@ -12,17 +12,15 @@
12
12
  * the flex column centres or bottom-aligns the whole block for a middle or bottom
13
13
  * anchor.
14
14
  *
15
- * A shrink-wrapped (`anchorCtr`) block that fits on one line per paragraph is
16
- * as wide as its widest paragraph (`width: fit-content`), centred in the box,
17
- * as PowerPoint draws it.
15
+ * A shrink-wrapped (`anchorCtr`) block is as wide as its longest line, centred
16
+ * in the box, as PowerPoint draws it (see `centreBlock`).
18
17
  *
19
18
  * It refuses anything it cannot reproduce with confidence: mixed font sizes in
20
19
  * different faces or under exact line spacing, distributed alignment,
21
20
  * transformed or shifted text, a non-breaking space in justified text, a
22
21
  * word wider than its column, a break within a pixel of the column edge
23
- * (where rounding could move it), a shrink-wrapped block that wraps, holds a
24
- * line break or nearly fills the column (PowerPoint shrinks a wrapped one to
25
- * its longest line, `fit-content` does not), several paragraphs spread over a
22
+ * (where rounding could move it), a shrink-wrapped block that holds a
23
+ * line break, several paragraphs spread over a
26
24
  * distributed anchor, and text overflowing a box not anchored at its top
27
25
  * (both lay it out alike, but a piece, a copy of the box, loses what spills
28
26
  * past its edge, which measured worse than carrying the box).
@@ -42,6 +40,8 @@ export interface MorphTextWord {
42
40
  /** Left and right advance extent of the word. */
43
41
  x0: number;
44
42
  x1: number;
43
+ /** The word's `[start, end)` offsets in its paragraph's text. */
44
+ chars?: [number, number];
45
45
  /** Where its glyphs paint, when an ink measurer was given: all of them, and each. */
46
46
  ink?: MorphTextRect;
47
47
  glyphs?: MorphTextRect[];
@@ -55,6 +55,8 @@ export interface MorphTextLine {
55
55
  x1: number;
56
56
  /** Whether `justify` spread the line's words apart. */
57
57
  justified: boolean;
58
+ /** Where the line's baseline sits below its top, when ink was measured. */
59
+ baseline?: number;
58
60
  }
59
61
  /** A frame's words, in reading order, and its lines. */
60
62
  export interface MorphTextLayout {
@@ -1 +1 @@
1
- {"version":3,"file":"morph-text-lines.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-lines.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAkB,gBAAgB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE3F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,8DAA8D;AAC9D,MAAM,WAAW,aAAa;IAC7B,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,yBAAyB;AACzB,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;CACf;AAgID;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,gBAAgB,EACzB,GAAG,CAAC,EAAE,mBAAmB,GACvB,eAAe,GAAG,SAAS,CAyE7B"}
1
+ {"version":3,"file":"morph-text-lines.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-lines.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAkB,gBAAgB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,8DAA8D;AAC9D,MAAM,WAAW,aAAa;IAC7B,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,qFAAqF;IACrF,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,yBAAyB;AACzB,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;CACf;AAsJD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,gBAAgB,EACzB,GAAG,CAAC,EAAE,mBAAmB,GACvB,eAAe,GAAG,SAAS,CAiF7B"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The vertical mapping of a text piece whose face changes between the halves.
3
+ *
4
+ * PowerPoint 16 (`CreateVideo`, 32 pt, same line breaks) stretches every run
5
+ * onto its own counterpart's capital height, about that line's own baseline:
6
+ * two lines Calibri -> Arial grow each "L" 27 -> 31 px while the baselines stay
7
+ * 51-52 px apart. One transform for a box cannot do both, so a pair like that
8
+ * is carried per line (and per face within a line), each piece scaled about its
9
+ * own baseline by its own capital-height ratio.
10
+ *
11
+ * @module render/morph-text-piece-caps
12
+ */
13
+ import type { MorphFontMetrics } from './morph-text-baseline.js';
14
+ import type { TextFrame } from './morph-text-frame-read.js';
15
+ import type { MorphTextLayout, MorphTextWord } from './morph-text-lines.js';
16
+ /** A font shorthand without its sizes: the face (family, weight, style). */
17
+ export declare const faceOf: (font: string) => string;
18
+ /** The canvas font the first character of `word` is painted in. */
19
+ export declare function wordFont(frame: TextFrame, word: MorphTextWord): string | undefined;
20
+ /** One half of a piece: its frame, its word layout and the piece's first word. */
21
+ export interface PieceHalf {
22
+ frame: TextFrame;
23
+ layout: MorphTextLayout;
24
+ head: MorphTextWord;
25
+ }
26
+ /**
27
+ * Where a piece's two halves anchor vertically (their baselines, from each
28
+ * element's top) and how tall one is against the other, or `undefined` when
29
+ * the face does not change or nothing says (the piece then keeps its line-box
30
+ * mapping).
31
+ */
32
+ export declare function pieceCapMapping(a: PieceHalf, b: PieceHalf, metrics: MorphFontMetrics): {
33
+ baselines: [number, number];
34
+ scaleY: number;
35
+ } | undefined;
36
+ //# sourceMappingURL=morph-text-piece-caps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph-text-piece-caps.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-piece-caps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGzE,4EAA4E;AAC5E,eAAO,MAAM,MAAM,SAAU,MAAM,KAAG,MAAwC,CAAC;AAE/E,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAOlF;AAED,kFAAkF;AAClF,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC9B,CAAC,EAAE,SAAS,EACZ,CAAC,EAAE,SAAS,EACZ,OAAO,EAAE,gBAAgB,GACvB;IAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAiB7D"}
@@ -51,6 +51,7 @@ import type { PptxElement } from 'ooxml-core/pptx';
51
51
  import type { MorphTextAlignment, MorphTextMeasure } from './morph-text-frame.js';
52
52
  import type { MorphTextInkMeasure } from './morph-text-ink.js';
53
53
  import type { MorphTextBand } from './morph-text-bands.js';
54
+ import type { MorphFontMetrics } from './morph-text-baseline.js';
54
55
  export type { MorphTextBand } from './morph-text-bands.js';
55
56
  /** One piece: how it maps across, and the part of each half it shows. */
56
57
  export interface MorphTextPiece {
@@ -83,5 +84,9 @@ export interface MorphTextPieceSplit {
83
84
  * @param ink - Ink measurement for the bands' edges; defaults to a canvas
84
85
  * when `measure` does, and to none (line-box edges) otherwise.
85
86
  */
86
- export declare function resolveMorphTextPieces(from: PptxElement, to: PptxElement, measure?: MorphTextMeasure, ink?: MorphTextInkMeasure | undefined): MorphTextPieceSplit | undefined;
87
+ export declare function resolveMorphTextPieces(from: PptxElement, to: PptxElement, measure?: MorphTextMeasure, ink?: MorphTextInkMeasure | undefined, options?: {
88
+ metrics?: MorphFontMetrics;
89
+ /** Refuse unless every piece whose face changes can be scaled about its baseline. */
90
+ requireCaps?: boolean;
91
+ }): MorphTextPieceSplit | undefined;
87
92
  //# sourceMappingURL=morph-text-pieces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"morph-text-pieces.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-pieces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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oB,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC9B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,EAAE,aAAa,CAAC;IACxB,kDAAkD;IAClD,MAAM,EAAE,aAAa,CAAC;CACtB;AAED,uFAAuF;AACvF,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,WAAW,EACf,OAAO,GAAE,gBAA6C,EACtD,GAAG,GAAE,mBAAmB,GAAG,SAEf,EACZ,OAAO,GAAE;IACR,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,qFAAqF;IACrF,WAAW,CAAC,EAAE,OAAO,CAAC;CACjB,GACJ,mBAAmB,GAAG,SAAS,CAiGjC"}
@@ -80,6 +80,8 @@ export interface MorphTextTransform {
80
80
  sy: number;
81
81
  tail?: MorphPoint;
82
82
  }
83
+ /** Where a turning half's pivot stands on the slide, at its own rotation. */
84
+ export declare function pivotOnSlide(centre: MorphPoint, pivot: MorphPoint, rotation: number): MorphPoint;
83
85
  /**
84
86
  * The incoming half's STARTING transform: it is painted at its own geometry and
85
87
  * has to begin with its text laid over the outgoing text.
@@ -1 +1 @@
1
- {"version":3,"file":"morph-text-transform.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,4BAA4B;AA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AED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,cAAc,CAAC,GAC3D,MAAM,CASR"}
1
+ {"version":3,"file":"morph-text-transform.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,4BAA4B;AAC5B,MAAM,WAAW,UAAU;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,UAAU,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,EAAE,EAAE,UAAU,CAAA;KAAE,CAAC;IAC/C;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE;YAAE,IAAI,EAAE,UAAU,CAAC;YAAC,EAAE,EAAE,UAAU,CAAA;SAAE,CAAA;KAAE,CAAC;CAClF;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,UAAU,CAAC;CAClB;AAqDD,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAGhG;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,kBAAkB,EAC7B,EAAE,EAAE,WAAW,GACb,kBAAkB,CAuBpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,WAAW,GACf,kBAAkB,CA2BpB;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,kBAAkB,EAC7B,EAAE,EAAE,WAAW,GACb,kBAAkB,CAapB;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,WAAW,GACf,kBAAkB,CAapB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,cAAc,CAAC,GAC3D,MAAM,CASR"}
@@ -41,12 +41,21 @@ export interface MorphAnimationStyle {
41
41
  * `data-pptx-outline` on, which a resizing shape re-paths per frame (see
42
42
  * `morph-shape-carry`). `custom` is the paths of the custom-geometry
43
43
  * `<svg data-pptx-custom-geometry>` a binding paints a freeform with (in
44
- * path units), which a reshaping freeform re-paths per frame too.
44
+ * path units), which a reshaping freeform re-paths per frame too. `line` is
45
+ * the painted strand a binding stamps `data-pptx-line` on in a straight
46
+ * connector, which keeps its width while the wrapper's journey scales
47
+ * (see `morph-line-carry`).
45
48
  */
46
49
  target?: MorphAnimationTarget;
50
+ /**
51
+ * With `target: 'outline'`: the position (from 0) of the overlay path the
52
+ * animation belongs on, for a compound outline whose strands are separate
53
+ * paths with their own geometry. Absent, it animates every path.
54
+ */
55
+ strand?: number;
47
56
  }
48
57
  /** @see MorphAnimationStyle.target */
49
- export type MorphAnimationTarget = 'element' | 'image' | 'outline' | 'custom';
58
+ export type MorphAnimationTarget = 'element' | 'image' | 'outline' | 'custom' | 'line';
50
59
  /** Morph granularity mode matching PowerPoint's morph effect options. */
51
60
  export type MorphMode = 'object' | 'word' | 'character';
52
61
  /** A single token (word or character) with its computed position for text morphing. */
@@ -1 +1 @@
1
- {"version":3,"file":"morph-types.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAOnD,2EAA2E;AAC3E,MAAM,WAAW,SAAS;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,WAAW,CAAC;CACvB;AAED,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAChC,gDAAgD;IAChD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,gFAAgF;IAChF,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,6EAA6E;IAC7E,WAAW,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,qFAAqF;AACrF,MAAM,WAAW,mBAAmB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC9B;AAED,sCAAsC;AACtC,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9E,yEAAyE;AACzE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAExD,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,CAAC,EAAE,MAAM,CAAC;IACV,uDAAuD;IACvD,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAA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AAc,GAAG,IAAI,CAAC;IAC5B,EAAE,EAAE,cAAc,GAAG,IAAI,CAAC;CAC1B;AAED,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAyB,CAAC;AAEpG,yEAAyE;AACzE,eAAO,MAAM,YAAY,QAAoD,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,QAAe,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AACjD,uCAAuC;AACvC,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAUlD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAsC,CAAC;AAC9E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAA0B,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAAuC,CAAC;AAChF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAyB,CAAC;AAE3D,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Place every marked paragraph under `root` on the baseline of the font it now paints with. */
2
+ export declare function settleBaselines(root?: ParentNode): number;
3
+ /**
4
+ * Start watching for loaded fonts and new paragraphs (once per page). Call it
5
+ * when a paragraph was marked pending; it costs nothing before that.
6
+ */
7
+ export declare function armBaselineSettle(): void;
8
+ //# sourceMappingURL=paragraph-baseline-settle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph-baseline-settle.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-baseline-settle.ts"],"names":[],"mappings":"AA4BA,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,IAAI,GAAE,UAAqB,GAAG,MAAM,CAsBnE;AAkBD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAaxC"}
@@ -5,11 +5,16 @@
5
5
  * CSS centres the line height on the font's own ascent and descent (half the
6
6
  * leading above, half below), so changing `line-height` by some amount moves
7
7
  * every baseline by half of it. PowerPoint does not. Measured on PowerPoint 16
8
- * slide exports (three one-line paragraphs at 40pt, Calibri, Georgia, Arial
9
- * and Segoe UI, `a:spcPct` 70% to 200% and `a:spcPts` 30 to 60pt, read at
8
+ * slide exports (one-line paragraphs, 49 font and size pairs at single spacing
9
+ * and four fonts at `a:spcPct` 70% to 200% and `a:spcPts` 30 to 60pt, read at
10
10
  * 4px per point), with `p` the line pitch, `s` the font size and `D` the
11
- * font's descent:
11
+ * descent PowerPoint keeps below the baseline:
12
12
  *
13
+ * - Single spacing is a pitch of exactly `1.2 s` for every font, with the
14
+ * font's own ascent and descent (the Windows metrics, `winAscent` and
15
+ * `winDescent`) scaled to fill it: the baseline sits `1.2 s a / (a + d)`
16
+ * from the top of the line, so `D = 1.2 s d / (a + d)`. Calibri measured
17
+ * 0.940 em, Arial 0.975, Georgia 0.969, Segoe UI 0.975, Verdana 0.994.
13
18
  * - A line taller than single spacing (`p > 1.2 s`) sits its baseline at
14
19
  * exactly 75% of the pitch, whatever the font: 102% to 200% and every exact
15
20
  * pitch above single all measured `0.75 p` (plus the glyph overshoot).
@@ -20,13 +25,10 @@
20
25
  * So `baseline = p > 1.2 s ? 0.75 p : max(0.75 p, p - D)`. The jump at single
21
26
  * spacing is real: 102% put the Calibri baseline 0.75pt HIGHER than 100% did.
22
27
  *
23
- * The move is taken relative to single spacing, which is left exactly as the
24
- * renderer already draws it. The descent PowerPoint keeps at single spacing
25
- * is close to, not equal to, the one the browser reports (0.261 em against
26
- * Calibri's 0.269, 0.225 against Segoe UI's 0.251), so placing single-spaced
27
- * lines from the browser's metrics moved the most common text, Calibri at
28
- * 100%, by a fraction of a pixel the wrong way; only the change the spacing
29
- * makes is applied.
28
+ * The move is the whole difference between that baseline and the one CSS
29
+ * gives the line (see {@link cssBaseline}), single spacing included: fonts
30
+ * differ in where CSS puts their single line (Arial and Georgia sat 1.5pt
31
+ * high at 40pt, Segoe UI 1.4pt low), so no font is left to the flow.
30
32
  *
31
33
  * @module render/paragraph-baseline
32
34
  */
@@ -36,23 +38,52 @@ import type { ParagraphRun, RenderParagraph } from './paragraph-types.js';
36
38
  export interface FontBox {
37
39
  ascent: number;
38
40
  descent: number;
41
+ /**
42
+ * The line gap (same unit as `ascent`) PowerPoint adds above the ascent
43
+ * before scaling the box to its pitch; browsers do not expose it (see
44
+ * `font-line-gap`). Absent means none.
45
+ */
46
+ lineGap?: number;
47
+ /**
48
+ * Set when the box describes a stand-in: the font is a web font that has
49
+ * not loaded yet (or is missing), so the browser measured a fallback face.
50
+ * Such a box is never cached, and a paragraph placed from it is settled
51
+ * again once the fonts have loaded (see `paragraph-baseline-settle`).
52
+ */
53
+ provisional?: boolean;
54
+ /** Of a provisional box: the font is a web font that is still loading, so its own box is about to be known. */
55
+ loading?: boolean;
39
56
  }
40
57
  /** Ascent and descent of a CSS `font` shorthand, or `undefined` when they cannot be measured. */
41
58
  export type FontBoxMeasure = (font: string) => FontBox | undefined;
42
59
  /** PowerPoint's baseline, in px from the top of a line `pitch` tall of text `size` px. */
43
60
  export declare function powerPointBaseline(pitch: number, size: number, descent: number): number;
61
+ /**
62
+ * The descent (px) PowerPoint keeps below the baseline of a single line of
63
+ * `size` px text: the font's ascent and descent scaled to fill its 1.2 pitch.
64
+ * `box` is the font's ascent and descent at any one size.
65
+ */
66
+ export declare function powerPointDescent(size: number, box: FontBox): number;
44
67
  /** One inline box CSS puts on a line: its `line-height` in px and its font's box. */
45
68
  export interface CssLineBox {
46
69
  lineHeight: number;
47
70
  font: FontBox;
48
71
  }
49
- /** The baseline CSS gives a line holding `boxes`, in px from the line's top. */
72
+ /**
73
+ * The baseline CSS gives a line holding `boxes`, in px from the line's top.
74
+ * Layout works on whole-pixel ascents and descents and floors the leading it
75
+ * puts above a box (`ascent + floor((lineHeight - ascent - descent) / 2)`),
76
+ * which moves a line by up to half a pixel against the unrounded centring.
77
+ */
50
78
  export declare function cssBaseline(boxes: readonly CssLineBox[]): number;
51
79
  /**
52
80
  * {@link FontBoxMeasure} on a 2D canvas (`fontBoundingBoxAscent` /
53
81
  * `fontBoundingBoxDescent`, the metrics the browser lays a line box out
54
- * with). Answers `undefined` outside a browser and for a web font that has
55
- * not loaded yet, and caches only fonts that are ready.
82
+ * with). Answers `undefined` outside a browser. A font that has not settled
83
+ * (see `isFontSettled`: a web font still loading, or one that is missing)
84
+ * is measured on the stand-in the browser paints it with, flagged
85
+ * `provisional` and left out of the cache, so a stand-in's box is never
86
+ * mistaken for the font's own once it has loaded.
56
87
  */
57
88
  export declare const measureFontBoxWithCanvas: FontBoxMeasure;
58
89
  /** What {@link resolveParagraphBaselineShift} reads from one paragraph. */
@@ -74,6 +105,34 @@ export interface BaselineShiftInput {
74
105
  * same baseline offset, so one move fixes them all and leaves the flow alone.
75
106
  */
76
107
  export declare function resolveParagraphBaselineShift(input: BaselineShiftInput): number | undefined;
108
+ /** What {@link baselineShiftOf} reads: one line's size, pitch and font boxes. */
109
+ export interface BaselineGeometry {
110
+ /** Font size (px) of the text and its line pitch (px). */
111
+ size: number;
112
+ pitch: number;
113
+ /** The inline boxes on the line: the paragraph strut, then the text run. */
114
+ boxes: readonly [CssLineBox, CssLineBox];
115
+ /** The text's font box at a large size, whose proportions PowerPoint scales to its pitch. */
116
+ reference: FontBox;
117
+ /** The paragraph strut's font size (px). */
118
+ strutSizePx: number;
119
+ /**
120
+ * The boxes are those of a stand-in for a web font that is still loading.
121
+ * Its own proportions are not known yet, so the move is only what the
122
+ * spacing changes from single spacing, which the renderer leaves where the
123
+ * browser puts it; the paragraph is placed again when the font has loaded.
124
+ */
125
+ loading?: boolean;
126
+ }
127
+ /** How far (px) to move a line so its baseline is PowerPoint's, or `undefined` for no move. */
128
+ export declare function baselineShiftOf(geometry: BaselineGeometry): number | undefined;
129
+ /** The font a paragraph's text is measured at for the proportions PowerPoint scales to its pitch. */
130
+ export declare function referenceFont(style: ParagraphRun['style'], family: string): string;
131
+ /** {@link resolveParagraphBaselineShift} that also says whether a stand-in font was measured. */
132
+ export declare function resolveParagraphBaseline(input: BaselineShiftInput): {
133
+ shift: number | undefined;
134
+ provisional: boolean;
135
+ } | undefined;
77
136
  /**
78
137
  * Move `paragraph` onto PowerPoint's baselines (see
79
138
  * {@link resolveParagraphBaselineShift}) with a relative `top`, which leaves
@@ -84,4 +143,14 @@ export declare function applyParagraphBaselineShift(paragraph: RenderParagraph,
84
143
  fontFamily: string;
85
144
  fontSizePx: number;
86
145
  }, measure?: FontBoxMeasure): void;
146
+ /** The custom property that marks a paragraph placed from a stand-in font's box. */
147
+ export declare const BASELINE_PENDING_VAR = "--pptx-baseline-pending";
148
+ /**
149
+ * What a placement needs to be redone once its font has loaded, as a value a
150
+ * style declaration can carry in every binding: the first text run's font and
151
+ * the paragraph's line height and strut, URI-encoded JSON.
152
+ */
153
+ export declare function encodePendingBaseline(input: BaselineShiftInput): string;
154
+ /** The input {@link encodePendingBaseline} recorded, or `undefined` when the value is not one. */
155
+ export declare function decodePendingBaseline(value: string): BaselineShiftInput | undefined;
87
156
  //# sourceMappingURL=paragraph-baseline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paragraph-baseline.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-baseline.ts"],"names":[],"mappings":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AAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EACjD,OAAO,CAAC,EAAE,cAAc,GACtB,IAAI,CAmCN;AAED,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAiBvE;AAED,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAiBnF"}
@@ -132,6 +132,12 @@ export interface RenderParagraph {
132
132
  * `paragraphStyle`; carried for code that models the layout (morph).
133
133
  */
134
134
  baselineShiftPx?: number;
135
+ /**
136
+ * Set when the baseline was placed from a stand-in font's metrics because
137
+ * the paragraph's web font had not loaded; `paragraphStyle` then carries
138
+ * the `--pptx-baseline-pending` marker `settleBaselines` places it again by.
139
+ */
140
+ baselineProvisional?: boolean;
135
141
  /**
136
142
  * `font-size` in px to set on the paragraph element so its CSS line boxes
137
143
  * are built from its OWN runs rather than the text body's default size.
@@ -1 +1 @@
1
- {"version":3,"file":"paragraph-types.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAA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