docx-plus 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -11459,27 +11459,27 @@ const createBlip = (mediaData, blipEffects) => {
11459
11459
  * @example
11460
11460
  * ```typescript
11461
11461
  * // Crop 10% from left and right
11462
- * createSourceRectangle({ l: 10000, r: 10000 });
11462
+ * createSourceRectangle({ left: 10000, right: 10000 });
11463
11463
  * ```
11464
11464
  */
11465
11465
  const createSourceRectangle = (options) => {
11466
11466
  if (!options) return new BuilderElement({ name: "a:srcRect" });
11467
11467
  const attributes = {};
11468
- if (options.l !== void 0) attributes.l = {
11468
+ if (options.left !== void 0) attributes.l = {
11469
11469
  key: "l",
11470
- value: options.l
11470
+ value: options.left
11471
11471
  };
11472
- if (options.t !== void 0) attributes.t = {
11472
+ if (options.top !== void 0) attributes.t = {
11473
11473
  key: "t",
11474
- value: options.t
11474
+ value: options.top
11475
11475
  };
11476
- if (options.r !== void 0) attributes.r = {
11476
+ if (options.right !== void 0) attributes.r = {
11477
11477
  key: "r",
11478
- value: options.r
11478
+ value: options.right
11479
11479
  };
11480
- if (options.b !== void 0) attributes.b = {
11480
+ if (options.bottom !== void 0) attributes.b = {
11481
11481
  key: "b",
11482
- value: options.b
11482
+ value: options.bottom
11483
11483
  };
11484
11484
  return new BuilderElement({
11485
11485
  attributes,
@@ -19827,6 +19827,11 @@ var ContentTypes = class extends XmlComponent {
19827
19827
  this.root.push(createDefault("image/jpeg", "jpg"));
19828
19828
  this.root.push(createDefault("image/bmp", "bmp"));
19829
19829
  this.root.push(createDefault("image/gif", "gif"));
19830
+ this.root.push(createDefault("image/tiff", "tif"));
19831
+ this.root.push(createDefault("image/tiff", "tiff"));
19832
+ this.root.push(createDefault("image/x-emf", "emf"));
19833
+ this.root.push(createDefault("image/x-wmf", "wmf"));
19834
+ this.root.push(createDefault("image/x-icon", "ico"));
19830
19835
  this.root.push(createDefault("image/svg+xml", "svg"));
19831
19836
  this.root.push(createDefault("application/vnd.openxmlformats-package.relationships+xml", "rels"));
19832
19837
  this.root.push(createDefault("application/xml", "xml"));
package/dist/index.d.cts CHANGED
@@ -551,10 +551,10 @@ interface DocPropertiesOptions {
551
551
  //#endregion
552
552
  //#region src/file/drawing/inline/graphic/graphic-data/pic/blip/source-rectangle.d.ts
553
553
  interface SourceRectangleOptions {
554
- readonly l?: number;
555
- readonly t?: number;
556
- readonly r?: number;
557
- readonly b?: number;
554
+ readonly left?: number;
555
+ readonly top?: number;
556
+ readonly right?: number;
557
+ readonly bottom?: number;
558
558
  }
559
559
  //#endregion
560
560
  //#region src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/color-transform.d.ts
@@ -1258,7 +1258,7 @@ interface CoreMediaData {
1258
1258
  readonly srcRect?: SourceRectangleOptions;
1259
1259
  }
1260
1260
  interface RegularMediaData {
1261
- readonly type: "jpg" | "png" | "gif" | "bmp";
1261
+ readonly type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
1262
1262
  }
1263
1263
  interface SvgMediaData {
1264
1264
  readonly type: "svg";
@@ -1429,7 +1429,7 @@ interface CoreImageOptions {
1429
1429
  readonly tile?: TileOptions;
1430
1430
  }
1431
1431
  interface RegularImageOptions {
1432
- readonly type: "jpg" | "png" | "gif" | "bmp";
1432
+ readonly type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
1433
1433
  readonly data: DataType;
1434
1434
  }
1435
1435
  interface SvgMediaOptions {
package/dist/index.d.mts CHANGED
@@ -553,10 +553,10 @@ interface DocPropertiesOptions {
553
553
  //#endregion
554
554
  //#region src/file/drawing/inline/graphic/graphic-data/pic/blip/source-rectangle.d.ts
555
555
  interface SourceRectangleOptions {
556
- readonly l?: number;
557
- readonly t?: number;
558
- readonly r?: number;
559
- readonly b?: number;
556
+ readonly left?: number;
557
+ readonly top?: number;
558
+ readonly right?: number;
559
+ readonly bottom?: number;
560
560
  }
561
561
  //#endregion
562
562
  //#region src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/color-transform.d.ts
@@ -1260,7 +1260,7 @@ interface CoreMediaData {
1260
1260
  readonly srcRect?: SourceRectangleOptions;
1261
1261
  }
1262
1262
  interface RegularMediaData {
1263
- readonly type: "jpg" | "png" | "gif" | "bmp";
1263
+ readonly type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
1264
1264
  }
1265
1265
  interface SvgMediaData {
1266
1266
  readonly type: "svg";
@@ -1431,7 +1431,7 @@ interface CoreImageOptions {
1431
1431
  readonly tile?: TileOptions;
1432
1432
  }
1433
1433
  interface RegularImageOptions {
1434
- readonly type: "jpg" | "png" | "gif" | "bmp";
1434
+ readonly type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
1435
1435
  readonly data: DataType;
1436
1436
  }
1437
1437
  interface SvgMediaOptions {
@@ -11456,27 +11456,27 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
11456
11456
  * @example
11457
11457
  * ```typescript
11458
11458
  * // Crop 10% from left and right
11459
- * createSourceRectangle({ l: 10000, r: 10000 });
11459
+ * createSourceRectangle({ left: 10000, right: 10000 });
11460
11460
  * ```
11461
11461
  */
11462
11462
  const createSourceRectangle = (options) => {
11463
11463
  if (!options) return new BuilderElement({ name: "a:srcRect" });
11464
11464
  const attributes = {};
11465
- if (options.l !== void 0) attributes.l = {
11465
+ if (options.left !== void 0) attributes.l = {
11466
11466
  key: "l",
11467
- value: options.l
11467
+ value: options.left
11468
11468
  };
11469
- if (options.t !== void 0) attributes.t = {
11469
+ if (options.top !== void 0) attributes.t = {
11470
11470
  key: "t",
11471
- value: options.t
11471
+ value: options.top
11472
11472
  };
11473
- if (options.r !== void 0) attributes.r = {
11473
+ if (options.right !== void 0) attributes.r = {
11474
11474
  key: "r",
11475
- value: options.r
11475
+ value: options.right
11476
11476
  };
11477
- if (options.b !== void 0) attributes.b = {
11477
+ if (options.bottom !== void 0) attributes.b = {
11478
11478
  key: "b",
11479
- value: options.b
11479
+ value: options.bottom
11480
11480
  };
11481
11481
  return new BuilderElement({
11482
11482
  attributes,
@@ -19824,6 +19824,11 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
19824
19824
  this.root.push(createDefault("image/jpeg", "jpg"));
19825
19825
  this.root.push(createDefault("image/bmp", "bmp"));
19826
19826
  this.root.push(createDefault("image/gif", "gif"));
19827
+ this.root.push(createDefault("image/tiff", "tif"));
19828
+ this.root.push(createDefault("image/tiff", "tiff"));
19829
+ this.root.push(createDefault("image/x-emf", "emf"));
19830
+ this.root.push(createDefault("image/x-wmf", "wmf"));
19831
+ this.root.push(createDefault("image/x-icon", "ico"));
19827
19832
  this.root.push(createDefault("image/svg+xml", "svg"));
19828
19833
  this.root.push(createDefault("application/vnd.openxmlformats-package.relationships+xml", "rels"));
19829
19834
  this.root.push(createDefault("application/xml", "xml"));
package/dist/index.mjs CHANGED
@@ -11457,27 +11457,27 @@ const createBlip = (mediaData, blipEffects) => {
11457
11457
  * @example
11458
11458
  * ```typescript
11459
11459
  * // Crop 10% from left and right
11460
- * createSourceRectangle({ l: 10000, r: 10000 });
11460
+ * createSourceRectangle({ left: 10000, right: 10000 });
11461
11461
  * ```
11462
11462
  */
11463
11463
  const createSourceRectangle = (options) => {
11464
11464
  if (!options) return new BuilderElement({ name: "a:srcRect" });
11465
11465
  const attributes = {};
11466
- if (options.l !== void 0) attributes.l = {
11466
+ if (options.left !== void 0) attributes.l = {
11467
11467
  key: "l",
11468
- value: options.l
11468
+ value: options.left
11469
11469
  };
11470
- if (options.t !== void 0) attributes.t = {
11470
+ if (options.top !== void 0) attributes.t = {
11471
11471
  key: "t",
11472
- value: options.t
11472
+ value: options.top
11473
11473
  };
11474
- if (options.r !== void 0) attributes.r = {
11474
+ if (options.right !== void 0) attributes.r = {
11475
11475
  key: "r",
11476
- value: options.r
11476
+ value: options.right
11477
11477
  };
11478
- if (options.b !== void 0) attributes.b = {
11478
+ if (options.bottom !== void 0) attributes.b = {
11479
11479
  key: "b",
11480
- value: options.b
11480
+ value: options.bottom
11481
11481
  };
11482
11482
  return new BuilderElement({
11483
11483
  attributes,
@@ -19825,6 +19825,11 @@ var ContentTypes = class extends XmlComponent {
19825
19825
  this.root.push(createDefault("image/jpeg", "jpg"));
19826
19826
  this.root.push(createDefault("image/bmp", "bmp"));
19827
19827
  this.root.push(createDefault("image/gif", "gif"));
19828
+ this.root.push(createDefault("image/tiff", "tif"));
19829
+ this.root.push(createDefault("image/tiff", "tiff"));
19830
+ this.root.push(createDefault("image/x-emf", "emf"));
19831
+ this.root.push(createDefault("image/x-wmf", "wmf"));
19832
+ this.root.push(createDefault("image/x-icon", "ico"));
19828
19833
  this.root.push(createDefault("image/svg+xml", "svg"));
19829
19834
  this.root.push(createDefault("application/vnd.openxmlformats-package.relationships+xml", "rels"));
19830
19835
  this.root.push(createDefault("application/xml", "xml"));
package/dist/index.umd.js CHANGED
@@ -11464,27 +11464,27 @@
11464
11464
  * @example
11465
11465
  * ```typescript
11466
11466
  * // Crop 10% from left and right
11467
- * createSourceRectangle({ l: 10000, r: 10000 });
11467
+ * createSourceRectangle({ left: 10000, right: 10000 });
11468
11468
  * ```
11469
11469
  */
11470
11470
  const createSourceRectangle = (options) => {
11471
11471
  if (!options) return new BuilderElement({ name: "a:srcRect" });
11472
11472
  const attributes = {};
11473
- if (options.l !== void 0) attributes.l = {
11473
+ if (options.left !== void 0) attributes.l = {
11474
11474
  key: "l",
11475
- value: options.l
11475
+ value: options.left
11476
11476
  };
11477
- if (options.t !== void 0) attributes.t = {
11477
+ if (options.top !== void 0) attributes.t = {
11478
11478
  key: "t",
11479
- value: options.t
11479
+ value: options.top
11480
11480
  };
11481
- if (options.r !== void 0) attributes.r = {
11481
+ if (options.right !== void 0) attributes.r = {
11482
11482
  key: "r",
11483
- value: options.r
11483
+ value: options.right
11484
11484
  };
11485
- if (options.b !== void 0) attributes.b = {
11485
+ if (options.bottom !== void 0) attributes.b = {
11486
11486
  key: "b",
11487
- value: options.b
11487
+ value: options.bottom
11488
11488
  };
11489
11489
  return new BuilderElement({
11490
11490
  attributes,
@@ -19832,6 +19832,11 @@
19832
19832
  this.root.push(createDefault("image/jpeg", "jpg"));
19833
19833
  this.root.push(createDefault("image/bmp", "bmp"));
19834
19834
  this.root.push(createDefault("image/gif", "gif"));
19835
+ this.root.push(createDefault("image/tiff", "tif"));
19836
+ this.root.push(createDefault("image/tiff", "tiff"));
19837
+ this.root.push(createDefault("image/x-emf", "emf"));
19838
+ this.root.push(createDefault("image/x-wmf", "wmf"));
19839
+ this.root.push(createDefault("image/x-icon", "ico"));
19835
19840
  this.root.push(createDefault("image/svg+xml", "svg"));
19836
19841
  this.root.push(createDefault("application/vnd.openxmlformats-package.relationships+xml", "rels"));
19837
19842
  this.root.push(createDefault("application/xml", "xml"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docx-plus",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
5
5
  "keywords": [
6
6
  "clippy",