@archireport/react-native-svg-draw 2.2.1 → 2.3.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.
Files changed (115) hide show
  1. package/lib/commonjs/components/DrawCore/CurrentAnimatedItem.js +284 -29
  2. package/lib/commonjs/components/DrawCore/CurrentAnimatedItem.js.map +1 -1
  3. package/lib/commonjs/components/DrawCore/CurrentAnimatedText.js +12 -11
  4. package/lib/commonjs/components/DrawCore/CurrentAnimatedText.js.map +1 -1
  5. package/lib/commonjs/components/DrawCore/DrawContext.js.map +1 -1
  6. package/lib/commonjs/components/DrawCore/DrawPad.js +14 -5
  7. package/lib/commonjs/components/DrawCore/DrawPad.js.map +1 -1
  8. package/lib/commonjs/components/DrawCore/DrawProvider.js +6 -2
  9. package/lib/commonjs/components/DrawCore/DrawProvider.js.map +1 -1
  10. package/lib/commonjs/components/DrawCore/Item.js +154 -7
  11. package/lib/commonjs/components/DrawCore/Item.js.map +1 -1
  12. package/lib/commonjs/components/DrawCore/index.js +163 -76
  13. package/lib/commonjs/components/DrawCore/index.js.map +1 -1
  14. package/lib/commonjs/components/DrawCore/useDrawHook.js +4 -2
  15. package/lib/commonjs/components/DrawCore/useDrawHook.js.map +1 -1
  16. package/lib/commonjs/components/DrawWithOptions/ArrowSvg.js.map +1 -1
  17. package/lib/commonjs/components/DrawWithOptions/CancelSvg.js.map +1 -1
  18. package/lib/commonjs/components/DrawWithOptions/CircleSvg.js.map +1 -1
  19. package/lib/commonjs/components/DrawWithOptions/CloseSvg.js.map +1 -1
  20. package/lib/commonjs/components/DrawWithOptions/DoubleHeadSvg.js.map +1 -1
  21. package/lib/commonjs/components/DrawWithOptions/PenSvg.js.map +1 -1
  22. package/lib/commonjs/components/DrawWithOptions/SendSvg.js.map +1 -1
  23. package/lib/commonjs/components/DrawWithOptions/SliderSvg.js.map +1 -1
  24. package/lib/commonjs/components/DrawWithOptions/SquareSvg.js.map +1 -1
  25. package/lib/commonjs/components/DrawWithOptions/TextSvg.js.map +1 -1
  26. package/lib/commonjs/components/DrawWithOptions/ThrashSvg.js.map +1 -1
  27. package/lib/commonjs/components/DrawWithOptions/index.js +14 -0
  28. package/lib/commonjs/components/DrawWithOptions/index.js.map +1 -1
  29. package/lib/commonjs/components/Slider/ColorSlider.js.map +1 -1
  30. package/lib/commonjs/components/Slider/Sliders.js.map +1 -1
  31. package/lib/commonjs/components/Slider/StrokeSlider.js.map +1 -1
  32. package/lib/commonjs/components/Slider/sliderStyle.js.map +1 -1
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/module/components/DrawCore/CurrentAnimatedItem.js +286 -31
  35. package/lib/module/components/DrawCore/CurrentAnimatedItem.js.map +1 -1
  36. package/lib/module/components/DrawCore/CurrentAnimatedText.js +12 -11
  37. package/lib/module/components/DrawCore/CurrentAnimatedText.js.map +1 -1
  38. package/lib/module/components/DrawCore/DrawContext.js.map +1 -1
  39. package/lib/module/components/DrawCore/DrawPad.js +14 -5
  40. package/lib/module/components/DrawCore/DrawPad.js.map +1 -1
  41. package/lib/module/components/DrawCore/DrawProvider.js +6 -2
  42. package/lib/module/components/DrawCore/DrawProvider.js.map +1 -1
  43. package/lib/module/components/DrawCore/Item.js +150 -9
  44. package/lib/module/components/DrawCore/Item.js.map +1 -1
  45. package/lib/module/components/DrawCore/index.js +164 -77
  46. package/lib/module/components/DrawCore/index.js.map +1 -1
  47. package/lib/module/components/DrawCore/useDrawHook.js +4 -2
  48. package/lib/module/components/DrawCore/useDrawHook.js.map +1 -1
  49. package/lib/module/components/DrawWithOptions/ArrowSvg.js.map +1 -1
  50. package/lib/module/components/DrawWithOptions/CancelSvg.js.map +1 -1
  51. package/lib/module/components/DrawWithOptions/CircleSvg.js.map +1 -1
  52. package/lib/module/components/DrawWithOptions/CloseSvg.js.map +1 -1
  53. package/lib/module/components/DrawWithOptions/DoubleHeadSvg.js.map +1 -1
  54. package/lib/module/components/DrawWithOptions/PenSvg.js.map +1 -1
  55. package/lib/module/components/DrawWithOptions/SendSvg.js.map +1 -1
  56. package/lib/module/components/DrawWithOptions/SliderSvg.js.map +1 -1
  57. package/lib/module/components/DrawWithOptions/SquareSvg.js.map +1 -1
  58. package/lib/module/components/DrawWithOptions/TextSvg.js.map +1 -1
  59. package/lib/module/components/DrawWithOptions/ThrashSvg.js.map +1 -1
  60. package/lib/module/components/DrawWithOptions/index.js +14 -0
  61. package/lib/module/components/DrawWithOptions/index.js.map +1 -1
  62. package/lib/module/components/Slider/ColorSlider.js.map +1 -1
  63. package/lib/module/components/Slider/Sliders.js.map +1 -1
  64. package/lib/module/components/Slider/StrokeSlider.js.map +1 -1
  65. package/lib/typescript/components/DrawCore/CurrentAnimatedItem.d.ts +3 -6
  66. package/lib/typescript/components/DrawCore/CurrentAnimatedItem.d.ts.map +1 -1
  67. package/lib/typescript/components/DrawCore/CurrentAnimatedText.d.ts +0 -1
  68. package/lib/typescript/components/DrawCore/CurrentAnimatedText.d.ts.map +1 -1
  69. package/lib/typescript/components/DrawCore/DrawContext.d.ts +2 -0
  70. package/lib/typescript/components/DrawCore/DrawContext.d.ts.map +1 -1
  71. package/lib/typescript/components/DrawCore/DrawPad.d.ts +0 -1
  72. package/lib/typescript/components/DrawCore/DrawPad.d.ts.map +1 -1
  73. package/lib/typescript/components/DrawCore/DrawProvider.d.ts.map +1 -1
  74. package/lib/typescript/components/DrawCore/Item.d.ts +27 -1
  75. package/lib/typescript/components/DrawCore/Item.d.ts.map +1 -1
  76. package/lib/typescript/components/DrawCore/index.d.ts +0 -1
  77. package/lib/typescript/components/DrawCore/index.d.ts.map +1 -1
  78. package/lib/typescript/components/DrawCore/useDrawHook.d.ts +1 -0
  79. package/lib/typescript/components/DrawCore/useDrawHook.d.ts.map +1 -1
  80. package/lib/typescript/components/DrawWithOptions/ArrowSvg.d.ts +0 -1
  81. package/lib/typescript/components/DrawWithOptions/ArrowSvg.d.ts.map +1 -1
  82. package/lib/typescript/components/DrawWithOptions/CancelSvg.d.ts +0 -1
  83. package/lib/typescript/components/DrawWithOptions/CancelSvg.d.ts.map +1 -1
  84. package/lib/typescript/components/DrawWithOptions/CircleSvg.d.ts +0 -1
  85. package/lib/typescript/components/DrawWithOptions/CircleSvg.d.ts.map +1 -1
  86. package/lib/typescript/components/DrawWithOptions/CloseSvg.d.ts +0 -1
  87. package/lib/typescript/components/DrawWithOptions/CloseSvg.d.ts.map +1 -1
  88. package/lib/typescript/components/DrawWithOptions/DoubleHeadSvg.d.ts +0 -1
  89. package/lib/typescript/components/DrawWithOptions/DoubleHeadSvg.d.ts.map +1 -1
  90. package/lib/typescript/components/DrawWithOptions/PenSvg.d.ts +0 -1
  91. package/lib/typescript/components/DrawWithOptions/PenSvg.d.ts.map +1 -1
  92. package/lib/typescript/components/DrawWithOptions/SendSvg.d.ts +0 -1
  93. package/lib/typescript/components/DrawWithOptions/SendSvg.d.ts.map +1 -1
  94. package/lib/typescript/components/DrawWithOptions/SliderSvg.d.ts +0 -1
  95. package/lib/typescript/components/DrawWithOptions/SliderSvg.d.ts.map +1 -1
  96. package/lib/typescript/components/DrawWithOptions/SquareSvg.d.ts +0 -1
  97. package/lib/typescript/components/DrawWithOptions/SquareSvg.d.ts.map +1 -1
  98. package/lib/typescript/components/DrawWithOptions/TextSvg.d.ts +0 -1
  99. package/lib/typescript/components/DrawWithOptions/TextSvg.d.ts.map +1 -1
  100. package/lib/typescript/components/DrawWithOptions/ThrashSvg.d.ts +0 -1
  101. package/lib/typescript/components/DrawWithOptions/ThrashSvg.d.ts.map +1 -1
  102. package/lib/typescript/components/DrawWithOptions/index.d.ts.map +1 -1
  103. package/lib/typescript/components/Slider/StrokeSlider.d.ts +0 -1
  104. package/lib/typescript/components/Slider/StrokeSlider.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/src/components/DrawCore/CurrentAnimatedItem.tsx +307 -7
  107. package/src/components/DrawCore/CurrentAnimatedText.tsx +5 -2
  108. package/src/components/DrawCore/DrawContext.tsx +2 -0
  109. package/src/components/DrawCore/DrawPad.tsx +17 -3
  110. package/src/components/DrawCore/DrawProvider.tsx +6 -0
  111. package/src/components/DrawCore/Item.tsx +188 -7
  112. package/src/components/DrawCore/index.tsx +219 -100
  113. package/src/components/DrawCore/useDrawHook.tsx +2 -0
  114. package/src/components/DrawWithOptions/index.tsx +18 -0
  115. package/src/types.d.ts +7 -0
@@ -1,11 +1,20 @@
1
1
  import React from 'react';
2
- import Animated, { createAnimatedPropAdapter, processColor, useAnimatedProps } from 'react-native-reanimated';
2
+ import Animated, { createAnimatedPropAdapter, processColor, runOnJS, useAnimatedProps, useAnimatedReaction } from 'react-native-reanimated';
3
3
  import { Path, Ellipse, Rect, Line, G } from 'react-native-svg';
4
+ import { TextInput } from 'react-native';
5
+ import useDrawHook from './useDrawHook';
6
+
7
+ //import { TextInput } from 'react-native-gesture-handler';
8
+
4
9
  const AnimatedPath = Animated.createAnimatedComponent(Path);
5
10
  const AnimatedEllipse = Animated.createAnimatedComponent(Ellipse);
6
11
  const AnimatedRectangle = Animated.createAnimatedComponent(Rect);
7
12
  const AnimatedLine = Animated.createAnimatedComponent(Line);
8
13
 
14
+ //const AnimatedText = Animated.createAnimatedComponent(Text);
15
+
16
+ const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
17
+
9
18
  // properties of a line
10
19
  const line = (pointA, pointB) => {
11
20
  'worklet';
@@ -86,7 +95,7 @@ function hue2rgb(p, q, t) {
86
95
  }
87
96
 
88
97
  // see https://github.com/software-mansion/react-native-reanimated/issues/1909
89
- function hslToRgb(col) {
98
+ export function hslToRgb(col) {
90
99
  'worklet';
91
100
 
92
101
  const hslRegExp = new RegExp(/hsl\(([\d.]+),\s*(\d+)%,\s*([\d.]+)%\)/);
@@ -120,13 +129,23 @@ const propAdapter = createAnimatedPropAdapter(props => {
120
129
  };
121
130
  }
122
131
  }, ['fill', 'stroke']);
123
- export default function CurrentAnimatedItem(_ref) {
124
- let {
125
- currentItem
126
- } = _ref;
132
+ export default function CurrentAnimatedItem() {
133
+ var _currentItem$value37;
134
+ const {
135
+ currentItem,
136
+ doubleArrowTextInput
137
+ } = useDrawHook();
138
+ const getTextLength = () => {
139
+ 'worklet';
140
+
141
+ var _currentItem$value, _currentItem$value2;
142
+ const text = ((_currentItem$value = currentItem.value) === null || _currentItem$value === void 0 ? void 0 : _currentItem$value.type) === 'doubleArrows' ? (_currentItem$value2 = currentItem.value) === null || _currentItem$value2 === void 0 ? void 0 : _currentItem$value2.text : '';
143
+ const textLength = text && text.length > 5 ? text.length * 10 : 50;
144
+ return textLength;
145
+ };
127
146
  const ellipseAnimatedProps = useAnimatedProps(() => {
128
- var _currentItem$value, _currentItem$value2, _currentItem$value3, _currentItem$value4;
129
- const coordinates = ((_currentItem$value = currentItem.value) === null || _currentItem$value === void 0 ? void 0 : _currentItem$value.type) === 'ellipse' ? currentItem.value.data : {
147
+ var _currentItem$value3, _currentItem$value4, _currentItem$value5, _currentItem$value6;
148
+ const coordinates = ((_currentItem$value3 = currentItem.value) === null || _currentItem$value3 === void 0 ? void 0 : _currentItem$value3.type) === 'ellipse' ? currentItem.value.data : {
130
149
  cx: -10,
131
150
  cy: -10,
132
151
  rx: 0,
@@ -138,15 +157,15 @@ export default function CurrentAnimatedItem(_ref) {
138
157
  rx: coordinates.rx,
139
158
  ry: coordinates.ry,
140
159
  fill: 'transparent',
141
- stroke: hslToRgb(((_currentItem$value2 = currentItem.value) === null || _currentItem$value2 === void 0 ? void 0 : _currentItem$value2.color) || 'hsl(0, 0%, 0%)'),
142
- opacity: ((_currentItem$value3 = currentItem.value) === null || _currentItem$value3 === void 0 ? void 0 : _currentItem$value3.type) === 'ellipse' ? 1 : 0,
143
- strokeWidth: ((_currentItem$value4 = currentItem.value) === null || _currentItem$value4 === void 0 ? void 0 : _currentItem$value4.type) === 'ellipse' ? currentItem.value.strokeWidth : 0,
160
+ stroke: hslToRgb(((_currentItem$value4 = currentItem.value) === null || _currentItem$value4 === void 0 ? void 0 : _currentItem$value4.color) || 'hsl(0, 0%, 0%)'),
161
+ opacity: ((_currentItem$value5 = currentItem.value) === null || _currentItem$value5 === void 0 ? void 0 : _currentItem$value5.type) === 'ellipse' ? 1 : 0,
162
+ strokeWidth: ((_currentItem$value6 = currentItem.value) === null || _currentItem$value6 === void 0 ? void 0 : _currentItem$value6.type) === 'ellipse' ? currentItem.value.strokeWidth : 0,
144
163
  marker: 'url(#selection)'
145
164
  };
146
165
  }, null, propAdapter);
147
166
  const singleHeadAnimatedProps = useAnimatedProps(() => {
148
- var _currentItem$value5, _currentItem$value6, _currentItem$value7, _currentItem$value8;
149
- const coordinates = ((_currentItem$value5 = currentItem.value) === null || _currentItem$value5 === void 0 ? void 0 : _currentItem$value5.type) === 'singleHead' ? currentItem.value.data : {
167
+ var _currentItem$value7, _currentItem$value8, _currentItem$value9, _currentItem$value10;
168
+ const coordinates = ((_currentItem$value7 = currentItem.value) === null || _currentItem$value7 === void 0 ? void 0 : _currentItem$value7.type) === 'singleHead' ? currentItem.value.data : {
150
169
  x1: -10,
151
170
  y1: -10,
152
171
  x2: -10,
@@ -158,15 +177,15 @@ export default function CurrentAnimatedItem(_ref) {
158
177
  x2: coordinates.x2,
159
178
  y2: coordinates.y2,
160
179
  fill: 'transparent',
161
- stroke: hslToRgb(((_currentItem$value6 = currentItem.value) === null || _currentItem$value6 === void 0 ? void 0 : _currentItem$value6.color) || 'hsl(0, 0%, 0%)'),
162
- opacity: ((_currentItem$value7 = currentItem.value) === null || _currentItem$value7 === void 0 ? void 0 : _currentItem$value7.type) === 'singleHead' ? 1 : 0,
163
- strokeWidth: ((_currentItem$value8 = currentItem.value) === null || _currentItem$value8 === void 0 ? void 0 : _currentItem$value8.type) === 'singleHead' ? currentItem.value.strokeWidth : 0,
180
+ stroke: hslToRgb(((_currentItem$value8 = currentItem.value) === null || _currentItem$value8 === void 0 ? void 0 : _currentItem$value8.color) || 'hsl(0, 0%, 0%)'),
181
+ opacity: ((_currentItem$value9 = currentItem.value) === null || _currentItem$value9 === void 0 ? void 0 : _currentItem$value9.type) === 'singleHead' ? 1 : 0,
182
+ strokeWidth: ((_currentItem$value10 = currentItem.value) === null || _currentItem$value10 === void 0 ? void 0 : _currentItem$value10.type) === 'singleHead' ? currentItem.value.strokeWidth : 0,
164
183
  markerEnd: 'arrowhead'
165
184
  };
166
185
  }, null, propAdapter);
167
186
  const doubleHeadAnimatedProps = useAnimatedProps(() => {
168
- var _currentItem$value9, _currentItem$value10, _currentItem$value11, _currentItem$value12;
169
- const coordinates = ((_currentItem$value9 = currentItem.value) === null || _currentItem$value9 === void 0 ? void 0 : _currentItem$value9.type) === 'doubleHead' ? currentItem.value.data : {
187
+ var _currentItem$value11, _currentItem$value12, _currentItem$value13, _currentItem$value14;
188
+ const coordinates = ((_currentItem$value11 = currentItem.value) === null || _currentItem$value11 === void 0 ? void 0 : _currentItem$value11.type) === 'doubleHead' ? currentItem.value.data : {
170
189
  x1: -10,
171
190
  y1: -10,
172
191
  x2: -10,
@@ -178,16 +197,209 @@ export default function CurrentAnimatedItem(_ref) {
178
197
  x2: coordinates.x2,
179
198
  y2: coordinates.y2,
180
199
  fill: 'transparent',
181
- stroke: hslToRgb(((_currentItem$value10 = currentItem.value) === null || _currentItem$value10 === void 0 ? void 0 : _currentItem$value10.color) || 'hsl(0, 0%, 0%)'),
182
- opacity: ((_currentItem$value11 = currentItem.value) === null || _currentItem$value11 === void 0 ? void 0 : _currentItem$value11.type) === 'doubleHead' ? 1 : 0,
183
- strokeWidth: ((_currentItem$value12 = currentItem.value) === null || _currentItem$value12 === void 0 ? void 0 : _currentItem$value12.type) === 'doubleHead' ? currentItem.value.strokeWidth : 0,
200
+ stroke: hslToRgb(((_currentItem$value12 = currentItem.value) === null || _currentItem$value12 === void 0 ? void 0 : _currentItem$value12.color) || 'hsl(0, 0%, 0%)'),
201
+ opacity: ((_currentItem$value13 = currentItem.value) === null || _currentItem$value13 === void 0 ? void 0 : _currentItem$value13.type) === 'doubleHead' ? 1 : 0,
202
+ strokeWidth: ((_currentItem$value14 = currentItem.value) === null || _currentItem$value14 === void 0 ? void 0 : _currentItem$value14.type) === 'doubleHead' ? currentItem.value.strokeWidth : 0,
184
203
  markerStart: 'side',
185
204
  markerEnd: 'side'
186
205
  };
187
206
  }, null, propAdapter);
207
+ const distance = (x1, y1, x2, y2) => {
208
+ 'worklet';
209
+
210
+ return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
211
+ };
212
+ const getCoordinatesWithRatio = _ref => {
213
+ 'worklet';
214
+
215
+ let {
216
+ c1,
217
+ c2,
218
+ ratio,
219
+ first = true
220
+ } = _ref;
221
+ let newC1 = c1;
222
+ let newC2 = c2;
223
+ if (c1 > c2) {
224
+ if (first) {
225
+ newC1 = c1;
226
+ newC2 = c1 - (c1 - c2) * ratio;
227
+ } else {
228
+ newC1 = c2 + (c1 - c2) * ratio;
229
+ newC2 = c2;
230
+ }
231
+ } else {
232
+ if (first) {
233
+ newC1 = c1;
234
+ newC2 = c1 + (c2 - c1) * ratio;
235
+ } else {
236
+ newC1 = c2 - (c2 - c1) * ratio;
237
+ newC2 = c2;
238
+ }
239
+ }
240
+ return [newC1, newC2];
241
+ };
242
+ const getGetcoordinateValue = _ref2 => {
243
+ 'worklet';
244
+
245
+ //console.log('*******************');
246
+ let {
247
+ x1,
248
+ y1,
249
+ x2,
250
+ y2,
251
+ first = true
252
+ } = _ref2;
253
+ const dist = distance(x1, y1, x2, y2);
254
+ const textLength = getTextLength();
255
+ const newDist = (!textLength ? dist : dist - textLength) / 2;
256
+ let newX1 = x1;
257
+ let newY1 = y1;
258
+ let newX2 = x2;
259
+ let newY2 = y2;
260
+
261
+ //if (newDist > textLength / 2 && !isShortArrow) {
262
+ const ratio = newDist / dist;
263
+ [newX1, newX2] = getCoordinatesWithRatio({
264
+ c1: x1,
265
+ c2: x2,
266
+ ratio,
267
+ first
268
+ });
269
+ [newY1, newY2] = getCoordinatesWithRatio({
270
+ c1: y1,
271
+ c2: y2,
272
+ ratio,
273
+ first
274
+ });
275
+ //}
276
+ return [newX1, newY1, newX2, newY2];
277
+ };
278
+ const doubleArrowsAnimatedPropsFirst = useAnimatedProps(() => {
279
+ var _currentItem$value15, _currentItem$value16, _currentItem$value17, _currentItem$value18;
280
+ let x1, y1, x2, y2;
281
+ if (((_currentItem$value15 = currentItem.value) === null || _currentItem$value15 === void 0 ? void 0 : _currentItem$value15.type) !== 'doubleArrows') {
282
+ x1 = -10;
283
+ y1 = -10;
284
+ x2 = -10;
285
+ y2 = -10;
286
+ } else {
287
+ const coordinates = currentItem.value.data;
288
+ [x1, y1, x2, y2] = getGetcoordinateValue({
289
+ x1: Number(coordinates.x1),
290
+ y1: Number(coordinates.y1),
291
+ x2: Number(coordinates.x2),
292
+ y2: Number(coordinates.y2),
293
+ first: true
294
+ //text: currentItem.value?.text,
295
+ });
296
+ }
297
+
298
+ return {
299
+ x1,
300
+ y1,
301
+ x2,
302
+ y2,
303
+ fill: 'transparent',
304
+ stroke: hslToRgb(((_currentItem$value16 = currentItem.value) === null || _currentItem$value16 === void 0 ? void 0 : _currentItem$value16.color) || 'hsl(0, 0%, 0%)'),
305
+ opacity: ((_currentItem$value17 = currentItem.value) === null || _currentItem$value17 === void 0 ? void 0 : _currentItem$value17.type) === 'doubleArrows' ? 1 : 0,
306
+ strokeWidth: ((_currentItem$value18 = currentItem.value) === null || _currentItem$value18 === void 0 ? void 0 : _currentItem$value18.type) === 'doubleArrows' ? currentItem.value.strokeWidth : 0,
307
+ markerStart: 'arrowheadStart'
308
+ };
309
+ }, null, propAdapter);
310
+ const doubleArrowsAnimatedPropsLast = useAnimatedProps(() => {
311
+ var _currentItem$value19, _currentItem$value20, _currentItem$value21, _currentItem$value22;
312
+ let x1, y1, x2, y2;
313
+ if (((_currentItem$value19 = currentItem.value) === null || _currentItem$value19 === void 0 ? void 0 : _currentItem$value19.type) !== 'doubleArrows') {
314
+ x1 = -10;
315
+ y1 = -10;
316
+ x2 = -10;
317
+ y2 = -10;
318
+ } else {
319
+ const coordinates = currentItem.value.data;
320
+ [x1, y1, x2, y2] = getGetcoordinateValue({
321
+ x1: Number(coordinates.x1),
322
+ y1: Number(coordinates.y1),
323
+ x2: Number(coordinates.x2),
324
+ y2: Number(coordinates.y2),
325
+ first: false
326
+ //text: currentItem.value?.text,
327
+ });
328
+ }
329
+
330
+ return {
331
+ x1,
332
+ y1,
333
+ x2,
334
+ y2,
335
+ fill: 'transparent',
336
+ stroke: hslToRgb(((_currentItem$value20 = currentItem.value) === null || _currentItem$value20 === void 0 ? void 0 : _currentItem$value20.color) || 'hsl(0, 0%, 0%)'),
337
+ opacity: ((_currentItem$value21 = currentItem.value) === null || _currentItem$value21 === void 0 ? void 0 : _currentItem$value21.type) === 'doubleArrows' ? 1 : 0,
338
+ strokeWidth: ((_currentItem$value22 = currentItem.value) === null || _currentItem$value22 === void 0 ? void 0 : _currentItem$value22.type) === 'doubleArrows' ? currentItem.value.strokeWidth : 0,
339
+ markerEnd: 'arrowhead'
340
+ };
341
+ }, null, propAdapter);
342
+ const getTextValues = _ref3 => {
343
+ 'worklet';
344
+
345
+ let {
346
+ x1,
347
+ y1,
348
+ x2,
349
+ y2
350
+ } = _ref3;
351
+ const dist = distance(x1, y1, x2, y2);
352
+ const ratio = 0.5;
353
+ const newX = (x1 + x2) * ratio;
354
+ const newY = (y1 + y2) * ratio;
355
+ let angle = 0;
356
+ if (x1 > x2) {
357
+ if (y1 > y2) {
358
+ angle = Math.acos((x1 - x2) / dist) * (180 / Math.PI);
359
+ } else {
360
+ angle = 180 - Math.acos((x1 - x2) / dist) * (180 / Math.PI) + 180;
361
+ }
362
+ } else {
363
+ if (y1 > y2) {
364
+ angle = 180 - Math.acos((x2 - x1) / dist) * (180 / Math.PI) + 180;
365
+ } else {
366
+ angle = Math.acos((x2 - x1) / dist) * (180 / Math.PI);
367
+ }
368
+ }
369
+ return [newX, newY, angle];
370
+ };
371
+ const doubleArrowsAnimatedPropsText = useAnimatedProps(() => {
372
+ var _currentItem$value23, _currentItem$value24, _currentItem$value25, _currentItem$value26;
373
+ let x = 0,
374
+ y = 0,
375
+ angle = 0;
376
+ if (((_currentItem$value23 = currentItem.value) === null || _currentItem$value23 === void 0 ? void 0 : _currentItem$value23.type) !== 'doubleArrows') {
377
+ x = -50;
378
+ y = -50;
379
+ angle = 0;
380
+ } else {
381
+ const coordinates = currentItem.value.data;
382
+ [x, y, angle] = getTextValues({
383
+ x1: Number(coordinates.x1),
384
+ y1: Number(coordinates.y1),
385
+ x2: Number(coordinates.x2),
386
+ y2: Number(coordinates.y2)
387
+ });
388
+ }
389
+ return {
390
+ top: y - 10,
391
+ left: x - getTextLength() / 2,
392
+ fontSize: 10 + (((_currentItem$value24 = currentItem.value) === null || _currentItem$value24 === void 0 ? void 0 : _currentItem$value24.strokeWidth) ?? 0) * 2,
393
+ color: (_currentItem$value25 = currentItem.value) !== null && _currentItem$value25 !== void 0 && _currentItem$value25.color ? hslToRgb((_currentItem$value26 = currentItem.value) === null || _currentItem$value26 === void 0 ? void 0 : _currentItem$value26.color) : 'white',
394
+ transform: [{
395
+ rotateZ: `${angle}deg`
396
+ }],
397
+ width: getTextLength()
398
+ };
399
+ }, null, propAdapter);
188
400
  const rectangleAnimatedProps = useAnimatedProps(() => {
189
- var _currentItem$value13, _currentItem$value14, _currentItem$value15, _currentItem$value16;
190
- const coordinates = ((_currentItem$value13 = currentItem.value) === null || _currentItem$value13 === void 0 ? void 0 : _currentItem$value13.type) === 'rectangle' ? currentItem.value.data : {
401
+ var _currentItem$value27, _currentItem$value28, _currentItem$value29, _currentItem$value30;
402
+ const coordinates = ((_currentItem$value27 = currentItem.value) === null || _currentItem$value27 === void 0 ? void 0 : _currentItem$value27.type) === 'rectangle' ? currentItem.value.data : {
191
403
  x: -10,
192
404
  y: -10,
193
405
  width: 0,
@@ -199,28 +411,40 @@ export default function CurrentAnimatedItem(_ref) {
199
411
  width: coordinates.width,
200
412
  height: coordinates.height,
201
413
  fill: 'transparent',
202
- stroke: hslToRgb(((_currentItem$value14 = currentItem.value) === null || _currentItem$value14 === void 0 ? void 0 : _currentItem$value14.color) || 'hsl(0, 0%, 0%)'),
203
- opacity: ((_currentItem$value15 = currentItem.value) === null || _currentItem$value15 === void 0 ? void 0 : _currentItem$value15.type) === 'rectangle' ? 1 : 0,
204
- strokeWidth: ((_currentItem$value16 = currentItem.value) === null || _currentItem$value16 === void 0 ? void 0 : _currentItem$value16.type) === 'rectangle' ? currentItem.value.strokeWidth : 0,
414
+ stroke: hslToRgb(((_currentItem$value28 = currentItem.value) === null || _currentItem$value28 === void 0 ? void 0 : _currentItem$value28.color) || 'hsl(0, 0%, 0%)'),
415
+ opacity: ((_currentItem$value29 = currentItem.value) === null || _currentItem$value29 === void 0 ? void 0 : _currentItem$value29.type) === 'rectangle' ? 1 : 0,
416
+ strokeWidth: ((_currentItem$value30 = currentItem.value) === null || _currentItem$value30 === void 0 ? void 0 : _currentItem$value30.type) === 'rectangle' ? currentItem.value.strokeWidth : 0,
205
417
  marker: 'url(#selection)'
206
418
  };
207
419
  }, null, propAdapter);
208
420
  const penAnimatedProps = useAnimatedProps(() => {
209
- var _currentItem$value17, _currentItem$value18, _currentItem$value19, _currentItem$value20;
210
- const d = pointsToPath(((_currentItem$value17 = currentItem.value) === null || _currentItem$value17 === void 0 ? void 0 : _currentItem$value17.type) === 'pen' ? currentItem.value.data : [{
421
+ var _currentItem$value31, _currentItem$value32, _currentItem$value33, _currentItem$value34;
422
+ const d = pointsToPath(((_currentItem$value31 = currentItem.value) === null || _currentItem$value31 === void 0 ? void 0 : _currentItem$value31.type) === 'pen' ? currentItem.value.data : [{
211
423
  x: -10,
212
424
  y: -10
213
425
  }]);
214
426
  return {
215
427
  d: d,
216
- strokeWidth: ((_currentItem$value18 = currentItem.value) === null || _currentItem$value18 === void 0 ? void 0 : _currentItem$value18.type) === 'pen' ? currentItem.value.strokeWidth : 0,
217
- stroke: hslToRgb(((_currentItem$value19 = currentItem.value) === null || _currentItem$value19 === void 0 ? void 0 : _currentItem$value19.color) || 'hsl(0, 0%, 0%)'),
218
- opacity: ((_currentItem$value20 = currentItem.value) === null || _currentItem$value20 === void 0 ? void 0 : _currentItem$value20.type) === 'pen' ? 1 : 0,
428
+ strokeWidth: ((_currentItem$value32 = currentItem.value) === null || _currentItem$value32 === void 0 ? void 0 : _currentItem$value32.type) === 'pen' ? currentItem.value.strokeWidth : 0,
429
+ stroke: hslToRgb(((_currentItem$value33 = currentItem.value) === null || _currentItem$value33 === void 0 ? void 0 : _currentItem$value33.color) || 'hsl(0, 0%, 0%)'),
430
+ opacity: ((_currentItem$value34 = currentItem.value) === null || _currentItem$value34 === void 0 ? void 0 : _currentItem$value34.type) === 'pen' ? 1 : 0,
219
431
  fill: 'transparent',
220
432
  markerStart: 'selection',
221
433
  markerEnd: 'selection'
222
434
  };
223
435
  }, null, propAdapter);
436
+ const updateText = value => {
437
+ if (!(doubleArrowTextInput !== null && doubleArrowTextInput !== void 0 && doubleArrowTextInput.current)) return;
438
+ doubleArrowTextInput.current.setNativeProps({
439
+ text: value
440
+ });
441
+ };
442
+ useAnimatedReaction(() => {
443
+ var _currentItem$value35, _currentItem$value36;
444
+ return ((_currentItem$value35 = currentItem.value) === null || _currentItem$value35 === void 0 ? void 0 : _currentItem$value35.type) === 'doubleArrows' ? ((_currentItem$value36 = currentItem.value) === null || _currentItem$value36 === void 0 ? void 0 : _currentItem$value36.text) || '' : '';
445
+ }, value => {
446
+ if (updateText) runOnJS(updateText)(value);
447
+ }, [updateText, doubleArrowTextInput]);
224
448
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AnimatedEllipse, {
225
449
  animatedProps: ellipseAnimatedProps
226
450
  }), /*#__PURE__*/React.createElement(G, {
@@ -233,6 +457,37 @@ export default function CurrentAnimatedItem(_ref) {
233
457
  markerEnd: "url(#selection)"
234
458
  }, /*#__PURE__*/React.createElement(AnimatedLine, {
235
459
  animatedProps: doubleHeadAnimatedProps
460
+ })), /*#__PURE__*/React.createElement(G, {
461
+ markerStart: "url(#selection)",
462
+ markerEnd: "url(#selection)"
463
+ }, /*#__PURE__*/React.createElement(AnimatedLine, {
464
+ animatedProps: doubleArrowsAnimatedPropsFirst
465
+ }), /*#__PURE__*/React.createElement(AnimatedTextInput, {
466
+ animatedProps: {
467
+ ...doubleArrowsAnimatedPropsText // Type cast to bypass the type error
468
+ // Ensure other relevant props if needed
469
+ },
470
+
471
+ value: ((_currentItem$value37 = currentItem.value) === null || _currentItem$value37 === void 0 ? void 0 : _currentItem$value37.type) === 'doubleArrows' ? currentItem.value.text : '',
472
+ ref: doubleArrowTextInput,
473
+ underlineColorAndroid: 'transparent',
474
+ onChangeText: text => {
475
+ var _currentItem$value38;
476
+ console.log('onChangeText', text);
477
+ if (((_currentItem$value38 = currentItem.value) === null || _currentItem$value38 === void 0 ? void 0 : _currentItem$value38.type) === 'doubleArrows') {
478
+ currentItem.value = {
479
+ ...currentItem.value,
480
+ text
481
+ };
482
+ }
483
+ },
484
+ style: {
485
+ color: 'black',
486
+ fontSize: 24,
487
+ position: 'absolute'
488
+ }
489
+ }), /*#__PURE__*/React.createElement(AnimatedLine, {
490
+ animatedProps: doubleArrowsAnimatedPropsLast
236
491
  })), /*#__PURE__*/React.createElement(AnimatedRectangle, {
237
492
  animatedProps: rectangleAnimatedProps
238
493
  }), /*#__PURE__*/React.createElement(AnimatedPath, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Animated","createAnimatedPropAdapter","processColor","useAnimatedProps","Path","Ellipse","Rect","Line","G","AnimatedPath","createAnimatedComponent","AnimatedEllipse","AnimatedRectangle","AnimatedLine","line","pointA","pointB","lengthX","x","lengthY","y","length","Math","sqrt","pow","angle","atan2","controlPoint","current","previous","next","reverse","p","n","smoothing","o","PI","cos","sin","bezierCommand","point","i","a","previousPoint","nextPoint","endPoint","pointBefore","startPoint","pointsToPath","points","reduce","acc","hue2rgb","q","t","hslToRgb","col","hslRegExp","RegExp","res","exec","h","parseFloat","s","l","r","g","b","round","propAdapter","props","Object","keys","includes","fill","type","payload","stroke","CurrentAnimatedItem","_ref","currentItem","ellipseAnimatedProps","_currentItem$value","_currentItem$value2","_currentItem$value3","_currentItem$value4","coordinates","value","data","cx","cy","rx","ry","color","opacity","strokeWidth","marker","singleHeadAnimatedProps","_currentItem$value5","_currentItem$value6","_currentItem$value7","_currentItem$value8","x1","y1","x2","y2","markerEnd","doubleHeadAnimatedProps","_currentItem$value9","_currentItem$value10","_currentItem$value11","_currentItem$value12","markerStart","rectangleAnimatedProps","_currentItem$value13","_currentItem$value14","_currentItem$value15","_currentItem$value16","width","height","penAnimatedProps","_currentItem$value17","_currentItem$value18","_currentItem$value19","_currentItem$value20","d","createElement","Fragment","animatedProps"],"sourceRoot":"../../../../src","sources":["components/DrawCore/CurrentAnimatedItem.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,IACbC,yBAAyB,EACzBC,YAAY,EACZC,gBAAgB,QACX,yBAAyB;AAChC,SAASC,IAAI,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAEC,CAAC,QAAQ,kBAAkB;AAG/D,MAAMC,YAAY,GAAGT,QAAQ,CAACU,uBAAuB,CAACN,IAAI,CAAC;AAE3D,MAAMO,eAAe,GAAGX,QAAQ,CAACU,uBAAuB,CAACL,OAAO,CAAC;AAEjE,MAAMO,iBAAiB,GAAGZ,QAAQ,CAACU,uBAAuB,CAACJ,IAAI,CAAC;AAEhE,MAAMO,YAAY,GAAGb,QAAQ,CAACU,uBAAuB,CAACH,IAAI,CAAC;;AAE3D;AACA,MAAMO,IAAI,GAAGA,CAACC,MAAa,EAAEC,MAAa,KAAK;EAC7C,SAAS;;EACT,MAAMC,OAAO,GAAGD,MAAM,CAACE,CAAC,GAAGH,MAAM,CAACG,CAAC;EACnC,MAAMC,OAAO,GAAGH,MAAM,CAACI,CAAC,GAAGL,MAAM,CAACK,CAAC;EACnC,OAAO;IACLC,MAAM,EAAEC,IAAI,CAACC,IAAI,CAACD,I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W,EAAC,iBAAiB;IAACN,SAAS,EAAC;EAAiB,gBAC1D3G,KAAA,CAAA+H,aAAA,CAACjH,YAAY;IAACmH,aAAa,EAAErB;EAAwB,EAAG,CACtD,eACJ5G,KAAA,CAAA+H,aAAA,CAAClH,iBAAiB;IAACoH,aAAa,EAAEf;EAAuB,EAAG,eAC5DlH,KAAA,CAAA+H,aAAA,CAACrH,YAAY;IAACuH,aAAa,EAAER;EAAiB,EAAG,CAChD;AAEP"}
1
+ {"version":3,"names":["React","Animated","createAnimatedPropAdapter","processColor","runOnJS","useAnimatedProps","useAnimatedReaction","Path","Ellipse","Rect","Line","G","TextInput","useDrawHook","AnimatedPath","createAnimatedComponent","AnimatedEllipse","AnimatedRectangle","AnimatedLine","AnimatedTextInput","line","pointA","pointB","lengthX","x","lengthY","y","length","Math","sqrt","pow","angle","atan2","controlPoint","current","previous","next","reverse","p","n","smoothing","o","PI","cos","sin","bezierCommand","point","i","a","previousPoint","nextPoint","endPoint","pointBefore","startPoint","pointsToPath","points","reduce","acc","hue2rgb","q","t","hslToRgb","col","hslRegExp","RegExp","res","exec","h","parseFloat","s","l","r","g","b","round","propAdapter","props","Object","keys","includes","fill","type","payload","stroke","CurrentAnimatedItem","currentItem","doubleArrowTextInput","getTextLength","text","value","textLength","ellipseAnimatedProps","coordinates","data","cx","cy","rx","ry","color","opacity","strokeWidth","marker","singleHeadAnimatedProps","x1","y1","x2","y2","markerEnd","doubleHeadAnimatedProps","markerStart","distance","getCoordinatesWithRatio","c1","c2","ratio","first","newC1","newC2","getGetcoordinateValue","dist","newDist","newX1","newY1","newX2","newY2","doubleArrowsAnimatedPropsFirst","Number","doubleArrowsAnimatedPropsLast","getTextValues","newX","newY","acos","doubleArrowsAnimatedPropsText","top","left","fontSize","transform","rotateZ","width","rectangleAnimatedProps","height","penAnimatedProps","d","updateText","setNativeProps","console","log","position"],"sourceRoot":"../../../../src","sources":["components/DrawCore/CurrentAnimatedItem.tsx"],"mappings":"AAAA,OAAOA,KA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,EAAG,CAC5D,eAEJ,oBAAC,iBAAiB;IAAC,aAAa,EAAEY;EAAuB,EAAG,eAC5D,oBAAC,YAAY;IAAC,aAAa,EAAEE;EAAiB,EAAG,CAChD;AAEP"}
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
  import Animated, { runOnJS, useAnimatedStyle, useDerivedValue } from 'react-native-reanimated';
4
+ import { hslToRgb } from './CurrentAnimatedItem';
4
5
  const styles = StyleSheet.create({
5
6
  textBackground: {
6
7
  marginHorizontal: 10,
@@ -36,7 +37,7 @@ const styles = StyleSheet.create({
36
37
  * So we cannot embed this component directly in the Svg
37
38
  */
38
39
  export default function CurrentAnimatedText(_ref) {
39
- var _currentItem$value, _currentItem$value4;
40
+ var _currentItem$value, _currentItem$value6;
40
41
  let {
41
42
  currentItem,
42
43
  onHeightChange
@@ -47,25 +48,25 @@ export default function CurrentAnimatedText(_ref) {
47
48
  runOnJS(setText)(((_currentItem$value2 = currentItem.value) === null || _currentItem$value2 === void 0 ? void 0 : _currentItem$value2.type) === 'text' ? currentItem.value.text || '' : '');
48
49
  }, [currentItem.value]);
49
50
  const textAnimatedStyle = useAnimatedStyle(() => {
50
- var _currentItem$value3;
51
+ var _currentItem$value3, _currentItem$value4, _currentItem$value5;
51
52
  return {
52
- fontSize: 16 + (((_currentItem$value3 = currentItem.value) === null || _currentItem$value3 === void 0 ? void 0 : _currentItem$value3.strokeWidth) ?? 0),
53
- color: 'white'
53
+ fontSize: 10 + (((_currentItem$value3 = currentItem.value) === null || _currentItem$value3 === void 0 ? void 0 : _currentItem$value3.strokeWidth) ?? 0) * 2,
54
+ color: (_currentItem$value4 = currentItem.value) !== null && _currentItem$value4 !== void 0 && _currentItem$value4.color ? hslToRgb((_currentItem$value5 = currentItem.value) === null || _currentItem$value5 === void 0 ? void 0 : _currentItem$value5.color) : 'white'
54
55
  };
55
- }, [(_currentItem$value4 = currentItem.value) === null || _currentItem$value4 === void 0 ? void 0 : _currentItem$value4.strokeWidth]);
56
+ }, [(_currentItem$value6 = currentItem.value) === null || _currentItem$value6 === void 0 ? void 0 : _currentItem$value6.strokeWidth]);
56
57
  const containerStyle = useAnimatedStyle(() => {
57
- var _currentItem$value5, _currentItem$value6, _currentItem$value7, _currentItem$value8, _currentItem$value9;
58
+ var _currentItem$value7, _currentItem$value8, _currentItem$value9, _currentItem$value10, _currentItem$value11;
58
59
  return {
59
- opacity: ((_currentItem$value5 = currentItem.value) === null || _currentItem$value5 === void 0 ? void 0 : _currentItem$value5.type) === 'text' ? 1 : 0,
60
- height: ((_currentItem$value6 = currentItem.value) === null || _currentItem$value6 === void 0 ? void 0 : _currentItem$value6.type) === 'text' ? 'auto' : -10,
61
- width: ((_currentItem$value7 = currentItem.value) === null || _currentItem$value7 === void 0 ? void 0 : _currentItem$value7.type) === 'text' && (typeof currentItem.value.data.width === 'string' ? parseFloat(currentItem.value.data.width) : currentItem.value.data.width) || 0,
60
+ opacity: ((_currentItem$value7 = currentItem.value) === null || _currentItem$value7 === void 0 ? void 0 : _currentItem$value7.type) === 'text' ? 1 : 0,
61
+ height: ((_currentItem$value8 = currentItem.value) === null || _currentItem$value8 === void 0 ? void 0 : _currentItem$value8.type) === 'text' ? 'auto' : -10,
62
+ width: ((_currentItem$value9 = currentItem.value) === null || _currentItem$value9 === void 0 ? void 0 : _currentItem$value9.type) === 'text' && (typeof currentItem.value.data.width === 'string' ? parseFloat(currentItem.value.data.width) : currentItem.value.data.width) || 0,
62
63
  position: 'absolute',
63
64
  top: 0,
64
65
  left: 0,
65
66
  transform: [{
66
- translateX: ((_currentItem$value8 = currentItem.value) === null || _currentItem$value8 === void 0 ? void 0 : _currentItem$value8.type) === 'text' && (typeof currentItem.value.data.x === 'string' ? parseFloat(currentItem.value.data.x) : currentItem.value.data.x) || 0
67
+ translateX: ((_currentItem$value10 = currentItem.value) === null || _currentItem$value10 === void 0 ? void 0 : _currentItem$value10.type) === 'text' && (typeof currentItem.value.data.x === 'string' ? parseFloat(currentItem.value.data.x) : currentItem.value.data.x) || 0
67
68
  }, {
68
- translateY: ((_currentItem$value9 = currentItem.value) === null || _currentItem$value9 === void 0 ? void 0 : _currentItem$value9.type) === 'text' && (typeof currentItem.value.data.y === 'string' ? parseFloat(currentItem.value.data.y) : currentItem.value.data.y) || 0
69
+ translateY: ((_currentItem$value11 = currentItem.value) === null || _currentItem$value11 === void 0 ? void 0 : _currentItem$value11.type) === 'text' && (typeof currentItem.value.data.y === 'string' ? parseFloat(currentItem.value.data.y) : currentItem.value.data.y) || 0
69
70
  }]
70
71
  };
71
72
  }, [currentItem.value]);
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","StyleSheet","View","Animated","runOnJS","useAnimatedStyle","useDerivedValue","styles","create","textBackground","marginHorizontal","backgroundColor","borderRadius","paddingVertical","paddingHorizontal","markerContainerLeft","position","left","height","justifyContent","markerContainerRight","right","marker","width","borderWidth","borderColor","CurrentAnimatedText","_ref","_currentItem$value","_currentItem$value4","currentItem","onHeightChange","text","setText","value","type","_currentItem$value2","textAnimatedStyle","_currentItem$value3","fontSize","strokeWidth","color","containerStyle","_currentItem$value5","_currentItem$value6","_currentItem$value7","_currentItem$value8","_currentItem$value9","opacity","data","parseFloat","top","transform","translateX","x","translateY","y","createElement","style","onLayout","event","nativeEvent","layout","Text"],"sourceRoot":"../../../../src","sources":["components/DrawCore/CurrentAnimatedText.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,QAAQ,IACbC,OAAO,EACPC,gBAAgB,EAChBC,eAAe,QACV,yBAAyB;AAGhC,MAAMC,MAAM,GAAGN,UAAU,CAACO,MAAM,CAAC;EAC/BC,cAAc,EAAE;IACdC,gBAAgB,EAAE,EAAE;IACpBC,eAAe,EAAE,oBAAoB;IACrCC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,EAAE;IAC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O,EAAG,CACzB,eACPvB,KAAA,CAAA0D,aAAA,CAACvD,IAAI;IAACwD,KAAK,EAAEnD,MAAM,CAACa;EAAqB,gBACvCrB,KAAA,CAAA0D,aAAA,CAACvD,IAAI;IAACwD,KAAK,EAAEnD,MAAM,CAACe;EAAO,EAAG,CACzB,CACO;AAEpB"}
1
+ {"version":3,"names":["React","useState","StyleSheet","View","Animated","runOnJS","useAnimatedStyle","useDerivedValue","hslToRgb","styles","create","textBackground","marginHorizontal","backgroundColor","borderRadius","paddingVertical","paddingHorizontal","markerContainerLeft","position","left","height","justifyContent","markerContainerRight","right","marker","width","borderWidth","borderColor","CurrentAnimatedText","currentItem","onHeightChange","text","setText","value","type","textAnimatedStyle","fontSize","strokeWidth","color","containerStyle","opacity","data","parseFloat","top","transform","translateX","x","translateY","y","event","nativeEvent","layout"],"sourceRoot":"../../../../src","sources":["components/DrawCore/CurrentAnimatedText.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,QAAQ,IACbC,OAAO,EACPC,gBAAgB,EAChBC,eAAe,QACV,yBAAyB;AAEhC,SAASC,QAAQ,QAAQ,uBAAuB;AAEhD,MAAMC,MAAM,GAAGP,UAAU,CAACQ,MAAM,CAAC;EAC/BC,cAAc,EAAE;IACdC,gBAAgB,EAAE,EAAE;IACpBC,eAAe,EAAE,oBAAoB;IACrCC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,mBAAmB,EAAE;IACnBC,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE;EAClB,CAAC;EACDC,oBAAoB,EAAE;IACpBJ,QAAQ,EAAE,UAAU;IACpBK,KAAK,EAAE,CAAC;IACRH,MAAM,EAAE,MAAM;IACdC,cAAc,EAA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H,CAAC,EAAE,CAACnB,WAAW,CAACI,KAAK,CAAC,CAAC;EAEvB,oBACE,oBAAC,QAAQ,CAAC,IAAI;IAAC,KAAK,EAAEM;EAAe,gBACnC,oBAAC,IAAI;IACH,KAAK,EAAE9B,MAAM,CAACE,cAAe;IAC7B,QAAQ,EAAGsC,KAAK,IAAK;MACnBnB,cAAc,CAACmB,KAAK,CAACC,WAAW,CAACC,MAAM,CAAC/B,MAAM,CAAC;IACjD;EAAE,gBAEF,oBAAC,QAAQ,CAAC,IAAI;IAAC,KAAK,EAAEe;EAAkB,GAAEJ,IAAI,CAAiB,CAC1D,eACP,oBAAC,IAAI;IAAC,KAAK,EAAEtB,MAAM,CAACQ;EAAoB,gBACtC,oBAAC,IAAI;IAAC,KAAK,EAAER,MAAM,CAACe;EAAO,EAAG,CACzB,eACP,oBAAC,IAAI;IAAC,KAAK,EAAEf,MAAM,CAACa;EAAqB,gBACvC,oBAAC,IAAI;IAAC,KAAK,EAAEb,MAAM,CAACe;EAAO,EAAG,CACzB,CACO;AAEpB"}
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","DrawContext","drawState","doneItems","screenStates","drawingMode","cancelEnabled","dispatchDrawStates"],"sourceRoot":"../../../../src","sources":["components/DrawCore/DrawContext.tsx"],"mappings":"AACA,SAASA,aAAa,QAAmB,OAAO;AAIhD,OAAO,MAAMC,WAAW,gBAAGD,aAAa,CAQrC;EACDE,SAAS,EAAE;IACTC,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE,CAAC,EAAE,CAAC;IAClBC,WAAW,EAAE,SAAS;IACtBC,aAAa,EAAE;EACjB,CAAC;EACDC,kBAAkB,EAAEA,CAAA,KAAM;AAC5B,CAAC,CAAC"}
1
+ {"version":3,"names":["createContext","DrawContext","drawState","doneItems","screenStates","drawingMode","cancelEnabled","dispatchDrawStates"],"sourceRoot":"../../../../src","sources":["components/DrawCore/DrawContext.tsx"],"mappings":"AACA,SAASA,aAAa,QAAmB,OAAO;AAKhD,OAAO,MAAMC,WAAW,gBAAGD,aAAa,CASrC;EACDE,SAAS,EAAE;IACTC,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE,CAAC,EAAE,CAAC;IAClBC,WAAW,EAAE,SAAS;IACtBC,aAAa,EAAE;EACjB,CAAC;EACDC,kBAAkB,EAAE,MAAM;AAC5B,CAAC,CAAC"}
@@ -18,11 +18,11 @@ const DrawPad = _ref => {
18
18
  }, /*#__PURE__*/React.createElement(Defs, null, /*#__PURE__*/React.createElement(Circle, {
19
19
  id: "selectionIndicator",
20
20
  fill: "#3a6cff",
21
- r: 5,
21
+ r: 10,
22
22
  cx: 0,
23
23
  cy: 0,
24
24
  strokeWidth: 1,
25
- stroke: "white"
25
+ stroke: "black"
26
26
  }), /*#__PURE__*/React.createElement(Marker, {
27
27
  id: "arrowhead",
28
28
  markerUnits: 'strokeWidth',
@@ -34,6 +34,17 @@ const DrawPad = _ref => {
34
34
  stroke: "context-stroke",
35
35
  strokeLinecap: "round",
36
36
  strokeLinejoin: "round"
37
+ })), /*#__PURE__*/React.createElement(Marker, {
38
+ id: "arrowheadStart",
39
+ markerUnits: 'strokeWidth',
40
+ refX: "0",
41
+ refY: "0",
42
+ orient: "auto"
43
+ }, /*#__PURE__*/React.createElement(Polyline, {
44
+ points: "2,-2 0,0 2,2 0,0",
45
+ stroke: "context-stroke",
46
+ strokeLinecap: "round",
47
+ strokeLinejoin: "round"
37
48
  })), /*#__PURE__*/React.createElement(Marker, {
38
49
  id: "side",
39
50
  markerUnits: 'strokeWidth',
@@ -57,9 +68,7 @@ const DrawPad = _ref => {
57
68
  key: index,
58
69
  item: item,
59
70
  onPress: onPressItem(item, index)
60
- })), /*#__PURE__*/React.createElement(CurrentAnimatedItem, {
61
- currentItem: currentItem
62
- })), /*#__PURE__*/React.createElement(CurrentAnimatedText, {
71
+ })), /*#__PURE__*/React.createElement(CurrentAnimatedItem, null)), /*#__PURE__*/React.createElement(CurrentAnimatedText, {
63
72
  currentItem: currentItem,
64
73
  onHeightChange: onTextHeightChange
65
74
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["React","Svg","Circle","Defs","Marker","Polyline","Use","CurrentAnimatedItem","CurrentAnimatedText","Item","DrawPad","_ref","currentItem","doneItems","onPressItem","onTextHeightChange","addBackground","createElement","Fragment","style","backgroundColor","id","fill","r","cx","cy","strokeWidth","stroke","markerUnits","refX","refY","orient","points","strokeLinecap","strokeLinejoin","href","map","item","index","key","onPress","onHeightChange"],"sourceRoot":"../../../../src","sources":["components/DrawCore/DrawPad.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,GAAG,IAAIC,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,kBAAkB;AAC3E,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,IAAI,MAAM,QAAQ;AAIzB,MAAMC,OAAO,GAAGC,IAAA,IAYV;EAAA,IAZW;IACfC,WAAW;IACXC,SAAS;IACTC,WAAW;IACXC,kBAAkB;IAClBC,aAAa,GAAG;EAOlB,CAAC,GAAAL,IAAA;EACC,oBACEX,KAAA,CAAAiB,aAAA,CAAAjB,KAAA,CAAAkB,QAAA,qBACElB,KAAA,CAAAiB,aAAA,CAAChB,GAAG;IAACkB,KAAK,EAAEH,aAAa,GAAG;MAAEI,eAAe,EAAE;IAAQ,CAAC,GAAG;EAAK,gBAC9DpB,KAAA,CAAAiB,aAAA,CAACd,IAAI,qBACHH,KAAA,CAAAiB,aAAA,CAACf,MAAM;IACLmB,EAAE,EAAC,oBAAoB;IACvBC,IAAI,EAAC,SAAS;IACdC,CAAC,EAAE,CAAE;IACLC,EAAE,EAAE,CAAE;IACNC,EAAE,EAAE,CAAE;IACNC,WAAW,EAAE,CAAE;IACfC,MAAM,EAAC;EAAO,EACd,eACF3B,KAAA,CAAAiB,aAAA,CAACb,MAAM;IACLiB,EAAE,EAAC,WAAW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AE1B;EAAmB,EACnC,CACD;AAEP,CAAC;AAED,eAAeL,OAAO"}
1
+ {"version":3,"names":["React","Svg","Circle","Defs","Marker","Polyline","Use","CurrentAnimatedItem","CurrentAnimatedText","Item","DrawPad","currentItem","doneItems","onPressItem","onTextHeightChange","addBackground","backgroundColor","map","item","index"],"sourceRoot":"../../../../src","sources":["components/DrawCore/DrawPad.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,GAAG,IAAIC,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,kBAAkB;AAC3E,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,IAAI,MAAM,QAAQ;AAIzB,MAAMC,OAAO,GAAG,QAYV;EAAA,IAZW;IACfC,WAAW;IACXC,SAAS;IACTC,WAAW;IACXC,kBAAkB;IAClBC,aAAa,GAAG;EAOlB,CAAC;EACC,oBACE,uDACE,oBAAC,GAAG;IAAC,KAAK,EAAEA,aAAa,GAAG;MAAEC,eAAe,EAAE;IAAQ,CAAC,GAAG;EAAK,gBAC9D,oBAAC,IAAI,qBACH,oBAAC,MAAM;IACL,EAAE,EAAC,oBAAoB;IACvB,IAAI,EAAC,SAAS;IACd,CAAC,EAAE,EAAG;IACN,EAAE,EAAE,CAAE;IACN,EAAE,EAAE,CAAE;IACN,WAAW,EAAE,CAAE;IACf,MAAM,EAAC;EAAO,EACd,eACF,oBAAC,MAAM;IACL,EAAE,EAAC,WAAW;IACd,WAAW,EAAE,aAA6B;IAC1C,IAAI,EAAC,GAAG;IACR,IAAI,EAAC,GAAG;IACR,MAAM,EAAC;EAAM,gBAEb,oBAAC,QAAQ;IACP,MAAM,EAAC,oBAAoB;IAC3B,MAAM,EAAC,gBAAgB;IACvB,aAAa,EAAC,OAAO;IACrB,cAAc,EAAC;EAAO,EACtB,CACK,eACT,oBAAC,MAAM;IACL,EAAE,E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