@logicflow/core 2.2.0-alpha.7 → 2.2.1

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 (137) hide show
  1. package/package.json +6 -1
  2. package/.turbo/turbo-build$colon$dev.log +0 -10
  3. package/.turbo/turbo-build.log +0 -33
  4. package/CHANGELOG.md +0 -1901
  5. package/__tests__/algorithm/egde.test.ts +0 -131
  6. package/__tests__/algorithm/index.test.ts +0 -74
  7. package/__tests__/algorithm/outline.test.ts +0 -43
  8. package/__tests__/bugs/1545-spec.test.ts +0 -42
  9. package/__tests__/event/event.test.ts +0 -22
  10. package/__tests__/history/history.test.ts +0 -28
  11. package/__tests__/logicflow.test.ts +0 -575
  12. package/__tests__/model/graphmodel.test.ts +0 -87
  13. package/__tests__/util/compatible.test.ts +0 -48
  14. package/__tests__/util/edge.test.ts +0 -224
  15. package/__tests__/util/geometry.test.ts +0 -14
  16. package/__tests__/util/graph.test.ts +0 -16
  17. package/__tests__/util/matrix.test.ts +0 -41
  18. package/__tests__/util/node.test.ts +0 -68
  19. package/__tests__/util/sampling.test.ts +0 -12
  20. package/__tests__/util/vector.test.ts +0 -50
  21. package/__tests__/util/zIndex.test.ts +0 -10
  22. package/src/LogicFlow.tsx +0 -2017
  23. package/src/algorithm/edge.ts +0 -67
  24. package/src/algorithm/index.ts +0 -70
  25. package/src/algorithm/outline.ts +0 -77
  26. package/src/algorithm/rotate.ts +0 -55
  27. package/src/common/drag.ts +0 -219
  28. package/src/common/history.ts +0 -108
  29. package/src/common/index.ts +0 -6
  30. package/src/common/keyboard.ts +0 -108
  31. package/src/common/matrix.ts +0 -122
  32. package/src/common/vector.ts +0 -93
  33. package/src/constant/index.ts +0 -179
  34. package/src/constant/theme.ts +0 -708
  35. package/src/event/event.md +0 -66
  36. package/src/event/eventArgs.ts +0 -643
  37. package/src/event/eventEmitter.ts +0 -156
  38. package/src/history/index.ts +0 -119
  39. package/src/index.less +0 -1
  40. package/src/index.ts +0 -26
  41. package/src/keyboard/index.ts +0 -112
  42. package/src/keyboard/shortcut.ts +0 -200
  43. package/src/model/BaseModel.ts +0 -250
  44. package/src/model/EditConfigModel.ts +0 -334
  45. package/src/model/GraphModel.ts +0 -1824
  46. package/src/model/NestedTransformModel.ts +0 -121
  47. package/src/model/SnaplineModel.ts +0 -256
  48. package/src/model/TransformModel.ts +0 -258
  49. package/src/model/edge/BaseEdgeModel.ts +0 -785
  50. package/src/model/edge/BezierEdgeModel.ts +0 -197
  51. package/src/model/edge/LineEdgeModel.ts +0 -36
  52. package/src/model/edge/PolylineEdgeModel.ts +0 -817
  53. package/src/model/edge/index.ts +0 -4
  54. package/src/model/index.ts +0 -9
  55. package/src/model/node/BaseNodeModel.ts +0 -959
  56. package/src/model/node/CircleNodeModel.ts +0 -91
  57. package/src/model/node/DiamondNodeModel.ts +0 -132
  58. package/src/model/node/EllipseNodeModel.ts +0 -98
  59. package/src/model/node/HtmlNodeModel.ts +0 -64
  60. package/src/model/node/PolygonNodeModel.ts +0 -152
  61. package/src/model/node/RectNodeModel.ts +0 -69
  62. package/src/model/node/TextNodeModel.ts +0 -54
  63. package/src/model/node/index.ts +0 -8
  64. package/src/options.ts +0 -150
  65. package/src/style/index.less +0 -262
  66. package/src/style/raw.ts +0 -221
  67. package/src/tool/MultipleSelectTool.tsx +0 -140
  68. package/src/tool/TextEditTool.tsx +0 -193
  69. package/src/tool/index.ts +0 -101
  70. package/src/typings.d.ts +0 -5
  71. package/src/util/animation.ts +0 -29
  72. package/src/util/browser.ts +0 -4
  73. package/src/util/compatible.ts +0 -15
  74. package/src/util/drag.ts +0 -219
  75. package/src/util/edge.ts +0 -1094
  76. package/src/util/geometry.ts +0 -154
  77. package/src/util/graph.ts +0 -46
  78. package/src/util/index.ts +0 -17
  79. package/src/util/matrix.ts +0 -129
  80. package/src/util/mobx.ts +0 -23
  81. package/src/util/node.ts +0 -543
  82. package/src/util/raf.ts +0 -28
  83. package/src/util/resize.ts +0 -606
  84. package/src/util/sampling.ts +0 -85
  85. package/src/util/theme.ts +0 -84
  86. package/src/util/uuid.ts +0 -26
  87. package/src/util/vector.ts +0 -93
  88. package/src/util/zIndex.ts +0 -6
  89. package/src/view/Anchor.tsx +0 -462
  90. package/src/view/Control.tsx +0 -510
  91. package/src/view/Graph.tsx +0 -141
  92. package/src/view/Rotate.tsx +0 -113
  93. package/src/view/behavior/dnd.ts +0 -162
  94. package/src/view/behavior/index.ts +0 -2
  95. package/src/view/behavior/snapline.ts +0 -16
  96. package/src/view/edge/AdjustPoint.tsx +0 -425
  97. package/src/view/edge/Arrow.tsx +0 -54
  98. package/src/view/edge/BaseEdge.tsx +0 -660
  99. package/src/view/edge/BezierEdge.tsx +0 -101
  100. package/src/view/edge/LineEdge.tsx +0 -81
  101. package/src/view/edge/PolylineEdge.tsx +0 -311
  102. package/src/view/edge/index.ts +0 -6
  103. package/src/view/index.ts +0 -8
  104. package/src/view/node/BaseNode.tsx +0 -585
  105. package/src/view/node/CircleNode.tsx +0 -21
  106. package/src/view/node/DiamondNode.tsx +0 -24
  107. package/src/view/node/EllipseNode.tsx +0 -22
  108. package/src/view/node/HtmlNode.tsx +0 -112
  109. package/src/view/node/PolygonNode.tsx +0 -28
  110. package/src/view/node/RectNode.tsx +0 -30
  111. package/src/view/node/TextNode.tsx +0 -39
  112. package/src/view/node/index.ts +0 -8
  113. package/src/view/overlay/BackgroundOverlay.tsx +0 -34
  114. package/src/view/overlay/BezierAdjustOverlay.tsx +0 -150
  115. package/src/view/overlay/CanvasOverlay.tsx +0 -290
  116. package/src/view/overlay/Grid.tsx +0 -319
  117. package/src/view/overlay/ModificationOverlay.tsx +0 -31
  118. package/src/view/overlay/OutlineOverlay.tsx +0 -158
  119. package/src/view/overlay/SnaplineOverlay.tsx +0 -44
  120. package/src/view/overlay/ToolOverlay.tsx +0 -65
  121. package/src/view/overlay/getTransformHoc.tsx +0 -50
  122. package/src/view/overlay/gridConfig.ts +0 -103
  123. package/src/view/overlay/index.ts +0 -8
  124. package/src/view/shape/Circle.tsx +0 -41
  125. package/src/view/shape/Ellipse.tsx +0 -42
  126. package/src/view/shape/Line.tsx +0 -39
  127. package/src/view/shape/Path.tsx +0 -22
  128. package/src/view/shape/Polygon.tsx +0 -54
  129. package/src/view/shape/Polyline.tsx +0 -31
  130. package/src/view/shape/Rect.tsx +0 -44
  131. package/src/view/shape/Text.tsx +0 -168
  132. package/src/view/shape/index.ts +0 -8
  133. package/src/view/text/BaseText.tsx +0 -134
  134. package/src/view/text/LineText.tsx +0 -168
  135. package/src/view/text/index.ts +0 -2
  136. package/stats.html +0 -4842
  137. package/tsconfig.json +0 -18
@@ -1,708 +0,0 @@
1
- import LogicFlow from '../LogicFlow'
2
-
3
- export const DEFAULT_GRID_SIZE = 10
4
-
5
- export const defaultTheme: LogicFlow.Theme = {
6
- baseNode: {
7
- fill: '#fff',
8
- stroke: '#474747',
9
- strokeWidth: 2,
10
- radius: 12,
11
- },
12
- baseEdge: {
13
- stroke: '#474747',
14
- strokeWidth: 2,
15
- radius: 12,
16
- },
17
- rect: {
18
- shadow: {
19
- dx: 0,
20
- dy: 0,
21
- stdDeviation: 4,
22
- floodColor: '#9CA1AA55',
23
- },
24
- },
25
- circle: {},
26
- diamond: {},
27
- ellipse: {},
28
- polygon: {},
29
- html: {
30
- fill: 'transparent',
31
- stroke: 'transparent',
32
- shadow: {
33
- dx: 0,
34
- dy: 0,
35
- stdDeviation: 4,
36
- floodColor: '#9CA1AA55',
37
- },
38
- },
39
- text: {
40
- color: '#474747',
41
- stroke: 'none',
42
- fontSize: 12,
43
- background: {
44
- fill: 'transparent',
45
- },
46
- },
47
- nodeText: {
48
- color: '#474747',
49
- overflowMode: 'default',
50
- fontSize: 12,
51
- lineHeight: 1.2,
52
- },
53
- anchor: {
54
- stroke: '#474747',
55
- fill: '#fff',
56
- r: 4,
57
- hover: {
58
- r: 8,
59
- fill: '#707070',
60
- fillOpacity: 0.15,
61
- stroke: 'transparent',
62
- },
63
- },
64
- anchorLine: {
65
- stroke: '#474747',
66
- strokeWidth: 2,
67
- strokeDasharray: '3,2',
68
- },
69
- line: {},
70
- polyline: {},
71
- bezier: {
72
- fill: 'none',
73
- adjustLine: {
74
- stroke: '#949494',
75
- },
76
- adjustAnchor: {
77
- r: 4,
78
- fill: '#949494',
79
- fillOpacity: 1,
80
- stroke: '#949494',
81
- },
82
- },
83
- edgeText: {
84
- textWidth: 100,
85
- overflowMode: 'default',
86
- fontSize: 12,
87
- background: {
88
- fill: '#fff',
89
- },
90
- },
91
- arrow: {
92
- strokeLinecap: 'round',
93
- strokeLinejoin: 'round',
94
- offset: 10,
95
- verticalLength: 5, // 箭头垂直于边的距离
96
- },
97
- snapline: {
98
- strokeLinecap: 'round',
99
- strokeLinejoin: 'round',
100
- stroke: '#AAAAAA',
101
- strokeWidth: 1,
102
- strokeDasharray: '3,3',
103
- },
104
- edgeAdjust: {
105
- r: 4,
106
- fill: '#fff',
107
- stroke: '#474747',
108
- strokeWidth: 1,
109
- },
110
- outline: {
111
- fill: 'none',
112
- stroke: 'transparent', // 矩形默认不显示调整边框
113
- strokeWidth: 0,
114
- },
115
- edgeOutline: {
116
- fill: 'transparent',
117
- stroke: '#757575',
118
- strokeWidth: 1.5,
119
- strokeDasharray: '4,4',
120
- radius: 8,
121
- hover: {
122
- stroke: '#4271DF',
123
- },
124
- },
125
- edgeAnimation: {
126
- stroke: '#4271DF',
127
- strokeDasharray: '12,4,6,4',
128
- strokeDashoffset: '100%',
129
- animationName: 'lf_animate_dash',
130
- animationDuration: '20s',
131
- animationIterationCount: 'infinite',
132
- animationTimingFunction: 'linear',
133
- animationDirection: 'normal',
134
- },
135
- rotateControl: {
136
- stroke: '#474747',
137
- fill: '#fff',
138
- strokeWidth: 1,
139
- hover: {
140
- fill: '#707070',
141
- fillOpacity: 0.15,
142
- stroke: 'transparent',
143
- },
144
- },
145
- resizeControl: {
146
- width: 8,
147
- height: 8,
148
- radius: 2,
149
- fill: '#fff',
150
- stroke: '#474747',
151
- hover: {
152
- width: 12,
153
- height: 12,
154
- fill: '#707070',
155
- fillOpacity: 0.15,
156
- stroke: 'transparent',
157
- },
158
- },
159
- resizeOutline: {
160
- fill: 'transparent',
161
- stroke: '#757575',
162
- strokeWidth: 1.5,
163
- strokeDasharray: '4,4',
164
- radius: 8,
165
- hover: {
166
- stroke: '#4271DF',
167
- },
168
- },
169
- }
170
- export const retroTheme: LogicFlow.Theme = {
171
- baseNode: {
172
- fill: '#fff',
173
- stroke: '#000',
174
- strokeWidth: 2,
175
- },
176
-
177
- baseEdge: {
178
- stroke: '#000',
179
- strokeWidth: 2,
180
- },
181
-
182
- rect: {},
183
- circle: {},
184
- diamond: {},
185
- ellipse: {},
186
- polygon: {},
187
- html: {
188
- fill: 'transparent',
189
- stroke: 'transparent',
190
- },
191
-
192
- text: {
193
- color: '#000',
194
- stroke: 'none',
195
- fontSize: 12,
196
- background: {
197
- fill: 'transparent',
198
- },
199
- },
200
-
201
- anchor: {
202
- stroke: '#000',
203
- fill: '#fff',
204
- r: 4,
205
- hover: {
206
- r: 10,
207
- fill: '#949494',
208
- fillOpacity: 0.5,
209
- stroke: '#949494',
210
- },
211
- },
212
-
213
- anchorLine: {
214
- stroke: '#000',
215
- strokeWidth: 2,
216
- strokeDasharray: '3,2',
217
- },
218
-
219
- nodeText: {
220
- color: '#000',
221
- overflowMode: 'default',
222
- fontSize: 12,
223
- lineHeight: 1.2,
224
- },
225
-
226
- edgeText: {
227
- textWidth: 100,
228
- overflowMode: 'default',
229
- fontSize: 12,
230
- background: {
231
- fill: '#fff',
232
- },
233
- },
234
-
235
- line: {},
236
- polyline: {},
237
-
238
- bezier: {
239
- fill: 'none',
240
- adjustLine: {
241
- stroke: '#949494',
242
- },
243
- adjustAnchor: {
244
- r: 4,
245
- fill: '#949494',
246
- fillOpacity: 1,
247
- stroke: '#949494',
248
- },
249
- },
250
-
251
- arrow: {
252
- offset: 10,
253
- verticalLength: 5, // 箭头垂直于边的距离
254
- },
255
-
256
- snapline: {
257
- stroke: '#949494',
258
- strokeWidth: 1,
259
- },
260
-
261
- edgeAdjust: {
262
- r: 4,
263
- fill: '#fff',
264
- stroke: '#949494',
265
- strokeWidth: 2,
266
- },
267
-
268
- outline: {
269
- fill: 'transparent',
270
- stroke: '#949494',
271
- strokeDasharray: '3,3',
272
- hover: {
273
- stroke: '#949494',
274
- },
275
- },
276
-
277
- edgeOutline: {
278
- fill: 'transparent',
279
- stroke: '#949494',
280
- strokeDasharray: '3,3',
281
- hover: {
282
- stroke: '#949494',
283
- },
284
- },
285
-
286
- edgeAnimation: {
287
- stroke: 'red',
288
- strokeDasharray: '10,10',
289
- strokeDashoffset: '100%',
290
- animationName: 'lf_animate_dash',
291
- animationDuration: '20s',
292
- animationIterationCount: 'infinite',
293
- animationTimingFunction: 'linear',
294
- animationDirection: 'normal',
295
- },
296
-
297
- rotateControl: {
298
- stroke: '#000',
299
- fill: '#fff',
300
- strokeWidth: 1.5,
301
- },
302
-
303
- resizeControl: {
304
- width: 7,
305
- height: 7,
306
- fill: '#fff',
307
- stroke: '#000',
308
- },
309
-
310
- resizeOutline: {
311
- fill: 'none',
312
- stroke: 'transparent', // 矩形默认不显示调整边框
313
- strokeWidth: 1,
314
- strokeDasharray: '3,3',
315
- },
316
- }
317
- export const darkTheme: LogicFlow.Theme = {
318
- baseNode: {
319
- fill: '#33353A',
320
- stroke: '#EAEAEA',
321
- strokeWidth: 2,
322
- radius: 12,
323
- },
324
- baseEdge: {
325
- stroke: '#EAEAEA',
326
- strokeWidth: 2,
327
- radius: 12,
328
- },
329
- rect: {},
330
- circle: {},
331
- diamond: {},
332
- ellipse: {},
333
- polygon: {},
334
- html: {
335
- fill: '#33353A',
336
- stroke: 'transparent',
337
- shadow: {
338
- dx: 0,
339
- dy: 0,
340
- stdDeviation: 4,
341
- floodColor: '#9CA1AA55',
342
- },
343
- },
344
- text: {
345
- color: '#EAEAEA',
346
- stroke: 'none',
347
- fontSize: 12,
348
- background: {
349
- fill: 'transparent',
350
- },
351
- },
352
- nodeText: {
353
- color: '#EAEAEA',
354
- overflowMode: 'default',
355
- fontSize: 12,
356
- lineHeight: 1.2,
357
- },
358
- anchor: {
359
- stroke: '#EAEAEA',
360
- fill: '#33353A',
361
- r: 4,
362
- hover: {
363
- r: 8,
364
- fill: '#707070',
365
- fillOpacity: 0.15,
366
- stroke: 'transparent',
367
- },
368
- },
369
- anchorLine: {
370
- stroke: '#EAEAEA',
371
- strokeWidth: 2,
372
- strokeDasharray: '3,2',
373
- },
374
- line: {},
375
- polyline: {},
376
- bezier: {
377
- fill: 'none',
378
- adjustLine: {
379
- stroke: '#EAEAEA',
380
- },
381
- adjustAnchor: {
382
- r: 4,
383
- fill: '#33353A',
384
- fillOpacity: 1,
385
- stroke: '#EAEAEA',
386
- },
387
- },
388
- edgeText: {
389
- textWidth: 100,
390
- overflowMode: 'default',
391
- fontSize: 12,
392
- background: {
393
- fill: '#EAEAEA',
394
- },
395
- },
396
- arrow: {
397
- strokeLinecap: 'round',
398
- strokeLinejoin: 'round',
399
- offset: 10,
400
- verticalLength: 5, // 箭头垂直于边的距离
401
- },
402
- snapline: {
403
- strokeLinecap: 'round',
404
- strokeLinejoin: 'round',
405
- stroke: '#949494',
406
- strokeWidth: 1,
407
- },
408
- edgeAdjust: {
409
- r: 4,
410
- fill: '#33353A',
411
- stroke: '#EAEAEA',
412
- strokeWidth: 1,
413
- },
414
- outline: {
415
- fill: 'none',
416
- stroke: 'transparent', // 矩形默认不显示调整边框
417
- strokeWidth: 0,
418
- },
419
- edgeOutline: {
420
- fill: 'transparent',
421
- stroke: '#EAEAEA',
422
- strokeWidth: 1.5,
423
- strokeDasharray: '4,4',
424
- radius: 8,
425
- hover: {
426
- stroke: '#4271DF',
427
- },
428
- },
429
- edgeAnimation: {
430
- stroke: '#4271DF',
431
- strokeDasharray: '12,4,6,4',
432
- strokeDashoffset: '100%',
433
- animationName: 'lf_animate_dash',
434
- animationDuration: '20s',
435
- animationIterationCount: 'infinite',
436
- animationTimingFunction: 'linear',
437
- animationDirection: 'normal',
438
- },
439
-
440
- rotateControl: {
441
- stroke: '#EAEAEA',
442
- fill: '#33353A',
443
- strokeWidth: 1,
444
- hover: {
445
- fill: '#707070',
446
- fillOpacity: 0.15,
447
- stroke: 'transparent',
448
- },
449
- },
450
-
451
- resizeControl: {
452
- width: 8,
453
- height: 8,
454
- radius: 2,
455
- fill: '#33353A',
456
- stroke: '#EAEAEA',
457
- hover: {
458
- width: 12,
459
- height: 12,
460
- fill: '#707070',
461
- fillOpacity: 0.15,
462
- stroke: 'transparent',
463
- },
464
- },
465
-
466
- resizeOutline: {
467
- fill: 'transparent',
468
- stroke: '#EAEAEA',
469
- strokeWidth: 1.5,
470
- strokeDasharray: '4,4',
471
- radius: 8,
472
- hover: {
473
- stroke: '#4271DF',
474
- },
475
- },
476
- }
477
- export const colorfulTheme: LogicFlow.Theme = {
478
- baseNode: {
479
- fill: '#fff',
480
- stroke: '#474747',
481
- strokeWidth: 2,
482
- radius: 12,
483
- },
484
- baseEdge: {
485
- stroke: '#474747',
486
- strokeWidth: 2,
487
- radius: 12,
488
- },
489
- rect: { fill: '#72CBFF', stroke: '#3ABDF9', radius: 8 },
490
- circle: { fill: '#FFE075', stroke: '#F9CE3A', radius: 8 },
491
- ellipse: { fill: '#FFA8A8', stroke: '#FF6B66', radius: 8 },
492
- text: { fill: '#72CBFF', radius: 8, fontSize: 12 },
493
- diamond: { fill: '#96F7AF', stroke: '#40EF7E', radius: 8 },
494
- polygon: { fill: '#E0A8FF', stroke: '#C271FF', radius: 8 },
495
- nodeText: {
496
- color: '#474747',
497
- overflowMode: 'default',
498
- fontSize: 12,
499
- lineHeight: 1.2,
500
- },
501
- edgeText: {
502
- textWidth: 100,
503
- overflowMode: 'default',
504
- fontSize: 12,
505
- background: {
506
- fill: '#fff',
507
- },
508
- },
509
- html: {
510
- fill: '#fff',
511
- stroke: 'transparent',
512
- strokeWidth: 0,
513
- },
514
- anchor: {
515
- stroke: '#474747',
516
- fill: '#fff',
517
- r: 4,
518
- hover: {
519
- r: 8,
520
- fill: '#707070',
521
- fillOpacity: 0.15,
522
- stroke: 'transparent',
523
- },
524
- },
525
- anchorLine: {
526
- stroke: '#474747',
527
- strokeWidth: 2,
528
- strokeDasharray: '3,2',
529
- },
530
- line: {},
531
- polyline: { radius: 8 },
532
- bezier: {
533
- fill: 'none',
534
- adjustLine: {
535
- stroke: '#3ABDF9',
536
- },
537
- adjustAnchor: {
538
- r: 4,
539
- fill: '#3ABDF9',
540
- fillOpacity: 1,
541
- stroke: '#3ABDF9',
542
- },
543
- },
544
- edgeAdjust: {
545
- r: 4,
546
- fill: '#fff',
547
- stroke: '#474747',
548
- strokeWidth: 1,
549
- },
550
- arrow: {
551
- strokeLinecap: 'round',
552
- strokeLinejoin: 'round',
553
- offset: 10,
554
- verticalLength: 5, // 箭头垂直于边的距离
555
- },
556
- snapline: {
557
- strokeLinecap: 'round',
558
- strokeLinejoin: 'round',
559
- stroke: '#949494',
560
- strokeWidth: 1,
561
- },
562
- outline: {
563
- radius: 8,
564
- fill: 'transparent',
565
- stroke: '#949494',
566
- strokeDasharray: '3,3',
567
- hover: {
568
- stroke: '#949494',
569
- },
570
- },
571
- edgeOutline: {
572
- fill: 'transparent',
573
- stroke: '#757575',
574
- strokeWidth: 1.5,
575
- strokeDasharray: '4,4',
576
- radius: 8,
577
- hover: {
578
- stroke: '#4271DF',
579
- },
580
- },
581
- edgeAnimation: {
582
- stroke: '#4271DF',
583
- strokeDasharray: '12,4,6,4',
584
- strokeDashoffset: '100%',
585
- animationName: 'lf_animate_dash',
586
- animationDuration: '20s',
587
- animationIterationCount: 'infinite',
588
- animationTimingFunction: 'linear',
589
- animationDirection: 'normal',
590
- },
591
- rotateControl: {
592
- stroke: '#474747',
593
- fill: '#fff',
594
- strokeWidth: 1,
595
- hover: {
596
- fill: '#707070',
597
- fillOpacity: 0.15,
598
- stroke: 'transparent',
599
- },
600
- },
601
- resizeControl: {
602
- width: 8,
603
- height: 8,
604
- radius: 2,
605
- fill: '#fff',
606
- stroke: '#474747',
607
- hover: {
608
- width: 12,
609
- height: 12,
610
- fill: '#707070',
611
- fillOpacity: 0.15,
612
- stroke: 'transparent',
613
- },
614
- },
615
- resizeOutline: {
616
- fill: 'transparent',
617
- stroke: '#757575',
618
- strokeWidth: 1.5,
619
- strokeDasharray: '4,4',
620
- radius: 8,
621
- hover: {
622
- stroke: '#4271DF',
623
- },
624
- },
625
- }
626
-
627
- export const themeModeMap = {
628
- default: defaultTheme,
629
- colorful: colorfulTheme,
630
- dark: darkTheme,
631
- retro: retroTheme,
632
- }
633
-
634
- // 不同主题的背景色
635
- export const darkBackground = {
636
- background: '#33353A',
637
- }
638
- export const colorfulBackground = {
639
- background: '#fefeff',
640
- }
641
- export const defaultBackground = {
642
- background: '#FBFCFE',
643
- }
644
- export const retroBackground = {
645
- background: '#ffffff',
646
- }
647
- export const backgroundModeMap = {
648
- colorful: colorfulBackground,
649
- dark: darkBackground,
650
- default: defaultBackground,
651
- retro: retroBackground,
652
- }
653
-
654
- // 不同主题的网格样式
655
- export const darkGrid = {
656
- size: DEFAULT_GRID_SIZE,
657
- visible: true,
658
- type: 'mesh',
659
- config: {
660
- color: '#83838377',
661
- thickness: 2,
662
- },
663
- majorBold: true,
664
- }
665
- export const colorfulGrid = {
666
- size: DEFAULT_GRID_SIZE,
667
- visible: true,
668
- type: 'dot',
669
- config: {
670
- color: '#b7c2d9',
671
- thickness: 2,
672
- },
673
- majorBold: false,
674
- }
675
- export const defaultGrid = {
676
- size: DEFAULT_GRID_SIZE,
677
- visible: true,
678
- type: 'mesh',
679
- config: {
680
- color: '#D7DEEB',
681
- thickness: 1,
682
- },
683
- // majorBold: true,
684
- majorBold: {
685
- opacity: 0.6,
686
- boldIndices: [5],
687
- dashArrayConfig: { pattern: [] },
688
- customBoldWidth: 2,
689
- },
690
- }
691
- export const retroGrid = {
692
- size: DEFAULT_GRID_SIZE,
693
- visible: true,
694
- type: 'dot',
695
- config: {
696
- color: '#ababab',
697
- thickness: 1,
698
- },
699
- majorBold: false,
700
- }
701
- export const gridModeMap = {
702
- colorful: colorfulGrid,
703
- dark: darkGrid,
704
- retro: retroGrid,
705
- default: defaultGrid,
706
- }
707
-
708
- export default null