groove-dev 0.27.8 → 0.27.12
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/groove-icon.png +0 -0
- package/node_modules/@groove-dev/daemon/src/api.js +460 -25
- package/node_modules/@groove-dev/daemon/src/index.js +7 -0
- package/node_modules/@groove-dev/daemon/src/introducer.js +72 -4
- package/node_modules/@groove-dev/daemon/src/journalist.js +66 -11
- package/node_modules/@groove-dev/daemon/src/process.js +67 -7
- package/node_modules/@groove-dev/daemon/src/registry.js +1 -1
- package/node_modules/@groove-dev/daemon/src/repo-import.js +541 -0
- package/node_modules/@groove-dev/daemon/src/rotator.js +28 -1
- package/node_modules/@groove-dev/daemon/src/supervisor.js +2 -1
- package/node_modules/@groove-dev/daemon/src/tunnel-manager.js +504 -0
- package/node_modules/@groove-dev/daemon/src/validate.js +13 -0
- package/node_modules/@groove-dev/daemon/test/journalist.test.js +5 -4
- package/node_modules/@groove-dev/daemon/test/rotator.test.js +4 -1
- package/node_modules/@groove-dev/gui/dist/assets/index-BE6lYcd7.css +1 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-zdzOLAZM.js +677 -0
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/src/app.css +14 -0
- package/node_modules/@groove-dev/gui/src/app.jsx +13 -0
- package/node_modules/@groove-dev/gui/src/components/agents/agent-config.jsx +130 -1
- package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +2 -2
- package/node_modules/@groove-dev/gui/src/components/agents/agent-mdfiles.jsx +43 -1
- package/node_modules/@groove-dev/gui/src/components/agents/spawn-wizard.jsx +141 -1
- package/node_modules/@groove-dev/gui/src/components/dashboard/fleet-panel.jsx +3 -3
- package/node_modules/@groove-dev/gui/src/components/dashboard/intel-panel.jsx +4 -4
- package/node_modules/@groove-dev/gui/src/components/dashboard/routing-chart.jsx +3 -3
- package/node_modules/@groove-dev/gui/src/components/dashboard/team-burn-panel.jsx +1 -1
- package/node_modules/@groove-dev/gui/src/components/layout/activity-bar.jsx +4 -4
- package/node_modules/@groove-dev/gui/src/components/layout/app-shell.jsx +7 -1
- package/node_modules/@groove-dev/gui/src/components/layout/breadcrumb-bar.jsx +26 -8
- package/node_modules/@groove-dev/gui/src/components/layout/command-palette.jsx +14 -4
- package/node_modules/@groove-dev/gui/src/components/layout/status-bar.jsx +46 -11
- package/node_modules/@groove-dev/gui/src/components/marketplace/repo-card.jsx +64 -0
- package/node_modules/@groove-dev/gui/src/components/marketplace/repo-import.jsx +363 -0
- package/node_modules/@groove-dev/gui/src/components/marketplace/repo-nuke-dialog.jsx +68 -0
- package/node_modules/@groove-dev/gui/src/components/pro/pro-gate.jsx +22 -0
- package/node_modules/@groove-dev/gui/src/components/pro/upgrade-card.jsx +48 -0
- package/node_modules/@groove-dev/gui/src/components/settings/quick-connect.jsx +129 -0
- package/node_modules/@groove-dev/gui/src/components/settings/remote-server-card.jsx +243 -0
- package/node_modules/@groove-dev/gui/src/components/settings/server-dialog.jsx +192 -0
- package/node_modules/@groove-dev/gui/src/components/ui/approval-modal.jsx +63 -0
- package/node_modules/@groove-dev/gui/src/components/ui/toast.jsx +1 -1
- package/node_modules/@groove-dev/gui/src/lib/edition.js +4 -0
- package/node_modules/@groove-dev/gui/src/lib/electron.js +25 -0
- package/node_modules/@groove-dev/gui/src/lib/status.js +1 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +139 -6
- package/node_modules/@groove-dev/gui/src/views/dashboard.jsx +38 -39
- package/node_modules/@groove-dev/gui/src/views/marketplace.jsx +82 -0
- package/node_modules/@groove-dev/gui/src/views/settings.jsx +66 -0
- package/node_modules/@groove-dev/gui/vite.config.js +3 -0
- package/package.json +7 -2
- package/packages/daemon/src/api.js +460 -25
- package/packages/daemon/src/index.js +7 -0
- package/packages/daemon/src/introducer.js +72 -4
- package/packages/daemon/src/journalist.js +66 -11
- package/packages/daemon/src/process.js +67 -7
- package/packages/daemon/src/registry.js +1 -1
- package/packages/daemon/src/repo-import.js +541 -0
- package/packages/daemon/src/rotator.js +28 -1
- package/packages/daemon/src/supervisor.js +2 -1
- package/packages/daemon/src/tunnel-manager.js +504 -0
- package/packages/daemon/src/validate.js +13 -0
- package/packages/gui/dist/assets/index-BE6lYcd7.css +1 -0
- package/packages/gui/dist/assets/index-zdzOLAZM.js +677 -0
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js +3 -3
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js +2 -2
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js +3 -3
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js +5 -5
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js +3 -3
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js +1 -1
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js +5 -5
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js +3 -3
- package/packages/gui/node_modules/.vite/deps/_metadata.json +53 -53
- package/packages/gui/node_modules/.vite/deps/{chunk-WYSQD5ZG.js → chunk-DH7AESXW.js} +2 -2
- package/packages/gui/node_modules/.vite/deps/{chunk-KXLIKZFX.js → chunk-GFE3G4IN.js} +133 -133
- package/packages/gui/node_modules/.vite/deps/chunk-GFE3G4IN.js.map +7 -0
- package/packages/gui/node_modules/.vite/deps/{chunk-3LBP22MX.js → chunk-LKZVMLRH.js} +6 -6
- package/packages/gui/node_modules/.vite/deps/{chunk-J6DMOQWP.js → chunk-MCVDVNE5.js} +2 -2
- package/packages/gui/node_modules/.vite/deps/{chunk-3Q7HT7ZF.js → chunk-SPKVQGZX.js} +6 -6
- package/packages/gui/src/app.css +14 -0
- package/packages/gui/src/app.jsx +13 -0
- package/packages/gui/src/components/agents/agent-config.jsx +130 -1
- package/packages/gui/src/components/agents/agent-feed.jsx +2 -2
- package/packages/gui/src/components/agents/agent-mdfiles.jsx +43 -1
- package/packages/gui/src/components/agents/spawn-wizard.jsx +141 -1
- package/packages/gui/src/components/dashboard/fleet-panel.jsx +3 -3
- package/packages/gui/src/components/dashboard/intel-panel.jsx +4 -4
- package/packages/gui/src/components/dashboard/routing-chart.jsx +3 -3
- package/packages/gui/src/components/dashboard/team-burn-panel.jsx +1 -1
- package/packages/gui/src/components/layout/activity-bar.jsx +4 -4
- package/packages/gui/src/components/layout/app-shell.jsx +7 -1
- package/packages/gui/src/components/layout/breadcrumb-bar.jsx +26 -8
- package/packages/gui/src/components/layout/command-palette.jsx +14 -4
- package/packages/gui/src/components/layout/status-bar.jsx +46 -11
- package/packages/gui/src/components/marketplace/repo-card.jsx +64 -0
- package/packages/gui/src/components/marketplace/repo-import.jsx +363 -0
- package/packages/gui/src/components/marketplace/repo-nuke-dialog.jsx +68 -0
- package/packages/gui/src/components/pro/pro-gate.jsx +22 -0
- package/packages/gui/src/components/pro/upgrade-card.jsx +48 -0
- package/packages/gui/src/components/settings/quick-connect.jsx +129 -0
- package/packages/gui/src/components/settings/remote-server-card.jsx +243 -0
- package/packages/gui/src/components/settings/server-dialog.jsx +192 -0
- package/packages/gui/src/components/ui/approval-modal.jsx +63 -0
- package/packages/gui/src/components/ui/toast.jsx +1 -1
- package/packages/gui/src/lib/edition.js +4 -0
- package/packages/gui/src/lib/electron.js +25 -0
- package/packages/gui/src/lib/status.js +1 -0
- package/packages/gui/src/stores/groove.js +139 -6
- package/packages/gui/src/views/dashboard.jsx +38 -39
- package/packages/gui/src/views/marketplace.jsx +82 -0
- package/packages/gui/src/views/settings.jsx +66 -0
- package/packages/gui/vite.config.js +3 -0
- package/integrations/FEDERATION_PLAN.md +0 -583
- package/integrations/VOICE_PLAN.md +0 -232
- package/node_modules/@groove-dev/gui/dist/assets/index-CwmR3-HY.css +0 -1
- package/node_modules/@groove-dev/gui/dist/assets/index-DiCjVtQL.js +0 -652
- package/packages/gui/dist/assets/index-CwmR3-HY.css +0 -1
- package/packages/gui/dist/assets/index-DiCjVtQL.js +0 -652
- package/packages/gui/node_modules/.vite/deps/chunk-KXLIKZFX.js.map +0 -7
- package/test-slack.mjs +0 -28
- /package/packages/gui/node_modules/.vite/deps/{chunk-WYSQD5ZG.js.map → chunk-DH7AESXW.js.map} +0 -0
- /package/packages/gui/node_modules/.vite/deps/{chunk-3LBP22MX.js.map → chunk-LKZVMLRH.js.map} +0 -0
- /package/packages/gui/node_modules/.vite/deps/{chunk-J6DMOQWP.js.map → chunk-MCVDVNE5.js.map} +0 -0
- /package/packages/gui/node_modules/.vite/deps/{chunk-3Q7HT7ZF.js.map → chunk-SPKVQGZX.js.map} +0 -0
|
@@ -11,6 +11,17 @@ import {
|
|
|
11
11
|
__toESM
|
|
12
12
|
} from "./chunk-PR4QN5HX.js";
|
|
13
13
|
|
|
14
|
+
// ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
15
|
+
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
16
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
17
|
+
return function handleEvent(event) {
|
|
18
|
+
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
19
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
20
|
+
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
// ../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
15
26
|
var React = __toESM(require_react(), 1);
|
|
16
27
|
function setRef(ref, value) {
|
|
@@ -48,45 +59,129 @@ function useComposedRefs(...refs) {
|
|
|
48
59
|
return React.useCallback(composeRefs(...refs), refs);
|
|
49
60
|
}
|
|
50
61
|
|
|
51
|
-
// ../../node_modules/@radix-ui/react-
|
|
62
|
+
// ../../node_modules/@radix-ui/react-context/dist/index.mjs
|
|
52
63
|
var React2 = __toESM(require_react(), 1);
|
|
53
64
|
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
65
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
66
|
+
const Context = React2.createContext(defaultContext);
|
|
67
|
+
const Provider = (props) => {
|
|
68
|
+
const { children, ...context } = props;
|
|
69
|
+
const value = React2.useMemo(() => context, Object.values(context));
|
|
70
|
+
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
|
71
|
+
};
|
|
72
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
73
|
+
function useContext2(consumerName) {
|
|
74
|
+
const context = React2.useContext(Context);
|
|
75
|
+
if (context) return context;
|
|
76
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
77
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
78
|
+
}
|
|
79
|
+
return [Provider, useContext2];
|
|
80
|
+
}
|
|
81
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
82
|
+
let defaultContexts = [];
|
|
83
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
84
|
+
const BaseContext = React2.createContext(defaultContext);
|
|
85
|
+
const index = defaultContexts.length;
|
|
86
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
87
|
+
const Provider = (props) => {
|
|
88
|
+
var _a;
|
|
89
|
+
const { scope, children, ...context } = props;
|
|
90
|
+
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
91
|
+
const value = React2.useMemo(() => context, Object.values(context));
|
|
92
|
+
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
|
93
|
+
};
|
|
94
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
95
|
+
function useContext2(consumerName, scope) {
|
|
96
|
+
var _a;
|
|
97
|
+
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
98
|
+
const context = React2.useContext(Context);
|
|
99
|
+
if (context) return context;
|
|
100
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
101
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
102
|
+
}
|
|
103
|
+
return [Provider, useContext2];
|
|
104
|
+
}
|
|
105
|
+
const createScope = () => {
|
|
106
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
107
|
+
return React2.createContext(defaultContext);
|
|
108
|
+
});
|
|
109
|
+
return function useScope(scope) {
|
|
110
|
+
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
111
|
+
return React2.useMemo(
|
|
112
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
113
|
+
[scope, contexts]
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
createScope.scopeName = scopeName;
|
|
118
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
119
|
+
}
|
|
120
|
+
function composeContextScopes(...scopes) {
|
|
121
|
+
const baseScope = scopes[0];
|
|
122
|
+
if (scopes.length === 1) return baseScope;
|
|
123
|
+
const createScope = () => {
|
|
124
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
125
|
+
useScope: createScope2(),
|
|
126
|
+
scopeName: createScope2.scopeName
|
|
127
|
+
}));
|
|
128
|
+
return function useComposedScopes(overrideScopes) {
|
|
129
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
130
|
+
const scopeProps = useScope(overrideScopes);
|
|
131
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
132
|
+
return { ...nextScopes2, ...currentScope };
|
|
133
|
+
}, {});
|
|
134
|
+
return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
createScope.scopeName = baseScope.scopeName;
|
|
138
|
+
return createScope;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// ../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
142
|
+
var React3 = __toESM(require_react(), 1);
|
|
143
|
+
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React3.useLayoutEffect : () => {
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
// ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
147
|
+
var React4 = __toESM(require_react(), 1);
|
|
148
|
+
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
54
149
|
function createSlot(ownerName) {
|
|
55
150
|
const SlotClone = createSlotClone(ownerName);
|
|
56
|
-
const Slot2 =
|
|
151
|
+
const Slot2 = React4.forwardRef((props, forwardedRef) => {
|
|
57
152
|
const { children, ...slotProps } = props;
|
|
58
|
-
const childrenArray =
|
|
153
|
+
const childrenArray = React4.Children.toArray(children);
|
|
59
154
|
const slottable = childrenArray.find(isSlottable);
|
|
60
155
|
if (slottable) {
|
|
61
156
|
const newElement = slottable.props.children;
|
|
62
157
|
const newChildren = childrenArray.map((child) => {
|
|
63
158
|
if (child === slottable) {
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
159
|
+
if (React4.Children.count(newElement) > 1) return React4.Children.only(null);
|
|
160
|
+
return React4.isValidElement(newElement) ? newElement.props.children : null;
|
|
66
161
|
} else {
|
|
67
162
|
return child;
|
|
68
163
|
}
|
|
69
164
|
});
|
|
70
|
-
return (0,
|
|
165
|
+
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React4.isValidElement(newElement) ? React4.cloneElement(newElement, void 0, newChildren) : null });
|
|
71
166
|
}
|
|
72
|
-
return (0,
|
|
167
|
+
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
73
168
|
});
|
|
74
169
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
75
170
|
return Slot2;
|
|
76
171
|
}
|
|
77
172
|
var Slot = createSlot("Slot");
|
|
78
173
|
function createSlotClone(ownerName) {
|
|
79
|
-
const SlotClone =
|
|
174
|
+
const SlotClone = React4.forwardRef((props, forwardedRef) => {
|
|
80
175
|
const { children, ...slotProps } = props;
|
|
81
|
-
if (
|
|
176
|
+
if (React4.isValidElement(children)) {
|
|
82
177
|
const childrenRef = getElementRef(children);
|
|
83
178
|
const props2 = mergeProps(slotProps, children.props);
|
|
84
|
-
if (children.type !==
|
|
179
|
+
if (children.type !== React4.Fragment) {
|
|
85
180
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
86
181
|
}
|
|
87
|
-
return
|
|
182
|
+
return React4.cloneElement(children, props2);
|
|
88
183
|
}
|
|
89
|
-
return
|
|
184
|
+
return React4.Children.count(children) > 1 ? React4.Children.only(null) : null;
|
|
90
185
|
});
|
|
91
186
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
92
187
|
return SlotClone;
|
|
@@ -94,7 +189,7 @@ function createSlotClone(ownerName) {
|
|
|
94
189
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
95
190
|
function createSlottable(ownerName) {
|
|
96
191
|
const Slottable2 = ({ children }) => {
|
|
97
|
-
return (0,
|
|
192
|
+
return (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
|
|
98
193
|
};
|
|
99
194
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
100
195
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -102,7 +197,7 @@ function createSlottable(ownerName) {
|
|
|
102
197
|
}
|
|
103
198
|
var Slottable = createSlottable("Slottable");
|
|
104
199
|
function isSlottable(child) {
|
|
105
|
-
return
|
|
200
|
+
return React4.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
106
201
|
}
|
|
107
202
|
function mergeProps(slotProps, childProps) {
|
|
108
203
|
const overrideProps = { ...childProps };
|
|
@@ -144,9 +239,9 @@ function getElementRef(element) {
|
|
|
144
239
|
}
|
|
145
240
|
|
|
146
241
|
// ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
147
|
-
var
|
|
242
|
+
var React5 = __toESM(require_react(), 1);
|
|
148
243
|
var ReactDOM = __toESM(require_react_dom(), 1);
|
|
149
|
-
var
|
|
244
|
+
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
150
245
|
var NODES = [
|
|
151
246
|
"a",
|
|
152
247
|
"button",
|
|
@@ -168,13 +263,13 @@ var NODES = [
|
|
|
168
263
|
];
|
|
169
264
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
170
265
|
const Slot2 = createSlot(`Primitive.${node}`);
|
|
171
|
-
const Node =
|
|
266
|
+
const Node = React5.forwardRef((props, forwardedRef) => {
|
|
172
267
|
const { asChild, ...primitiveProps } = props;
|
|
173
268
|
const Comp = asChild ? Slot2 : node;
|
|
174
269
|
if (typeof window !== "undefined") {
|
|
175
270
|
window[Symbol.for("radix-ui")] = true;
|
|
176
271
|
}
|
|
177
|
-
return (0,
|
|
272
|
+
return (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
178
273
|
});
|
|
179
274
|
Node.displayName = `Primitive.${node}`;
|
|
180
275
|
return { ...primitive, [node]: Node };
|
|
@@ -183,16 +278,24 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
183
278
|
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
184
279
|
}
|
|
185
280
|
|
|
186
|
-
// ../../node_modules/@radix-ui/react-use-
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
281
|
+
// ../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
282
|
+
var React6 = __toESM(require_react(), 1);
|
|
283
|
+
function useCallbackRef(callback) {
|
|
284
|
+
const callbackRef = React6.useRef(callback);
|
|
285
|
+
React6.useEffect(() => {
|
|
286
|
+
callbackRef.current = callback;
|
|
287
|
+
});
|
|
288
|
+
return React6.useMemo(() => (...args) => {
|
|
289
|
+
var _a;
|
|
290
|
+
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
291
|
+
}, []);
|
|
292
|
+
}
|
|
190
293
|
|
|
191
294
|
// ../../node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
192
295
|
var React22 = __toESM(require_react(), 1);
|
|
193
|
-
var
|
|
296
|
+
var React7 = __toESM(require_react(), 1);
|
|
194
297
|
function useStateMachine(initialState, machine) {
|
|
195
|
-
return
|
|
298
|
+
return React7.useReducer((state, event) => {
|
|
196
299
|
const nextState = machine[state][event];
|
|
197
300
|
return nextState ?? state;
|
|
198
301
|
}, initialState);
|
|
@@ -315,120 +418,17 @@ function getElementRef2(element) {
|
|
|
315
418
|
return element.props.ref || element.ref;
|
|
316
419
|
}
|
|
317
420
|
|
|
318
|
-
// ../../node_modules/@radix-ui/react-context/dist/index.mjs
|
|
319
|
-
var React6 = __toESM(require_react(), 1);
|
|
320
|
-
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
321
|
-
function createContext2(rootComponentName, defaultContext) {
|
|
322
|
-
const Context = React6.createContext(defaultContext);
|
|
323
|
-
const Provider = (props) => {
|
|
324
|
-
const { children, ...context } = props;
|
|
325
|
-
const value = React6.useMemo(() => context, Object.values(context));
|
|
326
|
-
return (0, import_jsx_runtime3.jsx)(Context.Provider, { value, children });
|
|
327
|
-
};
|
|
328
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
329
|
-
function useContext2(consumerName) {
|
|
330
|
-
const context = React6.useContext(Context);
|
|
331
|
-
if (context) return context;
|
|
332
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
333
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
334
|
-
}
|
|
335
|
-
return [Provider, useContext2];
|
|
336
|
-
}
|
|
337
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
338
|
-
let defaultContexts = [];
|
|
339
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
340
|
-
const BaseContext = React6.createContext(defaultContext);
|
|
341
|
-
const index = defaultContexts.length;
|
|
342
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
343
|
-
const Provider = (props) => {
|
|
344
|
-
var _a;
|
|
345
|
-
const { scope, children, ...context } = props;
|
|
346
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
347
|
-
const value = React6.useMemo(() => context, Object.values(context));
|
|
348
|
-
return (0, import_jsx_runtime3.jsx)(Context.Provider, { value, children });
|
|
349
|
-
};
|
|
350
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
351
|
-
function useContext2(consumerName, scope) {
|
|
352
|
-
var _a;
|
|
353
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
354
|
-
const context = React6.useContext(Context);
|
|
355
|
-
if (context) return context;
|
|
356
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
357
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
358
|
-
}
|
|
359
|
-
return [Provider, useContext2];
|
|
360
|
-
}
|
|
361
|
-
const createScope = () => {
|
|
362
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
363
|
-
return React6.createContext(defaultContext);
|
|
364
|
-
});
|
|
365
|
-
return function useScope(scope) {
|
|
366
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
367
|
-
return React6.useMemo(
|
|
368
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
369
|
-
[scope, contexts]
|
|
370
|
-
);
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
createScope.scopeName = scopeName;
|
|
374
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
375
|
-
}
|
|
376
|
-
function composeContextScopes(...scopes) {
|
|
377
|
-
const baseScope = scopes[0];
|
|
378
|
-
if (scopes.length === 1) return baseScope;
|
|
379
|
-
const createScope = () => {
|
|
380
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
381
|
-
useScope: createScope2(),
|
|
382
|
-
scopeName: createScope2.scopeName
|
|
383
|
-
}));
|
|
384
|
-
return function useComposedScopes(overrideScopes) {
|
|
385
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
386
|
-
const scopeProps = useScope(overrideScopes);
|
|
387
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
388
|
-
return { ...nextScopes2, ...currentScope };
|
|
389
|
-
}, {});
|
|
390
|
-
return React6.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
createScope.scopeName = baseScope.scopeName;
|
|
394
|
-
return createScope;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
// ../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
398
|
-
var React7 = __toESM(require_react(), 1);
|
|
399
|
-
function useCallbackRef(callback) {
|
|
400
|
-
const callbackRef = React7.useRef(callback);
|
|
401
|
-
React7.useEffect(() => {
|
|
402
|
-
callbackRef.current = callback;
|
|
403
|
-
});
|
|
404
|
-
return React7.useMemo(() => (...args) => {
|
|
405
|
-
var _a;
|
|
406
|
-
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
407
|
-
}, []);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
411
|
-
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
412
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
413
|
-
return function handleEvent(event) {
|
|
414
|
-
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
415
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
416
|
-
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
|
|
421
421
|
export {
|
|
422
|
+
composeEventHandlers,
|
|
422
423
|
useComposedRefs,
|
|
424
|
+
createContext2,
|
|
425
|
+
createContextScope,
|
|
426
|
+
useLayoutEffect2,
|
|
423
427
|
createSlot,
|
|
424
428
|
createSlottable,
|
|
425
429
|
Primitive,
|
|
426
430
|
dispatchDiscreteCustomEvent,
|
|
427
|
-
useLayoutEffect2,
|
|
428
|
-
Presence,
|
|
429
|
-
createContext2,
|
|
430
|
-
createContextScope,
|
|
431
431
|
useCallbackRef,
|
|
432
|
-
|
|
432
|
+
Presence
|
|
433
433
|
};
|
|
434
|
-
//# sourceMappingURL=chunk-
|
|
434
|
+
//# sourceMappingURL=chunk-GFE3G4IN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../node_modules/@radix-ui/primitive/src/primitive.tsx", "../../../../../node_modules/@radix-ui/react-compose-refs/src/compose-refs.tsx", "../../../../../node_modules/@radix-ui/react-context/src/create-context.tsx", "../../../../../node_modules/@radix-ui/react-use-layout-effect/src/use-layout-effect.tsx", "../../../../../node_modules/@radix-ui/react-slot/src/slot.tsx", "../../../../../node_modules/@radix-ui/react-primitive/src/primitive.tsx", "../../../../../node_modules/@radix-ui/react-use-callback-ref/src/use-callback-ref.tsx", "../../../../../node_modules/@radix-ui/react-presence/src/presence.tsx", "../../../../../node_modules/@radix-ui/react-presence/src/use-state-machine.tsx"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-restricted-properties */\n\n/* eslint-disable no-restricted-globals */\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n/* eslint-enable no-restricted-globals */\n\nexport function composeEventHandlers<E extends { defaultPrevented: boolean }>(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport function getOwnerWindow(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access window outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument?.defaultView ?? window;\n}\n\nexport function getOwnerDocument(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access document outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument ?? document;\n}\n\n/**\n * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37\n * MIT License, Copyright (c) AriaKit.\n */\nexport function getActiveElement(\n node: Node | null | undefined,\n activeDescendant = false\n): HTMLElement | null {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n // `activeElement` might be an empty object if we're interacting with elements\n // inside of an iframe.\n return null;\n }\n\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n\n if (activeDescendant) {\n const id = activeElement.getAttribute('aria-activedescendant');\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n\n return activeElement as HTMLElement | null;\n}\n\nexport function isFrame(element: Element): element is HTMLIFrameElement {\n return element.tagName === 'IFRAME';\n}\n", "import * as React from 'react';\n\ntype PossibleRef<T> = React.Ref<T> | undefined;\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T) {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == 'function') {\n hasCleanup = true;\n }\n return cleanup;\n });\n\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == 'function') {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport { composeRefs, useComposedRefs };\n", "import * as React from 'react';\n\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n) {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n\n const Provider: React.FC<ContextValueType & { children: React.ReactNode }> = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope<C = any> = { [scopeName: string]: React.Context<C>[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\nfunction createContextScope(scopeName: string, createContextScopeDeps: CreateScope[] = []) {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n ) {\n const BaseContext = React.createContext<ContextValueType | undefined>(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Provider: React.FC<\n ContextValueType & { scope: Scope<ContextValueType>; children: React.ReactNode }\n > = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string, scope: Scope<ContextValueType | undefined>) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n }\n\n /* -----------------------------------------------------------------------------------------------\n * createScope\n * ---------------------------------------------------------------------------------------------*/\n\n const createScope: CreateScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope: Scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n\n createScope.scopeName = scopeName;\n return [createContext, composeContextScopes(createScope, ...createContextScopeDeps)] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/\n\nfunction composeContextScopes(...scopes: CreateScope[]) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n\n const createScope: CreateScope = () => {\n const scopeHooks = scopes.map((createScope) => ({\n useScope: createScope(),\n scopeName: createScope.scopeName,\n }));\n\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {\n // We are calling a hook inside a callback which React warns against to avoid inconsistent\n // renders, however, scoping doesn't have render side effects so we ignore the rule.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes, ...currentScope };\n }, {});\n\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport { createContext, createContextScope };\nexport type { CreateScope, Scope };\n", "import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = globalThis?.document ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n", "import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n", "import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n", "import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useStateMachine } from './use-state-machine';\n\ninterface PresenceProps {\n children: React.ReactElement | ((props: { present: boolean }) => React.ReactElement);\n present: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n\n const child = (\n typeof children === 'function'\n ? children({ present: presence.isPresent })\n : React.Children.only(children)\n ) as React.ReactElement<{ ref?: React.Ref<HTMLElement> }>;\n\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;\n};\n\nPresence.displayName = 'Presence';\n\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/\n\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement>();\n const stylesRef = React.useRef<CSSStyleDeclaration | null>(null);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n });\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n useLayoutEffect(() => {\n if (node) {\n let timeoutId: number;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n // The event.animationName is unescaped for CSS syntax,\n // so we need to escape it to compare with the animationName computed from the style.\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n // With React 18 concurrency this update is applied a frame after the\n // animation ends, creating a flash of visible content. By setting the\n // animation fill mode to \"forwards\", we force the node to keep the\n // styles of the last keyframe, removing the flash.\n //\n // Previously we flushed the update via ReactDom.flushSync, but with\n // exit animations this resulted in the node being removed from the\n // DOM before the synthetic animationEnd event was dispatched, meaning\n // user-provided event handlers would not be called.\n // https://github.com/radix-ui/primitives/pull/1849\n send('ANIMATION_END');\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = 'forwards';\n // Reset the style after the node had time to unmount (for cases\n // where the component chooses not to unmount). Doing this any\n // sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n // still causes a flash.\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === 'forwards') {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n };\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }\n }, [node, send]);\n\n return {\n isPresent: ['mounted', 'unmountSuspended'].includes(state),\n ref: React.useCallback((node: HTMLElement) => {\n stylesRef.current = node ? getComputedStyle(node) : null;\n setNode(node);\n }, []),\n };\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getAnimationName(styles: CSSStyleDeclaration | null) {\n return styles?.animationName || 'none';\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement<{ ref?: React.Ref<unknown> }>) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n\n // Not DEV\n return element.props.ref || (element as any).ref;\n}\n\nconst Root = Presence;\n\nexport {\n Presence,\n //\n Root,\n};\nexport type { PresenceProps };\n", "import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// \uD83E\uDD2F https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAGO,IAAM,YAAY,CAAC,EACxB,OAAO,WAAW,eAClB,OAAO,YACP,OAAO,SAAS;AAIX,SAAS,qBACd,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,iEAAuB;AAEvB,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,mDAAkB;IAC3B;EACF;AACF;;;ACtBA,YAAuB;AAQvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;EAClB,WAAW,QAAQ,QAAQ,QAAQ,QAAW;AAC5C,QAAI,UAAU;EAChB;AACF;AAMA,SAAS,eAAkB,MAA8C;AACvE,SAAO,CAAC,SAAS;AACf,QAAI,aAAa;AACjB,UAAM,WAAW,KAAK,IAAI,CAAC,QAAQ;AACjC,YAAM,UAAU,OAAO,KAAK,IAAI;AAChC,UAAI,CAAC,cAAc,OAAO,WAAW,YAAY;AAC/C,qBAAa;MACf;AACA,aAAO;IACT,CAAC;AAMD,QAAI,YAAY;AACd,aAAO,MAAM;AACX,iBAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,gBAAM,UAAU,SAAS,CAAC;AAC1B,cAAI,OAAO,WAAW,YAAY;AAChC,oBAAQ;UACV,OAAO;AACL,mBAAO,KAA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AACX,oBAAY,aAAa,SAAS;AAClC,aAAK,oBAAoB,kBAAkB,oBAAoB;AAC/D,aAAK,oBAAoB,mBAAmB,kBAAkB;AAC9D,aAAK,oBAAoB,gBAAgB,kBAAkB;MAC7D;IACF,OAAO;AAGL,WAAK,eAAe;IACtB;EACF,GAAG,CAAC,MAAM,IAAI,CAAC;AAEf,SAAO;IACL,WAAW,CAAC,WAAW,kBAAkB,EAAE,SAAS,KAAK;IACzD,KAAW,oBAAY,CAACC,UAAsB;AAC5C,gBAAU,UAAUA,QAAO,iBAAiBA,KAAI,IAAI;AACpD,cAAQA,KAAI;IACd,GAAG,CAAC,CAAC;EACP;AACF;AAIA,SAAS,iBAAiB,QAAoC;AAC5D,UAAO,iCAAQ,kBAAiB;AAClC;AAOA,SAASD,eAAc,SAA2D;;AAEhF,MAAI,UAAS,YAAO,yBAAyB,QAAQ,OAAO,KAAK,MAApD,mBAAuD;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;EAC1B;AAGA,YAAS,YAAO,yBAAyB,SAAS,KAAK,MAA9C,mBAAiD;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAO,QAAQ,MAAM;EACvB;AAGA,SAAO,QAAQ,MAAM,OAAQ,QAAgB;AAC/C;",
|
|
6
|
+
"names": ["React", "createContext", "useContext", "createScope", "nextScopes", "React", "useLayoutEffect", "React", "import_jsx_runtime", "Slot", "props", "Slottable", "Fragment", "React", "import_jsx_runtime", "Slot", "React", "React2", "React", "getElementRef", "node"]
|
|
7
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
css,
|
|
3
|
-
cssLanguage
|
|
4
|
-
} from "./chunk-HVFOBSCQ.js";
|
|
5
1
|
import {
|
|
6
2
|
javascript,
|
|
7
3
|
javascriptLanguage,
|
|
8
4
|
jsxLanguage,
|
|
9
5
|
tsxLanguage,
|
|
10
6
|
typescriptLanguage
|
|
11
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SPKVQGZX.js";
|
|
8
|
+
import {
|
|
9
|
+
css,
|
|
10
|
+
cssLanguage
|
|
11
|
+
} from "./chunk-HVFOBSCQ.js";
|
|
12
12
|
import {
|
|
13
13
|
ContextTracker,
|
|
14
14
|
ExternalTokenizer,
|
|
@@ -1112,4 +1112,4 @@ export {
|
|
|
1112
1112
|
html,
|
|
1113
1113
|
autoCloseTags
|
|
1114
1114
|
};
|
|
1115
|
-
//# sourceMappingURL=chunk-
|
|
1115
|
+
//# sourceMappingURL=chunk-LKZVMLRH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useLayoutEffect2
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GFE3G4IN.js";
|
|
4
4
|
import {
|
|
5
5
|
require_react
|
|
6
6
|
} from "./chunk-CDLO3JFW.js";
|
|
@@ -102,4 +102,4 @@ export {
|
|
|
102
102
|
useId,
|
|
103
103
|
useControllableState
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-MCVDVNE5.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
completeFromList,
|
|
3
|
+
ifNotIn,
|
|
4
|
+
snippetCompletion
|
|
5
|
+
} from "./chunk-3IB5EUP7.js";
|
|
1
6
|
import {
|
|
2
7
|
ContextTracker,
|
|
3
8
|
ExternalTokenizer,
|
|
4
9
|
LRParser,
|
|
5
10
|
LocalTokenGroup
|
|
6
11
|
} from "./chunk-44CLUOQE.js";
|
|
7
|
-
import {
|
|
8
|
-
completeFromList,
|
|
9
|
-
ifNotIn,
|
|
10
|
-
snippetCompletion
|
|
11
|
-
} from "./chunk-3IB5EUP7.js";
|
|
12
12
|
import {
|
|
13
13
|
IterMode,
|
|
14
14
|
LRLanguage,
|
|
@@ -698,4 +698,4 @@ export {
|
|
|
698
698
|
autoCloseTags,
|
|
699
699
|
esLint
|
|
700
700
|
};
|
|
701
|
-
//# sourceMappingURL=chunk-
|
|
701
|
+
//# sourceMappingURL=chunk-SPKVQGZX.js.map
|
package/packages/gui/src/app.css
CHANGED
|
@@ -201,6 +201,20 @@ html {
|
|
|
201
201
|
filter: drop-shadow(0 0 4px rgba(97, 175, 239, 0.4));
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
/* ── Electron Desktop App ────────────────────────────────── */
|
|
205
|
+
|
|
206
|
+
.electron-drag {
|
|
207
|
+
-webkit-app-region: drag;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.electron-no-drag-children button,
|
|
211
|
+
.electron-no-drag-children input,
|
|
212
|
+
.electron-no-drag-children a,
|
|
213
|
+
.electron-no-drag-children kbd,
|
|
214
|
+
.electron-no-drag-children select {
|
|
215
|
+
-webkit-app-region: no-drag;
|
|
216
|
+
}
|
|
217
|
+
|
|
204
218
|
/* ── React Flow Overrides ─────────────────────────────────── */
|
|
205
219
|
|
|
206
220
|
/* Suppress node fly-in animation — nodes appear in position instantly */
|
package/packages/gui/src/app.jsx
CHANGED
|
@@ -99,8 +99,21 @@ function LoadingScreen() {
|
|
|
99
99
|
export default function App() {
|
|
100
100
|
const connect = useGrooveStore((s) => s.connect);
|
|
101
101
|
const hydrated = useGrooveStore((s) => s.hydrated);
|
|
102
|
+
const tunneled = useGrooveStore((s) => s.tunneled);
|
|
102
103
|
useEffect(() => { connect(); }, [connect]);
|
|
103
104
|
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const params = new URLSearchParams(window.location.search);
|
|
107
|
+
const instance = params.get('instance');
|
|
108
|
+
if (instance) {
|
|
109
|
+
document.title = `${instance} — Groove`;
|
|
110
|
+
} else if (tunneled) {
|
|
111
|
+
document.title = 'Remote — Groove';
|
|
112
|
+
} else {
|
|
113
|
+
document.title = 'Groove';
|
|
114
|
+
}
|
|
115
|
+
}, [tunneled]);
|
|
116
|
+
|
|
104
117
|
if (!hydrated) return <LoadingScreen />;
|
|
105
118
|
|
|
106
119
|
return (
|