@particle-academy/fancy-flow 0.26.0 → 0.27.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/index.cjs CHANGED
@@ -13161,9 +13161,13 @@ function NodeConfigPanel({
13161
13161
  return /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: ["ff-panel", className ?? ""].filter(Boolean).join(" "), style: style2, children: [
13162
13162
  header,
13163
13163
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "ff-panel__header", children: [
13164
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-panel__kind-tag", children: kind.label }),
13165
- kind.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ff-panel__kind-desc", children: kind.description })
13164
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-panel__head-icon", style: { background: kind.accent ?? categoryAccent(kind.category) }, "aria-hidden": true, children: kind.icon }),
13165
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ff-panel__head-text", children: [
13166
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-panel__head-kind", children: kind.label }),
13167
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-panel__head-name", children: node.data.label || kind.label })
13168
+ ] })
13166
13169
  ] }),
13170
+ kind.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ff-panel__kind-desc", children: kind.description }),
13167
13171
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ff-panel__field", children: [
13168
13172
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "ff-panel__label", children: "Label" }),
13169
13173
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -13238,17 +13242,29 @@ function FlowRunControls({ running, onRun, onCancel, onReset, className, style:
13238
13242
  onReset && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "ff-run-controls__btn ff-run-controls__btn--reset", onClick: onReset, disabled: running, children: "Reset" })
13239
13243
  ] });
13240
13244
  }
13241
- function FlowRunFeed({ entries, className, style: style2 }) {
13245
+ function FlowRunFeed({ entries, showHeader = true, title = "Run feed", running, className, style: style2 }) {
13242
13246
  const scrollRef = ReactExports.useRef(null);
13243
13247
  ReactExports.useEffect(() => {
13244
13248
  const el = scrollRef.current;
13245
13249
  if (el) el.scrollTop = el.scrollHeight;
13246
13250
  }, [entries.length]);
13247
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ["ff-run-feed", className ?? ""].filter(Boolean).join(" "), style: style2, ref: scrollRef, children: entries.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ff-run-feed__empty", children: "No run events yet." }) : entries.map((e) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `ff-run-feed__row ff-run-feed__row--${e.level}`, children: [
13248
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__time", children: formatTime(e.at) }),
13249
- e.nodeId && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__node", children: e.nodeId }),
13250
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__text", children: e.text })
13251
- ] }, e.id)) });
13251
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["ff-run-feed", className ?? ""].filter(Boolean).join(" "), style: style2, children: [
13252
+ showHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ff-run-feed__header", children: [
13253
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__title", "aria-hidden": true, children: "\u25B8" }),
13254
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__title-text", children: title }),
13255
+ running && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__badge", children: "running" }),
13256
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ff-run-feed__count", children: [
13257
+ entries.length,
13258
+ " ",
13259
+ entries.length === 1 ? "event" : "events"
13260
+ ] })
13261
+ ] }),
13262
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ff-run-feed__body", ref: scrollRef, children: entries.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ff-run-feed__empty", children: "No run events yet." }) : entries.map((e) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `ff-run-feed__row ff-run-feed__row--${e.level}`, children: [
13263
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__time", children: formatTime(e.at) }),
13264
+ e.nodeId && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__node", children: e.nodeId }),
13265
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ff-run-feed__text", children: e.text })
13266
+ ] }, e.id)) })
13267
+ ] });
13252
13268
  }
13253
13269
  function formatTime(at2) {
13254
13270
  const d = new Date(at2);
@@ -14493,7 +14509,7 @@ function FlowEditorInner({
14493
14509
  onCancel: () => setLabelEdit(null)
14494
14510
  }
14495
14511
  ),
14496
- showFeed && (slots.feed ? slots.feed(api) : /* @__PURE__ */ jsxRuntime.jsx(FlowRunFeed, { entries: runner.feed, className: "ff-editor__feed" })),
14512
+ showFeed && (slots.feed ? slots.feed(api) : /* @__PURE__ */ jsxRuntime.jsx(FlowRunFeed, { entries: runner.feed, running: api.running, className: "ff-editor__feed" })),
14497
14513
  prompt && /* @__PURE__ */ jsxRuntime.jsx(HumanPrompt, { request: prompt, onCancel: () => {
14498
14514
  setPrompt(null);
14499
14515
  runner.cancel();