@almadar/std 13.5.0 → 13.6.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.
@@ -722,22 +722,22 @@
722
722
  "render-ui",
723
723
  "main",
724
724
  {
725
- "type": "stack",
726
- "align": "center",
727
725
  "direction": "vertical",
728
- "className": "py-12",
729
- "gap": "md",
726
+ "align": "center",
730
727
  "children": [
731
728
  {
732
729
  "type": "spinner"
733
730
  },
734
731
  {
732
+ "color": "muted",
735
733
  "content": "Loading…",
736
- "type": "typography",
737
734
  "variant": "caption",
738
- "color": "muted"
735
+ "type": "typography"
739
736
  }
740
- ]
737
+ ],
738
+ "gap": "md",
739
+ "type": "stack",
740
+ "className": "py-12"
741
741
  }
742
742
  ]
743
743
  ]
@@ -751,108 +751,87 @@
751
751
  "render-ui",
752
752
  "main",
753
753
  {
754
- "type": "dashboard-layout",
755
- "navItems": [
756
- {
757
- "href": "/articles",
758
- "icon": "file-text",
759
- "label": "Articles"
760
- },
761
- {
762
- "icon": "image",
763
- "label": "Media",
764
- "href": "/media"
765
- },
766
- {
767
- "icon": "folder",
768
- "label": "Categories",
769
- "href": "/categories"
770
- }
771
- ],
772
- "appName": "CmsApp",
773
754
  "children": [
774
755
  {
775
- "direction": "vertical",
776
- "className": "max-w-5xl mx-auto w-full",
777
756
  "children": [
778
757
  {
779
- "justify": "between",
780
- "direction": "horizontal",
781
758
  "gap": "md",
759
+ "justify": "between",
782
760
  "type": "stack",
783
- "align": "center",
761
+ "direction": "horizontal",
784
762
  "children": [
785
763
  {
786
764
  "children": [
787
765
  {
788
- "name": "file-text",
789
- "type": "icon"
766
+ "type": "icon",
767
+ "name": "file-text"
790
768
  },
791
769
  {
792
770
  "type": "typography",
793
- "variant": "h2",
794
- "content": "Articles"
771
+ "content": "Articles",
772
+ "variant": "h2"
795
773
  }
796
774
  ],
797
- "direction": "horizontal",
775
+ "type": "stack",
798
776
  "align": "center",
799
777
  "gap": "sm",
800
- "type": "stack"
778
+ "direction": "horizontal"
801
779
  },
802
780
  {
803
- "gap": "sm",
804
781
  "type": "stack",
805
- "direction": "horizontal",
806
782
  "children": [
807
783
  {
784
+ "variant": "primary",
808
785
  "type": "button",
809
- "action": "CREATE",
786
+ "label": "Create Article",
810
787
  "icon": "plus",
811
- "variant": "primary",
812
- "label": "Create Article"
788
+ "action": "CREATE"
813
789
  }
814
- ]
790
+ ],
791
+ "gap": "sm",
792
+ "direction": "horizontal"
815
793
  }
816
- ]
794
+ ],
795
+ "align": "center"
817
796
  },
818
797
  {
819
798
  "type": "divider"
820
799
  },
821
800
  {
822
- "variant": "card",
801
+ "type": "data-list",
823
802
  "entity": "@payload.data",
824
803
  "itemActions": [
825
804
  {
826
- "event": "VIEW",
827
805
  "label": "View",
828
- "variant": "ghost"
806
+ "variant": "ghost",
807
+ "event": "VIEW"
829
808
  },
830
809
  {
831
- "variant": "ghost",
810
+ "event": "EDIT",
832
811
  "label": "Edit",
833
- "event": "EDIT"
812
+ "variant": "ghost"
834
813
  },
835
814
  {
836
- "label": "Delete",
815
+ "variant": "danger",
837
816
  "event": "DELETE",
838
- "variant": "danger"
817
+ "label": "Delete"
839
818
  }
840
819
  ],
820
+ "variant": "card",
841
821
  "gap": "sm",
842
- "type": "data-list",
843
822
  "fields": [
844
823
  {
845
- "variant": "h3",
846
824
  "icon": "file-text",
847
- "name": "title"
825
+ "name": "title",
826
+ "variant": "h3"
848
827
  },
849
828
  {
850
829
  "name": "status",
851
830
  "variant": "badge"
852
831
  },
853
832
  {
854
- "variant": "body",
855
- "name": "author"
833
+ "name": "author",
834
+ "variant": "body"
856
835
  },
857
836
  {
858
837
  "name": "slug",
@@ -860,17 +839,43 @@
860
839
  },
861
840
  {
862
841
  "variant": "caption",
842
+ "label": "Published",
863
843
  "name": "publishedAt",
864
- "format": "date",
865
- "label": "Published"
844
+ "format": "date"
866
845
  }
867
846
  ]
868
847
  }
869
848
  ],
849
+ "gap": "lg",
870
850
  "type": "stack",
871
- "gap": "lg"
851
+ "direction": "vertical",
852
+ "className": "max-w-5xl mx-auto w-full"
872
853
  }
873
- ]
854
+ ],
855
+ "appName": "CmsApp",
856
+ "navItems": [
857
+ {
858
+ "label": "CMS Hub",
859
+ "href": "/cms-hub",
860
+ "icon": "layout-grid"
861
+ },
862
+ {
863
+ "label": "Articles",
864
+ "href": "/articles",
865
+ "icon": "file-text"
866
+ },
867
+ {
868
+ "href": "/media",
869
+ "icon": "image",
870
+ "label": "Media"
871
+ },
872
+ {
873
+ "icon": "folder",
874
+ "href": "/categories",
875
+ "label": "Categories"
876
+ }
877
+ ],
878
+ "type": "dashboard-layout"
874
879
  }
875
880
  ]
876
881
  ]
@@ -884,7 +889,7 @@
884
889
  "render-ui",
885
890
  "main",
886
891
  {
887
- "direction": "vertical",
892
+ "gap": "md",
888
893
  "children": [
889
894
  {
890
895
  "color": "destructive",
@@ -892,28 +897,28 @@
892
897
  "name": "alert-triangle"
893
898
  },
894
899
  {
895
- "variant": "h3",
896
900
  "content": "Failed to load article",
897
- "type": "typography"
901
+ "type": "typography",
902
+ "variant": "h3"
898
903
  },
899
904
  {
900
- "type": "typography",
901
905
  "content": "@payload.error",
902
906
  "color": "muted",
907
+ "type": "typography",
903
908
  "variant": "body"
904
909
  },
905
910
  {
906
911
  "type": "button",
912
+ "variant": "primary",
907
913
  "action": "INIT",
908
- "icon": "rotate-ccw",
909
914
  "label": "Retry",
910
- "variant": "primary"
915
+ "icon": "rotate-ccw"
911
916
  }
912
917
  ],
913
- "align": "center",
914
918
  "type": "stack",
915
919
  "className": "py-12",
916
- "gap": "md"
920
+ "direction": "vertical",
921
+ "align": "center"
917
922
  }
918
923
  ]
919
924
  ]
@@ -1113,8 +1118,8 @@
1113
1118
  "Article",
1114
1119
  {
1115
1120
  "emit": {
1116
- "failure": "ArticleLoadFailed",
1117
- "success": "ArticleLoaded"
1121
+ "success": "ArticleLoaded",
1122
+ "failure": "ArticleLoadFailed"
1118
1123
  }
1119
1124
  }
1120
1125
  ],
@@ -1122,29 +1127,31 @@
1122
1127
  "render-ui",
1123
1128
  "modal",
1124
1129
  {
1125
- "type": "stack",
1126
1130
  "direction": "vertical",
1131
+ "gap": "md",
1127
1132
  "children": [
1128
1133
  {
1129
- "gap": "sm",
1130
1134
  "children": [
1131
1135
  {
1132
1136
  "type": "icon",
1133
1137
  "name": "plus-circle"
1134
1138
  },
1135
1139
  {
1136
- "content": "Create Article",
1140
+ "variant": "h3",
1137
1141
  "type": "typography",
1138
- "variant": "h3"
1142
+ "content": "Create Article"
1139
1143
  }
1140
1144
  ],
1141
1145
  "type": "stack",
1142
- "direction": "horizontal"
1146
+ "direction": "horizontal",
1147
+ "gap": "sm"
1143
1148
  },
1144
1149
  {
1145
1150
  "type": "divider"
1146
1151
  },
1147
1152
  {
1153
+ "cancelEvent": "CLOSE",
1154
+ "mode": "create",
1148
1155
  "fields": [
1149
1156
  "title",
1150
1157
  "slug",
@@ -1154,12 +1161,10 @@
1154
1161
  "publishedAt"
1155
1162
  ],
1156
1163
  "type": "form-section",
1157
- "cancelEvent": "CLOSE",
1158
- "mode": "create",
1159
1164
  "submitEvent": "SAVE"
1160
1165
  }
1161
1166
  ],
1162
- "gap": "md"
1167
+ "type": "stack"
1163
1168
  }
1164
1169
  ]
1165
1170
  ]
@@ -1420,8 +1425,8 @@
1420
1425
  "Article",
1421
1426
  {
1422
1427
  "emit": {
1423
- "success": "ArticleLoaded",
1424
- "failure": "ArticleLoadFailed"
1428
+ "failure": "ArticleLoadFailed",
1429
+ "success": "ArticleLoaded"
1425
1430
  }
1426
1431
  }
1427
1432
  ]
@@ -1436,19 +1441,18 @@
1436
1441
  "fetch",
1437
1442
  "Article",
1438
1443
  {
1439
- "id": "@payload.id",
1440
1444
  "emit": {
1441
1445
  "success": "ArticleLoaded",
1442
1446
  "failure": "ArticleLoadFailed"
1443
- }
1447
+ },
1448
+ "id": "@payload.id"
1444
1449
  }
1445
1450
  ],
1446
1451
  [
1447
1452
  "render-ui",
1448
1453
  "modal",
1449
1454
  {
1450
- "gap": "md",
1451
- "type": "stack",
1455
+ "direction": "vertical",
1452
1456
  "children": [
1453
1457
  {
1454
1458
  "gap": "sm",
@@ -1456,13 +1460,13 @@
1456
1460
  "type": "stack",
1457
1461
  "children": [
1458
1462
  {
1459
- "name": "edit",
1460
- "type": "icon"
1463
+ "type": "icon",
1464
+ "name": "edit"
1461
1465
  },
1462
1466
  {
1463
- "content": "Edit Article",
1467
+ "type": "typography",
1464
1468
  "variant": "h3",
1465
- "type": "typography"
1469
+ "content": "Edit Article"
1466
1470
  }
1467
1471
  ]
1468
1472
  },
@@ -1470,11 +1474,6 @@
1470
1474
  "type": "divider"
1471
1475
  },
1472
1476
  {
1473
- "cancelEvent": "CLOSE",
1474
- "type": "form-section",
1475
- "entity": "@payload.row",
1476
- "mode": "edit",
1477
- "submitEvent": "SAVE",
1478
1477
  "fields": [
1479
1478
  "title",
1480
1479
  "slug",
@@ -1482,10 +1481,16 @@
1482
1481
  "author",
1483
1482
  "status",
1484
1483
  "publishedAt"
1485
- ]
1484
+ ],
1485
+ "entity": "@payload.row",
1486
+ "cancelEvent": "CLOSE",
1487
+ "mode": "edit",
1488
+ "submitEvent": "SAVE",
1489
+ "type": "form-section"
1486
1490
  }
1487
1491
  ],
1488
- "direction": "vertical"
1492
+ "type": "stack",
1493
+ "gap": "md"
1489
1494
  }
1490
1495
  ]
1491
1496
  ]
@@ -1627,6 +1632,10 @@
1627
1632
  "name": "id",
1628
1633
  "type": "string",
1629
1634
  "required": true
1635
+ },
1636
+ {
1637
+ "name": "row",
1638
+ "type": "Article"
1630
1639
  }
1631
1640
  ]
1632
1641
  },
@@ -1697,171 +1706,201 @@
1697
1706
  "to": "open",
1698
1707
  "event": "VIEW",
1699
1708
  "effects": [
1709
+ [
1710
+ "set",
1711
+ "@entity.title",
1712
+ "@payload.row.title"
1713
+ ],
1714
+ [
1715
+ "set",
1716
+ "@entity.slug",
1717
+ "@payload.row.slug"
1718
+ ],
1719
+ [
1720
+ "set",
1721
+ "@entity.content",
1722
+ "@payload.row.content"
1723
+ ],
1724
+ [
1725
+ "set",
1726
+ "@entity.author",
1727
+ "@payload.row.author"
1728
+ ],
1729
+ [
1730
+ "set",
1731
+ "@entity.status",
1732
+ "@payload.row.status"
1733
+ ],
1734
+ [
1735
+ "set",
1736
+ "@entity.publishedAt",
1737
+ "@payload.row.publishedAt"
1738
+ ],
1700
1739
  [
1701
1740
  "fetch",
1702
1741
  "Article",
1703
1742
  {
1743
+ "id": "@payload.id",
1704
1744
  "emit": {
1705
1745
  "success": "ArticleLoaded",
1706
1746
  "failure": "ArticleLoadFailed"
1707
- },
1708
- "id": "@payload.id"
1747
+ }
1709
1748
  }
1710
1749
  ],
1711
1750
  [
1712
1751
  "render-ui",
1713
1752
  "modal",
1714
1753
  {
1754
+ "direction": "vertical",
1715
1755
  "gap": "md",
1716
1756
  "children": [
1717
1757
  {
1758
+ "type": "stack",
1759
+ "gap": "sm",
1718
1760
  "children": [
1719
1761
  {
1720
1762
  "name": "eye",
1721
1763
  "type": "icon"
1722
1764
  },
1723
1765
  {
1766
+ "type": "typography",
1724
1767
  "content": "@entity.title",
1725
- "variant": "h3",
1726
- "type": "typography"
1768
+ "variant": "h3"
1727
1769
  }
1728
1770
  ],
1729
- "type": "stack",
1730
- "align": "center",
1731
- "gap": "sm",
1732
- "direction": "horizontal"
1771
+ "direction": "horizontal",
1772
+ "align": "center"
1733
1773
  },
1734
1774
  {
1735
1775
  "type": "divider"
1736
1776
  },
1737
1777
  {
1738
1778
  "gap": "md",
1779
+ "type": "stack",
1780
+ "direction": "horizontal",
1739
1781
  "children": [
1740
1782
  {
1741
1783
  "content": "Title",
1742
- "type": "typography",
1743
- "variant": "caption"
1784
+ "variant": "caption",
1785
+ "type": "typography"
1744
1786
  },
1745
1787
  {
1746
- "content": "@entity.title",
1747
1788
  "variant": "body",
1748
- "type": "typography"
1789
+ "type": "typography",
1790
+ "content": "@entity.title"
1749
1791
  }
1750
- ],
1751
- "direction": "horizontal",
1752
- "type": "stack"
1792
+ ]
1753
1793
  },
1754
1794
  {
1795
+ "direction": "horizontal",
1755
1796
  "type": "stack",
1756
1797
  "gap": "md",
1757
1798
  "children": [
1758
1799
  {
1800
+ "type": "typography",
1759
1801
  "variant": "caption",
1760
- "content": "Slug",
1761
- "type": "typography"
1802
+ "content": "Slug"
1762
1803
  },
1763
1804
  {
1764
- "content": "@entity.slug",
1805
+ "type": "typography",
1765
1806
  "variant": "body",
1766
- "type": "typography"
1807
+ "content": "@entity.slug"
1767
1808
  }
1768
- ],
1769
- "direction": "horizontal"
1809
+ ]
1770
1810
  },
1771
1811
  {
1772
- "gap": "md",
1773
1812
  "type": "stack",
1813
+ "gap": "md",
1814
+ "direction": "horizontal",
1774
1815
  "children": [
1775
1816
  {
1776
- "content": "Content",
1817
+ "type": "typography",
1777
1818
  "variant": "caption",
1778
- "type": "typography"
1819
+ "content": "Content"
1779
1820
  },
1780
1821
  {
1781
1822
  "type": "typography",
1782
1823
  "content": "@entity.content",
1783
1824
  "variant": "body"
1784
1825
  }
1785
- ],
1786
- "direction": "horizontal"
1826
+ ]
1787
1827
  },
1788
1828
  {
1789
1829
  "gap": "md",
1830
+ "type": "stack",
1831
+ "direction": "horizontal",
1790
1832
  "children": [
1791
1833
  {
1792
1834
  "type": "typography",
1793
- "variant": "caption",
1794
- "content": "Author"
1835
+ "content": "Author",
1836
+ "variant": "caption"
1795
1837
  },
1796
1838
  {
1839
+ "variant": "body",
1797
1840
  "content": "@entity.author",
1798
- "type": "typography",
1799
- "variant": "body"
1841
+ "type": "typography"
1800
1842
  }
1801
- ],
1802
- "type": "stack",
1803
- "direction": "horizontal"
1843
+ ]
1804
1844
  },
1805
1845
  {
1806
- "type": "stack",
1807
1846
  "gap": "md",
1808
- "direction": "horizontal",
1809
1847
  "children": [
1810
1848
  {
1811
- "variant": "caption",
1812
1849
  "content": "Status",
1850
+ "variant": "caption",
1813
1851
  "type": "typography"
1814
1852
  },
1815
1853
  {
1816
- "type": "typography",
1817
1854
  "variant": "body",
1818
- "content": "@entity.status"
1855
+ "content": "@entity.status",
1856
+ "type": "typography"
1819
1857
  }
1820
- ]
1858
+ ],
1859
+ "direction": "horizontal",
1860
+ "type": "stack"
1821
1861
  },
1822
1862
  {
1863
+ "type": "stack",
1823
1864
  "gap": "md",
1865
+ "direction": "horizontal",
1824
1866
  "children": [
1825
1867
  {
1868
+ "content": "Published At",
1826
1869
  "type": "typography",
1827
- "variant": "caption",
1828
- "content": "Published At"
1870
+ "variant": "caption"
1829
1871
  },
1830
1872
  {
1831
1873
  "content": "@entity.publishedAt",
1832
1874
  "type": "typography",
1833
1875
  "variant": "body"
1834
1876
  }
1835
- ],
1836
- "direction": "horizontal",
1837
- "type": "stack"
1877
+ ]
1838
1878
  },
1839
1879
  {
1840
1880
  "type": "divider"
1841
1881
  },
1842
1882
  {
1843
- "gap": "sm",
1844
- "justify": "end",
1845
- "type": "stack",
1846
1883
  "children": [
1847
1884
  {
1848
- "action": "EDIT",
1849
- "type": "button",
1885
+ "icon": "edit",
1850
1886
  "label": "Edit",
1851
- "variant": "primary",
1852
- "icon": "edit"
1887
+ "type": "button",
1888
+ "action": "EDIT",
1889
+ "variant": "primary"
1853
1890
  },
1854
1891
  {
1855
- "action": "CLOSE",
1856
1892
  "label": "Close",
1857
1893
  "variant": "ghost",
1858
- "type": "button"
1894
+ "type": "button",
1895
+ "action": "CLOSE"
1859
1896
  }
1860
1897
  ],
1898
+ "type": "stack",
1899
+ "gap": "sm",
1900
+ "justify": "end",
1861
1901
  "direction": "horizontal"
1862
1902
  }
1863
1903
  ],
1864
- "direction": "vertical",
1865
1904
  "type": "stack"
1866
1905
  }
1867
1906
  ]
@@ -2114,8 +2153,8 @@
2114
2153
  "Article",
2115
2154
  {
2116
2155
  "emit": {
2117
- "failure": "ArticleLoadFailed",
2118
- "success": "ArticleLoaded"
2156
+ "success": "ArticleLoaded",
2157
+ "failure": "ArticleLoadFailed"
2119
2158
  },
2120
2159
  "id": "@payload.id"
2121
2160
  }
@@ -2124,56 +2163,56 @@
2124
2163
  "render-ui",
2125
2164
  "modal",
2126
2165
  {
2127
- "gap": "md",
2128
2166
  "direction": "vertical",
2129
2167
  "children": [
2130
2168
  {
2169
+ "align": "center",
2170
+ "direction": "horizontal",
2171
+ "gap": "sm",
2172
+ "type": "stack",
2131
2173
  "children": [
2132
2174
  {
2133
2175
  "type": "icon",
2134
2176
  "name": "alert-triangle"
2135
2177
  },
2136
2178
  {
2137
- "variant": "h3",
2179
+ "type": "typography",
2138
2180
  "content": "Delete Article",
2139
- "type": "typography"
2181
+ "variant": "h3"
2140
2182
  }
2141
- ],
2142
- "align": "center",
2143
- "type": "stack",
2144
- "gap": "sm",
2145
- "direction": "horizontal"
2183
+ ]
2146
2184
  },
2147
2185
  {
2148
2186
  "type": "divider"
2149
2187
  },
2150
2188
  {
2151
- "message": "This action cannot be undone.",
2152
2189
  "type": "alert",
2153
- "variant": "error"
2190
+ "variant": "error",
2191
+ "message": "This action cannot be undone."
2154
2192
  },
2155
2193
  {
2156
- "gap": "sm",
2157
- "type": "stack",
2158
- "direction": "horizontal",
2159
2194
  "justify": "end",
2195
+ "type": "stack",
2160
2196
  "children": [
2161
2197
  {
2162
2198
  "action": "CANCEL",
2163
- "label": "Cancel",
2199
+ "variant": "ghost",
2164
2200
  "type": "button",
2165
- "variant": "ghost"
2201
+ "label": "Cancel"
2166
2202
  },
2167
2203
  {
2168
- "type": "button",
2169
- "variant": "danger",
2170
- "label": "Delete",
2171
2204
  "icon": "check",
2172
- "action": "CONFIRM_DELETE"
2205
+ "label": "Delete",
2206
+ "action": "CONFIRM_DELETE",
2207
+ "type": "button",
2208
+ "variant": "danger"
2173
2209
  }
2174
- ]
2210
+ ],
2211
+ "gap": "sm",
2212
+ "direction": "horizontal"
2175
2213
  }
2176
2214
  ],
2215
+ "gap": "md",
2177
2216
  "type": "stack"
2178
2217
  }
2179
2218
  ]
@@ -2191,8 +2230,8 @@
2191
2230
  "@entity.pendingId",
2192
2231
  {
2193
2232
  "emit": {
2194
- "failure": "ArticleDeleteFailed",
2195
- "success": "ArticleDeleted"
2233
+ "success": "ArticleDeleted",
2234
+ "failure": "ArticleDeleteFailed"
2196
2235
  }
2197
2236
  }
2198
2237
  ],
@@ -2495,8 +2534,8 @@
2495
2534
  "MediaAsset",
2496
2535
  {
2497
2536
  "emit": {
2498
- "success": "MediaAssetLoaded",
2499
- "failure": "MediaAssetLoadFailed"
2537
+ "failure": "MediaAssetLoadFailed",
2538
+ "success": "MediaAssetLoaded"
2500
2539
  }
2501
2540
  }
2502
2541
  ],
@@ -2504,22 +2543,22 @@
2504
2543
  "render-ui",
2505
2544
  "main",
2506
2545
  {
2546
+ "direction": "vertical",
2547
+ "gap": "md",
2548
+ "align": "center",
2549
+ "className": "py-12",
2550
+ "type": "stack",
2507
2551
  "children": [
2508
2552
  {
2509
2553
  "type": "spinner"
2510
2554
  },
2511
2555
  {
2512
- "type": "typography",
2513
2556
  "variant": "caption",
2514
- "color": "muted",
2515
- "content": "Loading…"
2557
+ "content": "Loading…",
2558
+ "type": "typography",
2559
+ "color": "muted"
2516
2560
  }
2517
- ],
2518
- "gap": "md",
2519
- "align": "center",
2520
- "direction": "vertical",
2521
- "type": "stack",
2522
- "className": "py-12"
2561
+ ]
2523
2562
  }
2524
2563
  ]
2525
2564
  ]
@@ -2533,115 +2572,120 @@
2533
2572
  "render-ui",
2534
2573
  "main",
2535
2574
  {
2536
- "type": "dashboard-layout",
2537
2575
  "appName": "CmsApp",
2538
- "navItems": [
2539
- {
2540
- "href": "/articles",
2541
- "icon": "file-text",
2542
- "label": "Articles"
2543
- },
2544
- {
2545
- "icon": "image",
2546
- "label": "Media",
2547
- "href": "/media"
2548
- },
2549
- {
2550
- "href": "/categories",
2551
- "icon": "folder",
2552
- "label": "Categories"
2553
- }
2554
- ],
2555
2576
  "children": [
2556
2577
  {
2578
+ "type": "stack",
2579
+ "gap": "lg",
2580
+ "className": "max-w-5xl mx-auto w-full",
2557
2581
  "children": [
2558
2582
  {
2559
- "direction": "horizontal",
2560
- "align": "center",
2561
2583
  "type": "stack",
2584
+ "gap": "md",
2562
2585
  "justify": "between",
2563
2586
  "children": [
2564
2587
  {
2588
+ "type": "stack",
2565
2589
  "align": "center",
2590
+ "direction": "horizontal",
2566
2591
  "children": [
2567
2592
  {
2568
2593
  "name": "image",
2569
2594
  "type": "icon"
2570
2595
  },
2571
2596
  {
2572
- "variant": "h2",
2573
2597
  "type": "typography",
2574
- "content": "Media Library"
2598
+ "content": "Media Library",
2599
+ "variant": "h2"
2575
2600
  }
2576
2601
  ],
2577
- "direction": "horizontal",
2578
- "gap": "sm",
2579
- "type": "stack"
2602
+ "gap": "sm"
2580
2603
  },
2581
2604
  {
2605
+ "gap": "sm",
2582
2606
  "type": "stack",
2583
2607
  "direction": "horizontal",
2584
2608
  "children": [
2585
2609
  {
2586
- "action": "CREATE",
2587
- "type": "button",
2588
2610
  "label": "Create MediaAsset",
2589
- "icon": "plus",
2590
- "variant": "primary"
2611
+ "variant": "primary",
2612
+ "type": "button",
2613
+ "action": "CREATE",
2614
+ "icon": "plus"
2591
2615
  }
2592
- ],
2593
- "gap": "sm"
2616
+ ]
2594
2617
  }
2595
2618
  ],
2596
- "gap": "md"
2619
+ "direction": "horizontal",
2620
+ "align": "center"
2597
2621
  },
2598
2622
  {
2599
2623
  "type": "divider"
2600
2624
  },
2601
2625
  {
2626
+ "gap": "md",
2627
+ "type": "data-grid",
2628
+ "itemActions": [
2629
+ {
2630
+ "label": "View",
2631
+ "variant": "ghost",
2632
+ "event": "VIEW"
2633
+ }
2634
+ ],
2602
2635
  "entity": "@payload.data",
2603
2636
  "fields": [
2604
2637
  {
2605
- "name": "fileName",
2638
+ "label": "File",
2606
2639
  "icon": "image",
2607
- "variant": "h3",
2608
- "label": "File"
2640
+ "name": "fileName",
2641
+ "variant": "h3"
2609
2642
  },
2610
2643
  {
2611
- "variant": "badge",
2612
2644
  "name": "fileType",
2613
- "label": "Type"
2645
+ "label": "Type",
2646
+ "variant": "badge"
2614
2647
  },
2615
2648
  {
2616
- "name": "fileSize",
2617
2649
  "format": "number",
2650
+ "label": "Size",
2618
2651
  "variant": "body",
2619
- "label": "Size"
2652
+ "name": "fileSize"
2620
2653
  },
2621
2654
  {
2622
- "variant": "caption",
2623
2655
  "name": "altText",
2656
+ "variant": "caption",
2624
2657
  "label": "Alt Text"
2625
2658
  }
2626
2659
  ],
2627
- "cols": 3.0,
2628
- "gap": "md",
2629
- "type": "data-grid",
2630
- "itemActions": [
2631
- {
2632
- "variant": "ghost",
2633
- "event": "VIEW",
2634
- "label": "View"
2635
- }
2636
- ]
2660
+ "cols": 3.0
2637
2661
  }
2638
2662
  ],
2639
- "gap": "lg",
2640
- "className": "max-w-5xl mx-auto w-full",
2641
- "direction": "vertical",
2642
- "type": "stack"
2663
+ "direction": "vertical"
2643
2664
  }
2644
- ]
2665
+ ],
2666
+ "navItems": [
2667
+ {
2668
+ "href": "/cms-hub",
2669
+ "label": "CMS Hub",
2670
+ "icon": "layout-grid"
2671
+ },
2672
+ {
2673
+ "label": "Articles",
2674
+ "href": "/articles",
2675
+ "icon": "file-text"
2676
+ },
2677
+ {
2678
+ "href": "/media",
2679
+ "icon": "image",
2680
+ "label": "Media"
2681
+ },
2682
+ {
2683
+ "label": "Categories",
2684
+ "icon": "folder",
2685
+ "href": "/categories"
2686
+ }
2687
+ ],
2688
+ "type": "dashboard-layout"
2645
2689
  }
2646
2690
  ]
2647
2691
  ]
@@ -2655,10 +2699,6 @@
2655
2699
  "render-ui",
2656
2700
  "main",
2657
2701
  {
2658
- "direction": "vertical",
2659
- "align": "center",
2660
- "className": "py-12",
2661
- "gap": "md",
2662
2702
  "children": [
2663
2703
  {
2664
2704
  "type": "icon",
@@ -2671,20 +2711,24 @@
2671
2711
  "variant": "h3"
2672
2712
  },
2673
2713
  {
2674
- "content": "@payload.error",
2675
- "color": "muted",
2676
2714
  "variant": "body",
2677
- "type": "typography"
2715
+ "type": "typography",
2716
+ "content": "@payload.error",
2717
+ "color": "muted"
2678
2718
  },
2679
2719
  {
2680
- "icon": "rotate-ccw",
2681
- "type": "button",
2682
2720
  "label": "Retry",
2721
+ "type": "button",
2683
2722
  "variant": "primary",
2684
- "action": "INIT"
2723
+ "action": "INIT",
2724
+ "icon": "rotate-ccw"
2685
2725
  }
2686
2726
  ],
2687
- "type": "stack"
2727
+ "type": "stack",
2728
+ "direction": "vertical",
2729
+ "align": "center",
2730
+ "gap": "md",
2731
+ "className": "py-12"
2688
2732
  }
2689
2733
  ]
2690
2734
  ]
@@ -2852,8 +2896,8 @@
2852
2896
  "MediaAsset",
2853
2897
  {
2854
2898
  "emit": {
2855
- "success": "MediaAssetLoaded",
2856
- "failure": "MediaAssetLoadFailed"
2899
+ "failure": "MediaAssetLoadFailed",
2900
+ "success": "MediaAssetLoaded"
2857
2901
  }
2858
2902
  }
2859
2903
  ]
@@ -2869,8 +2913,8 @@
2869
2913
  "MediaAsset",
2870
2914
  {
2871
2915
  "emit": {
2872
- "failure": "MediaAssetLoadFailed",
2873
- "success": "MediaAssetLoaded"
2916
+ "success": "MediaAssetLoaded",
2917
+ "failure": "MediaAssetLoadFailed"
2874
2918
  }
2875
2919
  }
2876
2920
  ],
@@ -2878,30 +2922,31 @@
2878
2922
  "render-ui",
2879
2923
  "modal",
2880
2924
  {
2925
+ "type": "stack",
2926
+ "gap": "md",
2881
2927
  "children": [
2882
2928
  {
2929
+ "type": "stack",
2883
2930
  "children": [
2884
2931
  {
2885
- "type": "icon",
2886
- "name": "plus-circle"
2932
+ "name": "plus-circle",
2933
+ "type": "icon"
2887
2934
  },
2888
2935
  {
2889
- "content": "New MediaAsset",
2890
2936
  "variant": "h3",
2937
+ "content": "New MediaAsset",
2891
2938
  "type": "typography"
2892
2939
  }
2893
2940
  ],
2894
- "type": "stack",
2895
- "gap": "sm",
2896
- "direction": "horizontal"
2941
+ "direction": "horizontal",
2942
+ "gap": "sm"
2897
2943
  },
2898
2944
  {
2899
2945
  "type": "divider"
2900
2946
  },
2901
2947
  {
2948
+ "cancelEvent": "CLOSE",
2902
2949
  "mode": "create",
2903
- "submitEvent": "SAVE",
2904
- "type": "form-section",
2905
2950
  "fields": [
2906
2951
  "fileName",
2907
2952
  "fileType",
@@ -2910,12 +2955,11 @@
2910
2955
  "altText",
2911
2956
  "uploadedAt"
2912
2957
  ],
2913
- "cancelEvent": "CLOSE"
2958
+ "type": "form-section",
2959
+ "submitEvent": "SAVE"
2914
2960
  }
2915
2961
  ],
2916
- "direction": "vertical",
2917
- "gap": "md",
2918
- "type": "stack"
2962
+ "direction": "vertical"
2919
2963
  }
2920
2964
  ]
2921
2965
  ]
@@ -3042,7 +3086,12 @@
3042
3086
  "payloadSchema": [
3043
3087
  {
3044
3088
  "name": "id",
3045
- "type": "string"
3089
+ "type": "string",
3090
+ "required": true
3091
+ },
3092
+ {
3093
+ "name": "row",
3094
+ "type": "MediaAsset"
3046
3095
  }
3047
3096
  ]
3048
3097
  },
@@ -3102,6 +3151,36 @@
3102
3151
  "to": "open",
3103
3152
  "event": "VIEW",
3104
3153
  "effects": [
3154
+ [
3155
+ "set",
3156
+ "@entity.fileName",
3157
+ "@payload.row.fileName"
3158
+ ],
3159
+ [
3160
+ "set",
3161
+ "@entity.fileType",
3162
+ "@payload.row.fileType"
3163
+ ],
3164
+ [
3165
+ "set",
3166
+ "@entity.fileSize",
3167
+ "@payload.row.fileSize"
3168
+ ],
3169
+ [
3170
+ "set",
3171
+ "@entity.url",
3172
+ "@payload.row.url"
3173
+ ],
3174
+ [
3175
+ "set",
3176
+ "@entity.altText",
3177
+ "@payload.row.altText"
3178
+ ],
3179
+ [
3180
+ "set",
3181
+ "@entity.uploadedAt",
3182
+ "@payload.row.uploadedAt"
3183
+ ],
3105
3184
  [
3106
3185
  "fetch",
3107
3186
  "MediaAsset",
@@ -3117,32 +3196,28 @@
3117
3196
  "render-ui",
3118
3197
  "modal",
3119
3198
  {
3120
- "direction": "vertical",
3121
- "gap": "md",
3122
- "type": "stack",
3123
3199
  "children": [
3124
3200
  {
3125
3201
  "gap": "sm",
3126
- "align": "center",
3127
3202
  "children": [
3128
3203
  {
3129
- "name": "eye",
3130
- "type": "icon"
3204
+ "type": "icon",
3205
+ "name": "eye"
3131
3206
  },
3132
3207
  {
3133
3208
  "content": "@entity.fileName",
3134
- "variant": "h3",
3135
- "type": "typography"
3209
+ "type": "typography",
3210
+ "variant": "h3"
3136
3211
  }
3137
3212
  ],
3213
+ "type": "stack",
3138
3214
  "direction": "horizontal",
3139
- "type": "stack"
3215
+ "align": "center"
3140
3216
  },
3141
3217
  {
3142
3218
  "type": "divider"
3143
3219
  },
3144
3220
  {
3145
- "type": "stack",
3146
3221
  "children": [
3147
3222
  {
3148
3223
  "content": "File Name",
@@ -3151,68 +3226,69 @@
3151
3226
  },
3152
3227
  {
3153
3228
  "type": "typography",
3154
- "content": "@entity.fileName",
3155
- "variant": "body"
3229
+ "variant": "body",
3230
+ "content": "@entity.fileName"
3156
3231
  }
3157
3232
  ],
3158
3233
  "direction": "horizontal",
3159
- "gap": "md"
3234
+ "gap": "md",
3235
+ "type": "stack"
3160
3236
  },
3161
3237
  {
3238
+ "gap": "md",
3239
+ "type": "stack",
3162
3240
  "children": [
3163
3241
  {
3164
3242
  "content": "File Type",
3165
- "variant": "caption",
3166
- "type": "typography"
3243
+ "type": "typography",
3244
+ "variant": "caption"
3167
3245
  },
3168
3246
  {
3169
- "type": "typography",
3170
3247
  "variant": "body",
3248
+ "type": "typography",
3171
3249
  "content": "@entity.fileType"
3172
3250
  }
3173
3251
  ],
3174
- "type": "stack",
3175
- "direction": "horizontal",
3176
- "gap": "md"
3252
+ "direction": "horizontal"
3177
3253
  },
3178
3254
  {
3255
+ "type": "stack",
3179
3256
  "direction": "horizontal",
3180
3257
  "children": [
3181
3258
  {
3182
- "type": "typography",
3183
3259
  "variant": "caption",
3184
- "content": "File Size"
3260
+ "content": "File Size",
3261
+ "type": "typography"
3185
3262
  },
3186
3263
  {
3187
3264
  "content": "@entity.fileSize",
3188
- "variant": "body",
3189
- "type": "typography"
3265
+ "type": "typography",
3266
+ "variant": "body"
3190
3267
  }
3191
3268
  ],
3192
- "gap": "md",
3193
- "type": "stack"
3269
+ "gap": "md"
3194
3270
  },
3195
3271
  {
3196
- "type": "stack",
3197
- "gap": "md",
3198
3272
  "children": [
3199
3273
  {
3200
- "type": "typography",
3201
3274
  "variant": "caption",
3202
- "content": "Url"
3275
+ "content": "Url",
3276
+ "type": "typography"
3203
3277
  },
3204
3278
  {
3205
3279
  "type": "typography",
3206
- "variant": "body",
3207
- "content": "@entity.url"
3280
+ "content": "@entity.url",
3281
+ "variant": "body"
3208
3282
  }
3209
3283
  ],
3284
+ "type": "stack",
3285
+ "gap": "md",
3210
3286
  "direction": "horizontal"
3211
3287
  },
3212
3288
  {
3289
+ "gap": "md",
3213
3290
  "type": "stack",
3214
3291
  "direction": "horizontal",
3215
- "gap": "md",
3216
3292
  "children": [
3217
3293
  {
3218
3294
  "type": "typography",
@@ -3220,47 +3296,50 @@
3220
3296
  "content": "Alt Text"
3221
3297
  },
3222
3298
  {
3299
+ "content": "@entity.altText",
3223
3300
  "variant": "body",
3224
- "type": "typography",
3225
- "content": "@entity.altText"
3301
+ "type": "typography"
3226
3302
  }
3227
3303
  ]
3228
3304
  },
3229
3305
  {
3230
- "direction": "horizontal",
3231
3306
  "type": "stack",
3232
3307
  "children": [
3233
3308
  {
3234
- "content": "Uploaded At",
3309
+ "type": "typography",
3235
3310
  "variant": "caption",
3236
- "type": "typography"
3311
+ "content": "Uploaded At"
3237
3312
  },
3238
3313
  {
3239
- "type": "typography",
3240
3314
  "content": "@entity.uploadedAt",
3315
+ "type": "typography",
3241
3316
  "variant": "body"
3242
3317
  }
3243
3318
  ],
3319
+ "direction": "horizontal",
3244
3320
  "gap": "md"
3245
3321
  },
3246
3322
  {
3247
3323
  "type": "divider"
3248
3324
  },
3249
3325
  {
3250
- "type": "stack",
3326
+ "direction": "horizontal",
3251
3327
  "gap": "sm",
3252
- "justify": "end",
3253
3328
  "children": [
3254
3329
  {
3255
- "variant": "ghost",
3330
+ "type": "button",
3256
3331
  "label": "Close",
3257
3332
  "action": "CLOSE",
3258
- "type": "button"
3333
+ "variant": "ghost"
3259
3334
  }
3260
3335
  ],
3261
- "direction": "horizontal"
3336
+ "justify": "end",
3337
+ "type": "stack"
3262
3338
  }
3263
- ]
3339
+ ],
3340
+ "type": "stack",
3341
+ "gap": "md",
3342
+ "direction": "vertical"
3264
3343
  }
3265
3344
  ]
3266
3345
  ]
@@ -3639,22 +3718,22 @@
3639
3718
  "render-ui",
3640
3719
  "main",
3641
3720
  {
3642
- "direction": "vertical",
3643
- "className": "py-12",
3644
- "align": "center",
3721
+ "gap": "md",
3645
3722
  "children": [
3646
3723
  {
3647
3724
  "type": "spinner"
3648
3725
  },
3649
3726
  {
3650
- "content": "Loading…",
3727
+ "variant": "caption",
3651
3728
  "color": "muted",
3652
- "type": "typography",
3653
- "variant": "caption"
3729
+ "content": "Loading…",
3730
+ "type": "typography"
3654
3731
  }
3655
3732
  ],
3656
- "gap": "md",
3657
- "type": "stack"
3733
+ "className": "py-12",
3734
+ "align": "center",
3735
+ "type": "stack",
3736
+ "direction": "vertical"
3658
3737
  }
3659
3738
  ]
3660
3739
  ]
@@ -3671,14 +3750,19 @@
3671
3750
  "type": "dashboard-layout",
3672
3751
  "navItems": [
3673
3752
  {
3753
+ "icon": "layout-grid",
3754
+ "label": "CMS Hub",
3755
+ "href": "/cms-hub"
3756
+ },
3757
+ {
3758
+ "icon": "file-text",
3674
3759
  "label": "Articles",
3675
- "href": "/articles",
3676
- "icon": "file-text"
3760
+ "href": "/articles"
3677
3761
  },
3678
3762
  {
3763
+ "icon": "image",
3679
3764
  "label": "Media",
3680
- "href": "/media",
3681
- "icon": "image"
3765
+ "href": "/media"
3682
3766
  },
3683
3767
  {
3684
3768
  "href": "/categories",
@@ -3686,21 +3770,16 @@
3686
3770
  "label": "Categories"
3687
3771
  }
3688
3772
  ],
3689
- "appName": "CmsApp",
3690
3773
  "children": [
3691
3774
  {
3692
- "type": "stack",
3775
+ "gap": "lg",
3693
3776
  "direction": "vertical",
3777
+ "className": "max-w-5xl mx-auto w-full",
3694
3778
  "children": [
3695
3779
  {
3696
- "direction": "horizontal",
3697
- "type": "stack",
3698
3780
  "gap": "md",
3699
- "align": "center",
3700
3781
  "children": [
3701
3782
  {
3702
- "align": "center",
3703
- "type": "stack",
3704
3783
  "children": [
3705
3784
  {
3706
3785
  "name": "folder",
@@ -3712,30 +3791,36 @@
3712
3791
  "type": "typography"
3713
3792
  }
3714
3793
  ],
3794
+ "type": "stack",
3715
3795
  "direction": "horizontal",
3796
+ "align": "center",
3716
3797
  "gap": "sm"
3717
3798
  },
3718
3799
  {
3800
+ "direction": "horizontal",
3719
3801
  "children": [
3720
3802
  {
3721
3803
  "type": "button",
3722
- "label": "Create Category",
3723
3804
  "action": "CREATE",
3724
3805
  "icon": "plus",
3806
+ "label": "Create Category",
3725
3807
  "variant": "primary"
3726
3808
  }
3727
3809
  ],
3728
3810
  "type": "stack",
3729
- "gap": "sm",
3730
- "direction": "horizontal"
3811
+ "gap": "sm"
3731
3812
  }
3732
3813
  ],
3733
- "justify": "between"
3814
+ "type": "stack",
3815
+ "justify": "between",
3816
+ "direction": "horizontal",
3817
+ "align": "center"
3734
3818
  },
3735
3819
  {
3736
3820
  "type": "divider"
3737
3821
  },
3738
3822
  {
3823
+ "type": "data-list",
3739
3824
  "entity": "@payload.data",
3740
3825
  "fields": [
3741
3826
  {
@@ -3744,46 +3829,45 @@
3744
3829
  "name": "name"
3745
3830
  },
3746
3831
  {
3747
- "label": "Articles",
3748
- "format": "number",
3749
3832
  "name": "articleCount",
3750
- "variant": "badge"
3833
+ "label": "Articles",
3834
+ "variant": "badge",
3835
+ "format": "number"
3751
3836
  },
3752
3837
  {
3753
3838
  "name": "description",
3754
3839
  "variant": "body"
3755
3840
  },
3756
3841
  {
3757
- "name": "slug",
3758
- "variant": "caption"
3842
+ "variant": "caption",
3843
+ "name": "slug"
3759
3844
  }
3760
3845
  ],
3761
- "type": "data-list",
3762
3846
  "variant": "card",
3763
3847
  "gap": "sm",
3764
3848
  "itemActions": [
3765
3849
  {
3766
- "label": "View",
3850
+ "variant": "ghost",
3767
3851
  "event": "VIEW",
3768
- "variant": "ghost"
3852
+ "label": "View"
3769
3853
  },
3770
3854
  {
3771
3855
  "event": "EDIT",
3772
- "label": "Edit",
3773
- "variant": "ghost"
3856
+ "variant": "ghost",
3857
+ "label": "Edit"
3774
3858
  },
3775
3859
  {
3776
- "event": "DELETE",
3777
3860
  "label": "Delete",
3778
- "variant": "danger"
3861
+ "variant": "danger",
3862
+ "event": "DELETE"
3779
3863
  }
3780
3864
  ]
3781
3865
  }
3782
3866
  ],
3783
- "gap": "lg",
3784
- "className": "max-w-5xl mx-auto w-full"
3867
+ "type": "stack"
3785
3868
  }
3786
- ]
3869
+ ],
3870
+ "appName": "CmsApp"
3787
3871
  }
3788
3872
  ]
3789
3873
  ]
@@ -3798,35 +3882,35 @@
3798
3882
  "main",
3799
3883
  {
3800
3884
  "direction": "vertical",
3801
- "gap": "md",
3802
3885
  "type": "stack",
3803
- "align": "center",
3886
+ "gap": "md",
3804
3887
  "children": [
3805
3888
  {
3806
- "type": "icon",
3889
+ "name": "alert-triangle",
3807
3890
  "color": "destructive",
3808
- "name": "alert-triangle"
3891
+ "type": "icon"
3809
3892
  },
3810
3893
  {
3811
3894
  "variant": "h3",
3812
- "type": "typography",
3813
- "content": "Failed to load category"
3895
+ "content": "Failed to load category",
3896
+ "type": "typography"
3814
3897
  },
3815
3898
  {
3816
- "type": "typography",
3817
3899
  "color": "muted",
3900
+ "type": "typography",
3818
3901
  "variant": "body",
3819
3902
  "content": "@payload.error"
3820
3903
  },
3821
3904
  {
3822
3905
  "variant": "primary",
3823
- "action": "INIT",
3824
- "type": "button",
3906
+ "label": "Retry",
3825
3907
  "icon": "rotate-ccw",
3826
- "label": "Retry"
3908
+ "action": "INIT",
3909
+ "type": "button"
3827
3910
  }
3828
3911
  ],
3829
- "className": "py-12"
3912
+ "className": "py-12",
3913
+ "align": "center"
3830
3914
  }
3831
3915
  ]
3832
3916
  ]
@@ -4027,28 +4111,29 @@
4027
4111
  "render-ui",
4028
4112
  "modal",
4029
4113
  {
4030
- "direction": "vertical",
4031
4114
  "children": [
4032
4115
  {
4033
- "type": "stack",
4034
- "gap": "sm",
4035
4116
  "children": [
4036
4117
  {
4037
- "name": "plus-circle",
4038
- "type": "icon"
4118
+ "type": "icon",
4119
+ "name": "plus-circle"
4039
4120
  },
4040
4121
  {
4122
+ "content": "Create Category",
4041
4123
  "type": "typography",
4042
- "variant": "h3",
4043
- "content": "Create Category"
4124
+ "variant": "h3"
4044
4125
  }
4045
4126
  ],
4046
- "direction": "horizontal"
4127
+ "direction": "horizontal",
4128
+ "gap": "sm",
4129
+ "type": "stack"
4047
4130
  },
4048
4131
  {
4049
4132
  "type": "divider"
4050
4133
  },
4051
4134
  {
4135
+ "cancelEvent": "CLOSE",
4136
+ "type": "form-section",
4052
4137
  "fields": [
4053
4138
  "name",
4054
4139
  "slug",
@@ -4057,12 +4142,11 @@
4057
4142
  "articleCount"
4058
4143
  ],
4059
4144
  "mode": "create",
4060
- "submitEvent": "SAVE",
4061
- "cancelEvent": "CLOSE",
4062
- "type": "form-section"
4145
+ "submitEvent": "SAVE"
4063
4146
  }
4064
4147
  ],
4065
4148
  "type": "stack",
4149
+ "direction": "vertical",
4066
4150
  "gap": "md"
4067
4151
  }
4068
4152
  ]
@@ -4333,8 +4417,8 @@
4333
4417
  {
4334
4418
  "id": "@payload.id",
4335
4419
  "emit": {
4336
- "success": "CategoryLoaded",
4337
- "failure": "CategoryLoadFailed"
4420
+ "failure": "CategoryLoadFailed",
4421
+ "success": "CategoryLoaded"
4338
4422
  }
4339
4423
  }
4340
4424
  ],
@@ -4342,32 +4426,33 @@
4342
4426
  "render-ui",
4343
4427
  "modal",
4344
4428
  {
4345
- "gap": "md",
4429
+ "type": "stack",
4346
4430
  "direction": "vertical",
4431
+ "gap": "md",
4347
4432
  "children": [
4348
4433
  {
4349
- "type": "stack",
4434
+ "direction": "horizontal",
4350
4435
  "children": [
4351
4436
  {
4352
- "type": "icon",
4353
- "name": "edit"
4437
+ "name": "edit",
4438
+ "type": "icon"
4354
4439
  },
4355
4440
  {
4356
- "type": "typography",
4357
4441
  "variant": "h3",
4358
- "content": "Edit Category"
4442
+ "content": "Edit Category",
4443
+ "type": "typography"
4359
4444
  }
4360
4445
  ],
4361
4446
  "gap": "sm",
4362
- "direction": "horizontal"
4447
+ "type": "stack"
4363
4448
  },
4364
4449
  {
4365
4450
  "type": "divider"
4366
4451
  },
4367
4452
  {
4368
- "entity": "@payload.row",
4453
+ "type": "form-section",
4369
4454
  "cancelEvent": "CLOSE",
4370
- "submitEvent": "SAVE",
4455
+ "mode": "edit",
4371
4456
  "fields": [
4372
4457
  "name",
4373
4458
  "slug",
@@ -4375,11 +4460,10 @@
4375
4460
  "parentCategory",
4376
4461
  "articleCount"
4377
4462
  ],
4378
- "mode": "edit",
4379
- "type": "form-section"
4463
+ "submitEvent": "SAVE",
4464
+ "entity": "@payload.row"
4380
4465
  }
4381
- ],
4382
- "type": "stack"
4466
+ ]
4383
4467
  }
4384
4468
  ]
4385
4469
  ]
@@ -4519,7 +4603,12 @@
4519
4603
  "payloadSchema": [
4520
4604
  {
4521
4605
  "name": "id",
4522
- "type": "string"
4606
+ "type": "string",
4607
+ "required": true
4608
+ },
4609
+ {
4610
+ "name": "row",
4611
+ "type": "Category"
4523
4612
  }
4524
4613
  ]
4525
4614
  },
@@ -4583,46 +4672,71 @@
4583
4672
  "to": "open",
4584
4673
  "event": "VIEW",
4585
4674
  "effects": [
4675
+ [
4676
+ "set",
4677
+ "@entity.name",
4678
+ "@payload.row.name"
4679
+ ],
4680
+ [
4681
+ "set",
4682
+ "@entity.slug",
4683
+ "@payload.row.slug"
4684
+ ],
4685
+ [
4686
+ "set",
4687
+ "@entity.description",
4688
+ "@payload.row.description"
4689
+ ],
4690
+ [
4691
+ "set",
4692
+ "@entity.parentCategory",
4693
+ "@payload.row.parentCategory"
4694
+ ],
4695
+ [
4696
+ "set",
4697
+ "@entity.articleCount",
4698
+ "@payload.row.articleCount"
4699
+ ],
4586
4700
  [
4587
4701
  "fetch",
4588
4702
  "Category",
4589
4703
  {
4590
- "id": "@payload.id",
4591
4704
  "emit": {
4592
- "failure": "CategoryLoadFailed",
4593
- "success": "CategoryLoaded"
4594
- }
4705
+ "success": "CategoryLoaded",
4706
+ "failure": "CategoryLoadFailed"
4707
+ },
4708
+ "id": "@payload.id"
4595
4709
  }
4596
4710
  ],
4597
4711
  [
4598
4712
  "render-ui",
4599
4713
  "modal",
4600
4714
  {
4601
- "type": "stack",
4602
4715
  "gap": "md",
4603
- "direction": "vertical",
4716
+ "type": "stack",
4604
4717
  "children": [
4605
4718
  {
4606
- "type": "stack",
4607
4719
  "gap": "sm",
4608
- "align": "center",
4720
+ "type": "stack",
4609
4721
  "children": [
4610
4722
  {
4611
- "type": "icon",
4612
- "name": "eye"
4723
+ "name": "eye",
4724
+ "type": "icon"
4613
4725
  },
4614
4726
  {
4615
- "content": "@entity.name",
4727
+ "type": "typography",
4616
4728
  "variant": "h3",
4617
- "type": "typography"
4729
+ "content": "@entity.name"
4618
4730
  }
4619
4731
  ],
4732
+ "align": "center",
4620
4733
  "direction": "horizontal"
4621
4734
  },
4622
4735
  {
4623
4736
  "type": "divider"
4624
4737
  },
4625
4738
  {
4739
+ "direction": "horizontal",
4626
4740
  "gap": "md",
4627
4741
  "type": "stack",
4628
4742
  "children": [
@@ -4636,66 +4750,66 @@
4636
4750
  "type": "typography",
4637
4751
  "variant": "body"
4638
4752
  }
4639
- ],
4640
- "direction": "horizontal"
4753
+ ]
4641
4754
  },
4642
4755
  {
4643
4756
  "children": [
4644
4757
  {
4645
4758
  "variant": "caption",
4646
- "content": "Slug",
4647
- "type": "typography"
4759
+ "type": "typography",
4760
+ "content": "Slug"
4648
4761
  },
4649
4762
  {
4763
+ "type": "typography",
4650
4764
  "variant": "body",
4651
- "content": "@entity.slug",
4652
- "type": "typography"
4765
+ "content": "@entity.slug"
4653
4766
  }
4654
4767
  ],
4655
4768
  "direction": "horizontal",
4656
- "gap": "md",
4657
- "type": "stack"
4769
+ "type": "stack",
4770
+ "gap": "md"
4658
4771
  },
4659
4772
  {
4773
+ "gap": "md",
4774
+ "type": "stack",
4660
4775
  "children": [
4661
4776
  {
4662
- "type": "typography",
4777
+ "variant": "caption",
4663
4778
  "content": "Description",
4664
- "variant": "caption"
4779
+ "type": "typography"
4665
4780
  },
4666
4781
  {
4667
4782
  "variant": "body",
4668
- "content": "@entity.description",
4669
- "type": "typography"
4783
+ "type": "typography",
4784
+ "content": "@entity.description"
4670
4785
  }
4671
4786
  ],
4672
- "direction": "horizontal",
4673
- "type": "stack",
4674
- "gap": "md"
4787
+ "direction": "horizontal"
4675
4788
  },
4676
4789
  {
4790
+ "gap": "md",
4791
+ "type": "stack",
4792
+ "direction": "horizontal",
4677
4793
  "children": [
4678
4794
  {
4795
+ "content": "Parent Category",
4679
4796
  "type": "typography",
4680
- "variant": "caption",
4681
- "content": "Parent Category"
4797
+ "variant": "caption"
4682
4798
  },
4683
4799
  {
4684
- "type": "typography",
4685
4800
  "variant": "body",
4801
+ "type": "typography",
4686
4802
  "content": "@entity.parentCategory"
4687
4803
  }
4688
- ],
4689
- "direction": "horizontal",
4690
- "type": "stack",
4691
- "gap": "md"
4804
+ ]
4692
4805
  },
4693
4806
  {
4807
+ "gap": "md",
4694
4808
  "children": [
4695
4809
  {
4696
- "content": "Article Count",
4810
+ "variant": "caption",
4697
4811
  "type": "typography",
4698
- "variant": "caption"
4812
+ "content": "Article Count"
4699
4813
  },
4700
4814
  {
4701
4815
  "type": "typography",
@@ -4703,35 +4817,35 @@
4703
4817
  "content": "@entity.articleCount"
4704
4818
  }
4705
4819
  ],
4706
- "direction": "horizontal",
4707
4820
  "type": "stack",
4708
- "gap": "md"
4821
+ "direction": "horizontal"
4709
4822
  },
4710
4823
  {
4711
4824
  "type": "divider"
4712
4825
  },
4713
4826
  {
4714
- "type": "stack",
4715
- "gap": "sm",
4716
- "direction": "horizontal",
4717
4827
  "justify": "end",
4828
+ "direction": "horizontal",
4829
+ "gap": "sm",
4718
4830
  "children": [
4719
4831
  {
4720
- "action": "EDIT",
4832
+ "label": "Edit",
4721
4833
  "type": "button",
4834
+ "action": "EDIT",
4722
4835
  "variant": "primary",
4723
- "icon": "edit",
4724
- "label": "Edit"
4836
+ "icon": "edit"
4725
4837
  },
4726
4838
  {
4839
+ "variant": "ghost",
4727
4840
  "label": "Close",
4728
4841
  "action": "CLOSE",
4729
- "type": "button",
4730
- "variant": "ghost"
4842
+ "type": "button"
4731
4843
  }
4732
- ]
4844
+ ],
4845
+ "type": "stack"
4733
4846
  }
4734
- ]
4847
+ ],
4848
+ "direction": "vertical"
4735
4849
  }
4736
4850
  ]
4737
4851
  ]
@@ -4953,8 +5067,8 @@
4953
5067
  "Category",
4954
5068
  {
4955
5069
  "emit": {
4956
- "success": "CategoryLoaded",
4957
- "failure": "CategoryLoadFailed"
5070
+ "failure": "CategoryLoadFailed",
5071
+ "success": "CategoryLoaded"
4958
5072
  }
4959
5073
  }
4960
5074
  ]
@@ -4974,67 +5088,67 @@
4974
5088
  "fetch",
4975
5089
  "Category",
4976
5090
  {
5091
+ "id": "@payload.id",
4977
5092
  "emit": {
4978
- "failure": "CategoryLoadFailed",
4979
- "success": "CategoryLoaded"
4980
- },
4981
- "id": "@payload.id"
5093
+ "success": "CategoryLoaded",
5094
+ "failure": "CategoryLoadFailed"
5095
+ }
4982
5096
  }
4983
5097
  ],
4984
5098
  [
4985
5099
  "render-ui",
4986
5100
  "modal",
4987
5101
  {
4988
- "direction": "vertical",
5102
+ "type": "stack",
4989
5103
  "children": [
4990
5104
  {
4991
- "gap": "sm",
4992
5105
  "children": [
4993
5106
  {
4994
- "name": "alert-triangle",
4995
- "type": "icon"
5107
+ "type": "icon",
5108
+ "name": "alert-triangle"
4996
5109
  },
4997
5110
  {
4998
5111
  "type": "typography",
4999
- "variant": "h3",
5000
- "content": "Delete Category"
5112
+ "content": "Delete Category",
5113
+ "variant": "h3"
5001
5114
  }
5002
5115
  ],
5003
- "type": "stack",
5004
5116
  "direction": "horizontal",
5005
- "align": "center"
5117
+ "gap": "sm",
5118
+ "align": "center",
5119
+ "type": "stack"
5006
5120
  },
5007
5121
  {
5008
5122
  "type": "divider"
5009
5123
  },
5010
5124
  {
5125
+ "variant": "error",
5011
5126
  "type": "alert",
5012
- "message": "This action cannot be undone.",
5013
- "variant": "error"
5127
+ "message": "This action cannot be undone."
5014
5128
  },
5015
5129
  {
5016
5130
  "children": [
5017
5131
  {
5018
- "variant": "ghost",
5019
5132
  "action": "CANCEL",
5133
+ "label": "Cancel",
5020
5134
  "type": "button",
5021
- "label": "Cancel"
5135
+ "variant": "ghost"
5022
5136
  },
5023
5137
  {
5024
- "label": "Delete",
5025
5138
  "action": "CONFIRM_DELETE",
5139
+ "label": "Delete",
5026
5140
  "type": "button",
5027
5141
  "variant": "danger",
5028
5142
  "icon": "check"
5029
5143
  }
5030
5144
  ],
5031
- "type": "stack",
5145
+ "gap": "sm",
5032
5146
  "direction": "horizontal",
5033
- "justify": "end",
5034
- "gap": "sm"
5147
+ "type": "stack",
5148
+ "justify": "end"
5035
5149
  }
5036
5150
  ],
5037
- "type": "stack",
5151
+ "direction": "vertical",
5038
5152
  "gap": "md"
5039
5153
  }
5040
5154
  ]
@@ -5052,8 +5166,8 @@
5052
5166
  "@entity.pendingId",
5053
5167
  {
5054
5168
  "emit": {
5055
- "success": "CategoryDeleted",
5056
- "failure": "CategoryDeleteFailed"
5169
+ "failure": "CategoryDeleteFailed",
5170
+ "success": "CategoryDeleted"
5057
5171
  }
5058
5172
  }
5059
5173
  ],
@@ -5074,8 +5188,8 @@
5074
5188
  "Category",
5075
5189
  {
5076
5190
  "emit": {
5077
- "success": "CategoryLoaded",
5078
- "failure": "CategoryLoadFailed"
5191
+ "failure": "CategoryLoadFailed",
5192
+ "success": "CategoryLoaded"
5079
5193
  }
5080
5194
  }
5081
5195
  ],
@@ -5136,8 +5250,8 @@
5136
5250
  "Category",
5137
5251
  {
5138
5252
  "emit": {
5139
- "failure": "CategoryLoadFailed",
5140
- "success": "CategoryLoaded"
5253
+ "success": "CategoryLoaded",
5254
+ "failure": "CategoryLoadFailed"
5141
5255
  }
5142
5256
  }
5143
5257
  ]
@@ -5171,6 +5285,299 @@
5171
5285
  ]
5172
5286
  }
5173
5287
  ]
5288
+ },
5289
+ {
5290
+ "name": "CmsHubOrbital",
5291
+ "uses": [
5292
+ {
5293
+ "from": "std/behaviors/std-tabs",
5294
+ "as": "Tabs"
5295
+ }
5296
+ ],
5297
+ "entity": {
5298
+ "name": "CmsHub",
5299
+ "persistence": "runtime",
5300
+ "fields": [
5301
+ {
5302
+ "name": "id",
5303
+ "type": "string",
5304
+ "required": true
5305
+ },
5306
+ {
5307
+ "name": "section",
5308
+ "type": "string",
5309
+ "default": "articles"
5310
+ }
5311
+ ]
5312
+ },
5313
+ "traits": [
5314
+ {
5315
+ "ref": "Tabs.traits.TabsItemTabs",
5316
+ "name": "CmsHubTabs",
5317
+ "config": {
5318
+ "defaultTab": "articles",
5319
+ "variant": "underline",
5320
+ "tabs": [
5321
+ {
5322
+ "icon": "file-text",
5323
+ "id": "articles",
5324
+ "label": "Articles"
5325
+ },
5326
+ {
5327
+ "icon": "image",
5328
+ "id": "media",
5329
+ "label": "Media"
5330
+ },
5331
+ {
5332
+ "label": "Categories",
5333
+ "icon": "folder",
5334
+ "id": "categories"
5335
+ }
5336
+ ]
5337
+ }
5338
+ },
5339
+ {
5340
+ "name": "CmsHubLayout",
5341
+ "category": "interaction",
5342
+ "linkedEntity": "CmsHub",
5343
+ "listens": [
5344
+ {
5345
+ "event": "TAB_CHANGED",
5346
+ "triggers": "SECTION_CHANGED",
5347
+ "source": {
5348
+ "kind": "trait",
5349
+ "trait": "CmsHubTabs"
5350
+ }
5351
+ }
5352
+ ],
5353
+ "stateMachine": {
5354
+ "states": [
5355
+ {
5356
+ "name": "viewing",
5357
+ "isInitial": true
5358
+ }
5359
+ ],
5360
+ "events": [
5361
+ {
5362
+ "key": "INIT",
5363
+ "name": "Initialize"
5364
+ },
5365
+ {
5366
+ "key": "SECTION_CHANGED",
5367
+ "name": "Section Changed",
5368
+ "payloadSchema": [
5369
+ {
5370
+ "name": "tabId",
5371
+ "type": "string",
5372
+ "required": true
5373
+ }
5374
+ ]
5375
+ }
5376
+ ],
5377
+ "transitions": [
5378
+ {
5379
+ "from": "viewing",
5380
+ "to": "viewing",
5381
+ "event": "INIT",
5382
+ "effects": [
5383
+ [
5384
+ "set",
5385
+ "@entity.section",
5386
+ "articles"
5387
+ ],
5388
+ [
5389
+ "render-ui",
5390
+ "main",
5391
+ {
5392
+ "type": "dashboard-layout",
5393
+ "children": [
5394
+ {
5395
+ "type": "stack",
5396
+ "className": "max-w-5xl mx-auto w-full",
5397
+ "children": [
5398
+ {
5399
+ "align": "center",
5400
+ "type": "stack",
5401
+ "direction": "horizontal",
5402
+ "gap": "sm",
5403
+ "children": [
5404
+ {
5405
+ "type": "icon",
5406
+ "name": "layout-grid"
5407
+ },
5408
+ {
5409
+ "content": "CMS Hub",
5410
+ "type": "typography",
5411
+ "variant": "h2"
5412
+ }
5413
+ ]
5414
+ },
5415
+ {
5416
+ "type": "divider"
5417
+ },
5418
+ "@trait.CmsHubTabs",
5419
+ {
5420
+ "className": "p-4 border rounded-md",
5421
+ "direction": "vertical",
5422
+ "gap": "sm",
5423
+ "children": [
5424
+ {
5425
+ "type": "typography",
5426
+ "variant": "overline",
5427
+ "color": "secondary",
5428
+ "content": "Active section"
5429
+ },
5430
+ {
5431
+ "variant": "h3",
5432
+ "content": "@entity.section",
5433
+ "type": "typography"
5434
+ }
5435
+ ],
5436
+ "type": "stack"
5437
+ }
5438
+ ],
5439
+ "direction": "vertical",
5440
+ "gap": "lg"
5441
+ }
5442
+ ],
5443
+ "appName": "CmsApp",
5444
+ "navItems": [
5445
+ {
5446
+ "label": "CMS Hub",
5447
+ "icon": "layout-grid",
5448
+ "href": "/cms-hub"
5449
+ },
5450
+ {
5451
+ "href": "/articles",
5452
+ "icon": "file-text",
5453
+ "label": "Articles"
5454
+ },
5455
+ {
5456
+ "href": "/media",
5457
+ "icon": "image",
5458
+ "label": "Media"
5459
+ },
5460
+ {
5461
+ "label": "Categories",
5462
+ "icon": "folder",
5463
+ "href": "/categories"
5464
+ }
5465
+ ]
5466
+ }
5467
+ ]
5468
+ ]
5469
+ },
5470
+ {
5471
+ "from": "viewing",
5472
+ "to": "viewing",
5473
+ "event": "SECTION_CHANGED",
5474
+ "effects": [
5475
+ [
5476
+ "set",
5477
+ "@entity.section",
5478
+ "@payload.tabId"
5479
+ ],
5480
+ [
5481
+ "render-ui",
5482
+ "main",
5483
+ {
5484
+ "type": "dashboard-layout",
5485
+ "navItems": [
5486
+ {
5487
+ "href": "/cms-hub",
5488
+ "icon": "layout-grid",
5489
+ "label": "CMS Hub"
5490
+ },
5491
+ {
5492
+ "href": "/articles",
5493
+ "label": "Articles",
5494
+ "icon": "file-text"
5495
+ },
5496
+ {
5497
+ "label": "Media",
5498
+ "href": "/media",
5499
+ "icon": "image"
5500
+ },
5501
+ {
5502
+ "label": "Categories",
5503
+ "icon": "folder",
5504
+ "href": "/categories"
5505
+ }
5506
+ ],
5507
+ "appName": "CmsApp",
5508
+ "children": [
5509
+ {
5510
+ "type": "stack",
5511
+ "gap": "lg",
5512
+ "className": "max-w-5xl mx-auto w-full",
5513
+ "children": [
5514
+ {
5515
+ "direction": "horizontal",
5516
+ "align": "center",
5517
+ "gap": "sm",
5518
+ "type": "stack",
5519
+ "children": [
5520
+ {
5521
+ "type": "icon",
5522
+ "name": "layout-grid"
5523
+ },
5524
+ {
5525
+ "content": "CMS Hub",
5526
+ "variant": "h2",
5527
+ "type": "typography"
5528
+ }
5529
+ ]
5530
+ },
5531
+ {
5532
+ "type": "divider"
5533
+ },
5534
+ "@trait.CmsHubTabs",
5535
+ {
5536
+ "className": "p-4 border rounded-md",
5537
+ "type": "stack",
5538
+ "direction": "vertical",
5539
+ "children": [
5540
+ {
5541
+ "variant": "overline",
5542
+ "content": "Active section",
5543
+ "type": "typography",
5544
+ "color": "secondary"
5545
+ },
5546
+ {
5547
+ "type": "typography",
5548
+ "variant": "h3",
5549
+ "content": "@entity.section"
5550
+ }
5551
+ ],
5552
+ "gap": "sm"
5553
+ }
5554
+ ],
5555
+ "direction": "vertical"
5556
+ }
5557
+ ]
5558
+ }
5559
+ ]
5560
+ ]
5561
+ }
5562
+ ]
5563
+ },
5564
+ "scope": "collection"
5565
+ }
5566
+ ],
5567
+ "pages": [
5568
+ {
5569
+ "name": "CmsHubPage",
5570
+ "path": "/cms-hub",
5571
+ "traits": [
5572
+ {
5573
+ "ref": "CmsHubLayout"
5574
+ },
5575
+ {
5576
+ "ref": "CmsHubTabs"
5577
+ }
5578
+ ]
5579
+ }
5580
+ ]
5174
5581
  }
5175
5582
  ]
5176
- }
5583
+ }