@estiva-app/ui 0.90.2 → 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/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 +275 -185
- 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 +509 -455
- 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.stories.tsx +1 -1
- 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/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);
|
|
@@ -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
|
|
@@ -3754,7 +3772,7 @@ var VIEWPORT_PAD5 = 8;
|
|
|
3754
3772
|
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
|
|
3755
3773
|
const anchorTarget = useMemo4(() => {
|
|
3756
3774
|
if (!anchor) return void 0;
|
|
3757
|
-
if (anchor instanceof Element) return anchor;
|
|
3775
|
+
if (anchor instanceof Element || "getBoundingClientRect" in anchor) return anchor;
|
|
3758
3776
|
return { getBoundingClientRect: () => anchor };
|
|
3759
3777
|
}, [anchor]);
|
|
3760
3778
|
return /* @__PURE__ */ jsxs37(
|
|
@@ -3804,6 +3822,17 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
3804
3822
|
import { useCallback as useCallback4, useEffect as useEffect7, useId as useId3, useImperativeHandle, useMemo as useMemo5, useRef as useRef12, useState as useState11 } from "react";
|
|
3805
3823
|
import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3806
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]);
|
|
3807
3836
|
const shown = useMemo5(() => sections.filter((section) => section.items.length > 0), [sections]);
|
|
3808
3837
|
const items = useMemo5(() => shown.flatMap((section) => section.items), [shown]);
|
|
3809
3838
|
const keys = items.map(itemKey).join("\n");
|
|
@@ -3895,7 +3924,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3895
3924
|
};
|
|
3896
3925
|
return (
|
|
3897
3926
|
// finalFocus={false}: focus never left the text, and a list that closes because focus moved elsewhere must not pull it back (71a4577b).
|
|
3898
|
-
/* @__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: [
|
|
3899
3928
|
i > 0 && /* @__PURE__ */ jsx55(MenuSeparator, {}),
|
|
3900
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)
|
|
3901
3930
|
] }, section.label ?? i)) }) })
|
|
@@ -4060,6 +4089,8 @@ function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, c
|
|
|
4060
4089
|
}
|
|
4061
4090
|
|
|
4062
4091
|
// src/linked.ts
|
|
4092
|
+
import { createContext as createContext7 } from "react";
|
|
4093
|
+
var inTheBox = createContext7(false);
|
|
4063
4094
|
function chosenOf(picker) {
|
|
4064
4095
|
return picker?.value === void 0 ? void 0 : picker.options.find((option) => option.value === picker.value);
|
|
4065
4096
|
}
|
|
@@ -4249,6 +4280,7 @@ function linkedFrom(object, options) {
|
|
|
4249
4280
|
title: titleOf(object),
|
|
4250
4281
|
href,
|
|
4251
4282
|
...key ? { key } : {},
|
|
4283
|
+
...object.noun ? { noun: object.noun.charAt(0).toUpperCase() + object.noun.slice(1) } : {},
|
|
4252
4284
|
// Interop reads every file kind's summary into its subtitle (SPEC §6.12).
|
|
4253
4285
|
...slots.subtitle?.value ? { summary: slots.subtitle.value } : {},
|
|
4254
4286
|
...status ? { status } : {},
|
|
@@ -4296,8 +4328,16 @@ function LinkedIcon({ kind, size = 16, tone = "secondary" }) {
|
|
|
4296
4328
|
if (kind === "page") return /* @__PURE__ */ jsx60(IconFileText, { size, stroke: 1.5, className: cn("shrink-0", tone === "secondary" && "text-text-secondary"), "aria-hidden": true });
|
|
4297
4329
|
return /* @__PURE__ */ jsx60(KindIcon, { kind, size, tone });
|
|
4298
4330
|
}
|
|
4299
|
-
function LinkKey({ children }) {
|
|
4300
|
-
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 }) });
|
|
4301
4341
|
}
|
|
4302
4342
|
function ProgressRing({ done, total }) {
|
|
4303
4343
|
const size = 16;
|
|
@@ -4305,7 +4345,7 @@ function ProgressRing({ done, total }) {
|
|
|
4305
4345
|
const r = (size - stroke) / 2;
|
|
4306
4346
|
const c = 2 * Math.PI * r;
|
|
4307
4347
|
const share = total > 0 ? Math.min(done, total) / total : 0;
|
|
4308
|
-
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: [
|
|
4309
4349
|
/* @__PURE__ */ jsxs41("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "shrink-0 -rotate-90", "aria-hidden": true, children: [
|
|
4310
4350
|
/* @__PURE__ */ jsx60("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, className: "stroke-border-default" }),
|
|
4311
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" })
|
|
@@ -4317,59 +4357,77 @@ function ProgressRing({ done, total }) {
|
|
|
4317
4357
|
}
|
|
4318
4358
|
function CommentCount({ conversation, noun = "comments" }) {
|
|
4319
4359
|
const { count, href, unread = false } = conversation;
|
|
4320
|
-
return
|
|
4321
|
-
/*
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
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
|
+
);
|
|
4326
4375
|
}
|
|
4327
4376
|
function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false }) {
|
|
4328
4377
|
const statusNow = chosenOf(status);
|
|
4329
4378
|
const ownerNow = chosenOf(owner);
|
|
4330
4379
|
const statusWords = status && (readOnly || !status.onChange);
|
|
4331
4380
|
const ownerWords = owner && (readOnly || !owner.onChange);
|
|
4332
|
-
return
|
|
4333
|
-
status
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
/* @__PURE__ */
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
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
|
+
);
|
|
4363
4415
|
}
|
|
4364
4416
|
|
|
4365
4417
|
// src/LinkPreview.tsx
|
|
4366
4418
|
import { useSyncExternalStore } from "react";
|
|
4367
4419
|
|
|
4420
|
+
// src/LinkCard.tsx
|
|
4421
|
+
import { useContext as useContext8 } from "react";
|
|
4422
|
+
|
|
4368
4423
|
// src/LinkRow.tsx
|
|
4369
|
-
import {
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
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 }) }),
|
|
4373
4431
|
/* @__PURE__ */ jsxs42("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: [
|
|
4374
4432
|
noun,
|
|
4375
4433
|
" \u2014 not available."
|
|
@@ -4381,86 +4439,105 @@ function LinkUnavailable({ kind, noun, openIn }) {
|
|
|
4381
4439
|
] }) })
|
|
4382
4440
|
] });
|
|
4383
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
|
+
}
|
|
4384
4445
|
function LinkRow({ link, preview = true }) {
|
|
4446
|
+
const wide = useContext7(inTheBox);
|
|
4447
|
+
const width = !wide && "max-w-[480px]";
|
|
4385
4448
|
if (link.state === "loading") {
|
|
4386
|
-
return /* @__PURE__ */ jsx61("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs42(Card, { fill: "inset", "aria-hidden": true, className:
|
|
4387
|
-
/* @__PURE__ */ jsx61(LinkedIcon, { kind: link.kind }),
|
|
4388
|
-
/* @__PURE__ */
|
|
4389
|
-
|
|
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
|
+
] })
|
|
4390
4455
|
] }) });
|
|
4391
4456
|
}
|
|
4392
4457
|
if (link.state === "unavailable") return /* @__PURE__ */ jsx61(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn });
|
|
4393
4458
|
const { linked } = link;
|
|
4394
4459
|
const status = chosenOf(linked.status);
|
|
4395
4460
|
const owner = chosenOf(linked.owner);
|
|
4396
|
-
const said = linked.kind === "message"
|
|
4397
|
-
const
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
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 })
|
|
4405
4474
|
] }),
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
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
|
+
] })
|
|
4413
4482
|
] });
|
|
4414
4483
|
return preview ? /* @__PURE__ */ jsx61(LinkPreview, { linked, block: true, children: row }) : row;
|
|
4415
4484
|
}
|
|
4416
4485
|
|
|
4417
4486
|
// src/LinkCard.tsx
|
|
4418
|
-
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";
|
|
4419
4489
|
function LinkCard({ link, readOnly = false, bare = false }) {
|
|
4490
|
+
const boxed = useContext8(inTheBox);
|
|
4420
4491
|
if (link.state === "loading") return /* @__PURE__ */ jsx62(LinkCardLoading, { kind: link.kind, shape: link.shape });
|
|
4421
|
-
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 });
|
|
4422
4493
|
const { linked } = link;
|
|
4423
|
-
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx62(SaidBody, { linked }) : /* @__PURE__ */ jsx62(CardBody, { linked, readOnly });
|
|
4424
|
-
if (bare) return /* @__PURE__ */ jsx62("div", { className:
|
|
4425
|
-
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 });
|
|
4426
4497
|
}
|
|
4427
4498
|
function CardBody({ linked, readOnly }) {
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
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
|
+
] })
|
|
4436
4514
|
] }),
|
|
4437
|
-
(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 ") }),
|
|
4438
4515
|
linked.summary && /* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.summary }),
|
|
4439
|
-
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: [
|
|
4440
4518
|
/* @__PURE__ */ jsx62(StatusMark, { status: child.status }),
|
|
4441
4519
|
child.key && /* @__PURE__ */ jsx62(LinkKey, { children: child.key }),
|
|
4442
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 }) }),
|
|
4443
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 })
|
|
4444
4522
|
] }, child.id)) }),
|
|
4445
|
-
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: [
|
|
4446
4525
|
/* @__PURE__ */ jsx62("span", { className: "text-caption text-text-muted", children: "Latest conversation" }),
|
|
4447
|
-
/* @__PURE__ */ jsxs43("div", { className: "flex
|
|
4448
|
-
/* @__PURE__ */
|
|
4449
|
-
|
|
4450
|
-
/* @__PURE__ */
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
/* @__PURE__ */ jsx62("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.latest.body })
|
|
4455
|
-
] })
|
|
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 })
|
|
4456
4533
|
] })
|
|
4457
4534
|
] }),
|
|
4458
|
-
/* @__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: [
|
|
4459
4536
|
(linked.status || linked.owner) && /* @__PURE__ */ jsx62(LinkPickers, { status: linked.status, owner: linked.owner, ownerLabel: linked.ownerLabel, readOnly }),
|
|
4460
4537
|
linked.authors ? /* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 items-center gap-2 text-caption text-text-secondary", children: [
|
|
4461
|
-
/* @__PURE__ */ jsx62(AvatarGroup, { members: linked.authors, size: 16 }),
|
|
4538
|
+
/* @__PURE__ */ jsx62(AvatarGroup, { members: linked.authors, size: 16, on }),
|
|
4462
4539
|
linked.updated && /* @__PURE__ */ jsx62("span", { className: "shrink-0", children: linked.updated })
|
|
4463
|
-
] }) : !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: [
|
|
4464
4541
|
"Updated ",
|
|
4465
4542
|
linked.updated
|
|
4466
4543
|
] }),
|
|
@@ -4470,46 +4547,49 @@ function CardBody({ linked, readOnly }) {
|
|
|
4470
4547
|
}
|
|
4471
4548
|
function SaidBody({ linked }) {
|
|
4472
4549
|
const author = linked.author;
|
|
4473
|
-
return /* @__PURE__ */ jsxs43(
|
|
4550
|
+
return /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4474
4551
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
4475
4552
|
/* @__PURE__ */ jsx62(Avatar, { name: author.name, src: author.picture, size: 24 }),
|
|
4476
4553
|
/* @__PURE__ */ jsx62("span", { className: "text-body-2-strong text-text-primary", children: author.name }),
|
|
4477
|
-
/* @__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" }) })
|
|
4478
4555
|
] }),
|
|
4479
|
-
/* @__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 })
|
|
4480
4557
|
] });
|
|
4481
4558
|
}
|
|
4482
4559
|
var KIND_SHAPE = {
|
|
4483
4560
|
issue: { subtitle: true, summary: true, footer: "pickers" },
|
|
4484
|
-
project: { subtitle:
|
|
4485
|
-
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" },
|
|
4486
4563
|
page: { subtitle: true, summary: true, footer: "people" },
|
|
4487
4564
|
file: { summary: false, footer: "line" },
|
|
4488
4565
|
message: { summary: true, footer: "none" }
|
|
4489
4566
|
};
|
|
4490
4567
|
function LinkCardLoading({ kind, shape }) {
|
|
4491
4568
|
const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
/* @__PURE__ */ jsx62(
|
|
4496
|
-
|
|
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" })
|
|
4497
4578
|
] }),
|
|
4498
|
-
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" }) }),
|
|
4499
4579
|
summary && /* @__PURE__ */ jsx62("div", { className: "flex h-[19.6px] items-center", children: /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-4/5" }) }),
|
|
4500
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)) }),
|
|
4501
|
-
latest && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-
|
|
4581
|
+
latest && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-3", children: [
|
|
4502
4582
|
/* @__PURE__ */ jsx62("div", { className: "flex h-[14.4px] items-center", children: /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-28" }) }),
|
|
4503
|
-
/* @__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: [
|
|
4504
4584
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-24" }),
|
|
4505
4585
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-full" }),
|
|
4506
4586
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-3/5" })
|
|
4507
4587
|
] })
|
|
4508
4588
|
] }),
|
|
4509
|
-
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: [
|
|
4510
4590
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-24" }),
|
|
4511
4591
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-28" })
|
|
4512
|
-
] }) : footer === "people" ? /* @__PURE__ */ jsxs43(
|
|
4592
|
+
] }) : footer === "people" ? /* @__PURE__ */ jsxs43(Fragment15, { children: [
|
|
4513
4593
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", shape: "round", className: "size-4" }),
|
|
4514
4594
|
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-40" })
|
|
4515
4595
|
] }) : /* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-40" }) })
|
|
@@ -4517,7 +4597,7 @@ function LinkCardLoading({ kind, shape }) {
|
|
|
4517
4597
|
}
|
|
4518
4598
|
|
|
4519
4599
|
// src/LinkPreview.tsx
|
|
4520
|
-
import { Fragment as
|
|
4600
|
+
import { Fragment as Fragment16, jsx as jsx63 } from "react/jsx-runtime";
|
|
4521
4601
|
var HOVER = "(hover: hover)";
|
|
4522
4602
|
function subscribe(onChange) {
|
|
4523
4603
|
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
@@ -4535,8 +4615,8 @@ function useCanHover() {
|
|
|
4535
4615
|
}
|
|
4536
4616
|
function LinkPreview({ linked, block = false, children }) {
|
|
4537
4617
|
const canHover = useCanHover();
|
|
4538
|
-
if (!canHover) return /* @__PURE__ */ jsx63(
|
|
4539
|
-
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 });
|
|
4540
4620
|
}
|
|
4541
4621
|
function LinkPreviewOpen({ linked }) {
|
|
4542
4622
|
return /* @__PURE__ */ jsx63(MenuPanel, { className: "w-[360px] p-0", children: /* @__PURE__ */ jsx63(LinkCard, { link: { state: "ready", linked }, bare: true, readOnly: true }) });
|
|
@@ -4560,11 +4640,12 @@ function LinkChip({ link, preview = true }) {
|
|
|
4560
4640
|
const chip = /* @__PURE__ */ jsxs44(
|
|
4561
4641
|
InlineChip,
|
|
4562
4642
|
{
|
|
4563
|
-
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" }),
|
|
4564
4644
|
href: linked.href,
|
|
4565
|
-
className: "max-w-[
|
|
4645
|
+
className: preview ? "min-w-0 max-w-[40ch]" : "max-w-[min(40ch,calc(100%_-_4px))]",
|
|
4566
4646
|
children: [
|
|
4567
|
-
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 }) }),
|
|
4568
4649
|
/* @__PURE__ */ jsx64("span", { className: "truncate", children: said ? `${said.name}: ${linked.body ?? linked.title}` : linked.title }),
|
|
4569
4650
|
status?.colour && /* @__PURE__ */ jsx64(StatusMark, { status: { label: status.label, colour: status.colour } })
|
|
4570
4651
|
]
|
|
@@ -4573,40 +4654,48 @@ function LinkChip({ link, preview = true }) {
|
|
|
4573
4654
|
return preview ? /* @__PURE__ */ jsx64(LinkPreview, { linked, children: chip }) : chip;
|
|
4574
4655
|
}
|
|
4575
4656
|
|
|
4576
|
-
// src/
|
|
4577
|
-
import {
|
|
4657
|
+
// src/AttachedCard.tsx
|
|
4658
|
+
import { useContext as useContext9 } from "react";
|
|
4578
4659
|
import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4579
|
-
function
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
/* @__PURE__ */
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
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
|
+
);
|
|
4594
4676
|
}
|
|
4595
4677
|
|
|
4596
4678
|
// src/PartCard.tsx
|
|
4597
|
-
import {
|
|
4598
|
-
|
|
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);
|
|
4599
4684
|
if (state === "loading") return /* @__PURE__ */ jsx66(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
4600
|
-
if (state === "unavailable") return /* @__PURE__ */ jsx66(LinkUnavailable, { kind, noun: `A part of this ${
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
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
|
+
);
|
|
4610
4699
|
}
|
|
4611
4700
|
|
|
4612
4701
|
// src/Rail.tsx
|
|
@@ -4737,7 +4826,7 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
4737
4826
|
align: "left",
|
|
4738
4827
|
ariaLabel: "Add a reaction",
|
|
4739
4828
|
contentClassName: "p-1",
|
|
4740
|
-
className,
|
|
4829
|
+
className: cn("w-auto min-w-0", className),
|
|
4741
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 }) }),
|
|
4742
4831
|
children: /* @__PURE__ */ jsx71(
|
|
4743
4832
|
ReactionPicker,
|
|
@@ -4869,7 +4958,7 @@ function ListColumn(props) {
|
|
|
4869
4958
|
|
|
4870
4959
|
// src/Tabs.tsx
|
|
4871
4960
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
4872
|
-
import { Fragment as
|
|
4961
|
+
import { Fragment as Fragment17, jsx as jsx75, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
4873
4962
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
4874
4963
|
return /* @__PURE__ */ jsx75(
|
|
4875
4964
|
BaseTabs.Root,
|
|
@@ -4903,7 +4992,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
4903
4992
|
tab.label,
|
|
4904
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
|
|
4905
4994
|
] }),
|
|
4906
|
-
tab.unread ? /* @__PURE__ */ jsxs54(
|
|
4995
|
+
tab.unread ? /* @__PURE__ */ jsxs54(Fragment17, { children: [
|
|
4907
4996
|
/* @__PURE__ */ jsx75(UnreadDot, { className: "h-auto w-auto" }),
|
|
4908
4997
|
/* @__PURE__ */ jsx75("span", { className: "sr-only", children: "new" })
|
|
4909
4998
|
] }) : null
|
|
@@ -4918,7 +5007,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
4918
5007
|
}
|
|
4919
5008
|
|
|
4920
5009
|
// src/Toast.tsx
|
|
4921
|
-
import { createContext as
|
|
5010
|
+
import { createContext as createContext8, useContext as useContext11, useMemo as useMemo6 } from "react";
|
|
4922
5011
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
4923
5012
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck2, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
4924
5013
|
import { jsx as jsx76, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
@@ -4969,7 +5058,7 @@ function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAct
|
|
|
4969
5058
|
hasAction && /* @__PURE__ */ jsx76(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
4970
5059
|
] });
|
|
4971
5060
|
}
|
|
4972
|
-
var ToastContext =
|
|
5061
|
+
var ToastContext = createContext8(null);
|
|
4973
5062
|
var VISIBLE_TOASTS = 3;
|
|
4974
5063
|
function ToastProvider({ children }) {
|
|
4975
5064
|
const manager = useMemo6(() => BaseToast.createToastManager(), []);
|
|
@@ -5025,7 +5114,7 @@ function ToastList() {
|
|
|
5025
5114
|
});
|
|
5026
5115
|
}
|
|
5027
5116
|
function useToast() {
|
|
5028
|
-
const ctx =
|
|
5117
|
+
const ctx = useContext11(ToastContext);
|
|
5029
5118
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
5030
5119
|
return ctx;
|
|
5031
5120
|
}
|
|
@@ -5033,6 +5122,7 @@ export {
|
|
|
5033
5122
|
AddReactionButton,
|
|
5034
5123
|
AppProvider,
|
|
5035
5124
|
AppShell,
|
|
5125
|
+
AttachedCard,
|
|
5036
5126
|
AttachmentCard,
|
|
5037
5127
|
Avatar,
|
|
5038
5128
|
AvatarGroup,
|
|
@@ -5041,7 +5131,6 @@ export {
|
|
|
5041
5131
|
Breadcrumb,
|
|
5042
5132
|
Button,
|
|
5043
5133
|
Card,
|
|
5044
|
-
CardUnder,
|
|
5045
5134
|
Checkbox,
|
|
5046
5135
|
Chip,
|
|
5047
5136
|
ChipInput,
|
|
@@ -5149,6 +5238,7 @@ export {
|
|
|
5149
5238
|
chosenOf,
|
|
5150
5239
|
cn,
|
|
5151
5240
|
hueFor,
|
|
5241
|
+
inTheBox,
|
|
5152
5242
|
initialsFor,
|
|
5153
5243
|
inlineChipClassName,
|
|
5154
5244
|
isApplePlatform,
|