@surveystudio/node-registery 1.4.0 → 1.6.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/README.md CHANGED
@@ -10,13 +10,14 @@ This package is currently in early migration. It exports migrated node logic for
10
10
  import { logicRegistry } from "@surveystudio/node-registery/logic";
11
11
  import { runnerRegistry } from "@surveystudio/node-registery/runner";
12
12
  import { builderRegistry } from "@surveystudio/node-registery/builder";
13
+ import { TextLikeNode, ChoiceNode } from "@surveystudio/node-registery/ui";
13
14
  ```
14
15
 
15
16
  Use `/logic` for Worker, export, and server runtimes. It is intentionally React-free.
16
17
 
17
- Use `/runner` and `/builder` only in React runtimes. React is a peer dependency and is not bundled.
18
+ Use `/runner`, `/builder`, and `/ui` only in React runtimes. React is a peer dependency and is not bundled. The `/ui` entrypoint contains shadcn-style primitive parts for node UIs; Worker and API runtimes should keep importing only `/logic`.
18
19
 
19
- Builder manifests/adapters are available for the migrated input, choice, scale, consent, and plain text nodes.
20
+ Builder manifests/adapters are available for the migrated input, choice, scale, structured choice, consent, media, flow, captcha, emoji rating, and plain text nodes.
20
21
 
21
22
  ## Logic Pipeline
22
23
 
@@ -44,9 +45,20 @@ Migrated nodes:
44
45
  - `multipleChoice` logic
45
46
  - `dropdown` logic
46
47
  - `ranking` logic
48
+ - `matrixChoice` logic
49
+ - `cascadingChoice` logic
47
50
  - `rating` logic
48
51
  - `slider` logic
49
52
  - `consent` logic
53
+ - `captcha` logic
54
+ - `image` logic
55
+ - `video` logic
56
+ - `audio` logic
50
57
  - `plainText`
58
+ - `emojiRating` logic
59
+ - `start` logic
60
+ - `end` logic
61
+ - `branch` logic
62
+ - `validation` logic
51
63
 
52
- The registry contract test intentionally fails until all planned question nodes are migrated.
64
+ The registry contract test covers every migrated logic and builder node so package consumers fail fast if an entrypoint goes stale.
@@ -1,7 +1,7 @@
1
- export { B as BuilderRegistry, C as CompleteBuilderRegistry, N as NodeBuilder, a as NodeBuilderProps, b as NodeCanvasProps, Q as QuestionNodeDefinition, d as defineBuilderRegistry, c as defineQuestionNode } from './types-CgiAR_DF.mjs';
2
- import { J as JsonValue } from './coreTypes-YSpR0Oyh.mjs';
3
- export { N as NodeManifest, P as PropertyField, a as PropertyFieldType, S as SelectOption } from './coreTypes-YSpR0Oyh.mjs';
4
- import { P as PlainTextData, C as ConsentData, D as DropdownData, M as MultipleChoiceData, R as RankingData, S as SingleChoiceData, a as RatingData, b as SliderData, B as BaseTextData, c as MultiInputData, N as NumberInputData, T as TextInputData, Z as ZipCodeInputData } from './types-CR3fIHCT.mjs';
1
+ export { B as BuilderRegistry, C as CompleteBuilderRegistry, N as NodeBuilder, a as NodeBuilderProps, b as NodeCanvasProps, Q as QuestionNodeDefinition, d as defineBuilderRegistry, c as defineQuestionNode } from './types-BMMQVXYP.mjs';
2
+ import { J as JsonValue, P as PropertyField } from './coreTypes-D5NniS2n.mjs';
3
+ export { N as NodeManifest, a as PropertyFieldType, S as SelectOption } from './coreTypes-D5NniS2n.mjs';
4
+ import { P as PlainTextData, C as CaptchaData, E as EmojiRatingData, A as AudioData, B as BaseMediaData, I as ImageData, V as VideoData, a as BranchData, b as ConditionData, c as EndData, S as StartData, d as ValidationData, e as ConsentData, D as DropdownData, M as MultipleChoiceData, R as RankingData, f as SingleChoiceData, g as RatingData, h as SliderData, i as CascadingChoiceData, j as MatrixChoiceData, k as BaseTextData, l as MultiInputData, N as NumberInputData, T as TextInputData, Z as ZipCodeInputData } from './types-D3jarfsb.mjs';
5
5
  import 'react';
6
6
 
7
7
  declare const plainTextBuilder: {
@@ -9,6 +9,46 @@ declare const plainTextBuilder: {
9
9
  label: string;
10
10
  };
11
11
 
12
+ declare const captchaBuilder: {
13
+ type: "captcha";
14
+ label: string;
15
+ };
16
+
17
+ declare const emojiRatingBuilder: {
18
+ type: "emojiRating";
19
+ label: string;
20
+ };
21
+
22
+ declare const imageBuilder: {
23
+ type: "image";
24
+ label: string;
25
+ };
26
+ declare const videoBuilder: {
27
+ type: "video";
28
+ label: string;
29
+ };
30
+ declare const audioBuilder: {
31
+ type: "audio";
32
+ label: string;
33
+ };
34
+
35
+ declare const startBuilder: {
36
+ type: "start";
37
+ label: string;
38
+ };
39
+ declare const branchBuilder: {
40
+ type: "branch";
41
+ label: string;
42
+ };
43
+ declare const validationBuilder: {
44
+ type: "validation";
45
+ label: string;
46
+ };
47
+ declare const endBuilder: {
48
+ type: "end";
49
+ label: string;
50
+ };
51
+
12
52
  declare const consentBuilder: {
13
53
  type: "consent";
14
54
  label: string;
@@ -40,6 +80,15 @@ declare const sliderBuilder: {
40
80
  label: string;
41
81
  };
42
82
 
83
+ declare const matrixChoiceBuilder: {
84
+ type: "matrixChoice";
85
+ label: string;
86
+ };
87
+ declare const cascadingChoiceBuilder: {
88
+ type: "cascadingChoice";
89
+ label: string;
90
+ };
91
+
43
92
  declare const plainTextManifest: {
44
93
  type: "plainText";
45
94
  label: string;
@@ -79,6 +128,265 @@ declare const plainTextManifest: {
79
128
  })[];
80
129
  };
81
130
 
131
+ declare const captchaManifest: {
132
+ type: "captcha";
133
+ label: string;
134
+ description: string;
135
+ category: "input";
136
+ dataType: "text";
137
+ defaultData: CaptchaData;
138
+ properties: ({
139
+ name: string;
140
+ label: string;
141
+ type: "text";
142
+ placeholder: string;
143
+ defaultValue?: never;
144
+ helperText?: never;
145
+ } | {
146
+ name: string;
147
+ label: string;
148
+ type: "textarea";
149
+ placeholder: string;
150
+ defaultValue: string;
151
+ helperText?: never;
152
+ } | {
153
+ name: string;
154
+ label: string;
155
+ type: "switch";
156
+ defaultValue: false;
157
+ helperText: string;
158
+ placeholder?: never;
159
+ } | {
160
+ name: string;
161
+ label: string;
162
+ type: "condition";
163
+ defaultValue: {
164
+ id: string;
165
+ type: "group";
166
+ logicType: "AND";
167
+ children: never[];
168
+ };
169
+ helperText: string;
170
+ placeholder?: never;
171
+ } | {
172
+ name: string;
173
+ label: string;
174
+ type: "text";
175
+ placeholder: string;
176
+ helperText: string;
177
+ defaultValue?: never;
178
+ })[];
179
+ };
180
+
181
+ declare const emojiRatingManifest: {
182
+ type: "emojiRating";
183
+ label: string;
184
+ description: string;
185
+ category: "choice";
186
+ dataType: "option";
187
+ defaultData: EmojiRatingData;
188
+ properties: ({
189
+ name: string;
190
+ label: string;
191
+ type: "text";
192
+ placeholder: string;
193
+ defaultValue?: never;
194
+ helperText?: never;
195
+ } | {
196
+ name: string;
197
+ label: string;
198
+ type: "textarea";
199
+ placeholder: string;
200
+ defaultValue: string;
201
+ helperText?: never;
202
+ } | {
203
+ name: string;
204
+ label: string;
205
+ type: "switch";
206
+ defaultValue: false;
207
+ helperText: string;
208
+ placeholder?: never;
209
+ } | {
210
+ name: string;
211
+ label: string;
212
+ type: "condition";
213
+ defaultValue: {
214
+ id: string;
215
+ type: "group";
216
+ logicType: "AND";
217
+ children: never[];
218
+ };
219
+ helperText: string;
220
+ placeholder?: never;
221
+ } | {
222
+ name: string;
223
+ label: string;
224
+ type: "emojiOptions";
225
+ defaultValue: {
226
+ label: string;
227
+ value: string;
228
+ }[];
229
+ placeholder?: never;
230
+ helperText?: never;
231
+ })[];
232
+ };
233
+
234
+ declare const imageManifest: {
235
+ type: "image";
236
+ label: string;
237
+ description: string;
238
+ category: "media";
239
+ dataType: "object";
240
+ defaultData: ImageData;
241
+ properties: (PropertyField<BaseMediaData> | {
242
+ name: string;
243
+ label: string;
244
+ type: "condition";
245
+ defaultValue: {
246
+ id: string;
247
+ type: "group";
248
+ logicType: "AND";
249
+ children: never[];
250
+ };
251
+ helperText: string;
252
+ })[];
253
+ };
254
+ declare const videoManifest: {
255
+ type: "video";
256
+ label: string;
257
+ description: string;
258
+ category: "media";
259
+ dataType: "object";
260
+ defaultData: VideoData;
261
+ properties: (PropertyField<BaseMediaData> | {
262
+ name: string;
263
+ label: string;
264
+ type: "condition";
265
+ defaultValue: {
266
+ id: string;
267
+ type: "group";
268
+ logicType: "AND";
269
+ children: never[];
270
+ };
271
+ helperText: string;
272
+ })[];
273
+ };
274
+ declare const audioManifest: {
275
+ type: "audio";
276
+ label: string;
277
+ description: string;
278
+ category: "media";
279
+ dataType: "object";
280
+ defaultData: AudioData;
281
+ properties: (PropertyField<BaseMediaData> | {
282
+ name: string;
283
+ label: string;
284
+ type: "condition";
285
+ defaultValue: {
286
+ id: string;
287
+ type: "group";
288
+ logicType: "AND";
289
+ children: never[];
290
+ };
291
+ helperText: string;
292
+ })[];
293
+ };
294
+
295
+ declare const startManifest: {
296
+ type: "start";
297
+ label: string;
298
+ description: string;
299
+ category: "flow";
300
+ dataType: "none";
301
+ defaultData: StartData;
302
+ properties: {
303
+ name: string;
304
+ label: string;
305
+ type: "textarea";
306
+ placeholder: string;
307
+ }[];
308
+ };
309
+ declare const branchManifest: {
310
+ type: "branch";
311
+ label: string;
312
+ description: string;
313
+ category: "logic";
314
+ dataType: "none";
315
+ defaultData: BranchData;
316
+ properties: {
317
+ name: string;
318
+ label: string;
319
+ type: "condition";
320
+ defaultValue: ConditionData;
321
+ }[];
322
+ };
323
+ declare const validationManifest: {
324
+ type: "validation";
325
+ label: string;
326
+ description: string;
327
+ category: "logic";
328
+ dataType: "none";
329
+ defaultData: ValidationData;
330
+ properties: ({
331
+ name: string;
332
+ label: string;
333
+ type: "text";
334
+ placeholder: string;
335
+ defaultValue: string;
336
+ options?: never;
337
+ } | {
338
+ name: string;
339
+ label: string;
340
+ type: "condition";
341
+ defaultValue: ConditionData;
342
+ placeholder?: never;
343
+ options?: never;
344
+ } | {
345
+ name: string;
346
+ label: string;
347
+ type: "select";
348
+ defaultValue: string;
349
+ options: {
350
+ label: string;
351
+ value: string;
352
+ }[];
353
+ placeholder?: never;
354
+ })[];
355
+ };
356
+ declare const endManifest: {
357
+ type: "end";
358
+ label: string;
359
+ description: string;
360
+ category: "flow";
361
+ dataType: "none";
362
+ defaultData: EndData;
363
+ properties: ({
364
+ name: string;
365
+ label: string;
366
+ type: "textarea";
367
+ placeholder: string;
368
+ defaultValue?: never;
369
+ options?: never;
370
+ } | {
371
+ name: string;
372
+ label: string;
373
+ type: "text";
374
+ placeholder: string;
375
+ defaultValue?: never;
376
+ options?: never;
377
+ } | {
378
+ name: string;
379
+ label: string;
380
+ type: "select";
381
+ defaultValue: string;
382
+ options: {
383
+ label: string;
384
+ value: string;
385
+ }[];
386
+ placeholder?: never;
387
+ })[];
388
+ };
389
+
82
390
  declare const consentManifest: {
83
391
  type: "consent";
84
392
  label: string;
@@ -504,6 +812,80 @@ declare const sliderManifest: {
504
812
  })[];
505
813
  };
506
814
 
815
+ declare const matrixChoiceManifest: {
816
+ type: "matrixChoice";
817
+ label: string;
818
+ description: string;
819
+ category: "choice";
820
+ dataType: "object";
821
+ defaultData: MatrixChoiceData;
822
+ properties: ({
823
+ name: string;
824
+ label: string;
825
+ type: "text";
826
+ defaultValue?: never;
827
+ } | {
828
+ name: string;
829
+ label: string;
830
+ type: "textarea";
831
+ defaultValue?: never;
832
+ } | {
833
+ name: string;
834
+ label: string;
835
+ type: "condition";
836
+ defaultValue: {
837
+ id: string;
838
+ type: "group";
839
+ logicType: "AND";
840
+ children: never[];
841
+ };
842
+ } | {
843
+ name: string;
844
+ label: string;
845
+ type: "options";
846
+ defaultValue: never[];
847
+ } | {
848
+ name: string;
849
+ label: string;
850
+ type: "switch";
851
+ defaultValue: false;
852
+ })[];
853
+ };
854
+ declare const cascadingChoiceManifest: {
855
+ type: "cascadingChoice";
856
+ label: string;
857
+ description: string;
858
+ category: "choice";
859
+ dataType: "array";
860
+ defaultData: CascadingChoiceData;
861
+ properties: ({
862
+ name: string;
863
+ label: string;
864
+ type: "text";
865
+ defaultValue?: never;
866
+ } | {
867
+ name: string;
868
+ label: string;
869
+ type: "textarea";
870
+ defaultValue?: never;
871
+ } | {
872
+ name: string;
873
+ label: string;
874
+ type: "condition";
875
+ defaultValue: {
876
+ id: string;
877
+ type: "group";
878
+ logicType: "AND";
879
+ children: never[];
880
+ };
881
+ } | {
882
+ name: string;
883
+ label: string;
884
+ type: "stepBuilder";
885
+ defaultValue: never[];
886
+ })[];
887
+ };
888
+
507
889
  declare const textInputBuilder: {
508
890
  type: "textInput";
509
891
  label: string;
@@ -785,6 +1167,14 @@ declare const builderRegistry: {
785
1167
  type: "ranking";
786
1168
  label: string;
787
1169
  };
1170
+ readonly cascadingChoice: {
1171
+ type: "cascadingChoice";
1172
+ label: string;
1173
+ };
1174
+ readonly matrixChoice: {
1175
+ type: "matrixChoice";
1176
+ label: string;
1177
+ };
788
1178
  readonly rating: {
789
1179
  type: "rating";
790
1180
  label: string;
@@ -797,10 +1187,46 @@ declare const builderRegistry: {
797
1187
  type: "consent";
798
1188
  label: string;
799
1189
  };
1190
+ readonly captcha: {
1191
+ type: "captcha";
1192
+ label: string;
1193
+ };
1194
+ readonly image: {
1195
+ type: "image";
1196
+ label: string;
1197
+ };
1198
+ readonly video: {
1199
+ type: "video";
1200
+ label: string;
1201
+ };
1202
+ readonly audio: {
1203
+ type: "audio";
1204
+ label: string;
1205
+ };
800
1206
  readonly plainText: {
801
1207
  type: "plainText";
802
1208
  label: string;
803
1209
  };
1210
+ readonly emojiRating: {
1211
+ type: "emojiRating";
1212
+ label: string;
1213
+ };
1214
+ readonly start: {
1215
+ type: "start";
1216
+ label: string;
1217
+ };
1218
+ readonly end: {
1219
+ type: "end";
1220
+ label: string;
1221
+ };
1222
+ readonly branch: {
1223
+ type: "branch";
1224
+ label: string;
1225
+ };
1226
+ readonly validation: {
1227
+ type: "validation";
1228
+ label: string;
1229
+ };
804
1230
  };
805
1231
 
806
- export { builderRegistry, consentBuilder, consentManifest, dateInputBuilder, dateInputManifest, dropdownBuilder, dropdownManifest, emailInputBuilder, emailInputManifest, multiInputBuilder, multiInputManifest, multipleChoiceBuilder, multipleChoiceManifest, numberInputBuilder, numberInputManifest, plainTextBuilder, plainTextManifest, rankingBuilder, rankingManifest, ratingBuilder, ratingManifest, singleChoiceBuilder, singleChoiceManifest, sliderBuilder, sliderManifest, textInputBuilder, textInputManifest, zipCodeInputBuilder, zipCodeInputManifest };
1232
+ export { PropertyField, audioBuilder, audioManifest, branchBuilder, branchManifest, builderRegistry, captchaBuilder, captchaManifest, cascadingChoiceBuilder, cascadingChoiceManifest, consentBuilder, consentManifest, dateInputBuilder, dateInputManifest, dropdownBuilder, dropdownManifest, emailInputBuilder, emailInputManifest, emojiRatingBuilder, emojiRatingManifest, endBuilder, endManifest, imageBuilder, imageManifest, matrixChoiceBuilder, matrixChoiceManifest, multiInputBuilder, multiInputManifest, multipleChoiceBuilder, multipleChoiceManifest, numberInputBuilder, numberInputManifest, plainTextBuilder, plainTextManifest, rankingBuilder, rankingManifest, ratingBuilder, ratingManifest, singleChoiceBuilder, singleChoiceManifest, sliderBuilder, sliderManifest, startBuilder, startManifest, textInputBuilder, textInputManifest, validationBuilder, validationManifest, videoBuilder, videoManifest, zipCodeInputBuilder, zipCodeInputManifest };