@supermousejs/utils 2.4.0 → 2.4.2
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/package.json +8 -4
- package/CHANGELOG.md +0 -116
- package/src/css.ts +0 -29
- package/src/doctor.ts +0 -300
- package/src/dom.ts +0 -167
- package/src/effects.ts +0 -34
- package/src/index.ts +0 -15
- package/src/math.ts +0 -64
- package/src/options.ts +0 -65
- package/src/plugin.ts +0 -211
- package/src/svg.ts +0 -119
- package/tsconfig.json +0 -9
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supermousejs/utils",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"main": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"url": "https://github.com/Whitestar14/supermouse-js",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"license": "MIT",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
12
16
|
"exports": {
|
|
13
17
|
".": {
|
|
14
18
|
"types": "./dist/index.d.ts",
|
|
@@ -19,7 +23,7 @@
|
|
|
19
23
|
"repository": {
|
|
20
24
|
"type": "git",
|
|
21
25
|
"url": "git+https://github.com/Whitestar14/supermouse-js.git",
|
|
22
|
-
"directory": "packages/
|
|
26
|
+
"directory": "packages/utils"
|
|
23
27
|
},
|
|
24
28
|
"bugs": {
|
|
25
29
|
"url": "https://github.com/Whitestar14/supermouse-js/issues"
|
|
@@ -29,10 +33,10 @@
|
|
|
29
33
|
"access": "public"
|
|
30
34
|
},
|
|
31
35
|
"peerDependencies": {
|
|
32
|
-
"@supermousejs/core": "2.4.
|
|
36
|
+
"@supermousejs/core": "2.4.2"
|
|
33
37
|
},
|
|
34
38
|
"devDependencies": {
|
|
35
|
-
"@supermousejs/core": "2.4.
|
|
39
|
+
"@supermousejs/core": "2.4.2"
|
|
36
40
|
},
|
|
37
41
|
"scripts": {
|
|
38
42
|
"build": "vite build"
|
package/CHANGELOG.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# @supermousejs/utils
|
|
2
|
-
|
|
3
|
-
## 2.4.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- faf6e9c: Added svg helpers and restructured the utility to be completely tree-shakeable
|
|
8
|
-
- baa6cff: - Updated SmartRing, Sparkles, TextRing, Pointer, Ring, Stick, and other plugins to use `normalizeAll` for better option management where possible.
|
|
9
|
-
- Enhanced the `doctor` utility to provide detailed diagnostics for plugin configurations and potential issues.
|
|
10
|
-
- Removed the deprecated layers utility and integrated layer constants directly into the CSS utility.
|
|
11
|
-
- Improved code readability and consistency across various plugins by standardizing the use of `dom.css` for style application.
|
|
12
|
-
- dea1e57: Made enhancements and many improvements to `options.ts`:
|
|
13
|
-
- **Removed `styles` map compilation** in `definePlugin` — no more per-plugin style setter arrays and `normalize` calls for properties that were never used
|
|
14
|
-
- **Collapsed `setStyle`/`applyStyles` into `css()`** — single WeakMap cache instead of scattered helpers, fewer function allocations
|
|
15
|
-
- **Slimmed `definePlugin` itself** — dropped the `defaults` parameter and `O` type parameter, less generic instantiation overhead
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- 36d5366: Added proper description messages to package meta
|
|
20
|
-
- 9681b6c: Enhanced @supermouse/utils with `circumference` in math and `circlePath` in svg
|
|
21
|
-
- c43a720: Added `beforeDisable` lifecycle hook for plugins that want to run hooks/animation before core runs the `onDisable()` hook
|
|
22
|
-
- Updated dependencies [53b7276]
|
|
23
|
-
- Updated dependencies [36d5366]
|
|
24
|
-
- Updated dependencies [4fc5aed]
|
|
25
|
-
- Updated dependencies [0cd6a04]
|
|
26
|
-
- Updated dependencies [ab3cad2]
|
|
27
|
-
- @supermousejs/core@2.4.0
|
|
28
|
-
|
|
29
|
-
## 2.3.1
|
|
30
|
-
|
|
31
|
-
### Patch Changes
|
|
32
|
-
|
|
33
|
-
- Updated dependencies [b72e264]
|
|
34
|
-
- Updated dependencies [8dc8e06]
|
|
35
|
-
- Updated dependencies [600de13]
|
|
36
|
-
- @supermousejs/core@2.3.0
|
|
37
|
-
|
|
38
|
-
## 2.3.0
|
|
39
|
-
|
|
40
|
-
### Patch Changes
|
|
41
|
-
|
|
42
|
-
- Updated dependencies [f6f44b2]
|
|
43
|
-
- @supermousejs/core@2.2.0
|
|
44
|
-
|
|
45
|
-
## 2.2.0
|
|
46
|
-
|
|
47
|
-
### Minor Changes
|
|
48
|
-
|
|
49
|
-
- 9fe1a7b: - Implemented idiomatic approach to using supermouse/utils
|
|
50
|
-
- Rewrote `applyStyles`, `setTransform` and `setStyles` to share a global cache registry
|
|
51
|
-
- 9fa6ece: Add `injectStyles` to safely handle injecting global CSS styles into the document head
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- 6d70c18: remove legacy package and update supermouse domain in readme
|
|
56
|
-
- 14fb5b6: Updated tsconfig to be reference-compliant with core, utils and zoetrope when required
|
|
57
|
-
- Updated dependencies [6d70c18]
|
|
58
|
-
- Updated dependencies [2590af3]
|
|
59
|
-
- Updated dependencies [14fb5b6]
|
|
60
|
-
- @supermousejs/core@2.1.0
|
|
61
|
-
|
|
62
|
-
## 2.1.1
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- 67f771b: Add relevant npm metadata to package.json file
|
|
67
|
-
- Updated dependencies [67f771b]
|
|
68
|
-
- @supermousejs/core@2.0.5
|
|
69
|
-
|
|
70
|
-
## 2.1.0
|
|
71
|
-
|
|
72
|
-
### Minor Changes
|
|
73
|
-
|
|
74
|
-
- 0a1652d: fixed build architecture and updated plugin metadata
|
|
75
|
-
|
|
76
|
-
## 2.0.4
|
|
77
|
-
|
|
78
|
-
### Patch Changes
|
|
79
|
-
|
|
80
|
-
- 993dc67: Updated supemousejs packages with proper author, license and url descriptors to repo
|
|
81
|
-
- Updated dependencies [993dc67]
|
|
82
|
-
- @supermousejs/core@2.0.4
|
|
83
|
-
|
|
84
|
-
## 2.0.3
|
|
85
|
-
|
|
86
|
-
### Patch Changes
|
|
87
|
-
|
|
88
|
-
- Updated dependencies
|
|
89
|
-
- @supermousejs/core@2.0.3
|
|
90
|
-
|
|
91
|
-
## 2.0.2
|
|
92
|
-
|
|
93
|
-
### Patch Changes
|
|
94
|
-
|
|
95
|
-
- ae219a0: Update READMEs with correct link to documentation
|
|
96
|
-
- Updated dependencies [ae219a0]
|
|
97
|
-
- @supermousejs/core@2.0.2
|
|
98
|
-
|
|
99
|
-
## 2.0.1
|
|
100
|
-
|
|
101
|
-
### Patch Changes
|
|
102
|
-
|
|
103
|
-
- Add minimal README.md files to packages
|
|
104
|
-
- Updated dependencies
|
|
105
|
-
- @supermousejs/core@2.0.1
|
|
106
|
-
|
|
107
|
-
## 2.0.0
|
|
108
|
-
|
|
109
|
-
### Major Changes
|
|
110
|
-
|
|
111
|
-
- Initial v2.0.0 release
|
|
112
|
-
|
|
113
|
-
### Patch Changes
|
|
114
|
-
|
|
115
|
-
- Updated dependencies
|
|
116
|
-
- @supermousejs/core@2.0.0
|
package/src/css.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common cubic-bezier easing strings for CSS transitions.
|
|
3
|
-
*/
|
|
4
|
-
export const Easings = {
|
|
5
|
-
/** Good for entrance animations (starts fast, slows down) */
|
|
6
|
-
EASE_OUT_EXPO: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
7
|
-
/** Good for elastic/bouncy UI elements */
|
|
8
|
-
ELASTIC_OUT: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
9
|
-
/** Standard smooth movement */
|
|
10
|
-
SMOOTH: "ease-out"
|
|
11
|
-
} as const;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Standard Z-Index layers for the Supermouse ecosystem.
|
|
15
|
-
* Relative to the Supermouse Container.
|
|
16
|
-
*/
|
|
17
|
-
export const Layers = {
|
|
18
|
-
/** The top-most layer. For text, tooltips, and crucial UI. */
|
|
19
|
-
OVERLAY: "400",
|
|
20
|
-
|
|
21
|
-
/** The main cursor layer. For the primary Dot/Pointer. */
|
|
22
|
-
CURSOR: "300",
|
|
23
|
-
|
|
24
|
-
/** The secondary layer. For Rings, brackets, or followers. */
|
|
25
|
-
FOLLOWER: "200",
|
|
26
|
-
|
|
27
|
-
/** The background layer. For trails, sparkles, and particles. */
|
|
28
|
-
TRACE: "100"
|
|
29
|
-
} as const;
|
package/src/doctor.ts
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
export interface DoctorIssue {
|
|
2
|
-
severity: "error" | "warn" | "info";
|
|
3
|
-
code: string;
|
|
4
|
-
message: string;
|
|
5
|
-
hint?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface PluginLike {
|
|
9
|
-
readonly name?: string;
|
|
10
|
-
readonly priority?: number;
|
|
11
|
-
readonly element?: HTMLElement;
|
|
12
|
-
readonly update?: (...args: any[]) => void;
|
|
13
|
-
readonly [key: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface AppLike {
|
|
17
|
-
readonly plugins?: readonly PluginLike[];
|
|
18
|
-
readonly options?: Readonly<Record<string, unknown>>;
|
|
19
|
-
readonly state?: {
|
|
20
|
-
readonly cursorMode?: "auto" | "custom" | "native" | "both";
|
|
21
|
-
readonly hasReceivedInput?: boolean;
|
|
22
|
-
};
|
|
23
|
-
readonly input?: {
|
|
24
|
-
readonly isEnabled?: boolean;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const BRAND = "[supermouse] doctor";
|
|
29
|
-
|
|
30
|
-
const S = {
|
|
31
|
-
brand:
|
|
32
|
-
"color: #ffffff; background: #42b883; padding: 2px 4px; border-radius: 2px; font-weight: 700;",
|
|
33
|
-
error:
|
|
34
|
-
"color: #ffffff; background: #f43f5e; padding: 2px 4px; border-radius: 2px; font-weight: 700;",
|
|
35
|
-
warn: "color: #1f2937; background: #f59e0b; padding: 2px 4px; border-radius: 2px; font-weight: 700;",
|
|
36
|
-
info: "color: #ffffff; background: #3b82f6; padding: 2px 4px; border-radius: 2px; font-weight: 700;",
|
|
37
|
-
dim: "color: #6b7280;",
|
|
38
|
-
code: "color: #a1a1aa; font-weight: 500;",
|
|
39
|
-
hint: "color: #10b981; font-weight: 600;"
|
|
40
|
-
} as const;
|
|
41
|
-
|
|
42
|
-
export function doctor(app?: any): void {
|
|
43
|
-
const issues = app ? audit(app) : scanDom();
|
|
44
|
-
printReport(issues);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function audit(app: any): readonly DoctorIssue[] {
|
|
48
|
-
const plugins = app.plugins ?? [];
|
|
49
|
-
const opts = app.options ?? {};
|
|
50
|
-
|
|
51
|
-
return [
|
|
52
|
-
...checkPluginPriorities(plugins),
|
|
53
|
-
...checkStatesPriority(plugins),
|
|
54
|
-
...checkGhostElements(plugins),
|
|
55
|
-
...checkMultiInstance(opts),
|
|
56
|
-
...checkContainerPosition(opts),
|
|
57
|
-
...checkCursorMode(opts, app.state),
|
|
58
|
-
...scanDom(app)
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function isVisualPlugin(plugin: PluginLike): boolean {
|
|
63
|
-
if (plugin.element !== undefined) return true;
|
|
64
|
-
if (typeof plugin.update === "function" && plugin.update.length >= 3) return true;
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function isLogicPlugin(plugin: PluginLike): boolean {
|
|
69
|
-
if (plugin.element !== undefined) return false;
|
|
70
|
-
if (typeof plugin.update === "function" && plugin.update.length === 2) return true;
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function checkPluginPriorities(plugins: readonly PluginLike[]): readonly DoctorIssue[] {
|
|
75
|
-
const out: DoctorIssue[] = [];
|
|
76
|
-
|
|
77
|
-
for (const p of plugins) {
|
|
78
|
-
const name = p.name ?? "unknown";
|
|
79
|
-
const pri = p.priority ?? 0;
|
|
80
|
-
|
|
81
|
-
if (isLogicPlugin(p) && pri >= 0) {
|
|
82
|
-
out.push({
|
|
83
|
-
severity: "warn",
|
|
84
|
-
code: "PRIORITY_LOGIC",
|
|
85
|
-
message: `Plugin "${name}" has priority ${pri} but appears to be a logic plugin (should run before physics).`,
|
|
86
|
-
hint: `Set priority to a negative value (e.g. -10) on "${name}"`
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (isVisualPlugin(p) && pri < 0) {
|
|
91
|
-
out.push({
|
|
92
|
-
severity: "warn",
|
|
93
|
-
code: "PRIORITY_VISUAL",
|
|
94
|
-
message: `Plugin "${name}" has priority ${pri} but appears to be a visual plugin (should run after physics).`,
|
|
95
|
-
hint: "Remove priority or use a positive value"
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return out;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function checkStatesPriority(plugins: readonly PluginLike[]): readonly DoctorIssue[] {
|
|
104
|
-
const states = plugins.find((p) => p.name === "states");
|
|
105
|
-
if (!states) return [];
|
|
106
|
-
|
|
107
|
-
const pri = states.priority ?? 0;
|
|
108
|
-
if (pri >= 0) {
|
|
109
|
-
return [
|
|
110
|
-
{
|
|
111
|
-
severity: "error",
|
|
112
|
-
code: "STATES_PRIORITY",
|
|
113
|
-
message: `States plugin has priority ${pri}. It must run before all visual plugins.`,
|
|
114
|
-
hint: "Set priority: -999 on the States plugin"
|
|
115
|
-
}
|
|
116
|
-
];
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return [];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function checkGhostElements(plugins: readonly PluginLike[]): readonly DoctorIssue[] {
|
|
123
|
-
const out: DoctorIssue[] = [];
|
|
124
|
-
|
|
125
|
-
for (const p of plugins) {
|
|
126
|
-
const name = p.name ?? "unknown";
|
|
127
|
-
if (isVisualPlugin(p) && !p.element) {
|
|
128
|
-
out.push({
|
|
129
|
-
severity: "warn",
|
|
130
|
-
code: "MISSING_ELEMENT",
|
|
131
|
-
message: `Plugin "${name}" has no 'element' property — disablePlugin() will not hide its DOM.`,
|
|
132
|
-
hint: "Assign plugin.element = el in install(), or use definePlugin()"
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return out;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function checkMultiInstance(opts: Readonly<Record<string, unknown>>): readonly DoctorIssue[] {
|
|
141
|
-
const scopes = document.querySelectorAll('[class*="supermouse-scope-"]');
|
|
142
|
-
if (scopes.length <= 1) return [];
|
|
143
|
-
if (opts.container !== document.body) return [];
|
|
144
|
-
|
|
145
|
-
return [
|
|
146
|
-
{
|
|
147
|
-
severity: "warn",
|
|
148
|
-
code: "MULTI_INSTANCE",
|
|
149
|
-
message: `Detected ${scopes.length} Supermouse instances. The body instance may conflict with scoped ones.`,
|
|
150
|
-
hint: "Use suspend() / resume() or scope instances to different containers"
|
|
151
|
-
}
|
|
152
|
-
];
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function checkContainerPosition(opts: Readonly<Record<string, unknown>>): readonly DoctorIssue[] {
|
|
156
|
-
const container = opts.container as HTMLElement | undefined;
|
|
157
|
-
if (!container || container === document.body) return [];
|
|
158
|
-
|
|
159
|
-
const position = window.getComputedStyle(container).position;
|
|
160
|
-
if (position !== "static") return [];
|
|
161
|
-
|
|
162
|
-
return [
|
|
163
|
-
{
|
|
164
|
-
severity: "info",
|
|
165
|
-
code: "CONTAINER_POSITION",
|
|
166
|
-
message: "Container has position:static. Supermouse will mutate it to relative.",
|
|
167
|
-
hint: "Set position: relative in your CSS to avoid the mutation"
|
|
168
|
-
}
|
|
169
|
-
];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function checkCursorMode(
|
|
173
|
-
opts: Readonly<Record<string, unknown>>,
|
|
174
|
-
state?: AppLike["state"]
|
|
175
|
-
): readonly DoctorIssue[] {
|
|
176
|
-
const cursor = opts.cursor;
|
|
177
|
-
if (cursor === undefined) return [];
|
|
178
|
-
|
|
179
|
-
const validModes = ["auto", "custom", "native", "both"];
|
|
180
|
-
if (typeof cursor === "string" && !validModes.includes(cursor)) {
|
|
181
|
-
return [
|
|
182
|
-
{
|
|
183
|
-
severity: "error",
|
|
184
|
-
code: "INVALID_CURSOR_MODE",
|
|
185
|
-
message: `Invalid cursor mode "${cursor}". Expected one of: ${validModes.join(", ")}.`,
|
|
186
|
-
hint: `Set cursor to one of: ${validModes.join(", ")}`
|
|
187
|
-
}
|
|
188
|
-
];
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (cursor === "both" && opts.container !== document.body && state?.cursorMode === "both") {
|
|
192
|
-
return [
|
|
193
|
-
{
|
|
194
|
-
severity: "warn",
|
|
195
|
-
code: "NESTED_BOTH_MODE",
|
|
196
|
-
message:
|
|
197
|
-
"Scoped instance uses cursor: 'both'. In nested scopes, the native cursor may be hidden by the outer instance's cursor suppression.",
|
|
198
|
-
hint: "Offset the custom cursor when cursorMode === 'both' or consider a single-instance scope architecture"
|
|
199
|
-
}
|
|
200
|
-
];
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return [];
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
function scanDom(app?: AppLike): readonly DoctorIssue[] {
|
|
207
|
-
const out: DoctorIssue[] = [];
|
|
208
|
-
|
|
209
|
-
const isInitialized = Array.from(document.querySelectorAll("style")).some((s) =>
|
|
210
|
-
s.id.startsWith("supermouse-style-")
|
|
211
|
-
);
|
|
212
|
-
|
|
213
|
-
if (!isInitialized) {
|
|
214
|
-
return [
|
|
215
|
-
{
|
|
216
|
-
severity: "error",
|
|
217
|
-
code: "NOT_INITIALIZED",
|
|
218
|
-
message: "Supermouse has not been initialized yet.",
|
|
219
|
-
hint: "Call doctor() after new Supermouse() has run"
|
|
220
|
-
}
|
|
221
|
-
];
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
document.querySelectorAll('[style*="cursor"]').forEach((el) => {
|
|
225
|
-
const style = el.getAttribute("style") ?? "";
|
|
226
|
-
if (style.includes("cursor: none")) return;
|
|
227
|
-
if (!style.includes("cursor")) return;
|
|
228
|
-
|
|
229
|
-
out.push({
|
|
230
|
-
severity: "warn",
|
|
231
|
-
code: "INLINE_CURSOR",
|
|
232
|
-
message: "Element has an inline cursor style that may override Supermouse.",
|
|
233
|
-
hint: "Remove inline cursor styles"
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
const bodyInstance = document.querySelector(".supermouse-scope-0");
|
|
238
|
-
if (bodyInstance) {
|
|
239
|
-
const hasHideClass = bodyInstance.classList.contains("supermouse-hide-0");
|
|
240
|
-
const cursorMode = app?.state?.cursorMode ?? "auto";
|
|
241
|
-
const hasReceivedInput = app?.state?.hasReceivedInput ?? true;
|
|
242
|
-
const inputEnabled = app?.input?.isEnabled ?? true;
|
|
243
|
-
|
|
244
|
-
if (cursorMode === "custom" && inputEnabled && hasReceivedInput && !hasHideClass) {
|
|
245
|
-
out.push({
|
|
246
|
-
severity: "warn",
|
|
247
|
-
code: "BODY_CURSOR_LEAK",
|
|
248
|
-
message:
|
|
249
|
-
"Body instance has cursor: 'custom' but native cursor suppression class is not applied.",
|
|
250
|
-
hint: "Check that the animation loop is running and setCursor('custom') was called"
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
return out;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
function printReport(issues: readonly DoctorIssue[]): void {
|
|
259
|
-
if (issues.length === 0) {
|
|
260
|
-
console.log(`%c${BRAND}%c No issues found`, S.brand, S.dim);
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const summary = [
|
|
265
|
-
formatCount(issues, "error", "error"),
|
|
266
|
-
formatCount(issues, "warn", "warning"),
|
|
267
|
-
formatCount(issues, "info", "note")
|
|
268
|
-
]
|
|
269
|
-
.filter((s): s is string => s !== null)
|
|
270
|
-
.join(" · ");
|
|
271
|
-
|
|
272
|
-
console.log(`%c${BRAND}%c ${summary}`, S.brand, S.dim);
|
|
273
|
-
|
|
274
|
-
for (const issue of issues) {
|
|
275
|
-
printIssue(issue);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function formatCount(
|
|
280
|
-
issues: readonly DoctorIssue[],
|
|
281
|
-
severity: DoctorIssue["severity"],
|
|
282
|
-
label: string
|
|
283
|
-
): string | null {
|
|
284
|
-
const n = issues.filter((i) => i.severity === severity).length;
|
|
285
|
-
return n > 0 ? `${n} ${label}${n > 1 ? "s" : ""}` : null;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function printIssue(issue: DoctorIssue): void {
|
|
289
|
-
console.log(
|
|
290
|
-
`%c${issue.severity.toUpperCase()}%c %c${issue.code}%c ${issue.message}`,
|
|
291
|
-
S[issue.severity],
|
|
292
|
-
S.dim,
|
|
293
|
-
S.code,
|
|
294
|
-
"color: inherit;"
|
|
295
|
-
);
|
|
296
|
-
|
|
297
|
-
if (issue.hint) {
|
|
298
|
-
console.log(` %c→%c ${issue.hint}`, S.hint, S.dim);
|
|
299
|
-
}
|
|
300
|
-
}
|
package/src/dom.ts
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Injects global CSS styles into the document head safely.
|
|
3
|
-
* Checks for existing IDs to prevent duplication during SPA routing or HMR.
|
|
4
|
-
*
|
|
5
|
-
* @param id A unique identifier for this style block
|
|
6
|
-
* @param css A string of CSS rules to inject.
|
|
7
|
-
*/
|
|
8
|
-
export const injectStyles = (id: string, css: string): void => {
|
|
9
|
-
if (typeof document === "undefined") return;
|
|
10
|
-
if (document.getElementById(id)) return;
|
|
11
|
-
|
|
12
|
-
const style = document.createElement("style");
|
|
13
|
-
style.id = id;
|
|
14
|
-
style.innerHTML = css;
|
|
15
|
-
document.head.appendChild(style);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const styleCache = new WeakMap<HTMLElement | SVGElement, Record<string, string | number>>();
|
|
19
|
-
|
|
20
|
-
type CSSProperties = {
|
|
21
|
-
[K in keyof CSSStyleDeclaration as CSSStyleDeclaration[K] extends (...args: any) => any
|
|
22
|
-
? never
|
|
23
|
-
: K]?: string | number;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
function camelToKebab(str: string): string {
|
|
27
|
-
return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Applies CSS properties to an element. Only touches the DOM when a value
|
|
32
|
-
* has actually changed.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* css(el, {
|
|
36
|
-
* width: `${size}px`,
|
|
37
|
-
* height: `${size}px`,
|
|
38
|
-
* opacity: state.isHover ? 1 : 0,
|
|
39
|
-
* backgroundColor: state.interaction.color || "#000",
|
|
40
|
-
* });
|
|
41
|
-
*/
|
|
42
|
-
export function css(el: HTMLElement | SVGElement, styles: CSSProperties): void {
|
|
43
|
-
if (typeof document === "undefined" || !el) return;
|
|
44
|
-
|
|
45
|
-
let cache = styleCache.get(el);
|
|
46
|
-
if (!cache) {
|
|
47
|
-
cache = {};
|
|
48
|
-
styleCache.set(el, cache);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
for (const [prop, value] of Object.entries(styles)) {
|
|
52
|
-
if (value === undefined) continue;
|
|
53
|
-
const stringValue = String(value);
|
|
54
|
-
const kebabProp = camelToKebab(prop);
|
|
55
|
-
if (cache[kebabProp] !== stringValue) {
|
|
56
|
-
el.style.setProperty(kebabProp, stringValue);
|
|
57
|
-
cache[kebabProp] = stringValue;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated Use `dom.css()` instead. This function will be removed in future versions.
|
|
64
|
-
*/
|
|
65
|
-
export function setStyle(el: HTMLElement | SVGElement, prop: string, value: string | number): void {
|
|
66
|
-
css(el, { [prop]: value });
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated Use `dom.css()` instead. This function will be removed in future versions.
|
|
71
|
-
*/
|
|
72
|
-
export function applyStyles(
|
|
73
|
-
el: HTMLElement | SVGElement,
|
|
74
|
-
styles: Record<string, string | number>
|
|
75
|
-
): void {
|
|
76
|
-
css(el, styles);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Universal Transform Setter.
|
|
81
|
-
* Handles centering (-50%) automatically.
|
|
82
|
-
*
|
|
83
|
-
* @param el The element
|
|
84
|
-
* @param x X Position (px)
|
|
85
|
-
* @param y Y Position (px)
|
|
86
|
-
* @param rotation Rotation (deg) - Default 0
|
|
87
|
-
* @param scaleX Scale X - Default 1
|
|
88
|
-
* @param scaleY Scale Y - Default 1
|
|
89
|
-
* @param skewX Skew X (deg) - Default 0
|
|
90
|
-
* @param skewY Skew Y (deg) - Default 0
|
|
91
|
-
*/
|
|
92
|
-
export function setTransform(
|
|
93
|
-
el: HTMLElement | SVGElement,
|
|
94
|
-
x: number,
|
|
95
|
-
y: number,
|
|
96
|
-
rotation: number = 0,
|
|
97
|
-
scaleX: number = 1,
|
|
98
|
-
scaleY: number = 1,
|
|
99
|
-
skewX: number = 0,
|
|
100
|
-
skewY: number = 0
|
|
101
|
-
): void {
|
|
102
|
-
const transform = `translate3d(${x}px, ${y}px, 0) translate(-50%, -50%) rotate(${rotation}deg) skew(${skewX}deg, ${skewY}deg) scale(${scaleX}, ${scaleY})`;
|
|
103
|
-
|
|
104
|
-
css(el, { transform });
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Calculates the bounding rectangle of an element relative to a container.
|
|
109
|
-
*/
|
|
110
|
-
export function projectRect(
|
|
111
|
-
element: HTMLElement | SVGSVGElement,
|
|
112
|
-
container: HTMLElement | SVGSVGElement = document.body
|
|
113
|
-
): DOMRect {
|
|
114
|
-
const rect = element.getBoundingClientRect();
|
|
115
|
-
|
|
116
|
-
if (container !== document.body) {
|
|
117
|
-
const containerRect = container.getBoundingClientRect();
|
|
118
|
-
const x = rect.left - containerRect.left;
|
|
119
|
-
const y = rect.top - containerRect.top;
|
|
120
|
-
|
|
121
|
-
return new DOMRect(x, y, rect.width, rect.height);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return rect;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Creates a standard Supermouse actor element with optimal performance settings.
|
|
129
|
-
* Includes absolute positioning, pointer-events: none, and will-change: transform.
|
|
130
|
-
*
|
|
131
|
-
* @param tagName The HTML tag to create (default: 'div')
|
|
132
|
-
*/
|
|
133
|
-
export function createActor(tagName: string = "div"): HTMLElement | SVGSVGElement {
|
|
134
|
-
const el = document.createElement(tagName);
|
|
135
|
-
css(el, {
|
|
136
|
-
position: "absolute",
|
|
137
|
-
top: "0",
|
|
138
|
-
left: "0",
|
|
139
|
-
pointerEvents: "none",
|
|
140
|
-
boxSizing: "border-box",
|
|
141
|
-
display: "block",
|
|
142
|
-
willChange: "transform"
|
|
143
|
-
});
|
|
144
|
-
return el;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Creates a circular HTML div using the standard actor base.
|
|
149
|
-
*/
|
|
150
|
-
export function createCircle(size: number, color: string): HTMLDivElement {
|
|
151
|
-
const el = createActor("div") as HTMLDivElement;
|
|
152
|
-
css(el, {
|
|
153
|
-
width: `${size}px`,
|
|
154
|
-
height: `${size}px`,
|
|
155
|
-
borderRadius: "50%",
|
|
156
|
-
backgroundColor: color
|
|
157
|
-
});
|
|
158
|
-
return el;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Legacy alias for createActor.
|
|
163
|
-
* @deprecated Use createActor() instead.
|
|
164
|
-
*/
|
|
165
|
-
export function createDiv(): HTMLDivElement {
|
|
166
|
-
return createActor("div") as HTMLDivElement;
|
|
167
|
-
}
|
package/src/effects.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { dist, angle, clamp } from "./math";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Calculates Rotation and Scale based on velocity to create a "Squash and Stretch" effect.
|
|
5
|
-
*
|
|
6
|
-
* @param vx Velocity X
|
|
7
|
-
* @param vy Velocity Y
|
|
8
|
-
* @param intensity Stretch factor (default: 0.004)
|
|
9
|
-
* @param maxStretch Max stretch percentage (default: 0.5 = 150% length)
|
|
10
|
-
*/
|
|
11
|
-
export function getVelocityDistortion(vx: number, vy: number, intensity = 0.004, maxStretch = 0.5) {
|
|
12
|
-
const speed = dist(vx, vy);
|
|
13
|
-
|
|
14
|
-
// Deadzone: If moving too slow, don't rotate (prevents jittering at rest)
|
|
15
|
-
if (speed < 0.1) {
|
|
16
|
-
return { rotation: 0, scaleX: 1, scaleY: 1 };
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 1. Point towards movement
|
|
20
|
-
const rotation = angle(vx, vy);
|
|
21
|
-
|
|
22
|
-
// 2. Stretch based on speed
|
|
23
|
-
const stretch = clamp(speed * intensity, 0, maxStretch);
|
|
24
|
-
|
|
25
|
-
// 3. Scale X grows, Scale Y shrinks (to preserve volume-ish)
|
|
26
|
-
const scaleX = 1 + stretch;
|
|
27
|
-
const scaleY = 1 - stretch * 0.5; // Squash factor
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
rotation,
|
|
31
|
-
scaleX,
|
|
32
|
-
scaleY
|
|
33
|
-
};
|
|
34
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from "./math";
|
|
2
|
-
export * from "./dom";
|
|
3
|
-
export * from "./effects";
|
|
4
|
-
export * from "./options";
|
|
5
|
-
export * from "./doctor";
|
|
6
|
-
export * from "./plugin";
|
|
7
|
-
export * from "./svg";
|
|
8
|
-
export * from "./css";
|
|
9
|
-
|
|
10
|
-
import * as math from "./math";
|
|
11
|
-
import * as dom from "./dom";
|
|
12
|
-
import * as effects from "./effects";
|
|
13
|
-
import * as svg from "./svg";
|
|
14
|
-
|
|
15
|
-
export { math, dom, effects, svg };
|
package/src/math.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Linear Interpolation between two values.
|
|
3
|
-
*/
|
|
4
|
-
export function lerp(start: number, end: number, factor: number): number {
|
|
5
|
-
return start + (end - start) * factor;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Frame-rate independent damping (Time-based Lerp).
|
|
10
|
-
* Ensures smooth animation consistent across 60hz, 120hz, etc.
|
|
11
|
-
*
|
|
12
|
-
* @param a Current value
|
|
13
|
-
* @param b Target value
|
|
14
|
-
* @param lambda Smoothing factor (approx 1-20). Higher is faster.
|
|
15
|
-
* @param dt Delta time in seconds (not milliseconds)
|
|
16
|
-
*/
|
|
17
|
-
export function damp(a: number, b: number, lambda: number, dt: number): number {
|
|
18
|
-
return lerp(a, b, 1 - Math.exp(-lambda * dt));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Linear Interpolation between two angles in degrees, taking the shortest path.
|
|
23
|
-
* Handles wrap-around at 360 degrees.
|
|
24
|
-
*/
|
|
25
|
-
export function lerpAngle(start: number, end: number, factor: number): number {
|
|
26
|
-
const diff = ((((end - start) % 360) + 540) % 360) - 180;
|
|
27
|
-
return start + diff * factor;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Returns a random number between min and max.
|
|
32
|
-
* Usage: math.random(10, 20) -> 14.5
|
|
33
|
-
*/
|
|
34
|
-
export function random(min: number, max: number): number {
|
|
35
|
-
return Math.random() * (max - min) + min;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Constrains a value between a minimum and maximum.
|
|
40
|
-
*/
|
|
41
|
-
export function clamp(value: number, min: number, max: number): number {
|
|
42
|
-
return Math.min(Math.max(value, min), max);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Calculates the distance (hypotenuse) between two points (or magnitude of a vector).
|
|
47
|
-
* If x2/y2 are omitted, calculates magnitude of vector x1/y1.
|
|
48
|
-
*/
|
|
49
|
-
export function dist(x1: number, y1: number, x2: number = 0, y2: number = 0): number {
|
|
50
|
-
const dx = x1 - x2;
|
|
51
|
-
const dy = y1 - y2;
|
|
52
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Calculates the angle in degrees between two points (or vector direction).
|
|
57
|
-
*/
|
|
58
|
-
export function angle(x: number, y: number): number {
|
|
59
|
-
return Math.atan2(y, x) * (180 / Math.PI);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function circumference(r: number): number {
|
|
63
|
-
return 2 * Math.PI * r;
|
|
64
|
-
}
|
package/src/options.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { MouseState, ValueOrGetter } from "@supermousejs/core";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Returns a function that always resolves the option value.
|
|
5
|
-
* Eliminates 'typeof' checks inside the render loop by normalizing
|
|
6
|
-
* static values into getter functions during initialization.
|
|
7
|
-
*
|
|
8
|
-
* @param option The option passed by the user
|
|
9
|
-
* @param defaultValue Fallback value
|
|
10
|
-
* @returns A function that returns the resolved value of the option
|
|
11
|
-
*/
|
|
12
|
-
export function normalize<T>(
|
|
13
|
-
option: ValueOrGetter<T> | undefined,
|
|
14
|
-
defaultValue: T
|
|
15
|
-
): (state: MouseState) => T {
|
|
16
|
-
if (option === undefined) {
|
|
17
|
-
return () => defaultValue;
|
|
18
|
-
}
|
|
19
|
-
if (typeof option === "function") {
|
|
20
|
-
return option as (state: MouseState) => T;
|
|
21
|
-
}
|
|
22
|
-
return () => option;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Normalizes multiple options in one call.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* const cfg = normalizeAll(options, {
|
|
30
|
-
* size: 20,
|
|
31
|
-
* color: "#fff",
|
|
32
|
-
* opacity: 1,
|
|
33
|
-
* });
|
|
34
|
-
*
|
|
35
|
-
* // In update():
|
|
36
|
-
* const size = cfg.size(app.state);
|
|
37
|
-
*
|
|
38
|
-
* @param defaults Default values for the options
|
|
39
|
-
* @param options User-provided options to normalize
|
|
40
|
-
* @returns An object with normalized getter functions for each option
|
|
41
|
-
*/
|
|
42
|
-
export function normalizeAll<T extends Record<string, unknown>>(
|
|
43
|
-
options: Partial<{ [K in keyof T]: ValueOrGetter<T[K]> }>,
|
|
44
|
-
defaults: T
|
|
45
|
-
): { [K in keyof T]: (state: MouseState) => T[K] } {
|
|
46
|
-
const result = {} as { [K in keyof T]: (state: MouseState) => T[K] };
|
|
47
|
-
|
|
48
|
-
for (const key of Object.keys(defaults) as Array<keyof T>) {
|
|
49
|
-
result[key] = normalize(
|
|
50
|
-
options[key] as ValueOrGetter<T[typeof key]> | undefined,
|
|
51
|
-
defaults[key]
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Checks if the current device has a fine pointer (e.g., mouse) or a coarse pointer (e.g., touch).
|
|
60
|
-
* This is useful for conditionally enabling or disabling cursor effects based on the input device.
|
|
61
|
-
*
|
|
62
|
-
* @returns True if the device has a fine pointer, false otherwise.
|
|
63
|
-
*/
|
|
64
|
-
export const hasFinePointer = (): boolean =>
|
|
65
|
-
typeof window !== "undefined" && window.matchMedia("(pointer: fine)").matches;
|
package/src/plugin.ts
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import type { SupermouseInstance, SupermousePlugin } from "@supermousejs/core";
|
|
2
|
-
|
|
3
|
-
/** Options that can be passed to any plugin factory. */
|
|
4
|
-
export interface BasePluginOptions {
|
|
5
|
-
/** Overrides the plugin's internal name. */
|
|
6
|
-
name?: string;
|
|
7
|
-
/** Whether the plugin starts enabled. Defaults to `true`. */
|
|
8
|
-
isEnabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface CoreConfig {
|
|
12
|
-
/** Unique identifier. Used by `getPlugin()`, `enablePlugin()`, etc. */
|
|
13
|
-
name: string;
|
|
14
|
-
/** Execution order in the frame loop. Lower values are executed earlier */
|
|
15
|
-
priority?: number;
|
|
16
|
-
/** Whether the plugin starts enabled. Defaults to `true`. */
|
|
17
|
-
isEnabled?: boolean;
|
|
18
|
-
/** Called once when the plugin is registered via `app.use()`. */
|
|
19
|
-
install?(app: SupermouseInstance): void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Declarative config for a logic plugin.
|
|
24
|
-
*
|
|
25
|
-
* Logic plugins modify cursor intent (e.g. magnetism, snapping, gravity).
|
|
26
|
-
*/
|
|
27
|
-
export interface LogicConfig extends CoreConfig {
|
|
28
|
-
/**
|
|
29
|
-
* Called every frame while the plugin is enabled.
|
|
30
|
-
* @param app The Supermouse instance.
|
|
31
|
-
* @param deltaTime Elapsed time since last frame, in milliseconds.
|
|
32
|
-
*/
|
|
33
|
-
update?(app: SupermouseInstance, deltaTime: number): void;
|
|
34
|
-
/** Called when the plugin is removed or the app is destroyed. */
|
|
35
|
-
destroy?(app: SupermouseInstance): void;
|
|
36
|
-
/** Called when `app.enablePlugin(name)` is invoked. */
|
|
37
|
-
onEnable?(app: SupermouseInstance): void;
|
|
38
|
-
/** Called when `app.disablePlugin(name)` is invoked. */
|
|
39
|
-
onDisable?(app: SupermouseInstance): void;
|
|
40
|
-
/**
|
|
41
|
-
* Called before the plugin is disabled. Can return a Promise to delay
|
|
42
|
-
* hiding until an exit animation finishes. This is the declarative
|
|
43
|
-
* equivalent of `SupermousePlugin.onBeforeDisable`.
|
|
44
|
-
*/
|
|
45
|
-
beforeDisable?(app: SupermouseInstance): void | Promise<void>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Declarative config for a visual plugin.
|
|
50
|
-
*
|
|
51
|
-
* @typeParam E - The specific element subtype returned by `create`.
|
|
52
|
-
* Can be an `HTMLElement` (e.g. `HTMLDivElement`) or an `SVGElement`
|
|
53
|
-
* (e.g. `SVGSVGElement`).
|
|
54
|
-
*/
|
|
55
|
-
export interface VisualConfig<
|
|
56
|
-
E extends HTMLElement | SVGElement = HTMLElement | SVGElement
|
|
57
|
-
> extends CoreConfig {
|
|
58
|
-
/**
|
|
59
|
-
* Factory that creates the plugin's root DOM element.
|
|
60
|
-
* Called once during `install()`. The returned element is automatically
|
|
61
|
-
* appended to the **stage** (not `app.container`).
|
|
62
|
-
*/
|
|
63
|
-
create: (app: SupermouseInstance) => E;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Called every frame while the plugin is enabled.
|
|
67
|
-
* Use `css()` from `@supermousejs/utils` for style writes,
|
|
68
|
-
* and `setTransform()` for positioning.
|
|
69
|
-
*/
|
|
70
|
-
update?(app: SupermouseInstance, element: E, deltaTime: number): void;
|
|
71
|
-
|
|
72
|
-
/** Called when the plugin is enabled. The element is already visible. */
|
|
73
|
-
onEnable?(app: SupermouseInstance, element: E): void;
|
|
74
|
-
/**
|
|
75
|
-
* Called when the plugin is disabled.
|
|
76
|
-
* The element is still in the DOM when this runs, so you can start
|
|
77
|
-
* CSS transitions. If `beforeDisable` is defined and returns a Promise,
|
|
78
|
-
* the core will wait for it to resolve before hiding the element.
|
|
79
|
-
*/
|
|
80
|
-
onDisable?(app: SupermouseInstance, element: E): void;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Called during `destroy()`, before the element is removed from the DOM.
|
|
84
|
-
* Use this to tear down external listeners or GSAP timelines.
|
|
85
|
-
*/
|
|
86
|
-
cleanup?(app: SupermouseInstance, element: E): void;
|
|
87
|
-
/** General teardown hook, called after cleanup and element removal. */
|
|
88
|
-
destroy?(app: SupermouseInstance): void;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Auto-registers this selector as a hover target on install.
|
|
92
|
-
* Equivalent to `app.registerHoverTarget(selector)` inside `install()`.
|
|
93
|
-
*/
|
|
94
|
-
selector?: string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Called before the plugin is disabled. Can return a Promise to delay
|
|
98
|
-
* hiding until an exit animation finishes.
|
|
99
|
-
* Receives the element as the second argument.
|
|
100
|
-
*/
|
|
101
|
-
beforeDisable?(app: SupermouseInstance, element: E): void | Promise<void>;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function isVisual<E extends HTMLElement | SVGElement>(
|
|
105
|
-
config: LogicConfig | VisualConfig<E>
|
|
106
|
-
): config is VisualConfig<E> {
|
|
107
|
-
return typeof (config as VisualConfig).create === "function";
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Creates a visual plugin with automatic DOM mounting and lifecycle management.
|
|
112
|
-
*
|
|
113
|
-
* @param config Visual plugin definition.
|
|
114
|
-
* @param userOptions Optional overrides for `name` and `isEnabled`.
|
|
115
|
-
* @returns A `SupermousePlugin` whose `element` property is typed as `E`.
|
|
116
|
-
*/
|
|
117
|
-
export function definePlugin<E extends HTMLElement | SVGElement>(
|
|
118
|
-
config: VisualConfig<E>,
|
|
119
|
-
userOptions?: BasePluginOptions
|
|
120
|
-
): SupermousePlugin & { element?: E };
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Creates a logic plugin that is passed through directly.
|
|
124
|
-
*
|
|
125
|
-
* @param config Logic plugin definition.
|
|
126
|
-
* @param userOptions Optional overrides for `name` and `isEnabled`.
|
|
127
|
-
* @returns A `SupermousePlugin`.
|
|
128
|
-
*/
|
|
129
|
-
export function definePlugin(
|
|
130
|
-
config: LogicConfig,
|
|
131
|
-
userOptions?: BasePluginOptions
|
|
132
|
-
): SupermousePlugin;
|
|
133
|
-
|
|
134
|
-
export function definePlugin(
|
|
135
|
-
config: LogicConfig | VisualConfig,
|
|
136
|
-
userOptions: BasePluginOptions = {}
|
|
137
|
-
): SupermousePlugin {
|
|
138
|
-
const resolvedName = userOptions.name ?? config.name;
|
|
139
|
-
const resolvedEnabled = userOptions.isEnabled ?? true;
|
|
140
|
-
|
|
141
|
-
if (!isVisual(config)) {
|
|
142
|
-
return {
|
|
143
|
-
...config,
|
|
144
|
-
name: resolvedName,
|
|
145
|
-
isEnabled: resolvedEnabled
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
let root: HTMLElement | SVGElement | null = null;
|
|
150
|
-
let isMounted = false;
|
|
151
|
-
|
|
152
|
-
const beforeDisable = (app: SupermouseInstance): void | Promise<void> => {
|
|
153
|
-
if (!root) return;
|
|
154
|
-
return config.beforeDisable?.(app, root);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
name: resolvedName,
|
|
159
|
-
isEnabled: resolvedEnabled,
|
|
160
|
-
priority: config.priority,
|
|
161
|
-
|
|
162
|
-
install(app) {
|
|
163
|
-
root = config.create(app);
|
|
164
|
-
if (!(root instanceof HTMLElement) && !(root instanceof SVGElement)) {
|
|
165
|
-
console.warn(
|
|
166
|
-
`[supermouse] Plugin "${resolvedName}" create() did not return an HTMLElement or SVGElement.`
|
|
167
|
-
);
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
this.element = app.stage.appendChild(root);
|
|
171
|
-
isMounted = true;
|
|
172
|
-
if (config.selector) {
|
|
173
|
-
app.registerHoverTarget(config.selector);
|
|
174
|
-
}
|
|
175
|
-
if (!resolvedEnabled) {
|
|
176
|
-
root.style.display = "none";
|
|
177
|
-
}
|
|
178
|
-
config.install?.(app);
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
update(app, dt) {
|
|
182
|
-
if (!root || !isMounted) return;
|
|
183
|
-
config.update?.(app, root, dt);
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
onEnable(app) {
|
|
187
|
-
if (!root) return;
|
|
188
|
-
root.style.display = "";
|
|
189
|
-
config.onEnable?.(app, root);
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
async onBeforeDisable(app) {
|
|
193
|
-
await beforeDisable(app);
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
onDisable(app) {
|
|
197
|
-
if (!root) return;
|
|
198
|
-
config.onDisable?.(app, root);
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
destroy(app) {
|
|
202
|
-
if (root) {
|
|
203
|
-
config.cleanup?.(app, root);
|
|
204
|
-
root.remove();
|
|
205
|
-
root = null;
|
|
206
|
-
isMounted = false;
|
|
207
|
-
}
|
|
208
|
-
config.destroy?.(app);
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
}
|
package/src/svg.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
type SVGAttrs = Record<string, string | number | boolean>;
|
|
2
|
-
|
|
3
|
-
/** Create any SVG element by tag name with attributes. */
|
|
4
|
-
export function createSVGElement<K extends keyof SVGElementTagNameMap>(
|
|
5
|
-
tag: K,
|
|
6
|
-
attrs: SVGAttrs = {}
|
|
7
|
-
): SVGElementTagNameMap[K] {
|
|
8
|
-
const el = document.createElementNS("http://www.w3.org/2000/svg", tag);
|
|
9
|
-
for (const [key, value] of Object.entries(attrs)) {
|
|
10
|
-
el.setAttribute(key, String(value));
|
|
11
|
-
}
|
|
12
|
-
return el;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** Set multiple attributes on an SVG element. */
|
|
16
|
-
export function setSVGAttrs(el: SVGElement, attrs: SVGAttrs): void {
|
|
17
|
-
for (const [key, value] of Object.entries(attrs)) {
|
|
18
|
-
el.setAttribute(key, String(value));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Create a `<g>` group. */
|
|
23
|
-
export function group(attrs: SVGAttrs = {}): SVGGElement {
|
|
24
|
-
return createSVGElement("g", attrs);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Create a `<circle>`. */
|
|
28
|
-
export function circle(attrs: SVGAttrs = {}): SVGCircleElement {
|
|
29
|
-
return createSVGElement("circle", attrs);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** Create a `<rect>`. */
|
|
33
|
-
export function rect(attrs: SVGAttrs = {}): SVGRectElement {
|
|
34
|
-
return createSVGElement("rect", attrs);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** Create a `<path>` with optional `d` attribute. */
|
|
38
|
-
export function path(d?: string, attrs: SVGAttrs = {}): SVGPathElement {
|
|
39
|
-
const el = createSVGElement("path", attrs);
|
|
40
|
-
if (d !== undefined) el.setAttribute("d", d);
|
|
41
|
-
return el;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** Create a `<text>` element. */
|
|
45
|
-
export function text(attrs: SVGAttrs = {}, content?: string): SVGTextElement {
|
|
46
|
-
const el = createSVGElement("text", attrs);
|
|
47
|
-
if (content !== undefined) el.textContent = content;
|
|
48
|
-
return el;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** Create a `<textPath>` with proper `href` and `xlink:href`. */
|
|
52
|
-
export function textPath(href: string, attrs: SVGAttrs = {}): SVGTextPathElement {
|
|
53
|
-
const el = createSVGElement("textPath", { ...attrs, href });
|
|
54
|
-
el.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", href);
|
|
55
|
-
return el;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** Create a `<filter>` with region attributes and children. */
|
|
59
|
-
export function filter(
|
|
60
|
-
id: string,
|
|
61
|
-
attrs: SVGAttrs = {},
|
|
62
|
-
children: SVGElement[] = []
|
|
63
|
-
): SVGFilterElement {
|
|
64
|
-
const el = createSVGElement("filter", { id, ...attrs });
|
|
65
|
-
children.forEach((child) => el.appendChild(child));
|
|
66
|
-
return el;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/** Create a `<feGaussianBlur>` primitive. */
|
|
70
|
-
export function gaussianBlur(
|
|
71
|
-
stdDeviation: string | number = 0,
|
|
72
|
-
attrs: SVGAttrs = {}
|
|
73
|
-
): SVGFEGaussianBlurElement {
|
|
74
|
-
return createSVGElement("feGaussianBlur", {
|
|
75
|
-
stdDeviation: String(stdDeviation),
|
|
76
|
-
...attrs
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** Create a `<feTurbulence>` primitive. */
|
|
81
|
-
export function turbulence(
|
|
82
|
-
baseFrequency: string | number = 0.1,
|
|
83
|
-
attrs: SVGAttrs = {}
|
|
84
|
-
): SVGFETurbulenceElement {
|
|
85
|
-
return createSVGElement("feTurbulence", {
|
|
86
|
-
baseFrequency: String(baseFrequency),
|
|
87
|
-
...attrs
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/** Create a `<feMergeNode>` primitive. */
|
|
92
|
-
export function mergeNode(inAttr?: string): SVGFEMergeNodeElement {
|
|
93
|
-
return createSVGElement("feMergeNode", inAttr ? { in: inAttr } : {});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/** Create a `<feMerge>` container with merge node children. */
|
|
97
|
-
export function merge(nodes: SVGFEMergeNodeElement[] = []): SVGFEMergeElement {
|
|
98
|
-
const el = createSVGElement("feMerge");
|
|
99
|
-
nodes.forEach((node) => el.appendChild(node));
|
|
100
|
-
return el;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Calculates the SVG Path data for a perfect circle starting at the top center (12 o'clock).
|
|
105
|
-
*
|
|
106
|
-
* Path moves to (0, -r), then draws two semi-circles.
|
|
107
|
-
* @param r Radius in pixels
|
|
108
|
-
*/
|
|
109
|
-
export function circlePath(r: number): string {
|
|
110
|
-
const rClean = Math.round(r * 100) / 100;
|
|
111
|
-
|
|
112
|
-
return `
|
|
113
|
-
M 0, -${rClean}
|
|
114
|
-
A ${rClean},${rClean} 0 1,1 0,${rClean}
|
|
115
|
-
A ${rClean},${rClean} 0 1,1 0,-${rClean}
|
|
116
|
-
`
|
|
117
|
-
.replace(/\s+/g, " ")
|
|
118
|
-
.trim();
|
|
119
|
-
}
|
package/tsconfig.json
DELETED
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"fileNames":["../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","./src/css.ts","./src/doctor.ts","./src/dom.ts","./src/math.ts","./src/effects.ts","./src/layers.ts","../core/dist/index.d.ts","./src/options.ts","./src/plugin.ts","./src/index.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/compatibility/index.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/buffer.buffer.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/globals.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/web-globals/domexception.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/web-globals/events.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/web-globals/fetch.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/assert.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/assert/strict.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/async_hooks.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/buffer.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/child_process.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/cluster.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/console.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/constants.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/crypto.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/dgram.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/dns.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/dns/promises.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/domain.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/events.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/fs.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/fs/promises.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/http.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/http2.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/https.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/inspector.generated.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/module.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/net.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/os.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/path.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/perf_hooks.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/process.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/punycode.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/querystring.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/readline.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/readline/promises.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/repl.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/sea.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/stream.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/stream/promises.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/stream/consumers.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/stream/web.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/string_decoder.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/test.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/timers.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/timers/promises.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/tls.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/trace_events.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/tty.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/url.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/util.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/v8.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/vm.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/wasi.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/worker_threads.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/zlib.d.ts","../../node_modules/.pnpm/@types+node@20.19.37/node_modules/@types/node/index.d.ts"],"fileIdsList":[[63,106,109],[63,108,109],[109],[63,109,114,142],[63,109,110,115,120,128,139,150],[63,109,110,111,120,128],[63,109],[58,59,60,63,109],[63,109,112,151],[63,109,113,114,121,129],[63,109,114,139,147],[63,109,115,117,120,128],[63,108,109,116],[63,109,117,118],[63,109,119,120],[63,108,109,120],[63,109,120,121,122,139,150],[63,109,120,121,122,135,139,142],[63,109,117,120,123,128,139,150],[63,109,120,121,123,124,128,139,147,150],[63,109,123,125,139,147,150],[61,62,63,64,65,66,67,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156],[63,109,120,126],[63,109,127,150,155],[63,109,117,120,128,139],[63,109,129],[63,109,130],[63,108,109,131],[63,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156],[63,109,133],[63,109,134],[63,109,120,135,136],[63,109,135,137,151,153],[63,109,120,139,140,142],[63,109,141,142],[63,109,139,140],[63,109,142],[63,109,143],[63,106,109,139,144],[63,109,120,145,146],[63,109,145,146],[63,109,114,128,139,147],[63,109,148],[63,109,128,149],[63,109,123,134,150],[63,109,114,151],[63,109,139,152],[63,109,127,153],[63,109,154],[63,104,109],[63,104,109,120,122,131,139,142,150,153,155],[63,109,139,156],[63,76,80,109,150],[63,76,109,139,150],[63,71,109],[63,73,76,109,147,150],[63,109,128,147],[63,109,157],[63,71,109,157],[63,73,76,109,128,150],[63,68,69,72,75,109,120,139,150],[63,76,83,109],[63,68,74,109],[63,76,97,98,109],[63,72,76,109,142,150,157],[63,97,109,157],[63,70,71,109,157],[63,76,109],[63,70,71,72,73,74,75,76,77,78,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,98,99,100,101,102,103,109],[63,76,91,109],[63,76,83,84,109],[63,74,76,84,85,109],[63,75,109],[63,68,71,76,109],[63,76,80,84,85,109],[63,80,109],[63,74,76,79,109,150],[63,68,73,76,83,109],[63,109,139],[63,71,76,97,109,155,157],[51,63,109],[48,49,50,51,52,53,55,56,63,109],[54,63,109],[50,54,55,63,109]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"05cc52478a2564405525e2ae55f116c85d2911603001a635b25bc73d553c90a1","3a0d65618995f0d406ef3ac31d94571c90c64f3ea2eee77894e7d7f779f42b02","9ba494a505b7e7e879a4d0b5c15a5530886788a600ce2d2004d31391b369e4fd","dd7992fa4a6438b6e58a91b6d59512ee576f76ee3ec10bcca19a78d0a1e74063","43b3cdbdad4a6296307d4b32754935b601375e6f10f56f69761544a79528e2d7","d854b841d869753aab10b2ea52a74b025b277d2c4cb16af18d19a0c9a4bb8cd6","bc51a11135721feecce099790a47d2bd71829d128a7e8fb69ca6b52e1658b74e","e055a3c0ce0d98040b7c7edde1cb8423b127fca5509458ae983394b83996919e","0b50f0ef94fe2c58cac48b01a2c999371d2ae32989badf6e0a6f93833fa3db2e","016739f165f1294c061071edbbb962a3517d8b19a9c1a49329b0f19b59a58cad",{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"ba481bca06f37d3f2c137ce343c7d5937029b2468f8e26111f3c9d9963d6568d","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d9ef24f9a22a88e3e9b3b3d8c40ab1ddb0853f1bfbd5c843c37800138437b61","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2677634fe27e87348825bb041651e22d50a613e2fdf6a4a3ade971d71bac37e","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"8c0bcd6c6b67b4b503c11e91a1fb91522ed585900eab2ab1f61bba7d7caa9d6f","impliedFormat":1},{"version":"8cd19276b6590b3ebbeeb030ac271871b9ed0afc3074ac88a94ed2449174b776","affectsGlobalScope":true,"impliedFormat":1},{"version":"696eb8d28f5949b87d894b26dc97318ef944c794a9a4e4f62360cd1d1958014b","impliedFormat":1},{"version":"3f8fa3061bd7402970b399300880d55257953ee6d3cd408722cb9ac20126460c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"68bd56c92c2bd7d2339457eb84d63e7de3bd56a69b25f3576e1568d21a162398","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e93b123f7c2944969d291b35fed2af79a6e9e27fdd5faa99748a51c07c02d28","impliedFormat":1},{"version":"9d19808c8c291a9010a6c788e8532a2da70f811adb431c97520803e0ec649991","impliedFormat":1},{"version":"87aad3dd9752067dc875cfaa466fc44246451c0c560b820796bdd528e29bef40","impliedFormat":1},{"version":"4aacb0dd020eeaef65426153686cc639a78ec2885dc72ad220be1d25f1a439df","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"8db0ae9cb14d9955b14c214f34dae1b9ef2baee2fe4ce794a4cd3ac2531e3255","affectsGlobalScope":true,"impliedFormat":1},{"version":"15fc6f7512c86810273af28f224251a5a879e4261b4d4c7e532abfbfc3983134","impliedFormat":1},{"version":"58adba1a8ab2d10b54dc1dced4e41f4e7c9772cbbac40939c0dc8ce2cdb1d442","impliedFormat":1},{"version":"641942a78f9063caa5d6b777c99304b7d1dc7328076038c6d94d8a0b81fc95c1","impliedFormat":1},{"version":"714435130b9015fae551788df2a88038471a5a11eb471f27c4ede86552842bc9","impliedFormat":1},{"version":"855cd5f7eb396f5f1ab1bc0f8580339bff77b68a770f84c6b254e319bbfd1ac7","impliedFormat":1},{"version":"5650cf3dace09e7c25d384e3e6b818b938f68f4e8de96f52d9c5a1b3db068e86","impliedFormat":1},{"version":"1354ca5c38bd3fd3836a68e0f7c9f91f172582ba30ab15bb8c075891b91502b7","affectsGlobalScope":true,"impliedFormat":1},{"version":"27fdb0da0daf3b337c5530c5f266efe046a6ceb606e395b346974e4360c36419","impliedFormat":1},{"version":"2d2fcaab481b31a5882065c7951255703ddbe1c0e507af56ea42d79ac3911201","impliedFormat":1},{"version":"a192fe8ec33f75edbc8d8f3ed79f768dfae11ff5735e7fe52bfa69956e46d78d","impliedFormat":1},{"version":"ca867399f7db82df981d6915bcbb2d81131d7d1ef683bc782b59f71dda59bc85","affectsGlobalScope":true,"impliedFormat":1},{"version":"372413016d17d804e1d139418aca0c68e47a83fb6669490857f4b318de8cccb3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"b4f70ec656a11d570e1a9edce07d118cd58d9760239e2ece99306ee9dfe61d02","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"6e70e9570e98aae2b825b533aa6292b6abd542e8d9f6e9475e88e1d7ba17c866","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"47ab634529c5955b6ad793474ae188fce3e6163e3a3fb5edd7e0e48f14435333","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"fad4e3c207fe23922d0b2d06b01acbfb9714c4f2685cf80fd384c8a100c82fd0","affectsGlobalScope":true,"impliedFormat":1},{"version":"74cf591a0f63db318651e0e04cb55f8791385f86e987a67fd4d2eaab8191f730","impliedFormat":1},{"version":"5eab9b3dc9b34f185417342436ec3f106898da5f4801992d8ff38ab3aff346b5","impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"809821b8a065e3234a55b3a9d7846231ed18d66dd749f2494c66288d890daf7f","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"c3b41e74b9a84b88b1dca61ec39eee25c0dbc8e7d519ba11bb070918cfacf656","affectsGlobalScope":true,"impliedFormat":1},{"version":"4737a9dc24d0e68b734e6cfbcea0c15a2cfafeb493485e27905f7856988c6b29","affectsGlobalScope":true,"impliedFormat":1},{"version":"36d8d3e7506b631c9582c251a2c0b8a28855af3f76719b12b534c6edf952748d","impliedFormat":1},{"version":"1ca69210cc42729e7ca97d3a9ad48f2e9cb0042bada4075b588ae5387debd318","impliedFormat":1},{"version":"f5ebe66baaf7c552cfa59d75f2bfba679f329204847db3cec385acda245e574e","impliedFormat":1},{"version":"ed59add13139f84da271cafd32e2171876b0a0af2f798d0c663e8eeb867732cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7c5e2ea4a9749097c347454805e933844ed207b6eefec6b7cfd418b5f5f7b28","impliedFormat":1},{"version":"b1810689b76fd473bd12cc9ee219f8e62f54a7d08019a235d07424afbf074d25","impliedFormat":1}],"root":[[48,53],[55,57]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"strict":true,"target":7,"useDefineForClassFields":true},"referencedMap":[[106,1],[107,1],[108,2],[63,3],[109,4],[110,5],[111,6],[58,7],[61,8],[59,7],[60,7],[112,9],[113,10],[114,11],[115,12],[116,13],[117,14],[118,14],[119,15],[120,16],[121,17],[122,18],[64,7],[62,7],[123,19],[124,20],[125,21],[157,22],[126,23],[127,24],[128,25],[129,26],[130,27],[131,28],[132,29],[133,30],[134,31],[135,32],[136,32],[137,33],[138,7],[139,34],[141,35],[140,36],[142,37],[143,38],[144,39],[145,40],[146,41],[147,42],[148,43],[149,44],[150,45],[151,46],[152,47],[153,48],[154,49],[65,7],[66,7],[67,7],[105,50],[155,51],[156,52],[46,7],[47,7],[8,7],[9,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[1,7],[83,53],[93,54],[82,53],[103,55],[74,56],[73,57],[102,58],[96,59],[101,60],[76,61],[90,62],[75,63],[99,64],[71,65],[70,58],[100,66],[72,67],[77,68],[78,7],[81,68],[68,7],[104,69],[94,70],[85,71],[86,72],[88,73],[84,74],[87,75],[97,58],[79,76],[80,77],[89,78],[69,79],[92,70],[91,68],[95,7],[98,80],[54,7],[48,7],[49,7],[50,7],[52,81],[57,82],[53,7],[51,7],[55,83],[56,84]],"affectedFilesPendingEmit":[[48,49],[49,49],[50,49],[52,49],[57,49],[53,49],[51,49],[55,49],[56,49]],"emitSignatures":[48,49,50,51,52,53,55,56,57],"version":"5.8.3"}
|
package/vite.config.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import dts from "vite-plugin-dts";
|
|
3
|
-
import path from "path";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
build: {
|
|
7
|
-
lib: {
|
|
8
|
-
entry: path.resolve(__dirname, "src/index.ts"),
|
|
9
|
-
name: "SupermouseUtils",
|
|
10
|
-
fileName: (format) => (format === "es" ? "index.mjs" : "index.umd.js")
|
|
11
|
-
},
|
|
12
|
-
rollupOptions: {
|
|
13
|
-
external: ["@supermousejs/core"],
|
|
14
|
-
output: {
|
|
15
|
-
globals: {
|
|
16
|
-
"@supermousejs/core": "SupermouseCore"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
plugins: [dts({ rollupTypes: false })]
|
|
22
|
-
});
|