@textbus/xnote 0.3.2 → 0.3.4

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/bundles/index.js CHANGED
@@ -63,7 +63,18 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
63
63
 
64
64
  exports.DropdownService = class DropdownService {
65
65
  constructor() {
66
- this.siblingOpenEvent = new core$1.Subject();
66
+ Object.defineProperty(this, "onSiblingOpen", {
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true,
70
+ value: void 0
71
+ });
72
+ Object.defineProperty(this, "siblingOpenEvent", {
73
+ enumerable: true,
74
+ configurable: true,
75
+ writable: true,
76
+ value: new core$1.Subject()
77
+ });
67
78
  this.onSiblingOpen = this.siblingOpenEvent.asObservable();
68
79
  }
69
80
  notify(id) {
@@ -81,14 +92,60 @@ var DropdownContextService_1;
81
92
  let i = 0;
82
93
  exports.DropdownContextService = DropdownContextService_1 = class DropdownContextService {
83
94
  constructor(dropdownService, injector) {
84
- this.dropdownService = dropdownService;
85
- this.injector = injector;
86
- this.id = i;
87
- this.isOpen = false;
88
- this.canHide = true;
89
- this.openStateChangeEvent = new core$1.Subject();
90
- this.timer = null;
91
- this.parentDropdownContextService = this.injector.get(DropdownContextService_1, null, core.InjectFlags.SkipSelf);
95
+ Object.defineProperty(this, "dropdownService", {
96
+ enumerable: true,
97
+ configurable: true,
98
+ writable: true,
99
+ value: dropdownService
100
+ });
101
+ Object.defineProperty(this, "injector", {
102
+ enumerable: true,
103
+ configurable: true,
104
+ writable: true,
105
+ value: injector
106
+ });
107
+ Object.defineProperty(this, "id", {
108
+ enumerable: true,
109
+ configurable: true,
110
+ writable: true,
111
+ value: i
112
+ });
113
+ Object.defineProperty(this, "isOpen", {
114
+ enumerable: true,
115
+ configurable: true,
116
+ writable: true,
117
+ value: false
118
+ });
119
+ Object.defineProperty(this, "onOpenStateChange", {
120
+ enumerable: true,
121
+ configurable: true,
122
+ writable: true,
123
+ value: void 0
124
+ });
125
+ Object.defineProperty(this, "canHide", {
126
+ enumerable: true,
127
+ configurable: true,
128
+ writable: true,
129
+ value: true
130
+ });
131
+ Object.defineProperty(this, "openStateChangeEvent", {
132
+ enumerable: true,
133
+ configurable: true,
134
+ writable: true,
135
+ value: new core$1.Subject()
136
+ });
137
+ Object.defineProperty(this, "timer", {
138
+ enumerable: true,
139
+ configurable: true,
140
+ writable: true,
141
+ value: null
142
+ });
143
+ Object.defineProperty(this, "parentDropdownContextService", {
144
+ enumerable: true,
145
+ configurable: true,
146
+ writable: true,
147
+ value: this.injector.get(DropdownContextService_1, null, core.InjectFlags.SkipSelf)
148
+ });
92
149
  this.onOpenStateChange = this.openStateChangeEvent.asObservable();
93
150
  dropdownService.onSiblingOpen.subscribe(id => {
94
151
  if (id === this.id) {
@@ -260,14 +317,54 @@ class Picker {
260
317
  return this.empty ? null : this._hsv;
261
318
  }
262
319
  constructor(onChange, value) {
263
- this.onChange = onChange;
264
- this._hex = '';
265
- this._hsl = null;
266
- this._rgb = null;
267
- this._hsv = null;
268
- this._rgba = null;
269
- this.empty = false;
270
- this.resetAlpha = true;
320
+ Object.defineProperty(this, "onChange", {
321
+ enumerable: true,
322
+ configurable: true,
323
+ writable: true,
324
+ value: onChange
325
+ });
326
+ Object.defineProperty(this, "_hex", {
327
+ enumerable: true,
328
+ configurable: true,
329
+ writable: true,
330
+ value: ''
331
+ });
332
+ Object.defineProperty(this, "_hsl", {
333
+ enumerable: true,
334
+ configurable: true,
335
+ writable: true,
336
+ value: null
337
+ });
338
+ Object.defineProperty(this, "_rgb", {
339
+ enumerable: true,
340
+ configurable: true,
341
+ writable: true,
342
+ value: null
343
+ });
344
+ Object.defineProperty(this, "_hsv", {
345
+ enumerable: true,
346
+ configurable: true,
347
+ writable: true,
348
+ value: null
349
+ });
350
+ Object.defineProperty(this, "_rgba", {
351
+ enumerable: true,
352
+ configurable: true,
353
+ writable: true,
354
+ value: null
355
+ });
356
+ Object.defineProperty(this, "empty", {
357
+ enumerable: true,
358
+ configurable: true,
359
+ writable: true,
360
+ value: false
361
+ });
362
+ Object.defineProperty(this, "resetAlpha", {
363
+ enumerable: true,
364
+ configurable: true,
365
+ writable: true,
366
+ value: true
367
+ });
271
368
  this.hex = value || '#f00';
272
369
  }
273
370
  }
@@ -942,7 +1039,12 @@ var scopedId$e = "vf-2a8a65";
942
1039
 
943
1040
  exports.RefreshService = class RefreshService {
944
1041
  constructor() {
945
- this.onRefresh = new core$1.Subject();
1042
+ Object.defineProperty(this, "onRefresh", {
1043
+ enumerable: true,
1044
+ configurable: true,
1045
+ writable: true,
1046
+ value: new core$1.Subject()
1047
+ });
946
1048
  }
947
1049
  };
948
1050
  exports.RefreshService = __decorate([
@@ -1087,9 +1189,18 @@ function SlotRender(props) {
1087
1189
  const adapter = core.inject(platformBrowser.DomAdapter);
1088
1190
  const instance = core.getCurrentInstance();
1089
1191
  const slot = props.slot;
1090
- const sub = core$1.merge(slot.__changeMarker__.onChange, slot.__changeMarker__.onForceChange).subscribe(() => {
1091
- if (props.slot.__changeMarker__.dirty) {
1092
- instance.markAsDirtied();
1192
+ function listen(slot) {
1193
+ return core$1.merge(slot.__changeMarker__.onChange, slot.__changeMarker__.onForceChange).subscribe(() => {
1194
+ if (props.slot.__changeMarker__.dirty) {
1195
+ instance.markAsDirtied();
1196
+ }
1197
+ });
1198
+ }
1199
+ let sub = listen(slot);
1200
+ core.onPropsChanged((currentProps, oldProps) => {
1201
+ if (oldProps.slot !== currentProps.slot) {
1202
+ sub.unsubscribe();
1203
+ sub = listen(currentProps.slot);
1093
1204
  }
1094
1205
  });
1095
1206
  core.onUnmounted(() => {
@@ -1124,31 +1235,46 @@ class BlockquoteComponent extends core$1.Component {
1124
1235
  useBlockContent(this.state.slot);
1125
1236
  }
1126
1237
  }
1127
- BlockquoteComponent.type = core$1.ContentType.BlockComponent;
1128
- BlockquoteComponent.componentName = 'BlockquoteComponent';
1129
- BlockquoteComponent.zenCoding = {
1130
- key: ' ',
1131
- match(content, textbus) {
1132
- const selection = textbus.get(core$1.Selection);
1133
- if (selection.commonAncestorComponent instanceof ParagraphComponent) {
1134
- return /^>$/.test(content);
1135
- }
1136
- return false;
1137
- },
1138
- createState(_, textbus) {
1139
- const selection = textbus.get(core$1.Selection);
1140
- const commonAncestorSlot = selection.commonAncestorSlot;
1141
- const slot = new core$1.Slot([
1142
- core$1.ContentType.BlockComponent
1143
- ]);
1144
- if (commonAncestorSlot === null || commonAncestorSlot === void 0 ? void 0 : commonAncestorSlot.hasAttribute(textIndentAttr)) {
1145
- slot.setAttribute(textIndentAttr, commonAncestorSlot.getAttribute(textIndentAttr));
1238
+ Object.defineProperty(BlockquoteComponent, "type", {
1239
+ enumerable: true,
1240
+ configurable: true,
1241
+ writable: true,
1242
+ value: core$1.ContentType.BlockComponent
1243
+ });
1244
+ Object.defineProperty(BlockquoteComponent, "componentName", {
1245
+ enumerable: true,
1246
+ configurable: true,
1247
+ writable: true,
1248
+ value: 'BlockquoteComponent'
1249
+ });
1250
+ Object.defineProperty(BlockquoteComponent, "zenCoding", {
1251
+ enumerable: true,
1252
+ configurable: true,
1253
+ writable: true,
1254
+ value: {
1255
+ key: ' ',
1256
+ match(content, textbus) {
1257
+ const selection = textbus.get(core$1.Selection);
1258
+ if (selection.commonAncestorComponent instanceof ParagraphComponent) {
1259
+ return /^>$/.test(content);
1260
+ }
1261
+ return false;
1262
+ },
1263
+ createState(_, textbus) {
1264
+ const selection = textbus.get(core$1.Selection);
1265
+ const commonAncestorSlot = selection.commonAncestorSlot;
1266
+ const slot = new core$1.Slot([
1267
+ core$1.ContentType.BlockComponent
1268
+ ]);
1269
+ if (commonAncestorSlot === null || commonAncestorSlot === void 0 ? void 0 : commonAncestorSlot.hasAttribute(textIndentAttr)) {
1270
+ slot.setAttribute(textIndentAttr, commonAncestorSlot.getAttribute(textIndentAttr));
1271
+ }
1272
+ return {
1273
+ slot
1274
+ };
1146
1275
  }
1147
- return {
1148
- slot
1149
- };
1150
1276
  }
1151
- };
1277
+ });
1152
1278
  function toBlockquote(textbus) {
1153
1279
  const query = textbus.get(core$1.Query);
1154
1280
  const commander = textbus.get(core$1.Commander);
@@ -1250,9 +1376,24 @@ class HighlightBoxComponent extends core$1.Component {
1250
1376
  useBlockContent(this.state.slot);
1251
1377
  }
1252
1378
  }
1253
- HighlightBoxComponent.defaultTypes = ['❤️', '💡', '📌', '✅', '❎', '👍', '🎉', '🚫', '❗'];
1254
- HighlightBoxComponent.componentName = 'HighlightBoxComponent';
1255
- HighlightBoxComponent.type = core$1.ContentType.BlockComponent;
1379
+ Object.defineProperty(HighlightBoxComponent, "defaultTypes", {
1380
+ enumerable: true,
1381
+ configurable: true,
1382
+ writable: true,
1383
+ value: ['❤️', '💡', '📌', '✅', '❎', '👍', '🎉', '🚫', '❗']
1384
+ });
1385
+ Object.defineProperty(HighlightBoxComponent, "componentName", {
1386
+ enumerable: true,
1387
+ configurable: true,
1388
+ writable: true,
1389
+ value: 'HighlightBoxComponent'
1390
+ });
1391
+ Object.defineProperty(HighlightBoxComponent, "type", {
1392
+ enumerable: true,
1393
+ configurable: true,
1394
+ writable: true,
1395
+ value: core$1.ContentType.BlockComponent
1396
+ });
1256
1397
  function HighlightBoxView(props) {
1257
1398
  const readonly = useReadonly();
1258
1399
  const output = useOutput();
@@ -1433,8 +1574,18 @@ class TimelineComponent extends core$1.Component {
1433
1574
  return false;
1434
1575
  }
1435
1576
  }
1436
- TimelineComponent.componentName = 'TimelineComponent';
1437
- TimelineComponent.type = core$1.ContentType.BlockComponent;
1577
+ Object.defineProperty(TimelineComponent, "componentName", {
1578
+ enumerable: true,
1579
+ configurable: true,
1580
+ writable: true,
1581
+ value: 'TimelineComponent'
1582
+ });
1583
+ Object.defineProperty(TimelineComponent, "type", {
1584
+ enumerable: true,
1585
+ configurable: true,
1586
+ writable: true,
1587
+ value: core$1.ContentType.BlockComponent
1588
+ });
1438
1589
 
1439
1590
  function createStepItem(textbus) {
1440
1591
  const slot = new core$1.Slot([
@@ -1478,8 +1629,18 @@ class StepComponent extends core$1.Component {
1478
1629
  return false;
1479
1630
  }
1480
1631
  }
1481
- StepComponent.componentName = 'StepComponent';
1482
- StepComponent.type = core$1.ContentType.BlockComponent;
1632
+ Object.defineProperty(StepComponent, "componentName", {
1633
+ enumerable: true,
1634
+ configurable: true,
1635
+ writable: true,
1636
+ value: 'StepComponent'
1637
+ });
1638
+ Object.defineProperty(StepComponent, "type", {
1639
+ enumerable: true,
1640
+ configurable: true,
1641
+ writable: true,
1642
+ value: core$1.ContentType.BlockComponent
1643
+ });
1483
1644
 
1484
1645
  class ParagraphComponent extends core$1.Component {
1485
1646
  static fromJSON(textbus, json) {
@@ -1525,8 +1686,18 @@ class ParagraphComponent extends core$1.Component {
1525
1686
  });
1526
1687
  }
1527
1688
  }
1528
- ParagraphComponent.componentName = 'ParagraphComponent';
1529
- ParagraphComponent.type = core$1.ContentType.BlockComponent;
1689
+ Object.defineProperty(ParagraphComponent, "componentName", {
1690
+ enumerable: true,
1691
+ configurable: true,
1692
+ writable: true,
1693
+ value: 'ParagraphComponent'
1694
+ });
1695
+ Object.defineProperty(ParagraphComponent, "type", {
1696
+ enumerable: true,
1697
+ configurable: true,
1698
+ writable: true,
1699
+ value: core$1.ContentType.BlockComponent
1700
+ });
1530
1701
  function ParagraphView(props) {
1531
1702
  const readonly = useReadonly();
1532
1703
  const output = useOutput();
@@ -1710,27 +1881,42 @@ function createCodeSlot() {
1710
1881
  class SourceCodeComponent extends core$1.Component {
1711
1882
  constructor() {
1712
1883
  super(...arguments);
1713
- this.focus = new core$1.BehaviorSubject(false);
1714
- this.cancelEmphasize = () => {
1715
- const selection = this.textbus.get(core$1.Selection);
1716
- const slots = this.state.slots;
1717
- const { startSlot, endSlot } = selection;
1718
- let startIndex = slots.findIndex(i => i.slot === startSlot);
1719
- const endIndex = slots.findIndex(i => i.slot === endSlot) + 1;
1720
- for (; startIndex < endIndex; startIndex++) {
1721
- slots[startIndex].emphasize = false;
1884
+ Object.defineProperty(this, "focus", {
1885
+ enumerable: true,
1886
+ configurable: true,
1887
+ writable: true,
1888
+ value: new core$1.BehaviorSubject(false)
1889
+ });
1890
+ Object.defineProperty(this, "cancelEmphasize", {
1891
+ enumerable: true,
1892
+ configurable: true,
1893
+ writable: true,
1894
+ value: () => {
1895
+ const selection = this.textbus.get(core$1.Selection);
1896
+ const slots = this.state.slots;
1897
+ const { startSlot, endSlot } = selection;
1898
+ let startIndex = slots.findIndex(i => i.slot === startSlot);
1899
+ const endIndex = slots.findIndex(i => i.slot === endSlot) + 1;
1900
+ for (; startIndex < endIndex; startIndex++) {
1901
+ slots[startIndex].emphasize = false;
1902
+ }
1722
1903
  }
1723
- };
1724
- this.emphasize = () => {
1725
- const selection = this.textbus.get(core$1.Selection);
1726
- const slots = this.state.slots;
1727
- const { startSlot, endSlot } = selection;
1728
- let startIndex = slots.findIndex(i => i.slot === startSlot);
1729
- const endIndex = slots.findIndex(i => i.slot === endSlot) + 1;
1730
- for (; startIndex < endIndex; startIndex++) {
1731
- slots[startIndex].emphasize = true;
1904
+ });
1905
+ Object.defineProperty(this, "emphasize", {
1906
+ enumerable: true,
1907
+ configurable: true,
1908
+ writable: true,
1909
+ value: () => {
1910
+ const selection = this.textbus.get(core$1.Selection);
1911
+ const slots = this.state.slots;
1912
+ const { startSlot, endSlot } = selection;
1913
+ let startIndex = slots.findIndex(i => i.slot === startSlot);
1914
+ const endIndex = slots.findIndex(i => i.slot === endSlot) + 1;
1915
+ for (; startIndex < endIndex; startIndex++) {
1916
+ slots[startIndex].emphasize = true;
1917
+ }
1732
1918
  }
1733
- };
1919
+ });
1734
1920
  }
1735
1921
  static fromJSON(textbus, json) {
1736
1922
  const registry = textbus.get(core$1.Registry);
@@ -1920,56 +2106,71 @@ class SourceCodeComponent extends core$1.Component {
1920
2106
  return false;
1921
2107
  }
1922
2108
  }
1923
- SourceCodeComponent.type = core$1.ContentType.BlockComponent;
1924
- SourceCodeComponent.componentName = 'SourceCodeComponent';
1925
- SourceCodeComponent.zenCoding = {
1926
- key: ['Enter', ' '],
1927
- match(c, textbus) {
1928
- const selection = textbus.get(core$1.Selection);
1929
- if (selection.commonAncestorComponent instanceof ParagraphComponent) {
1930
- const matchString = languageList.map(i => i.label || i.value).concat('js', 'ts').join('|').replace(/\+/, '\\+');
1931
- const reg = new RegExp(`^\`\`\`(${matchString})$`, 'i');
1932
- return reg.test(c);
1933
- }
1934
- return false;
1935
- },
1936
- createState(content) {
1937
- const matchString = content.replace(/`/g, '').replace(/\+/, '\\+');
1938
- for (const item of languageList) {
1939
- const reg = new RegExp(`^${matchString}$`, 'i');
1940
- if (reg.test(item.label || item.value)) {
2109
+ Object.defineProperty(SourceCodeComponent, "type", {
2110
+ enumerable: true,
2111
+ configurable: true,
2112
+ writable: true,
2113
+ value: core$1.ContentType.BlockComponent
2114
+ });
2115
+ Object.defineProperty(SourceCodeComponent, "componentName", {
2116
+ enumerable: true,
2117
+ configurable: true,
2118
+ writable: true,
2119
+ value: 'SourceCodeComponent'
2120
+ });
2121
+ Object.defineProperty(SourceCodeComponent, "zenCoding", {
2122
+ enumerable: true,
2123
+ configurable: true,
2124
+ writable: true,
2125
+ value: {
2126
+ key: ['Enter', ' '],
2127
+ match(c, textbus) {
2128
+ const selection = textbus.get(core$1.Selection);
2129
+ if (selection.commonAncestorComponent instanceof ParagraphComponent) {
2130
+ const matchString = languageList.map(i => i.label || i.value).concat('js', 'ts').join('|').replace(/\+/, '\\+');
2131
+ const reg = new RegExp(`^\`\`\`(${matchString})$`, 'i');
2132
+ return reg.test(c);
2133
+ }
2134
+ return false;
2135
+ },
2136
+ createState(content) {
2137
+ const matchString = content.replace(/`/g, '').replace(/\+/, '\\+');
2138
+ for (const item of languageList) {
2139
+ const reg = new RegExp(`^${matchString}$`, 'i');
2140
+ if (reg.test(item.label || item.value)) {
2141
+ return {
2142
+ lang: item.value,
2143
+ theme: '',
2144
+ lineNumber: true,
2145
+ slots: [createCodeSlot()]
2146
+ };
2147
+ }
2148
+ }
2149
+ if (/^js$/i.test(matchString)) {
1941
2150
  return {
1942
- lang: item.value,
2151
+ lang: 'JavaScript',
2152
+ theme: '',
2153
+ lineNumber: true,
2154
+ slots: [createCodeSlot()]
2155
+ };
2156
+ }
2157
+ if (/^ts$/i.test(matchString)) {
2158
+ return {
2159
+ lang: 'TypeScript',
1943
2160
  theme: '',
1944
2161
  lineNumber: true,
1945
2162
  slots: [createCodeSlot()]
1946
2163
  };
1947
2164
  }
1948
- }
1949
- if (/^js$/i.test(matchString)) {
1950
- return {
1951
- lang: 'JavaScript',
1952
- theme: '',
1953
- lineNumber: true,
1954
- slots: [createCodeSlot()]
1955
- };
1956
- }
1957
- if (/^ts$/i.test(matchString)) {
1958
2165
  return {
1959
- lang: 'TypeScript',
2166
+ lang: '',
1960
2167
  theme: '',
1961
2168
  lineNumber: true,
1962
2169
  slots: [createCodeSlot()]
1963
2170
  };
1964
2171
  }
1965
- return {
1966
- lang: '',
1967
- theme: '',
1968
- lineNumber: true,
1969
- slots: [createCodeSlot()]
1970
- };
1971
2172
  }
1972
- };
2173
+ });
1973
2174
  function SourceCodeView(props) {
1974
2175
  const adapter = core.inject(platformBrowser.DomAdapter);
1975
2176
  const isFocus = core.createSignal(false);
@@ -2247,8 +2448,18 @@ class ImageComponent extends core$1.Component {
2247
2448
  return [];
2248
2449
  }
2249
2450
  }
2250
- ImageComponent.type = core$1.ContentType.InlineComponent;
2251
- ImageComponent.componentName = 'ImageComponent';
2451
+ Object.defineProperty(ImageComponent, "type", {
2452
+ enumerable: true,
2453
+ configurable: true,
2454
+ writable: true,
2455
+ value: core$1.ContentType.InlineComponent
2456
+ });
2457
+ Object.defineProperty(ImageComponent, "componentName", {
2458
+ enumerable: true,
2459
+ configurable: true,
2460
+ writable: true,
2461
+ value: 'ImageComponent'
2462
+ });
2252
2463
  function ImageView(props) {
2253
2464
  const { name, state } = props.component;
2254
2465
  const imageRef = core.createRef();
@@ -2289,8 +2500,18 @@ class VideoComponent extends core$1.Component {
2289
2500
  return [];
2290
2501
  }
2291
2502
  }
2292
- VideoComponent.type = core$1.ContentType.InlineComponent;
2293
- VideoComponent.componentName = 'VideoComponent';
2503
+ Object.defineProperty(VideoComponent, "type", {
2504
+ enumerable: true,
2505
+ configurable: true,
2506
+ writable: true,
2507
+ value: core$1.ContentType.InlineComponent
2508
+ });
2509
+ Object.defineProperty(VideoComponent, "componentName", {
2510
+ enumerable: true,
2511
+ configurable: true,
2512
+ writable: true,
2513
+ value: 'VideoComponent'
2514
+ });
2294
2515
  function VideoView(props) {
2295
2516
  const { name, state } = props.component;
2296
2517
  const videoRef = core.createRef();
@@ -2325,8 +2546,30 @@ const videoComponentLoader = {
2325
2546
 
2326
2547
  let ToolService = class ToolService {
2327
2548
  constructor(selection, controller) {
2328
- this.selection = selection;
2329
- this.controller = controller;
2549
+ Object.defineProperty(this, "selection", {
2550
+ enumerable: true,
2551
+ configurable: true,
2552
+ writable: true,
2553
+ value: selection
2554
+ });
2555
+ Object.defineProperty(this, "controller", {
2556
+ enumerable: true,
2557
+ configurable: true,
2558
+ writable: true,
2559
+ value: controller
2560
+ });
2561
+ Object.defineProperty(this, "state", {
2562
+ enumerable: true,
2563
+ configurable: true,
2564
+ writable: true,
2565
+ value: void 0
2566
+ });
2567
+ Object.defineProperty(this, "sub", {
2568
+ enumerable: true,
2569
+ configurable: true,
2570
+ writable: true,
2571
+ value: void 0
2572
+ });
2330
2573
  const [state, updateState] = hooks.useProduce({
2331
2574
  inSourceCode: false,
2332
2575
  readonly: controller.readonly,
@@ -2473,10 +2716,30 @@ function AttrTool(props) {
2473
2716
 
2474
2717
  class Rectangle {
2475
2718
  constructor(x1, y1, x2, y2) {
2476
- this.x1 = x1;
2477
- this.y1 = y1;
2478
- this.x2 = x2;
2479
- this.y2 = y2;
2719
+ Object.defineProperty(this, "x1", {
2720
+ enumerable: true,
2721
+ configurable: true,
2722
+ writable: true,
2723
+ value: x1
2724
+ });
2725
+ Object.defineProperty(this, "y1", {
2726
+ enumerable: true,
2727
+ configurable: true,
2728
+ writable: true,
2729
+ value: y1
2730
+ });
2731
+ Object.defineProperty(this, "x2", {
2732
+ enumerable: true,
2733
+ configurable: true,
2734
+ writable: true,
2735
+ value: x2
2736
+ });
2737
+ Object.defineProperty(this, "y2", {
2738
+ enumerable: true,
2739
+ configurable: true,
2740
+ writable: true,
2741
+ value: y2
2742
+ });
2480
2743
  }
2481
2744
  intersects(other) {
2482
2745
  return this.x1 < other.x2 && this.x2 > other.x1 && this.y1 < other.y2 && this.y2 > other.y1;
@@ -2597,12 +2860,42 @@ class TableComponent extends core$1.Component {
2597
2860
  })
2598
2861
  }) {
2599
2862
  super(textbus, state);
2600
- this.selection = this.textbus.get(core$1.Selection);
2601
- this.commander = this.textbus.get(core$1.Commander);
2602
- this.focus = new core$1.Subject();
2603
- this.tableSelection = core.createSignal(null);
2604
- this.ignoreSelectionChanges = false;
2605
- this.normalizedData = [];
2863
+ Object.defineProperty(this, "selection", {
2864
+ enumerable: true,
2865
+ configurable: true,
2866
+ writable: true,
2867
+ value: this.textbus.get(core$1.Selection)
2868
+ });
2869
+ Object.defineProperty(this, "commander", {
2870
+ enumerable: true,
2871
+ configurable: true,
2872
+ writable: true,
2873
+ value: this.textbus.get(core$1.Commander)
2874
+ });
2875
+ Object.defineProperty(this, "focus", {
2876
+ enumerable: true,
2877
+ configurable: true,
2878
+ writable: true,
2879
+ value: new core$1.Subject()
2880
+ });
2881
+ Object.defineProperty(this, "tableSelection", {
2882
+ enumerable: true,
2883
+ configurable: true,
2884
+ writable: true,
2885
+ value: core.createSignal(null)
2886
+ });
2887
+ Object.defineProperty(this, "ignoreSelectionChanges", {
2888
+ enumerable: true,
2889
+ configurable: true,
2890
+ writable: true,
2891
+ value: false
2892
+ });
2893
+ Object.defineProperty(this, "normalizedData", {
2894
+ enumerable: true,
2895
+ configurable: true,
2896
+ writable: true,
2897
+ value: []
2898
+ });
2606
2899
  }
2607
2900
  getSlots() {
2608
2901
  return this.normalizedData.map(item => {
@@ -3014,8 +3307,18 @@ class TableComponent extends core$1.Component {
3014
3307
  });
3015
3308
  }
3016
3309
  }
3017
- TableComponent.componentName = 'TableComponent';
3018
- TableComponent.type = core$1.ContentType.BlockComponent;
3310
+ Object.defineProperty(TableComponent, "componentName", {
3311
+ enumerable: true,
3312
+ configurable: true,
3313
+ writable: true,
3314
+ value: 'TableComponent'
3315
+ });
3316
+ Object.defineProperty(TableComponent, "type", {
3317
+ enumerable: true,
3318
+ configurable: true,
3319
+ writable: true,
3320
+ value: core$1.ContentType.BlockComponent
3321
+ });
3019
3322
 
3020
3323
  const strikeThroughFormatter = new core$1.Formatter('strike', {
3021
3324
  columned: true,
@@ -3124,34 +3427,49 @@ class TodolistComponent extends core$1.Component {
3124
3427
  });
3125
3428
  }
3126
3429
  }
3127
- TodolistComponent.type = core$1.ContentType.BlockComponent;
3128
- TodolistComponent.componentName = 'TodoListComponent';
3129
- TodolistComponent.zenCoding = {
3130
- match(content, textbus) {
3131
- const selection = textbus.get(core$1.Selection);
3132
- if (selection.commonAncestorComponent instanceof ParagraphComponent) {
3133
- return /^\[(x|\s)?\]$/.test(content);
3134
- }
3135
- return false;
3136
- },
3137
- key: ' ',
3138
- createState(content, textbus) {
3139
- const selection = textbus.get(core$1.Selection);
3140
- const commonAncestorSlot = selection.commonAncestorSlot;
3141
- const slot = new core$1.Slot([
3142
- core$1.ContentType.InlineComponent,
3143
- core$1.ContentType.Text
3144
- ]);
3145
- if (commonAncestorSlot === null || commonAncestorSlot === void 0 ? void 0 : commonAncestorSlot.hasAttribute(textIndentAttr)) {
3146
- slot.setAttribute(textIndentAttr, commonAncestorSlot.getAttribute(textIndentAttr));
3430
+ Object.defineProperty(TodolistComponent, "type", {
3431
+ enumerable: true,
3432
+ configurable: true,
3433
+ writable: true,
3434
+ value: core$1.ContentType.BlockComponent
3435
+ });
3436
+ Object.defineProperty(TodolistComponent, "componentName", {
3437
+ enumerable: true,
3438
+ configurable: true,
3439
+ writable: true,
3440
+ value: 'TodoListComponent'
3441
+ });
3442
+ Object.defineProperty(TodolistComponent, "zenCoding", {
3443
+ enumerable: true,
3444
+ configurable: true,
3445
+ writable: true,
3446
+ value: {
3447
+ match(content, textbus) {
3448
+ const selection = textbus.get(core$1.Selection);
3449
+ if (selection.commonAncestorComponent instanceof ParagraphComponent) {
3450
+ return /^\[(x|\s)?\]$/.test(content);
3451
+ }
3452
+ return false;
3453
+ },
3454
+ key: ' ',
3455
+ createState(content, textbus) {
3456
+ const selection = textbus.get(core$1.Selection);
3457
+ const commonAncestorSlot = selection.commonAncestorSlot;
3458
+ const slot = new core$1.Slot([
3459
+ core$1.ContentType.InlineComponent,
3460
+ core$1.ContentType.Text
3461
+ ]);
3462
+ if (commonAncestorSlot === null || commonAncestorSlot === void 0 ? void 0 : commonAncestorSlot.hasAttribute(textIndentAttr)) {
3463
+ slot.setAttribute(textIndentAttr, commonAncestorSlot.getAttribute(textIndentAttr));
3464
+ }
3465
+ const isChecked = content.charAt(1) === 'x';
3466
+ return {
3467
+ checked: isChecked,
3468
+ slot
3469
+ };
3147
3470
  }
3148
- const isChecked = content.charAt(1) === 'x';
3149
- return {
3150
- checked: isChecked,
3151
- slot
3152
- };
3153
3471
  }
3154
- };
3472
+ });
3155
3473
  function TodolistView(props) {
3156
3474
  const component = props.component;
3157
3475
  const state = component.state;
@@ -3338,34 +3656,49 @@ class ListComponent extends core$1.Component {
3338
3656
  });
3339
3657
  }
3340
3658
  }
3341
- ListComponent.componentName = 'ListComponent';
3342
- ListComponent.type = core$1.ContentType.BlockComponent;
3343
- ListComponent.zenCoding = {
3344
- key: ' ',
3345
- match(content, textbus) {
3346
- const selection = textbus.get(core$1.Selection);
3347
- if (selection.commonAncestorComponent instanceof ParagraphComponent) {
3348
- return /^([1-9]\.|[+*-])$/.test(content);
3349
- }
3350
- return false;
3351
- },
3352
- createState(content, textbus) {
3353
- const selection = textbus.get(core$1.Selection);
3354
- const commonAncestorSlot = selection.commonAncestorSlot;
3355
- const slot = new core$1.Slot([
3356
- core$1.ContentType.InlineComponent,
3357
- core$1.ContentType.Text
3358
- ]);
3359
- if (commonAncestorSlot === null || commonAncestorSlot === void 0 ? void 0 : commonAncestorSlot.hasAttribute(textIndentAttr)) {
3360
- slot.setAttribute(textIndentAttr, commonAncestorSlot.getAttribute(textIndentAttr));
3659
+ Object.defineProperty(ListComponent, "componentName", {
3660
+ enumerable: true,
3661
+ configurable: true,
3662
+ writable: true,
3663
+ value: 'ListComponent'
3664
+ });
3665
+ Object.defineProperty(ListComponent, "type", {
3666
+ enumerable: true,
3667
+ configurable: true,
3668
+ writable: true,
3669
+ value: core$1.ContentType.BlockComponent
3670
+ });
3671
+ Object.defineProperty(ListComponent, "zenCoding", {
3672
+ enumerable: true,
3673
+ configurable: true,
3674
+ writable: true,
3675
+ value: {
3676
+ key: ' ',
3677
+ match(content, textbus) {
3678
+ const selection = textbus.get(core$1.Selection);
3679
+ if (selection.commonAncestorComponent instanceof ParagraphComponent) {
3680
+ return /^([1-9]\.|[+*-])$/.test(content);
3681
+ }
3682
+ return false;
3683
+ },
3684
+ createState(content, textbus) {
3685
+ const selection = textbus.get(core$1.Selection);
3686
+ const commonAncestorSlot = selection.commonAncestorSlot;
3687
+ const slot = new core$1.Slot([
3688
+ core$1.ContentType.InlineComponent,
3689
+ core$1.ContentType.Text
3690
+ ]);
3691
+ if (commonAncestorSlot === null || commonAncestorSlot === void 0 ? void 0 : commonAncestorSlot.hasAttribute(textIndentAttr)) {
3692
+ slot.setAttribute(textIndentAttr, commonAncestorSlot.getAttribute(textIndentAttr));
3693
+ }
3694
+ return {
3695
+ type: /[-+*]/.test(content) ? 'UnorderedList' : 'OrderedList',
3696
+ reorder: true,
3697
+ slot
3698
+ };
3361
3699
  }
3362
- return {
3363
- type: /[-+*]/.test(content) ? 'UnorderedList' : 'OrderedList',
3364
- reorder: true,
3365
- slot
3366
- };
3367
3700
  }
3368
- };
3701
+ });
3369
3702
  const step = 26;
3370
3703
  const chars = Array.from({ length: step }).map((_, index) => String.fromCharCode(96 + index + 1));
3371
3704
  function numberToLetter(num) {
@@ -4344,7 +4677,18 @@ class KatexEditor extends core$1.Textbus {
4344
4677
  ],
4345
4678
  imports: [browserModule]
4346
4679
  });
4347
- this.onValueChange = new core$1.Subject();
4680
+ Object.defineProperty(this, "host", {
4681
+ enumerable: true,
4682
+ configurable: true,
4683
+ writable: true,
4684
+ value: void 0
4685
+ });
4686
+ Object.defineProperty(this, "onValueChange", {
4687
+ enumerable: true,
4688
+ configurable: true,
4689
+ writable: true,
4690
+ value: new core$1.Subject()
4691
+ });
4348
4692
  }
4349
4693
  mount(host, code) {
4350
4694
  this.host = host;
@@ -4391,8 +4735,18 @@ class KatexComponent extends core$1.Component {
4391
4735
  return [];
4392
4736
  }
4393
4737
  }
4394
- KatexComponent.componentName = 'KatexComponent';
4395
- KatexComponent.type = core$1.ContentType.InlineComponent;
4738
+ Object.defineProperty(KatexComponent, "componentName", {
4739
+ enumerable: true,
4740
+ configurable: true,
4741
+ writable: true,
4742
+ value: 'KatexComponent'
4743
+ });
4744
+ Object.defineProperty(KatexComponent, "type", {
4745
+ enumerable: true,
4746
+ configurable: true,
4747
+ writable: true,
4748
+ value: core$1.ContentType.InlineComponent
4749
+ });
4396
4750
  function domToVDom(el) {
4397
4751
  const attrs = {};
4398
4752
  el.getAttributeNames().forEach(key => {
@@ -4681,9 +5035,24 @@ var scopedId$c = "vf-e74208";
4681
5035
 
4682
5036
  exports.EditorService = class EditorService {
4683
5037
  constructor() {
4684
- this.hideInlineToolbar = false;
4685
- this.canShowLeftToolbar = true;
4686
- this.onLeftToolbarCanVisibleChange = new core$1.Subject();
5038
+ Object.defineProperty(this, "hideInlineToolbar", {
5039
+ enumerable: true,
5040
+ configurable: true,
5041
+ writable: true,
5042
+ value: false
5043
+ });
5044
+ Object.defineProperty(this, "canShowLeftToolbar", {
5045
+ enumerable: true,
5046
+ configurable: true,
5047
+ writable: true,
5048
+ value: true
5049
+ });
5050
+ Object.defineProperty(this, "onLeftToolbarCanVisibleChange", {
5051
+ enumerable: true,
5052
+ configurable: true,
5053
+ writable: true,
5054
+ value: new core$1.Subject()
5055
+ });
4687
5056
  }
4688
5057
  changeLeftToolbarVisible(b) {
4689
5058
  this.canShowLeftToolbar = b;
@@ -5558,7 +5927,12 @@ const LeftToolbar = core.withAnnotation({
5558
5927
 
5559
5928
  class LeftToolbarPlugin {
5560
5929
  constructor() {
5561
- this.app = null;
5930
+ Object.defineProperty(this, "app", {
5931
+ enumerable: true,
5932
+ configurable: true,
5933
+ writable: true,
5934
+ value: null
5935
+ });
5562
5936
  }
5563
5937
  setup(injector) {
5564
5938
  const App = function () {
@@ -5834,8 +6208,18 @@ const InlineToolbar = core.withAnnotation({
5834
6208
 
5835
6209
  class InlineToolbarPlugin {
5836
6210
  constructor(config = {}) {
5837
- this.config = config;
5838
- this.app = null;
6211
+ Object.defineProperty(this, "config", {
6212
+ enumerable: true,
6213
+ configurable: true,
6214
+ writable: true,
6215
+ value: config
6216
+ });
6217
+ Object.defineProperty(this, "app", {
6218
+ enumerable: true,
6219
+ configurable: true,
6220
+ writable: true,
6221
+ value: null
6222
+ });
5839
6223
  }
5840
6224
  setup(injector) {
5841
6225
  const App = () => {
@@ -5882,9 +6266,24 @@ const StaticToolbar = core.withAnnotation({
5882
6266
 
5883
6267
  class StaticToolbarPlugin {
5884
6268
  constructor(options) {
5885
- this.options = options;
5886
- this.app = null;
5887
- this.container = null;
6269
+ Object.defineProperty(this, "options", {
6270
+ enumerable: true,
6271
+ configurable: true,
6272
+ writable: true,
6273
+ value: options
6274
+ });
6275
+ Object.defineProperty(this, "app", {
6276
+ enumerable: true,
6277
+ configurable: true,
6278
+ writable: true,
6279
+ value: null
6280
+ });
6281
+ Object.defineProperty(this, "container", {
6282
+ enumerable: true,
6283
+ configurable: true,
6284
+ writable: true,
6285
+ value: null
6286
+ });
5888
6287
  }
5889
6288
  setup(injector) {
5890
6289
  const container = document.createElement('div');
@@ -5964,9 +6363,24 @@ const SuspensionToolbar = core.withAnnotation({
5964
6363
 
5965
6364
  class SuspensionToolbarPlugin {
5966
6365
  constructor(options = {}) {
5967
- this.options = options;
5968
- this.app = null;
5969
- this.container = null;
6366
+ Object.defineProperty(this, "options", {
6367
+ enumerable: true,
6368
+ configurable: true,
6369
+ writable: true,
6370
+ value: options
6371
+ });
6372
+ Object.defineProperty(this, "app", {
6373
+ enumerable: true,
6374
+ configurable: true,
6375
+ writable: true,
6376
+ value: null
6377
+ });
6378
+ Object.defineProperty(this, "container", {
6379
+ enumerable: true,
6380
+ configurable: true,
6381
+ writable: true,
6382
+ value: null
6383
+ });
5970
6384
  }
5971
6385
  setup(injector) {
5972
6386
  const host = injector.get(platformBrowser.VIEW_CONTAINER);
@@ -5987,10 +6401,30 @@ class SuspensionToolbarPlugin {
5987
6401
 
5988
6402
  class Matcher {
5989
6403
  constructor(target, rule) {
5990
- this.target = target;
5991
- this.rule = rule;
5992
- this.validators = [];
5993
- this.excludeValidators = [];
6404
+ Object.defineProperty(this, "target", {
6405
+ enumerable: true,
6406
+ configurable: true,
6407
+ writable: true,
6408
+ value: target
6409
+ });
6410
+ Object.defineProperty(this, "rule", {
6411
+ enumerable: true,
6412
+ configurable: true,
6413
+ writable: true,
6414
+ value: rule
6415
+ });
6416
+ Object.defineProperty(this, "validators", {
6417
+ enumerable: true,
6418
+ configurable: true,
6419
+ writable: true,
6420
+ value: []
6421
+ });
6422
+ Object.defineProperty(this, "excludeValidators", {
6423
+ enumerable: true,
6424
+ configurable: true,
6425
+ writable: true,
6426
+ value: []
6427
+ });
5994
6428
  if (rule.tags) {
5995
6429
  this.validators.push(this.makeTagsMatcher(rule.tags));
5996
6430
  }
@@ -6131,11 +6565,36 @@ class AtComponent extends core$1.Component {
6131
6565
  state.slot = new core$1.Slot([core$1.ContentType.Text]);
6132
6566
  }
6133
6567
  super(textbus, state);
6134
- this.focus = new core$1.Subject();
6135
- this.members = core.createSignal([]);
6136
- this.selectedIndex = core.createSignal(0);
6137
- this.selection = this.textbus.get(core$1.Selection);
6138
- this.organization = this.textbus.get(Organization);
6568
+ Object.defineProperty(this, "focus", {
6569
+ enumerable: true,
6570
+ configurable: true,
6571
+ writable: true,
6572
+ value: new core$1.Subject()
6573
+ });
6574
+ Object.defineProperty(this, "members", {
6575
+ enumerable: true,
6576
+ configurable: true,
6577
+ writable: true,
6578
+ value: core.createSignal([])
6579
+ });
6580
+ Object.defineProperty(this, "selectedIndex", {
6581
+ enumerable: true,
6582
+ configurable: true,
6583
+ writable: true,
6584
+ value: core.createSignal(0)
6585
+ });
6586
+ Object.defineProperty(this, "selection", {
6587
+ enumerable: true,
6588
+ configurable: true,
6589
+ writable: true,
6590
+ value: this.textbus.get(core$1.Selection)
6591
+ });
6592
+ Object.defineProperty(this, "organization", {
6593
+ enumerable: true,
6594
+ configurable: true,
6595
+ writable: true,
6596
+ value: this.textbus.get(Organization)
6597
+ });
6139
6598
  }
6140
6599
  getSlots() {
6141
6600
  if (this.state.userInfo) {
@@ -6233,8 +6692,18 @@ class AtComponent extends core$1.Component {
6233
6692
  this.selection.selectComponentEnd(this);
6234
6693
  }
6235
6694
  }
6236
- AtComponent.componentName = 'AtComponent';
6237
- AtComponent.type = core$1.ContentType.InlineComponent;
6695
+ Object.defineProperty(AtComponent, "componentName", {
6696
+ enumerable: true,
6697
+ configurable: true,
6698
+ writable: true,
6699
+ value: 'AtComponent'
6700
+ });
6701
+ Object.defineProperty(AtComponent, "type", {
6702
+ enumerable: true,
6703
+ configurable: true,
6704
+ writable: true,
6705
+ value: core$1.ContentType.InlineComponent
6706
+ });
6238
6707
 
6239
6708
  function AtComponentView(props) {
6240
6709
  const dropdownRef = core.createRef();
@@ -6315,7 +6784,12 @@ const atComponentLoader = {
6315
6784
  class RootComponent extends core$1.Component {
6316
6785
  constructor() {
6317
6786
  super(...arguments);
6318
- this.onCompositionStart = new core$1.Subject();
6787
+ Object.defineProperty(this, "onCompositionStart", {
6788
+ enumerable: true,
6789
+ configurable: true,
6790
+ writable: true,
6791
+ value: new core$1.Subject()
6792
+ });
6319
6793
  }
6320
6794
  static fromJSON(textbus, json) {
6321
6795
  const content = textbus.get(core$1.Registry).createSlot(json.content);
@@ -6353,8 +6827,18 @@ class RootComponent extends core$1.Component {
6353
6827
  selection.setPosition(newParagraph.state.slot, 0);
6354
6828
  }
6355
6829
  }
6356
- RootComponent.componentName = 'RootComponent';
6357
- RootComponent.type = core$1.ContentType.BlockComponent;
6830
+ Object.defineProperty(RootComponent, "componentName", {
6831
+ enumerable: true,
6832
+ configurable: true,
6833
+ writable: true,
6834
+ value: 'RootComponent'
6835
+ });
6836
+ Object.defineProperty(RootComponent, "type", {
6837
+ enumerable: true,
6838
+ configurable: true,
6839
+ writable: true,
6840
+ value: core$1.ContentType.BlockComponent
6841
+ });
6358
6842
  function RootView(props) {
6359
6843
  const ref = core.createDynamicRef(node => {
6360
6844
  const sub = props.component.onCompositionStart.subscribe(() => {
@@ -6407,11 +6891,26 @@ var scopedId$5 = "vf-681de2";
6407
6891
 
6408
6892
  let TableService = class TableService {
6409
6893
  constructor() {
6410
- this.onInsertRowBefore = new core$1.Subject();
6411
- this.onInsertColumnBefore = new core$1.Subject();
6894
+ Object.defineProperty(this, "onInsertRowBefore", {
6895
+ enumerable: true,
6896
+ configurable: true,
6897
+ writable: true,
6898
+ value: new core$1.Subject()
6899
+ });
6900
+ Object.defineProperty(this, "onInsertColumnBefore", {
6901
+ enumerable: true,
6902
+ configurable: true,
6903
+ writable: true,
6904
+ value: new core$1.Subject()
6905
+ });
6412
6906
  // onSelectColumns = new Subject<{ start: number, end: number } | null>()
6413
6907
  // onSelectRows = new Subject<{ start: number, end: number } | null>()
6414
- this.onScroll = new core$1.Subject();
6908
+ Object.defineProperty(this, "onScroll", {
6909
+ enumerable: true,
6910
+ configurable: true,
6911
+ writable: true,
6912
+ value: new core$1.Subject()
6913
+ });
6415
6914
  }
6416
6915
  };
6417
6916
  TableService = __decorate([
@@ -7030,7 +7529,9 @@ const TableComponentView = core.withAnnotation({
7030
7529
  rowMapping.set(row.row, Math.random());
7031
7530
  });
7032
7531
  if (readonly() || output()) {
7033
- return (jsxRuntime.jsx("div", { class: "xnote-table", "data-component": props.component.name, "data-layout-width": `[${state.columnsConfig.join(',')}]`, children: jsxRuntime.jsx("div", { class: "xnote-table-inner", ref: props.rootRef, children: jsxRuntime.jsx("div", { class: "xnote-table-container", children: jsxRuntime.jsxs("table", { class: [
7532
+ return (jsxRuntime.jsx("div", { class: "xnote-table", "data-component": props.component.name, "data-layout-width": `[${state.columnsConfig.join(',')}]`, children: jsxRuntime.jsx("div", { class: "xnote-table-inner", ref: props.rootRef, children: jsxRuntime.jsx("div", { class: "xnote-table-container", style: {
7533
+ overflow: 'auto'
7534
+ }, children: jsxRuntime.jsxs("table", { class: [
7034
7535
  'xnote-table-content',
7035
7536
  {
7036
7537
  'hide-selection': props.component.tableSelection()
@@ -7084,6 +7585,9 @@ const tableComponentLoader = {
7084
7585
  let content = element;
7085
7586
  if (element.tagName === 'DIV') {
7086
7587
  content = element.querySelector('.xnote-table-content');
7588
+ if (!content) {
7589
+ return;
7590
+ }
7087
7591
  }
7088
7592
  const { tHead, tBodies, tFoot } = content;
7089
7593
  const headers = [];
@@ -7191,8 +7695,18 @@ function findFocusCell(table, slot) {
7191
7695
  let TableSelectionAwarenessDelegate = class TableSelectionAwarenessDelegate extends platformBrowser.CollaborateSelectionAwarenessDelegate {
7192
7696
  constructor(domAdapter, selection) {
7193
7697
  super();
7194
- this.domAdapter = domAdapter;
7195
- this.selection = selection;
7698
+ Object.defineProperty(this, "domAdapter", {
7699
+ enumerable: true,
7700
+ configurable: true,
7701
+ writable: true,
7702
+ value: domAdapter
7703
+ });
7704
+ Object.defineProperty(this, "selection", {
7705
+ enumerable: true,
7706
+ configurable: true,
7707
+ writable: true,
7708
+ value: selection
7709
+ });
7196
7710
  }
7197
7711
  getRects(abstractSelection, _, data) {
7198
7712
  const { focusSlot, anchorSlot } = abstractSelection;
@@ -7351,10 +7865,36 @@ const stepComponentLoader = {
7351
7865
  class XNoteMessageBus extends collaborate.MessageBus {
7352
7866
  constructor(selection, collaborateCursor, userinfo) {
7353
7867
  super();
7354
- this.selection = selection;
7355
- this.collaborateCursor = collaborateCursor;
7356
- this.userinfo = userinfo;
7357
- this.messageChangeEvent = new core$1.Subject();
7868
+ Object.defineProperty(this, "selection", {
7869
+ enumerable: true,
7870
+ configurable: true,
7871
+ writable: true,
7872
+ value: selection
7873
+ });
7874
+ Object.defineProperty(this, "collaborateCursor", {
7875
+ enumerable: true,
7876
+ configurable: true,
7877
+ writable: true,
7878
+ value: collaborateCursor
7879
+ });
7880
+ Object.defineProperty(this, "userinfo", {
7881
+ enumerable: true,
7882
+ configurable: true,
7883
+ writable: true,
7884
+ value: userinfo
7885
+ });
7886
+ Object.defineProperty(this, "onMessageChange", {
7887
+ enumerable: true,
7888
+ configurable: true,
7889
+ writable: true,
7890
+ value: void 0
7891
+ });
7892
+ Object.defineProperty(this, "messageChangeEvent", {
7893
+ enumerable: true,
7894
+ configurable: true,
7895
+ writable: true,
7896
+ value: new core$1.Subject()
7897
+ });
7358
7898
  this.onMessageChange = this.messageChangeEvent.asObservable();
7359
7899
  }
7360
7900
  get() {
@@ -7555,8 +8095,30 @@ class Editor extends core$1.Textbus {
7555
8095
  registerListShortcut(textbus);
7556
8096
  registerBlockquoteShortcut(textbus);
7557
8097
  } }, editorConfig));
7558
- this.editorConfig = editorConfig;
7559
- this.translator = new platformBrowser$1.OutputTranslator();
8098
+ Object.defineProperty(this, "editorConfig", {
8099
+ enumerable: true,
8100
+ configurable: true,
8101
+ writable: true,
8102
+ value: editorConfig
8103
+ });
8104
+ Object.defineProperty(this, "translator", {
8105
+ enumerable: true,
8106
+ configurable: true,
8107
+ writable: true,
8108
+ value: new platformBrowser$1.OutputTranslator()
8109
+ });
8110
+ Object.defineProperty(this, "host", {
8111
+ enumerable: true,
8112
+ configurable: true,
8113
+ writable: true,
8114
+ value: void 0
8115
+ });
8116
+ Object.defineProperty(this, "vDomAdapter", {
8117
+ enumerable: true,
8118
+ configurable: true,
8119
+ writable: true,
8120
+ value: void 0
8121
+ });
7560
8122
  this.vDomAdapter = vDomAdapter;
7561
8123
  }
7562
8124
  mount(host) {
@@ -7577,7 +8139,9 @@ class Editor extends core$1.Textbus {
7577
8139
  this.guardReady();
7578
8140
  const newModel = this.createModel(content);
7579
8141
  const rootComponent = this.get(core$1.RootComponentRef).component;
7580
- Object.assign(rootComponent.state, newModel.state);
8142
+ const slot = newModel.state.content;
8143
+ newModel.state.content = null;
8144
+ rootComponent.state.content = slot;
7581
8145
  }
7582
8146
  getHTML() {
7583
8147
  return this.translator.transform(this.vDomAdapter.host);