@takeshape/schema 8.145.0 → 8.149.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/builtin-schema.d.ts.map +1 -1
  2. package/dist/builtin-schema.js +17 -0
  3. package/dist/get-is-leaf.d.ts +1 -1
  4. package/dist/get-is-leaf.d.ts.map +1 -1
  5. package/dist/get-is-leaf.js +3 -1
  6. package/dist/migration/index.d.ts +1 -0
  7. package/dist/migration/index.d.ts.map +1 -1
  8. package/dist/migration/index.js +4 -1
  9. package/dist/migration/to/v3.0.0.d.ts.map +1 -1
  10. package/dist/migration/to/v3.18.0.d.ts +5 -0
  11. package/dist/migration/to/v3.18.0.d.ts.map +1 -0
  12. package/dist/migration/to/v3.18.0.js +85 -0
  13. package/dist/mocks.d.ts.map +1 -1
  14. package/dist/mocks.js +4 -2
  15. package/dist/project-schema/index.d.ts +4 -1
  16. package/dist/project-schema/index.d.ts.map +1 -1
  17. package/dist/project-schema/index.js +20 -3
  18. package/dist/project-schema/latest.d.ts +4 -139
  19. package/dist/project-schema/latest.d.ts.map +1 -1
  20. package/dist/project-schema/migrate.d.ts.map +1 -1
  21. package/dist/project-schema/migrate.js +4 -0
  22. package/dist/project-schema/v3.18.0.d.ts +1334 -0
  23. package/dist/project-schema/v3.18.0.d.ts.map +1 -0
  24. package/dist/project-schema/v3.18.0.js +5 -0
  25. package/dist/refs.d.ts +14 -2
  26. package/dist/refs.d.ts.map +1 -1
  27. package/dist/refs.js +26 -0
  28. package/dist/relationships.d.ts +28 -2
  29. package/dist/relationships.d.ts.map +1 -1
  30. package/dist/relationships.js +234 -19
  31. package/dist/rewrite.d.ts.map +1 -1
  32. package/dist/rewrite.js +10 -2
  33. package/dist/schema-util.d.ts +1 -18
  34. package/dist/schema-util.d.ts.map +1 -1
  35. package/dist/schema-util.js +36 -120
  36. package/dist/schemas/index.d.ts +2 -2
  37. package/dist/schemas/index.d.ts.map +1 -1
  38. package/dist/schemas/index.js +6 -4
  39. package/dist/schemas/index.ts +4 -2
  40. package/dist/schemas/project-schema/latest.json +2175 -2195
  41. package/dist/schemas/project-schema/v3.18.0.json +2350 -0
  42. package/dist/schemas/project-schema.json +3 -0
  43. package/dist/template-shapes/templates.d.ts +5 -0
  44. package/dist/template-shapes/templates.d.ts.map +1 -1
  45. package/dist/template-shapes/templates.js +59 -28
  46. package/dist/template-shapes/where.d.ts +3 -4
  47. package/dist/template-shapes/where.d.ts.map +1 -1
  48. package/dist/template-shapes/where.js +32 -26
  49. package/dist/types/types.d.ts +42 -2
  50. package/dist/types/types.d.ts.map +1 -1
  51. package/dist/types/utils.d.ts +2 -0
  52. package/dist/types/utils.d.ts.map +1 -1
  53. package/dist/types/utils.js +9 -1
  54. package/dist/unions.d.ts.map +1 -1
  55. package/dist/unions.js +3 -1
  56. package/dist/util/detect-cycles.d.ts +3 -1
  57. package/dist/util/detect-cycles.d.ts.map +1 -1
  58. package/dist/util/detect-cycles.js +37 -28
  59. package/dist/util/form-config.d.ts +9 -0
  60. package/dist/util/form-config.d.ts.map +1 -0
  61. package/dist/util/form-config.js +97 -0
  62. package/dist/util/index.d.ts +1 -0
  63. package/dist/util/index.d.ts.map +1 -1
  64. package/dist/util/index.js +13 -0
  65. package/dist/validate.d.ts.map +1 -1
  66. package/dist/validate.js +75 -45
  67. package/es/builtin-schema.js +17 -0
  68. package/es/get-is-leaf.js +2 -1
  69. package/es/migration/index.js +3 -1
  70. package/es/migration/to/v3.18.0.js +72 -0
  71. package/es/mocks.js +4 -2
  72. package/es/project-schema/index.js +3 -1
  73. package/es/project-schema/migrate.js +5 -1
  74. package/es/project-schema/v3.18.0.js +1 -0
  75. package/es/refs.js +22 -1
  76. package/es/relationships.js +215 -19
  77. package/es/rewrite.js +10 -2
  78. package/es/schema-util.js +38 -119
  79. package/es/schemas/index.js +4 -3
  80. package/es/schemas/index.ts +4 -2
  81. package/es/schemas/project-schema/latest.json +2175 -2195
  82. package/es/schemas/project-schema/v3.18.0.json +2350 -0
  83. package/es/schemas/project-schema.json +3 -0
  84. package/es/template-shapes/templates.js +55 -29
  85. package/es/template-shapes/where.js +29 -23
  86. package/es/types/utils.js +8 -2
  87. package/es/unions.js +2 -1
  88. package/es/util/detect-cycles.js +36 -28
  89. package/es/util/form-config.js +85 -0
  90. package/es/util/index.js +2 -1
  91. package/es/validate.js +74 -46
  92. package/examples/latest/betzino.json +12383 -6066
  93. package/examples/latest/blog-schema.json +46 -25
  94. package/examples/latest/brewery-schema.json +14 -9
  95. package/examples/latest/complex-project-schema.json +442 -244
  96. package/examples/latest/complex-schema.json +17205 -0
  97. package/examples/latest/fabric-ecommerce.json +2 -2
  98. package/examples/latest/frank-and-fred-schema.json +5141 -2391
  99. package/examples/latest/klirr-schema.json +35445 -0
  100. package/examples/latest/massive-schema.json +1205 -640
  101. package/examples/latest/mill-components-schema.json +241 -113
  102. package/examples/latest/one-earth.json +14429 -0
  103. package/examples/latest/pet-oneof-array.json +2 -2
  104. package/examples/latest/post-schema.json +18 -11
  105. package/examples/latest/pruned-shopify-product-schema.json +2 -2
  106. package/examples/latest/real-world-schema.json +81 -41
  107. package/examples/latest/recursive-repeater-schema.json +14 -9
  108. package/examples/latest/recursive-schema.json +14 -9
  109. package/examples/latest/rick-and-morty-ast.json +138 -80
  110. package/examples/latest/rick-and-morty-graphql.json +78 -45
  111. package/examples/latest/rick-and-morty-rest.json +2 -2
  112. package/examples/latest/schema-with-repeater-draftjs.json +38 -23
  113. package/examples/latest/shape-books-v3_2_0.json +138 -80
  114. package/examples/latest/shape-books.json +138 -80
  115. package/examples/latest/shopify-lookbook.json +30 -16
  116. package/examples/latest/shopify-namespace-schema.json +364 -0
  117. package/examples/latest/shopify-store-with-widget.json +2 -2
  118. package/examples/latest/stripe-starter-resolved.json +14 -8
  119. package/examples/latest/user-schema-no-required.json +2 -2
  120. package/examples/latest/user-schema-with-defaults.json +2 -2
  121. package/examples/source/complex-schema.json +12760 -0
  122. package/examples/source/klirr-schema.json +27716 -0
  123. package/examples/source/one-earth.json +11897 -0
  124. package/examples/source/post-schema.json +0 -1
  125. package/package.json +5 -4
@@ -1139,35 +1139,51 @@
1139
1139
  "title": "Components",
1140
1140
  "minItems": 1,
1141
1141
  "@mapping": "takeshape:local:Accordion.XHwBnbh56",
1142
- "type": "array",
1143
1142
  "items": {
1144
- "$ref": "#/shapes/TSRelationship/schema"
1145
- },
1146
- "@relationship": {
1147
- "shapeIds": [
1148
- "Bkw27qxKS"
1149
- ],
1150
- "type": "multiple"
1143
+ "@ref": "local:ExpansionPanel"
1151
1144
  },
1152
1145
  "@backreference": {
1153
1146
  "enabled": true
1147
+ },
1148
+ "type": "array",
1149
+ "@input": {
1150
+ "type": "array",
1151
+ "items": {
1152
+ "@ref": "local:TSRelationship"
1153
+ }
1154
+ },
1155
+ "@args": "TSRelationshipArgs",
1156
+ "@resolver": {
1157
+ "name": "takeshape:getRelated",
1158
+ "service": "takeshape:local",
1159
+ "options": {
1160
+ "nullable": true
1161
+ }
1154
1162
  }
1155
1163
  },
1156
1164
  "classes": {
1157
1165
  "title": "Classes",
1158
1166
  "@mapping": "takeshape:local:Accordion.I5h3Hz4vr",
1159
- "type": "array",
1160
1167
  "items": {
1161
- "$ref": "#/shapes/TSRelationship/schema"
1162
- },
1163
- "@relationship": {
1164
- "shapeIds": [
1165
- "BkIqHcgtr"
1166
- ],
1167
- "type": "multiple"
1168
+ "@ref": "local:CssClass"
1168
1169
  },
1169
1170
  "@backreference": {
1170
1171
  "enabled": true
1172
+ },
1173
+ "type": "array",
1174
+ "@input": {
1175
+ "type": "array",
1176
+ "items": {
1177
+ "@ref": "local:TSRelationship"
1178
+ }
1179
+ },
1180
+ "@args": "TSRelationshipArgs",
1181
+ "@resolver": {
1182
+ "name": "takeshape:getRelated",
1183
+ "service": "takeshape:local",
1184
+ "options": {
1185
+ "nullable": true
1186
+ }
1171
1187
  }
1172
1188
  },
1173
1189
  "multi": {
@@ -1202,15 +1218,20 @@
1202
1218
  "icon": {
1203
1219
  "title": "Icon",
1204
1220
  "@mapping": "takeshape:local:ExpansionPanel.awzVCT3mf",
1205
- "$ref": "#/shapes/TSRelationship/schema",
1206
- "@relationship": {
1207
- "shapeIds": [
1208
- "rkSKzhetS"
1209
- ],
1210
- "type": "single"
1211
- },
1212
1221
  "@backreference": {
1213
1222
  "enabled": true
1223
+ },
1224
+ "@ref": "local:Icon",
1225
+ "@input": {
1226
+ "@ref": "local:TSRelationship"
1227
+ },
1228
+ "@args": "TSRelationshipArgs",
1229
+ "@resolver": {
1230
+ "name": "takeshape:getRelated",
1231
+ "service": "takeshape:local",
1232
+ "options": {
1233
+ "nullable": true
1234
+ }
1214
1235
  }
1215
1236
  },
1216
1237
  "header": {
@@ -1228,18 +1249,26 @@
1228
1249
  "classes": {
1229
1250
  "title": "Classes",
1230
1251
  "@mapping": "takeshape:local:ExpansionPanel.7-bEVubls",
1231
- "type": "array",
1232
1252
  "items": {
1233
- "$ref": "#/shapes/TSRelationship/schema"
1234
- },
1235
- "@relationship": {
1236
- "shapeIds": [
1237
- "BkIqHcgtr"
1238
- ],
1239
- "type": "multiple"
1253
+ "@ref": "local:CssClass"
1240
1254
  },
1241
1255
  "@backreference": {
1242
1256
  "enabled": true
1257
+ },
1258
+ "type": "array",
1259
+ "@input": {
1260
+ "type": "array",
1261
+ "items": {
1262
+ "@ref": "local:TSRelationship"
1263
+ }
1264
+ },
1265
+ "@args": "TSRelationshipArgs",
1266
+ "@resolver": {
1267
+ "name": "takeshape:getRelated",
1268
+ "service": "takeshape:local",
1269
+ "options": {
1270
+ "nullable": true
1271
+ }
1243
1272
  }
1244
1273
  }
1245
1274
  },
@@ -1268,18 +1297,26 @@
1268
1297
  "components": {
1269
1298
  "title": "Components",
1270
1299
  "@mapping": "takeshape:local:TabGroup.4NS8ZoZzR",
1271
- "type": "array",
1272
1300
  "items": {
1273
- "$ref": "#/shapes/TSRelationship/schema"
1274
- },
1275
- "@relationship": {
1276
- "shapeIds": [
1277
- "HJBlYXpur"
1278
- ],
1279
- "type": "multiple"
1301
+ "@ref": "local:Tab"
1280
1302
  },
1281
1303
  "@backreference": {
1282
1304
  "enabled": true
1305
+ },
1306
+ "type": "array",
1307
+ "@input": {
1308
+ "type": "array",
1309
+ "items": {
1310
+ "@ref": "local:TSRelationship"
1311
+ }
1312
+ },
1313
+ "@args": "TSRelationshipArgs",
1314
+ "@resolver": {
1315
+ "name": "takeshape:getRelated",
1316
+ "service": "takeshape:local",
1317
+ "options": {
1318
+ "nullable": true
1319
+ }
1283
1320
  }
1284
1321
  },
1285
1322
  "slug": {
@@ -1291,18 +1328,26 @@
1291
1328
  "classes": {
1292
1329
  "title": "Classes",
1293
1330
  "@mapping": "takeshape:local:TabGroup.qEgZ-lR2X",
1294
- "type": "array",
1295
1331
  "items": {
1296
- "$ref": "#/shapes/TSRelationship/schema"
1297
- },
1298
- "@relationship": {
1299
- "shapeIds": [
1300
- "BkIqHcgtr"
1301
- ],
1302
- "type": "multiple"
1332
+ "@ref": "local:CssClass"
1303
1333
  },
1304
1334
  "@backreference": {
1305
1335
  "enabled": true
1336
+ },
1337
+ "type": "array",
1338
+ "@input": {
1339
+ "type": "array",
1340
+ "items": {
1341
+ "@ref": "local:TSRelationship"
1342
+ }
1343
+ },
1344
+ "@args": "TSRelationshipArgs",
1345
+ "@resolver": {
1346
+ "name": "takeshape:getRelated",
1347
+ "service": "takeshape:local",
1348
+ "options": {
1349
+ "nullable": true
1350
+ }
1306
1351
  }
1307
1352
  }
1308
1353
  },
@@ -1342,18 +1387,26 @@
1342
1387
  "classes": {
1343
1388
  "title": "Classes",
1344
1389
  "@mapping": "takeshape:local:Copy.1fIzL3c-P",
1345
- "type": "array",
1346
1390
  "items": {
1347
- "$ref": "#/shapes/TSRelationship/schema"
1348
- },
1349
- "@relationship": {
1350
- "shapeIds": [
1351
- "BkIqHcgtr"
1352
- ],
1353
- "type": "multiple"
1391
+ "@ref": "local:CssClass"
1354
1392
  },
1355
1393
  "@backreference": {
1356
1394
  "enabled": true
1395
+ },
1396
+ "type": "array",
1397
+ "@input": {
1398
+ "type": "array",
1399
+ "items": {
1400
+ "@ref": "local:TSRelationship"
1401
+ }
1402
+ },
1403
+ "@args": "TSRelationshipArgs",
1404
+ "@resolver": {
1405
+ "name": "takeshape:getRelated",
1406
+ "service": "takeshape:local",
1407
+ "options": {
1408
+ "nullable": true
1409
+ }
1357
1410
  }
1358
1411
  }
1359
1412
  },
@@ -1455,15 +1508,20 @@
1455
1508
  "asset": {
1456
1509
  "title": "Asset",
1457
1510
  "@mapping": "takeshape:local:Icon.Rllc03lmT",
1458
- "$ref": "#/shapes/TSRelationship/schema",
1459
- "@relationship": {
1460
- "shapeIds": [
1461
- "ASSET"
1462
- ],
1463
- "type": "single"
1464
- },
1465
1511
  "@backreference": {
1466
1512
  "enabled": true
1513
+ },
1514
+ "@ref": "local:Asset",
1515
+ "@input": {
1516
+ "@ref": "local:TSRelationship"
1517
+ },
1518
+ "@args": "TSRelationshipArgs",
1519
+ "@resolver": {
1520
+ "name": "takeshape:getRelated",
1521
+ "service": "takeshape:local",
1522
+ "options": {
1523
+ "nullable": true
1524
+ }
1467
1525
  }
1468
1526
  },
1469
1527
  "slug": {
@@ -1604,21 +1662,39 @@
1604
1662
  "title": "Components",
1605
1663
  "minItems": 1,
1606
1664
  "@mapping": "takeshape:local:Tab.BJfViC6N1",
1607
- "type": "array",
1608
1665
  "items": {
1609
- "$ref": "#/shapes/TSRelationship/schema"
1610
- },
1611
- "@relationship": {
1612
- "shapeIds": [
1613
- "Bkw27qxKS",
1614
- "Sy9cQqlFH",
1615
- "Sy-gVqlKB",
1616
- "HkCod7TOS"
1617
- ],
1618
- "type": "multiple"
1666
+ "oneOf": [
1667
+ {
1668
+ "@ref": "local:ExpansionPanel"
1669
+ },
1670
+ {
1671
+ "@ref": "local:Copy"
1672
+ },
1673
+ {
1674
+ "@ref": "local:Accordion"
1675
+ },
1676
+ {
1677
+ "@ref": "local:TabGroup"
1678
+ }
1679
+ ]
1619
1680
  },
1620
1681
  "@backreference": {
1621
1682
  "enabled": true
1683
+ },
1684
+ "type": "array",
1685
+ "@input": {
1686
+ "type": "array",
1687
+ "items": {
1688
+ "@ref": "local:TSRelationship"
1689
+ }
1690
+ },
1691
+ "@args": "TSRelationshipArgs",
1692
+ "@resolver": {
1693
+ "name": "takeshape:getRelated",
1694
+ "service": "takeshape:local",
1695
+ "options": {
1696
+ "nullable": true
1697
+ }
1622
1698
  }
1623
1699
  },
1624
1700
  "slug": {
@@ -1630,18 +1706,26 @@
1630
1706
  "classes": {
1631
1707
  "title": "Classes",
1632
1708
  "@mapping": "takeshape:local:Tab.6phxHUDUl",
1633
- "type": "array",
1634
1709
  "items": {
1635
- "$ref": "#/shapes/TSRelationship/schema"
1636
- },
1637
- "@relationship": {
1638
- "shapeIds": [
1639
- "BkIqHcgtr"
1640
- ],
1641
- "type": "multiple"
1710
+ "@ref": "local:CssClass"
1642
1711
  },
1643
1712
  "@backreference": {
1644
1713
  "enabled": true
1714
+ },
1715
+ "type": "array",
1716
+ "@input": {
1717
+ "type": "array",
1718
+ "items": {
1719
+ "@ref": "local:TSRelationship"
1720
+ }
1721
+ },
1722
+ "@args": "TSRelationshipArgs",
1723
+ "@resolver": {
1724
+ "name": "takeshape:getRelated",
1725
+ "service": "takeshape:local",
1726
+ "options": {
1727
+ "nullable": true
1728
+ }
1645
1729
  }
1646
1730
  }
1647
1731
  },
@@ -1681,20 +1765,28 @@
1681
1765
  },
1682
1766
  "classes": {
1683
1767
  "description": "",
1684
- "type": "array",
1685
1768
  "items": {
1686
- "$ref": "#/shapes/TSRelationship/schema"
1687
- },
1688
- "@relationship": {
1689
- "shapeIds": [
1690
- "BkIqHcgtr"
1691
- ],
1692
- "type": "multiple"
1769
+ "@ref": "local:CssClass"
1693
1770
  },
1694
1771
  "title": "Classes",
1695
1772
  "@mapping": "takeshape:local:Dialog.sSSGKYDu8",
1696
1773
  "@backreference": {
1697
1774
  "enabled": true
1775
+ },
1776
+ "type": "array",
1777
+ "@input": {
1778
+ "type": "array",
1779
+ "items": {
1780
+ "@ref": "local:TSRelationship"
1781
+ }
1782
+ },
1783
+ "@args": "TSRelationshipArgs",
1784
+ "@resolver": {
1785
+ "name": "takeshape:getRelated",
1786
+ "service": "takeshape:local",
1787
+ "options": {
1788
+ "nullable": true
1789
+ }
1698
1790
  }
1699
1791
  },
1700
1792
  "dimensions": {
@@ -1720,23 +1812,41 @@
1720
1812
  },
1721
1813
  "components": {
1722
1814
  "description": "",
1723
- "type": "array",
1724
1815
  "items": {
1725
- "$ref": "#/shapes/TSRelationship/schema"
1726
- },
1727
- "@relationship": {
1728
- "shapeIds": [
1729
- "Sy9cQqlFH",
1730
- "Sy-gVqlKB",
1731
- "Bkw27qxKS",
1732
- "HkCod7TOS"
1733
- ],
1734
- "type": "multiple"
1816
+ "oneOf": [
1817
+ {
1818
+ "@ref": "local:Copy"
1819
+ },
1820
+ {
1821
+ "@ref": "local:Accordion"
1822
+ },
1823
+ {
1824
+ "@ref": "local:ExpansionPanel"
1825
+ },
1826
+ {
1827
+ "@ref": "local:TabGroup"
1828
+ }
1829
+ ]
1735
1830
  },
1736
1831
  "title": "Components",
1737
1832
  "@mapping": "takeshape:local:Dialog.C7Y-4Furz",
1738
1833
  "@backreference": {
1739
1834
  "enabled": true
1835
+ },
1836
+ "type": "array",
1837
+ "@input": {
1838
+ "type": "array",
1839
+ "items": {
1840
+ "@ref": "local:TSRelationship"
1841
+ }
1842
+ },
1843
+ "@args": "TSRelationshipArgs",
1844
+ "@resolver": {
1845
+ "name": "takeshape:getRelated",
1846
+ "service": "takeshape:local",
1847
+ "options": {
1848
+ "nullable": true
1849
+ }
1740
1850
  }
1741
1851
  }
1742
1852
  }
@@ -1803,29 +1913,47 @@
1803
1913
  "properties": {
1804
1914
  "components": {
1805
1915
  "description": "",
1806
- "type": "array",
1807
1916
  "items": {
1808
- "$ref": "#/shapes/TSRelationship/schema"
1809
- },
1810
- "@relationship": {
1811
- "shapeIds": [
1812
- "Sy-gVqlKB",
1813
- "Sy9cQqlFH",
1814
- "HJBlYXpur",
1815
- "Bkw27qxKS"
1816
- ],
1817
- "type": "multiple"
1917
+ "oneOf": [
1918
+ {
1919
+ "@ref": "local:Accordion"
1920
+ },
1921
+ {
1922
+ "@ref": "local:Copy"
1923
+ },
1924
+ {
1925
+ "@ref": "local:Tab"
1926
+ },
1927
+ {
1928
+ "@ref": "local:ExpansionPanel"
1929
+ }
1930
+ ]
1818
1931
  },
1819
1932
  "title": "Components",
1820
1933
  "@mapping": "takeshape:local:ComponentCollection.zocG0CX3A",
1821
1934
  "@backreference": {
1822
1935
  "enabled": true
1936
+ },
1937
+ "type": "array",
1938
+ "@input": {
1939
+ "type": "array",
1940
+ "items": {
1941
+ "@ref": "local:TSRelationship"
1942
+ }
1943
+ },
1944
+ "@args": "TSRelationshipArgs",
1945
+ "@resolver": {
1946
+ "name": "takeshape:getRelated",
1947
+ "service": "takeshape:local",
1948
+ "options": {
1949
+ "nullable": true
1950
+ }
1823
1951
  }
1824
1952
  }
1825
1953
  }
1826
1954
  }
1827
1955
  }
1828
1956
  },
1829
- "schemaVersion": "3.17.1",
1957
+ "schemaVersion": "3.18.0",
1830
1958
  "services": {}
1831
- }
1959
+ }