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