@docx-editor.dev/core 2.13.0 → 2.14.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.
Files changed (101) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +3 -3
  3. package/dist/automation.d.ts +3 -3
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +4 -4
  7. package/dist/binding.d.ts +4 -4
  8. package/dist/binding.js +1 -1
  9. package/dist/{chunk-PFSJVAWJ.cjs → chunk-2PIHW2QM.cjs} +1 -1
  10. package/dist/chunk-2QTY5S6T.js +1 -0
  11. package/dist/chunk-4Z5MODAE.cjs +2 -0
  12. package/dist/{chunk-WANKXD34.cjs → chunk-5TKAPFZT.cjs} +1 -1
  13. package/dist/chunk-DRQHIQ4R.cjs +1 -0
  14. package/dist/chunk-F2K6SDHA.cjs +20 -0
  15. package/dist/chunk-FBA57EUJ.js +2 -0
  16. package/dist/{chunk-67S7OHE6.cjs → chunk-KIAP7PFQ.cjs} +1 -1
  17. package/dist/chunk-KTAQ7BRQ.js +20 -0
  18. package/dist/chunk-LBAHXZCU.cjs +5 -0
  19. package/dist/chunk-MCDUQYWP.js +5 -0
  20. package/dist/chunk-MQP26KCF.js +1 -0
  21. package/dist/chunk-NDJGSR6M.cjs +19 -0
  22. package/dist/chunk-NJNFJPGB.cjs +11 -0
  23. package/dist/chunk-O5M4CR4P.cjs +2 -0
  24. package/dist/{chunk-HWWHGREA.js → chunk-OKEDGR65.js} +1 -1
  25. package/dist/chunk-UKUOZXUD.js +19 -0
  26. package/dist/chunk-VQ4R5LTU.js +2 -0
  27. package/dist/chunk-ZBEJHJN2.js +11 -0
  28. package/dist/{chunk-PRIBU3UH.js → chunk-ZVTW7RGD.js} +1 -1
  29. package/dist/collaboration/replication.cjs +1 -1
  30. package/dist/collaboration/replication.d.cts +1 -1
  31. package/dist/collaboration/replication.d.ts +1 -1
  32. package/dist/collaboration/replication.js +1 -1
  33. package/dist/collaboration.d.cts +1 -1
  34. package/dist/collaboration.d.ts +1 -1
  35. package/dist/contracts/editor.d.cts +4 -4
  36. package/dist/contracts/editor.d.ts +4 -4
  37. package/dist/contracts/interaction.d.cts +4 -4
  38. package/dist/contracts/interaction.d.ts +4 -4
  39. package/dist/contracts/modules.d.cts +2 -2
  40. package/dist/contracts/modules.d.ts +2 -2
  41. package/dist/{editor-DLrTueVe.d.cts → editor-AJ06hyyg.d.cts} +26 -2
  42. package/dist/{editor-KiB6JNvk.d.ts → editor-a6VvsfYU.d.ts} +26 -2
  43. package/dist/editor.cjs +1 -1
  44. package/dist/editor.css +1 -1
  45. package/dist/editor.d.cts +15 -15
  46. package/dist/editor.d.ts +15 -15
  47. package/dist/editor.js +1 -1
  48. package/dist/{index-D4Pxdo_p.d.ts → index-C5ZnSRkF.d.ts} +49 -15
  49. package/dist/{index-D_PA2Xv6.d.cts → index-Cbw4lkOt.d.cts} +49 -15
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.cts +9 -9
  52. package/dist/index.d.ts +9 -9
  53. package/dist/index.js +1 -1
  54. package/dist/layout.cjs +1 -1
  55. package/dist/layout.d.cts +36 -86
  56. package/dist/layout.d.ts +36 -86
  57. package/dist/layout.js +1 -1
  58. package/dist/output.cjs +1 -1
  59. package/dist/output.d.cts +4 -4
  60. package/dist/output.d.ts +4 -4
  61. package/dist/output.js +1 -1
  62. package/dist/{protocol-DjgYKCAy.d.ts → protocol-BsmQgblT.d.ts} +1 -1
  63. package/dist/{protocol-C8L58j66.d.cts → protocol-gOY5GA8K.d.cts} +1 -1
  64. package/dist/{review-reads-DcGYCH0w.d.ts → review-reads-BjZYeMd4.d.ts} +6 -19
  65. package/dist/{review-reads-BrTDmoYH.d.cts → review-reads-DEsV0OOW.d.cts} +6 -19
  66. package/dist/{revision-projection-BmLtLPxH.d.ts → revision-projection-BeXVrSSV.d.ts} +23 -2
  67. package/dist/{revision-projection-Dknlar93.d.cts → revision-projection-DXbrfNGD.d.cts} +23 -2
  68. package/dist/{semantic-cell-selection-BZ50i-Fu.d.ts → semantic-cell-selection-BK91NCCG.d.ts} +15 -6
  69. package/dist/{semantic-cell-selection-COnfaOZO.d.cts → semantic-cell-selection-BMhku3B1.d.cts} +15 -6
  70. package/dist/{semantic-interaction-BDJ4TBjm.d.ts → semantic-interaction-BmQ7h2cq.d.ts} +1 -1
  71. package/dist/{semantic-interaction-Bq3ixB0I.d.cts → semantic-interaction-DUAnxbgf.d.cts} +1 -1
  72. package/dist/{semantic-paint-C5SMTO8Y.d.cts → semantic-paint-DufNL1Zr.d.cts} +1 -1
  73. package/dist/{semantic-paint-DuhhY5-R.d.ts → semantic-paint-WJD2KeG1.d.ts} +1 -1
  74. package/dist/{semantic-records-BI1jpft7.d.ts → semantic-records-92UnKeU_.d.ts} +546 -5
  75. package/dist/{semantic-records-Btw3Ao4v.d.cts → semantic-records-BpozY7-j.d.cts} +546 -5
  76. package/dist/shaped-measurer-BWbindlI.d.ts +168 -0
  77. package/dist/shaped-measurer-CFPnXFs9.d.cts +168 -0
  78. package/dist/store.cjs +1 -1
  79. package/dist/store.d.cts +14 -7
  80. package/dist/store.d.ts +14 -7
  81. package/dist/store.js +1 -1
  82. package/dist/{tree-package-fragment-B1supBtE.d.ts → tree-package-fragment-CWFjgH6a.d.ts} +1 -9
  83. package/dist/{tree-package-fragment-ByN5yzll.d.cts → tree-package-fragment-Dhyw7oPm.d.cts} +1 -9
  84. package/dist/{tree-session-contract-BasiwZgZ.d.ts → tree-session-contract-B2HfGt79.d.ts} +6 -2
  85. package/dist/{tree-session-contract-DbeBenMR.d.cts → tree-session-contract-BY9xd7s_.d.cts} +6 -2
  86. package/package.json +2 -2
  87. package/dist/chunk-3AT4RUQ3.cjs +0 -19
  88. package/dist/chunk-4NAQLFXA.cjs +0 -2
  89. package/dist/chunk-BHAUFJO6.js +0 -20
  90. package/dist/chunk-F7U4OLMS.cjs +0 -2
  91. package/dist/chunk-FNMXRLGW.cjs +0 -5
  92. package/dist/chunk-I36WS6XX.cjs +0 -20
  93. package/dist/chunk-IOTL2GGW.js +0 -1
  94. package/dist/chunk-OF2QZCTN.js +0 -19
  95. package/dist/chunk-RO3HFCML.js +0 -5
  96. package/dist/chunk-SFOUCTKA.js +0 -2
  97. package/dist/chunk-VBEKERLJ.js +0 -2
  98. package/dist/chunk-XETEMUIP.cjs +0 -11
  99. package/dist/chunk-YMW34EBA.js +0 -11
  100. package/dist/shaped-measurer-CqdYa0fa.d.cts +0 -619
  101. package/dist/shaped-measurer-qnBJziPx.d.ts +0 -619
@@ -1,5 +1,5 @@
1
1
  import { a as OoxmlNode, s as OoxmlProperty, g as OoxmlElement, O as OoxmlPart, x as ImageResourceState, U as DrawingAccessibility, S as SourceCrop, W as DrawingTransform, X as VectorShapeProjection, z as DrawingHorizontalReferenceFrame, A as DrawingVerticalReferenceFrame, u as ImageWrapTarget, Y as DrawingProjection, Z as OoxmlDrawingNode, _ as TableBorderStyle } from './tree-op-types-BUulYD5y.cjs';
2
- import { a as RevisionAttribution } from './revision-projection-Dknlar93.cjs';
2
+ import { b as RevisionAttribution } from './revision-projection-DXbrfNGD.cjs';
3
3
  import { O as OmmlEquationProjection } from './omml-equation-DB8d-jCq.cjs';
4
4
 
5
5
  /**
@@ -339,6 +339,473 @@ declare function tabAdvanceWidth(alignment: TabAlignment, currentX: number, dest
339
339
  */
340
340
  declare function tabStopsFingerprint(tabs: ResolvedTabStops): string;
341
341
 
342
+ /**
343
+ * UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
344
+ * within.
345
+ *
346
+ * The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
347
+ * reordering needs, and collapsing it early loses nested isolates.
348
+ */
349
+ interface BidiEmbeddingLevels {
350
+ readonly levels: Uint8Array;
351
+ readonly paragraphs: readonly {
352
+ readonly start: number;
353
+ readonly end: number;
354
+ readonly level: number;
355
+ }[];
356
+ }
357
+
358
+ /**
359
+ * A face, as something asks for it: family plus the two axes this engine admits.
360
+ *
361
+ * Only static weights and slants. Variable-font axes are deliberately outside this vocabulary —
362
+ * the shaper refuses variation axes, and a variable file admitted here would render bold at
363
+ * regular weight.
364
+ */
365
+ interface FontRequest {
366
+ readonly family: string;
367
+ readonly weight: number;
368
+ readonly style: 'normal' | 'italic';
369
+ }
370
+ /**
371
+ * A request that was answered by a DIFFERENT face than the one asked for.
372
+ *
373
+ * Recorded rather than silently applied, because a substitution changes measurement: it is part
374
+ * of the shaping fingerprint, so a cached run shaped against a substitute is never reused for the
375
+ * real face.
376
+ */
377
+ interface FontSubstitution {
378
+ readonly requested: FontRequest;
379
+ readonly resolved: FontRequest;
380
+ readonly lineMetrics?: {
381
+ readonly heightEm: number;
382
+ readonly baselineEm: number;
383
+ };
384
+ }
385
+ declare const RESOLVED_FONT_BRAND: unique symbol;
386
+ /**
387
+ * A face that passed admission: the bytes are present, within limits, hash-verified, and parse as
388
+ * a font.
389
+ *
390
+ * Branded, so a `ResolvedFont` cannot be constructed by an object literal. Holding one is proof
391
+ * the checks ran — which is what lets shaping skip re-validating on every call.
392
+ */
393
+ interface ResolvedFont {
394
+ readonly [RESOLVED_FONT_BRAND]: true;
395
+ readonly id: string;
396
+ readonly identity: string;
397
+ readonly request: FontRequest;
398
+ readonly family: string;
399
+ /** Owned byte length, available without creating a defensive byte copy. */
400
+ readonly byteLength: number;
401
+ readonly bytes: Uint8Array;
402
+ readonly hash: string;
403
+ readonly faceIndex: number;
404
+ readonly substitution: FontSubstitution | null;
405
+ }
406
+ /**
407
+ * Largest single face this engine will ever admit, whatever a caller configures.
408
+ *
409
+ * A CEILING, not a default: a host may set a smaller `maxFontBytes`, but nothing can raise it
410
+ * past this. Font bytes come from files, and an unbounded face is a memory-exhaustion vector.
411
+ */
412
+ declare const HARD_MAX_FONT_BYTES: number;
413
+ /** Most faces one snapshot may hold, whatever a caller configures. */
414
+ declare const HARD_MAX_FONT_SOURCES = 256;
415
+ /** Most bytes all admitted faces may total, whatever a caller configures. */
416
+ declare const HARD_MAX_AGGREGATE_FONT_BYTES: number;
417
+ /**
418
+ * Why a face was not admitted.
419
+ *
420
+ * `forbidden` and `hashMismatch` are adversarial signals rather than ordinary failures: the first
421
+ * is a face the host declared off-limits, the second is bytes that are not what their source
422
+ * claimed.
423
+ */
424
+ type FontResolutionErrorCode = 'missing' | 'forbidden' | 'overLimit' | 'malformed' | 'hashMismatch';
425
+ /**
426
+ * A face that could not be admitted, carrying whatever evidence the refusal produced.
427
+ *
428
+ * RETURNED rather than thrown by `FontResourceSnapshot.resolve`, because a missing face is an
429
+ * ordinary condition — layout falls back and carries on. It extends `Error` so a caller that
430
+ * would rather throw can.
431
+ */
432
+ declare class FontResolutionError extends Error {
433
+ readonly name = "FontResolutionError";
434
+ readonly request: FontRequest;
435
+ readonly code: FontResolutionErrorCode;
436
+ readonly limit?: number;
437
+ readonly actual?: number;
438
+ readonly diagnostic?: string;
439
+ readonly expectedHash?: string;
440
+ readonly actualHash?: string;
441
+ constructor(code: FontResolutionErrorCode, request: FontRequest, details?: {
442
+ readonly limit?: number;
443
+ readonly actual?: number;
444
+ readonly diagnostic?: string;
445
+ readonly expectedHash?: string;
446
+ readonly actualHash?: string;
447
+ });
448
+ }
449
+ /**
450
+ * One face offered to a snapshot, before admission.
451
+ *
452
+ * `hash` is checked against the bytes, so a source cannot claim a face it did not supply. Setting
453
+ * `availability` to `forbidden` declares a face that exists but must not be used, which resolves
454
+ * as a typed refusal rather than as "missing".
455
+ */
456
+ interface FontResourceDefinition {
457
+ readonly request: FontRequest;
458
+ readonly id: string;
459
+ readonly bytes: Uint8Array;
460
+ readonly hash: string;
461
+ readonly faceIndex: number;
462
+ readonly availability?: 'available' | 'forbidden';
463
+ }
464
+ /**
465
+ * A host-declared redirect: requests for `from` resolve to `to`.
466
+ *
467
+ * How a metric-compatible substitute is wired in — a document naming Calibri resolves to Carlito
468
+ * without the document being rewritten.
469
+ */
470
+ interface DeclaredFontSubstitution {
471
+ readonly from: FontRequest;
472
+ readonly to: FontRequest;
473
+ readonly lineMetrics?: {
474
+ readonly heightEm: number;
475
+ readonly baselineEm: number;
476
+ };
477
+ }
478
+ /** Whether bytes parse as a usable font, with a diagnostic when they do not. */
479
+ type FontValidationResult = {
480
+ readonly valid: true;
481
+ } | {
482
+ readonly valid: false;
483
+ readonly diagnostic: string;
484
+ };
485
+ /**
486
+ * The injected check that bytes really are a font.
487
+ *
488
+ * Injected because it is the shaper that knows — HarfBuzz can open a face and read its tables,
489
+ * and this layer must not duplicate that judgement. Every byte reaching it is file input.
490
+ */
491
+ type FontByteValidator = (bytes: Uint8Array, faceIndex: number) => FontValidationResult;
492
+ /**
493
+ * An immutable set of admitted faces, and the only way to reach one.
494
+ *
495
+ * `epoch` identifies the snapshot: fonts change by REPLACING it, never by mutation, so a layout
496
+ * pass holds one snapshot for its whole run and cannot observe a face appearing or vanishing
497
+ * midway.
498
+ */
499
+ interface FontResourceSnapshot {
500
+ readonly epoch: number;
501
+ /** The admitted face, or a typed refusal. Never throws. */
502
+ resolve(request: FontRequest): ResolvedFont | FontResolutionError;
503
+ }
504
+ /**
505
+ * How a snapshot is built: which faces, under what limits, validated how.
506
+ *
507
+ * `maxFontBytes` is clamped to {@link HARD_MAX_FONT_BYTES} — a caller may tighten the budget but
508
+ * never widen it past the engine's own ceiling.
509
+ */
510
+ interface FontResourceSnapshotOptions {
511
+ readonly epoch: number;
512
+ readonly maxFontBytes: number;
513
+ readonly resources: readonly FontResourceDefinition[];
514
+ readonly substitutions?: readonly DeclaredFontSubstitution[];
515
+ readonly validateFont: FontByteValidator;
516
+ readonly instrumentation?: FontResourceInstrumentation;
517
+ }
518
+ /**
519
+ * Optional counters for the operations font admission is expected to do RARELY.
520
+ *
521
+ * Exists so tests can assert the absence of work: hashing and byte-copying a 64 MB face on every
522
+ * resolve would not be visible in output, only in a stalled document, so the checks assert these
523
+ * fire once rather than per call.
524
+ */
525
+ interface FontResourceInstrumentation {
526
+ readonly onOwnedByteCopy?: () => void;
527
+ readonly onHash?: () => void;
528
+ readonly onTableScan?: () => void;
529
+ readonly onAdmission?: () => void;
530
+ }
531
+ /**
532
+ * The canonical string identifying one face request.
533
+ *
534
+ * Case- and whitespace-normalized, so `"Times New Roman"` and `"times new roman"` are one key —
535
+ * a document may name a family either way and both must reach the same face.
536
+ */
537
+ declare const fontRequestKey: (request: FontRequest) => string;
538
+ /** Bounded minimum sfnt/TTC check; Task 4 supplies full parser-backed validation. */
539
+ declare const boundedStructuralFontValidator: FontByteValidator;
540
+ /**
541
+ * Admit a set of faces and return the immutable snapshot layout resolves against.
542
+ *
543
+ * Admission is the trust boundary for font bytes: counts and sizes are checked against the hard
544
+ * ceilings, each face's hash is re-derived and compared, and the bytes are handed to the injected
545
+ * validator. A face failing any of these is recorded as a typed refusal rather than dropped, so
546
+ * `resolve` can explain itself instead of answering "missing".
547
+ */
548
+ declare const createFontResourceSnapshot: (options: FontResourceSnapshotOptions) => FontResourceSnapshot;
549
+
550
+ declare const FIXED_POINT: unique symbol;
551
+ /** Fixed-point coordinates are safe integers in units declared by ShapingEnvironment.fixedPointScale. */
552
+ type FixedPoint = number & {
553
+ readonly [FIXED_POINT]: true;
554
+ };
555
+ /**
556
+ * Brand a safe integer as a {@link FixedPoint} coordinate.
557
+ *
558
+ * Fixed point rather than float throughout shaping so that two runs shaped identically compare
559
+ * EQUAL — float accumulation would make the same text measure differently depending on how it was
560
+ * split, and pagination is decided on those measurements.
561
+ *
562
+ * @throws RangeError when the value is not a safe integer.
563
+ */
564
+ declare const fixedPoint: (value: number) => FixedPoint;
565
+ /** Which way a run reads. The parity projection of its bidi embedding level. */
566
+ type TextDirection = 'ltr' | 'rtl';
567
+ /** How fixed-point conversion breaks ties. Part of the shaping fingerprint. */
568
+ type FixedPointRoundingMode = 'halfAwayFromZero' | 'halfToEven' | 'towardZero';
569
+ /** Which Unicode normalization is applied before shaping, if any. */
570
+ type NormalizationPolicy = 'none' | 'NFC' | 'NFD' | 'NFKC' | 'NFKD';
571
+ /**
572
+ * The shaping library and its exact version.
573
+ *
574
+ * Versioned because a library upgrade can change glyph positioning, and a cached measurement
575
+ * taken under the old one must not be reused under the new one.
576
+ */
577
+ interface VersionedShapingLibrary {
578
+ readonly name: string;
579
+ readonly version: string;
580
+ }
581
+ /**
582
+ * Everything that determines how text shapes — the complete input to a
583
+ * {@link ShapingEnvironment}.
584
+ *
585
+ * Exhaustive on purpose. Any field that could change a glyph's position belongs here, because the
586
+ * environment's fingerprint is what decides whether a cached shaped run may be reused.
587
+ */
588
+ interface ShapingEnvironmentInput {
589
+ readonly font: ResolvedFont;
590
+ readonly variationAxes: Readonly<Record<string, number>>;
591
+ readonly shapingLibrary: VersionedShapingLibrary;
592
+ readonly unicodeDataVersion: string;
593
+ readonly normalization: NormalizationPolicy;
594
+ readonly script: string;
595
+ readonly language: string;
596
+ readonly direction: TextDirection;
597
+ readonly features: Readonly<Record<string, number>>;
598
+ readonly fallbackOrder: readonly ResolvedFont[];
599
+ readonly fixedPointScale: number;
600
+ readonly roundingMode: FixedPointRoundingMode;
601
+ }
602
+ /**
603
+ * A validated {@link ShapingEnvironmentInput} — build one with `createShapingEnvironment`.
604
+ *
605
+ * Structurally identical to its input, but the nominal distinction is the point: holding one
606
+ * means the tags, axes and fonts inside it have already been checked.
607
+ */
608
+ interface ShapingEnvironment extends ShapingEnvironmentInput {
609
+ }
610
+ /** One shaping call: the text, its size, its bidi level, and the environment to shape it in. */
611
+ interface ShapeInput {
612
+ readonly text: string;
613
+ readonly fontSizeHalfPoints: number;
614
+ /** Exact UAX #9 embedding/isolate level; direction is its parity projection. */
615
+ readonly bidiLevel: number;
616
+ readonly environment: ShapingEnvironment;
617
+ }
618
+ /**
619
+ * One positioned glyph.
620
+ *
621
+ * `id` is a glyph index in its FACE, not a character — a ligature is one glyph spanning several
622
+ * characters, and a single character may produce several glyphs. Use `cluster` to get back to
623
+ * text.
624
+ */
625
+ interface ShapedGlyph {
626
+ readonly id: number;
627
+ /** UTF-16 text offset identifying the cluster that produced this glyph. */
628
+ readonly cluster: number;
629
+ /** Pen origin before this glyph's shaping offsets, in fixed-point run coordinates. */
630
+ readonly originX: FixedPoint;
631
+ readonly originY: FixedPoint;
632
+ readonly advanceX: FixedPoint;
633
+ readonly advanceY: FixedPoint;
634
+ readonly offsetX: FixedPoint;
635
+ readonly offsetY: FixedPoint;
636
+ /** Exact monochrome outline returned by the admitted HarfBuzz face. */
637
+ readonly outline: GlyphOutline;
638
+ }
639
+ /** A glyph's outline as SVG path data, in font design units. */
640
+ interface GlyphOutline {
641
+ readonly path: string;
642
+ /** Design units per em — divide by this to scale the path to a point size. */
643
+ readonly unitsPerEm: number;
644
+ }
645
+ /**
646
+ * One cluster: the smallest indivisible text-to-glyph correspondence.
647
+ *
648
+ * The unit the CARET moves by. A cluster may be several characters (a ligature) or several glyphs
649
+ * (a decomposed mark), so neither a character index nor a glyph index is a valid caret position —
650
+ * `caretEdges` is, and it includes both endpoints.
651
+ */
652
+ interface ShapedCluster {
653
+ /** Half-open logical UTF-16 range in ShapedRun.text. */
654
+ readonly textStart: number;
655
+ readonly textEnd: number;
656
+ /** Half-open visual glyph range in ShapedRun.glyphs. */
657
+ readonly glyphStart: number;
658
+ readonly glyphEnd: number;
659
+ readonly advance: FixedPoint;
660
+ /** Fixed-point edges from this cluster's visual origin, including both endpoints. */
661
+ readonly caretEdges: readonly FixedPoint[];
662
+ /** Index into ShapedRun.fontSpans, preserving the exact fallback choice. */
663
+ readonly fontSpan: number;
664
+ }
665
+ /** A run's vertical metrics, from the face that shaped it. Drives line height and baseline. */
666
+ interface ShapedVerticalMetrics {
667
+ readonly ascent: FixedPoint;
668
+ readonly descent: FixedPoint;
669
+ readonly lineGap: FixedPoint;
670
+ }
671
+ /**
672
+ * A stretch of glyphs that came from ONE face.
673
+ *
674
+ * A run whose text needed fallback has several of these. Recording the exact face per span is
675
+ * what lets a re-shape reproduce the same result rather than re-running fallback selection and
676
+ * possibly choosing differently.
677
+ */
678
+ interface ShapedFontSpan {
679
+ readonly glyphStart: number;
680
+ readonly glyphEnd: number;
681
+ readonly font: ResolvedFont;
682
+ /** null denotes the primary font; otherwise this is the environment fallback-order index. */
683
+ readonly fallbackIndex: number | null;
684
+ }
685
+ /**
686
+ * One shaped run: text turned into positioned glyphs, with everything needed to measure it, paint
687
+ * it, and put a caret in it.
688
+ *
689
+ * The engine's measurement unit. Layout never measures characters — it measures these.
690
+ */
691
+ interface ShapedRun {
692
+ readonly text: string;
693
+ readonly direction: TextDirection;
694
+ readonly bidiLevel: number;
695
+ readonly glyphs: readonly ShapedGlyph[];
696
+ readonly clusters: readonly ShapedCluster[];
697
+ readonly fontSpans: readonly ShapedFontSpan[];
698
+ readonly metrics: ShapedVerticalMetrics;
699
+ }
700
+ /**
701
+ * A {@link ShapedRun} reduced to the fields two shaping results must agree on to be considered
702
+ * identical.
703
+ *
704
+ * Fonts appear as {@link FontFingerprintInputs} rather than whole `ResolvedFont` objects, so the
705
+ * comparison is over VALUES and does not depend on object identity — which is what makes it work
706
+ * across a reload or a worker boundary.
707
+ */
708
+ interface ShapedRunComparatorInputs {
709
+ readonly text: string;
710
+ readonly direction: TextDirection;
711
+ readonly script: string;
712
+ readonly language: string;
713
+ readonly bidiLevel: number;
714
+ readonly glyphs: readonly ShapedGlyph[];
715
+ readonly clusters: readonly ShapedCluster[];
716
+ readonly fontSpans: readonly {
717
+ readonly glyphStart: number;
718
+ readonly glyphEnd: number;
719
+ readonly fallbackIndex: number | null;
720
+ readonly font: FontFingerprintInputs;
721
+ }[];
722
+ readonly metrics: ShapedVerticalMetrics;
723
+ }
724
+ /**
725
+ * The one thing layout needs from a shaping backend.
726
+ *
727
+ * Injected rather than imported, which is what keeps layout DOM-free and testable: a fixed-metric
728
+ * shaper measures deterministically in a test, HarfBuzz measures for real in a browser, and
729
+ * layout cannot tell the difference.
730
+ */
731
+ interface TextShaper {
732
+ shape(input: ShapeInput): ShapedRun;
733
+ }
734
+ /**
735
+ * A font reduced to the values that identify it for fingerprinting.
736
+ *
737
+ * Includes the content `hash` and `faceIndex`, so two faces with the same family name but
738
+ * different bytes fingerprint differently — which is what stops a cached measurement being reused
739
+ * against a substituted face.
740
+ */
741
+ interface FontFingerprintInputs {
742
+ readonly identity: string;
743
+ readonly id: string;
744
+ readonly family: string;
745
+ readonly request: FontRequest;
746
+ readonly hash: string;
747
+ readonly faceIndex: number;
748
+ readonly byteLength: number;
749
+ readonly substitution: FontSubstitution | null;
750
+ }
751
+ /**
752
+ * A {@link ShapingEnvironment} reduced to comparable values.
753
+ *
754
+ * Records and axis maps become SORTED entry arrays, because two environments differing only in
755
+ * key insertion order must fingerprint the same — otherwise a cache would miss on a difference
756
+ * that changes no glyph.
757
+ */
758
+ interface ShapingEnvironmentFingerprintInputs {
759
+ readonly font: FontFingerprintInputs;
760
+ readonly variationAxes: readonly (readonly [string, number])[];
761
+ readonly shapingLibrary: VersionedShapingLibrary;
762
+ readonly unicodeDataVersion: string;
763
+ readonly normalization: NormalizationPolicy;
764
+ readonly script: string;
765
+ readonly language: string;
766
+ readonly direction: TextDirection;
767
+ readonly features: readonly (readonly [string, number])[];
768
+ readonly fallbackOrder: readonly FontFingerprintInputs[];
769
+ readonly fixedPointScale: number;
770
+ readonly roundingMode: FixedPointRoundingMode;
771
+ }
772
+ /**
773
+ * Validate and freeze a shaping environment.
774
+ *
775
+ * Checks every field that could silently corrupt a measurement: OpenType tags must be four ASCII
776
+ * bytes, script and language must be non-blank and control-character free, fonts must already be
777
+ * validated. Throws rather than coercing — a bad tag that shapes anyway produces a document that
778
+ * measures wrong everywhere and looks fine.
779
+ *
780
+ * @throws TypeError on a malformed tag, name, or axis value.
781
+ */
782
+ declare const createShapingEnvironment: (input: ShapingEnvironmentInput) => ShapingEnvironment;
783
+ /**
784
+ * Reduce an environment to its comparable form, with records sorted so key order cannot affect
785
+ * the result.
786
+ */
787
+ declare const shapingEnvironmentFingerprintInputs: (input: ShapingEnvironmentInput) => ShapingEnvironmentFingerprintInputs;
788
+ /** Canonical serialization of every shaping variable, including byte hash and provenance. */
789
+ declare const shapingEnvironmentFingerprint: (environment: ShapingEnvironmentInput) => string;
790
+ /**
791
+ * Validate and freeze a shaped run against the environment that produced it.
792
+ *
793
+ * Checks the internal consistency a shaper must satisfy: direction matches the environment,
794
+ * cluster ranges tile the text without gaps or overlap, glyph ranges stay in bounds, font spans
795
+ * cover every glyph, and caret edges are monotonic. A shaper that violates any of these produces
796
+ * a caret that lands in the wrong place, which is far harder to diagnose downstream than here.
797
+ *
798
+ * @throws TypeError when the run and environment disagree, or the run is internally inconsistent.
799
+ */
800
+ declare const createShapedRun: (input: ShapedRun, environmentInput: ShapingEnvironmentInput) => ShapedRun;
801
+ /**
802
+ * Reduce a shaped run to its comparable form, validating it on the way through.
803
+ *
804
+ * What the D9 determinism oracles compare: two shaping runs of the same text in the same
805
+ * environment must produce byte-identical structures here.
806
+ */
807
+ declare const shapedRunComparatorInputs: (input: ShapedRun, environment: ShapingEnvironmentInput) => ShapedRunComparatorInputs;
808
+
342
809
  /** `w:vertAlign` — script position, which also scales the run's effective size. */
343
810
  type VerticalAlign = 'baseline' | 'superscript' | 'subscript';
344
811
  /** A resolved underline: its variant, and its colour when it does not follow the text. */
@@ -356,6 +823,16 @@ interface ResolvedUnderline {
356
823
  */
357
824
  interface ResolvedRunStyle {
358
825
  readonly fontFamily: string | null;
826
+ /**
827
+ * The `eastAsia` slot's typeface (`w:rFonts w:eastAsia`/`w:eastAsiaTheme`), or null when
828
+ * no level authors one.
829
+ *
830
+ * OOXML picks a run's face per SCRIPT: `fontFamily` covers the ascii/hAnsi slots, and
831
+ * ideographic/kana/hangul text resolves through this one instead. Kept beside — not
832
+ * folded into — `fontFamily`, because a mixed run needs both at once and the split into
833
+ * slot-homogeneous pieces happens downstream (`piecesOfParagraph`).
834
+ */
835
+ readonly fontFamilyEastAsia: string | null;
359
836
  /** Points. `w:sz` is half-points, so 22 becomes 11. */
360
837
  readonly fontSizePt: number;
361
838
  /** RRGGBB, or null for the inherited/automatic colour. */
@@ -401,16 +878,20 @@ interface ResolvedRunStyle {
401
878
  /** The style a run inherits when it authors nothing. */
402
879
  declare const DEFAULT_RUN_STYLE: ResolvedRunStyle;
403
880
  /**
404
- * The theme part's two Latin typefaces, for resolving `w:rFonts` theme attributes.
881
+ * The theme part's typefaces, for resolving `w:rFonts` theme attributes.
405
882
  *
406
883
  * Structurally identical to the binding lane's `DocumentThemeFonts` and assignable from it.
407
- * Declared here so this lane reads two validated strings rather than the theme tree.
884
+ * Declared here so this lane reads validated strings rather than the theme tree.
408
885
  */
409
886
  interface ThemeFonts {
410
887
  /** `a:majorFont` latin typeface — headings. */
411
888
  readonly major: string | null;
412
889
  /** `a:minorFont` latin typeface — body text. */
413
890
  readonly minor: string | null;
891
+ /** `a:majorFont` east asian typeface (`a:ea`) — headings. Optional for back-compat. */
892
+ readonly majorEastAsia?: string | null;
893
+ /** `a:minorFont` east asian typeface (`a:ea`) — body text. Optional for back-compat. */
894
+ readonly minorEastAsia?: string | null;
414
895
  }
415
896
  /**
416
897
  * Resolve one run's direct formatting.
@@ -439,6 +920,58 @@ declare function runStylesEqual(a: ResolvedRunStyle, b: ResolvedRunStyle): boole
439
920
  */
440
921
  declare function baselineShiftPtOf(style: ResolvedRunStyle): number;
441
922
 
923
+ /**
924
+ * Which `w:rFonts` slot a character resolves its face through.
925
+ *
926
+ * OOXML gives a run up to four faces and picks between them by SCRIPT, so one run of mixed Latin
927
+ * and CJK text uses two different fonts without saying so anywhere in its properties.
928
+ */
929
+ type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
930
+ /**
931
+ * A run of text sharing one script, direction and font slot — the unit handed to the shaper.
932
+ *
933
+ * Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
934
+ * behaviour, so a run is itemized into these first.
935
+ */
936
+ interface ScriptItem {
937
+ readonly from: number;
938
+ readonly to: number;
939
+ readonly direction: TextDirection;
940
+ readonly bidiLevel: number;
941
+ readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
942
+ readonly slot: FontSlot;
943
+ }
944
+ /**
945
+ * A code point whose script this engine does not itemize.
946
+ *
947
+ * Carries the offending `codePoint` so the caller can report which character stopped it, rather
948
+ * than failing anonymously somewhere in the middle of a paragraph.
949
+ */
950
+ declare class UnsupportedScriptError extends Error {
951
+ readonly name = "UnsupportedScriptError";
952
+ readonly code = "unsupportedScript";
953
+ readonly codePoint: number;
954
+ constructor(codePoint: number);
955
+ }
956
+ /**
957
+ * Split text into shapeable runs by script, bidi level and font slot.
958
+ *
959
+ * Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
960
+ * by construction instead of by two implementations happening to match.
961
+ */
962
+ declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
963
+ /**
964
+ * The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
965
+ *
966
+ * This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
967
+ * style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
968
+ * and the format painter see the run as authored — and every consumer that turns text into
969
+ * geometry or ink resolves the face through here. The derived object is memoized per
970
+ * (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
971
+ * keep their caches.
972
+ */
973
+ declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
974
+
442
975
  type AllowlistedPageField = 'PAGE' | 'NUMPAGES' | 'SECTIONPAGES';
443
976
  /**
444
977
  * Which allowlisted page fields a header/footer story actually contains.
@@ -696,7 +1229,7 @@ interface StyleCascadeTable {
696
1229
  */
697
1230
  readonly defaultTableStyleId: string | null;
698
1231
  /**
699
- * The theme part's Latin typefaces, for `w:rFonts` theme references.
1232
+ * The theme part's typefaces, for `w:rFonts` theme references.
700
1233
  *
701
1234
  * Lives on the cascade because it is document-level style material with the same
702
1235
  * lifetime, and because every site that resolves run properties already holds this table.
@@ -1571,6 +2104,14 @@ interface StyleSpanRecord {
1571
2104
  * point put the caret where no glyph is.
1572
2105
  */
1573
2106
  readonly style: ResolvedRunStyle;
2107
+ /**
2108
+ * The `w:rFonts` slot this span's text resolves its face through; absent means the base
2109
+ * (ascii/hAnsi) slots. {@link style} stays the run's full resolution — with both
2110
+ * `fontFamily` and `fontFamilyEastAsia` — so formatting readback and the format painter
2111
+ * see the run as authored; measurement, paint and hit-testing resolve the effective face
2112
+ * with `styleForFontSlot(span.style, span.fontSlot)`.
2113
+ */
2114
+ readonly fontSlot?: FontSlot;
1574
2115
  readonly box: LayoutBox;
1575
2116
  /**
1576
2117
  * Cumulative advances from {@link box}.x to each UTF-16 caret boundary in {@link text}.
@@ -2277,4 +2818,4 @@ interface TextMeasurer {
2277
2818
  };
2278
2819
  }
2279
2820
 
2280
- export { type FieldAtomMarker as $, type AnchoredDrawingRecord as A, type BlockFragmentRecord as B, type ContentControlBoundaryRecord as C, type DrawingPoint as D, DEFAULT_RUN_STYLE as E, type FieldLinkProjector as F, DEFAULT_TAB_INTERVAL_PT as G, type HyperlinkProjector as H, type InlineDrawingRecord as I, DEFAULT_TAB_INTERVAL_TWIPS as J, EMPTY_NUMBERING_INDEX as K, type LineRecord as L, type ModelRange as M, type NumberingLevel as N, EMPTY_TAB_STOPS as O, type PageGeometry as P, type EquationFractionGeometry as Q, type ResolvedRunStyle as R, type SemanticLayout as S, type TextMeasurer as T, type EquationGeometry as U, type EquationNaryGeometry as V, type EquationRadicalGeometry as W, type EquationRowGeometry as X, type EquationScriptGeometry as Y, type EquationSpanRecord as Z, type EquationTextGeometry as _, type StyleSpanRecord as a, cascadedParagraphBorders as a$, type HeaderFooterStoryRecord as a0, type HyperlinkFieldSpec as a1, type LevelOverride as a2, type LineSpacingRule as a3, type ListMarkerAlign as a4, type ListMarkerRecord as a5, type ListSuffix as a6, MAX_BORDER_SPACE_PT as a7, MAX_BORDER_WIDTH_PT as a8, MAX_LVL_OVERRIDES as a9, type ResolvedTableBorderEdge as aA, type ResolvedTableBorderEdgeSegment as aB, type ResolvedUnderline as aC, SINGLE_LINE_SPACING as aD, type SourceRange as aE, type SpanLinkRecord as aF, type StyleDefinition as aG, TAB_LEADER_GLYPH as aH, type TabAlignment as aI, type TabDestination as aJ, type TabLeader as aK, type TabStop as aL, type TableBorderSideName as aM, type TableBorderStrokeRecord as aN, type TableFragmentRecord as aO, type VerticalAlign as aP, appliedSpaceBefore as aQ, applyLineSpacing as aR, baselineShiftPtOf as aS, borderExtentPt as aT, borderWeight as aU, bottomBorderExtentPt as aV, buildNumberingIndex as aW, buildStyleCascadeTable as aX, cascadeParagraphFormatting as aY, cascadeRunProperties as aZ, cascadedBottomBorder as a_, MAX_NUMBERING_DEFINITIONS as aa, MAX_PARAGRAPH_SPACING_PT as ab, MAX_STYLE_BASED_ON_DEPTH as ac, MAX_STYLE_DEFINITIONS as ad, MAX_TABLE_BORDER_STROKES as ae, MAX_TAB_POSITION_TWIPS as af, MAX_TAB_STOPS as ag, type NumDefinition as ah, type NumberingLevelIndent as ai, PARAGRAPH_BORDER_SIDES as aj, type PageRefCalibrationCell as ak, type PageRefFieldProjection as al, type ParagraphAutoSpacingContext as am, type ParagraphBorderEdge as an, type ParagraphBorderSide as ao, type ParagraphBorderStrokeRecord as ap, type ParagraphBorders as aq, type ParagraphBottomBorderRecord as ar, type ParagraphIndent as as, type ParagraphLayoutInputs as at, type ParagraphLineSpacing as au, type ParagraphSpacing as av, type RefFieldSpec as aw, type RefNoteParts as ax, type ResolvedCellBorders as ay, type ResolvedTabStops as az, type TableRowFragmentRecord as b, cascadedTabStops as b0, collapsedSpaceBefore as b1, defaultTabIntervalFromSettings as b2, displayText as b3, isValidStyleId as b4, layoutEquation as b5, listMarkerBox as b6, measureDisplayText as b7, mergeListIndent as b8, nextTabDestination as b9, withNumberingStyleLinks as bA, withResolvedListItems as bB, paragraphBorderExtentPt as ba, paragraphBorderStrokeWidthPt as bb, paragraphBorders as bc, paragraphBordersFingerprint as bd, paragraphBreaksBefore as be, paragraphContextualSpacing as bf, paragraphLineSpacing as bg, paragraphSpacing as bh, paragraphTabStops as bi, parseRefInstruction as bj, readBorderSide as bk, readCellBorders as bl, readNumPr as bm, readTableBorders as bn, resolveBorderConflict as bo, resolveNumberingLevel as bp, resolveParagraphLayoutInputs as bq, resolveRunStyle as br, resolveStoryListItems as bs, resolveStoryRefFields as bt, resolveTableCellBorderGrid as bu, runStylesEqual as bv, tabAdvanceWidth as bw, tabStopsFingerprint as bx, walkStoryParagraphs as by, withDefaultTabInterval as bz, type TableCellFragmentRecord as c, type NumberingIndex as d, type LayoutBox as e, type DrawingInsets as f, type PageRecord as g, type TableBorderSide as h, type ContentControlLock as i, type ParagraphFragmentRecord as j, type InlineDrawingLayoutContext as k, type StyleCascadeTable as l, type RefFieldContext as m, type StoryPageFieldNeeds as n, type ResolvedListItem as o, type CellBorderBox as p, type TableCellStyleFormatting as q, type TableBorderBox as r, AUTO_PARAGRAPH_SPACING_PT as s, type AbstractNumDefinition as t, type BorderGridGeometry as u, type CascadedParagraphFormatting as v, type ContentControlGeometryFragment as w, type ContentControlLevel as x, type ContentControlMappedType as y, DEFAULT_PAGE_GEOMETRY as z };
2821
+ export { type DeclaredFontSubstitution as $, type AnchoredDrawingRecord as A, type BlockFragmentRecord as B, type ContentControlBoundaryRecord as C, type DrawingPoint as D, AUTO_PARAGRAPH_SPACING_PT as E, type FontResourceSnapshot as F, type AbstractNumDefinition as G, type HyperlinkProjector as H, type InlineDrawingRecord as I, type BidiEmbeddingLevels as J, type BorderGridGeometry as K, type LineRecord as L, type ModelRange as M, type NormalizationPolicy as N, type CascadedParagraphFormatting as O, type PageGeometry as P, type ContentControlGeometryFragment as Q, type ResolvedRunStyle as R, type SemanticLayout as S, type TextMeasurer as T, type ContentControlLevel as U, type VersionedShapingLibrary as V, type ContentControlMappedType as W, DEFAULT_PAGE_GEOMETRY as X, DEFAULT_RUN_STYLE as Y, DEFAULT_TAB_INTERVAL_PT as Z, DEFAULT_TAB_INTERVAL_TWIPS as _, type StyleSpanRecord as a, type ResolvedUnderline as a$, EMPTY_NUMBERING_INDEX as a0, EMPTY_TAB_STOPS as a1, type EquationFractionGeometry as a2, type EquationGeometry as a3, type EquationNaryGeometry as a4, type EquationRadicalGeometry as a5, type EquationRowGeometry as a6, type EquationScriptGeometry as a7, type EquationSpanRecord as a8, type EquationTextGeometry as a9, MAX_PARAGRAPH_SPACING_PT as aA, MAX_STYLE_BASED_ON_DEPTH as aB, MAX_STYLE_DEFINITIONS as aC, MAX_TABLE_BORDER_STROKES as aD, MAX_TAB_POSITION_TWIPS as aE, MAX_TAB_STOPS as aF, type NumDefinition as aG, type NumberingLevelIndent as aH, PARAGRAPH_BORDER_SIDES as aI, type PageRefCalibrationCell as aJ, type PageRefFieldProjection as aK, type ParagraphAutoSpacingContext as aL, type ParagraphBorderEdge as aM, type ParagraphBorderSide as aN, type ParagraphBorderStrokeRecord as aO, type ParagraphBorders as aP, type ParagraphBottomBorderRecord as aQ, type ParagraphIndent as aR, type ParagraphLayoutInputs as aS, type ParagraphLineSpacing as aT, type ParagraphSpacing as aU, type RefFieldSpec as aV, type RefNoteParts as aW, type ResolvedCellBorders as aX, type ResolvedTabStops as aY, type ResolvedTableBorderEdge as aZ, type ResolvedTableBorderEdgeSegment as a_, type FieldAtomMarker as aa, type FontFingerprintInputs as ab, type FontRequest as ac, FontResolutionError as ad, type FontResolutionErrorCode as ae, type FontResourceDefinition as af, type FontResourceInstrumentation as ag, type FontResourceSnapshotOptions as ah, type FontSlot as ai, type FontSubstitution as aj, type FontValidationResult as ak, type GlyphOutline as al, HARD_MAX_AGGREGATE_FONT_BYTES as am, HARD_MAX_FONT_BYTES as an, HARD_MAX_FONT_SOURCES as ao, type HeaderFooterStoryRecord as ap, type HyperlinkFieldSpec as aq, type LevelOverride as ar, type LineSpacingRule as as, type ListMarkerAlign as at, type ListMarkerRecord as au, type ListSuffix as av, MAX_BORDER_SPACE_PT as aw, MAX_BORDER_WIDTH_PT as ax, MAX_LVL_OVERRIDES as ay, MAX_NUMBERING_DEFINITIONS as az, type TextShaper as b, parseRefInstruction as b$, SINGLE_LINE_SPACING as b0, type ScriptItem as b1, type ShapeInput as b2, type ShapedCluster as b3, type ShapedFontSpan as b4, type ShapedGlyph as b5, type ShapedRunComparatorInputs as b6, type ShapedVerticalMetrics as b7, type ShapingEnvironment as b8, type ShapingEnvironmentFingerprintInputs as b9, cascadedBottomBorder as bA, cascadedParagraphBorders as bB, cascadedTabStops as bC, collapsedSpaceBefore as bD, createFontResourceSnapshot as bE, createShapedRun as bF, createShapingEnvironment as bG, defaultTabIntervalFromSettings as bH, displayText as bI, fixedPoint as bJ, fontRequestKey as bK, isValidStyleId as bL, itemizeScriptFontSlots as bM, layoutEquation as bN, listMarkerBox as bO, measureDisplayText as bP, mergeListIndent as bQ, nextTabDestination as bR, paragraphBorderExtentPt as bS, paragraphBorderStrokeWidthPt as bT, paragraphBorders as bU, paragraphBordersFingerprint as bV, paragraphBreaksBefore as bW, paragraphContextualSpacing as bX, paragraphLineSpacing as bY, paragraphSpacing as bZ, paragraphTabStops as b_, type ShapingEnvironmentInput as ba, type SourceRange as bb, type SpanLinkRecord as bc, type StyleDefinition as bd, TAB_LEADER_GLYPH as be, type TabAlignment as bf, type TabDestination as bg, type TabLeader as bh, type TabStop as bi, type TableBorderSideName as bj, type TableBorderStrokeRecord as bk, type TableFragmentRecord as bl, type TextDirection as bm, UnsupportedScriptError as bn, type VerticalAlign as bo, appliedSpaceBefore as bp, applyLineSpacing as bq, baselineShiftPtOf as br, borderExtentPt as bs, borderWeight as bt, bottomBorderExtentPt as bu, boundedStructuralFontValidator as bv, buildNumberingIndex as bw, buildStyleCascadeTable as bx, cascadeParagraphFormatting as by, cascadeRunProperties as bz, type FixedPointRoundingMode as c, readBorderSide as c0, readCellBorders as c1, readNumPr as c2, readTableBorders as c3, resolveBorderConflict as c4, resolveNumberingLevel as c5, resolveParagraphLayoutInputs as c6, resolveRunStyle as c7, resolveStoryListItems as c8, resolveStoryRefFields as c9, resolveTableCellBorderGrid as ca, runStylesEqual as cb, shapedRunComparatorInputs as cc, shapingEnvironmentFingerprint as cd, shapingEnvironmentFingerprintInputs as ce, styleForFontSlot as cf, tabAdvanceWidth as cg, tabStopsFingerprint as ch, walkStoryParagraphs as ci, withDefaultTabInterval as cj, withNumberingStyleLinks as ck, withResolvedListItems as cl, type ResolvedFont as d, type TableRowFragmentRecord as e, type TableCellFragmentRecord as f, type NumberingLevel as g, type NumberingIndex as h, type LayoutBox as i, type DrawingInsets as j, type PageRecord as k, type TableBorderSide as l, type ContentControlLock as m, type ParagraphFragmentRecord as n, type FontByteValidator as o, type FixedPoint as p, type ShapedRun as q, type InlineDrawingLayoutContext as r, type StyleCascadeTable as s, type FieldLinkProjector as t, type RefFieldContext as u, type StoryPageFieldNeeds as v, type ResolvedListItem as w, type CellBorderBox as x, type TableCellStyleFormatting as y, type TableBorderBox as z };