aurochs 0.6.4 → 0.7.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/@aurochs-renderer/docx/src/react/DocumentRenderer.d.ts +20 -0
- package/dist/@aurochs-renderer/docx/src/react/PageRenderer.d.ts +22 -0
- package/dist/@aurochs-renderer/docx/src/react/context/docx-drawing-ml-adapter.d.ts +52 -0
- package/dist/@aurochs-renderer/docx/src/react/context/index.d.ts +7 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/AnchorDrawing.d.ts +26 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/ChartPlaceholder.d.ts +34 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/FloatingImageOverlay.d.ts +20 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/InlineDrawing.d.ts +26 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/Picture.d.ts +25 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/TextBox.d.ts +25 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/WordprocessingShape.d.ts +23 -0
- package/dist/@aurochs-renderer/docx/src/react/drawing/index.d.ts +14 -0
- package/dist/@aurochs-renderer/docx/src/react/hooks/index.d.ts +4 -0
- package/dist/@aurochs-renderer/docx/src/react/hooks/useDocumentLayout.d.ts +47 -0
- package/dist/@aurochs-renderer/docx/src/react/index.d.ts +8 -0
- package/dist/@aurochs-renderer/pptx/src/animation/browser-effects.d.ts +105 -0
- package/dist/@aurochs-renderer/pptx/src/animation/click-groups.d.ts +38 -0
- package/dist/@aurochs-renderer/pptx/src/animation/color-interpolate.d.ts +70 -0
- package/dist/@aurochs-renderer/pptx/src/animation/effects.d.ts +191 -0
- package/dist/@aurochs-renderer/pptx/src/animation/engine.d.ts +179 -0
- package/dist/@aurochs-renderer/pptx/src/animation/index.d.ts +21 -0
- package/dist/@aurochs-renderer/pptx/src/animation/interpolate.d.ts +97 -0
- package/dist/@aurochs-renderer/pptx/src/animation/motion-path.d.ts +107 -0
- package/dist/@aurochs-renderer/pptx/src/animation/player.d.ts +35 -0
- package/dist/@aurochs-renderer/pptx/src/react/Background.d.ts +29 -0
- package/dist/@aurochs-renderer/pptx/src/react/ShapeRenderer.d.ts +18 -0
- package/dist/@aurochs-renderer/pptx/src/react/SlideRenderer.d.ts +81 -0
- package/dist/@aurochs-renderer/pptx/src/react/SvgContentRenderer.d.ts +62 -0
- package/dist/@aurochs-renderer/pptx/src/react/context.d.ts +54 -0
- package/dist/@aurochs-renderer/pptx/src/react/drawing-ml-adapter.d.ts +41 -0
- package/dist/@aurochs-renderer/pptx/src/react/hooks/useAnimationPlayer.d.ts +100 -0
- package/dist/@aurochs-renderer/pptx/src/react/hooks/useLazySvgCache.d.ts +59 -0
- package/dist/@aurochs-renderer/pptx/src/react/hooks/useShapeStylePptx.d.ts +48 -0
- package/dist/@aurochs-renderer/pptx/src/react/hooks/useSlideAnimation.d.ts +118 -0
- package/dist/@aurochs-renderer/pptx/src/react/hooks/useSlideTransition.d.ts +44 -0
- package/dist/@aurochs-renderer/pptx/src/react/hooks/useSvgDefs.d.ts +126 -0
- package/dist/@aurochs-renderer/pptx/src/react/index.d.ts +32 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/Fill.d.ts +70 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/Geometry.d.ts +63 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/Stroke.d.ts +31 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/index.d.ts +9 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/text/TextRenderer.d.ts +21 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/text/bullet-render.d.ts +16 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/text/index.d.ts +12 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/text/layout-render.d.ts +21 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/text/span-render.d.ts +45 -0
- package/dist/@aurochs-renderer/pptx/src/react/primitives/text/text-utils.d.ts +38 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/CxnShape.d.ts +23 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/GrpShape.d.ts +20 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/PicShape.d.ts +24 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/SpShape.d.ts +26 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/GraphicFrameRenderer.d.ts +12 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/chart/ChartContent.d.ts +13 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/chart/index.d.ts +5 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/chart/useChartSvg.d.ts +14 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/diagram/DiagramContent.d.ts +20 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/diagram/index.d.ts +5 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/diagram/useDiagramSvg.d.ts +14 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/index.d.ts +14 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/ole-object/OleObjectContent.d.ts +19 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/ole-object/index.d.ts +5 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/ole-object/useOlePreview.d.ts +31 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/shared/Placeholder.d.ts +18 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/shared/SvgInnerHtml.d.ts +20 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/shared/index.d.ts +5 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/table/TableContent.d.ts +13 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/table/index.d.ts +5 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/graphic-frame/table/useTableSvg.d.ts +15 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/index.d.ts +11 -0
- package/dist/@aurochs-renderer/pptx/src/react/shapes/transform.d.ts +24 -0
- package/dist/@aurochs-renderer/pptx/src/react/text-measure/layout-bridge.d.ts +8 -0
- package/dist/@aurochs-renderer/pptx/src/react/text-measure/paragraph-measure.d.ts +5 -0
- package/dist/@aurochs-renderer/pptx/src/react/text-measure/span-measure.d.ts +6 -0
- package/dist/@aurochs-renderer/pptx/src/react/text-measure/svg-text-measure.d.ts +18 -0
- package/dist/@aurochs-renderer/pptx/src/svg/effects3d.d.ts +151 -0
- package/dist/_shared/PageRenderer-DUIodi-i.js +106 -0
- package/dist/_shared/PageRenderer-DUIodi-i.js.map +1 -0
- package/dist/_shared/SvgContentRenderer-DHrGdVuA.js +484 -0
- package/dist/_shared/SvgContentRenderer-DHrGdVuA.js.map +1 -0
- package/dist/_shared/{ast-DfQbpmBT.js → ast-BAFxefpB.js} +5 -5
- package/dist/_shared/{ast-DfQbpmBT.js.map → ast-BAFxefpB.js.map} +1 -1
- package/dist/_shared/{convert-uykpWnhR.js → convert-CWpADSHU.js} +4 -4
- package/dist/_shared/{convert-uykpWnhR.js.map → convert-CWpADSHU.js.map} +1 -1
- package/dist/_shared/defaults-B1OSlyFR.js +17 -0
- package/dist/_shared/defaults-B1OSlyFR.js.map +1 -0
- package/dist/_shared/docx-section-adapter-CE5z-V11.js +2090 -0
- package/dist/_shared/docx-section-adapter-CE5z-V11.js.map +1 -0
- package/dist/_shared/{svg-utils-8G0xyqeI.js → named-colors-Dz9R2ygZ.js} +1 -9
- package/dist/_shared/{svg-utils-8G0xyqeI.js.map → named-colors-Dz9R2ygZ.js.map} +1 -1
- package/dist/_shared/player-6D8yKvH-.js +2013 -0
- package/dist/_shared/player-6D8yKvH-.js.map +1 -0
- package/dist/_shared/{render-chart-ejqhNcuJ.js → preset-shapes-DF6fqHAr.js} +10 -4636
- package/dist/_shared/preset-shapes-DF6fqHAr.js.map +1 -0
- package/dist/_shared/{primitive-DYuL9EYz.js → primitive-CDsByU4b.js} +2 -2
- package/dist/_shared/{primitive-DYuL9EYz.js.map → primitive-CDsByU4b.js.map} +1 -1
- package/dist/_shared/{render-options-BTlnraZC.js → relationships-BDIa-5fP.js} +3 -28
- package/dist/_shared/relationships-BDIa-5fP.js.map +1 -0
- package/dist/_shared/{relationships-DC6KdkEG.js → relationships-ZCtHMC0s.js} +2 -2
- package/dist/_shared/{relationships-DC6KdkEG.js.map → relationships-ZCtHMC0s.js.map} +1 -1
- package/dist/_shared/render-chart-B_w0y2jJ.js +4629 -0
- package/dist/_shared/render-chart-B_w0y2jJ.js.map +1 -0
- package/dist/_shared/{slide-parser-C2Y9L7A2.js → slide-parser-Bag3MjN4.js} +4 -14
- package/dist/_shared/slide-parser-Bag3MjN4.js.map +1 -0
- package/dist/_shared/svg-utils-x7e_VUa6.js +11 -0
- package/dist/_shared/svg-utils-x7e_VUa6.js.map +1 -0
- package/dist/_shared/table-DBhTnVfE.js +3853 -0
- package/dist/_shared/table-DBhTnVfE.js.map +1 -0
- package/dist/_shared/unit-conversion-Cpo0qD72.js +19 -0
- package/dist/_shared/unit-conversion-Cpo0qD72.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/docx/parser/index.js +3 -3
- package/dist/docx/renderer/react/index.js +1115 -0
- package/dist/docx/renderer/react/index.js.map +1 -0
- package/dist/docx/renderer/render-options/index.js +54 -0
- package/dist/docx/renderer/render-options/index.js.map +1 -0
- package/dist/docx/renderer/svg/index.js +27 -1975
- package/dist/docx/renderer/svg/index.js.map +1 -1
- package/dist/docx/viewer/index.js +2 -102
- package/dist/docx/viewer/index.js.map +1 -1
- package/dist/pptx/extract/index.js +1 -1
- package/dist/pptx/parser/index.js +6 -4
- package/dist/pptx/parser/index.js.map +1 -1
- package/dist/pptx/renderer/animation/index.js +448 -0
- package/dist/pptx/renderer/animation/index.js.map +1 -0
- package/dist/pptx/renderer/react/index.js +3667 -0
- package/dist/pptx/renderer/react/index.js.map +1 -0
- package/dist/pptx/renderer/render-options/index.js +59 -0
- package/dist/pptx/renderer/render-options/index.js.map +1 -0
- package/dist/pptx/renderer/svg/index.js +22 -3808
- package/dist/pptx/renderer/svg/index.js.map +1 -1
- package/dist/pptx/viewer/index.js +11 -2560
- package/dist/pptx/viewer/index.js.map +1 -1
- package/dist/xlsx/parser/index.js +2 -2
- package/dist/xlsx/renderer/svg/index.js +3 -2
- package/dist/xlsx/renderer/svg/index.js.map +1 -1
- package/package.json +21 -1
- package/dist/_shared/render-chart-ejqhNcuJ.js.map +0 -1
- package/dist/_shared/render-options-BTlnraZC.js.map +0 -1
- package/dist/_shared/slide-parser-C2Y9L7A2.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PageLayout, SelectionRect, CursorCoordinates } from '@aurochs-office/text-layout';
|
|
3
|
+
export type DocumentRendererProps = {
|
|
4
|
+
/** All pages in the document */
|
|
5
|
+
readonly pages: readonly PageLayout[];
|
|
6
|
+
/** Selection rectangles */
|
|
7
|
+
readonly selection?: readonly SelectionRect[];
|
|
8
|
+
/** Cursor coordinates */
|
|
9
|
+
readonly cursor?: CursorCoordinates;
|
|
10
|
+
/** Whether cursor should blink */
|
|
11
|
+
readonly showCursor?: boolean;
|
|
12
|
+
/** Page click handler */
|
|
13
|
+
readonly onPageClick?: (pageIndex: number, x: number, y: number) => void;
|
|
14
|
+
/** Page double-click handler */
|
|
15
|
+
readonly onPageDoubleClick?: (pageIndex: number, x: number, y: number) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Renders all pages of a DOCX document.
|
|
19
|
+
*/
|
|
20
|
+
export declare function DocumentRenderer({ pages, selection, cursor, showCursor, onPageClick, onPageDoubleClick, }: DocumentRendererProps): ReactNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PageLayout, SelectionRect, CursorCoordinates } from '@aurochs-office/text-layout';
|
|
3
|
+
export type PageRendererProps = {
|
|
4
|
+
/** Page layout data */
|
|
5
|
+
readonly page: PageLayout;
|
|
6
|
+
/** Page index */
|
|
7
|
+
readonly pageIndex: number;
|
|
8
|
+
/** Selection rectangles on this page */
|
|
9
|
+
readonly selection?: readonly SelectionRect[];
|
|
10
|
+
/** Cursor coordinates if on this page */
|
|
11
|
+
readonly cursor?: CursorCoordinates;
|
|
12
|
+
/** Whether cursor should blink */
|
|
13
|
+
readonly showCursor?: boolean;
|
|
14
|
+
/** Page click handler */
|
|
15
|
+
readonly onClick?: (pageIndex: number, x: number, y: number) => void;
|
|
16
|
+
/** Page double-click handler */
|
|
17
|
+
readonly onDoubleClick?: (pageIndex: number, x: number, y: number) => void;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Renders a single page of a DOCX document.
|
|
21
|
+
*/
|
|
22
|
+
export declare function PageRenderer({ page, pageIndex, selection, cursor, showCursor, onClick, onDoubleClick, }: PageRendererProps): ReactNode;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DrawingMLRenderContext } from '@aurochs-renderer/drawing-ml/react';
|
|
2
|
+
import { ColorContext } from '@aurochs-office/drawing-ml/domain/color-context';
|
|
3
|
+
import { DocxDrawingRenderContext, DocxResourceResolver } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Create a DrawingML render context from DOCX drawing context.
|
|
6
|
+
*
|
|
7
|
+
* This adapter bridges DOCX-specific context to the format-agnostic
|
|
8
|
+
* DrawingML rendering context used by shared rendering components.
|
|
9
|
+
*
|
|
10
|
+
* @param docxContext - DOCX drawing render context
|
|
11
|
+
* @returns DrawingML render context suitable for DrawingMLProvider
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* function DocxDrawingRenderer({ docxContext }: Props) {
|
|
16
|
+
* const drawingMLContext = createDrawingMLContextFromDocx(docxContext);
|
|
17
|
+
*
|
|
18
|
+
* return (
|
|
19
|
+
* <DrawingMLProvider {...drawingMLContext}>
|
|
20
|
+
* <SharedDrawingComponent />
|
|
21
|
+
* </DrawingMLProvider>
|
|
22
|
+
* );
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function createDrawingMLContextFromDocx(docxContext: DocxDrawingRenderContext): Omit<DrawingMLRenderContext, "getNextId"> & {
|
|
27
|
+
getNextId: (prefix: string) => string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Create an empty DOCX resource resolver (for testing).
|
|
31
|
+
*/
|
|
32
|
+
export declare function createEmptyDocxResourceResolver(): DocxResourceResolver;
|
|
33
|
+
/**
|
|
34
|
+
* Create a DOCX resource resolver from relationship data and file reader.
|
|
35
|
+
*
|
|
36
|
+
* @param relationships - Document relationships array
|
|
37
|
+
* @param readFile - Function to read file content from package
|
|
38
|
+
* @param getMimeType - Function to get MIME type from path
|
|
39
|
+
* @returns Resource resolver for DOCX drawings
|
|
40
|
+
*/
|
|
41
|
+
export declare function createDocxResourceResolver(relationships: ReadonlyMap<string, {
|
|
42
|
+
target: string;
|
|
43
|
+
type: string;
|
|
44
|
+
}>, readFile: (path: string) => Uint8Array | null, getMimeType: (path: string) => string | undefined): DocxResourceResolver;
|
|
45
|
+
/**
|
|
46
|
+
* Create an empty color context (for testing or when no theme is available).
|
|
47
|
+
*/
|
|
48
|
+
export declare function createEmptyColorContext(): ColorContext;
|
|
49
|
+
/**
|
|
50
|
+
* Create a default DOCX drawing render context for testing.
|
|
51
|
+
*/
|
|
52
|
+
export declare function createDefaultDocxDrawingContext(): DocxDrawingRenderContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file DOCX Drawing Context Module
|
|
3
|
+
*
|
|
4
|
+
* Exports context types and adapter for DOCX drawing rendering.
|
|
5
|
+
*/
|
|
6
|
+
export type { DocxResourceResolver, DocxRenderWarning, DocxWarningCollector, DocxPageSize, DocxPageMargins, DocxDrawingRenderContext, } from './types';
|
|
7
|
+
export { createDrawingMLContextFromDocx, createEmptyDocxResourceResolver, createDocxResourceResolver, createEmptyColorContext, createDefaultDocxDrawingContext, } from './docx-drawing-ml-adapter';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DocxAnchorDrawing } from '@aurochs-office/docx/domain/drawing';
|
|
2
|
+
import { DocxResourceResolver } from '../context';
|
|
3
|
+
/**
|
|
4
|
+
* Props for AnchorDrawing component.
|
|
5
|
+
*/
|
|
6
|
+
export type AnchorDrawingProps = {
|
|
7
|
+
/** Anchor drawing data */
|
|
8
|
+
readonly drawing: DocxAnchorDrawing;
|
|
9
|
+
/** Computed X position in pixels (from layout) */
|
|
10
|
+
readonly x: number;
|
|
11
|
+
/** Computed Y position in pixels (from layout) */
|
|
12
|
+
readonly y: number;
|
|
13
|
+
/** Resource resolver for images */
|
|
14
|
+
readonly resources: DocxResourceResolver;
|
|
15
|
+
/** Unique ID prefix for clip paths */
|
|
16
|
+
readonly idPrefix?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Renders an anchor drawing (wp:anchor) as SVG group.
|
|
20
|
+
*/
|
|
21
|
+
declare function AnchorDrawingBase({ drawing, x, y, resources, idPrefix }: AnchorDrawingProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
/**
|
|
23
|
+
* Memoized AnchorDrawing component.
|
|
24
|
+
*/
|
|
25
|
+
export declare const AnchorDrawing: import('react').MemoExoticComponent<typeof AnchorDrawingBase>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DocxChart } from '@aurochs-office/docx/domain/drawing';
|
|
2
|
+
import { Chart } from '@aurochs-office/chart/domain';
|
|
3
|
+
import { DocxDrawingRenderContext } from '../context';
|
|
4
|
+
/**
|
|
5
|
+
* Props for ChartPlaceholder component.
|
|
6
|
+
*/
|
|
7
|
+
export type ChartPlaceholderProps = {
|
|
8
|
+
/** Chart reference data */
|
|
9
|
+
readonly chart: DocxChart;
|
|
10
|
+
/** Width in pixels */
|
|
11
|
+
readonly width: number;
|
|
12
|
+
/** Height in pixels */
|
|
13
|
+
readonly height: number;
|
|
14
|
+
/** X position in pixels */
|
|
15
|
+
readonly x?: number;
|
|
16
|
+
/** Y position in pixels */
|
|
17
|
+
readonly y?: number;
|
|
18
|
+
/** Parsed chart data (optional - when provided, renders actual chart) */
|
|
19
|
+
readonly chartData?: Chart;
|
|
20
|
+
/** DOCX drawing render context (required when chartData is provided) */
|
|
21
|
+
readonly renderContext?: DocxDrawingRenderContext;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Renders a chart placeholder as SVG elements.
|
|
25
|
+
*
|
|
26
|
+
* When chartData and renderContext are provided, renders the actual chart.
|
|
27
|
+
* Otherwise, renders a placeholder with information about the chart reference.
|
|
28
|
+
*/
|
|
29
|
+
declare function ChartPlaceholderBase({ chart, width, height, x, y, chartData, renderContext, }: ChartPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Memoized ChartPlaceholder component.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ChartPlaceholder: import('react').MemoExoticComponent<typeof ChartPlaceholderBase>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PositionedFloatingImage } from '@aurochs-office/text-layout';
|
|
2
|
+
/**
|
|
3
|
+
* Props for FloatingImageOverlay component.
|
|
4
|
+
*/
|
|
5
|
+
export type FloatingImageOverlayProps = {
|
|
6
|
+
/** Array of positioned floating images to render */
|
|
7
|
+
readonly images: readonly PositionedFloatingImage[];
|
|
8
|
+
/** Unique ID prefix for clip paths */
|
|
9
|
+
readonly idPrefix?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Renders all floating images as an overlay.
|
|
13
|
+
* Images are sorted by z-index (relativeHeight) and behindDoc flag.
|
|
14
|
+
*/
|
|
15
|
+
declare function FloatingImageOverlayBase({ images, idPrefix }: FloatingImageOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
/**
|
|
17
|
+
* Memoized FloatingImageOverlay component.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FloatingImageOverlay: import('react').MemoExoticComponent<typeof FloatingImageOverlayBase>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DocxInlineDrawing } from '@aurochs-office/docx/domain/drawing';
|
|
2
|
+
import { DocxResourceResolver } from '../context';
|
|
3
|
+
/**
|
|
4
|
+
* Props for InlineDrawing component.
|
|
5
|
+
*/
|
|
6
|
+
export type InlineDrawingProps = {
|
|
7
|
+
/** Inline drawing data */
|
|
8
|
+
readonly drawing: DocxInlineDrawing;
|
|
9
|
+
/** X position in pixels (from text layout) */
|
|
10
|
+
readonly x: number;
|
|
11
|
+
/** Y position in pixels (from text layout) */
|
|
12
|
+
readonly y: number;
|
|
13
|
+
/** Resource resolver for images */
|
|
14
|
+
readonly resources: DocxResourceResolver;
|
|
15
|
+
/** Unique ID prefix for clip paths */
|
|
16
|
+
readonly idPrefix?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Renders an inline drawing (wp:inline) as SVG group.
|
|
20
|
+
*/
|
|
21
|
+
declare function InlineDrawingBase({ drawing, x, y, resources, idPrefix }: InlineDrawingProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
/**
|
|
23
|
+
* Memoized InlineDrawing component.
|
|
24
|
+
*/
|
|
25
|
+
export declare const InlineDrawing: import('react').MemoExoticComponent<typeof InlineDrawingBase>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DrawingPicture } from '@aurochs-office/ooxml/domain/drawing';
|
|
2
|
+
/**
|
|
3
|
+
* Props for Picture component.
|
|
4
|
+
*/
|
|
5
|
+
export type PictureProps = {
|
|
6
|
+
/** Picture data from drawing */
|
|
7
|
+
readonly picture: DrawingPicture;
|
|
8
|
+
/** Width in pixels */
|
|
9
|
+
readonly width: number;
|
|
10
|
+
/** Height in pixels */
|
|
11
|
+
readonly height: number;
|
|
12
|
+
/** Resolved image URL (data URL or path) */
|
|
13
|
+
readonly imageUrl: string | undefined;
|
|
14
|
+
/** Unique ID for clip path */
|
|
15
|
+
readonly clipId?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Renders a picture (pic:pic) as SVG image element.
|
|
19
|
+
*/
|
|
20
|
+
declare function PictureBase({ picture, width, height, imageUrl, clipId }: PictureProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
/**
|
|
22
|
+
* Memoized Picture component.
|
|
23
|
+
*/
|
|
24
|
+
export declare const Picture: import('react').MemoExoticComponent<typeof PictureBase>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DocxTextBoxContent, DocxBodyProperties } from '@aurochs-office/docx/domain/drawing';
|
|
2
|
+
/**
|
|
3
|
+
* Props for TextBox component.
|
|
4
|
+
*/
|
|
5
|
+
export type TextBoxProps = {
|
|
6
|
+
/** Text box content */
|
|
7
|
+
readonly content: DocxTextBoxContent;
|
|
8
|
+
/** Body properties (layout constraints) */
|
|
9
|
+
readonly bodyPr?: DocxBodyProperties;
|
|
10
|
+
/** Container width in pixels */
|
|
11
|
+
readonly width: number;
|
|
12
|
+
/** Container height in pixels */
|
|
13
|
+
readonly height: number;
|
|
14
|
+
/** Unique ID prefix for clip paths */
|
|
15
|
+
readonly idPrefix?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Renders text box content as SVG text elements.
|
|
19
|
+
*/
|
|
20
|
+
declare function TextBoxBase({ content, bodyPr, width, height, idPrefix }: TextBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Memoized TextBox component.
|
|
23
|
+
*/
|
|
24
|
+
export declare const TextBox: import('react').MemoExoticComponent<typeof TextBoxBase>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DocxWordprocessingShape } from '@aurochs-office/docx/domain/drawing';
|
|
2
|
+
/**
|
|
3
|
+
* Props for WordprocessingShape component.
|
|
4
|
+
*/
|
|
5
|
+
export type WordprocessingShapeProps = {
|
|
6
|
+
/** Shape data */
|
|
7
|
+
readonly shape: DocxWordprocessingShape;
|
|
8
|
+
/** Width in pixels */
|
|
9
|
+
readonly width: number;
|
|
10
|
+
/** Height in pixels */
|
|
11
|
+
readonly height: number;
|
|
12
|
+
/** Unique ID prefix for patterns/gradients */
|
|
13
|
+
readonly idPrefix?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Renders a WordprocessingML shape (wps:wsp) as SVG elements.
|
|
17
|
+
*/
|
|
18
|
+
declare function WordprocessingShapeBase({ shape, width, height, idPrefix }: WordprocessingShapeProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Memoized WordprocessingShape component.
|
|
21
|
+
*/
|
|
22
|
+
export declare const WordprocessingShape: import('react').MemoExoticComponent<typeof WordprocessingShapeBase>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file DOCX Drawing Components Module
|
|
3
|
+
*
|
|
4
|
+
* React components for rendering DrawingML elements in DOCX documents.
|
|
5
|
+
*
|
|
6
|
+
* @see ECMA-376 Part 1, Section 20.4 (DrawingML - WordprocessingML Drawing)
|
|
7
|
+
*/
|
|
8
|
+
export { Picture, type PictureProps } from './Picture';
|
|
9
|
+
export { InlineDrawing, type InlineDrawingProps } from './InlineDrawing';
|
|
10
|
+
export { AnchorDrawing, type AnchorDrawingProps } from './AnchorDrawing';
|
|
11
|
+
export { FloatingImageOverlay, type FloatingImageOverlayProps } from './FloatingImageOverlay';
|
|
12
|
+
export { WordprocessingShape, type WordprocessingShapeProps } from './WordprocessingShape';
|
|
13
|
+
export { ChartPlaceholder, type ChartPlaceholderProps } from './ChartPlaceholder';
|
|
14
|
+
export { TextBox, type TextBoxProps } from './TextBox';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DocxParagraph } from '@aurochs-office/docx/domain/paragraph';
|
|
2
|
+
import { DocxSectionProperties } from '@aurochs-office/docx/domain/section';
|
|
3
|
+
import { DocxNumbering } from '@aurochs-office/docx/domain/numbering';
|
|
4
|
+
import { Pixels } from '@aurochs-office/drawing-ml/domain/units';
|
|
5
|
+
import { LayoutParagraphResult, LayoutParagraphInput, PagedLayoutResult, PageFlowConfig } from '@aurochs-office/text-layout';
|
|
6
|
+
export type DocumentLayoutMode = "paged" | "continuous";
|
|
7
|
+
export type UseDocumentLayoutOptions = {
|
|
8
|
+
/** Paragraphs to layout */
|
|
9
|
+
readonly paragraphs: readonly DocxParagraph[];
|
|
10
|
+
/** Content width in pixels (without margins) - overrides sectPr if provided */
|
|
11
|
+
readonly contentWidth?: Pixels;
|
|
12
|
+
/** Layout mode */
|
|
13
|
+
readonly mode?: DocumentLayoutMode;
|
|
14
|
+
/** Page configuration (for paged mode) - overrides sectPr if provided */
|
|
15
|
+
readonly pageConfig?: PageFlowConfig;
|
|
16
|
+
/** Section properties from the document - used to derive page config */
|
|
17
|
+
readonly sectPr?: DocxSectionProperties;
|
|
18
|
+
/** Numbering definitions from the document - for list rendering */
|
|
19
|
+
readonly numbering?: DocxNumbering;
|
|
20
|
+
};
|
|
21
|
+
export type DocumentLayoutResult = {
|
|
22
|
+
/** Paged layout result */
|
|
23
|
+
readonly pagedLayout: PagedLayoutResult;
|
|
24
|
+
/** Flat layout result (all paragraphs) */
|
|
25
|
+
readonly paragraphs: readonly LayoutParagraphResult[];
|
|
26
|
+
/** Total document height */
|
|
27
|
+
readonly totalHeight: Pixels;
|
|
28
|
+
/** Layout inputs (for cursor/selection calculations) */
|
|
29
|
+
readonly layoutInputs: readonly LayoutParagraphInput[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Hook for computing document layout.
|
|
33
|
+
*
|
|
34
|
+
* Page configuration is determined in this order:
|
|
35
|
+
* 1. Explicit pageConfig parameter (highest priority)
|
|
36
|
+
* 2. sectPr from the document
|
|
37
|
+
* 3. DEFAULT_PAGE_FLOW_CONFIG (ECMA-376 specification defaults)
|
|
38
|
+
*/
|
|
39
|
+
export declare function useDocumentLayout({ paragraphs, contentWidth: explicitContentWidth, mode, pageConfig: explicitPageConfig, sectPr, numbering, }: UseDocumentLayoutOptions): DocumentLayoutResult;
|
|
40
|
+
/**
|
|
41
|
+
* Create a stable key for paragraph array for caching.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createParagraphKey(paragraphs: readonly DocxParagraph[]): string;
|
|
44
|
+
/**
|
|
45
|
+
* Check if paragraphs have changed significantly.
|
|
46
|
+
*/
|
|
47
|
+
export declare function haveParagraphsChanged(prev: readonly DocxParagraph[], next: readonly DocxParagraph[]): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file React components for DOCX rendering
|
|
3
|
+
*/
|
|
4
|
+
export { type PageRendererProps, PageRenderer } from './PageRenderer';
|
|
5
|
+
export { type DocumentRendererProps, DocumentRenderer } from './DocumentRenderer';
|
|
6
|
+
export { type DocumentLayoutMode, type UseDocumentLayoutOptions, type DocumentLayoutResult, useDocumentLayout, createParagraphKey, haveParagraphsChanged, } from './hooks';
|
|
7
|
+
export { type DocxResourceResolver, type DocxRenderWarning, type DocxWarningCollector, type DocxPageSize, type DocxPageMargins, type DocxDrawingRenderContext, createDrawingMLContextFromDocx, createEmptyDocxResourceResolver, createDocxResourceResolver, createEmptyColorContext, createDefaultDocxDrawingContext, } from './context';
|
|
8
|
+
export { Picture, type PictureProps, InlineDrawing, type InlineDrawingProps, AnchorDrawing, type AnchorDrawingProps, FloatingImageOverlay, type FloatingImageOverlayProps, WordprocessingShape, type WordprocessingShapeProps, ChartPlaceholder, type ChartPlaceholderProps, } from './drawing';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Browser Animation Effects
|
|
3
|
+
*
|
|
4
|
+
* JS-based animation effects using requestAnimationFrame.
|
|
5
|
+
* All 15 effects from MS-OE376 Part 4 Section 4.6.3.
|
|
6
|
+
*
|
|
7
|
+
* @see MS-OE376 Part 4 Section 4.6.3
|
|
8
|
+
* @see ECMA-376 Part 1, Section 19.5.3 (p:animEffect)
|
|
9
|
+
*/
|
|
10
|
+
export type BrowserEffectType = "fade" | "slide" | "wipe" | "blinds" | "box" | "checkerboard" | "circle" | "diamond" | "dissolve" | "strips" | "wheel" | "plus" | "barn" | "randombar" | "wedge";
|
|
11
|
+
export type BrowserEffectDirection = string;
|
|
12
|
+
export type ParsedFilter = {
|
|
13
|
+
type: BrowserEffectType;
|
|
14
|
+
direction: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Parse filter string to effect type and direction.
|
|
18
|
+
* @see MS-OE376 Part 4 Section 4.6.3
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseFilter(filter: string): ParsedFilter;
|
|
21
|
+
/**
|
|
22
|
+
* Fade effect - simple opacity transition.
|
|
23
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - fade filter (no subtypes)
|
|
24
|
+
*/
|
|
25
|
+
export declare function animateFade(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Slide effect - fly in/out from direction.
|
|
28
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - slide filter
|
|
29
|
+
*/
|
|
30
|
+
export declare function animateSlide(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Wipe effect - reveal with clip-path.
|
|
33
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - wipe filter
|
|
34
|
+
*/
|
|
35
|
+
export declare function animateWipe(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Blinds effect - horizontal or vertical blinds.
|
|
38
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - blinds filter
|
|
39
|
+
*/
|
|
40
|
+
export declare function animateBlinds(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Box effect - expand/contract from center.
|
|
43
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - box filter
|
|
44
|
+
*/
|
|
45
|
+
export declare function animateBox(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Circle effect - circular reveal from center.
|
|
48
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - circle filter
|
|
49
|
+
*/
|
|
50
|
+
export declare function animateCircle(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Diamond effect - diamond-shaped reveal from center.
|
|
53
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - diamond filter
|
|
54
|
+
*/
|
|
55
|
+
export declare function animateDiamond(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Dissolve effect - pixelated dissolve (approximated with blur).
|
|
58
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - dissolve filter
|
|
59
|
+
*/
|
|
60
|
+
export declare function animateDissolve(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Strips effect - diagonal strips.
|
|
63
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - strips filter
|
|
64
|
+
*/
|
|
65
|
+
export declare function animateStrips(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Wheel effect - rotating wheel reveal.
|
|
68
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - wheel filter
|
|
69
|
+
*/
|
|
70
|
+
export declare function animateWheel(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Plus effect - plus/cross shape from center.
|
|
73
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - plus filter
|
|
74
|
+
*/
|
|
75
|
+
export declare function animatePlus(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Barn effect - barn door opening/closing.
|
|
78
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - barn filter
|
|
79
|
+
*/
|
|
80
|
+
export declare function animateBarn(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Randombar effect - random horizontal or vertical bars.
|
|
83
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - randombar filter
|
|
84
|
+
*/
|
|
85
|
+
export declare function animateRandombar(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Wedge effect - wedge shape from center.
|
|
88
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - wedge filter
|
|
89
|
+
*/
|
|
90
|
+
export declare function animateWedge(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Checkerboard effect - checkerboard pattern reveal.
|
|
93
|
+
* @see MS-OE376 Part 4 Section 4.6.3 - checkerboard filter
|
|
94
|
+
*/
|
|
95
|
+
export declare function animateCheckerboard(el: HTMLElement | SVGElement, duration: number, direction: string): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Apply effect by type.
|
|
98
|
+
* @see MS-OE376 Part 4 Section 4.6.3
|
|
99
|
+
*/
|
|
100
|
+
export declare function applyBrowserEffect({ el, type, duration, direction, }: {
|
|
101
|
+
el: HTMLElement | SVGElement;
|
|
102
|
+
type: BrowserEffectType;
|
|
103
|
+
duration: number;
|
|
104
|
+
direction: string;
|
|
105
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TimeNode } from '@aurochs-office/pptx/domain/animation';
|
|
2
|
+
/**
|
|
3
|
+
* Click group for step-by-step animation playback.
|
|
4
|
+
*
|
|
5
|
+
* Represents a group of animations that play on a single click/tap in PowerPoint.
|
|
6
|
+
* In ECMA-376, these are `clickEffect` nodes within the `mainSeq` sequence.
|
|
7
|
+
*
|
|
8
|
+
* @see ECMA-376 Part 1, Section 19.5.33 (cTn nodeType)
|
|
9
|
+
*/
|
|
10
|
+
export type ClickGroup = {
|
|
11
|
+
/** 0-based group index */
|
|
12
|
+
readonly index: number;
|
|
13
|
+
/** Time nodes to play for this click */
|
|
14
|
+
readonly nodes: readonly TimeNode[];
|
|
15
|
+
/** Whether this group auto-advances without waiting for click */
|
|
16
|
+
readonly isAutoAdvance: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Timing-like object for extraction.
|
|
20
|
+
*/
|
|
21
|
+
export type TimingLike = {
|
|
22
|
+
readonly rootTimeNode?: TimeNode;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Extract click groups from timing tree.
|
|
26
|
+
*
|
|
27
|
+
* Click groups represent sets of animations that play together on a single
|
|
28
|
+
* click/tap. In PowerPoint, each click advances through these groups.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const groups = extractClickGroups(timing);
|
|
33
|
+
* // groups[0] = first click group
|
|
34
|
+
* // groups[1] = second click group
|
|
35
|
+
* // etc.
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function extractClickGroups(timing: TimingLike | null): ClickGroup[];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { AnimateColorBehavior, AnimateColorSpace, AnimateColorDirection } from '@aurochs-office/pptx/domain/animation';
|
|
2
|
+
import { HslColor, RgbColor } from '@aurochs/color';
|
|
3
|
+
/**
|
|
4
|
+
* Parsed color with alpha
|
|
5
|
+
*/
|
|
6
|
+
export type ParsedColor = {
|
|
7
|
+
readonly rgb: RgbColor;
|
|
8
|
+
readonly alpha: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Parse a color string into RGB values.
|
|
12
|
+
*
|
|
13
|
+
* Supported formats:
|
|
14
|
+
* - "#RRGGBB" (hex)
|
|
15
|
+
* - "#RGB" (short hex)
|
|
16
|
+
* - "#AARRGGBB" (hex with alpha)
|
|
17
|
+
* - "rgb(r, g, b)"
|
|
18
|
+
* - "rgba(r, g, b, a)"
|
|
19
|
+
* - "hsl(h, s%, l%)"
|
|
20
|
+
* - "hsla(h, s%, l%, a)"
|
|
21
|
+
* - Named colors
|
|
22
|
+
*
|
|
23
|
+
* @param color - Color string
|
|
24
|
+
* @returns Parsed color or undefined if unparseable
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseColor(color: string | undefined): ParsedColor | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Interpolate between two RGB colors.
|
|
29
|
+
*
|
|
30
|
+
* @param from - Start color
|
|
31
|
+
* @param to - End color
|
|
32
|
+
* @param t - Progress (0-1)
|
|
33
|
+
* @returns Interpolated color
|
|
34
|
+
*/
|
|
35
|
+
export declare function lerpRGB(from: RgbColor, to: RgbColor, t: number): RgbColor;
|
|
36
|
+
/**
|
|
37
|
+
* Interpolate between two HSL colors with direction control.
|
|
38
|
+
*
|
|
39
|
+
* @param from - Start color (h: 0-360, s/l: 0-1)
|
|
40
|
+
* @param to - End color (h: 0-360, s/l: 0-1)
|
|
41
|
+
* @param t - Progress (0-1)
|
|
42
|
+
* @param direction - Hue rotation direction: "cw" (clockwise) or "ccw" (counter-clockwise)
|
|
43
|
+
* @returns Interpolated color
|
|
44
|
+
*/
|
|
45
|
+
export declare function lerpHSL({ from, to, t, direction, }: {
|
|
46
|
+
from: HslColor;
|
|
47
|
+
to: HslColor;
|
|
48
|
+
t: number;
|
|
49
|
+
direction?: AnimateColorDirection;
|
|
50
|
+
}): HslColor;
|
|
51
|
+
/** Interpolate between two parsed colors and return a CSS color string */
|
|
52
|
+
export declare function interpolateColor({ from, to, t, colorSpace, direction, }: {
|
|
53
|
+
from: ParsedColor;
|
|
54
|
+
to: ParsedColor;
|
|
55
|
+
t: number;
|
|
56
|
+
colorSpace?: AnimateColorSpace;
|
|
57
|
+
direction?: AnimateColorDirection;
|
|
58
|
+
}): string;
|
|
59
|
+
/**
|
|
60
|
+
* Convert RGB to hex string using existing utility.
|
|
61
|
+
*/
|
|
62
|
+
export declare function rgbToHexString(rgb: RgbColor): string;
|
|
63
|
+
/**
|
|
64
|
+
* Create an animation function for color animation.
|
|
65
|
+
*
|
|
66
|
+
* @param behavior - AnimateColorBehavior from timing tree
|
|
67
|
+
* @param element - Target DOM element
|
|
68
|
+
* @returns Animation update function (progress: 0-1) => void
|
|
69
|
+
*/
|
|
70
|
+
export declare function createColorAnimationFunction(behavior: AnimateColorBehavior, element: HTMLElement | SVGElement): (progress: number) => void;
|