@rathnasgala2/schemas 3.6.0 → 3.8.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 (53) hide show
  1. package/THIRD_PARTY_LICENSES.json +1 -1
  2. package/diagnostics/diagnostic-map.json +845 -20
  3. package/docs/catalogs/app-components.json +1766 -2
  4. package/docs/catalogs/app-routes.json +598 -1
  5. package/docs/catalogs/schema-inventory.json +10 -10
  6. package/examples/valid/build-input/rules.json +24 -2
  7. package/examples/valid/template-composition/rules.json +769 -0
  8. package/examples/valid/theme-contract/rules.json +1107 -5
  9. package/fixtures/boundary/build-input/rules.json +24 -2
  10. package/fixtures/boundary/template-composition/rules.json +769 -0
  11. package/fixtures/boundary/theme-contract/rules.json +1107 -5
  12. package/fixtures/invalid/build-input/SCHEMA_PATTERN_INVALID/cases.json +22 -11
  13. package/fixtures/invalid/build-input/SCHEMA_TYPE_INVALID/cases.json +22 -0
  14. package/fixtures/invalid/build-input/SCHEMA_UNION_INVALID/cases.json +11 -0
  15. package/fixtures/invalid/template-composition/SCHEMA_CONSTANT_INVALID/cases.json +497 -0
  16. package/fixtures/invalid/template-composition/SCHEMA_ENUM_INVALID/cases.json +83 -0
  17. package/fixtures/invalid/template-composition/SCHEMA_NEGATED_RULE_MATCHED/cases.json +11 -0
  18. package/fixtures/invalid/template-composition/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +909 -0
  19. package/fixtures/invalid/template-composition/SCHEMA_UNION_INVALID/cases.json +20 -0
  20. package/fixtures/invalid/theme-contract/REQUEST_FIELD_UNKNOWN/cases.json +120 -0
  21. package/fixtures/invalid/theme-contract/SCHEMA_CONSTANT_INVALID/cases.json +680 -0
  22. package/fixtures/invalid/theme-contract/SCHEMA_NEGATED_RULE_MATCHED/cases.json +11 -0
  23. package/fixtures/invalid/theme-contract/SCHEMA_PATTERN_INVALID/cases.json +33 -9
  24. package/fixtures/invalid/theme-contract/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +1383 -3
  25. package/fixtures/invalid/theme-contract/SCHEMA_TYPE_INVALID/cases.json +77 -0
  26. package/fixtures/invalid/theme-contract/SCHEMA_UNION_INVALID/cases.json +18 -0
  27. package/fixtures/invalid/theme-contract/SCHEMA_VERSION_UNSUPPORTED/cases.json +110 -0
  28. package/fixtures/manifest.json +7414 -1089
  29. package/fixtures/s2/manifest.json +1 -1
  30. package/fixtures/unknown-field/build-input/rules.json +5 -1
  31. package/fixtures/unknown-field/template-composition/rules.json +111 -0
  32. package/fixtures/unknown-field/theme-contract/rules.json +276 -1
  33. package/generated/browser/validator-core.mjs +3 -3
  34. package/generated/typescript/contracts/artifact-manifest.d.ts +4 -2
  35. package/generated/typescript/contracts/build-input.d.ts +3 -2
  36. package/generated/typescript/contracts/build-provenance.d.ts +4 -2
  37. package/generated/typescript/contracts/deployment-intent.d.ts +1 -0
  38. package/generated/typescript/contracts/deployment-receipt.d.ts +1 -0
  39. package/generated/typescript/contracts/lock.d.ts +2 -1
  40. package/generated/typescript/contracts/template-composition.d.ts +75 -4
  41. package/generated/typescript/contracts/theme-contract.d.ts +75 -2
  42. package/openapi/http-catalog.json +170 -2
  43. package/openapi/openapi.yaml +2711 -145
  44. package/package.json +1 -1
  45. package/sbom.cdx.json +23 -23
  46. package/schemas/artifact-manifest.schema.json +4 -2
  47. package/schemas/build-input.schema.json +12 -2
  48. package/schemas/build-provenance.schema.json +4 -2
  49. package/schemas/deployment-intent.schema.json +1 -0
  50. package/schemas/deployment-receipt.schema.json +1 -0
  51. package/schemas/lock.schema.json +2 -1
  52. package/schemas/template-composition.schema.json +179 -2
  53. package/schemas/theme-contract.schema.json +282 -1
@@ -32,12 +32,19 @@
32
32
  "allOf": [
33
33
  { "$ref": "#/$defs/packageExact" },
34
34
  {
35
- "pattern": "^@rathnasgala2/theme-(?:default|amaze|flashy|minimal|zebra)@"
35
+ "anyOf": [
36
+ {
37
+ "type": "string",
38
+ "pattern": "^@rathnasgala2/theme-(?:default|amaze|flashy|minimal|zebra)@"
39
+ },
40
+ { "type": "string", "pattern": "^@rathnasgala2/theme-editorial@" }
41
+ ]
36
42
  }
37
43
  ]
38
44
  },
39
45
  "contractVersion": { "$ref": "#/$defs/semver" },
40
46
  "templateRange": { "$ref": "#/$defs/semverRange" },
47
+ "composition": { "$ref": "#/$defs/templateComposition" },
41
48
  "stylesheets": {
42
49
  "type": "array",
43
50
  "items": { "$ref": "#/$defs/repoRelativePath" },
@@ -1526,6 +1533,170 @@
1526
1533
  "format": "gala-spdx-expression",
1527
1534
  "x-gala-utf8ByteLength": { "minimum": 1, "maximum": 128 }
1528
1535
  },
1536
+ "templateComposition": {
1537
+ "oneOf": [
1538
+ {
1539
+ "type": "object",
1540
+ "required": [
1541
+ "schemaId",
1542
+ "schemaVersion",
1543
+ "profile",
1544
+ "homeLayout",
1545
+ "articleLayout",
1546
+ "authorLayout",
1547
+ "listingLayout",
1548
+ "headerLayout",
1549
+ "footerLayout",
1550
+ "mediaRatio",
1551
+ "density"
1552
+ ],
1553
+ "properties": {
1554
+ "schemaId": {
1555
+ "const": "urn:gala:schema:template-composition:2.0.0"
1556
+ },
1557
+ "schemaVersion": { "const": "2.0.0" },
1558
+ "profile": { "const": "editorial" },
1559
+ "homeLayout": { "const": "magazine" },
1560
+ "articleLayout": { "const": "editorial" },
1561
+ "authorLayout": { "const": "portrait" },
1562
+ "listingLayout": { "const": "rows" },
1563
+ "headerLayout": { "const": "masthead" },
1564
+ "footerLayout": { "const": "expanded" },
1565
+ "mediaRatio": { "const": "landscape" },
1566
+ "density": { "const": "comfortable" }
1567
+ },
1568
+ "additionalProperties": false
1569
+ },
1570
+ {
1571
+ "type": "object",
1572
+ "required": [
1573
+ "schemaId",
1574
+ "schemaVersion",
1575
+ "profile",
1576
+ "homeLayout",
1577
+ "articleLayout",
1578
+ "authorLayout",
1579
+ "listingLayout",
1580
+ "headerLayout",
1581
+ "footerLayout",
1582
+ "mediaRatio",
1583
+ "density"
1584
+ ],
1585
+ "properties": {
1586
+ "schemaId": {
1587
+ "const": "urn:gala:schema:template-composition:2.0.0"
1588
+ },
1589
+ "schemaVersion": { "const": "2.0.0" },
1590
+ "profile": { "const": "newsletter" },
1591
+ "homeLayout": { "const": "newspaper" },
1592
+ "articleLayout": { "const": "issue" },
1593
+ "authorLayout": { "const": "profile" },
1594
+ "listingLayout": { "const": "issues" },
1595
+ "headerLayout": { "const": "publication" },
1596
+ "footerLayout": { "const": "expanded" },
1597
+ "mediaRatio": { "const": "landscape" },
1598
+ "density": { "const": "comfortable" }
1599
+ },
1600
+ "additionalProperties": false
1601
+ },
1602
+ {
1603
+ "type": "object",
1604
+ "required": [
1605
+ "schemaId",
1606
+ "schemaVersion",
1607
+ "profile",
1608
+ "homeLayout",
1609
+ "articleLayout",
1610
+ "authorLayout",
1611
+ "listingLayout",
1612
+ "headerLayout",
1613
+ "footerLayout",
1614
+ "mediaRatio",
1615
+ "density"
1616
+ ],
1617
+ "properties": {
1618
+ "schemaId": {
1619
+ "const": "urn:gala:schema:template-composition:2.0.0"
1620
+ },
1621
+ "schemaVersion": { "const": "2.0.0" },
1622
+ "profile": { "const": "visual" },
1623
+ "homeLayout": { "const": "gallery" },
1624
+ "articleLayout": { "const": "full-bleed" },
1625
+ "authorLayout": { "const": "portfolio" },
1626
+ "listingLayout": { "const": "image-grid" },
1627
+ "headerLayout": { "const": "minimal" },
1628
+ "footerLayout": { "const": "compact" },
1629
+ "mediaRatio": { "const": "mixed" },
1630
+ "density": { "const": "comfortable" }
1631
+ },
1632
+ "additionalProperties": false
1633
+ },
1634
+ {
1635
+ "type": "object",
1636
+ "required": [
1637
+ "schemaId",
1638
+ "schemaVersion",
1639
+ "profile",
1640
+ "homeLayout",
1641
+ "articleLayout",
1642
+ "authorLayout",
1643
+ "listingLayout",
1644
+ "headerLayout",
1645
+ "footerLayout",
1646
+ "mediaRatio",
1647
+ "density"
1648
+ ],
1649
+ "properties": {
1650
+ "schemaId": {
1651
+ "const": "urn:gala:schema:template-composition:2.0.0"
1652
+ },
1653
+ "schemaVersion": { "const": "2.0.0" },
1654
+ "profile": { "const": "personal" },
1655
+ "homeLayout": { "const": "chronological" },
1656
+ "articleLayout": { "const": "prose" },
1657
+ "authorLayout": { "const": "biography" },
1658
+ "listingLayout": { "const": "dated-rows" },
1659
+ "headerLayout": { "const": "compact" },
1660
+ "footerLayout": { "const": "compact" },
1661
+ "mediaRatio": { "const": "landscape" },
1662
+ "density": { "const": "spacious" }
1663
+ },
1664
+ "additionalProperties": false
1665
+ },
1666
+ {
1667
+ "type": "object",
1668
+ "required": [
1669
+ "schemaId",
1670
+ "schemaVersion",
1671
+ "profile",
1672
+ "homeLayout",
1673
+ "articleLayout",
1674
+ "authorLayout",
1675
+ "listingLayout",
1676
+ "headerLayout",
1677
+ "footerLayout",
1678
+ "mediaRatio",
1679
+ "density"
1680
+ ],
1681
+ "properties": {
1682
+ "schemaId": {
1683
+ "const": "urn:gala:schema:template-composition:2.0.0"
1684
+ },
1685
+ "schemaVersion": { "const": "2.0.0" },
1686
+ "profile": { "const": "developer" },
1687
+ "homeLayout": { "const": "topic-index" },
1688
+ "articleLayout": { "const": "technical" },
1689
+ "authorLayout": { "const": "biography" },
1690
+ "listingLayout": { "const": "rows" },
1691
+ "headerLayout": { "const": "utility" },
1692
+ "footerLayout": { "const": "compact" },
1693
+ "mediaRatio": { "const": "landscape" },
1694
+ "density": { "const": "compact" }
1695
+ },
1696
+ "additionalProperties": false
1697
+ }
1698
+ ]
1699
+ },
1529
1700
  "themeToken": {
1530
1701
  "type": "object",
1531
1702
  "required": ["key", "type", "light", "dark"],
@@ -1905,6 +2076,12 @@
1905
2076
  "themeId": { "const": "zebra" },
1906
2077
  "package": { "pattern": "^@rathnasgala2\\/theme-zebra@" }
1907
2078
  }
2079
+ },
2080
+ {
2081
+ "properties": {
2082
+ "themeId": { "const": "editorial" },
2083
+ "package": { "pattern": "^@rathnasgala2\\/theme-editorial@" }
2084
+ }
1908
2085
  }
1909
2086
  ]
1910
2087
  },
@@ -1941,6 +2118,110 @@
1941
2118
  }
1942
2119
  }
1943
2120
  ]
2121
+ },
2122
+ {
2123
+ "if": {
2124
+ "properties": { "contractVersion": { "const": "4.0.0" } },
2125
+ "required": ["contractVersion"]
2126
+ },
2127
+ "then": {
2128
+ "properties": { "templateRange": { "const": "^4.0.0" } },
2129
+ "required": ["composition"],
2130
+ "allOf": [
2131
+ {
2132
+ "if": {
2133
+ "properties": { "themeId": { "const": "default" } },
2134
+ "required": ["themeId"]
2135
+ },
2136
+ "then": {
2137
+ "properties": {
2138
+ "composition": {
2139
+ "properties": { "profile": { "const": "newsletter" } },
2140
+ "required": ["profile"]
2141
+ }
2142
+ }
2143
+ }
2144
+ },
2145
+ {
2146
+ "if": {
2147
+ "properties": { "themeId": { "const": "amaze" } },
2148
+ "required": ["themeId"]
2149
+ },
2150
+ "then": {
2151
+ "properties": {
2152
+ "composition": {
2153
+ "properties": { "profile": { "const": "editorial" } },
2154
+ "required": ["profile"]
2155
+ }
2156
+ }
2157
+ }
2158
+ },
2159
+ {
2160
+ "if": {
2161
+ "properties": { "themeId": { "const": "editorial" } },
2162
+ "required": ["themeId"]
2163
+ },
2164
+ "then": {
2165
+ "properties": {
2166
+ "composition": {
2167
+ "properties": { "profile": { "const": "editorial" } },
2168
+ "required": ["profile"]
2169
+ }
2170
+ }
2171
+ }
2172
+ },
2173
+ {
2174
+ "if": {
2175
+ "properties": { "themeId": { "const": "flashy" } },
2176
+ "required": ["themeId"]
2177
+ },
2178
+ "then": {
2179
+ "properties": {
2180
+ "composition": {
2181
+ "properties": { "profile": { "const": "visual" } },
2182
+ "required": ["profile"]
2183
+ }
2184
+ }
2185
+ }
2186
+ },
2187
+ {
2188
+ "if": {
2189
+ "properties": { "themeId": { "const": "minimal" } },
2190
+ "required": ["themeId"]
2191
+ },
2192
+ "then": {
2193
+ "properties": {
2194
+ "composition": {
2195
+ "properties": { "profile": { "const": "personal" } },
2196
+ "required": ["profile"]
2197
+ }
2198
+ }
2199
+ }
2200
+ },
2201
+ {
2202
+ "if": {
2203
+ "properties": { "themeId": { "const": "zebra" } },
2204
+ "required": ["themeId"]
2205
+ },
2206
+ "then": {
2207
+ "properties": {
2208
+ "composition": {
2209
+ "properties": { "profile": { "const": "developer" } },
2210
+ "required": ["profile"]
2211
+ }
2212
+ }
2213
+ }
2214
+ }
2215
+ ]
2216
+ },
2217
+ "else": { "not": { "required": ["composition"] } }
2218
+ },
2219
+ {
2220
+ "if": {
2221
+ "properties": { "themeId": { "const": "editorial" } },
2222
+ "required": ["themeId"]
2223
+ },
2224
+ "then": { "properties": { "contractVersion": { "const": "4.0.0" } } }
1944
2225
  }
1945
2226
  ],
1946
2227
  "$comment": "The semantic validator enforces package/theme identity, slot/fixture catalogs, non-color palette equality, CSS/package admission, evidence, budgets, and every self-excluding digest."