@buoy-gg/floating-tools-core 2.1.11 → 2.1.13

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 (108) hide show
  1. package/LICENSE +58 -0
  2. package/lib/commonjs/FloatingToolsStore.js +1 -501
  3. package/lib/commonjs/colors.js +1 -54
  4. package/lib/commonjs/constants.js +1 -31
  5. package/lib/commonjs/devToolsState.js +1 -325
  6. package/lib/commonjs/dial.js +1 -617
  7. package/lib/commonjs/easing.js +1 -69
  8. package/lib/commonjs/icons/benchmark-icon.js +1 -24
  9. package/lib/commonjs/icons/env-icon.js +1 -24
  10. package/lib/commonjs/icons/events-icon.js +1 -24
  11. package/lib/commonjs/icons/highlight-icon.js +1 -24
  12. package/lib/commonjs/icons/icon-data.js +1 -2268
  13. package/lib/commonjs/icons/icon-factories.js +1 -173
  14. package/lib/commonjs/icons/icon-primitives.js +1 -559
  15. package/lib/commonjs/icons/icon-primitives.native.js +1 -779
  16. package/lib/commonjs/icons/icon-renderer.js +1 -260
  17. package/lib/commonjs/icons/network-icon.js +1 -24
  18. package/lib/commonjs/icons/query-icon.js +1 -24
  19. package/lib/commonjs/icons/redux-icon.js +1 -85
  20. package/lib/commonjs/icons/renders-icon.js +1 -33
  21. package/lib/commonjs/icons/routes-icon.js +1 -49
  22. package/lib/commonjs/icons/sentry-icon.js +1 -24
  23. package/lib/commonjs/icons/storage-icon.js +1 -24
  24. package/lib/commonjs/icons/wifi-icon.js +1 -24
  25. package/lib/commonjs/index.js +1 -723
  26. package/lib/commonjs/settings.js +1 -599
  27. package/lib/commonjs/utils.js +1 -72
  28. package/lib/module/FloatingToolsStore.js +1 -496
  29. package/lib/module/colors.js +1 -49
  30. package/lib/module/constants.js +1 -27
  31. package/lib/module/devToolsState.js +1 -318
  32. package/lib/module/dial.js +1 -603
  33. package/lib/module/easing.js +1 -62
  34. package/lib/module/icons/benchmark-icon.js +1 -15
  35. package/lib/module/icons/env-icon.js +1 -15
  36. package/lib/module/icons/events-icon.js +1 -15
  37. package/lib/module/icons/highlight-icon.js +1 -15
  38. package/lib/module/icons/icon-data.js +1 -2264
  39. package/lib/module/icons/icon-factories.js +1 -163
  40. package/lib/module/icons/icon-primitives.js +1 -547
  41. package/lib/module/icons/icon-primitives.native.js +1 -767
  42. package/lib/module/icons/icon-renderer.js +1 -255
  43. package/lib/module/icons/network-icon.js +1 -15
  44. package/lib/module/icons/query-icon.js +1 -15
  45. package/lib/module/icons/redux-icon.js +1 -81
  46. package/lib/module/icons/renders-icon.js +1 -17
  47. package/lib/module/icons/routes-icon.js +1 -41
  48. package/lib/module/icons/sentry-icon.js +1 -15
  49. package/lib/module/icons/storage-icon.js +1 -15
  50. package/lib/module/icons/wifi-icon.js +1 -15
  51. package/lib/module/index.js +1 -103
  52. package/lib/module/settings.js +1 -587
  53. package/lib/module/utils.js +1 -66
  54. package/package.json +8 -8
  55. package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +0 -1
  56. package/lib/typescript/commonjs/colors.d.ts.map +0 -1
  57. package/lib/typescript/commonjs/constants.d.ts.map +0 -1
  58. package/lib/typescript/commonjs/devToolsState.d.ts.map +0 -1
  59. package/lib/typescript/commonjs/dial.d.ts.map +0 -1
  60. package/lib/typescript/commonjs/easing.d.ts.map +0 -1
  61. package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +0 -1
  62. package/lib/typescript/commonjs/icons/env-icon.d.ts.map +0 -1
  63. package/lib/typescript/commonjs/icons/events-icon.d.ts.map +0 -1
  64. package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +0 -1
  65. package/lib/typescript/commonjs/icons/icon-data.d.ts.map +0 -1
  66. package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +0 -1
  67. package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +0 -1
  68. package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +0 -1
  69. package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +0 -1
  70. package/lib/typescript/commonjs/icons/network-icon.d.ts.map +0 -1
  71. package/lib/typescript/commonjs/icons/query-icon.d.ts.map +0 -1
  72. package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +0 -1
  73. package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +0 -1
  74. package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +0 -1
  75. package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +0 -1
  76. package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +0 -1
  77. package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +0 -1
  78. package/lib/typescript/commonjs/index.d.ts.map +0 -1
  79. package/lib/typescript/commonjs/settings.d.ts.map +0 -1
  80. package/lib/typescript/commonjs/types.d.ts.map +0 -1
  81. package/lib/typescript/commonjs/utils.d.ts.map +0 -1
  82. package/lib/typescript/module/FloatingToolsStore.d.ts.map +0 -1
  83. package/lib/typescript/module/colors.d.ts.map +0 -1
  84. package/lib/typescript/module/constants.d.ts.map +0 -1
  85. package/lib/typescript/module/devToolsState.d.ts.map +0 -1
  86. package/lib/typescript/module/dial.d.ts.map +0 -1
  87. package/lib/typescript/module/easing.d.ts.map +0 -1
  88. package/lib/typescript/module/icons/benchmark-icon.d.ts.map +0 -1
  89. package/lib/typescript/module/icons/env-icon.d.ts.map +0 -1
  90. package/lib/typescript/module/icons/events-icon.d.ts.map +0 -1
  91. package/lib/typescript/module/icons/highlight-icon.d.ts.map +0 -1
  92. package/lib/typescript/module/icons/icon-data.d.ts.map +0 -1
  93. package/lib/typescript/module/icons/icon-factories.d.ts.map +0 -1
  94. package/lib/typescript/module/icons/icon-primitives.d.ts.map +0 -1
  95. package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +0 -1
  96. package/lib/typescript/module/icons/icon-renderer.d.ts.map +0 -1
  97. package/lib/typescript/module/icons/network-icon.d.ts.map +0 -1
  98. package/lib/typescript/module/icons/query-icon.d.ts.map +0 -1
  99. package/lib/typescript/module/icons/redux-icon.d.ts.map +0 -1
  100. package/lib/typescript/module/icons/renders-icon.d.ts.map +0 -1
  101. package/lib/typescript/module/icons/routes-icon.d.ts.map +0 -1
  102. package/lib/typescript/module/icons/sentry-icon.d.ts.map +0 -1
  103. package/lib/typescript/module/icons/storage-icon.d.ts.map +0 -1
  104. package/lib/typescript/module/icons/wifi-icon.d.ts.map +0 -1
  105. package/lib/typescript/module/index.d.ts.map +0 -1
  106. package/lib/typescript/module/settings.d.ts.map +0 -1
  107. package/lib/typescript/module/types.d.ts.map +0 -1
  108. package/lib/typescript/module/utils.d.ts.map +0 -1
@@ -1,547 +1 @@
1
- "use strict";
2
-
3
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
4
- /**
5
- * Icon Primitives - WEB
6
- *
7
- * This file is auto-picked by web bundlers (Vite, webpack).
8
- * Mobile bundlers (Metro) pick icon-primitives.native.tsx instead.
9
- */
10
-
11
- // ===========================================
12
- // Types
13
- // ===========================================
14
-
15
- // ===========================================
16
- // Web Primitives (CSS/divs)
17
- // ===========================================
18
-
19
- export const IconContainer = ({
20
- size,
21
- children
22
- }) => {
23
- const style = {
24
- position: 'relative',
25
- width: size,
26
- height: size
27
- };
28
- return /*#__PURE__*/_jsx("div", {
29
- style: style,
30
- children: children
31
- });
32
- };
33
-
34
- /**
35
- * Creates a neon glow box-shadow string with multiple layers
36
- * This mimics SVG Gaussian blur filter effects
37
- */
38
- function createNeonGlow(color, radius) {
39
- // Layer 1: Tight bright core
40
- // Layer 2: Medium spread
41
- // Layer 3: Wide soft outer glow
42
- // Layer 4: Very wide ambient glow
43
- return [`0 0 ${radius * 0.15}px ${color}`,
44
- // Bright core
45
- `0 0 ${radius * 0.3}px ${color}`,
46
- // Inner glow
47
- `0 0 ${radius * 0.6}px ${color}cc`,
48
- // Medium glow (80% opacity)
49
- `0 0 ${radius}px ${color}80`,
50
- // Outer glow (50% opacity)
51
- `0 0 ${radius * 1.5}px ${color}40` // Ambient glow (25% opacity)
52
- ].join(', ');
53
- }
54
- export const IconCircle = ({
55
- cx,
56
- cy,
57
- r,
58
- fill,
59
- borderColor,
60
- borderWidth = 0,
61
- opacity = 1,
62
- scaleX = 1,
63
- scaleY = 1,
64
- glowColor,
65
- glowRadius = 0,
66
- rotation = 0
67
- }) => {
68
- const diameter = r * 2;
69
- const transforms = [];
70
- if (scaleX !== 1) transforms.push(`scaleX(${scaleX})`);
71
- if (scaleY !== 1) transforms.push(`scaleY(${scaleY})`);
72
- if (rotation !== 0) transforms.push(`rotate(${rotation}deg)`);
73
- const style = {
74
- position: 'absolute',
75
- left: cx - r,
76
- top: cy - r,
77
- width: diameter,
78
- height: diameter,
79
- borderRadius: r,
80
- backgroundColor: fill,
81
- border: borderColor ? `${borderWidth}px solid ${borderColor}` : undefined,
82
- opacity,
83
- transform: transforms.length > 0 ? transforms.join(' ') : undefined,
84
- transformOrigin: '50% 50%',
85
- boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined,
86
- boxSizing: 'border-box'
87
- };
88
- return /*#__PURE__*/_jsx("div", {
89
- style: style
90
- });
91
- };
92
- export const IconRect = ({
93
- x,
94
- y,
95
- width,
96
- height,
97
- fill,
98
- borderColor,
99
- borderWidth = 0,
100
- borderRadius = 0,
101
- opacity = 1,
102
- glowColor,
103
- glowRadius = 0,
104
- rotation,
105
- originX = 0,
106
- originY = 0.5
107
- }) => {
108
- const style = {
109
- position: 'absolute',
110
- left: x,
111
- top: y,
112
- width,
113
- height,
114
- borderRadius,
115
- backgroundColor: fill,
116
- border: borderColor ? `${borderWidth}px solid ${borderColor}` : undefined,
117
- opacity,
118
- boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined,
119
- boxSizing: 'border-box',
120
- transform: rotation !== undefined ? `rotate(${rotation}deg)` : undefined,
121
- transformOrigin: rotation !== undefined ? `${originX * 100}% ${originY * 100}%` : undefined
122
- };
123
- return /*#__PURE__*/_jsx("div", {
124
- style: style
125
- });
126
- };
127
-
128
- /**
129
- * Calculates a point on a quadratic Bezier curve (1 control point)
130
- * B(t) = (1-t)²P0 + 2(1-t)tP1 + t²P2
131
- */
132
- function getQuadraticBezierPoint(t, p0x, p0y, p1x, p1y, p2x, p2y) {
133
- const mt = 1 - t;
134
- return {
135
- x: mt * mt * p0x + 2 * mt * t * p1x + t * t * p2x,
136
- y: mt * mt * p0y + 2 * mt * t * p1y + t * t * p2y
137
- };
138
- }
139
-
140
- /**
141
- * Calculates a point on a cubic Bezier curve (2 control points)
142
- * B(t) = (1-t)³P0 + 3(1-t)²tP1 + 3(1-t)t²P2 + t³P3
143
- */
144
- function getCubicBezierPoint(t, p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
145
- const mt = 1 - t;
146
- const mt2 = mt * mt;
147
- const mt3 = mt2 * mt;
148
- const t2 = t * t;
149
- const t3 = t2 * t;
150
- return {
151
- x: mt3 * p0x + 3 * mt2 * t * p1x + 3 * mt * t2 * p2x + t3 * p3x,
152
- y: mt3 * p0y + 3 * mt2 * t * p1y + 3 * mt * t2 * p2y + t3 * p3y
153
- };
154
- }
155
-
156
- /**
157
- * IconLine - draws a line between two points
158
- * Auto-calculates length and rotation from coordinates!
159
- * Supports curved lines via cubic Bezier (2 control points) or quadratic (1 control point).
160
- */
161
- export const IconLine = ({
162
- x1,
163
- y1,
164
- x2,
165
- y2,
166
- stroke,
167
- strokeWidth = 1,
168
- opacity = 1,
169
- glowColor,
170
- glowRadius = 0,
171
- rotation = 0,
172
- curveX,
173
- curveY,
174
- curve2X,
175
- curve2Y
176
- }) => {
177
- // Check if this is a curved line (either control point set)
178
- const hasCurve1 = curveX !== undefined && curveX !== 0 || curveY !== undefined && curveY !== 0;
179
- const hasCurve2 = curve2X !== undefined && curve2X !== 0 || curve2Y !== undefined && curve2Y !== 0;
180
- const isCurved = hasCurve1 || hasCurve2;
181
- if (isCurved) {
182
- const midX = (x1 + x2) / 2;
183
- const midY = (y1 + y2) / 2;
184
-
185
- // Control points: offset from line midpoint
186
- const control1X = midX + (curveX ?? 0);
187
- const control1Y = midY + (curveY ?? 0);
188
- const control2X = midX + (curve2X ?? 0);
189
- const control2Y = midY + (curve2Y ?? 0);
190
-
191
- // Determine if cubic (2 distinct control points) or quadratic (1 control point)
192
- const isCubic = hasCurve1 && hasCurve2;
193
-
194
- // Estimate curve length using samples
195
- let approxLength = 0;
196
- const sampleCount = 20;
197
- let prevPt = {
198
- x: x1,
199
- y: y1
200
- };
201
- for (let i = 1; i <= sampleCount; i++) {
202
- const t = i / sampleCount;
203
- const pt = isCubic ? getCubicBezierPoint(t, x1, y1, control1X, control1Y, control2X, control2Y, x2, y2) : getQuadraticBezierPoint(t, x1, y1, hasCurve1 ? control1X : control2X, hasCurve1 ? control1Y : control2Y, x2, y2);
204
- approxLength += Math.sqrt((pt.x - prevPt.x) ** 2 + (pt.y - prevPt.y) ** 2);
205
- prevPt = pt;
206
- }
207
- const elements = [];
208
-
209
- // Dense circles for smooth body
210
- const circleSpacing = Math.max(0.05, strokeWidth * 0.02);
211
- const numCircles = Math.max(100, Math.ceil(approxLength / circleSpacing));
212
- for (let i = 0; i <= numCircles; i++) {
213
- const t = i / numCircles;
214
- const pt = isCubic ? getCubicBezierPoint(t, x1, y1, control1X, control1Y, control2X, control2Y, x2, y2) : getQuadraticBezierPoint(t, x1, y1, hasCurve1 ? control1X : control2X, hasCurve1 ? control1Y : control2Y, x2, y2);
215
- const circleStyle = {
216
- position: 'absolute',
217
- left: pt.x - strokeWidth / 2,
218
- top: pt.y - strokeWidth / 2,
219
- width: strokeWidth,
220
- height: strokeWidth,
221
- borderRadius: '50%',
222
- backgroundColor: stroke,
223
- opacity,
224
- boxShadow: i === 0 && glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined
225
- };
226
- elements.push(/*#__PURE__*/_jsx("div", {
227
- style: circleStyle
228
- }, `c${i}`));
229
- }
230
- return /*#__PURE__*/_jsx(_Fragment, {
231
- children: elements
232
- });
233
- }
234
-
235
- // Straight line (original logic)
236
- const dx = x2 - x1;
237
- const dy = y2 - y1;
238
- const length = Math.sqrt(dx * dx + dy * dy);
239
- const angle = Math.atan2(dy, dx) * (180 / Math.PI);
240
-
241
- // Position at midpoint of line
242
- const centerX = (x1 + x2) / 2;
243
- const centerY = (y1 + y2) / 2;
244
-
245
- // Total rotation = line angle + additional rotation
246
- const totalRotation = angle + rotation;
247
- const style = {
248
- position: 'absolute',
249
- left: centerX - length / 2,
250
- top: centerY - strokeWidth / 2,
251
- width: length,
252
- height: strokeWidth,
253
- backgroundColor: stroke,
254
- opacity,
255
- transform: `rotate(${totalRotation}deg)`,
256
- transformOrigin: '50% 50%',
257
- borderRadius: strokeWidth / 2,
258
- boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined
259
- };
260
- return /*#__PURE__*/_jsx("div", {
261
- style: style
262
- });
263
- };
264
-
265
- /**
266
- * IconTriangle - creates triangles using CSS border trick
267
- * Works without SVG!
268
- */
269
- export const IconTriangle = ({
270
- x,
271
- y,
272
- size,
273
- direction,
274
- fill,
275
- opacity = 1,
276
- rotation
277
- }) => {
278
- // CSS border trick: use transparent borders to create triangle
279
- // The size is the height of the triangle, width is size * 2 / sqrt(3) for equilateral
280
- const halfWidth = size * 0.577; // size / sqrt(3) for equilateral-ish triangle
281
-
282
- // Build border styles based on direction
283
- let borderStyles = {};
284
- let offsetX = 0;
285
- let offsetY = 0;
286
- switch (direction) {
287
- case 'down':
288
- borderStyles = {
289
- borderLeft: `${halfWidth}px solid transparent`,
290
- borderRight: `${halfWidth}px solid transparent`,
291
- borderTop: `${size}px solid ${fill}`
292
- };
293
- offsetX = -halfWidth;
294
- offsetY = 0;
295
- break;
296
- case 'up':
297
- borderStyles = {
298
- borderLeft: `${halfWidth}px solid transparent`,
299
- borderRight: `${halfWidth}px solid transparent`,
300
- borderBottom: `${size}px solid ${fill}`
301
- };
302
- offsetX = -halfWidth;
303
- offsetY = -size;
304
- break;
305
- case 'left':
306
- borderStyles = {
307
- borderTop: `${halfWidth}px solid transparent`,
308
- borderBottom: `${halfWidth}px solid transparent`,
309
- borderRight: `${size}px solid ${fill}`
310
- };
311
- offsetX = -size;
312
- offsetY = -halfWidth;
313
- break;
314
- case 'right':
315
- borderStyles = {
316
- borderTop: `${halfWidth}px solid transparent`,
317
- borderBottom: `${halfWidth}px solid transparent`,
318
- borderLeft: `${size}px solid ${fill}`
319
- };
320
- offsetX = 0;
321
- offsetY = -halfWidth;
322
- break;
323
- }
324
- const transforms = [];
325
- if (rotation !== undefined) {
326
- transforms.push(`rotate(${rotation}deg)`);
327
- }
328
- const style = {
329
- position: 'absolute',
330
- left: x + offsetX,
331
- top: y + offsetY,
332
- width: 0,
333
- height: 0,
334
- opacity,
335
- ...borderStyles,
336
- transform: transforms.length > 0 ? transforms.join(' ') : undefined,
337
- transformOrigin: '50% 50%'
338
- };
339
- return /*#__PURE__*/_jsx("div", {
340
- style: style
341
- });
342
- };
343
-
344
- /**
345
- * IconArc - draws an arc using multiple line segments
346
- * Creates smooth curves without SVG!
347
- */
348
- export const IconArc = ({
349
- cx,
350
- cy,
351
- r,
352
- startAngle,
353
- endAngle,
354
- stroke,
355
- strokeWidth = 1.5,
356
- opacity = 1,
357
- segments
358
- }) => {
359
- // Calculate number of segments based on arc length
360
- const arcLength = Math.abs(endAngle - startAngle);
361
- const autoSegments = Math.max(8, Math.ceil(arcLength / 10)); // ~10 degrees per segment
362
- const numSegments = segments ?? autoSegments;
363
-
364
- // Generate line segments
365
- const lines = [];
366
- const angleStep = (endAngle - startAngle) / numSegments;
367
- for (let i = 0; i < numSegments; i++) {
368
- const angle1 = startAngle + i * angleStep;
369
- const angle2 = startAngle + (i + 1) * angleStep;
370
-
371
- // Convert to radians
372
- const rad1 = angle1 * Math.PI / 180;
373
- const rad2 = angle2 * Math.PI / 180;
374
-
375
- // Calculate segment endpoints
376
- const x1 = cx + r * Math.cos(rad1);
377
- const y1 = cy + r * Math.sin(rad1);
378
- const x2 = cx + r * Math.cos(rad2);
379
- const y2 = cy + r * Math.sin(rad2);
380
-
381
- // Calculate segment geometry
382
- const dx = x2 - x1;
383
- const dy = y2 - y1;
384
- const length = Math.sqrt(dx * dx + dy * dy);
385
- const angle = Math.atan2(dy, dx) * (180 / Math.PI);
386
- const midX = (x1 + x2) / 2;
387
- const midY = (y1 + y2) / 2;
388
- const style = {
389
- position: 'absolute',
390
- left: midX - length / 2,
391
- top: midY - strokeWidth / 2,
392
- width: length,
393
- height: strokeWidth,
394
- backgroundColor: stroke,
395
- opacity,
396
- transform: `rotate(${angle}deg)`,
397
- transformOrigin: '50% 50%',
398
- borderRadius: strokeWidth / 2
399
- };
400
- lines.push(/*#__PURE__*/_jsx("div", {
401
- style: style
402
- }, i));
403
- }
404
- return /*#__PURE__*/_jsx(_Fragment, {
405
- children: lines
406
- });
407
- };
408
-
409
- /**
410
- * IconSemicircle - creates a half circle (filled)
411
- * Perfect for pokeball-style split designs!
412
- */
413
- export const IconSemicircle = ({
414
- cx,
415
- cy,
416
- r,
417
- half,
418
- fill,
419
- borderColor,
420
- borderWidth = 0,
421
- opacity = 1,
422
- glowColor,
423
- glowRadius = 0
424
- }) => {
425
- const diameter = r * 2;
426
-
427
- // Calculate position and border radii based on which half
428
- let left;
429
- let top;
430
- let width;
431
- let height;
432
- let borderRadius;
433
- switch (half) {
434
- case 'top':
435
- left = cx - r;
436
- top = cy - r;
437
- width = diameter;
438
- height = r;
439
- borderRadius = `${r}px ${r}px 0 0`;
440
- break;
441
- case 'bottom':
442
- left = cx - r;
443
- top = cy;
444
- width = diameter;
445
- height = r;
446
- borderRadius = `0 0 ${r}px ${r}px`;
447
- break;
448
- case 'left':
449
- left = cx - r;
450
- top = cy - r;
451
- width = r;
452
- height = diameter;
453
- borderRadius = `${r}px 0 0 ${r}px`;
454
- break;
455
- case 'right':
456
- left = cx;
457
- top = cy - r;
458
- width = r;
459
- height = diameter;
460
- borderRadius = `0 ${r}px ${r}px 0`;
461
- break;
462
- }
463
- const style = {
464
- position: 'absolute',
465
- left,
466
- top,
467
- width,
468
- height,
469
- borderRadius,
470
- backgroundColor: fill,
471
- border: borderColor ? `${borderWidth}px solid ${borderColor}` : undefined,
472
- opacity,
473
- boxShadow: glowColor && glowRadius > 0 ? createNeonGlow(glowColor, glowRadius) : undefined,
474
- boxSizing: 'border-box'
475
- };
476
- return /*#__PURE__*/_jsx("div", {
477
- style: style
478
- });
479
- };
480
-
481
- /**
482
- * IconSmoothArc - creates a smooth arc using the border trick
483
- * Uses bordered circles with partial borders hidden - gives perfect anti-aliased curves!
484
- * This is how the WiFi icon achieves smooth lines without dots.
485
- */
486
- export const IconSmoothArc = ({
487
- cx,
488
- cy,
489
- r,
490
- stroke,
491
- strokeWidth = 2,
492
- opacity = 1,
493
- portion = 'bottom'
494
- }) => {
495
- const diameter = r * 2;
496
-
497
- // Build border colors based on which portion to show
498
- let borderTopColor = stroke;
499
- let borderBottomColor = stroke;
500
- let borderLeftColor = stroke;
501
- let borderRightColor = stroke;
502
- switch (portion) {
503
- case 'bottom':
504
- // Show bottom arc (hide top, left, right)
505
- borderTopColor = 'transparent';
506
- borderLeftColor = 'transparent';
507
- borderRightColor = 'transparent';
508
- break;
509
- case 'top':
510
- // Show top arc (hide bottom, left, right)
511
- borderBottomColor = 'transparent';
512
- borderLeftColor = 'transparent';
513
- borderRightColor = 'transparent';
514
- break;
515
- case 'left':
516
- // Show left arc (hide top, bottom, right)
517
- borderTopColor = 'transparent';
518
- borderBottomColor = 'transparent';
519
- borderRightColor = 'transparent';
520
- break;
521
- case 'right':
522
- // Show right arc (hide top, bottom, left)
523
- borderTopColor = 'transparent';
524
- borderBottomColor = 'transparent';
525
- borderLeftColor = 'transparent';
526
- break;
527
- }
528
- const style = {
529
- position: 'absolute',
530
- left: cx - r,
531
- top: cy - r,
532
- width: diameter,
533
- height: diameter,
534
- borderRadius: r,
535
- borderWidth: strokeWidth,
536
- borderStyle: 'solid',
537
- borderTopColor,
538
- borderBottomColor,
539
- borderLeftColor,
540
- borderRightColor,
541
- opacity,
542
- boxSizing: 'border-box'
543
- };
544
- return /*#__PURE__*/_jsx("div", {
545
- style: style
546
- });
547
- };
1
+ "use strict";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";export const IconContainer=({size:o,children:t})=>_jsx("div",{style:{position:"relative",width:o,height:o},children:t});function createNeonGlow(o,t){return[`0 0 ${.15*t}px ${o}`,`0 0 ${.3*t}px ${o}`,`0 0 ${.6*t}px ${o}cc`,`0 0 ${t}px ${o}80`,`0 0 ${1.5*t}px ${o}40`].join(", ")}export const IconCircle=({cx:o,cy:t,r:r,fill:e,borderColor:i,borderWidth:a=0,opacity:n=1,scaleX:s=1,scaleY:d=1,glowColor:c,glowRadius:l=0,rotation:p=0})=>{const h=2*r,b=[];1!==s&&b.push(`scaleX(${s})`),1!==d&&b.push(`scaleY(${d})`),0!==p&&b.push(`rotate(${p}deg)`);const x={position:"absolute",left:o-r,top:t-r,width:h,height:h,borderRadius:r,backgroundColor:e,border:i?`${a}px solid ${i}`:void 0,opacity:n,transform:b.length>0?b.join(" "):void 0,transformOrigin:"50% 50%",boxShadow:c&&l>0?createNeonGlow(c,l):void 0,boxSizing:"border-box"};return _jsx("div",{style:x})};export const IconRect=({x:o,y:t,width:r,height:e,fill:i,borderColor:a,borderWidth:n=0,borderRadius:s=0,opacity:d=1,glowColor:c,glowRadius:l=0,rotation:p,originX:h=0,originY:b=.5})=>{const x={position:"absolute",left:o,top:t,width:r,height:e,borderRadius:s,backgroundColor:i,border:a?`${n}px solid ${a}`:void 0,opacity:d,boxShadow:c&&l>0?createNeonGlow(c,l):void 0,boxSizing:"border-box",transform:void 0!==p?`rotate(${p}deg)`:void 0,transformOrigin:void 0!==p?`${100*h}% ${100*b}%`:void 0};return _jsx("div",{style:x})};function getQuadraticBezierPoint(o,t,r,e,i,a,n){const s=1-o;return{x:s*s*t+2*s*o*e+o*o*a,y:s*s*r+2*s*o*i+o*o*n}}function getCubicBezierPoint(o,t,r,e,i,a,n,s,d){const c=1-o,l=c*c,p=l*c,h=o*o,b=h*o;return{x:p*t+3*l*o*e+3*c*h*a+b*s,y:p*r+3*l*o*i+3*c*h*n+b*d}}export const IconLine=({x1:o,y1:t,x2:r,y2:e,stroke:i,strokeWidth:a=1,opacity:n=1,glowColor:s,glowRadius:d=0,rotation:c=0,curveX:l,curveY:p,curve2X:h,curve2Y:b})=>{const x=void 0!==l&&0!==l||void 0!==p&&0!==p,g=void 0!==h&&0!==h||void 0!==b&&0!==b;if(x||g){const c=(o+r)/2,u=(t+e)/2,$=c+(l??0),y=u+(p??0),f=c+(h??0),v=u+(b??0),w=x&&g;let m=0;const C=20;let k={x:o,y:t};for(let i=1;i<=C;i++){const a=i/C,n=w?getCubicBezierPoint(a,o,t,$,y,f,v,r,e):getQuadraticBezierPoint(a,o,t,x?$:f,x?y:v,r,e);m+=Math.sqrt((n.x-k.x)**2+(n.y-k.y)**2),k=n}const M=[],j=Math.max(.05,.02*a),R=Math.max(100,Math.ceil(m/j));for(let c=0;c<=R;c++){const l=c/R,p=w?getCubicBezierPoint(l,o,t,$,y,f,v,r,e):getQuadraticBezierPoint(l,o,t,x?$:f,x?y:v,r,e),h={position:"absolute",left:p.x-a/2,top:p.y-a/2,width:a,height:a,borderRadius:"50%",backgroundColor:i,opacity:n,boxShadow:0===c&&s&&d>0?createNeonGlow(s,d):void 0};M.push(_jsx("div",{style:h},`c${c}`))}return _jsx(_Fragment,{children:M})}const u=r-o,$=e-t,y=Math.sqrt(u*u+$*$),f={position:"absolute",left:(o+r)/2-y/2,top:(t+e)/2-a/2,width:y,height:a,backgroundColor:i,opacity:n,transform:`rotate(${Math.atan2($,u)*(180/Math.PI)+c}deg)`,transformOrigin:"50% 50%",borderRadius:a/2,boxShadow:s&&d>0?createNeonGlow(s,d):void 0};return _jsx("div",{style:f})};export const IconTriangle=({x:o,y:t,size:r,direction:e,fill:i,opacity:a=1,rotation:n})=>{const s=.577*r;let d={},c=0,l=0;switch(e){case"down":d={borderLeft:`${s}px solid transparent`,borderRight:`${s}px solid transparent`,borderTop:`${r}px solid ${i}`},c=-s,l=0;break;case"up":d={borderLeft:`${s}px solid transparent`,borderRight:`${s}px solid transparent`,borderBottom:`${r}px solid ${i}`},c=-s,l=-r;break;case"left":d={borderTop:`${s}px solid transparent`,borderBottom:`${s}px solid transparent`,borderRight:`${r}px solid ${i}`},c=-r,l=-s;break;case"right":d={borderTop:`${s}px solid transparent`,borderBottom:`${s}px solid transparent`,borderLeft:`${r}px solid ${i}`},c=0,l=-s}const p=[];void 0!==n&&p.push(`rotate(${n}deg)`);const h={position:"absolute",left:o+c,top:t+l,width:0,height:0,opacity:a,...d,transform:p.length>0?p.join(" "):void 0,transformOrigin:"50% 50%"};return _jsx("div",{style:h})};export const IconArc=({cx:o,cy:t,r:r,startAngle:e,endAngle:i,stroke:a,strokeWidth:n=1.5,opacity:s=1,segments:d})=>{const c=Math.abs(i-e),l=Math.max(8,Math.ceil(c/10)),p=d??l,h=[],b=(i-e)/p;for(let i=0;i<p;i++){const d=e+(i+1)*b,c=(e+i*b)*Math.PI/180,l=d*Math.PI/180,p=o+r*Math.cos(c),x=t+r*Math.sin(c),g=o+r*Math.cos(l),u=t+r*Math.sin(l),$=g-p,y=u-x,f=Math.sqrt($*$+y*y),v={position:"absolute",left:(p+g)/2-f/2,top:(x+u)/2-n/2,width:f,height:n,backgroundColor:a,opacity:s,transform:`rotate(${Math.atan2(y,$)*(180/Math.PI)}deg)`,transformOrigin:"50% 50%",borderRadius:n/2};h.push(_jsx("div",{style:v},i))}return _jsx(_Fragment,{children:h})};export const IconSemicircle=({cx:o,cy:t,r:r,half:e,fill:i,borderColor:a,borderWidth:n=0,opacity:s=1,glowColor:d,glowRadius:c=0})=>{const l=2*r;let p,h,b,x,g;switch(e){case"top":p=o-r,h=t-r,b=l,x=r,g=`${r}px ${r}px 0 0`;break;case"bottom":p=o-r,h=t,b=l,x=r,g=`0 0 ${r}px ${r}px`;break;case"left":p=o-r,h=t-r,b=r,x=l,g=`${r}px 0 0 ${r}px`;break;case"right":p=o,h=t-r,b=r,x=l,g=`0 ${r}px ${r}px 0`}const u={position:"absolute",left:p,top:h,width:b,height:x,borderRadius:g,backgroundColor:i,border:a?`${n}px solid ${a}`:void 0,opacity:s,boxShadow:d&&c>0?createNeonGlow(d,c):void 0,boxSizing:"border-box"};return _jsx("div",{style:u})};export const IconSmoothArc=({cx:o,cy:t,r:r,stroke:e,strokeWidth:i=2,opacity:a=1,portion:n="bottom"})=>{const s=2*r;let d=e,c=e,l=e,p=e;switch(n){case"bottom":d="transparent",l="transparent",p="transparent";break;case"top":c="transparent",l="transparent",p="transparent";break;case"left":d="transparent",c="transparent",p="transparent";break;case"right":d="transparent",c="transparent",l="transparent"}return _jsx("div",{style:{position:"absolute",left:o-r,top:t-r,width:s,height:s,borderRadius:r,borderWidth:i,borderStyle:"solid",borderTopColor:d,borderBottomColor:c,borderLeftColor:l,borderRightColor:p,opacity:a,boxSizing:"border-box"}})};