@tangle-network/sandbox-ui 0.55.0 → 0.56.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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GTJ5PSK5.js";
4
4
  import {
5
5
  buildWorkflowGraph
6
- } from "./chunk-DEN4GUA7.js";
6
+ } from "./chunk-WEYFEMIN.js";
7
7
  import {
8
8
  providerLabel
9
9
  } from "./chunk-7JLB7UZ3.js";
@@ -43,7 +43,7 @@ function pickDetail(cfg, keys) {
43
43
  }
44
44
  return Object.keys(out).length > 0 ? out : void 0;
45
45
  }
46
- function describeAction(action) {
46
+ function describeActionBase(action) {
47
47
  const rec = asRecord(action);
48
48
  const [kind] = Object.keys(rec);
49
49
  const cfg = asRecord(rec[kind]);
@@ -134,6 +134,41 @@ function describeAction(action) {
134
134
  };
135
135
  }
136
136
  }
137
+ var MAX_CONFIG_DEPTH = 100;
138
+ function toJsonSafe(value, seen = /* @__PURE__ */ new WeakSet(), depth = 0) {
139
+ if (value === null) return null;
140
+ if (typeof value === "number") return Number.isFinite(value) ? value : null;
141
+ if (typeof value === "string" || typeof value === "boolean") return value;
142
+ if (typeof value !== "object") return void 0;
143
+ if (value instanceof Date) return value.toISOString();
144
+ if (seen.has(value)) return "[Circular]";
145
+ if (depth >= MAX_CONFIG_DEPTH) return "[Max depth exceeded]";
146
+ seen.add(value);
147
+ let out;
148
+ if (Array.isArray(value)) {
149
+ out = value.map((v) => {
150
+ const s = toJsonSafe(v, seen, depth + 1);
151
+ return s === void 0 ? null : s;
152
+ });
153
+ } else {
154
+ const obj = {};
155
+ for (const [k, v] of Object.entries(value)) {
156
+ const s = toJsonSafe(v, seen, depth + 1);
157
+ if (s !== void 0) obj[k] = s;
158
+ }
159
+ out = obj;
160
+ }
161
+ seen.delete(value);
162
+ return out;
163
+ }
164
+ function withConfig(base, cfg) {
165
+ return Object.keys(cfg).length > 0 ? { ...base, config: toJsonSafe(cfg) } : base;
166
+ }
167
+ function describeAction(action) {
168
+ const rec = asRecord(action);
169
+ const [kind] = Object.keys(rec);
170
+ return withConfig(describeActionBase(action), asRecord(rec[kind]));
171
+ }
137
172
  function describeTrigger(on) {
138
173
  const rec = asRecord(on);
139
174
  if (rec.provider_event) {
@@ -146,36 +181,46 @@ function describeTrigger(on) {
146
181
  if (event) subtitle += ` \xB7 ${event}`;
147
182
  if (actions.length > 0) subtitle += ` (${actions.join("/")})`;
148
183
  if (repo) subtitle += ` on ${repo}`;
149
- return {
150
- title: "Trigger",
151
- kind: "provider_event",
152
- subtitle,
153
- provider: connection,
154
- hasBranches: false,
155
- isRoot: true,
156
- tone: "trigger"
157
- };
184
+ return withConfig(
185
+ {
186
+ title: "Trigger",
187
+ kind: "provider_event",
188
+ subtitle,
189
+ provider: connection,
190
+ hasBranches: false,
191
+ isRoot: true,
192
+ tone: "trigger"
193
+ },
194
+ ev
195
+ );
158
196
  }
159
197
  if (rec.schedule) {
160
198
  const sch = asRecord(rec.schedule);
161
199
  const cron = str(sch.cron);
162
200
  const tz = str(sch.timezone);
163
- return {
164
- title: "Schedule",
165
- kind: "schedule",
166
- subtitle: cron ? tz ? `${cron} (${tz})` : cron : void 0,
201
+ return withConfig(
202
+ {
203
+ title: "Schedule",
204
+ kind: "schedule",
205
+ subtitle: cron ? tz ? `${cron} (${tz})` : cron : void 0,
206
+ hasBranches: false,
207
+ isRoot: true,
208
+ tone: "trigger"
209
+ },
210
+ sch
211
+ );
212
+ }
213
+ const [kind] = Object.keys(rec);
214
+ return withConfig(
215
+ {
216
+ title: "Trigger",
217
+ kind: "trigger",
167
218
  hasBranches: false,
168
219
  isRoot: true,
169
220
  tone: "trigger"
170
- };
171
- }
172
- return {
173
- title: "Trigger",
174
- kind: "trigger",
175
- hasBranches: false,
176
- isRoot: true,
177
- tone: "trigger"
178
- };
221
+ },
222
+ asRecord(kind ? rec[kind] : void 0)
223
+ );
179
224
  }
180
225
  function buildWorkflowGraph(yaml, options) {
181
226
  const reserveRunState = options?.reserveRunState ?? false;
@@ -58,6 +58,14 @@ interface WfNodeData extends Record<string, unknown> {
58
58
  path?: string;
59
59
  /** Notable config fields for the expand drawer (kept small + stringified). */
60
60
  detail?: Record<string, string>;
61
+ /** The raw, UNTRUNCATED config for this node — the action/trigger config from
62
+ * the definition. The compact card reads {@link detail}; a full-detail view
63
+ * (e.g. a node drawer) reads this to render every field — the complete prompt,
64
+ * all profile/source/input keys — without the card-sized clamp. It is a
65
+ * JSON-safe deep copy of the config (cycles and non-JSON values normalized),
66
+ * so a consumer can serialize or render it freely. Omitted when the node has
67
+ * no config. */
68
+ config?: Record<string, unknown>;
61
69
  /** Connector slug (e.g. `github`) for the provider chip, when one applies. */
62
70
  provider?: string;
63
71
  /** Small corner tag, e.g. "×3" for a parallel fan-out. */
package/dist/workflows.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildWorkflowGraph
3
- } from "./chunk-DEN4GUA7.js";
3
+ } from "./chunk-WEYFEMIN.js";
4
4
  import "./chunk-7JLB7UZ3.js";
5
5
  import "./chunk-U67V476Y.js";
6
6
 
@@ -27,7 +27,7 @@ function retryImport(factory, retries = 2, delayMs = 350) {
27
27
  function lazyWorkflowGraph() {
28
28
  return lazy(
29
29
  () => retryImport(
30
- () => import("./WorkflowGraph-FSS7GW5O.js").then((m) => ({ default: m.WorkflowGraph }))
30
+ () => import("./WorkflowGraph-VMG2ZEAN.js").then((m) => ({ default: m.WorkflowGraph }))
31
31
  )
32
32
  );
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.55.0",
3
+ "version": "0.56.0",
4
4
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
5
5
  "repository": {
6
6
  "type": "git",