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