@dao42/d42paas-front 0.7.56 → 0.7.59

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,684 @@
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
+ inputTextColor?: string;
330
+ inputBgColor?: string;
331
+ bgColor?: string;
332
+ navBgColor?: string;
333
+ navBorder?: string;
334
+ }
335
+
336
+ /**
337
+ * The Component props type collection
338
+ */
339
+ export type ComponentPropsType =
340
+ | EditorProps
341
+ | TreeProps
342
+ | BrowserProps
343
+ | ConsoleOrShellProps;
344
+
345
+ /**
346
+ * Passing the values to init the playground.
347
+ * @category PaaS Options [Required]
348
+ */
349
+ export interface Options {
350
+ /**
351
+ * @ignore
352
+ *
353
+ */
354
+ debug?: boolean;
355
+
356
+ /**
357
+ *
358
+ * Error listener to the application.
359
+ * @param The error message block
360
+ * @event
361
+ */
362
+ onError?: (error: ErrorType) => void;
363
+
364
+ /**
365
+ *
366
+ * Message listener to the application.
367
+ * @param MessageType
368
+ * @event
369
+ */
370
+ onMessage?: (message: MessageType) => void;
371
+
372
+ /**
373
+ * The service worker origin
374
+ */
375
+ serviceWorkerOrigin?: string;
376
+
377
+ /**
378
+ *
379
+ * init the playground with the mode.
380
+ *
381
+ */
382
+ mode?: Mode;
383
+
384
+ /**
385
+ *
386
+ * init the playground with the paasDomain.
387
+ *
388
+ */
389
+ paasDomain: string;
390
+
391
+ /**
392
+ *
393
+ * init the playground ticket needed.
394
+ *
395
+ */
396
+ ticket: string;
397
+
398
+ /**
399
+ *
400
+ * to init the playground with this id.
401
+ *
402
+ */
403
+ playgroundId: string;
404
+
405
+ /**
406
+ *
407
+ * userId for the playground.
408
+ *
409
+ */
410
+ userId: string;
411
+
412
+ /**
413
+ *
414
+ * tenantId for the playground.
415
+ *
416
+ */
417
+ tenantId: string;
418
+
419
+ /**
420
+ *
421
+ * username for the playground.
422
+ *
423
+ */
424
+ username?: string;
425
+
426
+ /**
427
+ *
428
+ * avatarUrl for the playground but not necessarily.
429
+ *
430
+ */
431
+ avatarUrl?: string;
432
+
433
+ /**
434
+ *
435
+ * this argument is to ingnore replaying patterns.
436
+ *
437
+ */
438
+ ignoreReplayers?: string[];
439
+
440
+ /**
441
+ *
442
+ * Here you can map the components to the playground.
443
+ *
444
+ * @category ComponentsMapper
445
+ *
446
+ */
447
+ components?: Component<ComponentPropsType>[];
448
+
449
+ /**
450
+ * @deprecated to fix the issue of the playground.
451
+ *
452
+ * render?: () => TComponent[]; keyof D42_FrontType['CRDT'][]
453
+ */
454
+ }
455
+
456
+ /**
457
+ *
458
+ * @interface Component
459
+ * @desc The props of the component.
460
+ *
461
+ */
462
+ export interface Component<T> {
463
+ /**
464
+ *
465
+ * The DOM for the component.
466
+ * @type {(string | HTMLElement | Element)}
467
+ *
468
+ */
469
+ container: string | HTMLElement | Element;
470
+
471
+ item: ComponentType;
472
+ /**
473
+ * The component props
474
+ */
475
+ props?: T;
476
+ }
477
+
478
+ /**
479
+ * * This is the entry point for the application.
480
+ *
481
+ * * like:
482
+ *
483
+ *
484
+ * ```ts
485
+ let options = {...};
486
+ let Dao = new DaoPaaS(options);
487
+ ```
488
+ *
489
+ * See {@link Options} for more details.
490
+ */
491
+ export class DaoPaaS {
492
+ constructor(options: Options);
493
+
494
+ get playgroundStatus(): PlaygroundStatus;
495
+
496
+ get dockerStatus(): DockerStatus;
497
+
498
+ get userList(): UserInfo[];
499
+
500
+ /**
501
+ *
502
+ * Replaying method for global calling.
503
+ * @param {unFollowUser} args
504
+ *
505
+ */
506
+
507
+ unFollowUser(user: UserInfo, callback: (userInfo: UserInfo) => void): void;
508
+
509
+ /**
510
+ *
511
+ * Replaying method for global calling.
512
+ * @param {followUser} args
513
+ *
514
+ */
515
+ followUser(userId: string, callback: (userInfo: UserInfo) => void): void;
516
+
517
+ /**
518
+ *
519
+ * Replaying method for global calling.
520
+ * @param {DiffPatternInfo} args
521
+ * @param {DiffPatternInfo} args
522
+ *
523
+ */
524
+ setDiff(current: DiffPatternInfo, next: DiffPatternInfo): void;
525
+
526
+ /**
527
+ *
528
+ * Replaying method for global calling.
529
+ * @param {ReplayType} args
530
+ *
531
+ */
532
+ replay(userId: Pick<UserInfo, 'userId'>): void;
533
+
534
+ /**
535
+ *
536
+ * Recording method for global calling.
537
+ * @param {boolean} arg
538
+ *
539
+ */
540
+ record(arg?: boolean): void;
541
+
542
+ /**
543
+ *
544
+ * async method to set Replayers.
545
+ * @param {keyof D42_FrontType['CRDT'][]} arg
546
+ *
547
+ */
548
+ setReplayers(arg: string[]): void;
549
+
550
+ /**
551
+ *
552
+ * Here you can switch language services by calling this method.
553
+ * @param {boolean} arg
554
+ *
555
+ */
556
+ switchLspServer(arg: boolean): void;
557
+
558
+ /**
559
+ *
560
+ * Active the playground handler.
561
+ *
562
+ */
563
+ activePlayground(): void;
564
+
565
+ /**
566
+ *
567
+ * Run the playground handler.
568
+ *
569
+ */
570
+ runPlayground(): void;
571
+
572
+ /**
573
+ *
574
+ * Stop the playground.
575
+ *
576
+ */
577
+ stopPlayground(): void;
578
+
579
+ /**
580
+ * Editor component.
581
+ *
582
+ *
583
+ * ```ts
584
+ * Dao.Editor({
585
+ * container: '#editor',
586
+ * item: 'editor',
587
+ * props: {...EditorProps}
588
+ * });
589
+ ```
590
+ *
591
+ * @category Components
592
+ *
593
+ *
594
+ */
595
+ Editor(args: Component<EditorProps>): void;
596
+
597
+ /**
598
+ *
599
+ * Page component.
600
+ * @ignore
601
+ * @category Components
602
+ * @param Component
603
+ *
604
+ */
605
+ Page(args: Component<TreeProps>): void;
606
+
607
+ /**
608
+ *
609
+ * Tree component.
610
+ *
611
+ * ```ts
612
+ * Dao.Tree({
613
+ * container: '#tree',
614
+ * item: 'tree',
615
+ * props: {...TreeProps}
616
+ * });
617
+ ```
618
+ *
619
+ *
620
+ * @category Components
621
+ * @param Component
622
+ *
623
+ */
624
+ Tree(args: Component<TreeProps>): void;
625
+
626
+ /**
627
+ *
628
+ * Shell component.
629
+ *
630
+ *
631
+ * ```ts
632
+ * Dao.Shell({
633
+ * container: '#shell',
634
+ * item: 'shell',
635
+ * props: {...ConsoleOrShellProps}
636
+ * });
637
+ ```
638
+ *
639
+ *
640
+ * @category Components
641
+ * @param Component
642
+ *
643
+ */
644
+ Shell(args: Component<ConsoleOrShellProps>): void;
645
+
646
+ /**
647
+ *
648
+ * Browser component.
649
+ *
650
+ * ```ts
651
+ * Dao.Browser({
652
+ * container: '#browser',
653
+ * item: 'browser',
654
+ * props: {...BrowserProps}
655
+ * });
656
+ ```
657
+ *
658
+ *
659
+ * @category Components
660
+ * @param Component
661
+ *
662
+ */
663
+ Browser(args: Component<BrowserProps>): void;
664
+
665
+ /**
666
+ *
667
+ * Console component.
668
+ *
669
+ *
670
+ * ```ts
671
+ * Dao.Console({
672
+ * container: '#console',
673
+ * item: 'console',
674
+ * props: {...ConsoleOrShellProps}
675
+ * });
676
+ ```
677
+ *
678
+ *
679
+ * @category Components
680
+ * @param Component
681
+ *
682
+ */
683
+ Console(args: Component<ConsoleOrShellProps>): void;
684
+ }