@activecollab/components 2.0.385 → 2.0.387

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.
Files changed (44) hide show
  1. package/dist/cjs/components/Icons/collection/CommandLine.js +60 -0
  2. package/dist/cjs/components/Icons/collection/CommandLine.js.map +1 -0
  3. package/dist/cjs/components/Icons/collection/Hash.js +60 -0
  4. package/dist/cjs/components/Icons/collection/Hash.js.map +1 -0
  5. package/dist/cjs/components/Icons/collection/index.js +14 -0
  6. package/dist/cjs/components/Icons/collection/index.js.map +1 -1
  7. package/dist/cjs/components/StepSequence/StepSequence.js +13 -22
  8. package/dist/cjs/components/StepSequence/StepSequence.js.map +1 -1
  9. package/dist/cjs/components/StepSequence/Styles.js +2 -1
  10. package/dist/cjs/components/StepSequence/Styles.js.map +1 -1
  11. package/dist/cjs/presentation/shared/LinkingCommandsButton.js +163 -50
  12. package/dist/cjs/presentation/shared/LinkingCommandsButton.js.map +1 -1
  13. package/dist/cjs/presentation/shared/SourceCodeSection.js +32 -3
  14. package/dist/cjs/presentation/shared/SourceCodeSection.js.map +1 -1
  15. package/dist/esm/components/Icons/collection/CommandLine.d.ts +32 -0
  16. package/dist/esm/components/Icons/collection/CommandLine.d.ts.map +1 -0
  17. package/dist/esm/components/Icons/collection/CommandLine.js +53 -0
  18. package/dist/esm/components/Icons/collection/CommandLine.js.map +1 -0
  19. package/dist/esm/components/Icons/collection/Hash.d.ts +32 -0
  20. package/dist/esm/components/Icons/collection/Hash.d.ts.map +1 -0
  21. package/dist/esm/components/Icons/collection/Hash.js +53 -0
  22. package/dist/esm/components/Icons/collection/Hash.js.map +1 -0
  23. package/dist/esm/components/Icons/collection/index.d.ts +2 -0
  24. package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
  25. package/dist/esm/components/Icons/collection/index.js +2 -0
  26. package/dist/esm/components/Icons/collection/index.js.map +1 -1
  27. package/dist/esm/components/StepSequence/StepSequence.d.ts +15 -4
  28. package/dist/esm/components/StepSequence/StepSequence.d.ts.map +1 -1
  29. package/dist/esm/components/StepSequence/StepSequence.js +14 -20
  30. package/dist/esm/components/StepSequence/StepSequence.js.map +1 -1
  31. package/dist/esm/components/StepSequence/Styles.d.ts.map +1 -1
  32. package/dist/esm/components/StepSequence/Styles.js +3 -2
  33. package/dist/esm/components/StepSequence/Styles.js.map +1 -1
  34. package/dist/esm/presentation/shared/LinkingCommandsButton.d.ts.map +1 -1
  35. package/dist/esm/presentation/shared/LinkingCommandsButton.js +150 -49
  36. package/dist/esm/presentation/shared/LinkingCommandsButton.js.map +1 -1
  37. package/dist/esm/presentation/shared/SourceCodeSection.d.ts.map +1 -1
  38. package/dist/esm/presentation/shared/SourceCodeSection.js +31 -2
  39. package/dist/esm/presentation/shared/SourceCodeSection.js.map +1 -1
  40. package/dist/index.js +373 -280
  41. package/dist/index.js.map +1 -1
  42. package/dist/index.min.js +1 -1
  43. package/dist/index.min.js.map +1 -1
  44. package/package.json +1 -1
@@ -1,20 +1,35 @@
1
- import React, { useState } from "react";
1
+ import React, { useEffect, useState } from "react";
2
2
  import styled from "styled-components";
3
+ import { ChooseV2 } from "../../components/ChooseV2";
3
4
  import { Dialog } from "../../components/Dialog";
4
5
  import { IconButton } from "../../components/IconButton";
5
- import { CancelCrossIcon } from "../../components/Icons";
6
+ import { CancelCrossIcon, CommandLineIcon, CopyIcon, HashIcon } from "../../components/Icons";
7
+ import { SkeletonLoader } from "../../components/Loaders";
8
+ import { Tooltip } from "../../components/Tooltip";
6
9
  import { Trigger } from "../../components/Trigger";
7
- import { Body1, Body2, Caption1, Header3 } from "../../components/Typography";
10
+ import { Body2, Header3 } from "../../components/Typography";
8
11
 
9
12
  /**
10
13
  * "Linking and Commands" button — same small outlined shape and placement as
11
14
  * the "Suggest Subtasks" button, but without an icon or the AI gradient (this
12
- * is not an AI feature). Clicking it opens a reference dialog explaining how
13
- * to auto-link git activity to a task and the commands available in commit
14
- * messages / descriptions.
15
+ * is not an AI feature). Clicking it opens a reference dialog: a short pitch
16
+ * with a one-liner each for Linking and Commands, a centered ChooseV2 to switch
17
+ * between the two conventions (Linking default), and the full instructions for
18
+ * whichever is selected below it.
15
19
  */
16
20
  const SANS = '-apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif';
17
21
  const MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
22
+
23
+ /** The example task these instructions are written against. */
24
+ const TASK_ID = 4231;
25
+ /**
26
+ * Suggested branch name for this task — in production it is resolved per repo
27
+ * via GET .../tasks/{task_id}/source/suggest-branch-name. Mocked here.
28
+ */
29
+ const SUGGESTED_BRANCH = "ilija/4231-add-cacak-region-support";
30
+
31
+ /** POSIX-safe single-quote escaping for a value dropped into a shell command. */
32
+ const shellQuote = value => "'" + value.replace(/'/g, "'\\''") + "'";
18
33
  const StyledButton = styled(Trigger).withConfig({
19
34
  displayName: "LinkingCommandsButton__StyledButton",
20
35
  componentId: "sc-11q4kcm-0"
@@ -26,21 +41,28 @@ const StyledTitleRow = styled.div.withConfig({
26
41
  const StyledBody = styled.div.withConfig({
27
42
  displayName: "LinkingCommandsButton__StyledBody",
28
43
  componentId: "sc-11q4kcm-2"
29
- })(["font-family:", ";.lc-section{margin-bottom:22px;}.lc-section:last-child{margin-bottom:0;}.lc-h{margin-bottom:6px;}.lc-list{margin:8px 0 0;padding-left:18px;}.lc-list li{margin-bottom:6px;}.code{font-family:", ";background:var(--color-theme-200);border-radius:4px;padding:1px 5px;font-size:12px;color:var(--color-theme-900);}table{width:100%;border-collapse:collapse;margin-top:10px;}th,td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--border-primary);vertical-align:top;}th{font-size:12px;font-weight:500;color:var(--color-theme-600);}.lc-note{margin-top:10px;}"], SANS, MONO);
44
+ })(["font-family:", ";.lc-intro{margin-bottom:18px;}.lc-lead{display:flex;gap:10px;align-items:flex-start;margin-top:12px;}.lc-lead svg{flex-shrink:0;width:18px;height:18px;margin-top:2px;}.lc-term{font-weight:600;color:var(--color-theme-900);}.lc-choosectl{margin-bottom:18px;}.lc-choosectl > div{justify-content:center;}.lc-list{margin:8px 0 0;padding-left:18px;}.lc-list li{margin-bottom:6px;}.lc-invite{margin-top:14px;}.code{font-family:", ";background:var(--color-theme-200);border-radius:4px;padding:1px 5px;font-size:12px;color:var(--color-theme-900);}.lc-copy{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding:8px 10px;background:var(--color-theme-200);border:1px solid var(--border-primary);border-radius:6px;}.lc-copy code{font-family:", ";font-size:12px;color:var(--color-theme-900);overflow-x:auto;white-space:nowrap;}.lc-copy-btn{flex-shrink:0;display:inline-flex;align-items:center;border:none;background:transparent;cursor:pointer;padding:2px;color:var(--color-theme-600);transition:color 0.15s ease;}.lc-copy-btn:hover{color:var(--color-theme-900);}.lc-copy-btn svg{width:16px;height:16px;}.lc-copy-skel{height:37px;width:100%;margin-top:10px;border-radius:6px;}.lc-example{font-family:", ";font-size:12px;line-height:1.5;color:var(--color-theme-900);background:var(--color-theme-200);border:1px solid var(--border-primary);border-radius:6px;padding:10px 12px;margin-top:12px;white-space:pre-wrap;overflow-x:auto;}table{width:100%;border-collapse:collapse;margin-top:12px;}th,td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--border-primary);vertical-align:top;}th{font-size:12px;font-weight:500;color:var(--color-theme-600);}"], SANS, MONO, MONO, MONO);
45
+ const TAB_OPTIONS = [{
46
+ id: "linking",
47
+ name: "Linking"
48
+ }, {
49
+ id: "commands",
50
+ name: "Commands"
51
+ }];
30
52
  const COMMANDS = [{
31
53
  cmd: "Closes #34",
32
54
  does: "Closes the task when the pull request merges"
33
55
  }, {
34
56
  cmd: "Fixes #34",
35
- does: "Same as Closes closes on merge"
57
+ does: "Same as Closes: closes on merge"
36
58
  }, {
37
59
  cmd: "Refs #34",
38
60
  does: "Links to the task without closing it"
39
61
  }, {
40
- cmd: "/spend 1h30m",
62
+ cmd: "/spend 1:30",
41
63
  does: "Logs time against the task"
42
64
  }, {
43
- cmd: "/estimate 4h",
65
+ cmd: "/estimate 4:00",
44
66
  does: "Sets the task's time estimate"
45
67
  }, {
46
68
  cmd: "/done",
@@ -61,13 +83,107 @@ const COMMANDS = [{
61
83
  cmd: "/relate #35",
62
84
  does: "Relates this task to another task"
63
85
  }];
64
- export const LinkingCommandsButton = () => {
86
+
87
+ /** Illustrative commit message: closes the task, logs time, leaves a note. */
88
+ const EXAMPLE_COMMIT = "Fix ranks reset when a contract is archived\n\nCloses #" + TASK_ID + "\n/spend 1:30\n/comment Verified on staging, ranks hold after archive";
89
+ const LinkingTab = _ref => {
90
+ let loading = _ref.loading,
91
+ branch = _ref.branch;
65
92
  const _useState = useState(false),
66
- open = _useState[0],
67
- setOpen = _useState[1];
93
+ copied = _useState[0],
94
+ setCopied = _useState[1];
95
+ const command = branch ? "git checkout -b " + shellQuote(branch) : "";
96
+ const copy = () => {
97
+ var _navigator$clipboard;
98
+ if (!command) return;
99
+ // eslint-disable-next-line compat/compat
100
+ void ((_navigator$clipboard = navigator.clipboard) == null ? void 0 : _navigator$clipboard.writeText(command));
101
+ setCopied(true);
102
+ window.setTimeout(() => setCopied(false), 1500);
103
+ };
104
+ return /*#__PURE__*/React.createElement("div", {
105
+ className: "lc-tabbody"
106
+ }, /*#__PURE__*/React.createElement(Body2, {
107
+ color: "secondary"
108
+ }, "Mention the task in your git activity and it links to this task on its own:"), /*#__PURE__*/React.createElement("ul", {
109
+ className: "lc-list"
110
+ }, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("span", {
111
+ className: "lc-term"
112
+ }, "In a branch name:"), " the raw task ID", " ", /*#__PURE__*/React.createElement("span", {
113
+ className: "code"
114
+ }, TASK_ID))), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("span", {
115
+ className: "lc-term"
116
+ }, "In a title, commit message, or description:"), " ", /*#__PURE__*/React.createElement("span", {
117
+ className: "code"
118
+ }, "#", TASK_ID), " or", " ", /*#__PURE__*/React.createElement("span", {
119
+ className: "code"
120
+ }, "AC-", TASK_ID))), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("span", {
121
+ className: "lc-term"
122
+ }, "Anywhere:"), " the task URL", " ", /*#__PURE__*/React.createElement("span", {
123
+ className: "code"
124
+ }, "https://app.activecollab.com/1/projects/2110/tasks/", TASK_ID)))), /*#__PURE__*/React.createElement("div", {
125
+ className: "lc-invite"
126
+ }, /*#__PURE__*/React.createElement(Body2, {
127
+ color: "secondary"
128
+ }, "Give the branch a name with the task number in it and it links the moment you push. Create one from the suggested name:"), loading ? /*#__PURE__*/React.createElement(SkeletonLoader, {
129
+ className: "lc-copy-skel"
130
+ }) : /*#__PURE__*/React.createElement("div", {
131
+ className: "lc-copy"
132
+ }, /*#__PURE__*/React.createElement("code", null, command), /*#__PURE__*/React.createElement(Tooltip, {
133
+ title: copied ? "Copied!" : "Copy"
134
+ }, /*#__PURE__*/React.createElement("button", {
135
+ type: "button",
136
+ className: "lc-copy-btn",
137
+ onClick: copy,
138
+ "aria-label": "Copy command"
139
+ }, /*#__PURE__*/React.createElement(CopyIcon, null))))));
140
+ };
141
+ const CommandsTab = () => /*#__PURE__*/React.createElement("div", {
142
+ className: "lc-tabbody"
143
+ }, /*#__PURE__*/React.createElement(Body2, {
144
+ color: "secondary"
145
+ }, "The table below lists magic words and slash commands that you can use in a commit message or a pull request description to act on the linked task. Example:"), /*#__PURE__*/React.createElement("pre", {
146
+ className: "lc-example"
147
+ }, EXAMPLE_COMMIT), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "Command"), /*#__PURE__*/React.createElement("th", null, "What it does"))), /*#__PURE__*/React.createElement("tbody", null, COMMANDS.map(c => /*#__PURE__*/React.createElement("tr", {
148
+ key: c.cmd
149
+ }, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
150
+ className: "code"
151
+ }, c.cmd)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Body2, {
152
+ color: "secondary"
153
+ }, c.does)))))));
154
+ export const LinkingCommandsButton = () => {
155
+ const _useState2 = useState(false),
156
+ open = _useState2[0],
157
+ setOpen = _useState2[1];
158
+ const _useState3 = useState("linking"),
159
+ tab = _useState3[0],
160
+ setTab = _useState3[1];
161
+ const _useState4 = useState(true),
162
+ branchLoading = _useState4[0],
163
+ setBranchLoading = _useState4[1];
164
+ const _useState5 = useState(null),
165
+ suggestedBranch = _useState5[0],
166
+ setSuggestedBranch = _useState5[1];
167
+
168
+ // Mock the suggest-branch-name API load: ~1s skeleton whenever the dialog
169
+ // opens, then reveal the copyable git command.
170
+ useEffect(() => {
171
+ if (!open) return undefined;
172
+ setBranchLoading(true);
173
+ setSuggestedBranch(null);
174
+ const timer = window.setTimeout(() => {
175
+ setSuggestedBranch(SUGGESTED_BRANCH);
176
+ setBranchLoading(false);
177
+ }, 1000);
178
+ return () => window.clearTimeout(timer);
179
+ }, [open]);
180
+ const openDialog = () => {
181
+ setTab("linking");
182
+ setOpen(true);
183
+ };
68
184
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledButton, {
69
185
  type: "button",
70
- onClick: () => setOpen(true)
186
+ onClick: openDialog
71
187
  }, /*#__PURE__*/React.createElement("span", {
72
188
  className: "lc-btn"
73
189
  }, "Linking and Commands")), /*#__PURE__*/React.createElement(Dialog, {
@@ -81,43 +197,28 @@ export const LinkingCommandsButton = () => {
81
197
  variant: "text gray",
82
198
  onClick: () => setOpen(false)
83
199
  }, /*#__PURE__*/React.createElement(CancelCrossIcon, null)))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(StyledBody, null, /*#__PURE__*/React.createElement("div", {
84
- className: "lc-section"
85
- }, /*#__PURE__*/React.createElement(Body2, {
86
- color: "secondary"
87
- }, "Mention the task anywhere in a branch name, pull request title, commit message, or description and it links to this task on its own. Any of these forms work:"), /*#__PURE__*/React.createElement("ul", {
88
- className: "lc-list"
89
- }, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Body2, null, "Raw ID ", /*#__PURE__*/React.createElement("span", {
90
- className: "code"
91
- }, "34"), ", hashed", " ", /*#__PURE__*/React.createElement("span", {
92
- className: "code"
93
- }, "#34"), ", or prefixed", " ", /*#__PURE__*/React.createElement("span", {
94
- className: "code"
95
- }, "AC-34"))), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Body2, null, "The task URL", " ", /*#__PURE__*/React.createElement("span", {
96
- className: "code"
97
- }, "https://app.activecollab.com/1/projects/2110/tasks/34")))), /*#__PURE__*/React.createElement("div", {
98
- className: "lc-note"
99
- }, /*#__PURE__*/React.createElement(Caption1, {
100
- color: "tertiary"
101
- }, "Recommended: put the ID in the branch name (e.g.", " ", /*#__PURE__*/React.createElement("span", {
102
- className: "code"
103
- }, "feature/retainers-34"), ") so it links the moment you push, and add a closing word in the pull request when you want it to complete the task on merge."))), /*#__PURE__*/React.createElement("div", {
104
- className: "lc-section"
105
- }, /*#__PURE__*/React.createElement(Body1, {
106
- weight: "bold",
107
- className: "lc-h"
108
- }, "Commands"), /*#__PURE__*/React.createElement(Body2, {
200
+ className: "lc-intro"
201
+ }, /*#__PURE__*/React.createElement(Body2, null, "Keep a task in sync with your code without leaving your editor."), /*#__PURE__*/React.createElement("div", {
202
+ className: "lc-lead"
203
+ }, /*#__PURE__*/React.createElement(HashIcon, null), /*#__PURE__*/React.createElement(Body2, {
109
204
  color: "secondary"
110
- }, "Use these in a commit message or a pull request / merge request description to act on the linked task."), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "Command"), /*#__PURE__*/React.createElement("th", null, "What it does"))), /*#__PURE__*/React.createElement("tbody", null, COMMANDS.map(c => /*#__PURE__*/React.createElement("tr", {
111
- key: c.cmd
112
- }, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
113
- className: "code"
114
- }, c.cmd)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Body2, {
205
+ }, /*#__PURE__*/React.createElement("span", {
206
+ className: "lc-term"
207
+ }, "Linking:"), " Mention a task in a branch, pull request, or commit and they will be connected automatically.")), /*#__PURE__*/React.createElement("div", {
208
+ className: "lc-lead"
209
+ }, /*#__PURE__*/React.createElement(CommandLineIcon, null), /*#__PURE__*/React.createElement(Body2, {
115
210
  color: "secondary"
116
- }, c.does)))))), /*#__PURE__*/React.createElement("div", {
117
- className: "lc-note"
118
- }, /*#__PURE__*/React.createElement(Caption1, {
119
- color: "tertiary"
120
- }, "Starter set \u2014 to be refined.")))))));
211
+ }, /*#__PURE__*/React.createElement("span", {
212
+ className: "lc-term"
213
+ }, "Commands:"), " Add short instructions in a commit or pull request description to act on the task: log time, close it, or leave a comment."))), /*#__PURE__*/React.createElement(ChooseV2, {
214
+ className: "lc-choosectl",
215
+ options: TAB_OPTIONS,
216
+ selected: [tab],
217
+ onChange: ids => setTab(ids[0])
218
+ }), tab === "linking" ? /*#__PURE__*/React.createElement(LinkingTab, {
219
+ loading: branchLoading,
220
+ branch: suggestedBranch
221
+ }) : /*#__PURE__*/React.createElement(CommandsTab, null)))));
121
222
  };
122
223
  LinkingCommandsButton.displayName = "LinkingCommandsButton";
123
224
  //# sourceMappingURL=LinkingCommandsButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkingCommandsButton.js","names":["React","useState","styled","Dialog","IconButton","CancelCrossIcon","Trigger","Body1","Body2","Caption1","Header3","SANS","MONO","StyledButton","withConfig","displayName","componentId","StyledTitleRow","div","StyledBody","COMMANDS","cmd","does","LinkingCommandsButton","_useState","open","setOpen","createElement","Fragment","type","onClick","className","onClose","enableBackgroundClick","Title","disableDefaultHeading","variant","ContentDivider","Content","color","weight","map","c","key"],"sources":["../../../../src/presentation/shared/LinkingCommandsButton.tsx"],"sourcesContent":["import React, { ReactElement, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon } from \"../../components/Icons\";\nimport { Trigger } from \"../../components/Trigger\";\nimport { Body1, Body2, Caption1, Header3 } from \"../../components/Typography\";\n\n/**\n * \"Linking and Commands\" button — same small outlined shape and placement as\n * the \"Suggest Subtasks\" button, but without an icon or the AI gradient (this\n * is not an AI feature). Clicking it opens a reference dialog explaining how\n * to auto-link git activity to a task and the commands available in commit\n * messages / descriptions.\n */\nconst SANS =\n '-apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\", Arial, sans-serif';\nconst MONO = \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\";\n\nconst StyledButton = styled(Trigger)`\n .lc-btn {\n display: inline-flex;\n align-items: center;\n color: var(--color-theme-700);\n border: 1px solid var(--color-theme-500);\n background-color: transparent;\n padding: 3px 8px;\n font-weight: 500;\n font-size: 12px;\n letter-spacing: 0.5px;\n line-height: 16px;\n border-radius: 6px;\n transition: border-color 0.2s ease, color 0.2s ease;\n }\n &:hover .lc-btn {\n border-color: var(--color-theme-700);\n color: var(--color-theme-900);\n }\n`;\n\nconst StyledTitleRow = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n`;\n\nconst StyledBody = styled.div`\n font-family: ${SANS};\n\n .lc-section {\n margin-bottom: 22px;\n }\n .lc-section:last-child {\n margin-bottom: 0;\n }\n .lc-h {\n margin-bottom: 6px;\n }\n .lc-list {\n margin: 8px 0 0;\n padding-left: 18px;\n }\n .lc-list li {\n margin-bottom: 6px;\n }\n .code {\n font-family: ${MONO};\n background: var(--color-theme-200);\n border-radius: 4px;\n padding: 1px 5px;\n font-size: 12px;\n color: var(--color-theme-900);\n }\n table {\n width: 100%;\n border-collapse: collapse;\n margin-top: 10px;\n }\n th,\n td {\n text-align: left;\n padding: 8px 10px;\n border-bottom: 1px solid var(--border-primary);\n vertical-align: top;\n }\n th {\n font-size: 12px;\n font-weight: 500;\n color: var(--color-theme-600);\n }\n .lc-note {\n margin-top: 10px;\n }\n`;\n\ninterface Command {\n cmd: string;\n does: string;\n}\n\nconst COMMANDS: Command[] = [\n { cmd: \"Closes #34\", does: \"Closes the task when the pull request merges\" },\n { cmd: \"Fixes #34\", does: \"Same as Closes — closes on merge\" },\n { cmd: \"Refs #34\", does: \"Links to the task without closing it\" },\n { cmd: \"/spend 1h30m\", does: \"Logs time against the task\" },\n { cmd: \"/estimate 4h\", does: \"Sets the task's time estimate\" },\n { cmd: \"/done\", does: \"Marks the task complete\" },\n { cmd: \"/reopen\", does: \"Reopens the task\" },\n { cmd: \"/assign @ilija\", does: \"Assigns the task to a user\" },\n { cmd: \"/label In Progress\", does: \"Adds a label to the task\" },\n { cmd: \"/comment Deployed to staging\", does: \"Posts a comment on the task\" },\n { cmd: \"/relate #35\", does: \"Relates this task to another task\" },\n];\n\nexport const LinkingCommandsButton = (): ReactElement => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <StyledButton type=\"button\" onClick={() => setOpen(true)}>\n <span className=\"lc-btn\">Linking and Commands</span>\n </StyledButton>\n\n <Dialog open={open} onClose={() => setOpen(false)} enableBackgroundClick>\n <Dialog.Title disableDefaultHeading>\n <StyledTitleRow>\n <Header3>Linking and Commands</Header3>\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n onClick={() => setOpen(false)}\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledTitleRow>\n </Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledBody>\n <div className=\"lc-section\">\n <Body2 color=\"secondary\">\n Mention the task anywhere in a branch name, pull request title,\n commit message, or description and it links to this task on its\n own. Any of these forms work:\n </Body2>\n <ul className=\"lc-list\">\n <li>\n <Body2>\n Raw ID <span className=\"code\">34</span>, hashed{\" \"}\n <span className=\"code\">#34</span>, or prefixed{\" \"}\n <span className=\"code\">AC-34</span>\n </Body2>\n </li>\n <li>\n <Body2>\n The task URL{\" \"}\n <span className=\"code\">\n https://app.activecollab.com/1/projects/2110/tasks/34\n </span>\n </Body2>\n </li>\n </ul>\n <div className=\"lc-note\">\n <Caption1 color=\"tertiary\">\n Recommended: put the ID in the branch name (e.g.{\" \"}\n <span className=\"code\">feature/retainers-34</span>) so it\n links the moment you push, and add a closing word in the pull\n request when you want it to complete the task on merge.\n </Caption1>\n </div>\n </div>\n\n <div className=\"lc-section\">\n <Body1 weight=\"bold\" className=\"lc-h\">\n Commands\n </Body1>\n <Body2 color=\"secondary\">\n Use these in a commit message or a pull request / merge request\n description to act on the linked task.\n </Body2>\n <table>\n <thead>\n <tr>\n <th>Command</th>\n <th>What it does</th>\n </tr>\n </thead>\n <tbody>\n {COMMANDS.map((c) => (\n <tr key={c.cmd}>\n <td>\n <span className=\"code\">{c.cmd}</span>\n </td>\n <td>\n <Body2 color=\"secondary\">{c.does}</Body2>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n <div className=\"lc-note\">\n <Caption1 color=\"tertiary\">\n Starter set — to be refined.\n </Caption1>\n </div>\n </div>\n </StyledBody>\n </Dialog.Content>\n </Dialog>\n </>\n );\n};\n\nLinkingCommandsButton.displayName = \"LinkingCommandsButton\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAkBC,QAAQ,QAAQ,OAAO;AAErD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,6BAA6B;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA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ACC,CAAC,eACR3B,KAAA,CAAA2B,aAAA,gBACGP,QAAQ,CAACqB,GAAG,CAAEC,CAAC,iBACd1C,KAAA,CAAA2B,aAAA;IAAIgB,GAAG,EAAED,CAAC,CAACrB;EAAI,gBACbrB,KAAA,CAAA2B,aAAA,0BACE3B,KAAA,CAAA2B,aAAA;IAAMI,SAAS,EAAC;EAAM,GAAEW,CAAC,CAACrB,GAAU,CAClC,CAAC,eACLrB,KAAA,CAAA2B,aAAA,0BACE3B,KAAA,CAAA2B,aAAA,CAACnB,KAAK;IAAC+B,KAAK,EAAC;EAAW,GAAEG,CAAC,CAACpB,IAAY,CACtC,CACF,CACL,CACI,CACF,CAAC,eACRtB,KAAA,CAAA2B,aAAA;IAAKI,SAAS,EAAC;EAAS,gBACtB/B,KAAA,CAAA2B,aAAA,CAAClB,QAAQ;IAAC8B,KAAK,EAAC;EAAU,GAAC,mCAEjB,CACP,CACF,CACK,CACE,CACV,CACR,CAAC;AAEP,CAAC;AAEDhB,qBAAqB,CAACR,WAAW,GAAG,uBAAuB","ignoreList":[]}
1
+ {"version":3,"file":"LinkingCommandsButton.js","names":["React","useEffect","useState","styled","ChooseV2","Dialog","IconButton","CancelCrossIcon","CommandLineIcon","CopyIcon","HashIcon","SkeletonLoader","Tooltip","Trigger","Body2","Header3","SANS","MONO","TASK_ID","SUGGESTED_BRANCH","shellQuote","value","replace","StyledButton","withConfig","displayName","componentId","StyledTitleRow","div","StyledBody","TAB_OPTIONS","id","name","COMMANDS","cmd","does","EXAMPLE_COMMIT","LinkingTab","_ref","loading","branch","_useState","copied","setCopied","command","copy","_navigator$clipboard","navigator","clipboard","writeText","window","setTimeout","createElement","className","color","title","type","onClick","CommandsTab","map","c","key","LinkingCommandsButton","_useState2","open","setOpen","_useState3","tab","setTab","_useState4","branchLoading","setBranchLoading","_useState5","suggestedBranch","setSuggestedBranch","undefined","timer","clearTimeout","openDialog","Fragment","onClose","enableBackgroundClick","Title","disableDefaultHeading","variant","ContentDivider","Content","options","selected","onChange","ids"],"sources":["../../../../src/presentation/shared/LinkingCommandsButton.tsx"],"sourcesContent":["import React, { ReactElement, useEffect, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { ChooseV2, ChooseV2Option } from \"../../components/ChooseV2\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n CancelCrossIcon,\n CommandLineIcon,\n CopyIcon,\n HashIcon,\n} from \"../../components/Icons\";\nimport { SkeletonLoader } from \"../../components/Loaders\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Trigger } from \"../../components/Trigger\";\nimport { Body2, Header3 } from \"../../components/Typography\";\n\n/**\n * \"Linking and Commands\" button — same small outlined shape and placement as\n * the \"Suggest Subtasks\" button, but without an icon or the AI gradient (this\n * is not an AI feature). Clicking it opens a reference dialog: a short pitch\n * with a one-liner each for Linking and Commands, a centered ChooseV2 to switch\n * between the two conventions (Linking default), and the full instructions for\n * whichever is selected below it.\n */\nconst SANS =\n '-apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\", Arial, sans-serif';\nconst MONO = \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\";\n\n/** The example task these instructions are written against. */\nconst TASK_ID = 4231;\n/**\n * Suggested branch name for this task — in production it is resolved per repo\n * via GET .../tasks/{task_id}/source/suggest-branch-name. Mocked here.\n */\nconst SUGGESTED_BRANCH = \"ilija/4231-add-cacak-region-support\";\n\n/** POSIX-safe single-quote escaping for a value dropped into a shell command. */\nconst shellQuote = (value: string): string =>\n `'${value.replace(/'/g, \"'\\\\''\")}'`;\n\nconst StyledButton = styled(Trigger)`\n .lc-btn {\n display: inline-flex;\n align-items: center;\n color: var(--color-theme-700);\n border: 1px solid var(--color-theme-500);\n background-color: transparent;\n padding: 3px 8px;\n font-weight: 500;\n font-size: 12px;\n letter-spacing: 0.5px;\n line-height: 16px;\n border-radius: 6px;\n transition: border-color 0.2s ease, color 0.2s ease;\n }\n &:hover .lc-btn {\n border-color: var(--color-theme-700);\n color: var(--color-theme-900);\n }\n`;\n\nconst StyledTitleRow = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n`;\n\nconst StyledBody = styled.div`\n font-family: ${SANS};\n\n .lc-intro {\n margin-bottom: 18px;\n }\n .lc-lead {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n margin-top: 12px;\n }\n .lc-lead svg {\n flex-shrink: 0;\n width: 18px;\n height: 18px;\n margin-top: 2px;\n }\n .lc-term {\n font-weight: 600;\n color: var(--color-theme-900);\n }\n\n /* ChooseV2 root is passed .lc-choosectl; its inner flex row is centered. */\n .lc-choosectl {\n margin-bottom: 18px;\n }\n .lc-choosectl > div {\n justify-content: center;\n }\n\n .lc-list {\n margin: 8px 0 0;\n padding-left: 18px;\n }\n .lc-list li {\n margin-bottom: 6px;\n }\n .lc-invite {\n margin-top: 14px;\n }\n .code {\n font-family: ${MONO};\n background: var(--color-theme-200);\n border-radius: 4px;\n padding: 1px 5px;\n font-size: 12px;\n color: var(--color-theme-900);\n }\n .lc-copy {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n margin-top: 10px;\n padding: 8px 10px;\n background: var(--color-theme-200);\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n }\n .lc-copy code {\n font-family: ${MONO};\n font-size: 12px;\n color: var(--color-theme-900);\n overflow-x: auto;\n white-space: nowrap;\n }\n .lc-copy-btn {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 2px;\n color: var(--color-theme-600);\n transition: color 0.15s ease;\n }\n .lc-copy-btn:hover {\n color: var(--color-theme-900);\n }\n .lc-copy-btn svg {\n width: 16px;\n height: 16px;\n }\n .lc-copy-skel {\n height: 37px;\n width: 100%;\n margin-top: 10px;\n border-radius: 6px;\n }\n .lc-example {\n font-family: ${MONO};\n font-size: 12px;\n line-height: 1.5;\n color: var(--color-theme-900);\n background: var(--color-theme-200);\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n padding: 10px 12px;\n margin-top: 12px;\n white-space: pre-wrap;\n overflow-x: auto;\n }\n table {\n width: 100%;\n border-collapse: collapse;\n margin-top: 12px;\n }\n th,\n td {\n text-align: left;\n padding: 8px 10px;\n border-bottom: 1px solid var(--border-primary);\n vertical-align: top;\n }\n th {\n font-size: 12px;\n font-weight: 500;\n color: var(--color-theme-600);\n }\n`;\n\ntype LcTab = \"linking\" | \"commands\";\n\nconst TAB_OPTIONS: ChooseV2Option[] = [\n { id: \"linking\", name: \"Linking\" },\n { id: \"commands\", name: \"Commands\" },\n];\n\ninterface Command {\n cmd: string;\n does: string;\n}\n\nconst COMMANDS: Command[] = [\n { cmd: \"Closes #34\", does: \"Closes the task when the pull request merges\" },\n { cmd: \"Fixes #34\", does: \"Same as Closes: closes on merge\" },\n { cmd: \"Refs #34\", does: \"Links to the task without closing it\" },\n { cmd: \"/spend 1:30\", does: \"Logs time against the task\" },\n { cmd: \"/estimate 4:00\", does: \"Sets the task's time estimate\" },\n { cmd: \"/done\", does: \"Marks the task complete\" },\n { cmd: \"/reopen\", does: \"Reopens the task\" },\n { cmd: \"/assign @ilija\", does: \"Assigns the task to a user\" },\n { cmd: \"/label In Progress\", does: \"Adds a label to the task\" },\n { cmd: \"/comment Deployed to staging\", does: \"Posts a comment on the task\" },\n { cmd: \"/relate #35\", does: \"Relates this task to another task\" },\n];\n\n/** Illustrative commit message: closes the task, logs time, leaves a note. */\nconst EXAMPLE_COMMIT = `Fix ranks reset when a contract is archived\n\nCloses #${TASK_ID}\n/spend 1:30\n/comment Verified on staging, ranks hold after archive`;\n\ninterface LinkingTabProps {\n loading: boolean;\n branch: string | null;\n}\n\nconst LinkingTab = ({ loading, branch }: LinkingTabProps): ReactElement => {\n const [copied, setCopied] = useState(false);\n const command = branch ? `git checkout -b ${shellQuote(branch)}` : \"\";\n\n const copy = (): void => {\n if (!command) return;\n // eslint-disable-next-line compat/compat\n void navigator.clipboard?.writeText(command);\n setCopied(true);\n window.setTimeout(() => setCopied(false), 1500);\n };\n\n return (\n <div className=\"lc-tabbody\">\n <Body2 color=\"secondary\">\n Mention the task in your git activity and it links to this task on its\n own:\n </Body2>\n <ul className=\"lc-list\">\n <li>\n <Body2>\n <span className=\"lc-term\">In a branch name:</span> the raw task ID{\" \"}\n <span className=\"code\">{TASK_ID}</span>\n </Body2>\n </li>\n <li>\n <Body2>\n <span className=\"lc-term\">\n In a title, commit message, or description:\n </span>{\" \"}\n <span className=\"code\">#{TASK_ID}</span> or{\" \"}\n <span className=\"code\">AC-{TASK_ID}</span>\n </Body2>\n </li>\n <li>\n <Body2>\n <span className=\"lc-term\">Anywhere:</span> the task URL{\" \"}\n <span className=\"code\">\n https://app.activecollab.com/1/projects/2110/tasks/{TASK_ID}\n </span>\n </Body2>\n </li>\n </ul>\n\n <div className=\"lc-invite\">\n <Body2 color=\"secondary\">\n Give the branch a name with the task number in it and it links the\n moment you push. Create one from the suggested name:\n </Body2>\n {loading ? (\n <SkeletonLoader className=\"lc-copy-skel\" />\n ) : (\n <div className=\"lc-copy\">\n <code>{command}</code>\n <Tooltip title={copied ? \"Copied!\" : \"Copy\"}>\n <button\n type=\"button\"\n className=\"lc-copy-btn\"\n onClick={copy}\n aria-label=\"Copy command\"\n >\n <CopyIcon />\n </button>\n </Tooltip>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nconst CommandsTab = (): ReactElement => (\n <div className=\"lc-tabbody\">\n <Body2 color=\"secondary\">\n The table below lists magic words and slash commands that you can use in a\n commit message or a pull request description to act on the linked task.\n Example:\n </Body2>\n <pre className=\"lc-example\">{EXAMPLE_COMMIT}</pre>\n <table>\n <thead>\n <tr>\n <th>Command</th>\n <th>What it does</th>\n </tr>\n </thead>\n <tbody>\n {COMMANDS.map((c) => (\n <tr key={c.cmd}>\n <td>\n <span className=\"code\">{c.cmd}</span>\n </td>\n <td>\n <Body2 color=\"secondary\">{c.does}</Body2>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n);\n\nexport const LinkingCommandsButton = (): ReactElement => {\n const [open, setOpen] = useState(false);\n const [tab, setTab] = useState<LcTab>(\"linking\");\n const [branchLoading, setBranchLoading] = useState(true);\n const [suggestedBranch, setSuggestedBranch] = useState<string | null>(null);\n\n // Mock the suggest-branch-name API load: ~1s skeleton whenever the dialog\n // opens, then reveal the copyable git command.\n useEffect(() => {\n if (!open) return undefined;\n setBranchLoading(true);\n setSuggestedBranch(null);\n const timer = window.setTimeout(() => {\n setSuggestedBranch(SUGGESTED_BRANCH);\n setBranchLoading(false);\n }, 1000);\n return () => window.clearTimeout(timer);\n }, [open]);\n\n const openDialog = (): void => {\n setTab(\"linking\");\n setOpen(true);\n };\n\n return (\n <>\n <StyledButton type=\"button\" onClick={openDialog}>\n <span className=\"lc-btn\">Linking and Commands</span>\n </StyledButton>\n\n <Dialog open={open} onClose={() => setOpen(false)} enableBackgroundClick>\n <Dialog.Title disableDefaultHeading>\n <StyledTitleRow>\n <Header3>Linking and Commands</Header3>\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n onClick={() => setOpen(false)}\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledTitleRow>\n </Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <StyledBody>\n <div className=\"lc-intro\">\n <Body2>\n Keep a task in sync with your code without leaving your editor.\n </Body2>\n <div className=\"lc-lead\">\n <HashIcon />\n <Body2 color=\"secondary\">\n <span className=\"lc-term\">Linking:</span> Mention a task in a\n branch, pull request, or commit and they will be connected\n automatically.\n </Body2>\n </div>\n <div className=\"lc-lead\">\n <CommandLineIcon />\n <Body2 color=\"secondary\">\n <span className=\"lc-term\">Commands:</span> Add short\n instructions in a commit or pull request description to act on\n the task: log time, close it, or leave a comment.\n </Body2>\n </div>\n </div>\n\n <ChooseV2\n className=\"lc-choosectl\"\n options={TAB_OPTIONS}\n selected={[tab]}\n onChange={(ids) => setTab(ids[0] as LcTab)}\n />\n\n {tab === \"linking\" ? (\n <LinkingTab loading={branchLoading} branch={suggestedBranch} />\n ) : (\n <CommandsTab />\n )}\n </StyledBody>\n </Dialog.Content>\n </Dialog>\n </>\n );\n};\n\nLinkingCommandsButton.displayName = \"LinkingCommandsButton\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAkBC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAEhE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,QAAQ,QAAwB,2BAA2B;AACpE,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SACEC,eAAe,EACfC,eAAe,EACfC,QAAQ,EACRC,QAAQ,QACH,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,KAAK,EAAEC,OAAO,QAAQ,6BAA6B;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,IAAI,GACR,kFAAkF;AACpF,MAAMC,IAAI,GAAG,0DAA0D;;AAEvE;AACA,MAAMC,OAAO,GAAG,IAAI;AACpB;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,qCAAqC;;AAE9D;AACA,MAAMC,UAAU,GAAIC,KAAa,UAC3BA,KAAK,CAACC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAG;AAErC,MAAMC,YAAY,GAAGpB,MAAM,CAACU,OAAO,CAAC,CAAAW,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qYAmBnC;AAED,MAAMC,cAAc,GAAGxB,MAAM,CAACyB,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+EAKhC;AAED,MAAMG,UAAU,GAAG1B,MAAM,CAACyB,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4qDACZV,IAAI,EAyCFC,IAAI,EAmBJA,IAAI,EA+BJA,IA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AAe,GAAI,gCAItB;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,KAAG,YAcH,CAAC;AAEF,KAAK,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,CAAC;AAEnD,QAAA,MAAM,iBAAiB,GAAI,cAExB;IACD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,KAAG,YAqFH,CAAC;AAEF,YAAY,EACV,UAAU,EACV,KAAK,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,EACT,cAAc,GACf,CAAC;AAEF,OAAO,EACL,KAAK,EACL,aAAa,EACb,QAAQ,EACR,OAAO,EACP,eAAe,EACf,iBAAiB,GAClB,CAAC"}
1
+ {"version":3,"file":"SourceCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/SourceCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,WAAW,EAAE,YAAY,EAAuB,MAAM,OAAO,CAAC;AA4G9E,KAAK,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAU1D,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;+CAC2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;CACtD;AAiDD,sEAAsE;AACtE,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,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,EAAE,CAAC;CACzB;AA+oBD,QAAA,MAAM,KAAK,GAAI,qBAGZ;IACD,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,KAAG,YAUH,CAAC;AA6JF,QAAA,MAAM,aAAa,GAAI,qBAGpB;IACD,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,KAAG,YAsHH,CAAC;AAqPF,QAAA,MAAM,QAAQ,GAAI,WAAW;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,KAAG,YA4CpD,CAAC;AAwCF,QAAA,MAAM,OAAO,GAAI,2BAGd;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,KAAG,YAuFH,CAAC;AAEF,QAAA,MAAM,eAAe,GAAI,gCAItB;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,KAAG,YAcH,CAAC;AAEF,KAAK,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,CAAC;AAEnD,QAAA,MAAM,iBAAiB,GAAI,cAExB;IACD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,KAAG,YAqFH,CAAC;AAEF,YAAY,EACV,UAAU,EACV,KAAK,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,EACT,cAAc,GACf,CAAC;AAEF,OAAO,EACL,KAAK,EACL,aAAa,EACb,QAAQ,EACR,OAAO,EACP,eAAe,EACf,iBAAiB,GAClB,CAAC"}
@@ -783,15 +783,44 @@ const StyledSpineSequence = styled(StepSequence).withConfig({
783
783
  displayName: "SourceCodeSection__StyledSpineSequence",
784
784
  componentId: "sc-rvqbh5-0"
785
785
  })(["align-self:center;flex-shrink:0;"]);
786
+
787
+ /** Stage state → the generic look `StepSequence` renders it with. */
788
+ const STAGE_STEP = {
789
+ done: {
790
+ tone: "success",
791
+ fill: "solid",
792
+ icon: /*#__PURE__*/React.createElement(CheckIcon, {
793
+ fill: "var(--only-white)",
794
+ width: 14,
795
+ height: 14
796
+ })
797
+ },
798
+ progress: {
799
+ tone: "info",
800
+ fill: "solid"
801
+ },
802
+ failed: {
803
+ tone: "danger",
804
+ fill: "solid",
805
+ icon: /*#__PURE__*/React.createElement(CloseIcon, {
806
+ fill: "var(--only-white)",
807
+ width: 12,
808
+ height: 12
809
+ })
810
+ },
811
+ todo: {
812
+ tone: "neutral",
813
+ fill: "outline"
814
+ }
815
+ };
786
816
  const Spine = _ref3 => {
787
817
  let items = _ref3.items,
788
818
  onClick = _ref3.onClick;
789
819
  return /*#__PURE__*/React.createElement(StyledSpineSequence, {
790
820
  ariaLabel: "Open source code history",
791
821
  onClick: onClick,
792
- steps: items.map(s => ({
822
+ steps: items.map(s => _extends({}, STAGE_STEP[s.state], {
793
823
  key: s.name,
794
- state: s.state,
795
824
  tooltip: /*#__PURE__*/React.createElement(StageTip, s)
796
825
  }))
797
826
  });