Socket
Socket
Sign inDemoInstall

docx

Package Overview
Dependencies
19
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.4.0 to 8.5.0

build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/rgb-color.d.ts

2

build/file/core-properties/properties.d.ts
import { ICommentsOptions } from '../paragraph/run/comment-run';
import { ICompatibilityOptions } from '../settings/compatibility';
import { FontOptions } from '../fonts/font-table';
import { XmlComponent } from '../xml-components';

@@ -38,2 +39,3 @@ import { ICustomPropertyOptions } from "../custom-properties";

readonly defaultTabStop?: number;
readonly fonts?: readonly FontOptions[];
}

@@ -40,0 +42,0 @@ export declare class CoreProperties extends XmlComponent {

3

build/file/document-wrapper.d.ts

@@ -0,1 +1,2 @@

import { XmlComponent } from "./xml-components";
import { Document, IDocumentOptions } from "./document";

@@ -7,3 +8,3 @@ import { Footer } from "./footer/footer";

export interface IViewWrapper {
readonly View: Document | Footer | Header | FootNotes;
readonly View: Document | Footer | Header | FootNotes | XmlComponent;
readonly Relationships: Relationships;

@@ -10,0 +11,0 @@ }

@@ -8,3 +8,3 @@ import { XmlComponent } from '../../../../xml-components';

};
export interface ILineNumberAttributes {
export type ILineNumberAttributes = {
readonly countBy?: number;

@@ -14,5 +14,3 @@ readonly start?: number;

readonly distance?: number | PositiveUniversalMeasure;
}
export declare class LineNumberType extends XmlComponent {
constructor({ countBy, start, restart, distance }: ILineNumberAttributes);
}
};
export declare const createLineNumberType: ({ countBy, start, restart, distance }: ILineNumberAttributes) => XmlComponent;

@@ -5,3 +5,7 @@ import { IMediaData, IMediaDataTransformation } from '../../media';

export declare class Anchor extends XmlComponent {
constructor(mediaData: IMediaData, transform: IMediaDataTransformation, drawingOptions: IDrawingOptions);
constructor({ mediaData, transform, drawingOptions, }: {
readonly mediaData: IMediaData;
readonly transform: IMediaDataTransformation;
readonly drawingOptions: IDrawingOptions;
});
}

@@ -5,3 +5,4 @@ import { IMediaData } from '../media';

import { IFloating } from "./floating";
export interface IDistance {
import { OutlineOptions } from "./inline/graphic/graphic-data/pic/shape-properties/outline/outline";
export type IDistance = {
readonly distT?: number;

@@ -11,6 +12,7 @@ readonly distB?: number;

readonly distR?: number;
}
};
export interface IDrawingOptions {
readonly floating?: IFloating;
readonly docProperties?: DocPropertiesOptions;
readonly outline?: OutlineOptions;
}

@@ -17,0 +19,0 @@ export declare class Drawing extends XmlComponent {

import { XmlComponent } from '../../xml-components';
export declare class EffectExtent extends XmlComponent {
constructor();
}
export type EffectExtentAttributes = {
readonly top: number;
readonly right: number;
readonly bottom: number;
readonly left: number;
};
export declare const createEffectExtent: ({ top, right, bottom, left }: EffectExtentAttributes) => XmlComponent;
import { IMediaData, IMediaDataTransformation } from '../../../../media';
import { XmlComponent } from '../../../../xml-components';
import { OutlineOptions } from "./pic/shape-properties/outline/outline";
export declare class GraphicData extends XmlComponent {
private readonly pic;
constructor(mediaData: IMediaData, transform: IMediaDataTransformation);
constructor({ mediaData, transform, outline, }: {
readonly mediaData: IMediaData;
readonly transform: IMediaDataTransformation;
readonly outline?: OutlineOptions;
});
}
import { IMediaData, IMediaDataTransformation } from '../../../../../media';
import { XmlComponent } from '../../../../../xml-components';
import { OutlineOptions } from "./shape-properties/outline/outline";
export declare class Pic extends XmlComponent {
constructor(mediaData: IMediaData, transform: IMediaDataTransformation);
constructor({ mediaData, transform, outline, }: {
readonly mediaData: IMediaData;
readonly transform: IMediaDataTransformation;
readonly outline?: OutlineOptions;
});
}
import { XmlComponent } from '../../../../../../../xml-components';
export declare class NoFill extends XmlComponent {
constructor();
}
export declare const createNoFill: () => XmlComponent;
import { XmlComponent } from '../../../../../../../xml-components';
export declare class Outline extends XmlComponent {
constructor();
}
import { SchemeColor } from "./scheme-color";
export declare const LineCap: {
readonly ROUND: "rnd";
readonly SQUARE: "sq";
readonly FLAT: "flat";
};
export declare const CompoundLine: {
readonly SINGLE: "sng";
readonly DOUBLE: "dbl";
readonly THICK_THIN: "thickThin";
readonly THIN_THICK: "thinThick";
readonly TRI: "tri";
};
export declare const PenAlignment: {
readonly CENTER: "ctr";
readonly INSET: "in";
};
export type OutlineAttributes = {
readonly width?: number;
readonly cap?: keyof typeof LineCap;
readonly compoundLine?: keyof typeof CompoundLine;
readonly align?: keyof typeof PenAlignment;
};
type OutlineNoFill = {
readonly type: "noFill";
};
type OutlineRgbSolidFill = {
readonly type: "solidFill";
readonly solidFillType: "rgb";
readonly value: string;
};
type OutlineSchemeSolidFill = {
readonly type: "solidFill";
readonly solidFillType: "scheme";
readonly value: (typeof SchemeColor)[keyof typeof SchemeColor];
};
type OutlineSolidFill = OutlineRgbSolidFill | OutlineSchemeSolidFill;
type OutlineFillProperties = OutlineNoFill | OutlineSolidFill;
export type OutlineOptions = OutlineAttributes & OutlineFillProperties;
export declare const createOutline: (options: OutlineOptions) => XmlComponent;
export {};
import { IMediaDataTransformation } from '../../../../../../media';
import { XmlComponent } from '../../../../../../xml-components';
import { OutlineOptions } from "./outline/outline";
export declare class ShapeProperties extends XmlComponent {
private readonly form;
constructor(transform: IMediaDataTransformation);
constructor({ outline, transform }: {
readonly outline?: OutlineOptions;
readonly transform: IMediaDataTransformation;
});
}
import { IMediaData, IMediaDataTransformation } from '../../../media';
import { XmlComponent } from '../../../xml-components';
import { OutlineOptions } from "./graphic-data/pic/shape-properties/outline/outline";
export declare class Graphic extends XmlComponent {
private readonly data;
constructor(mediaData: IMediaData, transform: IMediaDataTransformation);
constructor({ mediaData, transform, outline, }: {
readonly mediaData: IMediaData;
readonly transform: IMediaDataTransformation;
readonly outline?: OutlineOptions;
});
}
import { IMediaData, IMediaDataTransformation } from '../../media';
import { XmlComponent } from '../../xml-components';
import { DocPropertiesOptions } from "./../doc-properties/doc-properties";
interface InlineOptions {
import { OutlineOptions } from "./graphic/graphic-data/pic/shape-properties/outline/outline";
type InlineOptions = {
readonly mediaData: IMediaData;
readonly transform: IMediaDataTransformation;
readonly docProperties?: DocPropertiesOptions;
}
export declare class Inline extends XmlComponent {
private readonly extent;
private readonly graphic;
constructor({ mediaData, transform, docProperties }: InlineOptions);
}
readonly outline?: OutlineOptions;
};
export declare const createInline: ({ mediaData, transform, docProperties, outline }: InlineOptions) => XmlComponent;
export {};

@@ -18,2 +18,3 @@ import { AppProperties } from "./app-properties/app-properties";

import { FileChild } from "./file-child";
import { FontWrapper } from "./fonts/font-wrapper";
export interface ISectionOptions {

@@ -49,2 +50,3 @@ readonly headers?: {

private readonly comments;
private readonly fontWrapper;
constructor(options: IPropertiesOptions);

@@ -71,2 +73,3 @@ private addSection;

get Comments(): Comments;
get FontTable(): FontWrapper;
}

@@ -21,1 +21,2 @@ export * from "./paragraph";

export * from "./checkbox";
export * from "./fonts";
import { HorizontalPositionAlign, VerticalPositionAlign } from '../../shared/alignment';
import { HeightRule } from '../../table';
import { XmlAttributeComponent, XmlComponent } from '../../xml-components';
import { XmlComponent } from '../../xml-components';
export declare const DropCapType: {

@@ -40,2 +40,3 @@ readonly NONE: "none";

export interface IXYFrameOptions extends IBaseFrameOptions {
readonly type: "absolute";
readonly position: {

@@ -47,2 +48,3 @@ readonly x: number;

export interface IAlignmentFrameOptions extends IBaseFrameOptions {
readonly type: "alignment";
readonly alignment: {

@@ -54,40 +56,3 @@ readonly x: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];

export type IFrameOptions = IXYFrameOptions | IAlignmentFrameOptions;
export declare class FramePropertiesAttributes extends XmlAttributeComponent<{
readonly anchorLock?: boolean;
readonly dropCap?: (typeof DropCapType)[keyof typeof DropCapType];
readonly width: number;
readonly height: number;
readonly x?: number;
readonly y?: number;
readonly wrap?: (typeof FrameWrap)[keyof typeof FrameWrap];
readonly lines?: number;
readonly anchorHorizontal?: (typeof FrameAnchorType)[keyof typeof FrameAnchorType];
readonly anchorVertical?: (typeof FrameAnchorType)[keyof typeof FrameAnchorType];
readonly spaceHorizontal?: number;
readonly spaceVertical?: number;
readonly rule?: (typeof HeightRule)[keyof typeof HeightRule];
readonly alignmentX?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
readonly alignmentY?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
}> {
protected readonly xmlKeys: {
anchorLock: string;
dropCap: string;
width: string;
height: string;
x: string;
y: string;
anchorHorizontal: string;
anchorVertical: string;
spaceHorizontal: string;
spaceVertical: string;
rule: string;
alignmentX: string;
alignmentY: string;
lines: string;
wrap: string;
};
}
export declare class FrameProperties extends XmlComponent {
constructor(options: IFrameOptions);
}
export declare const createFrameProperties: (options: IFrameOptions) => XmlComponent;
export {};
import { XmlComponent } from '../../xml-components';
import { IPageReferenceOptions } from "./pageref-properties";
import { IPageReferenceOptions } from "./pageref";
export declare class PageReferenceFieldInstruction extends XmlComponent {
constructor(bookmarkId: string, options?: IPageReferenceOptions);
}
import { Run } from "../run";
import type { IPageReferenceOptions } from "./pageref-properties";
export type IPageReferenceOptions = {
readonly hyperlink?: boolean;
readonly useRelativePosition?: boolean;
};
export declare class PageReference extends Run {
constructor(bookmarkId: string, options?: IPageReferenceOptions);
}

@@ -46,2 +46,3 @@ import { IContext, IgnoreIfEmptyXmlComponent, IXmlableObject, XmlComponent } from '../xml-components';

readonly wordWrap?: boolean;
readonly overflowPunctuation?: boolean;
readonly scale?: number;

@@ -48,0 +49,0 @@ readonly autoSpaceEastAsianText?: boolean;

/// <reference types="node" />
import { IContext, IXmlableObject } from '../../xml-components';
import { DocPropertiesOptions } from '../../drawing/doc-properties/doc-properties';
import { OutlineOptions } from "../../drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline";
import { IFloating } from "../../drawing";

@@ -12,2 +13,3 @@ import { IMediaTransformation } from "../../media";

readonly altText?: DocPropertiesOptions;
readonly outline?: OutlineOptions;
}

@@ -14,0 +16,0 @@ export declare class ImageRun extends Run {

@@ -11,1 +11,4 @@ import { XmlComponent } from '../../xml-components';

}
export declare class CurrentSection extends XmlComponent {
constructor();
}

@@ -18,2 +18,3 @@ import { XmlComponent } from '../../xml-components';

readonly TOTAL_PAGES_IN_SECTION: "TOTAL_PAGES_IN_SECTION";
readonly CURRENT_SECTION: "SECTION";
};

@@ -20,0 +21,0 @@ export declare class Run extends XmlComponent {

@@ -1,4 +0,4 @@

import { Run } from '../../paragraph/run';
import { Run } from '.';
export declare class SequentialIdentifier extends Run {
constructor(identifier: string);
}
import { XmlComponent } from '../../xml-components';
export type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
export type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
export declare const TargetModeType: {

@@ -4,0 +4,0 @@ readonly EXTERNAL: "External";

@@ -1,2 +0,2 @@

import { IDefaultStylesOptions } from '../styles/factory';
import { IDefaultStylesOptions } from './factory';
import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from '../xml-components';

@@ -3,0 +3,0 @@ import { StyleForCharacter, StyleForParagraph } from "./style";

import { IgnoreIfEmptyXmlComponent } from '../../xml-components';
import { WidthType } from '../../table';
import { WidthType } from '..';
export interface ITableCellMarginOptions {

@@ -4,0 +4,0 @@ readonly marginUnitType?: (typeof WidthType)[keyof typeof WidthType];

import { XmlComponent } from '../../xml-components';
import { IRunOptions } from "../../index";
import { IRunOptions } from "../../paragraph/run/run";
import { IChangedAttributesProperties } from "../track-revision";

@@ -4,0 +4,0 @@ interface IDeletedRunOptions extends IRunOptions, IChangedAttributesProperties {

import { Element as XmlElement } from "xml-js";
import { IXmlableObject, XmlComponent } from '../xml-components';
import { IXmlableObject, XmlComponent } from '.';
import { IContext } from "./base";

@@ -4,0 +4,0 @@ export declare const convertToXmlComponent: (element: XmlElement) => ImportedXmlComponent | string | undefined;

@@ -1,4 +0,4 @@

import { XmlComponent } from '../xml-components';
import { XmlComponent } from '.';
export declare abstract class InitializableXmlComponent extends XmlComponent {
constructor(rootKey: string, initComponent?: InitializableXmlComponent);
}

@@ -1,2 +0,2 @@

import { AttributeData, AttributePayload, XmlComponent } from '../xml-components';
import { AttributeData, AttributePayload, XmlComponent } from '.';
import { PositiveUniversalMeasure } from '../../util/values';

@@ -14,2 +14,3 @@ export declare class OnOffElement extends XmlComponent {

}
export declare const createStringElement: (name: string, value: string) => XmlComponent;
export declare class NumberValueElement extends XmlComponent {

@@ -25,3 +26,3 @@ constructor(name: string, val: number);

export declare class BuilderElement<T extends AttributeData> extends XmlComponent {
constructor(options: {
constructor({ name, attributes, children, }: {
readonly name: string;

@@ -28,0 +29,0 @@ readonly attributes?: AttributePayload<T>;

@@ -10,1 +10,2 @@ export declare const convertMillimetersToTwip: (millimeters: number) => number;

export declare const uniqueId: () => string;
export declare const uniqueUuid: () => string;
{
"name": "docx",
"version": "8.4.0",
"version": "8.5.0",
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",

@@ -23,3 +23,3 @@ "type": "module",

"test": "vitest --ui --coverage",
"test.ci": "vitest run --coverage",
"test:ci": "vitest run --coverage",
"prepublishOnly": "npm run build --omit=dev",

@@ -30,4 +30,4 @@ "lint": "eslint --ext .ts src",

"typedoc": "typedoc src/index.ts --tsconfig tsconfig.typedoc.json",
"style": "prettier -l \"{src,scripts,demo}/**/*.{ts,html}\"",
"style.fix": "npm run style -- --write",
"prettier": "prettier -l \"{src,scripts,demo}/**/*.{ts,html}\"",
"prettier:fix": "npm run prettier -- --write",
"cspell": "cspell \"{src,demo,docs,scripts}/**/*.{ts,scss,html,md}\" && cspell \"./*.*\"",

@@ -39,3 +39,3 @@ "serve.docs": "cd docs && docsify serve",

"pre-commit": [
"style",
"prettier",
"lint"

@@ -79,5 +79,5 @@ ],

"@typescript-eslint/parser": "^6.9.1",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.33.0",
"cspell": "^7.3.8",
"@vitest/coverage-v8": "^1.1.0",
"@vitest/ui": "^1.1.0",
"cspell": "^8.2.3",
"docsify-cli": "^4.3.0",

@@ -94,15 +94,15 @@ "eslint": "^8.23.0",

"inquirer": "^9.2.7",
"jsdom": "^22.1.0",
"jsdom": "^23.0.1",
"pre-commit": "^1.2.2",
"prettier": "^3.0.0",
"prettier": "^3.1.1",
"tsconfig-paths": "^4.0.0",
"tsx": "^4.7.0",
"typedoc": "^0.24.8",
"typescript": "5.1.6",
"typedoc": "^0.25.4",
"typescript": "5.3.3",
"unzipper": "^0.10.11",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.3.1",
"vite-plugin-node-polyfills": "^0.9.0",
"vite-plugin-node-polyfills": "^0.19.0",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.33.0"
"vitest": "^1.1.0"
},

@@ -109,0 +109,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc