agex 0.1.0

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.
@@ -0,0 +1,88 @@
1
+ (() => {
2
+ let hasMoved = false;
3
+
4
+ function createCursor() {
5
+ if (document.getElementById('agex-cursor')) return;
6
+
7
+ const cursor = document.createElement('div');
8
+ cursor.id = 'agex-cursor';
9
+ cursor.style.cssText = `
10
+ width: 24px;
11
+ height: 24px;
12
+ background: rgba(255, 50, 50, 0.85);
13
+ border: 2px solid white;
14
+ border-radius: 50%;
15
+ position: fixed;
16
+ pointer-events: none;
17
+ z-index: 2147483647;
18
+ transform: translate(-50%, -50%);
19
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
20
+ left: -100px;
21
+ top: -100px;
22
+ opacity: 0;
23
+ transition: left 0.08s ease-out, top 0.08s ease-out, opacity 0.15s, transform 0.1s, background 0.1s;
24
+ `;
25
+ document.body.appendChild(cursor);
26
+
27
+ const style = document.createElement('style');
28
+ style.id = 'agex-cursor-style';
29
+ style.textContent = ``;
30
+ document.head.appendChild(style);
31
+
32
+ document.addEventListener('mousemove', (e) => {
33
+ const c = document.getElementById('agex-cursor');
34
+ if (c) {
35
+ c.style.left = `${e.clientX}px`;
36
+ c.style.top = `${e.clientY}px`;
37
+ if (!hasMoved) {
38
+ hasMoved = true;
39
+ c.style.opacity = '1';
40
+ }
41
+ }
42
+ }, true);
43
+
44
+ document.addEventListener('mousedown', () => {
45
+ const c = document.getElementById('agex-cursor');
46
+ if (c) {
47
+ c.style.transform = 'translate(-50%, -50%) scale(0.8)';
48
+ c.style.background = 'rgba(255, 200, 50, 1)';
49
+ }
50
+ }, true);
51
+
52
+ document.addEventListener('mouseup', () => {
53
+ const c = document.getElementById('agex-cursor');
54
+ if (c) {
55
+ c.style.transform = 'translate(-50%, -50%) scale(1)';
56
+ c.style.background = 'rgba(255, 50, 50, 0.85)';
57
+ }
58
+ }, true);
59
+ }
60
+
61
+ if (document.readyState === 'loading') {
62
+ document.addEventListener('DOMContentLoaded', createCursor);
63
+ } else {
64
+ createCursor();
65
+ }
66
+
67
+ const observer = new MutationObserver(() => {
68
+ if (!document.getElementById('agex-cursor') && document.body) {
69
+ createCursor();
70
+ }
71
+ });
72
+
73
+ if (document.body) {
74
+ observer.observe(document.body, { childList: true, subtree: true });
75
+ } else {
76
+ document.addEventListener('DOMContentLoaded', () => {
77
+ observer.observe(document.body, { childList: true, subtree: true });
78
+ });
79
+ }
80
+
81
+ window.addEventListener('load', createCursor);
82
+
83
+ setInterval(() => {
84
+ if (!document.getElementById('agex-cursor') && document.body) {
85
+ createCursor();
86
+ }
87
+ }, 500);
88
+ })();
@@ -0,0 +1,88 @@
1
+ (() => {
2
+ let hasMoved = false;
3
+
4
+ function createCursor() {
5
+ if (document.getElementById('agex-cursor')) return;
6
+
7
+ const cursor = document.createElement('div');
8
+ cursor.id = 'agex-cursor';
9
+ cursor.style.cssText = `
10
+ width: 24px;
11
+ height: 24px;
12
+ background: rgba(255, 50, 50, 0.85);
13
+ border: 2px solid white;
14
+ border-radius: 50%;
15
+ position: fixed;
16
+ pointer-events: none;
17
+ z-index: 2147483647;
18
+ transform: translate(-50%, -50%);
19
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
20
+ left: -100px;
21
+ top: -100px;
22
+ opacity: 0;
23
+ transition: left 0.08s ease-out, top 0.08s ease-out, opacity 0.15s, transform 0.1s, background 0.1s;
24
+ `;
25
+ document.body.appendChild(cursor);
26
+
27
+ const style = document.createElement('style');
28
+ style.id = 'agex-cursor-style';
29
+ style.textContent = ``;
30
+ document.head.appendChild(style);
31
+
32
+ document.addEventListener('mousemove', (e) => {
33
+ const c = document.getElementById('agex-cursor');
34
+ if (c) {
35
+ c.style.left = `${e.clientX}px`;
36
+ c.style.top = `${e.clientY}px`;
37
+ if (!hasMoved) {
38
+ hasMoved = true;
39
+ c.style.opacity = '1';
40
+ }
41
+ }
42
+ }, true);
43
+
44
+ document.addEventListener('mousedown', () => {
45
+ const c = document.getElementById('agex-cursor');
46
+ if (c) {
47
+ c.style.transform = 'translate(-50%, -50%) scale(0.8)';
48
+ c.style.background = 'rgba(255, 200, 50, 1)';
49
+ }
50
+ }, true);
51
+
52
+ document.addEventListener('mouseup', () => {
53
+ const c = document.getElementById('agex-cursor');
54
+ if (c) {
55
+ c.style.transform = 'translate(-50%, -50%) scale(1)';
56
+ c.style.background = 'rgba(255, 50, 50, 0.85)';
57
+ }
58
+ }, true);
59
+ }
60
+
61
+ if (document.readyState === 'loading') {
62
+ document.addEventListener('DOMContentLoaded', createCursor);
63
+ } else {
64
+ createCursor();
65
+ }
66
+
67
+ const observer = new MutationObserver(() => {
68
+ if (!document.getElementById('agex-cursor') && document.body) {
69
+ createCursor();
70
+ }
71
+ });
72
+
73
+ if (document.body) {
74
+ observer.observe(document.body, { childList: true, subtree: true });
75
+ } else {
76
+ document.addEventListener('DOMContentLoaded', () => {
77
+ observer.observe(document.body, { childList: true, subtree: true });
78
+ });
79
+ }
80
+
81
+ window.addEventListener('load', createCursor);
82
+
83
+ setInterval(() => {
84
+ if (!document.getElementById('agex-cursor') && document.body) {
85
+ createCursor();
86
+ }
87
+ }, 500);
88
+ })();
@@ -0,0 +1,10 @@
1
+ import {
2
+ ensureAgentInstalled,
3
+ getAgentConfig,
4
+ getRequiredApiKey
5
+ } from "./chunk-3FGK7LUI.js";
6
+ export {
7
+ ensureAgentInstalled,
8
+ getAgentConfig,
9
+ getRequiredApiKey
10
+ };