@particle-academy/fancy-flow 0.46.0 → 0.47.1

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 (70) hide show
  1. package/README.md +29 -0
  2. package/dist/{ConfigFieldRenderer-iMkZj0VK.d.ts → ConfigFieldRenderer-DrD2-Qml.d.ts} +1 -1
  3. package/dist/{ConfigFieldRenderer-Cyir8-B8.d.cts → ConfigFieldRenderer-NuDjtun1.d.cts} +1 -1
  4. package/dist/{chunk-P5SYH6M6.js → chunk-7DTUZUTB.js} +3 -3
  5. package/dist/{chunk-P5SYH6M6.js.map → chunk-7DTUZUTB.js.map} +1 -1
  6. package/dist/chunk-DRRZEAYB.js +196 -0
  7. package/dist/chunk-DRRZEAYB.js.map +1 -0
  8. package/dist/{chunk-MH4ZW4DJ.js → chunk-E6T3FZZP.js} +3 -5
  9. package/dist/chunk-E6T3FZZP.js.map +1 -0
  10. package/dist/{chunk-3BKU4SQZ.js → chunk-KTGXZBUM.js} +3 -4
  11. package/dist/chunk-KTGXZBUM.js.map +1 -0
  12. package/dist/{chunk-OWENS2H5.js → chunk-MJ3A3TAI.js} +1603 -36
  13. package/dist/chunk-MJ3A3TAI.js.map +1 -0
  14. package/dist/{chunk-HFUBVT7W.js → chunk-UVP43XU2.js} +7 -6
  15. package/dist/chunk-UVP43XU2.js.map +1 -0
  16. package/dist/durable.cjs +10174 -110
  17. package/dist/durable.cjs.map +1 -1
  18. package/dist/durable.js +3 -3
  19. package/dist/engine.cjs +10097 -47
  20. package/dist/engine.cjs.map +1 -1
  21. package/dist/engine.d.cts +2 -2
  22. package/dist/engine.d.ts +2 -2
  23. package/dist/engine.js +5 -7
  24. package/dist/engine.js.map +1 -1
  25. package/dist/fields/react-fancy.d.cts +2 -2
  26. package/dist/fields/react-fancy.d.ts +2 -2
  27. package/dist/index.cjs +203 -191
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +5 -5
  30. package/dist/index.d.ts +5 -5
  31. package/dist/index.js +13 -16
  32. package/dist/index.js.map +1 -1
  33. package/dist/registry/index.d.cts +3 -3
  34. package/dist/registry/index.d.ts +3 -3
  35. package/dist/{registry-D_kyUZEf.d.cts → registry-BnnifM-t.d.cts} +22 -3
  36. package/dist/{registry-LHB3MlR9.d.ts → registry-DpARG95T.d.ts} +22 -3
  37. package/dist/registry.cjs +2978 -2968
  38. package/dist/registry.cjs.map +1 -1
  39. package/dist/registry.js +3 -6
  40. package/dist/runtime.cjs +3692 -2536
  41. package/dist/runtime.cjs.map +1 -1
  42. package/dist/runtime.js +5 -6
  43. package/dist/schema.cjs +10369 -24
  44. package/dist/schema.cjs.map +1 -1
  45. package/dist/schema.js +4 -3
  46. package/dist/screens.cjs +1366 -38
  47. package/dist/screens.cjs.map +1 -1
  48. package/dist/screens.js +5 -8
  49. package/dist/screens.js.map +1 -1
  50. package/dist/{types--S2Kzx7w.d.cts → types-BO8TgI2M.d.cts} +1 -1
  51. package/dist/{types-ChkCRonF.d.ts → types-DJAmfiJC.d.ts} +1 -1
  52. package/dist/ux.cjs +10363 -2
  53. package/dist/ux.cjs.map +1 -1
  54. package/dist/ux.d.cts +1 -1
  55. package/dist/ux.d.ts +1 -1
  56. package/dist/ux.js +3 -1
  57. package/dist/ux.js.map +1 -1
  58. package/package.json +6 -2
  59. package/dist/chunk-3BKU4SQZ.js.map +0 -1
  60. package/dist/chunk-HFUBVT7W.js.map +0 -1
  61. package/dist/chunk-L43CWD63.js +0 -282
  62. package/dist/chunk-L43CWD63.js.map +0 -1
  63. package/dist/chunk-MH4ZW4DJ.js.map +0 -1
  64. package/dist/chunk-OWENS2H5.js.map +0 -1
  65. package/dist/chunk-PVROYW7C.js +0 -187
  66. package/dist/chunk-PVROYW7C.js.map +0 -1
  67. package/dist/chunk-RMU6YCIQ.js +0 -1274
  68. package/dist/chunk-RMU6YCIQ.js.map +0 -1
  69. package/dist/chunk-TITD5W4Y.js +0 -26
  70. package/dist/chunk-TITD5W4Y.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types--S2Kzx7w.cjs';
2
- export { C as ConfigField, j as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, k as NumberConfigField, R as RenderBodyContext, l as RepeaterConfigField, m as RepeaterRowField, n as SelectConfigField, o as SwitchConfigField, T as TextConfigField, p as TextareaConfigField } from '../types--S2Kzx7w.cjs';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-BO8TgI2M.cjs';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-BO8TgI2M.cjs';
3
3
  import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-Jx1TwehV.cjs';
4
4
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
5
5
  import { b as LlmRoute } from '../capabilities-Dmd26aAs.cjs';
@@ -7,7 +7,7 @@ export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRe
7
7
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from '../pause-9iT4tCEV.cjs';
8
8
  import * as react from 'react';
9
9
  import { ComponentType, ReactNode } from 'react';
10
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, e as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-D_kyUZEf.cjs';
10
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-BnnifM-t.cjs';
11
11
 
12
12
  /**
13
13
  * Connection validation — the single rule that decides whether an edge between
@@ -1,5 +1,5 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-ChkCRonF.js';
2
- export { C as ConfigField, j as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, k as NumberConfigField, R as RenderBodyContext, l as RepeaterConfigField, m as RepeaterRowField, n as SelectConfigField, o as SwitchConfigField, T as TextConfigField, p as TextareaConfigField } from '../types-ChkCRonF.js';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-DJAmfiJC.js';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-DJAmfiJC.js';
3
3
  import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-Jx1TwehV.js';
4
4
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
5
5
  import { b as LlmRoute } from '../capabilities-DMUhnyZD.js';
@@ -7,7 +7,7 @@ export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRe
7
7
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from '../pause-9iT4tCEV.js';
8
8
  import * as react from 'react';
9
9
  import { ComponentType, ReactNode } from 'react';
10
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, e as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-LHB3MlR9.js';
10
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-DpARG95T.js';
11
11
 
12
12
  /**
13
13
  * Connection validation — the single rule that decides whether an edge between
@@ -1,5 +1,24 @@
1
- import { N as NodeKindDefinition } from './types--S2Kzx7w.cjs';
1
+ import { N as NodeKindDefinition } from './types-BO8TgI2M.cjs';
2
2
 
3
+ /**
4
+ * Put the builtin kit in the registry before anyone reads or writes it.
5
+ *
6
+ * Registration used to be a bare `registerBuiltinKinds()` in `src/index.ts`, so
7
+ * it fired ONLY as an import side effect of that one entry. Every other route in
8
+ * — the `/engine` and `/registry` subpaths, or a root import that TypeScript
9
+ * erases because it only took types — got an empty registry, and an empty
10
+ * registry is silent: `getNodeKind()` returns null, `FlowViewer` falls through
11
+ * its title chain, and the canvas shows `@particle-academy/llm_call` where a
12
+ * name belongs.
13
+ *
14
+ * Doing it here instead means correctness no longer depends on which entry a
15
+ * consumer imported, or on a bundler agreeing to keep a top-level statement.
16
+ *
17
+ * The flag is set BEFORE the call so a listener that reads the registry from
18
+ * inside `notify()` cannot recurse. `registerNodeKind` ensures too, so builtins
19
+ * are always in place before a host registers over one of them.
20
+ */
21
+ declare function ensureBuiltinKinds(): void;
3
22
  /**
4
23
  * The presentation fields a consumer may override on someone else's node kind.
5
24
  *
@@ -43,7 +62,7 @@ declare function resolveKindId(id: string): string | null;
43
62
  * and the palette could not be localised at all.
44
63
  *
45
64
  * ```ts
46
- * const undo = overrideNodeKind("@particle-academy/http_request", {
65
+ * const undo = overrideNodeKind("@particle-academy/api_request", {
47
66
  * label: "Call an API",
48
67
  * description: "Fetch or post JSON to a URL",
49
68
  * });
@@ -82,4 +101,4 @@ declare function validateConfig(kind: NodeKindDefinition, config: Record<string,
82
101
  /** Default accents per category. */
83
102
  declare function categoryAccent(category: string): string;
84
103
 
85
- export { type NodeKindPresentation as N, resolveKindId as a, clearNodeKindOverrides as b, categoryAccent as c, defaultConfigFor as d, overrideNodeKind as e, getNodeKind as g, kindIds as k, listNodeKinds as l, onNodeKindsChanged as o, registerNodeKind as r, validateConfig as v };
104
+ export { type NodeKindPresentation as N, resolveKindId as a, clearNodeKindOverrides as b, categoryAccent as c, defaultConfigFor as d, ensureBuiltinKinds as e, overrideNodeKind as f, getNodeKind as g, kindIds as k, listNodeKinds as l, onNodeKindsChanged as o, registerNodeKind as r, validateConfig as v };
@@ -1,5 +1,24 @@
1
- import { N as NodeKindDefinition } from './types-ChkCRonF.js';
1
+ import { N as NodeKindDefinition } from './types-DJAmfiJC.js';
2
2
 
3
+ /**
4
+ * Put the builtin kit in the registry before anyone reads or writes it.
5
+ *
6
+ * Registration used to be a bare `registerBuiltinKinds()` in `src/index.ts`, so
7
+ * it fired ONLY as an import side effect of that one entry. Every other route in
8
+ * — the `/engine` and `/registry` subpaths, or a root import that TypeScript
9
+ * erases because it only took types — got an empty registry, and an empty
10
+ * registry is silent: `getNodeKind()` returns null, `FlowViewer` falls through
11
+ * its title chain, and the canvas shows `@particle-academy/llm_call` where a
12
+ * name belongs.
13
+ *
14
+ * Doing it here instead means correctness no longer depends on which entry a
15
+ * consumer imported, or on a bundler agreeing to keep a top-level statement.
16
+ *
17
+ * The flag is set BEFORE the call so a listener that reads the registry from
18
+ * inside `notify()` cannot recurse. `registerNodeKind` ensures too, so builtins
19
+ * are always in place before a host registers over one of them.
20
+ */
21
+ declare function ensureBuiltinKinds(): void;
3
22
  /**
4
23
  * The presentation fields a consumer may override on someone else's node kind.
5
24
  *
@@ -43,7 +62,7 @@ declare function resolveKindId(id: string): string | null;
43
62
  * and the palette could not be localised at all.
44
63
  *
45
64
  * ```ts
46
- * const undo = overrideNodeKind("@particle-academy/http_request", {
65
+ * const undo = overrideNodeKind("@particle-academy/api_request", {
47
66
  * label: "Call an API",
48
67
  * description: "Fetch or post JSON to a URL",
49
68
  * });
@@ -82,4 +101,4 @@ declare function validateConfig(kind: NodeKindDefinition, config: Record<string,
82
101
  /** Default accents per category. */
83
102
  declare function categoryAccent(category: string): string;
84
103
 
85
- export { type NodeKindPresentation as N, resolveKindId as a, clearNodeKindOverrides as b, categoryAccent as c, defaultConfigFor as d, overrideNodeKind as e, getNodeKind as g, kindIds as k, listNodeKinds as l, onNodeKindsChanged as o, registerNodeKind as r, validateConfig as v };
104
+ export { type NodeKindPresentation as N, resolveKindId as a, clearNodeKindOverrides as b, categoryAccent as c, defaultConfigFor as d, ensureBuiltinKinds as e, overrideNodeKind as f, getNodeKind as g, kindIds as k, listNodeKinds as l, onNodeKindsChanged as o, registerNodeKind as r, validateConfig as v };