@portabletext/editor 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +91 -855
- package/lib/index.d.ts +91 -855
- package/lib/index.esm.js +6 -64
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5 -63
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6 -64
- package/lib/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/editor/PortableTextEditor.tsx +2 -2
- package/src/editor/components/Synchronizer.tsx +0 -23
- package/src/editor/editor-machine.ts +0 -33
package/lib/index.d.ts
CHANGED
|
@@ -50,16 +50,10 @@ import {
|
|
|
50
50
|
AnyActorLogic,
|
|
51
51
|
AnyActorRef,
|
|
52
52
|
AnyEventObject,
|
|
53
|
-
CallbackActorLogic,
|
|
54
|
-
ConditionalRequired,
|
|
55
|
-
EventObject,
|
|
56
|
-
GetConcreteByKey,
|
|
57
53
|
InputFrom,
|
|
58
|
-
IsNotNever,
|
|
59
54
|
MachineSnapshot,
|
|
60
55
|
MetaObject,
|
|
61
56
|
NonReducibleUnknown,
|
|
62
|
-
RequiredActorOptions,
|
|
63
57
|
StateMachine,
|
|
64
58
|
StateValue,
|
|
65
59
|
Values,
|
|
@@ -890,30 +884,14 @@ export declare const editorMachine: StateMachine<
|
|
|
890
884
|
type: 'focused'
|
|
891
885
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
892
886
|
}
|
|
893
|
-
| {
|
|
894
|
-
type: 'online'
|
|
895
|
-
}
|
|
896
|
-
| {
|
|
897
|
-
type: 'offline'
|
|
898
|
-
}
|
|
899
887
|
| {
|
|
900
888
|
type: 'loading'
|
|
901
889
|
}
|
|
902
890
|
| {
|
|
903
891
|
type: 'done loading'
|
|
904
892
|
},
|
|
905
|
-
{
|
|
906
|
-
|
|
907
|
-
| ActorRefFromLogic<
|
|
908
|
-
CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>
|
|
909
|
-
>
|
|
910
|
-
| undefined
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
src: 'networkLogic'
|
|
914
|
-
logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>
|
|
915
|
-
id: string | undefined
|
|
916
|
-
},
|
|
893
|
+
{},
|
|
894
|
+
never,
|
|
917
895
|
Values<{
|
|
918
896
|
'assign behaviors': {
|
|
919
897
|
type: 'assign behaviors'
|
|
@@ -1026,12 +1004,6 @@ export declare const editorMachine: StateMachine<
|
|
|
1026
1004
|
type: 'focused'
|
|
1027
1005
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1028
1006
|
}
|
|
1029
|
-
| {
|
|
1030
|
-
type: 'online'
|
|
1031
|
-
}
|
|
1032
|
-
| {
|
|
1033
|
-
type: 'offline'
|
|
1034
|
-
}
|
|
1035
1007
|
| {
|
|
1036
1008
|
type: 'loading'
|
|
1037
1009
|
}
|
|
@@ -1045,60 +1017,10 @@ export declare const editorMachine: StateMachine<
|
|
|
1045
1017
|
input,
|
|
1046
1018
|
}: {
|
|
1047
1019
|
spawn: {
|
|
1048
|
-
<TSrc extends
|
|
1020
|
+
<TSrc extends never>(
|
|
1049
1021
|
logic: TSrc,
|
|
1050
|
-
...[options]:
|
|
1051
|
-
|
|
1052
|
-
logic: CallbackActorLogic<
|
|
1053
|
-
EventObject,
|
|
1054
|
-
NonReducibleUnknown,
|
|
1055
|
-
EventObject
|
|
1056
|
-
>
|
|
1057
|
-
id: string | undefined
|
|
1058
|
-
} extends infer T
|
|
1059
|
-
? T extends {
|
|
1060
|
-
src: 'networkLogic'
|
|
1061
|
-
logic: CallbackActorLogic<
|
|
1062
|
-
EventObject,
|
|
1063
|
-
NonReducibleUnknown,
|
|
1064
|
-
EventObject
|
|
1065
|
-
>
|
|
1066
|
-
id: string | undefined
|
|
1067
|
-
}
|
|
1068
|
-
? T extends {
|
|
1069
|
-
src: TSrc
|
|
1070
|
-
}
|
|
1071
|
-
? ConditionalRequired<
|
|
1072
|
-
[
|
|
1073
|
-
options?:
|
|
1074
|
-
| ({
|
|
1075
|
-
id?: T['id'] | undefined
|
|
1076
|
-
systemId?: string
|
|
1077
|
-
input?: InputFrom<T['logic']> | undefined
|
|
1078
|
-
syncSnapshot?: boolean
|
|
1079
|
-
} & {[K in RequiredActorOptions<T>]: unknown})
|
|
1080
|
-
| undefined,
|
|
1081
|
-
],
|
|
1082
|
-
IsNotNever<RequiredActorOptions<T>>
|
|
1083
|
-
>
|
|
1084
|
-
: never
|
|
1085
|
-
: never
|
|
1086
|
-
: never
|
|
1087
|
-
): ActorRefFromLogic<
|
|
1088
|
-
GetConcreteByKey<
|
|
1089
|
-
{
|
|
1090
|
-
src: 'networkLogic'
|
|
1091
|
-
logic: CallbackActorLogic<
|
|
1092
|
-
EventObject,
|
|
1093
|
-
NonReducibleUnknown,
|
|
1094
|
-
EventObject
|
|
1095
|
-
>
|
|
1096
|
-
id: string | undefined
|
|
1097
|
-
},
|
|
1098
|
-
'src',
|
|
1099
|
-
TSrc
|
|
1100
|
-
>['logic']
|
|
1101
|
-
>
|
|
1022
|
+
...[options]: never
|
|
1023
|
+
): ActorRefFromLogic<never>
|
|
1102
1024
|
<TLogic extends AnyActorLogic>(
|
|
1103
1025
|
src: TLogic,
|
|
1104
1026
|
options?:
|
|
@@ -1227,12 +1149,6 @@ export declare const editorMachine: StateMachine<
|
|
|
1227
1149
|
type: 'focused'
|
|
1228
1150
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1229
1151
|
}
|
|
1230
|
-
| {
|
|
1231
|
-
type: 'online'
|
|
1232
|
-
}
|
|
1233
|
-
| {
|
|
1234
|
-
type: 'offline'
|
|
1235
|
-
}
|
|
1236
1152
|
| {
|
|
1237
1153
|
type: 'loading'
|
|
1238
1154
|
}
|
|
@@ -1345,12 +1261,6 @@ export declare const editorMachine: StateMachine<
|
|
|
1345
1261
|
type: 'focused'
|
|
1346
1262
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1347
1263
|
}
|
|
1348
|
-
| {
|
|
1349
|
-
type: 'online'
|
|
1350
|
-
}
|
|
1351
|
-
| {
|
|
1352
|
-
type: 'offline'
|
|
1353
|
-
}
|
|
1354
1264
|
| {
|
|
1355
1265
|
type: 'loading'
|
|
1356
1266
|
}
|
|
@@ -1368,10 +1278,6 @@ export declare const editorMachine: StateMachine<
|
|
|
1368
1278
|
maxBlocks: undefined
|
|
1369
1279
|
value: PortableTextBlock[] | undefined
|
|
1370
1280
|
}
|
|
1371
|
-
readonly invoke: {
|
|
1372
|
-
readonly id: 'networkLogic'
|
|
1373
|
-
readonly src: 'networkLogic'
|
|
1374
|
-
}
|
|
1375
1281
|
readonly on: {
|
|
1376
1282
|
readonly 'annotation.add': {
|
|
1377
1283
|
readonly actions: ActionFunction<
|
|
@@ -1492,12 +1398,6 @@ export declare const editorMachine: StateMachine<
|
|
|
1492
1398
|
type: 'focused'
|
|
1493
1399
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1494
1400
|
}
|
|
1495
|
-
| {
|
|
1496
|
-
type: 'online'
|
|
1497
|
-
}
|
|
1498
|
-
| {
|
|
1499
|
-
type: 'offline'
|
|
1500
|
-
}
|
|
1501
1401
|
| {
|
|
1502
1402
|
type: 'loading'
|
|
1503
1403
|
}
|
|
@@ -1573,12 +1473,6 @@ export declare const editorMachine: StateMachine<
|
|
|
1573
1473
|
type: 'focused'
|
|
1574
1474
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1575
1475
|
}
|
|
1576
|
-
| {
|
|
1577
|
-
type: 'online'
|
|
1578
|
-
}
|
|
1579
|
-
| {
|
|
1580
|
-
type: 'offline'
|
|
1581
|
-
}
|
|
1582
1476
|
| {
|
|
1583
1477
|
type: 'loading'
|
|
1584
1478
|
}
|
|
@@ -1722,477 +1616,8 @@ export declare const editorMachine: StateMachine<
|
|
|
1722
1616
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1723
1617
|
}
|
|
1724
1618
|
| {
|
|
1725
|
-
type: 'focused'
|
|
1726
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1727
|
-
}
|
|
1728
|
-
| {
|
|
1729
|
-
type: 'online'
|
|
1730
|
-
}
|
|
1731
|
-
| {
|
|
1732
|
-
type: 'offline'
|
|
1733
|
-
}
|
|
1734
|
-
| {
|
|
1735
|
-
type: 'loading'
|
|
1736
|
-
}
|
|
1737
|
-
| {
|
|
1738
|
-
type: 'done loading'
|
|
1739
|
-
},
|
|
1740
|
-
undefined,
|
|
1741
|
-
never,
|
|
1742
|
-
never,
|
|
1743
|
-
never,
|
|
1744
|
-
never,
|
|
1745
|
-
| {
|
|
1746
|
-
type: 'annotation.add'
|
|
1747
|
-
annotation: {
|
|
1748
|
-
name: string
|
|
1749
|
-
value: {
|
|
1750
|
-
[prop: string]: unknown
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
| {
|
|
1755
|
-
type: 'annotation.remove'
|
|
1756
|
-
annotation: {
|
|
1757
|
-
name: string
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
| {
|
|
1761
|
-
type: 'annotation.toggle'
|
|
1762
|
-
annotation: {
|
|
1763
|
-
name: string
|
|
1764
|
-
value: {
|
|
1765
|
-
[prop: string]: unknown
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
| {
|
|
1770
|
-
type: 'focus'
|
|
1771
|
-
}
|
|
1772
|
-
| PatchEvent
|
|
1773
|
-
| MutationEvent_2
|
|
1774
|
-
| {
|
|
1775
|
-
type: 'ready'
|
|
1776
|
-
}
|
|
1777
|
-
| PatchesEvent
|
|
1778
|
-
| {
|
|
1779
|
-
type: 'unset'
|
|
1780
|
-
previousValue: Array<PortableTextBlock>
|
|
1781
|
-
}
|
|
1782
|
-
| {
|
|
1783
|
-
type: 'value changed'
|
|
1784
|
-
value: Array<PortableTextBlock> | undefined
|
|
1785
|
-
}
|
|
1786
|
-
| {
|
|
1787
|
-
type: 'invalid value'
|
|
1788
|
-
resolution: InvalidValueResolution | null
|
|
1789
|
-
value: Array<PortableTextBlock> | undefined
|
|
1790
|
-
}
|
|
1791
|
-
| {
|
|
1792
|
-
type: 'error'
|
|
1793
|
-
name: string
|
|
1794
|
-
description: string
|
|
1795
|
-
data: unknown
|
|
1796
|
-
}
|
|
1797
|
-
| {
|
|
1798
|
-
type: 'selection'
|
|
1799
|
-
selection: EditorSelection
|
|
1800
|
-
}
|
|
1801
|
-
| {
|
|
1802
|
-
type: 'blur'
|
|
1803
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1804
|
-
}
|
|
1805
|
-
| {
|
|
1806
|
-
type: 'focused'
|
|
1807
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1808
|
-
}
|
|
1809
|
-
| {
|
|
1810
|
-
type: 'online'
|
|
1811
|
-
}
|
|
1812
|
-
| {
|
|
1813
|
-
type: 'offline'
|
|
1814
|
-
}
|
|
1815
|
-
| {
|
|
1816
|
-
type: 'loading'
|
|
1817
|
-
}
|
|
1818
|
-
| {
|
|
1819
|
-
type: 'done loading'
|
|
1820
|
-
}
|
|
1821
|
-
>
|
|
1822
|
-
readonly guard: ({
|
|
1823
|
-
context,
|
|
1824
|
-
}: GuardArgs<
|
|
1825
|
-
{
|
|
1826
|
-
behaviors: Array<Behavior>
|
|
1827
|
-
keyGenerator: () => string
|
|
1828
|
-
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
1829
|
-
schema: PortableTextMemberSchemaTypes
|
|
1830
|
-
readOnly: boolean
|
|
1831
|
-
maxBlocks: number | undefined
|
|
1832
|
-
value: Array<PortableTextBlock> | undefined
|
|
1833
|
-
},
|
|
1834
|
-
{
|
|
1835
|
-
type: 'annotation.remove'
|
|
1836
|
-
annotation: {
|
|
1837
|
-
name: string
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
>) => boolean
|
|
1841
|
-
}
|
|
1842
|
-
readonly 'annotation.toggle': {
|
|
1843
|
-
readonly actions: ActionFunction<
|
|
1844
|
-
{
|
|
1845
|
-
behaviors: Array<Behavior>
|
|
1846
|
-
keyGenerator: () => string
|
|
1847
|
-
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
1848
|
-
schema: PortableTextMemberSchemaTypes
|
|
1849
|
-
readOnly: boolean
|
|
1850
|
-
maxBlocks: number | undefined
|
|
1851
|
-
value: Array<PortableTextBlock> | undefined
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
type: 'annotation.toggle'
|
|
1855
|
-
annotation: {
|
|
1856
|
-
name: string
|
|
1857
|
-
value: {
|
|
1858
|
-
[prop: string]: unknown
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
1861
|
-
},
|
|
1862
|
-
| {
|
|
1863
|
-
type: 'annotation.add'
|
|
1864
|
-
annotation: {
|
|
1865
|
-
name: string
|
|
1866
|
-
value: {
|
|
1867
|
-
[prop: string]: unknown
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
| {
|
|
1872
|
-
type: 'annotation.remove'
|
|
1873
|
-
annotation: {
|
|
1874
|
-
name: string
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
| {
|
|
1878
|
-
type: 'annotation.toggle'
|
|
1879
|
-
annotation: {
|
|
1880
|
-
name: string
|
|
1881
|
-
value: {
|
|
1882
|
-
[prop: string]: unknown
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
| {
|
|
1887
|
-
type: 'focus'
|
|
1888
|
-
}
|
|
1889
|
-
| PatchEvent
|
|
1890
|
-
| MutationEvent_2
|
|
1891
|
-
| {
|
|
1892
|
-
type: 'normalizing'
|
|
1893
|
-
}
|
|
1894
|
-
| {
|
|
1895
|
-
type: 'done normalizing'
|
|
1896
|
-
}
|
|
1897
|
-
| {
|
|
1898
|
-
type: 'behavior event'
|
|
1899
|
-
behaviorEvent: BehaviorEvent
|
|
1900
|
-
editor: PortableTextSlateEditor
|
|
1901
|
-
}
|
|
1902
|
-
| {
|
|
1903
|
-
type: 'behavior action intends'
|
|
1904
|
-
editor: PortableTextSlateEditor
|
|
1905
|
-
actionIntends: Array<BehaviorActionIntend>
|
|
1906
|
-
}
|
|
1907
|
-
| {
|
|
1908
|
-
type: 'update schema'
|
|
1909
|
-
schema: PortableTextMemberSchemaTypes
|
|
1910
|
-
}
|
|
1911
|
-
| {
|
|
1912
|
-
type: 'update behaviors'
|
|
1913
|
-
behaviors: Array<Behavior>
|
|
1914
|
-
}
|
|
1915
|
-
| {
|
|
1916
|
-
type: 'update value'
|
|
1917
|
-
value: Array<PortableTextBlock> | undefined
|
|
1918
|
-
}
|
|
1919
|
-
| {
|
|
1920
|
-
type: 'toggle readOnly'
|
|
1921
|
-
}
|
|
1922
|
-
| {
|
|
1923
|
-
type: 'update maxBlocks'
|
|
1924
|
-
maxBlocks: number | undefined
|
|
1925
|
-
}
|
|
1926
|
-
| {
|
|
1927
|
-
type: 'ready'
|
|
1928
|
-
}
|
|
1929
|
-
| PatchesEvent
|
|
1930
|
-
| {
|
|
1931
|
-
type: 'unset'
|
|
1932
|
-
previousValue: Array<PortableTextBlock>
|
|
1933
|
-
}
|
|
1934
|
-
| {
|
|
1935
|
-
type: 'value changed'
|
|
1936
|
-
value: Array<PortableTextBlock> | undefined
|
|
1937
|
-
}
|
|
1938
|
-
| {
|
|
1939
|
-
type: 'invalid value'
|
|
1940
|
-
resolution: InvalidValueResolution | null
|
|
1941
|
-
value: Array<PortableTextBlock> | undefined
|
|
1942
|
-
}
|
|
1943
|
-
| {
|
|
1944
|
-
type: 'error'
|
|
1945
|
-
name: string
|
|
1946
|
-
description: string
|
|
1947
|
-
data: unknown
|
|
1948
|
-
}
|
|
1949
|
-
| {
|
|
1950
|
-
type: 'selection'
|
|
1951
|
-
selection: EditorSelection
|
|
1952
|
-
}
|
|
1953
|
-
| {
|
|
1954
|
-
type: 'blur'
|
|
1955
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1956
|
-
}
|
|
1957
|
-
| {
|
|
1958
|
-
type: 'focused'
|
|
1959
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
1960
|
-
}
|
|
1961
|
-
| {
|
|
1962
|
-
type: 'online'
|
|
1963
|
-
}
|
|
1964
|
-
| {
|
|
1965
|
-
type: 'offline'
|
|
1966
|
-
}
|
|
1967
|
-
| {
|
|
1968
|
-
type: 'loading'
|
|
1969
|
-
}
|
|
1970
|
-
| {
|
|
1971
|
-
type: 'done loading'
|
|
1972
|
-
},
|
|
1973
|
-
undefined,
|
|
1974
|
-
never,
|
|
1975
|
-
never,
|
|
1976
|
-
never,
|
|
1977
|
-
never,
|
|
1978
|
-
| {
|
|
1979
|
-
type: 'annotation.add'
|
|
1980
|
-
annotation: {
|
|
1981
|
-
name: string
|
|
1982
|
-
value: {
|
|
1983
|
-
[prop: string]: unknown
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
| {
|
|
1988
|
-
type: 'annotation.remove'
|
|
1989
|
-
annotation: {
|
|
1990
|
-
name: string
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
| {
|
|
1994
|
-
type: 'annotation.toggle'
|
|
1995
|
-
annotation: {
|
|
1996
|
-
name: string
|
|
1997
|
-
value: {
|
|
1998
|
-
[prop: string]: unknown
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
| {
|
|
2003
|
-
type: 'focus'
|
|
2004
|
-
}
|
|
2005
|
-
| PatchEvent
|
|
2006
|
-
| MutationEvent_2
|
|
2007
|
-
| {
|
|
2008
|
-
type: 'ready'
|
|
2009
|
-
}
|
|
2010
|
-
| PatchesEvent
|
|
2011
|
-
| {
|
|
2012
|
-
type: 'unset'
|
|
2013
|
-
previousValue: Array<PortableTextBlock>
|
|
2014
|
-
}
|
|
2015
|
-
| {
|
|
2016
|
-
type: 'value changed'
|
|
2017
|
-
value: Array<PortableTextBlock> | undefined
|
|
2018
|
-
}
|
|
2019
|
-
| {
|
|
2020
|
-
type: 'invalid value'
|
|
2021
|
-
resolution: InvalidValueResolution | null
|
|
2022
|
-
value: Array<PortableTextBlock> | undefined
|
|
2023
|
-
}
|
|
2024
|
-
| {
|
|
2025
|
-
type: 'error'
|
|
2026
|
-
name: string
|
|
2027
|
-
description: string
|
|
2028
|
-
data: unknown
|
|
2029
|
-
}
|
|
2030
|
-
| {
|
|
2031
|
-
type: 'selection'
|
|
2032
|
-
selection: EditorSelection
|
|
2033
|
-
}
|
|
2034
|
-
| {
|
|
2035
|
-
type: 'blur'
|
|
2036
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2037
|
-
}
|
|
2038
|
-
| {
|
|
2039
|
-
type: 'focused'
|
|
2040
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2041
|
-
}
|
|
2042
|
-
| {
|
|
2043
|
-
type: 'online'
|
|
2044
|
-
}
|
|
2045
|
-
| {
|
|
2046
|
-
type: 'offline'
|
|
2047
|
-
}
|
|
2048
|
-
| {
|
|
2049
|
-
type: 'loading'
|
|
2050
|
-
}
|
|
2051
|
-
| {
|
|
2052
|
-
type: 'done loading'
|
|
2053
|
-
}
|
|
2054
|
-
>
|
|
2055
|
-
readonly guard: ({
|
|
2056
|
-
context,
|
|
2057
|
-
}: GuardArgs<
|
|
2058
|
-
{
|
|
2059
|
-
behaviors: Array<Behavior>
|
|
2060
|
-
keyGenerator: () => string
|
|
2061
|
-
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2062
|
-
schema: PortableTextMemberSchemaTypes
|
|
2063
|
-
readOnly: boolean
|
|
2064
|
-
maxBlocks: number | undefined
|
|
2065
|
-
value: Array<PortableTextBlock> | undefined
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
type: 'annotation.toggle'
|
|
2069
|
-
annotation: {
|
|
2070
|
-
name: string
|
|
2071
|
-
value: {
|
|
2072
|
-
[prop: string]: unknown
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
>) => boolean
|
|
2077
|
-
}
|
|
2078
|
-
readonly 'focus': {
|
|
2079
|
-
readonly actions: ActionFunction<
|
|
2080
|
-
{
|
|
2081
|
-
behaviors: Array<Behavior>
|
|
2082
|
-
keyGenerator: () => string
|
|
2083
|
-
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2084
|
-
schema: PortableTextMemberSchemaTypes
|
|
2085
|
-
readOnly: boolean
|
|
2086
|
-
maxBlocks: number | undefined
|
|
2087
|
-
value: Array<PortableTextBlock> | undefined
|
|
2088
|
-
},
|
|
2089
|
-
{
|
|
2090
|
-
type: 'focus'
|
|
2091
|
-
},
|
|
2092
|
-
| {
|
|
2093
|
-
type: 'annotation.add'
|
|
2094
|
-
annotation: {
|
|
2095
|
-
name: string
|
|
2096
|
-
value: {
|
|
2097
|
-
[prop: string]: unknown
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
| {
|
|
2102
|
-
type: 'annotation.remove'
|
|
2103
|
-
annotation: {
|
|
2104
|
-
name: string
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
| {
|
|
2108
|
-
type: 'annotation.toggle'
|
|
2109
|
-
annotation: {
|
|
2110
|
-
name: string
|
|
2111
|
-
value: {
|
|
2112
|
-
[prop: string]: unknown
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
| {
|
|
2117
|
-
type: 'focus'
|
|
2118
|
-
}
|
|
2119
|
-
| PatchEvent
|
|
2120
|
-
| MutationEvent_2
|
|
2121
|
-
| {
|
|
2122
|
-
type: 'normalizing'
|
|
2123
|
-
}
|
|
2124
|
-
| {
|
|
2125
|
-
type: 'done normalizing'
|
|
2126
|
-
}
|
|
2127
|
-
| {
|
|
2128
|
-
type: 'behavior event'
|
|
2129
|
-
behaviorEvent: BehaviorEvent
|
|
2130
|
-
editor: PortableTextSlateEditor
|
|
2131
|
-
}
|
|
2132
|
-
| {
|
|
2133
|
-
type: 'behavior action intends'
|
|
2134
|
-
editor: PortableTextSlateEditor
|
|
2135
|
-
actionIntends: Array<BehaviorActionIntend>
|
|
2136
|
-
}
|
|
2137
|
-
| {
|
|
2138
|
-
type: 'update schema'
|
|
2139
|
-
schema: PortableTextMemberSchemaTypes
|
|
2140
|
-
}
|
|
2141
|
-
| {
|
|
2142
|
-
type: 'update behaviors'
|
|
2143
|
-
behaviors: Array<Behavior>
|
|
2144
|
-
}
|
|
2145
|
-
| {
|
|
2146
|
-
type: 'update value'
|
|
2147
|
-
value: Array<PortableTextBlock> | undefined
|
|
2148
|
-
}
|
|
2149
|
-
| {
|
|
2150
|
-
type: 'toggle readOnly'
|
|
2151
|
-
}
|
|
2152
|
-
| {
|
|
2153
|
-
type: 'update maxBlocks'
|
|
2154
|
-
maxBlocks: number | undefined
|
|
2155
|
-
}
|
|
2156
|
-
| {
|
|
2157
|
-
type: 'ready'
|
|
2158
|
-
}
|
|
2159
|
-
| PatchesEvent
|
|
2160
|
-
| {
|
|
2161
|
-
type: 'unset'
|
|
2162
|
-
previousValue: Array<PortableTextBlock>
|
|
2163
|
-
}
|
|
2164
|
-
| {
|
|
2165
|
-
type: 'value changed'
|
|
2166
|
-
value: Array<PortableTextBlock> | undefined
|
|
2167
|
-
}
|
|
2168
|
-
| {
|
|
2169
|
-
type: 'invalid value'
|
|
2170
|
-
resolution: InvalidValueResolution | null
|
|
2171
|
-
value: Array<PortableTextBlock> | undefined
|
|
2172
|
-
}
|
|
2173
|
-
| {
|
|
2174
|
-
type: 'error'
|
|
2175
|
-
name: string
|
|
2176
|
-
description: string
|
|
2177
|
-
data: unknown
|
|
2178
|
-
}
|
|
2179
|
-
| {
|
|
2180
|
-
type: 'selection'
|
|
2181
|
-
selection: EditorSelection
|
|
2182
|
-
}
|
|
2183
|
-
| {
|
|
2184
|
-
type: 'blur'
|
|
2185
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2186
|
-
}
|
|
2187
|
-
| {
|
|
2188
|
-
type: 'focused'
|
|
2189
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2190
|
-
}
|
|
2191
|
-
| {
|
|
2192
|
-
type: 'online'
|
|
2193
|
-
}
|
|
2194
|
-
| {
|
|
2195
|
-
type: 'offline'
|
|
1619
|
+
type: 'focused'
|
|
1620
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2196
1621
|
}
|
|
2197
1622
|
| {
|
|
2198
1623
|
type: 'loading'
|
|
@@ -2269,12 +1694,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2269
1694
|
type: 'focused'
|
|
2270
1695
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2271
1696
|
}
|
|
2272
|
-
| {
|
|
2273
|
-
type: 'online'
|
|
2274
|
-
}
|
|
2275
|
-
| {
|
|
2276
|
-
type: 'offline'
|
|
2277
|
-
}
|
|
2278
1697
|
| {
|
|
2279
1698
|
type: 'loading'
|
|
2280
1699
|
}
|
|
@@ -2295,11 +1714,14 @@ export declare const editorMachine: StateMachine<
|
|
|
2295
1714
|
value: Array<PortableTextBlock> | undefined
|
|
2296
1715
|
},
|
|
2297
1716
|
{
|
|
2298
|
-
type: '
|
|
1717
|
+
type: 'annotation.remove'
|
|
1718
|
+
annotation: {
|
|
1719
|
+
name: string
|
|
1720
|
+
}
|
|
2299
1721
|
}
|
|
2300
1722
|
>) => boolean
|
|
2301
1723
|
}
|
|
2302
|
-
readonly '
|
|
1724
|
+
readonly 'annotation.toggle': {
|
|
2303
1725
|
readonly actions: ActionFunction<
|
|
2304
1726
|
{
|
|
2305
1727
|
behaviors: Array<Behavior>
|
|
@@ -2311,7 +1733,13 @@ export declare const editorMachine: StateMachine<
|
|
|
2311
1733
|
value: Array<PortableTextBlock> | undefined
|
|
2312
1734
|
},
|
|
2313
1735
|
{
|
|
2314
|
-
type: '
|
|
1736
|
+
type: 'annotation.toggle'
|
|
1737
|
+
annotation: {
|
|
1738
|
+
name: string
|
|
1739
|
+
value: {
|
|
1740
|
+
[prop: string]: unknown
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
2315
1743
|
},
|
|
2316
1744
|
| {
|
|
2317
1745
|
type: 'annotation.add'
|
|
@@ -2412,12 +1840,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2412
1840
|
type: 'focused'
|
|
2413
1841
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2414
1842
|
}
|
|
2415
|
-
| {
|
|
2416
|
-
type: 'online'
|
|
2417
|
-
}
|
|
2418
|
-
| {
|
|
2419
|
-
type: 'offline'
|
|
2420
|
-
}
|
|
2421
1843
|
| {
|
|
2422
1844
|
type: 'loading'
|
|
2423
1845
|
}
|
|
@@ -2493,12 +1915,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2493
1915
|
type: 'focused'
|
|
2494
1916
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2495
1917
|
}
|
|
2496
|
-
| {
|
|
2497
|
-
type: 'online'
|
|
2498
|
-
}
|
|
2499
|
-
| {
|
|
2500
|
-
type: 'offline'
|
|
2501
|
-
}
|
|
2502
1918
|
| {
|
|
2503
1919
|
type: 'loading'
|
|
2504
1920
|
}
|
|
@@ -2506,8 +1922,30 @@ export declare const editorMachine: StateMachine<
|
|
|
2506
1922
|
type: 'done loading'
|
|
2507
1923
|
}
|
|
2508
1924
|
>
|
|
1925
|
+
readonly guard: ({
|
|
1926
|
+
context,
|
|
1927
|
+
}: GuardArgs<
|
|
1928
|
+
{
|
|
1929
|
+
behaviors: Array<Behavior>
|
|
1930
|
+
keyGenerator: () => string
|
|
1931
|
+
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
1932
|
+
schema: PortableTextMemberSchemaTypes
|
|
1933
|
+
readOnly: boolean
|
|
1934
|
+
maxBlocks: number | undefined
|
|
1935
|
+
value: Array<PortableTextBlock> | undefined
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
type: 'annotation.toggle'
|
|
1939
|
+
annotation: {
|
|
1940
|
+
name: string
|
|
1941
|
+
value: {
|
|
1942
|
+
[prop: string]: unknown
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
>) => boolean
|
|
2509
1947
|
}
|
|
2510
|
-
readonly '
|
|
1948
|
+
readonly 'focus': {
|
|
2511
1949
|
readonly actions: ActionFunction<
|
|
2512
1950
|
{
|
|
2513
1951
|
behaviors: Array<Behavior>
|
|
@@ -2519,8 +1957,7 @@ export declare const editorMachine: StateMachine<
|
|
|
2519
1957
|
value: Array<PortableTextBlock> | undefined
|
|
2520
1958
|
},
|
|
2521
1959
|
{
|
|
2522
|
-
type: '
|
|
2523
|
-
previousValue: Array<PortableTextBlock>
|
|
1960
|
+
type: 'focus'
|
|
2524
1961
|
},
|
|
2525
1962
|
| {
|
|
2526
1963
|
type: 'annotation.add'
|
|
@@ -2621,12 +2058,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2621
2058
|
type: 'focused'
|
|
2622
2059
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2623
2060
|
}
|
|
2624
|
-
| {
|
|
2625
|
-
type: 'online'
|
|
2626
|
-
}
|
|
2627
|
-
| {
|
|
2628
|
-
type: 'offline'
|
|
2629
|
-
}
|
|
2630
2061
|
| {
|
|
2631
2062
|
type: 'loading'
|
|
2632
2063
|
}
|
|
@@ -2702,12 +2133,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2702
2133
|
type: 'focused'
|
|
2703
2134
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2704
2135
|
}
|
|
2705
|
-
| {
|
|
2706
|
-
type: 'online'
|
|
2707
|
-
}
|
|
2708
|
-
| {
|
|
2709
|
-
type: 'offline'
|
|
2710
|
-
}
|
|
2711
2136
|
| {
|
|
2712
2137
|
type: 'loading'
|
|
2713
2138
|
}
|
|
@@ -2715,8 +2140,24 @@ export declare const editorMachine: StateMachine<
|
|
|
2715
2140
|
type: 'done loading'
|
|
2716
2141
|
}
|
|
2717
2142
|
>
|
|
2143
|
+
readonly guard: ({
|
|
2144
|
+
context,
|
|
2145
|
+
}: GuardArgs<
|
|
2146
|
+
{
|
|
2147
|
+
behaviors: Array<Behavior>
|
|
2148
|
+
keyGenerator: () => string
|
|
2149
|
+
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2150
|
+
schema: PortableTextMemberSchemaTypes
|
|
2151
|
+
readOnly: boolean
|
|
2152
|
+
maxBlocks: number | undefined
|
|
2153
|
+
value: Array<PortableTextBlock> | undefined
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
type: 'focus'
|
|
2157
|
+
}
|
|
2158
|
+
>) => boolean
|
|
2718
2159
|
}
|
|
2719
|
-
readonly '
|
|
2160
|
+
readonly 'ready': {
|
|
2720
2161
|
readonly actions: ActionFunction<
|
|
2721
2162
|
{
|
|
2722
2163
|
behaviors: Array<Behavior>
|
|
@@ -2728,8 +2169,7 @@ export declare const editorMachine: StateMachine<
|
|
|
2728
2169
|
value: Array<PortableTextBlock> | undefined
|
|
2729
2170
|
},
|
|
2730
2171
|
{
|
|
2731
|
-
type: '
|
|
2732
|
-
value: Array<PortableTextBlock> | undefined
|
|
2172
|
+
type: 'ready'
|
|
2733
2173
|
},
|
|
2734
2174
|
| {
|
|
2735
2175
|
type: 'annotation.add'
|
|
@@ -2830,12 +2270,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2830
2270
|
type: 'focused'
|
|
2831
2271
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2832
2272
|
}
|
|
2833
|
-
| {
|
|
2834
|
-
type: 'online'
|
|
2835
|
-
}
|
|
2836
|
-
| {
|
|
2837
|
-
type: 'offline'
|
|
2838
|
-
}
|
|
2839
2273
|
| {
|
|
2840
2274
|
type: 'loading'
|
|
2841
2275
|
}
|
|
@@ -2911,12 +2345,6 @@ export declare const editorMachine: StateMachine<
|
|
|
2911
2345
|
type: 'focused'
|
|
2912
2346
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
2913
2347
|
}
|
|
2914
|
-
| {
|
|
2915
|
-
type: 'online'
|
|
2916
|
-
}
|
|
2917
|
-
| {
|
|
2918
|
-
type: 'offline'
|
|
2919
|
-
}
|
|
2920
2348
|
| {
|
|
2921
2349
|
type: 'loading'
|
|
2922
2350
|
}
|
|
@@ -2925,7 +2353,7 @@ export declare const editorMachine: StateMachine<
|
|
|
2925
2353
|
}
|
|
2926
2354
|
>
|
|
2927
2355
|
}
|
|
2928
|
-
readonly '
|
|
2356
|
+
readonly 'unset': {
|
|
2929
2357
|
readonly actions: ActionFunction<
|
|
2930
2358
|
{
|
|
2931
2359
|
behaviors: Array<Behavior>
|
|
@@ -2937,9 +2365,8 @@ export declare const editorMachine: StateMachine<
|
|
|
2937
2365
|
value: Array<PortableTextBlock> | undefined
|
|
2938
2366
|
},
|
|
2939
2367
|
{
|
|
2940
|
-
type: '
|
|
2941
|
-
|
|
2942
|
-
value: Array<PortableTextBlock> | undefined
|
|
2368
|
+
type: 'unset'
|
|
2369
|
+
previousValue: Array<PortableTextBlock>
|
|
2943
2370
|
},
|
|
2944
2371
|
| {
|
|
2945
2372
|
type: 'annotation.add'
|
|
@@ -3040,12 +2467,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3040
2467
|
type: 'focused'
|
|
3041
2468
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3042
2469
|
}
|
|
3043
|
-
| {
|
|
3044
|
-
type: 'online'
|
|
3045
|
-
}
|
|
3046
|
-
| {
|
|
3047
|
-
type: 'offline'
|
|
3048
|
-
}
|
|
3049
2470
|
| {
|
|
3050
2471
|
type: 'loading'
|
|
3051
2472
|
}
|
|
@@ -3121,12 +2542,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3121
2542
|
type: 'focused'
|
|
3122
2543
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3123
2544
|
}
|
|
3124
|
-
| {
|
|
3125
|
-
type: 'online'
|
|
3126
|
-
}
|
|
3127
|
-
| {
|
|
3128
|
-
type: 'offline'
|
|
3129
|
-
}
|
|
3130
2545
|
| {
|
|
3131
2546
|
type: 'loading'
|
|
3132
2547
|
}
|
|
@@ -3135,7 +2550,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3135
2550
|
}
|
|
3136
2551
|
>
|
|
3137
2552
|
}
|
|
3138
|
-
readonly '
|
|
2553
|
+
readonly 'value changed': {
|
|
3139
2554
|
readonly actions: ActionFunction<
|
|
3140
2555
|
{
|
|
3141
2556
|
behaviors: Array<Behavior>
|
|
@@ -3147,10 +2562,8 @@ export declare const editorMachine: StateMachine<
|
|
|
3147
2562
|
value: Array<PortableTextBlock> | undefined
|
|
3148
2563
|
},
|
|
3149
2564
|
{
|
|
3150
|
-
type: '
|
|
3151
|
-
|
|
3152
|
-
description: string
|
|
3153
|
-
data: unknown
|
|
2565
|
+
type: 'value changed'
|
|
2566
|
+
value: Array<PortableTextBlock> | undefined
|
|
3154
2567
|
},
|
|
3155
2568
|
| {
|
|
3156
2569
|
type: 'annotation.add'
|
|
@@ -3251,12 +2664,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3251
2664
|
type: 'focused'
|
|
3252
2665
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3253
2666
|
}
|
|
3254
|
-
| {
|
|
3255
|
-
type: 'online'
|
|
3256
|
-
}
|
|
3257
|
-
| {
|
|
3258
|
-
type: 'offline'
|
|
3259
|
-
}
|
|
3260
2667
|
| {
|
|
3261
2668
|
type: 'loading'
|
|
3262
2669
|
}
|
|
@@ -3332,12 +2739,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3332
2739
|
type: 'focused'
|
|
3333
2740
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3334
2741
|
}
|
|
3335
|
-
| {
|
|
3336
|
-
type: 'online'
|
|
3337
|
-
}
|
|
3338
|
-
| {
|
|
3339
|
-
type: 'offline'
|
|
3340
|
-
}
|
|
3341
2742
|
| {
|
|
3342
2743
|
type: 'loading'
|
|
3343
2744
|
}
|
|
@@ -3346,7 +2747,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3346
2747
|
}
|
|
3347
2748
|
>
|
|
3348
2749
|
}
|
|
3349
|
-
readonly '
|
|
2750
|
+
readonly 'invalid value': {
|
|
3350
2751
|
readonly actions: ActionFunction<
|
|
3351
2752
|
{
|
|
3352
2753
|
behaviors: Array<Behavior>
|
|
@@ -3358,8 +2759,9 @@ export declare const editorMachine: StateMachine<
|
|
|
3358
2759
|
value: Array<PortableTextBlock> | undefined
|
|
3359
2760
|
},
|
|
3360
2761
|
{
|
|
3361
|
-
type: '
|
|
3362
|
-
|
|
2762
|
+
type: 'invalid value'
|
|
2763
|
+
resolution: InvalidValueResolution | null
|
|
2764
|
+
value: Array<PortableTextBlock> | undefined
|
|
3363
2765
|
},
|
|
3364
2766
|
| {
|
|
3365
2767
|
type: 'annotation.add'
|
|
@@ -3460,12 +2862,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3460
2862
|
type: 'focused'
|
|
3461
2863
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3462
2864
|
}
|
|
3463
|
-
| {
|
|
3464
|
-
type: 'online'
|
|
3465
|
-
}
|
|
3466
|
-
| {
|
|
3467
|
-
type: 'offline'
|
|
3468
|
-
}
|
|
3469
2865
|
| {
|
|
3470
2866
|
type: 'loading'
|
|
3471
2867
|
}
|
|
@@ -3541,12 +2937,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3541
2937
|
type: 'focused'
|
|
3542
2938
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3543
2939
|
}
|
|
3544
|
-
| {
|
|
3545
|
-
type: 'online'
|
|
3546
|
-
}
|
|
3547
|
-
| {
|
|
3548
|
-
type: 'offline'
|
|
3549
|
-
}
|
|
3550
2940
|
| {
|
|
3551
2941
|
type: 'loading'
|
|
3552
2942
|
}
|
|
@@ -3555,7 +2945,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3555
2945
|
}
|
|
3556
2946
|
>
|
|
3557
2947
|
}
|
|
3558
|
-
readonly '
|
|
2948
|
+
readonly 'error': {
|
|
3559
2949
|
readonly actions: ActionFunction<
|
|
3560
2950
|
{
|
|
3561
2951
|
behaviors: Array<Behavior>
|
|
@@ -3567,8 +2957,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3567
2957
|
value: Array<PortableTextBlock> | undefined
|
|
3568
2958
|
},
|
|
3569
2959
|
{
|
|
3570
|
-
type: '
|
|
3571
|
-
|
|
2960
|
+
type: 'error'
|
|
2961
|
+
name: string
|
|
2962
|
+
description: string
|
|
2963
|
+
data: unknown
|
|
3572
2964
|
},
|
|
3573
2965
|
| {
|
|
3574
2966
|
type: 'annotation.add'
|
|
@@ -3669,12 +3061,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3669
3061
|
type: 'focused'
|
|
3670
3062
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3671
3063
|
}
|
|
3672
|
-
| {
|
|
3673
|
-
type: 'online'
|
|
3674
|
-
}
|
|
3675
|
-
| {
|
|
3676
|
-
type: 'offline'
|
|
3677
|
-
}
|
|
3678
3064
|
| {
|
|
3679
3065
|
type: 'loading'
|
|
3680
3066
|
}
|
|
@@ -3750,12 +3136,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3750
3136
|
type: 'focused'
|
|
3751
3137
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3752
3138
|
}
|
|
3753
|
-
| {
|
|
3754
|
-
type: 'online'
|
|
3755
|
-
}
|
|
3756
|
-
| {
|
|
3757
|
-
type: 'offline'
|
|
3758
|
-
}
|
|
3759
3139
|
| {
|
|
3760
3140
|
type: 'loading'
|
|
3761
3141
|
}
|
|
@@ -3764,7 +3144,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3764
3144
|
}
|
|
3765
3145
|
>
|
|
3766
3146
|
}
|
|
3767
|
-
readonly '
|
|
3147
|
+
readonly 'selection': {
|
|
3768
3148
|
readonly actions: ActionFunction<
|
|
3769
3149
|
{
|
|
3770
3150
|
behaviors: Array<Behavior>
|
|
@@ -3776,8 +3156,8 @@ export declare const editorMachine: StateMachine<
|
|
|
3776
3156
|
value: Array<PortableTextBlock> | undefined
|
|
3777
3157
|
},
|
|
3778
3158
|
{
|
|
3779
|
-
type: '
|
|
3780
|
-
|
|
3159
|
+
type: 'selection'
|
|
3160
|
+
selection: EditorSelection
|
|
3781
3161
|
},
|
|
3782
3162
|
| {
|
|
3783
3163
|
type: 'annotation.add'
|
|
@@ -3878,12 +3258,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3878
3258
|
type: 'focused'
|
|
3879
3259
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3880
3260
|
}
|
|
3881
|
-
| {
|
|
3882
|
-
type: 'online'
|
|
3883
|
-
}
|
|
3884
|
-
| {
|
|
3885
|
-
type: 'offline'
|
|
3886
|
-
}
|
|
3887
3261
|
| {
|
|
3888
3262
|
type: 'loading'
|
|
3889
3263
|
}
|
|
@@ -3959,12 +3333,6 @@ export declare const editorMachine: StateMachine<
|
|
|
3959
3333
|
type: 'focused'
|
|
3960
3334
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3961
3335
|
}
|
|
3962
|
-
| {
|
|
3963
|
-
type: 'online'
|
|
3964
|
-
}
|
|
3965
|
-
| {
|
|
3966
|
-
type: 'offline'
|
|
3967
|
-
}
|
|
3968
3336
|
| {
|
|
3969
3337
|
type: 'loading'
|
|
3970
3338
|
}
|
|
@@ -3973,7 +3341,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3973
3341
|
}
|
|
3974
3342
|
>
|
|
3975
3343
|
}
|
|
3976
|
-
readonly '
|
|
3344
|
+
readonly 'blur': {
|
|
3977
3345
|
readonly actions: ActionFunction<
|
|
3978
3346
|
{
|
|
3979
3347
|
behaviors: Array<Behavior>
|
|
@@ -3985,7 +3353,8 @@ export declare const editorMachine: StateMachine<
|
|
|
3985
3353
|
value: Array<PortableTextBlock> | undefined
|
|
3986
3354
|
},
|
|
3987
3355
|
{
|
|
3988
|
-
type: '
|
|
3356
|
+
type: 'blur'
|
|
3357
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3989
3358
|
},
|
|
3990
3359
|
| {
|
|
3991
3360
|
type: 'annotation.add'
|
|
@@ -4086,12 +3455,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4086
3455
|
type: 'focused'
|
|
4087
3456
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4088
3457
|
}
|
|
4089
|
-
| {
|
|
4090
|
-
type: 'online'
|
|
4091
|
-
}
|
|
4092
|
-
| {
|
|
4093
|
-
type: 'offline'
|
|
4094
|
-
}
|
|
4095
3458
|
| {
|
|
4096
3459
|
type: 'loading'
|
|
4097
3460
|
}
|
|
@@ -4167,12 +3530,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4167
3530
|
type: 'focused'
|
|
4168
3531
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4169
3532
|
}
|
|
4170
|
-
| {
|
|
4171
|
-
type: 'online'
|
|
4172
|
-
}
|
|
4173
|
-
| {
|
|
4174
|
-
type: 'offline'
|
|
4175
|
-
}
|
|
4176
3533
|
| {
|
|
4177
3534
|
type: 'loading'
|
|
4178
3535
|
}
|
|
@@ -4181,7 +3538,7 @@ export declare const editorMachine: StateMachine<
|
|
|
4181
3538
|
}
|
|
4182
3539
|
>
|
|
4183
3540
|
}
|
|
4184
|
-
readonly '
|
|
3541
|
+
readonly 'focused': {
|
|
4185
3542
|
readonly actions: ActionFunction<
|
|
4186
3543
|
{
|
|
4187
3544
|
behaviors: Array<Behavior>
|
|
@@ -4193,7 +3550,8 @@ export declare const editorMachine: StateMachine<
|
|
|
4193
3550
|
value: Array<PortableTextBlock> | undefined
|
|
4194
3551
|
},
|
|
4195
3552
|
{
|
|
4196
|
-
type: '
|
|
3553
|
+
type: 'focused'
|
|
3554
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4197
3555
|
},
|
|
4198
3556
|
| {
|
|
4199
3557
|
type: 'annotation.add'
|
|
@@ -4294,12 +3652,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4294
3652
|
type: 'focused'
|
|
4295
3653
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4296
3654
|
}
|
|
4297
|
-
| {
|
|
4298
|
-
type: 'online'
|
|
4299
|
-
}
|
|
4300
|
-
| {
|
|
4301
|
-
type: 'offline'
|
|
4302
|
-
}
|
|
4303
3655
|
| {
|
|
4304
3656
|
type: 'loading'
|
|
4305
3657
|
}
|
|
@@ -4375,12 +3727,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4375
3727
|
type: 'focused'
|
|
4376
3728
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4377
3729
|
}
|
|
4378
|
-
| {
|
|
4379
|
-
type: 'online'
|
|
4380
|
-
}
|
|
4381
|
-
| {
|
|
4382
|
-
type: 'offline'
|
|
4383
|
-
}
|
|
4384
3730
|
| {
|
|
4385
3731
|
type: 'loading'
|
|
4386
3732
|
}
|
|
@@ -4502,12 +3848,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4502
3848
|
type: 'focused'
|
|
4503
3849
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4504
3850
|
}
|
|
4505
|
-
| {
|
|
4506
|
-
type: 'online'
|
|
4507
|
-
}
|
|
4508
|
-
| {
|
|
4509
|
-
type: 'offline'
|
|
4510
|
-
}
|
|
4511
3851
|
| {
|
|
4512
3852
|
type: 'loading'
|
|
4513
3853
|
}
|
|
@@ -4583,12 +3923,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4583
3923
|
type: 'focused'
|
|
4584
3924
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4585
3925
|
}
|
|
4586
|
-
| {
|
|
4587
|
-
type: 'online'
|
|
4588
|
-
}
|
|
4589
|
-
| {
|
|
4590
|
-
type: 'offline'
|
|
4591
|
-
}
|
|
4592
3926
|
| {
|
|
4593
3927
|
type: 'loading'
|
|
4594
3928
|
}
|
|
@@ -4708,12 +4042,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4708
4042
|
type: 'focused'
|
|
4709
4043
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4710
4044
|
}
|
|
4711
|
-
| {
|
|
4712
|
-
type: 'online'
|
|
4713
|
-
}
|
|
4714
|
-
| {
|
|
4715
|
-
type: 'offline'
|
|
4716
|
-
}
|
|
4717
4045
|
| {
|
|
4718
4046
|
type: 'loading'
|
|
4719
4047
|
}
|
|
@@ -4789,12 +4117,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4789
4117
|
type: 'focused'
|
|
4790
4118
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4791
4119
|
}
|
|
4792
|
-
| {
|
|
4793
|
-
type: 'online'
|
|
4794
|
-
}
|
|
4795
|
-
| {
|
|
4796
|
-
type: 'offline'
|
|
4797
|
-
}
|
|
4798
4120
|
| {
|
|
4799
4121
|
type: 'loading'
|
|
4800
4122
|
}
|
|
@@ -4916,12 +4238,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4916
4238
|
type: 'focused'
|
|
4917
4239
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4918
4240
|
}
|
|
4919
|
-
| {
|
|
4920
|
-
type: 'online'
|
|
4921
|
-
}
|
|
4922
|
-
| {
|
|
4923
|
-
type: 'offline'
|
|
4924
|
-
}
|
|
4925
4241
|
| {
|
|
4926
4242
|
type: 'loading'
|
|
4927
4243
|
}
|
|
@@ -4997,12 +4313,6 @@ export declare const editorMachine: StateMachine<
|
|
|
4997
4313
|
type: 'focused'
|
|
4998
4314
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4999
4315
|
}
|
|
5000
|
-
| {
|
|
5001
|
-
type: 'online'
|
|
5002
|
-
}
|
|
5003
|
-
| {
|
|
5004
|
-
type: 'offline'
|
|
5005
|
-
}
|
|
5006
4316
|
| {
|
|
5007
4317
|
type: 'loading'
|
|
5008
4318
|
}
|
|
@@ -5131,12 +4441,6 @@ export declare const editorMachine: StateMachine<
|
|
|
5131
4441
|
type: 'focused'
|
|
5132
4442
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
5133
4443
|
}
|
|
5134
|
-
| {
|
|
5135
|
-
type: 'online'
|
|
5136
|
-
}
|
|
5137
|
-
| {
|
|
5138
|
-
type: 'offline'
|
|
5139
|
-
}
|
|
5140
4444
|
| {
|
|
5141
4445
|
type: 'loading'
|
|
5142
4446
|
}
|
|
@@ -5144,15 +4448,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5144
4448
|
type: 'done loading'
|
|
5145
4449
|
},
|
|
5146
4450
|
undefined,
|
|
5147
|
-
|
|
5148
|
-
src: 'networkLogic'
|
|
5149
|
-
logic: CallbackActorLogic<
|
|
5150
|
-
EventObject,
|
|
5151
|
-
NonReducibleUnknown,
|
|
5152
|
-
EventObject
|
|
5153
|
-
>
|
|
5154
|
-
id: string | undefined
|
|
5155
|
-
},
|
|
4451
|
+
never,
|
|
5156
4452
|
never,
|
|
5157
4453
|
never,
|
|
5158
4454
|
never,
|
|
@@ -5272,12 +4568,6 @@ export declare const editorMachine: StateMachine<
|
|
|
5272
4568
|
type: 'focused'
|
|
5273
4569
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
5274
4570
|
}
|
|
5275
|
-
| {
|
|
5276
|
-
type: 'online'
|
|
5277
|
-
}
|
|
5278
|
-
| {
|
|
5279
|
-
type: 'offline'
|
|
5280
|
-
}
|
|
5281
4571
|
| {
|
|
5282
4572
|
type: 'loading'
|
|
5283
4573
|
}
|
|
@@ -5285,15 +4575,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5285
4575
|
type: 'done loading'
|
|
5286
4576
|
},
|
|
5287
4577
|
undefined,
|
|
5288
|
-
|
|
5289
|
-
src: 'networkLogic'
|
|
5290
|
-
logic: CallbackActorLogic<
|
|
5291
|
-
EventObject,
|
|
5292
|
-
NonReducibleUnknown,
|
|
5293
|
-
EventObject
|
|
5294
|
-
>
|
|
5295
|
-
id: string | undefined
|
|
5296
|
-
},
|
|
4578
|
+
never,
|
|
5297
4579
|
never,
|
|
5298
4580
|
never,
|
|
5299
4581
|
never,
|
|
@@ -5414,12 +4696,6 @@ export declare const editorMachine: StateMachine<
|
|
|
5414
4696
|
type: 'focused'
|
|
5415
4697
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
5416
4698
|
}
|
|
5417
|
-
| {
|
|
5418
|
-
type: 'online'
|
|
5419
|
-
}
|
|
5420
|
-
| {
|
|
5421
|
-
type: 'offline'
|
|
5422
|
-
}
|
|
5423
4699
|
| {
|
|
5424
4700
|
type: 'loading'
|
|
5425
4701
|
}
|
|
@@ -5427,15 +4703,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5427
4703
|
type: 'done loading'
|
|
5428
4704
|
},
|
|
5429
4705
|
undefined,
|
|
5430
|
-
|
|
5431
|
-
src: 'networkLogic'
|
|
5432
|
-
logic: CallbackActorLogic<
|
|
5433
|
-
EventObject,
|
|
5434
|
-
NonReducibleUnknown,
|
|
5435
|
-
EventObject
|
|
5436
|
-
>
|
|
5437
|
-
id: string | undefined
|
|
5438
|
-
},
|
|
4706
|
+
never,
|
|
5439
4707
|
never,
|
|
5440
4708
|
never,
|
|
5441
4709
|
never,
|
|
@@ -5582,12 +4850,6 @@ export declare const editorMachine: StateMachine<
|
|
|
5582
4850
|
type: 'focused'
|
|
5583
4851
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
5584
4852
|
}
|
|
5585
|
-
| {
|
|
5586
|
-
type: 'online'
|
|
5587
|
-
}
|
|
5588
|
-
| {
|
|
5589
|
-
type: 'offline'
|
|
5590
|
-
}
|
|
5591
4853
|
| {
|
|
5592
4854
|
type: 'loading'
|
|
5593
4855
|
}
|
|
@@ -5709,12 +4971,6 @@ export declare const editorMachine: StateMachine<
|
|
|
5709
4971
|
type: 'focused'
|
|
5710
4972
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
5711
4973
|
}
|
|
5712
|
-
| {
|
|
5713
|
-
type: 'online'
|
|
5714
|
-
}
|
|
5715
|
-
| {
|
|
5716
|
-
type: 'offline'
|
|
5717
|
-
}
|
|
5718
4974
|
| {
|
|
5719
4975
|
type: 'loading'
|
|
5720
4976
|
}
|
|
@@ -5722,15 +4978,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5722
4978
|
type: 'done loading'
|
|
5723
4979
|
},
|
|
5724
4980
|
undefined,
|
|
5725
|
-
|
|
5726
|
-
src: 'networkLogic'
|
|
5727
|
-
logic: CallbackActorLogic<
|
|
5728
|
-
EventObject,
|
|
5729
|
-
NonReducibleUnknown,
|
|
5730
|
-
EventObject
|
|
5731
|
-
>
|
|
5732
|
-
id: string | undefined
|
|
5733
|
-
},
|
|
4981
|
+
never,
|
|
5734
4982
|
Values<{
|
|
5735
4983
|
'assign behaviors': {
|
|
5736
4984
|
type: 'assign behaviors'
|
|
@@ -5831,12 +5079,6 @@ export declare const editorMachine: StateMachine<
|
|
|
5831
5079
|
type: 'focused'
|
|
5832
5080
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
5833
5081
|
}
|
|
5834
|
-
| {
|
|
5835
|
-
type: 'online'
|
|
5836
|
-
}
|
|
5837
|
-
| {
|
|
5838
|
-
type: 'offline'
|
|
5839
|
-
}
|
|
5840
5082
|
| {
|
|
5841
5083
|
type: 'loading'
|
|
5842
5084
|
}
|
|
@@ -6000,12 +5242,6 @@ export declare type InternalEditorEmittedEvent =
|
|
|
6000
5242
|
type: 'focused'
|
|
6001
5243
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
6002
5244
|
}
|
|
6003
|
-
| {
|
|
6004
|
-
type: 'online'
|
|
6005
|
-
}
|
|
6006
|
-
| {
|
|
6007
|
-
type: 'offline'
|
|
6008
|
-
}
|
|
6009
5245
|
| {
|
|
6010
5246
|
type: 'loading'
|
|
6011
5247
|
}
|
|
@@ -6452,7 +5688,7 @@ export declare class PortableTextEditor extends Component<
|
|
|
6452
5688
|
export declare type PortableTextEditorProps<
|
|
6453
5689
|
TEditor extends Editor | undefined = undefined,
|
|
6454
5690
|
> = PropsWithChildren<
|
|
6455
|
-
|
|
5691
|
+
TEditor extends Editor
|
|
6456
5692
|
? {
|
|
6457
5693
|
/**
|
|
6458
5694
|
* @alpha
|
|
@@ -6497,7 +5733,7 @@ export declare type PortableTextEditorProps<
|
|
|
6497
5733
|
* A ref to the editor instance
|
|
6498
5734
|
*/
|
|
6499
5735
|
editorRef?: MutableRefObject<PortableTextEditor | null>
|
|
6500
|
-
}
|
|
5736
|
+
}
|
|
6501
5737
|
>
|
|
6502
5738
|
|
|
6503
5739
|
/** @internal */
|