@devalok/shilp-sutra 0.23.2 → 0.24.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/composed/command-palette.d.ts +32 -2
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +190 -142
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/index.d.ts +1 -1
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/shell/app-command-palette.d.ts +36 -5
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +158 -137
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/sidebar.js +1 -1
- package/dist/shell/top-bar.js +1 -1
- package/dist/ui/sidebar.js +3 -3
- package/llms-full.txt +1 -1
- package/llms.txt +5 -4
- package/package.json +1 -1
|
@@ -8,21 +8,51 @@
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
export interface CommandItem {
|
|
10
10
|
id: string;
|
|
11
|
-
label
|
|
12
|
-
|
|
11
|
+
/** Display label — string or ReactNode. When ReactNode, provide `filterValue` for search filtering. */
|
|
12
|
+
label: string | React.ReactNode;
|
|
13
|
+
/** Optional description — string or ReactNode. */
|
|
14
|
+
description?: string | React.ReactNode;
|
|
13
15
|
icon?: React.ReactNode;
|
|
16
|
+
/** Keyboard shortcut hint displayed as keycap badges (e.g., "G D", "Ctrl+N"). */
|
|
14
17
|
shortcut?: string;
|
|
18
|
+
/** Custom render override for the label. Receives the current search query for match highlighting. */
|
|
19
|
+
renderLabel?: (query: string) => React.ReactNode;
|
|
20
|
+
/** Plain-text value used for search filtering when `label` is a ReactNode. Falls back to `label` if string. */
|
|
21
|
+
filterValue?: string;
|
|
15
22
|
onSelect: () => void;
|
|
16
23
|
}
|
|
17
24
|
export interface CommandGroup {
|
|
18
25
|
label: string;
|
|
19
26
|
items: CommandItem[];
|
|
20
27
|
}
|
|
28
|
+
/** A single keyboard hint shown in the footer. */
|
|
29
|
+
export interface FooterHint {
|
|
30
|
+
/** Key(s) to display — rendered as text inside `<kbd>` or as an icon. */
|
|
31
|
+
keys: string;
|
|
32
|
+
/** Human-readable label for the hint (e.g., "Navigate", "Select"). */
|
|
33
|
+
label: string;
|
|
34
|
+
}
|
|
21
35
|
export interface CommandPaletteProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
22
36
|
groups?: CommandGroup[];
|
|
23
37
|
placeholder?: string;
|
|
24
38
|
onSearch?: (query: string) => void;
|
|
25
39
|
emptyMessage?: string;
|
|
40
|
+
/** Full custom empty state ReactNode — overrides `emptyMessage` when provided. */
|
|
41
|
+
emptyState?: React.ReactNode;
|
|
42
|
+
/** Controlled open state. */
|
|
43
|
+
open?: boolean;
|
|
44
|
+
/** Default open state for uncontrolled usage. */
|
|
45
|
+
defaultOpen?: boolean;
|
|
46
|
+
/** Called when the open state changes. */
|
|
47
|
+
onOpenChange?: (open: boolean) => void;
|
|
48
|
+
/** Keybinding(s) to toggle the palette. Pass `false` to disable.
|
|
49
|
+
* String format: modifier+key, e.g., 'mod+k', 'ctrl+shift+p'.
|
|
50
|
+
* 'mod' maps to Meta on macOS, Ctrl otherwise. */
|
|
51
|
+
keybinding?: string | string[] | false;
|
|
52
|
+
/** Max height of the results container. CSS value. Default '320px'. */
|
|
53
|
+
maxHeight?: string | number;
|
|
54
|
+
/** Custom footer keyboard hints. Pass `false` to hide the footer entirely. */
|
|
55
|
+
footerHints?: FooterHint[] | false;
|
|
26
56
|
}
|
|
27
57
|
declare const CommandPalette: React.ForwardRefExoticComponent<CommandPaletteProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
58
|
export { CommandPalette };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/composed/command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/composed/command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,uGAAuG;IACvG,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IAC/B,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IACtC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sGAAsG;IACtG,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;IAChD,+GAA+G;IAC/G,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACzB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAChF,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kFAAkF;IAClF,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE5B,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAEtC;;uDAEmD;IACnD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAA;IAEtC,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAE3B,8EAA8E;IAC9E,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;CACnC;AAyED,QAAA,MAAM,cAAc,4FAmanB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,104 +1,154 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
2
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { Dialog as
|
|
5
|
-
import { IconSearch as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { springs as
|
|
8
|
-
import { VisuallyHidden as
|
|
9
|
-
import {
|
|
10
|
-
|
|
4
|
+
import { Dialog as ne, DialogPortal as oe, DialogOverlay as ie, DialogContentRaw as de, DialogTitle as le, DialogDescription as ce } from "../ui/dialog.js";
|
|
5
|
+
import { IconSearch as fe, IconCornerDownLeft as B, IconArrowUp as ue, IconArrowDown as me } from "@tabler/icons-react";
|
|
6
|
+
import { cn as I } from "../ui/lib/utils.js";
|
|
7
|
+
import { springs as Q, tweens as T } from "../ui/lib/motion.js";
|
|
8
|
+
import { VisuallyHidden as pe } from "../ui/visually-hidden.js";
|
|
9
|
+
import { u as be } from "../_chunks/motion-provider.js";
|
|
10
|
+
import { m as h, A as xe } from "../_chunks/framer.js";
|
|
11
|
+
function U() {
|
|
12
|
+
var o;
|
|
13
|
+
if (typeof navigator > "u") return !1;
|
|
14
|
+
const a = ((o = navigator.userAgentData) == null ? void 0 : o.platform) ?? navigator.userAgent;
|
|
15
|
+
return /mac|iphone|ipad|ipod/i.test(a);
|
|
16
|
+
}
|
|
17
|
+
function ge(a) {
|
|
18
|
+
return a.filterValue ? a.filterValue : typeof a.label == "string" ? a.label : "";
|
|
19
|
+
}
|
|
20
|
+
function he(a) {
|
|
21
|
+
return typeof a.description == "string" ? a.description : "";
|
|
22
|
+
}
|
|
23
|
+
function ye(a, o) {
|
|
24
|
+
const y = o.toLowerCase().split("+"), w = y[y.length - 1], f = new Set(y.slice(0, -1)), A = U(), v = f.has("mod"), N = f.has("ctrl") || !A && v, d = f.has("meta") || A && v, l = f.has("shift"), b = f.has("alt");
|
|
25
|
+
return N && !a.ctrlKey || d && !a.metaKey || l && !a.shiftKey || b && !a.altKey || !N && !d && a.ctrlKey || !d && !N && a.metaKey || !l && a.shiftKey || !b && a.altKey ? !1 : a.key.toLowerCase() === w;
|
|
26
|
+
}
|
|
27
|
+
function we(a) {
|
|
28
|
+
return a.includes("+") ? a.split("+").map((o) => o.trim()).filter(Boolean) : a.split(/\s+/).filter(Boolean);
|
|
29
|
+
}
|
|
30
|
+
function ve(a) {
|
|
31
|
+
return a ? "⌘" : "Ctrl";
|
|
32
|
+
}
|
|
33
|
+
const Ne = n.forwardRef(
|
|
11
34
|
function({
|
|
12
|
-
groups:
|
|
13
|
-
placeholder:
|
|
14
|
-
onSearch:
|
|
15
|
-
emptyMessage:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
groups: o = [],
|
|
36
|
+
placeholder: y = "Search or jump to...",
|
|
37
|
+
onSearch: w,
|
|
38
|
+
emptyMessage: f = "No results found.",
|
|
39
|
+
emptyState: A,
|
|
40
|
+
open: v,
|
|
41
|
+
defaultOpen: N,
|
|
42
|
+
onOpenChange: d,
|
|
43
|
+
keybinding: l = "mod+k",
|
|
44
|
+
maxHeight: b = "320px",
|
|
45
|
+
footerHints: E,
|
|
46
|
+
className: G,
|
|
47
|
+
...H
|
|
48
|
+
}, J) {
|
|
49
|
+
const j = v !== void 0, [W, X] = n.useState(N ?? !1), k = j ? v : W, $ = n.useRef(k);
|
|
50
|
+
$.current = k;
|
|
51
|
+
const u = n.useCallback(
|
|
52
|
+
(e) => {
|
|
53
|
+
const s = typeof e == "function" ? e($.current) : e;
|
|
54
|
+
j || X(s), d == null || d(s);
|
|
55
|
+
},
|
|
56
|
+
[j, d]
|
|
57
|
+
), [_, V] = n.useState(""), [x, C] = n.useState(0), F = n.useRef(null), P = n.useRef(null), L = n.useId(), q = `command-palette-listbox-${L}`, { reducedMotion: m } = be(), K = { duration: 0 }, Y = n.useMemo(() => U(), []), g = n.useMemo(() => {
|
|
58
|
+
if (!_.trim()) return o;
|
|
59
|
+
const e = _.toLowerCase();
|
|
60
|
+
return o.map((s) => ({
|
|
23
61
|
...s,
|
|
24
62
|
items: s.items.filter(
|
|
25
|
-
(
|
|
26
|
-
var o;
|
|
27
|
-
return a.label.toLowerCase().includes(e) || ((o = a.description) == null ? void 0 : o.toLowerCase().includes(e));
|
|
28
|
-
}
|
|
63
|
+
(r) => ge(r).toLowerCase().includes(e) || he(r).toLowerCase().includes(e)
|
|
29
64
|
)
|
|
30
65
|
})).filter((s) => s.items.length > 0);
|
|
31
|
-
}, [
|
|
32
|
-
() =>
|
|
33
|
-
[
|
|
66
|
+
}, [o, _]), D = n.useMemo(
|
|
67
|
+
() => g.flatMap((e) => e.items),
|
|
68
|
+
[g]
|
|
34
69
|
);
|
|
35
70
|
n.useEffect(() => {
|
|
36
|
-
|
|
37
|
-
|
|
71
|
+
if (l === !1) return;
|
|
72
|
+
const e = Array.isArray(l) ? l : [l];
|
|
73
|
+
function s(r) {
|
|
74
|
+
for (const c of e)
|
|
75
|
+
if (ye(r, c)) {
|
|
76
|
+
r.preventDefault(), u((p) => !p);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
38
79
|
}
|
|
39
|
-
return document.addEventListener("keydown",
|
|
40
|
-
}, []), n.useEffect(() => {
|
|
41
|
-
|
|
80
|
+
return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
|
|
81
|
+
}, [l, u]), n.useEffect(() => {
|
|
82
|
+
k && (V(""), C(0), requestAnimationFrame(() => {
|
|
42
83
|
var e;
|
|
43
|
-
(e =
|
|
84
|
+
(e = F.current) == null || e.focus();
|
|
44
85
|
}));
|
|
45
|
-
}, [
|
|
46
|
-
const
|
|
86
|
+
}, [k]);
|
|
87
|
+
const Z = (e) => {
|
|
47
88
|
switch (e.key) {
|
|
48
89
|
case "ArrowDown": {
|
|
49
|
-
e.preventDefault(),
|
|
50
|
-
(s) => s <
|
|
90
|
+
e.preventDefault(), C(
|
|
91
|
+
(s) => s < D.length - 1 ? s + 1 : 0
|
|
51
92
|
);
|
|
52
93
|
break;
|
|
53
94
|
}
|
|
54
95
|
case "ArrowUp": {
|
|
55
|
-
e.preventDefault(),
|
|
56
|
-
(s) => s > 0 ? s - 1 :
|
|
96
|
+
e.preventDefault(), C(
|
|
97
|
+
(s) => s > 0 ? s - 1 : D.length - 1
|
|
57
98
|
);
|
|
58
99
|
break;
|
|
59
100
|
}
|
|
60
101
|
case "Enter": {
|
|
61
102
|
e.preventDefault();
|
|
62
|
-
const s =
|
|
63
|
-
s && (s.onSelect(),
|
|
103
|
+
const s = D[x];
|
|
104
|
+
s && (s.onSelect(), u(!1));
|
|
64
105
|
break;
|
|
65
106
|
}
|
|
66
107
|
case "Escape": {
|
|
67
|
-
e.preventDefault(),
|
|
108
|
+
e.preventDefault(), u(!1);
|
|
68
109
|
break;
|
|
69
110
|
}
|
|
70
111
|
}
|
|
71
112
|
};
|
|
72
113
|
n.useEffect(() => {
|
|
73
114
|
var s;
|
|
74
|
-
const e = (s =
|
|
75
|
-
`[data-command-index="${
|
|
115
|
+
const e = (s = P.current) == null ? void 0 : s.querySelector(
|
|
116
|
+
`[data-command-index="${x}"]`
|
|
76
117
|
);
|
|
77
118
|
e == null || e.scrollIntoView({ block: "nearest" });
|
|
78
|
-
}, [
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
},
|
|
119
|
+
}, [x]);
|
|
120
|
+
const O = (e) => {
|
|
121
|
+
V(e), C(0), w == null || w(e);
|
|
122
|
+
}, ee = n.useMemo(() => {
|
|
82
123
|
const e = /* @__PURE__ */ new Map();
|
|
83
124
|
let s = 0;
|
|
84
|
-
for (const
|
|
85
|
-
for (const
|
|
86
|
-
e.set(
|
|
125
|
+
for (const r of g)
|
|
126
|
+
for (const c of r.items)
|
|
127
|
+
e.set(c.id, s++);
|
|
87
128
|
return e;
|
|
88
|
-
}, [
|
|
89
|
-
|
|
129
|
+
}, [g]), te = m ? K : Q.snappy, R = m ? K : T.fade, M = m ? { opacity: 1, scale: 1, y: 0 } : void 0, se = typeof b == "number" ? `${b}px` : b, z = E === !1 ? !1 : E ?? [
|
|
130
|
+
{ keys: "↑↓", label: "Navigate" },
|
|
131
|
+
{ keys: "↵", label: "Select" },
|
|
132
|
+
{ keys: "Esc", label: "Close" }
|
|
133
|
+
], ae = n.useCallback(
|
|
134
|
+
(e) => {
|
|
135
|
+
u(e);
|
|
136
|
+
},
|
|
137
|
+
[u]
|
|
138
|
+
);
|
|
139
|
+
return /* @__PURE__ */ t(ne, { open: k, onOpenChange: ae, children: /* @__PURE__ */ i(oe, { children: [
|
|
90
140
|
/* @__PURE__ */ t(
|
|
91
|
-
|
|
141
|
+
ie,
|
|
92
142
|
{
|
|
93
143
|
className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
94
144
|
}
|
|
95
145
|
),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
146
|
+
/* @__PURE__ */ i(
|
|
147
|
+
de,
|
|
98
148
|
{
|
|
99
|
-
ref:
|
|
100
|
-
...
|
|
101
|
-
className:
|
|
149
|
+
ref: J,
|
|
150
|
+
...H,
|
|
151
|
+
className: I(
|
|
102
152
|
"fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2",
|
|
103
153
|
"overflow-hidden rounded-ds-xl border border-surface-border-strong bg-surface-overlay shadow-overlay",
|
|
104
154
|
"duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
@@ -106,24 +156,24 @@ const H = n.forwardRef(
|
|
|
106
156
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
107
157
|
"data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",
|
|
108
158
|
"data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2",
|
|
109
|
-
|
|
159
|
+
G
|
|
110
160
|
),
|
|
111
|
-
onKeyDown:
|
|
161
|
+
onKeyDown: Z,
|
|
112
162
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */ t(
|
|
115
|
-
/* @__PURE__ */ t(
|
|
163
|
+
/* @__PURE__ */ i(pe, { children: [
|
|
164
|
+
/* @__PURE__ */ t(le, { children: "Command Palette" }),
|
|
165
|
+
/* @__PURE__ */ t(ce, { children: "Search or jump to pages, projects, tasks, and actions" })
|
|
116
166
|
] }),
|
|
117
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-ds-04 border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
|
|
118
168
|
/* @__PURE__ */ t(
|
|
119
|
-
|
|
169
|
+
h.span,
|
|
120
170
|
{
|
|
121
|
-
initial: { opacity: 0, scale: 0.96 },
|
|
171
|
+
initial: M ?? { opacity: 0, scale: 0.96 },
|
|
122
172
|
animate: { opacity: 1, scale: 1 },
|
|
123
|
-
transition:
|
|
173
|
+
transition: te,
|
|
124
174
|
className: "inline-flex shrink-0",
|
|
125
175
|
children: /* @__PURE__ */ t(
|
|
126
|
-
|
|
176
|
+
fe,
|
|
127
177
|
{
|
|
128
178
|
className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
|
|
129
179
|
stroke: 1.5
|
|
@@ -134,16 +184,16 @@ const H = n.forwardRef(
|
|
|
134
184
|
/* @__PURE__ */ t(
|
|
135
185
|
"input",
|
|
136
186
|
{
|
|
137
|
-
ref:
|
|
138
|
-
value:
|
|
139
|
-
onChange: (e) =>
|
|
140
|
-
placeholder:
|
|
187
|
+
ref: F,
|
|
188
|
+
value: _,
|
|
189
|
+
onChange: (e) => O(e.target.value),
|
|
190
|
+
placeholder: y,
|
|
141
191
|
role: "combobox",
|
|
142
192
|
"aria-expanded": !0,
|
|
143
|
-
"aria-controls":
|
|
144
|
-
"aria-activedescendant":
|
|
193
|
+
"aria-controls": q,
|
|
194
|
+
"aria-activedescendant": D[x] ? `command-item-${L}-${D[x].id}` : void 0,
|
|
145
195
|
"aria-autocomplete": "list",
|
|
146
|
-
className:
|
|
196
|
+
className: I(
|
|
147
197
|
"flex-1 bg-transparent text-ds-base text-surface-fg outline-none",
|
|
148
198
|
"placeholder:text-surface-fg-subtle"
|
|
149
199
|
),
|
|
@@ -154,85 +204,93 @@ const H = n.forwardRef(
|
|
|
154
204
|
),
|
|
155
205
|
/* @__PURE__ */ t("kbd", { className: "hidden shrink-0 select-none rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b py-ds-01 text-ds-sm font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)] sm:inline-flex", children: "Esc" })
|
|
156
206
|
] }),
|
|
157
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ i(
|
|
158
208
|
"div",
|
|
159
209
|
{
|
|
160
|
-
ref:
|
|
161
|
-
id:
|
|
210
|
+
ref: P,
|
|
211
|
+
id: q,
|
|
162
212
|
role: "listbox",
|
|
163
213
|
"aria-label": "Command results",
|
|
164
|
-
className: "
|
|
214
|
+
className: "overflow-y-auto px-ds-03 py-ds-03",
|
|
215
|
+
style: { maxHeight: se },
|
|
165
216
|
children: [
|
|
166
|
-
|
|
167
|
-
|
|
217
|
+
g.length === 0 && /* @__PURE__ */ t(
|
|
218
|
+
h.div,
|
|
168
219
|
{
|
|
169
|
-
initial: { opacity: 0 },
|
|
220
|
+
initial: M ?? { opacity: 0 },
|
|
170
221
|
animate: { opacity: 1 },
|
|
171
|
-
transition:
|
|
222
|
+
transition: R,
|
|
172
223
|
className: "flex items-center justify-center py-ds-07",
|
|
173
|
-
children: /* @__PURE__ */ t("p", { className: "text-ds-md text-surface-fg-subtle", children:
|
|
224
|
+
children: A ?? /* @__PURE__ */ t("p", { className: "text-ds-md text-surface-fg-subtle", children: f })
|
|
174
225
|
}
|
|
175
226
|
),
|
|
176
|
-
|
|
177
|
-
|
|
227
|
+
g.map((e, s) => /* @__PURE__ */ i(
|
|
228
|
+
h.div,
|
|
178
229
|
{
|
|
179
|
-
initial: { opacity: 0 },
|
|
230
|
+
initial: M ?? { opacity: 0 },
|
|
180
231
|
animate: { opacity: 1 },
|
|
181
|
-
transition: { ...
|
|
232
|
+
transition: m ? K : { ...T.fade, delay: s * 0.06 },
|
|
182
233
|
className: "mb-ds-02",
|
|
183
234
|
children: [
|
|
184
235
|
/* @__PURE__ */ t("div", { className: "px-ds-03 pb-ds-02 pt-ds-03", children: /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: e.label }) }),
|
|
185
|
-
e.items.map((
|
|
186
|
-
const
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
|
|
236
|
+
e.items.map((r) => {
|
|
237
|
+
const c = ee.get(r.id) ?? 0, p = c === x;
|
|
238
|
+
return /* @__PURE__ */ i(
|
|
239
|
+
h.button,
|
|
189
240
|
{
|
|
190
|
-
id: `command-item-${
|
|
241
|
+
id: `command-item-${L}-${r.id}`,
|
|
191
242
|
type: "button",
|
|
192
243
|
role: "option",
|
|
193
|
-
"aria-selected":
|
|
194
|
-
"data-command-index":
|
|
195
|
-
initial: { opacity: 0, y: 4 },
|
|
244
|
+
"aria-selected": p,
|
|
245
|
+
"data-command-index": c,
|
|
246
|
+
initial: M ?? { opacity: 0, y: 4 },
|
|
196
247
|
animate: { opacity: 1, y: 0 },
|
|
197
|
-
transition: { ...
|
|
248
|
+
transition: m ? K : { ...Q.snappy, delay: c * 0.03 },
|
|
198
249
|
onClick: () => {
|
|
199
|
-
|
|
250
|
+
r.onSelect(), u(!1);
|
|
200
251
|
},
|
|
201
|
-
onMouseEnter: () =>
|
|
202
|
-
className:
|
|
252
|
+
onMouseEnter: () => C(c),
|
|
253
|
+
className: I(
|
|
203
254
|
"flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-[color,background-color] duration-fast-02 ease-productive-standard",
|
|
204
|
-
|
|
255
|
+
p ? "bg-surface-raised-hover text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"
|
|
205
256
|
),
|
|
206
257
|
children: [
|
|
207
|
-
|
|
258
|
+
r.icon && /* @__PURE__ */ t(
|
|
208
259
|
"span",
|
|
209
260
|
{
|
|
210
|
-
className:
|
|
261
|
+
className: I(
|
|
211
262
|
"[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0 transition-colors duration-fast-02 ease-productive-standard",
|
|
212
|
-
|
|
263
|
+
p ? "text-accent-11" : "text-surface-fg-subtle"
|
|
213
264
|
),
|
|
214
265
|
"aria-hidden": "true",
|
|
215
|
-
children:
|
|
266
|
+
children: r.icon
|
|
216
267
|
}
|
|
217
268
|
),
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
-
/* @__PURE__ */ t("span", { className: "text-ds-md", children:
|
|
220
|
-
|
|
269
|
+
/* @__PURE__ */ i("div", { className: "flex flex-1 flex-col", children: [
|
|
270
|
+
/* @__PURE__ */ t("span", { className: "text-ds-md", children: r.renderLabel ? r.renderLabel(_) : r.label }),
|
|
271
|
+
r.description && /* @__PURE__ */ t("span", { className: "text-ds-sm text-surface-fg-subtle", children: r.description })
|
|
221
272
|
] }),
|
|
222
|
-
|
|
223
|
-
"
|
|
224
|
-
u ? "bg-accent-2 text-accent-11 border-accent-6" : "bg-surface-raised text-surface-fg-subtle"
|
|
225
|
-
), children: a.shortcut }),
|
|
226
|
-
/* @__PURE__ */ t(G, { children: u && /* @__PURE__ */ t(
|
|
227
|
-
c.span,
|
|
273
|
+
r.shortcut && /* @__PURE__ */ t("span", { className: "flex shrink-0 items-center gap-ds-01", children: we(r.shortcut).map((S, re) => /* @__PURE__ */ t(
|
|
274
|
+
"kbd",
|
|
228
275
|
{
|
|
229
|
-
|
|
276
|
+
className: I(
|
|
277
|
+
"inline-flex min-w-[20px] items-center justify-center rounded border px-ds-02b py-ds-01 text-ds-xs font-medium shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)] transition-colors duration-fast-02 ease-productive-standard",
|
|
278
|
+
p ? "bg-accent-2 text-accent-11 border-accent-6" : "bg-surface-raised text-surface-fg-subtle border-surface-border-strong"
|
|
279
|
+
),
|
|
280
|
+
children: S === "Ctrl" || S === "ctrl" ? ve(Y) : S
|
|
281
|
+
},
|
|
282
|
+
re
|
|
283
|
+
)) }),
|
|
284
|
+
/* @__PURE__ */ t(xe, { children: p && /* @__PURE__ */ t(
|
|
285
|
+
h.span,
|
|
286
|
+
{
|
|
287
|
+
initial: m ? void 0 : { opacity: 0 },
|
|
230
288
|
animate: { opacity: 1 },
|
|
231
|
-
exit: { opacity: 0 },
|
|
232
|
-
transition:
|
|
289
|
+
exit: m ? void 0 : { opacity: 0 },
|
|
290
|
+
transition: R,
|
|
233
291
|
className: "inline-flex shrink-0",
|
|
234
292
|
children: /* @__PURE__ */ t(
|
|
235
|
-
|
|
293
|
+
B,
|
|
236
294
|
{
|
|
237
295
|
className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
|
|
238
296
|
stroke: 1.5
|
|
@@ -242,7 +300,7 @@ const H = n.forwardRef(
|
|
|
242
300
|
) })
|
|
243
301
|
]
|
|
244
302
|
},
|
|
245
|
-
|
|
303
|
+
r.id
|
|
246
304
|
);
|
|
247
305
|
})
|
|
248
306
|
]
|
|
@@ -252,30 +310,20 @@ const H = n.forwardRef(
|
|
|
252
310
|
]
|
|
253
311
|
}
|
|
254
312
|
),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
|
|
313
|
+
z !== !1 && /* @__PURE__ */ t(
|
|
314
|
+
h.div,
|
|
257
315
|
{
|
|
258
|
-
initial: { opacity: 0 },
|
|
316
|
+
initial: M ?? { opacity: 0 },
|
|
259
317
|
animate: { opacity: 1 },
|
|
260
|
-
transition:
|
|
318
|
+
transition: R,
|
|
261
319
|
className: "flex items-center gap-ds-05 border-t border-surface-border-strong px-ds-05 py-ds-03",
|
|
262
|
-
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
] }),
|
|
270
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
271
|
-
/* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(C, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle", stroke: 2 }) }),
|
|
272
|
-
/* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Select" })
|
|
273
|
-
] }),
|
|
274
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
|
|
275
|
-
/* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b text-ds-xs font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: "Esc" }),
|
|
276
|
-
/* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: "Close" })
|
|
277
|
-
] })
|
|
278
|
-
]
|
|
320
|
+
children: z.map((e, s) => /* @__PURE__ */ i("div", { className: "flex items-center gap-ds-02b", children: [
|
|
321
|
+
e.keys === "↑↓" ? /* @__PURE__ */ i("div", { className: "flex items-center gap-ds-01", children: [
|
|
322
|
+
/* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(ue, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle", stroke: 2 }) }),
|
|
323
|
+
/* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-surface-border-strong bg-surface-raised shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(me, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle", stroke: 2 }) })
|
|
324
|
+
] }) : e.keys === "↵" ? /* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: /* @__PURE__ */ t(B, { className: "h-ds-03 w-ds-03 text-surface-fg-subtle", stroke: 2 }) }) : /* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02b text-ds-xs font-medium text-surface-fg-subtle shadow-[inset_0_-1px_0_rgba(0,0,0,0.1)]", children: e.keys }),
|
|
325
|
+
/* @__PURE__ */ t("span", { className: "text-ds-xs text-surface-fg-subtle", children: e.label })
|
|
326
|
+
] }, s))
|
|
279
327
|
}
|
|
280
328
|
)
|
|
281
329
|
]
|
|
@@ -284,7 +332,7 @@ const H = n.forwardRef(
|
|
|
284
332
|
] }) });
|
|
285
333
|
}
|
|
286
334
|
);
|
|
287
|
-
|
|
335
|
+
Ne.displayName = "CommandPalette";
|
|
288
336
|
export {
|
|
289
|
-
|
|
337
|
+
Ne as CommandPalette
|
|
290
338
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/composed/empty-state.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/composed/empty-state.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC9B;AAcD,QAAA,MAAM,UAAU,wFAuFf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/composed/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export type { ErrorDisplayProps } from './error-boundary';
|
|
|
37
37
|
export { GlobalLoading } from './global-loading';
|
|
38
38
|
export type { GlobalLoadingProps } from './global-loading';
|
|
39
39
|
export { CommandPalette } from './command-palette';
|
|
40
|
-
export type { CommandPaletteProps, CommandGroup, CommandItem } from './command-palette';
|
|
40
|
+
export type { CommandPaletteProps, CommandGroup, CommandItem, FooterHint } from './command-palette';
|
|
41
41
|
export { MemberPicker } from './member-picker';
|
|
42
42
|
export type { MemberPickerProps, MemberPickerMember } from './member-picker';
|
|
43
43
|
export { SimpleTooltip } from './simple-tooltip';
|
|
@@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U,EAAE,MAAM,mBAAmB,CAAA;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAChE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priority-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/priority-indicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priority-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/priority-indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAWjE,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;AAgClG,QAAA,MAAM,gBAAgB;;8EAarB,CAAA;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,QAAA,MAAM,iBAAiB,+FAwEtB,CAAA;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/composed/status-badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/composed/status-badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,mBAAmB;;;;8EA8BxB,CAAA;AAqBD,UAAU,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACtG,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;CACxD;AAED,UAAU,qBAAsB,SAAQ,oBAAoB;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,UAAU,oBAAqB,SAAQ,oBAAoB;IACzD,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CAC5D;AAED,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,oBAAoB,CAAA;AAI3E,QAAA,MAAM,WAAW,0FAyEhB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { CommandGroup } from '../composed/command-palette';
|
|
2
|
+
import { CommandGroup, CommandPaletteProps, FooterHint } from '../composed/command-palette';
|
|
3
3
|
/**
|
|
4
4
|
* AppCommandPalette -- Application-level command palette wrapper.
|
|
5
5
|
*
|
|
@@ -7,8 +7,6 @@ import { CommandGroup } from '../composed/command-palette';
|
|
|
7
7
|
* info instead of reading from Zustand stores or Remix hooks.
|
|
8
8
|
*
|
|
9
9
|
* Depends on the CommandPalette shared component being available.
|
|
10
|
-
* If you haven't created `src/shared/command-palette.tsx`, this
|
|
11
|
-
* component re-exports a minimal inline implementation.
|
|
12
10
|
*/
|
|
13
11
|
import * as React from 'react';
|
|
14
12
|
export interface SearchResult {
|
|
@@ -18,6 +16,17 @@ export interface SearchResult {
|
|
|
18
16
|
entityType: string;
|
|
19
17
|
projectId?: string | null;
|
|
20
18
|
metadata?: Record<string, unknown>;
|
|
19
|
+
/** Custom icon for this result. Overrides the default entity-type icon. */
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/** Relevance score for sorting (higher = more relevant). */
|
|
22
|
+
rank?: number;
|
|
23
|
+
/** Keyboard shortcut hint to display on this result. */
|
|
24
|
+
shortcut?: string;
|
|
25
|
+
}
|
|
26
|
+
/** A group of search results with a label. */
|
|
27
|
+
export interface SearchResultGroup {
|
|
28
|
+
label: string;
|
|
29
|
+
results: SearchResult[];
|
|
21
30
|
}
|
|
22
31
|
export interface AppCommandPaletteUser {
|
|
23
32
|
name: string;
|
|
@@ -34,12 +43,34 @@ export interface AppCommandPaletteProps extends Omit<React.ComponentPropsWithRef
|
|
|
34
43
|
onNavigate?: (path: string) => void;
|
|
35
44
|
/** Called when the search input changes (for server-side search) */
|
|
36
45
|
onSearch?: (query: string) => void;
|
|
37
|
-
/**
|
|
46
|
+
/** Flat search results (displayed in a single "Search Results" group).
|
|
47
|
+
* For grouped results, use `searchResultGroups` instead. */
|
|
38
48
|
searchResults?: SearchResult[];
|
|
49
|
+
/** Grouped search results — displayed as multiple labeled sections.
|
|
50
|
+
* Takes precedence over `searchResults` when provided. */
|
|
51
|
+
searchResultGroups?: SearchResultGroup[];
|
|
39
52
|
/** Whether a search is currently in progress */
|
|
40
53
|
isSearching?: boolean;
|
|
41
|
-
/** Called when the user selects a search result
|
|
54
|
+
/** Called when the user selects a search result. When provided, the component
|
|
55
|
+
* does NOT perform internal navigation — the consumer owns routing entirely. */
|
|
42
56
|
onSearchResultSelect?: (result: SearchResult) => void;
|
|
57
|
+
/** Custom label for the search results group. Overrides "Search Results" / "Searching...".
|
|
58
|
+
* Can be a string or a function receiving the result count. */
|
|
59
|
+
searchResultsLabel?: string | ((count: number) => string);
|
|
60
|
+
/** Controlled open state. */
|
|
61
|
+
open?: boolean;
|
|
62
|
+
/** Default open state. */
|
|
63
|
+
defaultOpen?: boolean;
|
|
64
|
+
/** Called when the open state changes. */
|
|
65
|
+
onOpenChange?: (open: boolean) => void;
|
|
66
|
+
/** Keybinding(s) to toggle. Pass `false` to disable. Default: 'mod+k'. */
|
|
67
|
+
keybinding?: CommandPaletteProps['keybinding'];
|
|
68
|
+
/** Max height of results. Default '320px'. */
|
|
69
|
+
maxHeight?: CommandPaletteProps['maxHeight'];
|
|
70
|
+
/** Custom empty state. */
|
|
71
|
+
emptyState?: React.ReactNode;
|
|
72
|
+
/** Custom footer hints. Pass `false` to hide. */
|
|
73
|
+
footerHints?: FooterHint[] | false;
|
|
43
74
|
}
|
|
44
75
|
declare const AppCommandPalette: React.ForwardRefExoticComponent<Omit<AppCommandPaletteProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
76
|
export { AppCommandPalette };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-command-palette.d.ts","sourceRoot":"","sources":["../../src/shell/app-command-palette.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"app-command-palette.d.ts","s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QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC;iEAC6D;IAC7D,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;+DAC2D;IAC3D,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAA;IACxC,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;qFACiF;IACjF,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IACrD;oEACgE;IAChE,kBAAkB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IAEzD,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0BAA0B;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,0EAA0E;IAC1E,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAA;IAC9C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAA;IAC5C,0BAA0B;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,iDAAiD;IACjD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;CACnC;AA+KD,QAAA,MAAM,iBAAiB,4GAuJtB,CAAA;AAID,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,220 +1,241 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { useCallback as g, useMemo as
|
|
5
|
-
import {
|
|
6
|
-
import { CommandPalette as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { useCommandRegistry as
|
|
9
|
-
const
|
|
10
|
-
TASK: /* @__PURE__ */
|
|
11
|
-
PROJECT: /* @__PURE__ */
|
|
12
|
-
USER: /* @__PURE__ */
|
|
13
|
-
COMMENT: /* @__PURE__ */
|
|
14
|
-
MEETING: /* @__PURE__ */
|
|
15
|
-
LINK: /* @__PURE__ */
|
|
16
|
-
DELIVERABLE: /* @__PURE__ */
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import * as _ from "react";
|
|
4
|
+
import { useCallback as g, useMemo as b } from "react";
|
|
5
|
+
import { IconLayoutDashboard as z, IconCalendarCheck as P, IconUmbrella as M, IconLayoutKanban as $, IconListCheck as w, IconBook as G, IconAdjustmentsHorizontal as H, IconUserCircle as q, IconShieldCheck as Q, IconClipboardList as W, IconUserPlus as X, IconSettings as Z, IconFileText as R, IconPackage as ee, IconLink as ne, IconVideo as te, IconMessage as oe, IconUsers as ae } from "@tabler/icons-react";
|
|
6
|
+
import { CommandPalette as ie } from "../composed/command-palette.js";
|
|
7
|
+
import { cn as ce } from "../ui/lib/utils.js";
|
|
8
|
+
import { useCommandRegistry as de } from "./command-registry.js";
|
|
9
|
+
const le = {
|
|
10
|
+
TASK: /* @__PURE__ */ n(w, {}),
|
|
11
|
+
PROJECT: /* @__PURE__ */ n($, {}),
|
|
12
|
+
USER: /* @__PURE__ */ n(ae, {}),
|
|
13
|
+
COMMENT: /* @__PURE__ */ n(oe, {}),
|
|
14
|
+
MEETING: /* @__PURE__ */ n(te, {}),
|
|
15
|
+
LINK: /* @__PURE__ */ n(ne, {}),
|
|
16
|
+
DELIVERABLE: /* @__PURE__ */ n(ee, {})
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function se(e) {
|
|
19
19
|
return [
|
|
20
20
|
{
|
|
21
21
|
id: "nav-dashboard",
|
|
22
22
|
label: "Dashboard",
|
|
23
|
-
icon: /* @__PURE__ */
|
|
24
|
-
onSelect: () =>
|
|
23
|
+
icon: /* @__PURE__ */ n(z, {}),
|
|
24
|
+
onSelect: () => e("/")
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
id: "nav-attendance",
|
|
28
28
|
label: "Attendance",
|
|
29
|
-
icon: /* @__PURE__ */
|
|
30
|
-
onSelect: () =>
|
|
29
|
+
icon: /* @__PURE__ */ n(P, {}),
|
|
30
|
+
onSelect: () => e("/attendance")
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
id: "nav-breaks",
|
|
34
34
|
label: "Breaks",
|
|
35
|
-
icon: /* @__PURE__ */
|
|
36
|
-
onSelect: () =>
|
|
35
|
+
icon: /* @__PURE__ */ n(M, {}),
|
|
36
|
+
onSelect: () => e("/breaks")
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
id: "nav-projects",
|
|
40
40
|
label: "Projects",
|
|
41
|
-
icon: /* @__PURE__ */
|
|
42
|
-
onSelect: () =>
|
|
41
|
+
icon: /* @__PURE__ */ n($, {}),
|
|
42
|
+
onSelect: () => e("/projects")
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
id: "nav-my-tasks",
|
|
46
46
|
label: "My Tasks",
|
|
47
|
-
icon: /* @__PURE__ */
|
|
48
|
-
onSelect: () =>
|
|
47
|
+
icon: /* @__PURE__ */ n(w, {}),
|
|
48
|
+
onSelect: () => e("/my-tasks")
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
id: "nav-devsabha",
|
|
52
52
|
label: "Devsabha",
|
|
53
|
-
icon: /* @__PURE__ */
|
|
54
|
-
onSelect: () =>
|
|
53
|
+
icon: /* @__PURE__ */ n(G, {}),
|
|
54
|
+
onSelect: () => e("/devsabha")
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
id: "nav-adjustments",
|
|
58
58
|
label: "Adjustments",
|
|
59
|
-
icon: /* @__PURE__ */
|
|
60
|
-
onSelect: () =>
|
|
59
|
+
icon: /* @__PURE__ */ n(H, {}),
|
|
60
|
+
onSelect: () => e("/adjustments")
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
id: "nav-profile",
|
|
64
64
|
label: "Profile",
|
|
65
|
-
icon: /* @__PURE__ */
|
|
66
|
-
onSelect: () =>
|
|
65
|
+
icon: /* @__PURE__ */ n(q, {}),
|
|
66
|
+
onSelect: () => e("/profile")
|
|
67
67
|
}
|
|
68
68
|
];
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function re(e) {
|
|
71
71
|
return [
|
|
72
72
|
{
|
|
73
73
|
id: "nav-admin-dashboard",
|
|
74
74
|
label: "Admin Dashboard",
|
|
75
|
-
icon: /* @__PURE__ */
|
|
76
|
-
onSelect: () =>
|
|
75
|
+
icon: /* @__PURE__ */ n(Q, {}),
|
|
76
|
+
onSelect: () => e("/admin")
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: "nav-admin-breaks",
|
|
80
80
|
label: "Manage Breaks",
|
|
81
|
-
icon: /* @__PURE__ */
|
|
82
|
-
onSelect: () =>
|
|
81
|
+
icon: /* @__PURE__ */ n(M, {}),
|
|
82
|
+
onSelect: () => e("/admin/breaks")
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
id: "nav-admin-attendance",
|
|
86
86
|
label: "Manage Attendance",
|
|
87
|
-
icon: /* @__PURE__ */
|
|
88
|
-
onSelect: () =>
|
|
87
|
+
icon: /* @__PURE__ */ n(P, {}),
|
|
88
|
+
onSelect: () => e("/admin/attendance")
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
id: "nav-admin-lokwasi",
|
|
92
92
|
label: "Lokwasi",
|
|
93
|
-
icon: /* @__PURE__ */
|
|
94
|
-
onSelect: () =>
|
|
93
|
+
icon: /* @__PURE__ */ n(W, {}),
|
|
94
|
+
onSelect: () => e("/admin/lokwasi")
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
id: "nav-admin-onboarding",
|
|
98
98
|
label: "Onboarding",
|
|
99
|
-
icon: /* @__PURE__ */
|
|
100
|
-
onSelect: () =>
|
|
99
|
+
icon: /* @__PURE__ */ n(X, {}),
|
|
100
|
+
onSelect: () => e("/admin/onboarding")
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
id: "nav-admin-config",
|
|
104
104
|
label: "System Config",
|
|
105
|
-
icon: /* @__PURE__ */
|
|
106
|
-
onSelect: () =>
|
|
105
|
+
icon: /* @__PURE__ */ n(Z, {}),
|
|
106
|
+
onSelect: () => e("/admin/system-config")
|
|
107
107
|
}
|
|
108
108
|
];
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
function me(e) {
|
|
111
|
+
var o;
|
|
112
|
+
switch (e.entityType) {
|
|
113
|
+
case "TASK":
|
|
114
|
+
return e.projectId ? `/projects/${e.projectId}?taskId=${e.id}` : "/";
|
|
115
|
+
case "PROJECT":
|
|
116
|
+
return `/projects/${e.id}`;
|
|
117
|
+
case "USER":
|
|
118
|
+
return "/teammates";
|
|
119
|
+
case "COMMENT":
|
|
120
|
+
return e.projectId && ((o = e.metadata) != null && o.taskId) ? `/projects/${e.projectId}?taskId=${e.metadata.taskId}` : "/";
|
|
121
|
+
case "MEETING":
|
|
122
|
+
return e.projectId ? `/projects/${e.projectId}?tab=meetings` : "/";
|
|
123
|
+
case "LINK":
|
|
124
|
+
return e.projectId ? `/projects/${e.projectId}?tab=karyakram` : "/";
|
|
125
|
+
case "DELIVERABLE":
|
|
126
|
+
return e.projectId ? `/projects/${e.projectId}?tab=deliverables` : "/";
|
|
127
|
+
default:
|
|
128
|
+
return "/";
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function h(e, o, I) {
|
|
132
|
+
return {
|
|
133
|
+
id: `search-${e.entityType}-${e.id}`,
|
|
134
|
+
label: e.title,
|
|
135
|
+
filterValue: e.title,
|
|
136
|
+
description: e.snippet,
|
|
137
|
+
icon: e.icon ?? le[e.entityType] ?? /* @__PURE__ */ n(R, {}),
|
|
138
|
+
shortcut: e.shortcut,
|
|
139
|
+
onSelect: () => {
|
|
140
|
+
o ? o(e) : I(me(e));
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const pe = _.forwardRef(
|
|
111
145
|
function({
|
|
112
|
-
user:
|
|
113
|
-
isAdmin:
|
|
114
|
-
extraGroups:
|
|
115
|
-
onNavigate:
|
|
116
|
-
onSearch:
|
|
117
|
-
searchResults:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
146
|
+
user: o,
|
|
147
|
+
isAdmin: I,
|
|
148
|
+
extraGroups: j = [],
|
|
149
|
+
onNavigate: r,
|
|
150
|
+
onSearch: m,
|
|
151
|
+
searchResults: d = [],
|
|
152
|
+
searchResultGroups: p,
|
|
153
|
+
isSearching: y = !1,
|
|
154
|
+
onSearchResultSelect: k,
|
|
155
|
+
searchResultsLabel: l,
|
|
156
|
+
open: D,
|
|
157
|
+
defaultOpen: L,
|
|
158
|
+
onOpenChange: N,
|
|
159
|
+
keybinding: O,
|
|
160
|
+
maxHeight: U,
|
|
161
|
+
emptyState: B,
|
|
162
|
+
footerHints: K,
|
|
163
|
+
className: V,
|
|
164
|
+
...v
|
|
165
|
+
}, x) {
|
|
166
|
+
const C = I ?? ((o == null ? void 0 : o.role) === "Admin" || (o == null ? void 0 : o.role) === "SuperAdmin"), c = de(), i = g(
|
|
167
|
+
(t) => {
|
|
168
|
+
r == null || r(t);
|
|
126
169
|
},
|
|
127
|
-
[
|
|
128
|
-
),
|
|
170
|
+
[r]
|
|
171
|
+
), S = b(
|
|
129
172
|
() => ({
|
|
130
173
|
label: "Pages",
|
|
131
|
-
items:
|
|
132
|
-
id:
|
|
133
|
-
label:
|
|
134
|
-
icon:
|
|
135
|
-
keywords:
|
|
136
|
-
onSelect: () => t
|
|
137
|
-
})) :
|
|
174
|
+
items: c ? c.pages.map((t) => ({
|
|
175
|
+
id: t.id,
|
|
176
|
+
label: t.label,
|
|
177
|
+
icon: t.icon,
|
|
178
|
+
keywords: t.keywords,
|
|
179
|
+
onSelect: () => i(t.path)
|
|
180
|
+
})) : se(i)
|
|
138
181
|
}),
|
|
139
|
-
[
|
|
140
|
-
),
|
|
182
|
+
[i, c]
|
|
183
|
+
), A = b(
|
|
141
184
|
() => ({
|
|
142
185
|
label: "Admin",
|
|
143
|
-
items:
|
|
144
|
-
id:
|
|
145
|
-
label:
|
|
146
|
-
icon:
|
|
147
|
-
keywords:
|
|
148
|
-
onSelect: () => t
|
|
149
|
-
})) :
|
|
186
|
+
items: c ? c.adminPages.map((t) => ({
|
|
187
|
+
id: t.id,
|
|
188
|
+
label: t.label,
|
|
189
|
+
icon: t.icon,
|
|
190
|
+
keywords: t.keywords,
|
|
191
|
+
onSelect: () => i(t.path)
|
|
192
|
+
})) : re(i)
|
|
150
193
|
}),
|
|
151
|
-
[
|
|
152
|
-
),
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
i = n.projectId ? `/projects/${n.projectId}?tab=meetings` : "/";
|
|
172
|
-
break;
|
|
173
|
-
case "LINK":
|
|
174
|
-
i = n.projectId ? `/projects/${n.projectId}?tab=karyakram` : "/";
|
|
175
|
-
break;
|
|
176
|
-
case "DELIVERABLE":
|
|
177
|
-
i = n.projectId ? `/projects/${n.projectId}?tab=deliverables` : "/";
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
return {
|
|
181
|
-
id: `search-${n.entityType}-${n.id}`,
|
|
182
|
-
label: n.title,
|
|
183
|
-
description: n.snippet,
|
|
184
|
-
icon: q[n.entityType] ?? /* @__PURE__ */ a(D, {}),
|
|
185
|
-
onSelect: () => {
|
|
186
|
-
m == null || m(n), t(i);
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
return {
|
|
191
|
-
label: k ? "Searching..." : "Search Results",
|
|
192
|
-
items: e
|
|
193
|
-
};
|
|
194
|
-
}, [b, k, t, m]), M = r(() => {
|
|
195
|
-
const e = [];
|
|
196
|
-
return p && e.push(p), e.push(j), f && e.push(y), e.push(...I), e;
|
|
197
|
-
}, [p, j, f, y, I]), $ = g(
|
|
198
|
-
(e) => {
|
|
199
|
-
l == null || l(e);
|
|
194
|
+
[i, c]
|
|
195
|
+
), E = b(() => {
|
|
196
|
+
if (p && p.length > 0)
|
|
197
|
+
return p.map((a) => {
|
|
198
|
+
const u = a.results.some((s) => s.rank != null) ? [...a.results].sort((s, Y) => (Y.rank ?? 0) - (s.rank ?? 0)) : a.results;
|
|
199
|
+
return {
|
|
200
|
+
label: a.label,
|
|
201
|
+
items: u.map((s) => h(s, k, i))
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
if (d.length === 0) return [];
|
|
205
|
+
const T = (d.some((a) => a.rank != null) ? [...d].sort((a, u) => (u.rank ?? 0) - (a.rank ?? 0)) : d).map((a) => h(a, k, i));
|
|
206
|
+
let f;
|
|
207
|
+
return l ? f = typeof l == "function" ? l(T.length) : l : f = y ? "Searching..." : "Search Results", [{ label: f, items: T }];
|
|
208
|
+
}, [d, p, y, i, k, l]), F = b(() => {
|
|
209
|
+
const t = [];
|
|
210
|
+
return t.push(...E), t.push(S), C && t.push(A), t.push(...j), t;
|
|
211
|
+
}, [E, S, C, A, j]), J = g(
|
|
212
|
+
(t) => {
|
|
213
|
+
m == null || m(t);
|
|
200
214
|
},
|
|
201
|
-
[
|
|
215
|
+
[m]
|
|
202
216
|
);
|
|
203
|
-
return /* @__PURE__ */
|
|
204
|
-
|
|
217
|
+
return /* @__PURE__ */ n(
|
|
218
|
+
ie,
|
|
205
219
|
{
|
|
206
|
-
ref:
|
|
207
|
-
groups:
|
|
220
|
+
ref: x,
|
|
221
|
+
groups: F,
|
|
208
222
|
placeholder: "Search or jump to...",
|
|
209
|
-
onSearch:
|
|
223
|
+
onSearch: J,
|
|
210
224
|
emptyMessage: "No results found. Try a different search term.",
|
|
211
|
-
|
|
212
|
-
|
|
225
|
+
open: D,
|
|
226
|
+
defaultOpen: L,
|
|
227
|
+
onOpenChange: N,
|
|
228
|
+
keybinding: O,
|
|
229
|
+
maxHeight: U,
|
|
230
|
+
emptyState: B,
|
|
231
|
+
footerHints: K,
|
|
232
|
+
className: ce(V),
|
|
233
|
+
...v
|
|
213
234
|
}
|
|
214
235
|
);
|
|
215
236
|
}
|
|
216
237
|
);
|
|
217
|
-
|
|
238
|
+
pe.displayName = "AppCommandPalette";
|
|
218
239
|
export {
|
|
219
|
-
|
|
240
|
+
pe as AppCommandPalette
|
|
220
241
|
};
|
|
@@ -131,7 +131,7 @@ const L = w.forwardRef(
|
|
|
131
131
|
ref: b,
|
|
132
132
|
"aria-label": "Mobile navigation",
|
|
133
133
|
className: l(
|
|
134
|
-
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-
|
|
134
|
+
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-raised px-ds-05 pb-ds-05b pt-0 md:hidden",
|
|
135
135
|
h
|
|
136
136
|
),
|
|
137
137
|
children: [
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export { TopBar, type TopBarUser, type UserMenuItem, type TopBarProps, } from '.
|
|
|
15
15
|
export { BottomNavbar, type BottomNavItem, type BottomNavbarUser, type BottomNavbarProps, } from './bottom-navbar';
|
|
16
16
|
export { NotificationCenter, type Notification, type NotificationCenterProps, } from './notification-center';
|
|
17
17
|
export { NotificationPreferences, type NotificationPreference, type NotificationProject, type NotificationPreferencesProps, } from './notification-preferences';
|
|
18
|
-
export { AppCommandPalette, type SearchResult, type AppCommandPaletteUser, type AppCommandPaletteProps, } from './app-command-palette';
|
|
18
|
+
export { AppCommandPalette, type SearchResult, type SearchResultGroup, type AppCommandPaletteUser, type AppCommandPaletteProps, } from './app-command-palette';
|
|
19
19
|
export { CommandRegistryProvider, useCommandRegistry, type CommandRegistry, type CommandPageItem, type CommandRegistryProviderProps, } from './command-registry';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAE9E,OAAO,EACL,UAAU,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,MAAM,EACN,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,GAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,4BAA4B,GAClC,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAE9E,OAAO,EACL,UAAU,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,MAAM,EACN,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,GAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,4BAA4B,GAClC,MAAM,oBAAoB,CAAA"}
|
package/dist/shell/sidebar.js
CHANGED
|
@@ -167,7 +167,7 @@ const ne = m.forwardRef(
|
|
|
167
167
|
ref: W,
|
|
168
168
|
"aria-label": "Main navigation",
|
|
169
169
|
className: b(
|
|
170
|
-
"z-raised hidden h-full flex-col border-r border-surface-border-strong bg-surface-
|
|
170
|
+
"z-raised hidden h-full flex-col border-r border-surface-border-strong bg-surface-raised md:flex",
|
|
171
171
|
D
|
|
172
172
|
),
|
|
173
173
|
children: [
|
package/dist/shell/top-bar.js
CHANGED
|
@@ -18,7 +18,7 @@ const N = l.forwardRef(
|
|
|
18
18
|
...t,
|
|
19
19
|
ref: o,
|
|
20
20
|
className: c(
|
|
21
|
-
"z-sticky w-full border-b border-surface-border-strong bg-surface-
|
|
21
|
+
"z-sticky w-full border-b border-surface-border-strong bg-surface-raised px-ds-05 py-ds-04 md:px-ds-06",
|
|
22
22
|
n ? "grid grid-cols-[1fr_auto_1fr] items-center" : "flex items-center",
|
|
23
23
|
r
|
|
24
24
|
),
|
package/dist/ui/sidebar.js
CHANGED
|
@@ -98,7 +98,7 @@ const te = i(
|
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
className: r(
|
|
101
|
-
"flex h-full w-[--sidebar-width] flex-col bg-surface-
|
|
101
|
+
"flex h-full w-[--sidebar-width] flex-col bg-surface-raised text-surface-fg",
|
|
102
102
|
d
|
|
103
103
|
),
|
|
104
104
|
ref: u,
|
|
@@ -152,7 +152,7 @@ const te = i(
|
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
"data-sidebar": "sidebar",
|
|
155
|
-
className: "flex h-full w-full flex-col bg-surface-
|
|
155
|
+
className: "flex h-full w-full flex-col bg-surface-raised group-data-[variant=floating]:rounded-ds-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-surface-border group-data-[variant=floating]:shadow",
|
|
156
156
|
children: o
|
|
157
157
|
}
|
|
158
158
|
)
|
|
@@ -234,7 +234,7 @@ const de = i(({ className: a, ...e }, t) => /* @__PURE__ */ s(
|
|
|
234
234
|
ref: t,
|
|
235
235
|
"data-sidebar": "input",
|
|
236
236
|
className: r(
|
|
237
|
-
"h-ds-sm w-full bg-surface-
|
|
237
|
+
"h-ds-sm w-full bg-surface-raised shadow-none focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
238
238
|
a
|
|
239
239
|
),
|
|
240
240
|
...e
|
package/llms-full.txt
CHANGED
package/llms.txt
CHANGED
|
@@ -267,14 +267,14 @@ NOTIFICATION SELECTION GUIDE:
|
|
|
267
267
|
- Text: variant(TextVariant) as(element). Type: TextVariant = 'heading-2xl' | 'heading-xl' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'heading-xs' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs' | 'label-lg' | 'label-md' | 'label-sm' | 'label-xs' | 'caption' | 'overline'
|
|
268
268
|
- Code: variant(inline|block)
|
|
269
269
|
- Skeleton: variant(rectangle|circle|text) animation(pulse|shimmer|none)
|
|
270
|
-
- StatCard: title, value,
|
|
270
|
+
- StatCard: title/label, value, delta, icon, prefix, suffix, comparisonLabel, secondaryLabel, progress, sparkline
|
|
271
271
|
|
|
272
272
|
### Overlays
|
|
273
273
|
- Dialog > DialogTrigger; DialogContent > DialogHeader > DialogTitle, DialogDescription; [content]; DialogFooter
|
|
274
274
|
- AlertDialog > AlertDialogTrigger; AlertDialogContent > AlertDialogHeader > AlertDialogTitle; AlertDialogFooter > AlertDialogCancel, AlertDialogAction
|
|
275
275
|
- Sheet: side(top|bottom|left|right) > SheetTrigger; SheetContent > SheetHeader > SheetTitle; [content]; SheetFooter
|
|
276
276
|
- Popover > PopoverTrigger; PopoverContent
|
|
277
|
-
- Tooltip:
|
|
277
|
+
- Tooltip: auto-wraps with <TooltipProvider> (no manual provider needed) > Tooltip > TooltipTrigger; TooltipContent
|
|
278
278
|
- HoverCard > HoverCardTrigger; HoverCardContent
|
|
279
279
|
- Collapsible > CollapsibleTrigger; CollapsibleContent
|
|
280
280
|
|
|
@@ -320,7 +320,8 @@ NOTIFICATION SELECTION GUIDE:
|
|
|
320
320
|
- RichTextEditor: Tiptap editor — bold/italic/underline/strike/highlight, headings, blockquote, lists (bullet/ordered/task), code, links, images (paste/drop/upload), file attachments, @mentions, emoji picker + :shortcode:, text alignment, HR. Props: onImageUpload?, onFileUpload?, mentions?, onMentionSearch?, onMentionSelect?(item: MentionItem)
|
|
321
321
|
- RichTextViewer: read-only renderer for RichTextEditor HTML content (renders all above content types)
|
|
322
322
|
- ActivityFeed: items(ActivityItem[]), onLoadMore, loading, hasMore, emptyState, compact, maxInitialItems, groupBy?('time'|'none'), groupLabels?({ today, yesterday, thisWeek, older }). Type: ActivityItem = { id, actor?, action, timestamp, icon?, color?, detail? }. Utility: groupItemsByTime(items, labels) exported.
|
|
323
|
-
- CommandPalette,
|
|
323
|
+
- CommandPalette: open, defaultOpen, onOpenChange (controlled/uncontrolled), keybinding(string|string[]|false), maxHeight, emptyState(ReactNode), footerHints(FooterHint[]|false). CommandItem: label(string|ReactNode), description(string|ReactNode), renderLabel(query=>ReactNode), filterValue(string), shortcut(rendered as keycap badges). Keyboard shortcuts rendered per-key with platform-aware Cmd/Ctrl. Reduced-motion support via MotionProvider.
|
|
324
|
+
- MemberPicker
|
|
324
325
|
- ErrorDisplay, GlobalLoading
|
|
325
326
|
- Loading skeletons: CardSkeleton, TableSkeleton, BoardSkeleton, ListSkeleton
|
|
326
327
|
- Page skeletons: DashboardSkeleton, ProjectListSkeleton, TaskDetailSkeleton (no props, server-safe)
|
|
@@ -342,7 +343,7 @@ NOTIFICATION SELECTION GUIDE:
|
|
|
342
343
|
- BottomNavbar: mobile navigation, user is optional. Types: BottomNavItem = { title, href, icon, exact?, badge? }, BottomNavbarUser = { name, role? }
|
|
343
344
|
- NotificationCenter: notifications[], onMarkRead, onMarkAllRead, onNavigate, getNotificationRoute?, footerSlot?, emptyState?, headerActions?, popoverClassName?, onDismiss?(id). Types: Notification = { id, title, body?, tier, isRead, createdAt, entityType?, entityId?, projectId?, project?, actions? }, NotificationAction = { label, variant?, onClick }
|
|
344
345
|
- NotificationPreferences: preferences[], projects[], onSave, onToggleMute, onUpdateTier, onDelete. Types: NotificationPreference = { id, userId?, projectId, channel, minTier, muted }, NotificationProject = { id, title }
|
|
345
|
-
- AppCommandPalette: user, isAdmin, onNavigate, onSearch, searchResults, isSearching, onSearchResultSelect. Types: SearchResult = { id, title, snippet?, entityType, projectId?, metadata? }, AppCommandPaletteUser = { name, role? }
|
|
346
|
+
- AppCommandPalette: user, isAdmin, onNavigate, onSearch, searchResults, searchResultGroups(SearchResultGroup[]), isSearching, onSearchResultSelect (when provided, consumer owns routing — no internal URL computation), searchResultsLabel(string|((count)=>string)), open, defaultOpen, onOpenChange, keybinding, maxHeight, emptyState, footerHints. Types: SearchResult = { id, title, snippet?, entityType, projectId?, metadata?, icon?(ReactNode), rank?(number), shortcut?(string) }, SearchResultGroup = { label, results: SearchResult[] }, AppCommandPaletteUser = { name, role? }
|
|
346
347
|
- LinkProvider: wraps app with router-agnostic Link component — component(ForwardRefComponent), children. useLink() hook returns the Link component.
|
|
347
348
|
|
|
348
349
|
### Motion System (Framer Motion)
|