@docx-editor.dev/core 2.9.2 → 2.11.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/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +14 -5
- package/dist/automation.d.ts +14 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +78 -13
- package/dist/binding.d.ts +78 -13
- package/dist/binding.js +1 -1
- package/dist/chunk-34BNQUD4.js +10 -0
- package/dist/chunk-5AVHO75P.cjs +19 -0
- package/dist/chunk-6HMSC7UV.js +2 -0
- package/dist/chunk-6JIJOZDW.js +1 -0
- package/dist/chunk-76Y3Y45J.cjs +2 -0
- package/dist/chunk-BP7ANXGA.js +1 -0
- package/dist/chunk-BTQKU64Q.cjs +1 -0
- package/dist/chunk-CRZR6K5Z.js +19 -0
- package/dist/chunk-D5EHDHYV.js +1 -0
- package/dist/chunk-EJATEGJZ.cjs +1 -0
- package/dist/{chunk-PSZH2VXP.js → chunk-GOEBQ26R.js} +1 -1
- package/dist/chunk-GRDFEH5Q.cjs +2 -0
- package/dist/chunk-GWV65NQW.cjs +10 -0
- package/dist/chunk-GXLZCXEH.js +2 -0
- package/dist/chunk-JUQOPVSK.cjs +2 -0
- package/dist/chunk-LAETEBHD.js +1 -0
- package/dist/chunk-M6Z3KFXM.cjs +5 -0
- package/dist/{chunk-YMYCPY5Y.cjs → chunk-OHJQ7GPZ.cjs} +1 -1
- package/dist/chunk-UQFOYZJO.cjs +18 -0
- package/dist/chunk-WPQMPHNR.cjs +1 -0
- package/dist/chunk-WXQ245MQ.js +18 -0
- package/dist/chunk-WZHIFNSU.js +5 -0
- package/dist/chunk-X7A5XART.js +2 -0
- package/dist/chunk-ZKWRCLT2.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -0
- package/dist/collaboration/replication.d.cts +216 -0
- package/dist/collaboration/replication.d.ts +216 -0
- package/dist/collaboration/replication.js +1 -0
- package/dist/collaboration.cjs +1 -0
- package/dist/collaboration.d.cts +176 -0
- package/dist/collaboration.d.ts +176 -0
- package/dist/collaboration.js +1 -0
- package/dist/contracts/document.d.cts +6 -1
- package/dist/contracts/document.d.ts +6 -1
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +8 -9
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +8 -9
- package/dist/contracts/interaction.d.ts +8 -9
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.cts +20 -8
- package/dist/contracts/modules.d.ts +20 -8
- package/dist/contracts/modules.js +1 -1
- package/dist/custom-node-writes-CwkYRw3V.d.cts +310 -0
- package/dist/custom-node-writes-JfTn-Sy6.d.ts +310 -0
- package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
- package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
- package/dist/{editor-Cvd7Geoc.d.ts → editor-BogcVHXk.d.ts} +176 -59
- package/dist/{editor-cAEf1uXW.d.cts → editor-C8edZgy5.d.cts} +176 -59
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -7698
- package/dist/editor.d.cts +26 -25
- package/dist/editor.d.ts +26 -25
- package/dist/editor.js +1 -1
- package/dist/failure-BnGjoXf0.d.cts +64 -0
- package/dist/failure-BnGjoXf0.d.ts +64 -0
- package/dist/{index-DRqY5JVF.d.ts → index-BNv-ZLQP.d.ts} +327 -86
- package/dist/{index-wb-iOxfh.d.cts → index-Dn0lOp9Z.d.cts} +327 -86
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +20 -19
- package/dist/index.d.ts +20 -19
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +92 -55
- package/dist/layout.d.ts +92 -55
- package/dist/layout.js +1 -1
- package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-BmoSdyKS.d.ts} +1 -1
- package/dist/{note-properties-CQlxjic_.d.cts → note-properties-BvGfHk5e.d.cts} +1 -1
- package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-Ciq5rgb7.d.ts} +1 -1
- package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-CqQOt_dD.d.cts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +6 -8
- package/dist/output.d.ts +6 -8
- package/dist/output.js +1 -1
- package/dist/{protocol-UuZOcOp7.d.cts → protocol-BB-WP3zk.d.cts} +2 -2
- package/dist/{protocol-C7ahrdUx.d.ts → protocol-Ckl7hWsv.d.ts} +2 -2
- package/dist/{review-items-bdGxFWNA.d.ts → review-items-BdeLNRi2.d.cts} +1 -2
- package/dist/{review-items-B8tffIXj.d.cts → review-items-CkYyXhXM.d.ts} +1 -2
- package/dist/{review-reads-Bxz03tHG.d.cts → review-reads-BOLSBm5w.d.cts} +2 -2
- package/dist/{review-reads-CHODU0LI.d.ts → review-reads-Crf0Xn42.d.ts} +2 -2
- package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-Ae2CWa8E.d.ts} +1 -1
- package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-C2S8PSQm.d.cts} +1 -1
- package/dist/{semantic-cell-selection-BPzx6DdT.d.cts → semantic-cell-selection-C0OFD4D9.d.cts} +4 -4
- package/dist/{semantic-cell-selection-CsHcr-yk.d.ts → semantic-cell-selection-DdmoxC-y.d.ts} +4 -4
- package/dist/{semantic-interaction-D-RZ9Ust.d.ts → semantic-interaction-COyhZ9WH.d.ts} +21 -2
- package/dist/{semantic-interaction-BfWDD_0V.d.cts → semantic-interaction-Cs2jErnt.d.cts} +21 -2
- package/dist/{semantic-paint-WhVtSDJK.d.ts → semantic-paint-UHaj3sBY.d.cts} +2 -2
- package/dist/{semantic-paint-Bd7EqzXV.d.cts → semantic-paint-vA-oLSdV.d.ts} +2 -2
- package/dist/{semantic-records-DadVT_E1.d.cts → semantic-records-5AOQJmLX.d.cts} +20 -5
- package/dist/{semantic-records-DCt-ZwKU.d.ts → semantic-records-9xhwbJ23.d.ts} +20 -5
- package/dist/{shaped-measurer-CninrHr_.d.cts → shaped-measurer-NeF2mPSu.d.cts} +1 -1
- package/dist/{shaped-measurer-B9f4A7QA.d.ts → shaped-measurer-vzsY88oK.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +193 -19
- package/dist/store.d.ts +193 -19
- package/dist/store.js +1 -1
- package/dist/tree-op-types-BPyXNxyL.d.cts +3053 -0
- package/dist/tree-op-types-DnzAOnc9.d.ts +3053 -0
- package/dist/{custom-node-writes-D6SGwebL.d.ts → tree-package-fragment-BjZ3RWAS.d.cts} +128 -312
- package/dist/{custom-node-writes-Dy3b20PS.d.cts → tree-package-fragment-CDER0G3B.d.ts} +128 -312
- package/dist/{tree-session-ZuBFOhIh.d.ts → tree-session-contract-BF2FVBOM.d.cts} +52 -106
- package/dist/{tree-session-Df02ajqc.d.cts → tree-session-contract-DhdsFT_z.d.ts} +52 -106
- package/dist/{tree-store-B_sJBMIS.d.cts → tree-store-CNZ3O83s.d.ts} +130 -25
- package/dist/{tree-store-DgETo6Mf.d.ts → tree-store-DfZi7FqY.d.cts} +130 -25
- package/package.json +14 -3
- package/dist/chunk-6JWP2H7K.js +0 -2
- package/dist/chunk-6KNLLEUW.cjs +0 -18
- package/dist/chunk-7ADTI533.cjs +0 -10
- package/dist/chunk-7ETDCPF6.cjs +0 -2
- package/dist/chunk-7I3BSGGS.js +0 -1
- package/dist/chunk-7UU5YFCD.cjs +0 -2
- package/dist/chunk-7VQ7YLW3.cjs +0 -1
- package/dist/chunk-CKDAK3MV.js +0 -10
- package/dist/chunk-DIMEYVNS.js +0 -2
- package/dist/chunk-GQQOL4PV.js +0 -1
- package/dist/chunk-H2656QDI.cjs +0 -1
- package/dist/chunk-KQGENNL5.cjs +0 -15
- package/dist/chunk-LIXPSV4T.js +0 -18
- package/dist/chunk-O4UULRAQ.cjs +0 -5
- package/dist/chunk-SIIFNE6U.js +0 -15
- package/dist/chunk-VXYECPKA.js +0 -5
- package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
- package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
- package/dist/image-resources-BgA9EQxY.d.ts +0 -203
- package/dist/image-resources-BiA-IXgo.d.cts +0 -203
- package/dist/note-nodes-BNCANoGN.d.ts +0 -108
- package/dist/note-nodes-DL-Au22P.d.cts +0 -108
- package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
- package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
- package/dist/tree-op-types-CnRb7AYo.d.ts +0 -1589
- package/dist/tree-op-types-D1vNJ7XC.d.cts +0 -1589
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { D as DrawingProjection } from './tree-op-types-D1vNJ7XC.cjs';
|
|
2
|
-
import { c as OoxmlPackage } from './ooxml-package-CdEy9ufK.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The engine's trust-boundary caps: recursion depth, element counts, and the rest.
|
|
6
|
-
*
|
|
7
|
-
* A caller may LOWER any of these but never raise or disable one — an override of `Infinity`,
|
|
8
|
-
* zero, a negative or `NaN` clamps into `(0, ceiling]` rather than turning the limit off. These
|
|
9
|
-
* are security ceilings, not performance budgets.
|
|
10
|
-
*/
|
|
11
|
-
interface ResourceLimits {
|
|
12
|
-
/** Max nested-structure recursion (tables/shapes/SDT/groups). */
|
|
13
|
-
readonly maxRecursionDepth: number;
|
|
14
|
-
/** Max total parsed element count. */
|
|
15
|
-
readonly maxElementCount: number;
|
|
16
|
-
/** Max package part count. */
|
|
17
|
-
readonly maxPartCount: number;
|
|
18
|
-
/** Max total decompressed bytes (zip-bomb guard). */
|
|
19
|
-
readonly maxDecompressedBytes: number;
|
|
20
|
-
/** Max total compressed input bytes. */
|
|
21
|
-
readonly maxCompressedBytes: number;
|
|
22
|
-
/** Max decompressed:compressed ratio per entry. */
|
|
23
|
-
readonly maxCompressionRatio: number;
|
|
24
|
-
/** In-memory chunk budget for streaming/spooling. */
|
|
25
|
-
readonly maxChunkBytes: number;
|
|
26
|
-
/** Max pagination passes before non-convergence is declared. */
|
|
27
|
-
readonly maxPaginationPasses: number;
|
|
28
|
-
/** Max queued items in any bounded work queue. */
|
|
29
|
-
readonly maxQueueDepth: number;
|
|
30
|
-
}
|
|
31
|
-
/** Non-disableable hard ceilings: no resolved limit may exceed these. */
|
|
32
|
-
declare const HARD_CEILINGS: ResourceLimits;
|
|
33
|
-
/** Finite defaults, all <= their hard ceiling. */
|
|
34
|
-
declare const DEFAULT_LIMITS: ResourceLimits;
|
|
35
|
-
/**
|
|
36
|
-
* Resolve caller overrides into a frozen, always-finite limit set. Each value is
|
|
37
|
-
* `min(override>0 ? override : default, ceiling)`. Infinity/0/negative/NaN can
|
|
38
|
-
* never disable a limit — the hard ceiling always wins.
|
|
39
|
-
*/
|
|
40
|
-
declare function resolveLimits(overrides?: Partial<ResourceLimits>): ResourceLimits;
|
|
41
|
-
/** Bounded image decode limits (typed-drawings-and-images task 4). */
|
|
42
|
-
/** Trust-boundary caps specific to image decoding and embedding. */
|
|
43
|
-
interface ImageResourceLimits {
|
|
44
|
-
readonly maxEncodedBytes: number;
|
|
45
|
-
readonly maxDecodedBytes: number;
|
|
46
|
-
readonly maxPixels: number;
|
|
47
|
-
readonly maxDimension: number;
|
|
48
|
-
readonly maxPolygonPoints: number;
|
|
49
|
-
readonly maxExternalRedirects: number;
|
|
50
|
-
}
|
|
51
|
-
/** Image caps nothing can raise past. A caller's override clamps into these. */
|
|
52
|
-
declare const IMAGE_RESOURCE_HARD_CEILINGS: ImageResourceLimits;
|
|
53
|
-
/** The image caps in force when a host configures none. Conservative and finite. */
|
|
54
|
-
declare const DEFAULT_IMAGE_RESOURCE_LIMITS: ImageResourceLimits;
|
|
55
|
-
/** Resolve caller overrides into frozen image limits; hard ceilings cannot be raised. */
|
|
56
|
-
declare function resolveImageResourceLimits(overrides?: Partial<ImageResourceLimits>): ImageResourceLimits;
|
|
57
|
-
|
|
58
|
-
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
59
|
-
interface ValidatedImageBytesHandle {
|
|
60
|
-
readonly registryId: number;
|
|
61
|
-
readonly resourceKey: string;
|
|
62
|
-
readonly contentId: string;
|
|
63
|
-
readonly generation: number;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Raster media the decode port measures and any authoring path may write.
|
|
68
|
-
*
|
|
69
|
-
* BMP and WebP are here for the same reason the other three are: an `<img>` decodes them
|
|
70
|
-
* natively, so they need a signature and a structural header and nothing else. BMP is what
|
|
71
|
-
* older documents carry; WebP is what current Word writes.
|
|
72
|
-
*/
|
|
73
|
-
type SupportedImageMime = 'image/png' | 'image/jpeg' | 'image/gif' | 'image/bmp' | 'image/webp';
|
|
74
|
-
/**
|
|
75
|
-
* Vector media painted straight from validated bytes. An `<img>` renders SVG in the
|
|
76
|
-
* browser's secure static mode — no script, no external subresource loads — so there is
|
|
77
|
-
* no decode step and no raster buffer sized by a file-supplied number.
|
|
78
|
-
*/
|
|
79
|
-
type VectorImageMime = 'image/svg+xml';
|
|
80
|
-
/** Every mime the painter can hand to an `<img>`. */
|
|
81
|
-
type RenderableImageMime = SupportedImageMime | VectorImageMime;
|
|
82
|
-
/**
|
|
83
|
-
* Media kept in the package byte-for-byte that the painter cannot hand to an `<img>`.
|
|
84
|
-
* A decode port may rasterize it; without one it paints as a labelled placeholder.
|
|
85
|
-
*/
|
|
86
|
-
type PreservedImageMime = 'image/tiff' | 'image/x-emf' | 'image/x-wmf';
|
|
87
|
-
/**
|
|
88
|
-
* What is known about one embedded image: validated, refused, or still decoding.
|
|
89
|
-
*
|
|
90
|
-
* Content type is a CLAIM. Signature sniffing, structural header validation and the decode port
|
|
91
|
-
* are authoritative, and bytes that fail them never enter public state.
|
|
92
|
-
*/
|
|
93
|
-
type ImageResourceState = {
|
|
94
|
-
readonly kind: 'ready';
|
|
95
|
-
readonly partName: string;
|
|
96
|
-
readonly contentId: string;
|
|
97
|
-
readonly resourceKey: string;
|
|
98
|
-
readonly validatedHandle: ValidatedImageBytesHandle;
|
|
99
|
-
readonly mime: RenderableImageMime;
|
|
100
|
-
readonly pixelWidth: number;
|
|
101
|
-
readonly pixelHeight: number;
|
|
102
|
-
readonly dpiX: number;
|
|
103
|
-
readonly dpiY: number;
|
|
104
|
-
} | {
|
|
105
|
-
readonly kind: 'unrenderable';
|
|
106
|
-
readonly partName: string | null;
|
|
107
|
-
readonly mime: RenderableImageMime | PreservedImageMime | 'unknown';
|
|
108
|
-
readonly reason: 'unsupported-format' | 'non-picture-graphic' | 'signature-mismatch' | 'decode-failed' | 'resource-limit';
|
|
109
|
-
} | {
|
|
110
|
-
readonly kind: 'external';
|
|
111
|
-
readonly relationshipId: string;
|
|
112
|
-
readonly sinkSafe: boolean;
|
|
113
|
-
} | {
|
|
114
|
-
readonly kind: 'missing';
|
|
115
|
-
readonly relationshipId: string;
|
|
116
|
-
} | {
|
|
117
|
-
readonly kind: 'pending';
|
|
118
|
-
readonly resourceKey: string;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* The injected image decoder.
|
|
122
|
-
*
|
|
123
|
-
* A port rather than a direct `Image`/`createImageBitmap` call, so a worker or server runtime
|
|
124
|
-
* supplies its own and the engine never reaches for a browser global.
|
|
125
|
-
*/
|
|
126
|
-
interface ImageDecodePort {
|
|
127
|
-
decode(bytes: Uint8Array, mime: SupportedImageMime, limits: ImageResourceLimits): Promise<Readonly<{
|
|
128
|
-
pixelWidth: number;
|
|
129
|
-
pixelHeight: number;
|
|
130
|
-
dpiX: number;
|
|
131
|
-
dpiY: number;
|
|
132
|
-
}>>;
|
|
133
|
-
/**
|
|
134
|
-
* Optional conversion of media an `<img>` cannot render (EMF/WMF metafiles, TIFF) into a
|
|
135
|
-
* renderable raster. The returned bytes are untrusted and re-enter the full raster
|
|
136
|
-
* validation path (sniff, header, pixel caps, decode) before they can become a ready
|
|
137
|
-
* resource. A null return declines the format and keeps the labelled placeholder; so does
|
|
138
|
-
* a throw, as `decode-failed`.
|
|
139
|
-
*/
|
|
140
|
-
convertPreserved?(bytes: Uint8Array, mime: PreservedImageMime, limits: ImageResourceLimits): Promise<Readonly<{
|
|
141
|
-
bytes: Uint8Array;
|
|
142
|
-
mime: SupportedImageMime;
|
|
143
|
-
}> | null>;
|
|
144
|
-
}
|
|
145
|
-
/** Resolves a relationship id to a validated image resource, or reports why it could not. */
|
|
146
|
-
interface ImageResourceLookup {
|
|
147
|
-
readonly resolveEmbedded: (ownerPartName: string, relationshipId: string) => Promise<ImageResourceState>;
|
|
148
|
-
readonly resolveLinked: (ownerPartName: string, relationshipId: string) => ImageResourceState;
|
|
149
|
-
readonly resolveForProjection: (projection: DrawingProjection) => Promise<ImageResourceState>;
|
|
150
|
-
readonly liveReferenceCount: (partName: string) => number;
|
|
151
|
-
readonly dispose: () => void;
|
|
152
|
-
}
|
|
153
|
-
/** Maximum prefix inspected for SVG root detection (exported for bounded-scan tests). */
|
|
154
|
-
declare const MAX_SVG_SNIFF_BYTES = 512;
|
|
155
|
-
/** A raster header that passed structural validation: its real MIME type and pixel extent. */
|
|
156
|
-
interface ValidatedRasterHeader {
|
|
157
|
-
readonly pixelWidth: number;
|
|
158
|
-
readonly pixelHeight: number;
|
|
159
|
-
}
|
|
160
|
-
/** Bounded scan for an `<svg` document root (optional `<?xml` prolog only). */
|
|
161
|
-
declare function hasBoundedSvgRoot(bytes: Uint8Array): boolean;
|
|
162
|
-
/** Signature sniffing — authoritative over declared content type. */
|
|
163
|
-
declare function sniffImageMime(bytes: Uint8Array): RenderableImageMime | PreservedImageMime | 'unknown';
|
|
164
|
-
/** Structural PNG IHDR validation before decode. */
|
|
165
|
-
declare function validatePngHeader(bytes: Uint8Array): ValidatedRasterHeader | null;
|
|
166
|
-
/** Structural GIF logical screen descriptor validation before decode. */
|
|
167
|
-
declare function validateGifHeader(bytes: Uint8Array): ValidatedRasterHeader | null;
|
|
168
|
-
/** Bounded JPEG marker scan through the first supported SOF marker. */
|
|
169
|
-
declare function validateJpegHeader(bytes: Uint8Array): ValidatedRasterHeader | null;
|
|
170
|
-
/**
|
|
171
|
-
* Intrinsic size of an SVG, resolved the way a browser sizes one: absolute `width`/`height`
|
|
172
|
-
* first, then `viewBox` for the missing axis or ratio, then the CSS 300x150 default.
|
|
173
|
-
*
|
|
174
|
-
* This is metadata for insert and reset-to-natural-size only. Layout uses the authored
|
|
175
|
-
* `wp:extent` and the browser rasterizes into that box, so nothing here sizes an allocation
|
|
176
|
-
* and an out-of-range value is clamped rather than refused.
|
|
177
|
-
*/
|
|
178
|
-
declare function resolveSvgIntrinsicSize(bytes: Uint8Array, limits: ImageResourceLimits): ValidatedRasterHeader | null;
|
|
179
|
-
/**
|
|
180
|
-
* Validate a raster image's header structurally and report its real MIME type and extent.
|
|
181
|
-
*
|
|
182
|
-
* Content type is a CLAIM; this is what makes it a fact. A file declaring `image/png` over JPEG
|
|
183
|
-
* bytes is caught here rather than at decode.
|
|
184
|
-
*/
|
|
185
|
-
declare function validateRasterHeader(bytes: Uint8Array, mime: SupportedImageMime): ValidatedRasterHeader | null;
|
|
186
|
-
/** Package-wide live drawing references to a media part name. */
|
|
187
|
-
declare function liveDrawingReferenceCount(pkg: OoxmlPackage, partName: string): number;
|
|
188
|
-
/** How the image cache decodes, and what it will spend doing so. */
|
|
189
|
-
interface CreateImageResourceCacheOptions {
|
|
190
|
-
readonly limits?: Partial<ImageResourceLimits>;
|
|
191
|
-
readonly decodePort: ImageDecodePort;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Derived cache for one immutable package snapshot. Registry identity is
|
|
195
|
-
* `(package snapshot, decodePort object, normalized limits)` — the first caller
|
|
196
|
-
* never imposes its decoder or limits on later callers with different options.
|
|
197
|
-
*/
|
|
198
|
-
declare function imageResourceLookupFor(pkg: OoxmlPackage, options: CreateImageResourceCacheOptions): ImageResourceLookup;
|
|
199
|
-
/** @deprecated Prefer {@link imageResourceLookupFor} — registry binds cache to package identity. */
|
|
200
|
-
/** Build the per-document image cache. Validated bytes only; refusals are remembered too. */
|
|
201
|
-
declare function createImageResourceCache(initialPkg: OoxmlPackage, options: CreateImageResourceCacheOptions): ImageResourceLookup;
|
|
202
|
-
|
|
203
|
-
export { type CreateImageResourceCacheOptions as C, DEFAULT_IMAGE_RESOURCE_LIMITS as D, HARD_CEILINGS as H, type ImageResourceState as I, MAX_SVG_SNIFF_BYTES as M, type PreservedImageMime as P, type RenderableImageMime as R, type SupportedImageMime as S, type ValidatedImageBytesHandle as V, type VectorImageMime as a, type ImageDecodePort as b, type ImageResourceLimits as c, resolveSvgIntrinsicSize as d, type ResourceLimits as e, DEFAULT_LIMITS as f, IMAGE_RESOURCE_HARD_CEILINGS as g, type ImageResourceLookup as h, type ValidatedRasterHeader as i, createImageResourceCache as j, hasBoundedSvgRoot as k, imageResourceLookupFor as l, liveDrawingReferenceCount as m, resolveLimits as n, validateGifHeader as o, validateJpegHeader as p, validatePngHeader as q, resolveImageResourceLimits as r, sniffImageMime as s, validateRasterHeader as v };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { a as OoxmlNode, d as OoxmlParagraphNode, e as OoxmlNoteNode, f as OoxmlContinuationSeparatorNode, g as OoxmlEndnotesNode, h as OoxmlFootnotesNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, k as OoxmlSeparatorNode } from './ooxml-package-CdEy9ufK.js';
|
|
2
|
-
|
|
3
|
-
/** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
|
|
4
|
-
declare const NOTE_ATOM_CHAR = "\uFFFC";
|
|
5
|
-
/** Signed 32-bit Word-compatible note id range (positive allocation only). */
|
|
6
|
-
declare const NOTE_ID_MIN = 1;
|
|
7
|
-
/** Largest note id Word accepts — signed 32-bit. */
|
|
8
|
-
declare const NOTE_ID_MAX = 2147483647;
|
|
9
|
-
/** Reserved separator / continuation ids — never allocated for normal notes. */
|
|
10
|
-
declare const NOTE_SEPARATOR_ID = -1;
|
|
11
|
-
/** Reserved id of the continuation-separator entry. Never allocated to a real note. */
|
|
12
|
-
declare const NOTE_CONTINUATION_SEPARATOR_ID = 0;
|
|
13
|
-
/** Which notes part a note lives in. Decides both placement and numbering rules. */
|
|
14
|
-
type NoteKind = 'footnote' | 'endnote';
|
|
15
|
-
/** Authored `ST_FtnEdn` including explicit `normal`. Absent means Word default (normal). */
|
|
16
|
-
/**
|
|
17
|
-
* What a note entry IS.
|
|
18
|
-
*
|
|
19
|
-
* Only `normal` is a note a reader sees. The others are the furniture Word stores in the same
|
|
20
|
-
* part — the rules and notices drawn around the note area — reached by reserved ids.
|
|
21
|
-
*/
|
|
22
|
-
type NoteType = 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
|
|
23
|
-
/** Parse a signed decimal note id; reject non-integers and out-of-int32 values. */
|
|
24
|
-
declare function parseNoteId(raw: string | undefined): number | null;
|
|
25
|
-
/**
|
|
26
|
-
* Canonical `EditorScope { kind: 'note'; id }` encoding.
|
|
27
|
-
*
|
|
28
|
-
* Footnote id `1` and endnote id `1` coexist, so the kind is part of the string:
|
|
29
|
-
* `footnote:2` / `endnote:-1`. Do not invent a parallel scope union arm.
|
|
30
|
-
*/
|
|
31
|
-
declare function formatNoteScopeId(noteKind: NoteKind, noteId: number): string;
|
|
32
|
-
/**
|
|
33
|
-
* Parse {@link formatNoteScopeId}. Returns `null` for malformed / out-of-range ids.
|
|
34
|
-
*/
|
|
35
|
-
declare function parseNoteScopeId(id: string): {
|
|
36
|
-
readonly noteKind: NoteKind;
|
|
37
|
-
readonly noteId: number;
|
|
38
|
-
} | null;
|
|
39
|
-
/** Whether a node is a `w:footnotes` part root. */
|
|
40
|
-
declare function isFootnotesNode(node: OoxmlNode): node is OoxmlFootnotesNode;
|
|
41
|
-
/** Whether a node is a `w:endnotes` part root. */
|
|
42
|
-
declare function isEndnotesNode(node: OoxmlNode): node is OoxmlEndnotesNode;
|
|
43
|
-
/** Whether a node is a `w:footnote` or `w:endnote` body. */
|
|
44
|
-
declare function isNoteNode(node: OoxmlNode): node is OoxmlNoteNode;
|
|
45
|
-
/** Whether a node is a body-side `w:footnoteReference` / `w:endnoteReference`. */
|
|
46
|
-
declare function isNoteReferenceNode(node: OoxmlNode): node is OoxmlNoteReferenceNode;
|
|
47
|
-
/** Whether a node is the `w:footnoteRef` / `w:endnoteRef` mark inside a note's own body. */
|
|
48
|
-
declare function isNoteRefNode(node: OoxmlNode): node is OoxmlNoteRefNode;
|
|
49
|
-
/** Whether a node is the `w:separator` rule drawn above the note area. */
|
|
50
|
-
declare function isSeparatorNode(node: OoxmlNode): node is OoxmlSeparatorNode;
|
|
51
|
-
/** Whether a node is the `w:continuationSeparator` rule used on continuation pages. */
|
|
52
|
-
declare function isContinuationSeparatorNode(node: OoxmlNode): node is OoxmlContinuationSeparatorNode;
|
|
53
|
-
/** Typed or generic `w:footnote` / `w:endnote`. */
|
|
54
|
-
declare function noteKindOf(node: OoxmlNode): NoteKind | null;
|
|
55
|
-
/** Authored `@w:id` on a note or noteReference when parseable. */
|
|
56
|
-
declare function noteIdOf(node: OoxmlNode): number | null;
|
|
57
|
-
/** Authored `@w:type` (`ST_FtnEdn`) when present and schema-legal; else `undefined`. */
|
|
58
|
-
declare function noteTypeOf(node: OoxmlNode): NoteType | undefined;
|
|
59
|
-
/** Whether a note is a normal (body) note — absent type and explicit `normal` both count. */
|
|
60
|
-
declare function isNormalNote(node: OoxmlNode): boolean;
|
|
61
|
-
/** Typed or generic footnote/endnote reference kind. */
|
|
62
|
-
declare function noteReferenceKindOf(node: OoxmlNode): NoteKind | null;
|
|
63
|
-
/** Typed or generic `w:footnoteRef` / `w:endnoteRef`. */
|
|
64
|
-
declare function noteRefKindOf(node: OoxmlNode): NoteKind | null;
|
|
65
|
-
/**
|
|
66
|
-
* Read `@w:customMarkFollows` on a note reference.
|
|
67
|
-
* Returns `undefined` when absent; otherwise the OOXML on/off interpretation.
|
|
68
|
-
*/
|
|
69
|
-
declare function customMarkFollows(node: OoxmlNode): boolean | undefined;
|
|
70
|
-
/** Model text contributed by one atomic note unit. */
|
|
71
|
-
declare function noteAtomText(): typeof NOTE_ATOM_CHAR;
|
|
72
|
-
/**
|
|
73
|
-
* True when a run-inner node is a typed note atom that contributes one UTF-16 unit.
|
|
74
|
-
* Demoted/malformed known locals stay generic and contribute nothing.
|
|
75
|
-
*/
|
|
76
|
-
declare function isNoteAtomNode(node: OoxmlNode): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* One atomic note span inside a paragraph for caret / delete / selection.
|
|
79
|
-
*
|
|
80
|
-
* Each typed note atom is a single-node span (`removeNodeIds` = that node).
|
|
81
|
-
*/
|
|
82
|
-
interface AtomicNoteSpan {
|
|
83
|
-
readonly kind: 'noteReference' | 'noteRef' | 'separator' | 'continuationSeparator';
|
|
84
|
-
readonly node: OoxmlNode;
|
|
85
|
-
readonly runId: string;
|
|
86
|
-
readonly removeNodeIds: readonly string[];
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Collect typed note atoms in document order (one segment each).
|
|
90
|
-
*
|
|
91
|
-
* Walks the same paragraph-inline surface as `segmentsOf` / `walkParagraphInline`:
|
|
92
|
-
* hyperlinks and content controls flatten; only direct run children contribute atoms.
|
|
93
|
-
* A demoted run-inner SDT husk stays opaque — no phantom addressable hit.
|
|
94
|
-
*/
|
|
95
|
-
declare function atomicNoteSpansOf(paragraph: OoxmlParagraphNode): readonly AtomicNoteSpan[];
|
|
96
|
-
/** Cap on notes scanned when allocating / indexing a notes part. */
|
|
97
|
-
declare const MAX_NOTES_PER_PART = 10000;
|
|
98
|
-
/**
|
|
99
|
-
* Allocate the next positive signed 32-bit note id for a notes-part root.
|
|
100
|
-
* Seeds from `max(existing)+1`; never returns ≤0; `null` on exhaustion.
|
|
101
|
-
*/
|
|
102
|
-
declare function allocateNoteId(notesRoot: OoxmlNode): number | null;
|
|
103
|
-
/** Collect note bodies from a footnotes/endnotes root, bounded. */
|
|
104
|
-
declare function notesOf(root: OoxmlNode): readonly OoxmlNoteNode[];
|
|
105
|
-
/** Find a typed note by id inside a notes-part root. */
|
|
106
|
-
declare function findNoteById(root: OoxmlNode, noteId: number): OoxmlNoteNode | undefined;
|
|
107
|
-
|
|
108
|
-
export { type AtomicNoteSpan as A, notesOf as B, parseNoteId as C, parseNoteScopeId as D, MAX_NOTES_PER_PART as M, type NoteKind as N, NOTE_ATOM_CHAR as a, NOTE_CONTINUATION_SEPARATOR_ID as b, NOTE_ID_MAX as c, NOTE_ID_MIN as d, NOTE_SEPARATOR_ID as e, type NoteType as f, allocateNoteId as g, atomicNoteSpansOf as h, customMarkFollows as i, findNoteById as j, formatNoteScopeId as k, isContinuationSeparatorNode as l, isEndnotesNode as m, noteTypeOf as n, isFootnotesNode as o, isNormalNote as p, isNoteAtomNode as q, isNoteNode as r, isNoteRefNode as s, isNoteReferenceNode as t, isSeparatorNode as u, noteAtomText as v, noteIdOf as w, noteKindOf as x, noteRefKindOf as y, noteReferenceKindOf as z };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { a as OoxmlNode, d as OoxmlParagraphNode, e as OoxmlNoteNode, f as OoxmlContinuationSeparatorNode, g as OoxmlEndnotesNode, h as OoxmlFootnotesNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, k as OoxmlSeparatorNode } from './ooxml-package-CdEy9ufK.cjs';
|
|
2
|
-
|
|
3
|
-
/** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
|
|
4
|
-
declare const NOTE_ATOM_CHAR = "\uFFFC";
|
|
5
|
-
/** Signed 32-bit Word-compatible note id range (positive allocation only). */
|
|
6
|
-
declare const NOTE_ID_MIN = 1;
|
|
7
|
-
/** Largest note id Word accepts — signed 32-bit. */
|
|
8
|
-
declare const NOTE_ID_MAX = 2147483647;
|
|
9
|
-
/** Reserved separator / continuation ids — never allocated for normal notes. */
|
|
10
|
-
declare const NOTE_SEPARATOR_ID = -1;
|
|
11
|
-
/** Reserved id of the continuation-separator entry. Never allocated to a real note. */
|
|
12
|
-
declare const NOTE_CONTINUATION_SEPARATOR_ID = 0;
|
|
13
|
-
/** Which notes part a note lives in. Decides both placement and numbering rules. */
|
|
14
|
-
type NoteKind = 'footnote' | 'endnote';
|
|
15
|
-
/** Authored `ST_FtnEdn` including explicit `normal`. Absent means Word default (normal). */
|
|
16
|
-
/**
|
|
17
|
-
* What a note entry IS.
|
|
18
|
-
*
|
|
19
|
-
* Only `normal` is a note a reader sees. The others are the furniture Word stores in the same
|
|
20
|
-
* part — the rules and notices drawn around the note area — reached by reserved ids.
|
|
21
|
-
*/
|
|
22
|
-
type NoteType = 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
|
|
23
|
-
/** Parse a signed decimal note id; reject non-integers and out-of-int32 values. */
|
|
24
|
-
declare function parseNoteId(raw: string | undefined): number | null;
|
|
25
|
-
/**
|
|
26
|
-
* Canonical `EditorScope { kind: 'note'; id }` encoding.
|
|
27
|
-
*
|
|
28
|
-
* Footnote id `1` and endnote id `1` coexist, so the kind is part of the string:
|
|
29
|
-
* `footnote:2` / `endnote:-1`. Do not invent a parallel scope union arm.
|
|
30
|
-
*/
|
|
31
|
-
declare function formatNoteScopeId(noteKind: NoteKind, noteId: number): string;
|
|
32
|
-
/**
|
|
33
|
-
* Parse {@link formatNoteScopeId}. Returns `null` for malformed / out-of-range ids.
|
|
34
|
-
*/
|
|
35
|
-
declare function parseNoteScopeId(id: string): {
|
|
36
|
-
readonly noteKind: NoteKind;
|
|
37
|
-
readonly noteId: number;
|
|
38
|
-
} | null;
|
|
39
|
-
/** Whether a node is a `w:footnotes` part root. */
|
|
40
|
-
declare function isFootnotesNode(node: OoxmlNode): node is OoxmlFootnotesNode;
|
|
41
|
-
/** Whether a node is a `w:endnotes` part root. */
|
|
42
|
-
declare function isEndnotesNode(node: OoxmlNode): node is OoxmlEndnotesNode;
|
|
43
|
-
/** Whether a node is a `w:footnote` or `w:endnote` body. */
|
|
44
|
-
declare function isNoteNode(node: OoxmlNode): node is OoxmlNoteNode;
|
|
45
|
-
/** Whether a node is a body-side `w:footnoteReference` / `w:endnoteReference`. */
|
|
46
|
-
declare function isNoteReferenceNode(node: OoxmlNode): node is OoxmlNoteReferenceNode;
|
|
47
|
-
/** Whether a node is the `w:footnoteRef` / `w:endnoteRef` mark inside a note's own body. */
|
|
48
|
-
declare function isNoteRefNode(node: OoxmlNode): node is OoxmlNoteRefNode;
|
|
49
|
-
/** Whether a node is the `w:separator` rule drawn above the note area. */
|
|
50
|
-
declare function isSeparatorNode(node: OoxmlNode): node is OoxmlSeparatorNode;
|
|
51
|
-
/** Whether a node is the `w:continuationSeparator` rule used on continuation pages. */
|
|
52
|
-
declare function isContinuationSeparatorNode(node: OoxmlNode): node is OoxmlContinuationSeparatorNode;
|
|
53
|
-
/** Typed or generic `w:footnote` / `w:endnote`. */
|
|
54
|
-
declare function noteKindOf(node: OoxmlNode): NoteKind | null;
|
|
55
|
-
/** Authored `@w:id` on a note or noteReference when parseable. */
|
|
56
|
-
declare function noteIdOf(node: OoxmlNode): number | null;
|
|
57
|
-
/** Authored `@w:type` (`ST_FtnEdn`) when present and schema-legal; else `undefined`. */
|
|
58
|
-
declare function noteTypeOf(node: OoxmlNode): NoteType | undefined;
|
|
59
|
-
/** Whether a note is a normal (body) note — absent type and explicit `normal` both count. */
|
|
60
|
-
declare function isNormalNote(node: OoxmlNode): boolean;
|
|
61
|
-
/** Typed or generic footnote/endnote reference kind. */
|
|
62
|
-
declare function noteReferenceKindOf(node: OoxmlNode): NoteKind | null;
|
|
63
|
-
/** Typed or generic `w:footnoteRef` / `w:endnoteRef`. */
|
|
64
|
-
declare function noteRefKindOf(node: OoxmlNode): NoteKind | null;
|
|
65
|
-
/**
|
|
66
|
-
* Read `@w:customMarkFollows` on a note reference.
|
|
67
|
-
* Returns `undefined` when absent; otherwise the OOXML on/off interpretation.
|
|
68
|
-
*/
|
|
69
|
-
declare function customMarkFollows(node: OoxmlNode): boolean | undefined;
|
|
70
|
-
/** Model text contributed by one atomic note unit. */
|
|
71
|
-
declare function noteAtomText(): typeof NOTE_ATOM_CHAR;
|
|
72
|
-
/**
|
|
73
|
-
* True when a run-inner node is a typed note atom that contributes one UTF-16 unit.
|
|
74
|
-
* Demoted/malformed known locals stay generic and contribute nothing.
|
|
75
|
-
*/
|
|
76
|
-
declare function isNoteAtomNode(node: OoxmlNode): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* One atomic note span inside a paragraph for caret / delete / selection.
|
|
79
|
-
*
|
|
80
|
-
* Each typed note atom is a single-node span (`removeNodeIds` = that node).
|
|
81
|
-
*/
|
|
82
|
-
interface AtomicNoteSpan {
|
|
83
|
-
readonly kind: 'noteReference' | 'noteRef' | 'separator' | 'continuationSeparator';
|
|
84
|
-
readonly node: OoxmlNode;
|
|
85
|
-
readonly runId: string;
|
|
86
|
-
readonly removeNodeIds: readonly string[];
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Collect typed note atoms in document order (one segment each).
|
|
90
|
-
*
|
|
91
|
-
* Walks the same paragraph-inline surface as `segmentsOf` / `walkParagraphInline`:
|
|
92
|
-
* hyperlinks and content controls flatten; only direct run children contribute atoms.
|
|
93
|
-
* A demoted run-inner SDT husk stays opaque — no phantom addressable hit.
|
|
94
|
-
*/
|
|
95
|
-
declare function atomicNoteSpansOf(paragraph: OoxmlParagraphNode): readonly AtomicNoteSpan[];
|
|
96
|
-
/** Cap on notes scanned when allocating / indexing a notes part. */
|
|
97
|
-
declare const MAX_NOTES_PER_PART = 10000;
|
|
98
|
-
/**
|
|
99
|
-
* Allocate the next positive signed 32-bit note id for a notes-part root.
|
|
100
|
-
* Seeds from `max(existing)+1`; never returns ≤0; `null` on exhaustion.
|
|
101
|
-
*/
|
|
102
|
-
declare function allocateNoteId(notesRoot: OoxmlNode): number | null;
|
|
103
|
-
/** Collect note bodies from a footnotes/endnotes root, bounded. */
|
|
104
|
-
declare function notesOf(root: OoxmlNode): readonly OoxmlNoteNode[];
|
|
105
|
-
/** Find a typed note by id inside a notes-part root. */
|
|
106
|
-
declare function findNoteById(root: OoxmlNode, noteId: number): OoxmlNoteNode | undefined;
|
|
107
|
-
|
|
108
|
-
export { type AtomicNoteSpan as A, notesOf as B, parseNoteId as C, parseNoteScopeId as D, MAX_NOTES_PER_PART as M, type NoteKind as N, NOTE_ATOM_CHAR as a, NOTE_CONTINUATION_SEPARATOR_ID as b, NOTE_ID_MAX as c, NOTE_ID_MIN as d, NOTE_SEPARATOR_ID as e, type NoteType as f, allocateNoteId as g, atomicNoteSpansOf as h, customMarkFollows as i, findNoteById as j, formatNoteScopeId as k, isContinuationSeparatorNode as l, isEndnotesNode as m, noteTypeOf as n, isFootnotesNode as o, isNormalNote as p, isNoteAtomNode as q, isNoteNode as r, isNoteRefNode as s, isNoteReferenceNode as t, isSeparatorNode as u, noteAtomText as v, noteIdOf as w, noteKindOf as x, noteRefKindOf as y, noteReferenceKindOf as z };
|