superdoc 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -90
- package/dist/chunks/{create-super-doc-ui-CqGmoMMA.cjs → create-super-doc-ui-Bom7oDPv.cjs} +194 -29
- package/dist/chunks/{create-super-doc-ui-CmOSA_lN.es.js → create-super-doc-ui-DbzVC0rr.es.js} +194 -29
- package/dist/chunks/{eventemitter3-DEIiXiH2.es.js → eventemitter3-CMOjDs74.es.js} +1 -1
- package/dist/chunks/{eventemitter3-C_TAnXOl.cjs → eventemitter3-D38u8ta_.cjs} +1 -1
- package/dist/chunks/{jszip-D8mAFF-r.cjs → jszip-RC64TPzL.cjs} +1 -1
- package/dist/chunks/{jszip-BzJ3CyxR.es.js → jszip-VxCFV9YS.es.js} +1 -1
- package/dist/chunks/{rolldown-runtime-0pSA04fp.es.js → rolldown-runtime-B5TtN50X.es.js} +1 -1
- package/dist/chunks/{rolldown-runtime-74VwNCz7.cjs → rolldown-runtime-DtsSbkrh.cjs} +1 -1
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/types/track-changes.types.d.ts +17 -0
- package/dist/layout-engine/contracts/src/graphic-placement.d.ts +35 -6
- package/dist/layout-engine/contracts/src/index.d.ts +296 -13
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +5 -0
- package/dist/layout-engine/dom-contract/src/class-names.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/footnote-scorer.d.ts +1 -1
- package/dist/layout-engine/layout-bridge/src/hydrateTableTextboxMeasures.d.ts +9 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +40 -12
- package/dist/layout-engine/layout-bridge/src/index.d.ts +3 -2
- package/dist/layout-engine/layout-bridge/src/layoutHeaderFooter.d.ts +10 -7
- package/dist/layout-engine/layout-bridge/src/remeasure.d.ts +2 -2
- package/dist/layout-engine/layout-engine/src/anchors.d.ts +4 -0
- package/dist/layout-engine/layout-engine/src/execution.d.ts +21 -0
- package/dist/layout-engine/layout-engine/src/floating-objects.d.ts +15 -2
- package/dist/layout-engine/layout-engine/src/floating-table-anchor.d.ts +2 -0
- package/dist/layout-engine/layout-engine/src/footnote-anchor-index.d.ts +17 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +13 -10
- package/dist/layout-engine/layout-engine/src/inline-drawing-alignment.d.ts +9 -0
- package/dist/layout-engine/layout-engine/src/layout-drawing.d.ts +3 -3
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +2 -2
- package/dist/layout-engine/layout-engine/src/layout-textbox.d.ts +3 -3
- package/dist/layout-engine/layout-engine/src/pageNumbering.d.ts +3 -41
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +7 -2
- package/dist/layout-engine/layout-engine/src/resolvePageTokens.d.ts +2 -0
- package/dist/layout-engine/layout-engine/src/section-breaks.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/section-props.d.ts +5 -0
- package/dist/layout-engine/painters/dom/src/chart-renderer.d.ts +3 -3
- package/dist/layout-engine/painters/dom/src/images/image-outline.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/images/render-placeholder.d.ts +12 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +54 -0
- package/dist/layout-engine/painters/dom/src/runs/text-effects.d.ts +30 -0
- package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +6 -4
- package/dist/layout-engine/painters/dom/src/shapes/preset-text-warp-data.d.ts +32 -0
- package/dist/layout-engine/painters/dom/src/shapes/wordart-warp.d.ts +39 -0
- package/dist/layout-engine/painters/dom/src/table/border-utils.d.ts +20 -27
- package/dist/layout-engine/painters/dom/src/table/renderTableFragment.d.ts +1 -1
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-theme.d.ts +7 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +87 -87
- package/dist/style.layered.css +87 -87
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +5 -0
- package/dist/superdoc/src/core/types/index.d.ts +24 -0
- package/dist/superdoc.cjs +88 -79
- package/dist/superdoc.es.js +88 -79
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +37 -37
- package/package.json +2 -6
- package/AGENTS.md +0 -337
|
@@ -261,6 +261,8 @@ export declare class DomPainter {
|
|
|
261
261
|
private totalPages;
|
|
262
262
|
private sectionPageCounts;
|
|
263
263
|
private linkIdCounter;
|
|
264
|
+
private shapeImageFillCounter;
|
|
265
|
+
private wordArtPathCounter;
|
|
264
266
|
private sdtLabelsRendered;
|
|
265
267
|
/**
|
|
266
268
|
* WeakMap storing tooltip data for hyperlink elements before DOM insertion.
|
|
@@ -520,11 +522,52 @@ export declare class DomPainter {
|
|
|
520
522
|
* Apply fill and stroke styles to a fallback shape container
|
|
521
523
|
*/
|
|
522
524
|
private applyFallbackShapeStyle;
|
|
525
|
+
/**
|
|
526
|
+
* Shape stroke widths reach the painter in physical CSS pixels. Preset SVGs
|
|
527
|
+
* use a normalized 100 × 100 viewBox while VML custom geometry often uses a
|
|
528
|
+
* coordsize in the thousands. In both cases allowing the viewBox transform to
|
|
529
|
+
* scale the stroke changes the authored line weight, sometimes by orders of
|
|
530
|
+
* magnitude. Keep geometry scalable and paint the resolved width verbatim.
|
|
531
|
+
*/
|
|
532
|
+
private applyPhysicalStrokeSemantics;
|
|
533
|
+
/**
|
|
534
|
+
* Produce a stable 8-bit preview color for inactive header/footer graphics.
|
|
535
|
+
* CSS color-mix() retains fractional sRGB channels and Chromium floors some
|
|
536
|
+
* half-channel values during rasterization; Word rounds those channels. Keep
|
|
537
|
+
* the authored color separate and expose the rounded blend as a paint hint.
|
|
538
|
+
*/
|
|
539
|
+
private mixResolvedHexColorWithWhite;
|
|
540
|
+
/** Paint a DrawingML picture fill through the existing SVG geometry. */
|
|
541
|
+
private applyShapeImageFill;
|
|
542
|
+
private appendShapeFillImage;
|
|
543
|
+
private resolveShapeTileOrigin;
|
|
523
544
|
private hasShapeTextContent;
|
|
524
545
|
private createShapeTextElement;
|
|
525
546
|
private createTextboxContentElement;
|
|
526
547
|
private shouldUseWordArtTextRenderer;
|
|
527
548
|
private createWordArtTextElement;
|
|
549
|
+
private createWordArtEnvelopeGroup;
|
|
550
|
+
/**
|
|
551
|
+
* Approximates DrawingML's point-wise text-envelope transform with narrow
|
|
552
|
+
* vector strips. Each strip maps a slice of the unwarped text block between
|
|
553
|
+
* the authored upper and lower guide paths. Unlike a per-glyph affine
|
|
554
|
+
* transform, this bends the glyph outlines themselves while preserving SVG
|
|
555
|
+
* text paint (fills, outlines, glow and shadow) and browser font shaping.
|
|
556
|
+
*/
|
|
557
|
+
private createWordArtEnvelopeMesh;
|
|
558
|
+
/**
|
|
559
|
+
* DrawingML composes glow and shadow after the text outline has been
|
|
560
|
+
* deformed by the warp. The envelope renderer repeats a clipped source
|
|
561
|
+
* through many transformed `<use>` elements; leaving a CSS filter on that
|
|
562
|
+
* source clips and transforms the effect independently in every mesh strip.
|
|
563
|
+
* Promote a shared run filter to the completed mesh so the browser paints
|
|
564
|
+
* one effect around the final warped silhouette. Mixed run effects remain on
|
|
565
|
+
* their source runs because collapsing them would change authored styling.
|
|
566
|
+
*/
|
|
567
|
+
private promoteUniformWordArtEnvelopeFilter;
|
|
568
|
+
private measureWordArtLineMetrics;
|
|
569
|
+
private measureWordArtLineWidth;
|
|
570
|
+
private createWordArtReflection;
|
|
528
571
|
private buildWordArtLines;
|
|
529
572
|
private resolveShapeTextPartText;
|
|
530
573
|
private getWordArtTextAnchor;
|
|
@@ -540,6 +583,8 @@ export declare class DomPainter {
|
|
|
540
583
|
* @param _groupScaleY - Reserved parent-group scale factor
|
|
541
584
|
*/
|
|
542
585
|
private createFallbackTextElement;
|
|
586
|
+
private shapeTextAllowsOverflow;
|
|
587
|
+
private applyShapeTextFlow;
|
|
543
588
|
private tryCreatePresetSvg;
|
|
544
589
|
/**
|
|
545
590
|
* Creates an SVG string from custom geometry path data (a:custGeom).
|
|
@@ -566,6 +611,9 @@ export declare class DomPainter {
|
|
|
566
611
|
*/
|
|
567
612
|
private createChartElement;
|
|
568
613
|
private resolveTableRenderData;
|
|
614
|
+
private createTableCellLineRenderer;
|
|
615
|
+
/** Render drawing content nested in any canonical table, including a textbox-owned table. */
|
|
616
|
+
private renderDrawingContentForTable;
|
|
569
617
|
private renderTableFragment;
|
|
570
618
|
private renderLine;
|
|
571
619
|
private createRunRenderContext;
|
|
@@ -600,6 +648,12 @@ export declare class DomPainter {
|
|
|
600
648
|
* Uses resolved data for spatial properties and delegates PM attributes to the legacy path.
|
|
601
649
|
*/
|
|
602
650
|
private isAnchoredMediaFragment;
|
|
651
|
+
/**
|
|
652
|
+
* Marks fragments whose paint coordinates are independent from body flow.
|
|
653
|
+
* DOM consumers such as header/footer hit-testing must not infer page margins
|
|
654
|
+
* from floating objects that happen to paint above the first flow block.
|
|
655
|
+
*/
|
|
656
|
+
private applyFragmentFlowClass;
|
|
603
657
|
private shouldRenderBehindPageContent;
|
|
604
658
|
private isHeaderWordArtWatermark;
|
|
605
659
|
private isVmlTextWatermarkImage;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TextEffects } from '../../../../contracts/src/index.js';
|
|
2
|
+
type TextInkBounds = {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
right: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function reflectionDirection(direction: number): 'above' | 'below' | 'left' | 'right';
|
|
9
|
+
export declare function resolveTextReflectionTransform(reflection: NonNullable<TextEffects['reflection']>, ink: TextInkBounds): {
|
|
10
|
+
transform: string;
|
|
11
|
+
maskDirection: 'top' | 'bottom' | 'left' | 'right';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Resolve reflection geometry without choosing a DOM or SVG transform syntax.
|
|
15
|
+
* Both ordinary HTML runs and SVG WordArt use the same DrawingML direction,
|
|
16
|
+
* distance, scale, and ink-edge anchoring contract.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveTextReflectionPlacement(reflection: NonNullable<TextEffects['reflection']>, ink: TextInkBounds): {
|
|
19
|
+
translateX: number;
|
|
20
|
+
translateY: number;
|
|
21
|
+
maskDirection: 'top' | 'bottom' | 'left' | 'right';
|
|
22
|
+
};
|
|
23
|
+
/** Resolve authored reflection opacity stops against visible glyph ink, not CSS leading. */
|
|
24
|
+
export declare function resolveTextReflectionMask(reflection: NonNullable<TextEffects['reflection']>, ink: TextInkBounds, box: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}): string;
|
|
28
|
+
/** Apply paint-only Word text effects without changing glyph metrics. */
|
|
29
|
+
export declare function applyTextEffects(element: HTMLElement, effects: TextEffects | undefined): void;
|
|
30
|
+
export {};
|
|
@@ -15,6 +15,11 @@ import { RunRenderContext, TrackedChangesRenderConfig } from './types.js';
|
|
|
15
15
|
* makes the tab border and the text underline rasterize to the same line weight.
|
|
16
16
|
*/
|
|
17
17
|
export declare const underlineThicknessPx: (fontSize: number) => number;
|
|
18
|
+
type ResolvePhysicalFont = (cssFontFamily: string, face: {
|
|
19
|
+
weight: '400' | '700';
|
|
20
|
+
style: 'normal' | 'italic';
|
|
21
|
+
}) => string;
|
|
22
|
+
export declare const applyRunTypographyStyles: (element: HTMLElement, run: TextRun, resolvePhysical?: ResolvePhysicalFont) => void;
|
|
18
23
|
/**
|
|
19
24
|
* Applies run styling properties to a DOM element.
|
|
20
25
|
*
|
|
@@ -25,10 +30,7 @@ export declare const underlineThicknessPx: (fontSize: number) => number;
|
|
|
25
30
|
* inline colors are now applied to all runs (including links) to
|
|
26
31
|
* ensure OOXML hyperlink character styles appear correctly.
|
|
27
32
|
*/
|
|
28
|
-
export declare const applyRunStyles: (element: HTMLElement, run: Run, _isLink?: boolean, resolvePhysical?:
|
|
29
|
-
weight: "400" | "700";
|
|
30
|
-
style: "normal" | "italic";
|
|
31
|
-
}) => string) => void;
|
|
33
|
+
export declare const applyRunStyles: (element: HTMLElement, run: Run, _isLink?: boolean, resolvePhysical?: ResolvePhysicalFont) => void;
|
|
32
34
|
export declare const resolveRunText: (run: Run, context: FragmentRenderContext) => string;
|
|
33
35
|
export declare const extractLinkData: (run: Run) => import('./types.js').LinkRenderData | null;
|
|
34
36
|
export declare const renderTextRun: (run: TextRun, context: FragmentRenderContext, renderContext: RunRenderContext, trackedConfig?: TrackedChangesRenderConfig) => HTMLElement | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ECMA-376 preset text-warp geometry data.
|
|
3
|
+
*
|
|
4
|
+
* Generated from the standard's accompanying
|
|
5
|
+
* OfficeOpenXML-DrawingMLGeometries.zip / presetTextWarpDefinitions.xml.
|
|
6
|
+
* Do not hand-edit; regenerate through the evidence-plan script.
|
|
7
|
+
*/
|
|
8
|
+
export type PresetTextWarpCommand = {
|
|
9
|
+
kind: 'moveTo' | 'lnTo' | 'quadBezTo' | 'cubicBezTo';
|
|
10
|
+
points: Array<{
|
|
11
|
+
x: string;
|
|
12
|
+
y: string;
|
|
13
|
+
}>;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'arc';
|
|
16
|
+
wR: string;
|
|
17
|
+
hR: string;
|
|
18
|
+
stAng: string;
|
|
19
|
+
swAng: string;
|
|
20
|
+
};
|
|
21
|
+
export type PresetTextWarpDefinition = {
|
|
22
|
+
adjustments: Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
fmla: string;
|
|
25
|
+
}>;
|
|
26
|
+
guides: Array<{
|
|
27
|
+
name: string;
|
|
28
|
+
fmla: string;
|
|
29
|
+
}>;
|
|
30
|
+
paths: PresetTextWarpCommand[][];
|
|
31
|
+
};
|
|
32
|
+
export declare const PRESET_TEXT_WARP_DEFINITIONS: Record<string, PresetTextWarpDefinition>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ShapeTextWarp } from '../../../../contracts/src/index.js';
|
|
2
|
+
export type WordArtWarpPoint = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export type WordArtWarpGeometry = {
|
|
7
|
+
paths: WordArtWarpPoint[][];
|
|
8
|
+
/** One boundary bends a baseline; two or more boundaries define a glyph envelope. */
|
|
9
|
+
kind: 'baseline' | 'envelope';
|
|
10
|
+
};
|
|
11
|
+
export type WordArtWarpPath = {
|
|
12
|
+
d: string;
|
|
13
|
+
fidelity: 'baseline' | 'envelope';
|
|
14
|
+
/** Polyline length of the evaluated preset path in layout coordinates. */
|
|
15
|
+
length: number;
|
|
16
|
+
};
|
|
17
|
+
export type WordArtBaselineBand = {
|
|
18
|
+
geometry: WordArtWarpGeometry;
|
|
19
|
+
path: WordArtWarpPath;
|
|
20
|
+
};
|
|
21
|
+
export declare function resolveWordArtWarpGeometry(warp: ShapeTextWarp, width: number, height: number, top?: number): WordArtWarpGeometry | null;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the centerline between two adjacent authored warp boundaries.
|
|
24
|
+
*
|
|
25
|
+
* A small family of DrawingML presets uses shared boundaries to compose
|
|
26
|
+
* successive text bands (for example textButton's upper/center/lower paths).
|
|
27
|
+
* Word lays each line on the corresponding band centerline and preserves the
|
|
28
|
+
* glyph outlines instead of stretching the ink through the whole envelope.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveWordArtAdjacentBandBaseline(geometry: WordArtWarpGeometry, bandIndex: number): WordArtBaselineBand | null;
|
|
31
|
+
/** Baseline compatibility surface used by the SVG textPath renderer and diagnostics. */
|
|
32
|
+
export declare function resolveWordArtWarpPath(warp: ShapeTextWarp, width: number, height: number, top?: number): WordArtWarpPath | null;
|
|
33
|
+
export declare function pointAtPath(points: readonly WordArtWarpPoint[], progress: number): WordArtWarpPoint;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the DrawingML text-warp percentage on a flattened boundary path.
|
|
36
|
+
* ECMA-376 §20.1.9.19 steps 6–8 require travelled distance after flattening,
|
|
37
|
+
* not the curve's command, sample, or angle parameter.
|
|
38
|
+
*/
|
|
39
|
+
export declare function pointAtWarpParameter(points: readonly WordArtWarpPoint[], progress: number): WordArtWarpPoint;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { BorderSpec, CellBorders, TableBorderValue, TableBorders, TableFragment } from '../../../../contracts/src/index.js';
|
|
2
2
|
import { TableCellGridPosition } from './grid-geometry.js';
|
|
3
|
+
type BorderSide = 'Top' | 'Right' | 'Bottom' | 'Left';
|
|
4
|
+
type ThinDoubleBorderOverlayGeometry = {
|
|
5
|
+
left: string;
|
|
6
|
+
top: string;
|
|
7
|
+
width: string;
|
|
8
|
+
height: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Paints thin double borders in an unclipped sibling SVG. CSS gradients are
|
|
12
|
+
* clipped at cell seams and cannot form Word's continuous rectangular rings.
|
|
13
|
+
* The SVG preserves authored geometry once it is large enough, while the V2
|
|
14
|
+
* wrapper's inverse-zoom variable keeps sub-pixel components at Word's
|
|
15
|
+
* one-screen-pixel minimum across editor zoom levels.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createThinDoubleBorderOverlay: (doc: Document, source: HTMLElement, geometry: ThinDoubleBorderOverlayGeometry) => SVGSVGElement | null;
|
|
3
18
|
/**
|
|
4
19
|
* Applies a border specification to one side of an HTML element.
|
|
5
20
|
*
|
|
@@ -18,7 +33,7 @@ import { TableCellGridPosition } from './grid-geometry.js';
|
|
|
18
33
|
* // Sets cell.style.borderTop = '2px solid #FF0000'
|
|
19
34
|
* ```
|
|
20
35
|
*/
|
|
21
|
-
export declare const applyBorder: (element: HTMLElement, side:
|
|
36
|
+
export declare const applyBorder: (element: HTMLElement, side: BorderSide, border?: BorderSpec) => void;
|
|
22
37
|
/**
|
|
23
38
|
* Applies border specifications to all four sides of a table cell element.
|
|
24
39
|
*
|
|
@@ -79,32 +94,9 @@ export declare const borderValueToSpec: (value?: TableBorderValue | null) => Bor
|
|
|
79
94
|
* ```
|
|
80
95
|
*/
|
|
81
96
|
export declare const resolveTableBorderValue: (explicit: TableBorderValue | undefined | null, fallback?: TableBorderValue | undefined | null) => BorderSpec | undefined;
|
|
82
|
-
export declare const isPresentBorder: (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
* simply unset/absent. The distinction matters for shared interior edges (§17.4.66): an
|
|
86
|
-
* explicit none on BOTH adjacent cells suppresses the divider, while an unset side inherits
|
|
87
|
-
* the table's insideH/insideV. Accepts either a CellBorders BorderSpec (`{style:'none'}`) or
|
|
88
|
-
* a TableBorderValue (`{none:true}`).
|
|
89
|
-
*/
|
|
90
|
-
export declare const isExplicitNoneBorder: (b?: unknown) => boolean;
|
|
91
|
-
/**
|
|
92
|
-
* OOXML cell-border conflict resolution (ECMA-376 §17.4.66).
|
|
93
|
-
*
|
|
94
|
-
* With zero cell spacing, two cells sharing an edge each specify a border; the spec
|
|
95
|
-
* collapses them to a SINGLE displayed border:
|
|
96
|
-
* 1. If either side is nil/none/absent, the opposing (present) border is displayed.
|
|
97
|
-
* 2. Otherwise the border with greater weight wins, where
|
|
98
|
-
* weight = (#lines in the style) × (style number).
|
|
99
|
-
* 3. Equal weight → the style higher on the precedence list (single first) wins.
|
|
100
|
-
* 4. Identical style → the color with the smaller brightness (R+B+2G, then B+2G, then
|
|
101
|
-
* G) wins; finally the first border (reading order) wins.
|
|
102
|
-
*
|
|
103
|
-
* @param a - One side's border (the owning cell's, e.g. the lower/right cell)
|
|
104
|
-
* @param b - The opposing side's border (e.g. the upper/left neighbor)
|
|
105
|
-
* @returns The single BorderSpec to display, or undefined if neither is present.
|
|
106
|
-
*/
|
|
107
|
-
export declare const resolveBorderConflict: (a?: BorderSpec, b?: BorderSpec) => BorderSpec | undefined;
|
|
97
|
+
export declare const isPresentBorder: (border?: BorderSpec) => border is BorderSpec;
|
|
98
|
+
export declare const isExplicitNoneBorder: (border?: unknown) => boolean;
|
|
99
|
+
export declare const resolveBorderConflict: (first?: BorderSpec, second?: BorderSpec) => BorderSpec | undefined;
|
|
108
100
|
/**
|
|
109
101
|
* Creates a border overlay element for a table fragment.
|
|
110
102
|
*
|
|
@@ -183,3 +175,4 @@ export declare const swapTableBordersLR: (borders: TableBorders | undefined) =>
|
|
|
183
175
|
* Swap left↔right on cell borders for RTL tables (ECMA-376 Part 4 §14.3.1, §14.3.5).
|
|
184
176
|
*/
|
|
185
177
|
export declare const swapCellBordersLR: (borders: CellBorders | undefined) => CellBorders | undefined;
|
|
178
|
+
export {};
|
|
@@ -39,7 +39,7 @@ export type TableRenderDependencies = {
|
|
|
39
39
|
/** Built-in SDT chrome rendering mode. */
|
|
40
40
|
chrome?: 'default' | 'none';
|
|
41
41
|
/** Function to render a line of paragraph content */
|
|
42
|
-
renderLine: (block: ParagraphBlock, line: Line, context: FragmentRenderContext, lineIndex: number, isLastLine: boolean) => HTMLElement;
|
|
42
|
+
renderLine: (block: ParagraphBlock, line: Line, context: FragmentRenderContext, lineIndex: number, isLastLine: boolean, resolvedListTextStartPx?: number) => HTMLElement;
|
|
43
43
|
/** Optional callback invoked after a table line's final styles/markers are applied. */
|
|
44
44
|
captureLineSnapshot?: (lineEl: HTMLElement, context: FragmentRenderContext, options?: {
|
|
45
45
|
inTableParagraph?: boolean;
|
|
@@ -11,11 +11,18 @@ export interface WordThemeFontFamily {
|
|
|
11
11
|
readonly ea?: string;
|
|
12
12
|
readonly cs?: string;
|
|
13
13
|
}
|
|
14
|
+
/** Authored DrawingML format definitions, indexed by the matching style reference. */
|
|
15
|
+
export interface WordThemeFormatScheme {
|
|
16
|
+
readonly fillStyles: readonly string[];
|
|
17
|
+
readonly backgroundFillStyles: readonly string[];
|
|
18
|
+
readonly lineStyles?: readonly string[];
|
|
19
|
+
}
|
|
14
20
|
export declare const DEFAULT_WORD_THEME_PALETTE: WordThemeColorPalette;
|
|
15
21
|
export declare const DEFAULT_WORD_THEME_FONT_SCHEME: WordThemeFontScheme;
|
|
16
22
|
export interface ThemeParseResult {
|
|
17
23
|
palette?: WordThemeColorPalette;
|
|
18
24
|
fontScheme?: WordThemeFontScheme;
|
|
25
|
+
formatScheme?: WordThemeFormatScheme;
|
|
19
26
|
}
|
|
20
27
|
/**
|
|
21
28
|
* Parse the theme root (`a:theme`) into colors + font scheme. Returns an
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-Bom7oDPv.cjs");
|
|
3
3
|
let react = require("react");
|
|
4
4
|
//#region src/public/ui/react.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DbzVC0rr.es.js";
|
|
2
2
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
3
|
//#region src/public/ui/react.ts
|
|
4
4
|
/**
|
package/dist/public/ui.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-Bom7oDPv.cjs");
|
|
3
3
|
exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
|
|
4
4
|
exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
|
|
5
5
|
exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-DbzVC0rr.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|