@devalok/shilp-sutra 0.6.1 → 0.7.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/_virtual/client.js +5 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/react-dom-client.development.js +5 -0
- package/dist/_virtual/react-dom-client.production.js +5 -0
- package/dist/_virtual/scheduler.development.js +5 -0
- package/dist/_virtual/scheduler.production.js +5 -0
- package/dist/_virtual/shilp-sutra.js +5 -0
- package/dist/_virtual/shilp-sutra2.js +5 -0
- package/dist/composed/confirm-dialog.d.ts +27 -0
- package/dist/composed/confirm-dialog.d.ts.map +1 -0
- package/dist/composed/confirm-dialog.js +45 -0
- package/dist/composed/extensions/emoji-suggestion.d.ts +8 -0
- package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -0
- package/dist/composed/extensions/emoji-suggestion.js +119 -0
- package/dist/composed/extensions/file-attachment.d.ts +3 -0
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -0
- package/dist/composed/extensions/file-attachment.js +55 -0
- package/dist/composed/extensions/mention-suggestion.d.ts +10 -0
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -0
- package/dist/composed/extensions/mention-suggestion.js +79 -0
- package/dist/composed/index.d.ts +3 -1
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +28 -26
- package/dist/composed/rich-text-editor.d.ts +19 -0
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +320 -161
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +17062 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +9790 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +20 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +237 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +234 -0
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +11 -0
- package/dist/primitives/_internal/react-arrow.js +8 -19
- package/dist/primitives/_internal/react-compose-refs.js +14 -14
- package/dist/primitives/_internal/react-context.js +41 -39
- package/dist/primitives/_internal/react-dismissable-layer.js +62 -90
- package/dist/primitives/_internal/react-popper.js +107 -169
- package/dist/primitives/_internal/react-portal.js +1 -1
- package/dist/primitives/_internal/react-primitive.js +1 -1
- package/dist/primitives/_internal/react-use-size.js +8 -8
- package/dist/primitives/react-slot.js +12 -12
- package/dist/shell/app-command-palette.d.ts +3 -1
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +35 -34
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +31 -31
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts +10 -0
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +129 -117
- package/dist/shell/top-bar.d.ts +20 -0
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +100 -70
- package/dist/tailwind/index.cjs +1 -0
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +1 -0
- package/dist/tokens/semantic.css +7 -0
- package/dist/ui/alert.js +42 -63
- package/dist/ui/avatar.js +20 -62
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +88 -112
- package/dist/ui/button-group.js +14 -29
- package/dist/ui/button.js +64 -108
- package/dist/ui/card.js +18 -62
- package/dist/ui/checkbox.js +1 -21
- package/dist/ui/color-input.d.ts +17 -0
- package/dist/ui/color-input.d.ts.map +1 -0
- package/dist/ui/color-input.js +87 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +314 -312
- package/dist/ui/input.js +25 -51
- package/dist/ui/label.js +1 -15
- package/dist/ui/popover.js +6 -6
- package/dist/ui/separator.js +4 -19
- package/dist/ui/spinner.js +1 -36
- package/dist/ui/switch.js +1 -20
- package/dist/ui/tabs.js +20 -47
- package/dist/ui/tooltip.js +6 -17
- package/llms-full.txt +1861 -0
- package/llms.txt +183 -0
- package/package.json +71 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as r from "react";
|
|
3
3
|
import { composeEventHandlers as m } from "./primitive.js";
|
|
4
4
|
import { Primitive as g, dispatchDiscreteCustomEvent as z } from "./react-primitive.js";
|
|
5
5
|
import { useComposedRefs as w } from "./react-compose-refs.js";
|
|
@@ -7,120 +7,92 @@ import { useCallbackRef as B } from "./react-use-callback-ref.js";
|
|
|
7
7
|
import { useEscapeKeydown as H } from "./react-use-escape-keydown.js";
|
|
8
8
|
const M = "DismissableLayer", y = "dismissableLayer.update", j = "dismissableLayer.pointerDownOutside", X = "dismissableLayer.focusOutside";
|
|
9
9
|
let L;
|
|
10
|
-
const T =
|
|
10
|
+
const T = r.createContext({
|
|
11
11
|
layers: /* @__PURE__ */ new Set(),
|
|
12
12
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
13
13
|
branches: /* @__PURE__ */ new Set()
|
|
14
|
-
}), x =
|
|
15
|
-
(r, e) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
|
40
|
-
}, [u, c]), n.useEffect(() => {
|
|
41
|
-
const s = () => A({});
|
|
42
|
-
return document.addEventListener(y, s), () => document.removeEventListener(y, s);
|
|
43
|
-
}, []), /* @__PURE__ */ R(
|
|
44
|
-
g.div,
|
|
45
|
-
{
|
|
46
|
-
...E,
|
|
47
|
-
ref: N,
|
|
48
|
-
style: {
|
|
49
|
-
pointerEvents: k ? P ? "auto" : "none" : void 0,
|
|
50
|
-
...r.style
|
|
51
|
-
},
|
|
52
|
-
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
|
53
|
-
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
|
54
|
-
onPointerDownCapture: m(
|
|
55
|
-
r.onPointerDownCapture,
|
|
56
|
-
U.onPointerDownCapture
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
14
|
+
}), x = r.forwardRef((i, e) => {
|
|
15
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: t, onFocusOutside: c, onInteractOutside: l, onDismiss: d, ...v } = i, s = r.useContext(T), [u, W] = r.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, A] = r.useState({}), N = w(e, (n) => W(n)), p = Array.from(s.layers), [I] = [...s.layersWithOutsidePointerEventsDisabled].slice(-1), _ = p.indexOf(I), b = u ? p.indexOf(u) : -1, k = s.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= _, U = q((n) => {
|
|
16
|
+
const E = n.target, C = [...s.branches].some((h) => h.contains(E));
|
|
17
|
+
!P || C || (t == null || t(n), l == null || l(n), n.defaultPrevented || d == null || d());
|
|
18
|
+
}, f), D = G((n) => {
|
|
19
|
+
const E = n.target;
|
|
20
|
+
[...s.branches].some((h) => h.contains(E)) || (c == null || c(n), l == null || l(n), n.defaultPrevented || d == null || d());
|
|
21
|
+
}, f);
|
|
22
|
+
return H((n) => {
|
|
23
|
+
b === s.layers.size - 1 && (a == null || a(n), !n.defaultPrevented && d && (n.preventDefault(), d()));
|
|
24
|
+
}, f), r.useEffect(() => {
|
|
25
|
+
if (u)
|
|
26
|
+
return o && (s.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), s.layersWithOutsidePointerEventsDisabled.add(u)), s.layers.add(u), O(), () => {
|
|
27
|
+
o && s.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
|
|
28
|
+
};
|
|
29
|
+
}, [u, f, o, s]), r.useEffect(() => () => {
|
|
30
|
+
u && (s.layers.delete(u), s.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
|
31
|
+
}, [u, s]), r.useEffect(() => {
|
|
32
|
+
const n = () => A({});
|
|
33
|
+
return document.addEventListener(y, n), () => document.removeEventListener(y, n);
|
|
34
|
+
}, []), R(g.div, { ...v, ref: N, style: {
|
|
35
|
+
pointerEvents: k ? P ? "auto" : "none" : void 0,
|
|
36
|
+
...i.style
|
|
37
|
+
}, onFocusCapture: m(i.onFocusCapture, D.onFocusCapture), onBlurCapture: m(i.onBlurCapture, D.onBlurCapture), onPointerDownCapture: m(i.onPointerDownCapture, U.onPointerDownCapture) });
|
|
38
|
+
});
|
|
62
39
|
x.displayName = M;
|
|
63
|
-
const Y = "DismissableLayerBranch", S =
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
69
|
-
|
|
40
|
+
const Y = "DismissableLayerBranch", S = r.forwardRef((i, e) => {
|
|
41
|
+
const o = r.useContext(T), a = r.useRef(null), t = w(e, a);
|
|
42
|
+
return r.useEffect(() => {
|
|
43
|
+
const c = a.current;
|
|
44
|
+
if (c)
|
|
45
|
+
return o.branches.add(c), () => {
|
|
46
|
+
o.branches.delete(c);
|
|
70
47
|
};
|
|
71
|
-
}, [
|
|
48
|
+
}, [o.branches]), R(g.div, { ...i, ref: t });
|
|
72
49
|
});
|
|
73
50
|
S.displayName = Y;
|
|
74
|
-
function q(
|
|
75
|
-
const
|
|
51
|
+
function q(i, e = globalThis == null ? void 0 : globalThis.document) {
|
|
52
|
+
const o = B(i), a = r.useRef(!1), t = r.useRef(() => {
|
|
76
53
|
});
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
if (d.target && !
|
|
80
|
-
let
|
|
81
|
-
F(
|
|
82
|
-
j,
|
|
83
|
-
i,
|
|
84
|
-
c,
|
|
85
|
-
{ discrete: !0 }
|
|
86
|
-
);
|
|
54
|
+
return r.useEffect(() => {
|
|
55
|
+
const c = (d) => {
|
|
56
|
+
if (d.target && !a.current) {
|
|
57
|
+
let s = function() {
|
|
58
|
+
F(j, o, v, { discrete: !0 });
|
|
87
59
|
};
|
|
88
|
-
const
|
|
89
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current =
|
|
60
|
+
const v = { originalEvent: d };
|
|
61
|
+
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = s, e.addEventListener("click", t.current, { once: !0 })) : s();
|
|
90
62
|
} else
|
|
91
63
|
e.removeEventListener("click", t.current);
|
|
92
|
-
|
|
64
|
+
a.current = !1;
|
|
93
65
|
}, l = window.setTimeout(() => {
|
|
94
|
-
e.addEventListener("pointerdown",
|
|
66
|
+
e.addEventListener("pointerdown", c);
|
|
95
67
|
}, 0);
|
|
96
68
|
return () => {
|
|
97
|
-
window.clearTimeout(l), e.removeEventListener("pointerdown",
|
|
69
|
+
window.clearTimeout(l), e.removeEventListener("pointerdown", c), e.removeEventListener("click", t.current);
|
|
98
70
|
};
|
|
99
|
-
}, [e,
|
|
100
|
-
onPointerDownCapture: () =>
|
|
71
|
+
}, [e, o]), {
|
|
72
|
+
onPointerDownCapture: () => a.current = !0
|
|
101
73
|
};
|
|
102
74
|
}
|
|
103
|
-
function G(
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
const t = (
|
|
107
|
-
|
|
75
|
+
function G(i, e = globalThis == null ? void 0 : globalThis.document) {
|
|
76
|
+
const o = B(i), a = r.useRef(!1);
|
|
77
|
+
return r.useEffect(() => {
|
|
78
|
+
const t = (c) => {
|
|
79
|
+
c.target && !a.current && F(X, o, { originalEvent: c }, {
|
|
108
80
|
discrete: !1
|
|
109
81
|
});
|
|
110
82
|
};
|
|
111
83
|
return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
|
|
112
|
-
}, [e,
|
|
113
|
-
onFocusCapture: () =>
|
|
114
|
-
onBlurCapture: () =>
|
|
84
|
+
}, [e, o]), {
|
|
85
|
+
onFocusCapture: () => a.current = !0,
|
|
86
|
+
onBlurCapture: () => a.current = !1
|
|
115
87
|
};
|
|
116
88
|
}
|
|
117
89
|
function O() {
|
|
118
|
-
const
|
|
119
|
-
document.dispatchEvent(
|
|
90
|
+
const i = new CustomEvent(y);
|
|
91
|
+
document.dispatchEvent(i);
|
|
120
92
|
}
|
|
121
|
-
function F(
|
|
122
|
-
const t =
|
|
123
|
-
e && t.addEventListener(
|
|
93
|
+
function F(i, e, o, { discrete: a }) {
|
|
94
|
+
const t = o.originalEvent.target, c = new CustomEvent(i, { bubbles: !1, cancelable: !0, detail: o });
|
|
95
|
+
e && t.addEventListener(i, e, { once: !0 }), a ? z(t, c) : t.dispatchEvent(c);
|
|
124
96
|
}
|
|
125
97
|
const ee = x, te = S;
|
|
126
98
|
export {
|
|
@@ -1,199 +1,137 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import { useFloating as
|
|
4
|
-
import { Root as
|
|
3
|
+
import { useFloating as xe, offset as Pe, shift as ye, limitShift as Ae, flip as Ce, size as Se, arrow as be, hide as Oe, autoUpdate as Re } from "@floating-ui/react-dom";
|
|
4
|
+
import { Root as Ee } from "./react-arrow.js";
|
|
5
5
|
import { useComposedRefs as j } from "./react-compose-refs.js";
|
|
6
|
-
import { createContextScope as
|
|
6
|
+
import { createContextScope as ve } from "./react-context.js";
|
|
7
7
|
import { Primitive as z } from "./react-primitive.js";
|
|
8
|
-
import { useCallbackRef as
|
|
8
|
+
import { useCallbackRef as Ne } from "./react-use-callback-ref.js";
|
|
9
9
|
import { useLayoutEffect as T } from "./react-use-layout-effect.js";
|
|
10
|
-
import { useSize as
|
|
11
|
-
const N = "Popper", [Z,
|
|
12
|
-
const { __scopePopper: a, children: i } =
|
|
13
|
-
return
|
|
10
|
+
import { useSize as _e } from "./react-use-size.js";
|
|
11
|
+
const N = "Popper", [Z, Le] = ve(N), [$e, L] = Z(N), U = (e) => {
|
|
12
|
+
const { __scopePopper: a, children: i } = e, [t, s] = p.useState(null);
|
|
13
|
+
return f($e, { scope: a, anchor: t, onAnchorChange: s, children: i });
|
|
14
14
|
};
|
|
15
15
|
U.displayName = N;
|
|
16
|
-
const q = "PopperAnchor", G = p.forwardRef(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
);
|
|
16
|
+
const q = "PopperAnchor", G = p.forwardRef((e, a) => {
|
|
17
|
+
const { __scopePopper: i, virtualRef: t, ...s } = e, o = L(q, i), r = p.useRef(null), w = j(a, r), n = p.useRef(null);
|
|
18
|
+
return p.useEffect(() => {
|
|
19
|
+
const c = n.current;
|
|
20
|
+
n.current = (t == null ? void 0 : t.current) || r.current, c !== n.current && o.onAnchorChange(n.current);
|
|
21
|
+
}), t ? null : f(z.div, { ...s, ref: w });
|
|
22
|
+
});
|
|
25
23
|
G.displayName = q;
|
|
26
|
-
const _ = "PopperContent", [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
ref: st.setFloating,
|
|
84
|
-
"data-radix-popper-content-wrapper": "",
|
|
85
|
-
style: {
|
|
86
|
-
...W,
|
|
87
|
-
transform: O ? W.transform : "translate(0, -200%)",
|
|
88
|
-
minWidth: "max-content",
|
|
89
|
-
zIndex: ft,
|
|
90
|
-
"--radix-popper-transform-origin": [
|
|
91
|
-
(D = g.transformOrigin) == null ? void 0 : D.x,
|
|
92
|
-
(F = g.transformOrigin) == null ? void 0 : F.y
|
|
93
|
-
].join(" "),
|
|
94
|
-
...((k = g.hide) == null ? void 0 : k.referenceHidden) && {
|
|
95
|
-
visibility: "hidden",
|
|
96
|
-
pointerEvents: "none"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
dir: t.dir,
|
|
100
|
-
children: /* @__PURE__ */ f(
|
|
101
|
-
Ht,
|
|
102
|
-
{
|
|
103
|
-
scope: i,
|
|
104
|
-
placedSide: I,
|
|
105
|
-
onArrowChange: et,
|
|
106
|
-
arrowX: pt,
|
|
107
|
-
arrowY: dt,
|
|
108
|
-
shouldHideArrow: lt,
|
|
109
|
-
children: /* @__PURE__ */ f(
|
|
110
|
-
z.div,
|
|
111
|
-
{
|
|
112
|
-
"data-side": I,
|
|
113
|
-
"data-align": ct,
|
|
114
|
-
...d,
|
|
115
|
-
ref: tt,
|
|
116
|
-
style: {
|
|
117
|
-
...d.style,
|
|
118
|
-
animation: O ? void 0 : "none"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
);
|
|
24
|
+
const _ = "PopperContent", [He, We] = Z(_), J = p.forwardRef((e, a) => {
|
|
25
|
+
var I, X, M, D, F, k;
|
|
26
|
+
const { __scopePopper: i, side: t = "bottom", sideOffset: s = 0, align: o = "center", alignOffset: r = 0, arrowPadding: w = 0, avoidCollisions: n = !0, collisionBoundary: c = [], collisionPadding: x = 0, sticky: m = "partial", hideWhenDetached: y = !1, updatePositionStrategy: A = "optimized", onPlaced: l, ...d } = e, C = L(_, i), [h, S] = p.useState(null), ee = j(a, (P) => S(P)), [v, te] = p.useState(null), u = _e(v), oe = (u == null ? void 0 : u.width) ?? 0, $ = (u == null ? void 0 : u.height) ?? 0, re = t + (o !== "center" ? "-" + o : ""), ne = typeof x == "number" ? x : { top: 0, right: 0, bottom: 0, left: 0, ...x }, H = Array.isArray(c) ? c : [c], ie = H.length > 0, b = {
|
|
27
|
+
padding: ne,
|
|
28
|
+
boundary: H.filter(Ie),
|
|
29
|
+
altBoundary: ie
|
|
30
|
+
}, { refs: se, floatingStyles: W, placement: ae, isPositioned: O, middlewareData: g } = xe({
|
|
31
|
+
strategy: "fixed",
|
|
32
|
+
placement: re,
|
|
33
|
+
whileElementsMounted: (...P) => Re(...P, { animationFrame: A === "always" }),
|
|
34
|
+
elements: { reference: C.anchor },
|
|
35
|
+
middleware: [
|
|
36
|
+
Pe({ mainAxis: s + $, alignmentAxis: r }),
|
|
37
|
+
n && ye({
|
|
38
|
+
mainAxis: !0,
|
|
39
|
+
crossAxis: !1,
|
|
40
|
+
limiter: m === "partial" ? Ae() : void 0,
|
|
41
|
+
...b
|
|
42
|
+
}),
|
|
43
|
+
n && Ce({ ...b }),
|
|
44
|
+
Se({
|
|
45
|
+
...b,
|
|
46
|
+
apply: ({ elements: P, rects: B, availableWidth: he, availableHeight: ue }) => {
|
|
47
|
+
const { width: ge, height: we } = B.reference, E = P.floating.style;
|
|
48
|
+
E.setProperty("--radix-popper-available-width", `${he}px`), E.setProperty("--radix-popper-available-height", `${ue}px`), E.setProperty("--radix-popper-anchor-width", `${ge}px`), E.setProperty("--radix-popper-anchor-height", `${we}px`);
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
v && be({ element: v, padding: w }),
|
|
52
|
+
Xe({ arrowWidth: oe, arrowHeight: $ }),
|
|
53
|
+
y && Oe({ strategy: "referenceHidden", ...b })
|
|
54
|
+
]
|
|
55
|
+
}), [Y, ce] = V(ae), R = Ne(l);
|
|
56
|
+
T(() => {
|
|
57
|
+
O && (R == null || R());
|
|
58
|
+
}, [O, R]);
|
|
59
|
+
const pe = (I = g.arrow) == null ? void 0 : I.x, de = (X = g.arrow) == null ? void 0 : X.y, le = ((M = g.arrow) == null ? void 0 : M.centerOffset) !== 0, [fe, me] = p.useState();
|
|
60
|
+
return T(() => {
|
|
61
|
+
h && me(window.getComputedStyle(h).zIndex);
|
|
62
|
+
}, [h]), f("div", { ref: se.setFloating, "data-radix-popper-content-wrapper": "", style: {
|
|
63
|
+
...W,
|
|
64
|
+
transform: O ? W.transform : "translate(0, -200%)",
|
|
65
|
+
minWidth: "max-content",
|
|
66
|
+
zIndex: fe,
|
|
67
|
+
"--radix-popper-transform-origin": [
|
|
68
|
+
(D = g.transformOrigin) == null ? void 0 : D.x,
|
|
69
|
+
(F = g.transformOrigin) == null ? void 0 : F.y
|
|
70
|
+
].join(" "),
|
|
71
|
+
...((k = g.hide) == null ? void 0 : k.referenceHidden) && {
|
|
72
|
+
visibility: "hidden",
|
|
73
|
+
pointerEvents: "none"
|
|
74
|
+
}
|
|
75
|
+
}, dir: e.dir, children: f(He, { scope: i, placedSide: Y, onArrowChange: te, arrowX: pe, arrowY: de, shouldHideArrow: le, children: f(z.div, { "data-side": Y, "data-align": ce, ...d, ref: ee, style: {
|
|
76
|
+
...d.style,
|
|
77
|
+
animation: O ? void 0 : "none"
|
|
78
|
+
} }) }) });
|
|
79
|
+
});
|
|
128
80
|
J.displayName = _;
|
|
129
|
-
const K = "PopperArrow",
|
|
81
|
+
const K = "PopperArrow", Ye = {
|
|
130
82
|
top: "bottom",
|
|
131
83
|
right: "left",
|
|
132
84
|
bottom: "top",
|
|
133
85
|
left: "right"
|
|
134
86
|
}, Q = p.forwardRef(function(a, i) {
|
|
135
|
-
const { __scopePopper:
|
|
136
|
-
return
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
156
|
-
}[o.placedSide],
|
|
157
|
-
visibility: o.shouldHideArrow ? "hidden" : void 0
|
|
158
|
-
},
|
|
159
|
-
children: /* @__PURE__ */ f(
|
|
160
|
-
vt,
|
|
161
|
-
{
|
|
162
|
-
...s,
|
|
163
|
-
ref: i,
|
|
164
|
-
style: { ...s.style, display: "block" }
|
|
165
|
-
}
|
|
166
|
-
)
|
|
167
|
-
}
|
|
168
|
-
);
|
|
87
|
+
const { __scopePopper: t, ...s } = a, o = We(K, t), r = Ye[o.placedSide];
|
|
88
|
+
return f("span", { ref: o.onArrowChange, style: {
|
|
89
|
+
position: "absolute",
|
|
90
|
+
left: o.arrowX,
|
|
91
|
+
top: o.arrowY,
|
|
92
|
+
[r]: 0,
|
|
93
|
+
transformOrigin: {
|
|
94
|
+
top: "",
|
|
95
|
+
right: "0 0",
|
|
96
|
+
bottom: "center 0",
|
|
97
|
+
left: "100% 0"
|
|
98
|
+
}[o.placedSide],
|
|
99
|
+
transform: {
|
|
100
|
+
top: "translateY(100%)",
|
|
101
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
102
|
+
bottom: "rotate(180deg)",
|
|
103
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
104
|
+
}[o.placedSide],
|
|
105
|
+
visibility: o.shouldHideArrow ? "hidden" : void 0
|
|
106
|
+
}, children: f(Ee, { ...s, ref: i, style: { ...s.style, display: "block" } }) });
|
|
169
107
|
});
|
|
170
108
|
Q.displayName = K;
|
|
171
|
-
function
|
|
172
|
-
return
|
|
109
|
+
function Ie(e) {
|
|
110
|
+
return e !== null;
|
|
173
111
|
}
|
|
174
|
-
const
|
|
112
|
+
const Xe = (e) => ({
|
|
175
113
|
name: "transformOrigin",
|
|
176
|
-
options:
|
|
114
|
+
options: e,
|
|
177
115
|
fn(a) {
|
|
178
|
-
var C, h,
|
|
179
|
-
const { placement: i, rects:
|
|
116
|
+
var C, h, S;
|
|
117
|
+
const { placement: i, rects: t, middlewareData: s } = a, r = ((C = s.arrow) == null ? void 0 : C.centerOffset) !== 0, w = r ? 0 : e.arrowWidth, n = r ? 0 : e.arrowHeight, [c, x] = V(i), m = { start: "0%", center: "50%", end: "100%" }[x], y = (((h = s.arrow) == null ? void 0 : h.x) ?? 0) + w / 2, A = (((S = s.arrow) == null ? void 0 : S.y) ?? 0) + n / 2;
|
|
180
118
|
let l = "", d = "";
|
|
181
|
-
return c === "bottom" ? (l = r ? m : `${y}px`, d = `${-n}px`) : c === "top" ? (l = r ? m : `${y}px`, d = `${
|
|
119
|
+
return c === "bottom" ? (l = r ? m : `${y}px`, d = `${-n}px`) : c === "top" ? (l = r ? m : `${y}px`, d = `${t.floating.height + n}px`) : c === "right" ? (l = `${-n}px`, d = r ? m : `${A}px`) : c === "left" && (l = `${t.floating.width + n}px`, d = r ? m : `${A}px`), { data: { x: l, y: d } };
|
|
182
120
|
}
|
|
183
121
|
});
|
|
184
|
-
function V(
|
|
185
|
-
const [a, i = "center"] =
|
|
122
|
+
function V(e) {
|
|
123
|
+
const [a, i = "center"] = e.split("-");
|
|
186
124
|
return [a, i];
|
|
187
125
|
}
|
|
188
|
-
const
|
|
126
|
+
const Ue = U, qe = G, Ge = J, Je = Q;
|
|
189
127
|
export {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
128
|
+
qe as Anchor,
|
|
129
|
+
Je as Arrow,
|
|
130
|
+
Ge as Content,
|
|
193
131
|
U as Popper,
|
|
194
132
|
G as PopperAnchor,
|
|
195
133
|
Q as PopperArrow,
|
|
196
134
|
J as PopperContent,
|
|
197
|
-
|
|
198
|
-
|
|
135
|
+
Ue as Root,
|
|
136
|
+
Le as createPopperScope
|
|
199
137
|
};
|
|
@@ -8,7 +8,7 @@ const u = "Portal", d = r.forwardRef((e, a) => {
|
|
|
8
8
|
const { container: n, ...i } = e, [m, s] = r.useState(!1);
|
|
9
9
|
p(() => s(!0), []);
|
|
10
10
|
const t = n || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
|
|
11
|
-
return t ? f.createPortal(
|
|
11
|
+
return t ? f.createPortal(c(l.div, { ...i, ref: a }), t) : null;
|
|
12
12
|
});
|
|
13
13
|
d.displayName = u;
|
|
14
14
|
export {
|
|
@@ -23,7 +23,7 @@ const u = [
|
|
|
23
23
|
], h = u.reduce((t, i) => {
|
|
24
24
|
const r = l(`Primitive.${i}`), o = f.forwardRef((e, s) => {
|
|
25
25
|
const { asChild: m, ...n } = e, c = m ? r : i;
|
|
26
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0),
|
|
26
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), a(c, { ...n, ref: s });
|
|
27
27
|
});
|
|
28
28
|
return o.displayName = `Primitive.${i}`, { ...t, [i]: o };
|
|
29
29
|
}, {});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useLayoutEffect as
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { useLayoutEffect as h } from "./react-use-layout-effect.js";
|
|
3
3
|
function c(r) {
|
|
4
|
-
const [
|
|
5
|
-
return
|
|
4
|
+
const [b, e] = u.useState(void 0);
|
|
5
|
+
return h(() => {
|
|
6
6
|
if (r) {
|
|
7
7
|
e({ width: r.offsetWidth, height: r.offsetHeight });
|
|
8
8
|
const f = new ResizeObserver((i) => {
|
|
9
9
|
if (!Array.isArray(i) || !i.length)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
11
|
+
const n = i[0];
|
|
12
12
|
let o, t;
|
|
13
|
-
if ("borderBoxSize" in
|
|
14
|
-
const s =
|
|
13
|
+
if ("borderBoxSize" in n) {
|
|
14
|
+
const s = n.borderBoxSize, d = Array.isArray(s) ? s[0] : s;
|
|
15
15
|
o = d.inlineSize, t = d.blockSize;
|
|
16
16
|
} else
|
|
17
17
|
o = r.offsetWidth, t = r.offsetHeight;
|
|
@@ -20,7 +20,7 @@ function c(r) {
|
|
|
20
20
|
return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
|
|
21
21
|
} else
|
|
22
22
|
e(void 0);
|
|
23
|
-
}, [r]),
|
|
23
|
+
}, [r]), b;
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
26
|
c as useSize
|
|
@@ -5,29 +5,29 @@ const E = Symbol.for("react.lazy"), p = l[" use ".trim().toString()];
|
|
|
5
5
|
function _(t) {
|
|
6
6
|
return typeof t == "object" && t !== null && "then" in t;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function y(t) {
|
|
9
9
|
return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && _(t._payload);
|
|
10
10
|
}
|
|
11
11
|
// @__NO_SIDE_EFFECTS__
|
|
12
12
|
function C(t) {
|
|
13
|
-
const e = /* @__PURE__ */
|
|
13
|
+
const e = /* @__PURE__ */ h(t), o = l.forwardRef((r, n) => {
|
|
14
14
|
let { children: i, ...a } = r;
|
|
15
|
-
|
|
15
|
+
y(i) && typeof p == "function" && (i = p(i._payload));
|
|
16
16
|
const s = l.Children.toArray(i), c = s.find(P);
|
|
17
17
|
if (c) {
|
|
18
|
-
const f = c.props.children, S = s.map((
|
|
19
|
-
return
|
|
18
|
+
const f = c.props.children, S = s.map((d) => d === c ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : d);
|
|
19
|
+
return u(e, { ...a, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, S) : null });
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return u(e, { ...a, ref: n, children: i });
|
|
22
22
|
});
|
|
23
23
|
return o.displayName = `${t}.Slot`, o;
|
|
24
24
|
}
|
|
25
25
|
const I = /* @__PURE__ */ C("Slot");
|
|
26
26
|
// @__NO_SIDE_EFFECTS__
|
|
27
|
-
function
|
|
27
|
+
function h(t) {
|
|
28
28
|
const e = l.forwardRef((o, r) => {
|
|
29
29
|
let { children: n, ...i } = o;
|
|
30
|
-
if (
|
|
30
|
+
if (y(n) && typeof p == "function" && (n = p(n._payload)), l.isValidElement(n)) {
|
|
31
31
|
const a = j(n), s = $(i, n.props);
|
|
32
32
|
return n.type !== l.Fragment && (s.ref = r ? g(r, a) : a), l.cloneElement(n, s);
|
|
33
33
|
}
|
|
@@ -37,11 +37,11 @@ function R(t) {
|
|
|
37
37
|
}
|
|
38
38
|
const m = Symbol("radix.slottable");
|
|
39
39
|
// @__NO_SIDE_EFFECTS__
|
|
40
|
-
function
|
|
41
|
-
const e = ({ children: o }) =>
|
|
40
|
+
function R(t) {
|
|
41
|
+
const e = ({ children: o }) => u(b, { children: o });
|
|
42
42
|
return e.displayName = `${t}.Slottable`, e.__radixId = m, e;
|
|
43
43
|
}
|
|
44
|
-
const V = /* @__PURE__ */
|
|
44
|
+
const V = /* @__PURE__ */ R("Slottable");
|
|
45
45
|
function P(t) {
|
|
46
46
|
return l.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === m;
|
|
47
47
|
}
|
|
@@ -66,5 +66,5 @@ export {
|
|
|
66
66
|
I as Slot,
|
|
67
67
|
V as Slottable,
|
|
68
68
|
C as createSlot,
|
|
69
|
-
|
|
69
|
+
R as createSlottable
|
|
70
70
|
};
|
|
@@ -15,6 +15,8 @@ export interface AppCommandPaletteUser {
|
|
|
15
15
|
export interface AppCommandPaletteProps {
|
|
16
16
|
/** Current user (used to determine admin access) */
|
|
17
17
|
user?: AppCommandPaletteUser | null;
|
|
18
|
+
/** When true, shows admin command groups regardless of user.role. Takes precedence over role-based detection. */
|
|
19
|
+
isAdmin?: boolean;
|
|
18
20
|
/** Additional command groups to show */
|
|
19
21
|
extraGroups?: CommandGroup[];
|
|
20
22
|
/** Called when the user selects a navigation target */
|
|
@@ -28,7 +30,7 @@ export interface AppCommandPaletteProps {
|
|
|
28
30
|
/** Called when the user selects a search result */
|
|
29
31
|
onSearchResultSelect?: (result: SearchResult) => void;
|
|
30
32
|
}
|
|
31
|
-
export declare function AppCommandPalette({ user, extraGroups, onNavigate, onSearch, searchResults, isSearching, onSearchResultSelect, }: AppCommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function AppCommandPalette({ user, isAdmin: isAdminProp, extraGroups, onNavigate, onSearch, searchResults, isSearching, onSearchResultSelect, }: AppCommandPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
32
34
|
export declare namespace AppCommandPalette {
|
|
33
35
|
var displayName: string;
|
|
34
36
|
}
|