@dao42/d42paas-front 0.7.56 → 0.7.57

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/dist/editor.d.ts CHANGED
@@ -1,644 +1,678 @@
1
- /*!-----------------------------------------------------------
2
- * Copyright (c) dao42. All rights reserved.
3
- * Type definitions for @dao42/d42paas-front
4
- * Released under the MIT license
5
- *-----------------------------------------------------------*/
6
-
7
- import { Extend } from 'schema-utils/declarations/validate';
8
-
9
- /*---------------------------------------------------------------------------------------------
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License. See License.txt in the project root for license information.
12
- *--------------------------------------------------------------------------------------------*/
13
-
14
- export type ComponentType =
15
- | 'Page'
16
- | 'Tree'
17
- | 'Editor'
18
- | 'Console'
19
- | 'Browser'
20
- | 'Shell';
21
-
22
- export type Mode = 'tsdoc' | 'singleFile' | 'IDE';
23
-
24
- export type PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
25
-
26
- export type DockerStatus = 'RUNNING' | 'STOP';
27
-
28
- // export type Replay = 'stop' | 'disabled' | 'pause';
29
- interface MessageType {
30
- /**
31
- * The message type is use to show up the playground status.
32
- */
33
- playgroundStatus?: PlaygroundStatus;
34
-
35
- /**
36
- * The message type is used to show up the docker status.
37
- */
38
- dockerStatus?: DockerStatus;
39
-
40
- /**
41
- * The message type is used to list the users in the room
42
- */
43
- userList?: UserInfo[];
44
-
45
- /**
46
- * The message type is used to identify the user you following.
47
- */
48
- followingUser?: UserInfo;
49
-
50
- /**
51
- * The message type is used to indicate the users who following you.
52
- */
53
- usersFollowYou?: UserInfo[];
54
- }
55
-
56
- interface ErrorType {
57
- /**
58
- * The error message block
59
- */
60
- message: {
61
- /**
62
- * The error message content
63
- */
64
- content: string;
65
-
66
- /**
67
- * The error playground you started
68
- */
69
- playgroundId: string;
70
-
71
- /**
72
- * The error timestamp
73
- */
74
- timestamp: number;
75
- };
76
- }
77
-
78
- /**
79
- * Userinfo type
80
- */
81
- interface UserInfo {
82
- playgroundId?: string;
83
- operation?: any;
84
- uuid?: string;
85
- color?: string;
86
- name?: string;
87
- username?: string;
88
- userId?: string;
89
- role?: string;
90
- avatar?: string;
91
- onlineCount?: number;
92
- }
93
-
94
- // interface ReplayType {
95
- // /**
96
- // * The userId of the user who started the replay
97
- // */
98
- // userId?: UserInfo['userId'];
99
-
100
- // /**
101
- // * The timestamp of the replay
102
- // */
103
- // timestamp: number;
104
- // }
105
-
106
- export interface TreeProps {
107
- /**
108
- * The background color of the tree
109
- */
110
- bgColor?: string;
111
-
112
- /**
113
- * The text color of the tree
114
- */
115
- fontColor?: string;
116
-
117
- /**
118
- * The drop background color
119
- */
120
- dropBgColor?: string;
121
-
122
- /**
123
- * The drop Text color
124
- */
125
- dropTextColor?: string;
126
-
127
- /**
128
- * The hover background color
129
- */
130
- hoverBgColor?: string;
131
-
132
- /**
133
- * The hover Text color
134
- */
135
- hoverTextColor?: string;
136
-
137
- /**
138
- * The tree item will fire the event when you click on it
139
- *
140
- * @param The path of the item
141
- * @param The uri of the item
142
- * @event
143
- */
144
- onClick?: (arg: { path: string; uri: string }) => void;
145
- }
146
-
147
- export interface MenuTagProps {
148
- /**
149
- * The style of the menu tag block
150
- */
151
- menuStyle?: {
152
- /**
153
- * The background color
154
- */
155
- backgroundColor?: string;
156
-
157
- /**
158
- * The text color
159
- */
160
- textColor?: string;
161
-
162
- /**
163
- * The hover background color
164
- */
165
- hoverBgColor?: string;
166
-
167
- /**
168
- * The hover text color
169
- */
170
- hoverTextColor?: string;
171
-
172
- /**
173
- * The icon color
174
- */
175
- iconColor?: string;
176
-
177
- /**
178
- * The icon hover color
179
- */
180
- hoverIconColor?: string;
181
-
182
- /**
183
- * The menu tag height
184
- */
185
- height?: string;
186
- };
187
- }
188
-
189
- interface EditorProps extends MenuTagProps {
190
- /**
191
- * The Theme of the editor block
192
- */
193
- theme?: {
194
- /**
195
- * The color of the margin view overlay
196
- */
197
- marginViewOverlaysBgColor?: string;
198
-
199
- /**
200
- * The width of the margin view overlay
201
- */
202
- marginViewOverlaysWidth?: string;
203
-
204
- /**
205
- * The left position of the margin view overlay
206
- */
207
- marginViewOverlaysLeft?: string;
208
-
209
- /**
210
- * The line number color
211
- */
212
- lineNumbersColor?: string;
213
-
214
- /**
215
- * The line number with
216
- */
217
- lineNumbersWidth?: string;
218
-
219
- /**
220
- * The line number left
221
- */
222
- lineNumbersLeft?: string;
223
-
224
- /**
225
- * The active line number color
226
- */
227
- activeLineNumberColor?: string;
228
- };
229
- }
230
-
231
- export interface ConsoleOrShellProps {
232
- /**
233
- * The font size of the shell
234
- */
235
- fontSize?: number;
236
-
237
- /**
238
- * The font family of the shell
239
- */
240
- fontFamily?: string;
241
-
242
- /**
243
- * The line height of the shell
244
- */
245
- lineHeight?: number;
246
-
247
- /**
248
- * The cursor color of the shell
249
- */
250
- cursorBlink?: boolean;
251
-
252
- /**
253
- * The cursor width of the shell
254
- */
255
- cursorWidth?: number;
256
-
257
- /**
258
- * The cursor style of the shell
259
- */
260
- cursorStyle?: string;
261
-
262
- /**
263
- * if the shell can be right click to open the context menu
264
- */
265
- rightClickSelectsWord?: boolean;
266
-
267
- /**
268
- * The theme of the shell block
269
- */
270
- theme?: {
271
- /**
272
- * The background color
273
- */
274
- background?: string;
275
- };
276
- }
277
-
278
- export interface BrowserProps {
279
- /**
280
- * The url of the browser
281
- */
282
- url?: string;
283
-
284
- /**
285
- * if the browser can show the url
286
- */
287
- showURL?: boolean;
288
-
289
- /**
290
- * The fresh icon color
291
- */
292
- freshIconColor?: string;
293
-
294
- /**
295
- * The input text color
296
- */
297
- inputColor?: string;
298
-
299
- /**
300
- * The open icon color
301
- */
302
- openIconColor?: string;
303
- }
304
-
305
- /**
306
- * The Component props type collection
307
- */
308
- export type ComponentPropsType =
309
- | EditorProps
310
- | TreeProps
311
- | BrowserProps
312
- | ConsoleOrShellProps;
313
-
314
- /**
315
- * Passing the values to init the playground.
316
- * @category PaaS Options [Required]
317
- */
318
- export interface Options {
319
- /**
320
- * @ignore
321
- *
322
- */
323
- debug?: boolean;
324
-
325
- /**
326
- *
327
- * Error listener to the application.
328
- * @param The error message block
329
- * @event
330
- */
331
- onError?: (error: ErrorType) => void;
332
-
333
- /**
334
- *
335
- * Message listener to the application.
336
- * @param MessageType
337
- * @event
338
- */
339
- onMessage?: (message: MessageType) => void;
340
-
341
- /**
342
- * The service worker origin
343
- */
344
- serviceWorkerOrigin: string;
345
-
346
- /**
347
- *
348
- * init the playground with the mode.
349
- *
350
- */
351
- mode?: Mode;
352
-
353
- /**
354
- *
355
- * init the playground with the paasDomain.
356
- *
357
- */
358
- paasDomain: string;
359
-
360
- /**
361
- *
362
- * init the playground ticket needed.
363
- *
364
- */
365
- ticket: string;
366
-
367
- /**
368
- *
369
- * to init the playground with this id.
370
- *
371
- */
372
- playgroundId: string;
373
-
374
- /**
375
- *
376
- * userId for the playground.
377
- *
378
- */
379
- userId: string;
380
-
381
- /**
382
- *
383
- * tenantId for the playground.
384
- *
385
- */
386
- tenantId: string;
387
-
388
- /**
389
- *
390
- * username for the playground.
391
- *
392
- */
393
- username?: string;
394
-
395
- /**
396
- *
397
- * avatarUrl for the playground but not necessarily.
398
- *
399
- */
400
- avatarUrl?: string;
401
-
402
- /**
403
- *
404
- * this argument is to ingnore replaying patterns.
405
- *
406
- */
407
- ignoreReplayers?: string[];
408
-
409
- /**
410
- *
411
- * Here you can map the components to the playground.
412
- *
413
- * @category ComponentsMapper
414
- *
415
- */
416
- components?: Component<ComponentPropsType>[];
417
-
418
- /**
419
- * @deprecated to fix the issue of the playground.
420
- *
421
- * render?: () => TComponent[]; keyof D42_FrontType['CRDT'][]
422
- */
423
- }
424
-
425
- /**
426
- *
427
- * @interface Component
428
- * @desc The props of the component.
429
- *
430
- */
431
- export interface Component<T> {
432
- /**
433
- *
434
- * The DOM for the component.
435
- * @type {(string | HTMLElement | Element)}
436
- *
437
- */
438
- container: string | HTMLElement | Element;
439
-
440
- item: ComponentType;
441
- /**
442
- * The component props
443
- */
444
- props?: T;
445
- }
446
-
447
- /**
448
- * * This is the entry point for the application.
449
- *
450
- * * like:
451
- *
452
- *
453
- * ```ts
454
- let options = {...};
455
- let Dao = new DaoPaaS(options);
456
- ```
457
- *
458
- * See {@link Options} for more details.
459
- */
460
- export class DaoPaaS {
461
- constructor(options: Options);
462
-
463
- get playgroundStatus(): PlaygroundStatus;
464
-
465
- get dockerStatus(): DockerStatus;
466
-
467
- get userList(): UserInfo[];
468
-
469
- /**
470
- *
471
- * Replaying method for global calling.
472
- * @param {unFollowUser} args
473
- *
474
- */
475
-
476
- unFollowUser(user: UserInfo, callback: (userInfo: UserInfo) => void): void;
477
-
478
- /**
479
- *
480
- * Replaying method for global calling.
481
- * @param {followUser} args
482
- *
483
- */
484
- followUser(userId: string, callback: (userInfo: UserInfo) => void): void;
485
-
486
- /**
487
- *
488
- * Replaying method for global calling.
489
- * @param {ReplayType} args
490
- *
491
- */
492
- replay(userId: Pick<UserInfo, 'userId'>): void;
493
-
494
- /**
495
- *
496
- * Recording method for global calling.
497
- * @param {boolean} arg
498
- *
499
- */
500
- record(arg?: boolean): void;
501
-
502
- /**
503
- *
504
- * async method to set Replayers.
505
- * @param {keyof D42_FrontType['CRDT'][]} arg
506
- *
507
- */
508
- setReplayers(arg: string[]): void;
509
-
510
- /**
511
- *
512
- * Here you can switch language services by calling this method.
513
- * @param {boolean} arg
514
- *
515
- */
516
- switchLspServer(arg: boolean): void;
517
-
518
- /**
519
- *
520
- * Active the playground handler.
521
- *
522
- */
523
- activePlayground(): void;
524
-
525
- /**
526
- *
527
- * Run the playground handler.
528
- *
529
- */
530
- runPlayground(): void;
531
-
532
- /**
533
- *
534
- * Stop the playground.
535
- *
536
- */
537
- stopPlayground(): void;
538
-
539
- /**
540
- * Editor component.
541
- *
542
- *
543
- * ```ts
544
- * Dao.Editor({
545
- * container: '#editor',
546
- * item: 'editor',
547
- * props: {...EditorProps}
548
- * });
549
- ```
550
- *
551
- * @category Components
552
- *
553
- *
554
- */
555
- Editor(args: Component<EditorProps>): void;
556
-
557
- /**
558
- *
559
- * Page component.
560
- * @ignore
561
- * @category Components
562
- * @param Component
563
- *
564
- */
565
- Page(args: Component<TreeProps>): void;
566
-
567
- /**
568
- *
569
- * Tree component.
570
- *
571
- * ```ts
572
- * Dao.Tree({
573
- * container: '#tree',
574
- * item: 'tree',
575
- * props: {...TreeProps}
576
- * });
577
- ```
578
- *
579
- *
580
- * @category Components
581
- * @param Component
582
- *
583
- */
584
- Tree(args: Component<TreeProps>): void;
585
-
586
- /**
587
- *
588
- * Shell component.
589
- *
590
- *
591
- * ```ts
592
- * Dao.Shell({
593
- * container: '#shell',
594
- * item: 'shell',
595
- * props: {...ConsoleOrShellProps}
596
- * });
597
- ```
598
- *
599
- *
600
- * @category Components
601
- * @param Component
602
- *
603
- */
604
- Shell(args: Component<ConsoleOrShellProps>): void;
605
-
606
- /**
607
- *
608
- * Browser component.
609
- *
610
- * ```ts
611
- * Dao.Browser({
612
- * container: '#browser',
613
- * item: 'browser',
614
- * props: {...BrowserProps}
615
- * });
616
- ```
617
- *
618
- *
619
- * @category Components
620
- * @param Component
621
- *
622
- */
623
- Browser(args: Component<BrowserProps>): void;
624
-
625
- /**
626
- *
627
- * Console component.
628
- *
629
- *
630
- * ```ts
631
- * Dao.Console({
632
- * container: '#console',
633
- * item: 'console',
634
- * props: {...ConsoleOrShellProps}
635
- * });
636
- ```
637
- *
638
- *
639
- * @category Components
640
- * @param Component
641
- *
642
- */
643
- Console(args: Component<ConsoleOrShellProps>): void;
644
- }
1
+ /*!-----------------------------------------------------------
2
+ * Copyright (c) dao42. All rights reserved.
3
+ * Type definitions for @dao42/d42paas-front
4
+ * Released under the MIT license
5
+ *-----------------------------------------------------------*/
6
+
7
+ /*---------------------------------------------------------------------------------------------
8
+ * Copyright (c) Microsoft Corporation. All rights reserved.
9
+ * Licensed under the MIT License. See License.txt in the project root for license information.
10
+ *--------------------------------------------------------------------------------------------*/
11
+
12
+ export interface DiffPatternInfo {
13
+ value: string;
14
+ type: string;
15
+ }
16
+
17
+ export type ComponentType =
18
+ | 'Page'
19
+ | 'Tree'
20
+ | 'Editor'
21
+ | 'Console'
22
+ | 'Browser'
23
+ | 'Shell';
24
+
25
+ export type Mode = 'tsdoc' | 'singleFile' | 'IDE';
26
+
27
+ export type PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
28
+
29
+ export type DockerStatus = 'RUNNING' | 'STOP';
30
+
31
+ // export type Replay = 'stop' | 'disabled' | 'pause';
32
+ interface MessageType {
33
+ /**
34
+ * The message type is use to show up the playground status.
35
+ */
36
+ playgroundStatus?: PlaygroundStatus;
37
+
38
+ /**
39
+ * The message type is used to show up the docker status.
40
+ */
41
+ dockerStatus?: DockerStatus;
42
+
43
+ /**
44
+ * The message type is used to list the users in the room
45
+ */
46
+ userList?: UserInfo[];
47
+
48
+ /**
49
+ * The message type is used to identify the user you following.
50
+ */
51
+ followingUser?: UserInfo;
52
+
53
+ /**
54
+ * The message type is used to indicate the users who following you.
55
+ */
56
+ usersFollowYou?: UserInfo[];
57
+ }
58
+
59
+ interface ErrorType {
60
+ /**
61
+ * The error message block
62
+ */
63
+ message: {
64
+ /**
65
+ * The error message content
66
+ */
67
+ content: string;
68
+
69
+ /**
70
+ * The error playground you started
71
+ */
72
+ playgroundId: string;
73
+
74
+ /**
75
+ * The error timestamp
76
+ */
77
+ timestamp: number;
78
+ };
79
+ }
80
+
81
+ /**
82
+ * Userinfo type
83
+ */
84
+ interface UserInfo {
85
+ /**
86
+ * The playground id show up in the user info
87
+ */
88
+ playgroundId?: string;
89
+
90
+ operation?: any;
91
+ uuid?: string;
92
+ color?: string;
93
+ name?: string;
94
+ username?: string;
95
+ userId?: string;
96
+ role?: string;
97
+ avatar?: string;
98
+ onlineCount?: number;
99
+ }
100
+
101
+ // interface ReplayType {
102
+ // /**
103
+ // * The userId of the user who started the replay
104
+ // */
105
+ // userId?: UserInfo['userId'];
106
+
107
+ // /**
108
+ // * The timestamp of the replay
109
+ // */
110
+ // timestamp: number;
111
+ // }
112
+
113
+ export interface TreeProps {
114
+ /**
115
+ * The tree Item height
116
+ */
117
+ treeItemHeight?: string;
118
+ /**
119
+ * The background color of the tree
120
+ */
121
+ bgColor?: string;
122
+
123
+ /**
124
+ * The text color of the tree
125
+ */
126
+ fontColor?: string;
127
+
128
+ /**
129
+ * The drop background color
130
+ */
131
+ dropBgColor?: string;
132
+
133
+ /**
134
+ * The drop Text color
135
+ */
136
+ dropTextColor?: string;
137
+
138
+ /**
139
+ * The hover background color
140
+ */
141
+ hoverBgColor?: string;
142
+
143
+ /**
144
+ * The hover Text color
145
+ */
146
+ hoverTextColor?: string;
147
+
148
+ /**
149
+ * The tree item will fire the event when you click on it
150
+ *
151
+ * @param The path of the item
152
+ * @param The uri of the item
153
+ * @event
154
+ */
155
+ onClick?: (arg: { path: string; uri: string }) => void;
156
+ }
157
+
158
+ export interface MenuTagProps {
159
+ /**
160
+ * The style of the menu tag block
161
+ */
162
+ menuStyle?: {
163
+ /**
164
+ * The background color
165
+ */
166
+ backgroundColor?: string;
167
+
168
+ /**
169
+ * The text color
170
+ */
171
+ textColor?: string;
172
+
173
+ /**
174
+ * The hover background color
175
+ */
176
+ hoverBgColor?: string;
177
+
178
+ /**
179
+ * The hover text color
180
+ */
181
+ hoverTextColor?: string;
182
+
183
+ /**
184
+ * The icon color
185
+ */
186
+ iconColor?: string;
187
+
188
+ /**
189
+ * The icon hover color
190
+ */
191
+ hoverIconColor?: string;
192
+
193
+ /**
194
+ * The menu tag height
195
+ */
196
+ height?: string;
197
+ };
198
+ }
199
+
200
+ interface EditorProps extends MenuTagProps {
201
+ /**
202
+ * The editor font size
203
+ */
204
+ fontSize: string;
205
+
206
+ /**
207
+ * The editor line height
208
+ */
209
+ lineHeight: string;
210
+
211
+ /**
212
+ *
213
+ */
214
+
215
+ /**
216
+ * The Theme of the editor block
217
+ */
218
+ theme?: {
219
+ /**
220
+ * The color of the margin view overlay
221
+ */
222
+ marginViewOverlaysBgColor?: string;
223
+
224
+ /**
225
+ * The width of the margin view overlay
226
+ */
227
+ marginViewOverlaysWidth?: string;
228
+
229
+ /**
230
+ * The left position of the margin view overlay
231
+ */
232
+ marginViewOverlaysLeft?: string;
233
+
234
+ /**
235
+ * The line number color
236
+ */
237
+ lineNumbersColor?: string;
238
+
239
+ /**
240
+ * The line number with
241
+ */
242
+ lineNumbersWidth?: string;
243
+
244
+ /**
245
+ * The line number left
246
+ */
247
+ lineNumbersLeft?: string;
248
+
249
+ /**
250
+ * The active line number color
251
+ */
252
+ activeLineNumberColor?: string;
253
+ };
254
+ }
255
+
256
+ export interface ConsoleOrShellProps {
257
+ /**
258
+ * The font size of the shell
259
+ */
260
+ fontSize?: number;
261
+
262
+ /**
263
+ * The font family of the shell
264
+ */
265
+ fontFamily?: string;
266
+
267
+ /**
268
+ * The line height of the shell
269
+ */
270
+ lineHeight?: number;
271
+
272
+ /**
273
+ * The cursor color of the shell
274
+ */
275
+ cursorBlink?: boolean;
276
+
277
+ /**
278
+ * The cursor width of the shell
279
+ */
280
+ cursorWidth?: number;
281
+
282
+ /**
283
+ * The cursor style of the shell
284
+ */
285
+ cursorStyle?: string;
286
+
287
+ /**
288
+ * if the shell can be right click to open the context menu
289
+ */
290
+ rightClickSelectsWord?: boolean;
291
+
292
+ /**
293
+ * The theme of the shell block
294
+ */
295
+ theme?: {
296
+ /**
297
+ * The background color
298
+ */
299
+ background?: string;
300
+ };
301
+ }
302
+
303
+ export interface BrowserProps {
304
+ /**
305
+ * The url of the browser
306
+ */
307
+ url?: string;
308
+
309
+ /**
310
+ * if the browser can show the url
311
+ */
312
+ showURL?: boolean;
313
+
314
+ /**
315
+ * The fresh icon color
316
+ */
317
+ freshIconColor?: string;
318
+
319
+ /**
320
+ * The input text color
321
+ */
322
+ inputColor?: string;
323
+
324
+ /**
325
+ * The open icon color
326
+ */
327
+ openIconColor?: string;
328
+ }
329
+
330
+ /**
331
+ * The Component props type collection
332
+ */
333
+ export type ComponentPropsType =
334
+ | EditorProps
335
+ | TreeProps
336
+ | BrowserProps
337
+ | ConsoleOrShellProps;
338
+
339
+ /**
340
+ * Passing the values to init the playground.
341
+ * @category PaaS Options [Required]
342
+ */
343
+ export interface Options {
344
+ /**
345
+ * @ignore
346
+ *
347
+ */
348
+ debug?: boolean;
349
+
350
+ /**
351
+ *
352
+ * Error listener to the application.
353
+ * @param The error message block
354
+ * @event
355
+ */
356
+ onError?: (error: ErrorType) => void;
357
+
358
+ /**
359
+ *
360
+ * Message listener to the application.
361
+ * @param MessageType
362
+ * @event
363
+ */
364
+ onMessage?: (message: MessageType) => void;
365
+
366
+ /**
367
+ * The service worker origin
368
+ */
369
+ serviceWorkerOrigin: string;
370
+
371
+ /**
372
+ *
373
+ * init the playground with the mode.
374
+ *
375
+ */
376
+ mode?: Mode;
377
+
378
+ /**
379
+ *
380
+ * init the playground with the paasDomain.
381
+ *
382
+ */
383
+ paasDomain: string;
384
+
385
+ /**
386
+ *
387
+ * init the playground ticket needed.
388
+ *
389
+ */
390
+ ticket: string;
391
+
392
+ /**
393
+ *
394
+ * to init the playground with this id.
395
+ *
396
+ */
397
+ playgroundId: string;
398
+
399
+ /**
400
+ *
401
+ * userId for the playground.
402
+ *
403
+ */
404
+ userId: string;
405
+
406
+ /**
407
+ *
408
+ * tenantId for the playground.
409
+ *
410
+ */
411
+ tenantId: string;
412
+
413
+ /**
414
+ *
415
+ * username for the playground.
416
+ *
417
+ */
418
+ username?: string;
419
+
420
+ /**
421
+ *
422
+ * avatarUrl for the playground but not necessarily.
423
+ *
424
+ */
425
+ avatarUrl?: string;
426
+
427
+ /**
428
+ *
429
+ * this argument is to ingnore replaying patterns.
430
+ *
431
+ */
432
+ ignoreReplayers?: string[];
433
+
434
+ /**
435
+ *
436
+ * Here you can map the components to the playground.
437
+ *
438
+ * @category ComponentsMapper
439
+ *
440
+ */
441
+ components?: Component<ComponentPropsType>[];
442
+
443
+ /**
444
+ * @deprecated to fix the issue of the playground.
445
+ *
446
+ * render?: () => TComponent[]; keyof D42_FrontType['CRDT'][]
447
+ */
448
+ }
449
+
450
+ /**
451
+ *
452
+ * @interface Component
453
+ * @desc The props of the component.
454
+ *
455
+ */
456
+ export interface Component<T> {
457
+ /**
458
+ *
459
+ * The DOM for the component.
460
+ * @type {(string | HTMLElement | Element)}
461
+ *
462
+ */
463
+ container: string | HTMLElement | Element;
464
+
465
+ item: ComponentType;
466
+ /**
467
+ * The component props
468
+ */
469
+ props?: T;
470
+ }
471
+
472
+ /**
473
+ * * This is the entry point for the application.
474
+ *
475
+ * * like:
476
+ *
477
+ *
478
+ * ```ts
479
+ let options = {...};
480
+ let Dao = new DaoPaaS(options);
481
+ ```
482
+ *
483
+ * See {@link Options} for more details.
484
+ */
485
+ export class DaoPaaS {
486
+ constructor(options: Options);
487
+
488
+ get playgroundStatus(): PlaygroundStatus;
489
+
490
+ get dockerStatus(): DockerStatus;
491
+
492
+ get userList(): UserInfo[];
493
+
494
+ /**
495
+ *
496
+ * Replaying method for global calling.
497
+ * @param {unFollowUser} args
498
+ *
499
+ */
500
+
501
+ unFollowUser(user: UserInfo, callback: (userInfo: UserInfo) => void): void;
502
+
503
+ /**
504
+ *
505
+ * Replaying method for global calling.
506
+ * @param {followUser} args
507
+ *
508
+ */
509
+ followUser(userId: string, callback: (userInfo: UserInfo) => void): void;
510
+
511
+ /**
512
+ *
513
+ * Replaying method for global calling.
514
+ * @param {DiffPatternInfo} args
515
+ * @param {DiffPatternInfo} args
516
+ *
517
+ */
518
+ setDiff(current: DiffPatternInfo, next: DiffPatternInfo): void;
519
+
520
+ /**
521
+ *
522
+ * Replaying method for global calling.
523
+ * @param {ReplayType} args
524
+ *
525
+ */
526
+ replay(userId: Pick<UserInfo, 'userId'>): void;
527
+
528
+ /**
529
+ *
530
+ * Recording method for global calling.
531
+ * @param {boolean} arg
532
+ *
533
+ */
534
+ record(arg?: boolean): void;
535
+
536
+ /**
537
+ *
538
+ * async method to set Replayers.
539
+ * @param {keyof D42_FrontType['CRDT'][]} arg
540
+ *
541
+ */
542
+ setReplayers(arg: string[]): void;
543
+
544
+ /**
545
+ *
546
+ * Here you can switch language services by calling this method.
547
+ * @param {boolean} arg
548
+ *
549
+ */
550
+ switchLspServer(arg: boolean): void;
551
+
552
+ /**
553
+ *
554
+ * Active the playground handler.
555
+ *
556
+ */
557
+ activePlayground(): void;
558
+
559
+ /**
560
+ *
561
+ * Run the playground handler.
562
+ *
563
+ */
564
+ runPlayground(): void;
565
+
566
+ /**
567
+ *
568
+ * Stop the playground.
569
+ *
570
+ */
571
+ stopPlayground(): void;
572
+
573
+ /**
574
+ * Editor component.
575
+ *
576
+ *
577
+ * ```ts
578
+ * Dao.Editor({
579
+ * container: '#editor',
580
+ * item: 'editor',
581
+ * props: {...EditorProps}
582
+ * });
583
+ ```
584
+ *
585
+ * @category Components
586
+ *
587
+ *
588
+ */
589
+ Editor(args: Component<EditorProps>): void;
590
+
591
+ /**
592
+ *
593
+ * Page component.
594
+ * @ignore
595
+ * @category Components
596
+ * @param Component
597
+ *
598
+ */
599
+ Page(args: Component<TreeProps>): void;
600
+
601
+ /**
602
+ *
603
+ * Tree component.
604
+ *
605
+ * ```ts
606
+ * Dao.Tree({
607
+ * container: '#tree',
608
+ * item: 'tree',
609
+ * props: {...TreeProps}
610
+ * });
611
+ ```
612
+ *
613
+ *
614
+ * @category Components
615
+ * @param Component
616
+ *
617
+ */
618
+ Tree(args: Component<TreeProps>): void;
619
+
620
+ /**
621
+ *
622
+ * Shell component.
623
+ *
624
+ *
625
+ * ```ts
626
+ * Dao.Shell({
627
+ * container: '#shell',
628
+ * item: 'shell',
629
+ * props: {...ConsoleOrShellProps}
630
+ * });
631
+ ```
632
+ *
633
+ *
634
+ * @category Components
635
+ * @param Component
636
+ *
637
+ */
638
+ Shell(args: Component<ConsoleOrShellProps>): void;
639
+
640
+ /**
641
+ *
642
+ * Browser component.
643
+ *
644
+ * ```ts
645
+ * Dao.Browser({
646
+ * container: '#browser',
647
+ * item: 'browser',
648
+ * props: {...BrowserProps}
649
+ * });
650
+ ```
651
+ *
652
+ *
653
+ * @category Components
654
+ * @param Component
655
+ *
656
+ */
657
+ Browser(args: Component<BrowserProps>): void;
658
+
659
+ /**
660
+ *
661
+ * Console component.
662
+ *
663
+ *
664
+ * ```ts
665
+ * Dao.Console({
666
+ * container: '#console',
667
+ * item: 'console',
668
+ * props: {...ConsoleOrShellProps}
669
+ * });
670
+ ```
671
+ *
672
+ *
673
+ * @category Components
674
+ * @param Component
675
+ *
676
+ */
677
+ Console(args: Component<ConsoleOrShellProps>): void;
678
+ }