@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.
- package/lib/commonjs/FloatingToolsStore.js +1 -501
- package/lib/commonjs/colors.js +1 -54
- package/lib/commonjs/constants.js +1 -31
- package/lib/commonjs/devToolsState.js +1 -325
- package/lib/commonjs/dial.js +1 -617
- package/lib/commonjs/easing.js +1 -69
- package/lib/commonjs/icons/benchmark-icon.js +1 -24
- package/lib/commonjs/icons/env-icon.js +1 -24
- package/lib/commonjs/icons/events-icon.js +1 -24
- package/lib/commonjs/icons/highlight-icon.js +1 -24
- package/lib/commonjs/icons/icon-data.js +1 -2268
- package/lib/commonjs/icons/icon-factories.js +1 -173
- package/lib/commonjs/icons/icon-primitives.js +1 -559
- package/lib/commonjs/icons/icon-primitives.native.js +1 -779
- package/lib/commonjs/icons/icon-renderer.js +1 -260
- package/lib/commonjs/icons/network-icon.js +1 -24
- package/lib/commonjs/icons/query-icon.js +1 -24
- package/lib/commonjs/icons/redux-icon.js +1 -85
- package/lib/commonjs/icons/renders-icon.js +1 -33
- package/lib/commonjs/icons/routes-icon.js +1 -49
- package/lib/commonjs/icons/sentry-icon.js +1 -24
- package/lib/commonjs/icons/storage-icon.js +1 -24
- package/lib/commonjs/icons/wifi-icon.js +1 -24
- package/lib/commonjs/index.js +1 -723
- package/lib/commonjs/settings.js +1 -588
- package/lib/commonjs/utils.js +1 -72
- package/lib/module/FloatingToolsStore.js +1 -496
- package/lib/module/colors.js +1 -49
- package/lib/module/constants.js +1 -27
- package/lib/module/devToolsState.js +1 -318
- package/lib/module/dial.js +1 -603
- package/lib/module/easing.js +1 -62
- package/lib/module/icons/benchmark-icon.js +1 -15
- package/lib/module/icons/env-icon.js +1 -15
- package/lib/module/icons/events-icon.js +1 -15
- package/lib/module/icons/highlight-icon.js +1 -15
- package/lib/module/icons/icon-data.js +1 -2264
- package/lib/module/icons/icon-factories.js +1 -163
- package/lib/module/icons/icon-primitives.js +1 -547
- package/lib/module/icons/icon-primitives.native.js +1 -767
- package/lib/module/icons/icon-renderer.js +1 -255
- package/lib/module/icons/network-icon.js +1 -15
- package/lib/module/icons/query-icon.js +1 -15
- package/lib/module/icons/redux-icon.js +1 -81
- package/lib/module/icons/renders-icon.js +1 -17
- package/lib/module/icons/routes-icon.js +1 -41
- package/lib/module/icons/sentry-icon.js +1 -15
- package/lib/module/icons/storage-icon.js +1 -15
- package/lib/module/icons/wifi-icon.js +1 -15
- package/lib/module/index.js +1 -103
- package/lib/module/settings.js +1 -576
- package/lib/module/utils.js +1 -66
- package/package.json +1 -1
- package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/colors.d.ts.map +0 -1
- package/lib/typescript/commonjs/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/devToolsState.d.ts.map +0 -1
- package/lib/typescript/commonjs/dial.d.ts.map +0 -1
- package/lib/typescript/commonjs/easing.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/env-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/events-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-data.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/network-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/query-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/settings.d.ts.map +0 -1
- package/lib/typescript/commonjs/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils.d.ts.map +0 -1
- package/lib/typescript/module/FloatingToolsStore.d.ts.map +0 -1
- package/lib/typescript/module/colors.d.ts.map +0 -1
- package/lib/typescript/module/constants.d.ts.map +0 -1
- package/lib/typescript/module/devToolsState.d.ts.map +0 -1
- package/lib/typescript/module/dial.d.ts.map +0 -1
- package/lib/typescript/module/easing.d.ts.map +0 -1
- package/lib/typescript/module/icons/benchmark-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/env-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/events-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/highlight-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-data.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-factories.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-primitives.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +0 -1
- package/lib/typescript/module/icons/icon-renderer.d.ts.map +0 -1
- package/lib/typescript/module/icons/network-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/query-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/redux-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/renders-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/routes-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/sentry-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/storage-icon.d.ts.map +0 -1
- package/lib/typescript/module/icons/wifi-icon.d.ts.map +0 -1
- package/lib/typescript/module/index.d.ts.map +0 -1
- package/lib/typescript/module/settings.d.ts.map +0 -1
- package/lib/typescript/module/types.d.ts.map +0 -1
- package/lib/typescript/module/utils.d.ts.map +0 -1
|
@@ -1,163 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Icon Factories - Helper functions to create icon elements
|
|
5
|
-
*
|
|
6
|
-
* These factories reduce verbosity and provide sensible defaults
|
|
7
|
-
* for common icon patterns.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// ===========================================
|
|
11
|
-
// Types (re-exported from icon-renderer for convenience)
|
|
12
|
-
// ===========================================
|
|
13
|
-
|
|
14
|
-
// ===========================================
|
|
15
|
-
// Factory Options
|
|
16
|
-
// ===========================================
|
|
17
|
-
|
|
18
|
-
// ===========================================
|
|
19
|
-
// Factory Functions
|
|
20
|
-
// ===========================================
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Creates a filled circle node (common pattern: glowing center point)
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* createNode(0, -4, 3) // Simple 3px radius node at center-top
|
|
27
|
-
* createNode(0, 0, 4, { glow: true }) // Glowing center node
|
|
28
|
-
*/
|
|
29
|
-
export function createNode(cx, cy, r, options = {}) {
|
|
30
|
-
return {
|
|
31
|
-
type: 'circle',
|
|
32
|
-
cx,
|
|
33
|
-
cy,
|
|
34
|
-
r,
|
|
35
|
-
fill: options.fill ?? 'color',
|
|
36
|
-
glow: options.glow,
|
|
37
|
-
glowRadius: options.glowRadius,
|
|
38
|
-
opacity: options.opacity,
|
|
39
|
-
scaleX: options.scaleX,
|
|
40
|
-
scaleY: options.scaleY
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Creates a line connection between two points
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* createLine(0, -4, -6, 4) // Simple connection line
|
|
49
|
-
* createLine(0, 0, 5, 5, { opacity: 0.6, strokeWidth: 1.5 })
|
|
50
|
-
*/
|
|
51
|
-
export function createLine(x1, y1, x2, y2, options = {}) {
|
|
52
|
-
return {
|
|
53
|
-
type: 'line',
|
|
54
|
-
x1,
|
|
55
|
-
y1,
|
|
56
|
-
x2,
|
|
57
|
-
y2,
|
|
58
|
-
stroke: options.stroke ?? 'color',
|
|
59
|
-
strokeWidth: options.strokeWidth ?? 1,
|
|
60
|
-
glow: options.glow,
|
|
61
|
-
glowRadius: options.glowRadius,
|
|
62
|
-
opacity: options.opacity
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Creates a ring (circle with border only, no fill)
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* createRing(0, 0, 8) // Simple ring
|
|
71
|
-
* createRing(0, 0, 6, { borderWidth: 2, opacity: 0.5 })
|
|
72
|
-
*/
|
|
73
|
-
export function createRing(cx, cy, r, options = {}) {
|
|
74
|
-
return {
|
|
75
|
-
type: 'circle',
|
|
76
|
-
cx,
|
|
77
|
-
cy,
|
|
78
|
-
r,
|
|
79
|
-
fill: undefined,
|
|
80
|
-
// No fill
|
|
81
|
-
border: true,
|
|
82
|
-
borderWidth: options.borderWidth ?? 1.5,
|
|
83
|
-
opacity: options.opacity,
|
|
84
|
-
scaleX: options.scaleX,
|
|
85
|
-
scaleY: options.scaleY
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Creates a small indicator dot
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* createDot(5, 5) // Default 2px dot
|
|
94
|
-
* createDot(5, 5, 1.5) // Custom size
|
|
95
|
-
*/
|
|
96
|
-
export function createDot(cx, cy, r = 2) {
|
|
97
|
-
return {
|
|
98
|
-
type: 'circle',
|
|
99
|
-
cx,
|
|
100
|
-
cy,
|
|
101
|
-
r,
|
|
102
|
-
fill: 'color'
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Creates a glow effect circle (background element)
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* createGlow(0, 0, 6) // Subtle glow behind other elements
|
|
111
|
-
*/
|
|
112
|
-
export function createGlow(cx, cy, r, opacity = 0.3) {
|
|
113
|
-
return {
|
|
114
|
-
type: 'circle',
|
|
115
|
-
cx,
|
|
116
|
-
cy,
|
|
117
|
-
r,
|
|
118
|
-
fill: 'color',
|
|
119
|
-
opacity,
|
|
120
|
-
glow: true,
|
|
121
|
-
glowRadius: r
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Creates an arrow/chevron triangle
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* createArrow(0, 5, 4, 'down') // Downward arrow
|
|
130
|
-
* createArrow(3, 0, 3, 'right') // Right-pointing chevron
|
|
131
|
-
*/
|
|
132
|
-
export function createArrow(x, y, size, direction, options = {}) {
|
|
133
|
-
return {
|
|
134
|
-
type: 'triangle',
|
|
135
|
-
x,
|
|
136
|
-
y,
|
|
137
|
-
size,
|
|
138
|
-
direction,
|
|
139
|
-
fill: options.fill ?? 'color',
|
|
140
|
-
opacity: options.opacity,
|
|
141
|
-
rotation: options.rotation
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Creates a rectangle bar (useful for charts, progress indicators)
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* createBar(-4, 2, 8, 2) // Horizontal bar
|
|
150
|
-
* createBar(0, -3, 2, 6) // Vertical bar
|
|
151
|
-
*/
|
|
152
|
-
export function createBar(x, y, width, height, options = {}) {
|
|
153
|
-
return {
|
|
154
|
-
type: 'rect',
|
|
155
|
-
x,
|
|
156
|
-
y,
|
|
157
|
-
width,
|
|
158
|
-
height,
|
|
159
|
-
fill: options.fill ?? 'color',
|
|
160
|
-
opacity: options.opacity,
|
|
161
|
-
borderRadius: options.borderRadius ?? Math.min(width, height) / 4
|
|
162
|
-
};
|
|
163
|
-
}
|
|
1
|
+
"use strict";export function createNode(t,o,e,r={}){return{type:"circle",cx:t,cy:o,r:e,fill:r.fill??"color",glow:r.glow,glowRadius:r.glowRadius,opacity:r.opacity,scaleX:r.scaleX,scaleY:r.scaleY}}export function createLine(t,o,e,r,c={}){return{type:"line",x1:t,y1:o,x2:e,y2:r,stroke:c.stroke??"color",strokeWidth:c.strokeWidth??1,glow:c.glow,glowRadius:c.glowRadius,opacity:c.opacity}}export function createRing(t,o,e,r={}){return{type:"circle",cx:t,cy:o,r:e,fill:void 0,border:!0,borderWidth:r.borderWidth??1.5,opacity:r.opacity,scaleX:r.scaleX,scaleY:r.scaleY}}export function createDot(t,o,e=2){return{type:"circle",cx:t,cy:o,r:e,fill:"color"}}export function createGlow(t,o,e,r=.3){return{type:"circle",cx:t,cy:o,r:e,fill:"color",opacity:r,glow:!0,glowRadius:e}}export function createArrow(t,o,e,r,c={}){return{type:"triangle",x:t,y:o,size:e,direction:r,fill:c.fill??"color",opacity:c.opacity,rotation:c.rotation}}export function createBar(t,o,e,r,c={}){return{type:"rect",x:t,y:o,width:e,height:r,fill:c.fill??"color",opacity:c.opacity,borderRadius:c.borderRadius??Math.min(e,r)/4}}
|