-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
fabric.ts
190 lines (172 loc) · 6.24 KB
/
fabric.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
export { getEnv, getFabricDocument, getFabricWindow, setEnv } from './src/env';
export { cache } from './src/cache';
export { VERSION as version, iMatrix } from './src/constants';
export { config } from './src/config';
export { classRegistry } from './src/ClassRegistry';
export { runningAnimations } from './src/util/animation/AnimationRegistry';
export * from './src/typedefs';
export * from './src/EventTypeDefs';
export type { ITextEvents } from './src/shapes/IText/ITextBehavior';
export { Observable } from './src/Observable';
export type {
TCanvasSizeOptions,
TSVGExportOptions,
} from './src/canvas/StaticCanvas';
export type { StaticCanvasOptions } from './src/canvas/StaticCanvasOptions';
export { StaticCanvas } from './src/canvas/StaticCanvas';
export { Canvas } from './src/canvas/Canvas';
export type { CanvasOptions } from './src/canvas/CanvasOptions';
export { CanvasDOMManager } from './src/canvas/DOMManagers/CanvasDOMManager';
export { StaticCanvasDOMManager } from './src/canvas/DOMManagers/StaticCanvasDOMManager';
export type { XY } from './src/Point';
export { Point } from './src/Point';
export type { IntersectionType } from './src/Intersection';
export { Intersection } from './src/Intersection';
export { Color } from './src/color/Color';
export * from './src/color/typedefs';
export * from './src/gradient';
export * from './src/Pattern';
export { Shadow } from './src/Shadow';
export type { SerializedShadowOptions } from './src/Shadow';
export { BaseBrush } from './src/brushes/BaseBrush';
export * from './src/brushes/typedefs';
export { PencilBrush } from './src/brushes/PencilBrush';
export { CircleBrush } from './src/brushes/CircleBrush';
export { SprayBrush } from './src/brushes/SprayBrush';
export { PatternBrush } from './src/brushes/PatternBrush';
// many path types
export type * from './src/util/path/typedefs';
export {
FabricObject,
/**
* @deprecated Due to a naming conflict with the
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object JS API},
* `fabric.Object` has been renamed to `FabricObject`
*
* @example
* import { Object } from 'fabric'; // deprecated
* import { FabricObject } from 'fabric'; // migration path
*
*/
FabricObject as Object,
} from './src/shapes/Object/FabricObject';
/**
* Exported so we can tweak default values
*/
export {
FabricObject as BaseFabricObject,
type DrawContext,
} from './src/shapes/Object/Object';
/**
* Exported so we can tweak default values
*/
export { InteractiveFabricObject } from './src/shapes/Object/InteractiveObject';
export type {
TFabricObjectProps,
FabricObjectProps,
SerializedObjectProps,
} from './src/shapes/Object/types';
export type { SerializedLineProps } from './src/shapes/Line';
export { Line } from './src/shapes/Line';
export type { CircleProps, SerializedCircleProps } from './src/shapes/Circle';
export { Circle } from './src/shapes/Circle';
export { Triangle } from './src/shapes/Triangle';
export type {
EllipseProps,
SerializedEllipseProps,
} from './src/shapes/Ellipse';
export { Ellipse } from './src/shapes/Ellipse';
export type { RectProps, SerializedRectProps } from './src/shapes/Rect';
export { Rect } from './src/shapes/Rect';
export type { PathProps, SerializedPathProps } from './src/shapes/Path';
export { Path } from './src/shapes/Path';
export type { SerializedPolylineProps } from './src/shapes/Polyline';
export { Polyline } from './src/shapes/Polyline';
export { Polygon } from './src/shapes/Polygon';
export type {
GraphemeBBox,
SerializedTextProps,
TPathAlign,
TPathSide,
TextProps,
} from './src/shapes/Text/Text';
export {
FabricText,
/**
* @deprecated Due to a naming conflict with the
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Text/Text Web API},
* `fabric.Text` has been renamed to `FabricText`
*
* @example
* import { Text } from 'fabric'; // deprecated
* import { FabricText } from 'fabric'; // migration path
*
*/
FabricText as Text,
} from './src/shapes/Text/Text';
export type {
ITextProps,
SerializedITextProps,
CursorRenderingData,
CursorBoundaries,
} from './src/shapes/IText/IText';
export { IText } from './src/shapes/IText/IText';
export type {
GraphemeData,
SerializedTextboxProps,
TextboxProps,
} from './src/shapes/Textbox';
export { Textbox } from './src/shapes/Textbox';
export type {
CompleteTextStyleDeclaration,
TextStyleDeclaration,
TextStyle,
} from './src/shapes/Text/StyledText';
export type {
GroupEvents,
GroupProps,
GroupOwnProps,
SerializedGroupProps,
} from './src/shapes/Group';
export { Group } from './src/shapes/Group';
export * from './src/LayoutManager';
export type { SerializedLayoutManager } from './src/LayoutManager';
export type {
ActiveSelectionOptions,
MultiSelectionStacking,
} from './src/shapes/ActiveSelection';
export { ActiveSelection } from './src/shapes/ActiveSelection';
export {
FabricImage,
/**
* @deprecated Due to a naming conflict with the
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image Web API},
* `fabric.Image` has been renamed to `FabricImage`
*
* @example
* import { Image } from 'fabric'; // deprecated
* import { FabricImage } from 'fabric'; // migration path
*
*/
FabricImage as Image,
} from './src/shapes/Image';
export type {
ImageSource,
SerializedImageProps,
ImageProps,
} from './src/shapes/Image';
export { createCollectionMixin } from './src/Collection';
export * as util from './src/util';
export { loadSVGFromString } from './src/parser/loadSVGFromString';
export { loadSVGFromURL } from './src/parser/loadSVGFromURL';
export { parseSVGDocument } from './src/parser/parseSVGDocument';
// todo convert tests to jest and stop exporting those.
export { parseAttributes } from './src/parser/parseAttributes';
export { parseStyleAttribute } from './src/parser/parseStyleAttribute';
export { parsePointsAttribute } from './src/parser/parsePointsAttribute';
export { parseTransformAttribute } from './src/parser/parseTransformAttribute';
export { getCSSRules } from './src/parser/getCSSRules';
export { parseFontDeclaration } from './src/parser/parseFontDeclaration';
export { Control } from './src/controls/Control';
export * as controlsUtils from './src/controls';
export * from './src/filters';