@bitflow/core 0.4.0 → 0.5.3

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 (90) hide show
  1. package/dist/{types/bits.d.ts → bits.d.ts} +2 -3
  2. package/dist/{cjs/bitsSchema.d.ts → bitsSchema.d.ts} +0 -0
  3. package/dist/{cjs/do.d.ts → do.d.ts} +0 -0
  4. package/dist/{cjs/doSchema.d.ts → doSchema.d.ts} +94 -18
  5. package/dist/{cjs/findLast.d.ts → findLast.d.ts} +0 -0
  6. package/dist/{types/flow.d.ts → flow.d.ts} +7 -1
  7. package/dist/{types/flowSchema.d.ts → flowSchema.d.ts} +76 -12
  8. package/dist/{cjs/groupBy.d.ts → groupBy.d.ts} +0 -0
  9. package/dist/index.cjs.js +732 -0
  10. package/dist/index.cjs.js.map +7 -0
  11. package/dist/{cjs/index.d.ts → index.d.ts} +0 -0
  12. package/dist/index.esm.mjs +703 -0
  13. package/dist/index.esm.mjs.map +7 -0
  14. package/dist/{cjs/lerpColor.d.ts → lerpColor.d.ts} +0 -0
  15. package/dist/{cjs/levenshtein.d.ts → levenshtein.d.ts} +0 -0
  16. package/dist/{cjs/uuid.d.ts → uuid.d.ts} +0 -0
  17. package/package.json +19 -23
  18. package/CHANGELOG.md +0 -32
  19. package/dist/cjs/bits.d.ts +0 -129
  20. package/dist/cjs/bits.js +0 -30
  21. package/dist/cjs/bits.js.map +0 -1
  22. package/dist/cjs/bitsSchema.js +0 -77
  23. package/dist/cjs/bitsSchema.js.map +0 -1
  24. package/dist/cjs/do.js +0 -85
  25. package/dist/cjs/do.js.map +0 -1
  26. package/dist/cjs/doSchema.js +0 -38
  27. package/dist/cjs/doSchema.js.map +0 -1
  28. package/dist/cjs/findLast.js +0 -13
  29. package/dist/cjs/findLast.js.map +0 -1
  30. package/dist/cjs/flow.d.ts +0 -163
  31. package/dist/cjs/flow.js +0 -98
  32. package/dist/cjs/flow.js.map +0 -1
  33. package/dist/cjs/flowSchema.d.ts +0 -2456
  34. package/dist/cjs/flowSchema.js +0 -251
  35. package/dist/cjs/flowSchema.js.map +0 -1
  36. package/dist/cjs/groupBy.js +0 -27
  37. package/dist/cjs/groupBy.js.map +0 -1
  38. package/dist/cjs/index.js +0 -24
  39. package/dist/cjs/index.js.map +0 -1
  40. package/dist/cjs/lerpColor.js +0 -9
  41. package/dist/cjs/lerpColor.js.map +0 -1
  42. package/dist/cjs/levenshtein.js +0 -88
  43. package/dist/cjs/levenshtein.js.map +0 -1
  44. package/dist/cjs/uuid.js +0 -16
  45. package/dist/cjs/uuid.js.map +0 -1
  46. package/dist/esm/bits.d.ts +0 -129
  47. package/dist/esm/bits.js +0 -19
  48. package/dist/esm/bits.js.map +0 -1
  49. package/dist/esm/bitsSchema.d.ts +0 -150
  50. package/dist/esm/bitsSchema.js +0 -55
  51. package/dist/esm/bitsSchema.js.map +0 -1
  52. package/dist/esm/do.d.ts +0 -37
  53. package/dist/esm/do.js +0 -62
  54. package/dist/esm/do.js.map +0 -1
  55. package/dist/esm/doSchema.d.ts +0 -1402
  56. package/dist/esm/doSchema.js +0 -23
  57. package/dist/esm/doSchema.js.map +0 -1
  58. package/dist/esm/findLast.d.ts +0 -1
  59. package/dist/esm/findLast.js +0 -9
  60. package/dist/esm/findLast.js.map +0 -1
  61. package/dist/esm/flow.d.ts +0 -163
  62. package/dist/esm/flow.js +0 -88
  63. package/dist/esm/flow.js.map +0 -1
  64. package/dist/esm/flowSchema.d.ts +0 -2456
  65. package/dist/esm/flowSchema.js +0 -199
  66. package/dist/esm/flowSchema.js.map +0 -1
  67. package/dist/esm/groupBy.d.ts +0 -1
  68. package/dist/esm/groupBy.js +0 -23
  69. package/dist/esm/groupBy.js.map +0 -1
  70. package/dist/esm/index.d.ts +0 -11
  71. package/dist/esm/index.js +0 -12
  72. package/dist/esm/index.js.map +0 -1
  73. package/dist/esm/lerpColor.d.ts +0 -1
  74. package/dist/esm/lerpColor.js +0 -5
  75. package/dist/esm/lerpColor.js.map +0 -1
  76. package/dist/esm/levenshtein.d.ts +0 -1
  77. package/dist/esm/levenshtein.js +0 -84
  78. package/dist/esm/levenshtein.js.map +0 -1
  79. package/dist/esm/uuid.d.ts +0 -1
  80. package/dist/esm/uuid.js +0 -12
  81. package/dist/esm/uuid.js.map +0 -1
  82. package/dist/types/bitsSchema.d.ts +0 -150
  83. package/dist/types/do.d.ts +0 -37
  84. package/dist/types/doSchema.d.ts +0 -1402
  85. package/dist/types/findLast.d.ts +0 -1
  86. package/dist/types/groupBy.d.ts +0 -1
  87. package/dist/types/index.d.ts +0 -11
  88. package/dist/types/lerpColor.d.ts +0 -1
  89. package/dist/types/levenshtein.d.ts +0 -1
  90. package/dist/types/uuid.d.ts +0 -1
@@ -109,7 +109,7 @@ export interface UpdateTaskStatisticParams<S extends Bitflow.TaskStatistic, A ex
109
109
  task: T;
110
110
  result?: R;
111
111
  }
112
- export declare type UpdateTaskStatistic<S extends Bitflow.TaskStatistic = Bitflow.TaskStatistic, A extends Bitflow.TaskAnswer = Bitflow.TaskAnswer, T extends Bitflow.Task = Bitflow.Task, R extends Bitflow.TaskResult = Bitflow.TaskResult> = ({ statistic, answer, task, result, }: UpdateTaskStatisticParams<S, A, T, R>) => Promise<S>;
112
+ export declare type UpdateTaskStatistic<S extends Bitflow.TaskStatistic, A extends Bitflow.TaskAnswer, T extends Bitflow.Task, R extends Bitflow.TaskResult> = ({ statistic, answer, task, result, }: UpdateTaskStatisticParams<S, A, T, R>) => Promise<S>;
113
113
  export interface TaskBit<T extends Bitflow.Task = any, A extends Bitflow.TaskAnswer = any, R extends Bitflow.TaskResult = any, S extends Bitflow.TaskStatistic = any, Act extends Action = any> {
114
114
  ViewForm: (props: TaskViewFormProps) => ReactElement | null;
115
115
  EvaluationForm: (props: TaskEvaluationFormProps) => ReactElement | null;
@@ -125,5 +125,4 @@ export interface TaskBit<T extends Bitflow.Task = any, A extends Bitflow.TaskAns
125
125
  };
126
126
  evaluate: Evaluate<A, T, R>;
127
127
  }
128
- export declare const makeEvaluate: (evaluateMap: Record<Bitflow.Task["subtype"], Pick<TaskBit, "evaluate">>) => Evaluate;
129
- export declare const makeUpdateStatistic: (statisticMap: Record<Bitflow.Task["subtype"], Pick<TaskBit, "updateStatistic">>) => UpdateTaskStatistic;
128
+ export declare const makeEvaluate: (evaluateMap: Record<string, Evaluate>) => Evaluate;
File without changes
File without changes
@@ -176,6 +176,13 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
176
176
  }>;
177
177
  }, {
178
178
  type: z.ZodLiteral<"synchronize">;
179
+ data: z.ZodObject<{
180
+ unlocked: z.ZodBoolean;
181
+ }, "strip", z.ZodTypeAny, {
182
+ unlocked: boolean;
183
+ }, {
184
+ unlocked: boolean;
185
+ }>;
179
186
  }>, "strip", z.ZodTypeAny, {
180
187
  id: string;
181
188
  type: "synchronize";
@@ -183,6 +190,9 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
183
190
  x: number;
184
191
  y: number;
185
192
  };
193
+ data: {
194
+ unlocked: boolean;
195
+ };
186
196
  }, {
187
197
  id: string;
188
198
  type: "synchronize";
@@ -190,6 +200,9 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
190
200
  x: number;
191
201
  y: number;
192
202
  };
203
+ data: {
204
+ unlocked: boolean;
205
+ };
193
206
  }>, z.ZodObject<z.extendShape<{
194
207
  id: z.ZodString;
195
208
  position: z.ZodObject<{
@@ -223,6 +236,7 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
223
236
  try: z.ZodNumber;
224
237
  status: z.ZodString;
225
238
  }, "strip", z.ZodTypeAny, {
239
+ status: string;
226
240
  node: {
227
241
  id: string;
228
242
  type: "checkpoint";
@@ -237,6 +251,9 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
237
251
  x: number;
238
252
  y: number;
239
253
  };
254
+ data: {
255
+ unlocked: boolean;
256
+ };
240
257
  } | {
241
258
  id: string;
242
259
  type: "task";
@@ -280,8 +297,8 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
280
297
  };
281
298
  startDate: Date;
282
299
  try: number;
283
- status: string;
284
300
  }, {
301
+ status: string;
285
302
  node: {
286
303
  id: string;
287
304
  type: "checkpoint";
@@ -296,6 +313,9 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
296
313
  x: number;
297
314
  y: number;
298
315
  };
316
+ data: {
317
+ unlocked: boolean;
318
+ };
299
319
  } | {
300
320
  id: string;
301
321
  type: "task";
@@ -339,7 +359,6 @@ export declare const makeDoBaseTrySchema: (flowNodeSchemas: makeDoTrySchemaProps
339
359
  };
340
360
  startDate: Date;
341
361
  try: number;
342
- status: string;
343
362
  }>;
344
363
  export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) => z.ZodObject<z.extendShape<{
345
364
  node: z.ZodUnion<[z.ZodObject<z.extendShape<{
@@ -511,6 +530,13 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
511
530
  }>;
512
531
  }, {
513
532
  type: z.ZodLiteral<"synchronize">;
533
+ data: z.ZodObject<{
534
+ unlocked: z.ZodBoolean;
535
+ }, "strip", z.ZodTypeAny, {
536
+ unlocked: boolean;
537
+ }, {
538
+ unlocked: boolean;
539
+ }>;
514
540
  }>, "strip", z.ZodTypeAny, {
515
541
  id: string;
516
542
  type: "synchronize";
@@ -518,6 +544,9 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
518
544
  x: number;
519
545
  y: number;
520
546
  };
547
+ data: {
548
+ unlocked: boolean;
549
+ };
521
550
  }, {
522
551
  id: string;
523
552
  type: "synchronize";
@@ -525,6 +554,9 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
525
554
  x: number;
526
555
  y: number;
527
556
  };
557
+ data: {
558
+ unlocked: boolean;
559
+ };
528
560
  }>, z.ZodObject<z.extendShape<{
529
561
  id: z.ZodString;
530
562
  position: z.ZodObject<{
@@ -560,6 +592,7 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
560
592
  }, {
561
593
  status: z.ZodLiteral<"started">;
562
594
  }>, "strip", z.ZodTypeAny, {
595
+ status: "started";
563
596
  node: {
564
597
  id: string;
565
598
  type: "checkpoint";
@@ -574,6 +607,9 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
574
607
  x: number;
575
608
  y: number;
576
609
  };
610
+ data: {
611
+ unlocked: boolean;
612
+ };
577
613
  } | {
578
614
  id: string;
579
615
  type: "task";
@@ -617,8 +653,8 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
617
653
  };
618
654
  startDate: Date;
619
655
  try: number;
620
- status: "started";
621
656
  }, {
657
+ status: "started";
622
658
  node: {
623
659
  id: string;
624
660
  type: "checkpoint";
@@ -633,6 +669,9 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
633
669
  x: number;
634
670
  y: number;
635
671
  };
672
+ data: {
673
+ unlocked: boolean;
674
+ };
636
675
  } | {
637
676
  id: string;
638
677
  type: "task";
@@ -676,7 +715,6 @@ export declare const makeDoStartedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
676
715
  };
677
716
  startDate: Date;
678
717
  try: number;
679
- status: "started";
680
718
  }>;
681
719
  export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps) => z.ZodObject<z.extendShape<{
682
720
  node: z.ZodUnion<[z.ZodObject<z.extendShape<{
@@ -848,6 +886,13 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
848
886
  }>;
849
887
  }, {
850
888
  type: z.ZodLiteral<"synchronize">;
889
+ data: z.ZodObject<{
890
+ unlocked: z.ZodBoolean;
891
+ }, "strip", z.ZodTypeAny, {
892
+ unlocked: boolean;
893
+ }, {
894
+ unlocked: boolean;
895
+ }>;
851
896
  }>, "strip", z.ZodTypeAny, {
852
897
  id: string;
853
898
  type: "synchronize";
@@ -855,6 +900,9 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
855
900
  x: number;
856
901
  y: number;
857
902
  };
903
+ data: {
904
+ unlocked: boolean;
905
+ };
858
906
  }, {
859
907
  id: string;
860
908
  type: "synchronize";
@@ -862,6 +910,9 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
862
910
  x: number;
863
911
  y: number;
864
912
  };
913
+ data: {
914
+ unlocked: boolean;
915
+ };
865
916
  }>, z.ZodObject<z.extendShape<{
866
917
  id: z.ZodString;
867
918
  position: z.ZodObject<{
@@ -921,15 +972,17 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
921
972
  state: "manual" | "unknown" | "correct" | "wrong";
922
973
  }>>;
923
974
  }>, "strip", z.ZodTypeAny, {
975
+ answer?: {
976
+ subtype: string;
977
+ } | undefined;
924
978
  result?: {
925
979
  feedback?: any;
926
980
  allowRetry?: boolean | undefined;
927
981
  subtype: string;
928
982
  state: "manual" | "unknown" | "correct" | "wrong";
929
983
  } | undefined;
930
- answer?: {
931
- subtype: string;
932
- } | undefined;
984
+ endDate: Date;
985
+ status: "finished";
933
986
  node: {
934
987
  id: string;
935
988
  type: "checkpoint";
@@ -944,6 +997,9 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
944
997
  x: number;
945
998
  y: number;
946
999
  };
1000
+ data: {
1001
+ unlocked: boolean;
1002
+ };
947
1003
  } | {
948
1004
  id: string;
949
1005
  type: "task";
@@ -987,18 +1043,18 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
987
1043
  };
988
1044
  startDate: Date;
989
1045
  try: number;
990
- status: "finished";
991
- endDate: Date;
992
1046
  }, {
1047
+ answer?: {
1048
+ subtype: string;
1049
+ } | undefined;
993
1050
  result?: {
994
1051
  feedback?: any;
995
1052
  allowRetry?: boolean | undefined;
996
1053
  subtype: string;
997
1054
  state: "manual" | "unknown" | "correct" | "wrong";
998
1055
  } | undefined;
999
- answer?: {
1000
- subtype: string;
1001
- } | undefined;
1056
+ endDate: Date;
1057
+ status: "finished";
1002
1058
  node: {
1003
1059
  id: string;
1004
1060
  type: "checkpoint";
@@ -1013,6 +1069,9 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
1013
1069
  x: number;
1014
1070
  y: number;
1015
1071
  };
1072
+ data: {
1073
+ unlocked: boolean;
1074
+ };
1016
1075
  } | {
1017
1076
  id: string;
1018
1077
  type: "task";
@@ -1056,8 +1115,6 @@ export declare const makeDoFinishedTry: (flowNodeSchemas: makeDoTrySchemaProps)
1056
1115
  };
1057
1116
  startDate: Date;
1058
1117
  try: number;
1059
- status: "finished";
1060
- endDate: Date;
1061
1118
  }>;
1062
1119
  export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) => z.ZodObject<z.extendShape<{
1063
1120
  node: z.ZodUnion<[z.ZodObject<z.extendShape<{
@@ -1229,6 +1286,13 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1229
1286
  }>;
1230
1287
  }, {
1231
1288
  type: z.ZodLiteral<"synchronize">;
1289
+ data: z.ZodObject<{
1290
+ unlocked: z.ZodBoolean;
1291
+ }, "strip", z.ZodTypeAny, {
1292
+ unlocked: boolean;
1293
+ }, {
1294
+ unlocked: boolean;
1295
+ }>;
1232
1296
  }>, "strip", z.ZodTypeAny, {
1233
1297
  id: string;
1234
1298
  type: "synchronize";
@@ -1236,6 +1300,9 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1236
1300
  x: number;
1237
1301
  y: number;
1238
1302
  };
1303
+ data: {
1304
+ unlocked: boolean;
1305
+ };
1239
1306
  }, {
1240
1307
  id: string;
1241
1308
  type: "synchronize";
@@ -1243,6 +1310,9 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1243
1310
  x: number;
1244
1311
  y: number;
1245
1312
  };
1313
+ data: {
1314
+ unlocked: boolean;
1315
+ };
1246
1316
  }>, z.ZodObject<z.extendShape<{
1247
1317
  id: z.ZodString;
1248
1318
  position: z.ZodObject<{
@@ -1279,6 +1349,8 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1279
1349
  status: z.ZodLiteral<"skipped">;
1280
1350
  endDate: z.ZodDate;
1281
1351
  }>, "strip", z.ZodTypeAny, {
1352
+ endDate: Date;
1353
+ status: "skipped";
1282
1354
  node: {
1283
1355
  id: string;
1284
1356
  type: "checkpoint";
@@ -1293,6 +1365,9 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1293
1365
  x: number;
1294
1366
  y: number;
1295
1367
  };
1368
+ data: {
1369
+ unlocked: boolean;
1370
+ };
1296
1371
  } | {
1297
1372
  id: string;
1298
1373
  type: "task";
@@ -1336,9 +1411,9 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1336
1411
  };
1337
1412
  startDate: Date;
1338
1413
  try: number;
1339
- status: "skipped";
1340
- endDate: Date;
1341
1414
  }, {
1415
+ endDate: Date;
1416
+ status: "skipped";
1342
1417
  node: {
1343
1418
  id: string;
1344
1419
  type: "checkpoint";
@@ -1353,6 +1428,9 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1353
1428
  x: number;
1354
1429
  y: number;
1355
1430
  };
1431
+ data: {
1432
+ unlocked: boolean;
1433
+ };
1356
1434
  } | {
1357
1435
  id: string;
1358
1436
  type: "task";
@@ -1396,7 +1474,5 @@ export declare const makeDoSkippedTry: (flowNodeSchemas: makeDoTrySchemaProps) =
1396
1474
  };
1397
1475
  startDate: Date;
1398
1476
  try: number;
1399
- status: "skipped";
1400
- endDate: Date;
1401
1477
  }>;
1402
1478
  export {};
File without changes
@@ -12,7 +12,6 @@ export declare type FlowCheckpointPublicNode = Pick<FlowCheckpointNode, "id" | "
12
12
  export declare type FlowSynchronizeNode = NodeBase & {
13
13
  type: "synchronize";
14
14
  data?: {
15
- toggle: (id: string) => void;
16
15
  unlocked: boolean;
17
16
  };
18
17
  };
@@ -106,6 +105,7 @@ export declare type FlowSplitAnswerNode = NodeBase & {
106
105
  type: "split-answer";
107
106
  data: SplitAnswer;
108
107
  };
108
+ export declare const isFlowSplitAnswerNode: (n: FlowNode) => n is FlowSplitAnswerNode;
109
109
  export declare type SplitResult = {
110
110
  condition: Condition;
111
111
  };
@@ -113,6 +113,7 @@ export declare type FlowSplitResultNode = NodeBase & {
113
113
  type: "split-result";
114
114
  data: SplitResult;
115
115
  };
116
+ export declare const isFlowSplitResultNode: (n: FlowNode) => n is FlowSplitResultNode;
116
117
  export declare type SplitPoints = {
117
118
  points: number;
118
119
  };
@@ -120,6 +121,7 @@ export declare type FlowSplitPointsNode = NodeBase & {
120
121
  type: "split-points";
121
122
  data: SplitPoints;
122
123
  };
124
+ export declare const isFlowSplitPointsNode: (n: FlowNode) => n is FlowSplitPointsNode;
123
125
  export declare type PortalInput = {
124
126
  portal: string;
125
127
  description: string;
@@ -132,14 +134,18 @@ export declare type FlowPortalInputNode = NodeBase & {
132
134
  type: "portal-input";
133
135
  data: PortalInput;
134
136
  };
137
+ export declare const isFlowPortalInputNode: (n: FlowNode) => n is FlowPortalInputNode;
135
138
  export declare type FlowPortalOutputNode = NodeBase & {
136
139
  type: "portal-output";
137
140
  data: PortalOutput;
138
141
  };
142
+ export declare const isFlowPortalOutputNode: (n: FlowNode) => n is FlowPortalOutputNode;
139
143
  export declare type FlowSplitRandomNode = NodeBase & {
140
144
  type: "split-random";
141
145
  };
146
+ export declare const isFlowSplitRandomNode: (n: FlowNode) => n is FlowSplitRandomNode;
142
147
  export declare type ControlFlowNode = FlowSplitAnswerNode | FlowSplitResultNode | FlowSplitPointsNode | FlowSplitRandomNode | FlowPortalInputNode | FlowPortalOutputNode;
148
+ export declare const isControlFlowNode: (n: FlowNode) => n is ControlFlowNode;
143
149
  export declare type FlowNode = InteractiveFlowNode | ControlFlowNode;
144
150
  export declare const isInteractiveFlowNode: (n: FlowNode) => n is InteractiveFlowNode;
145
151
  export declare type FlowEdge = {
@@ -43,6 +43,13 @@ export declare const FlowSynchronizeNodeSchema: z.ZodObject<z.extendShape<{
43
43
  }>;
44
44
  }, {
45
45
  type: z.ZodLiteral<"synchronize">;
46
+ data: z.ZodObject<{
47
+ unlocked: z.ZodBoolean;
48
+ }, "strip", z.ZodTypeAny, {
49
+ unlocked: boolean;
50
+ }, {
51
+ unlocked: boolean;
52
+ }>;
46
53
  }>, "strip", z.ZodTypeAny, {
47
54
  id: string;
48
55
  type: "synchronize";
@@ -50,6 +57,9 @@ export declare const FlowSynchronizeNodeSchema: z.ZodObject<z.extendShape<{
50
57
  x: number;
51
58
  y: number;
52
59
  };
60
+ data: {
61
+ unlocked: boolean;
62
+ };
53
63
  }, {
54
64
  id: string;
55
65
  type: "synchronize";
@@ -57,6 +67,9 @@ export declare const FlowSynchronizeNodeSchema: z.ZodObject<z.extendShape<{
57
67
  x: number;
58
68
  y: number;
59
69
  };
70
+ data: {
71
+ unlocked: boolean;
72
+ };
60
73
  }>;
61
74
  export declare const makeFlowTaskNodeSchema: (task: ZodSchema<Bitflow.Task>) => z.ZodObject<z.extendShape<{
62
75
  id: z.ZodString;
@@ -936,6 +949,13 @@ export declare const makeInteractiveFlowNodeSchema: ({ start, end, input, title,
936
949
  }>;
937
950
  }, {
938
951
  type: z.ZodLiteral<"synchronize">;
952
+ data: z.ZodObject<{
953
+ unlocked: z.ZodBoolean;
954
+ }, "strip", z.ZodTypeAny, {
955
+ unlocked: boolean;
956
+ }, {
957
+ unlocked: boolean;
958
+ }>;
939
959
  }>, "strip", z.ZodTypeAny, {
940
960
  id: string;
941
961
  type: "synchronize";
@@ -943,6 +963,9 @@ export declare const makeInteractiveFlowNodeSchema: ({ start, end, input, title,
943
963
  x: number;
944
964
  y: number;
945
965
  };
966
+ data: {
967
+ unlocked: boolean;
968
+ };
946
969
  }, {
947
970
  id: string;
948
971
  type: "synchronize";
@@ -950,6 +973,9 @@ export declare const makeInteractiveFlowNodeSchema: ({ start, end, input, title,
950
973
  x: number;
951
974
  y: number;
952
975
  };
976
+ data: {
977
+ unlocked: boolean;
978
+ };
953
979
  }>, z.ZodObject<z.extendShape<{
954
980
  id: z.ZodString;
955
981
  position: z.ZodObject<{
@@ -1257,21 +1283,34 @@ export declare const makeFlowNodeSchema: ({ end, input, start, task, title, }: {
1257
1283
  y: number;
1258
1284
  }>;
1259
1285
  }, {
1260
- type: z.ZodLiteral<"checkpoint">;
1286
+ type: z.ZodLiteral<"synchronize">;
1287
+ data: z.ZodObject<{
1288
+ unlocked: z.ZodBoolean;
1289
+ }, "strip", z.ZodTypeAny, {
1290
+ unlocked: boolean;
1291
+ }, {
1292
+ unlocked: boolean;
1293
+ }>;
1261
1294
  }>, "strip", z.ZodTypeAny, {
1262
1295
  id: string;
1263
- type: "checkpoint";
1296
+ type: "synchronize";
1264
1297
  position: {
1265
1298
  x: number;
1266
1299
  y: number;
1267
1300
  };
1301
+ data: {
1302
+ unlocked: boolean;
1303
+ };
1268
1304
  }, {
1269
1305
  id: string;
1270
- type: "checkpoint";
1306
+ type: "synchronize";
1271
1307
  position: {
1272
1308
  x: number;
1273
1309
  y: number;
1274
1310
  };
1311
+ data: {
1312
+ unlocked: boolean;
1313
+ };
1275
1314
  }>, z.ZodObject<z.extendShape<{
1276
1315
  id: z.ZodString;
1277
1316
  position: z.ZodObject<{
@@ -1285,17 +1324,17 @@ export declare const makeFlowNodeSchema: ({ end, input, start, task, title, }: {
1285
1324
  y: number;
1286
1325
  }>;
1287
1326
  }, {
1288
- type: z.ZodLiteral<"synchronize">;
1327
+ type: z.ZodLiteral<"checkpoint">;
1289
1328
  }>, "strip", z.ZodTypeAny, {
1290
1329
  id: string;
1291
- type: "synchronize";
1330
+ type: "checkpoint";
1292
1331
  position: {
1293
1332
  x: number;
1294
1333
  y: number;
1295
1334
  };
1296
1335
  }, {
1297
1336
  id: string;
1298
- type: "synchronize";
1337
+ type: "checkpoint";
1299
1338
  position: {
1300
1339
  x: number;
1301
1340
  y: number;
@@ -1724,21 +1763,34 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1724
1763
  y: number;
1725
1764
  }>;
1726
1765
  }, {
1727
- type: z.ZodLiteral<"checkpoint">;
1766
+ type: z.ZodLiteral<"synchronize">;
1767
+ data: z.ZodObject<{
1768
+ unlocked: z.ZodBoolean;
1769
+ }, "strip", z.ZodTypeAny, {
1770
+ unlocked: boolean;
1771
+ }, {
1772
+ unlocked: boolean;
1773
+ }>;
1728
1774
  }>, "strip", z.ZodTypeAny, {
1729
1775
  id: string;
1730
- type: "checkpoint";
1776
+ type: "synchronize";
1731
1777
  position: {
1732
1778
  x: number;
1733
1779
  y: number;
1734
1780
  };
1781
+ data: {
1782
+ unlocked: boolean;
1783
+ };
1735
1784
  }, {
1736
1785
  id: string;
1737
- type: "checkpoint";
1786
+ type: "synchronize";
1738
1787
  position: {
1739
1788
  x: number;
1740
1789
  y: number;
1741
1790
  };
1791
+ data: {
1792
+ unlocked: boolean;
1793
+ };
1742
1794
  }>, z.ZodObject<z.extendShape<{
1743
1795
  id: z.ZodString;
1744
1796
  position: z.ZodObject<{
@@ -1752,17 +1804,17 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1752
1804
  y: number;
1753
1805
  }>;
1754
1806
  }, {
1755
- type: z.ZodLiteral<"synchronize">;
1807
+ type: z.ZodLiteral<"checkpoint">;
1756
1808
  }>, "strip", z.ZodTypeAny, {
1757
1809
  id: string;
1758
- type: "synchronize";
1810
+ type: "checkpoint";
1759
1811
  position: {
1760
1812
  x: number;
1761
1813
  y: number;
1762
1814
  };
1763
1815
  }, {
1764
1816
  id: string;
1765
- type: "synchronize";
1817
+ type: "checkpoint";
1766
1818
  position: {
1767
1819
  x: number;
1768
1820
  y: number;
@@ -1962,6 +2014,9 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1962
2014
  x: number;
1963
2015
  y: number;
1964
2016
  };
2017
+ data: {
2018
+ unlocked: boolean;
2019
+ };
1965
2020
  } | {
1966
2021
  id: string;
1967
2022
  type: "split-answer";
@@ -2091,6 +2146,9 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
2091
2146
  x: number;
2092
2147
  y: number;
2093
2148
  };
2149
+ data: {
2150
+ unlocked: boolean;
2151
+ };
2094
2152
  } | {
2095
2153
  id: string;
2096
2154
  type: "split-answer";
@@ -2218,6 +2276,9 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
2218
2276
  x: number;
2219
2277
  y: number;
2220
2278
  };
2279
+ data: {
2280
+ unlocked: boolean;
2281
+ };
2221
2282
  } | {
2222
2283
  id: string;
2223
2284
  type: "split-answer";
@@ -2347,6 +2408,9 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
2347
2408
  x: number;
2348
2409
  y: number;
2349
2410
  };
2411
+ data: {
2412
+ unlocked: boolean;
2413
+ };
2350
2414
  } | {
2351
2415
  id: string;
2352
2416
  type: "split-answer";
File without changes