@inkeep/cxkit-react 0.5.36 → 0.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/components/embedded-chat.cjs +1 -1
- package/dist/components/embedded-chat.js +1 -1
- package/dist/components/embedded-search-and-chat.impl.cjs +1 -1
- package/dist/components/embedded-search.cjs +1 -1
- package/dist/components/embedded-search.js +29 -28
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-context/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-context/dist/index.js +68 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._ucun7uecgispdhq4vhr26lovum/node_modules/@radix-ui/react-dialog/dist/index.cjs +5 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._ucun7uecgispdhq4vhr26lovum/node_modules/@radix-ui/react-dialog/dist/index.js +253 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types__v2z2flytqizqloot5tnzsv72ca/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types__v2z2flytqizqloot5tnzsv72ca/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@_jnpeo7zp526zce4fsmzkscleui/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@_jnpeo7zp526zce4fsmzkscleui/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._k6mvjumazun2buzo2dcp22wl2y/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.3_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._k6mvjumazun2buzo2dcp22wl2y/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19._ceqn6mtlqa4vrghvmtsw5zpqya/node_modules/@radix-ui/react-presence/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19._ceqn6mtlqa4vrghvmtsw5zpqya/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_zjcik7jr4zh3druglzeqejtmrq/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_zjcik7jr4zh3druglzeqejtmrq/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_xmwzi2lpk7e4iscy4hlhgpd4fu/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_xmwzi2lpk7e4iscy4hlhgpd4fu/node_modules/@radix-ui/react-primitive/dist/index.js +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.js +47 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.2_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.2_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-slot/dist/index.js +43 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.cjs +1 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +1 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +38 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +4 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +113 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +65 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +1 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.3_@types_react@19.0.10_react@19.0.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/component.cjs +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/hook.cjs +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/singleton.cjs +1 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.0.10_react@19.0.0/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +1 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +28 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useRef.cjs +1 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.0.10_react@19.0.0/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/exports.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/medium.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.0.10_react@19.0.0/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
- package/dist/packages/primitives/src/atoms/cmdk/command-score.cjs +1 -0
- package/dist/packages/primitives/src/atoms/cmdk/command-score.js +46 -0
- package/dist/packages/primitives/src/atoms/cmdk/index.cjs +1 -0
- package/dist/packages/primitives/src/atoms/cmdk/index.js +519 -0
- package/dist/packages/primitives/src/atoms/shadow/context.cjs +1 -0
- package/dist/packages/primitives/src/atoms/shadow/context.js +8 -0
- package/dist/packages/primitives/src/constants/search.cjs +1 -0
- package/dist/packages/primitives/src/constants/search.js +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../../../_virtual/use-sync-external-store-shim.production.cjs"),h=require("react");/**
|
|
2
|
+
* @license React
|
|
3
|
+
* use-sync-external-store-shim.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var s;function m(){if(s)return i.__exports;s=1;var u=h;function f(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var S=typeof Object.is=="function"?Object.is:f,d=u.useState,l=u.useEffect,p=u.useLayoutEffect,y=u.useDebugValue;function v(e,t){var r=t(),c=d({inst:{value:r,getSnapshot:t}}),n=c[0].inst,a=c[1];return p(function(){n.value=r,n.getSnapshot=t,o(n)&&a({inst:n})},[e,r,t]),l(function(){return o(n)&&a({inst:n}),e(function(){o(n)&&a({inst:n})})},[e]),y(r),r}function o(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!S(e,r)}catch{return!0}}function E(e,t){return t()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?E:v;return i.__exports.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:_,i.__exports}exports.__require=m;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exports as i } from "../../../../../../_virtual/use-sync-external-store-shim.production.js";
|
|
3
|
+
import h from "react";
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* use-sync-external-store-shim.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var s;
|
|
14
|
+
function x() {
|
|
15
|
+
if (s) return i;
|
|
16
|
+
s = 1;
|
|
17
|
+
var u = h;
|
|
18
|
+
function f(e, t) {
|
|
19
|
+
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
20
|
+
}
|
|
21
|
+
var S = typeof Object.is == "function" ? Object.is : f, d = u.useState, l = u.useEffect, p = u.useLayoutEffect, E = u.useDebugValue;
|
|
22
|
+
function v(e, t) {
|
|
23
|
+
var r = t(), a = d({ inst: { value: r, getSnapshot: t } }), n = a[0].inst, c = a[1];
|
|
24
|
+
return p(
|
|
25
|
+
function() {
|
|
26
|
+
n.value = r, n.getSnapshot = t, o(n) && c({ inst: n });
|
|
27
|
+
},
|
|
28
|
+
[e, r, t]
|
|
29
|
+
), l(
|
|
30
|
+
function() {
|
|
31
|
+
return o(n) && c({ inst: n }), e(function() {
|
|
32
|
+
o(n) && c({ inst: n });
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
[e]
|
|
36
|
+
), E(r), r;
|
|
37
|
+
}
|
|
38
|
+
function o(e) {
|
|
39
|
+
var t = e.getSnapshot;
|
|
40
|
+
e = e.value;
|
|
41
|
+
try {
|
|
42
|
+
var r = t();
|
|
43
|
+
return !S(e, r);
|
|
44
|
+
} catch {
|
|
45
|
+
return !0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function y(e, t) {
|
|
49
|
+
return t();
|
|
50
|
+
}
|
|
51
|
+
var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : v;
|
|
52
|
+
return i.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : m, i;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
x as __require
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../../../_virtual/index.cjs"),r=require("../cjs/use-sync-external-store-shim.production.cjs"),o=require("../cjs/use-sync-external-store-shim.development.cjs");process.env.NODE_ENV==="production"?e.__module.exports=r.__require():e.__module.exports=o.__require();var t=e.__module.exports;exports.shimExports=t;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __module as r } from "../../../../../../_virtual/index.js";
|
|
2
|
+
import { __require as e } from "../cjs/use-sync-external-store-shim.production.js";
|
|
3
|
+
import { __require as o } from "../cjs/use-sync-external-store-shim.development.js";
|
|
4
|
+
process.env.NODE_ENV === "production" ? r.exports = e() : r.exports = o();
|
|
5
|
+
var m = r.exports;
|
|
6
|
+
export {
|
|
7
|
+
m as s
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var L=1,y=.9,D=.8,H=.17,R=.1,p=.999,J=.9999,Y=.99,$=/[\\\/_+.#"@\[\(\{&]/,a=/[\\\/_+.#"@\[\(\{&]/g,j=/[\s-]/,X=/[\s-]/g;function G(c,A,h,C,f,P,S){if(P===A.length)return f===c.length?L:Y;var T=`${f},${P}`;if(S[T]!==void 0)return S[T];for(var U=C.charAt(P),E=h.indexOf(U,f),O=0,_,N,M,u;E>=0;)_=G(c,A,h,C,E+1,P+1,S),_>O&&(E===f?_*=L:$.test(c.charAt(E-1))?(_*=D,M=c.slice(f,E-1).match(a),M&&f>0&&(_*=Math.pow(p,M.length))):j.test(c.charAt(E-1))?(_*=y,u=c.slice(f,E-1).match(X),u&&f>0&&(_*=Math.pow(p,u.length))):(_*=H,f>0&&(_*=Math.pow(p,E-f))),c.charAt(E)!==A.charAt(P)&&(_*=J)),(_<R&&h.charAt(E-1)===C.charAt(P+1)||C.charAt(P+1)===C.charAt(P)&&h.charAt(E-1)!==C.charAt(P))&&(N=G(c,A,h,C,E+1,P+2,S),N*R>_&&(_=N*R)),_>O&&(O=_),E=h.indexOf(U,E+1);return S[T]=O,O}function m(c){return c.toLowerCase().replace(X," ")}function k(c,A,h){return c=h&&h.length>0?`${c+" "+h.join(" ")}`:c,G(c,A,m(c),m(A),0,0,{})}exports.commandScore=k;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var L = 1, H = 0.9, J = 0.8, Y = 0.17, p = 0.1, u = 0.999, $ = 0.9999, k = 0.99, B = /[\\\/_+.#"@\[\(\{&]/, K = /[\\\/_+.#"@\[\(\{&]/g, W = /[\s-]/, D = /[\s-]/g;
|
|
3
|
+
function G(c, C, h, P, f, A, O) {
|
|
4
|
+
if (A === C.length)
|
|
5
|
+
return f === c.length ? L : k;
|
|
6
|
+
var T = `${f},${A}`;
|
|
7
|
+
if (O[T] !== void 0)
|
|
8
|
+
return O[T];
|
|
9
|
+
for (var U = P.charAt(A), E = h.indexOf(U, f), S = 0, _, N, M, R; E >= 0; )
|
|
10
|
+
_ = G(
|
|
11
|
+
c,
|
|
12
|
+
C,
|
|
13
|
+
h,
|
|
14
|
+
P,
|
|
15
|
+
E + 1,
|
|
16
|
+
A + 1,
|
|
17
|
+
O
|
|
18
|
+
), _ > S && (E === f ? _ *= L : B.test(c.charAt(E - 1)) ? (_ *= J, M = c.slice(f, E - 1).match(K), M && f > 0 && (_ *= Math.pow(u, M.length))) : W.test(c.charAt(E - 1)) ? (_ *= H, R = c.slice(f, E - 1).match(D), R && f > 0 && (_ *= Math.pow(u, R.length))) : (_ *= Y, f > 0 && (_ *= Math.pow(u, E - f))), c.charAt(E) !== C.charAt(A) && (_ *= $)), (_ < p && h.charAt(E - 1) === P.charAt(A + 1) || P.charAt(A + 1) === P.charAt(A) && // allow duplicate letters. Ref #7428
|
|
19
|
+
h.charAt(E - 1) !== P.charAt(A)) && (N = G(
|
|
20
|
+
c,
|
|
21
|
+
C,
|
|
22
|
+
h,
|
|
23
|
+
P,
|
|
24
|
+
E + 1,
|
|
25
|
+
A + 2,
|
|
26
|
+
O
|
|
27
|
+
), N * p > _ && (_ = N * p)), _ > S && (S = _), E = h.indexOf(U, E + 1);
|
|
28
|
+
return O[T] = S, S;
|
|
29
|
+
}
|
|
30
|
+
function X(c) {
|
|
31
|
+
return c.toLowerCase().replace(D, " ");
|
|
32
|
+
}
|
|
33
|
+
function j(c, C, h) {
|
|
34
|
+
return c = h && h.length > 0 ? `${c + " " + h.join(" ")}` : c, G(
|
|
35
|
+
c,
|
|
36
|
+
C,
|
|
37
|
+
X(c),
|
|
38
|
+
X(C),
|
|
39
|
+
0,
|
|
40
|
+
0,
|
|
41
|
+
{}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
j as commandScore
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),F=require("../../../../../node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._ucun7uecgispdhq4vhr26lovum/node_modules/@radix-ui/react-dialog/dist/index.cjs"),$=require("react"),ke=require("./command-score.cjs"),k=require("../../../../../node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_xmwzi2lpk7e4iscy4hlhgpd4fu/node_modules/@radix-ui/react-primitive/dist/index.cjs"),D=require("../../../../../node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.cjs"),je=require("../../../../../node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs"),Ae=require("../../constants/search.cjs"),Pe=require("../shadow/context.cjs");function _e(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const c=_e($),T='[cmdk-group=""]',ee='[cmdk-group-items=""]',Me='[cmdk-group-heading=""]',de='[cmdk-item=""]',ae=`${de}:not([aria-disabled="true"])`,te="cmdk-item-select",M="data-value",fe=(t,n,r)=>ke.commandScore(t,n,r??[]),me=c.createContext(void 0),q=()=>c.useContext(me),ve=c.createContext(void 0),G=()=>c.useContext(ve),he=c.createContext(void 0),re=c.forwardRef((t,n)=>{const r=L(()=>new Set),s=L(()=>new Map),a=L(()=>new Map),f=L(()=>new Set),i=ye(t),{label:h,children:d,value:S,onValueChange:E,filter:y,shouldFilter:C,loop:w,disablePointerSelection:_=!1,vimBindings:N=!0,defaultSearch:ne,...B}=t,g=L(()=>({search:ne??"",value:t.value??t.defaultValue??"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),U=D.useId(),z=D.useId(),p=D.useId(),I=c.useRef(null),R=De();A(()=>{if(S!==void 0){const e=S.trim();g.current.value=e,x.emit()}},[S]),A(()=>{R(6,ce)},[]);const Ie=Pe.useShadow(),x=c.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>g.current,setState:(e,l,o)=>{if(!Object.is(g.current[e],l)){if(g.current[e]=l,e==="search")Q(),W(),R(1,J);else if(e==="value"&&(Ie?.shadowHost?.shadowRoot?.activeElement?.hasAttribute("cmdk-input")||R(1,()=>{j()?.focus()}),R(7,()=>{g.current.selectedItemId=j()?.id,x.emit()}),o||R(5,ce),i.current?.value!==void 0)){const b=l??"";i.current.onValueChange?.(b);return}x.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),H=c.useMemo(()=>({value:(e,l,o)=>{l!==a.current.get(e)?.value&&(a.current.set(e,{value:l,keywords:o}),g.current.filtered.items.set(e,oe(l,o)),R(2,()=>{W(),x.emit()}))},item:(e,l)=>(r.current.add(e),l&&(s.current.has(l)?s.current?.get(l)?.add(e):s.current.set(l,new Set([e]))),R(3,()=>{Q(),W(),g.current.value||J(),x.emit()}),()=>{a.current.delete(e),r.current.delete(e),g.current.filtered.items.delete(e);const o=j();R(4,()=>{Q(),o?.getAttribute("id")===e&&J(),x.emit()})}),group:e=>(s.current.has(e)||s.current.set(e,new Set),()=>{a.current.delete(e),s.current.delete(e)}),filter:()=>!!i.current.shouldFilter,label:h||t["aria-label"]||"",getDisablePointerSelection:()=>!!i.current.disablePointerSelection,listId:U,inputId:p,labelId:z,listInnerRef:I}),[]);function oe(e,l){const o=i.current?.filter??fe;return e?o?.(e,g.current.search,l):0}function W(){if(!g.current.search||i.current.shouldFilter===!1)return;const e=g.current.filtered.items,l=[];g.current.filtered.groups.forEach(u=>{const m=s.current.get(u);let b=0;m.forEach(Z=>{const Re=e.get(Z);b=Math.max(Re,b)}),l.push([u,b])});const o=I.current;O().sort((u,m)=>{const b=u.getAttribute("id"),Z=m.getAttribute("id");return(e.get(Z)??0)-(e.get(b)??0)}).forEach(u=>{const m=u.closest(ee);if(m){const b=u.parentElement===m?u:u.closest(`${ee} > *`);b&&m.appendChild(b)}else{const b=u.parentElement===o?u:u.closest(`${ee} > *`);b&&o?.appendChild(b)}}),l.sort((u,m)=>m[1]-u[1]).forEach(u=>{const m=I.current?.querySelector(`${T}[${M}="${encodeURIComponent(u[0])}"]`);m?.parentElement?.appendChild(m)})}function J(){const l=O().find(o=>o.getAttribute("aria-disabled")!=="true"&&o.getAttribute("data-value")!==Ae.ASK_AI_TRIGGER_VALUE)?.getAttribute(M);x.setState("value",l||void 0)}function Q(){if(!g.current.search||i.current.shouldFilter===!1){g.current.filtered.count=r.current.size;return}g.current.filtered.groups=new Set;let e=0;for(const l of r.current){const o=a.current.get(l)?.value??"",u=a.current.get(l)?.keywords??[],m=oe(o,u);g.current.filtered.items.set(l,m),m>0&&e++}for(const[l,o]of s.current)for(const u of o){const m=g.current.filtered.items.get(u);if(m&&m>0){g.current.filtered.groups.add(l);break}}g.current.filtered.count=e}function ce(){const e=j();e&&(e.parentElement?.firstChild===e&&e.closest(T)?.querySelector(Me)?.scrollIntoView({block:"nearest"}),e.scrollIntoView({block:"nearest"}))}function j(){return I.current?.querySelector(`${de}[aria-selected="true"]`)}function O(){return Array.from(I.current?.querySelectorAll(ae)||[])}function X(e){const o=O()[e];o&&x.setState("value",o.getAttribute(M))}function Y(e){const l=j(),o=O(),u=o.findIndex(b=>b===l);let m=o[u+e];i.current?.loop&&(m=u+e<0?o[o.length-1]:u+e===o.length?o[0]:o[u+e]),m&&x.setState("value",m.getAttribute(M))}function se(e){let o=j()?.closest(T),u;for(;o&&!u;)o=e>0?Oe(o,T):Te(o,T),u=o?.querySelector(ae);u?x.setState("value",u.getAttribute(M)):Y(e)}const ie=()=>X(O().length-1),le=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?se(1):Y(1)},ue=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?se(-1):Y(-1)};return v.jsxs(k.Primitive.div,{ref:n,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{if(B.onKeyDown?.(e),!e.defaultPrevented)switch(e.key){case"n":case"j":{N&&e.ctrlKey&&le(e);break}case"ArrowDown":{le(e);break}case"p":case"k":{N&&e.ctrlKey&&ue(e);break}case"ArrowUp":{ue(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":if(!e.nativeEvent.isComposing&&e.keyCode!==229){e.preventDefault();const l=j();if(l){const o=new Event(te);l.dispatchEvent(o)}}}},style:{display:"contents"},children:[v.jsx("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:qe,children:h}),K(t,e=>v.jsx(ve.Provider,{value:x,children:v.jsx(me.Provider,{value:H,children:e})}))]})}),ge=c.forwardRef((t,n)=>{const{id:r}=t,s=c.useRef(null),a=c.useContext(he),f=q(),i=ye(t),h=i.current?.forceMount??a?.forceMount;A(()=>{if(!h)return f.item(r,a?.id)},[h]);const d=we(r,s,[t.value,t.children,s],t.keywords),S=G(),E=P(p=>p.value&&p.value===d.current),y=P(p=>h||f.filter()===!1?!0:p.search?p.filtered.items.get(r)>0:!0);c.useEffect(()=>{const p=s.current;if(!p||t.disabled)return;const I=()=>w("keyboard");return p.addEventListener(te,I),()=>p.removeEventListener(te,I)},[y,t.onSelect,t.disabled]);const C=$.useCallback(()=>{S.setState("value",d.current,!0)},[S,d]),w=$.useCallback((p="click")=>{C(),i.current.onSelect?.({value:d.current,trigger:p})},[C,i,d]);if(!y)return null;const{disabled:_,value:N,onSelect:ne,forceMount:B,keywords:g,...U}=t,z=$.useMemo(()=>V([s,n]),[s,n]);return v.jsx(k.Primitive.div,{ref:z,...U,id:r,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!E,"data-disabled":!!_,"data-selected":!!E,onPointerMove:_||f.getDisablePointerSelection()?void 0:C,onClick:_?void 0:w,onFocus:_?void 0:C,children:t.children})}),Le=c.forwardRef((t,n)=>{const{heading:r,children:s,forceMount:a,...f}=t,i=D.useId(),h=c.useRef(null),d=c.useRef(null),S=D.useId(),E=q(),y=P(w=>a||E.filter()===!1?!0:w.search?w.filtered.groups.has(i):!0);A(()=>E.group(i),[]),we(i,h,[t.value,t.heading,d]);const C=c.useMemo(()=>({id:i,forceMount:a}),[a]);return v.jsxs(k.Primitive.div,{ref:V([h,n]),...f,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0,children:[r&&v.jsx("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:S,children:r}),K(t,w=>v.jsx("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?S:void 0,children:v.jsx(he.Provider,{value:C,children:w})}))]})}),be=c.forwardRef((t,n)=>{const{alwaysRender:r,...s}=t,a=c.useRef(null),f=P(i=>!i.search);return!r&&!f?null:v.jsx(k.Primitive.div,{ref:V([a,n]),...s,"cmdk-separator":"",role:"separator"})}),pe=c.forwardRef((t,n)=>{const{onValueChange:r,...s}=t,a=t.value!=null,f=G(),i=P(d=>d.search),h=q();return c.useEffect(()=>{t.value!=null&&f.setState("search",t.value)},[t.value]),v.jsx(k.Primitive.input,{ref:n,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,id:h.inputId,type:"text",value:a?t.value:i,onChange:d=>{a||f.setState("search",d.target.value),r?.(d.target.value)}})}),Se=c.forwardRef((t,n)=>{const{children:r,label:s="Suggestions",...a}=t,f=c.useRef(null),i=c.useRef(null),h=q();return c.useEffect(()=>{if(i.current&&f.current){const d=i.current,S=f.current;let E;const y=new ResizeObserver(()=>{E=requestAnimationFrame(()=>{const C=d.offsetHeight;S.style.setProperty("--cmdk-list-height",C.toFixed(1)+"px")})});return y.observe(d),()=>{cancelAnimationFrame(E),y.unobserve(d)}}},[]),v.jsx(k.Primitive.div,{ref:V([f,n]),...a,"cmdk-list":"",tabIndex:-1,"aria-label":s,id:h.listId,children:K(t,d=>v.jsx("div",{ref:V([i,h.listInnerRef]),"cmdk-list-sizer":"",children:d}))})}),xe=c.forwardRef((t,n)=>{const{open:r,onOpenChange:s,overlayClassName:a,contentClassName:f,container:i,...h}=t;return v.jsx(F.Root,{open:r,onOpenChange:s,children:v.jsxs(F.Portal,{container:i,children:[v.jsx(F.Overlay,{"cmdk-overlay":"",className:a}),v.jsx(F.Content,{"aria-label":t.label,"cmdk-dialog":"",className:f,children:v.jsx(re,{ref:n,...h})})]})})}),Ee=c.forwardRef((t,n)=>P(s=>s.filtered.count===0)?v.jsx(k.Primitive.div,{ref:n,...t,"cmdk-empty":"",role:"presentation"}):null),Ce=c.forwardRef((t,n)=>{const{progress:r,children:s,label:a="Loading...",...f}=t;return v.jsx(k.Primitive.div,{ref:n,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a,children:K(t,i=>v.jsx("div",{"aria-hidden":!0,children:i}))})});Object.assign(re,{List:Se,Item:ge,Input:pe,Group:Le,Separator:be,Dialog:xe,Empty:Ee,Loading:Ce});function Oe(t,n){let r=t.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function Te(t,n){let r=t.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function ye(t){const n=c.useRef(t);return A(()=>{n.current=t}),n}const A=typeof window>"u"?c.useEffect:c.useLayoutEffect;function L(t){const n=c.useRef(void 0);return n.current===void 0&&(n.current=t()),n}function V(t){return n=>{t.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}function P(t){const n=G(),r=()=>t(n.snapshot());return je.shimExports.useSyncExternalStore(n.subscribe,r,r)}function we(t,n,r,s=[]){const a=c.useRef(void 0),f=q();return A(()=>{const i=(()=>{for(const d of r){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?d.current.textContent?.trim():a.current}})(),h=s.map(d=>d.trim());f.value(t,i,h),n.current?.setAttribute(M,i),a.current=i}),a}const De=()=>{const[t,n]=c.useState(),r=L(()=>new Map);return A(()=>{r.current.forEach(s=>s()),r.current=new Map},[t]),(s,a)=>{r.current.set(s,a),n({})}};function Ve(t){const n=t.type;return typeof n=="function"?n(t.props):"render"in n?n.render(t.props):t}function K({asChild:t,children:n},r){return t&&c.isValidElement(n)?c.cloneElement(Ve(n),{ref:n.ref},r(n.props.children)):r(n)}const qe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};exports.CommandDialog=xe;exports.CommandEmpty=Ee;exports.CommandInput=pe;exports.CommandItem=ge;exports.CommandList=Se;exports.CommandLoading=Ce;exports.CommandRoot=re;exports.CommandSeparator=be;exports.defaultFilter=fe;exports.useCommandState=P;exports.useCommandStore=G;
|
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
import { jsxs as Z, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { Root as Se, Portal as Ee, Overlay as Ce, Content as we } from "../../../../../node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19.0._ucun7uecgispdhq4vhr26lovum/node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { useCallback as le, useMemo as ye } from "react";
|
|
5
|
+
import { commandScore as Ie } from "./command-score.js";
|
|
6
|
+
import { Primitive as k } from "../../../../../node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.3_@types_react@19.0.10__@types_react@19_xmwzi2lpk7e4iscy4hlhgpd4fu/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
7
|
+
import { useId as F } from "../../../../../node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-id/dist/index.js";
|
|
8
|
+
import { s as Re } from "../../../../../node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js";
|
|
9
|
+
import { ASK_AI_TRIGGER_VALUE as xe } from "../../constants/search.js";
|
|
10
|
+
import { useShadow as ke } from "../shadow/context.js";
|
|
11
|
+
const D = '[cmdk-group=""]', X = '[cmdk-group-items=""]', Ae = '[cmdk-group-heading=""]', ae = '[cmdk-item=""]', ue = `${ae}:not([aria-disabled="true"])`, Y = "cmdk-item-select", M = "data-value", _e = (t, n, r) => Ie(t, n, r ?? []), de = c.createContext(void 0), G = () => c.useContext(de), fe = c.createContext(void 0), ee = () => c.useContext(fe), me = c.createContext(void 0), ve = c.forwardRef((t, n) => {
|
|
12
|
+
const r = P(() => /* @__PURE__ */ new Set()), i = P(() => /* @__PURE__ */ new Map()), a = P(() => /* @__PURE__ */ new Map()), f = P(() => /* @__PURE__ */ new Set()), s = he(t), {
|
|
13
|
+
label: v,
|
|
14
|
+
children: d,
|
|
15
|
+
value: S,
|
|
16
|
+
onValueChange: C,
|
|
17
|
+
filter: y,
|
|
18
|
+
shouldFilter: w,
|
|
19
|
+
loop: I,
|
|
20
|
+
disablePointerSelection: L = !1,
|
|
21
|
+
vimBindings: B = !0,
|
|
22
|
+
defaultSearch: te,
|
|
23
|
+
...N
|
|
24
|
+
} = t, h = P(() => ({
|
|
25
|
+
/** Value of the search query. */
|
|
26
|
+
search: te ?? "",
|
|
27
|
+
/** Currently selected item value. */
|
|
28
|
+
value: t.value ?? t.defaultValue ?? "",
|
|
29
|
+
/** Currently selected item id. */
|
|
30
|
+
selectedItemId: void 0,
|
|
31
|
+
filtered: {
|
|
32
|
+
/** The count of all visible items. */
|
|
33
|
+
count: 0,
|
|
34
|
+
/** Map from visible item id to its search score. */
|
|
35
|
+
items: /* @__PURE__ */ new Map(),
|
|
36
|
+
/** Set of groups with at least one visible item. */
|
|
37
|
+
groups: /* @__PURE__ */ new Set()
|
|
38
|
+
}
|
|
39
|
+
})), U = F(), $ = F(), b = F(), R = c.useRef(null), x = Be();
|
|
40
|
+
_(() => {
|
|
41
|
+
if (S !== void 0) {
|
|
42
|
+
const e = S.trim();
|
|
43
|
+
h.current.value = e, E.emit();
|
|
44
|
+
}
|
|
45
|
+
}, [S]), _(() => {
|
|
46
|
+
x(6, ne);
|
|
47
|
+
}, []);
|
|
48
|
+
const pe = ke(), E = c.useMemo(() => ({
|
|
49
|
+
subscribe: (e) => (f.current.add(e), () => f.current.delete(e)),
|
|
50
|
+
snapshot: () => h.current,
|
|
51
|
+
setState: (e, l, o) => {
|
|
52
|
+
if (!Object.is(h.current[e], l)) {
|
|
53
|
+
if (h.current[e] = l, e === "search")
|
|
54
|
+
H(), q(), x(1, z);
|
|
55
|
+
else if (e === "value" && (pe?.shadowHost?.shadowRoot?.activeElement?.hasAttribute("cmdk-input") || x(1, () => {
|
|
56
|
+
A()?.focus();
|
|
57
|
+
}), x(7, () => {
|
|
58
|
+
h.current.selectedItemId = A()?.id, E.emit();
|
|
59
|
+
}), o || x(5, ne), s.current?.value !== void 0)) {
|
|
60
|
+
const p = l ?? "";
|
|
61
|
+
s.current.onValueChange?.(p);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
E.emit();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emit: () => {
|
|
68
|
+
f.current.forEach((e) => e());
|
|
69
|
+
}
|
|
70
|
+
}), []), j = c.useMemo(
|
|
71
|
+
() => ({
|
|
72
|
+
// Keep id → {value, keywords} mapping up-to-date
|
|
73
|
+
value: (e, l, o) => {
|
|
74
|
+
l !== a.current.get(e)?.value && (a.current.set(e, { value: l, keywords: o }), h.current.filtered.items.set(e, re(l, o)), x(2, () => {
|
|
75
|
+
q(), E.emit();
|
|
76
|
+
}));
|
|
77
|
+
},
|
|
78
|
+
// Track item lifecycle (mount, unmount)
|
|
79
|
+
item: (e, l) => (r.current.add(e), l && (i.current.has(l) ? i.current?.get(l)?.add(e) : i.current.set(l, /* @__PURE__ */ new Set([e]))), x(3, () => {
|
|
80
|
+
H(), q(), h.current.value || z(), E.emit();
|
|
81
|
+
}), () => {
|
|
82
|
+
a.current.delete(e), r.current.delete(e), h.current.filtered.items.delete(e);
|
|
83
|
+
const o = A();
|
|
84
|
+
x(4, () => {
|
|
85
|
+
H(), o?.getAttribute("id") === e && z(), E.emit();
|
|
86
|
+
});
|
|
87
|
+
}),
|
|
88
|
+
// Track group lifecycle (mount, unmount)
|
|
89
|
+
group: (e) => (i.current.has(e) || i.current.set(e, /* @__PURE__ */ new Set()), () => {
|
|
90
|
+
a.current.delete(e), i.current.delete(e);
|
|
91
|
+
}),
|
|
92
|
+
filter: () => !!s.current.shouldFilter,
|
|
93
|
+
label: v || t["aria-label"] || "",
|
|
94
|
+
getDisablePointerSelection: () => !!s.current.disablePointerSelection,
|
|
95
|
+
listId: U,
|
|
96
|
+
inputId: b,
|
|
97
|
+
labelId: $,
|
|
98
|
+
listInnerRef: R
|
|
99
|
+
}),
|
|
100
|
+
[]
|
|
101
|
+
);
|
|
102
|
+
function re(e, l) {
|
|
103
|
+
const o = s.current?.filter ?? _e;
|
|
104
|
+
return e ? o?.(e, h.current.search, l) : 0;
|
|
105
|
+
}
|
|
106
|
+
function q() {
|
|
107
|
+
if (!h.current.search || // Explicitly false, because true | undefined is the default
|
|
108
|
+
s.current.shouldFilter === !1)
|
|
109
|
+
return;
|
|
110
|
+
const e = h.current.filtered.items, l = [];
|
|
111
|
+
h.current.filtered.groups.forEach((u) => {
|
|
112
|
+
const m = i.current.get(u);
|
|
113
|
+
let p = 0;
|
|
114
|
+
m.forEach((Q) => {
|
|
115
|
+
const be = e.get(Q);
|
|
116
|
+
p = Math.max(be, p);
|
|
117
|
+
}), l.push([u, p]);
|
|
118
|
+
});
|
|
119
|
+
const o = R.current;
|
|
120
|
+
T().sort((u, m) => {
|
|
121
|
+
const p = u.getAttribute("id"), Q = m.getAttribute("id");
|
|
122
|
+
return (e.get(Q) ?? 0) - (e.get(p) ?? 0);
|
|
123
|
+
}).forEach((u) => {
|
|
124
|
+
const m = u.closest(X);
|
|
125
|
+
if (m) {
|
|
126
|
+
const p = u.parentElement === m ? u : u.closest(`${X} > *`);
|
|
127
|
+
p && m.appendChild(p);
|
|
128
|
+
} else {
|
|
129
|
+
const p = u.parentElement === o ? u : u.closest(`${X} > *`);
|
|
130
|
+
p && o?.appendChild(p);
|
|
131
|
+
}
|
|
132
|
+
}), l.sort((u, m) => m[1] - u[1]).forEach((u) => {
|
|
133
|
+
const m = R.current?.querySelector(
|
|
134
|
+
`${D}[${M}="${encodeURIComponent(u[0])}"]`
|
|
135
|
+
);
|
|
136
|
+
m?.parentElement?.appendChild(m);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function z() {
|
|
140
|
+
const l = T().find(
|
|
141
|
+
(o) => o.getAttribute("aria-disabled") !== "true" && o.getAttribute("data-value") !== xe
|
|
142
|
+
)?.getAttribute(M);
|
|
143
|
+
E.setState("value", l || void 0);
|
|
144
|
+
}
|
|
145
|
+
function H() {
|
|
146
|
+
if (!h.current.search || // Explicitly false, because true | undefined is the default
|
|
147
|
+
s.current.shouldFilter === !1) {
|
|
148
|
+
h.current.filtered.count = r.current.size;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
h.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
152
|
+
let e = 0;
|
|
153
|
+
for (const l of r.current) {
|
|
154
|
+
const o = a.current.get(l)?.value ?? "", u = a.current.get(l)?.keywords ?? [], m = re(o, u);
|
|
155
|
+
h.current.filtered.items.set(l, m), m > 0 && e++;
|
|
156
|
+
}
|
|
157
|
+
for (const [l, o] of i.current)
|
|
158
|
+
for (const u of o) {
|
|
159
|
+
const m = h.current.filtered.items.get(u);
|
|
160
|
+
if (m && m > 0) {
|
|
161
|
+
h.current.filtered.groups.add(l);
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
h.current.filtered.count = e;
|
|
166
|
+
}
|
|
167
|
+
function ne() {
|
|
168
|
+
const e = A();
|
|
169
|
+
e && (e.parentElement?.firstChild === e && e.closest(D)?.querySelector(Ae)?.scrollIntoView({ block: "nearest" }), e.scrollIntoView({ block: "nearest" }));
|
|
170
|
+
}
|
|
171
|
+
function A() {
|
|
172
|
+
return R.current?.querySelector(`${ae}[aria-selected="true"]`);
|
|
173
|
+
}
|
|
174
|
+
function T() {
|
|
175
|
+
return Array.from(R.current?.querySelectorAll(ue) || []);
|
|
176
|
+
}
|
|
177
|
+
function W(e) {
|
|
178
|
+
const o = T()[e];
|
|
179
|
+
o && E.setState("value", o.getAttribute(M));
|
|
180
|
+
}
|
|
181
|
+
function J(e) {
|
|
182
|
+
const l = A(), o = T(), u = o.findIndex((p) => p === l);
|
|
183
|
+
let m = o[u + e];
|
|
184
|
+
s.current?.loop && (m = u + e < 0 ? o[o.length - 1] : u + e === o.length ? o[0] : o[u + e]), m && E.setState("value", m.getAttribute(M));
|
|
185
|
+
}
|
|
186
|
+
function oe(e) {
|
|
187
|
+
let o = A()?.closest(D), u;
|
|
188
|
+
for (; o && !u; )
|
|
189
|
+
o = e > 0 ? Ge(o, D) : Ke(o, D), u = o?.querySelector(ue);
|
|
190
|
+
u ? E.setState("value", u.getAttribute(M)) : J(e);
|
|
191
|
+
}
|
|
192
|
+
const ce = () => W(T().length - 1), se = (e) => {
|
|
193
|
+
e.preventDefault(), e.metaKey ? ce() : e.altKey ? oe(1) : J(1);
|
|
194
|
+
}, ie = (e) => {
|
|
195
|
+
e.preventDefault(), e.metaKey ? W(0) : e.altKey ? oe(-1) : J(-1);
|
|
196
|
+
};
|
|
197
|
+
return /* @__PURE__ */ Z(
|
|
198
|
+
k.div,
|
|
199
|
+
{
|
|
200
|
+
ref: n,
|
|
201
|
+
tabIndex: -1,
|
|
202
|
+
...N,
|
|
203
|
+
"cmdk-root": "",
|
|
204
|
+
onKeyDown: (e) => {
|
|
205
|
+
if (N.onKeyDown?.(e), !e.defaultPrevented)
|
|
206
|
+
switch (e.key) {
|
|
207
|
+
case "n":
|
|
208
|
+
case "j": {
|
|
209
|
+
B && e.ctrlKey && se(e);
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
case "ArrowDown": {
|
|
213
|
+
se(e);
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
case "p":
|
|
217
|
+
case "k": {
|
|
218
|
+
B && e.ctrlKey && ie(e);
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
case "ArrowUp": {
|
|
222
|
+
ie(e);
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
case "Home": {
|
|
226
|
+
e.preventDefault(), W(0);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
case "End": {
|
|
230
|
+
e.preventDefault(), ce();
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
case "Enter":
|
|
234
|
+
if (!e.nativeEvent.isComposing && e.keyCode !== 229) {
|
|
235
|
+
e.preventDefault();
|
|
236
|
+
const l = A();
|
|
237
|
+
if (l) {
|
|
238
|
+
const o = new Event(Y);
|
|
239
|
+
l.dispatchEvent(o);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
style: {
|
|
245
|
+
display: "contents"
|
|
246
|
+
},
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ g(
|
|
249
|
+
"label",
|
|
250
|
+
{
|
|
251
|
+
"cmdk-label": "",
|
|
252
|
+
htmlFor: j.inputId,
|
|
253
|
+
id: j.labelId,
|
|
254
|
+
style: Ue,
|
|
255
|
+
children: v
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
K(t, (e) => /* @__PURE__ */ g(fe.Provider, { value: E, children: /* @__PURE__ */ g(de.Provider, { value: j, children: e }) }))
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
}), Le = c.forwardRef((t, n) => {
|
|
263
|
+
const { id: r } = t, i = c.useRef(null), a = c.useContext(me), f = G(), s = he(t), v = s.current?.forceMount ?? a?.forceMount;
|
|
264
|
+
_(() => {
|
|
265
|
+
if (!v)
|
|
266
|
+
return f.item(r, a?.id);
|
|
267
|
+
}, [v]);
|
|
268
|
+
const d = ge(r, i, [t.value, t.children, i], t.keywords), S = ee(), C = V((b) => b.value && b.value === d.current), y = V(
|
|
269
|
+
(b) => v || f.filter() === !1 ? !0 : b.search ? b.filtered.items.get(r) > 0 : !0
|
|
270
|
+
);
|
|
271
|
+
c.useEffect(() => {
|
|
272
|
+
const b = i.current;
|
|
273
|
+
if (!b || t.disabled) return;
|
|
274
|
+
const R = () => I("keyboard");
|
|
275
|
+
return b.addEventListener(Y, R), () => b.removeEventListener(Y, R);
|
|
276
|
+
}, [y, t.onSelect, t.disabled]);
|
|
277
|
+
const w = le(() => {
|
|
278
|
+
S.setState("value", d.current, !0);
|
|
279
|
+
}, [S, d]), I = le(
|
|
280
|
+
(b = "click") => {
|
|
281
|
+
w(), s.current.onSelect?.({ value: d.current, trigger: b });
|
|
282
|
+
},
|
|
283
|
+
[w, s, d]
|
|
284
|
+
);
|
|
285
|
+
if (!y) return null;
|
|
286
|
+
const { disabled: L, value: B, onSelect: te, forceMount: N, keywords: h, ...U } = t, $ = ye(() => O([i, n]), [i, n]);
|
|
287
|
+
return /* @__PURE__ */ g(
|
|
288
|
+
k.div,
|
|
289
|
+
{
|
|
290
|
+
ref: $,
|
|
291
|
+
...U,
|
|
292
|
+
id: r,
|
|
293
|
+
"cmdk-item": "",
|
|
294
|
+
role: "option",
|
|
295
|
+
"aria-disabled": !!L,
|
|
296
|
+
"aria-selected": !!C,
|
|
297
|
+
"data-disabled": !!L,
|
|
298
|
+
"data-selected": !!C,
|
|
299
|
+
onPointerMove: L || f.getDisablePointerSelection() ? void 0 : w,
|
|
300
|
+
onClick: L ? void 0 : I,
|
|
301
|
+
onFocus: L ? void 0 : w,
|
|
302
|
+
children: t.children
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
}), Me = c.forwardRef((t, n) => {
|
|
306
|
+
const { heading: r, children: i, forceMount: a, ...f } = t, s = F(), v = c.useRef(null), d = c.useRef(null), S = F(), C = G(), y = V(
|
|
307
|
+
(I) => a || C.filter() === !1 ? !0 : I.search ? I.filtered.groups.has(s) : !0
|
|
308
|
+
);
|
|
309
|
+
_(() => C.group(s), []), ge(s, v, [t.value, t.heading, d]);
|
|
310
|
+
const w = c.useMemo(() => ({ id: s, forceMount: a }), [a]);
|
|
311
|
+
return /* @__PURE__ */ Z(
|
|
312
|
+
k.div,
|
|
313
|
+
{
|
|
314
|
+
ref: O([v, n]),
|
|
315
|
+
...f,
|
|
316
|
+
"cmdk-group": "",
|
|
317
|
+
role: "presentation",
|
|
318
|
+
hidden: y ? void 0 : !0,
|
|
319
|
+
children: [
|
|
320
|
+
r && /* @__PURE__ */ g("div", { ref: d, "cmdk-group-heading": "", "aria-hidden": !0, id: S, children: r }),
|
|
321
|
+
K(t, (I) => (
|
|
322
|
+
// biome-ignore lint/a11y/useSemanticElements: <explanation>
|
|
323
|
+
/* @__PURE__ */ g("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": r ? S : void 0, children: /* @__PURE__ */ g(me.Provider, { value: w, children: I }) })
|
|
324
|
+
))
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
}), Pe = c.forwardRef((t, n) => {
|
|
329
|
+
const { alwaysRender: r, ...i } = t, a = c.useRef(null), f = V((s) => !s.search);
|
|
330
|
+
return !r && !f ? null : /* @__PURE__ */ g(
|
|
331
|
+
k.div,
|
|
332
|
+
{
|
|
333
|
+
ref: O([a, n]),
|
|
334
|
+
...i,
|
|
335
|
+
"cmdk-separator": "",
|
|
336
|
+
role: "separator"
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
}), Ve = c.forwardRef((t, n) => {
|
|
340
|
+
const { onValueChange: r, ...i } = t, a = t.value != null, f = ee(), s = V((d) => d.search), v = G();
|
|
341
|
+
return c.useEffect(() => {
|
|
342
|
+
t.value != null && f.setState("search", t.value);
|
|
343
|
+
}, [t.value]), /* @__PURE__ */ g(
|
|
344
|
+
k.input,
|
|
345
|
+
{
|
|
346
|
+
ref: n,
|
|
347
|
+
...i,
|
|
348
|
+
"cmdk-input": "",
|
|
349
|
+
autoComplete: "off",
|
|
350
|
+
autoCorrect: "off",
|
|
351
|
+
spellCheck: !1,
|
|
352
|
+
"aria-autocomplete": "list",
|
|
353
|
+
role: "combobox",
|
|
354
|
+
"aria-expanded": !0,
|
|
355
|
+
"aria-controls": v.listId,
|
|
356
|
+
"aria-labelledby": v.labelId,
|
|
357
|
+
id: v.inputId,
|
|
358
|
+
type: "text",
|
|
359
|
+
value: a ? t.value : s,
|
|
360
|
+
onChange: (d) => {
|
|
361
|
+
a || f.setState("search", d.target.value), r?.(d.target.value);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
);
|
|
365
|
+
}), Te = c.forwardRef((t, n) => {
|
|
366
|
+
const { children: r, label: i = "Suggestions", ...a } = t, f = c.useRef(null), s = c.useRef(null), v = G();
|
|
367
|
+
return c.useEffect(() => {
|
|
368
|
+
if (s.current && f.current) {
|
|
369
|
+
const d = s.current, S = f.current;
|
|
370
|
+
let C;
|
|
371
|
+
const y = new ResizeObserver(() => {
|
|
372
|
+
C = requestAnimationFrame(() => {
|
|
373
|
+
const w = d.offsetHeight;
|
|
374
|
+
S.style.setProperty("--cmdk-list-height", w.toFixed(1) + "px");
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
return y.observe(d), () => {
|
|
378
|
+
cancelAnimationFrame(C), y.unobserve(d);
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
}, []), /* @__PURE__ */ g(
|
|
382
|
+
k.div,
|
|
383
|
+
{
|
|
384
|
+
ref: O([f, n]),
|
|
385
|
+
...a,
|
|
386
|
+
"cmdk-list": "",
|
|
387
|
+
tabIndex: -1,
|
|
388
|
+
"aria-label": i,
|
|
389
|
+
id: v.listId,
|
|
390
|
+
children: K(t, (d) => /* @__PURE__ */ g("div", { ref: O([s, v.listInnerRef]), "cmdk-list-sizer": "", children: d }))
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
}), De = c.forwardRef((t, n) => {
|
|
394
|
+
const { open: r, onOpenChange: i, overlayClassName: a, contentClassName: f, container: s, ...v } = t;
|
|
395
|
+
return /* @__PURE__ */ g(Se, { open: r, onOpenChange: i, children: /* @__PURE__ */ Z(Ee, { container: s, children: [
|
|
396
|
+
/* @__PURE__ */ g(Ce, { "cmdk-overlay": "", className: a }),
|
|
397
|
+
/* @__PURE__ */ g(we, { "aria-label": t.label, "cmdk-dialog": "", className: f, children: /* @__PURE__ */ g(ve, { ref: n, ...v }) })
|
|
398
|
+
] }) });
|
|
399
|
+
}), Fe = c.forwardRef((t, n) => V((i) => i.filtered.count === 0) ? /* @__PURE__ */ g(k.div, { ref: n, ...t, "cmdk-empty": "", role: "presentation" }) : null), Oe = c.forwardRef((t, n) => {
|
|
400
|
+
const { progress: r, children: i, label: a = "Loading...", ...f } = t;
|
|
401
|
+
return /* @__PURE__ */ g(
|
|
402
|
+
k.div,
|
|
403
|
+
{
|
|
404
|
+
ref: n,
|
|
405
|
+
...f,
|
|
406
|
+
"cmdk-loading": "",
|
|
407
|
+
role: "progressbar",
|
|
408
|
+
"aria-valuenow": r,
|
|
409
|
+
"aria-valuemin": 0,
|
|
410
|
+
"aria-valuemax": 100,
|
|
411
|
+
"aria-label": a,
|
|
412
|
+
children: K(t, (s) => /* @__PURE__ */ g("div", { "aria-hidden": !0, children: s }))
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
});
|
|
416
|
+
Object.assign(ve, {
|
|
417
|
+
List: Te,
|
|
418
|
+
Item: Le,
|
|
419
|
+
Input: Ve,
|
|
420
|
+
Group: Me,
|
|
421
|
+
Separator: Pe,
|
|
422
|
+
Dialog: De,
|
|
423
|
+
Empty: Fe,
|
|
424
|
+
Loading: Oe
|
|
425
|
+
});
|
|
426
|
+
function Ge(t, n) {
|
|
427
|
+
let r = t.nextElementSibling;
|
|
428
|
+
for (; r; ) {
|
|
429
|
+
if (r.matches(n)) return r;
|
|
430
|
+
r = r.nextElementSibling;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function Ke(t, n) {
|
|
434
|
+
let r = t.previousElementSibling;
|
|
435
|
+
for (; r; ) {
|
|
436
|
+
if (r.matches(n)) return r;
|
|
437
|
+
r = r.previousElementSibling;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
function he(t) {
|
|
441
|
+
const n = c.useRef(t);
|
|
442
|
+
return _(() => {
|
|
443
|
+
n.current = t;
|
|
444
|
+
}), n;
|
|
445
|
+
}
|
|
446
|
+
const _ = typeof window > "u" ? c.useEffect : c.useLayoutEffect;
|
|
447
|
+
function P(t) {
|
|
448
|
+
const n = c.useRef(void 0);
|
|
449
|
+
return n.current === void 0 && (n.current = t()), n;
|
|
450
|
+
}
|
|
451
|
+
function O(t) {
|
|
452
|
+
return (n) => {
|
|
453
|
+
t.forEach((r) => {
|
|
454
|
+
typeof r == "function" ? r(n) : r != null && (r.current = n);
|
|
455
|
+
});
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
function V(t) {
|
|
459
|
+
const n = ee(), r = () => t(n.snapshot());
|
|
460
|
+
return Re.useSyncExternalStore(n.subscribe, r, r);
|
|
461
|
+
}
|
|
462
|
+
function ge(t, n, r, i = []) {
|
|
463
|
+
const a = c.useRef(void 0), f = G();
|
|
464
|
+
return _(() => {
|
|
465
|
+
const s = (() => {
|
|
466
|
+
for (const d of r) {
|
|
467
|
+
if (typeof d == "string")
|
|
468
|
+
return d.trim();
|
|
469
|
+
if (typeof d == "object" && "current" in d)
|
|
470
|
+
return d.current ? d.current.textContent?.trim() : a.current;
|
|
471
|
+
}
|
|
472
|
+
})(), v = i.map((d) => d.trim());
|
|
473
|
+
f.value(t, s, v), n.current?.setAttribute(M, s), a.current = s;
|
|
474
|
+
}), a;
|
|
475
|
+
}
|
|
476
|
+
const Be = () => {
|
|
477
|
+
const [t, n] = c.useState(), r = P(() => /* @__PURE__ */ new Map());
|
|
478
|
+
return _(() => {
|
|
479
|
+
r.current.forEach((i) => i()), r.current = /* @__PURE__ */ new Map();
|
|
480
|
+
}, [t]), (i, a) => {
|
|
481
|
+
r.current.set(i, a), n({});
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
function Ne(t) {
|
|
485
|
+
const n = t.type;
|
|
486
|
+
return typeof n == "function" ? n(t.props) : "render" in n ? n.render(t.props) : t;
|
|
487
|
+
}
|
|
488
|
+
function K({ asChild: t, children: n }, r) {
|
|
489
|
+
return t && c.isValidElement(n) ? c.cloneElement(
|
|
490
|
+
Ne(n),
|
|
491
|
+
{ ref: n.ref },
|
|
492
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
493
|
+
r(n.props.children)
|
|
494
|
+
) : r(n);
|
|
495
|
+
}
|
|
496
|
+
const Ue = {
|
|
497
|
+
position: "absolute",
|
|
498
|
+
width: "1px",
|
|
499
|
+
height: "1px",
|
|
500
|
+
padding: "0",
|
|
501
|
+
margin: "-1px",
|
|
502
|
+
overflow: "hidden",
|
|
503
|
+
clip: "rect(0, 0, 0, 0)",
|
|
504
|
+
whiteSpace: "nowrap",
|
|
505
|
+
borderWidth: "0"
|
|
506
|
+
};
|
|
507
|
+
export {
|
|
508
|
+
De as CommandDialog,
|
|
509
|
+
Fe as CommandEmpty,
|
|
510
|
+
Ve as CommandInput,
|
|
511
|
+
Le as CommandItem,
|
|
512
|
+
Te as CommandList,
|
|
513
|
+
Oe as CommandLoading,
|
|
514
|
+
ve as CommandRoot,
|
|
515
|
+
Pe as CommandSeparator,
|
|
516
|
+
_e as defaultFilter,
|
|
517
|
+
V as useCommandState,
|
|
518
|
+
ee as useCommandStore
|
|
519
|
+
};
|