@estiva-app/ui 0.91.2 → 0.92.1
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/AppProvider.d.ts +7 -3
- package/dist/AppProvider.d.ts.map +1 -1
- package/dist/AttachedCard.d.ts +5 -1
- package/dist/AttachedCard.d.ts.map +1 -1
- package/dist/BlockNodes.d.ts +14 -1
- package/dist/BlockNodes.d.ts.map +1 -1
- package/dist/Button.d.ts +11 -1
- package/dist/Button.d.ts.map +1 -1
- package/dist/CommentBox.d.ts +9 -2
- package/dist/CommentBox.d.ts.map +1 -1
- package/dist/ComposerTriggers.d.ts +11 -2
- package/dist/ComposerTriggers.d.ts.map +1 -1
- package/dist/DocumentEditor.d.ts.map +1 -1
- package/dist/LinkCard.d.ts.map +1 -1
- package/dist/LinkChip.d.ts.map +1 -1
- package/dist/LinkChips.d.ts +2 -1
- package/dist/LinkChips.d.ts.map +1 -1
- package/dist/LinkParts.d.ts +6 -1
- package/dist/LinkParts.d.ts.map +1 -1
- package/dist/LinkPlaces.d.ts +7 -0
- package/dist/LinkPlaces.d.ts.map +1 -1
- package/dist/LinkRow.d.ts +29 -6
- package/dist/LinkRow.d.ts.map +1 -1
- package/dist/PartCard.d.ts +9 -2
- package/dist/PartCard.d.ts.map +1 -1
- package/dist/ReferenceCards.d.ts +9 -39
- package/dist/ReferenceCards.d.ts.map +1 -1
- package/dist/ReferenceMenu.d.ts.map +1 -1
- package/dist/editor.d.ts +1 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +204 -183
- package/dist/editor.js.map +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +211 -97
- package/dist/index.js.map +3 -3
- package/dist/linked.d.ts +48 -3
- package/dist/linked.d.ts.map +1 -1
- package/dist/linked.examples.d.ts +6 -0
- package/dist/linked.examples.d.ts.map +1 -1
- package/dist/linkedFrom.d.ts +7 -3
- package/dist/linkedFrom.d.ts.map +1 -1
- package/package.json +1 -1
- package/registry.json +65 -56
- package/src/AppProvider.mdx +7 -5
- package/src/AppProvider.test.tsx +15 -1
- package/src/AppProvider.tsx +13 -4
- package/src/AttachedCard.mdx +2 -1
- package/src/AttachedCard.test.tsx +28 -0
- package/src/AttachedCard.tsx +12 -2
- package/src/BlockNodes.mdx +8 -1
- package/src/BlockNodes.tsx +98 -11
- package/src/Button.mdx +25 -3
- package/src/Button.stories.tsx +15 -1
- package/src/Button.test.tsx +33 -0
- package/src/Button.tsx +65 -49
- package/src/CommentBox.mdx +8 -2
- package/src/CommentBox.stories.tsx +28 -1
- package/src/CommentBox.test.tsx +64 -1
- package/src/CommentBox.tsx +44 -5
- package/src/ComposerTriggers.mdx +1 -0
- package/src/ComposerTriggers.tsx +34 -15
- package/src/DocumentEditor.mdx +1 -1
- package/src/DocumentEditor.stories.tsx +2 -2
- package/src/DocumentEditor.test.tsx +37 -7
- package/src/DocumentEditor.tsx +2 -1
- package/src/LinkCard.mdx +9 -5
- package/src/LinkCard.stories.tsx +17 -2
- package/src/LinkCard.test.tsx +21 -0
- package/src/LinkCard.tsx +35 -16
- package/src/LinkChip.mdx +6 -1
- package/src/LinkChip.stories.tsx +7 -1
- package/src/LinkChip.test.tsx +12 -0
- package/src/LinkChip.tsx +6 -2
- package/src/LinkChips.mdx +4 -3
- package/src/LinkChips.stories.tsx +2 -2
- package/src/LinkChips.test.tsx +1 -2
- package/src/LinkChips.ts +2 -1
- package/src/LinkParts.mdx +3 -2
- package/src/LinkParts.stories.tsx +8 -0
- package/src/LinkParts.tsx +40 -6
- package/src/LinkPlaces.mdx +3 -0
- package/src/LinkPlaces.ts +19 -0
- package/src/LinkRow.mdx +8 -2
- package/src/LinkRow.stories.tsx +14 -2
- package/src/LinkRow.test.tsx +31 -1
- package/src/LinkRow.tsx +69 -25
- package/src/PartCard.mdx +9 -1
- package/src/PartCard.stories.tsx +9 -0
- package/src/PartCard.test.tsx +13 -0
- package/src/PartCard.tsx +19 -5
- package/src/ReferenceCards.test.tsx +4 -35
- package/src/ReferenceCards.ts +10 -119
- package/src/ReferenceMenu.mdx +6 -4
- package/src/ReferenceMenu.test.tsx +67 -5
- package/src/ReferenceMenu.tsx +18 -7
- package/src/editor.ts +0 -3
- package/src/index.ts +4 -1
- package/src/linked.examples.ts +6 -0
- package/src/linked.test.ts +35 -1
- package/src/linked.ts +108 -3
- package/src/linkedFrom.test.tsx +42 -2
- package/src/linkedFrom.ts +15 -7
- package/src/registry/registry.test.ts +25 -6
- package/src/ReferenceCards.mdx +0 -86
- package/src/ReferenceCards.stories.tsx +0 -66
package/dist/index.js
CHANGED
|
@@ -24,7 +24,12 @@ function useInAppClick(href, onClick) {
|
|
|
24
24
|
} catch {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
if (url.origin !== window.location.origin)
|
|
27
|
+
if (url.origin !== window.location.origin) {
|
|
28
|
+
if (url.protocol !== "https:" && url.protocol !== "http:") return;
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
window.open(url.href, "_blank", "noopener,noreferrer");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
28
33
|
event.preventDefault();
|
|
29
34
|
navigate(`${url.pathname}${url.search}${url.hash}`);
|
|
30
35
|
};
|
|
@@ -989,58 +994,57 @@ function Button({
|
|
|
989
994
|
disabled,
|
|
990
995
|
disabledReason,
|
|
991
996
|
type = "button",
|
|
997
|
+
href,
|
|
998
|
+
external = false,
|
|
992
999
|
...props
|
|
993
1000
|
}) {
|
|
994
1001
|
const hasLeadingIcon = !!leadingIcon;
|
|
995
1002
|
const formBusy = useFormBusy();
|
|
996
|
-
const
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
// Disabled too, as it always drew.
|
|
1034
|
-
variant === "resolve" && "signal:bg-transparent signal:border signal:border-border-default signal:text-text-primary signal:shadow-none signal:hover:bg-success-muted signal:hover:border-success-outline signal:hover:text-success-default signal:transition-colors",
|
|
1035
|
-
className
|
|
1036
|
-
),
|
|
1037
|
-
...props,
|
|
1038
|
-
children: [
|
|
1039
|
-
leadingIcon,
|
|
1040
|
-
children
|
|
1041
|
-
]
|
|
1042
|
-
}
|
|
1003
|
+
const unusable = disabled || !!disabledReason || formBusy;
|
|
1004
|
+
const anchor = props;
|
|
1005
|
+
const inApp = useInAppClick(href, anchor.onClick);
|
|
1006
|
+
const look = (off) => cn(
|
|
1007
|
+
// No `self-center` here, deliberately — `IconButton` needs it and this
|
|
1008
|
+
// does not, and the difference is the `h-8` / `h-6` on the next two
|
|
1009
|
+
// lines. `align-items: stretch` only stretches a child whose cross
|
|
1010
|
+
// size is `auto`; a Button always states its height, so a stretching
|
|
1011
|
+
// parent cannot change it. Measured in Chrome on 2026-09-12, in the
|
|
1012
|
+
// 260px row of Finding 49: 32px with `self-center` and 32px without.
|
|
1013
|
+
// What the class DID do was override the caller on the other axis —
|
|
1014
|
+
// in a column it beats the parent's `items-start`, which centred the
|
|
1015
|
+
// four actions in Ship's `ProjectRail` and the trigger in five of
|
|
1016
|
+
// this package's own story frames, each of which asks for the top.
|
|
1017
|
+
// A control does not get to decide where its caller puts it.
|
|
1018
|
+
"inline-flex items-center justify-center gap-1 rounded-md transition-colors font-sans font-medium",
|
|
1019
|
+
size === "default" && "h-8 min-h-8 text-btn-default",
|
|
1020
|
+
size === "small" && "h-6 min-h-6 text-btn-small",
|
|
1021
|
+
// Extra right padding beside a leading icon, for optical balance.
|
|
1022
|
+
size === "default" && (hasLeadingIcon ? "pl-2 pr-3" : "px-2"),
|
|
1023
|
+
size === "small" && (hasLeadingIcon ? "pl-1.5 pr-2" : "px-1.5"),
|
|
1024
|
+
!off && (variant === "primary" || variant === "resolve") && "bg-accent-primary hover:bg-accent-hover text-text-inverse cursor-pointer signal:font-semibold",
|
|
1025
|
+
// @estiva-escape(no-copied-look): W2 (Katerina, 24 September: leave alone): an outlined button shares four words with Reaction's pill by coincidence
|
|
1026
|
+
!off && variant === "outlined" && "border border-border-default hover:bg-bg-hover text-text-primary cursor-pointer",
|
|
1027
|
+
!off && variant === "muted" && "hover:bg-bg-hover text-text-primary cursor-pointer",
|
|
1028
|
+
!off && variant === "destructive" && "hover:bg-error-muted text-error-default cursor-pointer",
|
|
1029
|
+
off && "bg-bg-disabled text-text-disabled",
|
|
1030
|
+
// `pointer-events-none` only where the button is truly out of reach.
|
|
1031
|
+
// With a `disabledReason` the button IS the tooltip's trigger, and a
|
|
1032
|
+
// trigger the pointer cannot land on never opens one — Base UI already
|
|
1033
|
+
// swallows the click (`focusableWhenDisabled` gives `aria-disabled`
|
|
1034
|
+
// and a prevented `onClick`), so nothing else needs it.
|
|
1035
|
+
off && !disabledReason && "pointer-events-none",
|
|
1036
|
+
off && variant === "outlined" && "border border-border-default",
|
|
1037
|
+
// Disabled too, as it always drew.
|
|
1038
|
+
variant === "resolve" && "signal:bg-transparent signal:border signal:border-border-default signal:text-text-primary signal:shadow-none signal:hover:bg-success-muted signal:hover:border-success-outline signal:hover:text-success-default signal:transition-colors",
|
|
1039
|
+
className
|
|
1043
1040
|
);
|
|
1041
|
+
const button = href && !unusable ? /* @__PURE__ */ jsxs8("a", { href, ...external ? { target: "_blank", rel: "noopener noreferrer" } : {}, className: look(false), ...anchor, onClick: inApp, children: [
|
|
1042
|
+
leadingIcon,
|
|
1043
|
+
children
|
|
1044
|
+
] }) : /* @__PURE__ */ jsxs8(BaseButton4, { type, disabled: unusable, focusableWhenDisabled: !!disabledReason, className: (state) => look(state.disabled), ...props, children: [
|
|
1045
|
+
leadingIcon,
|
|
1046
|
+
children
|
|
1047
|
+
] });
|
|
1044
1048
|
return disabledReason ? /* @__PURE__ */ jsx15(TooltipTrigger, { label: disabledReason, children: button }) : button;
|
|
1045
1049
|
}
|
|
1046
1050
|
|
|
@@ -4103,6 +4107,61 @@ function loadingShapeOf(linked) {
|
|
|
4103
4107
|
footer: linked.status || linked.owner ? "pickers" : linked.authors ? "people" : "line"
|
|
4104
4108
|
};
|
|
4105
4109
|
}
|
|
4110
|
+
var FOOTERS = ["pickers", "people", "line", "none"];
|
|
4111
|
+
function storedCardShape(value) {
|
|
4112
|
+
if (!value || typeof value !== "object") return void 0;
|
|
4113
|
+
const { subtitle, summary, rows, latest, ring, footer, height } = value;
|
|
4114
|
+
return {
|
|
4115
|
+
subtitle: subtitle === true,
|
|
4116
|
+
summary: summary === true,
|
|
4117
|
+
// A card lists a few of its items; a bad number must not draw a page of bars.
|
|
4118
|
+
rows: typeof rows === "number" && Number.isInteger(rows) ? Math.min(Math.max(rows, 0), 10) : 0,
|
|
4119
|
+
latest: latest === true,
|
|
4120
|
+
ring: ring === true,
|
|
4121
|
+
footer: FOOTERS.find((one) => one === footer) ?? "line",
|
|
4122
|
+
...typeof height === "number" && height > 0 && height < 2e3 ? { height: Math.round(height) } : {}
|
|
4123
|
+
};
|
|
4124
|
+
}
|
|
4125
|
+
function cardShapeMemory(storageKey, options = {}) {
|
|
4126
|
+
const { limit = 300, firstDraw = {} } = options;
|
|
4127
|
+
let held;
|
|
4128
|
+
const shapes = () => {
|
|
4129
|
+
if (held) return held;
|
|
4130
|
+
held = /* @__PURE__ */ new Map();
|
|
4131
|
+
try {
|
|
4132
|
+
const stored = JSON.parse(localStorage.getItem(storageKey) ?? "[]");
|
|
4133
|
+
for (const entry of Array.isArray(stored) ? stored : []) {
|
|
4134
|
+
const shape = Array.isArray(entry) && typeof entry[0] === "string" ? storedCardShape(entry[1]) : void 0;
|
|
4135
|
+
if (shape) held.set(entry[0], shape);
|
|
4136
|
+
}
|
|
4137
|
+
} catch {
|
|
4138
|
+
held = /* @__PURE__ */ new Map();
|
|
4139
|
+
}
|
|
4140
|
+
return held;
|
|
4141
|
+
};
|
|
4142
|
+
return {
|
|
4143
|
+
of: (id, kind) => shapes().get(id) ?? firstDraw[kind],
|
|
4144
|
+
note: (id, shape) => {
|
|
4145
|
+
const current = shapes();
|
|
4146
|
+
if ([...current.keys()].at(-1) === id && JSON.stringify(current.get(id)) === JSON.stringify(shape)) return;
|
|
4147
|
+
const next = new Map(current);
|
|
4148
|
+
next.delete(id);
|
|
4149
|
+
next.set(id, shape);
|
|
4150
|
+
held = new Map([...next].slice(-limit));
|
|
4151
|
+
try {
|
|
4152
|
+
localStorage.setItem(storageKey, JSON.stringify([...held]));
|
|
4153
|
+
} catch {
|
|
4154
|
+
}
|
|
4155
|
+
},
|
|
4156
|
+
clear: () => {
|
|
4157
|
+
held = void 0;
|
|
4158
|
+
try {
|
|
4159
|
+
localStorage.removeItem(storageKey);
|
|
4160
|
+
} catch {
|
|
4161
|
+
}
|
|
4162
|
+
}
|
|
4163
|
+
};
|
|
4164
|
+
}
|
|
4106
4165
|
function unavailableMemory(storageKey, limit = 300) {
|
|
4107
4166
|
let held;
|
|
4108
4167
|
const list = () => {
|
|
@@ -4296,6 +4355,7 @@ function linkedFrom(object, options) {
|
|
|
4296
4355
|
}
|
|
4297
4356
|
const onAct = object.archived ? void 0 : options.onAct;
|
|
4298
4357
|
const key = keyOf(object);
|
|
4358
|
+
const noun = nounOf(object);
|
|
4299
4359
|
const status = statusOf(object, onAct);
|
|
4300
4360
|
const owner = ownerOf(object, options, onAct);
|
|
4301
4361
|
const children = childrenOf(object, options);
|
|
@@ -4307,7 +4367,10 @@ function linkedFrom(object, options) {
|
|
|
4307
4367
|
title: titleOf(object),
|
|
4308
4368
|
href,
|
|
4309
4369
|
...key ? { key } : {},
|
|
4310
|
-
|
|
4370
|
+
// Its type's word, or its app's name when the type has none (record a-file-is-labelled-by-its-type-not-its-app).
|
|
4371
|
+
...noun ? { noun } : {},
|
|
4372
|
+
// Its row and card say so, as its values turn to words above (Katerina, 30 Oct).
|
|
4373
|
+
...object.archived ? { archived: true } : {},
|
|
4311
4374
|
// Interop reads every file kind's summary into its subtitle (SPEC §6.12).
|
|
4312
4375
|
...slots.subtitle?.value ? { summary: slots.subtitle.value } : {},
|
|
4313
4376
|
...status ? { status } : {},
|
|
@@ -4321,20 +4384,23 @@ function linkedFrom(object, options) {
|
|
|
4321
4384
|
}
|
|
4322
4385
|
function linkStateFrom(object, unread, options) {
|
|
4323
4386
|
if (object === void 0) return { state: "loading", kind: unread.kind };
|
|
4324
|
-
|
|
4387
|
+
const written = unread.url ? { url: unread.url } : {};
|
|
4388
|
+
if (object === null) return { state: "unavailable", kind: unread.kind, noun: unread.noun, ...unread.deleted ? { deleted: true } : {}, ...written };
|
|
4325
4389
|
if (object.unreachable) {
|
|
4326
4390
|
const href = object.openUrl && /^https:\/\//i.test(object.openUrl) ? object.openUrl : void 0;
|
|
4327
4391
|
return {
|
|
4328
4392
|
state: "unavailable",
|
|
4329
4393
|
kind: linkedKindOfKind(object.kind),
|
|
4330
|
-
noun:
|
|
4331
|
-
...href ? { openIn: { app: object.appName ?? "its app", href } } : {}
|
|
4394
|
+
noun: nounOf(object) || unread.noun,
|
|
4395
|
+
...href ? { openIn: { app: object.appName ?? "its app", href } } : {},
|
|
4396
|
+
...written
|
|
4332
4397
|
};
|
|
4333
4398
|
}
|
|
4334
4399
|
return { state: "ready", linked: linkedFrom(object, options) };
|
|
4335
4400
|
}
|
|
4336
4401
|
|
|
4337
4402
|
// src/LinkParts.tsx
|
|
4403
|
+
import { useContext as useContext7 } from "react";
|
|
4338
4404
|
import { IconCircleCheck, IconCircleDashed as IconCircleDashed2, IconCircleHalf2, IconCircleX, IconFileText, IconMessage2 as IconMessage22 } from "@tabler/icons-react";
|
|
4339
4405
|
import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4340
4406
|
var STATUS_ICON = {
|
|
@@ -4384,8 +4450,23 @@ function ProgressRing({ done, total }) {
|
|
|
4384
4450
|
total
|
|
4385
4451
|
] }) });
|
|
4386
4452
|
}
|
|
4453
|
+
function countWords(count, noun) {
|
|
4454
|
+
if (count !== 1) return `${count} ${noun}`;
|
|
4455
|
+
const one = /ies$/.test(noun) ? noun.replace(/ies$/, "y") : noun.replace(/s$/, "");
|
|
4456
|
+
return `${count} ${one}`;
|
|
4457
|
+
}
|
|
4387
4458
|
function CommentCount({ conversation, noun = "comments" }) {
|
|
4388
4459
|
const { count, href, unread = false } = conversation;
|
|
4460
|
+
const boxed = useContext7(inTheBox);
|
|
4461
|
+
const said = countWords(count, noun);
|
|
4462
|
+
if (boxed || !href) {
|
|
4463
|
+
return /* @__PURE__ */ jsxs41("span", { className: cn("inline-flex h-6 shrink-0 items-center gap-1 px-1.5 text-small tabular-nums", unread ? "font-medium text-text-primary" : "text-text-secondary"), children: [
|
|
4464
|
+
/* @__PURE__ */ jsx60(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4465
|
+
/* @__PURE__ */ jsx60("span", { "aria-hidden": true, children: count }),
|
|
4466
|
+
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${said}, unread` : said }),
|
|
4467
|
+
unread && /* @__PURE__ */ jsx60(UnreadDot, { className: "h-auto w-auto" })
|
|
4468
|
+
] });
|
|
4469
|
+
}
|
|
4389
4470
|
return (
|
|
4390
4471
|
/*
|
|
4391
4472
|
* A small button's shape, as Button's small one is: 24px tall like the pickers beside it, 6px each side, its corners
|
|
@@ -4396,12 +4477,16 @@ function CommentCount({ conversation, noun = "comments" }) {
|
|
|
4396
4477
|
*/
|
|
4397
4478
|
/* @__PURE__ */ jsx60("span", { className: cn("relative z-10 inline-flex h-6 shrink-0 rounded-md text-small tabular-nums transition-colors hover:bg-bg-hover", unread ? "font-medium text-text-primary" : "text-text-secondary"), children: /* @__PURE__ */ jsxs41(Link, { href, variant: "plain", className: "flex h-full items-center gap-1 px-1.5", children: [
|
|
4398
4479
|
/* @__PURE__ */ jsx60(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4399
|
-
count,
|
|
4400
|
-
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${
|
|
4480
|
+
/* @__PURE__ */ jsx60("span", { "aria-hidden": true, children: count }),
|
|
4481
|
+
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${said}, unread \u2014 open the conversation` : `${said} \u2014 open the conversation` }),
|
|
4401
4482
|
unread && /* @__PURE__ */ jsx60(UnreadDot, { className: "h-auto w-auto" })
|
|
4402
4483
|
] }) })
|
|
4403
4484
|
);
|
|
4404
4485
|
}
|
|
4486
|
+
function OwnerFace({ option }) {
|
|
4487
|
+
const nobody = !option || option.value === "";
|
|
4488
|
+
return /* @__PURE__ */ jsx60(Avatar, { name: nobody ? void 0 : option.label, src: nobody ? void 0 : option.picture, size: 16 });
|
|
4489
|
+
}
|
|
4405
4490
|
function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false }) {
|
|
4406
4491
|
const statusNow = chosenOf(status);
|
|
4407
4492
|
const ownerNow = chosenOf(owner);
|
|
@@ -4427,7 +4512,7 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4427
4512
|
}
|
|
4428
4513
|
)),
|
|
4429
4514
|
owner && (ownerWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
|
|
4430
|
-
/* @__PURE__ */ jsx60(
|
|
4515
|
+
/* @__PURE__ */ jsx60(OwnerFace, { option: ownerNow }),
|
|
4431
4516
|
/* @__PURE__ */ jsx60("span", { className: "truncate", children: ownerNow?.label ?? "Unassigned" })
|
|
4432
4517
|
] }) : /* @__PURE__ */ jsx60(
|
|
4433
4518
|
Select,
|
|
@@ -4439,7 +4524,7 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4439
4524
|
placeholder: "Unassigned",
|
|
4440
4525
|
onChange: (value) => owner.onChange?.(value),
|
|
4441
4526
|
ariaLabel: ownerLabel,
|
|
4442
|
-
options: owner.options.map((option) => ({ value: option.value, label: option.label, leading: /* @__PURE__ */ jsx60(
|
|
4527
|
+
options: owner.options.map((option) => ({ value: option.value, label: option.label, leading: /* @__PURE__ */ jsx60(OwnerFace, { option }) }))
|
|
4443
4528
|
}
|
|
4444
4529
|
))
|
|
4445
4530
|
] })
|
|
@@ -4450,20 +4535,20 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4450
4535
|
import { useSyncExternalStore } from "react";
|
|
4451
4536
|
|
|
4452
4537
|
// src/LinkCard.tsx
|
|
4453
|
-
import { useContext as
|
|
4538
|
+
import { useContext as useContext9 } from "react";
|
|
4454
4539
|
|
|
4455
4540
|
// src/LinkRow.tsx
|
|
4456
|
-
import { useContext as
|
|
4541
|
+
import { useContext as useContext8 } from "react";
|
|
4457
4542
|
import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4458
4543
|
var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
|
|
4459
|
-
function LinkUnavailable({ kind, noun, openIn, card = false }) {
|
|
4460
|
-
|
|
4544
|
+
function LinkUnavailable({ kind, noun, openIn, card = false, deleted = false }) {
|
|
4545
|
+
return /* @__PURE__ */ jsx61(UnavailableRow, { kind, words: `${noun} ${deleted ? "deleted" : "not available"}`, openIn: deleted ? void 0 : openIn, card });
|
|
4546
|
+
}
|
|
4547
|
+
function UnavailableRow({ kind, words, href, openIn, card = false }) {
|
|
4548
|
+
const wide = useContext8(inTheBox);
|
|
4461
4549
|
return /* @__PURE__ */ jsxs42(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, "max-w-[480px]"), children: [
|
|
4462
4550
|
/* @__PURE__ */ jsx61("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx61(LinkedIcon, { kind }) }),
|
|
4463
|
-
/* @__PURE__ */
|
|
4464
|
-
noun,
|
|
4465
|
-
" not available"
|
|
4466
|
-
] }),
|
|
4551
|
+
/* @__PURE__ */ jsx61("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: href && !wide ? /* @__PURE__ */ jsx61(Link, { href, variant: "quiet", children: words }) : words }),
|
|
4467
4552
|
openIn && /* @__PURE__ */ jsx61("span", { className: "shrink-0 text-caption text-text-secondary", children: /* @__PURE__ */ jsxs42(Link, { href: openIn.href, variant: "quiet", external: true, children: [
|
|
4468
4553
|
"Open in ",
|
|
4469
4554
|
openIn.app,
|
|
@@ -4472,7 +4557,11 @@ function LinkUnavailable({ kind, noun, openIn, card = false }) {
|
|
|
4472
4557
|
] });
|
|
4473
4558
|
}
|
|
4474
4559
|
function linkMetaOf(linked, withWhen = false) {
|
|
4475
|
-
return [linked.key, kindNounOf(linked), linked.subtitle, withWhen ? linked.updated : void 0].filter(Boolean).join(" \xB7 ");
|
|
4560
|
+
return [linked.key, kindNounOf(linked), linked.archived ? "Archived" : void 0, linked.subtitle, withWhen ? linked.updated : void 0].filter(Boolean).join(" \xB7 ");
|
|
4561
|
+
}
|
|
4562
|
+
function WrittenUrl({ url, block = false }) {
|
|
4563
|
+
const link = /* @__PURE__ */ jsx61(Link, { href: url, external: true, children: url });
|
|
4564
|
+
return block ? /* @__PURE__ */ jsx61("span", { className: "block min-w-0 truncate text-body-2", children: link }) : link;
|
|
4476
4565
|
}
|
|
4477
4566
|
function LinkRow({ link, preview = true }) {
|
|
4478
4567
|
const width = "max-w-[480px]";
|
|
@@ -4485,22 +4574,27 @@ function LinkRow({ link, preview = true }) {
|
|
|
4485
4574
|
] })
|
|
4486
4575
|
] }) });
|
|
4487
4576
|
}
|
|
4488
|
-
if (link.state === "unavailable")
|
|
4577
|
+
if (link.state === "unavailable") {
|
|
4578
|
+
if (link.url) return /* @__PURE__ */ jsx61(WrittenUrl, { url: link.url, block: true });
|
|
4579
|
+
return /* @__PURE__ */ jsx61(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, deleted: link.deleted });
|
|
4580
|
+
}
|
|
4489
4581
|
const { linked } = link;
|
|
4490
4582
|
const status = chosenOf(linked.status);
|
|
4491
4583
|
const owner = chosenOf(linked.owner);
|
|
4492
4584
|
const said = linked.kind === "message" ? linked.author : void 0;
|
|
4493
|
-
const meta = said ?
|
|
4585
|
+
const meta = said ? "" : linkMetaOf(linked, true) || linked.summary;
|
|
4494
4586
|
const row = /* @__PURE__ */ jsxs42(Card, { fill: "inset", hover: "hairline", className: cn("relative", ROW_CLASSES2, width), children: [
|
|
4495
4587
|
/* @__PURE__ */ jsx61(LinkTile, { kind: linked.kind, author: said }),
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4588
|
+
said ? (
|
|
4589
|
+
// Words a person wrote, on one line, as a quote is cut to one (Katerina, 30 Oct): the face, the name, the words
|
|
4590
|
+
// cut to fit, the time.
|
|
4591
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
4592
|
+
/* @__PURE__ */ jsx61("span", { className: "contents text-body-2-strong text-text-primary", children: linked.href ? /* @__PURE__ */ jsx61(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0", children: said.name }) : /* @__PURE__ */ jsx61("span", { className: "min-w-0 truncate", children: said.name }) }),
|
|
4593
|
+
linked.body && /* @__PURE__ */ jsx61("span", { className: "min-w-0 flex-1 truncate text-caption text-text-secondary", children: linked.body }),
|
|
4594
|
+
linked.updated && /* @__PURE__ */ jsx61("span", { className: cn("ml-auto shrink-0 text-caption text-text-muted", TIME_CLASSES), children: linked.updated })
|
|
4595
|
+
] })
|
|
4596
|
+
) : /* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4597
|
+
/* @__PURE__ */ jsx61("span", { className: "contents text-body-2-strong text-text-primary", children: linked.href ? /* @__PURE__ */ jsx61(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, children: linked.title }) : /* @__PURE__ */ jsx61("span", { className: "truncate", children: linked.title }) }),
|
|
4504
4598
|
meta && /* @__PURE__ */ jsx61("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4505
4599
|
] }),
|
|
4506
4600
|
/* @__PURE__ */ jsxs42("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
@@ -4517,17 +4611,25 @@ function LinkRow({ link, preview = true }) {
|
|
|
4517
4611
|
// src/LinkCard.tsx
|
|
4518
4612
|
import { Fragment as Fragment15, jsx as jsx62, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4519
4613
|
var CARD_CLASSES = "flex flex-col gap-3 p-3";
|
|
4614
|
+
function CardLink({ href, truncate = false, className, children }) {
|
|
4615
|
+
const boxed = useContext9(inTheBox);
|
|
4616
|
+
if (boxed || !href) return /* @__PURE__ */ jsx62("span", { className: cn(truncate && "truncate", className), children });
|
|
4617
|
+
return /* @__PURE__ */ jsx62(Link, { href, variant: "quiet", truncate, className, children });
|
|
4618
|
+
}
|
|
4520
4619
|
function LinkCard({ link, readOnly = false, bare = false }) {
|
|
4521
|
-
const boxed =
|
|
4620
|
+
const boxed = useContext9(inTheBox);
|
|
4522
4621
|
if (link.state === "loading") return /* @__PURE__ */ jsx62(LinkCardLoading, { kind: link.kind, shape: link.shape });
|
|
4523
|
-
if (link.state === "unavailable")
|
|
4622
|
+
if (link.state === "unavailable") {
|
|
4623
|
+
if (link.url) return /* @__PURE__ */ jsx62(WrittenUrl, { url: link.url, block: true });
|
|
4624
|
+
return /* @__PURE__ */ jsx62(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, deleted: link.deleted, card: true });
|
|
4625
|
+
}
|
|
4524
4626
|
const { linked } = link;
|
|
4525
4627
|
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx62(SaidBody, { linked }) : /* @__PURE__ */ jsx62(CardBody, { linked, readOnly: readOnly || boxed });
|
|
4526
4628
|
if (bare) return /* @__PURE__ */ jsx62("div", { className: CARD_CLASSES, children: body });
|
|
4527
4629
|
return /* @__PURE__ */ jsx62(Card, { fill: boxed ? "elevated" : "inset", className: cn(CARD_CLASSES, "max-w-[480px]"), children: body });
|
|
4528
4630
|
}
|
|
4529
4631
|
function CardBody({ linked, readOnly }) {
|
|
4530
|
-
const boxed =
|
|
4632
|
+
const boxed = useContext9(inTheBox);
|
|
4531
4633
|
const on = boxed ? "elevated" : "inset";
|
|
4532
4634
|
const meta = linkMetaOf(linked);
|
|
4533
4635
|
const footed = Boolean(linked.status || linked.owner || linked.authors || linked.updated);
|
|
@@ -4535,7 +4637,7 @@ function CardBody({ linked, readOnly }) {
|
|
|
4535
4637
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4536
4638
|
/* @__PURE__ */ jsx62(LinkTile, { kind: linked.kind }),
|
|
4537
4639
|
/* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4538
|
-
/* @__PURE__ */ jsx62("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx62(
|
|
4640
|
+
/* @__PURE__ */ jsx62("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx62(CardLink, { href: linked.href, truncate: true, className: "block", children: linked.title }) }),
|
|
4539
4641
|
meta && /* @__PURE__ */ jsx62("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4540
4642
|
] }),
|
|
4541
4643
|
(linked.done || linked.conversation || linked.members) && // On the title's line, not halfway down the header: the ring, the count, the faces, as a row's (Katerina, 30 Oct).
|
|
@@ -4547,10 +4649,10 @@ function CardBody({ linked, readOnly }) {
|
|
|
4547
4649
|
] }),
|
|
4548
4650
|
linked.summary && /* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.summary }),
|
|
4549
4651
|
linked.children && linked.children.length > 0 && // In a box of their own, a hairline between them, as the card first drew them (Katerina, 29 Oct: "add back the borders").
|
|
4550
|
-
/* @__PURE__ */ jsx62("div", { className: "flex flex-col divide-y divide-border-subtle rounded-md border border-border-subtle leaf:divide-border-strong leaf:border-border-strong", children: linked.children.map((child) => /* @__PURE__ */ jsxs43("div", { className: "relative flex h-8 items-center gap-2 px-2 hover:bg-bg-active", children: [
|
|
4652
|
+
/* @__PURE__ */ jsx62("div", { className: "flex flex-col divide-y divide-border-subtle rounded-md border border-border-subtle leaf:divide-border-strong leaf:border-border-strong", children: linked.children.map((child) => /* @__PURE__ */ jsxs43("div", { className: cn("relative flex h-8 items-center gap-2 px-2", !boxed && "hover:bg-bg-active"), children: [
|
|
4551
4653
|
/* @__PURE__ */ jsx62(StatusMark, { status: child.status }),
|
|
4552
4654
|
child.key && /* @__PURE__ */ jsx62(LinkKey, { children: child.key }),
|
|
4553
|
-
/* @__PURE__ */ jsx62("span", { className: "contents text-body-2 text-text-primary", children: /* @__PURE__ */ jsx62(Link, { href: child.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0 flex-1", children: child.title }) }),
|
|
4655
|
+
/* @__PURE__ */ jsx62("span", { className: "contents text-body-2 text-text-primary", children: boxed || !child.href ? /* @__PURE__ */ jsx62("span", { className: "min-w-0 flex-1 truncate", children: child.title }) : /* @__PURE__ */ jsx62(Link, { href: child.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0 flex-1", children: child.title }) }),
|
|
4554
4656
|
child.owner ? /* @__PURE__ */ jsx62(Avatar, { name: child.owner.name, src: child.owner.picture, size: 16 }) : /* @__PURE__ */ jsx62("span", { className: "size-4 shrink-0", "aria-hidden": true })
|
|
4555
4657
|
] }, child.id)) }),
|
|
4556
4658
|
linked.latest && // 12px between the words "Latest conversation" and the quote they name (Katerina, 29 Oct).
|
|
@@ -4585,8 +4687,8 @@ function SaidBody({ linked }) {
|
|
|
4585
4687
|
return /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4586
4688
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
4587
4689
|
/* @__PURE__ */ jsx62(Avatar, { name: author.name, src: author.picture, size: 24 }),
|
|
4588
|
-
/* @__PURE__ */ jsx62("span", { className: "text-body-2-strong text-text-primary", children: linked.updated ? author.name : /* @__PURE__ */ jsx62(
|
|
4589
|
-
linked.updated && /* @__PURE__ */ jsx62("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx62(
|
|
4690
|
+
/* @__PURE__ */ jsx62("span", { className: "text-body-2-strong text-text-primary", children: linked.updated ? author.name : /* @__PURE__ */ jsx62(CardLink, { href: linked.href, children: author.name }) }),
|
|
4691
|
+
linked.updated && /* @__PURE__ */ jsx62("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx62(CardLink, { href: linked.href, children: linked.updated }) })
|
|
4590
4692
|
] }),
|
|
4591
4693
|
/* @__PURE__ */ jsx62("p", { className: "line-clamp-4 text-body-2 text-text-secondary", children: linked.body ?? linked.title })
|
|
4592
4694
|
] });
|
|
@@ -4601,7 +4703,7 @@ var KIND_SHAPE = {
|
|
|
4601
4703
|
};
|
|
4602
4704
|
function LinkCardLoading({ kind, shape }) {
|
|
4603
4705
|
const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
|
|
4604
|
-
const boxed =
|
|
4706
|
+
const boxed = useContext9(inTheBox);
|
|
4605
4707
|
return /* @__PURE__ */ jsx62("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs43(Card, { fill: boxed ? "elevated" : "inset", "aria-hidden": true, className: cn(CARD_CLASSES, "max-w-[480px]"), children: [
|
|
4606
4708
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4607
4709
|
/* @__PURE__ */ jsx62("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx62(LinkedIcon, { kind }) }),
|
|
@@ -4664,9 +4766,11 @@ function LinkChip({ link, preview = true }) {
|
|
|
4664
4766
|
return /* @__PURE__ */ jsx64(InlineChip, { icon: /* @__PURE__ */ jsx64(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), "aria-busy": true, children: /* @__PURE__ */ jsx64(SkeletonBar, { className: "h-2.5 w-16" }) });
|
|
4665
4767
|
}
|
|
4666
4768
|
if (link.state === "unavailable") {
|
|
4769
|
+
if (link.url) return /* @__PURE__ */ jsx64(WrittenUrl, { url: link.url });
|
|
4667
4770
|
return /* @__PURE__ */ jsxs44(InlineChip, { tone: "muted", icon: /* @__PURE__ */ jsx64(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), children: [
|
|
4668
4771
|
link.noun,
|
|
4669
|
-
"
|
|
4772
|
+
" ",
|
|
4773
|
+
link.deleted ? "deleted" : "not available"
|
|
4670
4774
|
] });
|
|
4671
4775
|
}
|
|
4672
4776
|
const { linked } = link;
|
|
@@ -4676,7 +4780,7 @@ function LinkChip({ link, preview = true }) {
|
|
|
4676
4780
|
InlineChip,
|
|
4677
4781
|
{
|
|
4678
4782
|
icon: said ? /* @__PURE__ */ jsx64(Avatar, { name: said.name, src: said.picture, size: 14 }) : /* @__PURE__ */ jsx64(LinkedIcon, { kind: linked.kind, size: 14, tone: "inherit" }),
|
|
4679
|
-
href: linked.href,
|
|
4783
|
+
href: linked.href || void 0,
|
|
4680
4784
|
className: preview ? "min-w-0 max-w-[40ch]" : "max-w-[min(40ch,calc(100%_-_4px))]",
|
|
4681
4785
|
children: [
|
|
4682
4786
|
linked.key && // 4px more than the chip's gap after it, and kept whole: "ABC-2" never breaks at its hyphen.
|
|
@@ -4690,12 +4794,17 @@ function LinkChip({ link, preview = true }) {
|
|
|
4690
4794
|
}
|
|
4691
4795
|
|
|
4692
4796
|
// src/AttachedCard.tsx
|
|
4693
|
-
import {
|
|
4797
|
+
import { createContext as createContext8, useContext as useContext10 } from "react";
|
|
4798
|
+
import { Fragment as Fragment17, jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4799
|
+
var Attached = createContext8(false);
|
|
4694
4800
|
function AttachedCard({ link, children, onRemove }) {
|
|
4801
|
+
const card = link ? /* @__PURE__ */ jsx65(LinkCard, { link }) : children;
|
|
4802
|
+
const inside = useContext10(Attached);
|
|
4803
|
+
if (inside) return /* @__PURE__ */ jsx65(Fragment17, { children: card });
|
|
4695
4804
|
return (
|
|
4696
4805
|
// At most 480px, so it never runs a column's or a wide box's whole width (Katerina, 29 and 30 Oct).
|
|
4697
4806
|
/* @__PURE__ */ jsxs45("div", { className: "group/card relative max-w-[480px]", children: [
|
|
4698
|
-
|
|
4807
|
+
/* @__PURE__ */ jsx65(Attached.Provider, { value: true, children: card }),
|
|
4699
4808
|
onRemove && /* @__PURE__ */ jsx65(
|
|
4700
4809
|
RemoveBadge,
|
|
4701
4810
|
{
|
|
@@ -4709,20 +4818,24 @@ function AttachedCard({ link, children, onRemove }) {
|
|
|
4709
4818
|
}
|
|
4710
4819
|
|
|
4711
4820
|
// src/PartCard.tsx
|
|
4712
|
-
import { useContext as
|
|
4821
|
+
import { useContext as useContext11 } from "react";
|
|
4713
4822
|
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4714
4823
|
function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn, children, action, maxHeight }) {
|
|
4715
4824
|
const word = noun ?? kindNounOf({ kind }) ?? "File";
|
|
4716
|
-
const boxed =
|
|
4825
|
+
const boxed = useContext11(inTheBox);
|
|
4717
4826
|
if (state === "loading") return /* @__PURE__ */ jsx66(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
4718
|
-
if (state === "unavailable"
|
|
4827
|
+
if (state === "unavailable" || state === "deleted") {
|
|
4828
|
+
return /* @__PURE__ */ jsx66(LinkUnavailable, { kind, noun: `A part of this ${word.toLowerCase()}`, openIn, deleted: state === "deleted", card: true });
|
|
4829
|
+
}
|
|
4830
|
+
if (state === "detached") return /* @__PURE__ */ jsx66(UnavailableRow, { kind, words: "This part was deleted", card: true });
|
|
4831
|
+
if (state === "unaddressable") return /* @__PURE__ */ jsx66(UnavailableRow, { kind, words: "This part can't be shown", href, card: true });
|
|
4719
4832
|
return (
|
|
4720
4833
|
// At most 480px wide, in a box too; in a box being written in, on the files' fill as the card beside it is.
|
|
4721
4834
|
/* @__PURE__ */ jsxs46(Card, { fill: boxed ? "elevated" : "inset", className: "flex max-w-[480px] flex-col gap-3 p-3", children: [
|
|
4722
4835
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-3", children: [
|
|
4723
4836
|
/* @__PURE__ */ jsx66(LinkTile, { kind }),
|
|
4724
4837
|
/* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4725
|
-
/* @__PURE__ */ jsx66("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: href ? /* @__PURE__ */ jsx66(Link, { href, variant: "quiet", truncate: true, className: "block", children: heading }) : /* @__PURE__ */ jsx66("span", { className: "block truncate", children: heading }) }),
|
|
4838
|
+
/* @__PURE__ */ jsx66("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: href && !boxed ? /* @__PURE__ */ jsx66(Link, { href, variant: "quiet", truncate: true, className: "block", children: heading }) : /* @__PURE__ */ jsx66("span", { className: "block truncate", children: heading }) }),
|
|
4726
4839
|
/* @__PURE__ */ jsx66("span", { className: "truncate text-caption text-text-secondary", children: partKey ? `A part of ${partKey}` : `A part of this ${word.toLowerCase()}` })
|
|
4727
4840
|
] })
|
|
4728
4841
|
] }),
|
|
@@ -4991,7 +5104,7 @@ function ListColumn(props) {
|
|
|
4991
5104
|
|
|
4992
5105
|
// src/Tabs.tsx
|
|
4993
5106
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
4994
|
-
import { Fragment as
|
|
5107
|
+
import { Fragment as Fragment18, jsx as jsx75, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
4995
5108
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
4996
5109
|
return /* @__PURE__ */ jsx75(
|
|
4997
5110
|
BaseTabs.Root,
|
|
@@ -5025,7 +5138,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5025
5138
|
tab.label,
|
|
5026
5139
|
tab.count !== void 0 ? /* @__PURE__ */ jsx75("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
5027
5140
|
] }),
|
|
5028
|
-
tab.unread ? /* @__PURE__ */ jsxs54(
|
|
5141
|
+
tab.unread ? /* @__PURE__ */ jsxs54(Fragment18, { children: [
|
|
5029
5142
|
/* @__PURE__ */ jsx75(UnreadDot, { className: "h-auto w-auto" }),
|
|
5030
5143
|
/* @__PURE__ */ jsx75("span", { className: "sr-only", children: "new" })
|
|
5031
5144
|
] }) : null
|
|
@@ -5040,7 +5153,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5040
5153
|
}
|
|
5041
5154
|
|
|
5042
5155
|
// src/Toast.tsx
|
|
5043
|
-
import { createContext as
|
|
5156
|
+
import { createContext as createContext9, useContext as useContext12, useMemo as useMemo6 } from "react";
|
|
5044
5157
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
5045
5158
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck2, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
5046
5159
|
import { jsx as jsx76, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
@@ -5091,7 +5204,7 @@ function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAct
|
|
|
5091
5204
|
hasAction && /* @__PURE__ */ jsx76(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
5092
5205
|
] });
|
|
5093
5206
|
}
|
|
5094
|
-
var ToastContext =
|
|
5207
|
+
var ToastContext = createContext9(null);
|
|
5095
5208
|
var VISIBLE_TOASTS = 3;
|
|
5096
5209
|
function ToastProvider({ children }) {
|
|
5097
5210
|
const manager = useMemo6(() => BaseToast.createToastManager(), []);
|
|
@@ -5147,7 +5260,7 @@ function ToastList() {
|
|
|
5147
5260
|
});
|
|
5148
5261
|
}
|
|
5149
5262
|
function useToast() {
|
|
5150
|
-
const ctx =
|
|
5263
|
+
const ctx = useContext12(ToastContext);
|
|
5151
5264
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
5152
5265
|
return ctx;
|
|
5153
5266
|
}
|
|
@@ -5268,6 +5381,7 @@ export {
|
|
|
5268
5381
|
archivedLine2 as archivedLine,
|
|
5269
5382
|
blockAtY,
|
|
5270
5383
|
calloutLook,
|
|
5384
|
+
cardShapeMemory,
|
|
5271
5385
|
chosenOf,
|
|
5272
5386
|
cn,
|
|
5273
5387
|
hueFor,
|