rtf-codec 4.0.9 → 4.1.1

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 CHANGED
@@ -72,6 +72,8 @@ Everything here is implemented against Microsoft's own **Rich Text Format (RTF)
72
72
 
73
73
  The code-page tables in `src/codepage.ts` were **generated, not transcribed**: each is `bytes([b]).decode(codec)` over `0x80..0xFF` from Python's own codec library, verified byte-for-byte against it, because a hand-typed 128-entry table is exactly where one transposed character hides until a real document decodes wrong.
74
74
 
75
+ The five East Asian double-byte code-page tables in `src/codepage-dbcs.ts` (932 Shift-JIS, 936 GBK/GB2312, 949 UHC/Hangul, 950 Big5, 1361 Johab) were generated the same way, at larger scale: `scripts/generate-dbcs-tables.py` decodes every lead-byte/trail-byte pair through Python's own `cp932`/`cp936`/`cp949`/`cp950`/`cp1361` codecs (<https://docs.python.org/3/library/codecs.html#standard-encodings>) — the exact Windows code pages RTF's own `\ansicpgN`/`\cpgN` name by that number, not a nearby web-oriented substitute. That script's own header comment has the full citation, including which pages were cross-checked against a second, independent decoder (Node's ICU-backed `TextDecoder`, for the four of the five pages the WHATWG Encoding Standard also defines) and where the two genuinely diverge.
76
+
75
77
  ## Architecture
76
78
 
77
79
  Five stages, each its own module, each testable on its own:
@@ -84,7 +86,7 @@ Five stages, each its own module, each testable on its own:
84
86
  | Read | `src/read.ts` | The destination/group state machine that turns the token stream into a `ContentDocument`. |
85
87
  | Write | `src/write.ts` | The inverse: mints the header tables from what the document actually uses, then emits a body that references them by index. |
86
88
 
87
- Supporting modules: `src/codepage.ts` (byte-to-character tables and the `\ansicpgN`/`\fcharsetN`/`\cpgN` precedence), `src/base64.ts` (hex and base64 conversion for picture and object payloads), `src/units.ts` (twips, half-points, pixels), `src/list-id.ts` (the opaque `numId` grammar), `src/constructs.ts` (the fidelity-construct descriptor shapes and the DTTM bit field), `src/cell-format.ts` (the `<celldef>` border, shading, and merge production), `src/embedded-object.ts` (the `\object`/`\objdata` payload -- JSON in, real `[MS-CFB]` compound file out, via `archive-codec`; see [Embedded objects](#embedded-objects)), `src/diagnostics.ts` (the three-tier diagnostic policy).
89
+ Supporting modules: `src/codepage.ts` (byte-to-character tables and the `\ansicpgN`/`\fcharsetN`/`\cpgN` precedence, plus the lead-byte state machine the five DBCS pages in `src/codepage-dbcs.ts` need), `src/base64.ts` (hex and base64 conversion for picture and object payloads), `src/units.ts` (twips, half-points, pixels), `src/list-id.ts` (the opaque `numId` grammar), `src/constructs.ts` (the fidelity-construct descriptor shapes and the DTTM bit field), `src/cell-format.ts` (the `<celldef>` border, shading, and merge production), `src/embedded-object.ts` (the `\object`/`\objdata` payload -- JSON in, real `[MS-CFB]` compound file out, via `archive-codec`; see [Embedded objects](#embedded-objects)), `src/diagnostics.ts` (the three-tier diagnostic policy).
88
90
 
89
91
  ### The reader is the specification's own model, literally
90
92
 
@@ -111,7 +113,7 @@ On the way out, **every non-ASCII character leaves as `\uN`** with a one-charact
111
113
  | Groups, destinations, `{\*` ignorable destinations | Yes — per the spec's own reader conventions |
112
114
  | Control words, control symbols, `\'hh`, `\binN` | Yes |
113
115
  | `\uN` / `\ucN` with ANSI fallback skipping, `\upr`/`\ud` | Yes |
114
- | Code pages | `\ansi`/`\mac`/`\pc`/`\pca`, `\ansicpgN`, per-font `\cpgN`/`\fcharsetN`; the Windows, OEM and Macintosh single-byte pages, plus UTF-8 |
116
+ | Code pages | `\ansi`/`\mac`/`\pc`/`\pca`, `\ansicpgN`, per-font `\cpgN`/`\fcharsetN`; the Windows, OEM and Macintosh single-byte pages, the five East Asian DBCS pages (932 Shift-JIS, 936 GBK/GB2312, 949 UHC/Hangul, 950 Big5, 1361 Johab), plus UTF-8 |
115
117
  | `\fonttbl` | Face name, family keyword, per-font code page |
116
118
  | `\colortbl` | RGB, including a theme colour's own literal RGB; index 0 is the auto colour |
117
119
  | `\stylesheet` | Paragraph style names and heading levels (`\outlinelevelN` or a built-in `heading N` name) |
@@ -152,7 +154,6 @@ Each of these is reported through a diagnostic rather than dropped silently —
152
154
  | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
153
155
  | Headers, footers, footnotes, endnotes, annotations | `ContentDocument`'s flat form has no page-furniture or note position for them. A footnote's real home is `document-schema.js`'s tree-only `definitions` table, which a codec producing the flat form cannot reach. |
154
156
  | Content controls beyond RTF's own form-field vocabulary (richText, comboBox, date, picture, repeatingSection, button, index, group) | **RTF 1.9.1 specifies nothing for these.** It predates OOXML's `w:sdt`: its "Custom XML Tags" (`\xmlopen`/`\xmlclose`) are a bare namespace/name tag with no type, lock, alias or value, and `\*\datastore` is an opaque blob whose "format ... is unknown to RTF" by the spec's own words. `\*\formfield` (see the Scope table above) is the one real analogue RTF has, and covers plainText/checkbox/dropDown only. |
155
- | East Asian DBCS code pages (932, 936, 949, 950, 1361) | Each needs a ~20k-entry table and its own lead-byte state machine. A document declaring one decodes through cp1252 and says so. |
156
157
  | Code page 42 (`SYMBOL_CHARSET`) | Not an encoding: its bytes are glyph indices into whichever symbol font the run names, so there is no correct Unicode for them without that font's own cmap. |
157
158
  | Metafile and bitmap pictures (`\wmetafileN`, `\emfblip`, `\dibitmapN`, `\wbitmapN`, `\macpict`) | `ContentImageBlock` carries PNG and JPEG only. |
158
159
  | A picture with no stated size | `ContentImageBlock` requires a positive width and height, and deriving them from the payload would need an image decoder this package deliberately does not carry. |
package/dist/codec.d.cts CHANGED
@@ -2271,6 +2271,52 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2271
2271
  g: z.ZodNumber;
2272
2272
  b: z.ZodNumber;
2273
2273
  }, z.core.$strip>>;
2274
+ fillPattern: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2275
+ kind: z.ZodLiteral<"gradient">;
2276
+ style: z.ZodEnum<{
2277
+ linear: "linear";
2278
+ axial: "axial";
2279
+ radial: "radial";
2280
+ ellipsoid: "ellipsoid";
2281
+ square: "square";
2282
+ rectangular: "rectangular";
2283
+ }>;
2284
+ startColor: z.ZodObject<{
2285
+ r: z.ZodNumber;
2286
+ g: z.ZodNumber;
2287
+ b: z.ZodNumber;
2288
+ }, z.core.$strip>;
2289
+ endColor: z.ZodObject<{
2290
+ r: z.ZodNumber;
2291
+ g: z.ZodNumber;
2292
+ b: z.ZodNumber;
2293
+ }, z.core.$strip>;
2294
+ angleDeg: z.ZodOptional<z.ZodNumber>;
2295
+ }, z.core.$strip>, z.ZodObject<{
2296
+ kind: z.ZodLiteral<"hatch">;
2297
+ style: z.ZodEnum<{
2298
+ double: "double";
2299
+ single: "single";
2300
+ triple: "triple";
2301
+ }>;
2302
+ color: z.ZodObject<{
2303
+ r: z.ZodNumber;
2304
+ g: z.ZodNumber;
2305
+ b: z.ZodNumber;
2306
+ }, z.core.$strip>;
2307
+ distancePt: z.ZodNumber;
2308
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
2309
+ }, z.core.$strip>, z.ZodObject<{
2310
+ kind: z.ZodLiteral<"bitmap">;
2311
+ format: z.ZodEnum<{
2312
+ png: "png";
2313
+ jpeg: "jpeg";
2314
+ svg: "svg";
2315
+ gif: "gif";
2316
+ }>;
2317
+ base64: z.ZodString;
2318
+ }, z.core.$strip>], "kind">>;
2319
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
2274
2320
  stroke: z.ZodOptional<z.ZodObject<{
2275
2321
  color: z.ZodObject<{
2276
2322
  r: z.ZodNumber;
@@ -2284,6 +2330,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2284
2330
  dotted: "dotted";
2285
2331
  double: "double";
2286
2332
  }>>;
2333
+ opacity: z.ZodOptional<z.ZodNumber>;
2334
+ dashPattern: z.ZodOptional<z.ZodObject<{
2335
+ dots1: z.ZodNumber;
2336
+ dots1LengthPt: z.ZodNumber;
2337
+ dots2: z.ZodOptional<z.ZodNumber>;
2338
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2339
+ distancePt: z.ZodNumber;
2340
+ }, z.core.$strip>>;
2287
2341
  }, z.core.$strip>>;
2288
2342
  paintOrder: z.ZodOptional<z.ZodNumber>;
2289
2343
  sourcePath: z.ZodOptional<z.ZodString>;
@@ -2327,6 +2381,52 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2327
2381
  g: z.ZodNumber;
2328
2382
  b: z.ZodNumber;
2329
2383
  }, z.core.$strip>>;
2384
+ fillPattern: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2385
+ kind: z.ZodLiteral<"gradient">;
2386
+ style: z.ZodEnum<{
2387
+ linear: "linear";
2388
+ axial: "axial";
2389
+ radial: "radial";
2390
+ ellipsoid: "ellipsoid";
2391
+ square: "square";
2392
+ rectangular: "rectangular";
2393
+ }>;
2394
+ startColor: z.ZodObject<{
2395
+ r: z.ZodNumber;
2396
+ g: z.ZodNumber;
2397
+ b: z.ZodNumber;
2398
+ }, z.core.$strip>;
2399
+ endColor: z.ZodObject<{
2400
+ r: z.ZodNumber;
2401
+ g: z.ZodNumber;
2402
+ b: z.ZodNumber;
2403
+ }, z.core.$strip>;
2404
+ angleDeg: z.ZodOptional<z.ZodNumber>;
2405
+ }, z.core.$strip>, z.ZodObject<{
2406
+ kind: z.ZodLiteral<"hatch">;
2407
+ style: z.ZodEnum<{
2408
+ double: "double";
2409
+ single: "single";
2410
+ triple: "triple";
2411
+ }>;
2412
+ color: z.ZodObject<{
2413
+ r: z.ZodNumber;
2414
+ g: z.ZodNumber;
2415
+ b: z.ZodNumber;
2416
+ }, z.core.$strip>;
2417
+ distancePt: z.ZodNumber;
2418
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
2419
+ }, z.core.$strip>, z.ZodObject<{
2420
+ kind: z.ZodLiteral<"bitmap">;
2421
+ format: z.ZodEnum<{
2422
+ png: "png";
2423
+ jpeg: "jpeg";
2424
+ svg: "svg";
2425
+ gif: "gif";
2426
+ }>;
2427
+ base64: z.ZodString;
2428
+ }, z.core.$strip>], "kind">>;
2429
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
2330
2430
  stroke: z.ZodOptional<z.ZodObject<{
2331
2431
  color: z.ZodObject<{
2332
2432
  r: z.ZodNumber;
@@ -2340,6 +2440,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2340
2440
  dotted: "dotted";
2341
2441
  double: "double";
2342
2442
  }>>;
2443
+ opacity: z.ZodOptional<z.ZodNumber>;
2444
+ dashPattern: z.ZodOptional<z.ZodObject<{
2445
+ dots1: z.ZodNumber;
2446
+ dots1LengthPt: z.ZodNumber;
2447
+ dots2: z.ZodOptional<z.ZodNumber>;
2448
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2449
+ distancePt: z.ZodNumber;
2450
+ }, z.core.$strip>>;
2343
2451
  }, z.core.$strip>>;
2344
2452
  paintOrder: z.ZodOptional<z.ZodNumber>;
2345
2453
  sourcePath: z.ZodOptional<z.ZodString>;
@@ -2392,6 +2500,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2392
2500
  dotted: "dotted";
2393
2501
  double: "double";
2394
2502
  }>>;
2503
+ opacity: z.ZodOptional<z.ZodNumber>;
2504
+ dashPattern: z.ZodOptional<z.ZodObject<{
2505
+ dots1: z.ZodNumber;
2506
+ dots1LengthPt: z.ZodNumber;
2507
+ dots2: z.ZodOptional<z.ZodNumber>;
2508
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2509
+ distancePt: z.ZodNumber;
2510
+ }, z.core.$strip>>;
2395
2511
  }, z.core.$strip>;
2396
2512
  paintOrder: z.ZodOptional<z.ZodNumber>;
2397
2513
  sourcePath: z.ZodOptional<z.ZodString>;
@@ -2463,6 +2579,52 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2463
2579
  g: z.ZodNumber;
2464
2580
  b: z.ZodNumber;
2465
2581
  }, z.core.$strip>>;
2582
+ fillPattern: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2583
+ kind: z.ZodLiteral<"gradient">;
2584
+ style: z.ZodEnum<{
2585
+ linear: "linear";
2586
+ axial: "axial";
2587
+ radial: "radial";
2588
+ ellipsoid: "ellipsoid";
2589
+ square: "square";
2590
+ rectangular: "rectangular";
2591
+ }>;
2592
+ startColor: z.ZodObject<{
2593
+ r: z.ZodNumber;
2594
+ g: z.ZodNumber;
2595
+ b: z.ZodNumber;
2596
+ }, z.core.$strip>;
2597
+ endColor: z.ZodObject<{
2598
+ r: z.ZodNumber;
2599
+ g: z.ZodNumber;
2600
+ b: z.ZodNumber;
2601
+ }, z.core.$strip>;
2602
+ angleDeg: z.ZodOptional<z.ZodNumber>;
2603
+ }, z.core.$strip>, z.ZodObject<{
2604
+ kind: z.ZodLiteral<"hatch">;
2605
+ style: z.ZodEnum<{
2606
+ double: "double";
2607
+ single: "single";
2608
+ triple: "triple";
2609
+ }>;
2610
+ color: z.ZodObject<{
2611
+ r: z.ZodNumber;
2612
+ g: z.ZodNumber;
2613
+ b: z.ZodNumber;
2614
+ }, z.core.$strip>;
2615
+ distancePt: z.ZodNumber;
2616
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
2617
+ }, z.core.$strip>, z.ZodObject<{
2618
+ kind: z.ZodLiteral<"bitmap">;
2619
+ format: z.ZodEnum<{
2620
+ png: "png";
2621
+ jpeg: "jpeg";
2622
+ svg: "svg";
2623
+ gif: "gif";
2624
+ }>;
2625
+ base64: z.ZodString;
2626
+ }, z.core.$strip>], "kind">>;
2627
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
2466
2628
  fillRule: z.ZodOptional<z.ZodEnum<{
2467
2629
  nonzero: "nonzero";
2468
2630
  evenodd: "evenodd";
@@ -2480,6 +2642,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2480
2642
  dotted: "dotted";
2481
2643
  double: "double";
2482
2644
  }>>;
2645
+ opacity: z.ZodOptional<z.ZodNumber>;
2646
+ dashPattern: z.ZodOptional<z.ZodObject<{
2647
+ dots1: z.ZodNumber;
2648
+ dots1LengthPt: z.ZodNumber;
2649
+ dots2: z.ZodOptional<z.ZodNumber>;
2650
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2651
+ distancePt: z.ZodNumber;
2652
+ }, z.core.$strip>>;
2483
2653
  }, z.core.$strip>>;
2484
2654
  paintOrder: z.ZodOptional<z.ZodNumber>;
2485
2655
  sourcePath: z.ZodOptional<z.ZodString>;
package/dist/codec.d.ts CHANGED
@@ -2271,6 +2271,52 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2271
2271
  g: z.ZodNumber;
2272
2272
  b: z.ZodNumber;
2273
2273
  }, z.core.$strip>>;
2274
+ fillPattern: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2275
+ kind: z.ZodLiteral<"gradient">;
2276
+ style: z.ZodEnum<{
2277
+ linear: "linear";
2278
+ axial: "axial";
2279
+ radial: "radial";
2280
+ ellipsoid: "ellipsoid";
2281
+ square: "square";
2282
+ rectangular: "rectangular";
2283
+ }>;
2284
+ startColor: z.ZodObject<{
2285
+ r: z.ZodNumber;
2286
+ g: z.ZodNumber;
2287
+ b: z.ZodNumber;
2288
+ }, z.core.$strip>;
2289
+ endColor: z.ZodObject<{
2290
+ r: z.ZodNumber;
2291
+ g: z.ZodNumber;
2292
+ b: z.ZodNumber;
2293
+ }, z.core.$strip>;
2294
+ angleDeg: z.ZodOptional<z.ZodNumber>;
2295
+ }, z.core.$strip>, z.ZodObject<{
2296
+ kind: z.ZodLiteral<"hatch">;
2297
+ style: z.ZodEnum<{
2298
+ double: "double";
2299
+ single: "single";
2300
+ triple: "triple";
2301
+ }>;
2302
+ color: z.ZodObject<{
2303
+ r: z.ZodNumber;
2304
+ g: z.ZodNumber;
2305
+ b: z.ZodNumber;
2306
+ }, z.core.$strip>;
2307
+ distancePt: z.ZodNumber;
2308
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
2309
+ }, z.core.$strip>, z.ZodObject<{
2310
+ kind: z.ZodLiteral<"bitmap">;
2311
+ format: z.ZodEnum<{
2312
+ png: "png";
2313
+ jpeg: "jpeg";
2314
+ svg: "svg";
2315
+ gif: "gif";
2316
+ }>;
2317
+ base64: z.ZodString;
2318
+ }, z.core.$strip>], "kind">>;
2319
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
2274
2320
  stroke: z.ZodOptional<z.ZodObject<{
2275
2321
  color: z.ZodObject<{
2276
2322
  r: z.ZodNumber;
@@ -2284,6 +2330,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2284
2330
  dotted: "dotted";
2285
2331
  double: "double";
2286
2332
  }>>;
2333
+ opacity: z.ZodOptional<z.ZodNumber>;
2334
+ dashPattern: z.ZodOptional<z.ZodObject<{
2335
+ dots1: z.ZodNumber;
2336
+ dots1LengthPt: z.ZodNumber;
2337
+ dots2: z.ZodOptional<z.ZodNumber>;
2338
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2339
+ distancePt: z.ZodNumber;
2340
+ }, z.core.$strip>>;
2287
2341
  }, z.core.$strip>>;
2288
2342
  paintOrder: z.ZodOptional<z.ZodNumber>;
2289
2343
  sourcePath: z.ZodOptional<z.ZodString>;
@@ -2327,6 +2381,52 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2327
2381
  g: z.ZodNumber;
2328
2382
  b: z.ZodNumber;
2329
2383
  }, z.core.$strip>>;
2384
+ fillPattern: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2385
+ kind: z.ZodLiteral<"gradient">;
2386
+ style: z.ZodEnum<{
2387
+ linear: "linear";
2388
+ axial: "axial";
2389
+ radial: "radial";
2390
+ ellipsoid: "ellipsoid";
2391
+ square: "square";
2392
+ rectangular: "rectangular";
2393
+ }>;
2394
+ startColor: z.ZodObject<{
2395
+ r: z.ZodNumber;
2396
+ g: z.ZodNumber;
2397
+ b: z.ZodNumber;
2398
+ }, z.core.$strip>;
2399
+ endColor: z.ZodObject<{
2400
+ r: z.ZodNumber;
2401
+ g: z.ZodNumber;
2402
+ b: z.ZodNumber;
2403
+ }, z.core.$strip>;
2404
+ angleDeg: z.ZodOptional<z.ZodNumber>;
2405
+ }, z.core.$strip>, z.ZodObject<{
2406
+ kind: z.ZodLiteral<"hatch">;
2407
+ style: z.ZodEnum<{
2408
+ double: "double";
2409
+ single: "single";
2410
+ triple: "triple";
2411
+ }>;
2412
+ color: z.ZodObject<{
2413
+ r: z.ZodNumber;
2414
+ g: z.ZodNumber;
2415
+ b: z.ZodNumber;
2416
+ }, z.core.$strip>;
2417
+ distancePt: z.ZodNumber;
2418
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
2419
+ }, z.core.$strip>, z.ZodObject<{
2420
+ kind: z.ZodLiteral<"bitmap">;
2421
+ format: z.ZodEnum<{
2422
+ png: "png";
2423
+ jpeg: "jpeg";
2424
+ svg: "svg";
2425
+ gif: "gif";
2426
+ }>;
2427
+ base64: z.ZodString;
2428
+ }, z.core.$strip>], "kind">>;
2429
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
2330
2430
  stroke: z.ZodOptional<z.ZodObject<{
2331
2431
  color: z.ZodObject<{
2332
2432
  r: z.ZodNumber;
@@ -2340,6 +2440,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2340
2440
  dotted: "dotted";
2341
2441
  double: "double";
2342
2442
  }>>;
2443
+ opacity: z.ZodOptional<z.ZodNumber>;
2444
+ dashPattern: z.ZodOptional<z.ZodObject<{
2445
+ dots1: z.ZodNumber;
2446
+ dots1LengthPt: z.ZodNumber;
2447
+ dots2: z.ZodOptional<z.ZodNumber>;
2448
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2449
+ distancePt: z.ZodNumber;
2450
+ }, z.core.$strip>>;
2343
2451
  }, z.core.$strip>>;
2344
2452
  paintOrder: z.ZodOptional<z.ZodNumber>;
2345
2453
  sourcePath: z.ZodOptional<z.ZodString>;
@@ -2392,6 +2500,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2392
2500
  dotted: "dotted";
2393
2501
  double: "double";
2394
2502
  }>>;
2503
+ opacity: z.ZodOptional<z.ZodNumber>;
2504
+ dashPattern: z.ZodOptional<z.ZodObject<{
2505
+ dots1: z.ZodNumber;
2506
+ dots1LengthPt: z.ZodNumber;
2507
+ dots2: z.ZodOptional<z.ZodNumber>;
2508
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2509
+ distancePt: z.ZodNumber;
2510
+ }, z.core.$strip>>;
2395
2511
  }, z.core.$strip>;
2396
2512
  paintOrder: z.ZodOptional<z.ZodNumber>;
2397
2513
  sourcePath: z.ZodOptional<z.ZodString>;
@@ -2463,6 +2579,52 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2463
2579
  g: z.ZodNumber;
2464
2580
  b: z.ZodNumber;
2465
2581
  }, z.core.$strip>>;
2582
+ fillPattern: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2583
+ kind: z.ZodLiteral<"gradient">;
2584
+ style: z.ZodEnum<{
2585
+ linear: "linear";
2586
+ axial: "axial";
2587
+ radial: "radial";
2588
+ ellipsoid: "ellipsoid";
2589
+ square: "square";
2590
+ rectangular: "rectangular";
2591
+ }>;
2592
+ startColor: z.ZodObject<{
2593
+ r: z.ZodNumber;
2594
+ g: z.ZodNumber;
2595
+ b: z.ZodNumber;
2596
+ }, z.core.$strip>;
2597
+ endColor: z.ZodObject<{
2598
+ r: z.ZodNumber;
2599
+ g: z.ZodNumber;
2600
+ b: z.ZodNumber;
2601
+ }, z.core.$strip>;
2602
+ angleDeg: z.ZodOptional<z.ZodNumber>;
2603
+ }, z.core.$strip>, z.ZodObject<{
2604
+ kind: z.ZodLiteral<"hatch">;
2605
+ style: z.ZodEnum<{
2606
+ double: "double";
2607
+ single: "single";
2608
+ triple: "triple";
2609
+ }>;
2610
+ color: z.ZodObject<{
2611
+ r: z.ZodNumber;
2612
+ g: z.ZodNumber;
2613
+ b: z.ZodNumber;
2614
+ }, z.core.$strip>;
2615
+ distancePt: z.ZodNumber;
2616
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
2617
+ }, z.core.$strip>, z.ZodObject<{
2618
+ kind: z.ZodLiteral<"bitmap">;
2619
+ format: z.ZodEnum<{
2620
+ png: "png";
2621
+ jpeg: "jpeg";
2622
+ svg: "svg";
2623
+ gif: "gif";
2624
+ }>;
2625
+ base64: z.ZodString;
2626
+ }, z.core.$strip>], "kind">>;
2627
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
2466
2628
  fillRule: z.ZodOptional<z.ZodEnum<{
2467
2629
  nonzero: "nonzero";
2468
2630
  evenodd: "evenodd";
@@ -2480,6 +2642,14 @@ declare const rtfContentCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, U
2480
2642
  dotted: "dotted";
2481
2643
  double: "double";
2482
2644
  }>>;
2645
+ opacity: z.ZodOptional<z.ZodNumber>;
2646
+ dashPattern: z.ZodOptional<z.ZodObject<{
2647
+ dots1: z.ZodNumber;
2648
+ dots1LengthPt: z.ZodNumber;
2649
+ dots2: z.ZodOptional<z.ZodNumber>;
2650
+ dots2LengthPt: z.ZodOptional<z.ZodNumber>;
2651
+ distancePt: z.ZodNumber;
2652
+ }, z.core.$strip>>;
2483
2653
  }, z.core.$strip>>;
2484
2654
  paintOrder: z.ZodOptional<z.ZodNumber>;
2485
2655
  sourcePath: z.ZodOptional<z.ZodString>;