ADAPT-Chase commited on
Commit
a0865b1
·
verified ·
1 Parent(s): 09cdd99

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.d.mts +7 -0
  2. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.d.ts +7 -0
  3. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.js +36 -0
  4. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.js.map +7 -0
  5. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.mjs +13 -0
  6. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -0
  7. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.d.mts +10 -0
  8. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.d.ts +10 -0
  9. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.js +60 -0
  10. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.js.map +7 -0
  11. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.mjs +27 -0
  12. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +7 -0
  13. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +15 -0
  14. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +15 -0
  15. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.js +74 -0
  16. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -0
  17. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +41 -0
  18. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -0
  19. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.d.mts +21 -0
  20. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.d.ts +21 -0
  21. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.js +114 -0
  22. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.js.map +7 -0
  23. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.mjs +81 -0
  24. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -0
  25. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.d.mts +103 -0
  26. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.d.ts +103 -0
  27. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.js +374 -0
  28. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.js.map +7 -0
  29. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.mjs +342 -0
  30. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +7 -0
  31. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +51 -0
  32. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +51 -0
  33. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +253 -0
  34. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +7 -0
  35. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +221 -0
  36. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +7 -0
  37. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +9 -0
  38. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +9 -0
  39. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.js +72 -0
  40. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +7 -0
  41. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +40 -0
  42. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +7 -0
  43. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +32 -0
  44. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +32 -0
  45. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.js +246 -0
  46. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +7 -0
  47. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +214 -0
  48. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +7 -0
  49. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
  50. platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.d.mts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ declare function composeEventHandlers<E extends {
2
+ defaultPrevented: boolean;
3
+ }>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
4
+ checkForDefaultPrevented?: boolean | undefined;
5
+ }): (event: E) => void;
6
+
7
+ export { composeEventHandlers };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.d.ts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ declare function composeEventHandlers<E extends {
2
+ defaultPrevented: boolean;
3
+ }>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
4
+ checkForDefaultPrevented?: boolean | undefined;
5
+ }): (event: E) => void;
6
+
7
+ export { composeEventHandlers };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/core/primitive/src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ composeEventHandlers: () => composeEventHandlers
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // packages/core/primitive/src/primitive.tsx
28
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
29
+ return function handleEvent(event) {
30
+ originalEventHandler?.(event);
31
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
32
+ return ourEventHandler?.(event);
33
+ }
34
+ };
35
+ }
36
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/primitive.tsx"],
4
+ "sourcesContent": ["export { composeEventHandlers } from './primitive';\n", "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 { composeEventHandlers };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,qBACP,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.mjs ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // packages/core/primitive/src/primitive.tsx
2
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
3
+ return function handleEvent(event) {
4
+ originalEventHandler?.(event);
5
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
6
+ return ourEventHandler?.(event);
7
+ }
8
+ };
9
+ }
10
+ export {
11
+ composeEventHandlers
12
+ };
13
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/primitive/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/primitive.tsx"],
4
+ "sourcesContent": ["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 { composeEventHandlers };\n"],
5
+ "mappings": ";AAAA,SAAS,qBACP,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.d.mts ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+ import { Primitive } from '@radix-ui/react-primitive';
3
+
4
+ type PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;
5
+ interface ArrowProps extends PrimitiveSvgProps {
6
+ }
7
+ declare const Arrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
8
+ declare const Root: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
9
+
10
+ export { Arrow, type ArrowProps, Root };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.d.ts ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+ import { Primitive } from '@radix-ui/react-primitive';
3
+
4
+ type PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;
5
+ interface ArrowProps extends PrimitiveSvgProps {
6
+ }
7
+ declare const Arrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
8
+ declare const Root: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
9
+
10
+ export { Arrow, type ArrowProps, Root };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.js ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Arrow: () => Arrow,
34
+ Root: () => Root
35
+ });
36
+ module.exports = __toCommonJS(index_exports);
37
+
38
+ // src/arrow.tsx
39
+ var React = __toESM(require("react"));
40
+ var import_react_primitive = require("@radix-ui/react-primitive");
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var NAME = "Arrow";
43
+ var Arrow = React.forwardRef((props, forwardedRef) => {
44
+ const { children, width = 10, height = 5, ...arrowProps } = props;
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ import_react_primitive.Primitive.svg,
47
+ {
48
+ ...arrowProps,
49
+ ref: forwardedRef,
50
+ width,
51
+ height,
52
+ viewBox: "0 0 30 10",
53
+ preserveAspectRatio: "none",
54
+ children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "0,0 30,0 15,10" })
55
+ }
56
+ );
57
+ });
58
+ Arrow.displayName = NAME;
59
+ var Root = Arrow;
60
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/arrow.tsx"],
4
+ "sourcesContent": ["export {\n Arrow,\n //\n Root,\n} from './arrow';\nexport type { ArrowProps } from './arrow';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,4CAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.mjs ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/arrow.tsx
2
+ import * as React from "react";
3
+ import { Primitive } from "@radix-ui/react-primitive";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var NAME = "Arrow";
6
+ var Arrow = React.forwardRef((props, forwardedRef) => {
7
+ const { children, width = 10, height = 5, ...arrowProps } = props;
8
+ return /* @__PURE__ */ jsx(
9
+ Primitive.svg,
10
+ {
11
+ ...arrowProps,
12
+ ref: forwardedRef,
13
+ width,
14
+ height,
15
+ viewBox: "0 0 30 10",
16
+ preserveAspectRatio: "none",
17
+ children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" })
18
+ }
19
+ );
20
+ });
21
+ Arrow.displayName = NAME;
22
+ var Root = Arrow;
23
+ export {
24
+ Arrow,
25
+ Root
26
+ };
27
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-arrow/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/arrow.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],
5
+ "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,oBAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+
3
+ type PossibleRef<T> = React.Ref<T> | undefined;
4
+ /**
5
+ * A utility to compose multiple refs together
6
+ * Accepts callback refs and RefObject(s)
7
+ */
8
+ declare function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
9
+ /**
10
+ * A custom hook that composes multiple refs
11
+ * Accepts callback refs and RefObject(s)
12
+ */
13
+ declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
14
+
15
+ export { composeRefs, useComposedRefs };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+
3
+ type PossibleRef<T> = React.Ref<T> | undefined;
4
+ /**
5
+ * A utility to compose multiple refs together
6
+ * Accepts callback refs and RefObject(s)
7
+ */
8
+ declare function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
9
+ /**
10
+ * A custom hook that composes multiple refs
11
+ * Accepts callback refs and RefObject(s)
12
+ */
13
+ declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
14
+
15
+ export { composeRefs, useComposedRefs };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.js ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/react/compose-refs/src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ composeRefs: () => composeRefs,
34
+ useComposedRefs: () => useComposedRefs
35
+ });
36
+ module.exports = __toCommonJS(index_exports);
37
+
38
+ // packages/react/compose-refs/src/compose-refs.tsx
39
+ var React = __toESM(require("react"));
40
+ function setRef(ref, value) {
41
+ if (typeof ref === "function") {
42
+ return ref(value);
43
+ } else if (ref !== null && ref !== void 0) {
44
+ ref.current = value;
45
+ }
46
+ }
47
+ function composeRefs(...refs) {
48
+ return (node) => {
49
+ let hasCleanup = false;
50
+ const cleanups = refs.map((ref) => {
51
+ const cleanup = setRef(ref, node);
52
+ if (!hasCleanup && typeof cleanup == "function") {
53
+ hasCleanup = true;
54
+ }
55
+ return cleanup;
56
+ });
57
+ if (hasCleanup) {
58
+ return () => {
59
+ for (let i = 0; i < cleanups.length; i++) {
60
+ const cleanup = cleanups[i];
61
+ if (typeof cleanup == "function") {
62
+ cleanup();
63
+ } else {
64
+ setRef(refs[i], null);
65
+ }
66
+ }
67
+ };
68
+ }
69
+ };
70
+ }
71
+ function useComposedRefs(...refs) {
72
+ return React.useCallback(composeRefs(...refs), refs);
73
+ }
74
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/compose-refs.tsx"],
4
+ "sourcesContent": ["export { composeRefs, useComposedRefs } from './compose-refs';\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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAQvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB,WAAW,QAAQ,QAAQ,QAAQ,QAAW;AAC5C,QAAI,UAAU;AAAA,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;AAAA,MACf;AACA,aAAO;AAAA,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;AAAA,UACV,OAAO;AACL,mBAAO,KAAK,CAAC,GAAG,IAAI;AAAA,UACtB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAMA,SAAS,mBAAsB,MAA8C;AAE3E,SAAa,kBAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.mjs ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // packages/react/compose-refs/src/compose-refs.tsx
2
+ import * as React from "react";
3
+ function setRef(ref, value) {
4
+ if (typeof ref === "function") {
5
+ return ref(value);
6
+ } else if (ref !== null && ref !== void 0) {
7
+ ref.current = value;
8
+ }
9
+ }
10
+ function composeRefs(...refs) {
11
+ return (node) => {
12
+ let hasCleanup = false;
13
+ const cleanups = refs.map((ref) => {
14
+ const cleanup = setRef(ref, node);
15
+ if (!hasCleanup && typeof cleanup == "function") {
16
+ hasCleanup = true;
17
+ }
18
+ return cleanup;
19
+ });
20
+ if (hasCleanup) {
21
+ return () => {
22
+ for (let i = 0; i < cleanups.length; i++) {
23
+ const cleanup = cleanups[i];
24
+ if (typeof cleanup == "function") {
25
+ cleanup();
26
+ } else {
27
+ setRef(refs[i], null);
28
+ }
29
+ }
30
+ };
31
+ }
32
+ };
33
+ }
34
+ function useComposedRefs(...refs) {
35
+ return React.useCallback(composeRefs(...refs), refs);
36
+ }
37
+ export {
38
+ composeRefs,
39
+ useComposedRefs
40
+ };
41
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/compose-refs.tsx"],
4
+ "sourcesContent": ["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"],
5
+ "mappings": ";AAAA,YAAY,WAAW;AAQvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB,WAAW,QAAQ,QAAQ,QAAQ,QAAW;AAC5C,QAAI,UAAU;AAAA,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;AAAA,MACf;AACA,aAAO;AAAA,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;AAAA,UACV,OAAO;AACL,mBAAO,KAAK,CAAC,GAAG,IAAI;AAAA,UACtB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAMA,SAAS,mBAAsB,MAA8C;AAE3E,SAAa,kBAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.d.mts ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+
3
+ declare function createContext<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType): readonly [React.FC<ContextValueType & {
4
+ children: React.ReactNode;
5
+ }>, (consumerName: string) => ContextValueType];
6
+ type Scope<C = any> = {
7
+ [scopeName: string]: React.Context<C>[];
8
+ } | undefined;
9
+ type ScopeHook = (scope: Scope) => {
10
+ [__scopeProp: string]: Scope;
11
+ };
12
+ interface CreateScope {
13
+ scopeName: string;
14
+ (): ScopeHook;
15
+ }
16
+ declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC<ContextValueType & {
17
+ scope: Scope<ContextValueType>;
18
+ children: React.ReactNode;
19
+ }>, (consumerName: string, scope: Scope<ContextValueType | undefined>) => ContextValueType], CreateScope];
20
+
21
+ export { type CreateScope, type Scope, createContext, createContextScope };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.d.ts ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+
3
+ declare function createContext<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType): readonly [React.FC<ContextValueType & {
4
+ children: React.ReactNode;
5
+ }>, (consumerName: string) => ContextValueType];
6
+ type Scope<C = any> = {
7
+ [scopeName: string]: React.Context<C>[];
8
+ } | undefined;
9
+ type ScopeHook = (scope: Scope) => {
10
+ [__scopeProp: string]: Scope;
11
+ };
12
+ interface CreateScope {
13
+ scopeName: string;
14
+ (): ScopeHook;
15
+ }
16
+ declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC<ContextValueType & {
17
+ scope: Scope<ContextValueType>;
18
+ children: React.ReactNode;
19
+ }>, (consumerName: string, scope: Scope<ContextValueType | undefined>) => ContextValueType], CreateScope];
20
+
21
+ export { type CreateScope, type Scope, createContext, createContextScope };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.js ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/react/context/src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ createContext: () => createContext2,
34
+ createContextScope: () => createContextScope
35
+ });
36
+ module.exports = __toCommonJS(index_exports);
37
+
38
+ // packages/react/context/src/create-context.tsx
39
+ var React = __toESM(require("react"));
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ function createContext2(rootComponentName, defaultContext) {
42
+ const Context = React.createContext(defaultContext);
43
+ const Provider = (props) => {
44
+ const { children, ...context } = props;
45
+ const value = React.useMemo(() => context, Object.values(context));
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
47
+ };
48
+ Provider.displayName = rootComponentName + "Provider";
49
+ function useContext2(consumerName) {
50
+ const context = React.useContext(Context);
51
+ if (context) return context;
52
+ if (defaultContext !== void 0) return defaultContext;
53
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
54
+ }
55
+ return [Provider, useContext2];
56
+ }
57
+ function createContextScope(scopeName, createContextScopeDeps = []) {
58
+ let defaultContexts = [];
59
+ function createContext3(rootComponentName, defaultContext) {
60
+ const BaseContext = React.createContext(defaultContext);
61
+ const index = defaultContexts.length;
62
+ defaultContexts = [...defaultContexts, defaultContext];
63
+ const Provider = (props) => {
64
+ const { scope, children, ...context } = props;
65
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
66
+ const value = React.useMemo(() => context, Object.values(context));
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
68
+ };
69
+ Provider.displayName = rootComponentName + "Provider";
70
+ function useContext2(consumerName, scope) {
71
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
72
+ const context = React.useContext(Context);
73
+ if (context) return context;
74
+ if (defaultContext !== void 0) return defaultContext;
75
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
76
+ }
77
+ return [Provider, useContext2];
78
+ }
79
+ const createScope = () => {
80
+ const scopeContexts = defaultContexts.map((defaultContext) => {
81
+ return React.createContext(defaultContext);
82
+ });
83
+ return function useScope(scope) {
84
+ const contexts = scope?.[scopeName] || scopeContexts;
85
+ return React.useMemo(
86
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
87
+ [scope, contexts]
88
+ );
89
+ };
90
+ };
91
+ createScope.scopeName = scopeName;
92
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
93
+ }
94
+ function composeContextScopes(...scopes) {
95
+ const baseScope = scopes[0];
96
+ if (scopes.length === 1) return baseScope;
97
+ const createScope = () => {
98
+ const scopeHooks = scopes.map((createScope2) => ({
99
+ useScope: createScope2(),
100
+ scopeName: createScope2.scopeName
101
+ }));
102
+ return function useComposedScopes(overrideScopes) {
103
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
104
+ const scopeProps = useScope(overrideScopes);
105
+ const currentScope = scopeProps[`__scope${scopeName}`];
106
+ return { ...nextScopes2, ...currentScope };
107
+ }, {});
108
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
109
+ };
110
+ };
111
+ createScope.scopeName = baseScope.scopeName;
112
+ return createScope;
113
+ }
114
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/create-context.tsx"],
4
+ "sourcesContent": ["export { createContext, createContextScope } from './create-context';\nexport type { CreateScope, Scope } from './create-context';\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"],
5
+ "mappings": ";;;;;;;;;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Y,UAAU;AAClC,SAAO;AACT;",
6
+ "names": ["createContext", "createContext", "useContext", "createScope", "nextScopes"]
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.mjs ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // packages/react/context/src/create-context.tsx
2
+ import * as React from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function createContext2(rootComponentName, defaultContext) {
5
+ const Context = React.createContext(defaultContext);
6
+ const Provider = (props) => {
7
+ const { children, ...context } = props;
8
+ const value = React.useMemo(() => context, Object.values(context));
9
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
10
+ };
11
+ Provider.displayName = rootComponentName + "Provider";
12
+ function useContext2(consumerName) {
13
+ const context = React.useContext(Context);
14
+ if (context) return context;
15
+ if (defaultContext !== void 0) return defaultContext;
16
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
17
+ }
18
+ return [Provider, useContext2];
19
+ }
20
+ function createContextScope(scopeName, createContextScopeDeps = []) {
21
+ let defaultContexts = [];
22
+ function createContext3(rootComponentName, defaultContext) {
23
+ const BaseContext = React.createContext(defaultContext);
24
+ const index = defaultContexts.length;
25
+ defaultContexts = [...defaultContexts, defaultContext];
26
+ const Provider = (props) => {
27
+ const { scope, children, ...context } = props;
28
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
29
+ const value = React.useMemo(() => context, Object.values(context));
30
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
31
+ };
32
+ Provider.displayName = rootComponentName + "Provider";
33
+ function useContext2(consumerName, scope) {
34
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
35
+ const context = React.useContext(Context);
36
+ if (context) return context;
37
+ if (defaultContext !== void 0) return defaultContext;
38
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
39
+ }
40
+ return [Provider, useContext2];
41
+ }
42
+ const createScope = () => {
43
+ const scopeContexts = defaultContexts.map((defaultContext) => {
44
+ return React.createContext(defaultContext);
45
+ });
46
+ return function useScope(scope) {
47
+ const contexts = scope?.[scopeName] || scopeContexts;
48
+ return React.useMemo(
49
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
50
+ [scope, contexts]
51
+ );
52
+ };
53
+ };
54
+ createScope.scopeName = scopeName;
55
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
56
+ }
57
+ function composeContextScopes(...scopes) {
58
+ const baseScope = scopes[0];
59
+ if (scopes.length === 1) return baseScope;
60
+ const createScope = () => {
61
+ const scopeHooks = scopes.map((createScope2) => ({
62
+ useScope: createScope2(),
63
+ scopeName: createScope2.scopeName
64
+ }));
65
+ return function useComposedScopes(overrideScopes) {
66
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
67
+ const scopeProps = useScope(overrideScopes);
68
+ const currentScope = scopeProps[`__scope${scopeName}`];
69
+ return { ...nextScopes2, ...currentScope };
70
+ }, {});
71
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
72
+ };
73
+ };
74
+ createScope.scopeName = baseScope.scopeName;
75
+ return createScope;
76
+ }
77
+ export {
78
+ createContext2 as createContext,
79
+ createContextScope
80
+ };
81
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-context/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/create-context.tsx"],
4
+ "sourcesContent": ["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 };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", "nextScopes"]
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.d.mts ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as _radix_ui_react_context from '@radix-ui/react-context';
2
+ import * as React from 'react';
3
+ import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
4
+ import { FocusScope } from '@radix-ui/react-focus-scope';
5
+ import { Portal as Portal$1 } from '@radix-ui/react-portal';
6
+ import { Primitive } from '@radix-ui/react-primitive';
7
+
8
+ declare const createDialogScope: _radix_ui_react_context.CreateScope;
9
+ interface DialogProps {
10
+ children?: React.ReactNode;
11
+ open?: boolean;
12
+ defaultOpen?: boolean;
13
+ onOpenChange?(open: boolean): void;
14
+ modal?: boolean;
15
+ }
16
+ declare const Dialog: React.FC<DialogProps>;
17
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
18
+ interface DialogTriggerProps extends PrimitiveButtonProps {
19
+ }
20
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
21
+ type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
22
+ interface DialogPortalProps {
23
+ children?: React.ReactNode;
24
+ /**
25
+ * Specify a container element to portal the content into.
26
+ */
27
+ container?: PortalProps['container'];
28
+ /**
29
+ * Used to force mounting when more control is needed. Useful when
30
+ * controlling animation with React animation libraries.
31
+ */
32
+ forceMount?: true;
33
+ }
34
+ declare const DialogPortal: React.FC<DialogPortalProps>;
35
+ interface DialogOverlayProps extends DialogOverlayImplProps {
36
+ /**
37
+ * Used to force mounting when more control is needed. Useful when
38
+ * controlling animation with React animation libraries.
39
+ */
40
+ forceMount?: true;
41
+ }
42
+ declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
43
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
44
+ interface DialogOverlayImplProps extends PrimitiveDivProps {
45
+ }
46
+ interface DialogContentProps extends DialogContentTypeProps {
47
+ /**
48
+ * Used to force mounting when more control is needed. Useful when
49
+ * controlling animation with React animation libraries.
50
+ */
51
+ forceMount?: true;
52
+ }
53
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
54
+ interface DialogContentTypeProps extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {
55
+ }
56
+ type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
57
+ type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
58
+ interface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {
59
+ /**
60
+ * When `true`, focus cannot escape the `Content` via keyboard,
61
+ * pointer, or a programmatic focus.
62
+ * @defaultValue false
63
+ */
64
+ trapFocus?: FocusScopeProps['trapped'];
65
+ /**
66
+ * Event handler called when auto-focusing on open.
67
+ * Can be prevented.
68
+ */
69
+ onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
70
+ /**
71
+ * Event handler called when auto-focusing on close.
72
+ * Can be prevented.
73
+ */
74
+ onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
75
+ }
76
+ type PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;
77
+ interface DialogTitleProps extends PrimitiveHeading2Props {
78
+ }
79
+ declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
80
+ type PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;
81
+ interface DialogDescriptionProps extends PrimitiveParagraphProps {
82
+ }
83
+ declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
84
+ interface DialogCloseProps extends PrimitiveButtonProps {
85
+ }
86
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
87
+ declare const WarningProvider: React.FC<{
88
+ contentName: string;
89
+ titleName: string;
90
+ docsSlug: string;
91
+ } & {
92
+ children: React.ReactNode;
93
+ }>;
94
+ declare const Root: React.FC<DialogProps>;
95
+ declare const Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
96
+ declare const Portal: React.FC<DialogPortalProps>;
97
+ declare const Overlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
98
+ declare const Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
99
+ declare const Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
100
+ declare const Description: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
101
+ declare const Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
102
+
103
+ export { Close, Content, Description, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Overlay, Portal, Root, Title, Trigger, WarningProvider, createDialogScope };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.d.ts ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as _radix_ui_react_context from '@radix-ui/react-context';
2
+ import * as React from 'react';
3
+ import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
4
+ import { FocusScope } from '@radix-ui/react-focus-scope';
5
+ import { Portal as Portal$1 } from '@radix-ui/react-portal';
6
+ import { Primitive } from '@radix-ui/react-primitive';
7
+
8
+ declare const createDialogScope: _radix_ui_react_context.CreateScope;
9
+ interface DialogProps {
10
+ children?: React.ReactNode;
11
+ open?: boolean;
12
+ defaultOpen?: boolean;
13
+ onOpenChange?(open: boolean): void;
14
+ modal?: boolean;
15
+ }
16
+ declare const Dialog: React.FC<DialogProps>;
17
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
18
+ interface DialogTriggerProps extends PrimitiveButtonProps {
19
+ }
20
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
21
+ type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
22
+ interface DialogPortalProps {
23
+ children?: React.ReactNode;
24
+ /**
25
+ * Specify a container element to portal the content into.
26
+ */
27
+ container?: PortalProps['container'];
28
+ /**
29
+ * Used to force mounting when more control is needed. Useful when
30
+ * controlling animation with React animation libraries.
31
+ */
32
+ forceMount?: true;
33
+ }
34
+ declare const DialogPortal: React.FC<DialogPortalProps>;
35
+ interface DialogOverlayProps extends DialogOverlayImplProps {
36
+ /**
37
+ * Used to force mounting when more control is needed. Useful when
38
+ * controlling animation with React animation libraries.
39
+ */
40
+ forceMount?: true;
41
+ }
42
+ declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
43
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
44
+ interface DialogOverlayImplProps extends PrimitiveDivProps {
45
+ }
46
+ interface DialogContentProps extends DialogContentTypeProps {
47
+ /**
48
+ * Used to force mounting when more control is needed. Useful when
49
+ * controlling animation with React animation libraries.
50
+ */
51
+ forceMount?: true;
52
+ }
53
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
54
+ interface DialogContentTypeProps extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {
55
+ }
56
+ type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
57
+ type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
58
+ interface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {
59
+ /**
60
+ * When `true`, focus cannot escape the `Content` via keyboard,
61
+ * pointer, or a programmatic focus.
62
+ * @defaultValue false
63
+ */
64
+ trapFocus?: FocusScopeProps['trapped'];
65
+ /**
66
+ * Event handler called when auto-focusing on open.
67
+ * Can be prevented.
68
+ */
69
+ onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
70
+ /**
71
+ * Event handler called when auto-focusing on close.
72
+ * Can be prevented.
73
+ */
74
+ onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
75
+ }
76
+ type PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;
77
+ interface DialogTitleProps extends PrimitiveHeading2Props {
78
+ }
79
+ declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
80
+ type PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;
81
+ interface DialogDescriptionProps extends PrimitiveParagraphProps {
82
+ }
83
+ declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
84
+ interface DialogCloseProps extends PrimitiveButtonProps {
85
+ }
86
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
87
+ declare const WarningProvider: React.FC<{
88
+ contentName: string;
89
+ titleName: string;
90
+ docsSlug: string;
91
+ } & {
92
+ children: React.ReactNode;
93
+ }>;
94
+ declare const Root: React.FC<DialogProps>;
95
+ declare const Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
96
+ declare const Portal: React.FC<DialogPortalProps>;
97
+ declare const Overlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
98
+ declare const Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
99
+ declare const Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
100
+ declare const Description: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
101
+ declare const Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
102
+
103
+ export { Close, Content, Description, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Overlay, Portal, Root, Title, Trigger, WarningProvider, createDialogScope };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.js ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/index.ts
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ Close: () => Close,
35
+ Content: () => Content,
36
+ Description: () => Description,
37
+ Dialog: () => Dialog,
38
+ DialogClose: () => DialogClose,
39
+ DialogContent: () => DialogContent,
40
+ DialogDescription: () => DialogDescription,
41
+ DialogOverlay: () => DialogOverlay,
42
+ DialogPortal: () => DialogPortal,
43
+ DialogTitle: () => DialogTitle,
44
+ DialogTrigger: () => DialogTrigger,
45
+ Overlay: () => Overlay,
46
+ Portal: () => Portal,
47
+ Root: () => Root,
48
+ Title: () => Title,
49
+ Trigger: () => Trigger,
50
+ WarningProvider: () => WarningProvider,
51
+ createDialogScope: () => createDialogScope
52
+ });
53
+ module.exports = __toCommonJS(index_exports);
54
+
55
+ // src/dialog.tsx
56
+ var React = __toESM(require("react"));
57
+ var import_primitive = require("@radix-ui/primitive");
58
+ var import_react_compose_refs = require("@radix-ui/react-compose-refs");
59
+ var import_react_context = require("@radix-ui/react-context");
60
+ var import_react_id = require("@radix-ui/react-id");
61
+ var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state");
62
+ var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer");
63
+ var import_react_focus_scope = require("@radix-ui/react-focus-scope");
64
+ var import_react_portal = require("@radix-ui/react-portal");
65
+ var import_react_presence = require("@radix-ui/react-presence");
66
+ var import_react_primitive = require("@radix-ui/react-primitive");
67
+ var import_react_focus_guards = require("@radix-ui/react-focus-guards");
68
+ var import_react_remove_scroll = require("react-remove-scroll");
69
+ var import_aria_hidden = require("aria-hidden");
70
+ var import_react_slot = require("@radix-ui/react-slot");
71
+ var import_jsx_runtime = require("react/jsx-runtime");
72
+ var DIALOG_NAME = "Dialog";
73
+ var [createDialogContext, createDialogScope] = (0, import_react_context.createContextScope)(DIALOG_NAME);
74
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
75
+ var Dialog = (props) => {
76
+ const {
77
+ __scopeDialog,
78
+ children,
79
+ open: openProp,
80
+ defaultOpen,
81
+ onOpenChange,
82
+ modal = true
83
+ } = props;
84
+ const triggerRef = React.useRef(null);
85
+ const contentRef = React.useRef(null);
86
+ const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({
87
+ prop: openProp,
88
+ defaultProp: defaultOpen ?? false,
89
+ onChange: onOpenChange,
90
+ caller: DIALOG_NAME
91
+ });
92
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ DialogProvider,
94
+ {
95
+ scope: __scopeDialog,
96
+ triggerRef,
97
+ contentRef,
98
+ contentId: (0, import_react_id.useId)(),
99
+ titleId: (0, import_react_id.useId)(),
100
+ descriptionId: (0, import_react_id.useId)(),
101
+ open,
102
+ onOpenChange: setOpen,
103
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
104
+ modal,
105
+ children
106
+ }
107
+ );
108
+ };
109
+ Dialog.displayName = DIALOG_NAME;
110
+ var TRIGGER_NAME = "DialogTrigger";
111
+ var DialogTrigger = React.forwardRef(
112
+ (props, forwardedRef) => {
113
+ const { __scopeDialog, ...triggerProps } = props;
114
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
115
+ const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
116
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
117
+ import_react_primitive.Primitive.button,
118
+ {
119
+ type: "button",
120
+ "aria-haspopup": "dialog",
121
+ "aria-expanded": context.open,
122
+ "aria-controls": context.contentId,
123
+ "data-state": getState(context.open),
124
+ ...triggerProps,
125
+ ref: composedTriggerRef,
126
+ onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle)
127
+ }
128
+ );
129
+ }
130
+ );
131
+ DialogTrigger.displayName = TRIGGER_NAME;
132
+ var PORTAL_NAME = "DialogPortal";
133
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
134
+ forceMount: void 0
135
+ });
136
+ var DialogPortal = (props) => {
137
+ const { __scopeDialog, forceMount, children, container } = props;
138
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
139
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, container, children: child }) })) });
140
+ };
141
+ DialogPortal.displayName = PORTAL_NAME;
142
+ var OVERLAY_NAME = "DialogOverlay";
143
+ var DialogOverlay = React.forwardRef(
144
+ (props, forwardedRef) => {
145
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
146
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
147
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
148
+ return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
149
+ }
150
+ );
151
+ DialogOverlay.displayName = OVERLAY_NAME;
152
+ var Slot = (0, import_react_slot.createSlot)("DialogOverlay.RemoveScroll");
153
+ var DialogOverlayImpl = React.forwardRef(
154
+ (props, forwardedRef) => {
155
+ const { __scopeDialog, ...overlayProps } = props;
156
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
157
+ return (
158
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
159
+ // ie. when `Overlay` and `Content` are siblings
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
+ import_react_primitive.Primitive.div,
162
+ {
163
+ "data-state": getState(context.open),
164
+ ...overlayProps,
165
+ ref: forwardedRef,
166
+ style: { pointerEvents: "auto", ...overlayProps.style }
167
+ }
168
+ ) })
169
+ );
170
+ }
171
+ );
172
+ var CONTENT_NAME = "DialogContent";
173
+ var DialogContent = React.forwardRef(
174
+ (props, forwardedRef) => {
175
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
176
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
177
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
178
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
179
+ }
180
+ );
181
+ DialogContent.displayName = CONTENT_NAME;
182
+ var DialogContentModal = React.forwardRef(
183
+ (props, forwardedRef) => {
184
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
185
+ const contentRef = React.useRef(null);
186
+ const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
187
+ React.useEffect(() => {
188
+ const content = contentRef.current;
189
+ if (content) return (0, import_aria_hidden.hideOthers)(content);
190
+ }, []);
191
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
192
+ DialogContentImpl,
193
+ {
194
+ ...props,
195
+ ref: composedRefs,
196
+ trapFocus: context.open,
197
+ disableOutsidePointerEvents: true,
198
+ onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
199
+ event.preventDefault();
200
+ context.triggerRef.current?.focus();
201
+ }),
202
+ onPointerDownOutside: (0, import_primitive.composeEventHandlers)(props.onPointerDownOutside, (event) => {
203
+ const originalEvent = event.detail.originalEvent;
204
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
205
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
206
+ if (isRightClick) event.preventDefault();
207
+ }),
208
+ onFocusOutside: (0, import_primitive.composeEventHandlers)(
209
+ props.onFocusOutside,
210
+ (event) => event.preventDefault()
211
+ )
212
+ }
213
+ );
214
+ }
215
+ );
216
+ var DialogContentNonModal = React.forwardRef(
217
+ (props, forwardedRef) => {
218
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
219
+ const hasInteractedOutsideRef = React.useRef(false);
220
+ const hasPointerDownOutsideRef = React.useRef(false);
221
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
222
+ DialogContentImpl,
223
+ {
224
+ ...props,
225
+ ref: forwardedRef,
226
+ trapFocus: false,
227
+ disableOutsidePointerEvents: false,
228
+ onCloseAutoFocus: (event) => {
229
+ props.onCloseAutoFocus?.(event);
230
+ if (!event.defaultPrevented) {
231
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
232
+ event.preventDefault();
233
+ }
234
+ hasInteractedOutsideRef.current = false;
235
+ hasPointerDownOutsideRef.current = false;
236
+ },
237
+ onInteractOutside: (event) => {
238
+ props.onInteractOutside?.(event);
239
+ if (!event.defaultPrevented) {
240
+ hasInteractedOutsideRef.current = true;
241
+ if (event.detail.originalEvent.type === "pointerdown") {
242
+ hasPointerDownOutsideRef.current = true;
243
+ }
244
+ }
245
+ const target = event.target;
246
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
247
+ if (targetIsTrigger) event.preventDefault();
248
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
249
+ event.preventDefault();
250
+ }
251
+ }
252
+ }
253
+ );
254
+ }
255
+ );
256
+ var DialogContentImpl = React.forwardRef(
257
+ (props, forwardedRef) => {
258
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
259
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
260
+ const contentRef = React.useRef(null);
261
+ const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef);
262
+ (0, import_react_focus_guards.useFocusGuards)();
263
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
264
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
265
+ import_react_focus_scope.FocusScope,
266
+ {
267
+ asChild: true,
268
+ loop: true,
269
+ trapped: trapFocus,
270
+ onMountAutoFocus: onOpenAutoFocus,
271
+ onUnmountAutoFocus: onCloseAutoFocus,
272
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
273
+ import_react_dismissable_layer.DismissableLayer,
274
+ {
275
+ role: "dialog",
276
+ id: context.contentId,
277
+ "aria-describedby": context.descriptionId,
278
+ "aria-labelledby": context.titleId,
279
+ "data-state": getState(context.open),
280
+ ...contentProps,
281
+ ref: composedRefs,
282
+ onDismiss: () => context.onOpenChange(false)
283
+ }
284
+ )
285
+ }
286
+ ),
287
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
288
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }),
289
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
290
+ ] })
291
+ ] });
292
+ }
293
+ );
294
+ var TITLE_NAME = "DialogTitle";
295
+ var DialogTitle = React.forwardRef(
296
+ (props, forwardedRef) => {
297
+ const { __scopeDialog, ...titleProps } = props;
298
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
299
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
300
+ }
301
+ );
302
+ DialogTitle.displayName = TITLE_NAME;
303
+ var DESCRIPTION_NAME = "DialogDescription";
304
+ var DialogDescription = React.forwardRef(
305
+ (props, forwardedRef) => {
306
+ const { __scopeDialog, ...descriptionProps } = props;
307
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
308
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
309
+ }
310
+ );
311
+ DialogDescription.displayName = DESCRIPTION_NAME;
312
+ var CLOSE_NAME = "DialogClose";
313
+ var DialogClose = React.forwardRef(
314
+ (props, forwardedRef) => {
315
+ const { __scopeDialog, ...closeProps } = props;
316
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
317
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
318
+ import_react_primitive.Primitive.button,
319
+ {
320
+ type: "button",
321
+ ...closeProps,
322
+ ref: forwardedRef,
323
+ onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => context.onOpenChange(false))
324
+ }
325
+ );
326
+ }
327
+ );
328
+ DialogClose.displayName = CLOSE_NAME;
329
+ function getState(open) {
330
+ return open ? "open" : "closed";
331
+ }
332
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
333
+ var [WarningProvider, useWarningContext] = (0, import_react_context.createContext)(TITLE_WARNING_NAME, {
334
+ contentName: CONTENT_NAME,
335
+ titleName: TITLE_NAME,
336
+ docsSlug: "dialog"
337
+ });
338
+ var TitleWarning = ({ titleId }) => {
339
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
340
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
341
+
342
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
343
+
344
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
345
+ React.useEffect(() => {
346
+ if (titleId) {
347
+ const hasTitle = document.getElementById(titleId);
348
+ if (!hasTitle) console.error(MESSAGE);
349
+ }
350
+ }, [MESSAGE, titleId]);
351
+ return null;
352
+ };
353
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
354
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
355
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
356
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
357
+ React.useEffect(() => {
358
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
359
+ if (descriptionId && describedById) {
360
+ const hasDescription = document.getElementById(descriptionId);
361
+ if (!hasDescription) console.warn(MESSAGE);
362
+ }
363
+ }, [MESSAGE, contentRef, descriptionId]);
364
+ return null;
365
+ };
366
+ var Root = Dialog;
367
+ var Trigger = DialogTrigger;
368
+ var Portal = DialogPortal;
369
+ var Overlay = DialogOverlay;
370
+ var Content = DialogContent;
371
+ var Title = DialogTitle;
372
+ var Description = DialogDescription;
373
+ var Close = DialogClose;
374
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/dialog.tsx"],
4
+ "sourcesContent": ["'use client';\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n} from './dialog';\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n} from './dialog';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n {React.Children.map(children, (child) => (\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {child}\n </PortalPrimitive>\n </Presence>\n ))}\n </PortalProvider>\n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef<DialogOverlayElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n <Presence present={forceMount || context.open}>\n <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n </Presence>\n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst Slot = createSlot('DialogOverlay.RemoveScroll');\n\nconst DialogOverlayImpl = React.forwardRef<DialogOverlayImplElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom shards={[context.contentRef]}>\n <Primitive.div\n data-state={getState(context.open)}\n {...overlayProps}\n ref={forwardedRef}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n style={{ pointerEvents: 'auto', ...overlayProps.style }}\n />\n </RemoveScroll>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ComponentRef<typeof DismissableLayer>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ninterface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n role=\"dialog\"\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n />\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ComponentRef<typeof Primitive.h2>;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return <Primitive.h2 id={context.titleId} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ComponentRef<typeof Primitive.p>;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return <Primitive.p id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ComponentRef<typeof Primitive.button>;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<DialogContentElement | null>;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAA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A,EACF,GAAG,CAAC,SAAS,OAAO,CAAC;AAErB,SAAO;AACT;AAEA,IAAM,2BAA2B;AAOjC,IAAM,qBAAwD,CAAC,EAAE,YAAY,cAAc,MAAM;AAC/F,QAAM,4BAA4B,kBAAkB,wBAAwB;AAC5E,QAAM,UAAU,6EAA6E,0BAA0B,WAAW;AAElI,EAAM,gBAAU,MAAM;AACpB,UAAM,gBAAgB,WAAW,SAAS,aAAa,kBAAkB;AAEzE,QAAI,iBAAiB,eAAe;AAClC,YAAM,iBAAiB,SAAS,eAAe,aAAa;AAC5D,UAAI,CAAC,eAAgB,SAAQ,KAAK,OAAO;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,aAAa,CAAC;AAEvC,SAAO;AACT;AAEA,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAM,UAAU;AAChB,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,cAAc;AACpB,IAAM,QAAQ;",
6
+ "names": ["PortalPrimitive"]
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.mjs ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+
3
+ // src/dialog.tsx
4
+ import * as React from "react";
5
+ import { composeEventHandlers } from "@radix-ui/primitive";
6
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
7
+ import { createContext, createContextScope } from "@radix-ui/react-context";
8
+ import { useId } from "@radix-ui/react-id";
9
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
10
+ import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
11
+ import { FocusScope } from "@radix-ui/react-focus-scope";
12
+ import { Portal as PortalPrimitive } from "@radix-ui/react-portal";
13
+ import { Presence } from "@radix-ui/react-presence";
14
+ import { Primitive } from "@radix-ui/react-primitive";
15
+ import { useFocusGuards } from "@radix-ui/react-focus-guards";
16
+ import { RemoveScroll } from "react-remove-scroll";
17
+ import { hideOthers } from "aria-hidden";
18
+ import { createSlot } from "@radix-ui/react-slot";
19
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
20
+ var DIALOG_NAME = "Dialog";
21
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
22
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
23
+ var Dialog = (props) => {
24
+ const {
25
+ __scopeDialog,
26
+ children,
27
+ open: openProp,
28
+ defaultOpen,
29
+ onOpenChange,
30
+ modal = true
31
+ } = props;
32
+ const triggerRef = React.useRef(null);
33
+ const contentRef = React.useRef(null);
34
+ const [open, setOpen] = useControllableState({
35
+ prop: openProp,
36
+ defaultProp: defaultOpen ?? false,
37
+ onChange: onOpenChange,
38
+ caller: DIALOG_NAME
39
+ });
40
+ return /* @__PURE__ */ jsx(
41
+ DialogProvider,
42
+ {
43
+ scope: __scopeDialog,
44
+ triggerRef,
45
+ contentRef,
46
+ contentId: useId(),
47
+ titleId: useId(),
48
+ descriptionId: useId(),
49
+ open,
50
+ onOpenChange: setOpen,
51
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
52
+ modal,
53
+ children
54
+ }
55
+ );
56
+ };
57
+ Dialog.displayName = DIALOG_NAME;
58
+ var TRIGGER_NAME = "DialogTrigger";
59
+ var DialogTrigger = React.forwardRef(
60
+ (props, forwardedRef) => {
61
+ const { __scopeDialog, ...triggerProps } = props;
62
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
63
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
64
+ return /* @__PURE__ */ jsx(
65
+ Primitive.button,
66
+ {
67
+ type: "button",
68
+ "aria-haspopup": "dialog",
69
+ "aria-expanded": context.open,
70
+ "aria-controls": context.contentId,
71
+ "data-state": getState(context.open),
72
+ ...triggerProps,
73
+ ref: composedTriggerRef,
74
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
75
+ }
76
+ );
77
+ }
78
+ );
79
+ DialogTrigger.displayName = TRIGGER_NAME;
80
+ var PORTAL_NAME = "DialogPortal";
81
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
82
+ forceMount: void 0
83
+ });
84
+ var DialogPortal = (props) => {
85
+ const { __scopeDialog, forceMount, children, container } = props;
86
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
87
+ return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });
88
+ };
89
+ DialogPortal.displayName = PORTAL_NAME;
90
+ var OVERLAY_NAME = "DialogOverlay";
91
+ var DialogOverlay = React.forwardRef(
92
+ (props, forwardedRef) => {
93
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
94
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
95
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
96
+ return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
97
+ }
98
+ );
99
+ DialogOverlay.displayName = OVERLAY_NAME;
100
+ var Slot = createSlot("DialogOverlay.RemoveScroll");
101
+ var DialogOverlayImpl = React.forwardRef(
102
+ (props, forwardedRef) => {
103
+ const { __scopeDialog, ...overlayProps } = props;
104
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
105
+ return (
106
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
107
+ // ie. when `Overlay` and `Content` are siblings
108
+ /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
109
+ Primitive.div,
110
+ {
111
+ "data-state": getState(context.open),
112
+ ...overlayProps,
113
+ ref: forwardedRef,
114
+ style: { pointerEvents: "auto", ...overlayProps.style }
115
+ }
116
+ ) })
117
+ );
118
+ }
119
+ );
120
+ var CONTENT_NAME = "DialogContent";
121
+ var DialogContent = React.forwardRef(
122
+ (props, forwardedRef) => {
123
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
124
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
125
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
126
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
127
+ }
128
+ );
129
+ DialogContent.displayName = CONTENT_NAME;
130
+ var DialogContentModal = React.forwardRef(
131
+ (props, forwardedRef) => {
132
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
133
+ const contentRef = React.useRef(null);
134
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
135
+ React.useEffect(() => {
136
+ const content = contentRef.current;
137
+ if (content) return hideOthers(content);
138
+ }, []);
139
+ return /* @__PURE__ */ jsx(
140
+ DialogContentImpl,
141
+ {
142
+ ...props,
143
+ ref: composedRefs,
144
+ trapFocus: context.open,
145
+ disableOutsidePointerEvents: true,
146
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
147
+ event.preventDefault();
148
+ context.triggerRef.current?.focus();
149
+ }),
150
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
151
+ const originalEvent = event.detail.originalEvent;
152
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
153
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
154
+ if (isRightClick) event.preventDefault();
155
+ }),
156
+ onFocusOutside: composeEventHandlers(
157
+ props.onFocusOutside,
158
+ (event) => event.preventDefault()
159
+ )
160
+ }
161
+ );
162
+ }
163
+ );
164
+ var DialogContentNonModal = React.forwardRef(
165
+ (props, forwardedRef) => {
166
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
167
+ const hasInteractedOutsideRef = React.useRef(false);
168
+ const hasPointerDownOutsideRef = React.useRef(false);
169
+ return /* @__PURE__ */ jsx(
170
+ DialogContentImpl,
171
+ {
172
+ ...props,
173
+ ref: forwardedRef,
174
+ trapFocus: false,
175
+ disableOutsidePointerEvents: false,
176
+ onCloseAutoFocus: (event) => {
177
+ props.onCloseAutoFocus?.(event);
178
+ if (!event.defaultPrevented) {
179
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
180
+ event.preventDefault();
181
+ }
182
+ hasInteractedOutsideRef.current = false;
183
+ hasPointerDownOutsideRef.current = false;
184
+ },
185
+ onInteractOutside: (event) => {
186
+ props.onInteractOutside?.(event);
187
+ if (!event.defaultPrevented) {
188
+ hasInteractedOutsideRef.current = true;
189
+ if (event.detail.originalEvent.type === "pointerdown") {
190
+ hasPointerDownOutsideRef.current = true;
191
+ }
192
+ }
193
+ const target = event.target;
194
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
195
+ if (targetIsTrigger) event.preventDefault();
196
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
197
+ event.preventDefault();
198
+ }
199
+ }
200
+ }
201
+ );
202
+ }
203
+ );
204
+ var DialogContentImpl = React.forwardRef(
205
+ (props, forwardedRef) => {
206
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
207
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
208
+ const contentRef = React.useRef(null);
209
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
210
+ useFocusGuards();
211
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
212
+ /* @__PURE__ */ jsx(
213
+ FocusScope,
214
+ {
215
+ asChild: true,
216
+ loop: true,
217
+ trapped: trapFocus,
218
+ onMountAutoFocus: onOpenAutoFocus,
219
+ onUnmountAutoFocus: onCloseAutoFocus,
220
+ children: /* @__PURE__ */ jsx(
221
+ DismissableLayer,
222
+ {
223
+ role: "dialog",
224
+ id: context.contentId,
225
+ "aria-describedby": context.descriptionId,
226
+ "aria-labelledby": context.titleId,
227
+ "data-state": getState(context.open),
228
+ ...contentProps,
229
+ ref: composedRefs,
230
+ onDismiss: () => context.onOpenChange(false)
231
+ }
232
+ )
233
+ }
234
+ ),
235
+ /* @__PURE__ */ jsxs(Fragment, { children: [
236
+ /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
237
+ /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
238
+ ] })
239
+ ] });
240
+ }
241
+ );
242
+ var TITLE_NAME = "DialogTitle";
243
+ var DialogTitle = React.forwardRef(
244
+ (props, forwardedRef) => {
245
+ const { __scopeDialog, ...titleProps } = props;
246
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
247
+ return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
248
+ }
249
+ );
250
+ DialogTitle.displayName = TITLE_NAME;
251
+ var DESCRIPTION_NAME = "DialogDescription";
252
+ var DialogDescription = React.forwardRef(
253
+ (props, forwardedRef) => {
254
+ const { __scopeDialog, ...descriptionProps } = props;
255
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
256
+ return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
257
+ }
258
+ );
259
+ DialogDescription.displayName = DESCRIPTION_NAME;
260
+ var CLOSE_NAME = "DialogClose";
261
+ var DialogClose = React.forwardRef(
262
+ (props, forwardedRef) => {
263
+ const { __scopeDialog, ...closeProps } = props;
264
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
265
+ return /* @__PURE__ */ jsx(
266
+ Primitive.button,
267
+ {
268
+ type: "button",
269
+ ...closeProps,
270
+ ref: forwardedRef,
271
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
272
+ }
273
+ );
274
+ }
275
+ );
276
+ DialogClose.displayName = CLOSE_NAME;
277
+ function getState(open) {
278
+ return open ? "open" : "closed";
279
+ }
280
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
281
+ var [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {
282
+ contentName: CONTENT_NAME,
283
+ titleName: TITLE_NAME,
284
+ docsSlug: "dialog"
285
+ });
286
+ var TitleWarning = ({ titleId }) => {
287
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
288
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
289
+
290
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
291
+
292
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
293
+ React.useEffect(() => {
294
+ if (titleId) {
295
+ const hasTitle = document.getElementById(titleId);
296
+ if (!hasTitle) console.error(MESSAGE);
297
+ }
298
+ }, [MESSAGE, titleId]);
299
+ return null;
300
+ };
301
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
302
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
303
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
304
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
305
+ React.useEffect(() => {
306
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
307
+ if (descriptionId && describedById) {
308
+ const hasDescription = document.getElementById(descriptionId);
309
+ if (!hasDescription) console.warn(MESSAGE);
310
+ }
311
+ }, [MESSAGE, contentRef, descriptionId]);
312
+ return null;
313
+ };
314
+ var Root = Dialog;
315
+ var Trigger = DialogTrigger;
316
+ var Portal = DialogPortal;
317
+ var Overlay = DialogOverlay;
318
+ var Content = DialogContent;
319
+ var Title = DialogTitle;
320
+ var Description = DialogDescription;
321
+ var Close = DialogClose;
322
+ export {
323
+ Close,
324
+ Content,
325
+ Description,
326
+ Dialog,
327
+ DialogClose,
328
+ DialogContent,
329
+ DialogDescription,
330
+ DialogOverlay,
331
+ DialogPortal,
332
+ DialogTitle,
333
+ DialogTrigger,
334
+ Overlay,
335
+ Portal,
336
+ Root,
337
+ Title,
338
+ Trigger,
339
+ WarningProvider,
340
+ createDialogScope
341
+ };
342
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dialog/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/dialog.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n {React.Children.map(children, (child) => (\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {child}\n </PortalPrimitive>\n </Presence>\n ))}\n </PortalProvider>\n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef<DialogOverlayElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n <Presence present={forceMount || context.open}>\n <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n </Presence>\n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst Slot = createSlot('DialogOverlay.RemoveScroll');\n\nconst DialogOverlayImpl = React.forwardRef<DialogOverlayImplElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom shards={[context.contentRef]}>\n <Primitive.div\n data-state={getState(context.open)}\n {...overlayProps}\n ref={forwardedRef}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n style={{ pointerEvents: 'auto', ...overlayProps.style }}\n />\n </RemoveScroll>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ComponentRef<typeof DismissableLayer>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ninterface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n role=\"dialog\"\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n />\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ComponentRef<typeof Primitive.h2>;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return <Primitive.h2 id={context.titleId} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ComponentRef<typeof Primitive.p>;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return <Primitive.p id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ComponentRef<typeof Primitive.button>;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<DialogContentElement | null>;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"],
5
+ "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,eAAe,0BAA0B;AAClD,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,UAAU,uBAAuB;AAC1C,SA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AM,qBAAwD,CAAC,EAAE,YAAY,cAAc,MAAM;AAC/F,QAAM,4BAA4B,kBAAkB,wBAAwB;AAC5E,QAAM,UAAU,6EAA6E,0BAA0B,WAAW;AAElI,EAAM,gBAAU,MAAM;AACpB,UAAM,gBAAgB,WAAW,SAAS,aAAa,kBAAkB;AAEzE,QAAI,iBAAiB,eAAe;AAClC,YAAM,iBAAiB,SAAS,eAAe,aAAa;AAC5D,UAAI,CAAC,eAAgB,SAAQ,KAAK,OAAO;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,aAAa,CAAC;AAEvC,SAAO;AACT;AAEA,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAM,UAAU;AAChB,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,cAAc;AACpB,IAAM,QAAQ;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+ import { Primitive } from '@radix-ui/react-primitive';
3
+
4
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
5
+ interface DismissableLayerProps extends PrimitiveDivProps {
6
+ /**
7
+ * When `true`, hover/focus/click interactions will be disabled on elements outside
8
+ * the `DismissableLayer`. Users will need to click twice on outside elements to
9
+ * interact with them: once to close the `DismissableLayer`, and again to trigger the element.
10
+ */
11
+ disableOutsidePointerEvents?: boolean;
12
+ /**
13
+ * Event handler called when the escape key is down.
14
+ * Can be prevented.
15
+ */
16
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
17
+ /**
18
+ * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
19
+ * Can be prevented.
20
+ */
21
+ onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
22
+ /**
23
+ * Event handler called when the focus moves outside of the `DismissableLayer`.
24
+ * Can be prevented.
25
+ */
26
+ onFocusOutside?: (event: FocusOutsideEvent) => void;
27
+ /**
28
+ * Event handler called when an interaction happens outside the `DismissableLayer`.
29
+ * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.
30
+ * Can be prevented.
31
+ */
32
+ onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
33
+ /**
34
+ * Handler called when the `DismissableLayer` should be dismissed
35
+ */
36
+ onDismiss?: () => void;
37
+ }
38
+ declare const DismissableLayer: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
39
+ interface DismissableLayerBranchProps extends PrimitiveDivProps {
40
+ }
41
+ declare const DismissableLayerBranch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
42
+ type PointerDownOutsideEvent = CustomEvent<{
43
+ originalEvent: PointerEvent;
44
+ }>;
45
+ type FocusOutsideEvent = CustomEvent<{
46
+ originalEvent: FocusEvent;
47
+ }>;
48
+ declare const Root: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
49
+ declare const Branch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
50
+
51
+ export { Branch, DismissableLayer, DismissableLayerBranch, type DismissableLayerProps, Root };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+ import { Primitive } from '@radix-ui/react-primitive';
3
+
4
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
5
+ interface DismissableLayerProps extends PrimitiveDivProps {
6
+ /**
7
+ * When `true`, hover/focus/click interactions will be disabled on elements outside
8
+ * the `DismissableLayer`. Users will need to click twice on outside elements to
9
+ * interact with them: once to close the `DismissableLayer`, and again to trigger the element.
10
+ */
11
+ disableOutsidePointerEvents?: boolean;
12
+ /**
13
+ * Event handler called when the escape key is down.
14
+ * Can be prevented.
15
+ */
16
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
17
+ /**
18
+ * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
19
+ * Can be prevented.
20
+ */
21
+ onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
22
+ /**
23
+ * Event handler called when the focus moves outside of the `DismissableLayer`.
24
+ * Can be prevented.
25
+ */
26
+ onFocusOutside?: (event: FocusOutsideEvent) => void;
27
+ /**
28
+ * Event handler called when an interaction happens outside the `DismissableLayer`.
29
+ * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.
30
+ * Can be prevented.
31
+ */
32
+ onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
33
+ /**
34
+ * Handler called when the `DismissableLayer` should be dismissed
35
+ */
36
+ onDismiss?: () => void;
37
+ }
38
+ declare const DismissableLayer: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
39
+ interface DismissableLayerBranchProps extends PrimitiveDivProps {
40
+ }
41
+ declare const DismissableLayerBranch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
42
+ type PointerDownOutsideEvent = CustomEvent<{
43
+ originalEvent: PointerEvent;
44
+ }>;
45
+ type FocusOutsideEvent = CustomEvent<{
46
+ originalEvent: FocusEvent;
47
+ }>;
48
+ declare const Root: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
49
+ declare const Branch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
50
+
51
+ export { Branch, DismissableLayer, DismissableLayerBranch, type DismissableLayerProps, Root };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.js ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/index.ts
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ Branch: () => Branch,
35
+ DismissableLayer: () => DismissableLayer,
36
+ DismissableLayerBranch: () => DismissableLayerBranch,
37
+ Root: () => Root
38
+ });
39
+ module.exports = __toCommonJS(index_exports);
40
+
41
+ // src/dismissable-layer.tsx
42
+ var React = __toESM(require("react"));
43
+ var import_primitive = require("@radix-ui/primitive");
44
+ var import_react_primitive = require("@radix-ui/react-primitive");
45
+ var import_react_compose_refs = require("@radix-ui/react-compose-refs");
46
+ var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref");
47
+ var import_react_use_escape_keydown = require("@radix-ui/react-use-escape-keydown");
48
+ var import_jsx_runtime = require("react/jsx-runtime");
49
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
50
+ var CONTEXT_UPDATE = "dismissableLayer.update";
51
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
52
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
53
+ var originalBodyPointerEvents;
54
+ var DismissableLayerContext = React.createContext({
55
+ layers: /* @__PURE__ */ new Set(),
56
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
57
+ branches: /* @__PURE__ */ new Set()
58
+ });
59
+ var DismissableLayer = React.forwardRef(
60
+ (props, forwardedRef) => {
61
+ const {
62
+ disableOutsidePointerEvents = false,
63
+ onEscapeKeyDown,
64
+ onPointerDownOutside,
65
+ onFocusOutside,
66
+ onInteractOutside,
67
+ onDismiss,
68
+ ...layerProps
69
+ } = props;
70
+ const context = React.useContext(DismissableLayerContext);
71
+ const [node, setNode] = React.useState(null);
72
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
73
+ const [, force] = React.useState({});
74
+ const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node2) => setNode(node2));
75
+ const layers = Array.from(context.layers);
76
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
77
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
78
+ const index = node ? layers.indexOf(node) : -1;
79
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
80
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
81
+ const pointerDownOutside = usePointerDownOutside((event) => {
82
+ const target = event.target;
83
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
84
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
85
+ onPointerDownOutside?.(event);
86
+ onInteractOutside?.(event);
87
+ if (!event.defaultPrevented) onDismiss?.();
88
+ }, ownerDocument);
89
+ const focusOutside = useFocusOutside((event) => {
90
+ const target = event.target;
91
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
92
+ if (isFocusInBranch) return;
93
+ onFocusOutside?.(event);
94
+ onInteractOutside?.(event);
95
+ if (!event.defaultPrevented) onDismiss?.();
96
+ }, ownerDocument);
97
+ (0, import_react_use_escape_keydown.useEscapeKeydown)((event) => {
98
+ const isHighestLayer = index === context.layers.size - 1;
99
+ if (!isHighestLayer) return;
100
+ onEscapeKeyDown?.(event);
101
+ if (!event.defaultPrevented && onDismiss) {
102
+ event.preventDefault();
103
+ onDismiss();
104
+ }
105
+ }, ownerDocument);
106
+ React.useEffect(() => {
107
+ if (!node) return;
108
+ if (disableOutsidePointerEvents) {
109
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
110
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
111
+ ownerDocument.body.style.pointerEvents = "none";
112
+ }
113
+ context.layersWithOutsidePointerEventsDisabled.add(node);
114
+ }
115
+ context.layers.add(node);
116
+ dispatchUpdate();
117
+ return () => {
118
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
119
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
120
+ }
121
+ };
122
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
123
+ React.useEffect(() => {
124
+ return () => {
125
+ if (!node) return;
126
+ context.layers.delete(node);
127
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
128
+ dispatchUpdate();
129
+ };
130
+ }, [node, context]);
131
+ React.useEffect(() => {
132
+ const handleUpdate = () => force({});
133
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
134
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
135
+ }, []);
136
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
+ import_react_primitive.Primitive.div,
138
+ {
139
+ ...layerProps,
140
+ ref: composedRefs,
141
+ style: {
142
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
143
+ ...props.style
144
+ },
145
+ onFocusCapture: (0, import_primitive.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),
146
+ onBlurCapture: (0, import_primitive.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),
147
+ onPointerDownCapture: (0, import_primitive.composeEventHandlers)(
148
+ props.onPointerDownCapture,
149
+ pointerDownOutside.onPointerDownCapture
150
+ )
151
+ }
152
+ );
153
+ }
154
+ );
155
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
156
+ var BRANCH_NAME = "DismissableLayerBranch";
157
+ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
158
+ const context = React.useContext(DismissableLayerContext);
159
+ const ref = React.useRef(null);
160
+ const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref);
161
+ React.useEffect(() => {
162
+ const node = ref.current;
163
+ if (node) {
164
+ context.branches.add(node);
165
+ return () => {
166
+ context.branches.delete(node);
167
+ };
168
+ }
169
+ }, [context.branches]);
170
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs });
171
+ });
172
+ DismissableLayerBranch.displayName = BRANCH_NAME;
173
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
174
+ const handlePointerDownOutside = (0, import_react_use_callback_ref.useCallbackRef)(onPointerDownOutside);
175
+ const isPointerInsideReactTreeRef = React.useRef(false);
176
+ const handleClickRef = React.useRef(() => {
177
+ });
178
+ React.useEffect(() => {
179
+ const handlePointerDown = (event) => {
180
+ if (event.target && !isPointerInsideReactTreeRef.current) {
181
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
182
+ handleAndDispatchCustomEvent(
183
+ POINTER_DOWN_OUTSIDE,
184
+ handlePointerDownOutside,
185
+ eventDetail,
186
+ { discrete: true }
187
+ );
188
+ };
189
+ var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
190
+ const eventDetail = { originalEvent: event };
191
+ if (event.pointerType === "touch") {
192
+ ownerDocument.removeEventListener("click", handleClickRef.current);
193
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
194
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
195
+ } else {
196
+ handleAndDispatchPointerDownOutsideEvent2();
197
+ }
198
+ } else {
199
+ ownerDocument.removeEventListener("click", handleClickRef.current);
200
+ }
201
+ isPointerInsideReactTreeRef.current = false;
202
+ };
203
+ const timerId = window.setTimeout(() => {
204
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
205
+ }, 0);
206
+ return () => {
207
+ window.clearTimeout(timerId);
208
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
209
+ ownerDocument.removeEventListener("click", handleClickRef.current);
210
+ };
211
+ }, [ownerDocument, handlePointerDownOutside]);
212
+ return {
213
+ // ensures we check React component tree (not just DOM tree)
214
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
215
+ };
216
+ }
217
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
218
+ const handleFocusOutside = (0, import_react_use_callback_ref.useCallbackRef)(onFocusOutside);
219
+ const isFocusInsideReactTreeRef = React.useRef(false);
220
+ React.useEffect(() => {
221
+ const handleFocus = (event) => {
222
+ if (event.target && !isFocusInsideReactTreeRef.current) {
223
+ const eventDetail = { originalEvent: event };
224
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
225
+ discrete: false
226
+ });
227
+ }
228
+ };
229
+ ownerDocument.addEventListener("focusin", handleFocus);
230
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
231
+ }, [ownerDocument, handleFocusOutside]);
232
+ return {
233
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
234
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
235
+ };
236
+ }
237
+ function dispatchUpdate() {
238
+ const event = new CustomEvent(CONTEXT_UPDATE);
239
+ document.dispatchEvent(event);
240
+ }
241
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
242
+ const target = detail.originalEvent.target;
243
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
244
+ if (handler) target.addEventListener(name, handler, { once: true });
245
+ if (discrete) {
246
+ (0, import_react_primitive.dispatchDiscreteCustomEvent)(target, event);
247
+ } else {
248
+ target.dispatchEvent(event);
249
+ }
250
+ }
251
+ var Root = DismissableLayer;
252
+ var Branch = DismissableLayerBranch;
253
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/dismissable-layer.tsx"],
4
+ "sourcesContent": ["'use client';\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n} from './dismissable-layer';\nexport type { DismissableLayerProps } from './dismissable-layer';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useEscapeKeydown } from '@radix-ui/react-use-escape-keydown';\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\n\nconst DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\nconst DismissableLayerContext = React.createContext({\n layers: new Set<DismissableLayerElement>(),\n layersWithOutsidePointerEventsDisabled: new Set<DismissableLayerElement>(),\n branches: new Set<DismissableLayerBranchElement>(),\n});\n\ntype DismissableLayerElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DismissableLayerProps extends PrimitiveDivProps {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside\n * the `DismissableLayer`. Users will need to click twice on outside elements to\n * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean;\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void;\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n /**\n * Handler called when the `DismissableLayer` should be dismissed\n */\n onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef<DismissableLayerElement, DismissableLayerProps>(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState<DismissableLayerElement | null>(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled!); // prettier-ignore\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target as HTMLElement;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n const focusOutside = useFocusOutside((event) => {\n const target = event.target as HTMLElement;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (\n disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1\n ) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n\n return (\n <Primitive.div\n {...layerProps}\n ref={composedRefs}\n style={{\n pointerEvents: isBodyPointerEventsDisabled\n ? isPointerEventsEnabled\n ? 'auto'\n : 'none'\n : undefined,\n ...props.style,\n }}\n onFocusCapture={composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture)}\n onBlurCapture={composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture)}\n onPointerDownCapture={composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )}\n />\n );\n }\n);\n\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\n\nconst BRANCH_NAME = 'DismissableLayerBranch';\n\ntype DismissableLayerBranchElement = React.ComponentRef<typeof Primitive.div>;\ninterface DismissableLayerBranchProps extends PrimitiveDivProps {}\n\nconst DismissableLayerBranch = React.forwardRef<\n DismissableLayerBranchElement,\n DismissableLayerBranchProps\n>((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef<DismissableLayerBranchElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n\n return <Primitive.div {...props} ref={composedRefs} />;\n});\n\nDismissableLayerBranch.displayName = BRANCH_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\n/**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nfunction usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside) as EventListener;\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {});\n\n React.useEffect(() => {\n const handlePointerDown = (event: PointerEvent) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n\n function handleAndDispatchPointerDownOutsideEvent() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */\n if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => (isPointerInsideReactTreeRef.current = true),\n };\n}\n\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handleFocusOutside = useCallbackRef(onFocusOutside) as EventListener;\n const isFocusInsideReactTreeRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleFocus = (event: FocusEvent) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false,\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return () => ownerDocument.removeEventListener('focusin', handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n\n return {\n onFocusCapture: () => (isFocusInsideReactTreeRef.current = true),\n onBlurCapture: () => (isFocusInsideReactTreeRef.current = false),\n };\n}\n\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n\nfunction handleAndDispatchCustomEvent<E extends CustomEvent, OriginalEvent extends Event>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D> ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\n\nconst Root = DismissableLayer;\nconst Branch = DismissableLayerBranch;\n\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n};\nexport type { DismissableLayerProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AAC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AAA,UAC3E,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACF;AACA,kBAAc,iBAAiB,WAAW,WAAW;AACrD,WAAO,MAAM,cAAc,oBAAoB,WAAW,WAAW;AAAA,EACvE,GAAG,CAAC,eAAe,kBAAkB,CAAC;AAEtC,SAAO;AAAA,IACL,gBAAgB,MAAO,0BAA0B,UAAU;AAAA,IAC3D,eAAe,MAAO,0BAA0B,UAAU;AAAA,EAC5D;AACF;AAEA,SAAS,iBAAiB;AACxB,QAAM,QAAQ,IAAI,YAAY,cAAc;AAC5C,WAAS,cAAc,KAAK;AAC9B;AAEA,SAAS,6BACP,MACA,SACA,QACA,EAAE,SAAS,GACX;AACA,QAAM,SAAS,OAAO,cAAc;AACpC,QAAM,QAAQ,IAAI,YAAY,MAAM,EAAE,SAAS,OAAO,YAAY,MAAM,OAAO,CAAC;AAChF,MAAI,QAAS,QAAO,iBAAiB,MAAM,SAA0B,EAAE,MAAM,KAAK,CAAC;AAEnF,MAAI,UAAU;AACZ,4DAA4B,QAAQ,KAAK;AAAA,EAC3C,OAAO;AACL,WAAO,cAAc,KAAK;AAAA,EAC5B;AACF;AAEA,IAAM,OAAO;AACb,IAAM,SAAS;",
6
+ "names": ["node", "handleAndDispatchPointerDownOutsideEvent"]
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+
3
+ // src/dismissable-layer.tsx
4
+ import * as React from "react";
5
+ import { composeEventHandlers } from "@radix-ui/primitive";
6
+ import { Primitive, dispatchDiscreteCustomEvent } from "@radix-ui/react-primitive";
7
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
8
+ import { useCallbackRef } from "@radix-ui/react-use-callback-ref";
9
+ import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
12
+ var CONTEXT_UPDATE = "dismissableLayer.update";
13
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
14
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
15
+ var originalBodyPointerEvents;
16
+ var DismissableLayerContext = React.createContext({
17
+ layers: /* @__PURE__ */ new Set(),
18
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
19
+ branches: /* @__PURE__ */ new Set()
20
+ });
21
+ var DismissableLayer = React.forwardRef(
22
+ (props, forwardedRef) => {
23
+ const {
24
+ disableOutsidePointerEvents = false,
25
+ onEscapeKeyDown,
26
+ onPointerDownOutside,
27
+ onFocusOutside,
28
+ onInteractOutside,
29
+ onDismiss,
30
+ ...layerProps
31
+ } = props;
32
+ const context = React.useContext(DismissableLayerContext);
33
+ const [node, setNode] = React.useState(null);
34
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
35
+ const [, force] = React.useState({});
36
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
37
+ const layers = Array.from(context.layers);
38
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
39
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
40
+ const index = node ? layers.indexOf(node) : -1;
41
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
42
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
43
+ const pointerDownOutside = usePointerDownOutside((event) => {
44
+ const target = event.target;
45
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
46
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
47
+ onPointerDownOutside?.(event);
48
+ onInteractOutside?.(event);
49
+ if (!event.defaultPrevented) onDismiss?.();
50
+ }, ownerDocument);
51
+ const focusOutside = useFocusOutside((event) => {
52
+ const target = event.target;
53
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
54
+ if (isFocusInBranch) return;
55
+ onFocusOutside?.(event);
56
+ onInteractOutside?.(event);
57
+ if (!event.defaultPrevented) onDismiss?.();
58
+ }, ownerDocument);
59
+ useEscapeKeydown((event) => {
60
+ const isHighestLayer = index === context.layers.size - 1;
61
+ if (!isHighestLayer) return;
62
+ onEscapeKeyDown?.(event);
63
+ if (!event.defaultPrevented && onDismiss) {
64
+ event.preventDefault();
65
+ onDismiss();
66
+ }
67
+ }, ownerDocument);
68
+ React.useEffect(() => {
69
+ if (!node) return;
70
+ if (disableOutsidePointerEvents) {
71
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
72
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
73
+ ownerDocument.body.style.pointerEvents = "none";
74
+ }
75
+ context.layersWithOutsidePointerEventsDisabled.add(node);
76
+ }
77
+ context.layers.add(node);
78
+ dispatchUpdate();
79
+ return () => {
80
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
81
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
82
+ }
83
+ };
84
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
85
+ React.useEffect(() => {
86
+ return () => {
87
+ if (!node) return;
88
+ context.layers.delete(node);
89
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
90
+ dispatchUpdate();
91
+ };
92
+ }, [node, context]);
93
+ React.useEffect(() => {
94
+ const handleUpdate = () => force({});
95
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
96
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
97
+ }, []);
98
+ return /* @__PURE__ */ jsx(
99
+ Primitive.div,
100
+ {
101
+ ...layerProps,
102
+ ref: composedRefs,
103
+ style: {
104
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
105
+ ...props.style
106
+ },
107
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
108
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
109
+ onPointerDownCapture: composeEventHandlers(
110
+ props.onPointerDownCapture,
111
+ pointerDownOutside.onPointerDownCapture
112
+ )
113
+ }
114
+ );
115
+ }
116
+ );
117
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
118
+ var BRANCH_NAME = "DismissableLayerBranch";
119
+ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
120
+ const context = React.useContext(DismissableLayerContext);
121
+ const ref = React.useRef(null);
122
+ const composedRefs = useComposedRefs(forwardedRef, ref);
123
+ React.useEffect(() => {
124
+ const node = ref.current;
125
+ if (node) {
126
+ context.branches.add(node);
127
+ return () => {
128
+ context.branches.delete(node);
129
+ };
130
+ }
131
+ }, [context.branches]);
132
+ return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
133
+ });
134
+ DismissableLayerBranch.displayName = BRANCH_NAME;
135
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
136
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
137
+ const isPointerInsideReactTreeRef = React.useRef(false);
138
+ const handleClickRef = React.useRef(() => {
139
+ });
140
+ React.useEffect(() => {
141
+ const handlePointerDown = (event) => {
142
+ if (event.target && !isPointerInsideReactTreeRef.current) {
143
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
144
+ handleAndDispatchCustomEvent(
145
+ POINTER_DOWN_OUTSIDE,
146
+ handlePointerDownOutside,
147
+ eventDetail,
148
+ { discrete: true }
149
+ );
150
+ };
151
+ var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
152
+ const eventDetail = { originalEvent: event };
153
+ if (event.pointerType === "touch") {
154
+ ownerDocument.removeEventListener("click", handleClickRef.current);
155
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
156
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
157
+ } else {
158
+ handleAndDispatchPointerDownOutsideEvent2();
159
+ }
160
+ } else {
161
+ ownerDocument.removeEventListener("click", handleClickRef.current);
162
+ }
163
+ isPointerInsideReactTreeRef.current = false;
164
+ };
165
+ const timerId = window.setTimeout(() => {
166
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
167
+ }, 0);
168
+ return () => {
169
+ window.clearTimeout(timerId);
170
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
171
+ ownerDocument.removeEventListener("click", handleClickRef.current);
172
+ };
173
+ }, [ownerDocument, handlePointerDownOutside]);
174
+ return {
175
+ // ensures we check React component tree (not just DOM tree)
176
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
177
+ };
178
+ }
179
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
180
+ const handleFocusOutside = useCallbackRef(onFocusOutside);
181
+ const isFocusInsideReactTreeRef = React.useRef(false);
182
+ React.useEffect(() => {
183
+ const handleFocus = (event) => {
184
+ if (event.target && !isFocusInsideReactTreeRef.current) {
185
+ const eventDetail = { originalEvent: event };
186
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
187
+ discrete: false
188
+ });
189
+ }
190
+ };
191
+ ownerDocument.addEventListener("focusin", handleFocus);
192
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
193
+ }, [ownerDocument, handleFocusOutside]);
194
+ return {
195
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
196
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
197
+ };
198
+ }
199
+ function dispatchUpdate() {
200
+ const event = new CustomEvent(CONTEXT_UPDATE);
201
+ document.dispatchEvent(event);
202
+ }
203
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
204
+ const target = detail.originalEvent.target;
205
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
206
+ if (handler) target.addEventListener(name, handler, { once: true });
207
+ if (discrete) {
208
+ dispatchDiscreteCustomEvent(target, event);
209
+ } else {
210
+ target.dispatchEvent(event);
211
+ }
212
+ }
213
+ var Root = DismissableLayer;
214
+ var Branch = DismissableLayerBranch;
215
+ export {
216
+ Branch,
217
+ DismissableLayer,
218
+ DismissableLayerBranch,
219
+ Root
220
+ };
221
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/dismissable-layer.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useEscapeKeydown } from '@radix-ui/react-use-escape-keydown';\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\n\nconst DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\nconst DismissableLayerContext = React.createContext({\n layers: new Set<DismissableLayerElement>(),\n layersWithOutsidePointerEventsDisabled: new Set<DismissableLayerElement>(),\n branches: new Set<DismissableLayerBranchElement>(),\n});\n\ntype DismissableLayerElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DismissableLayerProps extends PrimitiveDivProps {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside\n * the `DismissableLayer`. Users will need to click twice on outside elements to\n * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean;\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void;\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n /**\n * Handler called when the `DismissableLayer` should be dismissed\n */\n onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef<DismissableLayerElement, DismissableLayerProps>(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState<DismissableLayerElement | null>(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled!); // prettier-ignore\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target as HTMLElement;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n const focusOutside = useFocusOutside((event) => {\n const target = event.target as HTMLElement;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (\n disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1\n ) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n\n return (\n <Primitive.div\n {...layerProps}\n ref={composedRefs}\n style={{\n pointerEvents: isBodyPointerEventsDisabled\n ? isPointerEventsEnabled\n ? 'auto'\n : 'none'\n : undefined,\n ...props.style,\n }}\n onFocusCapture={composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture)}\n onBlurCapture={composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture)}\n onPointerDownCapture={composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )}\n />\n );\n }\n);\n\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\n\nconst BRANCH_NAME = 'DismissableLayerBranch';\n\ntype DismissableLayerBranchElement = React.ComponentRef<typeof Primitive.div>;\ninterface DismissableLayerBranchProps extends PrimitiveDivProps {}\n\nconst DismissableLayerBranch = React.forwardRef<\n DismissableLayerBranchElement,\n DismissableLayerBranchProps\n>((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef<DismissableLayerBranchElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n\n return <Primitive.div {...props} ref={composedRefs} />;\n});\n\nDismissableLayerBranch.displayName = BRANCH_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\n/**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nfunction usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside) as EventListener;\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {});\n\n React.useEffect(() => {\n const handlePointerDown = (event: PointerEvent) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n\n function handleAndDispatchPointerDownOutsideEvent() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */\n if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => (isPointerInsideReactTreeRef.current = true),\n };\n}\n\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handleFocusOutside = useCallbackRef(onFocusOutside) as EventListener;\n const isFocusInsideReactTreeRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleFocus = (event: FocusEvent) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false,\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return () => ownerDocument.removeEventListener('focusin', handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n\n return {\n onFocusCapture: () => (isFocusInsideReactTreeRef.current = true),\n onBlurCapture: () => (isFocusInsideReactTreeRef.current = false),\n };\n}\n\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n\nfunction handleAndDispatchCustomEvent<E extends CustomEvent, OriginalEvent extends Event>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D> ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\n\nconst Root = DismissableLayer;\nconst Branch = DismissableLayerBranch;\n\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n};\nexport type { DismissableLayerProps };\n"],
5
+ "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,WAAW,mCAAmC;AACvD,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AAqJ3B;AA/IN,IAAM,yBAAyB;AAC/B,IAAM,iBAAiB;AACvB,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB;AAEtB,IAAI;AAEJ,IAAM,0BAAgC,oBAAc;AAAA,EAClD,QAAQ,oBAAI,IAA6B;AAAA,EACzC,wCAAwC,oBAAI,IAA6B;AAAA,EACzE,UAAU,oBAAI,IAAmC;AACnD,CAAC;AAsCD,IAAM,mBAAyB;AAAA,EAC7B,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ,8BAA8B;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,UAAgB,iBAAW,uBAAuB;AACxD,UAAM,CAAC,MAAM,OAAO,IAAU,eAAyC,IAAI;AAC3E,UAAM,gBAAgB,MAAM,iBAAiB,YAAY;AACzD,UAAM,CAAC,EAAE,KAAK,IAAU,eAAS,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AC3C,OAAO;AACL,WAAO,cAAc,KAAK;AAAA,EAC5B;AACF;AAEA,IAAM,OAAO;AACb,IAAM,SAAS;",
6
+ "names": ["node", "handleAndDispatchPointerDownOutsideEvent"]
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ declare function FocusGuards(props: any): any;
2
+ /**
3
+ * Injects a pair of focus guards at the edges of the whole DOM tree
4
+ * to ensure `focusin` & `focusout` events can be caught consistently.
5
+ */
6
+ declare function useFocusGuards(): void;
7
+ declare const Root: typeof FocusGuards;
8
+
9
+ export { FocusGuards, Root, useFocusGuards };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ declare function FocusGuards(props: any): any;
2
+ /**
3
+ * Injects a pair of focus guards at the edges of the whole DOM tree
4
+ * to ensure `focusin` & `focusout` events can be caught consistently.
5
+ */
6
+ declare function useFocusGuards(): void;
7
+ declare const Root: typeof FocusGuards;
8
+
9
+ export { FocusGuards, Root, useFocusGuards };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // packages/react/focus-guards/src/index.ts
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ FocusGuards: () => FocusGuards,
35
+ Root: () => Root,
36
+ useFocusGuards: () => useFocusGuards
37
+ });
38
+ module.exports = __toCommonJS(index_exports);
39
+
40
+ // packages/react/focus-guards/src/focus-guards.tsx
41
+ var React = __toESM(require("react"));
42
+ var count = 0;
43
+ function FocusGuards(props) {
44
+ useFocusGuards();
45
+ return props.children;
46
+ }
47
+ function useFocusGuards() {
48
+ React.useEffect(() => {
49
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
50
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
51
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
52
+ count++;
53
+ return () => {
54
+ if (count === 1) {
55
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
56
+ }
57
+ count--;
58
+ };
59
+ }, []);
60
+ }
61
+ function createFocusGuard() {
62
+ const element = document.createElement("span");
63
+ element.setAttribute("data-radix-focus-guard", "");
64
+ element.tabIndex = 0;
65
+ element.style.outline = "none";
66
+ element.style.opacity = "0";
67
+ element.style.position = "fixed";
68
+ element.style.pointerEvents = "none";
69
+ return element;
70
+ }
71
+ var Root = FocusGuards;
72
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/focus-guards.tsx"],
4
+ "sourcesContent": ["'use client';\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './focus-guards';\n", "import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAGvB,IAAI,QAAQ;AAEZ,SAAS,YAAY,OAAY;AAC/B,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AACxB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;AAEA,IAAM,OAAO;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.mjs ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+
3
+ // packages/react/focus-guards/src/focus-guards.tsx
4
+ import * as React from "react";
5
+ var count = 0;
6
+ function FocusGuards(props) {
7
+ useFocusGuards();
8
+ return props.children;
9
+ }
10
+ function useFocusGuards() {
11
+ React.useEffect(() => {
12
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
13
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
14
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
15
+ count++;
16
+ return () => {
17
+ if (count === 1) {
18
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
19
+ }
20
+ count--;
21
+ };
22
+ }, []);
23
+ }
24
+ function createFocusGuard() {
25
+ const element = document.createElement("span");
26
+ element.setAttribute("data-radix-focus-guard", "");
27
+ element.tabIndex = 0;
28
+ element.style.outline = "none";
29
+ element.style.opacity = "0";
30
+ element.style.position = "fixed";
31
+ element.style.pointerEvents = "none";
32
+ return element;
33
+ }
34
+ var Root = FocusGuards;
35
+ export {
36
+ FocusGuards,
37
+ Root,
38
+ useFocusGuards
39
+ };
40
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/focus-guards.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],
5
+ "mappings": ";;;AAAA,YAAY,WAAW;AAGvB,IAAI,QAAQ;AAEZ,SAAS,YAAY,OAAY;AAC/B,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AACxB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;AAEA,IAAM,OAAO;",
6
+ "names": []
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+ import { Primitive } from '@radix-ui/react-primitive';
3
+
4
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
5
+ interface FocusScopeProps extends PrimitiveDivProps {
6
+ /**
7
+ * When `true`, tabbing from last item will focus first tabbable
8
+ * and shift+tab from first item will focus last tababble.
9
+ * @defaultValue false
10
+ */
11
+ loop?: boolean;
12
+ /**
13
+ * When `true`, focus cannot escape the focus scope via keyboard,
14
+ * pointer, or a programmatic focus.
15
+ * @defaultValue false
16
+ */
17
+ trapped?: boolean;
18
+ /**
19
+ * Event handler called when auto-focusing on mount.
20
+ * Can be prevented.
21
+ */
22
+ onMountAutoFocus?: (event: Event) => void;
23
+ /**
24
+ * Event handler called when auto-focusing on unmount.
25
+ * Can be prevented.
26
+ */
27
+ onUnmountAutoFocus?: (event: Event) => void;
28
+ }
29
+ declare const FocusScope: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
30
+ declare const Root: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
31
+
32
+ export { FocusScope, type FocusScopeProps, Root };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react';
2
+ import { Primitive } from '@radix-ui/react-primitive';
3
+
4
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
5
+ interface FocusScopeProps extends PrimitiveDivProps {
6
+ /**
7
+ * When `true`, tabbing from last item will focus first tabbable
8
+ * and shift+tab from first item will focus last tababble.
9
+ * @defaultValue false
10
+ */
11
+ loop?: boolean;
12
+ /**
13
+ * When `true`, focus cannot escape the focus scope via keyboard,
14
+ * pointer, or a programmatic focus.
15
+ * @defaultValue false
16
+ */
17
+ trapped?: boolean;
18
+ /**
19
+ * Event handler called when auto-focusing on mount.
20
+ * Can be prevented.
21
+ */
22
+ onMountAutoFocus?: (event: Event) => void;
23
+ /**
24
+ * Event handler called when auto-focusing on unmount.
25
+ * Can be prevented.
26
+ */
27
+ onUnmountAutoFocus?: (event: Event) => void;
28
+ }
29
+ declare const FocusScope: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
30
+ declare const Root: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
31
+
32
+ export { FocusScope, type FocusScopeProps, Root };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.js ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/index.ts
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ FocusScope: () => FocusScope,
35
+ Root: () => Root
36
+ });
37
+ module.exports = __toCommonJS(index_exports);
38
+
39
+ // src/focus-scope.tsx
40
+ var React = __toESM(require("react"));
41
+ var import_react_compose_refs = require("@radix-ui/react-compose-refs");
42
+ var import_react_primitive = require("@radix-ui/react-primitive");
43
+ var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref");
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
46
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
47
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
48
+ var FOCUS_SCOPE_NAME = "FocusScope";
49
+ var FocusScope = React.forwardRef((props, forwardedRef) => {
50
+ const {
51
+ loop = false,
52
+ trapped = false,
53
+ onMountAutoFocus: onMountAutoFocusProp,
54
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
55
+ ...scopeProps
56
+ } = props;
57
+ const [container, setContainer] = React.useState(null);
58
+ const onMountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onMountAutoFocusProp);
59
+ const onUnmountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onUnmountAutoFocusProp);
60
+ const lastFocusedElementRef = React.useRef(null);
61
+ const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContainer(node));
62
+ const focusScope = React.useRef({
63
+ paused: false,
64
+ pause() {
65
+ this.paused = true;
66
+ },
67
+ resume() {
68
+ this.paused = false;
69
+ }
70
+ }).current;
71
+ React.useEffect(() => {
72
+ if (trapped) {
73
+ let handleFocusIn2 = function(event) {
74
+ if (focusScope.paused || !container) return;
75
+ const target = event.target;
76
+ if (container.contains(target)) {
77
+ lastFocusedElementRef.current = target;
78
+ } else {
79
+ focus(lastFocusedElementRef.current, { select: true });
80
+ }
81
+ }, handleFocusOut2 = function(event) {
82
+ if (focusScope.paused || !container) return;
83
+ const relatedTarget = event.relatedTarget;
84
+ if (relatedTarget === null) return;
85
+ if (!container.contains(relatedTarget)) {
86
+ focus(lastFocusedElementRef.current, { select: true });
87
+ }
88
+ }, handleMutations2 = function(mutations) {
89
+ const focusedElement = document.activeElement;
90
+ if (focusedElement !== document.body) return;
91
+ for (const mutation of mutations) {
92
+ if (mutation.removedNodes.length > 0) focus(container);
93
+ }
94
+ };
95
+ var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
96
+ document.addEventListener("focusin", handleFocusIn2);
97
+ document.addEventListener("focusout", handleFocusOut2);
98
+ const mutationObserver = new MutationObserver(handleMutations2);
99
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
100
+ return () => {
101
+ document.removeEventListener("focusin", handleFocusIn2);
102
+ document.removeEventListener("focusout", handleFocusOut2);
103
+ mutationObserver.disconnect();
104
+ };
105
+ }
106
+ }, [trapped, container, focusScope.paused]);
107
+ React.useEffect(() => {
108
+ if (container) {
109
+ focusScopesStack.add(focusScope);
110
+ const previouslyFocusedElement = document.activeElement;
111
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
112
+ if (!hasFocusedCandidate) {
113
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
114
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
115
+ container.dispatchEvent(mountEvent);
116
+ if (!mountEvent.defaultPrevented) {
117
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
118
+ if (document.activeElement === previouslyFocusedElement) {
119
+ focus(container);
120
+ }
121
+ }
122
+ }
123
+ return () => {
124
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
125
+ setTimeout(() => {
126
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
127
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
128
+ container.dispatchEvent(unmountEvent);
129
+ if (!unmountEvent.defaultPrevented) {
130
+ focus(previouslyFocusedElement ?? document.body, { select: true });
131
+ }
132
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
133
+ focusScopesStack.remove(focusScope);
134
+ }, 0);
135
+ };
136
+ }
137
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
138
+ const handleKeyDown = React.useCallback(
139
+ (event) => {
140
+ if (!loop && !trapped) return;
141
+ if (focusScope.paused) return;
142
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
143
+ const focusedElement = document.activeElement;
144
+ if (isTabKey && focusedElement) {
145
+ const container2 = event.currentTarget;
146
+ const [first, last] = getTabbableEdges(container2);
147
+ const hasTabbableElementsInside = first && last;
148
+ if (!hasTabbableElementsInside) {
149
+ if (focusedElement === container2) event.preventDefault();
150
+ } else {
151
+ if (!event.shiftKey && focusedElement === last) {
152
+ event.preventDefault();
153
+ if (loop) focus(first, { select: true });
154
+ } else if (event.shiftKey && focusedElement === first) {
155
+ event.preventDefault();
156
+ if (loop) focus(last, { select: true });
157
+ }
158
+ }
159
+ }
160
+ },
161
+ [loop, trapped, focusScope.paused]
162
+ );
163
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
164
+ });
165
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
166
+ function focusFirst(candidates, { select = false } = {}) {
167
+ const previouslyFocusedElement = document.activeElement;
168
+ for (const candidate of candidates) {
169
+ focus(candidate, { select });
170
+ if (document.activeElement !== previouslyFocusedElement) return;
171
+ }
172
+ }
173
+ function getTabbableEdges(container) {
174
+ const candidates = getTabbableCandidates(container);
175
+ const first = findVisible(candidates, container);
176
+ const last = findVisible(candidates.reverse(), container);
177
+ return [first, last];
178
+ }
179
+ function getTabbableCandidates(container) {
180
+ const nodes = [];
181
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
182
+ acceptNode: (node) => {
183
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
184
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
185
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
186
+ }
187
+ });
188
+ while (walker.nextNode()) nodes.push(walker.currentNode);
189
+ return nodes;
190
+ }
191
+ function findVisible(elements, container) {
192
+ for (const element of elements) {
193
+ if (!isHidden(element, { upTo: container })) return element;
194
+ }
195
+ }
196
+ function isHidden(node, { upTo }) {
197
+ if (getComputedStyle(node).visibility === "hidden") return true;
198
+ while (node) {
199
+ if (upTo !== void 0 && node === upTo) return false;
200
+ if (getComputedStyle(node).display === "none") return true;
201
+ node = node.parentElement;
202
+ }
203
+ return false;
204
+ }
205
+ function isSelectableInput(element) {
206
+ return element instanceof HTMLInputElement && "select" in element;
207
+ }
208
+ function focus(element, { select = false } = {}) {
209
+ if (element && element.focus) {
210
+ const previouslyFocusedElement = document.activeElement;
211
+ element.focus({ preventScroll: true });
212
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
213
+ element.select();
214
+ }
215
+ }
216
+ var focusScopesStack = createFocusScopesStack();
217
+ function createFocusScopesStack() {
218
+ let stack = [];
219
+ return {
220
+ add(focusScope) {
221
+ const activeFocusScope = stack[0];
222
+ if (focusScope !== activeFocusScope) {
223
+ activeFocusScope?.pause();
224
+ }
225
+ stack = arrayRemove(stack, focusScope);
226
+ stack.unshift(focusScope);
227
+ },
228
+ remove(focusScope) {
229
+ stack = arrayRemove(stack, focusScope);
230
+ stack[0]?.resume();
231
+ }
232
+ };
233
+ }
234
+ function arrayRemove(array, item) {
235
+ const updatedArray = [...array];
236
+ const index = updatedArray.indexOf(item);
237
+ if (index !== -1) {
238
+ updatedArray.splice(index, 1);
239
+ }
240
+ return updatedArray;
241
+ }
242
+ function removeLinks(items) {
243
+ return items.filter((item) => item.tagName !== "A");
244
+ }
245
+ var Root = FocusScope;
246
+ //# sourceMappingURL=index.js.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/focus-scope.tsx"],
4
+ "sourcesContent": ["'use client';\nexport {\n FocusScope,\n //\n Root,\n} from './focus-scope';\nexport type { FocusScopeProps } from './focus-scope';\n", "import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\nconst AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusableTarget = HTMLElement | { focus(): void };\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_SCOPE_NAME = 'FocusScope';\n\ntype FocusScopeElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface FocusScopeProps extends PrimitiveDivProps {\n /**\n * When `true`, tabbing from last item will focus first tabbable\n * and shift+tab from first item will focus last tababble.\n * @defaultValue false\n */\n loop?: boolean;\n\n /**\n * When `true`, focus cannot escape the focus scope via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapped?: boolean;\n\n /**\n * Event handler called when auto-focusing on mount.\n * Can be prevented.\n */\n onMountAutoFocus?: (event: Event) => void;\n\n /**\n * Event handler called when auto-focusing on unmount.\n * Can be prevented.\n */\n onUnmountAutoFocus?: (event: Event) => void;\n}\n\nconst FocusScope = React.forwardRef<FocusScopeElement, FocusScopeProps>((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState<HTMLElement | null>(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef<HTMLElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n },\n }).current;\n\n // Takes care of trapping focus if focus is moved outside programmatically for example\n React.useEffect(() => {\n if (trapped) {\n function handleFocusIn(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const target = event.target as HTMLElement | null;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n function handleFocusOut(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget as HTMLElement | null;\n\n // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return;\n\n // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations: MutationRecord[]) {\n const focusedElement = document.activeElement as HTMLElement | null;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n }\n\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n\n return () => {\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement as HTMLElement | null;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n\n // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n // we need to remove the listener after we `dispatchEvent`\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n\n // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement as HTMLElement | null;\n\n if (isTabKey && focusedElement) {\n const container = event.currentTarget as HTMLElement;\n const [first, last] = getTabbableEdges(container);\n const hasTabbableElementsInside = first && last;\n\n // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n\n return (\n <Primitive.div tabIndex={-1} {...scopeProps} ref={composedRefs} onKeyDown={handleKeyDown} />\n );\n});\n\nFocusScope.displayName = FOCUS_SCOPE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */\nfunction focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n\n/**\n * Returns the first and last tabbable elements inside a container.\n */\nfunction getTabbableEdges(container: HTMLElement) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last] as const;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nfunction findVisible(elements: HTMLElement[], container: HTMLElement) {\n for (const element of elements) {\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\n\nfunction isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while (node) {\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement as HTMLElement;\n }\n return false;\n}\n\nfunction isSelectableInput(element: any): element is FocusableTarget & { select: () => void } {\n return element instanceof HTMLInputElement && 'select' in element;\n}\n\nfunction focus(element?: FocusableTarget | null, { select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({ preventScroll: true });\n // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/\n\ntype FocusScopeAPI = { paused: boolean; pause(): void; resume(): void };\nconst focusScopesStack = createFocusScopesStack();\n\nfunction createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */\n let stack: FocusScopeAPI[] = [];\n\n return {\n add(focusScope: FocusScopeAPI) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n\n remove(focusScope: FocusScopeAPI) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n },\n };\n}\n\nfunction arrayRemove<T>(array: T[], item: T) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\n\nfunction removeLinks(items: HTMLElement[]) {\n return items.filter((item) => item.tagName !== 'A');\n}\n\nconst Root = FocusScope;\n\nexport {\n FocusScope,\n //\n Root,\n};\nexport type { FocusScopeProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAAgC;AAChC,6BAA0B;AAC1B,oCAA+B;AAwM3B;AAtMJ,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAK;AAQzD,IAAM,mBAAmB;AAgCzB,IAAM,aAAmB,iBAA+C,CAAC,OAAO,iBAAiB;AAC/F,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,WAAW,YAAY,IAAU,eAA6B,IAAI;AACzE,QAAM,uBAAmB,8CAAe,oBAAoB;AAC5D,QAAM,yBAAqB,8CAAe,sBAAsB;AAChE,QAAM,wBAA8B,aAA2B,IAAI;AACnE,QAAM,mBAAe,2CAAgB,cAAc,CAAC,SAAS,aAAa,IAAI,CAAC;AAE/E,QAAM,aAAmB,aAAO;AAAA,IAC9B,QAAQ;AAAA,IACR,QAAQ;AACN,WAAK,SAAS;AAAA,IAChB;AAAA,IACA,SAAS;AACP,WAAK,SAAS;AAAA,IAChB;AAAA,EACF,CAAC,EAAE;AAGH,EAAM,gBAAU,MAAM;AACpB,QAAI,SAAS;AACX,UAASA,iBAAT,SAAuB,OAAmB;AACxC,YAAI,WAAW,UAAU,CAAC,UAAW;AACrC,cAAM,SAAS,MAAM;AACrB,YAAI,UAAU,SAAS,MAAM,GAAG;AAC9B,gCAAsB,UAAU;AAAA,QAClC,OAAO;AACL,gBAAM,sBAAsB,SAAS,EAAE,QAAQ,KAAK,CAAC;AAAA,QACvD;AAAA,MACF,GAESC,k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space/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.mjs ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+
3
+ // src/focus-scope.tsx
4
+ import * as React from "react";
5
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
6
+ import { Primitive } from "@radix-ui/react-primitive";
7
+ import { useCallbackRef } from "@radix-ui/react-use-callback-ref";
8
+ import { jsx } from "react/jsx-runtime";
9
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
10
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
11
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
12
+ var FOCUS_SCOPE_NAME = "FocusScope";
13
+ var FocusScope = React.forwardRef((props, forwardedRef) => {
14
+ const {
15
+ loop = false,
16
+ trapped = false,
17
+ onMountAutoFocus: onMountAutoFocusProp,
18
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
19
+ ...scopeProps
20
+ } = props;
21
+ const [container, setContainer] = React.useState(null);
22
+ const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
23
+ const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
24
+ const lastFocusedElementRef = React.useRef(null);
25
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
26
+ const focusScope = React.useRef({
27
+ paused: false,
28
+ pause() {
29
+ this.paused = true;
30
+ },
31
+ resume() {
32
+ this.paused = false;
33
+ }
34
+ }).current;
35
+ React.useEffect(() => {
36
+ if (trapped) {
37
+ let handleFocusIn2 = function(event) {
38
+ if (focusScope.paused || !container) return;
39
+ const target = event.target;
40
+ if (container.contains(target)) {
41
+ lastFocusedElementRef.current = target;
42
+ } else {
43
+ focus(lastFocusedElementRef.current, { select: true });
44
+ }
45
+ }, handleFocusOut2 = function(event) {
46
+ if (focusScope.paused || !container) return;
47
+ const relatedTarget = event.relatedTarget;
48
+ if (relatedTarget === null) return;
49
+ if (!container.contains(relatedTarget)) {
50
+ focus(lastFocusedElementRef.current, { select: true });
51
+ }
52
+ }, handleMutations2 = function(mutations) {
53
+ const focusedElement = document.activeElement;
54
+ if (focusedElement !== document.body) return;
55
+ for (const mutation of mutations) {
56
+ if (mutation.removedNodes.length > 0) focus(container);
57
+ }
58
+ };
59
+ var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
60
+ document.addEventListener("focusin", handleFocusIn2);
61
+ document.addEventListener("focusout", handleFocusOut2);
62
+ const mutationObserver = new MutationObserver(handleMutations2);
63
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
64
+ return () => {
65
+ document.removeEventListener("focusin", handleFocusIn2);
66
+ document.removeEventListener("focusout", handleFocusOut2);
67
+ mutationObserver.disconnect();
68
+ };
69
+ }
70
+ }, [trapped, container, focusScope.paused]);
71
+ React.useEffect(() => {
72
+ if (container) {
73
+ focusScopesStack.add(focusScope);
74
+ const previouslyFocusedElement = document.activeElement;
75
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
76
+ if (!hasFocusedCandidate) {
77
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
78
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
79
+ container.dispatchEvent(mountEvent);
80
+ if (!mountEvent.defaultPrevented) {
81
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
82
+ if (document.activeElement === previouslyFocusedElement) {
83
+ focus(container);
84
+ }
85
+ }
86
+ }
87
+ return () => {
88
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
89
+ setTimeout(() => {
90
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
91
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
92
+ container.dispatchEvent(unmountEvent);
93
+ if (!unmountEvent.defaultPrevented) {
94
+ focus(previouslyFocusedElement ?? document.body, { select: true });
95
+ }
96
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
97
+ focusScopesStack.remove(focusScope);
98
+ }, 0);
99
+ };
100
+ }
101
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
102
+ const handleKeyDown = React.useCallback(
103
+ (event) => {
104
+ if (!loop && !trapped) return;
105
+ if (focusScope.paused) return;
106
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
107
+ const focusedElement = document.activeElement;
108
+ if (isTabKey && focusedElement) {
109
+ const container2 = event.currentTarget;
110
+ const [first, last] = getTabbableEdges(container2);
111
+ const hasTabbableElementsInside = first && last;
112
+ if (!hasTabbableElementsInside) {
113
+ if (focusedElement === container2) event.preventDefault();
114
+ } else {
115
+ if (!event.shiftKey && focusedElement === last) {
116
+ event.preventDefault();
117
+ if (loop) focus(first, { select: true });
118
+ } else if (event.shiftKey && focusedElement === first) {
119
+ event.preventDefault();
120
+ if (loop) focus(last, { select: true });
121
+ }
122
+ }
123
+ }
124
+ },
125
+ [loop, trapped, focusScope.paused]
126
+ );
127
+ return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
128
+ });
129
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
130
+ function focusFirst(candidates, { select = false } = {}) {
131
+ const previouslyFocusedElement = document.activeElement;
132
+ for (const candidate of candidates) {
133
+ focus(candidate, { select });
134
+ if (document.activeElement !== previouslyFocusedElement) return;
135
+ }
136
+ }
137
+ function getTabbableEdges(container) {
138
+ const candidates = getTabbableCandidates(container);
139
+ const first = findVisible(candidates, container);
140
+ const last = findVisible(candidates.reverse(), container);
141
+ return [first, last];
142
+ }
143
+ function getTabbableCandidates(container) {
144
+ const nodes = [];
145
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
146
+ acceptNode: (node) => {
147
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
148
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
149
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
150
+ }
151
+ });
152
+ while (walker.nextNode()) nodes.push(walker.currentNode);
153
+ return nodes;
154
+ }
155
+ function findVisible(elements, container) {
156
+ for (const element of elements) {
157
+ if (!isHidden(element, { upTo: container })) return element;
158
+ }
159
+ }
160
+ function isHidden(node, { upTo }) {
161
+ if (getComputedStyle(node).visibility === "hidden") return true;
162
+ while (node) {
163
+ if (upTo !== void 0 && node === upTo) return false;
164
+ if (getComputedStyle(node).display === "none") return true;
165
+ node = node.parentElement;
166
+ }
167
+ return false;
168
+ }
169
+ function isSelectableInput(element) {
170
+ return element instanceof HTMLInputElement && "select" in element;
171
+ }
172
+ function focus(element, { select = false } = {}) {
173
+ if (element && element.focus) {
174
+ const previouslyFocusedElement = document.activeElement;
175
+ element.focus({ preventScroll: true });
176
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
177
+ element.select();
178
+ }
179
+ }
180
+ var focusScopesStack = createFocusScopesStack();
181
+ function createFocusScopesStack() {
182
+ let stack = [];
183
+ return {
184
+ add(focusScope) {
185
+ const activeFocusScope = stack[0];
186
+ if (focusScope !== activeFocusScope) {
187
+ activeFocusScope?.pause();
188
+ }
189
+ stack = arrayRemove(stack, focusScope);
190
+ stack.unshift(focusScope);
191
+ },
192
+ remove(focusScope) {
193
+ stack = arrayRemove(stack, focusScope);
194
+ stack[0]?.resume();
195
+ }
196
+ };
197
+ }
198
+ function arrayRemove(array, item) {
199
+ const updatedArray = [...array];
200
+ const index = updatedArray.indexOf(item);
201
+ if (index !== -1) {
202
+ updatedArray.splice(index, 1);
203
+ }
204
+ return updatedArray;
205
+ }
206
+ function removeLinks(items) {
207
+ return items.filter((item) => item.tagName !== "A");
208
+ }
209
+ var Root = FocusScope;
210
+ export {
211
+ FocusScope,
212
+ Root
213
+ };
214
+ //# sourceMappingURL=index.mjs.map
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/focus-scope.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\nconst AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusableTarget = HTMLElement | { focus(): void };\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_SCOPE_NAME = 'FocusScope';\n\ntype FocusScopeElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface FocusScopeProps extends PrimitiveDivProps {\n /**\n * When `true`, tabbing from last item will focus first tabbable\n * and shift+tab from first item will focus last tababble.\n * @defaultValue false\n */\n loop?: boolean;\n\n /**\n * When `true`, focus cannot escape the focus scope via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapped?: boolean;\n\n /**\n * Event handler called when auto-focusing on mount.\n * Can be prevented.\n */\n onMountAutoFocus?: (event: Event) => void;\n\n /**\n * Event handler called when auto-focusing on unmount.\n * Can be prevented.\n */\n onUnmountAutoFocus?: (event: Event) => void;\n}\n\nconst FocusScope = React.forwardRef<FocusScopeElement, FocusScopeProps>((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState<HTMLElement | null>(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef<HTMLElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n },\n }).current;\n\n // Takes care of trapping focus if focus is moved outside programmatically for example\n React.useEffect(() => {\n if (trapped) {\n function handleFocusIn(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const target = event.target as HTMLElement | null;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n function handleFocusOut(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget as HTMLElement | null;\n\n // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return;\n\n // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations: MutationRecord[]) {\n const focusedElement = document.activeElement as HTMLElement | null;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n }\n\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n\n return () => {\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement as HTMLElement | null;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n\n // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n // we need to remove the listener after we `dispatchEvent`\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n\n // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement as HTMLElement | null;\n\n if (isTabKey && focusedElement) {\n const container = event.currentTarget as HTMLElement;\n const [first, last] = getTabbableEdges(container);\n const hasTabbableElementsInside = first && last;\n\n // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n\n return (\n <Primitive.div tabIndex={-1} {...scopeProps} ref={composedRefs} onKeyDown={handleKeyDown} />\n );\n});\n\nFocusScope.displayName = FOCUS_SCOPE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */\nfunction focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n\n/**\n * Returns the first and last tabbable elements inside a container.\n */\nfunction getTabbableEdges(container: HTMLElement) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last] as const;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nfunction findVisible(elements: HTMLElement[], container: HTMLElement) {\n for (const element of elements) {\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\n\nfunction isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while (node) {\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement as HTMLElement;\n }\n return false;\n}\n\nfunction isSelectableInput(element: any): element is FocusableTarget & { select: () => void } {\n return element instanceof HTMLInputElement && 'select' in element;\n}\n\nfunction focus(element?: FocusableTarget | null, { select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({ preventScroll: true });\n // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/\n\ntype FocusScopeAPI = { paused: boolean; pause(): void; resume(): void };\nconst focusScopesStack = createFocusScopesStack();\n\nfunction createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */\n let stack: FocusScopeAPI[] = [];\n\n return {\n add(focusScope: FocusScopeAPI) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n\n remove(focusScope: FocusScopeAPI) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n },\n };\n}\n\nfunction arrayRemove<T>(array: T[], item: T) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\n\nfunction removeLinks(items: HTMLElement[]) {\n return items.filter((item) => item.tagName !== 'A');\n}\n\nconst Root = FocusScope;\n\nexport {\n FocusScope,\n //\n Root,\n};\nexport type { FocusScopeProps };\n"],
5
+ "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAwM3B;AAtMJ,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KA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AK,CAAC;AAErC,QAAI,YAAY,4BAA4B,kBAAkB,OAAO,KAAK;AACxE,cAAQ,OAAO;AAAA,EACnB;AACF;AAOA,IAAM,mBAAmB,uBAAuB;AAEhD,SAAS,yBAAyB;AAEhC,MAAI,QAAyB,CAAC;AAE9B,SAAO;AAAA,IACL,IAAI,YAA2B;AAE7B,YAAM,mBAAmB,MAAM,CAAC;AAChC,UAAI,eAAe,kBAAkB;AACnC,0BAAkB,MAAM;AAAA,MAC1B;AAEA,cAAQ,YAAY,OAAO,UAAU;AACrC,YAAM,QAAQ,UAAU;AAAA,IAC1B;AAAA,IAEA,OAAO,YAA2B;AAChC,cAAQ,YAAY,OAAO,UAAU;AACrC,YAAM,CAAC,GAAG,OAAO;AAAA,IACnB;AAAA,EACF;AACF;AAEA,SAAS,YAAe,OAAY,MAAS;AAC3C,QAAM,eAAe,CAAC,GAAG,KAAK;AAC9B,QAAM,QAAQ,aAAa,QAAQ,IAAI;AACvC,MAAI,UAAU,IAAI;AAChB,iBAAa,OAAO,OAAO,CAAC;AAAA,EAC9B;AACA,SAAO;AACT;AAEA,SAAS,YAAY,OAAsB;AACzC,SAAO,MAAM,OAAO,CAAC,SAAS,KAAK,YAAY,GAAG;AACpD;AAEA,IAAM,OAAO;",
6
+ "names": ["handleFocusIn", "handleFocusOut", "handleMutations", "container"]
7
+ }
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-id/dist/index.d.mts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ declare function useId(deterministicId?: string): string;
2
+
3
+ export { useId };
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/@radix-ui/react-id/dist/index.d.ts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ declare function useId(deterministicId?: string): string;
2
+
3
+ export { useId };