@mcp-b/react-components 0.72.1 → 0.72.2

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.
@@ -31,8 +31,12 @@ export interface ComputerAutomationsSelection {
31
31
  * apps place runs on.
32
32
  */
33
33
  export interface ComputerAutomationsHost<TSchedule extends ComputerSchedule = ComputerSchedule> {
34
- /** Saved automations; Automations itself opens a workflow and starts its schedule, single or per table row. */
35
- automations: Omit<WorkspaceAutomationSource, "onOpen" | "onSchedule" | "onScheduleTable">;
34
+ /**
35
+ * Saved automations; Automations itself opens a workflow and starts its
36
+ * schedule, single or per table row. `onOpen` receives every other path a
37
+ * workbench link names, such as a run's trace or result; absent, Files opens it.
38
+ */
39
+ automations: Omit<WorkspaceAutomationSource, "onSchedule" | "onScheduleTable">;
36
40
  /** The selected automation's step outline, loaded by the host; absent while it loads. */
37
41
  selectedGraph?: ExecutionGraph;
38
42
  /** The saved run the host loaded for the selected trace file. */
@@ -1045,7 +1045,7 @@ function AutomationsToolbar(t0) {
1045
1045
  * runs, as the side panel's Automations and Schedules show them.
1046
1046
  */
1047
1047
  function useAutomationsModel() {
1048
- const $ = c(58);
1048
+ const $ = c(59);
1049
1049
  const { host, clock, schedules } = useComputerAutomationsContext();
1050
1050
  const files = React.use(AppHostsContext).files;
1051
1051
  const { section, workflow: selectedWorkflowPath, run: runId } = host.selection;
@@ -1096,27 +1096,28 @@ function useAutomationsModel() {
1096
1096
  const workflows = useQuery(host.automations.queryOptions);
1097
1097
  const { onRun } = host.automations;
1098
1098
  let t5;
1099
- if ($[9] !== openWorkspaceFile || $[10] !== setSelectedWorkflowPath || $[11] !== workflows) {
1100
- t5 = (path_1) => workflows.data?.some((automation) => automation.path === path_1) ? setSelectedWorkflowPath(path_1) : openWorkspaceFile(path_1);
1101
- $[9] = openWorkspaceFile;
1102
- $[10] = setSelectedWorkflowPath;
1103
- $[11] = workflows;
1104
- $[12] = t5;
1105
- } else t5 = $[12];
1099
+ if ($[9] !== host.automations.onOpen || $[10] !== openWorkspaceFile || $[11] !== setSelectedWorkflowPath || $[12] !== workflows) {
1100
+ t5 = (path_1) => workflows.data?.some((automation) => automation.path === path_1) ? setSelectedWorkflowPath(path_1) : (host.automations.onOpen ?? openWorkspaceFile)(path_1);
1101
+ $[9] = host.automations.onOpen;
1102
+ $[10] = openWorkspaceFile;
1103
+ $[11] = setSelectedWorkflowPath;
1104
+ $[12] = workflows;
1105
+ $[13] = t5;
1106
+ } else t5 = $[13];
1106
1107
  let t6;
1107
1108
  let t7;
1108
- if ($[13] !== openAutomationSchedule) {
1109
+ if ($[14] !== openAutomationSchedule) {
1109
1110
  t6 = async (path_2) => void await openAutomationSchedule({ path: path_2 });
1110
1111
  t7 = async (invocation) => void await openAutomationSchedule(invocation);
1111
- $[13] = openAutomationSchedule;
1112
- $[14] = t6;
1113
- $[15] = t7;
1112
+ $[14] = openAutomationSchedule;
1113
+ $[15] = t6;
1114
+ $[16] = t7;
1114
1115
  } else {
1115
- t6 = $[14];
1116
- t7 = $[15];
1116
+ t6 = $[15];
1117
+ t7 = $[16];
1117
1118
  }
1118
1119
  let t8;
1119
- if ($[16] !== onRun) {
1120
+ if ($[17] !== onRun) {
1120
1121
  t8 = onRun ? async (invocation_0) => {
1121
1122
  const outcome = await onRun(invocation_0);
1122
1123
  const [output] = outcome.files;
@@ -1126,11 +1127,11 @@ function useAutomationsModel() {
1126
1127
  }, ...current.filter((candidate) => candidate.workflowPath !== invocation_0.path || candidate.run.path !== output.path)]);
1127
1128
  return outcome;
1128
1129
  } : void 0;
1129
- $[16] = onRun;
1130
- $[17] = t8;
1131
- } else t8 = $[17];
1130
+ $[17] = onRun;
1131
+ $[18] = t8;
1132
+ } else t8 = $[18];
1132
1133
  let t9;
1133
- if ($[18] !== host.automations || $[19] !== t5 || $[20] !== t6 || $[21] !== t7 || $[22] !== t8) {
1134
+ if ($[19] !== host.automations || $[20] !== t5 || $[21] !== t6 || $[22] !== t7 || $[23] !== t8) {
1134
1135
  t9 = {
1135
1136
  ...host.automations,
1136
1137
  onOpen: t5,
@@ -1138,27 +1139,27 @@ function useAutomationsModel() {
1138
1139
  onScheduleTable: t7,
1139
1140
  onRun: t8
1140
1141
  };
1141
- $[18] = host.automations;
1142
- $[19] = t5;
1143
- $[20] = t6;
1144
- $[21] = t7;
1145
- $[22] = t8;
1146
- $[23] = t9;
1147
- } else t9 = $[23];
1142
+ $[19] = host.automations;
1143
+ $[20] = t5;
1144
+ $[21] = t6;
1145
+ $[22] = t7;
1146
+ $[23] = t8;
1147
+ $[24] = t9;
1148
+ } else t9 = $[24];
1148
1149
  const source = t9;
1149
1150
  let t10;
1150
- if ($[24] !== host.schedules || $[25] !== runId) {
1151
+ if ($[25] !== host.schedules || $[26] !== runId) {
1151
1152
  t10 = host.schedules.flatMap(_temp7).find((run_0) => getThinkExecutionRunId(run_0) === runId) ?? null;
1152
- $[24] = host.schedules;
1153
- $[25] = runId;
1154
- $[26] = t10;
1155
- } else t10 = $[26];
1153
+ $[25] = host.schedules;
1154
+ $[26] = runId;
1155
+ $[27] = t10;
1156
+ } else t10 = $[27];
1156
1157
  const selectedRun = t10;
1157
1158
  const scheduleApp = schedules.model;
1158
1159
  const [outlet] = React.useState(createAppBarOutlet);
1159
1160
  const [sections, setSections] = React.useState(null);
1160
1161
  let t11;
1161
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1162
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1162
1163
  t11 = /* @__PURE__ */ jsxs(Tabs.Tab, {
1163
1164
  unstyled: true,
1164
1165
  value: "workflows",
@@ -1170,10 +1171,10 @@ function useAutomationsModel() {
1170
1171
  }),
1171
1172
  children: [/* @__PURE__ */ jsx(QueueIcon, { "aria-hidden": "true" }), "Automations"]
1172
1173
  });
1173
- $[27] = t11;
1174
- } else t11 = $[27];
1174
+ $[28] = t11;
1175
+ } else t11 = $[28];
1175
1176
  let t12;
1176
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1177
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
1177
1178
  t12 = /* @__PURE__ */ jsxs(Tabs.Tab, {
1178
1179
  unstyled: true,
1179
1180
  value: "schedules",
@@ -1185,10 +1186,10 @@ function useAutomationsModel() {
1185
1186
  }),
1186
1187
  children: [/* @__PURE__ */ jsx(CalendarIcon, { "aria-hidden": "true" }), "Schedules"]
1187
1188
  });
1188
- $[28] = t12;
1189
- } else t12 = $[28];
1189
+ $[29] = t12;
1190
+ } else t12 = $[29];
1190
1191
  let t13;
1191
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
1192
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
1192
1193
  t13 = /* @__PURE__ */ jsxs(Tabs.List, {
1193
1194
  unstyled: true,
1194
1195
  className: "computer-automations__tabs",
@@ -1209,12 +1210,12 @@ function useAutomationsModel() {
1209
1210
  })
1210
1211
  ]
1211
1212
  });
1212
- $[29] = t13;
1213
- } else t13 = $[29];
1213
+ $[30] = t13;
1214
+ } else t13 = $[30];
1214
1215
  const sectionList = t13;
1215
1216
  const t14 = section === "schedules" ? scheduleApp.renderMenus : void 0;
1216
1217
  let t15;
1217
- if ($[30] !== outlet || $[31] !== scheduleApp.renderTitle || $[32] !== schedules.editing) {
1218
+ if ($[31] !== outlet || $[32] !== scheduleApp.renderTitle || $[33] !== schedules.editing) {
1218
1219
  t15 = schedules.editing ? scheduleApp.renderTitle : (t16) => {
1219
1220
  const { phone } = t16;
1220
1221
  return phone ? "Automations" : /* @__PURE__ */ jsx(AutomationsToolbar, {
@@ -1222,13 +1223,13 @@ function useAutomationsModel() {
1222
1223
  sections: setSections
1223
1224
  });
1224
1225
  };
1225
- $[30] = outlet;
1226
- $[31] = scheduleApp.renderTitle;
1227
- $[32] = schedules.editing;
1228
- $[33] = t15;
1229
- } else t15 = $[33];
1226
+ $[31] = outlet;
1227
+ $[32] = scheduleApp.renderTitle;
1228
+ $[33] = schedules.editing;
1229
+ $[34] = t15;
1230
+ } else t15 = $[34];
1230
1231
  let t16;
1231
- if ($[34] !== clock || $[35] !== host || $[36] !== openWorkspaceFile || $[37] !== outlet || $[38] !== recentWorkflowOutputs || $[39] !== runId || $[40] !== scheduleApp || $[41] !== schedules.editing || $[42] !== section || $[43] !== sections || $[44] !== selectedRun || $[45] !== selectedWorkflowPath || $[46] !== setSection || $[47] !== setSelectedRun || $[48] !== setSelectedWorkflowPath || $[49] !== source || $[50] !== workflows) {
1232
+ if ($[35] !== clock || $[36] !== host || $[37] !== openWorkspaceFile || $[38] !== outlet || $[39] !== recentWorkflowOutputs || $[40] !== runId || $[41] !== scheduleApp || $[42] !== schedules.editing || $[43] !== section || $[44] !== sections || $[45] !== selectedRun || $[46] !== selectedWorkflowPath || $[47] !== setSection || $[48] !== setSelectedRun || $[49] !== setSelectedWorkflowPath || $[50] !== source || $[51] !== workflows) {
1232
1233
  t16 = (context) => {
1233
1234
  const paneOutlet = (pane) => !context.phone && section === pane ? outlet : null;
1234
1235
  return schedules.editing ? scheduleApp.render(context) : /* @__PURE__ */ jsxs(Tabs.Root, {
@@ -1297,27 +1298,27 @@ function useAutomationsModel() {
1297
1298
  })]
1298
1299
  });
1299
1300
  };
1300
- $[34] = clock;
1301
- $[35] = host;
1302
- $[36] = openWorkspaceFile;
1303
- $[37] = outlet;
1304
- $[38] = recentWorkflowOutputs;
1305
- $[39] = runId;
1306
- $[40] = scheduleApp;
1307
- $[41] = schedules.editing;
1308
- $[42] = section;
1309
- $[43] = sections;
1310
- $[44] = selectedRun;
1311
- $[45] = selectedWorkflowPath;
1312
- $[46] = setSection;
1313
- $[47] = setSelectedRun;
1314
- $[48] = setSelectedWorkflowPath;
1315
- $[49] = source;
1316
- $[50] = workflows;
1317
- $[51] = t16;
1318
- } else t16 = $[51];
1301
+ $[35] = clock;
1302
+ $[36] = host;
1303
+ $[37] = openWorkspaceFile;
1304
+ $[38] = outlet;
1305
+ $[39] = recentWorkflowOutputs;
1306
+ $[40] = runId;
1307
+ $[41] = scheduleApp;
1308
+ $[42] = schedules.editing;
1309
+ $[43] = section;
1310
+ $[44] = sections;
1311
+ $[45] = selectedRun;
1312
+ $[46] = selectedWorkflowPath;
1313
+ $[47] = setSection;
1314
+ $[48] = setSelectedRun;
1315
+ $[49] = setSelectedWorkflowPath;
1316
+ $[50] = source;
1317
+ $[51] = workflows;
1318
+ $[52] = t16;
1319
+ } else t16 = $[52];
1319
1320
  let t17;
1320
- if ($[52] !== scheduleApp.beforeQuit || $[53] !== scheduleApp.onKeyDown || $[54] !== t14 || $[55] !== t15 || $[56] !== t16) {
1321
+ if ($[53] !== scheduleApp.beforeQuit || $[54] !== scheduleApp.onKeyDown || $[55] !== t14 || $[56] !== t15 || $[57] !== t16) {
1321
1322
  t17 = {
1322
1323
  beforeQuit: scheduleApp.beforeQuit,
1323
1324
  onKeyDown: scheduleApp.onKeyDown,
@@ -1325,13 +1326,13 @@ function useAutomationsModel() {
1325
1326
  renderTitle: t15,
1326
1327
  render: t16
1327
1328
  };
1328
- $[52] = scheduleApp.beforeQuit;
1329
- $[53] = scheduleApp.onKeyDown;
1330
- $[54] = t14;
1331
- $[55] = t15;
1332
- $[56] = t16;
1333
- $[57] = t17;
1334
- } else t17 = $[57];
1329
+ $[53] = scheduleApp.beforeQuit;
1330
+ $[54] = scheduleApp.onKeyDown;
1331
+ $[55] = t14;
1332
+ $[56] = t15;
1333
+ $[57] = t16;
1334
+ $[58] = t17;
1335
+ } else t17 = $[58];
1335
1336
  return t17;
1336
1337
  }
1337
1338
  function _temp7(schedule) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/react-components",
3
- "version": "0.72.1",
3
+ "version": "0.72.2",
4
4
  "description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
5
5
  "homepage": "https://design-system.sigvelo.com",
6
6
  "bugs": {
@@ -55,7 +55,7 @@
55
55
  "streamdown": "^2.7.0",
56
56
  "unist-util-visit": "^5.1.0",
57
57
  "yet-another-react-lightbox": "^3.32.2",
58
- "@mcp-b/design-tokens": "0.72.1"
58
+ "@mcp-b/design-tokens": "0.72.2"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@ai-sdk/react": "^4.0.136",