@office-open/docx 0.9.6 → 0.9.8
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/README.md +10 -10
- package/dist/context-Bl2wL_dD.mjs +337 -0
- package/dist/context-Bl2wL_dD.mjs.map +1 -0
- package/dist/{core-properties-DMRyJWDp.d.mts → core-properties-CZzFLDat.d.mts} +357 -187
- package/dist/core-properties-CZzFLDat.d.mts.map +1 -0
- package/dist/{generate-B2i9hUSF.mjs → generate-CqKwXEWC.mjs} +86 -58
- package/dist/generate-CqKwXEWC.mjs.map +1 -0
- package/dist/generate.d.mts +1 -1
- package/dist/generate.mjs +1 -1
- package/dist/index.d.mts +5 -17
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/parse-BwZ29Ait.mjs +1939 -0
- package/dist/parse-BwZ29Ait.mjs.map +1 -0
- package/dist/parse.d.mts +1 -1
- package/dist/parse.mjs +1 -1
- package/dist/parts-Cp_NxQFi.mjs +12165 -0
- package/dist/parts-Cp_NxQFi.mjs.map +1 -0
- package/dist/patch/index.d.mts +1 -1
- package/dist/patch/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/context-DfxK5XnG.mjs +0 -5116
- package/dist/context-DfxK5XnG.mjs.map +0 -1
- package/dist/core-properties-DMRyJWDp.d.mts.map +0 -1
- package/dist/document-D2OTVcbX.mjs +0 -6363
- package/dist/document-D2OTVcbX.mjs.map +0 -1
- package/dist/generate-B2i9hUSF.mjs.map +0 -1
- package/dist/parse-DqXV5xqQ.mjs +0 -514
- package/dist/parse-DqXV5xqQ.mjs.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { DataType, ParsedArchive, Percentage, PositiveUniversalMeasure, Relationships, RelativeMeasure, ThemeColor, ThemeFont, UniversalMeasure, parseArchive } from "@office-open/core";
|
|
2
2
|
import { Element } from "@office-open/xml";
|
|
3
|
-
import { BlipEffectsOptions, CustomGeometryOptions, EffectDagOptions, EffectListOptions, FillOptions, OutlineOptions, Scene3DOptions, Shape3DOptions, SourceRectangleOptions, TileOptions } from "@office-open/core/drawingml";
|
|
3
|
+
import { BlipEffectsOptions, CustomGeometryOptions, EffectDagOptions, EffectListOptions, FillOptions, OutlineOptions, Scene3DOptions, Shape3DOptions, SolidFillOptions, SourceRectangleOptions, TileOptions } from "@office-open/core/drawingml";
|
|
4
4
|
import { ChartCollection, ChartSpaceOptions } from "@office-open/core/chart";
|
|
5
5
|
import { SmartArtCollection } from "@office-open/core/smartart";
|
|
6
6
|
import { CustomDescriptor, ReadContext, WriteContext } from "@office-open/core/descriptor";
|
|
7
|
-
import { Buffer } from "\u0000polyfill-node.buffer";
|
|
8
7
|
|
|
9
8
|
//#region src/parts/bibliography.d.ts
|
|
10
9
|
interface SourceTypeOptions {
|
|
@@ -45,21 +44,19 @@ interface ContentTypesInput {
|
|
|
45
44
|
overrides: ContentTypeOverride[];
|
|
46
45
|
}
|
|
47
46
|
declare const contentTypesDesc: CustomDescriptor<ContentTypesInput>;
|
|
48
|
-
declare function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
hasWebSettings?: boolean;
|
|
56
|
-
altChunks?: {
|
|
47
|
+
declare function withMediaDefaults(input: ContentTypesInput, mediaFileNames: string[]): ContentTypesInput;
|
|
48
|
+
declare function withAltChunkOverrides(input: ContentTypesInput, altChunks: readonly {
|
|
49
|
+
path: string;
|
|
50
|
+
contentType: string;
|
|
51
|
+
}[]): ContentTypesInput;
|
|
52
|
+
declare function buildContentTypesFromRegistry(facts: ReadonlyMap<string, boolean | number>, dynamic?: {
|
|
53
|
+
altChunks?: ReadonlyArray<{
|
|
57
54
|
path: string;
|
|
58
55
|
contentType: string;
|
|
59
|
-
}
|
|
60
|
-
subDocs?: {
|
|
56
|
+
}>;
|
|
57
|
+
subDocs?: ReadonlyArray<{
|
|
61
58
|
path: string;
|
|
62
|
-
}
|
|
59
|
+
}>;
|
|
63
60
|
}): ContentTypesInput;
|
|
64
61
|
//#endregion
|
|
65
62
|
//#region src/parts/fonts/font.d.ts
|
|
@@ -105,7 +102,7 @@ interface AltChunkOptions {
|
|
|
105
102
|
data: Uint8Array | string;
|
|
106
103
|
contentType: "text/html" | "application/rtf" | "text/plain";
|
|
107
104
|
extension: "html" | "rtf" | "txt";
|
|
108
|
-
|
|
105
|
+
matchSource?: boolean;
|
|
109
106
|
}
|
|
110
107
|
//#endregion
|
|
111
108
|
//#region src/shared/border.d.ts
|
|
@@ -365,6 +362,7 @@ interface RunStylePropertiesOptions {
|
|
|
365
362
|
complexScript?: boolean;
|
|
366
363
|
eastAsianLayout?: EastAsianLayoutOptions;
|
|
367
364
|
contentPartRId?: string;
|
|
365
|
+
w14RawXml?: string;
|
|
368
366
|
}
|
|
369
367
|
type RunPropertiesOptions = {
|
|
370
368
|
style?: string;
|
|
@@ -1305,6 +1303,150 @@ interface DocPropertiesOptions {
|
|
|
1305
1303
|
hyperlink?: HyperlinkOptions;
|
|
1306
1304
|
}
|
|
1307
1305
|
//#endregion
|
|
1306
|
+
//#region src/parts/drawing/drawing.d.ts
|
|
1307
|
+
interface Distance {
|
|
1308
|
+
distT?: number;
|
|
1309
|
+
distB?: number;
|
|
1310
|
+
distL?: number;
|
|
1311
|
+
distR?: number;
|
|
1312
|
+
}
|
|
1313
|
+
interface DrawingOptions {
|
|
1314
|
+
floating?: Floating;
|
|
1315
|
+
docProperties?: DocPropertiesOptions;
|
|
1316
|
+
outline?: OutlineOptions;
|
|
1317
|
+
fill?: FillOptions;
|
|
1318
|
+
effects?: EffectListOptions;
|
|
1319
|
+
blipEffects?: BlipEffectsOptions;
|
|
1320
|
+
tile?: TileOptions;
|
|
1321
|
+
}
|
|
1322
|
+
//#endregion
|
|
1323
|
+
//#region src/parts/drawing/text-wrap/text-wrapping.d.ts
|
|
1324
|
+
declare const TextWrappingType: {
|
|
1325
|
+
readonly NONE: 0;
|
|
1326
|
+
readonly SQUARE: 1;
|
|
1327
|
+
readonly TIGHT: 2;
|
|
1328
|
+
readonly TOP_AND_BOTTOM: 3;
|
|
1329
|
+
readonly THROUGH: 4;
|
|
1330
|
+
};
|
|
1331
|
+
declare const TextWrappingSide: {
|
|
1332
|
+
readonly BOTH_SIDES: "bothSides";
|
|
1333
|
+
readonly LEFT: "left";
|
|
1334
|
+
readonly RIGHT: "right";
|
|
1335
|
+
readonly LARGEST: "largest";
|
|
1336
|
+
};
|
|
1337
|
+
interface TextWrapping {
|
|
1338
|
+
type: (typeof TextWrappingType)[keyof typeof TextWrappingType];
|
|
1339
|
+
side?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide];
|
|
1340
|
+
margins?: Distance;
|
|
1341
|
+
}
|
|
1342
|
+
//#endregion
|
|
1343
|
+
//#region src/parts/drawing/text-wrap/wrap-tight.d.ts
|
|
1344
|
+
declare const createWrapTight: (textWrapping: TextWrapping, margins: Margins | undefined, extent: {
|
|
1345
|
+
x: number;
|
|
1346
|
+
y: number;
|
|
1347
|
+
}) => string;
|
|
1348
|
+
//#endregion
|
|
1349
|
+
//#region src/parts/drawing/text-wrap/wrap-through.d.ts
|
|
1350
|
+
declare const createWrapThrough: (textWrapping: TextWrapping, margins: Margins | undefined, extent: {
|
|
1351
|
+
x: number;
|
|
1352
|
+
y: number;
|
|
1353
|
+
}) => string;
|
|
1354
|
+
//#endregion
|
|
1355
|
+
//#region src/parts/drawing/floating/floating-position.d.ts
|
|
1356
|
+
declare const HorizontalPositionRelativeFrom: {
|
|
1357
|
+
readonly CHARACTER: "character";
|
|
1358
|
+
readonly COLUMN: "column";
|
|
1359
|
+
readonly INSIDE_MARGIN: "insideMargin";
|
|
1360
|
+
readonly LEFT_MARGIN: "leftMargin";
|
|
1361
|
+
readonly MARGIN: "margin";
|
|
1362
|
+
readonly OUTSIDE_MARGIN: "outsideMargin";
|
|
1363
|
+
readonly PAGE: "page";
|
|
1364
|
+
readonly RIGHT_MARGIN: "rightMargin";
|
|
1365
|
+
};
|
|
1366
|
+
declare const VerticalPositionRelativeFrom: {
|
|
1367
|
+
readonly BOTTOM_MARGIN: "bottomMargin";
|
|
1368
|
+
readonly INSIDE_MARGIN: "insideMargin";
|
|
1369
|
+
readonly LINE: "line";
|
|
1370
|
+
readonly MARGIN: "margin";
|
|
1371
|
+
readonly OUTSIDE_MARGIN: "outsideMargin";
|
|
1372
|
+
readonly PAGE: "page";
|
|
1373
|
+
readonly PARAGRAPH: "paragraph";
|
|
1374
|
+
readonly TOP_MARGIN: "topMargin";
|
|
1375
|
+
};
|
|
1376
|
+
interface HorizontalPositionOptions {
|
|
1377
|
+
relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom];
|
|
1378
|
+
align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
|
|
1379
|
+
offset?: number | UniversalMeasure;
|
|
1380
|
+
}
|
|
1381
|
+
interface VerticalPositionOptions {
|
|
1382
|
+
relative?: (typeof VerticalPositionRelativeFrom)[keyof typeof VerticalPositionRelativeFrom];
|
|
1383
|
+
align?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
|
|
1384
|
+
offset?: number | UniversalMeasure;
|
|
1385
|
+
}
|
|
1386
|
+
interface Margins {
|
|
1387
|
+
left?: number | UniversalMeasure;
|
|
1388
|
+
bottom?: number | UniversalMeasure;
|
|
1389
|
+
top?: number | UniversalMeasure;
|
|
1390
|
+
right?: number | UniversalMeasure;
|
|
1391
|
+
}
|
|
1392
|
+
interface Floating {
|
|
1393
|
+
horizontalPosition: HorizontalPositionOptions;
|
|
1394
|
+
verticalPosition: VerticalPositionOptions;
|
|
1395
|
+
allowOverlap?: boolean;
|
|
1396
|
+
lockAnchor?: boolean;
|
|
1397
|
+
behindDocument?: boolean;
|
|
1398
|
+
layoutInCell?: boolean;
|
|
1399
|
+
margins?: Margins;
|
|
1400
|
+
wrap?: TextWrapping;
|
|
1401
|
+
zIndex?: number;
|
|
1402
|
+
}
|
|
1403
|
+
//#endregion
|
|
1404
|
+
//#region src/parts/drawing/floating/horizontal-position.d.ts
|
|
1405
|
+
declare const createHorizontalPosition: ({
|
|
1406
|
+
relative,
|
|
1407
|
+
align,
|
|
1408
|
+
offset
|
|
1409
|
+
}: HorizontalPositionOptions) => string;
|
|
1410
|
+
//#endregion
|
|
1411
|
+
//#region src/parts/drawing/floating/vertical-position.d.ts
|
|
1412
|
+
declare const createVerticalPosition: ({
|
|
1413
|
+
relative,
|
|
1414
|
+
align,
|
|
1415
|
+
offset
|
|
1416
|
+
}: VerticalPositionOptions) => string;
|
|
1417
|
+
//#endregion
|
|
1418
|
+
//#region src/parts/drawing/descriptor.d.ts
|
|
1419
|
+
interface GraphicFrameLocksOptions {
|
|
1420
|
+
noGrp?: boolean;
|
|
1421
|
+
noDrilldown?: boolean;
|
|
1422
|
+
noSelect?: boolean;
|
|
1423
|
+
noChangeAspect?: boolean;
|
|
1424
|
+
noMove?: boolean;
|
|
1425
|
+
noResize?: boolean;
|
|
1426
|
+
}
|
|
1427
|
+
interface GroupShapeLocksOptions {
|
|
1428
|
+
noGrp?: boolean;
|
|
1429
|
+
noUngrp?: boolean;
|
|
1430
|
+
noSelect?: boolean;
|
|
1431
|
+
noRot?: boolean;
|
|
1432
|
+
noChangeAspect?: boolean;
|
|
1433
|
+
noMove?: boolean;
|
|
1434
|
+
noResize?: boolean;
|
|
1435
|
+
}
|
|
1436
|
+
interface DrawingDescriptorOptions {
|
|
1437
|
+
mediaData: ExtendedMediaData;
|
|
1438
|
+
docProperties?: DocPropertiesOptions;
|
|
1439
|
+
floating?: Floating;
|
|
1440
|
+
outline?: OutlineOptions;
|
|
1441
|
+
fill?: FillOptions;
|
|
1442
|
+
effects?: EffectListOptions;
|
|
1443
|
+
blipEffects?: BlipEffectsOptions;
|
|
1444
|
+
tile?: TileOptions;
|
|
1445
|
+
graphicFrameLocks?: GraphicFrameLocksOptions | null;
|
|
1446
|
+
}
|
|
1447
|
+
declare const resetDrawingIdGen: () => void;
|
|
1448
|
+
declare const drawingDesc: CustomDescriptor<DrawingDescriptorOptions, BodyContext>;
|
|
1449
|
+
//#endregion
|
|
1308
1450
|
//#region src/parts/drawing/inline/graphic/graphic-data/wpg/wpg-group.d.ts
|
|
1309
1451
|
type GroupChild = unknown;
|
|
1310
1452
|
interface ChildOffset {
|
|
@@ -1320,8 +1462,8 @@ interface WpgGroupCoreOptions {
|
|
|
1320
1462
|
}
|
|
1321
1463
|
type WpgGroupOptions = WpgGroupCoreOptions & {
|
|
1322
1464
|
transformation: MediaDataTransformation;
|
|
1323
|
-
|
|
1324
|
-
|
|
1465
|
+
childOffset?: ChildOffset;
|
|
1466
|
+
childExtent?: ChildExtent;
|
|
1325
1467
|
fill?: FillOptions;
|
|
1326
1468
|
effects?: EffectListOptions;
|
|
1327
1469
|
};
|
|
@@ -1406,13 +1548,29 @@ interface BodyPropertiesOptions {
|
|
|
1406
1548
|
flatTx?: FlatTextOptions;
|
|
1407
1549
|
}
|
|
1408
1550
|
declare const createBodyProperties: (options?: BodyPropertiesOptions) => string;
|
|
1551
|
+
declare const parseBodyProperties: (el: Element) => BodyPropertiesOptions;
|
|
1409
1552
|
//#endregion
|
|
1410
1553
|
//#region src/parts/drawing/inline/graphic/graphic-data/wps/non-visual-shape-properties.d.ts
|
|
1411
1554
|
interface NonVisualShapePropertiesOptions {
|
|
1412
|
-
|
|
1555
|
+
id?: number;
|
|
1556
|
+
name?: string;
|
|
1557
|
+
description?: string;
|
|
1558
|
+
title?: string;
|
|
1559
|
+
textBox?: string;
|
|
1560
|
+
connector?: boolean;
|
|
1413
1561
|
}
|
|
1414
1562
|
//#endregion
|
|
1415
1563
|
//#region src/parts/drawing/inline/graphic/graphic-data/wps/wps-shape.d.ts
|
|
1564
|
+
interface StyleMatrixReferenceOptions {
|
|
1565
|
+
idx: string;
|
|
1566
|
+
color?: SolidFillOptions;
|
|
1567
|
+
}
|
|
1568
|
+
interface ShapeStyleOptions {
|
|
1569
|
+
lineReference?: StyleMatrixReferenceOptions;
|
|
1570
|
+
fillReference?: StyleMatrixReferenceOptions;
|
|
1571
|
+
effectReference?: StyleMatrixReferenceOptions;
|
|
1572
|
+
fontReference?: StyleMatrixReferenceOptions;
|
|
1573
|
+
}
|
|
1416
1574
|
interface WpsShapeCoreOptions {
|
|
1417
1575
|
children: (ParagraphOptions | string)[];
|
|
1418
1576
|
nonVisualProperties?: NonVisualShapePropertiesOptions;
|
|
@@ -1424,6 +1582,7 @@ interface WpsShapeCoreOptions {
|
|
|
1424
1582
|
effects?: EffectListOptions;
|
|
1425
1583
|
scene3d?: Scene3DOptions;
|
|
1426
1584
|
shape3d?: Shape3DOptions;
|
|
1585
|
+
style?: ShapeStyleOptions;
|
|
1427
1586
|
}
|
|
1428
1587
|
type WpsShapeOptions = WpsShapeCoreOptions & {
|
|
1429
1588
|
transformation: MediaDataTransformation;
|
|
@@ -1454,12 +1613,26 @@ interface MediaDataTransformation {
|
|
|
1454
1613
|
horizontal?: boolean;
|
|
1455
1614
|
};
|
|
1456
1615
|
rotation?: number;
|
|
1616
|
+
effectExtent?: {
|
|
1617
|
+
l: number;
|
|
1618
|
+
t: number;
|
|
1619
|
+
r: number;
|
|
1620
|
+
b: number;
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
interface NonVisualPropertiesOptions {
|
|
1624
|
+
id?: number;
|
|
1625
|
+
name?: string;
|
|
1626
|
+
description?: string;
|
|
1627
|
+
preferRelativeResize?: boolean;
|
|
1457
1628
|
}
|
|
1458
1629
|
interface CoreMediaData {
|
|
1459
1630
|
fileName: string;
|
|
1460
1631
|
transformation: MediaDataTransformation;
|
|
1461
1632
|
data: Uint8Array;
|
|
1462
|
-
|
|
1633
|
+
sourceRectangle?: SourceRectangleOptions;
|
|
1634
|
+
nonVisualProperties?: NonVisualPropertiesOptions;
|
|
1635
|
+
useLocalDpi?: boolean;
|
|
1463
1636
|
}
|
|
1464
1637
|
interface RegularMediaData {
|
|
1465
1638
|
type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
|
|
@@ -1477,15 +1650,16 @@ interface WpgCommonMediaData {
|
|
|
1477
1650
|
outline?: OutlineOptions;
|
|
1478
1651
|
fill?: FillOptions;
|
|
1479
1652
|
}
|
|
1480
|
-
type GroupChildMediaData = (WpsMediaData | MediaData) & WpgCommonMediaData;
|
|
1653
|
+
type GroupChildMediaData = (WpsMediaData | MediaData | WpgMediaData) & WpgCommonMediaData;
|
|
1481
1654
|
interface WpgMediaData {
|
|
1482
1655
|
type: "wpg";
|
|
1483
1656
|
transformation: MediaDataTransformation;
|
|
1484
1657
|
children: GroupChildMediaData[];
|
|
1485
|
-
|
|
1486
|
-
|
|
1658
|
+
childOffset?: ChildOffset;
|
|
1659
|
+
childExtent?: ChildExtent;
|
|
1487
1660
|
fill?: FillOptions;
|
|
1488
1661
|
effects?: EffectListOptions;
|
|
1662
|
+
groupShapeLocks?: GroupShapeLocksOptions;
|
|
1489
1663
|
}
|
|
1490
1664
|
interface ChartMediaData {
|
|
1491
1665
|
type: "chart";
|
|
@@ -1514,141 +1688,24 @@ interface MediaTransformation {
|
|
|
1514
1688
|
horizontal?: boolean;
|
|
1515
1689
|
};
|
|
1516
1690
|
rotation?: number;
|
|
1691
|
+
effectExtent?: {
|
|
1692
|
+
l: number;
|
|
1693
|
+
t: number;
|
|
1694
|
+
r: number;
|
|
1695
|
+
b: number;
|
|
1696
|
+
};
|
|
1517
1697
|
}
|
|
1518
1698
|
declare const createTransformation: (options: MediaTransformation) => MediaDataTransformation;
|
|
1519
1699
|
declare class Media {
|
|
1520
1700
|
private map;
|
|
1701
|
+
private nextMediaCounter;
|
|
1521
1702
|
constructor();
|
|
1703
|
+
nextMediaName(type: string): string;
|
|
1522
1704
|
addImage(key: string, mediaData: MediaData): void;
|
|
1705
|
+
findByContent(data: Uint8Array): string | undefined;
|
|
1523
1706
|
get array(): MediaData[];
|
|
1524
1707
|
}
|
|
1525
1708
|
//#endregion
|
|
1526
|
-
//#region src/parts/drawing/text-wrap/text-wrapping.d.ts
|
|
1527
|
-
declare const TextWrappingType: {
|
|
1528
|
-
readonly NONE: 0;
|
|
1529
|
-
readonly SQUARE: 1;
|
|
1530
|
-
readonly TIGHT: 2;
|
|
1531
|
-
readonly TOP_AND_BOTTOM: 3;
|
|
1532
|
-
readonly THROUGH: 4;
|
|
1533
|
-
};
|
|
1534
|
-
declare const TextWrappingSide: {
|
|
1535
|
-
readonly BOTH_SIDES: "bothSides";
|
|
1536
|
-
readonly LEFT: "left";
|
|
1537
|
-
readonly RIGHT: "right";
|
|
1538
|
-
readonly LARGEST: "largest";
|
|
1539
|
-
};
|
|
1540
|
-
interface TextWrapping {
|
|
1541
|
-
type: (typeof TextWrappingType)[keyof typeof TextWrappingType];
|
|
1542
|
-
side?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide];
|
|
1543
|
-
margins?: Distance;
|
|
1544
|
-
}
|
|
1545
|
-
//#endregion
|
|
1546
|
-
//#region src/parts/drawing/text-wrap/wrap-tight.d.ts
|
|
1547
|
-
declare const createWrapTight: (textWrapping: TextWrapping, margins: Margins | undefined, extent: {
|
|
1548
|
-
x: number;
|
|
1549
|
-
y: number;
|
|
1550
|
-
}) => string;
|
|
1551
|
-
//#endregion
|
|
1552
|
-
//#region src/parts/drawing/text-wrap/wrap-through.d.ts
|
|
1553
|
-
declare const createWrapThrough: (textWrapping: TextWrapping, margins: Margins | undefined, extent: {
|
|
1554
|
-
x: number;
|
|
1555
|
-
y: number;
|
|
1556
|
-
}) => string;
|
|
1557
|
-
//#endregion
|
|
1558
|
-
//#region src/parts/drawing/floating/floating-position.d.ts
|
|
1559
|
-
declare const HorizontalPositionRelativeFrom: {
|
|
1560
|
-
readonly CHARACTER: "character";
|
|
1561
|
-
readonly COLUMN: "column";
|
|
1562
|
-
readonly INSIDE_MARGIN: "insideMargin";
|
|
1563
|
-
readonly LEFT_MARGIN: "leftMargin";
|
|
1564
|
-
readonly MARGIN: "margin";
|
|
1565
|
-
readonly OUTSIDE_MARGIN: "outsideMargin";
|
|
1566
|
-
readonly PAGE: "page";
|
|
1567
|
-
readonly RIGHT_MARGIN: "rightMargin";
|
|
1568
|
-
};
|
|
1569
|
-
declare const VerticalPositionRelativeFrom: {
|
|
1570
|
-
readonly BOTTOM_MARGIN: "bottomMargin";
|
|
1571
|
-
readonly INSIDE_MARGIN: "insideMargin";
|
|
1572
|
-
readonly LINE: "line";
|
|
1573
|
-
readonly MARGIN: "margin";
|
|
1574
|
-
readonly OUTSIDE_MARGIN: "outsideMargin";
|
|
1575
|
-
readonly PAGE: "page";
|
|
1576
|
-
readonly PARAGRAPH: "paragraph";
|
|
1577
|
-
readonly TOP_MARGIN: "topMargin";
|
|
1578
|
-
};
|
|
1579
|
-
interface HorizontalPositionOptions {
|
|
1580
|
-
relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom];
|
|
1581
|
-
align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
|
|
1582
|
-
offset?: number | UniversalMeasure;
|
|
1583
|
-
}
|
|
1584
|
-
interface VerticalPositionOptions {
|
|
1585
|
-
relative?: (typeof VerticalPositionRelativeFrom)[keyof typeof VerticalPositionRelativeFrom];
|
|
1586
|
-
align?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
|
|
1587
|
-
offset?: number | UniversalMeasure;
|
|
1588
|
-
}
|
|
1589
|
-
interface Margins {
|
|
1590
|
-
left?: number | UniversalMeasure;
|
|
1591
|
-
bottom?: number | UniversalMeasure;
|
|
1592
|
-
top?: number | UniversalMeasure;
|
|
1593
|
-
right?: number | UniversalMeasure;
|
|
1594
|
-
}
|
|
1595
|
-
interface Floating {
|
|
1596
|
-
horizontalPosition: HorizontalPositionOptions;
|
|
1597
|
-
verticalPosition: VerticalPositionOptions;
|
|
1598
|
-
allowOverlap?: boolean;
|
|
1599
|
-
lockAnchor?: boolean;
|
|
1600
|
-
behindDocument?: boolean;
|
|
1601
|
-
layoutInCell?: boolean;
|
|
1602
|
-
margins?: Margins;
|
|
1603
|
-
wrap?: TextWrapping;
|
|
1604
|
-
zIndex?: number;
|
|
1605
|
-
}
|
|
1606
|
-
//#endregion
|
|
1607
|
-
//#region src/parts/drawing/floating/horizontal-position.d.ts
|
|
1608
|
-
declare const createHorizontalPosition: ({
|
|
1609
|
-
relative,
|
|
1610
|
-
align,
|
|
1611
|
-
offset
|
|
1612
|
-
}: HorizontalPositionOptions) => string;
|
|
1613
|
-
//#endregion
|
|
1614
|
-
//#region src/parts/drawing/floating/vertical-position.d.ts
|
|
1615
|
-
declare const createVerticalPosition: ({
|
|
1616
|
-
relative,
|
|
1617
|
-
align,
|
|
1618
|
-
offset
|
|
1619
|
-
}: VerticalPositionOptions) => string;
|
|
1620
|
-
//#endregion
|
|
1621
|
-
//#region src/parts/drawing/drawing.d.ts
|
|
1622
|
-
interface Distance {
|
|
1623
|
-
distT?: number;
|
|
1624
|
-
distB?: number;
|
|
1625
|
-
distL?: number;
|
|
1626
|
-
distR?: number;
|
|
1627
|
-
}
|
|
1628
|
-
interface DrawingOptions {
|
|
1629
|
-
floating?: Floating;
|
|
1630
|
-
docProperties?: DocPropertiesOptions;
|
|
1631
|
-
outline?: OutlineOptions;
|
|
1632
|
-
fill?: FillOptions;
|
|
1633
|
-
effects?: EffectListOptions;
|
|
1634
|
-
blipEffects?: BlipEffectsOptions;
|
|
1635
|
-
tile?: TileOptions;
|
|
1636
|
-
}
|
|
1637
|
-
//#endregion
|
|
1638
|
-
//#region src/parts/drawing/descriptor.d.ts
|
|
1639
|
-
interface DrawingDescriptorOptions {
|
|
1640
|
-
mediaData: ExtendedMediaData;
|
|
1641
|
-
docProperties?: DocPropertiesOptions;
|
|
1642
|
-
floating?: Floating;
|
|
1643
|
-
outline?: OutlineOptions;
|
|
1644
|
-
fill?: FillOptions;
|
|
1645
|
-
effects?: EffectListOptions;
|
|
1646
|
-
blipEffects?: BlipEffectsOptions;
|
|
1647
|
-
tile?: TileOptions;
|
|
1648
|
-
}
|
|
1649
|
-
declare const resetDrawingIdGen: () => void;
|
|
1650
|
-
declare const drawingDesc: CustomDescriptor<DrawingDescriptorOptions, BodyContext>;
|
|
1651
|
-
//#endregion
|
|
1652
1709
|
//#region src/parts/paragraph/run/image-run.d.ts
|
|
1653
1710
|
interface CoreImageOptions {
|
|
1654
1711
|
transformation: MediaTransformation;
|
|
@@ -1658,8 +1715,12 @@ interface CoreImageOptions {
|
|
|
1658
1715
|
fill?: FillOptions;
|
|
1659
1716
|
effects?: EffectListOptions;
|
|
1660
1717
|
blipEffects?: BlipEffectsOptions;
|
|
1661
|
-
|
|
1718
|
+
sourceRectangle?: SourceRectangleOptions;
|
|
1662
1719
|
tile?: TileOptions;
|
|
1720
|
+
nonVisualProperties?: NonVisualPropertiesOptions;
|
|
1721
|
+
runPropertiesRawXml?: string;
|
|
1722
|
+
graphicFrameLocks?: GraphicFrameLocksOptions | null;
|
|
1723
|
+
useLocalDpi?: boolean;
|
|
1663
1724
|
}
|
|
1664
1725
|
interface RegularImageOptions {
|
|
1665
1726
|
type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
|
|
@@ -1671,7 +1732,7 @@ interface SvgMediaOptions {
|
|
|
1671
1732
|
fallback: RegularImageOptions;
|
|
1672
1733
|
}
|
|
1673
1734
|
type ImageOptions = (RegularImageOptions | SvgMediaOptions) & CoreImageOptions;
|
|
1674
|
-
declare const createImageData: (data: Uint8Array, transformation: MediaTransformation, key: string,
|
|
1735
|
+
declare const createImageData: (data: Uint8Array, transformation: MediaTransformation, key: string, sourceRectangle?: SourceRectangleOptions, nonVisualProperties?: NonVisualPropertiesOptions) => Pick<MediaData, "data" | "fileName" | "transformation" | "sourceRectangle" | "nonVisualProperties">;
|
|
1675
1736
|
//#endregion
|
|
1676
1737
|
//#region src/parts/paragraph/run/chart-run.d.ts
|
|
1677
1738
|
interface ChartOptions extends ChartSpaceOptions {
|
|
@@ -1697,26 +1758,57 @@ interface SmartArtOptions {
|
|
|
1697
1758
|
color?: string;
|
|
1698
1759
|
}
|
|
1699
1760
|
//#endregion
|
|
1761
|
+
//#region src/parts/document/document-background/document-background.d.ts
|
|
1762
|
+
interface BackgroundImageOptions {
|
|
1763
|
+
data: DataType;
|
|
1764
|
+
type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
|
|
1765
|
+
}
|
|
1766
|
+
interface DocumentBackgroundOptions {
|
|
1767
|
+
color?: string;
|
|
1768
|
+
themeColor?: string;
|
|
1769
|
+
themeShade?: string;
|
|
1770
|
+
themeTint?: string;
|
|
1771
|
+
image?: BackgroundImageOptions;
|
|
1772
|
+
rawXml?: string;
|
|
1773
|
+
rawMedia?: BackgroundRawMediaOptions[];
|
|
1774
|
+
}
|
|
1775
|
+
interface BackgroundRawMediaOptions {
|
|
1776
|
+
fileName: string;
|
|
1777
|
+
data: DataType;
|
|
1778
|
+
type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
|
|
1779
|
+
}
|
|
1780
|
+
//#endregion
|
|
1700
1781
|
//#region src/parts/paragraph/run/wps-shape-run.d.ts
|
|
1701
1782
|
interface CoreShapeOptions {
|
|
1702
1783
|
transformation: MediaTransformation;
|
|
1703
1784
|
floating?: Floating;
|
|
1704
1785
|
altText?: DocPropertiesOptions;
|
|
1786
|
+
vmlFallback?: string;
|
|
1787
|
+
vmlFallbackMedia?: BackgroundRawMediaOptions[];
|
|
1788
|
+
mcChoiceRequires?: string;
|
|
1789
|
+
runPropertiesRawXml?: string;
|
|
1790
|
+
graphicFrameLocks?: GraphicFrameLocksOptions | null;
|
|
1705
1791
|
}
|
|
1706
|
-
type WpsShapeRunOptions = WpsShapeCoreOptions &
|
|
1707
|
-
type: "wps";
|
|
1708
|
-
} & CoreShapeOptions;
|
|
1792
|
+
type WpsShapeRunOptions = WpsShapeCoreOptions & CoreShapeOptions;
|
|
1709
1793
|
//#endregion
|
|
1710
1794
|
//#region src/parts/paragraph/run/wpg-group-run.d.ts
|
|
1711
1795
|
interface CoreGroupOptions {
|
|
1712
1796
|
children: GroupChildMediaData[];
|
|
1713
1797
|
transformation: MediaTransformation;
|
|
1798
|
+
childOffset?: ChildOffset;
|
|
1799
|
+
childExtent?: ChildExtent;
|
|
1800
|
+
fill?: FillOptions;
|
|
1801
|
+
effects?: EffectListOptions;
|
|
1714
1802
|
floating?: Floating;
|
|
1715
1803
|
altText?: DocPropertiesOptions;
|
|
1804
|
+
vmlFallback?: string;
|
|
1805
|
+
vmlFallbackMedia?: BackgroundRawMediaOptions[];
|
|
1806
|
+
mcChoiceRequires?: string;
|
|
1807
|
+
runPropertiesRawXml?: string;
|
|
1808
|
+
graphicFrameLocks?: GraphicFrameLocksOptions | null;
|
|
1809
|
+
groupShapeLocks?: GroupShapeLocksOptions;
|
|
1716
1810
|
}
|
|
1717
|
-
type WpgGroupRunOptions =
|
|
1718
|
-
type: "wpg";
|
|
1719
|
-
} & CoreGroupOptions;
|
|
1811
|
+
type WpgGroupRunOptions = CoreGroupOptions;
|
|
1720
1812
|
//#endregion
|
|
1721
1813
|
//#region src/parts/paragraph/run/simple-field.d.ts
|
|
1722
1814
|
interface SimpleFieldOptions {
|
|
@@ -1904,7 +1996,9 @@ type ParagraphChild = ChartChild | SmartArtChild | ImageChild | MathChild | {
|
|
|
1904
1996
|
} | {
|
|
1905
1997
|
bookmarkEnd: number;
|
|
1906
1998
|
} | {
|
|
1907
|
-
wpsShape:
|
|
1999
|
+
wpsShape: WpsShapeRunOptions;
|
|
2000
|
+
} | {
|
|
2001
|
+
wpgGroup: WpgGroupRunOptions;
|
|
1908
2002
|
} | {
|
|
1909
2003
|
proofErr: "spellStart" | "spellEnd" | "gramStart" | "gramEnd";
|
|
1910
2004
|
} | {
|
|
@@ -1990,6 +2084,8 @@ type ParagraphChild = ChartChild | SmartArtChild | ImageChild | MathChild | {
|
|
|
1990
2084
|
complexField: {
|
|
1991
2085
|
instruction: string;
|
|
1992
2086
|
result?: string;
|
|
2087
|
+
rPrXml?: string;
|
|
2088
|
+
resultRPrXml?: string;
|
|
1993
2089
|
};
|
|
1994
2090
|
} | {
|
|
1995
2091
|
seqIdentifier: string;
|
|
@@ -2126,14 +2222,14 @@ interface CustomXmlAttributeOptions {
|
|
|
2126
2222
|
val: string;
|
|
2127
2223
|
uri?: string;
|
|
2128
2224
|
}
|
|
2129
|
-
interface
|
|
2225
|
+
interface CustomXmlPropertiesOptions {
|
|
2130
2226
|
placeholder?: string;
|
|
2131
2227
|
attributes?: CustomXmlAttributeOptions[];
|
|
2132
2228
|
}
|
|
2133
2229
|
interface CustomXmlRunOptions {
|
|
2134
2230
|
element: string;
|
|
2135
2231
|
uri?: string;
|
|
2136
|
-
customXmlPr?:
|
|
2232
|
+
customXmlPr?: CustomXmlPropertiesOptions;
|
|
2137
2233
|
}
|
|
2138
2234
|
type CustomXmlBlockOptions = CustomXmlRunOptions & {
|
|
2139
2235
|
children?: SectionChild[];
|
|
@@ -2184,8 +2280,8 @@ declare const PageOrientation: {
|
|
|
2184
2280
|
readonly LANDSCAPE: "landscape";
|
|
2185
2281
|
};
|
|
2186
2282
|
interface PageSizeAttributes {
|
|
2187
|
-
width
|
|
2188
|
-
height
|
|
2283
|
+
width?: number | PositiveUniversalMeasure;
|
|
2284
|
+
height?: number | PositiveUniversalMeasure;
|
|
2189
2285
|
orientation?: (typeof PageOrientation)[keyof typeof PageOrientation];
|
|
2190
2286
|
code?: number;
|
|
2191
2287
|
}
|
|
@@ -2307,11 +2403,11 @@ declare const createHeaderFooterReference: (type: (typeof HeaderFooterType)[keyo
|
|
|
2307
2403
|
//#region src/parts/document/body/section-properties/descriptor.d.ts
|
|
2308
2404
|
declare const sectionPropertiesDesc: CustomDescriptor<SectionPropertiesOptions, BodyContext>;
|
|
2309
2405
|
declare function stringifySectionPropertiesXml(opts: SectionPropertiesOptions): string;
|
|
2310
|
-
declare function parseSectionPropertiesEl(el: Element):
|
|
2406
|
+
declare function parseSectionPropertiesEl(el: Element): SectionPropertiesOptions;
|
|
2311
2407
|
//#endregion
|
|
2312
2408
|
//#region src/parts/sub-doc/sub-doc.d.ts
|
|
2313
2409
|
interface SubDocOptions {
|
|
2314
|
-
data:
|
|
2410
|
+
data: DataType;
|
|
2315
2411
|
}
|
|
2316
2412
|
//#endregion
|
|
2317
2413
|
//#region src/parts/textbox/types.d.ts
|
|
@@ -2369,6 +2465,13 @@ type SectionChild = {
|
|
|
2369
2465
|
subDoc: SubDocOptions;
|
|
2370
2466
|
} | {
|
|
2371
2467
|
customXml: CustomXmlBlockOptions;
|
|
2468
|
+
} | {
|
|
2469
|
+
bookmarkStart: {
|
|
2470
|
+
id: number;
|
|
2471
|
+
name: string;
|
|
2472
|
+
};
|
|
2473
|
+
} | {
|
|
2474
|
+
bookmarkEnd: number;
|
|
2372
2475
|
} | {
|
|
2373
2476
|
rawXml: string;
|
|
2374
2477
|
};
|
|
@@ -2477,13 +2580,13 @@ interface SectionPropertiesOptionsBase {
|
|
|
2477
2580
|
rsidR?: string;
|
|
2478
2581
|
rsidSect?: string;
|
|
2479
2582
|
page?: {
|
|
2480
|
-
size?:
|
|
2583
|
+
size?: PageSizeAttributes;
|
|
2481
2584
|
margin?: PageMarginAttributes;
|
|
2482
2585
|
pageNumbers?: PageNumberTypeAttributes;
|
|
2483
2586
|
borders?: PageBordersOptions;
|
|
2484
2587
|
textDirection?: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType];
|
|
2485
2588
|
};
|
|
2486
|
-
grid?:
|
|
2589
|
+
grid?: DocGridAttributesProperties;
|
|
2487
2590
|
headerWrapperGroup?: HeaderFooterGroup<HeaderFooterEntry>;
|
|
2488
2591
|
footerWrapperGroup?: HeaderFooterGroup<HeaderFooterEntry>;
|
|
2489
2592
|
lineNumbers?: LineNumberAttributes;
|
|
@@ -2522,6 +2625,30 @@ declare const sectionPageSizeDefaults: {
|
|
|
2522
2625
|
ORIENTATION: "portrait";
|
|
2523
2626
|
};
|
|
2524
2627
|
//#endregion
|
|
2628
|
+
//#region src/parts/endnotes/descriptor.d.ts
|
|
2629
|
+
interface EndnoteSeparator {
|
|
2630
|
+
id: number;
|
|
2631
|
+
paragraphs: (ParagraphOptions | string)[];
|
|
2632
|
+
}
|
|
2633
|
+
interface EndnotesData {
|
|
2634
|
+
notes: Map<number, (ParagraphOptions | string)[]>;
|
|
2635
|
+
separator?: EndnoteSeparator;
|
|
2636
|
+
continuationSeparator?: EndnoteSeparator;
|
|
2637
|
+
}
|
|
2638
|
+
declare const endnotesDesc: CustomDescriptor<EndnotesData, BodyContext>;
|
|
2639
|
+
//#endregion
|
|
2640
|
+
//#region src/parts/footnotes/descriptor.d.ts
|
|
2641
|
+
interface FootnoteSeparator {
|
|
2642
|
+
id: number;
|
|
2643
|
+
paragraphs: (ParagraphOptions | string)[];
|
|
2644
|
+
}
|
|
2645
|
+
interface FootnotesData {
|
|
2646
|
+
notes: Map<number, (ParagraphOptions | string)[]>;
|
|
2647
|
+
separator?: FootnoteSeparator;
|
|
2648
|
+
continuationSeparator?: FootnoteSeparator;
|
|
2649
|
+
}
|
|
2650
|
+
declare const footnotesDesc: CustomDescriptor<FootnotesData, BodyContext>;
|
|
2651
|
+
//#endregion
|
|
2525
2652
|
//#region src/parts/glossary-document.d.ts
|
|
2526
2653
|
declare const DocPartGallery: {
|
|
2527
2654
|
readonly PLACEHOLDER: "placeholder";
|
|
@@ -2679,6 +2806,7 @@ interface LevelsOptions {
|
|
|
2679
2806
|
lvlPicBulletId?: number;
|
|
2680
2807
|
templateCode?: string;
|
|
2681
2808
|
tentative?: boolean;
|
|
2809
|
+
w15Tentative?: boolean;
|
|
2682
2810
|
legacy?: {
|
|
2683
2811
|
space?: number;
|
|
2684
2812
|
indent?: number;
|
|
@@ -2694,6 +2822,7 @@ interface NumberingOptions {
|
|
|
2694
2822
|
config: {
|
|
2695
2823
|
levels: LevelsOptions[];
|
|
2696
2824
|
reference: string;
|
|
2825
|
+
extraOptions?: AbstractNumberingExtraOptions;
|
|
2697
2826
|
}[];
|
|
2698
2827
|
numIdMacAtCleanup?: number;
|
|
2699
2828
|
numPicBullets?: {
|
|
@@ -2719,6 +2848,15 @@ declare class Numbering {
|
|
|
2719
2848
|
}[];
|
|
2720
2849
|
get referenceConfig(): LevelsOptions[][];
|
|
2721
2850
|
}
|
|
2851
|
+
interface AbstractNumberingExtraOptions {
|
|
2852
|
+
nsid?: string;
|
|
2853
|
+
multiLevelType?: string;
|
|
2854
|
+
restartNumberingAfterBreak?: boolean;
|
|
2855
|
+
tmpl?: string;
|
|
2856
|
+
name?: string;
|
|
2857
|
+
styleLink?: string;
|
|
2858
|
+
numStyleLink?: string;
|
|
2859
|
+
}
|
|
2722
2860
|
declare function parseNumberingDefinitions(el: Element, parseParagraphProperties: (el: Element, ctx: DocxReadContext) => Record<string, unknown>, ctx: DocxReadContext): NumberingOptions | undefined;
|
|
2723
2861
|
//#endregion
|
|
2724
2862
|
//#region src/parts/numbering/abstract-numbering.d.ts
|
|
@@ -2818,6 +2956,8 @@ interface CompatibilityOptions {
|
|
|
2818
2956
|
//#endregion
|
|
2819
2957
|
//#region src/parts/settings/settings.d.ts
|
|
2820
2958
|
interface SettingsOptions {
|
|
2959
|
+
rawXml?: string;
|
|
2960
|
+
rootAttributes?: Record<string, string>;
|
|
2821
2961
|
compatibilityModeVersion?: number;
|
|
2822
2962
|
evenAndOddHeaders?: boolean;
|
|
2823
2963
|
trackRevisions?: boolean;
|
|
@@ -3199,6 +3339,8 @@ interface StylesOptions {
|
|
|
3199
3339
|
characterStyles?: (BaseCharacterStyleOptions & {
|
|
3200
3340
|
id: string;
|
|
3201
3341
|
})[];
|
|
3342
|
+
latentStylesXml?: string;
|
|
3343
|
+
docDefaultsXml?: string;
|
|
3202
3344
|
}
|
|
3203
3345
|
declare class Styles {
|
|
3204
3346
|
private attributes;
|
|
@@ -3308,7 +3450,7 @@ interface WebSettingsOptions {
|
|
|
3308
3450
|
doNotOrganizeInFolder?: boolean;
|
|
3309
3451
|
doNotUseLongFileNames?: boolean;
|
|
3310
3452
|
pixelsPerInch?: number;
|
|
3311
|
-
|
|
3453
|
+
targetScreenSize?: (typeof TargetScreenSize)[keyof typeof TargetScreenSize] | string;
|
|
3312
3454
|
saveSmartTagsAsXml?: boolean;
|
|
3313
3455
|
}
|
|
3314
3456
|
interface WebSettingsInput {
|
|
@@ -3323,7 +3465,7 @@ interface WebSettingsInput {
|
|
|
3323
3465
|
doNotOrganizeInFolder?: boolean;
|
|
3324
3466
|
doNotUseLongFileNames?: boolean;
|
|
3325
3467
|
pixelsPerInch?: number;
|
|
3326
|
-
|
|
3468
|
+
targetScreenSize?: string;
|
|
3327
3469
|
saveSmartTagsAsXml?: boolean;
|
|
3328
3470
|
}
|
|
3329
3471
|
declare function framesetXml(fs: FramesetOptions): string;
|
|
@@ -3341,6 +3483,7 @@ interface DocxPartRefs {
|
|
|
3341
3483
|
charts: Map<string, string>;
|
|
3342
3484
|
diagramData: Map<string, string>;
|
|
3343
3485
|
media: Map<string, string>;
|
|
3486
|
+
partMedia: Map<string, Map<string, string>>;
|
|
3344
3487
|
afChunks: Map<string, string>;
|
|
3345
3488
|
subDocs: Map<string, string>;
|
|
3346
3489
|
bibliography?: string;
|
|
@@ -3393,10 +3536,14 @@ declare class DocxWriteContext implements WriteContext {
|
|
|
3393
3536
|
footNotes: {
|
|
3394
3537
|
relationships: Relationships;
|
|
3395
3538
|
notes: Map<number, (ParagraphOptions | string)[]>;
|
|
3539
|
+
separator?: FootnoteSeparator;
|
|
3540
|
+
continuationSeparator?: FootnoteSeparator;
|
|
3396
3541
|
};
|
|
3397
3542
|
endnotes: {
|
|
3398
3543
|
relationships: Relationships;
|
|
3399
3544
|
notes: Map<number, (ParagraphOptions | string)[]>;
|
|
3545
|
+
separator?: EndnoteSeparator;
|
|
3546
|
+
continuationSeparator?: EndnoteSeparator;
|
|
3400
3547
|
};
|
|
3401
3548
|
fileRelationships: Relationships;
|
|
3402
3549
|
_settingsOptions: SettingsOptions;
|
|
@@ -3425,8 +3572,10 @@ declare class DocxReadContext implements ReadContext {
|
|
|
3425
3572
|
docx: DocxDocument;
|
|
3426
3573
|
styleCache: Map<string, Element>;
|
|
3427
3574
|
numberingCache: Map<string, Element>;
|
|
3575
|
+
currentPart: string;
|
|
3428
3576
|
constructor(docx: DocxDocument, styleCache: Map<string, Element>, numberingCache: Map<string, Element>);
|
|
3429
3577
|
resolveRelationship(rId: string): string | undefined;
|
|
3578
|
+
withPart<T>(partPath: string, fn: () => T): T;
|
|
3430
3579
|
getPart(path: string): Element | undefined;
|
|
3431
3580
|
getRaw(path: string): Uint8Array | undefined;
|
|
3432
3581
|
}
|
|
@@ -3434,6 +3583,8 @@ declare class DocxReadContext implements ReadContext {
|
|
|
3434
3583
|
//#region src/parts/fonts/font-wrapper.d.ts
|
|
3435
3584
|
type EmbeddedFontOptionsWithKey = EmbeddedFontOptions & {
|
|
3436
3585
|
fontKey: string;
|
|
3586
|
+
embedRid?: string;
|
|
3587
|
+
data?: Uint8Array;
|
|
3437
3588
|
};
|
|
3438
3589
|
declare class FontWrapper implements ViewWrapper {
|
|
3439
3590
|
options: EmbeddedFontOptions[];
|
|
@@ -3443,10 +3594,26 @@ declare class FontWrapper implements ViewWrapper {
|
|
|
3443
3594
|
}
|
|
3444
3595
|
//#endregion
|
|
3445
3596
|
//#region src/parts/fonts/font-table.d.ts
|
|
3597
|
+
interface FontSignature {
|
|
3598
|
+
usb0: string;
|
|
3599
|
+
usb1: string;
|
|
3600
|
+
usb2: string;
|
|
3601
|
+
usb3: string;
|
|
3602
|
+
csb0: string;
|
|
3603
|
+
csb1: string;
|
|
3604
|
+
}
|
|
3446
3605
|
interface EmbeddedFontOptions {
|
|
3447
3606
|
name: string;
|
|
3448
|
-
data
|
|
3607
|
+
data?: DataType;
|
|
3449
3608
|
characterSet?: (typeof CharacterSet)[keyof typeof CharacterSet];
|
|
3609
|
+
family?: string;
|
|
3610
|
+
pitch?: string;
|
|
3611
|
+
panose1?: string;
|
|
3612
|
+
altName?: string;
|
|
3613
|
+
sig?: FontSignature;
|
|
3614
|
+
rawOdttf?: boolean;
|
|
3615
|
+
odttfPath?: string;
|
|
3616
|
+
fontKey?: string;
|
|
3450
3617
|
}
|
|
3451
3618
|
//#endregion
|
|
3452
3619
|
//#region src/parts/settings/descriptor.d.ts
|
|
@@ -3490,19 +3657,6 @@ interface CustomPropertiesInput {
|
|
|
3490
3657
|
}
|
|
3491
3658
|
declare const customPropertiesDesc: CustomDescriptor<CustomPropertiesInput>;
|
|
3492
3659
|
//#endregion
|
|
3493
|
-
//#region src/parts/document/document-background/document-background.d.ts
|
|
3494
|
-
interface BackgroundImageOptions {
|
|
3495
|
-
data: DataType;
|
|
3496
|
-
type: "jpg" | "png" | "gif" | "bmp" | "tif" | "ico" | "emf" | "wmf";
|
|
3497
|
-
}
|
|
3498
|
-
interface DocumentBackgroundOptions {
|
|
3499
|
-
color?: string;
|
|
3500
|
-
themeColor?: string;
|
|
3501
|
-
themeShade?: string;
|
|
3502
|
-
themeTint?: string;
|
|
3503
|
-
image?: BackgroundImageOptions;
|
|
3504
|
-
}
|
|
3505
|
-
//#endregion
|
|
3506
3660
|
//#region src/parts/core-properties.d.ts
|
|
3507
3661
|
interface FeaturesOptions {
|
|
3508
3662
|
trackRevisions?: boolean;
|
|
@@ -3518,17 +3672,26 @@ interface DocumentOptions {
|
|
|
3518
3672
|
description?: string;
|
|
3519
3673
|
lastModifiedBy?: string;
|
|
3520
3674
|
revision?: number;
|
|
3675
|
+
lastPrinted?: string;
|
|
3676
|
+
created?: string;
|
|
3677
|
+
modified?: string;
|
|
3521
3678
|
externalStyles?: string;
|
|
3522
3679
|
styles?: StylesOptions;
|
|
3523
3680
|
numbering?: NumberingOptions;
|
|
3524
3681
|
comments?: CommentsOptions;
|
|
3525
3682
|
bibliography?: BibliographyOptions;
|
|
3526
|
-
footnotes?:
|
|
3683
|
+
footnotes?: Record<string, {
|
|
3527
3684
|
children: (ParagraphOptions | string)[];
|
|
3528
|
-
}
|
|
3529
|
-
|
|
3685
|
+
}> & {
|
|
3686
|
+
separator?: FootnoteSeparator;
|
|
3687
|
+
continuationSeparator?: FootnoteSeparator;
|
|
3688
|
+
};
|
|
3689
|
+
endnotes?: Record<string, {
|
|
3530
3690
|
children: (ParagraphOptions | string)[];
|
|
3531
|
-
}
|
|
3691
|
+
}> & {
|
|
3692
|
+
separator?: EndnoteSeparator;
|
|
3693
|
+
continuationSeparator?: EndnoteSeparator;
|
|
3694
|
+
};
|
|
3532
3695
|
background?: DocumentBackgroundOptions;
|
|
3533
3696
|
features?: FeaturesOptions;
|
|
3534
3697
|
compatabilityModeVersion?: number;
|
|
@@ -3559,6 +3722,10 @@ interface DocumentOptions {
|
|
|
3559
3722
|
settings?: SettingsOptions;
|
|
3560
3723
|
webSettings?: WebSettingsOptions;
|
|
3561
3724
|
contentTypes?: ContentTypesInput;
|
|
3725
|
+
rawParts?: {
|
|
3726
|
+
path: string;
|
|
3727
|
+
data: Uint8Array;
|
|
3728
|
+
}[];
|
|
3562
3729
|
appProperties?: AppPropertiesOptions;
|
|
3563
3730
|
}
|
|
3564
3731
|
interface CorePropertiesInput {
|
|
@@ -3569,8 +3736,11 @@ interface CorePropertiesInput {
|
|
|
3569
3736
|
description?: string;
|
|
3570
3737
|
lastModifiedBy?: string;
|
|
3571
3738
|
revision?: number;
|
|
3739
|
+
lastPrinted?: string;
|
|
3740
|
+
created?: string;
|
|
3741
|
+
modified?: string;
|
|
3572
3742
|
}
|
|
3573
3743
|
declare const corePropertiesDesc: CustomDescriptor<CorePropertiesInput>;
|
|
3574
3744
|
//#endregion
|
|
3575
|
-
export {
|
|
3576
|
-
//# sourceMappingURL=core-properties-
|
|
3745
|
+
export { RevisionViewOptions as $, SdtPropertiesOptions as $a, TableCellBordersOptions as $i, WpgGroupRunOptions as $n, Margins as $r, PageBorderZOrder as $t, SubDocData as A, CnfConditionalOptions as Aa, NoBreakHyphen as Ai, SdtRunOptions as An, PresetTextShapeOptions as Ar, DocumentAttributeNamespace as At, EndnotePropertiesOptions as B, CellMergeAttributes as Ba, FrameOptions$1 as Bi, FormFieldTextType as Bn, GroupChild as Br, HeaderFooterReferenceType as Bt, TargetScreenSize as C, TabStopType as Ca, DayLong as Ci, TableRowPropertiesOptions as Cn, buildContentTypesFromRegistry as Co, ShapeStyleOptions as Cr, endnotesDesc as Ct, framesetXml as D, BreakType as Da, LastRenderedPageBreak as Di, MathChild as Dn, BibliographyOptions as Do, BodyPropertiesOptions as Dr, SectionPropertiesOptionsBase as Dt, frameXml as E, SpacingProperties as Ea, FootnoteReferenceElement as Ei, ImageChild as En, withMediaDefaults as Eo, WpsShapeOptions as Er, SectionPropertiesOptions as Et, parseStyleDefinitions as F, SectionVerticalAlign as Fa, YearLong as Fi, CheckBoxOptions as Fn, VerticalAnchor as Fr, SubDocOptions as Ft, MailMergeDocType as G, SdtCheckboxSymbol as Ga, SpaceType as Gi, RubyOptions as Gn, GroupShapeLocksOptions as Gr, LineNumberAttributes as Gt, HyphenationOptions as H, stringifyTableOfContents as Ha, XYFrameOptions as Hi, createFormFieldData as Hn, WpgGroupOptions as Hr, createHeaderFooterReference as Ht, AutoCaptionOptions as I, TableVerticalAlign as Ia, YearShort as Ii, DropDownListOptions as In, createBodyProperties as Ir, parseSectionPropertiesEl as It, MathPropertiesOptions as J, SdtDateMappingType as Ja, tableDesc as Ji, PositionalTabOptions as Jn, createVerticalPosition as Jr, PageTextDirectionType as Jt, MailMergeOptions as K, SdtComboBoxOptions as Ka, VerticalPositionAlign as Ki, PositionalTabAlignment as Kn, drawingDesc as Kr, LineNumberRestartFormat as Kt, CaptionOptions as L, VerticalAlignSection as La, AlignmentFrameOptions as Li, FormFieldCommonOptions as Ln, parseBodyProperties as Lr, sectionPropertiesDesc as Lt, StylesOptions as M, AlignmentType as Ma, Separator as Mi, ProofErrorType as Mn, TextHorzOverflowType as Mr, SectionChild as Mt, buildNumberingCache as N, TableWidthProperties as Na, SoftHyphen as Ni, ProofErrorTypeValue as Nn, TextVertOverflowType as Nr, SectionOptions as Nt, webSettingsDesc as O, BreakTypeValue as Oa, MonthLong as Oi, ParagraphChild as On, SourceTypeOptions as Oo, FlatTextOptions as Or, sectionMarginDefaults as Ot, buildStyleCache as P, WidthType as Pa, Tab as Pi, SmartTagRunOptions as Pn, TextVerticalType as Pr, VmlShapeStyle as Pt, ReadModeInkLockDownOptions as Q, SdtLock as Qa, TableRowOptions as Qi, SimpleFieldOptions as Qn, HorizontalPositionRelativeFrom as Qr, PageBorderOffsetFrom as Qt, CaptionsOptions as R, VerticalAlignTable as Ra, DropCapType as Ri, FormFieldOptions as Rn, ChildExtent as Rr, stringifySectionPropertiesXml as Rt, DivOptions as S, TabStopPosition as Sa, ContinuationSeparator as Si, TableRowPropertiesChangeOptions as Sn, ContentTypesInput as So, WpsMediaData as Sr, EndnotesData as St, WebSettingsOptions as T, LineRuleType as Ta, EndnoteReference as Ti, ChartChild as Tn, withAltChunkOverrides as To, WpsShapeCoreOptions as Tr, SectionPropertiesChangeOptions as Tt, MailMergeDataType as U, parseToc as Ua, HorizontalPositionAlign as Ui, parseFormFieldData as Un, DrawingDescriptorOptions as Ur, SectionType as Ut, FootnotePropertiesOptions as V, VerticalMergeRevisionType as Va, FrameWrap as Vi, TextInputOptions as Vn, WpgGroupCoreOptions as Vr, HeaderFooterType as Vt, MailMergeDest as W, SdtCheckboxOptions as Wa, NumberFormat as Wi, RubyAlign as Wn, GraphicFrameLocksOptions as Wr, createSectionType as Wt, OdsoFieldType as X, SdtDropDownListOptions as Xa, HeightRule as Xi, CommentOptions as Xn, Floating as Xr, createPageMargin as Xt, OdsoFieldMapDataOptions as Y, SdtDateOptions as Ya, TableOptions as Yi, PositionalTabRelativeTo as Yn, createHorizontalPosition as Yr, PageMarginAttributes as Yt, OdsoOptions as Z, SdtListItem as Za, SdtRowOptions as Zi, CommentsOptions as Zn, HorizontalPositionOptions as Zr, PageBorderDisplay as Zt, DocxPartRefs as _, MathRunPropertiesOptions as _a, PageNumber as _i, CustomXmlRowOptions as _n, AltChunkCollection as _o, NonVisualPropertiesOptions as _r, glossaryDesc as _t, CustomPropertiesInput as a, TablePropertiesOptions as aa, TextWrappingSide as ai, PageSizeAttributes as an, RunPropertiesChangeOptions as ao, SmartArtOptions as ar, AbstractNumberingOptions as at, parseDocx as b, LeaderType as ba, AnnotationReference as bi, TableCellOptions as bn, ContentTypeDefault as bo, WpgCommonMediaData as br, footnotesDesc as bt, AppPropertiesInput as c, TableLayoutType as ca, DrawingOptions as ci, DocumentGridType as cn, TextEffect as co, createImageData as cr, parseNumberingDefinitions as ct, settingsDesc as d, RelativeVerticalPosition as da, ParagraphPropertiesChangeOptions as di, ColumnAttributes as dn, EmphasisMarkType as do, createTransformation as dr, LevelsOptions as dt, TextDirection as ea, VerticalPositionOptions as ei, PageBordersOptions as en, SdtTextOptions as eo, WpsShapeRunOptions as er, RsidsOptions as et, EmbeddedFontOptionsWithKey as f, TableAnchorType as fa, ParagraphPropertiesOptions as fi, CustomXmlAttributeOptions as fn, ShadingAttributesProperties as fo, ChartMediaData as fr, DocPartBehavior as ft, DocxDocument as g, MathInput as ga, TextboxTightWrapType as gi, CustomXmlPropertiesOptions as gn, AltChunkOptions as go, MediaDataTransformation as gr, GlossaryDocumentOptions as gt, DocxWriteContext as h, TableBordersOptions as ha, TextAlignmentType as hi, CustomXmlDataBindingOptions as hn, BorderStyle as ho, MediaData as hr, DocPartType as ht, corePropertiesDesc as i, TablePropertiesChangeOptions as ia, TextWrapping as ii, PageOrientation as in, ParagraphRunPropertiesOptions as io, SmartArtNode as ir, ConcreteNumberingOptions as it, Styles as j, BordersOptions as ja, PageNumberElement as ji, SmartArtChild as jn, TextBodyWrappingType as jr, DocumentAttributeNamespaces as jt, SubDocCollection as k, IndentAttributesProperties as ka, MonthShort as ki, ParagraphOptions as kn, bibliographyDesc as ko, NormalAutofitOptions as kr, sectionPageSizeDefaults as kt, AppPropertiesOptions as l, OverlapType as la, SymbolRunOptions as li, createDocumentGrid as ln, UnderlineType as lo, Media as lr, LevelFormat as lt, DocxReadContext as m, TABLE_BORDERS_NONE as ma, ParagraphStylePropertiesOptions as mi, CustomXmlCellOptions as mn, BorderOptions as mo, GroupChildMediaData as mr, DocPartOptions as mt, DocumentOptions as n, TablePropertyExChangeOptions as na, createWrapThrough as ni, PageNumberTypeAttributes as nn, TableOfContentsOptions as no, BackgroundRawMediaOptions as nr, WriteProtectionOptions as nt, CustomPropertyOptions as o, TablePropertiesOptionsBase as oa, TextWrappingType as oi, createPageSize as on, RunPropertiesOptions as oo, ChartOptions as or, Numbering as ot, BodyContext as p, TableFloatOptions as pa, ParagraphPropertiesOptionsBase as pi, CustomXmlBlockOptions as pn, ShadingType as po, ExtendedMediaData as pr, DocPartGallery as pt, MailMergeSourceType as q, SdtDataBindingOptions as qa, setTableParseChild as qi, PositionalTabLeader as qn, resetDrawingIdGen as qr, createLineNumberType as qt, FeaturesOptions as r, TablePropertyExOptions as ra, createWrapTight as ri, createPageNumberType as rn, HighlightColor as ro, DocumentBackgroundOptions as rr, CompatibilityOptions as rt, customPropertiesDesc as s, TableLookOptions as sa, Distance as si, DocGridAttributesProperties as sn, RunStylePropertiesOptions as so, ImageOptions as sr, NumberingOptions as st, CorePropertiesInput as t, VerticalMergeType as ta, VerticalPositionRelativeFrom as ti, PageNumberSeparator as tn, StyleLevel as to, BackgroundImageOptions as tr, SettingsOptions as tt, appPropertiesDesc as u, RelativeHorizontalPosition as ua, LevelParagraphStylePropertiesOptions as ui, ColumnsAttributes as un, FontAttributesProperties as uo, MediaTransformation as ur, LevelSuffix as ut, parseArchive as v, MathScriptType as va, ParagraphRunOptions as vi, CustomXmlRunOptions as vn, AltChunkData as vo, SmartArtMediaData as vr, FootnoteSeparator as vt, WebSettingsInput as w, HeadingLevel as wa, DayShort as wi, TableRowPropertiesOptionsBase as wn, contentTypesDesc as wo, StyleMatrixReferenceOptions as wr, HeaderFooterGroup as wt, DivBorderOptions as x, TabStopDefinition as xa, CarriageReturn as xi, CnfStyleOptions as xn, ContentTypeOverride as xo, WpgMediaData as xr, EndnoteSeparator as xt, parseDocument as y, MathStyleType as ya, RunOptions as yi, SdtCellOptions as yn, CharacterSet as yo, WORKAROUND2 as yr, FootnotesData as yt, DocumentProtectionOptions as z, createVerticalAlign as za, FrameAnchorType as zi, FormFieldTextOptions as zn, ChildOffset as zr, HeaderFooterReferenceOptions as zt };
|
|
3746
|
+
//# sourceMappingURL=core-properties-CZzFLDat.d.mts.map
|