gitxp 0.0.1

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.
Files changed (48) hide show
  1. package/.output/nitro.json +17 -0
  2. package/.output/public/assets/index-BGHvBNtP.js +11 -0
  3. package/.output/public/assets/routes-DuE8S6pX.js +60 -0
  4. package/.output/public/assets/styles-D5xbQNYu.css +1 -0
  5. package/.output/server/_chunks/ssr-renderer.mjs +26 -0
  6. package/.output/server/_libs/@floating-ui/core+[...].mjs +671 -0
  7. package/.output/server/_libs/@floating-ui/dom+[...].mjs +649 -0
  8. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +856 -0
  9. package/.output/server/_libs/@radix-ui/react-arrow+[...].mjs +258 -0
  10. package/.output/server/_libs/@radix-ui/react-dialog+[...].mjs +1862 -0
  11. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +320 -0
  12. package/.output/server/_libs/@radix-ui/react-tooltip+[...].mjs +534 -0
  13. package/.output/server/_libs/@tanstack/db+[...].mjs +14680 -0
  14. package/.output/server/_libs/@tanstack/react-router+[...].mjs +14563 -0
  15. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +126 -0
  16. package/.output/server/_libs/@tanstack/router-core+[...].mjs +3636 -0
  17. package/.output/server/_libs/class-variance-authority+clsx.mjs +69 -0
  18. package/.output/server/_libs/cmdk.mjs +504 -0
  19. package/.output/server/_libs/h3+rou3+srvx.mjs +1361 -0
  20. package/.output/server/_libs/h3-v2.mjs +285 -0
  21. package/.output/server/_libs/lucide-react.mjs +158 -0
  22. package/.output/server/_libs/radix-ui__primitive.mjs +44 -0
  23. package/.output/server/_libs/radix-ui__react-context.mjs +108 -0
  24. package/.output/server/_libs/tailwind-merge.mjs +3380 -0
  25. package/.output/server/_libs/tanstack__history.mjs +384 -0
  26. package/.output/server/_libs/tanstack__query-core.mjs +2225 -0
  27. package/.output/server/_libs/tanstack__react-db.mjs +242 -0
  28. package/.output/server/_libs/tanstack__react-query.mjs +140 -0
  29. package/.output/server/_libs/ufo.mjs +64 -0
  30. package/.output/server/_runtime.mjs +35 -0
  31. package/.output/server/_ssr/empty-plugin-adapters-D9UWiqvJ.mjs +5 -0
  32. package/.output/server/_ssr/events-BNrmOvgU.mjs +13 -0
  33. package/.output/server/_ssr/notifications-DUoENv6E.mjs +514 -0
  34. package/.output/server/_ssr/router-DsUHD4bT.mjs +179 -0
  35. package/.output/server/_ssr/routes-DIFfr242.mjs +982 -0
  36. package/.output/server/_ssr/ssr.mjs +1854 -0
  37. package/.output/server/_ssr/start-5Z2QO8AU.mjs +4 -0
  38. package/.output/server/_tanstack-start-manifest_v-CrD0YpZr.mjs +20 -0
  39. package/.output/server/index.mjs +310 -0
  40. package/.output/server/node_modules/tslib/modules/index.js +70 -0
  41. package/.output/server/node_modules/tslib/modules/package.json +3 -0
  42. package/.output/server/node_modules/tslib/package.json +47 -0
  43. package/.output/server/node_modules/tslib/tslib.js +484 -0
  44. package/.output/server/package.json +9 -0
  45. package/LICENSE +21 -0
  46. package/README.md +325 -0
  47. package/bin/gitxp.js +85 -0
  48. package/package.json +92 -0
@@ -0,0 +1,285 @@
1
+ import { c as NodeResponse, s as NullProtoObj, u as FastURL } from "./h3+rou3+srvx.mjs";
2
+ //#region node_modules/h3-v2/dist/h3-Bz4OPZv_.mjs
3
+ function decodePathname(pathname) {
4
+ return decodeURI(pathname.includes("%25") ? pathname.replace(/%25/g, "%2525") : pathname);
5
+ }
6
+ var kEventNS = "h3.internal.event.";
7
+ var kEventRes = /* @__PURE__ */ Symbol.for(`${kEventNS}res`);
8
+ var kEventResHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.headers`);
9
+ var kEventResErrHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.err.headers`);
10
+ var H3Event = class {
11
+ app;
12
+ req;
13
+ url;
14
+ context;
15
+ static __is_event__ = true;
16
+ constructor(req, context, app) {
17
+ this.context = context || req.context || new NullProtoObj();
18
+ this.req = req;
19
+ this.app = app;
20
+ const _url = req._url;
21
+ const url = _url && _url instanceof URL ? _url : new FastURL(req.url);
22
+ if (url.pathname.includes("%")) url.pathname = decodePathname(url.pathname);
23
+ this.url = url;
24
+ }
25
+ get res() {
26
+ return this[kEventRes] ||= new H3EventResponse();
27
+ }
28
+ get runtime() {
29
+ return this.req.runtime;
30
+ }
31
+ waitUntil(promise) {
32
+ this.req.waitUntil?.(promise);
33
+ }
34
+ toString() {
35
+ return `[${this.req.method}] ${this.req.url}`;
36
+ }
37
+ toJSON() {
38
+ return this.toString();
39
+ }
40
+ get node() {
41
+ return this.req.runtime?.node;
42
+ }
43
+ get headers() {
44
+ return this.req.headers;
45
+ }
46
+ get path() {
47
+ return this.url.pathname + this.url.search;
48
+ }
49
+ get method() {
50
+ return this.req.method;
51
+ }
52
+ };
53
+ var H3EventResponse = class {
54
+ status;
55
+ statusText;
56
+ get headers() {
57
+ return this[kEventResHeaders] ||= new Headers();
58
+ }
59
+ get errHeaders() {
60
+ return this[kEventResErrHeaders] ||= new Headers();
61
+ }
62
+ };
63
+ var DISALLOWED_STATUS_CHARS = /[^\u0009\u0020-\u007E]/g;
64
+ function sanitizeStatusMessage(statusMessage = "") {
65
+ return statusMessage.replace(DISALLOWED_STATUS_CHARS, "");
66
+ }
67
+ function sanitizeStatusCode(statusCode, defaultStatusCode = 200) {
68
+ if (!statusCode) return defaultStatusCode;
69
+ if (typeof statusCode === "string") statusCode = +statusCode;
70
+ if (statusCode < 100 || statusCode > 599) return defaultStatusCode;
71
+ return statusCode;
72
+ }
73
+ var HTTPError = class HTTPError extends Error {
74
+ get name() {
75
+ return "HTTPError";
76
+ }
77
+ status;
78
+ statusText;
79
+ headers;
80
+ cause;
81
+ data;
82
+ body;
83
+ unhandled;
84
+ static isError(input) {
85
+ return input instanceof Error && input?.name === "HTTPError";
86
+ }
87
+ static status(status, statusText, details) {
88
+ return new HTTPError({
89
+ ...details,
90
+ statusText,
91
+ status
92
+ });
93
+ }
94
+ constructor(arg1, arg2) {
95
+ let messageInput;
96
+ let details;
97
+ if (typeof arg1 === "string") {
98
+ messageInput = arg1;
99
+ details = arg2;
100
+ } else details = arg1;
101
+ const status = sanitizeStatusCode(details?.status || details?.statusCode || (details?.cause)?.status || (details?.cause)?.statusCode, 500);
102
+ const statusText = sanitizeStatusMessage(details?.statusText || details?.statusMessage || (details?.cause)?.statusText || (details?.cause)?.statusMessage);
103
+ const message = messageInput || details?.message || (details?.cause)?.message || details?.statusText || details?.statusMessage || [
104
+ "HTTPError",
105
+ status,
106
+ statusText
107
+ ].filter(Boolean).join(" ");
108
+ super(message, { cause: details });
109
+ this.cause = details;
110
+ this.status = status;
111
+ this.statusText = statusText || void 0;
112
+ const rawHeaders = details?.headers || (details?.cause)?.headers;
113
+ this.headers = rawHeaders ? new Headers(rawHeaders) : void 0;
114
+ this.unhandled = details?.unhandled ?? (details?.cause)?.unhandled ?? void 0;
115
+ this.data = details?.data;
116
+ this.body = details?.body;
117
+ }
118
+ get statusCode() {
119
+ return this.status;
120
+ }
121
+ get statusMessage() {
122
+ return this.statusText;
123
+ }
124
+ toJSON() {
125
+ const unhandled = this.unhandled;
126
+ return {
127
+ status: this.status,
128
+ statusText: this.statusText,
129
+ unhandled,
130
+ message: unhandled ? "HTTPError" : this.message,
131
+ data: unhandled ? void 0 : this.data,
132
+ ...unhandled ? void 0 : this.body
133
+ };
134
+ }
135
+ };
136
+ function isJSONSerializable(value, _type) {
137
+ if (value === null || value === void 0) return true;
138
+ if (_type !== "object") return _type === "boolean" || _type === "number" || _type === "string";
139
+ if (typeof value.toJSON === "function") return true;
140
+ if (Array.isArray(value)) return true;
141
+ if (typeof value.pipe === "function" || typeof value.pipeTo === "function") return false;
142
+ if (value instanceof NullProtoObj) return true;
143
+ const proto = Object.getPrototypeOf(value);
144
+ return proto === Object.prototype || proto === null;
145
+ }
146
+ var kNotFound = /* @__PURE__ */ Symbol.for("h3.notFound");
147
+ var kHandled = /* @__PURE__ */ Symbol.for("h3.handled");
148
+ function toResponse(val, event, config = {}) {
149
+ if (typeof val?.then === "function") return (val.catch?.((error) => error) || Promise.resolve(val)).then((resolvedVal) => toResponse(resolvedVal, event, config));
150
+ const response = prepareResponse(val, event, config);
151
+ if (typeof response?.then === "function") return toResponse(response, event, config);
152
+ const { onResponse } = config;
153
+ return onResponse ? Promise.resolve(onResponse(response, event)).then(() => response) : response;
154
+ }
155
+ var HTTPResponse = class {
156
+ #headers;
157
+ #init;
158
+ body;
159
+ constructor(body, init) {
160
+ this.body = body;
161
+ this.#init = init;
162
+ }
163
+ get status() {
164
+ return this.#init?.status || 200;
165
+ }
166
+ get statusText() {
167
+ return this.#init?.statusText || "OK";
168
+ }
169
+ get headers() {
170
+ return this.#headers ||= new Headers(this.#init?.headers);
171
+ }
172
+ };
173
+ function prepareResponse(val, event, config, nested) {
174
+ if (val === kHandled) return new NodeResponse(null);
175
+ if (val === kNotFound) val = new HTTPError({
176
+ status: 404,
177
+ message: `Cannot find any route matching [${event.req.method}] ${event.url}`
178
+ });
179
+ if (val && val instanceof Error) {
180
+ const isHTTPError = HTTPError.isError(val);
181
+ const error = isHTTPError ? val : new HTTPError(val);
182
+ if (!isHTTPError) {
183
+ error.unhandled = true;
184
+ if (val?.stack) error.stack = val.stack;
185
+ }
186
+ if (error.unhandled && !config.silent) console.error(error);
187
+ const { onError } = config;
188
+ const errHeaders = event[kEventRes]?.[kEventResErrHeaders];
189
+ return onError && !nested ? Promise.resolve(onError(error, event)).catch((error) => error).then((newVal) => prepareResponse(newVal ?? val, event, config, true)) : errorResponse(error, config.debug, errHeaders);
190
+ }
191
+ const preparedRes = event[kEventRes];
192
+ const preparedHeaders = preparedRes?.[kEventResHeaders];
193
+ event[kEventRes] = void 0;
194
+ if (!(val instanceof Response)) {
195
+ const res = prepareResponseBody(val, event, config);
196
+ const status = res.status || preparedRes?.status;
197
+ return new NodeResponse(nullBody(event.req.method, status) ? null : res.body, {
198
+ status,
199
+ statusText: res.statusText || preparedRes?.statusText,
200
+ headers: res.headers && preparedHeaders ? mergeHeaders$1(res.headers, preparedHeaders) : res.headers || preparedHeaders
201
+ });
202
+ }
203
+ if (!preparedHeaders || nested || !val.ok) return val;
204
+ try {
205
+ mergeHeaders$1(val.headers, preparedHeaders, val.headers);
206
+ return val;
207
+ } catch {
208
+ return new NodeResponse(nullBody(event.req.method, val.status) ? null : val.body, {
209
+ status: val.status,
210
+ statusText: val.statusText,
211
+ headers: mergeHeaders$1(val.headers, preparedHeaders)
212
+ });
213
+ }
214
+ }
215
+ function mergeHeaders$1(base, overrides, target = new Headers(base)) {
216
+ for (const [name, value] of overrides) if (name === "set-cookie") target.append(name, value);
217
+ else target.set(name, value);
218
+ return target;
219
+ }
220
+ var frozen = (name) => (...args) => {
221
+ throw new Error(`Headers are frozen (${name} ${args.join(", ")})`);
222
+ };
223
+ var FrozenHeaders = class extends Headers {
224
+ set = frozen("set");
225
+ append = frozen("append");
226
+ delete = frozen("delete");
227
+ };
228
+ var emptyHeaders = /* @__PURE__ */ new FrozenHeaders({ "content-length": "0" });
229
+ var jsonHeaders = /* @__PURE__ */ new FrozenHeaders({ "content-type": "application/json;charset=UTF-8" });
230
+ function prepareResponseBody(val, event, config) {
231
+ if (val === null || val === void 0) return {
232
+ body: "",
233
+ headers: emptyHeaders
234
+ };
235
+ const valType = typeof val;
236
+ if (valType === "string") return { body: val };
237
+ if (val instanceof Uint8Array) {
238
+ event.res.headers.set("content-length", val.byteLength.toString());
239
+ return { body: val };
240
+ }
241
+ if (val instanceof HTTPResponse || val?.constructor?.name === "HTTPResponse") return val;
242
+ if (isJSONSerializable(val, valType)) return {
243
+ body: JSON.stringify(val, void 0, config.debug ? 2 : void 0),
244
+ headers: jsonHeaders
245
+ };
246
+ if (valType === "bigint") return {
247
+ body: val.toString(),
248
+ headers: jsonHeaders
249
+ };
250
+ if (val instanceof Blob) {
251
+ const headers = new Headers({
252
+ "content-type": val.type,
253
+ "content-length": val.size.toString()
254
+ });
255
+ let filename = val.name;
256
+ if (filename) {
257
+ filename = encodeURIComponent(filename);
258
+ headers.set("content-disposition", `filename="${filename}"; filename*=UTF-8''${filename}`);
259
+ }
260
+ return {
261
+ body: val.stream(),
262
+ headers
263
+ };
264
+ }
265
+ if (valType === "symbol") return { body: val.toString() };
266
+ if (valType === "function") return { body: `${val.name}()` };
267
+ return { body: val };
268
+ }
269
+ function nullBody(method, status) {
270
+ return method === "HEAD" || status === 100 || status === 101 || status === 102 || status === 204 || status === 205 || status === 304;
271
+ }
272
+ function errorResponse(error, debug, errHeaders) {
273
+ let headers = error.headers ? mergeHeaders$1(jsonHeaders, error.headers) : new Headers(jsonHeaders);
274
+ if (errHeaders) headers = mergeHeaders$1(headers, errHeaders);
275
+ return new NodeResponse(JSON.stringify({
276
+ ...error.toJSON(),
277
+ stack: debug && error.stack ? error.stack.split("\n").map((l) => l.trim()) : void 0
278
+ }, void 0, debug ? 2 : void 0), {
279
+ status: error.status,
280
+ statusText: error.statusText,
281
+ headers
282
+ });
283
+ }
284
+ //#endregion
285
+ export { toResponse as n, H3Event as t };
@@ -0,0 +1,158 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { u as require_react } from "./@floating-ui/react-dom+[...].mjs";
3
+ //#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
4
+ var import_react = /* @__PURE__ */ __toESM(require_react());
5
+ /**
6
+ * @license lucide-react v0.577.0 - ISC
7
+ *
8
+ * This source code is licensed under the ISC license.
9
+ * See the LICENSE file in the root directory of this source tree.
10
+ */
11
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
12
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
13
+ }).join(" ").trim();
14
+ //#endregion
15
+ //#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
16
+ /**
17
+ * @license lucide-react v0.577.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */
22
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
23
+ //#endregion
24
+ //#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
25
+ /**
26
+ * @license lucide-react v0.577.0 - ISC
27
+ *
28
+ * This source code is licensed under the ISC license.
29
+ * See the LICENSE file in the root directory of this source tree.
30
+ */
31
+ var toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
32
+ //#endregion
33
+ //#region node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
34
+ /**
35
+ * @license lucide-react v0.577.0 - ISC
36
+ *
37
+ * This source code is licensed under the ISC license.
38
+ * See the LICENSE file in the root directory of this source tree.
39
+ */
40
+ var toPascalCase = (string) => {
41
+ const camelCase = toCamelCase(string);
42
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
43
+ };
44
+ //#endregion
45
+ //#region node_modules/lucide-react/dist/esm/defaultAttributes.js
46
+ /**
47
+ * @license lucide-react v0.577.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */
52
+ var defaultAttributes = {
53
+ xmlns: "http://www.w3.org/2000/svg",
54
+ width: 24,
55
+ height: 24,
56
+ viewBox: "0 0 24 24",
57
+ fill: "none",
58
+ stroke: "currentColor",
59
+ strokeWidth: 2,
60
+ strokeLinecap: "round",
61
+ strokeLinejoin: "round"
62
+ };
63
+ //#endregion
64
+ //#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
65
+ /**
66
+ * @license lucide-react v0.577.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */
71
+ var hasA11yProp = (props) => {
72
+ for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
73
+ return false;
74
+ };
75
+ //#endregion
76
+ //#region node_modules/lucide-react/dist/esm/Icon.js
77
+ /**
78
+ * @license lucide-react v0.577.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */
83
+ var Icon = (0, import_react.forwardRef)(({ color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => (0, import_react.createElement)("svg", {
84
+ ref,
85
+ ...defaultAttributes,
86
+ width: size,
87
+ height: size,
88
+ stroke: color,
89
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
90
+ className: mergeClasses("lucide", className),
91
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
92
+ ...rest
93
+ }, [...iconNode.map(([tag, attrs]) => (0, import_react.createElement)(tag, attrs)), ...Array.isArray(children) ? children : [children]]));
94
+ //#endregion
95
+ //#region node_modules/lucide-react/dist/esm/createLucideIcon.js
96
+ /**
97
+ * @license lucide-react v0.577.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */
102
+ var createLucideIcon = (iconName, iconNode) => {
103
+ const Component = (0, import_react.forwardRef)(({ className, ...props }, ref) => (0, import_react.createElement)(Icon, {
104
+ ref,
105
+ iconNode,
106
+ className: mergeClasses(`lucide-${toKebabCase(toPascalCase(iconName))}`, `lucide-${iconName}`, className),
107
+ ...props
108
+ }));
109
+ Component.displayName = toPascalCase(iconName);
110
+ return Component;
111
+ };
112
+ /**
113
+ * @license lucide-react v0.577.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */
118
+ var PanelLeft = createLucideIcon("panel-left", [["rect", {
119
+ width: "18",
120
+ height: "18",
121
+ x: "3",
122
+ y: "3",
123
+ rx: "2",
124
+ key: "afitv7"
125
+ }], ["path", {
126
+ d: "M9 3v18",
127
+ key: "fh3hqa"
128
+ }]]);
129
+ /**
130
+ * @license lucide-react v0.577.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */
135
+ var Search = createLucideIcon("search", [["path", {
136
+ d: "m21 21-4.34-4.34",
137
+ key: "14j7rj"
138
+ }], ["circle", {
139
+ cx: "11",
140
+ cy: "11",
141
+ r: "8",
142
+ key: "4ej97u"
143
+ }]]);
144
+ /**
145
+ * @license lucide-react v0.577.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */
150
+ var X = createLucideIcon("x", [["path", {
151
+ d: "M18 6 6 18",
152
+ key: "1bl5f8"
153
+ }], ["path", {
154
+ d: "m6 6 12 12",
155
+ key: "d8bk6v"
156
+ }]]);
157
+ //#endregion
158
+ export { Search as n, PanelLeft as r, X as t };
@@ -0,0 +1,44 @@
1
+ //#region node_modules/@radix-ui/primitive/dist/index.mjs
2
+ var __defProp = Object.defineProperty;
3
+ var __name = (target, value) => __defProp(target, "name", {
4
+ value,
5
+ configurable: true
6
+ });
7
+ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
8
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
9
+ return /* @__PURE__ */ __name(function handleEvent(event) {
10
+ originalEventHandler?.(event);
11
+ if (checkForDefaultPrevented === false || !event || !event.defaultPrevented) return ourEventHandler?.(event);
12
+ }, "handleEvent");
13
+ }
14
+ __name(composeEventHandlers, "composeEventHandlers");
15
+ function getOwnerWindow(element) {
16
+ if (!canUseDOM) throw new Error("Cannot access window outside of the DOM");
17
+ return element?.ownerDocument?.defaultView ?? window;
18
+ }
19
+ __name(getOwnerWindow, "getOwnerWindow");
20
+ function getOwnerDocument(element) {
21
+ if (!canUseDOM) throw new Error("Cannot access document outside of the DOM");
22
+ return element?.ownerDocument ?? document;
23
+ }
24
+ __name(getOwnerDocument, "getOwnerDocument");
25
+ function getActiveElement(node, activeDescendant = false) {
26
+ const { activeElement } = getOwnerDocument(node);
27
+ if (!activeElement?.nodeName) return null;
28
+ if (isFrame(activeElement) && activeElement.contentDocument) return getActiveElement(activeElement.contentDocument.body, activeDescendant);
29
+ if (activeDescendant) {
30
+ const id = activeElement.getAttribute("aria-activedescendant");
31
+ if (id) {
32
+ const element = getOwnerDocument(activeElement).getElementById(id);
33
+ if (element) return element;
34
+ }
35
+ }
36
+ return activeElement;
37
+ }
38
+ __name(getActiveElement, "getActiveElement");
39
+ function isFrame(element) {
40
+ return element.tagName === "IFRAME";
41
+ }
42
+ __name(isFrame, "isFrame");
43
+ //#endregion
44
+ export { composeEventHandlers as t };
@@ -0,0 +1,108 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { u as require_react } from "./@floating-ui/react-dom+[...].mjs";
3
+ import { l as require_jsx_runtime } from "./@radix-ui/react-arrow+[...].mjs";
4
+ //#region node_modules/@radix-ui/react-context/dist/index.mjs
5
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
6
+ var import_jsx_runtime = require_jsx_runtime();
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", {
9
+ value,
10
+ configurable: true
11
+ });
12
+ // @__NO_SIDE_EFFECTS__
13
+ function createContext2(rootComponentName, defaultContext) {
14
+ const Context = import_react.createContext(defaultContext);
15
+ Context.displayName = rootComponentName + "Context";
16
+ const Provider = /* @__PURE__ */ __name((props) => {
17
+ const { children, ...context } = props;
18
+ const value = import_react.useMemo(() => context, Object.values(context));
19
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, {
20
+ value,
21
+ children
22
+ });
23
+ }, "Provider");
24
+ Provider.displayName = rootComponentName + "Provider";
25
+ function useContext2(consumerName, options = {}) {
26
+ const { optional = false } = options;
27
+ const context = import_react.useContext(Context);
28
+ if (context) return context;
29
+ if (defaultContext !== void 0) return defaultContext;
30
+ if (optional) return void 0;
31
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
32
+ }
33
+ __name(useContext2, "useContext");
34
+ return [Provider, useContext2];
35
+ }
36
+ __name(createContext2, "createContext");
37
+ // @__NO_SIDE_EFFECTS__
38
+ function createContextScope(scopeName, createContextScopeDeps = []) {
39
+ let defaultContexts = [];
40
+ function createContext3(rootComponentName, defaultContext) {
41
+ const BaseContext = import_react.createContext(defaultContext);
42
+ BaseContext.displayName = rootComponentName + "Context";
43
+ const index = defaultContexts.length;
44
+ defaultContexts = [...defaultContexts, defaultContext];
45
+ const Provider = /* @__PURE__ */ __name((props) => {
46
+ const { scope, children, ...context } = props;
47
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
48
+ const value = import_react.useMemo(() => context, Object.values(context));
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, {
50
+ value,
51
+ children
52
+ });
53
+ }, "Provider");
54
+ Provider.displayName = rootComponentName + "Provider";
55
+ function useContext2(consumerName, scope, options = {}) {
56
+ const { optional = false } = options;
57
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
58
+ const context = import_react.useContext(Context);
59
+ if (context) return context;
60
+ if (defaultContext !== void 0) return defaultContext;
61
+ if (optional) return void 0;
62
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
63
+ }
64
+ __name(useContext2, "useContext");
65
+ return [Provider, useContext2];
66
+ }
67
+ __name(createContext3, "createContext");
68
+ const createScope = /* @__PURE__ */ __name(() => {
69
+ const scopeContexts = defaultContexts.map((defaultContext) => {
70
+ return import_react.createContext(defaultContext);
71
+ });
72
+ return /* @__PURE__ */ __name(function useScope(scope) {
73
+ const contexts = scope?.[scopeName] || scopeContexts;
74
+ return import_react.useMemo(() => ({ [`__scope${scopeName}`]: {
75
+ ...scope,
76
+ [scopeName]: contexts
77
+ } }), [scope, contexts]);
78
+ }, "useScope");
79
+ }, "createScope");
80
+ createScope.scopeName = scopeName;
81
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
82
+ }
83
+ __name(createContextScope, "createContextScope");
84
+ function composeContextScopes(...scopes) {
85
+ const baseScope = scopes[0];
86
+ if (scopes.length === 1) return baseScope;
87
+ const createScope = /* @__PURE__ */ __name(() => {
88
+ const scopeHooks = scopes.map((createScope2) => ({
89
+ useScope: createScope2(),
90
+ scopeName: createScope2.scopeName
91
+ }));
92
+ return /* @__PURE__ */ __name(function useComposedScopes(overrideScopes) {
93
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
94
+ const currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
95
+ return {
96
+ ...nextScopes2,
97
+ ...currentScope
98
+ };
99
+ }, {});
100
+ return import_react.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
101
+ }, "useComposedScopes");
102
+ }, "createScope");
103
+ createScope.scopeName = baseScope.scopeName;
104
+ return createScope;
105
+ }
106
+ __name(composeContextScopes, "composeContextScopes");
107
+ //#endregion
108
+ export { createContextScope as t };