flexdesk 0.17.7 → 0.17.9

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 (284) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/LICENSE +0 -0
  3. package/README.md +0 -0
  4. package/THIRD_PARTY_LICENSES.md +0 -0
  5. package/canvas.js +0 -0
  6. package/charts.js +0 -0
  7. package/core.js +0 -0
  8. package/css/base.css +21 -1
  9. package/css/flexdesk.css +30 -3
  10. package/css/overrides.css +0 -0
  11. package/css/reset.css +0 -0
  12. package/dist/canvas.js +0 -0
  13. package/dist/canvas.js.map +0 -0
  14. package/dist/charts.js +7 -6
  15. package/dist/charts.js.map +2 -2
  16. package/dist/{chunk-RMTRWWEO.js → chunk-2YTM3GJE.js} +67 -26
  17. package/dist/chunk-2YTM3GJE.js.map +7 -0
  18. package/dist/chunk-3PHCPZHT.js +0 -0
  19. package/dist/chunk-3PHCPZHT.js.map +0 -0
  20. package/dist/{chunk-UURZ37SD.js → chunk-7U4IB65H.js} +27 -9
  21. package/dist/chunk-7U4IB65H.js.map +7 -0
  22. package/dist/{chunk-D3COLZZ2.js → chunk-BE2PU3LL.js} +2 -2
  23. package/dist/{chunk-D3COLZZ2.js.map → chunk-BE2PU3LL.js.map} +0 -0
  24. package/dist/chunk-CVMCZZX2.js +0 -0
  25. package/dist/chunk-CVMCZZX2.js.map +0 -0
  26. package/dist/{chunk-UWO43BZU.js → chunk-F35XSQWA.js} +16 -20
  27. package/dist/chunk-F35XSQWA.js.map +7 -0
  28. package/dist/chunk-FOOS3T5L.js +0 -0
  29. package/dist/chunk-FOOS3T5L.js.map +0 -0
  30. package/dist/chunk-GOQLR5WR.js +0 -0
  31. package/dist/chunk-GOQLR5WR.js.map +0 -0
  32. package/dist/chunk-HNU6MM2B.js +0 -0
  33. package/dist/chunk-HNU6MM2B.js.map +0 -0
  34. package/dist/chunk-JKZLNKG6.js +0 -0
  35. package/dist/chunk-JKZLNKG6.js.map +0 -0
  36. package/dist/chunk-JYWURG5T.js +0 -0
  37. package/dist/chunk-JYWURG5T.js.map +0 -0
  38. package/dist/{chunk-RKNFBX5K.js → chunk-MIW7D6WC.js} +16 -4
  39. package/dist/{chunk-RKNFBX5K.js.map → chunk-MIW7D6WC.js.map} +2 -2
  40. package/dist/chunk-N7HC3ADV.js +0 -0
  41. package/dist/chunk-N7HC3ADV.js.map +0 -0
  42. package/dist/{chunk-LWV23YVE.js → chunk-NIJEJAZ7.js} +42 -18
  43. package/dist/chunk-NIJEJAZ7.js.map +7 -0
  44. package/dist/{chunk-HYJYYEPK.js → chunk-REJ5HLIM.js} +2 -2
  45. package/dist/{chunk-HYJYYEPK.js.map → chunk-REJ5HLIM.js.map} +0 -0
  46. package/dist/{chunk-WVFGV5FT.js → chunk-WUFLGETN.js} +39 -2
  47. package/dist/{chunk-WVFGV5FT.js.map → chunk-WUFLGETN.js.map} +3 -3
  48. package/dist/core.js +0 -0
  49. package/dist/core.js.map +0 -0
  50. package/dist/editor.js +2 -2
  51. package/dist/editor.js.map +0 -0
  52. package/dist/flexdesk.css +30 -3
  53. package/dist/flow.js +3 -3
  54. package/dist/flow.js.map +0 -0
  55. package/dist/host.js +0 -0
  56. package/dist/host.js.map +0 -0
  57. package/dist/reset.css +0 -0
  58. package/dist/tile_registry-6WZPTUZV.js +0 -0
  59. package/dist/tile_registry-6WZPTUZV.js.map +0 -0
  60. package/dist/tiles.js +63 -20
  61. package/dist/tiles.js.map +2 -2
  62. package/dist/widgets.js +6 -6
  63. package/dist/widgets.js.map +0 -0
  64. package/dist/wm.js +5 -5
  65. package/dist/wm.js.map +0 -0
  66. package/docs/README.md +0 -0
  67. package/docs/best-practices.md +0 -0
  68. package/docs/components/charts.md +95 -0
  69. package/docs/components/command-palette.md +0 -0
  70. package/docs/components/conversation.md +0 -0
  71. package/docs/components/data-table-grid.md +0 -0
  72. package/docs/components/data-table.md +0 -0
  73. package/docs/components/editor.md +0 -0
  74. package/docs/components/flow-canvas-editor.md +0 -0
  75. package/docs/components/flow-editors.md +0 -0
  76. package/docs/components/flow-lane-editor.md +0 -0
  77. package/docs/components/flow-outline-editor.md +0 -0
  78. package/docs/components/forms-and-dialogs.md +0 -0
  79. package/docs/components/input-fields.md +0 -0
  80. package/docs/components/keymap.md +0 -0
  81. package/docs/components/markdown-and-outline.md +0 -0
  82. package/docs/components/menus.md +41 -0
  83. package/docs/components/notifications.md +0 -0
  84. package/docs/components/panels-and-desktops.md +0 -0
  85. package/docs/components/record-list-and-fact-table.md +0 -0
  86. package/docs/components/settings-view.md +0 -0
  87. package/docs/components/shell.md +0 -0
  88. package/docs/components/slide-out-panel.md +0 -0
  89. package/docs/components/tiles.md +25 -0
  90. package/docs/components/wizard.md +0 -0
  91. package/docs/concepts/building-and-packaging.md +0 -0
  92. package/docs/concepts/domain-neutrality.md +0 -0
  93. package/docs/concepts/host-port.md +0 -0
  94. package/docs/concepts/packages-and-entry-points.md +0 -0
  95. package/docs/concepts/peer-dependencies.md +0 -0
  96. package/docs/concepts/state-guard.md +0 -0
  97. package/docs/concepts/styling.md +0 -0
  98. package/docs/quickstart.md +0 -0
  99. package/editor.js +0 -0
  100. package/flow.js +0 -0
  101. package/host.js +0 -0
  102. package/package.json +1 -1
  103. package/src/canvas/canvas_adapter.js +0 -0
  104. package/src/canvas/edge_router.js +0 -0
  105. package/src/canvas/graph/connector_router.js +0 -0
  106. package/src/canvas/graph/history_service.js +0 -0
  107. package/src/canvas/graph/node_platform.js +0 -0
  108. package/src/canvas/index.js +0 -0
  109. package/src/canvas/layered_layout.js +0 -0
  110. package/src/charts/chart_types.js +3 -2
  111. package/src/charts/data_series_plot_window.js +0 -0
  112. package/src/charts/downsample.js +0 -0
  113. package/src/charts/plot_config.js +0 -0
  114. package/src/charts/plot_config_editor.js +8 -2
  115. package/src/charts/plot_grid.js +16 -4
  116. package/src/charts/plot_popout_window.js +2 -1
  117. package/src/charts/plotly_wrapper.js +0 -0
  118. package/src/charts/series_transforms.js +114 -20
  119. package/src/core/event_bus.js +0 -0
  120. package/src/core/logging.js +0 -0
  121. package/src/core/settings.js +0 -0
  122. package/src/core/state_guard.js +0 -0
  123. package/src/core/state_guard_config.js +0 -0
  124. package/src/core/state_machine.js +0 -0
  125. package/src/editor/editor_pane.js +0 -0
  126. package/src/editor/monaco_editor_factory.js +0 -0
  127. package/src/editor/monaco_loader.js +0 -0
  128. package/src/editor/notebook_search.js +0 -0
  129. package/src/editor/notebook_tab_bar.js +26 -7
  130. package/src/editor/notebook_undo_manager.js +0 -0
  131. package/src/editor/split_pane_container.js +0 -0
  132. package/src/flow/canvas_editor/connections.js +0 -0
  133. package/src/flow/canvas_editor/editor.js +0 -0
  134. package/src/flow/canvas_editor/index.js +0 -0
  135. package/src/flow/canvas_editor/layout.js +0 -0
  136. package/src/flow/canvas_editor/strings.js +0 -0
  137. package/src/flow/kit/always_before.js +0 -0
  138. package/src/flow/kit/catalogue.js +0 -0
  139. package/src/flow/kit/chip_input.js +0 -0
  140. package/src/flow/kit/dom.js +0 -0
  141. package/src/flow/kit/findings.js +0 -0
  142. package/src/flow/kit/history.js +0 -0
  143. package/src/flow/kit/index.js +0 -0
  144. package/src/flow/kit/keys.js +0 -0
  145. package/src/flow/kit/logic_graph.js +0 -0
  146. package/src/flow/kit/references.js +0 -0
  147. package/src/flow/kit/settings_panel.js +0 -0
  148. package/src/flow/kit/settings_schema.js +0 -0
  149. package/src/flow/kit/step_picker.js +0 -0
  150. package/src/flow/kit/strings.js +0 -0
  151. package/src/flow/kit/value_picker.js +0 -0
  152. package/src/flow/kit/widgets.js +0 -0
  153. package/src/flow/lanes/editor.js +0 -0
  154. package/src/flow/lanes/index.js +0 -0
  155. package/src/flow/lanes/layout.js +0 -0
  156. package/src/flow/lanes/pipeline.js +0 -0
  157. package/src/flow/lanes/preview.js +0 -0
  158. package/src/flow/lanes/strings.js +0 -0
  159. package/src/flow/outline/editor.js +0 -0
  160. package/src/flow/outline/index.js +0 -0
  161. package/src/flow/outline/mapping.js +0 -0
  162. package/src/flow/outline/menu.js +0 -0
  163. package/src/flow/outline/operations.js +0 -0
  164. package/src/flow/outline/recognise.js +0 -0
  165. package/src/flow/outline/strings.js +0 -0
  166. package/src/help/help_modal.js +0 -0
  167. package/src/help/help_registry.js +0 -0
  168. package/src/host/external_links.js +0 -0
  169. package/src/host/file_picker.js +0 -0
  170. package/src/host/host.js +0 -0
  171. package/src/host/photino_host.js +0 -0
  172. package/src/host/photino_host.md +0 -0
  173. package/src/host/pywebview_host.js +0 -0
  174. package/src/tiles/chart_tiles.js +0 -0
  175. package/src/tiles/config_schema.js +0 -0
  176. package/src/tiles/figure_tile.js +0 -0
  177. package/src/tiles/layout_persistence.js +0 -0
  178. package/src/tiles/list_tiles.js +0 -0
  179. package/src/tiles/scope_picker.js +0 -0
  180. package/src/tiles/tile_base.js +67 -16
  181. package/src/tiles/tile_config_form.js +0 -0
  182. package/src/tiles/tile_grid.js +0 -0
  183. package/src/tiles/tile_registry.js +0 -0
  184. package/src/tiling/bottom_panel_tabs.js +0 -0
  185. package/src/tiling/command_palette.js +0 -0
  186. package/src/tiling/content_registry.js +0 -0
  187. package/src/tiling/desktops.js +0 -0
  188. package/src/tiling/entity_sources.js +0 -0
  189. package/src/tiling/keymap.js +0 -0
  190. package/src/tiling/kind_taxonomy.js +0 -0
  191. package/src/tiling/landing_table.js +0 -0
  192. package/src/tiling/loading_overlay.js +0 -0
  193. package/src/tiling/nav_panel.js +0 -0
  194. package/src/tiling/page_factory.js +0 -0
  195. package/src/tiling/panel_availability.js +0 -0
  196. package/src/tiling/panel_keys.js +0 -0
  197. package/src/tiling/shell.js +0 -0
  198. package/src/tiling/tab_strip.js +0 -0
  199. package/src/tiling/tile_breadcrumb.js +0 -0
  200. package/src/tiling/tile_renderer.js +0 -0
  201. package/src/tiling/tile_tab_menu.js +0 -0
  202. package/src/tiling/tile_tree.js +0 -0
  203. package/src/tiling/wm.js +0 -0
  204. package/src/tiling/zoom.js +0 -0
  205. package/src/ui/base/component_base.js +0 -0
  206. package/src/ui/base/controller_base.js +0 -0
  207. package/src/ui/base/page_base.js +0 -0
  208. package/src/ui/components/about_dialog.js +0 -0
  209. package/src/ui/components/action_dropdown.js +19 -6
  210. package/src/ui/components/alert_log.js +0 -0
  211. package/src/ui/components/alerts_pane.js +0 -0
  212. package/src/ui/components/attribute_list_editor.js +0 -0
  213. package/src/ui/components/autocomplete_field.js +0 -0
  214. package/src/ui/components/cell_editor_host.js +0 -0
  215. package/src/ui/components/cell_editors.js +0 -0
  216. package/src/ui/components/cell_grid.js +0 -0
  217. package/src/ui/components/cell_paste.js +0 -0
  218. package/src/ui/components/cell_selection.js +0 -0
  219. package/src/ui/components/choice_controls.js +0 -0
  220. package/src/ui/components/color_field.js +0 -0
  221. package/src/ui/components/color_list_field.js +0 -0
  222. package/src/ui/components/column_fit.js +0 -0
  223. package/src/ui/components/column_groups.js +0 -0
  224. package/src/ui/components/column_order.js +0 -0
  225. package/src/ui/components/computing_status_window.js +0 -0
  226. package/src/ui/components/confirm_dialog.js +0 -0
  227. package/src/ui/components/context_menu.js +20 -20
  228. package/src/ui/components/conversation_view.js +0 -0
  229. package/src/ui/components/crosstab.js +0 -0
  230. package/src/ui/components/data_table.js +45 -19
  231. package/src/ui/components/detail_header.js +0 -0
  232. package/src/ui/components/document_outline.js +0 -0
  233. package/src/ui/components/drag_reorder.js +0 -0
  234. package/src/ui/components/fact_table.js +0 -0
  235. package/src/ui/components/fill_handle.js +0 -0
  236. package/src/ui/components/gallery_picker.js +0 -0
  237. package/src/ui/components/header_actions.js +0 -0
  238. package/src/ui/components/inline_renamer.js +0 -0
  239. package/src/ui/components/job_progress.js +0 -0
  240. package/src/ui/components/managed_window.js +0 -0
  241. package/src/ui/components/menu_bar.js +0 -0
  242. package/src/ui/components/modal.js +0 -0
  243. package/src/ui/components/notification_history.js +0 -0
  244. package/src/ui/components/progress.js +0 -0
  245. package/src/ui/components/record_list.js +0 -0
  246. package/src/ui/components/row_activation.js +0 -0
  247. package/src/ui/components/section_stack.js +0 -0
  248. package/src/ui/components/series.js +0 -0
  249. package/src/ui/components/settings_view.js +0 -0
  250. package/src/ui/components/slide_out_panel.js +0 -0
  251. package/src/ui/components/slider_field.js +0 -0
  252. package/src/ui/components/sortable_list.js +0 -0
  253. package/src/ui/components/staged_edits.js +0 -0
  254. package/src/ui/components/staged_history.js +0 -0
  255. package/src/ui/components/table_filter_chips.js +0 -0
  256. package/src/ui/components/table_state_store.js +0 -0
  257. package/src/ui/components/table_structure.js +0 -0
  258. package/src/ui/components/table_values.js +0 -0
  259. package/src/ui/components/tabs.js +0 -0
  260. package/src/ui/components/tag_input.js +0 -0
  261. package/src/ui/components/toast.js +0 -0
  262. package/src/ui/components/toggle_field.js +0 -0
  263. package/src/ui/components/tree_view.js +0 -0
  264. package/src/ui/components/tsv.js +0 -0
  265. package/src/ui/components/window_taskbar.js +0 -0
  266. package/src/ui/components/wizard.js +0 -0
  267. package/src/ui/controllers/window_chrome_controller.js +0 -0
  268. package/src/ui/notification_center.js +0 -0
  269. package/src/ui/utils/auto_scrollbars.js +0 -0
  270. package/src/ui/utils/markdown.js +0 -0
  271. package/src/ui/utils/menu_viewport.js +81 -0
  272. package/src/ui/utils/native_context_menu.js +0 -0
  273. package/src/ui/utils/overlay_scrollbar.js +0 -0
  274. package/src/ui/utils/raf_resize_observer.js +0 -0
  275. package/src/ui/utils/scroll_lock.js +0 -0
  276. package/src/ui/utils/strip_scroll.js +0 -0
  277. package/src/ui/utils/tooltip_service.js +0 -0
  278. package/tiles.js +0 -0
  279. package/widgets.js +0 -0
  280. package/wm.js +0 -0
  281. package/dist/chunk-LWV23YVE.js.map +0 -7
  282. package/dist/chunk-RMTRWWEO.js.map +0 -7
  283. package/dist/chunk-UURZ37SD.js.map +0 -7
  284. package/dist/chunk-UWO43BZU.js.map +0 -7
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  DataTable,
3
3
  createRafResizeObserver
4
- } from "./chunk-LWV23YVE.js";
4
+ } from "./chunk-NIJEJAZ7.js";
5
5
  import {
6
- ManagedWindow
6
+ ManagedWindow,
7
+ flatChoices,
8
+ selectBox
7
9
  } from "./chunk-CVMCZZX2.js";
8
10
 
9
11
  // src/charts/plotly_wrapper.js
@@ -1177,12 +1179,25 @@ function migrateSingleChart(data) {
1177
1179
  }
1178
1180
 
1179
1181
  // src/charts/series_transforms.js
1180
- function resolveParams(transform, state) {
1182
+ var isChoice = (spec) => spec?.type === "choice";
1183
+ function choiceOptions(spec, subplot) {
1184
+ const options = typeof spec.options === "function" ? spec.options(subplot) : spec.options;
1185
+ return Array.isArray(options) ? options : [];
1186
+ }
1187
+ function firstChoice(spec, subplot) {
1188
+ const flat = flatChoices(choiceOptions(spec, subplot));
1189
+ return (flat.find((o) => !o.disabled) ?? flat[0])?.value;
1190
+ }
1191
+ function resolveParams(transform, state, subplot) {
1192
+ const saved = state?.params ?? {};
1181
1193
  const params = {};
1182
1194
  for (const [name, spec] of Object.entries(transform.params ?? {})) {
1183
1195
  params[name] = spec?.default;
1196
+ if (isChoice(spec) && spec.default === void 0 && saved[name] === void 0) {
1197
+ params[name] = firstChoice(spec, subplot);
1198
+ }
1184
1199
  }
1185
- return { ...params, ...state?.params ?? {} };
1200
+ return { ...params, ...saved };
1186
1201
  }
1187
1202
  function enabledOutputs(transform, state) {
1188
1203
  return Object.keys(transform.outputs ?? {}).filter((name) => state?.outputs?.[name] === true);
@@ -1191,19 +1206,20 @@ function isEligible(trace) {
1191
1206
  const type = trace.type ?? "scatter";
1192
1207
  return (type === "scatter" || type === "scattergl") && Array.isArray(trace.y);
1193
1208
  }
1194
- async function deriveSeriesTraces(traces, subplot, seriesTransforms, { onError } = {}) {
1209
+ async function deriveSeriesTraces(traces, subplot, seriesTransforms, { onError, seriesOf, results, resolveSeries } = {}) {
1195
1210
  const derived = [];
1196
1211
  if (!seriesTransforms) return derived;
1197
- const sources = traces.filter(isEligible);
1212
+ const sources = traces.filter(isEligible).map((trace) => ({ trace, series: typeof seriesOf === "function" ? seriesOf(trace) ?? null : null }));
1198
1213
  for (const [transformId, transform] of Object.entries(seriesTransforms)) {
1199
1214
  const state = subplot?.transforms?.[transformId];
1200
1215
  const outputs = enabledOutputs(transform, state);
1201
1216
  if (!outputs.length || typeof transform?.run !== "function") continue;
1202
- const params = resolveParams(transform, state);
1203
- for (const source of sources) {
1217
+ const params = resolveParams(transform, state, subplot);
1218
+ for (const { trace: source, series } of sources) {
1219
+ const context = { series, subplot, results: results ?? null, resolveSeries: resolveSeries ?? null };
1204
1220
  let result;
1205
1221
  try {
1206
- result = await transform.run(source.y, params);
1222
+ result = await transform.run(source.y, params, context);
1207
1223
  } catch (error) {
1208
1224
  onError?.({ transformId, traceName: source.name, error });
1209
1225
  continue;
@@ -1284,22 +1300,43 @@ function renderSeriesTransformControls(container, subplot, seriesTransforms, { o
1284
1300
  row.className = "twm-series-transforms__row";
1285
1301
  const text = document.createElement("span");
1286
1302
  text.textContent = spec?.label ?? name;
1303
+ const writeParam = (value) => {
1304
+ const state = stateOf(transformId);
1305
+ const params = { ...state.params ?? {} };
1306
+ if (value === void 0) delete params[name];
1307
+ else params[name] = value;
1308
+ state.params = params;
1309
+ onChange?.();
1310
+ };
1311
+ const saved = subplot.transforms?.[transformId]?.params?.[name];
1312
+ if (isChoice(spec)) {
1313
+ const current2 = saved ?? spec.default ?? firstChoice(spec, subplot);
1314
+ const choice = selectBox(choiceOptions(spec, subplot), current2, {
1315
+ label: spec?.label ?? name,
1316
+ valueAttr: "value",
1317
+ className: "twm-series-transforms__param twm-series-transforms__select"
1318
+ });
1319
+ choice.box.addEventListener("change", () => {
1320
+ const value = choice.valueOf();
1321
+ choice.setOptions(choiceOptions(spec, subplot), value);
1322
+ writeParam(value);
1323
+ });
1324
+ paramInputs.push(choice.box);
1325
+ row.append(text, choice.box);
1326
+ group.appendChild(row);
1327
+ continue;
1328
+ }
1287
1329
  const input = document.createElement("input");
1288
1330
  input.type = "number";
1289
1331
  input.className = "twm-series-transforms__param";
1290
1332
  for (const attr of ["min", "max", "step"]) {
1291
1333
  if (spec?.[attr] != null) input[attr] = String(spec[attr]);
1292
1334
  }
1293
- const current = subplot.transforms?.[transformId]?.params?.[name] ?? spec?.default;
1335
+ const current = saved ?? spec?.default;
1294
1336
  input.value = current == null ? "" : String(current);
1295
1337
  input.addEventListener("change", () => {
1296
1338
  const value = parseFloat(input.value);
1297
- const state = stateOf(transformId);
1298
- const params = { ...state.params ?? {} };
1299
- if (Number.isFinite(value)) params[name] = value;
1300
- else delete params[name];
1301
- state.params = params;
1302
- onChange?.();
1339
+ writeParam(Number.isFinite(value) ? value : void 0);
1303
1340
  });
1304
1341
  paramInputs.push(input);
1305
1342
  row.append(text, input);
@@ -1427,6 +1464,7 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1427
1464
  const yRefByAxisId = {};
1428
1465
  let ownCount = 0;
1429
1466
  let hiddenCount = 0;
1467
+ const seriesByTrace = /* @__PURE__ */ new Map();
1430
1468
  const useX = sp.xAxis && sp.xAxis.useTime === false && sp.xAxis.variable;
1431
1469
  const xData = useX ? opts.resolveSeries({ variable: sp.xAxis.variable }, data, sp)?.y ?? time : time;
1432
1470
  const yAxes = sp.yAxes ?? [];
@@ -1461,7 +1499,7 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1461
1499
  if (!resolved?.y) continue;
1462
1500
  const x = resolved.x ?? xData;
1463
1501
  const y = Array.isArray(resolved.y) ? applyNanHandling(resolved.y, sp.nanHandling ?? "gap", x) : resolved.y;
1464
- traces.push(buildTrace({
1502
+ const trace = buildTrace({
1465
1503
  chartType: sp.chartType || "line",
1466
1504
  x,
1467
1505
  y,
@@ -1473,7 +1511,9 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1473
1511
  yAxisId: yRef,
1474
1512
  showMarkers: sp.showDataPoints ?? false,
1475
1513
  stackGroup: s.stackGroup ?? null
1476
- }));
1514
+ });
1515
+ traces.push(trace);
1516
+ seriesByTrace.set(trace, s);
1477
1517
  const overlay = s.overlay ? opts.overlays?.[s.id] : null;
1478
1518
  if (!overlay?.years?.length) continue;
1479
1519
  const ov = s.overlay;
@@ -1503,12 +1543,12 @@ function renderPlotGrid(container, plotConfig, results, options = {}) {
1503
1543
  traces.push(ovTrace);
1504
1544
  }
1505
1545
  });
1506
- traces.push(...await deriveSeriesTraces(
1507
- traces,
1508
- sp,
1509
- opts.seriesTransforms,
1510
- { onError: opts.onTransformError ?? void 0 }
1511
- ));
1546
+ traces.push(...await deriveSeriesTraces(traces, sp, opts.seriesTransforms, {
1547
+ onError: opts.onTransformError ?? void 0,
1548
+ seriesOf: (trace) => seriesByTrace.get(trace) ?? null,
1549
+ results: data,
1550
+ resolveSeries: opts.resolveSeries
1551
+ }));
1512
1552
  if (opts.derivedTraces) {
1513
1553
  const extra = await opts.derivedTraces(traces, sp, { results: data, index });
1514
1554
  if (Array.isArray(extra)) traces.push(...extra);
@@ -1667,7 +1707,8 @@ var PlotPopoutWindow = class {
1667
1707
  * renders the Config tab. What it returns is disposed (`dispose()`) when the
1668
1708
  * window closes, so an editor drawn there (renderPlotConfigEditor) goes with it.
1669
1709
  * @param {Object} [options.seriesTransforms] - `{ [id]: transform }` (series_transforms.js);
1670
- * absent => no derived series are drawn
1710
+ * absent => no derived series are drawn. Each runs as
1711
+ * `run(y, params, { series, subplot, results, resolveSeries })` (renderPlotGrid).
1671
1712
  * @param {string} [options.refreshEvent='data:changed'] - Bus event after which the
1672
1713
  * window re-reads `getResults()` and redraws.
1673
1714
  * @param {{delta?: string|null, complete?: string|null}} [options.streamEvents] - Bus
@@ -2799,4 +2840,4 @@ export {
2799
2840
  openPlotPopoutWindow,
2800
2841
  openRawTracesWindow
2801
2842
  };
2802
- //# sourceMappingURL=chunk-RMTRWWEO.js.map
2843
+ //# sourceMappingURL=chunk-2YTM3GJE.js.map