@office-open/core 0.6.4 → 0.6.6

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 Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "../index-DigYTiB_.mjs";
1
+ import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "../index-BDwL0MVx.js";
2
2
  export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, SmartArtData, TransPoint, TreeNode, createDataModel, getColorXml, getLayoutXml, getStyleXml };
@@ -1,2 +1,2 @@
1
- import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-DBQ_rRfK.mjs";
1
+ import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-DGNfjKA9.js";
2
2
  export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, TransPoint, createDataModel, getColorXml, getLayoutXml, getStyleXml };
@@ -1,4 +1,4 @@
1
- import { b as XmlComponent, c as chartAttr } from "./xml-components-CADgke8j.mjs";
1
+ import { b as XmlComponent, c as chartAttr } from "./xml-components-SxPlKGms.js";
2
2
  //#region src/smartart/categories.ts
3
3
  /** Layout ID → OOXML category type */
4
4
  const LAYOUT_CATEGORIES = {
@@ -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-CIh0bdS1.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-CyCW27--.js";
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 };
@@ -1,7 +1,12 @@
1
- import { hpsMeasureValue } from "./values.mjs";
2
- import { xml, xml2js } from "@office-open/xml";
1
+ import { hpsMeasureValue } from "./values.js";
2
+ import { escapeXml, xml, xml2js } from "@office-open/xml";
3
3
  //#region src/xml-components/base.ts
4
4
  /**
5
+ * Base XML Component infrastructure for OOXML document generation.
6
+ *
7
+ * @module
8
+ */
9
+ /**
5
10
  * Abstract base class for all XML components.
6
11
  */
7
12
  var BaseXmlComponent = class {
@@ -10,6 +15,14 @@ var BaseXmlComponent = class {
10
15
  constructor(rootKey) {
11
16
  this.rootKey = rootKey;
12
17
  }
18
+ /**
19
+ * Direct XML serialization. Override in subclasses for zero-allocation output.
20
+ * Default falls back to prepForXml() + xml().
21
+ */
22
+ toXml(context) {
23
+ const obj = this.prepForXml(context);
24
+ return obj ? xml(obj) : "";
25
+ }
13
26
  };
14
27
  //#endregion
15
28
  //#region src/xml-components/component.ts
@@ -26,6 +39,11 @@ var BaseXmlComponent = class {
26
39
  const EMPTY_OBJECT = Object.seal({});
27
40
  /**
28
41
  * Base class for all XML components in OOXML documents.
42
+ *
43
+ * `toXml()` traverses the `root` array and calls `toXml()` on each
44
+ * `BaseXmlComponent` child — this avoids building the intermediate
45
+ * `IXmlableObject` tree. Inline `IXmlableObject` children fall back to
46
+ * `xml()` for serialization.
29
47
  */
30
48
  var XmlComponent = class extends BaseXmlComponent {
31
49
  /**
@@ -50,12 +68,26 @@ var XmlComponent = class extends BaseXmlComponent {
50
68
  return { [this.rootKey]: children.length ? children.length === 1 && children[0] && typeof children[0] === "object" && "_attr" in children[0] ? children[0] : children : EMPTY_OBJECT };
51
69
  }
52
70
  /**
53
- * Direct XML serialization. Override in subclasses for zero-allocation output.
54
- * Default falls back to prepForXml() + xml().
71
+ * Direct XML serialization traverses `root` and calls `toXml()` on
72
+ * each child, concatenating the results into a single string.
55
73
  */
56
74
  toXml(context) {
57
- const obj = this.prepForXml(context);
58
- return obj ? xml(obj) : "";
75
+ const childParts = [];
76
+ const attrParts = [];
77
+ for (const child of this.root) if (child instanceof BaseXmlComponent) {
78
+ const s = child.toXml(context);
79
+ if (s) childParts.push(s);
80
+ } else if (typeof child === "string") childParts.push(escapeXml(child));
81
+ else if (child != null && typeof child === "object") if ("_attr" in child) {
82
+ const a = child._attr;
83
+ for (const key of Object.keys(a)) attrParts.push(`${key}="${escapeXml(String(a[key]))}"`);
84
+ } else if ("_attributes" in child) {
85
+ const a = child._attributes;
86
+ for (const key of Object.keys(a)) attrParts.push(`${key}="${escapeXml(String(a[key]))}"`);
87
+ } else childParts.push(xml(child));
88
+ const attrStr = attrParts.length ? " " + attrParts.join(" ") : "";
89
+ const body = childParts.join("");
90
+ return body.length === 0 ? `<${this.rootKey}${attrStr}/>` : `<${this.rootKey}${attrStr}>${body}</${this.rootKey}>`;
59
91
  }
60
92
  /**
61
93
  * @deprecated Internal use only.
@@ -79,6 +111,17 @@ var IgnoreIfEmptyXmlComponent = class extends XmlComponent {
79
111
  if (this.includeIfEmpty) return result;
80
112
  if (result && (typeof result[this.rootKey] !== "object" || Object.keys(result[this.rootKey]).length)) return result;
81
113
  }
114
+ /**
115
+ * Suppress empty elements — super.toXml() produces a self-closing tag
116
+ * (`<tag/>`) when there are no child elements; IgnoreIfEmpty returns ""
117
+ * in that case. Child components that already override toXml() (e.g.
118
+ * Worksheet) are unaffected.
119
+ */
120
+ toXml(context) {
121
+ if (this.includeIfEmpty) return super.toXml(context);
122
+ const result = super.toXml(context);
123
+ return result.endsWith("/>") ? "" : result;
124
+ }
82
125
  };
83
126
  //#endregion
84
127
  //#region src/xml-components/attributes.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-open/core",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "Shared OOXML infrastructure: XmlComponent, value validators, unit converters",
5
5
  "keywords": [
6
6
  "core",
@@ -27,44 +27,40 @@
27
27
  "dist"
28
28
  ],
29
29
  "type": "module",
30
- "main": "dist/index.mjs",
31
- "types": "dist/index.d.mts",
30
+ "main": "dist/index.js",
31
+ "types": "dist/index.d.ts",
32
32
  "exports": {
33
33
  ".": {
34
- "types": "./dist/index.d.mts",
35
- "import": "./dist/index.mjs"
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js"
36
36
  },
37
37
  "./values": {
38
- "types": "./dist/values.d.mts",
39
- "import": "./dist/values.mjs"
38
+ "types": "./dist/values.d.ts",
39
+ "import": "./dist/values.js"
40
40
  },
41
41
  "./smartart": {
42
- "types": "./dist/smartart/index.d.mts",
43
- "import": "./dist/smartart/index.mjs"
42
+ "types": "./dist/smartart/index.d.ts",
43
+ "import": "./dist/smartart/index.js"
44
44
  },
45
45
  "./chart": {
46
- "types": "./dist/chart/index.d.mts",
47
- "import": "./dist/chart/index.mjs"
46
+ "types": "./dist/chart/index.d.ts",
47
+ "import": "./dist/chart/index.js"
48
48
  },
49
49
  "./drawingml": {
50
- "types": "./dist/drawingml/index.d.mts",
51
- "import": "./dist/drawingml/index.mjs"
52
- },
53
- "./archive": {
54
- "types": "./dist/archive.d.mts",
55
- "import": "./dist/archive.mjs"
50
+ "types": "./dist/drawingml/index.d.ts",
51
+ "import": "./dist/drawingml/index.js"
56
52
  }
57
53
  },
58
54
  "dependencies": {
59
55
  "fflate": "0.8.3",
60
56
  "hash.js": "1.1.7",
61
57
  "nanoid": "5.1.11",
62
- "@office-open/xml": "0.6.4"
58
+ "@office-open/xml": "0.6.6"
63
59
  },
64
60
  "scripts": {
65
61
  "dev": "basis build --stub",
66
62
  "build": "vp pack",
67
- "test": "vp test run --coverage",
63
+ "test": "vp test run",
68
64
  "check": "vp check --fix"
69
65
  }
70
66
  }
@@ -1,58 +0,0 @@
1
- import { Element } from "@office-open/xml";
2
-
3
- //#region src/archive.d.ts
4
- /**
5
- * Unzip an OOXML file (.docx, .pptx) into a Map of path → Uint8Array.
6
- */
7
- declare function unzipToMap(data: Uint8Array): Map<string, Uint8Array>;
8
- /**
9
- * Read a file from the zip as a UTF-8 string.
10
- */
11
- declare function readTextFromZip(zip: Map<string, Uint8Array>, path: string): string | undefined;
12
- /**
13
- * Parse an XML file from the zip into an Element tree.
14
- */
15
- declare function readXmlFromZip(zip: Map<string, Uint8Array>, path: string): Element | undefined;
16
- /**
17
- * Read a binary file from the zip.
18
- */
19
- declare function readBinaryFromZip(zip: Map<string, Uint8Array>, path: string): Uint8Array | undefined;
20
- /**
21
- * Parse all XML files in the zip into Element trees.
22
- * Skips media files, binary files, and the main document/presentation file.
23
- */
24
- declare function readAllXmlParts(zip: Map<string, Uint8Array>, options?: {
25
- skipPaths?: string[];
26
- }): Record<string, Element>;
27
- /**
28
- * List all files in the zip matching a prefix.
29
- */
30
- declare function listFiles(zip: Map<string, Uint8Array>, prefix: string): string[];
31
- /**
32
- * Convert Uint8Array to base64 string.
33
- */
34
- declare function uint8ToBase64(data: Uint8Array): string;
35
- /**
36
- * Determine image type from file extension.
37
- */
38
- declare function getImageType(fileName: string): string;
39
- interface Relationship {
40
- id: string;
41
- target: string;
42
- type: string;
43
- targetMode?: string;
44
- }
45
- declare function parseRels(zip: Map<string, Uint8Array>, path: string): Relationship[];
46
- declare function findRel(rels: Relationship[], id: string): Relationship | undefined;
47
- declare function findRelsByType(rels: Relationship[], typeSubstring: string): Relationship[];
48
- /**
49
- * Zip a map of path → Uint8Array/string into a ZIP buffer.
50
- * XML strings are auto-encoded to UTF-8 bytes.
51
- */
52
- declare function zipToBuffer(files: Map<string, Uint8Array | string>): Uint8Array;
53
- /**
54
- * Serialize an Element tree to an XML string.
55
- */
56
- declare function elementToXml(el: Element): string;
57
- //#endregion
58
- export { Relationship, elementToXml, findRel, findRelsByType, getImageType, listFiles, parseRels, readAllXmlParts, readBinaryFromZip, readTextFromZip, readXmlFromZip, uint8ToBase64, unzipToMap, zipToBuffer };
package/dist/archive.mjs DELETED
@@ -1,135 +0,0 @@
1
- import { attr, js2xml, xml2js } from "@office-open/xml";
2
- import { strFromU8, strToU8, unzipSync, zipSync } from "fflate";
3
- //#region src/archive.ts
4
- const XML_PARSE_OPTIONS = {
5
- nativeTypeAttributes: true,
6
- captureSpacesBetweenElements: true
7
- };
8
- /**
9
- * Unzip an OOXML file (.docx, .pptx) into a Map of path → Uint8Array.
10
- */
11
- function unzipToMap(data) {
12
- const entries = unzipSync(data);
13
- const map = /* @__PURE__ */ new Map();
14
- for (const [path, bytes] of Object.entries(entries)) map.set(path, bytes);
15
- return map;
16
- }
17
- /**
18
- * Read a file from the zip as a UTF-8 string.
19
- */
20
- function readTextFromZip(zip, path) {
21
- const data = zip.get(path);
22
- if (data === void 0) return void 0;
23
- return strFromU8(data);
24
- }
25
- /**
26
- * Parse an XML file from the zip into an Element tree.
27
- */
28
- function readXmlFromZip(zip, path) {
29
- const text = readTextFromZip(zip, path);
30
- if (text === void 0) return void 0;
31
- return xml2js(text, XML_PARSE_OPTIONS).elements?.find((e) => e.type === "element");
32
- }
33
- /**
34
- * Read a binary file from the zip.
35
- */
36
- function readBinaryFromZip(zip, path) {
37
- return zip.get(path);
38
- }
39
- /**
40
- * Parse all XML files in the zip into Element trees.
41
- * Skips media files, binary files, and the main document/presentation file.
42
- */
43
- function readAllXmlParts(zip, options) {
44
- const parts = {};
45
- const skip = new Set(options?.skipPaths ?? []);
46
- for (const path of zip.keys()) {
47
- if (skip.has(path)) continue;
48
- if (path.startsWith("word/media/") || path.startsWith("ppt/media/") || path.startsWith("xl/media/") || path.endsWith(".png") || path.endsWith(".jpg") || path.endsWith(".jpeg") || path.endsWith(".gif") || path.endsWith(".bmp") || path.endsWith(".tif") || path.endsWith(".tiff") || path.endsWith(".emf") || path.endsWith(".wmf") || path.endsWith(".svg") || path.endsWith(".wav") || path.endsWith(".mp3") || path.endsWith(".mp4") || path.endsWith(".avi") || path.endsWith(".wmv") || path.endsWith(".thmx") || path.endsWith(".bin")) continue;
49
- const el = readXmlFromZip(zip, path);
50
- if (el) parts[path] = el;
51
- }
52
- return parts;
53
- }
54
- /**
55
- * List all files in the zip matching a prefix.
56
- */
57
- function listFiles(zip, prefix) {
58
- const result = [];
59
- for (const path of zip.keys()) if (path.startsWith(prefix)) result.push(path);
60
- return result;
61
- }
62
- /**
63
- * Convert Uint8Array to base64 string.
64
- */
65
- function uint8ToBase64(data) {
66
- const chunkSize = 8192;
67
- let binary = "";
68
- for (let i = 0; i < data.length; i += chunkSize) {
69
- const chunk = data.subarray(i, Math.min(i + chunkSize, data.length));
70
- binary += String.fromCharCode(...chunk);
71
- }
72
- return btoa(binary);
73
- }
74
- /**
75
- * Determine image type from file extension.
76
- */
77
- function getImageType(fileName) {
78
- const ext = fileName.split(".").pop()?.toLowerCase() ?? "";
79
- if ([
80
- "png",
81
- "jpg",
82
- "jpeg",
83
- "gif",
84
- "bmp",
85
- "tif",
86
- "tiff",
87
- "ico",
88
- "emf",
89
- "wmf",
90
- "svg"
91
- ].includes(ext)) return ext === "jpeg" ? "jpg" : ext;
92
- return "png";
93
- }
94
- function parseRels(zip, path) {
95
- const xml = readXmlFromZip(zip, path);
96
- if (!xml) return [];
97
- const result = [];
98
- for (const rel of xml.elements ?? []) {
99
- if (rel.name !== "Relationship") continue;
100
- const id = attr(rel, "Id");
101
- const target = attr(rel, "Target");
102
- const type = attr(rel, "Type");
103
- const targetMode = attr(rel, "TargetMode");
104
- if (id && target) result.push({
105
- id,
106
- target,
107
- type: type ?? "",
108
- ...targetMode ? { targetMode } : {}
109
- });
110
- }
111
- return result;
112
- }
113
- function findRel(rels, id) {
114
- return rels.find((r) => r.id === id);
115
- }
116
- function findRelsByType(rels, typeSubstring) {
117
- return rels.filter((r) => r.type.includes(typeSubstring));
118
- }
119
- /**
120
- * Zip a map of path → Uint8Array/string into a ZIP buffer.
121
- * XML strings are auto-encoded to UTF-8 bytes.
122
- */
123
- function zipToBuffer(files) {
124
- const entries = {};
125
- for (const [path, data] of files) entries[path] = typeof data === "string" ? strToU8(data) : data;
126
- return zipSync(entries);
127
- }
128
- /**
129
- * Serialize an Element tree to an XML string.
130
- */
131
- function elementToXml(el) {
132
- return js2xml(el);
133
- }
134
- //#endregion
135
- export { elementToXml, findRel, findRelsByType, getImageType, listFiles, parseRels, readAllXmlParts, readBinaryFromZip, readTextFromZip, readXmlFromZip, uint8ToBase64, unzipToMap, zipToBuffer };
@@ -1,279 +0,0 @@
1
- import hash from "hash.js";
2
- import { customAlphabet, nanoid } from "nanoid/non-secure";
3
- //#region src/converters.ts
4
- /**
5
- * OOXML unit conversion utilities.
6
- *
7
- * @module
8
- */
9
- /**
10
- * Converts millimeters to TWIP (twentieths of a point).
11
- */
12
- const convertMillimetersToTwip = (millimeters) => Math.floor(millimeters / 25.4 * 72 * 20);
13
- /**
14
- * Converts inches to TWIP (twentieths of a point).
15
- */
16
- const convertInchesToTwip = (inches) => Math.floor(inches * 72 * 20);
17
- /**
18
- * Converts pixels to EMU (96 DPI).
19
- */
20
- const convertPixelsToEmu = (pixels) => Math.round(pixels * 9525);
21
- /**
22
- * Converts EMU to pixels (96 DPI).
23
- */
24
- const convertEmuToPixels = (emus) => Math.round(emus / 9525);
25
- /**
26
- * Converts inches to EMU.
27
- */
28
- const convertInchesToEmu = (inches) => Math.round(inches * 914400);
29
- /**
30
- * Converts EMU to inches.
31
- */
32
- const convertEmuToInches = (emus) => emus / 914400;
33
- /**
34
- * Converts points to EMU.
35
- */
36
- const convertPointsToEmu = (points) => Math.round(points * 12700);
37
- /**
38
- * Converts EMU to points.
39
- */
40
- const convertEmuToPoints = (emus) => emus / 12700;
41
- //#endregion
42
- //#region src/id-generators.ts
43
- /**
44
- * Unique ID generation utilities.
45
- *
46
- * @module
47
- */
48
- /**
49
- * Creates a unique numeric ID generator with sequential numbering.
50
- */
51
- const uniqueNumericIdCreator = (initial = 0) => {
52
- let currentCount = initial;
53
- return () => ++currentCount;
54
- };
55
- /**
56
- * Generates a unique lowercase alphanumeric ID using nanoid.
57
- */
58
- const uniqueId = () => nanoid().toLowerCase();
59
- /**
60
- * Generates a SHA-1 hash of the provided data.
61
- */
62
- const hashedId = (data) => hash.sha1().update(data instanceof ArrayBuffer ? new Uint8Array(data) : data).digest("hex");
63
- /**
64
- * Generates a random hexadecimal string of specified length.
65
- */
66
- const generateUuidPart = (count) => customAlphabet("1234567890abcdef", count)();
67
- /**
68
- * Generates a UUID v4-style unique identifier.
69
- */
70
- const uniqueUuid = () => `${generateUuidPart(8)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(12)}`;
71
- //#endregion
72
- //#region src/xsd-mappings.ts
73
- /**
74
- * Bidirectional mappings between user-friendly values and XSD abbreviated values.
75
- *
76
- * When XSD uses full English words (e.g. "center", "start"), values are used directly — no mapping needed.
77
- * When XSD uses abbreviations (e.g. "ctr", "l", "rnd"), this module maps them to full words.
78
- *
79
- * Usage in generation (Options → XML): xsdAlign.to("center") → "ctr"
80
- * Usage in parsing (XML → Options): xsdAlign.from("ctr") → "center"
81
- */
82
- /** Invert a Record<K, V> into Record<V, K>. */
83
- function invertMap(map) {
84
- const result = {};
85
- for (const key in map) result[map[key]] = key;
86
- return result;
87
- }
88
- /** Create a bidirectional mapping helper from a single forward map. */
89
- function bidi(forward) {
90
- const reverse = invertMap(forward);
91
- return {
92
- /** User-friendly value → XSD value */
93
- to: (key) => forward[key] ?? key,
94
- /** XSD value → user-friendly value */
95
- from: (xsd) => reverse[xsd] ?? xsd,
96
- /** The forward map (user → XSD) */
97
- forward,
98
- /** The reverse map (XSD → user) */
99
- reverse
100
- };
101
- }
102
- const xsdRectAlignment = bidi({
103
- topLeft: "tl",
104
- top: "t",
105
- topRight: "tr",
106
- left: "l",
107
- center: "ctr",
108
- right: "r",
109
- bottomLeft: "bl",
110
- bottom: "b",
111
- bottomRight: "br"
112
- });
113
- const xsdTextAlign = bidi({
114
- left: "l",
115
- center: "ctr",
116
- right: "r",
117
- justify: "just"
118
- });
119
- const xsdTextAnchor = bidi({
120
- top: "t",
121
- center: "ctr",
122
- bottom: "b"
123
- });
124
- const xsdLineCap = bidi({
125
- round: "rnd",
126
- square: "sq",
127
- flat: "flat"
128
- });
129
- const xsdCompoundLine = bidi({
130
- single: "sng",
131
- double: "dbl",
132
- thickThin: "thickThin",
133
- thinThick: "thinThick",
134
- triple: "tri"
135
- });
136
- const xsdPenAlignment = bidi({
137
- center: "ctr",
138
- inside: "in"
139
- });
140
- const xsdLineEndSize = bidi({
141
- small: "sm",
142
- medium: "med",
143
- large: "lg"
144
- });
145
- const xsdBlendMode = bidi({
146
- over: "over",
147
- multiply: "mult",
148
- screen: "screen",
149
- darken: "darken",
150
- lighten: "lighten"
151
- });
152
- const xsdPathFillMode = bidi({
153
- none: "none",
154
- normal: "norm",
155
- lighten: "lighten",
156
- lightenLess: "lightenLess",
157
- darken: "darken",
158
- darkenLess: "darkenLess"
159
- });
160
- const xsdEffectContainer = bidi({
161
- sibling: "sib",
162
- tree: "tree"
163
- });
164
- const xsdPresetShadow = bidi({
165
- shadow1: "shdw1",
166
- shadow2: "shdw2",
167
- shadow3: "shdw3",
168
- shadow4: "shdw4",
169
- shadow5: "shdw5",
170
- shadow6: "shdw6",
171
- shadow7: "shdw7",
172
- shadow8: "shdw8",
173
- shadow9: "shdw9",
174
- shadow10: "shdw10",
175
- shadow11: "shdw11",
176
- shadow12: "shdw12",
177
- shadow13: "shdw13",
178
- shadow14: "shdw14",
179
- shadow15: "shdw15",
180
- shadow16: "shdw16",
181
- shadow17: "shdw17",
182
- shadow18: "shdw18",
183
- shadow19: "shdw19",
184
- shadow20: "shdw20"
185
- });
186
- const xsdMaterialType = bidi({
187
- legacyMatte: "legacyMatte",
188
- legacyPlastic: "legacyPlastic",
189
- legacyMetal: "legacyMetal",
190
- legacyWireframe: "legacyWireframe",
191
- matte: "matte",
192
- plastic: "plastic",
193
- metal: "metal",
194
- warmMatte: "warmMatte",
195
- translucentPowder: "translucentPowder",
196
- powder: "powder",
197
- darkEdge: "dkEdge",
198
- softEdge: "softEdge",
199
- clear: "clear",
200
- flat: "flat",
201
- softMetal: "softmetal"
202
- });
203
- const xsdPattern = bidi({
204
- percent5: "pct5",
205
- percent10: "pct10",
206
- percent20: "pct20",
207
- percent25: "pct25",
208
- percent30: "pct30",
209
- percent40: "pct40",
210
- percent50: "pct50",
211
- percent60: "pct60",
212
- percent70: "pct70",
213
- percent75: "pct75",
214
- percent80: "pct80",
215
- percent90: "pct90",
216
- horizontal: "horz",
217
- vertical: "vert",
218
- lightHorizontal: "ltHorz",
219
- lightVertical: "ltVert",
220
- darkHorizontal: "dkHorz",
221
- darkVertical: "dkVert",
222
- narrowHorizontal: "narHorz",
223
- narrowVertical: "narVert",
224
- dashedHorizontal: "dashHorz",
225
- dashedVertical: "dashVert",
226
- cross: "cross",
227
- downDiagonal: "dnDiag",
228
- upDiagonal: "upDiag",
229
- lightDownDiagonal: "ltDnDiag",
230
- lightUpDiagonal: "ltUpDiag",
231
- darkDownDiagonal: "dkDnDiag",
232
- darkUpDiagonal: "dkUpDiag",
233
- wideDownDiagonal: "wdDnDiag",
234
- wideUpDiagonal: "wdUpDiag",
235
- dashedDownDiagonal: "dashDnDiag",
236
- dashedUpDiagonal: "dashUpDiag",
237
- diagonalCross: "diagCross",
238
- smallChecker: "smCheck",
239
- largeChecker: "lgCheck",
240
- smallGrid: "smGrid",
241
- largeGrid: "lgGrid",
242
- dotGrid: "dotGrid",
243
- smallConfetti: "smConfetti",
244
- largeConfetti: "lgConfetti",
245
- horizontalBrick: "horzBrick",
246
- diagonalBrick: "diagBrick",
247
- solidDiamond: "solidDmnd",
248
- openDiamond: "openDmnd",
249
- dottedDiamond: "dotDmnd",
250
- plaid: "plaid",
251
- sphere: "sphere",
252
- weave: "weave",
253
- divot: "divot",
254
- shingle: "shingle",
255
- wave: "wave",
256
- trellis: "trellis",
257
- zigZag: "zigZag"
258
- });
259
- const xsdVerticalMergeRev = bidi({
260
- continue: "cont",
261
- restart: "rest"
262
- });
263
- const xsdUnderlineStyle = bidi({
264
- single: "sng",
265
- double: "dbl",
266
- none: "none"
267
- });
268
- const xsdStrikeStyle = bidi({
269
- singleStrike: "sngStrike",
270
- doubleStrike: "dblStrike",
271
- noStrike: "noStrike"
272
- });
273
- const xsdTextCaps = bidi({
274
- none: "none",
275
- all: "all",
276
- small: "small"
277
- });
278
- //#endregion
279
- export { convertPointsToEmu as A, convertEmuToInches as C, convertInchesToTwip as D, convertInchesToEmu as E, convertMillimetersToTwip as O, uniqueUuid as S, convertEmuToPoints as T, xsdUnderlineStyle as _, xsdLineCap as a, uniqueId as b, xsdPathFillMode as c, xsdPresetShadow as d, xsdRectAlignment as f, xsdTextCaps as g, xsdTextAnchor as h, xsdEffectContainer as i, convertPixelsToEmu as k, xsdPattern as l, xsdTextAlign as m, xsdBlendMode as n, xsdLineEndSize as o, xsdStrikeStyle as p, xsdCompoundLine as r, xsdMaterialType as s, invertMap as t, xsdPenAlignment as u, xsdVerticalMergeRev as v, convertEmuToPixels as w, uniqueNumericIdCreator as x, hashedId as y };
File without changes