presenter 0.5.4 → 0.6.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 +0 -54
- package/dist/eslint.config.d.mts +2 -0
- package/dist/export.js +1 -0
- package/dist/jest.config.d.ts +0 -2
- package/dist/presenter.js +1 -1
- package/dist/src/constructors/Grid.d.ts +21 -0
- package/dist/src/export/image-renderer/ImageRenderer.d.ts +9 -0
- package/dist/src/export/image-renderer/types/ImageRendererProps.d.ts +26 -0
- package/dist/src/export/image-renderer/types/ImageRendererState.d.ts +8 -0
- package/dist/src/export/index.d.ts +2 -24
- package/dist/src/export/pdf-renderer/PDFRenderer.d.ts +10 -0
- package/dist/src/export/pdf-renderer/types/PDFRendererProps.d.ts +8 -0
- package/dist/src/export/pdf-renderer/types/PDFRendererState.d.ts +5 -0
- package/dist/src/export/utils/createCanvasElement.d.ts +3 -0
- package/dist/src/export/utils/createPath2D.d.ts +2 -0
- package/dist/src/export/utils/loadPresentationImages.d.ts +2 -0
- package/dist/src/index.d.ts +43 -25
- package/dist/src/navigator/openNavigator.d.ts +8 -0
- package/dist/src/objects/Arrow.d.ts +18 -0
- package/dist/src/objects/Circle.d.ts +16 -0
- package/dist/src/objects/Group.d.ts +17 -0
- package/dist/src/objects/Image.d.ts +15 -0
- package/dist/src/objects/Line.d.ts +15 -0
- package/dist/src/objects/Mask.d.ts +15 -0
- package/dist/src/objects/Path.d.ts +19 -0
- package/dist/src/objects/Polygon.d.ts +13 -0
- package/dist/src/objects/Rectangle.d.ts +18 -0
- package/dist/src/objects/Text.d.ts +25 -0
- package/dist/src/renderer/browser-canvas/BrowserCanvasRenderer.d.ts +12 -0
- package/dist/src/renderer/browser-canvas/objects/renderArrow.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderCircle.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderGroup.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderImage.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderLine.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderMask.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderPath.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderPolygon.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderRectangle.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/objects/renderText.d.ts +3 -0
- package/dist/src/renderer/browser-canvas/types/BrowserCanvasObjectRenderer.d.ts +13 -0
- package/dist/src/renderer/browser-canvas/types/BrowserCanvasRendererProps.d.ts +9 -0
- package/dist/src/renderer/browser-canvas/types/BrowserCanvasRendererState.d.ts +16 -0
- package/dist/src/renderer/browser-canvas/types/UnifiedCanvasContext.d.ts +18 -0
- package/dist/src/renderer/browser-canvas/types/UnifiedImage.d.ts +18 -0
- package/dist/src/renderer/browser-canvas/types/UnifiedPath2D.d.ts +18 -0
- package/dist/src/renderer/browser-canvas/utils/clearCanvas.d.ts +2 -0
- package/dist/src/renderer/browser-canvas/utils/createCanvasElement.d.ts +2 -0
- package/dist/src/renderer/browser-canvas/utils/createPath2D.d.ts +2 -0
- package/dist/src/renderer/browser-canvas/utils/defaultObjectRenderers.d.ts +10 -0
- package/dist/src/renderer/browser-canvas/utils/drawStroke.d.ts +15 -0
- package/dist/src/renderer/browser-canvas/utils/fillPath.d.ts +11 -0
- package/dist/src/renderer/browser-canvas/utils/getPathFromPoints.d.ts +4 -0
- package/dist/src/renderer/browser-canvas/utils/getSizeFromTextMetrics.d.ts +2 -0
- package/dist/src/renderer/browser-canvas/utils/loadPresentationImages.d.ts +2 -0
- package/dist/src/renderer/browser-canvas/utils/text/getTextUnitMeasurements.d.ts +5 -0
- package/dist/src/renderer/browser-canvas/utils/text/setContextWithTextStyle.d.ts +3 -0
- package/dist/src/types/Alignment.d.ts +7 -0
- package/dist/src/types/Anchor.d.ts +13 -0
- package/dist/src/types/Animate.d.ts +18 -0
- package/dist/src/types/AnimationType.d.ts +9 -0
- package/dist/src/types/BaseUnitSlideAnimation.d.ts +7 -0
- package/dist/src/types/BoundingBox.d.ts +10 -0
- package/dist/src/types/Color.d.ts +23 -0
- package/dist/src/types/Easing.d.ts +10 -0
- package/dist/src/types/EasingFunction.d.ts +2 -0
- package/dist/src/types/FontStyle.d.ts +8 -0
- package/dist/src/types/FontWeight.d.ts +13 -0
- package/dist/src/types/Interpolator.d.ts +7 -0
- package/dist/src/types/ObjectType.d.ts +14 -0
- package/dist/src/types/PathWithLength.d.ts +5 -0
- package/dist/src/types/Pause.d.ts +7 -0
- package/dist/src/types/Position.d.ts +6 -0
- package/dist/src/types/Presentation.d.ts +17 -0
- package/dist/src/types/Resources.d.ts +5 -0
- package/dist/src/types/ShortcutState.d.ts +13 -0
- package/dist/src/types/Size.d.ts +6 -0
- package/dist/src/types/Slide.d.ts +12 -0
- package/dist/src/types/SlideAnimation.d.ts +6 -0
- package/dist/src/types/SlideObject.d.ts +5 -0
- package/dist/src/types/TextContent.d.ts +2 -0
- package/dist/src/types/TextStyle.d.ts +12 -0
- package/dist/src/types/TextUnit.d.ts +6 -0
- package/dist/src/types/Update.d.ts +9 -0
- package/dist/src/utils/animate/getSlideAnimationDuration.d.ts +2 -0
- package/dist/src/utils/animate/updateObjectStateWithAnimation.d.ts +13 -0
- package/dist/src/utils/color/Opaque.d.ts +2 -0
- package/dist/src/utils/color/Transparent.d.ts +2 -0
- package/dist/src/utils/color/getAlphaForColor.d.ts +6 -0
- package/dist/src/utils/color/getHexStringForColor.d.ts +2 -0
- package/dist/src/utils/color/getRgbStringForColor.d.ts +2 -0
- package/dist/src/utils/core/assertNever.d.ts +1 -0
- package/dist/src/utils/interpolate/defaultInterpolators.d.ts +2 -0
- package/dist/src/utils/interpolate/getSmoothPathInterpolator.d.ts +2 -0
- package/dist/src/utils/interpolate/interpolate.d.ts +3 -0
- package/dist/src/utils/interpolate/interpolateColor.d.ts +3 -0
- package/dist/src/utils/interpolate/interpolateFallback.d.ts +3 -0
- package/dist/src/utils/interpolate/interpolateNumber.d.ts +2 -0
- package/dist/src/utils/layout/getBoundingBox.d.ts +5 -0
- package/dist/src/utils/layout/getSizingFunctions.d.ts +10 -0
- package/dist/src/utils/objects/arrow/getArrowPoints.d.ts +9 -0
- package/dist/src/utils/objects/circle/getCirclePath.d.ts +4 -0
- package/dist/src/utils/objects/line/getLinePath.d.ts +4 -0
- package/dist/src/utils/objects/polygon/getPolygonPath.d.ts +4 -0
- package/dist/src/utils/objects/rectangle/getRectanglePath.d.ts +4 -0
- package/dist/src/utils/objects/rectangle/getRoundedRectanglePath.d.ts +5 -0
- package/dist/src/utils/objects/text/getTextContentLength.d.ts +2 -0
- package/dist/src/utils/objects/text/getTextStyleFromText.d.ts +3 -0
- package/dist/src/utils/objects/text/getTextUnitsFromTextContent.d.ts +3 -0
- package/dist/src/utils/presentation/createPresentationContainer.d.ts +2 -0
- package/dist/src/utils/presentation/getObjectChildren.d.ts +5 -0
- package/dist/src/utils/presentation/getObjectState.d.ts +12 -0
- package/dist/src/utils/presentation/getPresentationShortcuts.d.ts +3 -0
- package/dist/src/utils/presentation/isFullBodyPresentation.d.ts +1 -0
- package/dist/src/utils/presentation/setupKeyEventListeners.d.ts +10 -0
- package/dist/src/utils/size/getCombinedSizes2D.d.ts +7 -0
- package/dist/src/utils/slide/getKeySlideBuildIndices.d.ts +5 -0
- package/dist/src/utils/storage/StorageState.d.ts +5 -0
- package/dist/src/utils/storage/loadPresentationState.d.ts +3 -0
- package/dist/src/utils/storage/storageConsts.d.ts +1 -0
- package/dist/src/utils/storage/storePresentationState.d.ts +2 -0
- package/package.json +21 -26
- package/dist/354.js +0 -2
- package/dist/354.js.LICENSE.txt +0 -20
- package/dist/418.js +0 -2
- package/dist/418.js.LICENSE.txt +0 -1
- package/dist/661.js +0 -1
- package/dist/presenter-code.js +0 -1
- package/dist/presenter-export.js +0 -2
- package/dist/presenter-export.js.LICENSE.txt +0 -313
- package/dist/presenter-morph.js +0 -1
- package/dist/src/code/codeBlock.d.ts +0 -108
- package/dist/src/code/index.d.ts +0 -1
- package/dist/src/export/util.d.ts +0 -4
- package/dist/src/library/bullets.d.ts +0 -15
- package/dist/src/library/mainTitle.d.ts +0 -4
- package/dist/src/library/slideTitle.d.ts +0 -4
- package/dist/src/morph/index.d.ts +0 -34
- package/dist/src/objects/arrow.d.ts +0 -62
- package/dist/src/objects/circle.d.ts +0 -24
- package/dist/src/objects/grid.d.ts +0 -17
- package/dist/src/objects/group.d.ts +0 -29
- package/dist/src/objects/iframe.d.ts +0 -16
- package/dist/src/objects/image.d.ts +0 -20
- package/dist/src/objects/line.d.ts +0 -21
- package/dist/src/objects/mask.d.ts +0 -13
- package/dist/src/objects/paragraph.d.ts +0 -21
- package/dist/src/objects/path.d.ts +0 -29
- package/dist/src/objects/polygon.d.ts +0 -13
- package/dist/src/objects/rectangle.d.ts +0 -26
- package/dist/src/objects/screenCapture.d.ts +0 -17
- package/dist/src/objects/text.d.ts +0 -67
- package/dist/src/objects/vectorGraphic.d.ts +0 -48
- package/dist/src/presentation/object.d.ts +0 -132
- package/dist/src/presentation/presentation.d.ts +0 -153
- package/dist/src/presentation/presentation.test.d.ts +0 -1
- package/dist/src/presentation/slide.d.ts +0 -43
- package/dist/src/presentation/storage.d.ts +0 -9
- package/dist/src/util/animation.d.ts +0 -60
- package/dist/src/util/easing.d.ts +0 -12
- package/dist/src/util/easing.test.d.ts +0 -1
- package/dist/src/util/position.d.ts +0 -11
- package/dist/src/util/richText.d.ts +0 -19
- package/dist/webpack.config.d.ts +0 -70
- /package/dist/src/{objects/text.test.d.ts → utils/size/getCombinedSizes2D.test.d.ts} +0 -0
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { BoundingBox } from "../util/position";
|
|
2
|
-
import { Slide } from "./slide";
|
|
3
|
-
export interface PresentationFont {
|
|
4
|
-
url: string;
|
|
5
|
-
fontFamily: string;
|
|
6
|
-
fontStyle?: string;
|
|
7
|
-
fontWeight?: string | number;
|
|
8
|
-
}
|
|
9
|
-
export interface PresentationOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Width of the presentation.
|
|
12
|
-
*/
|
|
13
|
-
width: number;
|
|
14
|
-
/**
|
|
15
|
-
* Height of the presentation.
|
|
16
|
-
*/
|
|
17
|
-
height: number;
|
|
18
|
-
/**
|
|
19
|
-
* Slide color for the presentation.
|
|
20
|
-
*/
|
|
21
|
-
backgroundColor: string;
|
|
22
|
-
/**
|
|
23
|
-
* Fonts to embed in PDF export.
|
|
24
|
-
*/
|
|
25
|
-
fonts: PresentationFont[];
|
|
26
|
-
/**
|
|
27
|
-
* How long cached presentation state should be valid for, in minutes.
|
|
28
|
-
* `null` menas don't use cached data at all.
|
|
29
|
-
* `0` means use cached data indefinitely.
|
|
30
|
-
*
|
|
31
|
-
* When presentation state is cached, reloading the presentation returns
|
|
32
|
-
* the user to the slide and build they were on previously.
|
|
33
|
-
*/
|
|
34
|
-
stateCacheTTL: number | null;
|
|
35
|
-
}
|
|
36
|
-
interface PresentationState {
|
|
37
|
-
currentSlide: number;
|
|
38
|
-
}
|
|
39
|
-
export declare class Presentation {
|
|
40
|
-
/**
|
|
41
|
-
* Title of the presentation.
|
|
42
|
-
*/
|
|
43
|
-
title: string;
|
|
44
|
-
/**
|
|
45
|
-
* Element where presentation should be mounted.
|
|
46
|
-
*/
|
|
47
|
-
element: HTMLElement;
|
|
48
|
-
/**
|
|
49
|
-
* SVG container element.
|
|
50
|
-
*/
|
|
51
|
-
container: HTMLElement;
|
|
52
|
-
/**
|
|
53
|
-
* Parent SVG element of presentation.
|
|
54
|
-
*/
|
|
55
|
-
svg: SVGSVGElement | null;
|
|
56
|
-
/**
|
|
57
|
-
* Shadow SVG element, not displayed and used for calculating sizes.
|
|
58
|
-
*/
|
|
59
|
-
shadow: SVGSVGElement | null;
|
|
60
|
-
/**
|
|
61
|
-
* Background SVG element, used for rendering background color.
|
|
62
|
-
*/
|
|
63
|
-
background: SVGSVGElement | null;
|
|
64
|
-
/**
|
|
65
|
-
* Additional element container for elements that aren't part of the SVG.
|
|
66
|
-
*/
|
|
67
|
-
additionalElementContainer: HTMLElement | null;
|
|
68
|
-
/**
|
|
69
|
-
* Element that allows navigation between different slides.
|
|
70
|
-
*/
|
|
71
|
-
navigatorContainer: HTMLElement | null;
|
|
72
|
-
/**
|
|
73
|
-
* Presentation settings.
|
|
74
|
-
*/
|
|
75
|
-
options: PresentationOptions;
|
|
76
|
-
/**
|
|
77
|
-
* Bounds of presentation.
|
|
78
|
-
*/
|
|
79
|
-
boundingBox: BoundingBox;
|
|
80
|
-
/**
|
|
81
|
-
* Presentation slides.
|
|
82
|
-
*/
|
|
83
|
-
slides: Slide[];
|
|
84
|
-
/**
|
|
85
|
-
* Presentation state.
|
|
86
|
-
*/
|
|
87
|
-
presentationState: PresentationState;
|
|
88
|
-
/**
|
|
89
|
-
* Keyboard shortcut access to jump to particular slides.
|
|
90
|
-
* A null slide index indicates not changing the slide
|
|
91
|
-
* (i.e. keeping the same slide active.)
|
|
92
|
-
*/
|
|
93
|
-
shortcuts: Record<string, {
|
|
94
|
-
slideIndex: number | null;
|
|
95
|
-
animationIndex: number;
|
|
96
|
-
}>;
|
|
97
|
-
/**
|
|
98
|
-
* Current text command that the presenter has entered into presentation.
|
|
99
|
-
*/
|
|
100
|
-
textCommand: {
|
|
101
|
-
active: boolean;
|
|
102
|
-
command: string;
|
|
103
|
-
};
|
|
104
|
-
slideCleanupHandlers: (() => void)[];
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @param title Title of the presentation.
|
|
108
|
-
*/
|
|
109
|
-
constructor(title: string, slides: Slide[], element: HTMLElement, options?: Partial<PresentationOptions>);
|
|
110
|
-
present(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Renders a slide.
|
|
113
|
-
*/
|
|
114
|
-
renderSlide(slideIndex: number, animationIndex?: number | "last"): void;
|
|
115
|
-
/**
|
|
116
|
-
* Sets up keyboard commands for the presentation.
|
|
117
|
-
*/
|
|
118
|
-
setupKeyboardCommands(): void;
|
|
119
|
-
handleKeyboardEvent(event: KeyboardEvent): void;
|
|
120
|
-
resetTextCommand(): void;
|
|
121
|
-
/**
|
|
122
|
-
* Updates the size of the parent SVG element.
|
|
123
|
-
*
|
|
124
|
-
* The size of the parent SVG element needs to be updated.
|
|
125
|
-
*/
|
|
126
|
-
updateSVGContainerSize(): void;
|
|
127
|
-
/**
|
|
128
|
-
* Advances to next animation in slide, or next slide if there is no next animation.
|
|
129
|
-
* Returns true if we were able to successfully advance.
|
|
130
|
-
* @param includeIntermediateBuilds Determines whether to progress through builds.
|
|
131
|
-
*/
|
|
132
|
-
next(includeIntermediateBuilds: boolean): Promise<boolean>;
|
|
133
|
-
/**
|
|
134
|
-
* Goes back to the previous slide.
|
|
135
|
-
* @param includeIntermediateBuilds Determines whether to progress through builds.
|
|
136
|
-
*/
|
|
137
|
-
previous(includeIntermediateBuilds: boolean): void;
|
|
138
|
-
/**
|
|
139
|
-
* Checks if the presentation takes the entire document body.
|
|
140
|
-
* @returns True if the presentation takes the entire document body.
|
|
141
|
-
*/
|
|
142
|
-
isFullBodyPresentation(): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Computes the current size of an element in the DOM.
|
|
145
|
-
* Optionally accepts a custom list of children to see what the size of an
|
|
146
|
-
* element would be with different children.
|
|
147
|
-
* @param element Element to compute size of.
|
|
148
|
-
* @param children Custom children to use for element.
|
|
149
|
-
* @returns BoundingBox
|
|
150
|
-
*/
|
|
151
|
-
computeRenderedBoundingBox(element: SVGGraphicsElement, children?: Node[] | null): BoundingBox;
|
|
152
|
-
}
|
|
153
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { BuildFunctionSequence } from "../util/animation";
|
|
2
|
-
import { SlideObject } from "./object";
|
|
3
|
-
import { Presentation } from "./presentation";
|
|
4
|
-
export interface SlideProps {
|
|
5
|
-
/**
|
|
6
|
-
* An optional title for the slide, shown in navigation bar.
|
|
7
|
-
*/
|
|
8
|
-
title: string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Additional HTML element to show behind SVG content.
|
|
11
|
-
*/
|
|
12
|
-
additionalElement: HTMLElement | (() => HTMLElement) | null;
|
|
13
|
-
/**
|
|
14
|
-
* A shortcut allows a keyboard shortcut to link directly to a slide.
|
|
15
|
-
* Represented as either just a string (the shortcut),
|
|
16
|
-
* or a string and number (shortcut and animation index).
|
|
17
|
-
*/
|
|
18
|
-
shortcuts: (string | [string, number])[];
|
|
19
|
-
}
|
|
20
|
-
export declare class Slide {
|
|
21
|
-
objects: SlideObject<any>[];
|
|
22
|
-
animations: BuildFunctionSequence;
|
|
23
|
-
/**
|
|
24
|
-
* Which animation we're set to render next.
|
|
25
|
-
* Slides start with animationIndex = 0.
|
|
26
|
-
*/
|
|
27
|
-
animationIndex: number;
|
|
28
|
-
/**
|
|
29
|
-
* Property used by the presenter-export package to note which
|
|
30
|
-
* animations of the slide are meant to be exported.
|
|
31
|
-
* "first", "last", "all", and "none" are special-cased values,
|
|
32
|
-
* otherwise it can be an animationIndex in [0, animations.length].
|
|
33
|
-
*/
|
|
34
|
-
keyBuilds: "first" | "last" | "all" | "none" | number[] | null;
|
|
35
|
-
props: SlideProps;
|
|
36
|
-
constructor(objects: SlideObject<any>[], animations?: BuildFunctionSequence, props?: Partial<SlideProps>);
|
|
37
|
-
render(presentation: Presentation, animationIndex?: number): void;
|
|
38
|
-
nextAnimation(): Promise<boolean>;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the build indices that are meant to be exported.
|
|
41
|
-
*/
|
|
42
|
-
getKeyBuilds(): number[];
|
|
43
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Presentation } from "./presentation";
|
|
2
|
-
export declare function storePresentationState(presentation: Presentation): void;
|
|
3
|
-
/**
|
|
4
|
-
* Restores the presentation state from the cache, if it exists and isn't older
|
|
5
|
-
* than the cache TTL in minutes.
|
|
6
|
-
*
|
|
7
|
-
* Returns `true` if the presentation state was updated.
|
|
8
|
-
*/
|
|
9
|
-
export declare function restorePresentationState(presentation: Presentation, ttl: number | null): boolean;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import anime from "animejs/lib/anime.es.js";
|
|
2
|
-
export { anime };
|
|
3
|
-
/**
|
|
4
|
-
* Data needed to process an animation.
|
|
5
|
-
*/
|
|
6
|
-
export interface AnimationProps {
|
|
7
|
-
/**
|
|
8
|
-
* Whether to animate the change.
|
|
9
|
-
*/
|
|
10
|
-
animate?: boolean;
|
|
11
|
-
element?: HTMLElement | SVGElement;
|
|
12
|
-
attributes?: Record<string, string>;
|
|
13
|
-
styles?: Record<string, string>;
|
|
14
|
-
animationParams?: anime.AnimeParams;
|
|
15
|
-
children?: Node[];
|
|
16
|
-
/**
|
|
17
|
-
* Delay, in milliseconds.
|
|
18
|
-
*/
|
|
19
|
-
delay?: number;
|
|
20
|
-
/**
|
|
21
|
-
* An animation can also specify custom functions that can be called to
|
|
22
|
-
* perform an animation or update to the end state of the animation.
|
|
23
|
-
*/
|
|
24
|
-
animateCallback?: () => void;
|
|
25
|
-
updateCallback?: () => void;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Function that performs an animation on an element.
|
|
29
|
-
*/
|
|
30
|
-
export type Animator = (props: AnimationProps | AnimationProps[]) => Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Function that possibly applies a sequence of animations.
|
|
33
|
-
*/
|
|
34
|
-
export type BuildFunction = (animate: Animator) => void;
|
|
35
|
-
/**
|
|
36
|
-
* A build function sequence is a sequence, where each element is a build
|
|
37
|
-
* function or a list of build functions to be performed on the same build.
|
|
38
|
-
*
|
|
39
|
-
* In a list of build functions, a number in place of a build function represents a delay.
|
|
40
|
-
*/
|
|
41
|
-
export type BuildFunctionSequence = (BuildFunction | (BuildFunction | number)[])[];
|
|
42
|
-
/**
|
|
43
|
-
* Perform an animation on an element.
|
|
44
|
-
* @param props Animation properties.
|
|
45
|
-
*/
|
|
46
|
-
export declare const performAnimation: Animator;
|
|
47
|
-
/**
|
|
48
|
-
* Performs animations by skipping the animation duration and jumping to end of animation.
|
|
49
|
-
* @param props Animation properties.
|
|
50
|
-
*/
|
|
51
|
-
export declare const skipAnimation: Animator;
|
|
52
|
-
/**
|
|
53
|
-
* When performing animations on non-DOM elements, e.g. variables in the state
|
|
54
|
-
* of a Three.js scene, we need a unchanging reference to state that may get
|
|
55
|
-
* replaced. That state can hold any type.
|
|
56
|
-
*/
|
|
57
|
-
export interface StateContainer<T> {
|
|
58
|
-
state: T;
|
|
59
|
-
}
|
|
60
|
-
export declare function animateStateChange<T>(state: StateContainer<T>, finalState: Partial<T>, duration?: number): BuildFunction;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clamps a value to a given range.
|
|
3
|
-
*/
|
|
4
|
-
export declare function clamp(value: number, min: number, max: number): number;
|
|
5
|
-
/**
|
|
6
|
-
* Maps a [0, 1] value linearly onto [0, 1].
|
|
7
|
-
*/
|
|
8
|
-
export declare function easeLinear(value: number): number;
|
|
9
|
-
/**
|
|
10
|
-
* Maps a [0, 1] value onto [0, 1] via a smoothstep cubic easing function.
|
|
11
|
-
*/
|
|
12
|
-
export declare function easeCubic(value: number): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface Position {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
export declare class BoundingBox {
|
|
6
|
-
origin: Position;
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
constructor(origin: Position, width: number, height: number);
|
|
10
|
-
static fromElement(element: SVGGraphicsElement): BoundingBox;
|
|
11
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TextContent } from "../objects/text";
|
|
2
|
-
export interface RichTextProps {
|
|
3
|
-
fontStyle?: string;
|
|
4
|
-
fontWeight?: string | number;
|
|
5
|
-
fontSize?: string | number;
|
|
6
|
-
fontFamily?: string;
|
|
7
|
-
textDecoration?: string;
|
|
8
|
-
smallCaps?: boolean;
|
|
9
|
-
color?: string;
|
|
10
|
-
dy?: number;
|
|
11
|
-
superscript?: boolean;
|
|
12
|
-
subscript?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type RichTextSpan = string | [string, RichTextProps];
|
|
15
|
-
export declare function preserveLeadingSpaces(content: TextContent): TextContent;
|
|
16
|
-
/**
|
|
17
|
-
* Given rich text configuration, returns the corresponding tspan nodes.
|
|
18
|
-
*/
|
|
19
|
-
export declare function generateTextNodes(lines: (string | RichTextSpan[])[], lineSpacing?: string, anchor?: "start" | "middle" | "end"): Node[];
|
package/dist/webpack.config.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export let mode: string;
|
|
2
|
-
export namespace entry {
|
|
3
|
-
export namespace presenter {
|
|
4
|
-
let _import: string;
|
|
5
|
-
export { _import as import };
|
|
6
|
-
export let filename: string;
|
|
7
|
-
export namespace library {
|
|
8
|
-
let name: string;
|
|
9
|
-
let type: string;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export namespace _export {
|
|
13
|
-
let _import_1: string;
|
|
14
|
-
export { _import_1 as import };
|
|
15
|
-
let filename_1: string;
|
|
16
|
-
export { filename_1 as filename };
|
|
17
|
-
export namespace library_1 {
|
|
18
|
-
let name_1: string;
|
|
19
|
-
export { name_1 as name };
|
|
20
|
-
let type_1: string;
|
|
21
|
-
export { type_1 as type };
|
|
22
|
-
}
|
|
23
|
-
export { library_1 as library };
|
|
24
|
-
}
|
|
25
|
-
export { _export as export };
|
|
26
|
-
export namespace morph {
|
|
27
|
-
let _import_2: string;
|
|
28
|
-
export { _import_2 as import };
|
|
29
|
-
let filename_2: string;
|
|
30
|
-
export { filename_2 as filename };
|
|
31
|
-
export namespace library_2 {
|
|
32
|
-
let name_2: string;
|
|
33
|
-
export { name_2 as name };
|
|
34
|
-
let type_2: string;
|
|
35
|
-
export { type_2 as type };
|
|
36
|
-
}
|
|
37
|
-
export { library_2 as library };
|
|
38
|
-
}
|
|
39
|
-
export namespace code {
|
|
40
|
-
let _import_3: string;
|
|
41
|
-
export { _import_3 as import };
|
|
42
|
-
let filename_3: string;
|
|
43
|
-
export { filename_3 as filename };
|
|
44
|
-
export namespace library_3 {
|
|
45
|
-
let name_3: string;
|
|
46
|
-
export { name_3 as name };
|
|
47
|
-
let type_3: string;
|
|
48
|
-
export { type_3 as type };
|
|
49
|
-
}
|
|
50
|
-
export { library_3 as library };
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export namespace output {
|
|
54
|
-
let path: string;
|
|
55
|
-
let libraryTarget: string;
|
|
56
|
-
let globalObject: string;
|
|
57
|
-
}
|
|
58
|
-
export namespace watchOptions {
|
|
59
|
-
let ignored: string[];
|
|
60
|
-
}
|
|
61
|
-
export namespace resolve {
|
|
62
|
-
let extensions: string[];
|
|
63
|
-
}
|
|
64
|
-
export namespace module {
|
|
65
|
-
let rules: {
|
|
66
|
-
test: RegExp;
|
|
67
|
-
use: string;
|
|
68
|
-
exclude: RegExp[];
|
|
69
|
-
}[];
|
|
70
|
-
}
|
|
File without changes
|