@office-open/core 0.10.2 → 0.10.4

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.
@@ -1,2 +1,2 @@
1
- import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "../index-vEeWkbm5.mjs";
1
+ import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "../index-3STznXzZ.mjs";
2
2
  export { type ColorSchemeOptions, DEFAULT_COLORS, type FontSchemeOptions, type ThemeOptions, buildThemeXml, createThemeXml, themeDesc };
@@ -1,2 +1,2 @@
1
- import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "../values-Dqj8cbcy.mjs";
1
+ import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "../values-DQfI1FSg.mjs";
2
2
  export { Percentage, PositivePercentage, PositiveUniversalMeasure, RelativeMeasure, ThemeColor, ThemeFont, UniversalMeasure, dateTimeValue, decimalNumber, eighthPointMeasureValue, hexBinary, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, universalMeasureValue, unsignedDecimalNumber };
@@ -12,18 +12,25 @@
12
12
  /**
13
13
  * A measurement value with optional sign and unit suffix.
14
14
  *
15
- * Supports units: mm (millimeters), cm (centimeters), in (inches),
16
- * pt (points), pc (picas), pi (picas).
15
+ * Supports units: mm (millimeters), cm (centimeters), in (inches), pt (points),
16
+ * pc (picas), pi (picas), and a project-only px (96 DPI pixels).
17
17
  *
18
- * Pattern: `-?[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)`
18
+ * px is NOT part of OOXML's ST_UniversalMeasure (whose pattern is
19
+ * `-?[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)`); it is a project extension so
20
+ * geometry APIs can accept `"200px"` alongside `"5cm"`. px is converted to EMU
21
+ * (or TWIP) on input and never written to XML verbatim. Note: Word line spacing
22
+ * with lineRule="auto" uses a bare multiple (240ths of a line), not a measure,
23
+ * so px is irrelevant there; spacing before/after and indents accept px and
24
+ * convert it to twips (1px = 15twip).
19
25
  *
20
26
  * @example
21
27
  * ```typescript
22
28
  * const measure: UniversalMeasure = "10.5mm";
29
+ * const px: UniversalMeasure = "200px";
23
30
  * const negative: UniversalMeasure = "-5pt";
24
31
  * ```
25
32
  */
26
- type UniversalMeasure = `${"-" | ""}${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi"}`;
33
+ type UniversalMeasure = `${"-" | ""}${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi" | "px"}`;
27
34
  /**
28
35
  * A positive measurement value with unit suffix.
29
36
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-open/core",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "Shared OOXML infrastructure — XML components, validators, converters, charts, and SmartArt",
5
5
  "keywords": [
6
6
  "core",
@@ -66,7 +66,7 @@
66
66
  "dependencies": {
67
67
  "@noble/hashes": "2.2.0",
68
68
  "fflate": "0.8.3",
69
- "@office-open/xml": "0.10.2"
69
+ "@office-open/xml": "0.10.4"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "basis build --stub",