@almadar/std 16.184.0 → 16.185.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "std-rich-editor — wiki/CMS Notion-style block editor. Browses documents in `browsing`; opens the rich-block-editor on a selected row; persists block edits + publish status. `BlockEdit` is a rebindable single-row overlay editor: an organism rebinds it to its own entity (WikiPage, Note, …), passes the row's id + blocksJson via OPEN, and routes the emitted BLOCKS_SAVED into its own persistor — this atom never fetches or persists.",
2
+ "description": "std-rich-editor — wiki/CMS Notion-style block editor. Browses documents in `browsing`; opens the rich-block-editor on a selected row; persists block edits + publish status. `BlockEdit` is a rebindable single-row IN-PLACE body editor: an organism embeds it where the content belongs, rebinds it to its own entity (WikiPage, Note, …), hands it the row's id + blocksJson via OPEN, and routes the emitted BLOCKS_SAVED into its own persistor — this atom never fetches or persists. The read-only body is itself the edit affordance; an empty row paints an empty state that starts the first block; and OPEN_DRAFT opens straight into the authoring editor for a row that was just minted blank (document-first creation).",
3
3
  "ledger": {
4
4
  "entries": {
5
5
  "ent_01KXG04HCHD37BD2KK5VJQ26G1": {
@@ -127,15 +127,6 @@
127
127
  "parent": "trt_01M0RYEW8QSSSVWKSKDCHC5JK9",
128
128
  "renames": []
129
129
  },
130
- "evt_01M0RYEW8QH8R91C7A42HE28ZY": {
131
- "bakedName": "SAVE",
132
- "curName": "SAVE",
133
- "id": "evt_01M0RYEW8QH8R91C7A42HE28ZY",
134
- "kind": "event",
135
- "owner": "workspace",
136
- "parent": "trt_01M0RYEW8QSSSVWKSKDCHC5JK9",
137
- "renames": []
138
- },
139
130
  "evt_01M0RYEW8QHNPNYEJB0CW9SVGB": {
140
131
  "bakedName": "CLOSE",
141
132
  "curName": "CLOSE",
@@ -163,6 +154,33 @@
163
154
  "parent": "trt_01M0RYEW8QSSSVWKSKDCHC5JK9",
164
155
  "renames": []
165
156
  },
157
+ "evt_01M0V2EXDYMNYYSF51ZJG4T56K": {
158
+ "bakedName": "EDIT_BLOCKS",
159
+ "curName": "EDIT_BLOCKS",
160
+ "id": "evt_01M0V2EXDYMNYYSF51ZJG4T56K",
161
+ "kind": "event",
162
+ "owner": "workspace",
163
+ "parent": "trt_01M0RYEW8QSSSVWKSKDCHC5JK9",
164
+ "renames": []
165
+ },
166
+ "evt_01M0V36GMN3AF9D7285EPV2XNJ": {
167
+ "bakedName": "SAVE_BLOCKS",
168
+ "curName": "SAVE_BLOCKS",
169
+ "id": "evt_01M0V36GMN3AF9D7285EPV2XNJ",
170
+ "kind": "event",
171
+ "owner": "workspace",
172
+ "parent": "trt_01M0RYEW8QSSSVWKSKDCHC5JK9",
173
+ "renames": []
174
+ },
175
+ "evt_01M0V8PKKCFSDSHTNFP08BMS5M": {
176
+ "bakedName": "OPEN_DRAFT",
177
+ "curName": "OPEN_DRAFT",
178
+ "id": "evt_01M0V8PKKCFSDSHTNFP08BMS5M",
179
+ "kind": "event",
180
+ "owner": "workspace",
181
+ "parent": "trt_01M0RYEW8QSSSVWKSKDCHC5JK9",
182
+ "renames": []
183
+ },
166
184
  "orb_01KXG04HCH32475XE7N0KGX6RM": {
167
185
  "bakedName": "DocumentOrbital",
168
186
  "curName": "DocumentOrbital",
@@ -1404,6 +1422,34 @@
1404
1422
  {
1405
1423
  "category": "interaction",
1406
1424
  "config": {
1425
+ "editLabel": {
1426
+ "default": "Edit content",
1427
+ "description": "Label of the button above the read-only body that opens the editor.",
1428
+ "label": "Edit button label",
1429
+ "tier": "presentation",
1430
+ "type": "string"
1431
+ },
1432
+ "emptyActionLabel": {
1433
+ "default": "Start writing",
1434
+ "description": "Label of the button that opens the editor from the empty body state.",
1435
+ "label": "Empty action label",
1436
+ "tier": "presentation",
1437
+ "type": "string"
1438
+ },
1439
+ "emptyDescription": {
1440
+ "default": "This page has no content yet. Start writing to fill it in.",
1441
+ "description": "Supporting line shown with the empty body state.",
1442
+ "label": "Empty description",
1443
+ "tier": "presentation",
1444
+ "type": "string"
1445
+ },
1446
+ "emptyTitle": {
1447
+ "default": "Nothing written yet",
1448
+ "description": "Heading shown in place of the body when the row has no blocks yet.",
1449
+ "label": "Empty heading",
1450
+ "tier": "presentation",
1451
+ "type": "string"
1452
+ },
1407
1453
  "placeholder": {
1408
1454
  "default": "Start writing…",
1409
1455
  "description": "Placeholder shown in the block editor when it is empty.",
@@ -1413,7 +1459,7 @@
1413
1459
  },
1414
1460
  "title": {
1415
1461
  "default": "Edit content",
1416
- "description": "Heading shown at the top of the block editor overlay.",
1462
+ "description": "Heading shown above the editor while the body is being edited.",
1417
1463
  "label": "Editor heading",
1418
1464
  "tier": "presentation",
1419
1465
  "type": "string"
@@ -1440,7 +1486,7 @@
1440
1486
  "tier": "domain"
1441
1487
  },
1442
1488
  {
1443
- "description": "Indicates the block editor overlay is being dismissed.",
1489
+ "description": "Leaves the editor without saving; the body returns to its read-only render.",
1444
1490
  "event": "CLOSE",
1445
1491
  "eventId": "evt_01M0RYEW8QHNPNYEJB0CW9SVGB",
1446
1492
  "synonyms": "dismiss, hide, cancel, close",
@@ -1483,7 +1529,7 @@
1483
1529
  "name": "Initialize"
1484
1530
  },
1485
1531
  {
1486
- "description": "Requests the block editor overlay open for the given row. The caller supplies the row's id and current blocks — this trait never fetches them itself.",
1532
+ "description": "Hands the editor the row whose body it renders — the caller supplies the row's id and current blocks, since this trait never fetches them itself. Re-firing it repaints the body (e.g. after the host refetches a saved row).",
1487
1533
  "id": "evt_01M0RYEW8Q7JPMVH9BJQ274WXR",
1488
1534
  "key": "OPEN",
1489
1535
  "name": "Open",
@@ -1516,6 +1562,40 @@
1516
1562
  "synonyms": "show, launch, reveal, edit",
1517
1563
  "tier": "domain"
1518
1564
  },
1565
+ {
1566
+ "description": "Hands the editor a row that was just created as a blank draft: same payload as OPEN, but the body opens straight in the authoring editor instead of the read-only render, so a document-first 'New page' lands the author on a cursor rather than an empty state.",
1567
+ "id": "evt_01M0V8PKKCFSDSHTNFP08BMS5M",
1568
+ "key": "OPEN_DRAFT",
1569
+ "name": "Open Draft",
1570
+ "payloadSchema": [
1571
+ {
1572
+ "name": "id",
1573
+ "required": true,
1574
+ "type": "string"
1575
+ },
1576
+ {
1577
+ "name": "blocksJson",
1578
+ "properties": [
1579
+ {
1580
+ "name": "type",
1581
+ "required": true,
1582
+ "type": "string"
1583
+ },
1584
+ {
1585
+ "name": "content",
1586
+ "type": "string"
1587
+ },
1588
+ {
1589
+ "name": "id",
1590
+ "type": "string"
1591
+ }
1592
+ ],
1593
+ "type": "[object]"
1594
+ }
1595
+ ],
1596
+ "synonyms": "new document, start writing, blank draft, compose",
1597
+ "tier": "domain"
1598
+ },
1519
1599
  {
1520
1600
  "description": "Signals a row's block content is ready to persist. This atom never persists — the composing organism routes BLOCKS_SAVED into its own persistor's update event.",
1521
1601
  "id": "evt_01M0RYEW8QQG4WCT9ZCQR5B7ME",
@@ -1535,6 +1615,11 @@
1535
1615
  "synonyms": "saved, persist, update, commit",
1536
1616
  "tier": "domain"
1537
1617
  },
1618
+ {
1619
+ "id": "evt_01M0V2EXDYMNYYSF51ZJG4T56K",
1620
+ "key": "EDIT_BLOCKS",
1621
+ "name": "Edit Blocks"
1622
+ },
1538
1623
  {
1539
1624
  "description": "Signals that the content of a block has been modified while editing.",
1540
1625
  "id": "evt_01M0RYEW8QGS8CD8KJRJQC4CEV",
@@ -1565,12 +1650,12 @@
1565
1650
  "tier": "domain"
1566
1651
  },
1567
1652
  {
1568
- "id": "evt_01M0RYEW8QH8R91C7A42HE28ZY",
1569
- "key": "SAVE",
1570
- "name": "Save"
1653
+ "id": "evt_01M0V36GMN3AF9D7285EPV2XNJ",
1654
+ "key": "SAVE_BLOCKS",
1655
+ "name": "Save Blocks"
1571
1656
  },
1572
1657
  {
1573
- "description": "Indicates the block editor overlay is being dismissed.",
1658
+ "description": "Leaves the editor without saving; the body returns to its read-only render.",
1574
1659
  "id": "evt_01M0RYEW8QHNPNYEJB0CW9SVGB",
1575
1660
  "key": "CLOSE",
1576
1661
  "name": "Close",
@@ -1583,6 +1668,9 @@
1583
1668
  "isInitial": true,
1584
1669
  "name": "idle"
1585
1670
  },
1671
+ {
1672
+ "name": "viewing"
1673
+ },
1586
1674
  {
1587
1675
  "name": "editing"
1588
1676
  }
@@ -1608,7 +1696,109 @@
1608
1696
  ],
1609
1697
  [
1610
1698
  "render-ui",
1611
- "modal",
1699
+ "main",
1700
+ {
1701
+ "children": [
1702
+ {
1703
+ "children": [
1704
+ {
1705
+ "action": "EDIT_BLOCKS",
1706
+ "icon": "edit",
1707
+ "label": "@config.editLabel",
1708
+ "type": "button",
1709
+ "variant": "secondary"
1710
+ }
1711
+ ],
1712
+ "direction": "horizontal",
1713
+ "gap": "sm",
1714
+ "justify": "end",
1715
+ "type": "stack"
1716
+ },
1717
+ {
1718
+ "action": "EDIT_BLOCKS",
1719
+ "children": [
1720
+ {
1721
+ "initialBlocks": "@entity.blocksJson",
1722
+ "readOnly": true,
1723
+ "type": "rich-block-editor"
1724
+ }
1725
+ ],
1726
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
1727
+ "type": "box"
1728
+ }
1729
+ ],
1730
+ "direction": "vertical",
1731
+ "gap": "sm",
1732
+ "type": "stack"
1733
+ }
1734
+ ]
1735
+ ],
1736
+ "event": "OPEN",
1737
+ "eventId": "evt_01M0RYEW8Q7JPMVH9BJQ274WXR",
1738
+ "from": "idle",
1739
+ "guard": [
1740
+ ">",
1741
+ [
1742
+ "array/len",
1743
+ "@payload.blocksJson"
1744
+ ],
1745
+ 0.0
1746
+ ],
1747
+ "to": "viewing"
1748
+ },
1749
+ {
1750
+ "effects": [
1751
+ [
1752
+ "set",
1753
+ "@entity.id",
1754
+ "@payload.id"
1755
+ ],
1756
+ [
1757
+ "set",
1758
+ "@entity.blocksJson",
1759
+ "@payload.blocksJson"
1760
+ ],
1761
+ [
1762
+ "render-ui",
1763
+ "main",
1764
+ {
1765
+ "actionEvent": "EDIT_BLOCKS",
1766
+ "actionLabel": "@config.emptyActionLabel",
1767
+ "description": "@config.emptyDescription",
1768
+ "icon": "file-text",
1769
+ "title": "@config.emptyTitle",
1770
+ "type": "empty-state"
1771
+ }
1772
+ ]
1773
+ ],
1774
+ "event": "OPEN",
1775
+ "eventId": "evt_01M0RYEW8Q7JPMVH9BJQ274WXR",
1776
+ "from": "idle",
1777
+ "guard": [
1778
+ "=",
1779
+ [
1780
+ "array/len",
1781
+ "@payload.blocksJson"
1782
+ ],
1783
+ 0.0
1784
+ ],
1785
+ "to": "viewing"
1786
+ },
1787
+ {
1788
+ "effects": [
1789
+ [
1790
+ "set",
1791
+ "@entity.id",
1792
+ "@payload.id"
1793
+ ],
1794
+ [
1795
+ "set",
1796
+ "@entity.blocksJson",
1797
+ "@payload.blocksJson"
1798
+ ],
1799
+ [
1800
+ "render-ui",
1801
+ "main",
1612
1802
  {
1613
1803
  "children": [
1614
1804
  {
@@ -1621,16 +1811,13 @@
1621
1811
  {
1622
1812
  "content": "@config.title",
1623
1813
  "type": "typography",
1624
- "variant": "h3"
1814
+ "variant": "h4"
1625
1815
  }
1626
1816
  ],
1627
1817
  "direction": "horizontal",
1628
1818
  "gap": "sm",
1629
1819
  "type": "stack"
1630
1820
  },
1631
- {
1632
- "type": "divider"
1633
- },
1634
1821
  {
1635
1822
  "changeEvent": "BLOCKS_CHANGE",
1636
1823
  "initialBlocks": "@entity.blocksJson",
@@ -1639,10 +1826,9 @@
1639
1826
  "type": "rich-block-editor"
1640
1827
  },
1641
1828
  {
1642
- "align": "center",
1643
1829
  "children": [
1644
1830
  {
1645
- "action": "SAVE",
1831
+ "action": "SAVE_BLOCKS",
1646
1832
  "label": "Save",
1647
1833
  "type": "button",
1648
1834
  "variant": "primary"
@@ -1656,6 +1842,7 @@
1656
1842
  ],
1657
1843
  "direction": "horizontal",
1658
1844
  "gap": "sm",
1845
+ "justify": "end",
1659
1846
  "type": "stack"
1660
1847
  }
1661
1848
  ],
@@ -1665,8 +1852,8 @@
1665
1852
  }
1666
1853
  ]
1667
1854
  ],
1668
- "event": "OPEN",
1669
- "eventId": "evt_01M0RYEW8Q7JPMVH9BJQ274WXR",
1855
+ "event": "OPEN_DRAFT",
1856
+ "eventId": "evt_01M0V8PKKCFSDSHTNFP08BMS5M",
1670
1857
  "from": "idle",
1671
1858
  "to": "editing"
1672
1859
  },
@@ -1676,6 +1863,244 @@
1676
1863
  "from": "idle",
1677
1864
  "to": "idle"
1678
1865
  },
1866
+ {
1867
+ "effects": [
1868
+ [
1869
+ "set",
1870
+ "@entity.id",
1871
+ "@payload.id"
1872
+ ],
1873
+ [
1874
+ "set",
1875
+ "@entity.blocksJson",
1876
+ "@payload.blocksJson"
1877
+ ],
1878
+ [
1879
+ "render-ui",
1880
+ "main",
1881
+ {
1882
+ "children": [
1883
+ {
1884
+ "align": "center",
1885
+ "children": [
1886
+ {
1887
+ "name": "file-text",
1888
+ "type": "icon"
1889
+ },
1890
+ {
1891
+ "content": "@config.title",
1892
+ "type": "typography",
1893
+ "variant": "h4"
1894
+ }
1895
+ ],
1896
+ "direction": "horizontal",
1897
+ "gap": "sm",
1898
+ "type": "stack"
1899
+ },
1900
+ {
1901
+ "changeEvent": "BLOCKS_CHANGE",
1902
+ "initialBlocks": "@entity.blocksJson",
1903
+ "placeholder": "@config.placeholder",
1904
+ "showToolbar": true,
1905
+ "type": "rich-block-editor"
1906
+ },
1907
+ {
1908
+ "children": [
1909
+ {
1910
+ "action": "SAVE_BLOCKS",
1911
+ "label": "Save",
1912
+ "type": "button",
1913
+ "variant": "primary"
1914
+ },
1915
+ {
1916
+ "action": "CLOSE",
1917
+ "label": "Cancel",
1918
+ "type": "button",
1919
+ "variant": "ghost"
1920
+ }
1921
+ ],
1922
+ "direction": "horizontal",
1923
+ "gap": "sm",
1924
+ "justify": "end",
1925
+ "type": "stack"
1926
+ }
1927
+ ],
1928
+ "direction": "vertical",
1929
+ "gap": "md",
1930
+ "type": "stack"
1931
+ }
1932
+ ]
1933
+ ],
1934
+ "event": "OPEN_DRAFT",
1935
+ "eventId": "evt_01M0V8PKKCFSDSHTNFP08BMS5M",
1936
+ "from": "viewing",
1937
+ "to": "editing"
1938
+ },
1939
+ {
1940
+ "effects": [
1941
+ [
1942
+ "set",
1943
+ "@entity.id",
1944
+ "@payload.id"
1945
+ ],
1946
+ [
1947
+ "set",
1948
+ "@entity.blocksJson",
1949
+ "@payload.blocksJson"
1950
+ ],
1951
+ [
1952
+ "render-ui",
1953
+ "main",
1954
+ {
1955
+ "children": [
1956
+ {
1957
+ "children": [
1958
+ {
1959
+ "action": "EDIT_BLOCKS",
1960
+ "icon": "edit",
1961
+ "label": "@config.editLabel",
1962
+ "type": "button",
1963
+ "variant": "secondary"
1964
+ }
1965
+ ],
1966
+ "direction": "horizontal",
1967
+ "gap": "sm",
1968
+ "justify": "end",
1969
+ "type": "stack"
1970
+ },
1971
+ {
1972
+ "action": "EDIT_BLOCKS",
1973
+ "children": [
1974
+ {
1975
+ "initialBlocks": "@entity.blocksJson",
1976
+ "readOnly": true,
1977
+ "type": "rich-block-editor"
1978
+ }
1979
+ ],
1980
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
1981
+ "type": "box"
1982
+ }
1983
+ ],
1984
+ "direction": "vertical",
1985
+ "gap": "sm",
1986
+ "type": "stack"
1987
+ }
1988
+ ]
1989
+ ],
1990
+ "event": "OPEN",
1991
+ "eventId": "evt_01M0RYEW8Q7JPMVH9BJQ274WXR",
1992
+ "from": "viewing",
1993
+ "guard": [
1994
+ ">",
1995
+ [
1996
+ "array/len",
1997
+ "@payload.blocksJson"
1998
+ ],
1999
+ 0.0
2000
+ ],
2001
+ "to": "viewing"
2002
+ },
2003
+ {
2004
+ "effects": [
2005
+ [
2006
+ "set",
2007
+ "@entity.id",
2008
+ "@payload.id"
2009
+ ],
2010
+ [
2011
+ "set",
2012
+ "@entity.blocksJson",
2013
+ "@payload.blocksJson"
2014
+ ],
2015
+ [
2016
+ "render-ui",
2017
+ "main",
2018
+ {
2019
+ "actionEvent": "EDIT_BLOCKS",
2020
+ "actionLabel": "@config.emptyActionLabel",
2021
+ "description": "@config.emptyDescription",
2022
+ "icon": "file-text",
2023
+ "title": "@config.emptyTitle",
2024
+ "type": "empty-state"
2025
+ }
2026
+ ]
2027
+ ],
2028
+ "event": "OPEN",
2029
+ "eventId": "evt_01M0RYEW8Q7JPMVH9BJQ274WXR",
2030
+ "from": "viewing",
2031
+ "guard": [
2032
+ "=",
2033
+ [
2034
+ "array/len",
2035
+ "@payload.blocksJson"
2036
+ ],
2037
+ 0.0
2038
+ ],
2039
+ "to": "viewing"
2040
+ },
2041
+ {
2042
+ "effects": [
2043
+ [
2044
+ "render-ui",
2045
+ "main",
2046
+ {
2047
+ "children": [
2048
+ {
2049
+ "align": "center",
2050
+ "children": [
2051
+ {
2052
+ "name": "file-text",
2053
+ "type": "icon"
2054
+ },
2055
+ {
2056
+ "content": "@config.title",
2057
+ "type": "typography",
2058
+ "variant": "h4"
2059
+ }
2060
+ ],
2061
+ "direction": "horizontal",
2062
+ "gap": "sm",
2063
+ "type": "stack"
2064
+ },
2065
+ {
2066
+ "changeEvent": "BLOCKS_CHANGE",
2067
+ "initialBlocks": "@entity.blocksJson",
2068
+ "placeholder": "@config.placeholder",
2069
+ "showToolbar": true,
2070
+ "type": "rich-block-editor"
2071
+ },
2072
+ {
2073
+ "children": [
2074
+ {
2075
+ "action": "SAVE_BLOCKS",
2076
+ "label": "Save",
2077
+ "type": "button",
2078
+ "variant": "primary"
2079
+ },
2080
+ {
2081
+ "action": "CLOSE",
2082
+ "label": "Cancel",
2083
+ "type": "button",
2084
+ "variant": "ghost"
2085
+ }
2086
+ ],
2087
+ "direction": "horizontal",
2088
+ "gap": "sm",
2089
+ "justify": "end",
2090
+ "type": "stack"
2091
+ }
2092
+ ],
2093
+ "direction": "vertical",
2094
+ "gap": "md",
2095
+ "type": "stack"
2096
+ }
2097
+ ]
2098
+ ],
2099
+ "event": "EDIT_BLOCKS",
2100
+ "eventId": "evt_01M0V2EXDYMNYYSF51ZJG4T56K",
2101
+ "from": "viewing",
2102
+ "to": "editing"
2103
+ },
1679
2104
  {
1680
2105
  "effects": [
1681
2106
  [
@@ -1691,11 +2116,6 @@
1691
2116
  },
1692
2117
  {
1693
2118
  "effects": [
1694
- [
1695
- "render-ui",
1696
- "modal",
1697
- null
1698
- ],
1699
2119
  [
1700
2120
  "emit",
1701
2121
  "BLOCKS_SAVED",
@@ -1703,25 +2123,96 @@
1703
2123
  "blocksJson": "@entity.blocksJson",
1704
2124
  "id": "@entity.id"
1705
2125
  }
2126
+ ],
2127
+ [
2128
+ "render-ui",
2129
+ "main",
2130
+ {
2131
+ "children": [
2132
+ {
2133
+ "children": [
2134
+ {
2135
+ "action": "EDIT_BLOCKS",
2136
+ "icon": "edit",
2137
+ "label": "@config.editLabel",
2138
+ "type": "button",
2139
+ "variant": "secondary"
2140
+ }
2141
+ ],
2142
+ "direction": "horizontal",
2143
+ "gap": "sm",
2144
+ "justify": "end",
2145
+ "type": "stack"
2146
+ },
2147
+ {
2148
+ "action": "EDIT_BLOCKS",
2149
+ "children": [
2150
+ {
2151
+ "initialBlocks": "@entity.blocksJson",
2152
+ "readOnly": true,
2153
+ "type": "rich-block-editor"
2154
+ }
2155
+ ],
2156
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
2157
+ "type": "box"
2158
+ }
2159
+ ],
2160
+ "direction": "vertical",
2161
+ "gap": "sm",
2162
+ "type": "stack"
2163
+ }
1706
2164
  ]
1707
2165
  ],
1708
- "event": "SAVE",
1709
- "eventId": "evt_01M0RYEW8QH8R91C7A42HE28ZY",
2166
+ "event": "SAVE_BLOCKS",
2167
+ "eventId": "evt_01M0V36GMN3AF9D7285EPV2XNJ",
1710
2168
  "from": "editing",
1711
- "to": "idle"
2169
+ "to": "viewing"
1712
2170
  },
1713
2171
  {
1714
2172
  "effects": [
1715
2173
  [
1716
2174
  "render-ui",
1717
- "modal",
1718
- null
2175
+ "main",
2176
+ {
2177
+ "children": [
2178
+ {
2179
+ "children": [
2180
+ {
2181
+ "action": "EDIT_BLOCKS",
2182
+ "icon": "edit",
2183
+ "label": "@config.editLabel",
2184
+ "type": "button",
2185
+ "variant": "secondary"
2186
+ }
2187
+ ],
2188
+ "direction": "horizontal",
2189
+ "gap": "sm",
2190
+ "justify": "end",
2191
+ "type": "stack"
2192
+ },
2193
+ {
2194
+ "action": "EDIT_BLOCKS",
2195
+ "children": [
2196
+ {
2197
+ "initialBlocks": "@entity.blocksJson",
2198
+ "readOnly": true,
2199
+ "type": "rich-block-editor"
2200
+ }
2201
+ ],
2202
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
2203
+ "type": "box"
2204
+ }
2205
+ ],
2206
+ "direction": "vertical",
2207
+ "gap": "sm",
2208
+ "type": "stack"
2209
+ }
1719
2210
  ]
1720
2211
  ],
1721
2212
  "event": "CLOSE",
1722
2213
  "eventId": "evt_01M0RYEW8QHNPNYEJB0CW9SVGB",
1723
2214
  "from": "editing",
1724
- "to": "idle"
2215
+ "to": "viewing"
1725
2216
  }
1726
2217
  ]
1727
2218
  }