react-design-editor 0.0.36 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/react-design-editor.js +16979 -10664
  2. package/dist/react-design-editor.min.js +1 -1
  3. package/dist/react-design-editor.min.js.LICENSE.txt +0 -9
  4. package/package.json +20 -19
  5. package/lib/Canvas.d.ts +0 -18
  6. package/lib/Canvas.js +0 -172
  7. package/lib/CanvasObject.d.ts +0 -10
  8. package/lib/CanvasObject.js +0 -96
  9. package/lib/constants/code.d.ts +0 -19
  10. package/lib/constants/code.js +0 -22
  11. package/lib/constants/defaults.d.ts +0 -38
  12. package/lib/constants/defaults.js +0 -69
  13. package/lib/constants/index.d.ts +0 -3
  14. package/lib/constants/index.js +0 -26
  15. package/lib/handlers/AlignmentHandler.d.ts +0 -18
  16. package/lib/handlers/AlignmentHandler.js +0 -58
  17. package/lib/handlers/AnimationHandler.d.ts +0 -50
  18. package/lib/handlers/AnimationHandler.js +0 -323
  19. package/lib/handlers/ChartHandler.d.ts +0 -8
  20. package/lib/handlers/ChartHandler.js +0 -8
  21. package/lib/handlers/ContextmenuHandler.d.ts +0 -28
  22. package/lib/handlers/ContextmenuHandler.js +0 -65
  23. package/lib/handlers/CropHandler.d.ts +0 -43
  24. package/lib/handlers/CropHandler.js +0 -261
  25. package/lib/handlers/CustomHandler.d.ts +0 -7
  26. package/lib/handlers/CustomHandler.js +0 -10
  27. package/lib/handlers/DrawingHandler.d.ts +0 -28
  28. package/lib/handlers/DrawingHandler.js +0 -318
  29. package/lib/handlers/ElementHandler.d.ts +0 -80
  30. package/lib/handlers/ElementHandler.js +0 -154
  31. package/lib/handlers/EventHandler.d.ts +0 -170
  32. package/lib/handlers/EventHandler.js +0 -880
  33. package/lib/handlers/FiberHandler.d.ts +0 -6
  34. package/lib/handlers/FiberHandler.js +0 -23
  35. package/lib/handlers/GridHandler.d.ts +0 -19
  36. package/lib/handlers/GridHandler.js +0 -77
  37. package/lib/handlers/GuidelineHandler.d.ts +0 -61
  38. package/lib/handlers/GuidelineHandler.js +0 -315
  39. package/lib/handlers/Handler.d.ts +0 -622
  40. package/lib/handlers/Handler.js +0 -1638
  41. package/lib/handlers/ImageHandler.d.ts +0 -307
  42. package/lib/handlers/ImageHandler.js +0 -529
  43. package/lib/handlers/InteractionHandler.d.ts +0 -45
  44. package/lib/handlers/InteractionHandler.js +0 -164
  45. package/lib/handlers/LinkHandler.d.ts +0 -115
  46. package/lib/handlers/LinkHandler.js +0 -247
  47. package/lib/handlers/NodeHandler.d.ts +0 -50
  48. package/lib/handlers/NodeHandler.js +0 -274
  49. package/lib/handlers/PortHandler.d.ts +0 -22
  50. package/lib/handlers/PortHandler.js +0 -179
  51. package/lib/handlers/ShortcutHandler.d.ts +0 -119
  52. package/lib/handlers/ShortcutHandler.js +0 -151
  53. package/lib/handlers/TooltipHandler.d.ts +0 -33
  54. package/lib/handlers/TooltipHandler.js +0 -91
  55. package/lib/handlers/TransactionHandler.d.ts +0 -59
  56. package/lib/handlers/TransactionHandler.js +0 -137
  57. package/lib/handlers/WorkareaHandler.d.ts +0 -43
  58. package/lib/handlers/WorkareaHandler.js +0 -354
  59. package/lib/handlers/ZoomHandler.d.ts +0 -48
  60. package/lib/handlers/ZoomHandler.js +0 -143
  61. package/lib/handlers/index.d.ts +0 -23
  62. package/lib/handlers/index.js +0 -48
  63. package/lib/index.d.ts +0 -6
  64. package/lib/index.js +0 -20
  65. package/lib/objects/Arrow.d.ts +0 -2
  66. package/lib/objects/Arrow.js +0 -40
  67. package/lib/objects/Chart.d.ts +0 -10
  68. package/lib/objects/Chart.js +0 -124
  69. package/lib/objects/CirclePort.d.ts +0 -2
  70. package/lib/objects/CirclePort.js +0 -28
  71. package/lib/objects/Cube.d.ts +0 -5
  72. package/lib/objects/Cube.js +0 -71
  73. package/lib/objects/CurvedLink.d.ts +0 -2
  74. package/lib/objects/CurvedLink.js +0 -51
  75. package/lib/objects/Element.d.ts +0 -13
  76. package/lib/objects/Element.js +0 -84
  77. package/lib/objects/Gif.d.ts +0 -3
  78. package/lib/objects/Gif.js +0 -41
  79. package/lib/objects/Iframe.d.ts +0 -9
  80. package/lib/objects/Iframe.js +0 -70
  81. package/lib/objects/Line.d.ts +0 -2
  82. package/lib/objects/Line.js +0 -24
  83. package/lib/objects/Link.d.ts +0 -15
  84. package/lib/objects/Link.js +0 -106
  85. package/lib/objects/Node.d.ts +0 -59
  86. package/lib/objects/Node.js +0 -271
  87. package/lib/objects/OrthogonalLink.d.ts +0 -2
  88. package/lib/objects/OrthogonalLink.js +0 -54
  89. package/lib/objects/Port.d.ts +0 -12
  90. package/lib/objects/Port.js +0 -28
  91. package/lib/objects/Svg.d.ts +0 -8
  92. package/lib/objects/Svg.js +0 -59
  93. package/lib/objects/Video.d.ts +0 -14
  94. package/lib/objects/Video.js +0 -120
  95. package/lib/objects/index.d.ts +0 -15
  96. package/lib/objects/index.js +0 -32
  97. package/lib/utils/ObjectUtil.d.ts +0 -407
  98. package/lib/utils/ObjectUtil.js +0 -13
  99. package/lib/utils/index.d.ts +0 -1
  100. package/lib/utils/index.js +0 -13
@@ -53,12 +53,3 @@ object-assign
53
53
  * This source code is licensed under the MIT license found in the
54
54
  * LICENSE file in the root directory of this source tree.
55
55
  */
56
-
57
- /** @license React v16.14.0
58
- * react.production.min.js
59
- *
60
- * Copyright (c) Facebook, Inc. and its affiliates.
61
- *
62
- * This source code is licensed under the MIT license found in the
63
- * LICENSE file in the root directory of this source tree.
64
- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-design-editor",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "Design Editor Tools with React.js + ant.design + fabric.js",
5
5
  "main": "dist/react-design-editor.min.js",
6
6
  "typings": "lib/index.d.ts",
@@ -10,10 +10,10 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "test": "echo \"Error: no test specified\" && exit 1",
13
- "build": "npm run clean && webpack -p --config webpack.prod.js && typedoc",
14
- "build:lib": "npm run tsc && webpack -p --config webpack.lib.js",
13
+ "build": "npm run clean && webpack --node-env production --config webpack.prod.js && typedoc",
14
+ "build:lib": "npm run tsc && webpack --node-env production --config webpack.lib.js",
15
15
  "start": "npm install && npm run start:dev",
16
- "start:dev": "webpack-dev-server --config webpack.dev.js --inline",
16
+ "start:dev": "webpack serve --config webpack.dev.js",
17
17
  "ghpages": "npm run build && node scripts/ghpages",
18
18
  "deploy": "npm run build:lib && npm publish",
19
19
  "lint": "npm run tsc",
@@ -40,10 +40,9 @@
40
40
  "homepage": "https://salgum1114.github.io/react-design-editor",
41
41
  "peerDependencies": {
42
42
  "animejs": "^3.0.0",
43
- "fabric": "^3.4.0",
44
- "react": "^16.4.1",
45
- "react-dom": "^16.14.0",
46
- "react-dom-factories": "^1.0.2"
43
+ "fabric": "^3.6.6",
44
+ "react": "^16.14.0",
45
+ "react-dom": "^16.14.0"
47
46
  },
48
47
  "dependencies": {
49
48
  "animejs": "^3.0.0",
@@ -51,7 +50,7 @@
51
50
  "classnames": "^2.2.6",
52
51
  "color": "^3.1.2",
53
52
  "echarts": "^4.7.0",
54
- "fabric": "^3.4.0",
53
+ "fabric": "^3.6.6",
55
54
  "gifler": "^0.1.0",
56
55
  "honeycomb-grid": "^3.1.7",
57
56
  "i18next": "^19.0.0",
@@ -59,12 +58,11 @@
59
58
  "lodash": "^4.17.10",
60
59
  "mediaelement": "^4.2.9",
61
60
  "prop-types": "^15.6.2",
62
- "react": "^16.4.1",
61
+ "react": "^16.14.0",
63
62
  "react-ace": "^8.1.0",
64
63
  "react-color": "^2.14.1",
65
64
  "react-custom-scrollbars": "^4.2.1",
66
65
  "react-dom": "^16.14.0",
67
- "react-dom-factories": "^1.0.2",
68
66
  "react-helmet": "^5.2.0",
69
67
  "react-hot-loader": "^4.12.20",
70
68
  "react-json-view": "^1.19.1",
@@ -80,12 +78,14 @@
80
78
  "@babel/plugin-proposal-decorators": "^7.16.4",
81
79
  "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
82
80
  "@babel/plugin-proposal-private-methods": "^7.16.0",
81
+ "@babel/plugin-proposal-private-property-in-object": "^7.16.0",
83
82
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
84
83
  "@babel/plugin-transform-runtime": "^7.16.4",
85
- "@babel/polyfill": "^7.12.1",
84
+ "@babel/plugin-transform-typescript": "^7.16.1",
86
85
  "@babel/preset-env": "^7.16.4",
87
86
  "@babel/preset-react": "^7.16.0",
88
87
  "@babel/preset-typescript": "^7.16.0",
88
+ "@hot-loader/react-dom": "^17.0.1",
89
89
  "@types/animejs": "^3.1.0",
90
90
  "@types/color": "^3.0.1",
91
91
  "@types/echarts": "^4.4.6",
@@ -101,11 +101,12 @@
101
101
  "babel-loader": "^8.1.0",
102
102
  "babel-plugin-dynamic-import-webpack": "^1.1.0",
103
103
  "babel-plugin-import": "^1.13.0",
104
+ "core-js": "^3.19.1",
104
105
  "css-loader": "^3.5.2",
105
106
  "del": "^5.1.0",
106
- "eslint": "^6.8.0",
107
- "eslint-config-airbnb": "^17.1.0",
108
- "eslint-loader": "^4.0.0",
107
+ "eslint": "^8.3.0",
108
+ "eslint-config-airbnb": "^19.0.0",
109
+ "eslint-loader": "^4.0.2",
109
110
  "eslint-plugin-import": "^2.20.2",
110
111
  "eslint-plugin-jsx-a11y": "^6.2.3",
111
112
  "eslint-plugin-react": "^7.19.0",
@@ -118,15 +119,15 @@
118
119
  "path": "^0.12.7",
119
120
  "serve": "^11.3.0",
120
121
  "style-loader": "^1.1.4",
121
- "terser-webpack-plugin": "^2.3.5",
122
+ "terser-webpack-plugin": "^4.2.3",
122
123
  "tslint": "^6.1.1",
123
124
  "tslint-react": "^5.0.0",
124
125
  "typedoc": "^0.17.4",
125
126
  "typescript": "^3.9.3",
126
127
  "url-loader": "^4.1.0",
127
- "webpack": "^4.43.0",
128
- "webpack-cli": "^3.3.11",
129
- "webpack-dev-server": "^3.10.3",
128
+ "webpack": "^4.46.0",
129
+ "webpack-cli": "^4.9.1",
130
+ "webpack-dev-server": "^3.11.3",
130
131
  "webpack-merge": "^4.2.2",
131
132
  "workbox-webpack-plugin": "^5.1.2"
132
133
  }
package/lib/Canvas.d.ts DELETED
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import Handler, { HandlerOptions } from './handlers/Handler';
3
- import { FabricCanvas } from './utils';
4
- import '../styles/core/canvas.less';
5
- import '../styles/core/tooltip.less';
6
- import '../styles/core/contextmenu.less';
7
- import '../styles/fabricjs/fabricjs.less';
8
- export interface CanvasInstance {
9
- handler: Handler;
10
- canvas: FabricCanvas;
11
- container: HTMLDivElement;
12
- }
13
- export declare type CanvasProps = HandlerOptions & {
14
- responsive?: boolean;
15
- style?: React.CSSProperties;
16
- };
17
- declare const Canvas: React.FC<CanvasProps>;
18
- export default Canvas;
package/lib/Canvas.js DELETED
@@ -1,172 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- const react_1 = __importStar(require("react"));
26
- const fabric_1 = require("fabric");
27
- const resize_observer_polyfill_1 = __importDefault(require("resize-observer-polyfill"));
28
- const Handler_1 = __importDefault(require("./handlers/Handler"));
29
- const constants_1 = require("./constants");
30
- const uuidv4_1 = require("uuidv4");
31
- require("../styles/core/canvas.less");
32
- require("../styles/core/tooltip.less");
33
- require("../styles/core/contextmenu.less");
34
- require("../styles/fabricjs/fabricjs.less");
35
- class InternalCanvas extends react_1.Component {
36
- constructor() {
37
- super(...arguments);
38
- this.containerRef = react_1.default.createRef();
39
- this.state = {
40
- id: uuidv4_1.uuid(),
41
- loaded: false,
42
- };
43
- this.createObserver = () => {
44
- this.resizeObserver = new resize_observer_polyfill_1.default((entries) => {
45
- const { width = 0, height = 0 } = (entries[0] && entries[0].contentRect) || {};
46
- this.handler.eventHandler.resize(width, height);
47
- if (!this.state.loaded) {
48
- this.handleLoad();
49
- }
50
- });
51
- this.resizeObserver.observe(this.containerRef.current);
52
- };
53
- this.destroyObserver = () => {
54
- if (this.resizeObserver) {
55
- this.resizeObserver.disconnect();
56
- this.resizeObserver = null;
57
- }
58
- };
59
- this.handleLoad = () => {
60
- this.setState({
61
- loaded: true,
62
- }, () => {
63
- if (this.props.onLoad) {
64
- this.props.onLoad(this.handler, this.canvas);
65
- }
66
- });
67
- };
68
- }
69
- componentDidMount() {
70
- const { editable, canvasOption, width, height, responsive, ...other } = this.props;
71
- const { id } = this.state;
72
- const mergedCanvasOption = Object.assign({}, constants_1.defaults.canvasOption, canvasOption, {
73
- width,
74
- height,
75
- selection: editable,
76
- });
77
- this.canvas = new fabric_1.fabric.Canvas(`canvas_${id}`, mergedCanvasOption);
78
- this.canvas.setBackgroundColor(mergedCanvasOption.backgroundColor, this.canvas.renderAll.bind(this.canvas));
79
- this.canvas.renderAll();
80
- this.container = this.containerRef.current;
81
- this.handler = new Handler_1.default({
82
- id,
83
- width,
84
- height,
85
- editable,
86
- canvas: this.canvas,
87
- container: this.containerRef.current,
88
- canvasOption: mergedCanvasOption,
89
- ...other,
90
- });
91
- if (this.props.responsive) {
92
- this.createObserver();
93
- }
94
- else {
95
- this.handleLoad();
96
- }
97
- }
98
- componentDidUpdate(prevProps) {
99
- if (this.props.width !== prevProps.width || this.props.height !== prevProps.height) {
100
- this.handler.eventHandler.resize(this.props.width, this.props.height);
101
- }
102
- if (this.props.editable !== prevProps.editable) {
103
- this.handler.editable = this.props.editable;
104
- }
105
- if (this.props.responsive !== prevProps.responsive) {
106
- if (!this.props.responsive) {
107
- this.destroyObserver();
108
- }
109
- else {
110
- this.destroyObserver();
111
- this.createObserver();
112
- }
113
- }
114
- if (JSON.stringify(this.props.canvasOption) !== JSON.stringify(prevProps.canvasOption)) {
115
- this.handler.setCanvasOption(this.props.canvasOption);
116
- }
117
- if (JSON.stringify(this.props.keyEvent) !== JSON.stringify(prevProps.keyEvent)) {
118
- this.handler.setKeyEvent(this.props.keyEvent);
119
- }
120
- if (JSON.stringify(this.props.fabricObjects) !== JSON.stringify(prevProps.fabricObjects)) {
121
- this.handler.setFabricObjects(this.props.fabricObjects);
122
- }
123
- if (JSON.stringify(this.props.workareaOption) !== JSON.stringify(prevProps.workareaOption)) {
124
- this.handler.setWorkareaOption(this.props.workareaOption);
125
- }
126
- if (JSON.stringify(this.props.guidelineOption) !== JSON.stringify(prevProps.guidelineOption)) {
127
- this.handler.setGuidelineOption(this.props.guidelineOption);
128
- }
129
- if (JSON.stringify(this.props.objectOption) !== JSON.stringify(prevProps.objectOption)) {
130
- this.handler.setObjectOption(this.props.objectOption);
131
- }
132
- if (JSON.stringify(this.props.gridOption) !== JSON.stringify(prevProps.gridOption)) {
133
- this.handler.setGridOption(this.props.gridOption);
134
- }
135
- if (JSON.stringify(this.props.propertiesToInclude) !== JSON.stringify(prevProps.propertiesToInclude)) {
136
- this.handler.setPropertiesToInclude(this.props.propertiesToInclude);
137
- }
138
- if (JSON.stringify(this.props.activeSelectionOption) !== JSON.stringify(prevProps.activeSelectionOption)) {
139
- this.handler.setActiveSelectionOption(this.props.activeSelectionOption);
140
- }
141
- }
142
- componentWillUnmount() {
143
- this.destroyObserver();
144
- this.handler.destroy();
145
- }
146
- render() {
147
- const { style } = this.props;
148
- const { id } = this.state;
149
- return (react_1.default.createElement("div", { ref: this.containerRef, id: id, className: "rde-canvas", style: { width: '100%', height: '100%', ...style } },
150
- react_1.default.createElement("canvas", { id: `canvas_${id}` })));
151
- }
152
- }
153
- InternalCanvas.defaultProps = {
154
- id: uuidv4_1.uuid(),
155
- editable: true,
156
- zoomEnabled: true,
157
- minZoom: 30,
158
- maxZoom: 300,
159
- responsive: true,
160
- width: 0,
161
- height: 0,
162
- };
163
- const Canvas = react_1.default.forwardRef((props, ref) => {
164
- const canvasRef = react_1.useRef();
165
- react_1.default.useImperativeHandle(ref, () => ({
166
- handler: canvasRef.current.handler,
167
- canvas: canvasRef.current.canvas,
168
- container: canvasRef.current.container,
169
- }));
170
- return react_1.default.createElement(InternalCanvas, Object.assign({ ref: canvasRef }, props));
171
- });
172
- exports.default = Canvas;
@@ -1,10 +0,0 @@
1
- import { fabric } from 'fabric';
2
- export interface ObjectSchema {
3
- create: (...option: any) => fabric.Object;
4
- }
5
- export interface CanvasObjectSchema {
6
- [key: string]: ObjectSchema;
7
- }
8
- export declare const createCanvasObject: (objectSchema: CanvasObjectSchema) => CanvasObjectSchema;
9
- declare const CanvasObject: CanvasObjectSchema;
10
- export default CanvasObject;
@@ -1,96 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createCanvasObject = void 0;
7
- const fabric_1 = require("fabric");
8
- const objects_1 = require("./objects");
9
- const Svg_1 = __importDefault(require("./objects/Svg"));
10
- exports.createCanvasObject = (objectSchema) => objectSchema;
11
- const CanvasObject = {
12
- group: {
13
- create: ({ objects, ...option }) => new fabric_1.fabric.Group(objects, option),
14
- },
15
- 'i-text': {
16
- create: ({ text, ...option }) => new fabric_1.fabric.IText(text, option),
17
- },
18
- textbox: {
19
- create: ({ text, ...option }) => new fabric_1.fabric.Textbox(text, option),
20
- },
21
- triangle: {
22
- create: (option) => new fabric_1.fabric.Triangle(option),
23
- },
24
- circle: {
25
- create: (option) => new fabric_1.fabric.Circle(option),
26
- },
27
- rect: {
28
- create: (option) => new fabric_1.fabric.Rect(option),
29
- },
30
- cube: {
31
- create: (option) => new objects_1.Cube(option),
32
- },
33
- image: {
34
- create: ({ element = new Image(), ...option }) => new fabric_1.fabric.Image(element, {
35
- ...option,
36
- crossOrigin: 'anonymous',
37
- }),
38
- },
39
- polygon: {
40
- create: ({ points, ...option }) => new fabric_1.fabric.Polygon(points, {
41
- ...option,
42
- perPixelTargetFind: true,
43
- }),
44
- },
45
- line: {
46
- create: ({ points, ...option }) => new objects_1.Line(points, option),
47
- },
48
- arrow: {
49
- create: ({ points, ...option }) => new objects_1.Arrow(points, option),
50
- },
51
- chart: {
52
- create: (option) => new objects_1.Chart(option.chartOption || {
53
- xAxis: {},
54
- yAxis: {},
55
- series: [
56
- {
57
- type: 'line',
58
- data: [
59
- [0, 1],
60
- [1, 2],
61
- [2, 3],
62
- [3, 4],
63
- ],
64
- },
65
- ],
66
- }, option),
67
- },
68
- element: {
69
- create: ({ code, ...option }) => new objects_1.Element(code, option),
70
- },
71
- iframe: {
72
- create: ({ src, ...option }) => new objects_1.Iframe(src, option),
73
- },
74
- video: {
75
- create: ({ src, file, ...option }) => new objects_1.Video(src || file, option),
76
- },
77
- gif: {
78
- create: (option) => new objects_1.Gif(option),
79
- },
80
- node: {
81
- create: (option) => new objects_1.Node(option),
82
- },
83
- link: {
84
- create: (fromNode, fromPort, toNode, toPort, option) => new objects_1.Link(fromNode, fromPort, toNode, toPort, option),
85
- },
86
- curvedLink: {
87
- create: (fromNode, fromPort, toNode, toPort, option) => new objects_1.CurvedLink(fromNode, fromPort, toNode, toPort, option),
88
- },
89
- orthogonalLink: {
90
- create: (fromNode, fromPort, toNode, toPort, option) => new objects_1.OrthogonalLink(fromNode, fromPort, toNode, toPort, option),
91
- },
92
- svg: {
93
- create: (option) => new Svg_1.default(option),
94
- },
95
- };
96
- exports.default = CanvasObject;
@@ -1,19 +0,0 @@
1
- export declare const ESCAPE = "Escape";
2
- export declare const DELETE = "Delete";
3
- export declare const BACKSPACE = "Backspace";
4
- export declare const EQUAL = "Equal";
5
- export declare const MINUS = "Minus";
6
- export declare const KEY_A = "KeyA";
7
- export declare const KEY_Q = "KeyQ";
8
- export declare const KEY_W = "KeyW";
9
- export declare const KEY_C = "KeyC";
10
- export declare const KEY_V = "KeyV";
11
- export declare const KEY_Z = "KeyZ";
12
- export declare const KEY_Y = "KeyY";
13
- export declare const KEY_O = "KeyO";
14
- export declare const KEY_P = "KeyP";
15
- export declare const KEY_X = "KeyX";
16
- export declare const ARROW_UP = "ArrowUp";
17
- export declare const ARROW_DOWN = "ArrowDown";
18
- export declare const ARROW_LEFT = "ArrowLeft";
19
- export declare const ARROW_RIGHT = "ArrowRight";
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ARROW_RIGHT = exports.ARROW_LEFT = exports.ARROW_DOWN = exports.ARROW_UP = exports.KEY_X = exports.KEY_P = exports.KEY_O = exports.KEY_Y = exports.KEY_Z = exports.KEY_V = exports.KEY_C = exports.KEY_W = exports.KEY_Q = exports.KEY_A = exports.MINUS = exports.EQUAL = exports.BACKSPACE = exports.DELETE = exports.ESCAPE = void 0;
4
- exports.ESCAPE = 'Escape';
5
- exports.DELETE = 'Delete';
6
- exports.BACKSPACE = 'Backspace';
7
- exports.EQUAL = 'Equal';
8
- exports.MINUS = 'Minus';
9
- exports.KEY_A = 'KeyA';
10
- exports.KEY_Q = 'KeyQ';
11
- exports.KEY_W = 'KeyW';
12
- exports.KEY_C = 'KeyC';
13
- exports.KEY_V = 'KeyV';
14
- exports.KEY_Z = 'KeyZ';
15
- exports.KEY_Y = 'KeyY';
16
- exports.KEY_O = 'KeyO';
17
- exports.KEY_P = 'KeyP';
18
- exports.KEY_X = 'KeyX';
19
- exports.ARROW_UP = 'ArrowUp';
20
- exports.ARROW_DOWN = 'ArrowDown';
21
- exports.ARROW_LEFT = 'ArrowLeft';
22
- exports.ARROW_RIGHT = 'ArrowRight';
@@ -1,38 +0,0 @@
1
- import { FabricObjectOption, WorkareaObject } from '../utils';
2
- export declare const canvasOption: {
3
- preserveObjectStacking: boolean;
4
- width: number;
5
- height: number;
6
- selection: boolean;
7
- defaultCursor: string;
8
- backgroundColor: string;
9
- };
10
- export declare const keyEvent: {
11
- move: boolean;
12
- all: boolean;
13
- copy: boolean;
14
- paste: boolean;
15
- esc: boolean;
16
- del: boolean;
17
- clipboard: boolean;
18
- transaction: boolean;
19
- zoom: boolean;
20
- cut: boolean;
21
- grab: boolean;
22
- };
23
- export declare const gridOption: {
24
- enabled: boolean;
25
- grid: number;
26
- snapToGrid: boolean;
27
- lineColor: string;
28
- borderColor: string;
29
- };
30
- export declare const workareaOption: Partial<WorkareaObject>;
31
- export declare const objectOption: Partial<FabricObjectOption>;
32
- export declare const guidelineOption: {
33
- enabled: boolean;
34
- };
35
- export declare const activeSelectionOption: {
36
- hasControls: boolean;
37
- };
38
- export declare const propertiesToInclude: string[];
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.propertiesToInclude = exports.activeSelectionOption = exports.guidelineOption = exports.objectOption = exports.workareaOption = exports.gridOption = exports.keyEvent = exports.canvasOption = void 0;
4
- exports.canvasOption = {
5
- preserveObjectStacking: true,
6
- width: 300,
7
- height: 150,
8
- selection: true,
9
- defaultCursor: 'default',
10
- backgroundColor: '#f3f3f3',
11
- };
12
- exports.keyEvent = {
13
- move: true,
14
- all: true,
15
- copy: true,
16
- paste: true,
17
- esc: true,
18
- del: true,
19
- clipboard: false,
20
- transaction: true,
21
- zoom: true,
22
- cut: true,
23
- grab: true,
24
- };
25
- exports.gridOption = {
26
- enabled: false,
27
- grid: 10,
28
- snapToGrid: false,
29
- lineColor: '#ebebeb',
30
- borderColor: '#cccccc',
31
- };
32
- exports.workareaOption = {
33
- width: 600,
34
- height: 400,
35
- workareaWidth: 600,
36
- workareaHeight: 400,
37
- lockScalingX: true,
38
- lockScalingY: true,
39
- scaleX: 1,
40
- scaleY: 1,
41
- backgroundColor: '#fff',
42
- hasBorders: false,
43
- hasControls: false,
44
- selectable: false,
45
- lockMovementX: true,
46
- lockMovementY: true,
47
- hoverCursor: 'default',
48
- name: '',
49
- id: 'workarea',
50
- type: 'image',
51
- layout: 'fixed',
52
- link: {},
53
- tooltip: {
54
- enabled: false,
55
- },
56
- isElement: false,
57
- };
58
- exports.objectOption = {
59
- rotation: 0,
60
- centeredRotation: true,
61
- strokeUniform: true,
62
- };
63
- exports.guidelineOption = {
64
- enabled: true,
65
- };
66
- exports.activeSelectionOption = {
67
- hasControls: true,
68
- };
69
- exports.propertiesToInclude = ['id', 'name', 'locked', 'editable'];
@@ -1,3 +0,0 @@
1
- import * as defaults from './defaults';
2
- import * as code from './code';
3
- export { defaults, code };
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.code = exports.defaults = void 0;
23
- const defaults = __importStar(require("./defaults"));
24
- exports.defaults = defaults;
25
- const code = __importStar(require("./code"));
26
- exports.code = code;
@@ -1,18 +0,0 @@
1
- import Handler from './Handler';
2
- declare class AlignmentHandler {
3
- handler: Handler;
4
- constructor(handler: Handler);
5
- /**
6
- * Align left at selection
7
- */
8
- left: () => void;
9
- /**
10
- * Align center at selection
11
- */
12
- center: () => void;
13
- /**
14
- * Align right at selection
15
- */
16
- right: () => void;
17
- }
18
- export default AlignmentHandler;