@betteroffice/docx 0.0.3 → 0.1.0
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 +22 -8
- package/dist/chunk-24DL53QL.mjs +1 -0
- package/dist/chunk-5F6DLQZP.mjs +1 -0
- package/dist/chunk-BUZ2X5CT.mjs +16 -0
- package/dist/chunk-CTBUQRYQ.mjs +1 -0
- package/dist/{chunk-B4IR6YP4.mjs → chunk-GHEHBYQK.mjs} +1 -1
- package/dist/{chunk-NJHOPXZW.mjs → chunk-HLDJMU3R.mjs} +1 -1
- package/dist/chunk-HTDNSQ44.mjs +1 -0
- package/dist/{chunk-IFT6DUJX.mjs → chunk-LTVVQMHB.mjs} +1 -1
- package/dist/chunk-PI2I3TO5.mjs +57 -0
- package/dist/chunk-TMHG7OAZ.mjs +1 -0
- package/dist/chunk-VRGUAKOC.mjs +1 -0
- package/dist/collaboration/index.d.mts +32 -8
- package/dist/collaboration/index.mjs +1 -1
- package/dist/{content-MOZ6hKP4.d.mts → content-DrqzbIr7.d.mts} +582 -666
- package/dist/core.d.mts +7 -7
- package/dist/core.mjs +1 -1
- package/dist/{displayListQueries-BJlo7Jkz.d.mts → displayListQueries-DGDR-OWc.d.mts} +98 -50
- package/dist/docx/index.d.mts +5 -5
- package/dist/docx/index.mjs +1 -1
- package/dist/editor/index.d.mts +8 -8
- package/dist/{fontLoader-aSewHMKF.d.mts → fontLoader-DnixuYST.d.mts} +127 -2
- package/dist/{formatting-D1EPSaJP.d.mts → formatting-BqrFPeev.d.mts} +85 -203
- package/dist/{frameDelta-D965X8yK.d.mts → frameDelta-DMgR8n13.d.mts} +17 -10
- package/dist/generated/edit/docx_edit_bg.wasm +0 -0
- package/dist/generated/layout/docx_layout_bg.wasm +0 -0
- package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
- package/dist/generated/parse/docx_parse_bg.wasm +0 -0
- package/dist/{index-Dx4Z3lkz.d.mts → index-ImoMd0Ju.d.mts} +97 -67
- package/dist/layout/index.d.mts +40 -12
- package/dist/layout/index.mjs +1 -1
- package/dist/layout/pagination/index.d.mts +4 -4
- package/dist/layout/pagination/index.mjs +1 -1
- package/dist/layout/render/index.d.mts +33 -77
- package/dist/layout/render/index.mjs +1 -1
- package/dist/plugin-api/RenderedDomContext.d.mts +7 -7
- package/dist/plugin-api/index.d.mts +3 -3
- package/dist/plugin-api/resolveItemPositions.d.mts +3 -3
- package/dist/{rustDisplayList-BRuZBqdL.d.mts → rustDisplayList-B9dQoLHI.d.mts} +79 -50
- package/dist/{rustMeasureSource-D1KsQvVC.d.mts → rustMeasureSource-C0EZB055.d.mts} +5 -2
- package/dist/{selectiveSave-CVoajSKE.d.mts → selectiveSave-CRh-_Y_C.d.mts} +3 -3
- package/dist/styles/index.d.mts +3 -3
- package/dist/{styles-Dn_o3Vo5.d.mts → styles-CMybYYHS.d.mts} +1 -1
- package/dist/types/content.d.mts +2 -2
- package/dist/types/document.d.mts +7 -7
- package/dist/{types-BfqUl2h_.d.mts → types-CXLxVF1t.d.mts} +27 -23
- package/dist/utils/comments.d.mts +2 -2
- package/dist/utils/index.d.mts +11 -13
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/stylePreview.d.mts +2 -2
- package/dist/utils/units.d.mts +4 -34
- package/dist/utils/units.mjs +1 -1
- package/dist/wasm-CJHQHBDE.mjs +1 -0
- package/dist/wasm-T2CRCO7S.mjs +1 -0
- package/dist/wasm-edit.d.mts +524 -168
- package/dist/wasm-edit.mjs +1 -1
- package/dist/wasm-layout.d.mts +35 -28
- package/dist/wasm-layout.mjs +1 -1
- package/dist/wasm-opc.mjs +1 -1
- package/dist/wasm-parse.mjs +1 -1
- package/dist/yrs/index.d.mts +6 -6
- package/dist/yrs/index.mjs +1 -1
- package/dist/yrs/residentEngineWorker.mjs +1 -1
- package/package.json +19 -3
- package/dist/chunk-3UBMCDME.mjs +0 -1
- package/dist/chunk-AEQOEQJ7.mjs +0 -57
- package/dist/chunk-AZ52IWB6.mjs +0 -16
- package/dist/chunk-GGEGIQRK.mjs +0 -1
- package/dist/chunk-T4EZMUXM.mjs +0 -1
- package/dist/chunk-WON6K4FY.mjs +0 -1
- package/dist/chunk-Y7RUNRU2.mjs +0 -1
- package/dist/wasm-DO3BUV7C.mjs +0 -1
- package/dist/wasm-NWXX4H5G.mjs +0 -1
|
@@ -1,239 +1,113 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* - Colors can be srgbClr, sysClr, or schemeClr
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Theme color scheme (a:clrScheme)
|
|
15
|
-
*
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
1
|
+
/** DrawingML value contracts retained by the DOCX host. */
|
|
2
|
+
type ThemeColorSlot = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'background1' | 'text1' | 'background2' | 'text2';
|
|
3
|
+
interface ColorValue {
|
|
4
|
+
rgb?: string;
|
|
5
|
+
themeColor?: ThemeColorSlot;
|
|
6
|
+
themeTint?: string;
|
|
7
|
+
themeShade?: string;
|
|
8
|
+
auto?: boolean;
|
|
9
|
+
}
|
|
18
10
|
interface ThemeColorScheme {
|
|
19
|
-
/** Dark 1 color (usually black) */
|
|
20
11
|
dk1?: string;
|
|
21
|
-
/** Light 1 color (usually white) */
|
|
22
12
|
lt1?: string;
|
|
23
|
-
/** Dark 2 color */
|
|
24
13
|
dk2?: string;
|
|
25
|
-
/** Light 2 color */
|
|
26
14
|
lt2?: string;
|
|
27
|
-
/** Accent colors 1-6 */
|
|
28
15
|
accent1?: string;
|
|
29
16
|
accent2?: string;
|
|
30
17
|
accent3?: string;
|
|
31
18
|
accent4?: string;
|
|
32
19
|
accent5?: string;
|
|
33
20
|
accent6?: string;
|
|
34
|
-
/** Hyperlink color */
|
|
35
21
|
hlink?: string;
|
|
36
|
-
/** Followed hyperlink color */
|
|
37
22
|
folHlink?: string;
|
|
38
23
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Theme font (with script variants)
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
24
|
interface ThemeFont {
|
|
45
|
-
/** Latin font */
|
|
46
25
|
latin?: string;
|
|
47
|
-
/** East Asian font */
|
|
48
26
|
ea?: string;
|
|
49
|
-
/** Complex script font */
|
|
50
27
|
cs?: string;
|
|
51
|
-
/** Script-specific fonts */
|
|
52
28
|
fonts?: Record<string, string>;
|
|
53
29
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Theme font scheme (a:fontScheme)
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
59
30
|
interface ThemeFontScheme {
|
|
60
|
-
/** Major font (headings) */
|
|
61
31
|
majorFont?: ThemeFont;
|
|
62
|
-
/** Minor font (body text) */
|
|
63
32
|
minorFont?: ThemeFont;
|
|
64
33
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Theme (from a theme1.xml part)
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
69
|
-
*/
|
|
70
34
|
interface Theme {
|
|
71
|
-
/** Theme name */
|
|
72
35
|
name?: string;
|
|
73
|
-
/** Color scheme */
|
|
74
36
|
colorScheme?: ThemeColorScheme;
|
|
75
|
-
/** Font scheme */
|
|
76
37
|
fontScheme?: ThemeFontScheme;
|
|
77
|
-
/** Format scheme (fills, lines, effects) - simplified */
|
|
78
38
|
formatScheme?: {
|
|
79
39
|
name?: string;
|
|
80
40
|
};
|
|
81
41
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Theme color slots from a theme's clrScheme (plus the WordprocessingML
|
|
98
|
-
* alias slots background1/text1/background2/text2).
|
|
99
|
-
*
|
|
100
|
-
* @public
|
|
101
|
-
*/
|
|
102
|
-
type ThemeColorSlot = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'background1' | 'text1' | 'background2' | 'text2';
|
|
103
|
-
/**
|
|
104
|
-
* ECMA-376 color reference — either a direct RGB hex, a theme slot
|
|
105
|
-
* reference (with optional tint/shade), or `auto` for context-dependent
|
|
106
|
-
* defaults (usually black for text on light backgrounds). When both
|
|
107
|
-
* `rgb` and `themeColor` are set, the theme wins on Word import and the
|
|
108
|
-
* `rgb` acts as a fallback for renderers without theme support.
|
|
109
|
-
*
|
|
110
|
-
* See ECMA-376 §17.18.39 (`ST_ThemeColor`).
|
|
111
|
-
*
|
|
112
|
-
* @public
|
|
113
|
-
*/
|
|
114
|
-
interface ColorValue {
|
|
115
|
-
/** RGB hex value without # (e.g., "FF0000") */
|
|
116
|
-
rgb?: string;
|
|
117
|
-
/** Theme color slot reference */
|
|
118
|
-
themeColor?: ThemeColorSlot;
|
|
119
|
-
/** Tint modifier (0-255 as hex string, e.g., "80") - makes color lighter */
|
|
120
|
-
themeTint?: string;
|
|
121
|
-
/** Shade modifier (0-255 as hex string) - makes color darker */
|
|
122
|
-
themeShade?: string;
|
|
123
|
-
/** Auto color - context-dependent (usually black for text) */
|
|
124
|
-
auto?: boolean;
|
|
42
|
+
type ShapeType = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'rtTriangle' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'decagon' | 'dodecagon' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'line' | 'straightConnector1' | 'bentConnector2' | 'bentConnector3' | 'bentConnector4' | 'bentConnector5' | 'curvedConnector2' | 'curvedConnector3' | 'curvedConnector4' | 'curvedConnector5' | 'rightArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'leftRightArrow' | 'upDownArrow' | 'quadArrow' | 'leftRightUpArrow' | 'bentArrow' | 'uturnArrow' | 'leftUpArrow' | 'bentUpArrow' | 'curvedRightArrow' | 'curvedLeftArrow' | 'curvedUpArrow' | 'curvedDownArrow' | 'stripedRightArrow' | 'notchedRightArrow' | 'homePlate' | 'chevron' | 'rightArrowCallout' | 'downArrowCallout' | 'leftArrowCallout' | 'upArrowCallout' | 'leftRightArrowCallout' | 'quadArrowCallout' | 'circularArrow' | 'flowChartProcess' | 'flowChartAlternateProcess' | 'flowChartDecision' | 'flowChartInputOutput' | 'flowChartPredefinedProcess' | 'flowChartInternalStorage' | 'flowChartDocument' | 'flowChartMultidocument' | 'flowChartTerminator' | 'flowChartPreparation' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartConnector' | 'flowChartOffpageConnector' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSummingJunction' | 'flowChartOr' | 'flowChartCollate' | 'flowChartSort' | 'flowChartExtract' | 'flowChartMerge' | 'flowChartOnlineStorage' | 'flowChartDelay' | 'flowChartMagneticTape' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartDisplay' | 'wedgeRectCallout' | 'wedgeRoundRectCallout' | 'wedgeEllipseCallout' | 'cloudCallout' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'callout1' | 'callout2' | 'callout3' | 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'actionButtonBlank' | 'actionButtonHome' | 'actionButtonHelp' | 'actionButtonInformation' | 'actionButtonBackPrevious' | 'actionButtonForwardNext' | 'actionButtonBeginning' | 'actionButtonEnd' | 'actionButtonReturn' | 'actionButtonDocument' | 'actionButtonSound' | 'actionButtonMovie' | 'irregularSeal1' | 'irregularSeal2' | 'frame' | 'halfFrame' | 'corner' | 'diagStripe' | 'chord' | 'arc' | 'bracketPair' | 'bracePair' | 'leftBracket' | 'rightBracket' | 'leftBrace' | 'rightBrace' | 'can' | 'cube' | 'bevel' | 'donut' | 'noSmoking' | 'blockArc' | 'foldedCorner' | 'smileyFace' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'cloud' | 'snip1Rect' | 'snip2SameRect' | 'snip2DiagRect' | 'snipRoundRect' | 'round1Rect' | 'round2SameRect' | 'round2DiagRect' | 'plaque' | 'teardrop' | 'mathPlus' | 'mathMinus' | 'mathMultiply' | 'mathDivide' | 'mathEqual' | 'mathNotEqual' | 'gear6' | 'gear9' | 'funnel' | 'pieWedge' | 'pie' | 'leftCircularArrow' | 'leftRightCircularArrow' | 'swooshArrow' | 'textBox';
|
|
43
|
+
interface ShapeFill {
|
|
44
|
+
type: 'none' | 'solid' | 'gradient' | 'pattern' | 'picture';
|
|
45
|
+
color?: ColorValue;
|
|
46
|
+
gradient?: {
|
|
47
|
+
type: 'linear' | 'radial' | 'rectangular' | 'path';
|
|
48
|
+
angle?: number;
|
|
49
|
+
stops: Array<{
|
|
50
|
+
position: number;
|
|
51
|
+
color: ColorValue;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
125
54
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
* that `themeColor` + `themeTint`/`themeShade` are honored consistently across
|
|
143
|
-
* all render paths.
|
|
144
|
-
*
|
|
145
|
-
* When a themed color is present but `theme` is null/undefined, falls back to
|
|
146
|
-
* `color.rgb` if Word wrote one for compat; otherwise returns `undefined`.
|
|
147
|
-
*
|
|
148
|
-
* @returns 6-char uppercase hex without `#`, or `undefined`.
|
|
149
|
-
*
|
|
150
|
-
* @public
|
|
151
|
-
*/
|
|
152
|
-
declare function resolveColorToHex(color: ColorValue | undefined | null, theme: Theme | null | undefined): string | undefined;
|
|
153
|
-
/**
|
|
154
|
-
* Get contrasting text color for a background
|
|
155
|
-
*
|
|
156
|
-
* @param backgroundColor - Background ColorValue
|
|
157
|
-
* @param theme - Theme for resolving theme colors
|
|
158
|
-
* @returns Black or white hex color for best contrast
|
|
159
|
-
*
|
|
160
|
-
* @public
|
|
161
|
-
*/
|
|
162
|
-
declare function getContrastingColor(backgroundColor: ColorValue | undefined | null, theme: Theme | null | undefined): string;
|
|
163
|
-
/**
|
|
164
|
-
* Darken a color by a percentage
|
|
165
|
-
*
|
|
166
|
-
* @param color - ColorValue to darken
|
|
167
|
-
* @param theme - Theme for resolving
|
|
168
|
-
* @param percent - Percentage to darken (0-100)
|
|
169
|
-
* @returns CSS color string
|
|
170
|
-
*
|
|
171
|
-
* @public
|
|
172
|
-
*/
|
|
173
|
-
declare function darkenColor(color: ColorValue | undefined | null, theme: Theme | null | undefined, percent: number): string;
|
|
174
|
-
/**
|
|
175
|
-
* Lighten a color by a percentage
|
|
176
|
-
*
|
|
177
|
-
* @param color - ColorValue to lighten
|
|
178
|
-
* @param theme - Theme for resolving
|
|
179
|
-
* @param percent - Percentage to lighten (0-100)
|
|
180
|
-
* @returns CSS color string
|
|
181
|
-
*
|
|
182
|
-
* @public
|
|
183
|
-
*/
|
|
184
|
-
declare function lightenColor(color: ColorValue | undefined | null, theme: Theme | null | undefined, percent: number): string;
|
|
185
|
-
/**
|
|
186
|
-
* Blend two colors together
|
|
187
|
-
*
|
|
188
|
-
* @param color1 - First color
|
|
189
|
-
* @param color2 - Second color
|
|
190
|
-
* @param ratio - Blend ratio (0 = all color1, 1 = all color2)
|
|
191
|
-
* @param theme - Theme for resolving
|
|
192
|
-
* @returns CSS color string
|
|
193
|
-
*
|
|
194
|
-
* @public
|
|
195
|
-
*/
|
|
196
|
-
declare function blendColors(color1: ColorValue | undefined | null, color2: ColorValue | undefined | null, ratio: number, theme: Theme | null | undefined): string;
|
|
197
|
-
/**
|
|
198
|
-
* Theme color matrix cell
|
|
199
|
-
*
|
|
200
|
-
* @public
|
|
201
|
-
*/
|
|
202
|
-
interface ThemeMatrixCell {
|
|
203
|
-
/** Resolved hex color (6 chars, no #) */
|
|
204
|
-
hex: string;
|
|
205
|
-
/** Theme color slot */
|
|
206
|
-
themeSlot: ThemeColorSlot;
|
|
207
|
-
/** Tint hex modifier if applicable (e.g., "CC") */
|
|
208
|
-
tint?: string;
|
|
209
|
-
/** Shade hex modifier if applicable (e.g., "BF") */
|
|
210
|
-
shade?: string;
|
|
211
|
-
/** Human-readable label (e.g., "Accent 1, Lighter 60%") */
|
|
212
|
-
label: string;
|
|
55
|
+
interface ShapeOutline {
|
|
56
|
+
width?: number;
|
|
57
|
+
color?: ColorValue;
|
|
58
|
+
style?: 'solid' | 'dot' | 'dash' | 'lgDash' | 'dashDot' | 'lgDashDot' | 'lgDashDotDot' | 'sysDot' | 'sysDash' | 'sysDashDot' | 'sysDashDotDot';
|
|
59
|
+
cap?: 'flat' | 'round' | 'square';
|
|
60
|
+
join?: 'bevel' | 'miter' | 'round';
|
|
61
|
+
headEnd?: {
|
|
62
|
+
type: 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
|
|
63
|
+
width?: 'sm' | 'med' | 'lg';
|
|
64
|
+
length?: 'sm' | 'med' | 'lg';
|
|
65
|
+
};
|
|
66
|
+
tailEnd?: {
|
|
67
|
+
type: 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
|
|
68
|
+
width?: 'sm' | 'med' | 'lg';
|
|
69
|
+
length?: 'sm' | 'med' | 'lg';
|
|
70
|
+
};
|
|
213
71
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
72
|
+
interface ShapeTextBody<TContent = unknown> {
|
|
73
|
+
vertical?: boolean;
|
|
74
|
+
rotation?: number;
|
|
75
|
+
anchor?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
|
|
76
|
+
anchorCenter?: boolean;
|
|
77
|
+
autoFit?: 'none' | 'normal' | 'shape';
|
|
78
|
+
margins?: {
|
|
79
|
+
top?: number;
|
|
80
|
+
bottom?: number;
|
|
81
|
+
left?: number;
|
|
82
|
+
right?: number;
|
|
83
|
+
};
|
|
84
|
+
content: TContent[];
|
|
85
|
+
}
|
|
86
|
+
type PresetGeometryPathCommand = {
|
|
87
|
+
type: 'move';
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
} | {
|
|
91
|
+
type: 'line';
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
} | {
|
|
95
|
+
type: 'quad';
|
|
96
|
+
cpx: number;
|
|
97
|
+
cpy: number;
|
|
98
|
+
x: number;
|
|
99
|
+
y: number;
|
|
100
|
+
} | {
|
|
101
|
+
type: 'cubic';
|
|
102
|
+
cp1x: number;
|
|
103
|
+
cp1y: number;
|
|
104
|
+
cp2x: number;
|
|
105
|
+
cp2y: number;
|
|
106
|
+
x: number;
|
|
107
|
+
y: number;
|
|
108
|
+
} | {
|
|
109
|
+
type: 'close';
|
|
110
|
+
};
|
|
237
111
|
|
|
238
112
|
/**
|
|
239
113
|
* Color & Styling Primitives
|
|
@@ -537,6 +411,14 @@ interface ParagraphFormatting {
|
|
|
537
411
|
indentFirstLine?: number;
|
|
538
412
|
/** Whether first line is hanging indent */
|
|
539
413
|
hangingIndent?: boolean;
|
|
414
|
+
/** Left indent in hundredths of a character (w:ind/@w:leftChars) */
|
|
415
|
+
indentLeftChars?: number;
|
|
416
|
+
/** Right indent in hundredths of a character (w:ind/@w:rightChars) */
|
|
417
|
+
indentRightChars?: number;
|
|
418
|
+
/** First line indent in hundredths of a character - negative for hanging (w:ind/@w:firstLineChars or @w:hangingChars) */
|
|
419
|
+
indentFirstLineChars?: number;
|
|
420
|
+
/** Whether the character first-line indent is hanging; the sign of a zero does not survive JSON */
|
|
421
|
+
hangingIndentChars?: boolean;
|
|
540
422
|
/** Paragraph borders (w:pBdr) */
|
|
541
423
|
borders?: {
|
|
542
424
|
top?: BorderSpec;
|
|
@@ -820,4 +702,4 @@ interface TableCellFormatting {
|
|
|
820
702
|
conditionalFormat?: ConditionalFormatStyle;
|
|
821
703
|
}
|
|
822
704
|
|
|
823
|
-
export {
|
|
705
|
+
export type { ThemeFontScheme as A, BorderSpec as B, ColorValue as C, ShapeTextBody as D, EmphasisMark as E, FloatingTableProperties as F, LineSpacingRule as L, PresetGeometryPathCommand as P, RunFontHint as R, ShadingProperties as S, TextModernEffects as T, UnderlineStyle as U, ParagraphFormatting as a, TextFormatting as b, TableFormatting as c, TableRowFormatting as d, TableCellFormatting as e, Theme as f, CellMargins as g, ConditionalFormatStyle as h, ParagraphAlignment as i, RunLanguage as j, ShapeFill as k, ShapeOutline as l, ShapeType as m, TabLeader as n, TabStop as o, TabStopAlignment as p, TableBorders as q, TableLook as r, TableMeasurement as s, TableStyleCascade as t, TableStyleRegion as u, TableWidthType as v, TextEffect as w, ThemeColorScheme as x, ThemeColorSlot as y, ThemeFont as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { T as TextModernEffects } from './formatting-BqrFPeev.mjs';
|
|
2
|
+
import { D as DrawingScene, d as ShapeTextBodyProperties } from './content-DrqzbIr7.mjs';
|
|
3
3
|
|
|
4
4
|
interface DisplayList {
|
|
5
5
|
/** Contract version. Undefined reads as legacy version 0. */
|
|
@@ -57,7 +57,7 @@ interface NoteRegion {
|
|
|
57
57
|
primitives?: DisplayPrimitive[];
|
|
58
58
|
noteIds?: number[];
|
|
59
59
|
/**
|
|
60
|
-
* Per-note backlink metadata (W17): the body-doc
|
|
60
|
+
* Per-note backlink metadata (W17): the body-doc range of each note's
|
|
61
61
|
* reference mark plus its formatted label, so the a11y mirror can wire
|
|
62
62
|
* note ↔ reference associations (doc-noteref / doc-backlink). Parallel to
|
|
63
63
|
* `noteIds`; undefined = legacy region without backlink data.
|
|
@@ -67,7 +67,7 @@ interface NoteRegion {
|
|
|
67
67
|
/** Backlink metadata for one note in a NoteRegion. */
|
|
68
68
|
interface NoteRegionNote {
|
|
69
69
|
id?: number;
|
|
70
|
-
/** Body-doc
|
|
70
|
+
/** Body-doc range of the reference mark anchoring this note. */
|
|
71
71
|
anchorDocStart?: number;
|
|
72
72
|
anchorDocEnd?: number;
|
|
73
73
|
/** Formatted reference label (display number / custom mark). File-derived. */
|
|
@@ -168,6 +168,11 @@ interface DisplayClipGroupMetadata {
|
|
|
168
168
|
};
|
|
169
169
|
opacity?: number;
|
|
170
170
|
}
|
|
171
|
+
/** Horizontal paint slot for text laid out with guessed metrics. */
|
|
172
|
+
interface DisplayPaintClip {
|
|
173
|
+
x: number;
|
|
174
|
+
w: number;
|
|
175
|
+
}
|
|
171
176
|
interface StructuralRevision {
|
|
172
177
|
scope: 'pmark' | 'table' | 'row' | 'cell';
|
|
173
178
|
author: string;
|
|
@@ -221,6 +226,8 @@ interface DocAttrs {
|
|
|
221
226
|
paraId?: string;
|
|
222
227
|
fromLine?: number;
|
|
223
228
|
toLine?: number;
|
|
229
|
+
/** Resolved line index within the owning paragraph. */
|
|
230
|
+
lineIndex?: number;
|
|
224
231
|
/**
|
|
225
232
|
* Table cell the primitive paints inside, when any. The a11y mirror builds
|
|
226
233
|
* real ARIA table semantics (role table/row/cell, aria-row/colindex) from
|
|
@@ -288,10 +295,7 @@ interface DocAttrs {
|
|
|
288
295
|
groupId?: string;
|
|
289
296
|
/** Review presentation for comment-associated primitives. */
|
|
290
297
|
comment?: DisplayCommentMetadata;
|
|
291
|
-
/**
|
|
292
|
-
* Scoped clip/group membership. Undefined = ungrouped. Kept as metadata
|
|
293
|
-
* until the canvas/mirror batch activates `ClipGroupPrimitive` in the union.
|
|
294
|
-
*/
|
|
298
|
+
/** Scoped clip/group membership. Undefined = ungrouped. */
|
|
295
299
|
clipGroup?: DisplayClipGroupMetadata;
|
|
296
300
|
/** Enclosing table-fragment identity and accessibility semantics. */
|
|
297
301
|
table?: DisplayTableMetadata;
|
|
@@ -302,6 +306,7 @@ interface TextRunPrimitive extends DocAttrs {
|
|
|
302
306
|
x: number;
|
|
303
307
|
baselineY: number;
|
|
304
308
|
width: number;
|
|
309
|
+
paintClip?: DisplayPaintClip;
|
|
305
310
|
font: string;
|
|
306
311
|
color: string;
|
|
307
312
|
letterSpacing?: number;
|
|
@@ -319,7 +324,7 @@ interface TextRunPrimitive extends DocAttrs {
|
|
|
319
324
|
smallCaps?: boolean;
|
|
320
325
|
/** Hidden run shown in editing view as dimmed/dotted, matching the DOM painter. */
|
|
321
326
|
hidden?: boolean;
|
|
322
|
-
/** CSS-like shadow effect
|
|
327
|
+
/** CSS-like shadow effect from run formatting. */
|
|
323
328
|
textShadow?: 'shadow' | 'emboss' | 'imprint';
|
|
324
329
|
/** Outlined / hollow text. */
|
|
325
330
|
textOutline?: boolean;
|
|
@@ -343,6 +348,7 @@ interface PositionedGlyph {
|
|
|
343
348
|
/** Bidi embedding level for this cluster. */
|
|
344
349
|
bidiLevel?: number;
|
|
345
350
|
}
|
|
351
|
+
/** Shaped glyph run with source text for accessibility. */
|
|
346
352
|
interface GlyphRunPrimitive extends DocAttrs {
|
|
347
353
|
kind: 'glyphRun';
|
|
348
354
|
fontId: number;
|
|
@@ -350,6 +356,7 @@ interface GlyphRunPrimitive extends DocAttrs {
|
|
|
350
356
|
color: string;
|
|
351
357
|
text: string;
|
|
352
358
|
glyphs: PositionedGlyph[];
|
|
359
|
+
paintClip?: DisplayPaintClip;
|
|
353
360
|
fallbackFont?: string;
|
|
354
361
|
wordSpacing?: number;
|
|
355
362
|
rtl?: boolean;
|
|
@@ -365,7 +372,7 @@ interface GlyphRunPrimitive extends DocAttrs {
|
|
|
365
372
|
smallCaps?: boolean;
|
|
366
373
|
/** Hidden run shown in editing view as dimmed/dotted, matching the DOM painter. */
|
|
367
374
|
hidden?: boolean;
|
|
368
|
-
/** CSS-like shadow effect
|
|
375
|
+
/** CSS-like shadow effect from run formatting. */
|
|
369
376
|
textShadow?: 'shadow' | 'emboss' | 'imprint';
|
|
370
377
|
/** Outlined / hollow text. */
|
|
371
378
|
textOutline?: boolean;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|