@particle-academy/fancy-flow 0.52.0 → 0.53.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/{chunk-JOXMAWAI.js → chunk-CIBW5ATA.js} +148 -5
- package/dist/chunk-CIBW5ATA.js.map +1 -0
- package/dist/{chunk-PEX3ZGCO.js → chunk-FG3C7LIG.js} +3 -3
- package/dist/{chunk-PEX3ZGCO.js.map → chunk-FG3C7LIG.js.map} +1 -1
- package/dist/{chunk-PU3CLTAG.js → chunk-FH6MWLKD.js} +3 -3
- package/dist/{chunk-PU3CLTAG.js.map → chunk-FH6MWLKD.js.map} +1 -1
- package/dist/{chunk-PWIHOR57.js → chunk-FTGVVKWX.js} +4 -4
- package/dist/{chunk-PWIHOR57.js.map → chunk-FTGVVKWX.js.map} +1 -1
- package/dist/{chunk-I7ZDPY7C.js → chunk-VWANLNL5.js} +3 -3
- package/dist/{chunk-I7ZDPY7C.js.map → chunk-VWANLNL5.js.map} +1 -1
- package/dist/{chunk-RR7A6IUW.js → chunk-WCFRKXH5.js} +3 -3
- package/dist/{chunk-RR7A6IUW.js.map → chunk-WCFRKXH5.js.map} +1 -1
- package/dist/durable.cjs +103 -2
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +103 -2
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +3 -3
- package/dist/index.cjs +218 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +84 -46
- package/dist/index.js.map +1 -1
- package/dist/registry.cjs +103 -2
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.cjs +103 -2
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema.cjs +103 -2
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/screens.cjs +103 -2
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.js +4 -4
- package/dist/ux.cjs +103 -2
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-JOXMAWAI.js.map +0 -1
package/dist/runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-
|
|
2
|
-
export { runCohort } from './chunk-
|
|
3
|
-
export { RunIdentity, escapeSegment, runFlow } from './chunk-
|
|
1
|
+
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-FG3C7LIG.js';
|
|
2
|
+
export { runCohort } from './chunk-WCFRKXH5.js';
|
|
3
|
+
export { RunIdentity, escapeSegment, runFlow } from './chunk-CIBW5ATA.js';
|
|
4
4
|
import './chunk-F5RPRB7A.js';
|
|
5
5
|
import './chunk-USL4FMFU.js';
|
|
6
6
|
//# sourceMappingURL=runtime.js.map
|
package/dist/schema.cjs
CHANGED
|
@@ -9,6 +9,59 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var ReactExports__default = /*#__PURE__*/_interopDefault(ReactExports);
|
|
10
10
|
|
|
11
11
|
// src/registry/builtin.ts
|
|
12
|
+
|
|
13
|
+
// src/components/FlowEditor/human-fields.ts
|
|
14
|
+
var HUMAN_FIELD_TYPE_ALIASES = {
|
|
15
|
+
text: "text",
|
|
16
|
+
string: "text",
|
|
17
|
+
str: "text",
|
|
18
|
+
input: "text",
|
|
19
|
+
textarea: "textarea",
|
|
20
|
+
long_text: "textarea",
|
|
21
|
+
longtext: "textarea",
|
|
22
|
+
"long-text": "textarea",
|
|
23
|
+
multiline: "textarea",
|
|
24
|
+
paragraph: "textarea",
|
|
25
|
+
markdown: "textarea",
|
|
26
|
+
number: "number",
|
|
27
|
+
numeric: "number",
|
|
28
|
+
integer: "number",
|
|
29
|
+
int: "number",
|
|
30
|
+
float: "number",
|
|
31
|
+
decimal: "number",
|
|
32
|
+
select: "select",
|
|
33
|
+
enum: "select",
|
|
34
|
+
choice: "select",
|
|
35
|
+
choices: "select",
|
|
36
|
+
dropdown: "select",
|
|
37
|
+
options: "select",
|
|
38
|
+
radio: "select",
|
|
39
|
+
switch: "switch",
|
|
40
|
+
bool: "switch",
|
|
41
|
+
boolean: "switch",
|
|
42
|
+
checkbox: "switch",
|
|
43
|
+
toggle: "switch",
|
|
44
|
+
date: "date",
|
|
45
|
+
datetime: "datetime",
|
|
46
|
+
"datetime-local": "datetime",
|
|
47
|
+
datetimelocal: "datetime",
|
|
48
|
+
timestamp: "datetime",
|
|
49
|
+
time: "time",
|
|
50
|
+
email: "email",
|
|
51
|
+
"e-mail": "email",
|
|
52
|
+
url: "url",
|
|
53
|
+
uri: "url",
|
|
54
|
+
link: "url",
|
|
55
|
+
tel: "tel",
|
|
56
|
+
phone: "tel",
|
|
57
|
+
telephone: "tel",
|
|
58
|
+
password: "password",
|
|
59
|
+
secret: "password"
|
|
60
|
+
};
|
|
61
|
+
function humanFieldType(raw) {
|
|
62
|
+
if (typeof raw !== "string") return "text";
|
|
63
|
+
return HUMAN_FIELD_TYPE_ALIASES[raw.trim().toLowerCase()] ?? "text";
|
|
64
|
+
}
|
|
12
65
|
function RichInputPreview({ config }) {
|
|
13
66
|
const title = typeof config.title === "string" && config.title.trim() !== "" ? config.title : "Untitled step";
|
|
14
67
|
config.document;
|
|
@@ -9576,6 +9629,20 @@ var subflowExecutor = async (ctx) => {
|
|
|
9576
9629
|
};
|
|
9577
9630
|
|
|
9578
9631
|
// src/registry/builtin.ts
|
|
9632
|
+
var HUMAN_FIELD_OUTPUT_TYPE = {
|
|
9633
|
+
text: "string",
|
|
9634
|
+
textarea: "string",
|
|
9635
|
+
select: "string",
|
|
9636
|
+
date: "string",
|
|
9637
|
+
datetime: "string",
|
|
9638
|
+
time: "string",
|
|
9639
|
+
email: "string",
|
|
9640
|
+
url: "string",
|
|
9641
|
+
tel: "string",
|
|
9642
|
+
password: "string",
|
|
9643
|
+
number: "number",
|
|
9644
|
+
switch: "boolean"
|
|
9645
|
+
};
|
|
9579
9646
|
function casePorts(cases) {
|
|
9580
9647
|
const byPort = /* @__PURE__ */ new Map();
|
|
9581
9648
|
if (cases && typeof cases === "object" && !Array.isArray(cases)) {
|
|
@@ -9673,7 +9740,17 @@ var KINDS = [
|
|
|
9673
9740
|
name: "@particle-academy/user_input",
|
|
9674
9741
|
// The keys an author declared on THIS node — the case a static list cannot
|
|
9675
9742
|
// express, and the one issue #5 named.
|
|
9676
|
-
|
|
9743
|
+
//
|
|
9744
|
+
// The TYPE comes from the same normalizer the form renders with, so the
|
|
9745
|
+
// variable picker agrees with what the run actually resolves. It used to say
|
|
9746
|
+
// `string` for every field, which was wrong the moment a field was a number
|
|
9747
|
+
// or a switch — the picker told an author `{{ $json.age }}` was text while
|
|
9748
|
+
// the form handed the next node a number.
|
|
9749
|
+
outputShape: (config) => (config.fields ?? []).filter((f) => typeof f.key === "string" && f.key !== "").map((f) => ({
|
|
9750
|
+
path: f.key,
|
|
9751
|
+
type: HUMAN_FIELD_OUTPUT_TYPE[humanFieldType(f.type)],
|
|
9752
|
+
description: f.label
|
|
9753
|
+
})),
|
|
9677
9754
|
aliases: ["user_input", "@fancy/user_input"],
|
|
9678
9755
|
pausesForHuman: "input",
|
|
9679
9756
|
category: "human",
|
|
@@ -9700,14 +9777,38 @@ var KINDS = [
|
|
|
9700
9777
|
key: "type",
|
|
9701
9778
|
label: "Type",
|
|
9702
9779
|
default: "text",
|
|
9780
|
+
// Every control `HumanPrompt` can render. A type the form supports
|
|
9781
|
+
// but the panel cannot select is reachable only by hand-editing the
|
|
9782
|
+
// workflow JSON — which is the audience this panel exists for.
|
|
9703
9783
|
options: [
|
|
9704
9784
|
{ value: "text", label: "Text" },
|
|
9705
9785
|
{ value: "textarea", label: "Long text" },
|
|
9706
9786
|
{ value: "number", label: "Number" },
|
|
9707
9787
|
{ value: "select", label: "Select" },
|
|
9708
|
-
{ value: "switch", label: "Switch" }
|
|
9788
|
+
{ value: "switch", label: "Switch (yes / no)" },
|
|
9789
|
+
{ value: "date", label: "Date" },
|
|
9790
|
+
{ value: "datetime", label: "Date + time" },
|
|
9791
|
+
{ value: "time", label: "Time" },
|
|
9792
|
+
{ value: "email", label: "Email" },
|
|
9793
|
+
{ value: "url", label: "URL" },
|
|
9794
|
+
{ value: "tel", label: "Phone" },
|
|
9795
|
+
{ value: "password", label: "Password" }
|
|
9709
9796
|
]
|
|
9710
9797
|
},
|
|
9798
|
+
{
|
|
9799
|
+
// Without this a panel-authored select had nothing to choose from,
|
|
9800
|
+
// so it rendered an empty dropdown — the type was declarable and
|
|
9801
|
+
// unusable in the same breath.
|
|
9802
|
+
type: "keyvalue",
|
|
9803
|
+
key: "options",
|
|
9804
|
+
label: "Choices",
|
|
9805
|
+
description: "Select fields only. Left is the value the flow receives, right is what the person sees.",
|
|
9806
|
+
keyLabel: "Value",
|
|
9807
|
+
valueLabel: "Label",
|
|
9808
|
+
keyPlaceholder: "small",
|
|
9809
|
+
valuePlaceholder: "Small",
|
|
9810
|
+
addLabel: "Add choice"
|
|
9811
|
+
},
|
|
9711
9812
|
{ type: "switch", key: "required", label: "Required", default: false }
|
|
9712
9813
|
],
|
|
9713
9814
|
default: [{ key: "answer", label: "Your answer", type: "textarea", required: true }]
|