@crewlethq/ui 0.62.0 → 0.64.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/AgentHandoffPanel/index.js +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/ArtifactBar/index.js +5 -5
- package/dist/ArtifactCard/index.js +3 -3
- package/dist/AttachmentChip/AttachmentChip.d.ts +37 -0
- package/dist/AttachmentChip/index.d.ts +3 -0
- package/dist/AttachmentChip/index.js +6 -0
- package/dist/AttachmentChip-XF4KPQ3G.css +16 -0
- package/dist/AvatarPicker/index.js +6 -6
- package/dist/Canvas/index.js +1 -1
- package/dist/CanvasBoard/index.js +1 -1
- package/dist/CanvasToolbar/index.js +1 -1
- package/dist/ChangeList/ChangeList.d.ts +26 -4
- package/dist/ChangeList/index.d.ts +1 -1
- package/dist/ChangeList/index.js +1 -1
- package/dist/{ChangeList-CB2DLR5S.css → ChangeList-KQVD46IC.css} +41 -0
- package/dist/CommandPalette/index.js +1 -1
- package/dist/CommentThread/index.js +1 -1
- package/dist/ContrastBadge/index.js +2 -2
- package/dist/ContrastHelp/index.js +3 -3
- package/dist/DataTable/index.js +1 -1
- package/dist/DataView/index.js +1 -1
- package/dist/DateTimePicker/index.js +1 -1
- package/dist/DeepWorkCard/DeepWorkCard.d.ts +85 -0
- package/dist/DeepWorkCard/index.d.ts +3 -0
- package/dist/DeepWorkCard/index.js +17 -0
- package/dist/DeepWorkCard-DGHRIQDM.css +80 -0
- package/dist/DocTabsEditor/index.js +1 -1
- package/dist/DownloadButton/DownloadButton.d.ts +7 -1
- package/dist/DownloadButton/index.js +1 -1
- package/dist/FileList/FileList.d.ts +42 -0
- package/dist/FileList/index.d.ts +3 -0
- package/dist/FileList/index.js +3 -0
- package/dist/FileList-TGDNV2QS.css +89 -0
- package/dist/FollowBanner/index.js +1 -1
- package/dist/HuePicker/index.js +5 -5
- package/dist/InlineEditor/index.js +1 -1
- package/dist/LinkInterstitial/index.js +1 -1
- package/dist/ListInput/index.js +1 -1
- package/dist/LogoSlot/index.js +3 -3
- package/dist/MarkdownEditor/index.js +5 -5
- package/dist/Menu/index.js +1 -1
- package/dist/MergeConflicts/index.js +5 -5
- package/dist/Modal/index.js +1 -1
- package/dist/OpenInAppCard/index.js +2 -2
- package/dist/PeekRail/index.js +1 -1
- package/dist/PresenterView/index.js +1 -1
- package/dist/ProposalCard/index.js +2 -2
- package/dist/ResultTableCard/index.js +3 -3
- package/dist/RichEditor/index.js +1 -1
- package/dist/SegmentedControl/index.js +4 -4
- package/dist/SelectionBar/index.js +1 -1
- package/dist/SetupWizard/index.js +2 -2
- package/dist/ShareDialog/index.js +1 -1
- package/dist/SheetColumnEditor/index.js +6 -6
- package/dist/SheetGrid/index.js +3 -3
- package/dist/SlideCompare/index.js +1 -1
- package/dist/SlideFilmstrip/index.js +1 -1
- package/dist/Switcher/index.js +1 -1
- package/dist/Tabs/index.js +3 -3
- package/dist/ThemeGallery/index.js +1 -1
- package/dist/ThemeSwitcher/index.js +5 -5
- package/dist/TimeRangePicker/index.js +5 -5
- package/dist/TimeWindowPicker/index.js +1 -1
- package/dist/TreeCanvas/index.js +1 -1
- package/dist/VersionCompare/index.js +5 -5
- package/dist/{chunk-53NTMTRM.js → chunk-6IGIYOTV.js} +1 -1
- package/dist/chunk-CZXF6EFK.js +52 -0
- package/dist/{chunk-5ZGJ22CO.js → chunk-DHIO6Q75.js} +1 -1
- package/dist/{chunk-3BQWARG2.js → chunk-F7VBYCW2.js} +1 -1
- package/dist/{chunk-5G76O23M.js → chunk-IJIC4COR.js} +1 -1
- package/dist/{chunk-NL72YZWF.js → chunk-ISHLFPNN.js} +1 -1
- package/dist/{chunk-5KW63GZ3.js → chunk-JAOJLEYB.js} +1 -1
- package/dist/{chunk-MOW65OIJ.js → chunk-JPVORBWC.js} +1 -1
- package/dist/chunk-KYTOEWJD.js +56 -0
- package/dist/chunk-LA4PX7Z6.js +118 -0
- package/dist/{chunk-PFXUEEHT.js → chunk-LAXXWJ2Z.js} +1 -1
- package/dist/{chunk-ZH5F2PXC.js → chunk-NOSHT6FL.js} +42 -4
- package/dist/{chunk-LG6TUGET.js → chunk-NSCYGUDG.js} +2 -0
- package/dist/{chunk-OM6CPZB7.js → chunk-OIMWGV2N.js} +1 -1
- package/dist/{chunk-5PMFRAGL.js → chunk-OU4FLGOZ.js} +1 -1
- package/dist/{chunk-5MN2HISF.js → chunk-PHQPQZUX.js} +1 -1
- package/dist/{chunk-NRMXUNLR.js → chunk-QCVAVAF6.js} +1 -1
- package/dist/{chunk-LND6XSXN.js → chunk-S2VMOITT.js} +1 -1
- package/dist/{chunk-VRPDQSXZ.js → chunk-SELUJSTZ.js} +2 -2
- package/dist/{chunk-3633T7EJ.js → chunk-WSV3MBOE.js} +1 -1
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.js +84 -81
- package/dist/index.js +84 -81
- package/dist/styles.css +236 -1
- package/package.json +3 -3
- package/dist/{Editor-DM7X24B7.js → Editor-GHHWWXXL.js} +1 -1
- package/dist/{chunk-VN3DCUED.js → chunk-27JCHL64.js} +1 -1
- package/dist/{chunk-T4THNJ6E.js → chunk-5DCY2QUY.js} +1 -1
- package/dist/{chunk-WDRYUMN6.js → chunk-BSAQE7PO.js} +1 -1
- package/dist/{chunk-I43D5K6A.js → chunk-CT6I36FH.js} +1 -1
- package/dist/{chunk-MHFTG2LO.js → chunk-EBCH3MRX.js} +1 -1
- package/dist/{chunk-UOTNQV6D.js → chunk-TXQNWGUD.js} +0 -0
- package/dist/{chunk-WXSGCYZO.js → chunk-VVVB3OBW.js} +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './FileList-TGDNV2QS.css';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { FileTextGlyph, ImageGlyph } from '@crewlethq/icons/glyphs';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function FileRow({ file }) {
|
|
9
|
+
const [broken, setBroken] = useState(false);
|
|
10
|
+
const preview = file.preview !== void 0 && file.preview !== "" && !broken ? file.preview : void 0;
|
|
11
|
+
return /* @__PURE__ */ jsxs("li", { className: "crewlet-file-list__file", children: [
|
|
12
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-file-list__row", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-file-list__mark", "aria-hidden": "true", children: file.preview === void 0 ? /* @__PURE__ */ jsx(FileTextGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(ImageGlyph, { size: "sm" }) }),
|
|
14
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-file-list__text", children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-file-list__name", title: file.name, children: file.name }),
|
|
16
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-file-list__meta", children: [
|
|
17
|
+
file.type,
|
|
18
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: "," }),
|
|
19
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
20
|
+
file.size
|
|
21
|
+
] })
|
|
22
|
+
] }),
|
|
23
|
+
file.action === void 0 || file.action === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-file-list__action", children: file.action })
|
|
24
|
+
] }),
|
|
25
|
+
preview === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "crewlet-file-list__preview", children: /* @__PURE__ */ jsx(
|
|
26
|
+
"img",
|
|
27
|
+
{
|
|
28
|
+
src: preview,
|
|
29
|
+
alt: "",
|
|
30
|
+
loading: "lazy",
|
|
31
|
+
decoding: "async",
|
|
32
|
+
referrerPolicy: "no-referrer",
|
|
33
|
+
draggable: false,
|
|
34
|
+
onError: () => setBroken(true)
|
|
35
|
+
}
|
|
36
|
+
) })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function FileList({ files, label, className, ...rest }) {
|
|
40
|
+
const seen = /* @__PURE__ */ new Set();
|
|
41
|
+
for (const file of files) {
|
|
42
|
+
if (seen.has(file.id)) throw new RangeError(`FileList file ids must be unique; "${file.id}" is used twice`);
|
|
43
|
+
seen.add(file.id);
|
|
44
|
+
}
|
|
45
|
+
return (
|
|
46
|
+
/* The role is restated for WebKit, which drops it from a list with no markers. */
|
|
47
|
+
/* eslint-disable-next-line jsx-a11y/no-redundant-roles */
|
|
48
|
+
/* @__PURE__ */ jsx("ul", { ...rest, role: "list", "aria-label": label, className: cx("crewlet-file-list", className), children: files.map((file) => /* @__PURE__ */ jsx(FileRow, { file }, file.id)) })
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { FileList };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { diffLines, diffStat, collapseDiff, DiffSummary, DiffView } from './chunk-AOFVXE6V.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-F7VBYCW2.js';
|
|
3
3
|
import { EmptyState } from './chunk-PPUR46MK.js';
|
|
4
4
|
import { useHeadingLevel, headingTag, nextHeadingLevel, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tooltip } from './chunk-I33UIUZD.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-F7VBYCW2.js';
|
|
3
3
|
import { ArtifactIcon } from './chunk-AVL52EME.js';
|
|
4
4
|
import { isApplePlatform, Kbd } from './chunk-ACRRRPWT.js';
|
|
5
5
|
import { Menu } from './chunk-LODRX4FU.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileDrop, FilePickButton } from './chunk-2JHGPXYG.js';
|
|
2
|
-
import { contrastRatio } from './chunk-
|
|
2
|
+
import { contrastRatio } from './chunk-BSAQE7PO.js';
|
|
3
3
|
import { normalizeHex } from './chunk-7W3LYIOC.js';
|
|
4
4
|
import { Button } from './chunk-7QTPJDRF.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Tag } from './chunk-KYIAFNU7.js';
|
|
2
|
+
import { Spinner } from './chunk-XSPCITPN.js';
|
|
3
|
+
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './AttachmentChip-XF4KPQ3G.css';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { CircleAlertGlyph, ImageGlyph } from '@crewlethq/icons/glyphs';
|
|
8
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var ATTACHMENT_CHIP_LABELS = {
|
|
11
|
+
uploading: "Uploading",
|
|
12
|
+
failed: "Not attached",
|
|
13
|
+
remove: (name) => `Remove ${name}`
|
|
14
|
+
};
|
|
15
|
+
function AttachmentChip({
|
|
16
|
+
name,
|
|
17
|
+
preview,
|
|
18
|
+
state = "ready",
|
|
19
|
+
onRemove,
|
|
20
|
+
labels: overrides,
|
|
21
|
+
className,
|
|
22
|
+
...rest
|
|
23
|
+
}) {
|
|
24
|
+
const labels = overrides ? { ...ATTACHMENT_CHIP_LABELS, ...overrides } : ATTACHMENT_CHIP_LABELS;
|
|
25
|
+
const [broken, setBroken] = useState(false);
|
|
26
|
+
const picture = preview !== void 0 && preview !== "" && !broken;
|
|
27
|
+
const mark = state === "uploading" ? /* @__PURE__ */ jsx(Spinner, { size: "xs" }) : state === "failed" ? /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "xs" }) : picture ? /* @__PURE__ */ jsx(
|
|
28
|
+
"img",
|
|
29
|
+
{
|
|
30
|
+
className: "crewlet-attachment-chip__thumb",
|
|
31
|
+
src: preview,
|
|
32
|
+
alt: "",
|
|
33
|
+
decoding: "async",
|
|
34
|
+
referrerPolicy: "no-referrer",
|
|
35
|
+
draggable: false,
|
|
36
|
+
onError: () => setBroken(true)
|
|
37
|
+
}
|
|
38
|
+
) : /* @__PURE__ */ jsx(ImageGlyph, { size: "xs" });
|
|
39
|
+
const said = state === "ready" ? "" : `, ${labels[state]}`;
|
|
40
|
+
const common = {
|
|
41
|
+
...rest,
|
|
42
|
+
className: cx("crewlet-attachment-chip", `crewlet-attachment-chip--${state}`, className),
|
|
43
|
+
size: "sm",
|
|
44
|
+
appearance: "outline",
|
|
45
|
+
variant: state === "failed" ? "danger" : "neutral",
|
|
46
|
+
leadingIcon: mark,
|
|
47
|
+
title: name
|
|
48
|
+
};
|
|
49
|
+
const words = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
50
|
+
name,
|
|
51
|
+
said === "" ? null : /* @__PURE__ */ jsx(VisuallyHidden, { children: said })
|
|
52
|
+
] });
|
|
53
|
+
return onRemove === void 0 ? /* @__PURE__ */ jsx(Tag, { ...common, children: words }) : /* @__PURE__ */ jsx(Tag, { ...common, onRemove, removeAriaLabel: labels.remove(name), children: words });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { ATTACHMENT_CHIP_LABELS, AttachmentChip };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { StepList } from './chunk-Z4EKUMZW.js';
|
|
2
|
+
import { Meter } from './chunk-RQFRRPV6.js';
|
|
3
|
+
import { ReceiptStrip } from './chunk-NLI7OVO2.js';
|
|
4
|
+
import { StatusCard } from './chunk-WW4E5EUS.js';
|
|
5
|
+
import { Disclosure } from './chunk-P4YORMRZ.js';
|
|
6
|
+
import { Spinner } from './chunk-XSPCITPN.js';
|
|
7
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
8
|
+
import './DeepWorkCard-DGHRIQDM.css';
|
|
9
|
+
import { useId } from 'react';
|
|
10
|
+
import { TelescopeGlyph, CircleAlertGlyph, CircleStopGlyph, CircleCheckGlyph, ClockGlyph } from '@crewlethq/icons/glyphs';
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
|
|
13
|
+
var DEEP_WORK_STATES = [
|
|
14
|
+
"starting",
|
|
15
|
+
"running",
|
|
16
|
+
"waiting",
|
|
17
|
+
"finished",
|
|
18
|
+
"stopped",
|
|
19
|
+
"failed"
|
|
20
|
+
];
|
|
21
|
+
var DEEP_WORK_STATE_LABELS = {
|
|
22
|
+
starting: "Starting",
|
|
23
|
+
running: "Working",
|
|
24
|
+
waiting: "Waiting for your approval",
|
|
25
|
+
finished: "Finished",
|
|
26
|
+
stopped: "Stopped",
|
|
27
|
+
failed: "Failed"
|
|
28
|
+
};
|
|
29
|
+
var STATUS = {
|
|
30
|
+
starting: { tone: "info", icon: /* @__PURE__ */ jsx(Spinner, { size: "xs" }) },
|
|
31
|
+
running: { tone: "info", icon: /* @__PURE__ */ jsx(Spinner, { size: "xs" }) },
|
|
32
|
+
waiting: { tone: "warning", icon: /* @__PURE__ */ jsx(ClockGlyph, { size: "xs" }) },
|
|
33
|
+
finished: { tone: "success", icon: /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "xs" }) },
|
|
34
|
+
stopped: { tone: "neutral", icon: /* @__PURE__ */ jsx(CircleStopGlyph, { size: "xs" }) },
|
|
35
|
+
failed: { tone: "danger", icon: /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "xs" }) }
|
|
36
|
+
};
|
|
37
|
+
var NOTE_TONE = {
|
|
38
|
+
starting: "info",
|
|
39
|
+
running: "info",
|
|
40
|
+
waiting: "warning",
|
|
41
|
+
finished: "success",
|
|
42
|
+
stopped: "neutral",
|
|
43
|
+
failed: "danger"
|
|
44
|
+
};
|
|
45
|
+
var SETTLED = /* @__PURE__ */ new Set(["finished", "stopped", "failed"]);
|
|
46
|
+
var DEEP_WORK_CARD_LABELS = {
|
|
47
|
+
title: "Deep work",
|
|
48
|
+
activity: "Latest activity",
|
|
49
|
+
steps: "Steps",
|
|
50
|
+
stepCount: (count) => count === 1 ? "1 step" : `${count} steps`
|
|
51
|
+
};
|
|
52
|
+
function DeepWorkCard({
|
|
53
|
+
state,
|
|
54
|
+
goal,
|
|
55
|
+
measures = [],
|
|
56
|
+
activity = [],
|
|
57
|
+
steps = [],
|
|
58
|
+
stepsOpenAt = 3,
|
|
59
|
+
note,
|
|
60
|
+
stateLabels,
|
|
61
|
+
labels: labelOverrides,
|
|
62
|
+
className,
|
|
63
|
+
...rest
|
|
64
|
+
}) {
|
|
65
|
+
const id = useId();
|
|
66
|
+
const labels = labelOverrides ? { ...DEEP_WORK_CARD_LABELS, ...labelOverrides } : DEEP_WORK_CARD_LABELS;
|
|
67
|
+
const words = stateLabels ? { ...DEEP_WORK_STATE_LABELS, ...stateLabels } : DEEP_WORK_STATE_LABELS;
|
|
68
|
+
const hasNote = !(note === void 0 || note === null || note === false || note === "");
|
|
69
|
+
const list = steps.length > 0 ? /* @__PURE__ */ jsx(StepList, { label: labels.steps, steps }) : null;
|
|
70
|
+
return /* @__PURE__ */ jsxs(
|
|
71
|
+
StatusCard,
|
|
72
|
+
{
|
|
73
|
+
...rest,
|
|
74
|
+
className: cx("crewlet-deep-work-card", `crewlet-deep-work-card--${state}`, className),
|
|
75
|
+
title: labels.title,
|
|
76
|
+
status: { label: words[state], ...STATUS[state] },
|
|
77
|
+
settled: SETTLED.has(state),
|
|
78
|
+
strip: hasNote ? /* @__PURE__ */ jsx(ReceiptStrip, { tone: NOTE_TONE[state], children: note }) : void 0,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-deep-work-card__goal", children: [
|
|
81
|
+
/* @__PURE__ */ jsx(TelescopeGlyph, { size: "sm", className: "crewlet-deep-work-card__goal-mark" }),
|
|
82
|
+
/* @__PURE__ */ jsx("p", { className: "crewlet-deep-work-card__goal-text", children: goal })
|
|
83
|
+
] }),
|
|
84
|
+
measures.length > 0 ? /* @__PURE__ */ jsx("div", { className: "crewlet-deep-work-card__measures", children: measures.map((measure) => /* @__PURE__ */ jsx(
|
|
85
|
+
Meter,
|
|
86
|
+
{
|
|
87
|
+
size: "compact",
|
|
88
|
+
label: measure.label,
|
|
89
|
+
value: measure.value,
|
|
90
|
+
max: measure.max,
|
|
91
|
+
hint: measure.hint,
|
|
92
|
+
valueText: measure.valueText ?? measure.hint
|
|
93
|
+
},
|
|
94
|
+
measure.key
|
|
95
|
+
)) }) : null,
|
|
96
|
+
activity.length > 0 ? (
|
|
97
|
+
/* The role is restated for WebKit, which drops it from a list with no markers. */
|
|
98
|
+
/* eslint-disable-next-line jsx-a11y/no-redundant-roles */
|
|
99
|
+
/* @__PURE__ */ jsx("ol", { role: "list", "aria-label": labels.activity, className: "crewlet-deep-work-card__activity", children: activity.map((line, index) => /* @__PURE__ */ jsx("li", { className: "crewlet-deep-work-card__line", title: line, children: /* @__PURE__ */ jsx("code", { children: line }) }, `${index}:${line}`)) })
|
|
100
|
+
) : null,
|
|
101
|
+
list === null ? null : steps.length > stepsOpenAt ? /* @__PURE__ */ jsx(
|
|
102
|
+
Disclosure,
|
|
103
|
+
{
|
|
104
|
+
id: `${id}-steps`,
|
|
105
|
+
className: "crewlet-deep-work-card__steps",
|
|
106
|
+
size: "compact",
|
|
107
|
+
headingLevel: "none",
|
|
108
|
+
title: labels.stepCount(steps.length),
|
|
109
|
+
defaultOpen: false,
|
|
110
|
+
children: list
|
|
111
|
+
}
|
|
112
|
+
) : /* @__PURE__ */ jsx("div", { className: "crewlet-deep-work-card__steps", children: list })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export { DEEP_WORK_CARD_LABELS, DEEP_WORK_STATES, DEEP_WORK_STATE_LABELS, DeepWorkCard };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefusalStrip, ReceiptStrip } from './chunk-NLI7OVO2.js';
|
|
2
2
|
import { StatusCard } from './chunk-WW4E5EUS.js';
|
|
3
|
-
import { ChangeList } from './chunk-
|
|
3
|
+
import { ChangeList } from './chunk-NOSHT6FL.js';
|
|
4
4
|
import { Button } from './chunk-7QTPJDRF.js';
|
|
5
5
|
import { Spinner } from './chunk-XSPCITPN.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -3,10 +3,10 @@ import { Tag } from './chunk-KYIAFNU7.js';
|
|
|
3
3
|
import { Disclosure } from './chunk-P4YORMRZ.js';
|
|
4
4
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
-
import './ChangeList-
|
|
6
|
+
import './ChangeList-KQVD46IC.css';
|
|
7
7
|
import { useId } from 'react';
|
|
8
8
|
import { ArrowRightGlyph } from '@crewlethq/icons/glyphs';
|
|
9
|
-
import {
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
var CHANGE_LIST_LABELS = {
|
|
12
12
|
changedFrom: "Changed from",
|
|
@@ -67,7 +67,41 @@ function WordDiff({ row, labels }) {
|
|
|
67
67
|
return /* @__PURE__ */ jsx("span", { children: shortenUnchanged(part.text, place, max) }, index);
|
|
68
68
|
}) });
|
|
69
69
|
}
|
|
70
|
+
function ChangeListItems({ items }) {
|
|
71
|
+
return /* @__PURE__ */ jsx("ul", { className: "crewlet-change-list__items", children: items.map((item, index) => /* @__PURE__ */ jsx("li", { children: item }, index)) });
|
|
72
|
+
}
|
|
73
|
+
function BlockValue({ row, labels }) {
|
|
74
|
+
switch (row.kind) {
|
|
75
|
+
case "fact":
|
|
76
|
+
return /* @__PURE__ */ jsx("div", { className: "crewlet-change-list__fact crewlet-change-list__block crewlet-change-list__block--plain", children: row.value });
|
|
77
|
+
case "changed":
|
|
78
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ jsxs("del", { className: "crewlet-change-list__from crewlet-change-list__block", children: [
|
|
80
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.changedFrom} ` }),
|
|
81
|
+
row.from
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsxs("ins", { className: "crewlet-change-list__to crewlet-change-list__block", children: [
|
|
84
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.to} ` }),
|
|
85
|
+
row.to
|
|
86
|
+
] })
|
|
87
|
+
] });
|
|
88
|
+
case "added":
|
|
89
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
90
|
+
row.isNew ? /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "success", children: labels.isNew }) : null,
|
|
91
|
+
/* @__PURE__ */ jsxs("ins", { className: "crewlet-change-list__to crewlet-change-list__block", children: [
|
|
92
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.added} ` }),
|
|
93
|
+
row.to
|
|
94
|
+
] })
|
|
95
|
+
] });
|
|
96
|
+
case "removed":
|
|
97
|
+
return /* @__PURE__ */ jsxs("del", { className: "crewlet-change-list__removed crewlet-change-list__block", children: [
|
|
98
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.removed} ` }),
|
|
99
|
+
row.from
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
70
103
|
function Value({ row, labels }) {
|
|
104
|
+
if (row.block) return /* @__PURE__ */ jsx(BlockValue, { row, labels });
|
|
71
105
|
switch (row.kind) {
|
|
72
106
|
case "fact":
|
|
73
107
|
return /* @__PURE__ */ jsx("span", { className: "crewlet-change-list__fact", children: row.value });
|
|
@@ -104,7 +138,11 @@ function ChangeList({ rows, heading, settled = false, labels: overrides, diffLab
|
|
|
104
138
|
/* @__PURE__ */ jsx("dl", { className: "crewlet-change-list__rows", "aria-labelledby": heading === void 0 || heading === null ? void 0 : headingId, children: rows.map((row, index) => /* @__PURE__ */ jsxs(
|
|
105
139
|
"div",
|
|
106
140
|
{
|
|
107
|
-
className: cx(
|
|
141
|
+
className: cx(
|
|
142
|
+
"crewlet-change-list__row",
|
|
143
|
+
`crewlet-change-list__row--${row.kind}`,
|
|
144
|
+
row.kind !== "text" && row.block && "crewlet-change-list__row--block"
|
|
145
|
+
),
|
|
108
146
|
children: [
|
|
109
147
|
/* @__PURE__ */ jsx("dt", { className: "crewlet-change-list__label", children: row.label }),
|
|
110
148
|
/* @__PURE__ */ jsxs("dd", { className: "crewlet-change-list__value", children: [
|
|
@@ -121,4 +159,4 @@ function ChangeList({ rows, heading, settled = false, labels: overrides, diffLab
|
|
|
121
159
|
] });
|
|
122
160
|
}
|
|
123
161
|
|
|
124
|
-
export { CHANGE_LIST_COLLAPSE_OVER, CHANGE_LIST_LABELS, ChangeList, shortenUnchanged };
|
|
162
|
+
export { CHANGE_LIST_COLLAPSE_OVER, CHANGE_LIST_LABELS, ChangeList, ChangeListItems, shortenUnchanged };
|
|
@@ -23,6 +23,7 @@ function DownloadButton({
|
|
|
23
23
|
size = "small",
|
|
24
24
|
variant = "ghost",
|
|
25
25
|
title,
|
|
26
|
+
"aria-label": ariaLabel,
|
|
26
27
|
disabled,
|
|
27
28
|
resetMs,
|
|
28
29
|
failedResetMs = null,
|
|
@@ -61,6 +62,7 @@ function DownloadButton({
|
|
|
61
62
|
loading: fetching,
|
|
62
63
|
disabled,
|
|
63
64
|
title: state === "failed" ? failedMessage : title,
|
|
65
|
+
"aria-label": ariaLabel,
|
|
64
66
|
children: state === "started" ? startedLabel : state === "failed" ? failedLabel : label
|
|
65
67
|
}
|
|
66
68
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table } from './chunk-5DJMFRSZ.js';
|
|
2
|
+
import { DownloadButton } from './chunk-NSCYGUDG.js';
|
|
2
3
|
import { StatusCard } from './chunk-WW4E5EUS.js';
|
|
3
|
-
import { DownloadButton } from './chunk-LG6TUGET.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './ResultTableCard-AP355LQM.css';
|
|
6
6
|
import { useState } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Select } from './chunk-XQZ6EWOE.js';
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
|
-
import { HueSwatch } from './chunk-
|
|
3
|
+
import { HueSwatch } from './chunk-QCVAVAF6.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
5
|
import { Checkbox } from './chunk-KIPAFCVS.js';
|
|
6
6
|
import { Kbd } from './chunk-ACRRRPWT.js';
|
|
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
var engine = null;
|
|
10
10
|
var loading = null;
|
|
11
11
|
function loadEngine() {
|
|
12
|
-
loading ??= import('./Editor-
|
|
12
|
+
loading ??= import('./Editor-GHHWWXXL.js').then(
|
|
13
13
|
(module) => {
|
|
14
14
|
engine = module.Editor;
|
|
15
15
|
return engine;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Modal } from './chunk-KVWZDCTQ.js';
|
|
2
2
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
3
|
-
import { SegmentedControl } from './chunk-
|
|
3
|
+
import { SegmentedControl } from './chunk-F7VBYCW2.js';
|
|
4
4
|
import { FormField, Input } from './chunk-TLIJG4TP.js';
|
|
5
5
|
import { Button } from './chunk-7QTPJDRF.js';
|
|
6
6
|
import { useState } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Toolbar } from './chunk-NR4CPM4T.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
3
|
-
import { tabId } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-F7VBYCW2.js';
|
|
3
|
+
import { tabId } from './chunk-27JCHL64.js';
|
|
4
4
|
import { IconButton } from './chunk-2XWFWNDT.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './MarkdownEditor-WOKV7CLK.css';
|
|
@@ -20,6 +20,7 @@ export * from '../ArtifactMakeRow/index.js';
|
|
|
20
20
|
export * from '../ArtifactNameCell/index.js';
|
|
21
21
|
export * from '../ArtifactPanel/index.js';
|
|
22
22
|
export * from '../AsideLayout/index.js';
|
|
23
|
+
export * from '../AttachmentChip/index.js';
|
|
23
24
|
export * from '../AuthLayout/index.js';
|
|
24
25
|
export * from '../Avatar/index.js';
|
|
25
26
|
export * from '../AvatarPicker/index.js';
|
|
@@ -67,6 +68,7 @@ export * from '../DataTable/index.js';
|
|
|
67
68
|
export * from '../DataView/index.js';
|
|
68
69
|
export * from '../DatasetSource/index.js';
|
|
69
70
|
export * from '../DateTimePicker/index.js';
|
|
71
|
+
export * from '../DeepWorkCard/index.js';
|
|
70
72
|
export * from '../DescriptionList/index.js';
|
|
71
73
|
export * from '../DiffList/index.js';
|
|
72
74
|
export * from '../DiffView/index.js';
|
|
@@ -85,6 +87,7 @@ export * from '../ErrorBoundary/index.js';
|
|
|
85
87
|
export * from '../Eyebrow/index.js';
|
|
86
88
|
export * from '../FactList/index.js';
|
|
87
89
|
export * from '../FileDrop/index.js';
|
|
90
|
+
export * from '../FileList/index.js';
|
|
88
91
|
export * from '../FilterChip/index.js';
|
|
89
92
|
export * from '../FindingList/index.js';
|
|
90
93
|
export * from '../FolderTile/index.js';
|