@almanaclabs/blaze-ui 0.22.0 → 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/components/app-shell/app-shell.d.ts +5 -1
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/app-shell.js +34 -15
- package/dist/components/chat-list/chat-list.d.ts +35 -0
- package/dist/components/chat-list/chat-list.d.ts.map +1 -0
- package/dist/components/chat-list/chat-list.js +73 -0
- package/dist/components/chat-list/index.d.ts +2 -0
- package/dist/components/chat-list/index.d.ts.map +1 -0
- package/dist/components/chat-panel/chat-panel.d.ts +39 -0
- package/dist/components/chat-panel/chat-panel.d.ts.map +1 -0
- package/dist/components/chat-panel/chat-panel.js +153 -0
- package/dist/components/chat-panel/index.d.ts +2 -0
- package/dist/components/chat-panel/index.d.ts.map +1 -0
- package/dist/components/post-card/index.d.ts +2 -0
- package/dist/components/post-card/index.d.ts.map +1 -0
- package/dist/components/post-card/post-card.d.ts +67 -0
- package/dist/components/post-card/post-card.d.ts.map +1 -0
- package/dist/components/post-card/post-card.js +336 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -59
- package/package.json +1 -1
- package/src/styles/globals.css +8 -0
|
@@ -47,6 +47,10 @@ type AppSidebarItem = {
|
|
|
47
47
|
icon?: AppSidebarIcon;
|
|
48
48
|
/** Something waiting for the owner. Shown as a count pill when above zero. */
|
|
49
49
|
count?: number;
|
|
50
|
+
/** One thing needs the owner, such as a chat with a question waiting. Shown as a small dot. */
|
|
51
|
+
needsYou?: boolean;
|
|
52
|
+
/** The dot's accessible name. Defaults to "Needs you". */
|
|
53
|
+
needsYouLabel?: string;
|
|
50
54
|
/** Render the row as a link. */
|
|
51
55
|
href?: string;
|
|
52
56
|
onSelect?: () => void;
|
|
@@ -64,7 +68,7 @@ type AppSidebarProps = Omit<React.ComponentProps<'aside'>, 'onSelect'> & {
|
|
|
64
68
|
* The plain "New" row. It leads the first section when that section has no label, and otherwise sits in its own
|
|
65
69
|
* group. Its icon defaults to a plus.
|
|
66
70
|
*/
|
|
67
|
-
newItem?: Omit<AppSidebarItem, 'icon' | 'count'> & {
|
|
71
|
+
newItem?: Omit<AppSidebarItem, 'icon' | 'count' | 'needsYou' | 'needsYouLabel'> & {
|
|
68
72
|
icon?: AppSidebarIcon;
|
|
69
73
|
};
|
|
70
74
|
sections: readonly AppSidebarSection[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../src/components/app-shell/app-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8B9B,2GAA2G;AAC3G,QAAA,MAAM,yBAAyB,MAAM,CAAA;AACrC,QAAA,MAAM,qBAAqB,MAAM,CAAA;AACjC,QAAA,MAAM,qBAAqB,MAAM,CAAA;AACjC,+BAA+B;AAC/B,QAAA,MAAM,sBAAsB,KAAK,CAAA;AAiDjC,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACjD,oEAAoE;IACpE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gEAAgE;IAChE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,qDAAqD;IACrD,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC,CAAA;AAED;;;;;;GAMG;AACH,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,MAAM,EACN,aAAa,EACb,mBAA+C,EAC/C,uBAA+B,EAC/B,iBAA2C,EAC3C,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAA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ot": "app-shell-top-bar-placeholder" }),
|
|
67
67
|
/* @__PURE__ */ y("main", {
|
|
68
68
|
"data-slot": "app-shell-main",
|
|
69
|
-
|
|
69
|
+
tabIndex: -1,
|
|
70
|
+
className: e("relative min-w-0 rounded-2xl bg-card shadow-[0_1px_2px_rgb(0_0_0/0.04),0_6px_20px_rgb(0_0_0/0.07)] outline-none", r),
|
|
70
71
|
children: l
|
|
71
72
|
}),
|
|
72
73
|
t ? /* @__PURE__ */ y(I, {
|
|
@@ -175,7 +176,7 @@ function L({ end: t, className: n, children: r, ...i }) {
|
|
|
175
176
|
}
|
|
176
177
|
var R = (e) => /* @__PURE__ */ y("a", { href: e.href });
|
|
177
178
|
function z({ item: t, active: n, collapsed: r, onNavigate: i, renderLink: a }) {
|
|
178
|
-
let o = t.icon, s = (e) => {
|
|
179
|
+
let o = t.icon, s = t.needsYouLabel ?? "Needs you", c = !!(t.needsYou && !t.count), l = (e) => {
|
|
179
180
|
e.detail > 0 && e.currentTarget.blur(), t.onSelect?.(), i?.(t);
|
|
180
181
|
};
|
|
181
182
|
return /* @__PURE__ */ b(m, {
|
|
@@ -188,20 +189,38 @@ function z({ item: t, active: n, collapsed: r, onNavigate: i, renderLink: a }) {
|
|
|
188
189
|
...t,
|
|
189
190
|
href: t.href
|
|
190
191
|
}) : void 0,
|
|
191
|
-
tooltip: { children: /* @__PURE__ */ b(v, { children: [
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
tooltip: { children: /* @__PURE__ */ b(v, { children: [
|
|
193
|
+
t.label,
|
|
194
|
+
t.count ? /* @__PURE__ */ y("span", {
|
|
195
|
+
className: "ml-1.5 tabular-nums opacity-70",
|
|
196
|
+
children: t.count
|
|
197
|
+
}) : null,
|
|
198
|
+
c ? /* @__PURE__ */ b("span", {
|
|
199
|
+
className: "ml-1.5 opacity-70",
|
|
200
|
+
children: ["· ", s]
|
|
201
|
+
}) : null
|
|
202
|
+
] }) },
|
|
195
203
|
className: e(r && "justify-center px-0"),
|
|
196
|
-
onClick:
|
|
204
|
+
onClick: l,
|
|
197
205
|
children: [o ? /* @__PURE__ */ y(o, { "aria-hidden": "true" }) : null, r ? /* @__PURE__ */ b("span", {
|
|
198
206
|
className: "sr-only",
|
|
199
|
-
children: [
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
children: [
|
|
208
|
+
t.label,
|
|
209
|
+
t.count ? ` (${t.count})` : null,
|
|
210
|
+
c ? `, ${s}` : null
|
|
211
|
+
]
|
|
212
|
+
}) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b("span", {
|
|
213
|
+
className: "min-w-0 truncate whitespace-nowrap",
|
|
214
|
+
children: [t.label, c ? /* @__PURE__ */ b("span", {
|
|
215
|
+
className: "sr-only",
|
|
216
|
+
children: [", ", s]
|
|
217
|
+
}) : null]
|
|
218
|
+
}), c ? /* @__PURE__ */ y("span", {
|
|
219
|
+
"aria-hidden": "true",
|
|
220
|
+
"data-slot": "app-sidebar-item-needs-you",
|
|
221
|
+
className: "ml-auto size-[7px] flex-none rounded-full bg-primary"
|
|
222
|
+
}) : null] })]
|
|
223
|
+
}), (t.count || c) && r ? /* @__PURE__ */ y("span", {
|
|
205
224
|
"aria-hidden": "true",
|
|
206
225
|
"data-slot": "app-sidebar-item-dot",
|
|
207
226
|
className: "pointer-events-none absolute top-1.5 right-2 size-1.5 rounded-full bg-primary ring-2 ring-background"
|
|
@@ -278,14 +297,14 @@ function G({ workspace: t, newItem: n, sections: r, bottomItems: i, activeId: a,
|
|
|
278
297
|
return /* @__PURE__ */ y("aside", {
|
|
279
298
|
"data-slot": "app-sidebar",
|
|
280
299
|
"data-state": m ? "collapsed" : "expanded",
|
|
281
|
-
className: e("group/app-sidebar sticky top-0 row-span-2 flex h-screen min-w-0 flex-col self-start overflow-x-hidden overflow-y-auto
|
|
300
|
+
className: e("group/app-sidebar sticky top-0 row-span-2 flex h-screen min-w-0 flex-col self-start overflow-x-hidden overflow-y-auto pb-3", u),
|
|
282
301
|
...d,
|
|
283
302
|
children: /* @__PURE__ */ b(U.Provider, {
|
|
284
303
|
value: m,
|
|
285
304
|
children: [
|
|
286
305
|
/* @__PURE__ */ b("div", {
|
|
287
306
|
"data-slot": "app-sidebar-header",
|
|
288
|
-
className: e("
|
|
307
|
+
className: e("flex h-14 flex-none items-center gap-1", m && "group/app-sidebar-header relative"),
|
|
289
308
|
children: [/* @__PURE__ */ y("div", {
|
|
290
309
|
className: "w-full min-w-0 flex-1",
|
|
291
310
|
children: t
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
type ChatListGroupProps = React.ComponentProps<'section'> & {
|
|
4
|
+
/** The group's heading: "Today", "Yesterday", "Earlier this week", "Older". */
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
/** One date group of chats, under a quiet heading. Holds `ChatListItem`s. */
|
|
8
|
+
declare function ChatListGroup({ label, className, children, ...props }: ChatListGroupProps): React.JSX.Element;
|
|
9
|
+
type ChatListItemProps = Omit<React.ComponentProps<'li'>, 'children' | 'title'> & {
|
|
10
|
+
/** The chat's name. */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Where the row goes. Pass `render` instead for a router link. */
|
|
13
|
+
href?: string;
|
|
14
|
+
/** The row's link element, such as a router's `<Link href="…" />`; defaults to an `<a>`. */
|
|
15
|
+
render?: useRender.RenderProp;
|
|
16
|
+
/** The chat needs the owner: a question waiting, a draft to review, a failed step. Shows a small dot. */
|
|
17
|
+
needsYou?: boolean;
|
|
18
|
+
/** The dot's accessible name. */
|
|
19
|
+
needsYouLabel?: string;
|
|
20
|
+
/** Last updated, muted at the right: "5:41 PM", "Fri". */
|
|
21
|
+
time?: React.ReactNode;
|
|
22
|
+
/** The open chat. */
|
|
23
|
+
active?: boolean;
|
|
24
|
+
/** The "…" menu's items (`DropdownMenuItem`s), such as Rename, Archive and Delete. It shows on hover or focus. */
|
|
25
|
+
actions?: React.ReactNode;
|
|
26
|
+
/** The "…" button's accessible name; defaults to "More for <title>". */
|
|
27
|
+
actionsLabel?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* One chat in a list, Claude-style: its name, a dot when it needs the owner, and when it was last updated. The "…" menu
|
|
31
|
+
* appears only on hover or focus.
|
|
32
|
+
*/
|
|
33
|
+
declare function ChatListItem({ title, href, render, needsYou, needsYouLabel, time, active, actions, actionsLabel, className, ...props }: ChatListItemProps): React.JSX.Element;
|
|
34
|
+
export { ChatListGroup, ChatListItem, type ChatListGroupProps, type ChatListItemProps, };
|
|
35
|
+
//# sourceMappingURL=chat-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-list.d.ts","sourceRoot":"","sources":["../../../src/components/chat-list/chat-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAWrD,KAAK,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG;IAC1D,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,6EAA6E;AAC7E,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,qBAkBpB;AAED,KAAK,iBAAiB,GAAG,IAAI,CAC3B,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAC1B,UAAU,GAAG,OAAO,CACrB,GAAG;IACF,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAC,UAAU,CAAA;IAC7B,yGAAyG;IACzG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iCAAiC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,qBAAqB;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kHAAkH;IAClH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,aAA2B,EAC3B,IAAI,EACJ,MAAc,EACd,OAAO,EACP,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA+DnB;AAED,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { DropdownMenu as n, DropdownMenuContent as r, DropdownMenuTrigger as i } from "../dropdown-menu/dropdown-menu.js";
|
|
4
|
+
import * as a from "react";
|
|
5
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
import { IconDots as l } from "@tabler/icons-react";
|
|
7
|
+
import { mergeProps as u } from "@base-ui/react/merge-props";
|
|
8
|
+
import { useRender as d } from "@base-ui/react/use-render";
|
|
9
|
+
//#region src/components/chat-list/chat-list.tsx
|
|
10
|
+
function f({ label: t, className: n, children: r, ...i }) {
|
|
11
|
+
let o = a.useId();
|
|
12
|
+
return /* @__PURE__ */ c("section", {
|
|
13
|
+
"data-slot": "chat-list-group",
|
|
14
|
+
"aria-labelledby": o,
|
|
15
|
+
className: e("flex flex-col", n),
|
|
16
|
+
...i,
|
|
17
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
18
|
+
id: o,
|
|
19
|
+
className: "type-meta m-0 mb-1 px-2.5 font-medium text-muted-foreground",
|
|
20
|
+
children: t
|
|
21
|
+
}), /* @__PURE__ */ s("ul", {
|
|
22
|
+
className: "m-0 flex list-none flex-col p-0",
|
|
23
|
+
children: r
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function p({ title: a, href: f, render: p, needsYou: m = !1, needsYouLabel: h = "Needs you", time: g, active: _ = !1, actions: v, actionsLabel: y, className: b, ...x }) {
|
|
28
|
+
let S = d({
|
|
29
|
+
defaultTagName: "a",
|
|
30
|
+
render: p,
|
|
31
|
+
props: u({
|
|
32
|
+
href: f,
|
|
33
|
+
"aria-current": _ ? "page" : void 0,
|
|
34
|
+
className: "flex min-w-0 flex-1 items-center gap-2.5 self-stretch rounded-lg text-foreground no-underline outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
35
|
+
children: /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("span", {
|
|
36
|
+
className: "min-w-0 truncate",
|
|
37
|
+
children: a
|
|
38
|
+
}), m ? /* @__PURE__ */ s("span", {
|
|
39
|
+
role: "img",
|
|
40
|
+
"aria-label": h,
|
|
41
|
+
className: "size-[7px] flex-none rounded-full bg-primary"
|
|
42
|
+
}) : null] })
|
|
43
|
+
}, {})
|
|
44
|
+
});
|
|
45
|
+
return /* @__PURE__ */ c("li", {
|
|
46
|
+
"data-slot": "chat-list-item",
|
|
47
|
+
"data-active": _ || void 0,
|
|
48
|
+
className: e("group/chat type-body relative flex h-11 items-center gap-2.5 rounded-lg px-2.5 hover:bg-muted data-[active]:bg-muted", b),
|
|
49
|
+
...x,
|
|
50
|
+
children: [
|
|
51
|
+
S,
|
|
52
|
+
g ? /* @__PURE__ */ s("span", {
|
|
53
|
+
className: "type-detail flex-none text-foreground-tertiary",
|
|
54
|
+
children: g
|
|
55
|
+
}) : null,
|
|
56
|
+
v ? /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(i, {
|
|
57
|
+
render: /* @__PURE__ */ s(t, {
|
|
58
|
+
type: "button",
|
|
59
|
+
variant: "tertiary",
|
|
60
|
+
size: "icon-sm",
|
|
61
|
+
"aria-label": y ?? `More for ${a}`,
|
|
62
|
+
className: "flex-none opacity-0 group-hover/chat:opacity-100 group-focus-within/chat:opacity-100 data-[popup-open]:opacity-100 [@media(hover:none)]:opacity-100"
|
|
63
|
+
}),
|
|
64
|
+
children: /* @__PURE__ */ s(l, { "aria-hidden": "true" })
|
|
65
|
+
}), /* @__PURE__ */ s(r, {
|
|
66
|
+
align: "end",
|
|
67
|
+
children: v
|
|
68
|
+
})] }) : null
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { f as ChatListGroup, p as ChatListItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-list/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ChatPanelProps = React.ComponentProps<'aside'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Let the owner drag the panel's right edge to resize it, as the sidebar resizes: arrow keys step it, Home and End
|
|
5
|
+
* jump to the narrowest and widest, and a double-click puts it back. The width is remembered on this browser.
|
|
6
|
+
*/
|
|
7
|
+
resizable?: boolean;
|
|
8
|
+
/** The width a resizable panel starts at, and returns to on a double-click. */
|
|
9
|
+
defaultWidth?: number;
|
|
10
|
+
minWidth?: number;
|
|
11
|
+
maxWidth?: number;
|
|
12
|
+
/** The `localStorage` key that remembers the width. `null` remembers nothing. */
|
|
13
|
+
storageKey?: string | null;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A chat docked beside the page, as builder's chat sits beside the sidebar: a card with the chat's name, a collapse
|
|
17
|
+
* button, the conversation, and its own composer at the foot. The app places it; collapsing hands control back to the
|
|
18
|
+
* page (for example, to a floating ChatBar). With `resizable`, the owner drags its edge to make it wider or narrower.
|
|
19
|
+
*/
|
|
20
|
+
declare function ChatPanel({ resizable, defaultWidth, minWidth, maxWidth, storageKey, className, style, children, ...props }: ChatPanelProps): React.JSX.Element;
|
|
21
|
+
type ChatPanelHeaderProps = Omit<React.ComponentProps<'header'>, 'children'> & {
|
|
22
|
+
/** The chat's name. */
|
|
23
|
+
title: string;
|
|
24
|
+
/** Called with the new name when the owner renames it in place. Without it the name is read-only. */
|
|
25
|
+
onRename?: (title: string) => void;
|
|
26
|
+
/** The name field's accessible name. */
|
|
27
|
+
titleLabel?: string;
|
|
28
|
+
/** Called when the owner collapses the panel. Without it there is no collapse button. */
|
|
29
|
+
onCollapse?: () => void;
|
|
30
|
+
collapseLabel?: string;
|
|
31
|
+
};
|
|
32
|
+
/** The panel's top: the chat's name in a soft filled field you can rename in place, and Collapse. */
|
|
33
|
+
declare function ChatPanelHeader({ title, onRename, titleLabel, onCollapse, collapseLabel, className, ...props }: ChatPanelHeaderProps): React.JSX.Element;
|
|
34
|
+
/** The conversation, scrolling between the header and the composer, set in the denser `type-chat`. */
|
|
35
|
+
declare function ChatPanelBody({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
36
|
+
/** The panel's composer, pinned at the foot. Holds a ChatBar with `floating={false}`. */
|
|
37
|
+
declare function ChatPanelFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
38
|
+
export { ChatPanel, ChatPanelBody, ChatPanelFooter, ChatPanelHeader, type ChatPanelHeaderProps, type ChatPanelProps, };
|
|
39
|
+
//# sourceMappingURL=chat-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-panel.d.ts","sourceRoot":"","sources":["../../../src/components/chat-panel/chat-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2C9B,KAAK,cAAc,GAAG,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C,cAAc,CAAC,KAAK,CAAC,qBAQ5E;AAED,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,CAAA"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../tooltip/tooltip.js";
|
|
4
|
+
import * as a from "react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { IconLayoutSidebarLeftCollapse as c } from "@tabler/icons-react";
|
|
7
|
+
//#region src/components/chat-panel/chat-panel.tsx
|
|
8
|
+
var l = 380, u = 320, d = 640, f = 8, p = "blaze-ui.chat-panel";
|
|
9
|
+
function m(e, t, n) {
|
|
10
|
+
return Math.round(Math.min(n, Math.max(t, e)));
|
|
11
|
+
}
|
|
12
|
+
function h(e, t, n, r) {
|
|
13
|
+
if (!e || typeof window > "u") return t;
|
|
14
|
+
try {
|
|
15
|
+
let i = JSON.parse(window.localStorage.getItem(e) ?? "null");
|
|
16
|
+
return typeof i?.width == "number" && Number.isFinite(i.width) ? m(i.width, n, r) : t;
|
|
17
|
+
} catch {
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function g(e, t) {
|
|
22
|
+
if (e) try {
|
|
23
|
+
window.localStorage.setItem(e, JSON.stringify({ width: t }));
|
|
24
|
+
} catch {}
|
|
25
|
+
}
|
|
26
|
+
function _({ resizable: t = !1, defaultWidth: n = l, minWidth: r = u, maxWidth: i = d, storageKey: c = p, className: f, style: m, children: _, ...y }) {
|
|
27
|
+
let [b, x] = a.useState(() => h(c, n, r, i)), [S, C] = a.useState(!1);
|
|
28
|
+
return a.useEffect(() => {
|
|
29
|
+
t && !S && g(c, b);
|
|
30
|
+
}, [
|
|
31
|
+
t,
|
|
32
|
+
S,
|
|
33
|
+
c,
|
|
34
|
+
b
|
|
35
|
+
]), /* @__PURE__ */ s("aside", {
|
|
36
|
+
"data-slot": "chat-panel",
|
|
37
|
+
"data-resizing": S || void 0,
|
|
38
|
+
style: t ? {
|
|
39
|
+
width: b,
|
|
40
|
+
...m
|
|
41
|
+
} : m,
|
|
42
|
+
className: e("relative flex min-h-0 flex-col rounded-xl bg-card text-card-foreground shadow-[0_1px_2px_rgb(24_24_27/0.04),0_24px_60px_-24px_rgb(59_107_224/0.12)]", t && "flex-none", f),
|
|
43
|
+
...y,
|
|
44
|
+
children: [/* @__PURE__ */ o("div", {
|
|
45
|
+
className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-[inherit]",
|
|
46
|
+
children: _
|
|
47
|
+
}), t ? /* @__PURE__ */ o(v, {
|
|
48
|
+
width: b,
|
|
49
|
+
minWidth: r,
|
|
50
|
+
maxWidth: i,
|
|
51
|
+
defaultWidth: n,
|
|
52
|
+
resizing: S,
|
|
53
|
+
onWidthChange: x,
|
|
54
|
+
onResizingChange: C
|
|
55
|
+
}) : null]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function v({ width: t, minWidth: n, maxWidth: r, defaultWidth: i, resizing: c, onWidthChange: l, onResizingChange: u }) {
|
|
59
|
+
let d = a.useRef(null), p = (e) => m(e, n, r), h = (e, t) => {
|
|
60
|
+
d.current?.pointerId === t && (d.current = null, e.hasPointerCapture?.(t) && e.releasePointerCapture(t), document.body.style.removeProperty("cursor"), document.body.style.removeProperty("user-select"), u(!1));
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ o("div", {
|
|
63
|
+
role: "separator",
|
|
64
|
+
tabIndex: 0,
|
|
65
|
+
"aria-label": "Resize the chat",
|
|
66
|
+
"aria-orientation": "vertical",
|
|
67
|
+
"aria-valuemin": n,
|
|
68
|
+
"aria-valuemax": r,
|
|
69
|
+
"aria-valuenow": t,
|
|
70
|
+
"aria-valuetext": `${t} pixels`,
|
|
71
|
+
"data-slot": "chat-panel-resize-handle",
|
|
72
|
+
"data-resizing": c || void 0,
|
|
73
|
+
className: e("absolute inset-y-0 -right-[9px] z-20 w-2 cursor-col-resize touch-none outline-none select-none", "after:absolute after:inset-y-2.5 after:left-1/2 after:w-0.5 after:-translate-x-1/2 after:rounded-full after:transition-colors after:duration-100", "hover:after:bg-border focus-visible:after:bg-ring data-resizing:after:bg-foreground"),
|
|
74
|
+
onKeyDown: (e) => {
|
|
75
|
+
let i = e.key === "ArrowLeft" ? p(t - f) : e.key === "ArrowRight" ? p(t + f) : e.key === "Home" ? n : e.key === "End" ? r : void 0;
|
|
76
|
+
i !== void 0 && (e.preventDefault(), l(i));
|
|
77
|
+
},
|
|
78
|
+
onDoubleClick: () => l(p(i)),
|
|
79
|
+
onPointerDown: (e) => {
|
|
80
|
+
e.button === 0 && (e.preventDefault(), d.current = {
|
|
81
|
+
pointerId: e.pointerId,
|
|
82
|
+
startX: e.clientX,
|
|
83
|
+
startWidth: t
|
|
84
|
+
}, e.currentTarget.setPointerCapture?.(e.pointerId), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", u(!0));
|
|
85
|
+
},
|
|
86
|
+
onPointerMove: (e) => {
|
|
87
|
+
let t = d.current;
|
|
88
|
+
t?.pointerId === e.pointerId && l(p(t.startWidth + e.clientX - t.startX));
|
|
89
|
+
},
|
|
90
|
+
onPointerUp: (e) => h(e.currentTarget, e.pointerId),
|
|
91
|
+
onPointerCancel: (e) => h(e.currentTarget, e.pointerId),
|
|
92
|
+
onLostPointerCapture: (e) => h(e.currentTarget, e.pointerId),
|
|
93
|
+
children: c ? /* @__PURE__ */ s("span", {
|
|
94
|
+
"aria-hidden": "true",
|
|
95
|
+
className: "type-meta pointer-events-none absolute top-16 left-full ml-1.5 rounded-md bg-foreground px-1.5 py-0.5 font-medium text-background tabular-nums",
|
|
96
|
+
children: [t, "px"]
|
|
97
|
+
}) : null
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function y({ title: l, onRename: u, titleLabel: d = "Chat name", onCollapse: f, collapseLabel: p = "Collapse the chat", className: m, ...h }) {
|
|
101
|
+
let [g, _] = a.useState(l), v = a.useRef(!1);
|
|
102
|
+
a.useEffect(() => _(l), [l]);
|
|
103
|
+
let y = () => {
|
|
104
|
+
if (v.current) {
|
|
105
|
+
v.current = !1, _(l);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
let e = g.trim();
|
|
109
|
+
e && e !== l ? u?.(e) : _(l);
|
|
110
|
+
};
|
|
111
|
+
return /* @__PURE__ */ s("header", {
|
|
112
|
+
"data-slot": "chat-panel-header",
|
|
113
|
+
className: e("flex flex-none items-center gap-2 px-3.5 pt-3.5 pb-2.5", m),
|
|
114
|
+
...h,
|
|
115
|
+
children: [/* @__PURE__ */ o("input", {
|
|
116
|
+
"aria-label": d,
|
|
117
|
+
value: g,
|
|
118
|
+
readOnly: !u,
|
|
119
|
+
onChange: (e) => _(e.target.value),
|
|
120
|
+
onBlur: y,
|
|
121
|
+
onKeyDown: (e) => {
|
|
122
|
+
e.nativeEvent.isComposing || (e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (v.current = !0, e.currentTarget.blur()));
|
|
123
|
+
},
|
|
124
|
+
className: "type-body h-9 min-w-0 flex-1 truncate rounded-lg border-0 bg-muted px-3 font-medium text-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50 read-only:cursor-default"
|
|
125
|
+
}), f ? /* @__PURE__ */ s(n, { children: [/* @__PURE__ */ o(i, {
|
|
126
|
+
render: /* @__PURE__ */ o(t, {
|
|
127
|
+
type: "button",
|
|
128
|
+
variant: "tertiary",
|
|
129
|
+
size: "icon-md",
|
|
130
|
+
"aria-label": p,
|
|
131
|
+
onClick: f,
|
|
132
|
+
className: "flex-none text-muted-foreground hover:text-foreground"
|
|
133
|
+
}),
|
|
134
|
+
children: /* @__PURE__ */ o(c, { "aria-hidden": "true" })
|
|
135
|
+
}), /* @__PURE__ */ o(r, { children: p })] }) : null]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function b({ className: t, ...n }) {
|
|
139
|
+
return /* @__PURE__ */ o("div", {
|
|
140
|
+
"data-slot": "chat-panel-body",
|
|
141
|
+
className: e("type-chat flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-2", t),
|
|
142
|
+
...n
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function x({ className: t, ...n }) {
|
|
146
|
+
return /* @__PURE__ */ o("div", {
|
|
147
|
+
"data-slot": "chat-panel-footer",
|
|
148
|
+
className: e("flex-none p-3", t),
|
|
149
|
+
...n
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { _ as ChatPanel, b as ChatPanelBody, x as ChatPanelFooter, y as ChatPanelHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type PostCardListProps = React.ComponentProps<'ol'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Called when the owner drags a post or moves it with the keyboard, with
|
|
5
|
+
* 0-based indexes: where it was and where it now goes. The caller reorders
|
|
6
|
+
* its posts; each `PostCard` needs `position`. Without it, no handles show.
|
|
7
|
+
*/
|
|
8
|
+
onReorder?: (from: number, to: number) => void;
|
|
9
|
+
};
|
|
10
|
+
/** A thread's posts, in order, joined by a connector line. Holds `PostCard`s. */
|
|
11
|
+
declare function PostCardList({ onReorder, className, children, ...props }: PostCardListProps): React.JSX.Element;
|
|
12
|
+
type PostCardProps = Omit<React.HTMLAttributes<HTMLElement>, 'children'> & {
|
|
13
|
+
/** Who it posts as. `avatar` takes your own avatar, such as a `PlatformAvatar`; otherwise `avatarSrc` with initials. */
|
|
14
|
+
author: {
|
|
15
|
+
name: string;
|
|
16
|
+
handle?: string;
|
|
17
|
+
avatar?: React.ReactNode;
|
|
18
|
+
avatarSrc?: string;
|
|
19
|
+
};
|
|
20
|
+
/** The post's text, edited in place by the card. Leave it out and pass your own editor as `children`. */
|
|
21
|
+
text?: string;
|
|
22
|
+
/** Called with the new text when the owner edits `text` in place and leaves the field. Without it the text is read-only. */
|
|
23
|
+
onSave?: (text: string) => void;
|
|
24
|
+
/** Your own editor for the post's text, set as post copy with no padding. Replaces the built-in `text` editing. */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/** The count and limit when you bring your own editor. Overrides the count of `text` and `limit`. */
|
|
27
|
+
length?: {
|
|
28
|
+
count: number;
|
|
29
|
+
limit: number;
|
|
30
|
+
};
|
|
31
|
+
/** Blaze is rewriting this post: the text dims, and editing, the actions and the handle are off. */
|
|
32
|
+
busy?: boolean;
|
|
33
|
+
/** The platform's character limit. */
|
|
34
|
+
limit?: number;
|
|
35
|
+
/** At rest, the count ring shows from this many characters; while editing it always shows. Defaults to 30 under the limit. */
|
|
36
|
+
countFrom?: number;
|
|
37
|
+
/** Images or other media under the text. */
|
|
38
|
+
media?: React.ReactNode;
|
|
39
|
+
/** Where the post sits in its thread, 1-based. Shows "2/5" with the actions when there is more than one, and names the reorder handle. */
|
|
40
|
+
position?: {
|
|
41
|
+
index: number;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
/** Adds a post after this one. Shows the + action. */
|
|
45
|
+
onInsertBelow?: () => void;
|
|
46
|
+
/** Adds an image straight away. Shows the image action, unless `imageMenu` gives it a menu instead. */
|
|
47
|
+
onAddImage?: () => void;
|
|
48
|
+
/** `DropdownMenuItem`s under the image action, such as "Upload" and "From Media". */
|
|
49
|
+
imageMenu?: React.ReactNode;
|
|
50
|
+
/** `DropdownMenuItem`s under the sparkle action: what Blaze can do to this post. */
|
|
51
|
+
assistMenu?: React.ReactNode;
|
|
52
|
+
/** `DropdownMenuItem`s under the ⋯ action. In a reorderable list, Move up and Move down follow them. */
|
|
53
|
+
moreMenu?: React.ReactNode;
|
|
54
|
+
/** Draw the thread line down to the next post. */
|
|
55
|
+
connector?: boolean;
|
|
56
|
+
/** The text field's accessible name. Defaults to "Post 2" from `position`, or "Post". */
|
|
57
|
+
textLabel?: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* One post, clean at rest: who it posts as, the text and any media, with a
|
|
61
|
+
* faint ring only near the limit. The text edits in place, or in your own
|
|
62
|
+
* editor as `children`. Its actions, place ("2/5") and drag handle fade in on
|
|
63
|
+
* hover or focus (ADR 0034).
|
|
64
|
+
*/
|
|
65
|
+
declare function PostCard({ author, text, onSave, children, length, busy, limit: textLimit, countFrom, media, position, onInsertBelow, onAddImage, imageMenu, assistMenu, moreMenu, connector, textLabel, className, ...props }: PostCardProps): React.JSX.Element;
|
|
66
|
+
export { PostCard, PostCardList, type PostCardListProps, type PostCardProps };
|
|
67
|
+
//# sourceMappingURL=post-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-card.d.ts","sourceRoot":"","sources":["../../../src/components/post-card/post-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgC9B,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACpD;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,iFAAiF;AACjF,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAwBnB;AAED,KAAK,aAAa,GAAG,IAAI,CAAC,KAAK,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,CAAA;IACnB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAOD;;;;;GAKG;AACH,iBAAS,QAAQ,CAAC,EAChB,MAAM,EACN,IAAS,EACT,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,KAAK,EAAE,SAAe,EACtB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAiB,EACjB,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,qBAwVf;AAiHD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o } from "../dropdown-menu/dropdown-menu.js";
|
|
4
|
+
import { Avatar as s, AvatarFallback as c, AvatarImage as ee } from "../avatar/avatar.js";
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { IconDots as te, IconGripVertical as ne, IconPhoto as p, IconPlus as re, IconSparkles as ie } from "@tabler/icons-react";
|
|
8
|
+
//#region src/components/post-card/post-card.tsx
|
|
9
|
+
var m = l.createContext(null);
|
|
10
|
+
function h({ onReorder: t, className: n, children: r, ...i }) {
|
|
11
|
+
let [a, o] = l.useState(""), s = l.useRef(null), c = l.useMemo(() => ({
|
|
12
|
+
reorder: t,
|
|
13
|
+
announce: o,
|
|
14
|
+
dragging: s
|
|
15
|
+
}), [t]);
|
|
16
|
+
return /* @__PURE__ */ f(m.Provider, {
|
|
17
|
+
value: c,
|
|
18
|
+
children: [/* @__PURE__ */ d("ol", {
|
|
19
|
+
"data-slot": "post-card-list",
|
|
20
|
+
className: e("m-0 flex list-none flex-col rounded-2xl bg-card p-0 shadow-[0_0_0_1px_var(--border),0_2px_4px_rgb(0_0_0/0.04)]", n),
|
|
21
|
+
...i,
|
|
22
|
+
children: r
|
|
23
|
+
}), /* @__PURE__ */ d("span", {
|
|
24
|
+
role: "status",
|
|
25
|
+
className: "sr-only",
|
|
26
|
+
children: a
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
var g = "opacity-0 transition-opacity group-hover/post:opacity-100 group-focus-within/post:opacity-100 group-has-[[data-popup-open]]/post:opacity-100 pointer-coarse:opacity-100";
|
|
31
|
+
function _({ author: t, text: n = "", onSave: r, children: o, length: h, busy: _ = !1, limit: oe = 280, countFrom: b, media: x, position: S, onInsertBelow: C, onAddImage: w, imageMenu: T, assistMenu: E, moreMenu: D, connector: se = !1, textLabel: ce, className: le, ...ue }) {
|
|
32
|
+
let O = l.useContext(m), k = ce ?? (S ? `Post ${S.index}` : "Post"), [A, j] = l.useState(!1), [M, N] = l.useState(n), [P, F] = l.useState("idle"), [I, L] = l.useState(null), R = l.useRef(null), z = l.useRef(null), B = l.useRef(null), V = l.useRef(!1), H = l.useRef(!1), U = l.useId(), W = l.useId();
|
|
33
|
+
l.useEffect(() => {
|
|
34
|
+
A || N(n);
|
|
35
|
+
}, [n, A]), l.useEffect(() => {
|
|
36
|
+
_ && j(!1);
|
|
37
|
+
}, [_]), l.useEffect(() => {
|
|
38
|
+
A || !H.current || (H.current = !1, B.current?.focus());
|
|
39
|
+
}, [A]), l.useEffect(() => {
|
|
40
|
+
if (P !== "armed") return;
|
|
41
|
+
let e = () => F((e) => e === "armed" ? "idle" : e);
|
|
42
|
+
return window.addEventListener("pointerup", e), window.addEventListener("pointercancel", e), () => {
|
|
43
|
+
window.removeEventListener("pointerup", e), window.removeEventListener("pointercancel", e);
|
|
44
|
+
};
|
|
45
|
+
}, [P]), l.useLayoutEffect(() => {
|
|
46
|
+
let e = R.current;
|
|
47
|
+
!A || !e || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
48
|
+
}, [A, M]), l.useEffect(() => {
|
|
49
|
+
V.current && (V.current = !1, z.current?.focus());
|
|
50
|
+
}, [S?.index]);
|
|
51
|
+
let G = h?.limit ?? oe, K = h?.count ?? (A ? M.length : n.length), q = A || K > G || K >= (b ?? G - 30), de = () => {
|
|
52
|
+
j(!1);
|
|
53
|
+
let e = M.trim();
|
|
54
|
+
e === n ? N(n) : r?.(e);
|
|
55
|
+
}, fe = t.name.trim().slice(0, 1).toUpperCase(), J = O?.reorder && S && !_ ? O.reorder : void 0, Y = (S?.index ?? 1) - 1, X = S?.total ?? 1, Z = (e, t) => {
|
|
56
|
+
!J || e < 0 || e >= X || e === Y || (V.current = t, J(Y, e), O?.announce(`${k} moved to ${e + 1} of ${X}.`));
|
|
57
|
+
}, pe = (e) => {
|
|
58
|
+
let t = O?.dragging.current;
|
|
59
|
+
if (t == null) return null;
|
|
60
|
+
let n = e === "after" ? Y + 1 : Y;
|
|
61
|
+
return n > t ? n - 1 : n;
|
|
62
|
+
}, me = O ? "li" : "div", Q = !!(S && X > 1), $ = !!(C || w || T || E || D || J);
|
|
63
|
+
return /* @__PURE__ */ f(me, {
|
|
64
|
+
"data-slot": "post-card",
|
|
65
|
+
"aria-busy": _ || void 0,
|
|
66
|
+
"data-dragging": P === "dragging" ? "" : void 0,
|
|
67
|
+
"data-drop": I ?? void 0,
|
|
68
|
+
draggable: P !== "idle",
|
|
69
|
+
onDragStart: (e) => {
|
|
70
|
+
P === "idle" || !O || (O.dragging.current = Y, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", k), F("dragging"));
|
|
71
|
+
},
|
|
72
|
+
onDragEnd: () => {
|
|
73
|
+
O && (O.dragging.current = null), F("idle");
|
|
74
|
+
},
|
|
75
|
+
onDragOver: (e) => {
|
|
76
|
+
if (O?.dragging.current == null || !J) return;
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
let t = e.currentTarget.getBoundingClientRect();
|
|
79
|
+
L(e.clientY < t.top + t.height / 2 ? "before" : "after");
|
|
80
|
+
},
|
|
81
|
+
onDragLeave: () => L(null),
|
|
82
|
+
onDrop: (e) => {
|
|
83
|
+
if (!I) return;
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
let t = O?.dragging.current, n = pe(I);
|
|
86
|
+
L(null), t != null && n != null && n !== t && (J?.(t, n), O?.announce(`Post ${t + 1} moved to ${n + 1} of ${X}.`));
|
|
87
|
+
},
|
|
88
|
+
className: e("group/post relative flex gap-2.5 px-4 pt-3 pb-1 pl-6", "data-[drop=after]:after:absolute data-[drop=after]:after:inset-x-4 data-[drop=after]:after:-bottom-px data-[drop=after]:after:h-0.5 data-[drop=after]:after:rounded-full data-[drop=after]:after:bg-primary data-[drop=before]:before:absolute data-[drop=before]:before:inset-x-4 data-[drop=before]:before:-top-px data-[drop=before]:before:h-0.5 data-[drop=before]:before:rounded-full data-[drop=before]:before:bg-primary", "data-dragging:opacity-50", le),
|
|
89
|
+
...ue,
|
|
90
|
+
children: [
|
|
91
|
+
J ? /* @__PURE__ */ f("button", {
|
|
92
|
+
ref: z,
|
|
93
|
+
type: "button",
|
|
94
|
+
"data-slot": "post-card-handle",
|
|
95
|
+
"aria-label": `Reorder ${k}, ${S.index} of ${X}`,
|
|
96
|
+
"aria-describedby": U,
|
|
97
|
+
onPointerDown: () => F("armed"),
|
|
98
|
+
onKeyDown: (e) => {
|
|
99
|
+
if (e.key === "ArrowUp") Z(Y - 1, !0);
|
|
100
|
+
else if (e.key === "ArrowDown") Z(Y + 1, !0);
|
|
101
|
+
else return;
|
|
102
|
+
e.preventDefault();
|
|
103
|
+
},
|
|
104
|
+
className: e("absolute top-4 left-0.5 flex h-7 w-5 cursor-grab touch-none items-center justify-center rounded-sm text-foreground-tertiary outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:cursor-grabbing", g),
|
|
105
|
+
children: [/* @__PURE__ */ d(ne, {
|
|
106
|
+
"aria-hidden": "true",
|
|
107
|
+
className: "size-4"
|
|
108
|
+
}), /* @__PURE__ */ d("span", {
|
|
109
|
+
id: U,
|
|
110
|
+
className: "sr-only",
|
|
111
|
+
children: "Drag, or use the up and down arrow keys, to move it."
|
|
112
|
+
})]
|
|
113
|
+
}) : null,
|
|
114
|
+
/* @__PURE__ */ f("span", {
|
|
115
|
+
className: "flex w-10 flex-none flex-col items-center",
|
|
116
|
+
children: [t.avatar ?? /* @__PURE__ */ f(s, {
|
|
117
|
+
size: "lg",
|
|
118
|
+
children: [t.avatarSrc ? /* @__PURE__ */ d(ee, {
|
|
119
|
+
src: t.avatarSrc,
|
|
120
|
+
alt: ""
|
|
121
|
+
}) : null, /* @__PURE__ */ d(c, { children: fe })]
|
|
122
|
+
}), se ? /* @__PURE__ */ d("span", {
|
|
123
|
+
"aria-hidden": "true",
|
|
124
|
+
className: "mt-1 w-0.5 flex-1 rounded-full bg-border"
|
|
125
|
+
}) : null]
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ f("div", {
|
|
128
|
+
className: "flex min-w-0 flex-1 flex-col pb-2",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ f("div", {
|
|
131
|
+
className: "type-body flex items-center gap-1",
|
|
132
|
+
children: [/* @__PURE__ */ d("span", {
|
|
133
|
+
className: "truncate font-medium",
|
|
134
|
+
children: t.name
|
|
135
|
+
}), t.handle ? /* @__PURE__ */ d("span", {
|
|
136
|
+
className: "truncate text-muted-foreground",
|
|
137
|
+
children: t.handle
|
|
138
|
+
}) : null]
|
|
139
|
+
}),
|
|
140
|
+
o == null ? A ? /* @__PURE__ */ d("textarea", {
|
|
141
|
+
ref: R,
|
|
142
|
+
"aria-label": k,
|
|
143
|
+
autoFocus: !0,
|
|
144
|
+
value: M,
|
|
145
|
+
onChange: (e) => N(e.target.value),
|
|
146
|
+
onFocus: (e) => {
|
|
147
|
+
let t = e.currentTarget.value.length;
|
|
148
|
+
e.currentTarget.setSelectionRange(t, t);
|
|
149
|
+
},
|
|
150
|
+
onBlur: de,
|
|
151
|
+
onKeyDown: (e) => {
|
|
152
|
+
e.key === "Escape" && (H.current = !0, N(n), j(!1));
|
|
153
|
+
},
|
|
154
|
+
className: "type-content -mx-1 mt-0.5 block w-full resize-none rounded-md bg-muted p-1 text-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50"
|
|
155
|
+
}) : r && !_ ? /* @__PURE__ */ f("button", {
|
|
156
|
+
ref: B,
|
|
157
|
+
type: "button",
|
|
158
|
+
"data-slot": "post-card-text",
|
|
159
|
+
"aria-label": n.trim() ? void 0 : `Edit ${k}`,
|
|
160
|
+
"aria-describedby": W,
|
|
161
|
+
onClick: () => j(!0),
|
|
162
|
+
className: "type-content -mx-1 mt-0.5 block w-full cursor-text rounded-md p-1 text-left whitespace-pre-wrap text-foreground [overflow-wrap:anywhere] outline-none hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
163
|
+
children: [n, /* @__PURE__ */ f("span", {
|
|
164
|
+
id: W,
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
className: "sr-only",
|
|
167
|
+
children: ["Edit ", k]
|
|
168
|
+
})]
|
|
169
|
+
}) : /* @__PURE__ */ d("p", {
|
|
170
|
+
"data-slot": "post-card-text",
|
|
171
|
+
className: e("type-content m-0 mt-0.5 p-1 -mx-1 whitespace-pre-wrap text-foreground transition-colors [overflow-wrap:anywhere]", _ && "text-muted-foreground"),
|
|
172
|
+
children: n
|
|
173
|
+
}) : /* @__PURE__ */ d("div", {
|
|
174
|
+
"data-slot": "post-card-text",
|
|
175
|
+
inert: _,
|
|
176
|
+
className: e("type-content mt-0.5 text-foreground transition-colors", _ && "text-muted-foreground"),
|
|
177
|
+
children: o
|
|
178
|
+
}),
|
|
179
|
+
x ? /* @__PURE__ */ d("div", {
|
|
180
|
+
className: "mt-2 flex flex-col gap-2",
|
|
181
|
+
children: x
|
|
182
|
+
}) : null,
|
|
183
|
+
$ || q || Q ? /* @__PURE__ */ f("div", {
|
|
184
|
+
className: "mt-1 flex min-h-8 items-center gap-1",
|
|
185
|
+
children: [
|
|
186
|
+
$ ? /* @__PURE__ */ f("div", {
|
|
187
|
+
role: "group",
|
|
188
|
+
"aria-label": `${k} actions`,
|
|
189
|
+
"data-slot": "post-card-actions",
|
|
190
|
+
className: e("-ml-1.5 flex items-center gap-0.5", g),
|
|
191
|
+
children: [
|
|
192
|
+
C ? /* @__PURE__ */ d(v, {
|
|
193
|
+
label: "Add a post below",
|
|
194
|
+
onClick: C,
|
|
195
|
+
disabled: _,
|
|
196
|
+
children: /* @__PURE__ */ d(re, { "aria-hidden": "true" })
|
|
197
|
+
}) : null,
|
|
198
|
+
T ? /* @__PURE__ */ d(y, {
|
|
199
|
+
label: "Add an image",
|
|
200
|
+
items: T,
|
|
201
|
+
disabled: _,
|
|
202
|
+
children: /* @__PURE__ */ d(p, { "aria-hidden": "true" })
|
|
203
|
+
}) : w ? /* @__PURE__ */ d(v, {
|
|
204
|
+
label: "Add an image",
|
|
205
|
+
onClick: w,
|
|
206
|
+
disabled: _,
|
|
207
|
+
children: /* @__PURE__ */ d(p, { "aria-hidden": "true" })
|
|
208
|
+
}) : null,
|
|
209
|
+
E ? /* @__PURE__ */ d(y, {
|
|
210
|
+
label: "Ask Blaze",
|
|
211
|
+
items: E,
|
|
212
|
+
disabled: _,
|
|
213
|
+
children: /* @__PURE__ */ d(ie, { "aria-hidden": "true" })
|
|
214
|
+
}) : null,
|
|
215
|
+
D || J ? /* @__PURE__ */ d(y, {
|
|
216
|
+
label: `More for ${k}`,
|
|
217
|
+
disabled: _,
|
|
218
|
+
items: /* @__PURE__ */ f(u, { children: [
|
|
219
|
+
D,
|
|
220
|
+
D && J ? /* @__PURE__ */ d(a, {}) : null,
|
|
221
|
+
J ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(i, {
|
|
222
|
+
disabled: Y === 0,
|
|
223
|
+
onClick: () => Z(Y - 1, !1),
|
|
224
|
+
children: "Move up"
|
|
225
|
+
}), /* @__PURE__ */ d(i, {
|
|
226
|
+
disabled: Y === X - 1,
|
|
227
|
+
onClick: () => Z(Y + 1, !1),
|
|
228
|
+
children: "Move down"
|
|
229
|
+
})] }) : null
|
|
230
|
+
] }),
|
|
231
|
+
children: /* @__PURE__ */ d(te, { "aria-hidden": "true" })
|
|
232
|
+
}) : null
|
|
233
|
+
]
|
|
234
|
+
}) : null,
|
|
235
|
+
Q ? /* @__PURE__ */ f("span", {
|
|
236
|
+
"data-slot": "post-card-position",
|
|
237
|
+
className: e("type-meta flex-none text-foreground-tertiary tabular-nums", g),
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ d("span", {
|
|
240
|
+
className: "sr-only",
|
|
241
|
+
children: "Post "
|
|
242
|
+
}),
|
|
243
|
+
S.index,
|
|
244
|
+
"/",
|
|
245
|
+
X
|
|
246
|
+
]
|
|
247
|
+
}) : null,
|
|
248
|
+
q ? /* @__PURE__ */ d(ae, {
|
|
249
|
+
count: K,
|
|
250
|
+
limit: G
|
|
251
|
+
}) : null
|
|
252
|
+
]
|
|
253
|
+
}) : null
|
|
254
|
+
]
|
|
255
|
+
})
|
|
256
|
+
]
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
function v({ label: e, children: n, ...r }) {
|
|
260
|
+
return /* @__PURE__ */ d(t, {
|
|
261
|
+
type: "button",
|
|
262
|
+
"aria-label": e,
|
|
263
|
+
title: e,
|
|
264
|
+
size: "icon-md",
|
|
265
|
+
variant: "tertiary",
|
|
266
|
+
...r,
|
|
267
|
+
children: n
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function y({ label: e, items: i, disabled: a, children: s }) {
|
|
271
|
+
return /* @__PURE__ */ f(n, { children: [/* @__PURE__ */ d(o, {
|
|
272
|
+
render: /* @__PURE__ */ d(t, {
|
|
273
|
+
type: "button",
|
|
274
|
+
"aria-label": e,
|
|
275
|
+
title: e,
|
|
276
|
+
size: "icon-md",
|
|
277
|
+
variant: "tertiary",
|
|
278
|
+
disabled: a
|
|
279
|
+
}),
|
|
280
|
+
children: s
|
|
281
|
+
}), /* @__PURE__ */ d(r, {
|
|
282
|
+
align: "start",
|
|
283
|
+
children: i
|
|
284
|
+
})] });
|
|
285
|
+
}
|
|
286
|
+
function ae({ count: t, limit: n }) {
|
|
287
|
+
let r = n - t, i = r < 0 ? "text-destructive" : r <= 20 ? "text-warning" : "text-foreground-tertiary", a = 2 * Math.PI * 8, o = Math.min(t / n, 1);
|
|
288
|
+
return /* @__PURE__ */ f("span", {
|
|
289
|
+
"data-slot": "post-card-count",
|
|
290
|
+
"data-over": r < 0 ? "" : void 0,
|
|
291
|
+
className: e("type-meta ml-auto flex items-center gap-1.5", i),
|
|
292
|
+
children: [
|
|
293
|
+
/* @__PURE__ */ f("span", {
|
|
294
|
+
className: "sr-only",
|
|
295
|
+
children: [
|
|
296
|
+
t,
|
|
297
|
+
" of ",
|
|
298
|
+
n,
|
|
299
|
+
" characters"
|
|
300
|
+
]
|
|
301
|
+
}),
|
|
302
|
+
r <= 20 ? /* @__PURE__ */ d("span", {
|
|
303
|
+
"aria-hidden": "true",
|
|
304
|
+
className: "tabular-nums",
|
|
305
|
+
children: r
|
|
306
|
+
}) : null,
|
|
307
|
+
/* @__PURE__ */ f("svg", {
|
|
308
|
+
"aria-hidden": "true",
|
|
309
|
+
viewBox: "0 0 20 20",
|
|
310
|
+
width: "20",
|
|
311
|
+
height: "20",
|
|
312
|
+
className: "flex-none -rotate-90",
|
|
313
|
+
children: [/* @__PURE__ */ d("circle", {
|
|
314
|
+
cx: "10",
|
|
315
|
+
cy: "10",
|
|
316
|
+
r: 8,
|
|
317
|
+
fill: "none",
|
|
318
|
+
strokeWidth: "2",
|
|
319
|
+
className: "stroke-border"
|
|
320
|
+
}), /* @__PURE__ */ d("circle", {
|
|
321
|
+
cx: "10",
|
|
322
|
+
cy: "10",
|
|
323
|
+
r: 8,
|
|
324
|
+
fill: "none",
|
|
325
|
+
strokeWidth: "2",
|
|
326
|
+
strokeLinecap: "round",
|
|
327
|
+
strokeDasharray: a,
|
|
328
|
+
strokeDashoffset: a * (1 - o),
|
|
329
|
+
className: "stroke-current"
|
|
330
|
+
})]
|
|
331
|
+
})
|
|
332
|
+
]
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
//#endregion
|
|
336
|
+
export { _ as PostCard, h as PostCardList };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export * from './components/calendar';
|
|
|
20
20
|
export * from './components/carousel';
|
|
21
21
|
export * from './components/chart';
|
|
22
22
|
export * from './components/chat-bar';
|
|
23
|
+
export * from './components/chat-list';
|
|
24
|
+
export * from './components/chat-panel';
|
|
23
25
|
export * from './components/checkbox';
|
|
24
26
|
export * from './components/collapsible';
|
|
25
27
|
export * from './components/combobox';
|
|
@@ -52,6 +54,7 @@ export * from './components/pagination';
|
|
|
52
54
|
export * from './components/platform-avatar';
|
|
53
55
|
export * from './components/platform-icon';
|
|
54
56
|
export * from './components/popover';
|
|
57
|
+
export * from './components/post-card';
|
|
55
58
|
export * from './components/progress';
|
|
56
59
|
export * from './components/questionnaire';
|
|
57
60
|
export * from './components/radio-group';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,cAAc,EACd,KAAK,WAAW,GACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,UAAU,EACV,KAAK,e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,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -26,62 +26,65 @@ import { Calendar as At, CalendarDayButton as jt } from "./components/calendar/c
|
|
|
26
26
|
import { Carousel as Mt, CarouselContent as Nt, CarouselItem as Pt, CarouselNext as Ft, CarouselPrevious as It, useCarousel as Lt } from "./components/carousel/carousel.js";
|
|
27
27
|
import { ChartContainer as Rt, ChartLegend as zt, ChartLegendContent as Bt, ChartStyle as Vt, ChartTooltip as Ht, ChartTooltipContent as Ut } from "./components/chart/chart.js";
|
|
28
28
|
import { ChatBar as Wt, ChatBarAddButton as Gt, ChatBarAttachment as Kt, chatBarFormVariants as qt } from "./components/chat-bar/chat-bar.js";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
|
|
29
|
+
import { ChatListGroup as Jt, ChatListItem as Yt } from "./components/chat-list/chat-list.js";
|
|
30
|
+
import { ChatPanel as Xt, ChatPanelBody as Zt, ChatPanelFooter as Qt, ChatPanelHeader as $t } from "./components/chat-panel/chat-panel.js";
|
|
31
|
+
import { Checkbox as en } from "./components/checkbox/checkbox.js";
|
|
32
|
+
import { Collapsible as tn, CollapsibleContent as nn, CollapsibleTrigger as rn } from "./components/collapsible/collapsible.js";
|
|
33
|
+
import { Textarea as an } from "./components/textarea/textarea.js";
|
|
34
|
+
import { InputGroup as on, InputGroupAddon as sn, InputGroupButton as cn, InputGroupInput as ln, InputGroupText as un, InputGroupTextarea as dn } from "./components/input-group/input-group.js";
|
|
35
|
+
import { Combobox as fn, ComboboxChip as pn, ComboboxChips as mn, ComboboxChipsInput as hn, ComboboxCollection as gn, ComboboxContent as _n, ComboboxEmpty as vn, ComboboxGroup as yn, ComboboxInput as bn, ComboboxItem as xn, ComboboxLabel as Sn, ComboboxList as Cn, ComboboxSeparator as wn, ComboboxTrigger as Tn, ComboboxValue as En, useComboboxAnchor as Dn } from "./components/combobox/combobox.js";
|
|
36
|
+
import { StatusIndicator as On, statusDotVariants as kn } from "./components/status-indicator/status-indicator.js";
|
|
37
|
+
import { ConnectNotice as An } from "./components/connect-notice/connect-notice.js";
|
|
38
|
+
import { Table as jn, TableBody as Mn, TableCaption as Nn, TableCell as Pn, TableFooter as Fn, TableHead as In, TableHeader as Ln, TableRow as Rn } from "./components/table/table.js";
|
|
39
|
+
import { DataTable as zn } from "./components/data-table/data-table.js";
|
|
40
|
+
import { Popover as Bn, PopoverContent as Vn, PopoverDescription as Hn, PopoverHeader as Un, PopoverTitle as Wn, PopoverTrigger as Gn } from "./components/popover/popover.js";
|
|
41
|
+
import { DatePicker as Kn } from "./components/date-picker/date-picker.js";
|
|
42
|
+
import { DenseTable as qn, DenseTableCell as Jn, DenseTableRow as Yn, sortDenseTableRows as Xn } from "./components/dense-table/dense-table.js";
|
|
43
|
+
import { DetailList as Zn, DetailListItem as Qn } from "./components/detail-list/detail-list.js";
|
|
44
|
+
import { Dialog as $n, DialogClose as er, DialogContent as tr, DialogDescription as nr, DialogFooter as rr, DialogHeader as ir, DialogOverlay as ar, DialogPortal as or, DialogTitle as sr, DialogTrigger as cr } from "./components/dialog/dialog.js";
|
|
45
|
+
import { Drawer as lr, DrawerClose as ur, DrawerContent as dr, DrawerDescription as fr, DrawerFooter as pr, DrawerHeader as mr, DrawerOverlay as hr, DrawerPortal as gr, DrawerSwipeHandle as _r, DrawerTitle as vr, DrawerTrigger as yr } from "./components/drawer/drawer.js";
|
|
46
|
+
import { EditableText as br } from "./components/editable-text/editable-text.js";
|
|
47
|
+
import { Empty as xr, EmptyContent as Sr, EmptyDescription as Cr, EmptyHeader as wr, EmptyMedia as Tr, EmptyTitle as Er } from "./components/empty/empty.js";
|
|
48
|
+
import { BrandApple as Dr, BrandBeehiiv as Or, BrandBing as kr, BrandBluesky as Ar, BrandChatgpt as jr, BrandEmail as Mr, BrandFacebook as Nr, BrandGithub as Pr, BrandGmail as Fr, BrandGodaddy as Ir, BrandGoogle as Lr, BrandGoogleDocs as Rr, BrandInstagram as zr, BrandLinkedin as Br, BrandMeta as Vr, BrandMicrosoft as Hr, BrandOutlook as Ur, BrandPerplexity as Wr, BrandPhone as Gr, BrandReddit as Kr, BrandSearchConsole as qr, BrandShopify as Jr, BrandSquarespace as Yr, BrandThreads as Xr, BrandTiktok as Zr, BrandWordpress as Qr, BrandX as $r, BrandYelp as ei, BrandYoutube as ti, BrandZapier as ni, PLATFORMS as ri, PLATFORM_COLOR as ii, PLATFORM_ICON as ai, PLATFORM_LABEL as oi, PlatformIcon as si } from "./components/platform-icon/platform-icon.js";
|
|
49
|
+
import { PlatformAvatar as ci } from "./components/platform-avatar/platform-avatar.js";
|
|
50
|
+
import { FaceStackButton as li } from "./components/face-stack-button/face-stack-button.js";
|
|
51
|
+
import { FilterChips as ui } from "./components/filter-chips/filter-chips.js";
|
|
52
|
+
import { Progress as di, ProgressIndicator as fi, ProgressLabel as pi, ProgressTrack as mi, ProgressValue as hi } from "./components/progress/progress.js";
|
|
53
|
+
import { GoalCard as gi, PaceBadge as _i, PaceMeter as vi, paceStatusOf as yi } from "./components/goal-card/goal-card.js";
|
|
54
|
+
import { HoverCard as bi, HoverCardContent as xi, HoverCardTrigger as Si } from "./components/hover-card/hover-card.js";
|
|
55
|
+
import { IdentityMark as Ci, IdentityMarkImage as wi } from "./components/identity-mark/identity-mark.js";
|
|
56
|
+
import { Item as Ti, ItemActions as Ei, ItemContent as Di, ItemDescription as Oi, ItemFooter as ki, ItemGroup as Ai, ItemHeader as ji, ItemMedia as Mi, ItemSeparator as Ni, ItemTitle as Pi } from "./components/item/item.js";
|
|
57
|
+
import { Marker as Fi, MarkerContent as Ii, MarkerIcon as Li, markerVariants as Ri } from "./components/marker/marker.js";
|
|
58
|
+
import { MediaThumbnail as zi, mediaThumbnailVariants as Bi } from "./components/media-thumbnail/media-thumbnail.js";
|
|
59
|
+
import { Message as Vi, MessageAvatar as Hi, MessageContent as Ui, MessageFooter as Wi, MessageGroup as Gi, MessageHeader as Ki } from "./components/message/message.js";
|
|
60
|
+
import { MetricOverview as qi } from "./components/metric-overview/metric-overview.js";
|
|
61
|
+
import { MetricTile as Ji, metricTileVariants as Yi } from "./components/metric-tile/metric-tile.js";
|
|
62
|
+
import { NativeSelect as Xi, NativeSelectOptGroup as Zi, NativeSelectOption as Qi } from "./components/native-select/native-select.js";
|
|
63
|
+
import { NavigationAction as $i, navigationActionVariants as ea } from "./components/navigation-action/navigation-action.js";
|
|
64
|
+
import { PageHeader as ta } from "./components/page-header/page-header.js";
|
|
65
|
+
import { Pagination as na, PaginationContent as ra, PaginationEllipsis as ia, PaginationItem as aa, PaginationLink as oa, PaginationNext as sa, PaginationPrevious as ca } from "./components/pagination/pagination.js";
|
|
66
|
+
import { CHANNELS as la, CHANNEL_COLOR as ua } from "./components/platform-icon/channel-color.js";
|
|
67
|
+
import { LetterMark as da } from "./components/platform-icon/letter-mark.js";
|
|
68
|
+
import { PostCard as fa, PostCardList as pa } from "./components/post-card/post-card.js";
|
|
69
|
+
import { Questionnaire as ma, QuestionnaireActions as ha, QuestionnaireChoice as ga, QuestionnaireChoiceDescription as _a, QuestionnaireChoices as va, QuestionnaireDescription as ya, QuestionnaireError as ba, QuestionnaireInput as xa, QuestionnaireItem as Sa, QuestionnaireNext as Ca, QuestionnairePrevious as wa, QuestionnaireProgress as Ta, QuestionnaireSkip as Ea, QuestionnaireSubmit as Da, QuestionnaireTitle as Oa } from "./components/questionnaire/questionnaire.js";
|
|
70
|
+
import { RadioGroup as ka, RadioGroupItem as Aa } from "./components/radio-group/radio-group.js";
|
|
71
|
+
import { Rating as ja } from "./components/rating/rating.js";
|
|
72
|
+
import { ScrollArea as Ma, ScrollBar as Na } from "./components/scroll-area/scroll-area.js";
|
|
73
|
+
import { SectionHeader as Pa } from "./components/section-header/section-header.js";
|
|
74
|
+
import { Select as Fa, SelectContent as Ia, SelectGroup as La, SelectItem as Ra, SelectLabel as za, SelectScrollDownButton as Ba, SelectScrollUpButton as Va, SelectSeparator as Ha, SelectTrigger as Ua, SelectValue as Wa } from "./components/select/select.js";
|
|
75
|
+
import { SignalDots as Ga, SignalStrip as Ka } from "./components/signal-strip/signal-strip.js";
|
|
76
|
+
import { Slider as qa } from "./components/slider/slider.js";
|
|
77
|
+
import { SourceAvatar as Ja } from "./components/source-avatar/source-avatar.js";
|
|
78
|
+
import { Sparkline as Ya } from "./components/sparkline/sparkline.js";
|
|
79
|
+
import { Spinner as Xa } from "./components/spinner/spinner.js";
|
|
80
|
+
import { StaleBanner as Za, StateBanner as Qa, stateBannerVariants as $a } from "./components/state-banner/state-banner.js";
|
|
81
|
+
import { SuggestChips as eo } from "./components/suggest-chips/suggest-chips.js";
|
|
82
|
+
import { Tabs as to, TabsContent as no, TabsList as ro, TabsTrigger as io, tabsListVariants as ao } from "./components/tabs/tabs.js";
|
|
83
|
+
import { Toggle as oo, toggleVariants as so } from "./components/toggle/toggle.js";
|
|
84
|
+
import { StackedBarChart as co } from "./components/stacked-bar-chart/stacked-bar-chart.js";
|
|
85
|
+
import { Switch as lo } from "./components/switch/switch.js";
|
|
86
|
+
import { Tag as uo, TagList as fo } from "./components/tag/tag.js";
|
|
87
|
+
import { Toast as po, ToastAction as mo, ToastClose as ho, ToastContent as go, ToastDescription as _o, ToastPortal as vo, ToastProvider as yo, ToastTitle as bo, ToastViewport as xo, Toaster as So, createToastManager as Co, toast as wo, useToastManager as To } from "./components/toast/toast.js";
|
|
88
|
+
import { ToggleGroup as Eo, ToggleGroupItem as Do } from "./components/toggle-group/toggle-group.js";
|
|
89
|
+
import { TurnSteps as Oo } from "./components/turn-steps/turn-steps.js";
|
|
90
|
+
export { He as APP_SIDEBAR_DEFAULT_WIDTH, Ue as APP_SIDEBAR_MAX_WIDTH, We as APP_SIDEBAR_MIN_WIDTH, Ge as APP_SIDEBAR_RAIL_WIDTH, w as Accordion, T as AccordionContent, E as AccordionItem, D as AccordionTrigger, O as Alert, k as AlertAction, A as AlertDescription, M as AlertDialog, N as AlertDialogAction, P as AlertDialogCancel, F as AlertDialogContent, I as AlertDialogDescription, L as AlertDialogFooter, R as AlertDialogHeader, z as AlertDialogMedia, B as AlertDialogOverlay, V as AlertDialogPortal, H as AlertDialogTitle, U as AlertDialogTrigger, j as AlertTitle, Ke as AppShell, qe as AppSidebar, Je as AppSidebarWorkspace, Ye as AppTopBar, Xe as ApprovalCard, Ze as AspectRatio, Qe as Attachment, $e as AttachmentAction, et as AttachmentActions, tt as AttachmentContent, nt as AttachmentDescription, rt as AttachmentGroup, it as AttachmentMedia, at as AttachmentTitle, ot as AttachmentTrigger, st as Avatar, ct as AvatarBadge, lt as AvatarFallback, ut as AvatarGroup, dt as AvatarGroupCount, ft as AvatarImage, pt as Badge, Dr as BrandApple, Or as BrandBeehiiv, kr as BrandBing, Ar as BrandBluesky, jr as BrandChatgpt, Mr as BrandEmail, Nr as BrandFacebook, Pr as BrandGithub, Fr as BrandGmail, Ir as BrandGodaddy, Lr as BrandGoogle, Rr as BrandGoogleDocs, zr as BrandInstagram, Br as BrandLinkedin, Vr as BrandMeta, Hr as BrandMicrosoft, Ur as BrandOutlook, Wr as BrandPerplexity, Gr as BrandPhone, Kr as BrandReddit, qr as BrandSearchConsole, Jr as BrandShopify, Yr as BrandSquarespace, Xr as BrandThreads, Zr as BrandTiktok, Qr as BrandWordpress, $r as BrandX, ei as BrandYelp, ti as BrandYoutube, ni as BrandZapier, ht as Breadcrumb, gt as BreadcrumbEllipsis, _t as BreadcrumbItem, vt as BreadcrumbLink, yt as BreadcrumbList, bt as BreadcrumbPage, xt as BreadcrumbSeparator, St as Bubble, Ct as BubbleContent, wt as BubbleGroup, Tt as BubbleReactions, t as Button, Et as ButtonGroup, Dt as ButtonGroupSeparator, Ot as ButtonGroupText, n as ButtonLabel, la as CHANNELS, ua as CHANNEL_COLOR, At as Calendar, jt as CalendarDayButton, i as Card, a as CardAction, o as CardContent, s as CardDescription, c as CardFooter, l as CardHeader, u as CardTitle, Mt as Carousel, Nt as CarouselContent, Pt as CarouselItem, Ft as CarouselNext, It as CarouselPrevious, Rt as ChartContainer, zt as ChartLegend, Bt as ChartLegendContent, Vt as ChartStyle, Ht as ChartTooltip, Ut as ChartTooltipContent, Wt as ChatBar, Gt as ChatBarAddButton, Kt as ChatBarAttachment, Jt as ChatListGroup, Yt as ChatListItem, Xt as ChatPanel, Zt as ChatPanelBody, Qt as ChatPanelFooter, $t as ChatPanelHeader, en as Checkbox, tn as Collapsible, nn as CollapsibleContent, rn as CollapsibleTrigger, fn as Combobox, pn as ComboboxChip, mn as ComboboxChips, hn as ComboboxChipsInput, gn as ComboboxCollection, _n as ComboboxContent, vn as ComboboxEmpty, yn as ComboboxGroup, bn as ComboboxInput, xn as ComboboxItem, Sn as ComboboxLabel, Cn as ComboboxList, wn as ComboboxSeparator, Tn as ComboboxTrigger, En as ComboboxValue, An as ConnectNotice, zn as DataTable, Kn as DatePicker, qn as DenseTable, Jn as DenseTableCell, Yn as DenseTableRow, Zn as DetailList, Qn as DetailListItem, $n as Dialog, er as DialogClose, tr as DialogContent, nr as DialogDescription, rr as DialogFooter, ir as DialogHeader, ar as DialogOverlay, or as DialogPortal, sr as DialogTitle, cr as DialogTrigger, lr as Drawer, ur as DrawerClose, dr as DrawerContent, fr as DrawerDescription, pr as DrawerFooter, mr as DrawerHeader, hr as DrawerOverlay, gr as DrawerPortal, _r as DrawerSwipeHandle, vr as DrawerTitle, yr as DrawerTrigger, W as DropdownMenu, G as DropdownMenuCheckboxItem, K as DropdownMenuContent, q as DropdownMenuGroup, J as DropdownMenuItem, Y as DropdownMenuLabel, X as DropdownMenuPortal, Z as DropdownMenuRadioGroup, Q as DropdownMenuRadioItem, $ as DropdownMenuSeparator, ee as DropdownMenuShortcut, te as DropdownMenuSub, ne as DropdownMenuSubContent, re as DropdownMenuSubTrigger, ie as DropdownMenuTrigger, br as EditableText, xr as Empty, Sr as EmptyContent, Cr as EmptyDescription, wr as EmptyHeader, Tr as EmptyMedia, Er as EmptyTitle, li as FaceStackButton, p as Field, m as FieldContent, h as FieldDescription, g as FieldError, _ as FieldGroup, v as FieldLabel, y as FieldLegend, b as FieldSeparator, x as FieldSet, S as FieldTitle, ui as FilterChips, gi as GoalCard, bi as HoverCard, xi as HoverCardContent, Si as HoverCardTrigger, Ci as IdentityMark, wi as IdentityMarkImage, C as Input, on as InputGroup, sn as InputGroupAddon, cn as InputGroupButton, ln as InputGroupInput, un as InputGroupText, dn as InputGroupTextarea, Ti as Item, Ei as ItemActions, Di as ItemContent, Oi as ItemDescription, ki as ItemFooter, Ai as ItemGroup, ji as ItemHeader, Mi as ItemMedia, Ni as ItemSeparator, Pi as ItemTitle, d as Label, da as LetterMark, Fi as Marker, Ii as MarkerContent, Li as MarkerIcon, zi as MediaThumbnail, Vi as Message, Hi as MessageAvatar, Ui as MessageContent, Wi as MessageFooter, Gi as MessageGroup, Ki as MessageHeader, qi as MetricOverview, Ji as MetricTile, Xi as NativeSelect, Zi as NativeSelectOptGroup, Qi as NativeSelectOption, $i as NavigationAction, ri as PLATFORMS, ii as PLATFORM_COLOR, ai as PLATFORM_ICON, oi as PLATFORM_LABEL, _i as PaceBadge, vi as PaceMeter, ta as PageHeader, na as Pagination, ra as PaginationContent, ia as PaginationEllipsis, aa as PaginationItem, oa as PaginationLink, sa as PaginationNext, ca as PaginationPrevious, ci as PlatformAvatar, si as PlatformIcon, Bn as Popover, Vn as PopoverContent, Hn as PopoverDescription, Un as PopoverHeader, Wn as PopoverTitle, Gn as PopoverTrigger, fa as PostCard, pa as PostCardList, di as Progress, fi as ProgressIndicator, pi as ProgressLabel, mi as ProgressTrack, hi as ProgressValue, ma as Questionnaire, ha as QuestionnaireActions, ga as QuestionnaireChoice, _a as QuestionnaireChoiceDescription, va as QuestionnaireChoices, ya as QuestionnaireDescription, ba as QuestionnaireError, xa as QuestionnaireInput, Sa as QuestionnaireItem, Ca as QuestionnaireNext, wa as QuestionnairePrevious, Ta as QuestionnaireProgress, Ea as QuestionnaireSkip, Da as QuestionnaireSubmit, Oa as QuestionnaireTitle, ka as RadioGroup, Aa as RadioGroupItem, ja as Rating, Ma as ScrollArea, Na as ScrollBar, Pa as SectionHeader, Fa as Select, Ia as SelectContent, La as SelectGroup, Ra as SelectItem, za as SelectLabel, Ba as SelectScrollDownButton, Va as SelectScrollUpButton, Ha as SelectSeparator, Ua as SelectTrigger, Wa as SelectValue, f as Separator, ae as Sheet, oe as SheetClose, se as SheetContent, ce as SheetDescription, le as SheetFooter, ue as SheetHeader, de as SheetTitle, fe as SheetTrigger, ve as Sidebar, ye as SidebarContent, be as SidebarFooter, xe as SidebarGroup, Se as SidebarGroupAction, Ce as SidebarGroupContent, we as SidebarGroupLabel, Te as SidebarHeader, Ee as SidebarInput, De as SidebarInset, Oe as SidebarMenu, ke as SidebarMenuAction, Ae as SidebarMenuBadge, je as SidebarMenuButton, Me as SidebarMenuItem, Ne as SidebarMenuSkeleton, Pe as SidebarMenuSub, Fe as SidebarMenuSubButton, Ie as SidebarMenuSubItem, Le as SidebarProvider, Re as SidebarRail, ze as SidebarSeparator, Be as SidebarTrigger, Ga as SignalDots, Ka as SignalStrip, pe as Skeleton, qa as Slider, Ja as SourceAvatar, Ya as Sparkline, Xa as Spinner, co as StackedBarChart, Za as StaleBanner, Qa as StateBanner, On as StatusIndicator, eo as SuggestChips, lo as Switch, jn as Table, Mn as TableBody, Nn as TableCaption, Pn as TableCell, Fn as TableFooter, In as TableHead, Ln as TableHeader, Rn as TableRow, to as Tabs, no as TabsContent, ro as TabsList, io as TabsTrigger, uo as Tag, fo as TagList, an as Textarea, po as Toast, mo as ToastAction, ho as ToastClose, go as ToastContent, _o as ToastDescription, vo as ToastPortal, yo as ToastProvider, bo as ToastTitle, xo as ToastViewport, So as Toaster, oo as Toggle, Eo as ToggleGroup, Do as ToggleGroupItem, me as Tooltip, he as TooltipContent, ge as TooltipProvider, _e as TooltipTrigger, Oo as TurnSteps, mt as badgeVariants, kt as buttonGroupVariants, r as buttonVariants, qt as chatBarFormVariants, e as cn, Co as createToastManager, Ri as markerVariants, Bi as mediaThumbnailVariants, Yi as metricTileVariants, ea as navigationActionVariants, yi as paceStatusOf, Xn as sortDenseTableRows, $a as stateBannerVariants, kn as statusDotVariants, ao as tabsListVariants, wo as toast, so as toggleVariants, Lt as useCarousel, Dn as useComboboxAnchor, Ve as useSidebar, To as useToastManager };
|
package/package.json
CHANGED
package/src/styles/globals.css
CHANGED
|
@@ -185,6 +185,9 @@
|
|
|
185
185
|
--type-body-size: 0.9375rem;
|
|
186
186
|
--type-body-line-height: 1.45;
|
|
187
187
|
--type-body-letter-spacing: 0;
|
|
188
|
+
/* Chat messages: denser than body copy, so a conversation reads like one (ADR 0035). */
|
|
189
|
+
--type-chat-size: 0.875rem;
|
|
190
|
+
--type-chat-line-height: 1.45;
|
|
188
191
|
/* Regular 14px and 13px text for secondary lines and notes (ADR 0029). */
|
|
189
192
|
--type-small-size: 0.875rem;
|
|
190
193
|
--type-small-line-height: 1.45;
|
|
@@ -761,6 +764,11 @@
|
|
|
761
764
|
line-height: var(--type-small-line-height);
|
|
762
765
|
}
|
|
763
766
|
|
|
767
|
+
.type-chat {
|
|
768
|
+
font-size: var(--type-chat-size);
|
|
769
|
+
line-height: var(--type-chat-line-height);
|
|
770
|
+
}
|
|
771
|
+
|
|
764
772
|
.type-detail {
|
|
765
773
|
font-size: var(--type-detail-size);
|
|
766
774
|
line-height: var(--type-detail-line-height);
|