@nordcraft/std-lib 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.ts +128 -31
- package/package.json +5 -4
package/dist/lib.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
export const formulas = {
|
|
3
3
|
"@toddle/not": {
|
|
4
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
4
5
|
"name": "Not",
|
|
5
6
|
"description": "Get the Boolean opposite of an input value.",
|
|
6
7
|
"arguments": [
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
"@toddle/trim": {
|
|
28
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
27
29
|
"name": "Trim",
|
|
28
30
|
"description": "Remove any leading and trailing white spaces from a String.",
|
|
29
31
|
"arguments": [
|
|
@@ -47,6 +49,7 @@
|
|
|
47
49
|
}
|
|
48
50
|
},
|
|
49
51
|
"@toddle/lowercase": {
|
|
52
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
50
53
|
"name": "Lower case",
|
|
51
54
|
"description": "Convert a string to lowercase.",
|
|
52
55
|
"arguments": [
|
|
@@ -70,6 +73,7 @@
|
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
"@toddle/concatenate": {
|
|
76
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
73
77
|
"name": "Concatenate",
|
|
74
78
|
"description": "Concatenate two or more values.",
|
|
75
79
|
"arguments": [
|
|
@@ -93,6 +97,7 @@
|
|
|
93
97
|
}
|
|
94
98
|
},
|
|
95
99
|
"@toddle/timestamp": {
|
|
100
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
96
101
|
"name": "Timestamp",
|
|
97
102
|
"description": "Get the timestamp from a Date, e.g. 1633462980000.",
|
|
98
103
|
"arguments": [
|
|
@@ -116,6 +121,7 @@
|
|
|
116
121
|
}
|
|
117
122
|
},
|
|
118
123
|
"@toddle/indexOf": {
|
|
124
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
119
125
|
"name": "Index of",
|
|
120
126
|
"description": "Find the index of a specific item in an Array or String.",
|
|
121
127
|
"arguments": [
|
|
@@ -150,6 +156,7 @@
|
|
|
150
156
|
}
|
|
151
157
|
},
|
|
152
158
|
"@toddle/squareRoot": {
|
|
159
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
153
160
|
"name": "Square root",
|
|
154
161
|
"description": "Get the square root of a Number.",
|
|
155
162
|
"arguments": [
|
|
@@ -173,6 +180,7 @@
|
|
|
173
180
|
}
|
|
174
181
|
},
|
|
175
182
|
"@toddle/logarithm": {
|
|
183
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
176
184
|
"name": "Logarithm",
|
|
177
185
|
"description": "Return the logarithm of a Number.",
|
|
178
186
|
"arguments": [
|
|
@@ -196,6 +204,7 @@
|
|
|
196
204
|
}
|
|
197
205
|
},
|
|
198
206
|
"@toddle/range": {
|
|
207
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
199
208
|
"name": "Range",
|
|
200
209
|
"description": "Create an Array of numbers between a Min and Max value.",
|
|
201
210
|
"arguments": [
|
|
@@ -230,6 +239,7 @@
|
|
|
230
239
|
}
|
|
231
240
|
},
|
|
232
241
|
"@toddle/size": {
|
|
242
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
233
243
|
"name": "Size",
|
|
234
244
|
"description": "Get the size of an Array, Object or String.",
|
|
235
245
|
"arguments": [
|
|
@@ -257,6 +267,7 @@
|
|
|
257
267
|
}
|
|
258
268
|
},
|
|
259
269
|
"@toddle/matches": {
|
|
270
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
260
271
|
"name": "Matches",
|
|
261
272
|
"description": "Finds the (global) matches in a String based on a regular expression.",
|
|
262
273
|
"arguments": [
|
|
@@ -324,6 +335,7 @@
|
|
|
324
335
|
}
|
|
325
336
|
},
|
|
326
337
|
"@toddle/now": {
|
|
338
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
327
339
|
"name": "Now",
|
|
328
340
|
"description": "Get a Date representing \"Now\"",
|
|
329
341
|
"arguments": [],
|
|
@@ -336,6 +348,7 @@
|
|
|
336
348
|
}
|
|
337
349
|
},
|
|
338
350
|
"@toddle/roundDown": {
|
|
351
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
339
352
|
"name": "Round down",
|
|
340
353
|
"description": "Round a Number down to the nearest decimal point.",
|
|
341
354
|
"arguments": [
|
|
@@ -370,6 +383,7 @@
|
|
|
370
383
|
}
|
|
371
384
|
},
|
|
372
385
|
"@toddle/append": {
|
|
386
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
373
387
|
"name": "Append",
|
|
374
388
|
"description": "Add an element to the end of an Array.",
|
|
375
389
|
"arguments": [
|
|
@@ -404,6 +418,7 @@
|
|
|
404
418
|
}
|
|
405
419
|
},
|
|
406
420
|
"@toddle/dateFromString": {
|
|
421
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
407
422
|
"name": "Date From String",
|
|
408
423
|
"arguments": [
|
|
409
424
|
{
|
|
@@ -427,6 +442,7 @@
|
|
|
427
442
|
}
|
|
428
443
|
},
|
|
429
444
|
"@toddle/absolute": {
|
|
445
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
430
446
|
"name": "Absolute",
|
|
431
447
|
"description": "Get the absolute value of a Number.",
|
|
432
448
|
"arguments": [
|
|
@@ -450,6 +466,7 @@
|
|
|
450
466
|
}
|
|
451
467
|
},
|
|
452
468
|
"@toddle/encodeURIComponent": {
|
|
469
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
453
470
|
"name": "Encode URI Component",
|
|
454
471
|
"description": "Encode a URI component, escaping certain characters to their UTF-8 representation.",
|
|
455
472
|
"arguments": [
|
|
@@ -473,6 +490,7 @@
|
|
|
473
490
|
}
|
|
474
491
|
},
|
|
475
492
|
"@toddle/modulo": {
|
|
493
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
476
494
|
"name": "Modulo",
|
|
477
495
|
"description": "Get the remainder when dividing two Numbers.",
|
|
478
496
|
"arguments": [
|
|
@@ -507,6 +525,7 @@
|
|
|
507
525
|
}
|
|
508
526
|
},
|
|
509
527
|
"@toddle/defaultTo": {
|
|
528
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
510
529
|
"name": "Default to",
|
|
511
530
|
"description": "Return the first value that is not False or Null.",
|
|
512
531
|
"arguments": [
|
|
@@ -542,6 +561,7 @@
|
|
|
542
561
|
}
|
|
543
562
|
},
|
|
544
563
|
"@toddle/reduce": {
|
|
564
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
545
565
|
"name": "Reduce",
|
|
546
566
|
"description": "Reduce a group of items to a single value by applying each item to a reducer formula.",
|
|
547
567
|
"arguments": [
|
|
@@ -588,6 +608,7 @@
|
|
|
588
608
|
}
|
|
589
609
|
},
|
|
590
610
|
"@toddle/deleteKey": {
|
|
611
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
591
612
|
"name": "Delete",
|
|
592
613
|
"description": "Return a copy of the input Object or Array without the specified key.",
|
|
593
614
|
"arguments": [
|
|
@@ -622,6 +643,7 @@
|
|
|
622
643
|
}
|
|
623
644
|
},
|
|
624
645
|
"@toddle/power": {
|
|
646
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
625
647
|
"name": "Power",
|
|
626
648
|
"description": "Raise a number to a power.",
|
|
627
649
|
"arguments": [
|
|
@@ -656,6 +678,7 @@
|
|
|
656
678
|
}
|
|
657
679
|
},
|
|
658
680
|
"@toddle/filter": {
|
|
681
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
659
682
|
"name": "Filter",
|
|
660
683
|
"description": "Return a new Array containing only the elements for which the provided formula evaluates to True.",
|
|
661
684
|
"arguments": [
|
|
@@ -694,6 +717,7 @@
|
|
|
694
717
|
}
|
|
695
718
|
},
|
|
696
719
|
"@toddle/takeLast": {
|
|
720
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
697
721
|
"name": "Take last",
|
|
698
722
|
"description": "Take items from the end of an Array or String.",
|
|
699
723
|
"arguments": [
|
|
@@ -728,6 +752,7 @@
|
|
|
728
752
|
}
|
|
729
753
|
},
|
|
730
754
|
"@toddle/randomNumber": {
|
|
755
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
731
756
|
"name": "Random number",
|
|
732
757
|
"description": "return a random Number between 0 and 1.",
|
|
733
758
|
"arguments": [],
|
|
@@ -740,6 +765,7 @@
|
|
|
740
765
|
}
|
|
741
766
|
},
|
|
742
767
|
"@toddle/find": {
|
|
768
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
743
769
|
"name": "Find",
|
|
744
770
|
"description": "Search through an Array of items and apply a formula to each item, to return the first item where the provided formula returns True.",
|
|
745
771
|
"arguments": [
|
|
@@ -778,6 +804,7 @@
|
|
|
778
804
|
}
|
|
779
805
|
},
|
|
780
806
|
"@toddle/sum": {
|
|
807
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
781
808
|
"name": "Sum",
|
|
782
809
|
"description": "Return the sum of an Array of numbers",
|
|
783
810
|
"arguments": [
|
|
@@ -801,6 +828,7 @@
|
|
|
801
828
|
}
|
|
802
829
|
},
|
|
803
830
|
"@toddle/capitalize": {
|
|
831
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
804
832
|
"name": "Capitalize",
|
|
805
833
|
"description": "Capitalize a string: make the first letter uppercase whilst keeping the rest lowercase.",
|
|
806
834
|
"arguments": [
|
|
@@ -824,6 +852,7 @@
|
|
|
824
852
|
}
|
|
825
853
|
},
|
|
826
854
|
"@toddle/isServer": {
|
|
855
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
827
856
|
"name": "Is Server",
|
|
828
857
|
"description": "Get information about whether formulas are currently evaluated server-side or client-side.",
|
|
829
858
|
"arguments": [],
|
|
@@ -835,6 +864,7 @@
|
|
|
835
864
|
}
|
|
836
865
|
},
|
|
837
866
|
"@toddle/parseURL": {
|
|
867
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
838
868
|
"name": "Parse URL",
|
|
839
869
|
"description": "Parse a URL",
|
|
840
870
|
"arguments": [
|
|
@@ -869,6 +899,7 @@
|
|
|
869
899
|
}
|
|
870
900
|
},
|
|
871
901
|
"@toddle/getFromSessionStorage": {
|
|
902
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
872
903
|
"name": "Get from Session Storage",
|
|
873
904
|
"description": "Read a value from session storage with the provided key.",
|
|
874
905
|
"cache": false,
|
|
@@ -893,6 +924,7 @@
|
|
|
893
924
|
}
|
|
894
925
|
},
|
|
895
926
|
"@toddle/formatDate": {
|
|
927
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
896
928
|
"name": "Format Date",
|
|
897
929
|
"arguments": [
|
|
898
930
|
{
|
|
@@ -902,7 +934,7 @@
|
|
|
902
934
|
"type": "Date"
|
|
903
935
|
},
|
|
904
936
|
"formula": {
|
|
905
|
-
"type": "
|
|
937
|
+
"type": "value",
|
|
906
938
|
"value": null
|
|
907
939
|
}
|
|
908
940
|
},
|
|
@@ -938,6 +970,7 @@
|
|
|
938
970
|
}
|
|
939
971
|
},
|
|
940
972
|
"@toddle/get": {
|
|
973
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
941
974
|
"name": "Get",
|
|
942
975
|
"description": "Extract a value from an Object, Array or String at the specified path.",
|
|
943
976
|
"arguments": [
|
|
@@ -972,6 +1005,7 @@
|
|
|
972
1005
|
}
|
|
973
1006
|
},
|
|
974
1007
|
"@toddle/divide": {
|
|
1008
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
975
1009
|
"name": "Divide",
|
|
976
1010
|
"description": "Perform a division calculation.",
|
|
977
1011
|
"arguments": [
|
|
@@ -1006,6 +1040,7 @@
|
|
|
1006
1040
|
}
|
|
1007
1041
|
},
|
|
1008
1042
|
"@toddle/split": {
|
|
1043
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1009
1044
|
"name": "Split",
|
|
1010
1045
|
"description": "Split a String into an Array of smaller strings each time a delimiter occurs. The delimiter will not be part of the output",
|
|
1011
1046
|
"arguments": [
|
|
@@ -1043,6 +1078,7 @@
|
|
|
1043
1078
|
}
|
|
1044
1079
|
},
|
|
1045
1080
|
"@toddle/reverse": {
|
|
1081
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1046
1082
|
"name": "Reverse",
|
|
1047
1083
|
"description": "Reverse the order of an Array.",
|
|
1048
1084
|
"arguments": [
|
|
@@ -1066,6 +1102,7 @@
|
|
|
1066
1102
|
}
|
|
1067
1103
|
},
|
|
1068
1104
|
"@toddle/round": {
|
|
1105
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1069
1106
|
"name": "Round",
|
|
1070
1107
|
"description": "Round a Number to the nearest decimal point.",
|
|
1071
1108
|
"arguments": [
|
|
@@ -1100,6 +1137,7 @@
|
|
|
1100
1137
|
}
|
|
1101
1138
|
},
|
|
1102
1139
|
"@toddle/includes": {
|
|
1140
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1103
1141
|
"name": "Includes",
|
|
1104
1142
|
"description": "Test if an Array or String includes a specific item or value.",
|
|
1105
1143
|
"arguments": [
|
|
@@ -1134,6 +1172,7 @@
|
|
|
1134
1172
|
}
|
|
1135
1173
|
},
|
|
1136
1174
|
"@toddle/greaterOrEqueal": {
|
|
1175
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1137
1176
|
"name": "Greater or equal",
|
|
1138
1177
|
"description": "Compute whether a value is larger than or equal to another value.",
|
|
1139
1178
|
"arguments": [
|
|
@@ -1168,6 +1207,7 @@
|
|
|
1168
1207
|
}
|
|
1169
1208
|
},
|
|
1170
1209
|
"@toddle/join": {
|
|
1210
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1171
1211
|
"name": "Join",
|
|
1172
1212
|
"description": "Combine an Array of Strings in to a single String.",
|
|
1173
1213
|
"arguments": [
|
|
@@ -1202,6 +1242,7 @@
|
|
|
1202
1242
|
}
|
|
1203
1243
|
},
|
|
1204
1244
|
"@toddle/uppercase": {
|
|
1245
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1205
1246
|
"name": "Uppercase",
|
|
1206
1247
|
"description": "Convert a String to uppercase.",
|
|
1207
1248
|
"arguments": [
|
|
@@ -1225,6 +1266,7 @@
|
|
|
1225
1266
|
}
|
|
1226
1267
|
},
|
|
1227
1268
|
"@toddle/notEqual": {
|
|
1269
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1228
1270
|
"name": "Not equal",
|
|
1229
1271
|
"description": "Compute if values are not identical.",
|
|
1230
1272
|
"arguments": [
|
|
@@ -1259,6 +1301,7 @@
|
|
|
1259
1301
|
}
|
|
1260
1302
|
},
|
|
1261
1303
|
"@toddle/drop": {
|
|
1304
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1262
1305
|
"name": "Drop",
|
|
1263
1306
|
"description": "Remove items from the beginning of an Array or String.",
|
|
1264
1307
|
"arguments": [
|
|
@@ -1293,6 +1336,7 @@
|
|
|
1293
1336
|
}
|
|
1294
1337
|
},
|
|
1295
1338
|
"@toddle/parseJSON": {
|
|
1339
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1296
1340
|
"name": "Parse JSON",
|
|
1297
1341
|
"description": "Parse a String to JSON.",
|
|
1298
1342
|
"arguments": [
|
|
@@ -1316,6 +1360,7 @@
|
|
|
1316
1360
|
}
|
|
1317
1361
|
},
|
|
1318
1362
|
"@toddle/clamp": {
|
|
1363
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1319
1364
|
"name": "Clamp",
|
|
1320
1365
|
"description": "Limit a value to a specified Min and Max value.",
|
|
1321
1366
|
"arguments": [
|
|
@@ -1361,6 +1406,7 @@
|
|
|
1361
1406
|
}
|
|
1362
1407
|
},
|
|
1363
1408
|
"@toddle/getCookie": {
|
|
1409
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1364
1410
|
"name": "Get Cookie",
|
|
1365
1411
|
"description": "Get the value of a cookie by name. This formula is available both server-side and client-side. Http-Only cookies will only be available server-side.",
|
|
1366
1412
|
"arguments": [
|
|
@@ -1384,6 +1430,7 @@
|
|
|
1384
1430
|
}
|
|
1385
1431
|
},
|
|
1386
1432
|
"@toddle/lastIndexOf": {
|
|
1433
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1387
1434
|
"name": "Last Index of",
|
|
1388
1435
|
"description": "Search an Array or String to find the index of the last occurrence of a specified item or substring.",
|
|
1389
1436
|
"arguments": [
|
|
@@ -1418,6 +1465,7 @@
|
|
|
1418
1465
|
}
|
|
1419
1466
|
},
|
|
1420
1467
|
"@toddle/some": {
|
|
1468
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1421
1469
|
"name": "Some",
|
|
1422
1470
|
"description": "Run a formula on all items of an Array to determine if any item matches a set of conditions.",
|
|
1423
1471
|
"arguments": [
|
|
@@ -1456,6 +1504,7 @@
|
|
|
1456
1504
|
}
|
|
1457
1505
|
},
|
|
1458
1506
|
"@toddle/getFromLocalStorage": {
|
|
1507
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1459
1508
|
"name": "Get from Local Storage",
|
|
1460
1509
|
"description": "Read a value from local storage with the provided key.",
|
|
1461
1510
|
"cache": false,
|
|
@@ -1480,6 +1529,7 @@
|
|
|
1480
1529
|
}
|
|
1481
1530
|
},
|
|
1482
1531
|
"@toddle/string": {
|
|
1532
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1483
1533
|
"name": "String",
|
|
1484
1534
|
"description": "Convert a value of any type to a String.",
|
|
1485
1535
|
"arguments": [
|
|
@@ -1503,6 +1553,7 @@
|
|
|
1503
1553
|
}
|
|
1504
1554
|
},
|
|
1505
1555
|
"@toddle/first": {
|
|
1556
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1506
1557
|
"name": "First",
|
|
1507
1558
|
"description": "Return the first item in an Array.",
|
|
1508
1559
|
"arguments": [
|
|
@@ -1526,6 +1577,7 @@
|
|
|
1526
1577
|
}
|
|
1527
1578
|
},
|
|
1528
1579
|
"@toddle/prepend": {
|
|
1580
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1529
1581
|
"name": "Prepend",
|
|
1530
1582
|
"description": "Add an element to the start of an Array.",
|
|
1531
1583
|
"arguments": [
|
|
@@ -1560,6 +1612,7 @@
|
|
|
1560
1612
|
}
|
|
1561
1613
|
},
|
|
1562
1614
|
"@toddle/groupBy": {
|
|
1615
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1563
1616
|
"name": "Group by",
|
|
1564
1617
|
"description": "Group an Array of items into an Object based on a grouping formula.",
|
|
1565
1618
|
"arguments": [
|
|
@@ -1595,6 +1648,7 @@
|
|
|
1595
1648
|
}
|
|
1596
1649
|
},
|
|
1597
1650
|
"@toddle/add": {
|
|
1651
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1598
1652
|
"name": "Add",
|
|
1599
1653
|
"arguments": [
|
|
1600
1654
|
{
|
|
@@ -1630,6 +1684,7 @@
|
|
|
1630
1684
|
}
|
|
1631
1685
|
},
|
|
1632
1686
|
"@toddle/userAgent": {
|
|
1687
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1633
1688
|
"name": "User Agent",
|
|
1634
1689
|
"description": "Get the user agent for the browser or from the User-Agent header on the server",
|
|
1635
1690
|
"arguments": [],
|
|
@@ -1641,6 +1696,7 @@
|
|
|
1641
1696
|
}
|
|
1642
1697
|
},
|
|
1643
1698
|
"@toddle/lessThan": {
|
|
1699
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1644
1700
|
"name": "Less than",
|
|
1645
1701
|
"description": "Compute if a value is smaller than another value.",
|
|
1646
1702
|
"arguments": [
|
|
@@ -1675,6 +1731,7 @@
|
|
|
1675
1731
|
}
|
|
1676
1732
|
},
|
|
1677
1733
|
"@toddle/fromEntries": {
|
|
1734
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1678
1735
|
"name": "From entries",
|
|
1679
1736
|
"description": "Transform an Array of key-value pairs into an Object. This formula is the reverse of Entries.",
|
|
1680
1737
|
"arguments": [
|
|
@@ -1698,6 +1755,7 @@
|
|
|
1698
1755
|
}
|
|
1699
1756
|
},
|
|
1700
1757
|
"@toddle/unique": {
|
|
1758
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1701
1759
|
"name": "Unique",
|
|
1702
1760
|
"description": "Remove duplicate values from an Array.",
|
|
1703
1761
|
"arguments": [
|
|
@@ -1721,6 +1779,7 @@
|
|
|
1721
1779
|
}
|
|
1722
1780
|
},
|
|
1723
1781
|
"@toddle/getHttpOnlyCookie": {
|
|
1782
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1724
1783
|
"name": "Get Http-Only Cookie",
|
|
1725
1784
|
"description": "Get the value of an Http-Only cookie by name. This formula will is only intended to be used server-side for SSR/proxied API requests to read Http-Only cookies.",
|
|
1726
1785
|
"arguments": [
|
|
@@ -1744,6 +1803,7 @@
|
|
|
1744
1803
|
}
|
|
1745
1804
|
},
|
|
1746
1805
|
"@toddle/languages": {
|
|
1806
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1747
1807
|
"name": "Languages",
|
|
1748
1808
|
"description": "An array of the preferred languages for the user, based on the Navigator.languages property (on the client) or the Accept-Language header (on the server).",
|
|
1749
1809
|
"arguments": [],
|
|
@@ -1755,6 +1815,7 @@
|
|
|
1755
1815
|
}
|
|
1756
1816
|
},
|
|
1757
1817
|
"@toddle/lessOrEqual": {
|
|
1818
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1758
1819
|
"name": "Less or equal",
|
|
1759
1820
|
"description": "Compute if a value is smaller than or equal to another value.",
|
|
1760
1821
|
"arguments": [
|
|
@@ -1789,6 +1850,7 @@
|
|
|
1789
1850
|
}
|
|
1790
1851
|
},
|
|
1791
1852
|
"@toddle/canShare": {
|
|
1853
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1792
1854
|
"name": "Can Share",
|
|
1793
1855
|
"description": "Return a Boolean indicating whether the provided data can be shared (with the \"Share\" action).",
|
|
1794
1856
|
"arguments": [
|
|
@@ -1828,6 +1890,7 @@
|
|
|
1828
1890
|
]
|
|
1829
1891
|
},
|
|
1830
1892
|
"@toddle/encodeBase64": {
|
|
1893
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1831
1894
|
"name": "Encode to base64",
|
|
1832
1895
|
"arguments": [
|
|
1833
1896
|
{
|
|
@@ -1851,6 +1914,7 @@
|
|
|
1851
1914
|
}
|
|
1852
1915
|
},
|
|
1853
1916
|
"@toddle/equals": {
|
|
1917
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1854
1918
|
"name": "Equals",
|
|
1855
1919
|
"description": "Compute if values are identical.",
|
|
1856
1920
|
"arguments": [
|
|
@@ -1885,6 +1949,7 @@
|
|
|
1885
1949
|
}
|
|
1886
1950
|
},
|
|
1887
1951
|
"@toddle/sort_by": {
|
|
1952
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1888
1953
|
"name": "Sort by",
|
|
1889
1954
|
"description": "Sort an Array using a formula.",
|
|
1890
1955
|
"arguments": [
|
|
@@ -1934,6 +1999,7 @@
|
|
|
1934
1999
|
}
|
|
1935
2000
|
},
|
|
1936
2001
|
"@toddle/map": {
|
|
2002
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1937
2003
|
"name": "Map",
|
|
1938
2004
|
"description": "Run a formula on each item of an Array to return a new Array.",
|
|
1939
2005
|
"arguments": [
|
|
@@ -1972,6 +2038,7 @@
|
|
|
1972
2038
|
}
|
|
1973
2039
|
},
|
|
1974
2040
|
"@toddle/entries": {
|
|
2041
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1975
2042
|
"name": "Entries",
|
|
1976
2043
|
"description": "Get an Array of entries from a given Object.",
|
|
1977
2044
|
"arguments": [
|
|
@@ -1995,6 +2062,7 @@
|
|
|
1995
2062
|
}
|
|
1996
2063
|
},
|
|
1997
2064
|
"@toddle/getElementById": {
|
|
2065
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
1998
2066
|
"name": "Get element by id",
|
|
1999
2067
|
"description": "Return a DOM element with a given id.",
|
|
2000
2068
|
"cache": false,
|
|
@@ -2019,6 +2087,7 @@
|
|
|
2019
2087
|
}
|
|
2020
2088
|
},
|
|
2021
2089
|
"@toddle/decodeBase64": {
|
|
2090
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2022
2091
|
"name": "Decode base64",
|
|
2023
2092
|
"arguments": [
|
|
2024
2093
|
{
|
|
@@ -2042,6 +2111,7 @@
|
|
|
2042
2111
|
}
|
|
2043
2112
|
},
|
|
2044
2113
|
"@toddle/flatten": {
|
|
2114
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2045
2115
|
"name": "Flatten",
|
|
2046
2116
|
"description": "Flatten a nested Array.",
|
|
2047
2117
|
"arguments": [
|
|
@@ -2065,6 +2135,7 @@
|
|
|
2065
2135
|
}
|
|
2066
2136
|
},
|
|
2067
2137
|
"@toddle/dropLast": {
|
|
2138
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2068
2139
|
"name": "Drop last",
|
|
2069
2140
|
"description": "Remove item(s) from the end of an Array or String.",
|
|
2070
2141
|
"arguments": [
|
|
@@ -2099,6 +2170,7 @@
|
|
|
2099
2170
|
}
|
|
2100
2171
|
},
|
|
2101
2172
|
"@toddle/minus": {
|
|
2173
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2102
2174
|
"name": "Minus",
|
|
2103
2175
|
"description": "Subtract a Number from a Number.",
|
|
2104
2176
|
"arguments": [
|
|
@@ -2133,6 +2205,7 @@
|
|
|
2133
2205
|
}
|
|
2134
2206
|
},
|
|
2135
2207
|
"@toddle/max": {
|
|
2208
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2136
2209
|
"name": "Max",
|
|
2137
2210
|
"description": "Find the largest Number from a list of inputs.",
|
|
2138
2211
|
"arguments": [
|
|
@@ -2168,6 +2241,7 @@
|
|
|
2168
2241
|
}
|
|
2169
2242
|
},
|
|
2170
2243
|
"@toddle/every": {
|
|
2244
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2171
2245
|
"name": "Every",
|
|
2172
2246
|
"description": "Run a formula returns for all items in an Array.",
|
|
2173
2247
|
"arguments": [
|
|
@@ -2206,6 +2280,7 @@
|
|
|
2206
2280
|
}
|
|
2207
2281
|
},
|
|
2208
2282
|
"@toddle/min": {
|
|
2283
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2209
2284
|
"name": "Min",
|
|
2210
2285
|
"description": "Find the smallest Number from a list of inputs.",
|
|
2211
2286
|
"arguments": [
|
|
@@ -2241,6 +2316,7 @@
|
|
|
2241
2316
|
}
|
|
2242
2317
|
},
|
|
2243
2318
|
"@toddle/shuffle": {
|
|
2319
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2244
2320
|
"name": "Shuffle",
|
|
2245
2321
|
"description": "Shuffle items in an Array or String.",
|
|
2246
2322
|
"cache": false,
|
|
@@ -2265,6 +2341,7 @@
|
|
|
2265
2341
|
}
|
|
2266
2342
|
},
|
|
2267
2343
|
"@toddle/multiply": {
|
|
2344
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2268
2345
|
"name": "Multiply",
|
|
2269
2346
|
"description": "Multiply two or more Numbers.",
|
|
2270
2347
|
"arguments": [
|
|
@@ -2300,6 +2377,7 @@
|
|
|
2300
2377
|
}
|
|
2301
2378
|
},
|
|
2302
2379
|
"@toddle/dateFromTimestamp": {
|
|
2380
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2303
2381
|
"name": "Date From Timestamp",
|
|
2304
2382
|
"arguments": [
|
|
2305
2383
|
{
|
|
@@ -2323,6 +2401,7 @@
|
|
|
2323
2401
|
}
|
|
2324
2402
|
},
|
|
2325
2403
|
"@toddle/branchName": {
|
|
2404
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2326
2405
|
"name": "Branch Name",
|
|
2327
2406
|
"description": "Get the name of the current branch. For production, the branch name is 'main'.",
|
|
2328
2407
|
"arguments": [],
|
|
@@ -2334,6 +2413,7 @@
|
|
|
2334
2413
|
}
|
|
2335
2414
|
},
|
|
2336
2415
|
"@toddle/boolean": {
|
|
2416
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2337
2417
|
"name": "Boolean",
|
|
2338
2418
|
"description": "Convert a value of any type to a Boolean.",
|
|
2339
2419
|
"arguments": [
|
|
@@ -2357,6 +2437,7 @@
|
|
|
2357
2437
|
}
|
|
2358
2438
|
},
|
|
2359
2439
|
"@toddle/last": {
|
|
2440
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2360
2441
|
"name": "Last",
|
|
2361
2442
|
"description": "Get the last item in an Array.",
|
|
2362
2443
|
"arguments": [
|
|
@@ -2380,6 +2461,7 @@
|
|
|
2380
2461
|
}
|
|
2381
2462
|
},
|
|
2382
2463
|
"@toddle/roundUp": {
|
|
2464
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2383
2465
|
"name": "Round up",
|
|
2384
2466
|
"description": "Round a Number up to the nearest decimal point.",
|
|
2385
2467
|
"arguments": [
|
|
@@ -2414,6 +2496,7 @@
|
|
|
2414
2496
|
}
|
|
2415
2497
|
},
|
|
2416
2498
|
"@toddle/findLast": {
|
|
2499
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2417
2500
|
"name": "Find Last",
|
|
2418
2501
|
"description": "Search through an Array of items and apply a formula to each item, to return the last item where the formula returns True.",
|
|
2419
2502
|
"arguments": [
|
|
@@ -2452,6 +2535,7 @@
|
|
|
2452
2535
|
}
|
|
2453
2536
|
},
|
|
2454
2537
|
"@toddle/json": {
|
|
2538
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2455
2539
|
"name": "JSON",
|
|
2456
2540
|
"description": "Convert a value into a JSON String.",
|
|
2457
2541
|
"arguments": [
|
|
@@ -2486,6 +2570,7 @@
|
|
|
2486
2570
|
}
|
|
2487
2571
|
},
|
|
2488
2572
|
"@toddle/typeOf": {
|
|
2573
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2489
2574
|
"name": "Type of",
|
|
2490
2575
|
"description": "Get the type of a given input.",
|
|
2491
2576
|
"arguments": [
|
|
@@ -2509,6 +2594,7 @@
|
|
|
2509
2594
|
}
|
|
2510
2595
|
},
|
|
2511
2596
|
"@toddle/greaterThan": {
|
|
2597
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2512
2598
|
"name": "Greater than",
|
|
2513
2599
|
"description": "Compute if a value is larger than another value.",
|
|
2514
2600
|
"arguments": [
|
|
@@ -2543,6 +2629,7 @@
|
|
|
2543
2629
|
}
|
|
2544
2630
|
},
|
|
2545
2631
|
"@toddle/formatNumber": {
|
|
2632
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2546
2633
|
"name": "Format Number",
|
|
2547
2634
|
"arguments": [
|
|
2548
2635
|
{
|
|
@@ -2552,7 +2639,7 @@
|
|
|
2552
2639
|
"type": "Number"
|
|
2553
2640
|
},
|
|
2554
2641
|
"formula": {
|
|
2555
|
-
"type": "
|
|
2642
|
+
"type": "value",
|
|
2556
2643
|
"value": 100
|
|
2557
2644
|
}
|
|
2558
2645
|
},
|
|
@@ -2588,6 +2675,7 @@
|
|
|
2588
2675
|
}
|
|
2589
2676
|
},
|
|
2590
2677
|
"@toddle/take": {
|
|
2678
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2591
2679
|
"name": "Take",
|
|
2592
2680
|
"description": "Take items from the start of an Array or String.",
|
|
2593
2681
|
"arguments": [
|
|
@@ -2622,6 +2710,7 @@
|
|
|
2622
2710
|
}
|
|
2623
2711
|
},
|
|
2624
2712
|
"@toddle/decodeURIComponent": {
|
|
2713
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2625
2714
|
"name": "Decode URI Component",
|
|
2626
2715
|
"description": "Decode a URI component that was previously encoded with the Encode URI Component formula.",
|
|
2627
2716
|
"arguments": [
|
|
@@ -2645,6 +2734,7 @@
|
|
|
2645
2734
|
}
|
|
2646
2735
|
},
|
|
2647
2736
|
"@toddle/replaceAll": {
|
|
2737
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2648
2738
|
"name": "Replace all",
|
|
2649
2739
|
"description": "Replace all occurrences of a substring in a String.",
|
|
2650
2740
|
"arguments": [
|
|
@@ -2682,6 +2772,7 @@
|
|
|
2682
2772
|
}
|
|
2683
2773
|
},
|
|
2684
2774
|
"@toddle/currentURL": {
|
|
2775
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2685
2776
|
"name": "Current URL",
|
|
2686
2777
|
"description": "Return the current URL of the browser. Use the \"Parse URL\" formula for working with the URL.",
|
|
2687
2778
|
"arguments": [],
|
|
@@ -2694,6 +2785,7 @@
|
|
|
2694
2785
|
}
|
|
2695
2786
|
},
|
|
2696
2787
|
"@toddle/findIndex": {
|
|
2788
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2697
2789
|
"name": "Find index",
|
|
2698
2790
|
"description": "Search through an Array of items and apply a formula to each item, to return the index of the first item where the formula returns True.",
|
|
2699
2791
|
"arguments": [
|
|
@@ -2732,6 +2824,7 @@
|
|
|
2732
2824
|
}
|
|
2733
2825
|
},
|
|
2734
2826
|
"@toddle/startsWith": {
|
|
2827
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2735
2828
|
"name": "Starts with",
|
|
2736
2829
|
"description": "Check if a String has a given prefix.",
|
|
2737
2830
|
"arguments": [
|
|
@@ -2766,6 +2859,7 @@
|
|
|
2766
2859
|
}
|
|
2767
2860
|
},
|
|
2768
2861
|
"@toddle/encodeJSON": {
|
|
2862
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2769
2863
|
"name": "Encode JSON",
|
|
2770
2864
|
"description": "Encode data as JSON.",
|
|
2771
2865
|
"arguments": [
|
|
@@ -2800,6 +2894,7 @@
|
|
|
2800
2894
|
}
|
|
2801
2895
|
},
|
|
2802
2896
|
"@toddle/number": {
|
|
2897
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2803
2898
|
"name": "Number",
|
|
2804
2899
|
"description": "Convert a value of any type to a Number.",
|
|
2805
2900
|
"arguments": [
|
|
@@ -2823,6 +2918,7 @@
|
|
|
2823
2918
|
}
|
|
2824
2919
|
},
|
|
2825
2920
|
"@toddle/set": {
|
|
2921
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2826
2922
|
"name": "Set",
|
|
2827
2923
|
"description": "Set a value in an Object or Array based on a specified path.",
|
|
2828
2924
|
"arguments": [
|
|
@@ -2868,6 +2964,7 @@
|
|
|
2868
2964
|
}
|
|
2869
2965
|
},
|
|
2870
2966
|
"@toddle/keyBy": {
|
|
2967
|
+
"$schema": "../../schemas/libFormula.schema.json",
|
|
2871
2968
|
"name": "Key by",
|
|
2872
2969
|
"description": "Organize an Array of items into an Object based on a Key formula.",
|
|
2873
2970
|
"arguments": [
|
|
@@ -2905,7 +3002,7 @@
|
|
|
2905
3002
|
};
|
|
2906
3003
|
export const actions = {
|
|
2907
3004
|
"@toddle/stopPropagation": {
|
|
2908
|
-
"$schema": "../../schemas/
|
|
3005
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
2909
3006
|
"name": "Stop propagation",
|
|
2910
3007
|
"docs-link": "https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation",
|
|
2911
3008
|
"description": "Stop the event from bubbling up the DOM to parent elements.",
|
|
@@ -2913,7 +3010,7 @@
|
|
|
2913
3010
|
"arguments": []
|
|
2914
3011
|
},
|
|
2915
3012
|
"@toddle/sleep": {
|
|
2916
|
-
"$schema": "../../schemas/
|
|
3013
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
2917
3014
|
"name": "Sleep",
|
|
2918
3015
|
"description": "Run an action after a delay.",
|
|
2919
3016
|
"group": "timers",
|
|
@@ -2937,15 +3034,15 @@
|
|
|
2937
3034
|
}
|
|
2938
3035
|
},
|
|
2939
3036
|
"@toddle/clearSessionStorage": {
|
|
2940
|
-
"$schema": "../../schemas/
|
|
2941
|
-
"name": "Clear
|
|
3037
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3038
|
+
"name": "Clear session storage",
|
|
2942
3039
|
"description": "Delete all values in session storage.",
|
|
2943
3040
|
"group": "session_storage",
|
|
2944
3041
|
"arguments": []
|
|
2945
3042
|
},
|
|
2946
3043
|
"@toddle/deleteFromSessionStorage": {
|
|
2947
|
-
"$schema": "../../schemas/
|
|
2948
|
-
"name": "Delete from
|
|
3044
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3045
|
+
"name": "Delete from session storage",
|
|
2949
3046
|
"description": "Delete a value from session storage (if found) based on the provided key.",
|
|
2950
3047
|
"group": "session_storage",
|
|
2951
3048
|
"arguments": [
|
|
@@ -2963,8 +3060,8 @@
|
|
|
2963
3060
|
]
|
|
2964
3061
|
},
|
|
2965
3062
|
"@toddle/setHttpOnlyCookie": {
|
|
2966
|
-
"$schema": "../../schemas/
|
|
2967
|
-
"name": "Set
|
|
3063
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3064
|
+
"name": "Set HttpOnly cookie",
|
|
2968
3065
|
"description": "Save a key/value pair as an Http-Only cookie. Useful for storing JWTs or other tokens.",
|
|
2969
3066
|
"group": "cookies",
|
|
2970
3067
|
"arguments": [
|
|
@@ -3047,7 +3144,7 @@
|
|
|
3047
3144
|
}
|
|
3048
3145
|
},
|
|
3049
3146
|
"@toddle/setSessionCookies": {
|
|
3050
|
-
"$schema": "../../schemas/
|
|
3147
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3051
3148
|
"name": "Set session cookies",
|
|
3052
3149
|
"description": "Save authentication tokens as session cookies.",
|
|
3053
3150
|
"group": "cookies",
|
|
@@ -3087,8 +3184,8 @@
|
|
|
3087
3184
|
}
|
|
3088
3185
|
},
|
|
3089
3186
|
"@toddle/saveToLocalStorage": {
|
|
3090
|
-
"$schema": "../../schemas/
|
|
3091
|
-
"name": "Save to
|
|
3187
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3188
|
+
"name": "Save to local storage",
|
|
3092
3189
|
"description": "Save a provided key/value to local storage by JSON encoding the value.",
|
|
3093
3190
|
"group": "local_storage",
|
|
3094
3191
|
"arguments": [
|
|
@@ -3117,10 +3214,10 @@
|
|
|
3117
3214
|
]
|
|
3118
3215
|
},
|
|
3119
3216
|
"@toddle/share": {
|
|
3120
|
-
"$schema": "../../schemas/
|
|
3217
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3121
3218
|
"name": "Share",
|
|
3122
3219
|
"description": "Share data with title, text, and/or URL using the Navigator.share API.",
|
|
3123
|
-
"group": "
|
|
3220
|
+
"group": "sharing",
|
|
3124
3221
|
"arguments": [
|
|
3125
3222
|
{
|
|
3126
3223
|
"name": "URL",
|
|
@@ -3158,7 +3255,7 @@
|
|
|
3158
3255
|
]
|
|
3159
3256
|
},
|
|
3160
3257
|
"@toddle/interval": {
|
|
3161
|
-
"$schema": "../../schemas/
|
|
3258
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3162
3259
|
"name": "Interval",
|
|
3163
3260
|
"description": "Run an action every \"delay\" milliseconds.",
|
|
3164
3261
|
"group": "timers",
|
|
@@ -3182,7 +3279,7 @@
|
|
|
3182
3279
|
}
|
|
3183
3280
|
},
|
|
3184
3281
|
"@toddle/logToConsole": {
|
|
3185
|
-
"$schema": "../../schemas/
|
|
3282
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3186
3283
|
"name": "Log to console",
|
|
3187
3284
|
"description": "Log a message to the browser console.",
|
|
3188
3285
|
"group": "debugging",
|
|
@@ -3209,8 +3306,8 @@
|
|
|
3209
3306
|
]
|
|
3210
3307
|
},
|
|
3211
3308
|
"@toddle/deleteFromLocalStorage": {
|
|
3212
|
-
"$schema": "../../schemas/
|
|
3213
|
-
"name": "Delete from
|
|
3309
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3310
|
+
"name": "Delete from local storage",
|
|
3214
3311
|
"description": "Delete a value from local storage (if found) based on the provided key.",
|
|
3215
3312
|
"group": "local_storage",
|
|
3216
3313
|
"arguments": [
|
|
@@ -3228,7 +3325,7 @@
|
|
|
3228
3325
|
]
|
|
3229
3326
|
},
|
|
3230
3327
|
"@toddle/preventDefault": {
|
|
3231
|
-
"$schema": "../../schemas/
|
|
3328
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3232
3329
|
"name": "Prevent default",
|
|
3233
3330
|
"docs-link": "https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault",
|
|
3234
3331
|
"description": "Prevent default browser behavior for this event.",
|
|
@@ -3236,7 +3333,7 @@
|
|
|
3236
3333
|
"arguments": []
|
|
3237
3334
|
},
|
|
3238
3335
|
"@toddle/focus": {
|
|
3239
|
-
"$schema": "../../schemas/
|
|
3336
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3240
3337
|
"name": "Focus",
|
|
3241
3338
|
"description": "Move focus to a DOM element.",
|
|
3242
3339
|
"group": "events",
|
|
@@ -3248,22 +3345,22 @@
|
|
|
3248
3345
|
"type": "Element"
|
|
3249
3346
|
},
|
|
3250
3347
|
"formula": {
|
|
3251
|
-
"type": "
|
|
3348
|
+
"type": "value",
|
|
3252
3349
|
"value": null
|
|
3253
3350
|
}
|
|
3254
3351
|
}
|
|
3255
3352
|
]
|
|
3256
3353
|
},
|
|
3257
3354
|
"@toddle/clearLocalStorage": {
|
|
3258
|
-
"$schema": "../../schemas/
|
|
3259
|
-
"name": "Clear
|
|
3355
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3356
|
+
"name": "Clear local storage",
|
|
3260
3357
|
"description": "Delete all values in local storage.",
|
|
3261
3358
|
"group": "local_storage",
|
|
3262
3359
|
"arguments": []
|
|
3263
3360
|
},
|
|
3264
3361
|
"@toddle/setCookie": {
|
|
3265
|
-
"$schema": "../../schemas/
|
|
3266
|
-
"name": "Set
|
|
3362
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3363
|
+
"name": "Set cookie",
|
|
3267
3364
|
"description": "Save a key/value pair as a non-http-only cookie (readable on the client). Useful for storing user preferences.",
|
|
3268
3365
|
"group": "cookies",
|
|
3269
3366
|
"arguments": [
|
|
@@ -3346,10 +3443,10 @@
|
|
|
3346
3443
|
}
|
|
3347
3444
|
},
|
|
3348
3445
|
"@toddle/copyToClipboard": {
|
|
3349
|
-
"$schema": "../../schemas/
|
|
3446
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3350
3447
|
"name": "Copy to clipboard",
|
|
3351
3448
|
"description": "Copy contents to the clipboard.",
|
|
3352
|
-
"group": "
|
|
3449
|
+
"group": "sharing",
|
|
3353
3450
|
"arguments": [
|
|
3354
3451
|
{
|
|
3355
3452
|
"name": "Value",
|
|
@@ -3365,8 +3462,8 @@
|
|
|
3365
3462
|
]
|
|
3366
3463
|
},
|
|
3367
3464
|
"@toddle/saveToSessionStorage": {
|
|
3368
|
-
"$schema": "../../schemas/
|
|
3369
|
-
"name": "Save to
|
|
3465
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3466
|
+
"name": "Save to session storage",
|
|
3370
3467
|
"description": "Save a provided key/value to session storage by JSON encoding the value.",
|
|
3371
3468
|
"group": "session_storage",
|
|
3372
3469
|
"arguments": [
|
|
@@ -3395,7 +3492,7 @@
|
|
|
3395
3492
|
]
|
|
3396
3493
|
},
|
|
3397
3494
|
"@toddle/gotToURL": {
|
|
3398
|
-
"$schema": "../../schemas/
|
|
3495
|
+
"$schema": "../../schemas/libAction.schema.json",
|
|
3399
3496
|
"name": "Go to URL",
|
|
3400
3497
|
"description": "Navigate to a specified URL.",
|
|
3401
3498
|
"group": "navigation",
|
package/package.json
CHANGED
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
"homepage": "https://github.com/nordcraftengine/nordcraft",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"fast-deep-equal": "3.1.3",
|
|
8
|
-
"@nordcraft/core": "1.0.
|
|
8
|
+
"@nordcraft/core": "1.0.37"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@types/node": "24.0.10",
|
|
12
|
-
"@happy-dom/global-registrator": "18.0.1"
|
|
12
|
+
"@happy-dom/global-registrator": "18.0.1",
|
|
13
|
+
"jsonschema": "1.5.0"
|
|
13
14
|
},
|
|
14
15
|
"scripts": {
|
|
15
16
|
"build": "bun ./bin/generate.js && tsc --project tsconfig.build.json",
|
|
16
17
|
"npm-publish": "bun run build && bun publish --access public",
|
|
17
|
-
"typecheck": "tsc --noEmit",
|
|
18
|
+
"typecheck": "tsc --noEmit && bun bin/validate.ts",
|
|
18
19
|
"watch": "tsc --noEmit -w"
|
|
19
20
|
},
|
|
20
21
|
"files": ["dist"],
|
|
21
|
-
"version": "1.0.
|
|
22
|
+
"version": "1.0.37"
|
|
22
23
|
}
|