@estiva-app/ui 0.91.1 → 0.92.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/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/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/Select.d.ts +7 -1
- package/dist/Select.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/eslint/index.js +1 -1
- package/dist/eslint/index.js.map +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -52
- 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 +78 -65
- 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/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 +43 -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/Select.mdx +4 -0
- package/src/Select.stories.tsx +11 -1
- package/src/Select.tsx +10 -2
- package/src/editor.ts +0 -3
- package/src/eslint/no-restyled-part.ts +1 -1
- 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.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export { ShowMore, type ShowMoreProps } from './ShowMore';
|
|
|
60
60
|
export { ReactionPicker, type ReactionOption, type ReactionPickerProps } from './ReactionPicker';
|
|
61
61
|
export { Toolbar, ToolbarButton, ToolbarInput, ToolbarLink, ToolbarSeparator, type ToolbarProps, type ToolbarButtonProps, type ToolbarInputProps, type ToolbarLinkProps } from './Toolbar';
|
|
62
62
|
export { PreviewCard, type PreviewCardProps } from './PreviewCard';
|
|
63
|
-
export { chosenOf, inTheBox, loadingShapeOf, unavailableMemory, type Linked, type LinkedChild, type LinkedConversation, type LinkedKind, type LinkedPerson, type LinkedPicker, type LinkedStatus, type LinkState, type LoadingShape, type PickerOption, type StatusColour, type UnavailableMemory, } from './linked';
|
|
63
|
+
export { cardShapeMemory, chosenOf, inTheBox, loadingShapeOf, unavailableMemory, type Linked, type LinkedChild, type LinkedConversation, type LinkedKind, type LinkedPerson, type LinkedPicker, type LinkedStatus, type CardShape, type CardShapeMemory, type LinkState, type LoadingShape, type PickerOption, type StatusColour, type UnavailableMemory, } from './linked';
|
|
64
64
|
export { archivedLine } from './archivedLine';
|
|
65
65
|
export { linkedFrom, linkStateFrom, type LinkedAction, type LinkedFromOptions, type LinkedProfile, type LinkedSlot, type LinkedSource, } from './linkedFrom';
|
|
66
66
|
export { CommentCount, LinkedIcon, LinkKey, LinkPickers, ProgressRing, StatusMark, type LinkPickersProps } from './LinkParts';
|
|
@@ -69,7 +69,7 @@ export { LinkRow, LinkUnavailable, type LinkRowProps, type LinkUnavailableProps
|
|
|
69
69
|
export { LinkCard, LinkCardLoading, type LinkCardProps, type LinkCardLoadingProps } from './LinkCard';
|
|
70
70
|
export { LinkPreview, LinkPreviewOpen, useCanHover, type LinkPreviewProps } from './LinkPreview';
|
|
71
71
|
export { AttachedCard, type AttachedCardProps } from './AttachedCard';
|
|
72
|
-
export { PartCard, type PartCardProps } from './PartCard';
|
|
72
|
+
export { PartCard, type PartCardProps, type PartCardState } from './PartCard';
|
|
73
73
|
export { Person, type PersonProps } from './Person';
|
|
74
74
|
export { Rail, type RailProps } from './Rail';
|
|
75
75
|
export { RailItem, type RailItemProps } from './RailItem';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,KAAK,sBAAsB,EAAE,KAAK,m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AE,iBAAiB,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAA;AAClJ,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"}
|
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
|
};
|
|
@@ -2927,7 +2932,7 @@ import { Select as BaseSelect } from "@base-ui/react/select";
|
|
|
2927
2932
|
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2928
2933
|
var GAP4 = 4;
|
|
2929
2934
|
var VIEWPORT_PAD4 = 8;
|
|
2930
|
-
function Select({ value, onChange, options, size = "default", ariaLabel, placeholder = "Select\u2026", disabled, disabledReason, className, ...aria }) {
|
|
2935
|
+
function Select({ value, onChange, options, size = "default", fill = "field", ariaLabel, placeholder = "Select\u2026", disabled, disabledReason, className, ...aria }) {
|
|
2931
2936
|
const selected = options.find((o) => o.value === value);
|
|
2932
2937
|
const held = Boolean(disabledReason);
|
|
2933
2938
|
const trigger = (
|
|
@@ -2947,7 +2952,9 @@ function Select({ value, onChange, options, size = "default", ariaLabel, placeho
|
|
|
2947
2952
|
* `truncate` from ever engaging; in a block container max-w-full is
|
|
2948
2953
|
* the cap. Full-width callers are unaffected.
|
|
2949
2954
|
*/
|
|
2950
|
-
"flex w-full min-w-0 max-w-full items-center justify-between gap-2 rounded-lg border
|
|
2955
|
+
"flex w-full min-w-0 max-w-full items-center justify-between gap-2 rounded-lg border text-left",
|
|
2956
|
+
// Leaf's fields are white, raised on their shadow, and stay so on a card: they never read as a hole (Katerina, 30 Oct).
|
|
2957
|
+
fill === "wash" ? "bg-bg-wash leaf:bg-bg-field leaf:shadow-field" : "bg-bg-field shadow-field",
|
|
2951
2958
|
"border-border-field outline-none transition-colors",
|
|
2952
2959
|
FIELD_TEXT_CLASSES,
|
|
2953
2960
|
// The focused border survives a hover: hover alone strengthens the
|
|
@@ -4101,6 +4108,61 @@ function loadingShapeOf(linked) {
|
|
|
4101
4108
|
footer: linked.status || linked.owner ? "pickers" : linked.authors ? "people" : "line"
|
|
4102
4109
|
};
|
|
4103
4110
|
}
|
|
4111
|
+
var FOOTERS = ["pickers", "people", "line", "none"];
|
|
4112
|
+
function storedCardShape(value) {
|
|
4113
|
+
if (!value || typeof value !== "object") return void 0;
|
|
4114
|
+
const { subtitle, summary, rows, latest, ring, footer, height } = value;
|
|
4115
|
+
return {
|
|
4116
|
+
subtitle: subtitle === true,
|
|
4117
|
+
summary: summary === true,
|
|
4118
|
+
// A card lists a few of its items; a bad number must not draw a page of bars.
|
|
4119
|
+
rows: typeof rows === "number" && Number.isInteger(rows) ? Math.min(Math.max(rows, 0), 10) : 0,
|
|
4120
|
+
latest: latest === true,
|
|
4121
|
+
ring: ring === true,
|
|
4122
|
+
footer: FOOTERS.find((one) => one === footer) ?? "line",
|
|
4123
|
+
...typeof height === "number" && height > 0 && height < 2e3 ? { height: Math.round(height) } : {}
|
|
4124
|
+
};
|
|
4125
|
+
}
|
|
4126
|
+
function cardShapeMemory(storageKey, options = {}) {
|
|
4127
|
+
const { limit = 300, firstDraw = {} } = options;
|
|
4128
|
+
let held;
|
|
4129
|
+
const shapes = () => {
|
|
4130
|
+
if (held) return held;
|
|
4131
|
+
held = /* @__PURE__ */ new Map();
|
|
4132
|
+
try {
|
|
4133
|
+
const stored = JSON.parse(localStorage.getItem(storageKey) ?? "[]");
|
|
4134
|
+
for (const entry of Array.isArray(stored) ? stored : []) {
|
|
4135
|
+
const shape = Array.isArray(entry) && typeof entry[0] === "string" ? storedCardShape(entry[1]) : void 0;
|
|
4136
|
+
if (shape) held.set(entry[0], shape);
|
|
4137
|
+
}
|
|
4138
|
+
} catch {
|
|
4139
|
+
held = /* @__PURE__ */ new Map();
|
|
4140
|
+
}
|
|
4141
|
+
return held;
|
|
4142
|
+
};
|
|
4143
|
+
return {
|
|
4144
|
+
of: (id, kind) => shapes().get(id) ?? firstDraw[kind],
|
|
4145
|
+
note: (id, shape) => {
|
|
4146
|
+
const current = shapes();
|
|
4147
|
+
if ([...current.keys()].at(-1) === id && JSON.stringify(current.get(id)) === JSON.stringify(shape)) return;
|
|
4148
|
+
const next = new Map(current);
|
|
4149
|
+
next.delete(id);
|
|
4150
|
+
next.set(id, shape);
|
|
4151
|
+
held = new Map([...next].slice(-limit));
|
|
4152
|
+
try {
|
|
4153
|
+
localStorage.setItem(storageKey, JSON.stringify([...held]));
|
|
4154
|
+
} catch {
|
|
4155
|
+
}
|
|
4156
|
+
},
|
|
4157
|
+
clear: () => {
|
|
4158
|
+
held = void 0;
|
|
4159
|
+
try {
|
|
4160
|
+
localStorage.removeItem(storageKey);
|
|
4161
|
+
} catch {
|
|
4162
|
+
}
|
|
4163
|
+
}
|
|
4164
|
+
};
|
|
4165
|
+
}
|
|
4104
4166
|
function unavailableMemory(storageKey, limit = 300) {
|
|
4105
4167
|
let held;
|
|
4106
4168
|
const list = () => {
|
|
@@ -4294,6 +4356,7 @@ function linkedFrom(object, options) {
|
|
|
4294
4356
|
}
|
|
4295
4357
|
const onAct = object.archived ? void 0 : options.onAct;
|
|
4296
4358
|
const key = keyOf(object);
|
|
4359
|
+
const noun = nounOf(object);
|
|
4297
4360
|
const status = statusOf(object, onAct);
|
|
4298
4361
|
const owner = ownerOf(object, options, onAct);
|
|
4299
4362
|
const children = childrenOf(object, options);
|
|
@@ -4305,7 +4368,10 @@ function linkedFrom(object, options) {
|
|
|
4305
4368
|
title: titleOf(object),
|
|
4306
4369
|
href,
|
|
4307
4370
|
...key ? { key } : {},
|
|
4308
|
-
|
|
4371
|
+
// 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).
|
|
4372
|
+
...noun ? { noun } : {},
|
|
4373
|
+
// Its row and card say so, as its values turn to words above (Katerina, 30 Oct).
|
|
4374
|
+
...object.archived ? { archived: true } : {},
|
|
4309
4375
|
// Interop reads every file kind's summary into its subtitle (SPEC §6.12).
|
|
4310
4376
|
...slots.subtitle?.value ? { summary: slots.subtitle.value } : {},
|
|
4311
4377
|
...status ? { status } : {},
|
|
@@ -4319,20 +4385,23 @@ function linkedFrom(object, options) {
|
|
|
4319
4385
|
}
|
|
4320
4386
|
function linkStateFrom(object, unread, options) {
|
|
4321
4387
|
if (object === void 0) return { state: "loading", kind: unread.kind };
|
|
4322
|
-
|
|
4388
|
+
const written = unread.url ? { url: unread.url } : {};
|
|
4389
|
+
if (object === null) return { state: "unavailable", kind: unread.kind, noun: unread.noun, ...unread.deleted ? { deleted: true } : {}, ...written };
|
|
4323
4390
|
if (object.unreachable) {
|
|
4324
4391
|
const href = object.openUrl && /^https:\/\//i.test(object.openUrl) ? object.openUrl : void 0;
|
|
4325
4392
|
return {
|
|
4326
4393
|
state: "unavailable",
|
|
4327
4394
|
kind: linkedKindOfKind(object.kind),
|
|
4328
|
-
noun:
|
|
4329
|
-
...href ? { openIn: { app: object.appName ?? "its app", href } } : {}
|
|
4395
|
+
noun: nounOf(object) || unread.noun,
|
|
4396
|
+
...href ? { openIn: { app: object.appName ?? "its app", href } } : {},
|
|
4397
|
+
...written
|
|
4330
4398
|
};
|
|
4331
4399
|
}
|
|
4332
4400
|
return { state: "ready", linked: linkedFrom(object, options) };
|
|
4333
4401
|
}
|
|
4334
4402
|
|
|
4335
4403
|
// src/LinkParts.tsx
|
|
4404
|
+
import { useContext as useContext7 } from "react";
|
|
4336
4405
|
import { IconCircleCheck, IconCircleDashed as IconCircleDashed2, IconCircleHalf2, IconCircleX, IconFileText, IconMessage2 as IconMessage22 } from "@tabler/icons-react";
|
|
4337
4406
|
import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4338
4407
|
var STATUS_ICON = {
|
|
@@ -4382,8 +4451,23 @@ function ProgressRing({ done, total }) {
|
|
|
4382
4451
|
total
|
|
4383
4452
|
] }) });
|
|
4384
4453
|
}
|
|
4454
|
+
function countWords(count, noun) {
|
|
4455
|
+
if (count !== 1) return `${count} ${noun}`;
|
|
4456
|
+
const one = /ies$/.test(noun) ? noun.replace(/ies$/, "y") : noun.replace(/s$/, "");
|
|
4457
|
+
return `${count} ${one}`;
|
|
4458
|
+
}
|
|
4385
4459
|
function CommentCount({ conversation, noun = "comments" }) {
|
|
4386
4460
|
const { count, href, unread = false } = conversation;
|
|
4461
|
+
const boxed = useContext7(inTheBox);
|
|
4462
|
+
const said = countWords(count, noun);
|
|
4463
|
+
if (boxed || !href) {
|
|
4464
|
+
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: [
|
|
4465
|
+
/* @__PURE__ */ jsx60(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4466
|
+
/* @__PURE__ */ jsx60("span", { "aria-hidden": true, children: count }),
|
|
4467
|
+
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${said}, unread` : said }),
|
|
4468
|
+
unread && /* @__PURE__ */ jsx60(UnreadDot, { className: "h-auto w-auto" })
|
|
4469
|
+
] });
|
|
4470
|
+
}
|
|
4387
4471
|
return (
|
|
4388
4472
|
/*
|
|
4389
4473
|
* A small button's shape, as Button's small one is: 24px tall like the pickers beside it, 6px each side, its corners
|
|
@@ -4394,12 +4478,16 @@ function CommentCount({ conversation, noun = "comments" }) {
|
|
|
4394
4478
|
*/
|
|
4395
4479
|
/* @__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: [
|
|
4396
4480
|
/* @__PURE__ */ jsx60(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4397
|
-
count,
|
|
4398
|
-
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${
|
|
4481
|
+
/* @__PURE__ */ jsx60("span", { "aria-hidden": true, children: count }),
|
|
4482
|
+
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${said}, unread \u2014 open the conversation` : `${said} \u2014 open the conversation` }),
|
|
4399
4483
|
unread && /* @__PURE__ */ jsx60(UnreadDot, { className: "h-auto w-auto" })
|
|
4400
4484
|
] }) })
|
|
4401
4485
|
);
|
|
4402
4486
|
}
|
|
4487
|
+
function OwnerFace({ option }) {
|
|
4488
|
+
const nobody = !option || option.value === "";
|
|
4489
|
+
return /* @__PURE__ */ jsx60(Avatar, { name: nobody ? void 0 : option.label, src: nobody ? void 0 : option.picture, size: 16 });
|
|
4490
|
+
}
|
|
4403
4491
|
function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false }) {
|
|
4404
4492
|
const statusNow = chosenOf(status);
|
|
4405
4493
|
const ownerNow = chosenOf(owner);
|
|
@@ -4407,6 +4495,7 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4407
4495
|
const ownerWords = owner && (readOnly || !owner.onChange);
|
|
4408
4496
|
return (
|
|
4409
4497
|
// As words, 16px apart, so the status and the person read as two things; as boxed pickers their borders already part them (Katerina, 29 Oct).
|
|
4498
|
+
// Boxed, they are see-through as the card they sit in is: a field's fill was a dark hole on a selected message (Katerina, 30 Oct).
|
|
4410
4499
|
/* @__PURE__ */ jsxs41("span", { className: cn("flex h-6 min-w-0 items-center text-caption text-text-secondary", statusWords || ownerWords ? "gap-4" : "gap-2"), children: [
|
|
4411
4500
|
status && (statusWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
4412
4501
|
statusNow?.colour && /* @__PURE__ */ jsx60(StatusIcon, { colour: statusNow.colour }),
|
|
@@ -4415,6 +4504,7 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4415
4504
|
Select,
|
|
4416
4505
|
{
|
|
4417
4506
|
size: "small",
|
|
4507
|
+
fill: "wash",
|
|
4418
4508
|
className: "w-auto",
|
|
4419
4509
|
value: status.value ?? "",
|
|
4420
4510
|
onChange: (value) => status.onChange?.(value),
|
|
@@ -4423,18 +4513,19 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4423
4513
|
}
|
|
4424
4514
|
)),
|
|
4425
4515
|
owner && (ownerWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
|
|
4426
|
-
/* @__PURE__ */ jsx60(
|
|
4516
|
+
/* @__PURE__ */ jsx60(OwnerFace, { option: ownerNow }),
|
|
4427
4517
|
/* @__PURE__ */ jsx60("span", { className: "truncate", children: ownerNow?.label ?? "Unassigned" })
|
|
4428
4518
|
] }) : /* @__PURE__ */ jsx60(
|
|
4429
4519
|
Select,
|
|
4430
4520
|
{
|
|
4431
4521
|
size: "small",
|
|
4522
|
+
fill: "wash",
|
|
4432
4523
|
className: "w-auto",
|
|
4433
4524
|
value: owner.value ?? "",
|
|
4434
4525
|
placeholder: "Unassigned",
|
|
4435
4526
|
onChange: (value) => owner.onChange?.(value),
|
|
4436
4527
|
ariaLabel: ownerLabel,
|
|
4437
|
-
options: owner.options.map((option) => ({ value: option.value, label: option.label, leading: /* @__PURE__ */ jsx60(
|
|
4528
|
+
options: owner.options.map((option) => ({ value: option.value, label: option.label, leading: /* @__PURE__ */ jsx60(OwnerFace, { option }) }))
|
|
4438
4529
|
}
|
|
4439
4530
|
))
|
|
4440
4531
|
] })
|
|
@@ -4445,20 +4536,20 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4445
4536
|
import { useSyncExternalStore } from "react";
|
|
4446
4537
|
|
|
4447
4538
|
// src/LinkCard.tsx
|
|
4448
|
-
import { useContext as
|
|
4539
|
+
import { useContext as useContext9 } from "react";
|
|
4449
4540
|
|
|
4450
4541
|
// src/LinkRow.tsx
|
|
4451
|
-
import { useContext as
|
|
4542
|
+
import { useContext as useContext8 } from "react";
|
|
4452
4543
|
import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4453
4544
|
var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
|
|
4454
|
-
function LinkUnavailable({ kind, noun, openIn, card = false }) {
|
|
4455
|
-
|
|
4545
|
+
function LinkUnavailable({ kind, noun, openIn, card = false, deleted = false }) {
|
|
4546
|
+
return /* @__PURE__ */ jsx61(UnavailableRow, { kind, words: `${noun} ${deleted ? "deleted" : "not available"}`, openIn: deleted ? void 0 : openIn, card });
|
|
4547
|
+
}
|
|
4548
|
+
function UnavailableRow({ kind, words, href, openIn, card = false }) {
|
|
4549
|
+
const wide = useContext8(inTheBox);
|
|
4456
4550
|
return /* @__PURE__ */ jsxs42(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, "max-w-[480px]"), children: [
|
|
4457
4551
|
/* @__PURE__ */ jsx61("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx61(LinkedIcon, { kind }) }),
|
|
4458
|
-
/* @__PURE__ */
|
|
4459
|
-
noun,
|
|
4460
|
-
" not available"
|
|
4461
|
-
] }),
|
|
4552
|
+
/* @__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 }),
|
|
4462
4553
|
openIn && /* @__PURE__ */ jsx61("span", { className: "shrink-0 text-caption text-text-secondary", children: /* @__PURE__ */ jsxs42(Link, { href: openIn.href, variant: "quiet", external: true, children: [
|
|
4463
4554
|
"Open in ",
|
|
4464
4555
|
openIn.app,
|
|
@@ -4467,7 +4558,11 @@ function LinkUnavailable({ kind, noun, openIn, card = false }) {
|
|
|
4467
4558
|
] });
|
|
4468
4559
|
}
|
|
4469
4560
|
function linkMetaOf(linked, withWhen = false) {
|
|
4470
|
-
return [linked.key, kindNounOf(linked), linked.subtitle, withWhen ? linked.updated : void 0].filter(Boolean).join(" \xB7 ");
|
|
4561
|
+
return [linked.key, kindNounOf(linked), linked.archived ? "Archived" : void 0, linked.subtitle, withWhen ? linked.updated : void 0].filter(Boolean).join(" \xB7 ");
|
|
4562
|
+
}
|
|
4563
|
+
function WrittenUrl({ url, block = false }) {
|
|
4564
|
+
const link = /* @__PURE__ */ jsx61(Link, { href: url, external: true, children: url });
|
|
4565
|
+
return block ? /* @__PURE__ */ jsx61("span", { className: "block min-w-0 truncate text-body-2", children: link }) : link;
|
|
4471
4566
|
}
|
|
4472
4567
|
function LinkRow({ link, preview = true }) {
|
|
4473
4568
|
const width = "max-w-[480px]";
|
|
@@ -4480,22 +4575,27 @@ function LinkRow({ link, preview = true }) {
|
|
|
4480
4575
|
] })
|
|
4481
4576
|
] }) });
|
|
4482
4577
|
}
|
|
4483
|
-
if (link.state === "unavailable")
|
|
4578
|
+
if (link.state === "unavailable") {
|
|
4579
|
+
if (link.url) return /* @__PURE__ */ jsx61(WrittenUrl, { url: link.url, block: true });
|
|
4580
|
+
return /* @__PURE__ */ jsx61(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, deleted: link.deleted });
|
|
4581
|
+
}
|
|
4484
4582
|
const { linked } = link;
|
|
4485
4583
|
const status = chosenOf(linked.status);
|
|
4486
4584
|
const owner = chosenOf(linked.owner);
|
|
4487
4585
|
const said = linked.kind === "message" ? linked.author : void 0;
|
|
4488
|
-
const meta = said ?
|
|
4586
|
+
const meta = said ? "" : linkMetaOf(linked, true) || linked.summary;
|
|
4489
4587
|
const row = /* @__PURE__ */ jsxs42(Card, { fill: "inset", hover: "hairline", className: cn("relative", ROW_CLASSES2, width), children: [
|
|
4490
4588
|
/* @__PURE__ */ jsx61(LinkTile, { kind: linked.kind, author: said }),
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4589
|
+
said ? (
|
|
4590
|
+
// Words a person wrote, on one line, as a quote is cut to one (Katerina, 30 Oct): the face, the name, the words
|
|
4591
|
+
// cut to fit, the time.
|
|
4592
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
4593
|
+
/* @__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 }) }),
|
|
4594
|
+
linked.body && /* @__PURE__ */ jsx61("span", { className: "min-w-0 flex-1 truncate text-caption text-text-secondary", children: linked.body }),
|
|
4595
|
+
linked.updated && /* @__PURE__ */ jsx61("span", { className: cn("ml-auto shrink-0 text-caption text-text-muted", TIME_CLASSES), children: linked.updated })
|
|
4596
|
+
] })
|
|
4597
|
+
) : /* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4598
|
+
/* @__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 }) }),
|
|
4499
4599
|
meta && /* @__PURE__ */ jsx61("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4500
4600
|
] }),
|
|
4501
4601
|
/* @__PURE__ */ jsxs42("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
@@ -4512,17 +4612,25 @@ function LinkRow({ link, preview = true }) {
|
|
|
4512
4612
|
// src/LinkCard.tsx
|
|
4513
4613
|
import { Fragment as Fragment15, jsx as jsx62, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4514
4614
|
var CARD_CLASSES = "flex flex-col gap-3 p-3";
|
|
4615
|
+
function CardLink({ href, truncate = false, className, children }) {
|
|
4616
|
+
const boxed = useContext9(inTheBox);
|
|
4617
|
+
if (boxed || !href) return /* @__PURE__ */ jsx62("span", { className: cn(truncate && "truncate", className), children });
|
|
4618
|
+
return /* @__PURE__ */ jsx62(Link, { href, variant: "quiet", truncate, className, children });
|
|
4619
|
+
}
|
|
4515
4620
|
function LinkCard({ link, readOnly = false, bare = false }) {
|
|
4516
|
-
const boxed =
|
|
4621
|
+
const boxed = useContext9(inTheBox);
|
|
4517
4622
|
if (link.state === "loading") return /* @__PURE__ */ jsx62(LinkCardLoading, { kind: link.kind, shape: link.shape });
|
|
4518
|
-
if (link.state === "unavailable")
|
|
4623
|
+
if (link.state === "unavailable") {
|
|
4624
|
+
if (link.url) return /* @__PURE__ */ jsx62(WrittenUrl, { url: link.url, block: true });
|
|
4625
|
+
return /* @__PURE__ */ jsx62(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, deleted: link.deleted, card: true });
|
|
4626
|
+
}
|
|
4519
4627
|
const { linked } = link;
|
|
4520
4628
|
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx62(SaidBody, { linked }) : /* @__PURE__ */ jsx62(CardBody, { linked, readOnly: readOnly || boxed });
|
|
4521
4629
|
if (bare) return /* @__PURE__ */ jsx62("div", { className: CARD_CLASSES, children: body });
|
|
4522
4630
|
return /* @__PURE__ */ jsx62(Card, { fill: boxed ? "elevated" : "inset", className: cn(CARD_CLASSES, "max-w-[480px]"), children: body });
|
|
4523
4631
|
}
|
|
4524
4632
|
function CardBody({ linked, readOnly }) {
|
|
4525
|
-
const boxed =
|
|
4633
|
+
const boxed = useContext9(inTheBox);
|
|
4526
4634
|
const on = boxed ? "elevated" : "inset";
|
|
4527
4635
|
const meta = linkMetaOf(linked);
|
|
4528
4636
|
const footed = Boolean(linked.status || linked.owner || linked.authors || linked.updated);
|
|
@@ -4530,7 +4638,7 @@ function CardBody({ linked, readOnly }) {
|
|
|
4530
4638
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4531
4639
|
/* @__PURE__ */ jsx62(LinkTile, { kind: linked.kind }),
|
|
4532
4640
|
/* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4533
|
-
/* @__PURE__ */ jsx62("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx62(
|
|
4641
|
+
/* @__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 }) }),
|
|
4534
4642
|
meta && /* @__PURE__ */ jsx62("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4535
4643
|
] }),
|
|
4536
4644
|
(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).
|
|
@@ -4542,10 +4650,10 @@ function CardBody({ linked, readOnly }) {
|
|
|
4542
4650
|
] }),
|
|
4543
4651
|
linked.summary && /* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.summary }),
|
|
4544
4652
|
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").
|
|
4545
|
-
/* @__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: [
|
|
4653
|
+
/* @__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: [
|
|
4546
4654
|
/* @__PURE__ */ jsx62(StatusMark, { status: child.status }),
|
|
4547
4655
|
child.key && /* @__PURE__ */ jsx62(LinkKey, { children: child.key }),
|
|
4548
|
-
/* @__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 }) }),
|
|
4656
|
+
/* @__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 }) }),
|
|
4549
4657
|
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 })
|
|
4550
4658
|
] }, child.id)) }),
|
|
4551
4659
|
linked.latest && // 12px between the words "Latest conversation" and the quote they name (Katerina, 29 Oct).
|
|
@@ -4580,8 +4688,8 @@ function SaidBody({ linked }) {
|
|
|
4580
4688
|
return /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4581
4689
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
4582
4690
|
/* @__PURE__ */ jsx62(Avatar, { name: author.name, src: author.picture, size: 24 }),
|
|
4583
|
-
/* @__PURE__ */ jsx62("span", { className: "text-body-2-strong text-text-primary", children: linked.updated ? author.name : /* @__PURE__ */ jsx62(
|
|
4584
|
-
linked.updated && /* @__PURE__ */ jsx62("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx62(
|
|
4691
|
+
/* @__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 }) }),
|
|
4692
|
+
linked.updated && /* @__PURE__ */ jsx62("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx62(CardLink, { href: linked.href, children: linked.updated }) })
|
|
4585
4693
|
] }),
|
|
4586
4694
|
/* @__PURE__ */ jsx62("p", { className: "line-clamp-4 text-body-2 text-text-secondary", children: linked.body ?? linked.title })
|
|
4587
4695
|
] });
|
|
@@ -4596,7 +4704,7 @@ var KIND_SHAPE = {
|
|
|
4596
4704
|
};
|
|
4597
4705
|
function LinkCardLoading({ kind, shape }) {
|
|
4598
4706
|
const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
|
|
4599
|
-
const boxed =
|
|
4707
|
+
const boxed = useContext9(inTheBox);
|
|
4600
4708
|
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: [
|
|
4601
4709
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4602
4710
|
/* @__PURE__ */ jsx62("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx62(LinkedIcon, { kind }) }),
|
|
@@ -4659,9 +4767,11 @@ function LinkChip({ link, preview = true }) {
|
|
|
4659
4767
|
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" }) });
|
|
4660
4768
|
}
|
|
4661
4769
|
if (link.state === "unavailable") {
|
|
4770
|
+
if (link.url) return /* @__PURE__ */ jsx64(WrittenUrl, { url: link.url });
|
|
4662
4771
|
return /* @__PURE__ */ jsxs44(InlineChip, { tone: "muted", icon: /* @__PURE__ */ jsx64(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), children: [
|
|
4663
4772
|
link.noun,
|
|
4664
|
-
"
|
|
4773
|
+
" ",
|
|
4774
|
+
link.deleted ? "deleted" : "not available"
|
|
4665
4775
|
] });
|
|
4666
4776
|
}
|
|
4667
4777
|
const { linked } = link;
|
|
@@ -4671,7 +4781,7 @@ function LinkChip({ link, preview = true }) {
|
|
|
4671
4781
|
InlineChip,
|
|
4672
4782
|
{
|
|
4673
4783
|
icon: said ? /* @__PURE__ */ jsx64(Avatar, { name: said.name, src: said.picture, size: 14 }) : /* @__PURE__ */ jsx64(LinkedIcon, { kind: linked.kind, size: 14, tone: "inherit" }),
|
|
4674
|
-
href: linked.href,
|
|
4784
|
+
href: linked.href || void 0,
|
|
4675
4785
|
className: preview ? "min-w-0 max-w-[40ch]" : "max-w-[min(40ch,calc(100%_-_4px))]",
|
|
4676
4786
|
children: [
|
|
4677
4787
|
linked.key && // 4px more than the chip's gap after it, and kept whole: "ABC-2" never breaks at its hyphen.
|
|
@@ -4685,12 +4795,17 @@ function LinkChip({ link, preview = true }) {
|
|
|
4685
4795
|
}
|
|
4686
4796
|
|
|
4687
4797
|
// src/AttachedCard.tsx
|
|
4688
|
-
import {
|
|
4798
|
+
import { createContext as createContext8, useContext as useContext10 } from "react";
|
|
4799
|
+
import { Fragment as Fragment17, jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4800
|
+
var Attached = createContext8(false);
|
|
4689
4801
|
function AttachedCard({ link, children, onRemove }) {
|
|
4802
|
+
const card = link ? /* @__PURE__ */ jsx65(LinkCard, { link }) : children;
|
|
4803
|
+
const inside = useContext10(Attached);
|
|
4804
|
+
if (inside) return /* @__PURE__ */ jsx65(Fragment17, { children: card });
|
|
4690
4805
|
return (
|
|
4691
4806
|
// At most 480px, so it never runs a column's or a wide box's whole width (Katerina, 29 and 30 Oct).
|
|
4692
4807
|
/* @__PURE__ */ jsxs45("div", { className: "group/card relative max-w-[480px]", children: [
|
|
4693
|
-
|
|
4808
|
+
/* @__PURE__ */ jsx65(Attached.Provider, { value: true, children: card }),
|
|
4694
4809
|
onRemove && /* @__PURE__ */ jsx65(
|
|
4695
4810
|
RemoveBadge,
|
|
4696
4811
|
{
|
|
@@ -4704,20 +4819,24 @@ function AttachedCard({ link, children, onRemove }) {
|
|
|
4704
4819
|
}
|
|
4705
4820
|
|
|
4706
4821
|
// src/PartCard.tsx
|
|
4707
|
-
import { useContext as
|
|
4822
|
+
import { useContext as useContext11 } from "react";
|
|
4708
4823
|
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4709
4824
|
function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn, children, action, maxHeight }) {
|
|
4710
4825
|
const word = noun ?? kindNounOf({ kind }) ?? "File";
|
|
4711
|
-
const boxed =
|
|
4826
|
+
const boxed = useContext11(inTheBox);
|
|
4712
4827
|
if (state === "loading") return /* @__PURE__ */ jsx66(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
4713
|
-
if (state === "unavailable"
|
|
4828
|
+
if (state === "unavailable" || state === "deleted") {
|
|
4829
|
+
return /* @__PURE__ */ jsx66(LinkUnavailable, { kind, noun: `A part of this ${word.toLowerCase()}`, openIn, deleted: state === "deleted", card: true });
|
|
4830
|
+
}
|
|
4831
|
+
if (state === "detached") return /* @__PURE__ */ jsx66(UnavailableRow, { kind, words: "This part was deleted", card: true });
|
|
4832
|
+
if (state === "unaddressable") return /* @__PURE__ */ jsx66(UnavailableRow, { kind, words: "This part can't be shown", href, card: true });
|
|
4714
4833
|
return (
|
|
4715
4834
|
// At most 480px wide, in a box too; in a box being written in, on the files' fill as the card beside it is.
|
|
4716
4835
|
/* @__PURE__ */ jsxs46(Card, { fill: boxed ? "elevated" : "inset", className: "flex max-w-[480px] flex-col gap-3 p-3", children: [
|
|
4717
4836
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-3", children: [
|
|
4718
4837
|
/* @__PURE__ */ jsx66(LinkTile, { kind }),
|
|
4719
4838
|
/* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4720
|
-
/* @__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 }) }),
|
|
4839
|
+
/* @__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 }) }),
|
|
4721
4840
|
/* @__PURE__ */ jsx66("span", { className: "truncate text-caption text-text-secondary", children: partKey ? `A part of ${partKey}` : `A part of this ${word.toLowerCase()}` })
|
|
4722
4841
|
] })
|
|
4723
4842
|
] }),
|
|
@@ -4986,7 +5105,7 @@ function ListColumn(props) {
|
|
|
4986
5105
|
|
|
4987
5106
|
// src/Tabs.tsx
|
|
4988
5107
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
4989
|
-
import { Fragment as
|
|
5108
|
+
import { Fragment as Fragment18, jsx as jsx75, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
4990
5109
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
4991
5110
|
return /* @__PURE__ */ jsx75(
|
|
4992
5111
|
BaseTabs.Root,
|
|
@@ -5020,7 +5139,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5020
5139
|
tab.label,
|
|
5021
5140
|
tab.count !== void 0 ? /* @__PURE__ */ jsx75("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
5022
5141
|
] }),
|
|
5023
|
-
tab.unread ? /* @__PURE__ */ jsxs54(
|
|
5142
|
+
tab.unread ? /* @__PURE__ */ jsxs54(Fragment18, { children: [
|
|
5024
5143
|
/* @__PURE__ */ jsx75(UnreadDot, { className: "h-auto w-auto" }),
|
|
5025
5144
|
/* @__PURE__ */ jsx75("span", { className: "sr-only", children: "new" })
|
|
5026
5145
|
] }) : null
|
|
@@ -5035,7 +5154,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5035
5154
|
}
|
|
5036
5155
|
|
|
5037
5156
|
// src/Toast.tsx
|
|
5038
|
-
import { createContext as
|
|
5157
|
+
import { createContext as createContext9, useContext as useContext12, useMemo as useMemo6 } from "react";
|
|
5039
5158
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
5040
5159
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck2, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
5041
5160
|
import { jsx as jsx76, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
@@ -5086,7 +5205,7 @@ function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAct
|
|
|
5086
5205
|
hasAction && /* @__PURE__ */ jsx76(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
5087
5206
|
] });
|
|
5088
5207
|
}
|
|
5089
|
-
var ToastContext =
|
|
5208
|
+
var ToastContext = createContext9(null);
|
|
5090
5209
|
var VISIBLE_TOASTS = 3;
|
|
5091
5210
|
function ToastProvider({ children }) {
|
|
5092
5211
|
const manager = useMemo6(() => BaseToast.createToastManager(), []);
|
|
@@ -5142,7 +5261,7 @@ function ToastList() {
|
|
|
5142
5261
|
});
|
|
5143
5262
|
}
|
|
5144
5263
|
function useToast() {
|
|
5145
|
-
const ctx =
|
|
5264
|
+
const ctx = useContext12(ToastContext);
|
|
5146
5265
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
5147
5266
|
return ctx;
|
|
5148
5267
|
}
|
|
@@ -5263,6 +5382,7 @@ export {
|
|
|
5263
5382
|
archivedLine2 as archivedLine,
|
|
5264
5383
|
blockAtY,
|
|
5265
5384
|
calloutLook,
|
|
5385
|
+
cardShapeMemory,
|
|
5266
5386
|
chosenOf,
|
|
5267
5387
|
cn,
|
|
5268
5388
|
hueFor,
|