@rpcbase/ui 0.198.0 → 0.199.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index100.js +4 -5
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +605 -4
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +52 -9
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +4 -5
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +3 -3
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +15 -4
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +4 -5
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +7 -145
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +16 -39
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +4 -4
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +4 -7
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +5 -13
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +5 -13
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +4 -7
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +4 -31
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +6 -10
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +24 -10
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +6 -8
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +4 -13
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +6 -101
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +6 -20
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +4 -53
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +5 -72
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +4 -9
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +8 -20
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +5 -16
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +4 -23
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +4 -6
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +6 -5
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +145 -23
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +39 -34
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +5 -16
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +7 -6
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +13 -4
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +13 -4
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +7 -4
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +31 -4
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +10 -3
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +10 -6
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +9 -24
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +13 -7
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +101 -6
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +20 -6
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +53 -3
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +72 -3
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +9 -4
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +20 -3
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +16 -4
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +23 -3
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +6 -3
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +5 -3
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +19 -42
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +32 -603
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +16 -6
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +6 -68
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +5 -2
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +4 -363
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +4 -261
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +4 -60
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +3 -46
- package/dist/index159.js.map +1 -1
- package/dist/index160.js +6 -169
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +24 -110
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +7 -24
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +7 -8
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +5 -4
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +3 -5
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +3 -4
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +4 -466
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +3 -185
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +4 -107
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +3 -262
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +3 -9
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +3 -42
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +46 -4
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +1 -1
- package/dist/index179.js +13 -58
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +154 -8
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +28 -64
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +9 -19
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +46 -14
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +11 -5
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +43 -4
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +95 -6
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +86 -4
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +105 -7
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +52 -17
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +212 -210
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +11 -5
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +37 -5
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +8 -13
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +116 -10
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +17 -14
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +15 -14
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +3 -5
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +36 -6
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +20 -7
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +9 -6
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +8 -9
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +67 -5
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +180 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +46 -9
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +19 -5
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +28 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +16 -4
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +58 -11
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +8 -10
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +66 -10
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +19 -11
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +16 -11
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +5 -10
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +5 -7
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +6 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +4 -5
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +7 -6
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +17 -7
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +5 -6
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +5 -55
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +13 -16
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +10 -7
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +14 -10
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +14 -10
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +5 -21
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +6 -10
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +7 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +6 -9
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +9 -4
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +5 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -16
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +9 -9
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +5 -18
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +5 -15
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +4 -12
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +11 -29
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +10 -12
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +10 -25
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +11 -5
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +11 -67
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +10 -180
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +7 -46
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +6 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +4 -153
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +6 -30
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +7 -9
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +6 -48
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +54 -10
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +14 -42
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +7 -95
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +9 -85
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +9 -104
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +21 -52
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +10 -11
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +9 -37
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +8 -7
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +4 -116
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -17
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +15 -14
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +9 -3
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +16 -34
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +15 -20
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +12 -9
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +29 -8
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +11 -18
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +23 -26
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -16
- package/dist/index266.js.map +1 -1
- package/dist/index270.js +20 -4
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +5 -19
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +19 -13
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +12 -20
- package/dist/index273.js.map +1 -1
- package/dist/index275.js +1 -1
- package/dist/index277.js +4 -4
- package/dist/index289.js +2 -2
- package/dist/index292.js +1 -1
- package/dist/index293.js +2 -2
- package/dist/index295.js +1 -1
- package/dist/index296.js +1 -1
- package/dist/index297.js +1 -1
- package/dist/index298.js +1 -1
- package/dist/index299.js +69 -65
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +8 -68
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +14 -9
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +66 -14
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +64 -65
- package/dist/index303.js.map +1 -1
- package/dist/index31.js +5 -5
- package/dist/index32.js +24 -24
- package/dist/index33.js +3 -3
- package/dist/index36.js +1 -1
- package/dist/index37.js +2 -2
- package/dist/index40.js +2 -2
- package/dist/index41.js +20 -20
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index51.js +205 -7
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +5 -33
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +7 -26
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +5 -7
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +6 -11
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +34 -2
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +27 -2
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +8 -205
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +11 -3
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +2 -48
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +2 -51
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +3 -7
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +47 -14
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +46 -129
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +7 -10
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +13 -215
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +133 -12
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +10 -46
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +213 -46
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +13 -4
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +46 -5
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +50 -28
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +3 -49
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +6 -9
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +28 -6
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +50 -8
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +9 -6
- package/dist/index77.js.map +1 -1
- package/dist/index80.js +6 -52
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +68 -4
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +2 -5
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +363 -15
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +261 -5
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +60 -7
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +46 -16
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +169 -4
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +109 -4
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +24 -5
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +8 -6
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +4 -4
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +5 -4
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +4 -6
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +466 -24
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +185 -6
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +107 -4
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +262 -6
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +9 -5
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +42 -4
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index58.js
CHANGED
|
@@ -1,208 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { useId as g } from "./index65.js";
|
|
9
|
-
import { j as a } from "./index30.js";
|
|
10
|
-
var f = "DropdownMenu", [q] = E(
|
|
11
|
-
f,
|
|
12
|
-
[D]
|
|
13
|
-
), s = D(), [z, v] = q(f), _ = (o) => {
|
|
14
|
-
const {
|
|
15
|
-
__scopeDropdownMenu: n,
|
|
16
|
-
children: r,
|
|
17
|
-
dir: e,
|
|
18
|
-
open: t,
|
|
19
|
-
defaultOpen: i,
|
|
20
|
-
onOpenChange: u,
|
|
21
|
-
modal: d = !0
|
|
22
|
-
} = o, c = s(n), M = p.useRef(null), [l, w] = S({
|
|
23
|
-
prop: t,
|
|
24
|
-
defaultProp: i ?? !1,
|
|
25
|
-
onChange: u,
|
|
26
|
-
caller: f
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ a.jsx(
|
|
29
|
-
z,
|
|
30
|
-
{
|
|
31
|
-
scope: n,
|
|
32
|
-
triggerId: g(),
|
|
33
|
-
triggerRef: M,
|
|
34
|
-
contentId: g(),
|
|
35
|
-
open: l,
|
|
36
|
-
onOpenChange: w,
|
|
37
|
-
onOpenToggle: p.useCallback(() => w((A) => !A), [w]),
|
|
38
|
-
modal: d,
|
|
39
|
-
children: /* @__PURE__ */ a.jsx(T, { ...c, open: l, onOpenChange: w, dir: e, modal: d, children: r })
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
_.displayName = f;
|
|
44
|
-
var x = "DropdownMenuTrigger", R = p.forwardRef(
|
|
45
|
-
(o, n) => {
|
|
46
|
-
const { __scopeDropdownMenu: r, disabled: e = !1, ...t } = o, i = v(x, r), u = s(r);
|
|
47
|
-
return /* @__PURE__ */ a.jsx(y, { asChild: !0, ...u, children: /* @__PURE__ */ a.jsx(
|
|
48
|
-
P.button,
|
|
49
|
-
{
|
|
50
|
-
type: "button",
|
|
51
|
-
id: i.triggerId,
|
|
52
|
-
"aria-haspopup": "menu",
|
|
53
|
-
"aria-expanded": i.open,
|
|
54
|
-
"aria-controls": i.open ? i.contentId : void 0,
|
|
55
|
-
"data-state": i.open ? "open" : "closed",
|
|
56
|
-
"data-disabled": e ? "" : void 0,
|
|
57
|
-
disabled: e,
|
|
58
|
-
...t,
|
|
59
|
-
ref: C(n, i.triggerRef),
|
|
60
|
-
onPointerDown: m(o.onPointerDown, (d) => {
|
|
61
|
-
!e && d.button === 0 && d.ctrlKey === !1 && (i.onOpenToggle(), i.open || d.preventDefault());
|
|
62
|
-
}),
|
|
63
|
-
onKeyDown: m(o.onKeyDown, (d) => {
|
|
64
|
-
e || (["Enter", " "].includes(d.key) && i.onOpenToggle(), d.key === "ArrowDown" && i.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(d.key) && d.preventDefault());
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
) });
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
R.displayName = x;
|
|
71
|
-
var J = "DropdownMenuPortal", h = (o) => {
|
|
72
|
-
const { __scopeDropdownMenu: n, ...r } = o, e = s(n);
|
|
73
|
-
return /* @__PURE__ */ a.jsx(j, { ...e, ...r });
|
|
74
|
-
};
|
|
75
|
-
h.displayName = J;
|
|
76
|
-
var I = "DropdownMenuContent", N = p.forwardRef(
|
|
77
|
-
(o, n) => {
|
|
78
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = v(I, r), i = s(r), u = p.useRef(!1);
|
|
79
|
-
return /* @__PURE__ */ a.jsx(
|
|
80
|
-
G,
|
|
81
|
-
{
|
|
82
|
-
id: t.contentId,
|
|
83
|
-
"aria-labelledby": t.triggerId,
|
|
84
|
-
...i,
|
|
85
|
-
...e,
|
|
86
|
-
ref: n,
|
|
87
|
-
onCloseAutoFocus: m(o.onCloseAutoFocus, (d) => {
|
|
88
|
-
u.current || t.triggerRef.current?.focus(), u.current = !1, d.preventDefault();
|
|
89
|
-
}),
|
|
90
|
-
onInteractOutside: m(o.onInteractOutside, (d) => {
|
|
91
|
-
const c = d.detail.originalEvent, M = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || M;
|
|
92
|
-
(!t.modal || l) && (u.current = !0);
|
|
93
|
-
}),
|
|
94
|
-
style: {
|
|
95
|
-
...o.style,
|
|
96
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
97
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
98
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
99
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
100
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
N.displayName = I;
|
|
107
|
-
var Q = "DropdownMenuGroup", V = p.forwardRef(
|
|
108
|
-
(o, n) => {
|
|
109
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
110
|
-
return /* @__PURE__ */ a.jsx(k, { ...t, ...e, ref: n });
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
V.displayName = Q;
|
|
114
|
-
var Y = "DropdownMenuLabel", Z = p.forwardRef(
|
|
115
|
-
(o, n) => {
|
|
116
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
117
|
-
return /* @__PURE__ */ a.jsx(L, { ...t, ...e, ref: n });
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
Z.displayName = Y;
|
|
121
|
-
var oo = "DropdownMenuItem", b = p.forwardRef(
|
|
122
|
-
(o, n) => {
|
|
123
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
124
|
-
return /* @__PURE__ */ a.jsx(O, { ...t, ...e, ref: n });
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
b.displayName = oo;
|
|
128
|
-
var eo = "DropdownMenuCheckboxItem", ro = p.forwardRef((o, n) => {
|
|
129
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
130
|
-
return /* @__PURE__ */ a.jsx(K, { ...t, ...e, ref: n });
|
|
131
|
-
});
|
|
132
|
-
ro.displayName = eo;
|
|
133
|
-
var no = "DropdownMenuRadioGroup", to = p.forwardRef((o, n) => {
|
|
134
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
135
|
-
return /* @__PURE__ */ a.jsx(U, { ...t, ...e, ref: n });
|
|
136
|
-
});
|
|
137
|
-
to.displayName = no;
|
|
138
|
-
var ao = "DropdownMenuRadioItem", po = p.forwardRef((o, n) => {
|
|
139
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
140
|
-
return /* @__PURE__ */ a.jsx(B, { ...t, ...e, ref: n });
|
|
141
|
-
});
|
|
142
|
-
po.displayName = ao;
|
|
143
|
-
var so = "DropdownMenuItemIndicator", io = p.forwardRef((o, n) => {
|
|
144
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
145
|
-
return /* @__PURE__ */ a.jsx(F, { ...t, ...e, ref: n });
|
|
146
|
-
});
|
|
147
|
-
io.displayName = so;
|
|
148
|
-
var uo = "DropdownMenuSeparator", co = p.forwardRef((o, n) => {
|
|
149
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
150
|
-
return /* @__PURE__ */ a.jsx(H, { ...t, ...e, ref: n });
|
|
151
|
-
});
|
|
152
|
-
co.displayName = uo;
|
|
153
|
-
var lo = "DropdownMenuArrow", wo = p.forwardRef(
|
|
154
|
-
(o, n) => {
|
|
155
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
156
|
-
return /* @__PURE__ */ a.jsx(W, { ...t, ...e, ref: n });
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
wo.displayName = lo;
|
|
160
|
-
var mo = "DropdownMenuSubTrigger", fo = p.forwardRef((o, n) => {
|
|
161
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
162
|
-
return /* @__PURE__ */ a.jsx($, { ...t, ...e, ref: n });
|
|
163
|
-
});
|
|
164
|
-
fo.displayName = mo;
|
|
165
|
-
var Mo = "DropdownMenuSubContent", go = p.forwardRef((o, n) => {
|
|
166
|
-
const { __scopeDropdownMenu: r, ...e } = o, t = s(r);
|
|
167
|
-
return /* @__PURE__ */ a.jsx(
|
|
168
|
-
X,
|
|
169
|
-
{
|
|
170
|
-
...t,
|
|
171
|
-
...e,
|
|
172
|
-
ref: n,
|
|
173
|
-
style: {
|
|
174
|
-
...o.style,
|
|
175
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
176
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
177
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
178
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
179
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
});
|
|
184
|
-
go.displayName = Mo;
|
|
185
|
-
var bo = _, Ao = R, Co = h, Eo = N, So = b;
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
function c(r) {
|
|
3
|
+
const t = e.useRef(r);
|
|
4
|
+
return e.useEffect(() => {
|
|
5
|
+
t.current = r;
|
|
6
|
+
}), e.useMemo(() => (...u) => t.current?.(...u), []);
|
|
7
|
+
}
|
|
186
8
|
export {
|
|
187
|
-
|
|
188
|
-
_ as DropdownMenu,
|
|
189
|
-
wo as DropdownMenuArrow,
|
|
190
|
-
ro as DropdownMenuCheckboxItem,
|
|
191
|
-
N as DropdownMenuContent,
|
|
192
|
-
V as DropdownMenuGroup,
|
|
193
|
-
b as DropdownMenuItem,
|
|
194
|
-
io as DropdownMenuItemIndicator,
|
|
195
|
-
Z as DropdownMenuLabel,
|
|
196
|
-
h as DropdownMenuPortal,
|
|
197
|
-
to as DropdownMenuRadioGroup,
|
|
198
|
-
po as DropdownMenuRadioItem,
|
|
199
|
-
co as DropdownMenuSeparator,
|
|
200
|
-
go as DropdownMenuSubContent,
|
|
201
|
-
fo as DropdownMenuSubTrigger,
|
|
202
|
-
R as DropdownMenuTrigger,
|
|
203
|
-
So as Item,
|
|
204
|
-
Co as Portal,
|
|
205
|
-
bo as Root,
|
|
206
|
-
Ao as Trigger
|
|
9
|
+
c as useCallbackRef
|
|
207
10
|
};
|
|
208
11
|
//# sourceMappingURL=index58.js.map
|
package/dist/index58.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index58.js","sources":["../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: \"DropdownMenuSub\"\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DROPDOWN_MENU_NAME","createDropdownMenuContext","createContextScope","createMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","dir","openProp","defaultOpen","onOpenChange","modal","menuScope","triggerRef","React","open","setOpen","useControllableState","jsx","useId","prevOpen","MenuPrimitive.Root","TRIGGER_NAME","DropdownMenuTrigger","forwardedRef","disabled","triggerProps","context","MenuPrimitive.Anchor","Primitive","composeRefs","composeEventHandlers","event","PORTAL_NAME","DropdownMenuPortal","portalProps","MenuPrimitive.Portal","CONTENT_NAME","DropdownMenuContent","contentProps","hasInteractedOutsideRef","MenuPrimitive.Content","originalEvent","ctrlLeftClick","isRightClick","GROUP_NAME","DropdownMenuGroup","groupProps","MenuPrimitive.Group","LABEL_NAME","DropdownMenuLabel","labelProps","MenuPrimitive.Label","ITEM_NAME","DropdownMenuItem","itemProps","MenuPrimitive.Item","CHECKBOX_ITEM_NAME","DropdownMenuCheckboxItem","checkboxItemProps","MenuPrimitive.CheckboxItem","RADIO_GROUP_NAME","DropdownMenuRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","RADIO_ITEM_NAME","DropdownMenuRadioItem","radioItemProps","MenuPrimitive.RadioItem","INDICATOR_NAME","DropdownMenuItemIndicator","itemIndicatorProps","MenuPrimitive.ItemIndicator","SEPARATOR_NAME","DropdownMenuSeparator","separatorProps","MenuPrimitive.Separator","ARROW_NAME","DropdownMenuArrow","arrowProps","MenuPrimitive.Arrow","SUB_TRIGGER_NAME","DropdownMenuSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","SUB_CONTENT_NAME","DropdownMenuSubContent","subContentProps","MenuPrimitive.SubContent","Root2","Trigger","Portal2","Content2","Item2"],"mappings":";;;;;;;;;AAaA,IAAIA,IAAqB,gBACrB,CAACC,CAAkD,IAAIC;AAAA,EACzDF;AAAA,EACA,CAACG,CAAe;AAClB,GACIC,IAAeD,EAAe,GAC9B,CAACE,GAAsBC,CAAsB,IAAIL,EAA0BD,CAAkB,GAC7FO,IAAe,CAACC,MAAU;AAC5B,QAAM;AAAA,IACJ,qBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMP,GACEQ,IAAYZ,EAAaK,CAAmB,GAC5CQ,IAAaC,EAAM,OAAO,IAAI,GAC9B,CAACC,GAAMC,CAAO,IAAIC,EAAqB;AAAA,IAC3C,MAAMT;AAAA,IACN,aAAaC,KAAe;AAAA,IAC5B,UAAUC;AAAA,IACV,QAAQd;AAAA,EACZ,CAAG;AACD,SAAuBsB,gBAAAA,EAAAA;AAAAA,IACrBjB;AAAA,IACA;AAAA,MACE,OAAOI;AAAA,MACP,WAAWc,EAAK;AAAA,MAChB,YAAAN;AAAA,MACA,WAAWM,EAAK;AAAA,MAChB,MAAAJ;AAAA,MACA,cAAcC;AAAA,MACd,cAAcF,EAAM,YAAY,MAAME,EAAQ,CAACI,MAAa,CAACA,CAAQ,GAAG,CAACJ,CAAO,CAAC;AAAA,MACjF,OAAAL;AAAA,MACA,UAA0BO,gB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KAAQvC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index58.js","sources":["../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EACxB,CAAC,GACME,EAAM,QAAQ,MAAM,IAAIC,MAASF,EAAY,UAAU,GAAGE,CAAI,GAAG,EAAE;AAC5E;","x_google_ignoreList":[0]}
|
package/dist/index59.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { useCallbackRef as s } from "./index58.js";
|
|
3
|
+
function p(n, e = globalThis?.document) {
|
|
4
|
+
const t = s(n);
|
|
5
|
+
r.useEffect(() => {
|
|
6
|
+
const o = (a) => {
|
|
7
|
+
a.key === "Escape" && t(a);
|
|
8
|
+
};
|
|
9
|
+
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
10
|
+
}, [t, e]);
|
|
3
11
|
}
|
|
4
12
|
export {
|
|
5
|
-
|
|
13
|
+
p as useEscapeKeydown
|
|
6
14
|
};
|
|
7
15
|
//# sourceMappingURL=index59.js.map
|
package/dist/index59.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index59.js","sources":["../../../node_modules/@radix-ui/
|
|
1
|
+
{"version":3,"file":"index59.js","sources":["../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs"],"sourcesContent":["// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","useCallbackRef","React","handleKeyDown","event"],"mappings":";;AAGA,SAASA,EAAiBC,GAAqBC,IAAgB,YAAY,UAAU;AACnF,QAAMC,IAAkBC,EAAeH,CAAmB;AAC1D,EAAAI,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAgB,CAACC,MAAU;AAC/B,MAAIA,EAAM,QAAQ,YAChBJ,EAAgBI,CAAK;AAAA,IAEzB;AACA,WAAAL,EAAc,iBAAiB,WAAWI,GAAe,EAAE,SAAS,IAAM,GACnE,MAAMJ,EAAc,oBAAoB,WAAWI,GAAe,EAAE,SAAS,IAAM;AAAA,EAC5F,GAAG,CAACH,GAAiBD,CAAa,CAAC;AACrC;","x_google_ignoreList":[0]}
|
package/dist/index60.js
CHANGED
|
@@ -1,51 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { createContextScope as y } from "./index61.js";
|
|
3
|
-
import { useComposedRefs as S } from "./index53.js";
|
|
4
|
-
import { createSlot as M } from "./index174.js";
|
|
5
|
-
import { j as d } from "./index30.js";
|
|
6
|
-
function D(s) {
|
|
7
|
-
const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
|
|
8
|
-
m,
|
|
9
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
-
), p = (c) => {
|
|
11
|
-
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
-
return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
13
|
-
};
|
|
14
|
-
p.displayName = m;
|
|
15
|
-
const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
|
|
16
|
-
(c, e) => {
|
|
17
|
-
const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
|
|
18
|
-
return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
C.displayName = a;
|
|
22
|
-
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
|
|
23
|
-
(c, e) => {
|
|
24
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
|
|
25
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => {
|
|
26
|
-
i.itemMap.delete(n);
|
|
27
|
-
})), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
x.displayName = u;
|
|
31
|
-
function O(c) {
|
|
32
|
-
const e = f(s + "CollectionConsumer", c);
|
|
33
|
-
return r.useCallback(() => {
|
|
34
|
-
const o = e.collectionRef.current;
|
|
35
|
-
if (!o) return [];
|
|
36
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
37
|
-
return Array.from(e.itemMap.values()).sort(
|
|
38
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
39
|
-
);
|
|
40
|
-
}, [e.collectionRef, e.itemMap]);
|
|
41
|
-
}
|
|
42
|
-
return [
|
|
43
|
-
{ Provider: p, Slot: C, ItemSlot: x },
|
|
44
|
-
O,
|
|
45
|
-
E
|
|
46
|
-
];
|
|
47
|
-
}
|
|
1
|
+
var r = {};
|
|
48
2
|
export {
|
|
49
|
-
|
|
3
|
+
r as __exports
|
|
50
4
|
};
|
|
51
5
|
//# sourceMappingURL=index60.js.map
|
package/dist/index60.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index60.js","sources":["../../../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":";;;;;AAQA,SAASA,EAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAG,EAAE;AAAA,EAC1E,GACQM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE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G,EAAM,YAAY,MAAM;AACvC,YAAMiB,IAAiBT,EAAQ,cAAc;AAC7C,UAAI,CAACS,EAAgB,QAAO,CAAA;AAC5B,YAAMC,IAAe,MAAM,KAAKD,EAAe,iBAAiB,IAAIL,CAAc,GAAG,CAAC;AAKtF,aAJc,MAAM,KAAKJ,EAAQ,QAAQ,QAAQ,EACtB;AAAA,QACzB,CAACW,GAAGC,MAAMF,EAAa,QAAQC,EAAE,IAAI,OAAO,IAAID,EAAa,QAAQE,EAAE,IAAI,OAAO;AAAA,MAC1F;AAAA,IAEI,GAAG,CAACZ,EAAQ,eAAeA,EAAQ,OAAO,CAAC;AAAA,EAE7C;AACA,SAAO;AAAA,IACL,EAAE,UAAUb,GAAoB,MAAMW,GAAgB,UAAUQ,EAAkB;AAAA,IAClFE;AAAA,IACAzB;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index60.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index61.js
CHANGED
|
@@ -1,54 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { j as _ } from "./index30.js";
|
|
3
|
-
function P(e, p = []) {
|
|
4
|
-
let n = [];
|
|
5
|
-
function m(s, t) {
|
|
6
|
-
const o = u.createContext(t), r = n.length;
|
|
7
|
-
n = [...n, t];
|
|
8
|
-
const a = (i) => {
|
|
9
|
-
const { scope: f, children: C, ...x } = i, d = f?.[e]?.[r] || o, v = u.useMemo(() => x, Object.values(x));
|
|
10
|
-
return /* @__PURE__ */ _.jsx(d.Provider, { value: v, children: C });
|
|
11
|
-
};
|
|
12
|
-
a.displayName = s + "Provider";
|
|
13
|
-
function S(i, f) {
|
|
14
|
-
const C = f?.[e]?.[r] || o, x = u.useContext(C);
|
|
15
|
-
if (x) return x;
|
|
16
|
-
if (t !== void 0) return t;
|
|
17
|
-
throw new Error(`\`${i}\` must be used within \`${s}\``);
|
|
18
|
-
}
|
|
19
|
-
return [a, S];
|
|
20
|
-
}
|
|
21
|
-
const c = () => {
|
|
22
|
-
const s = n.map((t) => u.createContext(t));
|
|
23
|
-
return function(o) {
|
|
24
|
-
const r = o?.[e] || s;
|
|
25
|
-
return u.useMemo(
|
|
26
|
-
() => ({ [`__scope${e}`]: { ...o, [e]: r } }),
|
|
27
|
-
[o, r]
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
return c.scopeName = e, [m, h(c, ...p)];
|
|
32
|
-
}
|
|
33
|
-
function h(...e) {
|
|
34
|
-
const p = e[0];
|
|
35
|
-
if (e.length === 1) return p;
|
|
36
|
-
const n = () => {
|
|
37
|
-
const m = e.map((c) => ({
|
|
38
|
-
useScope: c(),
|
|
39
|
-
scopeName: c.scopeName
|
|
40
|
-
}));
|
|
41
|
-
return function(s) {
|
|
42
|
-
const t = m.reduce((o, { useScope: r, scopeName: a }) => {
|
|
43
|
-
const i = r(s)[`__scope${a}`];
|
|
44
|
-
return { ...o, ...i };
|
|
45
|
-
}, {});
|
|
46
|
-
return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
return n.scopeName = p.scopeName, n;
|
|
50
|
-
}
|
|
1
|
+
var e = {};
|
|
51
2
|
export {
|
|
52
|
-
|
|
3
|
+
e as __exports
|
|
53
4
|
};
|
|
54
5
|
//# sourceMappingURL=index61.js.map
|
package/dist/index61.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index61.js","sources":[
|
|
1
|
+
{"version":3,"file":"index61.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index62.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var r = t.createContext(void 0);
|
|
4
|
-
function n(o) {
|
|
5
|
-
const e = t.useContext(r);
|
|
6
|
-
return o || e || "ltr";
|
|
1
|
+
function m(t, [a, n]) {
|
|
2
|
+
return Math.min(n, Math.max(a, t));
|
|
7
3
|
}
|
|
8
4
|
export {
|
|
9
|
-
|
|
5
|
+
m as clamp
|
|
10
6
|
};
|
|
11
7
|
//# sourceMappingURL=index62.js.map
|
package/dist/index62.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index62.js","sources":["../../../node_modules/@radix-ui/
|
|
1
|
+
{"version":3,"file":"index62.js","sources":["../../../node_modules/@radix-ui/number/dist/index.mjs"],"sourcesContent":["// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["clamp","value","min","max"],"mappings":"AACA,SAASA,EAAMC,GAAO,CAACC,GAAKC,CAAG,GAAG;AAChC,SAAO,KAAK,IAAIA,GAAK,KAAK,IAAID,GAAKD,CAAK,CAAC;AAC3C;","x_google_ignoreList":[0]}
|
package/dist/index63.js
CHANGED
|
@@ -1,18 +1,51 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { createContextScope as y } from "./index64.js";
|
|
3
|
+
import { useComposedRefs as S } from "./index57.js";
|
|
4
|
+
import { createSlot as M } from "./index174.js";
|
|
5
|
+
import { j as d } from "./index30.js";
|
|
6
|
+
function D(s) {
|
|
7
|
+
const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
|
|
8
|
+
m,
|
|
9
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
+
), p = (c) => {
|
|
11
|
+
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
+
return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
13
|
+
};
|
|
14
|
+
p.displayName = m;
|
|
15
|
+
const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
|
|
16
|
+
(c, e) => {
|
|
17
|
+
const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
|
|
18
|
+
return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
C.displayName = a;
|
|
22
|
+
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
|
|
23
|
+
(c, e) => {
|
|
24
|
+
const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
|
|
25
|
+
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => {
|
|
26
|
+
i.itemMap.delete(n);
|
|
27
|
+
})), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
x.displayName = u;
|
|
31
|
+
function O(c) {
|
|
32
|
+
const e = f(s + "CollectionConsumer", c);
|
|
33
|
+
return r.useCallback(() => {
|
|
34
|
+
const o = e.collectionRef.current;
|
|
35
|
+
if (!o) return [];
|
|
36
|
+
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
37
|
+
return Array.from(e.itemMap.values()).sort(
|
|
38
|
+
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
39
|
+
);
|
|
40
|
+
}, [e.collectionRef, e.itemMap]);
|
|
41
|
+
}
|
|
42
|
+
return [
|
|
43
|
+
{ Provider: p, Slot: C, ItemSlot: x },
|
|
44
|
+
O,
|
|
45
|
+
E
|
|
46
|
+
];
|
|
14
47
|
}
|
|
15
48
|
export {
|
|
16
|
-
|
|
49
|
+
D as createCollection
|
|
17
50
|
};
|
|
18
51
|
//# sourceMappingURL=index63.js.map
|
package/dist/index63.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index63.js","sources":["../../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\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 return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\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}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACF;AAAA,EACF,GAAG,CAAA,CAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index63.js","sources":["../../../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":";;;;;AAQA,SAASA,EAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAG,EAAE;AAAA,EAC1E,GACQM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAAA,IAAIT,GAAwB,EAAE,OAAAI,GAAO,SAAAI,GAAS,eAAeF,GAAK,UA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