@formity/system 0.2.1 → 0.4.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.
Files changed (85) hide show
  1. package/dist/index.cjs.js +1 -1
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +6 -6
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.esm.js +1 -1
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/types/controls.d.ts +18 -0
  8. package/dist/types/controls.d.ts.map +1 -0
  9. package/dist/types/handlers/basic.d.ts +9 -0
  10. package/dist/types/handlers/basic.d.ts.map +1 -0
  11. package/dist/types/handlers/typed.d.ts +12 -0
  12. package/dist/types/handlers/typed.d.ts.map +1 -0
  13. package/dist/types/handlers/untyped.d.ts +9 -0
  14. package/dist/types/handlers/untyped.d.ts.map +1 -0
  15. package/dist/types/schema/basic.d.ts +80 -0
  16. package/dist/types/schema/basic.d.ts.map +1 -0
  17. package/dist/types/schema/typed.d.ts +193 -0
  18. package/dist/types/schema/typed.d.ts.map +1 -0
  19. package/dist/types/schema/untyped.d.ts +83 -0
  20. package/dist/types/schema/untyped.d.ts.map +1 -0
  21. package/dist/types/state/inputs.d.ts +73 -0
  22. package/dist/types/state/inputs.d.ts.map +1 -0
  23. package/dist/types/state/point.d.ts +12 -0
  24. package/dist/types/state/point.d.ts.map +1 -0
  25. package/dist/types/state/position.d.ts +35 -0
  26. package/dist/types/state/position.d.ts.map +1 -0
  27. package/dist/types/state/state.d.ts +13 -0
  28. package/dist/types/state/state.d.ts.map +1 -0
  29. package/dist/types/utils.d.ts +8 -2
  30. package/dist/types/utils.d.ts.map +1 -1
  31. package/dist/types/values/yield.d.ts +5 -1
  32. package/dist/types/values/yield.d.ts.map +1 -1
  33. package/dist/types/values.d.ts +4 -1
  34. package/dist/types/values.d.ts.map +1 -1
  35. package/dist/utils/form.d.ts +7 -7
  36. package/dist/utils/form.d.ts.map +1 -1
  37. package/dist/utils/inputs/flow.cond.d.ts +32 -0
  38. package/dist/utils/inputs/flow.cond.d.ts.map +1 -0
  39. package/dist/utils/inputs/flow.cond.test.d.ts +2 -0
  40. package/dist/utils/inputs/flow.cond.test.d.ts.map +1 -0
  41. package/dist/utils/inputs/flow.d.ts +64 -0
  42. package/dist/utils/inputs/flow.d.ts.map +1 -0
  43. package/dist/utils/inputs/flow.list.d.ts +32 -0
  44. package/dist/utils/inputs/flow.list.d.ts.map +1 -0
  45. package/dist/utils/inputs/flow.list.test.d.ts +2 -0
  46. package/dist/utils/inputs/flow.list.test.d.ts.map +1 -0
  47. package/dist/utils/inputs/flow.loop.d.ts +32 -0
  48. package/dist/utils/inputs/flow.loop.d.ts.map +1 -0
  49. package/dist/utils/inputs/flow.loop.test.d.ts +2 -0
  50. package/dist/utils/inputs/flow.loop.test.d.ts.map +1 -0
  51. package/dist/utils/inputs/flow.switch.d.ts +32 -0
  52. package/dist/utils/inputs/flow.switch.d.ts.map +1 -0
  53. package/dist/utils/inputs/flow.switch.test.d.ts +2 -0
  54. package/dist/utils/inputs/flow.switch.test.d.ts.map +1 -0
  55. package/dist/utils/inputs/flow.test.d.ts +2 -0
  56. package/dist/utils/inputs/flow.test.d.ts.map +1 -0
  57. package/dist/utils/inputs/form.d.ts +30 -0
  58. package/dist/utils/inputs/form.d.ts.map +1 -0
  59. package/dist/utils/inputs/form.test.d.ts +2 -0
  60. package/dist/utils/inputs/form.test.d.ts.map +1 -0
  61. package/dist/utils/navigate.d.ts +10 -10
  62. package/dist/utils/navigate.d.ts.map +1 -1
  63. package/dist/utils/schema/flow.cond.d.ts +2 -2
  64. package/dist/utils/schema/flow.cond.d.ts.map +1 -1
  65. package/dist/utils/schema/flow.d.ts +2 -2
  66. package/dist/utils/schema/flow.d.ts.map +1 -1
  67. package/dist/utils/schema/flow.list.d.ts +2 -2
  68. package/dist/utils/schema/flow.list.d.ts.map +1 -1
  69. package/dist/utils/schema/flow.loop.d.ts +2 -2
  70. package/dist/utils/schema/flow.loop.d.ts.map +1 -1
  71. package/dist/utils/schema/flow.switch.d.ts +2 -2
  72. package/dist/utils/schema/flow.switch.d.ts.map +1 -1
  73. package/dist/utils/schema/form.d.ts +1 -1
  74. package/dist/utils/schema/form.d.ts.map +1 -1
  75. package/dist/utils/schema/return.d.ts +1 -1
  76. package/dist/utils/schema/return.d.ts.map +1 -1
  77. package/dist/utils/schema/variables.d.ts +1 -1
  78. package/dist/utils/schema/variables.d.ts.map +1 -1
  79. package/dist/utils/schema/yield.d.ts +1 -1
  80. package/dist/utils/schema/yield.d.ts.map +1 -1
  81. package/dist/utils/state.d.ts +13 -0
  82. package/dist/utils/state.d.ts.map +1 -0
  83. package/dist/utils/state.test.d.ts +2 -0
  84. package/dist/utils/state.test.d.ts.map +1 -0
  85. package/package.json +1 -1
@@ -0,0 +1,193 @@
1
+ import type { ItemValues, FlowValues, ListValues, CondValues, LoopValues, SwitchValues, FormValues, YieldValues, ReturnValues, VariablesValues } from "../values";
2
+ import type { OnNext, OnBack, GetState, SetState } from "../controls";
3
+ /**
4
+ * Defines the structure and behavior of any element in a multi-step form.
5
+ *
6
+ * @template Render The type of the rendered output for each form step. This can vary depending on
7
+ * the framework; for example, in React, it would typically be `ReactNode`.
8
+ *
9
+ * @template Values A type extending `ItemValues` that defines the structure of the multi-step form,
10
+ * including the values handled in each phase.
11
+ *
12
+ * @template Inputs An object type representing additional values available during form execution,
13
+ * beyond those generated by the multi-step form itself.
14
+ *
15
+ * @template Params An object type defining the values accessible when rendering each form step in
16
+ * the multi-step process.
17
+ */
18
+ export type ItemSchema<Render, Values extends ItemValues, Inputs extends object, Params extends object> = Values extends FlowValues ? FlowSchema<Render, Values, Inputs, Params> : Values extends FormValues ? FormSchema<Render, Values, Inputs, Params> : Values extends YieldValues ? YieldSchema<Values, Inputs> : Values extends ReturnValues ? ReturnSchema<Values, Inputs> : Values extends VariablesValues ? VariablesSchema<Values, Inputs> : never;
19
+ /**
20
+ * Defines the structure and behavior of any flow element in a multi-step form.
21
+ *
22
+ * @template Render The type of the rendered output for each form step. This can vary depending on
23
+ * the framework; for example, in React, it would typically be `ReactNode`.
24
+ *
25
+ * @template Values A type extending `FlowValues` that defines the structure of the multi-step form,
26
+ * including the values handled in each phase.
27
+ *
28
+ * @template Inputs An object type representing additional values available during form execution,
29
+ * beyond those generated by the multi-step form itself.
30
+ *
31
+ * @template Params An object type defining the values accessible when rendering each form step in
32
+ * the multi-step process.
33
+ */
34
+ export type FlowSchema<Render, Values extends FlowValues, Inputs extends object, Params extends object> = Values extends ListValues ? ListSchema<Render, Values, Inputs, Params> : Values extends CondValues ? CondSchema<Render, Values, Inputs, Params> : Values extends LoopValues ? LoopSchema<Render, Values, Inputs, Params> : Values extends SwitchValues ? SwitchSchema<Render, Values, Inputs, Params> : never;
35
+ /**
36
+ * Defines the structure and behavior of a list element in a multi-step form.
37
+ *
38
+ * @template Render The type of the rendered output for each form step. This can vary depending on
39
+ * the framework; for example, in React, it would typically be `ReactNode`.
40
+ *
41
+ * @template Values A type extending `ListValues` that defines the structure of the multi-step form,
42
+ * including the values handled in each phase.
43
+ *
44
+ * @template Inputs An object type representing additional values available during form execution,
45
+ * beyond those generated by the multi-step form itself.
46
+ *
47
+ * @template Params An object type defining the values accessible when rendering each form step in
48
+ * the multi-step process.
49
+ */
50
+ export type ListSchema<Render, Values extends ListValues, Inputs extends object, Params extends object> = Values extends [infer First, ...infer Other] ? First extends ItemValues ? Other extends ListValues ? [
51
+ ItemSchema<Render, First, Inputs, Params>,
52
+ ...ListSchema<Render, Other, Join<Inputs, ItemOutput<First>>, Params>
53
+ ] : never : never : [];
54
+ /**
55
+ * Defines the structure and behavior of a condition element in a multi-step form.
56
+ *
57
+ * @template Render The type of the rendered output for each form step. This can vary depending on
58
+ * the framework; for example, in React, it would typically be `ReactNode`.
59
+ *
60
+ * @template Values A type extending `CondValues` that defines the structure of the multi-step form,
61
+ * including the values handled in each phase.
62
+ *
63
+ * @template Inputs An object type representing additional values available during form execution,
64
+ * beyond those generated by the multi-step form itself.
65
+ *
66
+ * @template Params An object type defining the values accessible when rendering each form step in
67
+ * the multi-step process.
68
+ */
69
+ export type CondSchema<Render, Values extends CondValues, Inputs extends object, Params extends object> = {
70
+ cond: {
71
+ if: (inputs: Inputs) => boolean;
72
+ then: ListSchema<Render, Values["cond"]["then"], Inputs, Params>;
73
+ else: ListSchema<Render, Values["cond"]["else"], Inputs, Params>;
74
+ };
75
+ };
76
+ /**
77
+ * Defines the structure and behavior of a loop element in a multi-step form.
78
+ *
79
+ * @template Render The type of the rendered output for each form step. This can vary depending on
80
+ * the framework; for example, in React, it would typically be `ReactNode`.
81
+ *
82
+ * @template Values A type extending `LoopValues` that defines the structure of the multi-step form,
83
+ * including the values handled in each phase.
84
+ *
85
+ * @template Inputs An object type representing additional values available during form execution,
86
+ * beyond those generated by the multi-step form itself.
87
+ *
88
+ * @template Params An object type defining the values accessible when rendering each form step in
89
+ * the multi-step process.
90
+ */
91
+ export type LoopSchema<Render, Values extends LoopValues, Inputs extends object, Params extends object> = {
92
+ loop: {
93
+ while: (inputs: Inputs) => boolean;
94
+ do: ListSchema<Render, Values["loop"]["do"], Inputs, Params>;
95
+ };
96
+ };
97
+ /**
98
+ * Defines the structure and behavior of a switch element in a multi-step form.
99
+ *
100
+ * @template Render The type of the rendered output for each form step. This can vary depending on
101
+ * the framework; for example, in React, it would typically be `ReactNode`.
102
+ *
103
+ * @template Values A type extending `SwitchValues` that defines the structure of the multi-step
104
+ * form, including the values handled in each phase.
105
+ *
106
+ * @template Inputs An object type representing additional values available during form execution,
107
+ * beyond those generated by the multi-step form itself.
108
+ *
109
+ * @template Params An object type defining the values accessible when rendering each form step in
110
+ * the multi-step process.
111
+ */
112
+ export type SwitchSchema<Render, Values extends SwitchValues, Inputs extends object, Params extends object> = {
113
+ switch: {
114
+ branches: SwitchBranchesSchema<Render, Values["switch"]["branches"], Inputs, Params>;
115
+ default: ListSchema<Render, Values["switch"]["default"], Inputs, Params>;
116
+ };
117
+ };
118
+ type SwitchBranchesSchema<Render, Values extends ListValues[], Inputs extends object, Params extends object> = Values extends [infer First, ...infer Other] ? First extends ListValues ? Other extends ListValues[] ? [
119
+ {
120
+ case: (inputs: Inputs) => boolean;
121
+ then: ListSchema<Render, First, Inputs, Params>;
122
+ },
123
+ ...SwitchBranchesSchema<Render, Other, Inputs, Params>
124
+ ] : never : never : [];
125
+ /**
126
+ * Defines the structure and behavior of a form element in a multi-step form.
127
+ *
128
+ * @template Render The type of the rendered output for each form step. This can vary depending on
129
+ * the framework; for example, in React, it would typically be `ReactNode`.
130
+ *
131
+ * @template Values A type extending `FormValues` that defines the values of the form element.
132
+ *
133
+ * @template Inputs An object type representing additional values available during form execution,
134
+ * beyond those generated by the multi-step form itself.
135
+ *
136
+ * @template Params An object type defining the values accessible when rendering each form step in
137
+ * the multi-step process.
138
+ */
139
+ export type FormSchema<Render, Values extends FormValues, Inputs extends object, Params extends object> = {
140
+ form: {
141
+ values: (inputs: Inputs) => {
142
+ [K in keyof Values["form"]]: [Values["form"][K], PropertyKey[]];
143
+ };
144
+ render: (args: {
145
+ inputs: Inputs;
146
+ values: Values["form"];
147
+ params: Params;
148
+ onNext: OnNext;
149
+ onBack: OnBack;
150
+ getState: GetState;
151
+ setState: SetState;
152
+ }) => Render;
153
+ };
154
+ };
155
+ /**
156
+ * Defines the structure and behavior of a yield element in a multi-step form.
157
+ *
158
+ * @template Values A type extending `YieldValues` that defines the values of the yield element.
159
+ * @template Inputs An object type representing additional values available during form execution,
160
+ * beyond those generated by the multi-step form itself.
161
+ */
162
+ export type YieldSchema<Values extends YieldValues, Inputs extends object> = {
163
+ yield: {
164
+ next: (inputs: Inputs) => Values["yield"]["next"];
165
+ back: (inputs: Inputs) => Values["yield"]["back"];
166
+ };
167
+ };
168
+ /**
169
+ * Defines the structure and behavior of a return element in a multi-step form.
170
+ *
171
+ * @template Values A type extending `ReturnValues` that defines the values of the return element.
172
+ * @template Inputs An object type representing additional values available during form execution,
173
+ * beyond those generated by the multi-step form itself.
174
+ */
175
+ export type ReturnSchema<Values extends ReturnValues, Inputs extends object> = {
176
+ return: (inputs: Inputs) => Values["return"];
177
+ };
178
+ /**
179
+ * Defines the structure and behavior of a variables element in a multi-step form.
180
+ *
181
+ * @template Values A type extending `VariablesValues` that defines the values of the variables element.
182
+ * @template Inputs An object type representing additional values available during form execution,
183
+ * beyond those generated by the multi-step form itself.
184
+ */
185
+ export type VariablesSchema<Values extends VariablesValues, Inputs extends object> = {
186
+ variables: (inputs: Inputs) => Values["variables"];
187
+ };
188
+ type Join<T extends object, U extends object> = Omit<T, keyof U> & U;
189
+ type ItemOutput<Values extends ItemValues> = Values extends FormValues ? FormOutput<Values> : Values extends VariablesValues ? VariablesOutput<Values> : object;
190
+ type FormOutput<Values extends FormValues> = Values["form"];
191
+ type VariablesOutput<Values extends VariablesValues> = Values["variables"];
192
+ export {};
193
+ //# sourceMappingURL=typed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../../src/types/schema/typed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,eAAe,EAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,UAAU,CACpB,MAAM,EACN,MAAM,SAAS,UAAU,EACzB,MAAM,SAAS,MAAM,EACrB,MAAM,SAAS,MAAM,IACnB,MAAM,SAAS,UAAU,GACzB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC1C,MAAM,SAAS,UAAU,GACzB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC1C,MAA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SAAS,WAAW,EAAE,MAAM,SAAS,MAAM,IAAI;IAC3E,KAAK,EAAE;QACL,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;KACnD,CAAC;CACH,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,CAAC,MAAM,SAAS,YAAY,EAAE,MAAM,SAAS,MAAM,IAAI;IAC7E,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CACzB,MAAM,SAAS,eAAe,EAC9B,MAAM,SAAS,MAAM,IACnB;IACF,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,WAAW,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AAErE,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,IAAI,MAAM,SAAS,UAAU,GAClE,UAAU,CAAC,MAAM,CAAC,GAClB,MAAM,SAAS,eAAe,GAC9B,eAAe,CAAC,MAAM,CAAC,GACvB,MAAM,CAAC;AAEX,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;AAC5D,KAAK,eAAe,CAAC,MAAM,SAAS,eAAe,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,83 @@
1
+ import type { OnNext, OnBack, GetState, SetState } from "../controls";
2
+ /**
3
+ * Defines the structure and behavior of any element in a multi-step form.
4
+ */
5
+ export type ItemSchema = FlowSchema | FormSchema | YieldSchema | ReturnSchema | VariablesSchema;
6
+ /**
7
+ * Defines the structure and behavior of any flow element in a multi-step form.
8
+ */
9
+ export type FlowSchema = ListSchema | CondSchema | LoopSchema | SwitchSchema;
10
+ /**
11
+ * Defines the structure and behavior of a list element in a multi-step form.
12
+ */
13
+ export type ListSchema = ItemSchema[];
14
+ /**
15
+ * Defines the structure and behavior of a condition element in a multi-step form.
16
+ */
17
+ export type CondSchema = {
18
+ cond: {
19
+ if: (inputs: object) => boolean;
20
+ then: ListSchema;
21
+ else: ListSchema;
22
+ };
23
+ };
24
+ /**
25
+ * Defines the structure and behavior of a loop element in a multi-step form.
26
+ */
27
+ export type LoopSchema = {
28
+ loop: {
29
+ while: (inputs: object) => boolean;
30
+ do: ListSchema;
31
+ };
32
+ };
33
+ /**
34
+ * Defines the structure and behavior of a switch element in a multi-step form.
35
+ */
36
+ export type SwitchSchema = {
37
+ switch: {
38
+ branches: {
39
+ case: (inputs: object) => boolean;
40
+ then: ListSchema;
41
+ }[];
42
+ default: ListSchema;
43
+ };
44
+ };
45
+ /**
46
+ * Defines the structure and behavior of a form element in a multi-step form.
47
+ */
48
+ export type FormSchema = {
49
+ form: {
50
+ values: (inputs: object) => Record<string, [unknown, PropertyKey[]]>;
51
+ render: (args: {
52
+ inputs: object;
53
+ values: object;
54
+ params: object;
55
+ onNext: OnNext;
56
+ onBack: OnBack;
57
+ getState: GetState;
58
+ setState: SetState;
59
+ }) => unknown;
60
+ };
61
+ };
62
+ /**
63
+ * Defines the structure and behavior of a yield element in a multi-step form.
64
+ */
65
+ export type YieldSchema = {
66
+ yield: {
67
+ next: (inputs: object) => object[];
68
+ back: (inputs: object) => object[];
69
+ };
70
+ };
71
+ /**
72
+ * Defines the structure and behavior of a return element in a multi-step form.
73
+ */
74
+ export type ReturnSchema = {
75
+ return: (inputs: object) => object;
76
+ };
77
+ /**
78
+ * Defines the structure and behavior of a variables element in a multi-step form.
79
+ */
80
+ export type VariablesSchema = {
81
+ variables: (inputs: object) => object;
82
+ };
83
+ //# sourceMappingURL=untyped.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"untyped.d.ts","sourceRoot":"","sources":["../../../src/types/schema/untyped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,WAAW,GACX,YAAY,GACZ,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,EAAE,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE;QACJ,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;QAChC,IAAI,EAAE,UAAU,CAAC;QACjB,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;QACnC,EAAE,EAAE,UAAU,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;YAClC,IAAI,EAAE,UAAU,CAAC;SAClB,EAAE,CAAC;QACJ,OAAO,EAAE,UAAU,CAAC;KACrB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QACrE,MAAM,EAAE,CAAC,IAAI,EAAE;YACb,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,QAAQ,CAAC;YACnB,QAAQ,EAAE,QAAQ,CAAC;SACpB,KAAK,OAAO,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE;QACL,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;QACnC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;KACpC,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Union of `FlowInputs` and `FormInputs`.
3
+ */
4
+ export type ItemInputs = FlowInputs | FormInputs;
5
+ /**
6
+ * Values entered for the forms that are within any flow control structure.
7
+ */
8
+ export type FlowInputs = ListInputs | CondInputs | LoopInputs | SwitchInputs;
9
+ /**
10
+ * Values entered for the forms that are within a list.
11
+ */
12
+ export type ListInputs = {
13
+ type: "list";
14
+ list: {
15
+ [position: number]: ItemInputs;
16
+ };
17
+ };
18
+ /**
19
+ * Values entered for the forms that are within a condition.
20
+ */
21
+ export type CondInputs = {
22
+ type: "cond";
23
+ then: {
24
+ [position: number]: ItemInputs;
25
+ };
26
+ else: {
27
+ [position: number]: ItemInputs;
28
+ };
29
+ };
30
+ /**
31
+ * Values entered for the forms that are within a loop.
32
+ */
33
+ export type LoopInputs = {
34
+ type: "loop";
35
+ list: {
36
+ [position: number]: ItemInputs;
37
+ };
38
+ };
39
+ /**
40
+ * Values entered for the forms that are within a switch.
41
+ */
42
+ export type SwitchInputs = {
43
+ type: "switch";
44
+ branches: {
45
+ [position: number]: {
46
+ [position: number]: ItemInputs;
47
+ };
48
+ };
49
+ default: {
50
+ [position: number]: ItemInputs;
51
+ };
52
+ };
53
+ /**
54
+ * Values entered for a form.
55
+ */
56
+ export type FormInputs = {
57
+ [key: string]: NameInputs;
58
+ };
59
+ /**
60
+ * Values entered for a single form value.
61
+ */
62
+ export type NameInputs = {
63
+ data: {
64
+ here: true;
65
+ data: unknown;
66
+ } | {
67
+ here: false;
68
+ };
69
+ keys: {
70
+ [key: PropertyKey]: NameInputs;
71
+ };
72
+ };
73
+ //# sourceMappingURL=inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/types/state/inputs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG;YAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;SAAE,CAAA;KAAE,CAAC;IACrE,OAAO,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE,CAAC;IACtD,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,CAAA;KAAE,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Position } from "./position";
2
+ /**
3
+ * Represents a specific position within a multi-step form and its associated values.
4
+ *
5
+ * @property path An array of `Position` objects that define the position within the multi-step form.
6
+ * @property values An object containing the values associated with the position.
7
+ */
8
+ export type Point = {
9
+ path: Position[];
10
+ values: object;
11
+ };
12
+ //# sourceMappingURL=point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/types/state/point.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Represents a position within a flow control structure of a multi-step form. This can be a list, a conditional, a loop, or a switch.
3
+ */
4
+ export type Position = ListPosition | CondPosition | LoopPosition | SwitchPosition;
5
+ /**
6
+ * Represents a position within a list.
7
+ */
8
+ export type ListPosition = {
9
+ type: "list";
10
+ slot: number;
11
+ };
12
+ /**
13
+ * Represents a position within a conditional.
14
+ */
15
+ export type CondPosition = {
16
+ type: "cond";
17
+ path: "then" | "else";
18
+ slot: number;
19
+ };
20
+ /**
21
+ * Represents a position within a loop.
22
+ */
23
+ export type LoopPosition = {
24
+ type: "loop";
25
+ slot: number;
26
+ };
27
+ /**
28
+ * Represents a position within a switch.
29
+ */
30
+ export type SwitchPosition = {
31
+ type: "switch";
32
+ branch: number;
33
+ slot: number;
34
+ };
35
+ //# sourceMappingURL=position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/types/state/position.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Point } from "./point";
2
+ import { ListInputs } from "./inputs";
3
+ /**
4
+ * Represents the progression of steps completed in a multi-step form.
5
+ *
6
+ * @property points An array of `Point` objects. The last point in the array represents the current position with the associated values.
7
+ * @property inputs A `ListInputs` object that contains the values entered at each step of the form.
8
+ */
9
+ export type State = {
10
+ points: Point[];
11
+ inputs: ListInputs;
12
+ };
13
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/types/state/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC"}
@@ -44,9 +44,15 @@ export type Form<Values extends object> = {
44
44
  /**
45
45
  * Utility type that defines the values of a yield element in a multi-step form.
46
46
  */
47
- export type Yield<Values extends object> = {
47
+ export type Yield<Values extends {
48
+ next: object[];
49
+ back: object[];
50
+ }> = {
48
51
  type: "yield";
49
- yield: Values;
52
+ yield: {
53
+ next: Values["next"];
54
+ back: Values["back"];
55
+ };
50
56
  };
51
57
  /**
52
58
  * Utility type that defines the values of a return element in a multi-step form.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,IAAI,CAAC,MAAM,SAAS;IAAE,IAAI,EAAE,UAAU,CAAC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C,MAAM,CAAC,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;KACtB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,MAAM,SAAS,MAAM,IAAI;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,MAAM,IAAI;IAC7C,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -6,7 +6,7 @@ export type Yield<Values extends ListValues> = ListData<Values, never> extends [
6
6
  infer Next,
7
7
  unknown
8
8
  ] ? Next : never;
9
- type ItemData<Values extends ItemValues, Data> = Values extends ListValues ? ListData<Values, Data> : Values extends CondValues ? CondData<Values, Data> : Values extends LoopValues ? LoopData<Values, Data> : Values extends SwitchValues ? SwitchData<Values, Data> : Values extends YieldValues ? [Data | Values["yield"], false] : Values extends ReturnValues ? [Data, true] : [Data, false];
9
+ type ItemData<Values extends ItemValues, Data> = Values extends ListValues ? ListData<Values, Data> : Values extends CondValues ? CondData<Values, Data> : Values extends LoopValues ? LoopData<Values, Data> : Values extends SwitchValues ? SwitchData<Values, Data> : Values extends YieldValues ? YieldData<Values, Data> : Values extends ReturnValues ? [Data, true] : [Data, false];
10
10
  type ListData<Values extends ListValues, Data> = Values extends [
11
11
  infer First,
12
12
  ...infer Other
@@ -20,6 +20,10 @@ type SwitchData<Values extends SwitchValues, Data> = RoutesData<[
20
20
  ...Values["switch"]["branches"],
21
21
  Values["switch"]["default"]
22
22
  ], Data>;
23
+ type YieldData<Values extends YieldValues, Data> = [
24
+ Data | Values["yield"]["next"][number] | Values["yield"]["back"][number],
25
+ false
26
+ ];
23
27
  type RoutesData<Values extends ListValues[], Data, RoutesReturn = true> = Values extends [infer First, ...infer Other] ? First extends ListValues ? Other extends ListValues[] ? ListData<First, Data> extends [infer Next, infer Return] ? RoutesReturn extends false ? RoutesData<Other, Next, false> : RoutesData<Other, Next, Return> : never : never : never : [Data, RoutesReturn];
24
28
  export {};
25
29
  //# sourceMappingURL=yield.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"yield.d.ts","sourceRoot":"","sources":["../../../src/types/values/yield.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACb,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,MAAM,SAAS,UAAU,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS;IAC7E,MAAM,IAAI;IACV,OAAO;CACR,GACG,IAAI,GACJ,KAAK,CAAC;AAEV,KAAK,QAAQ,CAAC,MAAM,SAAS,UAAU,EAAE,IAAI,IAAI,MAAM,SAAS,UAAU,GACtE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,GACtB,MAAM,SAAS,UAAU,GACzB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,GACtB,MAAM,SAAS,UAAU,GACzB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,GACtB,MAAM,SAAS,YAAY,GAC3B,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,GACxB,MAAM,SAAS,WAAW,GAC1B,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,GAC/B,MAAM,SAAS,YAAY,GAC3B,CAAC,IAAI,EAAE,IAAI,CAAC,GACZ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAElB,KAAK,QAAQ,CAAC,MAAM,SAAS,UAAU,EAAE,IAAI,IAAI,MAAM,SAAS;IAC9D,MAAM,KAAK;IACX,GAAG,MAAM,KAAK;CACf,GACG,KAAK,SAAS,UAAU,GACtB,KAAK,SAAS,UAAU,GACtB,QAAQ,CAAC,KAAK,EAAE,IAAI,C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SAAS,UAAU,GACtB,KAAK,SAAS,UAAU,EAAE,GACxB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,MAAM,MAAM,CAAC,GACtD,YAAY,SAAS,KAAK,GACxB,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,GAC9B,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,GACjC,KAAK,GACP,KAAK,GACP,KAAK,GACP,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC"}
@@ -51,7 +51,10 @@ export type FormValues = {
51
51
  */
52
52
  export type YieldValues = {
53
53
  type: "yield";
54
- yield: object;
54
+ yield: {
55
+ next: object[];
56
+ back: object[];
57
+ };
55
58
  };
56
59
  /**
57
60
  * This type is meant to be extended and is used to define the values of a return element in a multi-step form.
@@ -1 +1 @@
1
- {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/types/values.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,WAAW,GACX,YAAY,GACZ,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,EAAE,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU,CAAC;QACjB,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,EAAE,EAAE,UAAU,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,E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,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE;QACN,QAAQ,EAAE,UAAU,EAAE,CAAC;QACvB,OAAO,EAAE,UAAU,CAAC;KACrB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,18 +1,18 @@
1
- import type { Flow } from "../types/flow/flow";
2
- import type { ListSchema as CustomListSchema } from "../types/schema/custom";
1
+ import type { State } from "../types/state/state";
2
+ import type { ListSchema as TypedListSchema } from "../types/schema/typed";
3
3
  import type { ListValues } from "../types/values";
4
- import type { OnNext, OnBack, GetFlow, SetFlow } from "../types/callbacks";
4
+ import type { OnNext, OnBack, GetState, SetState } from "../types/controls";
5
5
  /**
6
6
  * Returns the rendered form for the current step of the multi-step form.
7
7
  *
8
- * @param flow The current state of the multi-step form.
8
+ * @param state The current state of the multi-step form.
9
9
  * @param schema The `ListSchema` object representing the multi-step form.
10
10
  * @param params An object containing the parameters for the form.
11
11
  * @param onNext A callback function used to navigate to the next step of the multi-step form.
12
12
  * @param onBack A callback function used to navigate to the previous step of the multi-step form.
13
- * @param getFlow A callback function used to get the current state of the multi-step form.
14
- * @param setFlow A callback function used to set the current state of the multi-step form.
13
+ * @param getState A callback function used to get the current state of the multi-step form.
14
+ * @param setState A callback function used to set the current state of the multi-step form.
15
15
  * @returns The rendered form for the current step of the multi-step form.
16
16
  */
17
- export declare function getForm<Render, Values extends ListValues, Inputs extends object, Params extends object>(flow: Flow, schema: CustomListSchema<Render, Values, Inputs, Params>, params: Params, onNext: OnNext, onBack: OnBack, getFlow: GetFlow, setFlow: SetFlow): Render;
17
+ export declare function getForm<Render, Values extends ListValues, Inputs extends object, Params extends object>(state: State, schema: TypedListSchema<Render, Values, Inputs, Params>, params: Params, onNext: OnNext, onBack: OnBack, getState: GetState, setState: SetState): Render;
18
18
  //# sourceMappingURL=form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/utils/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAK3E;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,MAAM,EACN,MAAM,SAAS,UAAU,EACzB,MAAM,SAAS,MAAM,EACrB,MAAM,SAAS,MAAM,EAErB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACxD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACf,MAAM,CAYR"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/utils/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK5E;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,MAAM,EACN,MAAM,SAAS,UAAU,EACzB,MAAM,SAAS,MAAM,EACrB,MAAM,SAAS,MAAM,EAErB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACvD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAYR"}
@@ -0,0 +1,32 @@
1
+ import type { ItemInputs, FlowInputs, CondInputs } from "../../types/state/inputs";
2
+ import type { Position } from "../../types/state/position";
3
+ /**
4
+ * Creates a `CondInputs` object.
5
+ *
6
+ * @returns The created `CondInputs` object.
7
+ */
8
+ export declare function create(): FlowInputs;
9
+ /**
10
+ * Clones a `CondInputs` object.
11
+ *
12
+ * @param flow A `CondInputs` object.
13
+ * @returns The cloned `CondInputs` object.
14
+ */
15
+ export declare function clone(flow: CondInputs): FlowInputs;
16
+ /**
17
+ * Returns the `ItemInputs` object at the given position within the given `CondInputs` object, or `null` if there is no item at the given position.
18
+ *
19
+ * @param flow The `CondInputs` object.
20
+ * @param position The position within the `CondInputs` object.
21
+ * @returns The `ItemInputs` object at the given position within the `CondInputs` object, or `null` if there is no item at the given position.
22
+ */
23
+ export declare function getItem(flow: CondInputs, position: Position): ItemInputs | null;
24
+ /**
25
+ * Sets the `ItemInputs` object at the given position within the given `CondInputs` object.
26
+ *
27
+ * @param flow The `CondInputs` object.
28
+ * @param position The position within the `CondInputs` object.
29
+ * @param item The `ItemInputs` object to set.
30
+ */
31
+ export declare function setItem(flow: CondInputs, position: Position, item: ItemInputs): void;
32
+ //# sourceMappingURL=flow.cond.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow.cond.d.ts","sourceRoot":"","sources":["../../../src/utils/inputs/flow.cond.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAEzE;;;;GAIG;AACH,wBAAgB,MAAM,IAAI,UAAU,CAEnC;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,QAAQ,GACjB,UAAU,GAAG,IAAI,CAInB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,UAAU,GACf,IAAI,CAGN"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=flow.cond.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow.cond.test.d.ts","sourceRoot":"","sources":["../../../src/utils/inputs/flow.cond.test.ts"],"names":[],"mappings":""}