@estiva-app/ui 0.90.1 → 0.91.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/AttachedCard.d.ts +30 -0
- package/dist/AttachedCard.d.ts.map +1 -0
- package/dist/AttachmentCard.d.ts +14 -0
- package/dist/AttachmentCard.d.ts.map +1 -1
- package/dist/AvatarGroup.d.ts +7 -1
- package/dist/AvatarGroup.d.ts.map +1 -1
- package/dist/CommentBox.d.ts +1 -1
- package/dist/CommentBox.d.ts.map +1 -1
- package/dist/InlineChip.d.ts +22 -13
- package/dist/InlineChip.d.ts.map +1 -1
- package/dist/InlineText.d.ts +5 -2
- package/dist/InlineText.d.ts.map +1 -1
- package/dist/Link.d.ts +3 -2
- package/dist/Link.d.ts.map +1 -1
- package/dist/LinkCard.d.ts +3 -3
- package/dist/LinkCard.d.ts.map +1 -1
- package/dist/LinkChip.d.ts.map +1 -1
- package/dist/LinkParts.d.ts +17 -3
- package/dist/LinkParts.d.ts.map +1 -1
- package/dist/LinkPreview.d.ts.map +1 -1
- package/dist/LinkRow.d.ts +10 -5
- package/dist/LinkRow.d.ts.map +1 -1
- package/dist/PartCard.d.ts +7 -3
- package/dist/PartCard.d.ts.map +1 -1
- package/dist/Popover.d.ts +8 -1
- package/dist/Popover.d.ts.map +1 -1
- package/dist/ReactionRow.d.ts.map +1 -1
- package/dist/RichText.d.ts.map +1 -1
- package/dist/SuggestionMenu.d.ts +6 -2
- package/dist/SuggestionMenu.d.ts.map +1 -1
- package/dist/editor.js +19 -12
- package/dist/editor.js.map +3 -3
- package/dist/eslint/has-a-page-and-a-story.d.ts.map +1 -1
- package/dist/eslint/index.js +1093 -1076
- package/dist/eslint/index.js.map +4 -4
- package/dist/eslint/no-restyled-part.d.ts +9 -4
- package/dist/eslint/no-restyled-part.d.ts.map +1 -1
- package/dist/gates/{chunk-BS5JASHV.js → chunk-P2P6AHRY.js} +2 -2
- package/dist/gates/{chunk-BS5JASHV.js.map → chunk-P2P6AHRY.js.map} +2 -2
- package/dist/gates/cli.js +1 -1
- package/dist/gates/gate-config.d.ts +4 -1
- package/dist/gates/gate-config.d.ts.map +1 -1
- package/dist/gates/hook.d.ts.map +1 -1
- package/dist/gates/index.js +2 -2
- package/dist/gates/index.js.map +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +283 -192
- package/dist/index.js.map +4 -4
- package/dist/linked.d.ts +7 -9
- package/dist/linked.d.ts.map +1 -1
- package/dist/linked.examples.d.ts.map +1 -1
- package/dist/linkedFrom.d.ts.map +1 -1
- package/dist/links.d.ts +2 -2
- package/dist/links.d.ts.map +1 -1
- package/dist/looks.d.ts +24 -0
- package/dist/looks.d.ts.map +1 -1
- package/dist/registry/{app-X2GI4WTU.js → app-IGBRDD4L.js} +3 -3
- package/dist/registry/{build-P6X3PTZP.js → build-MWN4UI23.js} +2 -2
- package/dist/registry/{chunk-P55P2QFD.js → chunk-4TWYUIOB.js} +1 -1
- package/dist/registry/chunk-4TWYUIOB.js.map +7 -0
- package/dist/registry/{chunk-V67F474L.js → chunk-NSHK76XT.js} +2 -2
- package/dist/registry/{chunk-4QWD3EBY.js → chunk-THI3SLW5.js} +1 -1
- package/dist/registry/{chunk-4QWD3EBY.js.map → chunk-THI3SLW5.js.map} +1 -1
- package/dist/registry/cli.js +3 -3
- package/dist/registry/find.d.ts +1 -1
- package/dist/registry/find.d.ts.map +1 -1
- package/dist/registry/index.js +3 -3
- package/package.json +1 -1
- package/registry.json +511 -457
- package/src/AppProvider.stories.tsx +1 -1
- package/src/AppShell.stories.tsx +1 -1
- package/src/AttachedCard.mdx +55 -0
- package/src/{CardUnder.stories.tsx → AttachedCard.stories.tsx} +10 -19
- package/src/{CardUnder.test.tsx → AttachedCard.test.tsx} +8 -8
- package/src/AttachedCard.tsx +43 -0
- package/src/AttachmentCard.stories.tsx +1 -1
- package/src/AttachmentCard.tsx +36 -14
- package/src/Avatar.stories.tsx +1 -1
- package/src/AvatarGroup.stories.tsx +1 -1
- package/src/AvatarGroup.tsx +8 -2
- package/src/Banner.stories.tsx +1 -1
- package/src/BlockHandle.stories.tsx +1 -1
- package/src/BlockNodes.stories.tsx +1 -1
- package/src/Breadcrumb.stories.tsx +1 -1
- package/src/Button.stories.tsx +1 -1
- package/src/Card.stories.tsx +1 -1
- package/src/Checkbox.stories.tsx +1 -1
- package/src/Chip.stories.tsx +1 -1
- package/src/ChipInput.stories.tsx +1 -1
- package/src/CodeBlockColours.stories.tsx +1 -1
- package/src/CollapsibleSection.stories.tsx +1 -1
- package/src/CommandPalette.stories.tsx +1 -1
- package/src/CommentBox.mdx +3 -3
- package/src/CommentBox.stories.tsx +39 -7
- package/src/CommentBox.tsx +27 -17
- package/src/CommentHighlights.stories.tsx +1 -1
- package/src/ComposerTriggers.stories.tsx +1 -1
- package/src/ConfirmDialog.stories.tsx +1 -1
- package/src/ContainerHeader.stories.tsx +1 -1
- package/src/DialogShell.stories.tsx +1 -1
- package/src/Divider.stories.tsx +1 -1
- package/src/DocumentEditor.stories.tsx +1 -1
- package/src/EditableText.stories.tsx +1 -1
- package/src/EditorBlockHandle.stories.tsx +1 -1
- package/src/EditorTableControls.stories.tsx +1 -1
- package/src/EmptyState.stories.tsx +1 -1
- package/src/EntryShell.mdx +1 -1
- package/src/EntryShell.stories.tsx +1 -1
- package/src/ErrorBoundary.stories.tsx +1 -1
- package/src/Field.stories.tsx +1 -1
- package/src/FieldLine.stories.tsx +1 -1
- package/src/FilePicker.stories.tsx +1 -1
- package/src/Form.stories.tsx +1 -1
- package/src/IconButton.stories.tsx +1 -1
- package/src/IdentityMenu.stories.tsx +1 -1
- package/src/InlineChip.mdx +4 -2
- package/src/InlineChip.stories.tsx +1 -1
- package/src/InlineChip.test.tsx +3 -2
- package/src/InlineChip.tsx +24 -14
- package/src/InlineText.mdx +1 -0
- package/src/InlineText.stories.tsx +6 -3
- package/src/InlineText.tsx +7 -2
- package/src/Kbd.stories.tsx +1 -1
- package/src/KindIcon.stories.tsx +1 -1
- package/src/Lightbox.stories.tsx +1 -1
- package/src/Link.mdx +3 -2
- package/src/Link.stories.tsx +1 -1
- package/src/Link.test.tsx +5 -3
- package/src/Link.tsx +5 -3
- package/src/LinkCard.mdx +5 -4
- package/src/LinkCard.stories.tsx +1 -1
- package/src/LinkCard.test.tsx +1 -1
- package/src/LinkCard.tsx +80 -57
- package/src/LinkChip.mdx +3 -3
- package/src/LinkChip.stories.tsx +1 -1
- package/src/LinkChip.test.tsx +1 -1
- package/src/LinkChip.tsx +16 -3
- package/src/LinkChips.stories.tsx +1 -1
- package/src/LinkParts.stories.tsx +1 -1
- package/src/LinkParts.tsx +40 -8
- package/src/LinkPlaces.stories.tsx +1 -1
- package/src/LinkPreview.mdx +1 -1
- package/src/LinkPreview.stories.tsx +1 -1
- package/src/LinkPreview.tsx +3 -1
- package/src/LinkRow.mdx +8 -6
- package/src/LinkRow.stories.tsx +3 -3
- package/src/LinkRow.test.tsx +3 -3
- package/src/LinkRow.tsx +71 -40
- package/src/ListColumn.stories.tsx +1 -1
- package/src/MembersDialog.stories.tsx +1 -1
- package/src/MembersPill.stories.tsx +1 -1
- package/src/Menu.stories.tsx +1 -1
- package/src/MenuItem.stories.tsx +1 -1
- package/src/NavItem.stories.tsx +1 -1
- package/src/NavTree.stories.tsx +1 -1
- package/src/Panel.stories.tsx +1 -1
- package/src/PartCard.mdx +4 -4
- package/src/PartCard.stories.tsx +11 -8
- package/src/PartCard.test.tsx +5 -3
- package/src/PartCard.tsx +33 -24
- package/src/PastedImages.stories.tsx +1 -1
- package/src/PastedMarkdown.stories.tsx +1 -1
- package/src/Person.stories.tsx +1 -1
- package/src/PersonTrigger.stories.tsx +1 -1
- package/src/Popover.stories.tsx +1 -1
- package/src/Popover.tsx +6 -2
- package/src/PreviewCard.stories.tsx +1 -1
- package/src/ProgressBar.stories.tsx +1 -1
- package/src/Property.stories.tsx +1 -1
- package/src/Rail.stories.tsx +1 -1
- package/src/RailItem.stories.tsx +1 -1
- package/src/Reaction.stories.tsx +1 -1
- package/src/ReactionPicker.stories.tsx +1 -1
- package/src/ReactionRow.stories.tsx +1 -1
- package/src/ReactionRow.tsx +3 -1
- package/src/ReferenceCards.mdx +3 -0
- package/src/ReferenceCards.stories.tsx +3 -1
- package/src/ReferenceMenu.mdx +1 -1
- package/src/ReferenceMenu.stories.tsx +1 -1
- package/src/RichText.stories.tsx +1 -1
- package/src/RichText.tsx +6 -2
- package/src/ScrollArea.stories.tsx +1 -1
- package/src/SearchInput.stories.tsx +1 -1
- package/src/SectionHeader.stories.tsx +1 -1
- package/src/SectionLabel.stories.tsx +1 -1
- package/src/Select.stories.tsx +1 -1
- package/src/SelectionToolbar.stories.tsx +1 -1
- package/src/ShowMore.stories.tsx +1 -1
- package/src/Sidebar.stories.tsx +1 -1
- package/src/Skeleton.stories.tsx +1 -1
- package/src/SuggestionMenu.mdx +4 -1
- package/src/SuggestionMenu.stories.tsx +14 -8
- package/src/SuggestionMenu.tsx +20 -3
- package/src/Tabs.stories.tsx +1 -1
- package/src/TextInput.stories.tsx +1 -1
- package/src/Textarea.stories.tsx +1 -1
- package/src/Toast.stories.tsx +1 -1
- package/src/Toolbar.stories.tsx +1 -1
- package/src/Tooltip.stories.tsx +1 -1
- package/src/Tooltip.test.tsx +5 -4
- package/src/Tooltip.tsx +1 -1
- package/src/TopBar.stories.tsx +1 -1
- package/src/UnreadDot.stories.tsx +1 -1
- package/src/eslint/has-a-page-and-a-story.test.ts +5 -0
- package/src/eslint/has-a-page-and-a-story.ts +11 -2
- package/src/eslint/no-restyled-part.test.ts +32 -8
- package/src/eslint/no-restyled-part.ts +50 -23
- package/src/gates/gate-config.ts +5 -2
- package/src/gates/gates.test.ts +20 -2
- package/src/gates/hook.ts +4 -3
- package/src/index.ts +2 -1
- package/src/linked.examples.ts +2 -3
- package/src/linked.ts +11 -1
- package/src/linkedFrom.ts +1 -0
- package/src/links.ts +3 -2
- package/src/looks.ts +29 -0
- package/src/registry/build.ts +1 -1
- package/src/registry/contract.test.ts +1 -1
- package/src/registry/find.ts +1 -1
- package/src/registry/registry.test.ts +12 -12
- package/src/suggestionPopup.tsx +1 -1
- package/stories/Choosing.mdx +2 -2
- package/stories/DesignTokens.mdx +1 -1
- package/stories/GettingStarted.mdx +2 -2
- package/stories/Introduction.mdx +23 -4
- package/stories/TokensPage.tsx +12 -7
- package/dist/CardUnder.d.ts +0 -31
- package/dist/CardUnder.d.ts.map +0 -1
- package/dist/registry/chunk-P55P2QFD.js.map +0 -7
- package/src/CardUnder.mdx +0 -54
- package/src/CardUnder.tsx +0 -49
- /package/dist/registry/{app-X2GI4WTU.js.map → app-IGBRDD4L.js.map} +0 -0
- /package/dist/registry/{build-P6X3PTZP.js.map → build-MWN4UI23.js.map} +0 -0
- /package/dist/registry/{chunk-V67F474L.js.map → chunk-NSHK76XT.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -70,11 +70,37 @@ function cn(...inputs) {
|
|
|
70
70
|
return twMerge(clsx(inputs));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
// src/looks.ts
|
|
74
|
+
var FIELD_BOX_CLASSES = "bg-bg-field border border-border-field shadow-field hover:border-border-strong group-hover/field:border-border-strong focus:border-border-focus group-hover/field:focus:border-border-focus rounded-lg";
|
|
75
|
+
var FIELD_TEXT_CLASSES = "text-text-primary placeholder:text-text-muted";
|
|
76
|
+
var FIELD_DISABLED_CLASSES = "disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field group-hover/field:disabled:border-border-field";
|
|
77
|
+
var FIELD_FOCUS_RING_CLASSES = "signal:transition-shadow signal:focus:shadow-focus-ring";
|
|
78
|
+
var FIELD_SIZE_CLASSES = {
|
|
79
|
+
default: "px-3 py-2 text-input-value",
|
|
80
|
+
small: "h-6 min-h-6 px-2 text-caption"
|
|
81
|
+
};
|
|
82
|
+
var FIELD_SHELL_CLASSES = "bg-bg-field border border-border-field shadow-field hover:border-border-strong group-hover/field:border-border-strong rounded-lg transition-colors";
|
|
83
|
+
var FLOATING_SURFACE_CLASSES = "rounded-lg border border-border-default bg-bg-elevated shadow-lg";
|
|
84
|
+
var COUNT_TEXT_CLASSES = "font-mono text-caption tabular-nums text-text-muted";
|
|
85
|
+
var CHIP_TEXT_CLASSES = "text-chip signal:font-mono signal:text-small signal:font-semibold signal:tabular-nums";
|
|
86
|
+
var TIME_CLASSES = "whitespace-nowrap signal:font-mono signal:text-small signal:tracking-wide signal:tabular-nums";
|
|
87
|
+
var MONO_CAPTION_CLASSES = "text-caption text-text-secondary signal:font-mono signal:text-small";
|
|
88
|
+
var BARE_INPUT_CLASSES = "bg-transparent text-text-primary placeholder:text-text-muted outline-none";
|
|
89
|
+
var SIDEBAR_ROW_CLASSES = "rounded-lg transition-colors";
|
|
90
|
+
var SIDEBAR_ROW_TEXT_CLASSES = "text-text-secondary hover:text-text-primary";
|
|
91
|
+
var MUTED_CONTROL_CLASSES = "text-text-secondary hover:bg-bg-hover hover:text-text-primary";
|
|
92
|
+
var MENU_TRIGGER_CLASSES = "cursor-pointer rounded-md transition-colors hover:bg-bg-hover data-[popup-open]:bg-bg-hover";
|
|
93
|
+
var COLLAPSIBLE_PANEL_CLASSES = "h-[var(--collapsible-panel-height)] overflow-hidden transition-[height] duration-150 ease-out motion-reduce:transition-none data-[starting-style]:h-0 data-[ending-style]:h-0";
|
|
94
|
+
var TYPE_TILE_CLASSES = "size-9 rounded-md bg-bg-active flex items-center justify-center shrink-0 text-text-secondary";
|
|
95
|
+
var QUOTE_BAR_CLASSES = "border-l-2 border-border-default pl-3";
|
|
96
|
+
var LINK_UNDERLINE_CLASSES = "no-underline bg-[linear-gradient(currentColor,currentColor)] bg-[length:100%_1px] bg-bottom bg-no-repeat";
|
|
97
|
+
var WEB_LINK_CLASSES = `${LINK_UNDERLINE_CLASSES} before:content-[''] before:inline-block before:size-[1em] before:mr-0.5 before:align-[-0.125em] before:bg-current before:[mask:url(data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.75%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M9%2015l6%20-6%27%2F%3E%3Cpath%20d%3D%27M11%206l.463%20-.536a5%205%200%200%201%207.071%207.072l-.534%20.464%27%2F%3E%3Cpath%20d%3D%27M13%2018l-.397%20.534a5.068%205.068%200%200%201%20-7.127%200a4.972%204.972%200%200%201%200%20-7.071l.524%20-.463%27%2F%3E%3C%2Fsvg%3E)_center/contain_no-repeat]`;
|
|
98
|
+
|
|
73
99
|
// src/Link.tsx
|
|
74
100
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
75
101
|
var COVER_CLASSES = "after:absolute after:inset-0 after:rounded-md focus-visible:outline-none focus-visible:after:[outline-style:auto]";
|
|
76
102
|
var VARIANT_CLASSES = {
|
|
77
|
-
text:
|
|
103
|
+
text: `text-text-interactive hover:opacity-80 ${WEB_LINK_CLASSES}`,
|
|
78
104
|
quiet: "hover:underline",
|
|
79
105
|
underlined: "underline underline-offset-2 hover:text-text-primary",
|
|
80
106
|
plain: ""
|
|
@@ -170,27 +196,6 @@ function Card({
|
|
|
170
196
|
// src/IconButton.tsx
|
|
171
197
|
import { Button as BaseButton } from "@base-ui/react/button";
|
|
172
198
|
|
|
173
|
-
// src/looks.ts
|
|
174
|
-
var FIELD_BOX_CLASSES = "bg-bg-field border border-border-field shadow-field hover:border-border-strong group-hover/field:border-border-strong focus:border-border-focus group-hover/field:focus:border-border-focus rounded-lg";
|
|
175
|
-
var FIELD_TEXT_CLASSES = "text-text-primary placeholder:text-text-muted";
|
|
176
|
-
var FIELD_DISABLED_CLASSES = "disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field group-hover/field:disabled:border-border-field";
|
|
177
|
-
var FIELD_FOCUS_RING_CLASSES = "signal:transition-shadow signal:focus:shadow-focus-ring";
|
|
178
|
-
var FIELD_SIZE_CLASSES = {
|
|
179
|
-
default: "px-3 py-2 text-input-value",
|
|
180
|
-
small: "h-6 min-h-6 px-2 text-caption"
|
|
181
|
-
};
|
|
182
|
-
var FIELD_SHELL_CLASSES = "bg-bg-field border border-border-field shadow-field hover:border-border-strong group-hover/field:border-border-strong rounded-lg transition-colors";
|
|
183
|
-
var FLOATING_SURFACE_CLASSES = "rounded-lg border border-border-default bg-bg-elevated shadow-lg";
|
|
184
|
-
var COUNT_TEXT_CLASSES = "font-mono text-caption tabular-nums text-text-muted";
|
|
185
|
-
var CHIP_TEXT_CLASSES = "text-chip signal:font-mono signal:text-small signal:font-semibold signal:tabular-nums";
|
|
186
|
-
var MONO_CAPTION_CLASSES = "text-caption text-text-secondary signal:font-mono signal:text-small";
|
|
187
|
-
var BARE_INPUT_CLASSES = "bg-transparent text-text-primary placeholder:text-text-muted outline-none";
|
|
188
|
-
var SIDEBAR_ROW_CLASSES = "rounded-lg transition-colors";
|
|
189
|
-
var SIDEBAR_ROW_TEXT_CLASSES = "text-text-secondary hover:text-text-primary";
|
|
190
|
-
var MUTED_CONTROL_CLASSES = "text-text-secondary hover:bg-bg-hover hover:text-text-primary";
|
|
191
|
-
var MENU_TRIGGER_CLASSES = "cursor-pointer rounded-md transition-colors hover:bg-bg-hover data-[popup-open]:bg-bg-hover";
|
|
192
|
-
var COLLAPSIBLE_PANEL_CLASSES = "h-[var(--collapsible-panel-height)] overflow-hidden transition-[height] duration-150 ease-out motion-reduce:transition-none data-[starting-style]:h-0 data-[ending-style]:h-0";
|
|
193
|
-
|
|
194
199
|
// src/formBusy.ts
|
|
195
200
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
196
201
|
var FormBusyContext = createContext2(false);
|
|
@@ -265,7 +270,7 @@ function TooltipSurface({ label, shortcut, placement }) {
|
|
|
265
270
|
function WithTooltip({ label, shortcut, placement = "top", wrapperClassName, inline = false, children }) {
|
|
266
271
|
const Wrapper = inline ? "span" : "div";
|
|
267
272
|
return /* @__PURE__ */ jsxs(BaseTooltip.Root, { disableHoverablePopup: true, children: [
|
|
268
|
-
/* @__PURE__ */ jsx5(BaseTooltip.Trigger, { delay: OPEN_DELAY, render: /* @__PURE__ */ jsx5(Wrapper, { className: cn("inline-flex shrink-0", inline && "align-
|
|
273
|
+
/* @__PURE__ */ jsx5(BaseTooltip.Trigger, { delay: OPEN_DELAY, render: /* @__PURE__ */ jsx5(Wrapper, { className: cn("inline-flex shrink-0", inline && "align-baseline", wrapperClassName) }), children }),
|
|
269
274
|
/* @__PURE__ */ jsx5(TooltipSurface, { label, shortcut, placement })
|
|
270
275
|
] });
|
|
271
276
|
}
|
|
@@ -621,7 +626,7 @@ var formatBytes = (bytes) => {
|
|
|
621
626
|
return `${(kb / 1024).toFixed(1)} MB`;
|
|
622
627
|
};
|
|
623
628
|
var typeLabelOf = (name) => extensionOf(name).toUpperCase() || "FILE";
|
|
624
|
-
var TILE_CLASSES =
|
|
629
|
+
var TILE_CLASSES = TYPE_TILE_CLASSES;
|
|
625
630
|
var NAME_CLASSES = "text-caption font-medium text-text-primary truncate";
|
|
626
631
|
var NOTE_CLASSES = "text-small tracking-wide leading-tight truncate";
|
|
627
632
|
function TypeIcon({ name }) {
|
|
@@ -652,6 +657,24 @@ function Truncating({ text, hint, className, wrapperClassName, placement }) {
|
|
|
652
657
|
if (!hint && !cut) return line;
|
|
653
658
|
return /* @__PURE__ */ jsx12(WithTooltip, { label: hint ?? text, placement, wrapperClassName: cn("min-w-0 flex-col", wrapperClassName), children: line });
|
|
654
659
|
}
|
|
660
|
+
function RemoveBadge({ label, onRemove, className }) {
|
|
661
|
+
return /* @__PURE__ */ jsx12(
|
|
662
|
+
BaseButton3,
|
|
663
|
+
{
|
|
664
|
+
type: "button",
|
|
665
|
+
"aria-label": label,
|
|
666
|
+
className: cn(
|
|
667
|
+
"absolute -top-1.5 -right-1.5 size-5 rounded-full bg-bg-elevated border border-border-strong flex items-center justify-center text-text-secondary hover:text-text-primary transition-opacity",
|
|
668
|
+
className
|
|
669
|
+
),
|
|
670
|
+
onClick: (event) => {
|
|
671
|
+
event.stopPropagation();
|
|
672
|
+
onRemove();
|
|
673
|
+
},
|
|
674
|
+
children: /* @__PURE__ */ jsx12(IconX2, { size: 11, stroke: 1.75 })
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
}
|
|
655
678
|
function useRemoteImage(url, fetchImage) {
|
|
656
679
|
const [result, setResult] = useState({});
|
|
657
680
|
const fetcher = useRef3(fetchImage);
|
|
@@ -771,16 +794,11 @@ function AttachmentCard({
|
|
|
771
794
|
)
|
|
772
795
|
] }),
|
|
773
796
|
onRemove && /* @__PURE__ */ jsx12(
|
|
774
|
-
|
|
797
|
+
RemoveBadge,
|
|
775
798
|
{
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
className: "
|
|
779
|
-
onClick: (event) => {
|
|
780
|
-
event.stopPropagation();
|
|
781
|
-
onRemove();
|
|
782
|
-
},
|
|
783
|
-
children: /* @__PURE__ */ jsx12(IconX2, { size: 11, stroke: 1.75 })
|
|
799
|
+
label: `Remove ${name}`,
|
|
800
|
+
onRemove,
|
|
801
|
+
className: "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100"
|
|
784
802
|
}
|
|
785
803
|
)
|
|
786
804
|
]
|
|
@@ -937,7 +955,7 @@ function Avatar({ src, name, alt = "", size = 36, label: spoken, className }) {
|
|
|
937
955
|
|
|
938
956
|
// src/AvatarGroup.tsx
|
|
939
957
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
940
|
-
function AvatarGroup({ members, size = 24 }) {
|
|
958
|
+
function AvatarGroup({ members, size = 24, on = "surface" }) {
|
|
941
959
|
const visible = members.slice(0, 3);
|
|
942
960
|
const overlap = Math.round(size / 3);
|
|
943
961
|
const ring = size / 12;
|
|
@@ -951,7 +969,7 @@ function AvatarGroup({ members, size = 24 }) {
|
|
|
951
969
|
"span",
|
|
952
970
|
{
|
|
953
971
|
className: "relative flex rounded-sm",
|
|
954
|
-
style: { marginRight: -overlap, boxShadow: `0 0 0 ${ring}px var(--bg
|
|
972
|
+
style: { marginRight: -overlap, boxShadow: `0 0 0 ${ring}px var(--bg-${on})` },
|
|
955
973
|
children: /* @__PURE__ */ jsx14(Avatar, { size, name: member.name, src: member.picture, label: member.name })
|
|
956
974
|
},
|
|
957
975
|
i
|
|
@@ -2419,7 +2437,7 @@ function CommandPaletteProposal({ source, mark, children }) {
|
|
|
2419
2437
|
|
|
2420
2438
|
// src/InlineChip.tsx
|
|
2421
2439
|
import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2422
|
-
var INLINE_CHIP_CLASSES = "inline-flex h-[1.4em] items-
|
|
2440
|
+
var INLINE_CHIP_CLASSES = "inline-flex h-[1.4em] items-baseline gap-1 rounded-sm px-1 mx-0.5 align-baseline text-body-2 font-normal select-none [&>:is(svg,img,:empty)]:self-center [&>:has(svg,img)]:self-center";
|
|
2423
2441
|
var INLINE_CHIP_TONE_CLASSES = {
|
|
2424
2442
|
/** A thing or a place — anything that is not a person. */
|
|
2425
2443
|
neutral: "bg-bg-active text-text-primary",
|
|
@@ -2430,11 +2448,12 @@ var INLINE_CHIP_TONE_CLASSES = {
|
|
|
2430
2448
|
/**
|
|
2431
2449
|
* A reference nobody could resolve — still a mention, just an anonymous one.
|
|
2432
2450
|
* Its height is the body line's 19.6px written out, because `1.4em` here is
|
|
2433
|
-
* the caption's em
|
|
2434
|
-
*
|
|
2435
|
-
*
|
|
2451
|
+
* the caption's em, 16.8px. Its smaller letters would set a baseline of
|
|
2452
|
+
* their own and make the line 3px taller, so a strut — an invisible letter
|
|
2453
|
+
* in the body's type, no wider than nothing, its gap taken back — sets the
|
|
2454
|
+
* chip's baseline and the letters sit on it.
|
|
2436
2455
|
*/
|
|
2437
|
-
quiet: "h-[19.6px] bg-bg-active text-text-muted font-mono text-caption",
|
|
2456
|
+
quiet: "h-[19.6px] bg-bg-active text-text-muted font-mono text-caption before:invisible before:-mr-1 before:w-0 before:font-sans before:text-body-2 before:content-['x']",
|
|
2438
2457
|
/** A file this reader cannot open — deleted, or not theirs to see: said in words, quieter than a link. */
|
|
2439
2458
|
muted: "bg-bg-active text-text-muted"
|
|
2440
2459
|
};
|
|
@@ -2444,7 +2463,7 @@ function inlineChipClassName(tone, className) {
|
|
|
2444
2463
|
function InlineChip({ tone = "neutral", icon, href, className, children, ...props }) {
|
|
2445
2464
|
const inApp = useInAppClick(href, props.onClick);
|
|
2446
2465
|
const body = /* @__PURE__ */ jsxs24(Fragment7, { children: [
|
|
2447
|
-
icon && /* @__PURE__ */ jsx33("span", { className: "flex size-4 shrink-0 items-center justify-center text-text-secondary", children: icon }),
|
|
2466
|
+
icon && /* @__PURE__ */ jsx33("span", { className: "flex size-4 shrink-0 items-center justify-center self-center text-text-secondary", children: icon }),
|
|
2448
2467
|
children
|
|
2449
2468
|
] });
|
|
2450
2469
|
const classes = inlineChipClassName(tone, className);
|
|
@@ -3753,7 +3772,7 @@ var VIEWPORT_PAD5 = 8;
|
|
|
3753
3772
|
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
|
|
3754
3773
|
const anchorTarget = useMemo4(() => {
|
|
3755
3774
|
if (!anchor) return void 0;
|
|
3756
|
-
if (anchor instanceof Element) return anchor;
|
|
3775
|
+
if (anchor instanceof Element || "getBoundingClientRect" in anchor) return anchor;
|
|
3757
3776
|
return { getBoundingClientRect: () => anchor };
|
|
3758
3777
|
}, [anchor]);
|
|
3759
3778
|
return /* @__PURE__ */ jsxs37(
|
|
@@ -3803,6 +3822,17 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
3803
3822
|
import { useCallback as useCallback4, useEffect as useEffect7, useId as useId3, useImperativeHandle, useMemo as useMemo5, useRef as useRef12, useState as useState11 } from "react";
|
|
3804
3823
|
import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3805
3824
|
function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sections, itemKey, row, onSelect, handle }) {
|
|
3825
|
+
const last = useRef12(null);
|
|
3826
|
+
const anchor = useMemo5(() => {
|
|
3827
|
+
if (typeof rect !== "function") return rect;
|
|
3828
|
+
return {
|
|
3829
|
+
getBoundingClientRect: () => {
|
|
3830
|
+
last.current = rect() ?? last.current;
|
|
3831
|
+
return last.current ?? new DOMRect();
|
|
3832
|
+
},
|
|
3833
|
+
contextElement: editorElement ?? void 0
|
|
3834
|
+
};
|
|
3835
|
+
}, [rect, editorElement]);
|
|
3806
3836
|
const shown = useMemo5(() => sections.filter((section) => section.items.length > 0), [sections]);
|
|
3807
3837
|
const items = useMemo5(() => shown.flatMap((section) => section.items), [shown]);
|
|
3808
3838
|
const keys = items.map(itemKey).join("\n");
|
|
@@ -3894,7 +3924,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3894
3924
|
};
|
|
3895
3925
|
return (
|
|
3896
3926
|
// finalFocus={false}: focus never left the text, and a list that closes because focus moved elsewhere must not pull it back (71a4577b).
|
|
3897
|
-
/* @__PURE__ */ jsx55(Popover, { anchor
|
|
3927
|
+
/* @__PURE__ */ jsx55(Popover, { anchor, open: rect !== null, side: "top", align: "left", className: width, maxHeight, ariaLabel, finalFocus: false, children: /* @__PURE__ */ jsx55("div", { ref: keepFocus, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "flex flex-col gap-0.5", children: shown.map((section, i) => /* @__PURE__ */ jsxs38("div", { className: "contents", children: [
|
|
3898
3928
|
i > 0 && /* @__PURE__ */ jsx55(MenuSeparator, {}),
|
|
3899
3929
|
section.label ? /* @__PURE__ */ jsx55("div", { role: "group", "aria-label": section.label, children: /* @__PURE__ */ jsx55(MenuSection, { label: section.label, className: section.className, children: section.items.map(drawRow) }) }) : section.items.map(drawRow)
|
|
3900
3930
|
] }, section.label ?? i)) }) })
|
|
@@ -4059,6 +4089,8 @@ function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, c
|
|
|
4059
4089
|
}
|
|
4060
4090
|
|
|
4061
4091
|
// src/linked.ts
|
|
4092
|
+
import { createContext as createContext7 } from "react";
|
|
4093
|
+
var inTheBox = createContext7(false);
|
|
4062
4094
|
function chosenOf(picker) {
|
|
4063
4095
|
return picker?.value === void 0 ? void 0 : picker.options.find((option) => option.value === picker.value);
|
|
4064
4096
|
}
|
|
@@ -4248,6 +4280,7 @@ function linkedFrom(object, options) {
|
|
|
4248
4280
|
title: titleOf(object),
|
|
4249
4281
|
href,
|
|
4250
4282
|
...key ? { key } : {},
|
|
4283
|
+
...object.noun ? { noun: object.noun.charAt(0).toUpperCase() + object.noun.slice(1) } : {},
|
|
4251
4284
|
// Interop reads every file kind's summary into its subtitle (SPEC §6.12).
|
|
4252
4285
|
...slots.subtitle?.value ? { summary: slots.subtitle.value } : {},
|
|
4253
4286
|
...status ? { status } : {},
|
|
@@ -4295,8 +4328,16 @@ function LinkedIcon({ kind, size = 16, tone = "secondary" }) {
|
|
|
4295
4328
|
if (kind === "page") return /* @__PURE__ */ jsx60(IconFileText, { size, stroke: 1.5, className: cn("shrink-0", tone === "secondary" && "text-text-secondary"), "aria-hidden": true });
|
|
4296
4329
|
return /* @__PURE__ */ jsx60(KindIcon, { kind, size, tone });
|
|
4297
4330
|
}
|
|
4298
|
-
function LinkKey({ children }) {
|
|
4299
|
-
return /* @__PURE__ */ jsx60("span", { className: "shrink-0 text-caption tabular-nums text-text-muted", children });
|
|
4331
|
+
function LinkKey({ children, tone = "muted" }) {
|
|
4332
|
+
return /* @__PURE__ */ jsx60("span", { className: cn("shrink-0 text-caption tabular-nums", tone === "secondary" ? "text-text-secondary" : "text-text-muted"), children });
|
|
4333
|
+
}
|
|
4334
|
+
var KIND_NOUN = { issue: "Issue", project: "Project", topic: "Topic", page: "Document" };
|
|
4335
|
+
function kindNounOf(linked) {
|
|
4336
|
+
return linked.noun ?? KIND_NOUN[linked.kind];
|
|
4337
|
+
}
|
|
4338
|
+
function LinkTile({ kind, author }) {
|
|
4339
|
+
if (author) return /* @__PURE__ */ jsx60(Avatar, { name: author.name, src: author.picture, size: 36 });
|
|
4340
|
+
return /* @__PURE__ */ jsx60("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx60(LinkedIcon, { kind }) });
|
|
4300
4341
|
}
|
|
4301
4342
|
function ProgressRing({ done, total }) {
|
|
4302
4343
|
const size = 16;
|
|
@@ -4304,7 +4345,7 @@ function ProgressRing({ done, total }) {
|
|
|
4304
4345
|
const r = (size - stroke) / 2;
|
|
4305
4346
|
const c = 2 * Math.PI * r;
|
|
4306
4347
|
const share = total > 0 ? Math.min(done, total) / total : 0;
|
|
4307
|
-
return /* @__PURE__ */ jsx60(WithTooltip, { label: `${done} of ${total} done`, inline: true, wrapperClassName: "inline-flex shrink-0", children: /* @__PURE__ */ jsxs41("span", { className: "inline-flex shrink-0 items-center gap-1 text-
|
|
4348
|
+
return /* @__PURE__ */ jsx60(WithTooltip, { label: `${done} of ${total} done`, inline: true, wrapperClassName: "inline-flex shrink-0", children: /* @__PURE__ */ jsxs41("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-small tabular-nums text-text-secondary", children: [
|
|
4308
4349
|
/* @__PURE__ */ jsxs41("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "shrink-0 -rotate-90", "aria-hidden": true, children: [
|
|
4309
4350
|
/* @__PURE__ */ jsx60("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, className: "stroke-border-default" }),
|
|
4310
4351
|
/* @__PURE__ */ jsx60("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, strokeLinecap: "round", strokeDasharray: `${c * share} ${c}`, className: "stroke-success-default" })
|
|
@@ -4316,59 +4357,77 @@ function ProgressRing({ done, total }) {
|
|
|
4316
4357
|
}
|
|
4317
4358
|
function CommentCount({ conversation, noun = "comments" }) {
|
|
4318
4359
|
const { count, href, unread = false } = conversation;
|
|
4319
|
-
return
|
|
4320
|
-
/*
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4360
|
+
return (
|
|
4361
|
+
/*
|
|
4362
|
+
* A small button's shape, as Button's small one is: 24px tall like the pickers beside it, 6px each side, its corners
|
|
4363
|
+
* and its hover. It was 15px tall, 1px above and below its icon and 4px at the sides, and read as squashed
|
|
4364
|
+
* (Katerina, 29 Oct). The link fills the box, so all of it opens the conversation. The box keeps its own room:
|
|
4365
|
+
* its 6px and the row's gap part it from the faces and the ring beside it (14px to its icon). The count is in
|
|
4366
|
+
* the small size (10px).
|
|
4367
|
+
*/
|
|
4368
|
+
/* @__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: [
|
|
4369
|
+
/* @__PURE__ */ jsx60(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4370
|
+
count,
|
|
4371
|
+
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: unread ? `${noun}, unread \u2014 open the conversation` : `${noun} \u2014 open the conversation` }),
|
|
4372
|
+
unread && /* @__PURE__ */ jsx60(UnreadDot, { className: "h-auto w-auto" })
|
|
4373
|
+
] }) })
|
|
4374
|
+
);
|
|
4325
4375
|
}
|
|
4326
4376
|
function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false }) {
|
|
4327
4377
|
const statusNow = chosenOf(status);
|
|
4328
4378
|
const ownerNow = chosenOf(owner);
|
|
4329
4379
|
const statusWords = status && (readOnly || !status.onChange);
|
|
4330
4380
|
const ownerWords = owner && (readOnly || !owner.onChange);
|
|
4331
|
-
return
|
|
4332
|
-
status
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
/* @__PURE__ */
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4381
|
+
return (
|
|
4382
|
+
// 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).
|
|
4383
|
+
/* @__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: [
|
|
4384
|
+
status && (statusWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
4385
|
+
statusNow?.colour && /* @__PURE__ */ jsx60(StatusIcon, { colour: statusNow.colour }),
|
|
4386
|
+
statusNow?.label ?? "No status"
|
|
4387
|
+
] }) : /* @__PURE__ */ jsx60(
|
|
4388
|
+
Select,
|
|
4389
|
+
{
|
|
4390
|
+
size: "small",
|
|
4391
|
+
className: "w-auto",
|
|
4392
|
+
value: status.value ?? "",
|
|
4393
|
+
onChange: (value) => status.onChange?.(value),
|
|
4394
|
+
ariaLabel: "Status",
|
|
4395
|
+
options: status.options.map((option) => ({ value: option.value, label: option.label, leading: option.colour && /* @__PURE__ */ jsx60(StatusIcon, { colour: option.colour }) }))
|
|
4396
|
+
}
|
|
4397
|
+
)),
|
|
4398
|
+
owner && (ownerWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
|
|
4399
|
+
/* @__PURE__ */ jsx60(Avatar, { name: ownerNow?.label, src: ownerNow?.picture, size: 16 }),
|
|
4400
|
+
/* @__PURE__ */ jsx60("span", { className: "truncate", children: ownerNow?.label ?? "Unassigned" })
|
|
4401
|
+
] }) : /* @__PURE__ */ jsx60(
|
|
4402
|
+
Select,
|
|
4403
|
+
{
|
|
4404
|
+
size: "small",
|
|
4405
|
+
className: "w-auto",
|
|
4406
|
+
value: owner.value ?? "",
|
|
4407
|
+
placeholder: "Unassigned",
|
|
4408
|
+
onChange: (value) => owner.onChange?.(value),
|
|
4409
|
+
ariaLabel: ownerLabel,
|
|
4410
|
+
options: owner.options.map((option) => ({ value: option.value, label: option.label, leading: /* @__PURE__ */ jsx60(Avatar, { name: option.label, src: option.picture, size: 16 }) }))
|
|
4411
|
+
}
|
|
4412
|
+
))
|
|
4413
|
+
] })
|
|
4414
|
+
);
|
|
4362
4415
|
}
|
|
4363
4416
|
|
|
4364
4417
|
// src/LinkPreview.tsx
|
|
4365
4418
|
import { useSyncExternalStore } from "react";
|
|
4366
4419
|
|
|
4420
|
+
// src/LinkCard.tsx
|
|
4421
|
+
import { useContext as useContext8 } from "react";
|
|
4422
|
+
|
|
4367
4423
|
// src/LinkRow.tsx
|
|
4368
|
-
import {
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4424
|
+
import { useContext as useContext7 } from "react";
|
|
4425
|
+
import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4426
|
+
var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
|
|
4427
|
+
function LinkUnavailable({ kind, noun, openIn, card = false }) {
|
|
4428
|
+
const wide = useContext7(inTheBox);
|
|
4429
|
+
return /* @__PURE__ */ jsxs42(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, !wide && "max-w-[480px]"), children: [
|
|
4430
|
+
/* @__PURE__ */ jsx61("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx61(LinkedIcon, { kind }) }),
|
|
4372
4431
|
/* @__PURE__ */ jsxs42("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: [
|
|
4373
4432
|
noun,
|
|
4374
4433
|
" \u2014 not available."
|
|
@@ -4380,86 +4439,105 @@ function LinkUnavailable({ kind, noun, openIn }) {
|
|
|
4380
4439
|
] }) })
|
|
4381
4440
|
] });
|
|
4382
4441
|
}
|
|
4442
|
+
function linkMetaOf(linked, withWhen = false) {
|
|
4443
|
+
return [linked.key, kindNounOf(linked), linked.subtitle, withWhen ? linked.updated : void 0].filter(Boolean).join(" \xB7 ");
|
|
4444
|
+
}
|
|
4383
4445
|
function LinkRow({ link, preview = true }) {
|
|
4446
|
+
const wide = useContext7(inTheBox);
|
|
4447
|
+
const width = !wide && "max-w-[480px]";
|
|
4384
4448
|
if (link.state === "loading") {
|
|
4385
|
-
return /* @__PURE__ */ jsx61("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs42(Card, { fill: "inset", "aria-hidden": true, className:
|
|
4386
|
-
/* @__PURE__ */ jsx61(LinkedIcon, { kind: link.kind }),
|
|
4387
|
-
/* @__PURE__ */
|
|
4388
|
-
|
|
4449
|
+
return /* @__PURE__ */ jsx61("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs42(Card, { fill: "inset", "aria-hidden": true, className: cn(ROW_CLASSES2, width), children: [
|
|
4450
|
+
/* @__PURE__ */ jsx61("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx61(LinkedIcon, { kind: link.kind }) }),
|
|
4451
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
4452
|
+
/* @__PURE__ */ jsx61(SkeletonBar, { on: "inset", className: "h-3 w-2/5" }),
|
|
4453
|
+
/* @__PURE__ */ jsx61(SkeletonBar, { on: "inset", className: "h-2.5 w-1/4" })
|
|
4454
|
+
] })
|
|
4389
4455
|
] }) });
|
|
4390
4456
|
}
|
|
4391
4457
|
if (link.state === "unavailable") return /* @__PURE__ */ jsx61(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn });
|
|
4392
4458
|
const { linked } = link;
|
|
4393
4459
|
const status = chosenOf(linked.status);
|
|
4394
4460
|
const owner = chosenOf(linked.owner);
|
|
4395
|
-
const said = linked.kind === "message"
|
|
4396
|
-
const
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4461
|
+
const said = linked.kind === "message" ? linked.author : void 0;
|
|
4462
|
+
const meta = said ? linked.body ?? "" : linkMetaOf(linked, true) || linked.summary;
|
|
4463
|
+
const row = /* @__PURE__ */ jsxs42(Card, { fill: "inset", hover: "hairline", className: cn("relative", ROW_CLASSES2, width), children: [
|
|
4464
|
+
/* @__PURE__ */ jsx61(LinkTile, { kind: linked.kind, author: said }),
|
|
4465
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4466
|
+
said ? (
|
|
4467
|
+
// As a card of words a person wrote: the name, then the time beside it, muted.
|
|
4468
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
4469
|
+
/* @__PURE__ */ jsx61("span", { className: "contents text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx61(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, children: said.name }) }),
|
|
4470
|
+
linked.updated && /* @__PURE__ */ jsx61("span", { className: cn("shrink-0 text-caption text-text-muted", TIME_CLASSES), children: linked.updated })
|
|
4471
|
+
] })
|
|
4472
|
+
) : /* @__PURE__ */ jsx61("span", { className: "contents text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx61(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, children: linked.title }) }),
|
|
4473
|
+
meta && /* @__PURE__ */ jsx61("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4404
4474
|
] }),
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4475
|
+
/* @__PURE__ */ jsxs42("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
4476
|
+
linked.done ? /* @__PURE__ */ jsx61(ProgressRing, { done: linked.done.done, total: linked.done.total }) : status?.colour && /* @__PURE__ */ jsx61(StatusMark, { status: { label: status.label, colour: status.colour } }),
|
|
4477
|
+
linked.conversation && /* @__PURE__ */ jsx61(CommentCount, { conversation: linked.conversation, noun: linked.conversation.noun }),
|
|
4478
|
+
owner && /* @__PURE__ */ jsx61(Avatar, { name: owner.label, src: owner.picture, size: 16 }),
|
|
4479
|
+
linked.members && /* @__PURE__ */ jsx61(AvatarGroup, { members: linked.members, size: 16, on: "inset" }),
|
|
4480
|
+
linked.authors && /* @__PURE__ */ jsx61(AvatarGroup, { members: linked.authors, size: 16, on: "inset" })
|
|
4481
|
+
] })
|
|
4412
4482
|
] });
|
|
4413
4483
|
return preview ? /* @__PURE__ */ jsx61(LinkPreview, { linked, block: true, children: row }) : row;
|
|
4414
4484
|
}
|
|
4415
4485
|
|
|
4416
4486
|
// src/LinkCard.tsx
|
|
4417
|
-
import { Fragment as
|
|
4487
|
+
import { Fragment as Fragment15, jsx as jsx62, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4488
|
+
var CARD_CLASSES = "flex flex-col gap-3 p-3";
|
|
4418
4489
|
function LinkCard({ link, readOnly = false, bare = false }) {
|
|
4490
|
+
const boxed = useContext8(inTheBox);
|
|
4419
4491
|
if (link.state === "loading") return /* @__PURE__ */ jsx62(LinkCardLoading, { kind: link.kind, shape: link.shape });
|
|
4420
|
-
if (link.state === "unavailable") return /* @__PURE__ */ jsx62(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn });
|
|
4492
|
+
if (link.state === "unavailable") return /* @__PURE__ */ jsx62(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, card: true });
|
|
4421
4493
|
const { linked } = link;
|
|
4422
|
-
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx62(SaidBody, { linked }) : /* @__PURE__ */ jsx62(CardBody, { linked, readOnly });
|
|
4423
|
-
if (bare) return /* @__PURE__ */ jsx62("div", { className:
|
|
4424
|
-
return /* @__PURE__ */ jsx62(Card, { fill: "inset", className:
|
|
4494
|
+
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx62(SaidBody, { linked }) : /* @__PURE__ */ jsx62(CardBody, { linked, readOnly: readOnly || boxed });
|
|
4495
|
+
if (bare) return /* @__PURE__ */ jsx62("div", { className: CARD_CLASSES, children: body });
|
|
4496
|
+
return /* @__PURE__ */ jsx62(Card, { fill: boxed ? "elevated" : "inset", className: cn(CARD_CLASSES, !boxed && "max-w-[480px]"), children: body });
|
|
4425
4497
|
}
|
|
4426
4498
|
function CardBody({ linked, readOnly }) {
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4499
|
+
const boxed = useContext8(inTheBox);
|
|
4500
|
+
const on = boxed ? "elevated" : "inset";
|
|
4501
|
+
const meta = linkMetaOf(linked);
|
|
4502
|
+
return /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4503
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4504
|
+
/* @__PURE__ */ jsx62(LinkTile, { kind: linked.kind }),
|
|
4505
|
+
/* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4506
|
+
/* @__PURE__ */ jsx62("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx62(Link, { href: linked.href, variant: "quiet", truncate: true, className: "block", children: linked.title }) }),
|
|
4507
|
+
meta && /* @__PURE__ */ jsx62("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4508
|
+
] }),
|
|
4509
|
+
(linked.done || linked.members) && // On the title's line, not halfway down the header.
|
|
4510
|
+
/* @__PURE__ */ jsxs43("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
4511
|
+
linked.done && /* @__PURE__ */ jsx62(ProgressRing, { done: linked.done.done, total: linked.done.total }),
|
|
4512
|
+
linked.members && /* @__PURE__ */ jsx62(AvatarGroup, { members: linked.members, size: 16, on })
|
|
4513
|
+
] })
|
|
4435
4514
|
] }),
|
|
4436
|
-
(linked.key || linked.subtitle) && /* @__PURE__ */ jsx62("p", { className: "-mt-1 pl-6 text-caption text-text-secondary", children: [linked.key, linked.subtitle].filter(Boolean).join(" \xB7 ") }),
|
|
4437
4515
|
linked.summary && /* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.summary }),
|
|
4438
|
-
linked.children && linked.children.length > 0 &&
|
|
4516
|
+
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").
|
|
4517
|
+
/* @__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: [
|
|
4439
4518
|
/* @__PURE__ */ jsx62(StatusMark, { status: child.status }),
|
|
4440
4519
|
child.key && /* @__PURE__ */ jsx62(LinkKey, { children: child.key }),
|
|
4441
4520
|
/* @__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 }) }),
|
|
4442
4521
|
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 })
|
|
4443
4522
|
] }, child.id)) }),
|
|
4444
|
-
linked.latest &&
|
|
4523
|
+
linked.latest && // 12px between the words "Latest conversation" and the quote they name (Katerina, 29 Oct).
|
|
4524
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-3", children: [
|
|
4445
4525
|
/* @__PURE__ */ jsx62("span", { className: "text-caption text-text-muted", children: "Latest conversation" }),
|
|
4446
|
-
/* @__PURE__ */ jsxs43("div", { className: "flex
|
|
4447
|
-
/* @__PURE__ */
|
|
4448
|
-
|
|
4449
|
-
/* @__PURE__ */
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
/* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.latest.body })
|
|
4454
|
-
] })
|
|
4526
|
+
/* @__PURE__ */ jsxs43("div", { className: cn("flex flex-col gap-1", QUOTE_BAR_CLASSES), children: [
|
|
4527
|
+
/* @__PURE__ */ jsxs43("span", { className: "flex items-center gap-2 text-caption", children: [
|
|
4528
|
+
/* @__PURE__ */ jsx62(Avatar, { name: linked.latest.author.name, src: linked.latest.author.picture, size: 16 }),
|
|
4529
|
+
/* @__PURE__ */ jsx62("span", { className: "text-text-primary", children: linked.latest.author.name }),
|
|
4530
|
+
/* @__PURE__ */ jsx62("span", { className: cn("text-text-muted", TIME_CLASSES), children: linked.latest.at })
|
|
4531
|
+
] }),
|
|
4532
|
+
/* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.latest.body })
|
|
4455
4533
|
] })
|
|
4456
4534
|
] }),
|
|
4457
|
-
/* @__PURE__ */ jsxs43("div", { className: "flex min-h-6 items-center gap-2
|
|
4535
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex min-h-6 items-center gap-2", children: [
|
|
4458
4536
|
(linked.status || linked.owner) && /* @__PURE__ */ jsx62(LinkPickers, { status: linked.status, owner: linked.owner, ownerLabel: linked.ownerLabel, readOnly }),
|
|
4459
4537
|
linked.authors ? /* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 items-center gap-2 text-caption text-text-secondary", children: [
|
|
4460
|
-
/* @__PURE__ */ jsx62(AvatarGroup, { members: linked.authors, size: 16 }),
|
|
4538
|
+
/* @__PURE__ */ jsx62(AvatarGroup, { members: linked.authors, size: 16, on }),
|
|
4461
4539
|
linked.updated && /* @__PURE__ */ jsx62("span", { className: "shrink-0", children: linked.updated })
|
|
4462
|
-
] }) : !linked.status && !linked.owner && linked.updated && /* @__PURE__ */ jsxs43("span", { className: "text-caption text-text-secondary", children: [
|
|
4540
|
+
] }) : !linked.status && !linked.owner && linked.updated && /* @__PURE__ */ jsxs43("span", { className: "text-caption italic text-text-secondary", children: [
|
|
4463
4541
|
"Updated ",
|
|
4464
4542
|
linked.updated
|
|
4465
4543
|
] }),
|
|
@@ -4469,46 +4547,49 @@ function CardBody({ linked, readOnly }) {
|
|
|
4469
4547
|
}
|
|
4470
4548
|
function SaidBody({ linked }) {
|
|
4471
4549
|
const author = linked.author;
|
|
4472
|
-
return /* @__PURE__ */ jsxs43(
|
|
4550
|
+
return /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4473
4551
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
4474
4552
|
/* @__PURE__ */ jsx62(Avatar, { name: author.name, src: author.picture, size: 24 }),
|
|
4475
4553
|
/* @__PURE__ */ jsx62("span", { className: "text-body-2-strong text-text-primary", children: author.name }),
|
|
4476
|
-
/* @__PURE__ */ jsx62("span", { className: "text-caption text-text-muted", children: /* @__PURE__ */ jsx62(Link, { href: linked.href, variant: "quiet", children: linked.updated ?? "Open" }) })
|
|
4554
|
+
/* @__PURE__ */ jsx62("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx62(Link, { href: linked.href, variant: "quiet", children: linked.updated ?? "Open" }) })
|
|
4477
4555
|
] }),
|
|
4478
|
-
/* @__PURE__ */ jsx62("p", { className: "line-clamp-4 text-body-2 text-text-
|
|
4556
|
+
/* @__PURE__ */ jsx62("p", { className: "line-clamp-4 text-body-2 text-text-secondary", children: linked.body ?? linked.title })
|
|
4479
4557
|
] });
|
|
4480
4558
|
}
|
|
4481
4559
|
var KIND_SHAPE = {
|
|
4482
4560
|
issue: { subtitle: true, summary: true, footer: "pickers" },
|
|
4483
|
-
project: { subtitle:
|
|
4484
|
-
topic: { summary: true, latest: true, footer: "line" },
|
|
4561
|
+
project: { subtitle: true, summary: true, rows: 3, ring: true, footer: "pickers" },
|
|
4562
|
+
topic: { subtitle: true, summary: true, latest: true, footer: "line" },
|
|
4485
4563
|
page: { subtitle: true, summary: true, footer: "people" },
|
|
4486
4564
|
file: { summary: false, footer: "line" },
|
|
4487
4565
|
message: { summary: true, footer: "none" }
|
|
4488
4566
|
};
|
|
4489
4567
|
function LinkCardLoading({ kind, shape }) {
|
|
4490
4568
|
const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
/* @__PURE__ */ jsx62(
|
|
4495
|
-
|
|
4569
|
+
const boxed = useContext8(inTheBox);
|
|
4570
|
+
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, !boxed && "max-w-[480px]"), children: [
|
|
4571
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4572
|
+
/* @__PURE__ */ jsx62("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx62(LinkedIcon, { kind }) }),
|
|
4573
|
+
/* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
4574
|
+
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3.5 w-1/2" }),
|
|
4575
|
+
subtitle && /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-20" })
|
|
4576
|
+
] }),
|
|
4577
|
+
ring && /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "round", className: "size-4 self-start" })
|
|
4496
4578
|
] }),
|
|
4497
|
-
subtitle && /* @__PURE__ */ jsx62("div", { className: "-mt-1 flex h-[14.4px] items-center pl-6", children: /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-20" }) }),
|
|
4498
4579
|
summary && /* @__PURE__ */ jsx62("div", { className: "flex h-[19.6px] items-center", children: /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-4/5" }) }),
|
|
4499
4580
|
rows > 0 && /* @__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: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx62("div", { className: "flex h-8 items-center px-2", children: /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-1/3" }) }, i)) }),
|
|
4500
|
-
latest && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-
|
|
4581
|
+
latest && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-3", children: [
|
|
4501
4582
|
/* @__PURE__ */ jsx62("div", { className: "flex h-[14.4px] items-center", children: /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-28" }) }),
|
|
4502
|
-
/* @__PURE__ */ jsxs43("div", { className: "flex h-[
|
|
4583
|
+
/* @__PURE__ */ jsxs43("div", { className: cn("flex h-[57.6px] flex-col justify-center gap-2", QUOTE_BAR_CLASSES), children: [
|
|
4503
4584
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-24" }),
|
|
4504
4585
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-full" }),
|
|
4505
4586
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-3/5" })
|
|
4506
4587
|
] })
|
|
4507
4588
|
] }),
|
|
4508
|
-
footer !== "none" && /* @__PURE__ */ jsx62("div", { className: "flex min-h-6 items-center gap-2
|
|
4589
|
+
footer !== "none" && /* @__PURE__ */ jsx62("div", { className: "flex min-h-6 items-center gap-2", children: footer === "pickers" ? /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4509
4590
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-24" }),
|
|
4510
4591
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-28" })
|
|
4511
|
-
] }) : footer === "people" ? /* @__PURE__ */ jsxs43(
|
|
4592
|
+
] }) : footer === "people" ? /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4512
4593
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "round", className: "size-4" }),
|
|
4513
4594
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-40" })
|
|
4514
4595
|
] }) : /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-40" }) })
|
|
@@ -4516,7 +4597,7 @@ function LinkCardLoading({ kind, shape }) {
|
|
|
4516
4597
|
}
|
|
4517
4598
|
|
|
4518
4599
|
// src/LinkPreview.tsx
|
|
4519
|
-
import { Fragment as
|
|
4600
|
+
import { Fragment as Fragment16, jsx as jsx63 } from "react/jsx-runtime";
|
|
4520
4601
|
var HOVER = "(hover: hover)";
|
|
4521
4602
|
function subscribe(onChange) {
|
|
4522
4603
|
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
@@ -4534,8 +4615,8 @@ function useCanHover() {
|
|
|
4534
4615
|
}
|
|
4535
4616
|
function LinkPreview({ linked, block = false, children }) {
|
|
4536
4617
|
const canHover = useCanHover();
|
|
4537
|
-
if (!canHover) return /* @__PURE__ */ jsx63(
|
|
4538
|
-
return /* @__PURE__ */ jsx63(PreviewCard, { side: "
|
|
4618
|
+
if (!canHover) return /* @__PURE__ */ jsx63(Fragment16, { children });
|
|
4619
|
+
return /* @__PURE__ */ jsx63(PreviewCard, { side: "top", contentClassName: "p-0", content: /* @__PURE__ */ jsx63(LinkCard, { link: { state: "ready", linked }, bare: true, readOnly: true }), wrapperClassName: block ? "grid w-full min-w-0 grid-cols-[minmax(0,1fr)]" : "max-w-full", children });
|
|
4539
4620
|
}
|
|
4540
4621
|
function LinkPreviewOpen({ linked }) {
|
|
4541
4622
|
return /* @__PURE__ */ jsx63(MenuPanel, { className: "w-[360px] p-0", children: /* @__PURE__ */ jsx63(LinkCard, { link: { state: "ready", linked }, bare: true, readOnly: true }) });
|
|
@@ -4559,11 +4640,12 @@ function LinkChip({ link, preview = true }) {
|
|
|
4559
4640
|
const chip = /* @__PURE__ */ jsxs44(
|
|
4560
4641
|
InlineChip,
|
|
4561
4642
|
{
|
|
4562
|
-
icon: said ? /* @__PURE__ */ jsx64(Avatar, { name: said.name, src: said.picture, size:
|
|
4643
|
+
icon: said ? /* @__PURE__ */ jsx64(Avatar, { name: said.name, src: said.picture, size: 14 }) : /* @__PURE__ */ jsx64(LinkedIcon, { kind: linked.kind, size: 14, tone: "inherit" }),
|
|
4563
4644
|
href: linked.href,
|
|
4564
|
-
className: "max-w-[
|
|
4645
|
+
className: preview ? "min-w-0 max-w-[40ch]" : "max-w-[min(40ch,calc(100%_-_4px))]",
|
|
4565
4646
|
children: [
|
|
4566
|
-
linked.key &&
|
|
4647
|
+
linked.key && // 4px more than the chip's gap after it, and kept whole: "ABC-2" never breaks at its hyphen.
|
|
4648
|
+
/* @__PURE__ */ jsx64("span", { className: "mr-1 shrink-0 whitespace-nowrap", children: /* @__PURE__ */ jsx64(LinkKey, { tone: "secondary", children: linked.key }) }),
|
|
4567
4649
|
/* @__PURE__ */ jsx64("span", { className: "truncate", children: said ? `${said.name}: ${linked.body ?? linked.title}` : linked.title }),
|
|
4568
4650
|
status?.colour && /* @__PURE__ */ jsx64(StatusMark, { status: { label: status.label, colour: status.colour } })
|
|
4569
4651
|
]
|
|
@@ -4572,40 +4654,48 @@ function LinkChip({ link, preview = true }) {
|
|
|
4572
4654
|
return preview ? /* @__PURE__ */ jsx64(LinkPreview, { linked, children: chip }) : chip;
|
|
4573
4655
|
}
|
|
4574
4656
|
|
|
4575
|
-
// src/
|
|
4576
|
-
import {
|
|
4657
|
+
// src/AttachedCard.tsx
|
|
4658
|
+
import { useContext as useContext9 } from "react";
|
|
4577
4659
|
import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4578
|
-
function
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
/* @__PURE__ */
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4660
|
+
function AttachedCard({ link, children, onRemove }) {
|
|
4661
|
+
const boxed = useContext9(inTheBox);
|
|
4662
|
+
return (
|
|
4663
|
+
// At most 480px under a message or in a document, so it never runs the column's whole width; in a box it fills the box (Katerina, 29 Oct).
|
|
4664
|
+
/* @__PURE__ */ jsxs45("div", { className: cn("group/card relative", !boxed && "max-w-[480px]"), children: [
|
|
4665
|
+
link ? /* @__PURE__ */ jsx65(LinkCard, { link }) : children,
|
|
4666
|
+
onRemove && /* @__PURE__ */ jsx65(
|
|
4667
|
+
RemoveBadge,
|
|
4668
|
+
{
|
|
4669
|
+
label: "Remove card",
|
|
4670
|
+
onRemove,
|
|
4671
|
+
className: "opacity-0 group-hover/card:opacity-100 group-focus-within/card:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100"
|
|
4672
|
+
}
|
|
4673
|
+
)
|
|
4674
|
+
] })
|
|
4675
|
+
);
|
|
4593
4676
|
}
|
|
4594
4677
|
|
|
4595
4678
|
// src/PartCard.tsx
|
|
4596
|
-
import {
|
|
4597
|
-
|
|
4679
|
+
import { useContext as useContext10 } from "react";
|
|
4680
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4681
|
+
function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn, children }) {
|
|
4682
|
+
const word = noun ?? kindNounOf({ kind }) ?? "File";
|
|
4683
|
+
const boxed = useContext10(inTheBox);
|
|
4598
4684
|
if (state === "loading") return /* @__PURE__ */ jsx66(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
4599
|
-
if (state === "unavailable") return /* @__PURE__ */ jsx66(LinkUnavailable, { kind, noun: `A part of this ${
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4685
|
+
if (state === "unavailable") return /* @__PURE__ */ jsx66(LinkUnavailable, { kind, noun: `A part of this ${word.toLowerCase()}`, openIn, card: true });
|
|
4686
|
+
return (
|
|
4687
|
+
// In a box being written in, on the files' fill as the card beside it is; elsewhere at most 480px.
|
|
4688
|
+
/* @__PURE__ */ jsxs46(Card, { fill: boxed ? "elevated" : "inset", className: cn("flex flex-col gap-3 p-3", !boxed && "max-w-[480px]"), children: [
|
|
4689
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-3", children: [
|
|
4690
|
+
/* @__PURE__ */ jsx66(LinkTile, { kind }),
|
|
4691
|
+
/* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4692
|
+
/* @__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 }) }),
|
|
4693
|
+
/* @__PURE__ */ jsx66("span", { className: "truncate text-caption text-text-secondary", children: partKey ? `A part of ${partKey}` : `A part of this ${word.toLowerCase()}` })
|
|
4694
|
+
] })
|
|
4695
|
+
] }),
|
|
4696
|
+
/* @__PURE__ */ jsx66("div", { className: QUOTE_BAR_CLASSES, children })
|
|
4697
|
+
] })
|
|
4698
|
+
);
|
|
4609
4699
|
}
|
|
4610
4700
|
|
|
4611
4701
|
// src/Rail.tsx
|
|
@@ -4736,7 +4826,7 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
4736
4826
|
align: "left",
|
|
4737
4827
|
ariaLabel: "Add a reaction",
|
|
4738
4828
|
contentClassName: "p-1",
|
|
4739
|
-
className,
|
|
4829
|
+
className: cn("w-auto min-w-0", className),
|
|
4740
4830
|
trigger: /* @__PURE__ */ jsx71(IconButton, { variant: "muted", tooltip: "Add a reaction", "aria-label": "Add a reaction", children: /* @__PURE__ */ jsx71(IconMoodPlus, { size: 16, stroke: 1.5 }) }),
|
|
4741
4831
|
children: /* @__PURE__ */ jsx71(
|
|
4742
4832
|
ReactionPicker,
|
|
@@ -4868,7 +4958,7 @@ function ListColumn(props) {
|
|
|
4868
4958
|
|
|
4869
4959
|
// src/Tabs.tsx
|
|
4870
4960
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
4871
|
-
import { Fragment as
|
|
4961
|
+
import { Fragment as Fragment17, jsx as jsx75, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
4872
4962
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
4873
4963
|
return /* @__PURE__ */ jsx75(
|
|
4874
4964
|
BaseTabs.Root,
|
|
@@ -4902,7 +4992,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
4902
4992
|
tab.label,
|
|
4903
4993
|
tab.count !== void 0 ? /* @__PURE__ */ jsx75("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
4904
4994
|
] }),
|
|
4905
|
-
tab.unread ? /* @__PURE__ */ jsxs54(
|
|
4995
|
+
tab.unread ? /* @__PURE__ */ jsxs54(Fragment17, { children: [
|
|
4906
4996
|
/* @__PURE__ */ jsx75(UnreadDot, { className: "h-auto w-auto" }),
|
|
4907
4997
|
/* @__PURE__ */ jsx75("span", { className: "sr-only", children: "new" })
|
|
4908
4998
|
] }) : null
|
|
@@ -4917,7 +5007,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
4917
5007
|
}
|
|
4918
5008
|
|
|
4919
5009
|
// src/Toast.tsx
|
|
4920
|
-
import { createContext as
|
|
5010
|
+
import { createContext as createContext8, useContext as useContext11, useMemo as useMemo6 } from "react";
|
|
4921
5011
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
4922
5012
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck2, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
4923
5013
|
import { jsx as jsx76, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
@@ -4968,7 +5058,7 @@ function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAct
|
|
|
4968
5058
|
hasAction && /* @__PURE__ */ jsx76(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
4969
5059
|
] });
|
|
4970
5060
|
}
|
|
4971
|
-
var ToastContext =
|
|
5061
|
+
var ToastContext = createContext8(null);
|
|
4972
5062
|
var VISIBLE_TOASTS = 3;
|
|
4973
5063
|
function ToastProvider({ children }) {
|
|
4974
5064
|
const manager = useMemo6(() => BaseToast.createToastManager(), []);
|
|
@@ -5024,7 +5114,7 @@ function ToastList() {
|
|
|
5024
5114
|
});
|
|
5025
5115
|
}
|
|
5026
5116
|
function useToast() {
|
|
5027
|
-
const ctx =
|
|
5117
|
+
const ctx = useContext11(ToastContext);
|
|
5028
5118
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
5029
5119
|
return ctx;
|
|
5030
5120
|
}
|
|
@@ -5032,6 +5122,7 @@ export {
|
|
|
5032
5122
|
AddReactionButton,
|
|
5033
5123
|
AppProvider,
|
|
5034
5124
|
AppShell,
|
|
5125
|
+
AttachedCard,
|
|
5035
5126
|
AttachmentCard,
|
|
5036
5127
|
Avatar,
|
|
5037
5128
|
AvatarGroup,
|
|
@@ -5040,7 +5131,6 @@ export {
|
|
|
5040
5131
|
Breadcrumb,
|
|
5041
5132
|
Button,
|
|
5042
5133
|
Card,
|
|
5043
|
-
CardUnder,
|
|
5044
5134
|
Checkbox,
|
|
5045
5135
|
Chip,
|
|
5046
5136
|
ChipInput,
|
|
@@ -5148,6 +5238,7 @@ export {
|
|
|
5148
5238
|
chosenOf,
|
|
5149
5239
|
cn,
|
|
5150
5240
|
hueFor,
|
|
5241
|
+
inTheBox,
|
|
5151
5242
|
initialsFor,
|
|
5152
5243
|
inlineChipClassName,
|
|
5153
5244
|
isApplePlatform,
|