@bitflow/core 0.2.0 → 0.5.1

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.
@@ -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;
@@ -922,6 +935,75 @@ export declare const makeInteractiveFlowNodeSchema: ({ start, end, input, title,
922
935
  y: number;
923
936
  };
924
937
  data: Bitflow.Title;
938
+ }>, z.ZodObject<z.extendShape<{
939
+ id: z.ZodString;
940
+ position: z.ZodObject<{
941
+ x: z.ZodNumber;
942
+ y: z.ZodNumber;
943
+ }, "strip", z.ZodTypeAny, {
944
+ x: number;
945
+ y: number;
946
+ }, {
947
+ x: number;
948
+ y: number;
949
+ }>;
950
+ }, {
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
+ }>;
959
+ }>, "strip", z.ZodTypeAny, {
960
+ id: string;
961
+ type: "synchronize";
962
+ position: {
963
+ x: number;
964
+ y: number;
965
+ };
966
+ data: {
967
+ unlocked: boolean;
968
+ };
969
+ }, {
970
+ id: string;
971
+ type: "synchronize";
972
+ position: {
973
+ x: number;
974
+ y: number;
975
+ };
976
+ data: {
977
+ unlocked: boolean;
978
+ };
979
+ }>, z.ZodObject<z.extendShape<{
980
+ id: z.ZodString;
981
+ position: z.ZodObject<{
982
+ x: z.ZodNumber;
983
+ y: z.ZodNumber;
984
+ }, "strip", z.ZodTypeAny, {
985
+ x: number;
986
+ y: number;
987
+ }, {
988
+ x: number;
989
+ y: number;
990
+ }>;
991
+ }, {
992
+ type: z.ZodLiteral<"checkpoint">;
993
+ }>, "strip", z.ZodTypeAny, {
994
+ id: string;
995
+ type: "checkpoint";
996
+ position: {
997
+ x: number;
998
+ y: number;
999
+ };
1000
+ }, {
1001
+ id: string;
1002
+ type: "checkpoint";
1003
+ position: {
1004
+ x: number;
1005
+ y: number;
1006
+ };
925
1007
  }>]>;
926
1008
  export declare const FlowEdgeSchema: z.ZodObject<{
927
1009
  id: z.ZodString;
@@ -1200,6 +1282,75 @@ export declare const makeFlowNodeSchema: ({ end, input, start, task, title, }: {
1200
1282
  x: number;
1201
1283
  y: number;
1202
1284
  }>;
1285
+ }, {
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
+ }>;
1294
+ }>, "strip", z.ZodTypeAny, {
1295
+ id: string;
1296
+ type: "synchronize";
1297
+ position: {
1298
+ x: number;
1299
+ y: number;
1300
+ };
1301
+ data: {
1302
+ unlocked: boolean;
1303
+ };
1304
+ }, {
1305
+ id: string;
1306
+ type: "synchronize";
1307
+ position: {
1308
+ x: number;
1309
+ y: number;
1310
+ };
1311
+ data: {
1312
+ unlocked: boolean;
1313
+ };
1314
+ }>, z.ZodObject<z.extendShape<{
1315
+ id: z.ZodString;
1316
+ position: z.ZodObject<{
1317
+ x: z.ZodNumber;
1318
+ y: z.ZodNumber;
1319
+ }, "strip", z.ZodTypeAny, {
1320
+ x: number;
1321
+ y: number;
1322
+ }, {
1323
+ x: number;
1324
+ y: number;
1325
+ }>;
1326
+ }, {
1327
+ type: z.ZodLiteral<"checkpoint">;
1328
+ }>, "strip", z.ZodTypeAny, {
1329
+ id: string;
1330
+ type: "checkpoint";
1331
+ position: {
1332
+ x: number;
1333
+ y: number;
1334
+ };
1335
+ }, {
1336
+ id: string;
1337
+ type: "checkpoint";
1338
+ position: {
1339
+ x: number;
1340
+ y: number;
1341
+ };
1342
+ }>, z.ZodObject<z.extendShape<{
1343
+ id: z.ZodString;
1344
+ position: z.ZodObject<{
1345
+ x: z.ZodNumber;
1346
+ y: z.ZodNumber;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ x: number;
1349
+ y: number;
1350
+ }, {
1351
+ x: number;
1352
+ y: number;
1353
+ }>;
1203
1354
  }, {
1204
1355
  type: z.ZodLiteral<"end">;
1205
1356
  data: z.ZodType<Bitflow.End, z.ZodTypeDef, Bitflow.End>;
@@ -1611,6 +1762,75 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1611
1762
  x: number;
1612
1763
  y: number;
1613
1764
  }>;
1765
+ }, {
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
+ }>;
1774
+ }>, "strip", z.ZodTypeAny, {
1775
+ id: string;
1776
+ type: "synchronize";
1777
+ position: {
1778
+ x: number;
1779
+ y: number;
1780
+ };
1781
+ data: {
1782
+ unlocked: boolean;
1783
+ };
1784
+ }, {
1785
+ id: string;
1786
+ type: "synchronize";
1787
+ position: {
1788
+ x: number;
1789
+ y: number;
1790
+ };
1791
+ data: {
1792
+ unlocked: boolean;
1793
+ };
1794
+ }>, z.ZodObject<z.extendShape<{
1795
+ id: z.ZodString;
1796
+ position: z.ZodObject<{
1797
+ x: z.ZodNumber;
1798
+ y: z.ZodNumber;
1799
+ }, "strip", z.ZodTypeAny, {
1800
+ x: number;
1801
+ y: number;
1802
+ }, {
1803
+ x: number;
1804
+ y: number;
1805
+ }>;
1806
+ }, {
1807
+ type: z.ZodLiteral<"checkpoint">;
1808
+ }>, "strip", z.ZodTypeAny, {
1809
+ id: string;
1810
+ type: "checkpoint";
1811
+ position: {
1812
+ x: number;
1813
+ y: number;
1814
+ };
1815
+ }, {
1816
+ id: string;
1817
+ type: "checkpoint";
1818
+ position: {
1819
+ x: number;
1820
+ y: number;
1821
+ };
1822
+ }>, z.ZodObject<z.extendShape<{
1823
+ id: z.ZodString;
1824
+ position: z.ZodObject<{
1825
+ x: z.ZodNumber;
1826
+ y: z.ZodNumber;
1827
+ }, "strip", z.ZodTypeAny, {
1828
+ x: number;
1829
+ y: number;
1830
+ }, {
1831
+ x: number;
1832
+ y: number;
1833
+ }>;
1614
1834
  }, {
1615
1835
  type: z.ZodLiteral<"end">;
1616
1836
  data: z.ZodType<Bitflow.End, z.ZodTypeDef, Bitflow.End>;
@@ -1772,7 +1992,7 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1772
1992
  target: string;
1773
1993
  }>, "many">;
1774
1994
  zoom: z.ZodDefault<z.ZodNumber>;
1775
- position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber]>>;
1995
+ position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
1776
1996
  }, "strip", z.ZodTypeAny, {
1777
1997
  position: [number, number];
1778
1998
  name: string;
@@ -1781,6 +2001,23 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1781
2001
  visibility: "public" | "private" | "unlisted";
1782
2002
  draft: boolean;
1783
2003
  nodes: ({
2004
+ id: string;
2005
+ type: "checkpoint";
2006
+ position: {
2007
+ x: number;
2008
+ y: number;
2009
+ };
2010
+ } | {
2011
+ id: string;
2012
+ type: "synchronize";
2013
+ position: {
2014
+ x: number;
2015
+ y: number;
2016
+ };
2017
+ data: {
2018
+ unlocked: boolean;
2019
+ };
2020
+ } | {
1784
2021
  id: string;
1785
2022
  type: "split-answer";
1786
2023
  position: {
@@ -1896,6 +2133,23 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
1896
2133
  visibility: "public" | "private" | "unlisted";
1897
2134
  draft: boolean;
1898
2135
  nodes: ({
2136
+ id: string;
2137
+ type: "checkpoint";
2138
+ position: {
2139
+ x: number;
2140
+ y: number;
2141
+ };
2142
+ } | {
2143
+ id: string;
2144
+ type: "synchronize";
2145
+ position: {
2146
+ x: number;
2147
+ y: number;
2148
+ };
2149
+ data: {
2150
+ unlocked: boolean;
2151
+ };
2152
+ } | {
1899
2153
  id: string;
1900
2154
  type: "split-answer";
1901
2155
  position: {
@@ -2009,6 +2263,23 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
2009
2263
  visibility: "public" | "private" | "unlisted";
2010
2264
  draft: boolean;
2011
2265
  nodes: ({
2266
+ id: string;
2267
+ type: "checkpoint";
2268
+ position: {
2269
+ x: number;
2270
+ y: number;
2271
+ };
2272
+ } | {
2273
+ id: string;
2274
+ type: "synchronize";
2275
+ position: {
2276
+ x: number;
2277
+ y: number;
2278
+ };
2279
+ data: {
2280
+ unlocked: boolean;
2281
+ };
2282
+ } | {
2012
2283
  id: string;
2013
2284
  type: "split-answer";
2014
2285
  position: {
@@ -2115,4 +2386,135 @@ export declare const makeFlowSchema: ({ end, input, start, task, title, }: {
2115
2386
  target: string;
2116
2387
  }[];
2117
2388
  zoom: number;
2389
+ }, {
2390
+ position?: [number, number] | undefined;
2391
+ zoom?: number | undefined;
2392
+ name: string;
2393
+ description: string;
2394
+ language: "en" | "de" | "fr" | "es" | "nl" | "pt" | "tr" | "it";
2395
+ visibility: "public" | "private" | "unlisted";
2396
+ draft: boolean;
2397
+ nodes: ({
2398
+ id: string;
2399
+ type: "checkpoint";
2400
+ position: {
2401
+ x: number;
2402
+ y: number;
2403
+ };
2404
+ } | {
2405
+ id: string;
2406
+ type: "synchronize";
2407
+ position: {
2408
+ x: number;
2409
+ y: number;
2410
+ };
2411
+ data: {
2412
+ unlocked: boolean;
2413
+ };
2414
+ } | {
2415
+ id: string;
2416
+ type: "split-answer";
2417
+ position: {
2418
+ x: number;
2419
+ y: number;
2420
+ };
2421
+ data: {
2422
+ condition: Condition;
2423
+ };
2424
+ } | {
2425
+ id: string;
2426
+ type: "split-result";
2427
+ position: {
2428
+ x: number;
2429
+ y: number;
2430
+ };
2431
+ data: {
2432
+ condition: Condition;
2433
+ };
2434
+ } | {
2435
+ id: string;
2436
+ type: "split-points";
2437
+ position: {
2438
+ x: number;
2439
+ y: number;
2440
+ };
2441
+ data: {
2442
+ points: number;
2443
+ };
2444
+ } | {
2445
+ id: string;
2446
+ type: "portal-input";
2447
+ position: {
2448
+ x: number;
2449
+ y: number;
2450
+ };
2451
+ data: {
2452
+ description: string;
2453
+ portal: string;
2454
+ };
2455
+ } | {
2456
+ id: string;
2457
+ type: "portal-output";
2458
+ position: {
2459
+ x: number;
2460
+ y: number;
2461
+ };
2462
+ data: {
2463
+ description: string;
2464
+ portal: string;
2465
+ };
2466
+ } | {
2467
+ id: string;
2468
+ type: "split-random";
2469
+ position: {
2470
+ x: number;
2471
+ y: number;
2472
+ };
2473
+ } | {
2474
+ id: string;
2475
+ type: "task";
2476
+ position: {
2477
+ x: number;
2478
+ y: number;
2479
+ };
2480
+ data: Bitflow.Task;
2481
+ } | {
2482
+ id: string;
2483
+ type: "start";
2484
+ position: {
2485
+ x: number;
2486
+ y: number;
2487
+ };
2488
+ data: Bitflow.Start;
2489
+ } | {
2490
+ id: string;
2491
+ type: "end";
2492
+ position: {
2493
+ x: number;
2494
+ y: number;
2495
+ };
2496
+ data: Bitflow.End;
2497
+ } | {
2498
+ id: string;
2499
+ type: "input";
2500
+ position: {
2501
+ x: number;
2502
+ y: number;
2503
+ };
2504
+ data: Bitflow.Input;
2505
+ } | {
2506
+ id: string;
2507
+ type: "title";
2508
+ position: {
2509
+ x: number;
2510
+ y: number;
2511
+ };
2512
+ data: Bitflow.Title;
2513
+ })[];
2514
+ edges: {
2515
+ sourceHandle?: "a" | "b" | "c" | "d" | "e" | "f" | undefined;
2516
+ id: string;
2517
+ source: string;
2518
+ target: string;
2519
+ }[];
2118
2520
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitflow/core",
3
- "version": "0.2.0",
3
+ "version": "0.5.1",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/bitflow#readme",
6
6
  "license": "MIT",
@@ -46,10 +46,10 @@
46
46
  "@emotion/cache": "11.x",
47
47
  "@emotion/react": "11.x",
48
48
  "@emotion/styled": "11.x",
49
- "@openpatch/patches": "1.x",
49
+ "@openpatch/patches": "5.x",
50
50
  "react": "17.x",
51
51
  "react-dom": "17.x",
52
52
  "zod": "3.x"
53
53
  },
54
- "gitHead": "4df101298c9cdd84c7ec1699bef428b970d50200"
54
+ "gitHead": "77d67c99ca2e8c54a86908678bc56d28815a36db"
55
55
  }