@buoy-gg/floating-tools-core 2.1.4-beta.2 → 2.1.4

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 (107) hide show
  1. package/lib/commonjs/FloatingToolsStore.js +1 -501
  2. package/lib/commonjs/colors.js +1 -54
  3. package/lib/commonjs/constants.js +1 -31
  4. package/lib/commonjs/devToolsState.js +1 -325
  5. package/lib/commonjs/dial.js +1 -617
  6. package/lib/commonjs/easing.js +1 -69
  7. package/lib/commonjs/icons/benchmark-icon.js +1 -24
  8. package/lib/commonjs/icons/env-icon.js +1 -24
  9. package/lib/commonjs/icons/events-icon.js +1 -24
  10. package/lib/commonjs/icons/highlight-icon.js +1 -24
  11. package/lib/commonjs/icons/icon-data.js +1 -2268
  12. package/lib/commonjs/icons/icon-factories.js +1 -173
  13. package/lib/commonjs/icons/icon-primitives.js +1 -559
  14. package/lib/commonjs/icons/icon-primitives.native.js +1 -779
  15. package/lib/commonjs/icons/icon-renderer.js +1 -260
  16. package/lib/commonjs/icons/network-icon.js +1 -24
  17. package/lib/commonjs/icons/query-icon.js +1 -24
  18. package/lib/commonjs/icons/redux-icon.js +1 -85
  19. package/lib/commonjs/icons/renders-icon.js +1 -33
  20. package/lib/commonjs/icons/routes-icon.js +1 -49
  21. package/lib/commonjs/icons/sentry-icon.js +1 -24
  22. package/lib/commonjs/icons/storage-icon.js +1 -24
  23. package/lib/commonjs/icons/wifi-icon.js +1 -24
  24. package/lib/commonjs/index.js +1 -723
  25. package/lib/commonjs/settings.js +1 -588
  26. package/lib/commonjs/utils.js +1 -72
  27. package/lib/module/FloatingToolsStore.js +1 -496
  28. package/lib/module/colors.js +1 -49
  29. package/lib/module/constants.js +1 -27
  30. package/lib/module/devToolsState.js +1 -318
  31. package/lib/module/dial.js +1 -603
  32. package/lib/module/easing.js +1 -62
  33. package/lib/module/icons/benchmark-icon.js +1 -15
  34. package/lib/module/icons/env-icon.js +1 -15
  35. package/lib/module/icons/events-icon.js +1 -15
  36. package/lib/module/icons/highlight-icon.js +1 -15
  37. package/lib/module/icons/icon-data.js +1 -2264
  38. package/lib/module/icons/icon-factories.js +1 -163
  39. package/lib/module/icons/icon-primitives.js +1 -547
  40. package/lib/module/icons/icon-primitives.native.js +1 -767
  41. package/lib/module/icons/icon-renderer.js +1 -255
  42. package/lib/module/icons/network-icon.js +1 -15
  43. package/lib/module/icons/query-icon.js +1 -15
  44. package/lib/module/icons/redux-icon.js +1 -81
  45. package/lib/module/icons/renders-icon.js +1 -17
  46. package/lib/module/icons/routes-icon.js +1 -41
  47. package/lib/module/icons/sentry-icon.js +1 -15
  48. package/lib/module/icons/storage-icon.js +1 -15
  49. package/lib/module/icons/wifi-icon.js +1 -15
  50. package/lib/module/index.js +1 -103
  51. package/lib/module/settings.js +1 -576
  52. package/lib/module/utils.js +1 -66
  53. package/package.json +1 -1
  54. package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +0 -1
  55. package/lib/typescript/commonjs/colors.d.ts.map +0 -1
  56. package/lib/typescript/commonjs/constants.d.ts.map +0 -1
  57. package/lib/typescript/commonjs/devToolsState.d.ts.map +0 -1
  58. package/lib/typescript/commonjs/dial.d.ts.map +0 -1
  59. package/lib/typescript/commonjs/easing.d.ts.map +0 -1
  60. package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +0 -1
  61. package/lib/typescript/commonjs/icons/env-icon.d.ts.map +0 -1
  62. package/lib/typescript/commonjs/icons/events-icon.d.ts.map +0 -1
  63. package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +0 -1
  64. package/lib/typescript/commonjs/icons/icon-data.d.ts.map +0 -1
  65. package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +0 -1
  66. package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +0 -1
  67. package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +0 -1
  68. package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +0 -1
  69. package/lib/typescript/commonjs/icons/network-icon.d.ts.map +0 -1
  70. package/lib/typescript/commonjs/icons/query-icon.d.ts.map +0 -1
  71. package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +0 -1
  72. package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +0 -1
  73. package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +0 -1
  74. package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +0 -1
  75. package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +0 -1
  76. package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +0 -1
  77. package/lib/typescript/commonjs/index.d.ts.map +0 -1
  78. package/lib/typescript/commonjs/settings.d.ts.map +0 -1
  79. package/lib/typescript/commonjs/types.d.ts.map +0 -1
  80. package/lib/typescript/commonjs/utils.d.ts.map +0 -1
  81. package/lib/typescript/module/FloatingToolsStore.d.ts.map +0 -1
  82. package/lib/typescript/module/colors.d.ts.map +0 -1
  83. package/lib/typescript/module/constants.d.ts.map +0 -1
  84. package/lib/typescript/module/devToolsState.d.ts.map +0 -1
  85. package/lib/typescript/module/dial.d.ts.map +0 -1
  86. package/lib/typescript/module/easing.d.ts.map +0 -1
  87. package/lib/typescript/module/icons/benchmark-icon.d.ts.map +0 -1
  88. package/lib/typescript/module/icons/env-icon.d.ts.map +0 -1
  89. package/lib/typescript/module/icons/events-icon.d.ts.map +0 -1
  90. package/lib/typescript/module/icons/highlight-icon.d.ts.map +0 -1
  91. package/lib/typescript/module/icons/icon-data.d.ts.map +0 -1
  92. package/lib/typescript/module/icons/icon-factories.d.ts.map +0 -1
  93. package/lib/typescript/module/icons/icon-primitives.d.ts.map +0 -1
  94. package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +0 -1
  95. package/lib/typescript/module/icons/icon-renderer.d.ts.map +0 -1
  96. package/lib/typescript/module/icons/network-icon.d.ts.map +0 -1
  97. package/lib/typescript/module/icons/query-icon.d.ts.map +0 -1
  98. package/lib/typescript/module/icons/redux-icon.d.ts.map +0 -1
  99. package/lib/typescript/module/icons/renders-icon.d.ts.map +0 -1
  100. package/lib/typescript/module/icons/routes-icon.d.ts.map +0 -1
  101. package/lib/typescript/module/icons/sentry-icon.d.ts.map +0 -1
  102. package/lib/typescript/module/icons/storage-icon.d.ts.map +0 -1
  103. package/lib/typescript/module/icons/wifi-icon.d.ts.map +0 -1
  104. package/lib/typescript/module/index.d.ts.map +0 -1
  105. package/lib/typescript/module/settings.d.ts.map +0 -1
  106. package/lib/typescript/module/types.d.ts.map +0 -1
  107. package/lib/typescript/module/utils.d.ts.map +0 -1
@@ -1,255 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * Icon Renderer - Transforms icon data to components
5
- *
6
- * ONE renderer for ALL icons. Icons are just data.
7
- */
8
-
9
- import { IconContainer, IconCircle, IconRect, IconLine, IconTriangle, IconArc, IconSemicircle, IconSmoothArc } from './icon-primitives';
10
-
11
- // ===========================================
12
- // Icon Data Types
13
- // ===========================================
14
-
15
- /**
16
- * Line element - draws a line between two points
17
- * Much cleaner than using rotated rectangles!
18
- * Supports optional curve via cubic Bezier with 2 control points.
19
- */
20
-
21
- /**
22
- * Triangle element - creates arrows/chevrons using CSS border trick
23
- * Works in pure React Native!
24
- */
25
-
26
- /**
27
- * Arc element - creates curved segments (WiFi bars, circular progress)
28
- * Rendered as multiple line segments approximating a curve.
29
- */
30
-
31
- /**
32
- * Semicircle element - creates a half circle (filled)
33
- * Perfect for pokeball-style split designs!
34
- */
35
-
36
- /**
37
- * SmoothArc element - creates a smooth arc using the border trick
38
- * Uses bordered circles with partial borders hidden - gives perfect anti-aliased curves!
39
- * This is the "clever trick" for WiFi-style arcs.
40
- */
41
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
42
- // ===========================================
43
- // Color Utilities
44
- // ===========================================
45
-
46
- /**
47
- * Converts hex color to rgba with opacity
48
- * Supports 3-char (#RGB), 6-char (#RRGGBB), and 8-char (#RRGGBBAA) hex
49
- */
50
- function hexToRgba(hex, opacity) {
51
- // Remove # if present
52
- const h = hex.replace('#', '');
53
-
54
- // Parse based on length
55
- let r, g, b;
56
- if (h.length === 3) {
57
- r = parseInt(h[0] + h[0], 16);
58
- g = parseInt(h[1] + h[1], 16);
59
- b = parseInt(h[2] + h[2], 16);
60
- } else if (h.length >= 6) {
61
- r = parseInt(h.substring(0, 2), 16);
62
- g = parseInt(h.substring(2, 4), 16);
63
- b = parseInt(h.substring(4, 6), 16);
64
- } else {
65
- return hex; // Invalid format, return as-is
66
- }
67
- return `rgba(${r}, ${g}, ${b}, ${opacity})`;
68
- }
69
-
70
- /**
71
- * Resolves ColorRef syntax to actual color value
72
- *
73
- * Supports:
74
- * - 'color' → theme color
75
- * - 'bg' → background color
76
- * - 'color:50' → theme color at 50% opacity
77
- * - 'bg:30' → background color at 30% opacity
78
- * - '#FF0000' → raw hex color
79
- * - '#FF0000:50' → raw hex at 50% opacity
80
- */
81
- function resolveColor(fill, color, bgColor) {
82
- if (!fill) return undefined;
83
-
84
- // Check for opacity suffix (e.g., 'color:50' or '#FF0000:80')
85
- const colonIndex = fill.lastIndexOf(':');
86
- let baseFill = fill;
87
- let opacity = 1;
88
-
89
- // Only treat as opacity if the part after colon is a valid number
90
- if (colonIndex > 0) {
91
- const opacityStr = fill.substring(colonIndex + 1);
92
- const parsedOpacity = parseInt(opacityStr, 10);
93
- if (!isNaN(parsedOpacity) && parsedOpacity >= 0 && parsedOpacity <= 100) {
94
- baseFill = fill.substring(0, colonIndex);
95
- opacity = parsedOpacity / 100;
96
- }
97
- }
98
-
99
- // Resolve the base color
100
- let resolvedColor;
101
- if (baseFill === 'color') {
102
- resolvedColor = color;
103
- } else if (baseFill === 'bg') {
104
- resolvedColor = bgColor;
105
- } else {
106
- resolvedColor = baseFill;
107
- }
108
-
109
- // Apply opacity if needed
110
- if (opacity < 1 && resolvedColor.startsWith('#')) {
111
- return hexToRgba(resolvedColor, opacity);
112
- }
113
- return resolvedColor;
114
- }
115
-
116
- // ===========================================
117
- // Icon Renderer
118
- // ===========================================
119
-
120
- export function renderIconData(data, size, colorOverride, bgColorOverride) {
121
- const scale = size / 24;
122
- const center = size / 2;
123
- // Use colorOverride if provided, otherwise use the icon's default color
124
- const color = colorOverride ?? data.color;
125
- // Use bgColorOverride if provided, otherwise use the icon's default bgColor
126
- const bgColor = bgColorOverride ?? data.bgColor;
127
- const elements = data.elements;
128
- return /*#__PURE__*/_jsx(IconContainer, {
129
- size: size,
130
- children: elements.map((el, i) => {
131
- if (el.type === 'circle') {
132
- return /*#__PURE__*/_jsx(IconCircle, {
133
- cx: center + el.cx * scale,
134
- cy: center + el.cy * scale,
135
- r: el.r * scale,
136
- fill: resolveColor(el.fill, color, bgColor),
137
- borderColor: el.border ? color : undefined,
138
- borderWidth: el.border ? (el.borderWidth ?? 2) * scale : 0,
139
- opacity: el.opacity,
140
- scaleX: el.scaleX,
141
- scaleY: el.scaleY,
142
- glowColor: el.glow ? color : undefined,
143
- glowRadius: el.glow ? (el.glowRadius ?? 4) * scale : 0,
144
- rotation: el.rotation
145
- }, i);
146
- }
147
- if (el.type === 'rect') {
148
- // Determine rotation origin:
149
- // - rotateFromCenter: true = rotate from center (0.5, 0.5) - for symmetric elements
150
- // - rotateFromCenter: false/undefined = rotate from left edge (0, 0.5) - for lines starting from a point
151
- const originX = el.rotation !== undefined ? el.rotateFromCenter ? 0.5 : 0 : 0.5;
152
- return /*#__PURE__*/_jsx(IconRect, {
153
- x: center + el.x * scale,
154
- y: center + el.y * scale,
155
- width: el.width * scale,
156
- height: el.height * scale,
157
- fill: resolveColor(el.fill, color, bgColor),
158
- borderColor: el.border ? color : undefined,
159
- borderWidth: el.border ? (el.borderWidth ?? 1) * scale : 0,
160
- borderRadius: (el.borderRadius ?? 0) * scale,
161
- opacity: el.opacity,
162
- glowColor: el.glow ? color : undefined,
163
- glowRadius: el.glow ? (el.glowRadius ?? 4) * scale : 0,
164
- rotation: el.rotation,
165
- originX: originX,
166
- originY: 0.5
167
- }, i);
168
- }
169
- if (el.type === 'line') {
170
- return /*#__PURE__*/_jsx(IconLine, {
171
- x1: center + el.x1 * scale,
172
- y1: center + el.y1 * scale,
173
- x2: center + el.x2 * scale,
174
- y2: center + el.y2 * scale,
175
- stroke: resolveColor(el.stroke ?? 'color', color, bgColor),
176
- strokeWidth: (el.strokeWidth ?? 1) * scale,
177
- opacity: el.opacity,
178
- glowColor: el.glow ? color : undefined,
179
- glowRadius: el.glow ? (el.glowRadius ?? 4) * scale : 0,
180
- rotation: el.rotation,
181
- curveX: el.curveX !== undefined ? el.curveX * scale : undefined,
182
- curveY: el.curveY !== undefined ? el.curveY * scale : undefined,
183
- curve2X: el.curve2X !== undefined ? el.curve2X * scale : undefined,
184
- curve2Y: el.curve2Y !== undefined ? el.curve2Y * scale : undefined
185
- }, i);
186
- }
187
- if (el.type === 'triangle') {
188
- return /*#__PURE__*/_jsx(IconTriangle, {
189
- x: center + el.x * scale,
190
- y: center + el.y * scale,
191
- size: el.size * scale,
192
- direction: el.direction,
193
- fill: resolveColor(el.fill ?? 'color', color, bgColor),
194
- opacity: el.opacity,
195
- rotation: el.rotation
196
- }, i);
197
- }
198
- if (el.type === 'arc') {
199
- return /*#__PURE__*/_jsx(IconArc, {
200
- cx: center + el.cx * scale,
201
- cy: center + el.cy * scale,
202
- r: el.r * scale,
203
- startAngle: el.startAngle,
204
- endAngle: el.endAngle,
205
- stroke: resolveColor(el.stroke ?? 'color', color, bgColor),
206
- strokeWidth: (el.strokeWidth ?? 1.5) * scale,
207
- opacity: el.opacity,
208
- segments: el.segments
209
- }, i);
210
- }
211
- if (el.type === 'semicircle') {
212
- return /*#__PURE__*/_jsx(IconSemicircle, {
213
- cx: center + el.cx * scale,
214
- cy: center + el.cy * scale,
215
- r: el.r * scale,
216
- half: el.half,
217
- fill: resolveColor(el.fill, color, bgColor),
218
- borderColor: el.border ? color : undefined,
219
- borderWidth: el.border ? (el.borderWidth ?? 2) * scale : 0,
220
- opacity: el.opacity,
221
- glowColor: el.glow ? color : undefined,
222
- glowRadius: el.glow ? (el.glowRadius ?? 4) * scale : 0
223
- }, i);
224
- }
225
- if (el.type === 'smootharc') {
226
- return /*#__PURE__*/_jsx(IconSmoothArc, {
227
- cx: center + el.cx * scale,
228
- cy: center + el.cy * scale,
229
- r: el.r * scale,
230
- stroke: resolveColor(el.stroke ?? 'color', color, bgColor),
231
- strokeWidth: (el.strokeWidth ?? 2) * scale,
232
- opacity: el.opacity,
233
- portion: el.portion ?? 'bottom'
234
- }, i);
235
- }
236
- return null;
237
- })
238
- });
239
- }
240
-
241
- // ===========================================
242
- // Icon Factory
243
- // ===========================================
244
-
245
- export function createIcon(data) {
246
- return function Icon({
247
- size = 24,
248
- color,
249
- bgColor
250
- }) {
251
- return /*#__PURE__*/_jsx(_Fragment, {
252
- children: renderIconData(data, size, color, bgColor)
253
- });
254
- };
255
- }
1
+ "use strict";import{IconContainer,IconCircle,IconRect,IconLine,IconTriangle,IconArc,IconSemicircle,IconSmoothArc}from"./icon-primitives";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";function hexToRgba(o,r){const e=o.replace("#","");let t,i,c;if(3===e.length)t=parseInt(e[0]+e[0],16),i=parseInt(e[1]+e[1],16),c=parseInt(e[2]+e[2],16);else{if(!(e.length>=6))return o;t=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),c=parseInt(e.substring(4,6),16)}return`rgba(${t}, ${i}, ${c}, ${r})`}function resolveColor(o,r,e){if(!o)return;const t=o.lastIndexOf(":");let i,c=o,n=1;if(t>0){const r=o.substring(t+1),e=parseInt(r,10);!isNaN(e)&&e>=0&&e<=100&&(c=o.substring(0,t),n=e/100)}return i="color"===c?r:"bg"===c?e:c,n<1&&i.startsWith("#")?hexToRgba(i,n):i}export function renderIconData(o,r,e,t){const i=r/24,c=r/2,n=e??o.color,l=t??o.bgColor,s=o.elements;return _jsx(IconContainer,{size:r,children:s.map((o,r)=>{if("circle"===o.type)return _jsx(IconCircle,{cx:c+o.cx*i,cy:c+o.cy*i,r:o.r*i,fill:resolveColor(o.fill,n,l),borderColor:o.border?n:void 0,borderWidth:o.border?(o.borderWidth??2)*i:0,opacity:o.opacity,scaleX:o.scaleX,scaleY:o.scaleY,glowColor:o.glow?n:void 0,glowRadius:o.glow?(o.glowRadius??4)*i:0,rotation:o.rotation},r);if("rect"===o.type){const e=void 0!==o.rotation?o.rotateFromCenter?.5:0:.5;return _jsx(IconRect,{x:c+o.x*i,y:c+o.y*i,width:o.width*i,height:o.height*i,fill:resolveColor(o.fill,n,l),borderColor:o.border?n:void 0,borderWidth:o.border?(o.borderWidth??1)*i:0,borderRadius:(o.borderRadius??0)*i,opacity:o.opacity,glowColor:o.glow?n:void 0,glowRadius:o.glow?(o.glowRadius??4)*i:0,rotation:o.rotation,originX:e,originY:.5},r)}return"line"===o.type?_jsx(IconLine,{x1:c+o.x1*i,y1:c+o.y1*i,x2:c+o.x2*i,y2:c+o.y2*i,stroke:resolveColor(o.stroke??"color",n,l),strokeWidth:(o.strokeWidth??1)*i,opacity:o.opacity,glowColor:o.glow?n:void 0,glowRadius:o.glow?(o.glowRadius??4)*i:0,rotation:o.rotation,curveX:void 0!==o.curveX?o.curveX*i:void 0,curveY:void 0!==o.curveY?o.curveY*i:void 0,curve2X:void 0!==o.curve2X?o.curve2X*i:void 0,curve2Y:void 0!==o.curve2Y?o.curve2Y*i:void 0},r):"triangle"===o.type?_jsx(IconTriangle,{x:c+o.x*i,y:c+o.y*i,size:o.size*i,direction:o.direction,fill:resolveColor(o.fill??"color",n,l),opacity:o.opacity,rotation:o.rotation},r):"arc"===o.type?_jsx(IconArc,{cx:c+o.cx*i,cy:c+o.cy*i,r:o.r*i,startAngle:o.startAngle,endAngle:o.endAngle,stroke:resolveColor(o.stroke??"color",n,l),strokeWidth:(o.strokeWidth??1.5)*i,opacity:o.opacity,segments:o.segments},r):"semicircle"===o.type?_jsx(IconSemicircle,{cx:c+o.cx*i,cy:c+o.cy*i,r:o.r*i,half:o.half,fill:resolveColor(o.fill,n,l),borderColor:o.border?n:void 0,borderWidth:o.border?(o.borderWidth??2)*i:0,opacity:o.opacity,glowColor:o.glow?n:void 0,glowRadius:o.glow?(o.glowRadius??4)*i:0},r):"smootharc"===o.type?_jsx(IconSmoothArc,{cx:c+o.cx*i,cy:c+o.cy*i,r:o.r*i,stroke:resolveColor(o.stroke??"color",n,l),strokeWidth:(o.strokeWidth??2)*i,opacity:o.opacity,portion:o.portion??"bottom"},r):null})})}export function createIcon(o){return function({size:r=24,color:e,bgColor:t}){return _jsx(_Fragment,{children:renderIconData(o,r,e,t)})}}
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * NetworkIcon - Data-driven icon
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit networkIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { networkIconData, NETWORK_ICON_COLOR } from "./icon-data.js";
14
- export { NETWORK_ICON_COLOR };
15
- export const NetworkIcon = createIcon(networkIconData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{networkIconData,NETWORK_ICON_COLOR}from"./icon-data.js";export{NETWORK_ICON_COLOR};export const NetworkIcon=createIcon(networkIconData);
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * QueryIcon - Data-driven icon
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit queryIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { queryIconData, QUERY_ICON_COLOR } from "./icon-data.js";
14
- export { QUERY_ICON_COLOR };
15
- export const QueryIcon = createIcon(queryIconData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{queryIconData,QUERY_ICON_COLOR}from"./icon-data.js";export{QUERY_ICON_COLOR};export const QueryIcon=createIcon(queryIconData);
@@ -1,81 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * Redux DevTools icon
5
- * Uses the icon renderer system with cubic Bezier curve support
6
- */
7
-
8
- import { createIcon } from "./icon-renderer.js";
9
- export const REDUX_ICON_COLOR = "#764abc";
10
- const ReduxIconData = {
11
- color: REDUX_ICON_COLOR,
12
- bgColor: "#0a0a0f",
13
- elements: [{
14
- type: "circle",
15
- cx: -1.16,
16
- cy: -2.2135943621178655,
17
- r: 1.4,
18
- fill: "color",
19
- opacity: 1,
20
- scaleX: 1,
21
- scaleY: 1
22
- }, {
23
- type: "circle",
24
- cx: -2.846049894151541,
25
- cy: 4.110960958218893,
26
- r: 1.4,
27
- fill: "color",
28
- opacity: 1,
29
- scaleX: 1,
30
- scaleY: 1
31
- }, {
32
- type: "circle",
33
- cx: 3.89,
34
- cy: 2.31,
35
- r: 1.4,
36
- fill: "color",
37
- opacity: 1,
38
- scaleX: 1,
39
- scaleY: 1
40
- }, {
41
- type: "line",
42
- x1: 0,
43
- y1: -2.2135943621178655,
44
- x2: 3.162277660168379,
45
- y2: 8.538149682454623,
46
- stroke: "color",
47
- strokeWidth: 1.5,
48
- opacity: 1,
49
- curveX: 8.221921916437786,
50
- curveY: -6.00832755431992,
51
- curve2X: 12.01665510863984,
52
- curve2Y: 7.273238618387272
53
- }, {
54
- type: "line",
55
- x1: -7.273238618387272,
56
- y1: 0.31622776601683794,
57
- x2: 3.478505426185217,
58
- y2: 3.162277660168379,
59
- stroke: "color",
60
- strokeWidth: 1.5,
61
- opacity: 1,
62
- curveX: -12.01665510863984,
63
- curveY: 10.435516278555651,
64
- curve2X: 4.427188724235731,
65
- curve2Y: 7.58946638440411
66
- }, {
67
- type: "line",
68
- x1: 4.743416490252569,
69
- y1: -3.794733192202055,
70
- x2: -3.478505426185217,
71
- y2: 3.478505426185217,
72
- stroke: "color",
73
- strokeWidth: 1.1,
74
- opacity: 1,
75
- curveX: 3.162277660168379,
76
- curveY: -11.384199576606164,
77
- curve2X: -9.803060746521975,
78
- curve2Y: -10.119288512538814
79
- }]
80
- };
81
- export const ReduxIcon = createIcon(ReduxIconData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";export const REDUX_ICON_COLOR="#764abc";const ReduxIconData={color:"#764abc",bgColor:"#0a0a0f",elements:[{type:"circle",cx:-1.16,cy:-2.2135943621178655,r:1.4,fill:"color",opacity:1,scaleX:1,scaleY:1},{type:"circle",cx:-2.846049894151541,cy:4.110960958218893,r:1.4,fill:"color",opacity:1,scaleX:1,scaleY:1},{type:"circle",cx:3.89,cy:2.31,r:1.4,fill:"color",opacity:1,scaleX:1,scaleY:1},{type:"line",x1:0,y1:-2.2135943621178655,x2:3.162277660168379,y2:8.538149682454623,stroke:"color",strokeWidth:1.5,opacity:1,curveX:8.221921916437786,curveY:-6.00832755431992,curve2X:12.01665510863984,curve2Y:7.273238618387272},{type:"line",x1:-7.273238618387272,y1:.31622776601683794,x2:3.478505426185217,y2:3.162277660168379,stroke:"color",strokeWidth:1.5,opacity:1,curveX:-12.01665510863984,curveY:10.435516278555651,curve2X:4.427188724235731,curve2Y:7.58946638440411},{type:"line",x1:4.743416490252569,y1:-3.794733192202055,x2:-3.478505426185217,y2:3.478505426185217,stroke:"color",strokeWidth:1.1,opacity:1,curveX:3.162277660168379,curveY:-11.384199576606164,curve2X:-9.803060746521975,curve2Y:-10.119288512538814}]};export const ReduxIcon=createIcon(ReduxIconData);
@@ -1,17 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * HighlighterIcon - Data-driven icon for render tracking
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit highlighterIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { highlighterIconData, HIGHLIGHTER_ICON_COLOR, RENDERS_ICON_COLOR } from "./icon-data.js";
14
- export { HIGHLIGHTER_ICON_COLOR, RENDERS_ICON_COLOR };
15
- export const HighlighterIcon = createIcon(highlighterIconData);
16
- // Legacy alias for backward compatibility
17
- export const RendersIcon = HighlighterIcon;
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{highlighterIconData,HIGHLIGHTER_ICON_COLOR,RENDERS_ICON_COLOR}from"./icon-data.js";export{HIGHLIGHTER_ICON_COLOR,RENDERS_ICON_COLOR};export const HighlighterIcon=createIcon(highlighterIconData);export const RendersIcon=HighlighterIcon;
@@ -1,41 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * RoutesIcon - Data-driven icon
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit routesIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { routesIconData, routePinIconData, routePathIconData, routeDotIconData, routeTwoPinsIconData,
14
- // Curve test variations
15
- curveTestAData, curveTestBData, curveTestCData, curveTestDData, curveTestEData, curveTestFData, curveTestGData, curveTestHData, curveTestIData, curveTestJData, curveTestKData, curveTestLData, curveTestMData, curveTestNData, curveTestOData, curveTestPData, ROUTES_ICON_COLOR } from "./icon-data.js";
16
- export { ROUTES_ICON_COLOR };
17
- export const RoutesIcon = createIcon(routesIconData);
18
-
19
- // Route Icon Parts (for testing/iteration)
20
- export const RoutePinIcon = createIcon(routePinIconData);
21
- export const RoutePathIcon = createIcon(routePathIconData);
22
- export const RouteDotIcon = createIcon(routeDotIconData);
23
- export const RouteTwoPinsIcon = createIcon(routeTwoPinsIconData);
24
-
25
- // Curve Test Variations (for finding the right S-curve approach)
26
- export const CurveTestA = createIcon(curveTestAData);
27
- export const CurveTestB = createIcon(curveTestBData);
28
- export const CurveTestC = createIcon(curveTestCData);
29
- export const CurveTestD = createIcon(curveTestDData);
30
- export const CurveTestE = createIcon(curveTestEData);
31
- export const CurveTestF = createIcon(curveTestFData);
32
- export const CurveTestG = createIcon(curveTestGData);
33
- export const CurveTestH = createIcon(curveTestHData);
34
- export const CurveTestI = createIcon(curveTestIData);
35
- export const CurveTestJ = createIcon(curveTestJData);
36
- export const CurveTestK = createIcon(curveTestKData);
37
- export const CurveTestL = createIcon(curveTestLData);
38
- export const CurveTestM = createIcon(curveTestMData);
39
- export const CurveTestN = createIcon(curveTestNData);
40
- export const CurveTestO = createIcon(curveTestOData);
41
- export const CurveTestP = createIcon(curveTestPData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{routesIconData,routePinIconData,routePathIconData,routeDotIconData,routeTwoPinsIconData,curveTestAData,curveTestBData,curveTestCData,curveTestDData,curveTestEData,curveTestFData,curveTestGData,curveTestHData,curveTestIData,curveTestJData,curveTestKData,curveTestLData,curveTestMData,curveTestNData,curveTestOData,curveTestPData,ROUTES_ICON_COLOR}from"./icon-data.js";export{ROUTES_ICON_COLOR};export const RoutesIcon=createIcon(routesIconData);export const RoutePinIcon=createIcon(routePinIconData);export const RoutePathIcon=createIcon(routePathIconData);export const RouteDotIcon=createIcon(routeDotIconData);export const RouteTwoPinsIcon=createIcon(routeTwoPinsIconData);export const CurveTestA=createIcon(curveTestAData);export const CurveTestB=createIcon(curveTestBData);export const CurveTestC=createIcon(curveTestCData);export const CurveTestD=createIcon(curveTestDData);export const CurveTestE=createIcon(curveTestEData);export const CurveTestF=createIcon(curveTestFData);export const CurveTestG=createIcon(curveTestGData);export const CurveTestH=createIcon(curveTestHData);export const CurveTestI=createIcon(curveTestIData);export const CurveTestJ=createIcon(curveTestJData);export const CurveTestK=createIcon(curveTestKData);export const CurveTestL=createIcon(curveTestLData);export const CurveTestM=createIcon(curveTestMData);export const CurveTestN=createIcon(curveTestNData);export const CurveTestO=createIcon(curveTestOData);export const CurveTestP=createIcon(curveTestPData);
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * SentryIcon - Data-driven icon
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit sentryIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { sentryIconData, SENTRY_ICON_COLOR } from "./icon-data.js";
14
- export { SENTRY_ICON_COLOR };
15
- export const SentryIcon = createIcon(sentryIconData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{sentryIconData,SENTRY_ICON_COLOR}from"./icon-data.js";export{SENTRY_ICON_COLOR};export const SentryIcon=createIcon(sentryIconData);
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * StorageIcon - Data-driven icon
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit storageIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { storageIconData, STORAGE_ICON_COLOR } from "./icon-data.js";
14
- export { STORAGE_ICON_COLOR };
15
- export const StorageIcon = createIcon(storageIconData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{storageIconData,STORAGE_ICON_COLOR}from"./icon-data.js";export{STORAGE_ICON_COLOR};export const StorageIcon=createIcon(storageIconData);
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * WifiIcon - Data-driven icon
5
- *
6
- * The icon is defined as pure data in icon-data.ts
7
- * The renderer transforms it to components.
8
- *
9
- * To change: edit wifiIconData in icon-data.ts
10
- */
11
-
12
- import { createIcon } from "./icon-renderer.js";
13
- import { wifiIconData, WIFI_ICON_COLOR } from "./icon-data.js";
14
- export { WIFI_ICON_COLOR };
15
- export const WifiIcon = createIcon(wifiIconData);
1
+ "use strict";import{createIcon}from"./icon-renderer.js";import{wifiIconData,WIFI_ICON_COLOR}from"./icon-data.js";export{WIFI_ICON_COLOR};export const WifiIcon=createIcon(wifiIconData);
@@ -1,103 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * @buoy-gg/floating-tools-core
5
- *
6
- * Headless core for floating tools - shared logic for web and React Native.
7
- *
8
- * This package contains platform-agnostic business logic:
9
- * - Position state management
10
- * - Drag detection (tap vs drag)
11
- * - Hide/show toggle
12
- * - Auto-hide when dragged past edge
13
- * - Position persistence
14
- * - Animation easing functions
15
- * - Shared utilities
16
- *
17
- * Use this with platform-specific bindings:
18
- * - Web: Use with mouse events and requestAnimationFrame
19
- * - React Native: Use with PanResponder and Animated
20
- */
21
-
22
- // Core store
23
- export { FloatingToolsStore } from "./FloatingToolsStore.js";
24
-
25
- // Constants
26
- export { VISIBLE_HANDLE_WIDTH, DRAG_THRESHOLD, ANIMATION_DURATION, EDGE_PADDING, SAVE_DEBOUNCE_MS, STORAGE_KEYS } from "./constants.js";
27
-
28
- // Types
29
-
30
- // DevTools State Management
31
- export { DevToolsStateManager, devToolsStateManager, devToolsReducer } from "./devToolsState.js";
32
-
33
- // Utilities
34
- export { getUserStatusConfig, getGripIconLayout, filterValidChildren } from "./utils.js";
35
-
36
- // Easing
37
- export { easing, getEasing, interpolate, interpolatePosition } from "./easing.js";
38
-
39
- // Colors
40
- export { floatingToolsColors, withAlpha } from "./colors.js";
41
-
42
- // Dial Menu
43
- export {
44
- // === Constants ===
45
- MAX_DIAL_SLOTS, DIAL_START_ANGLE, DIAL_BUTTON_SIZE, DIAL_ICON_SIZE, DIAL_ICON_PADDING, DIAL_GRID_LINE_COUNT,
46
- // === Colors & Styling ===
47
- dialColors, dialStyles, getGridLineRotations,
48
- // === Layout ===
49
- getDialLayout, getIconAngle, getIconPosition, getAllIconPositions,
50
- // === Animation Config (Primary) ===
51
- dialAnimationConfig, getIconStaggerInputRange,
52
- // === CSS Animation Helpers (Web) ===
53
- dialCSSBeziers, generateDialCSSKeyframes, getDialCSSAnimationStyles, getDialCSSKeyframesString,
54
- // === Animation Utilities (Advanced) ===
55
- // These provide additional helpers for custom implementations
56
- getSpiralAnimationPosition, getStaggeredIconProgress
57
-
58
- // === Types ===
59
- } from "./dial.js";
60
-
61
- // Settings
62
- export {
63
- // === Constants ===
64
- SETTINGS_STORAGE_KEY, MAX_SETTINGS_DIAL_SLOTS,
65
- // === Tab Configuration ===
66
- settingsTabs,
67
- // === Colors & Styling ===
68
- settingsColors, toolColors, getToolColor, settingsStyles,
69
- // === Tool Metadata ===
70
- toolLabels, getToolLabel, toolDescriptions, getToolDescription,
71
- // === Global Settings Config ===
72
- globalSettingsConfig,
73
- // === Core Logic ===
74
- enforceDialLimit, sanitizeFloatingSettings, mergeSettingsWithDefaults, generateDefaultSettings, countEnabledTools, canEnableDialTool, getEnabledToolIds,
75
- // === Event Bus ===
76
- SettingsEventBus, settingsEventBus
77
-
78
- // === Types ===
79
- } from "./settings.js";
80
-
81
- // Icons - Single source of truth (just import and use!)
82
- export { NetworkIcon, NETWORK_ICON_COLOR } from "./icons/network-icon.js";
83
- export { EnvIcon, ENV_ICON_COLOR } from "./icons/env-icon.js";
84
- export { StorageIcon, STORAGE_ICON_COLOR } from "./icons/storage-icon.js";
85
- export { RoutesIcon, RoutePinIcon, RoutePathIcon, RouteDotIcon, RouteTwoPinsIcon,
86
- // Curve test variations
87
- CurveTestA, CurveTestB, CurveTestC, CurveTestD, CurveTestE, CurveTestF, CurveTestG, CurveTestH, CurveTestI, CurveTestJ, CurveTestK, CurveTestL, CurveTestM, CurveTestN, CurveTestO, CurveTestP, ROUTES_ICON_COLOR } from "./icons/routes-icon.js";
88
- export { QueryIcon, QUERY_ICON_COLOR } from "./icons/query-icon.js";
89
- export { HighlighterIcon, HIGHLIGHTER_ICON_COLOR,
90
- // Legacy aliases for backward compatibility
91
- RendersIcon, RENDERS_ICON_COLOR } from "./icons/renders-icon.js";
92
- export { BenchmarkIcon, BENCHMARK_ICON_COLOR } from "./icons/benchmark-icon.js";
93
- export { SentryIcon, SENTRY_ICON_COLOR } from "./icons/sentry-icon.js";
94
- export { WifiIcon, WIFI_ICON_COLOR } from "./icons/wifi-icon.js";
95
- export { HighlightIcon, HIGHLIGHT_ICON_COLOR } from "./icons/highlight-icon.js";
96
- export { ReduxIcon, REDUX_ICON_COLOR } from "./icons/redux-icon.js";
97
- export { EventsIcon, EVENTS_ICON_COLOR } from "./icons/events-icon.js";
98
-
99
- // Icon Factories - Helper functions for creating icon elements
100
- export { createNode, createLine, createRing, createDot, createGlow, createArrow, createBar } from "./icons/icon-factories.js";
101
-
102
- // Icon Renderer - For custom icon creation
103
- export { renderIconData, createIcon } from "./icons/icon-renderer.js";
1
+ "use strict";export{FloatingToolsStore}from"./FloatingToolsStore.js";export{VISIBLE_HANDLE_WIDTH,DRAG_THRESHOLD,ANIMATION_DURATION,EDGE_PADDING,SAVE_DEBOUNCE_MS,STORAGE_KEYS}from"./constants.js";export{DevToolsStateManager,devToolsStateManager,devToolsReducer}from"./devToolsState.js";export{getUserStatusConfig,getGripIconLayout,filterValidChildren}from"./utils.js";export{easing,getEasing,interpolate,interpolatePosition}from"./easing.js";export{floatingToolsColors,withAlpha}from"./colors.js";export{MAX_DIAL_SLOTS,DIAL_START_ANGLE,DIAL_BUTTON_SIZE,DIAL_ICON_SIZE,DIAL_ICON_PADDING,DIAL_GRID_LINE_COUNT,dialColors,dialStyles,getGridLineRotations,getDialLayout,getIconAngle,getIconPosition,getAllIconPositions,dialAnimationConfig,getIconStaggerInputRange,dialCSSBeziers,generateDialCSSKeyframes,getDialCSSAnimationStyles,getDialCSSKeyframesString,getSpiralAnimationPosition,getStaggeredIconProgress}from"./dial.js";export{SETTINGS_STORAGE_KEY,MAX_SETTINGS_DIAL_SLOTS,settingsTabs,settingsColors,toolColors,getToolColor,settingsStyles,toolLabels,getToolLabel,toolDescriptions,getToolDescription,globalSettingsConfig,enforceDialLimit,sanitizeFloatingSettings,mergeSettingsWithDefaults,generateDefaultSettings,countEnabledTools,canEnableDialTool,getEnabledToolIds,SettingsEventBus,settingsEventBus}from"./settings.js";export{NetworkIcon,NETWORK_ICON_COLOR}from"./icons/network-icon.js";export{EnvIcon,ENV_ICON_COLOR}from"./icons/env-icon.js";export{StorageIcon,STORAGE_ICON_COLOR}from"./icons/storage-icon.js";export{RoutesIcon,RoutePinIcon,RoutePathIcon,RouteDotIcon,RouteTwoPinsIcon,CurveTestA,CurveTestB,CurveTestC,CurveTestD,CurveTestE,CurveTestF,CurveTestG,CurveTestH,CurveTestI,CurveTestJ,CurveTestK,CurveTestL,CurveTestM,CurveTestN,CurveTestO,CurveTestP,ROUTES_ICON_COLOR}from"./icons/routes-icon.js";export{QueryIcon,QUERY_ICON_COLOR}from"./icons/query-icon.js";export{HighlighterIcon,HIGHLIGHTER_ICON_COLOR,RendersIcon,RENDERS_ICON_COLOR}from"./icons/renders-icon.js";export{BenchmarkIcon,BENCHMARK_ICON_COLOR}from"./icons/benchmark-icon.js";export{SentryIcon,SENTRY_ICON_COLOR}from"./icons/sentry-icon.js";export{WifiIcon,WIFI_ICON_COLOR}from"./icons/wifi-icon.js";export{HighlightIcon,HIGHLIGHT_ICON_COLOR}from"./icons/highlight-icon.js";export{ReduxIcon,REDUX_ICON_COLOR}from"./icons/redux-icon.js";export{EventsIcon,EVENTS_ICON_COLOR}from"./icons/events-icon.js";export{createNode,createLine,createRing,createDot,createGlow,createArrow,createBar}from"./icons/icon-factories.js";export{renderIconData,createIcon}from"./icons/icon-renderer.js";