@dao42/d42paas-front 0.5.38 → 0.5.45

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
@@ -10,27 +10,37 @@
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
11
11
  * Licensed under the MIT License. See License.txt in the project root for license information.
12
12
  *--------------------------------------------------------------------------------------------*/
13
- // type TStyle = HTMLAttributes<T>.style?: React.CSSProperties | undefined;
14
- // type TStyle = React.CSSProperties | undefined;
15
- // import * as CSS from 'csstype';
13
+
14
+ export type TMode = 'tsdoc' | 'singleFile' | 'IDE';
16
15
 
17
16
  export type T_PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
17
+
18
18
  export type TReplay = 'stop' | 'disabled' | 'pause';
19
19
 
20
+ /* export type T_DockerStatus = 'RUNNING' | 'STOP'; */
21
+
20
22
  /**
21
23
  * the arguments of the Playground.
22
24
  */
23
25
  interface TConstructor {
24
26
  /**
25
27
  *
26
- * initing the playground ticket needed.
28
+ * init the playground with the mode
29
+ *
30
+ */
31
+
32
+ mode?: TMode;
33
+
34
+ /**
35
+ *
36
+ * init the playground with the env .
27
37
  *
28
38
  */
29
39
  env?: string;
30
40
 
31
41
  /**
32
42
  *
33
- * initing the playground ticket needed.
43
+ * init the playground ticket needed.
34
44
  *
35
45
  */
36
46
  ticket: string;
@@ -84,7 +94,13 @@ interface TConstructor {
84
94
  */
85
95
  ignoreReplayers?: keyof D42_FrontType['CRDT'][];
86
96
 
87
- components?: TComponentArgs[];
97
+ components?: UserComponent[];
98
+
99
+ // render?: () => TComponentArgs[];
100
+ }
101
+
102
+ export interface UserComponent extends TComponentArgs {
103
+ item: string;
88
104
  }
89
105
 
90
106
  /**
@@ -102,7 +118,7 @@ export interface TComponentArgs {
102
118
  * @memberof TComponentArgs
103
119
  *
104
120
  */
105
- container: string & HTMLElement & Element;
121
+ container: string | HTMLElement | Element;
106
122
 
107
123
  props?: any;
108
124
  }
@@ -0,0 +1,60 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>DaoPaaS</title>
8
+ <style>
9
+ main {
10
+ width: 100%;
11
+ height: 100vh;
12
+ overflow: hidden;
13
+ }
14
+ .edit-container {
15
+ height: 100%;
16
+ }
17
+ </style>
18
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css" crossorigin="anonymous" />
19
+ <!-- <script src="https://cdn.tailwindcss.com"></script> -->
20
+ <link rel="stylesheet" href="./style.css" crossorigin="anonymous" />
21
+
22
+ </head>
23
+ <body>
24
+ <main>
25
+ <div class="edit-container"></div>
26
+ </main>
27
+ <!-- <script src="/dist/daoPaaS.js"></script> -->
28
+ <script type="module" src="./DaoPaaS.umd.js"></script>
29
+
30
+ <script>
31
+ window.onload = () => {
32
+ window.daopaas = DaoPaaS;
33
+
34
+ var qs = new URLSearchParams(document.location.search.substring(1));
35
+ const env = qs.get('env')
36
+ window.daopaas = new DaoPaaS.DaoPaaS({
37
+ ticket: 'MXwzNDUwMTU4NjU4MDYyOTA5NDR8MXx8MTczNzg5MjAwMDAwMA==',
38
+ playgroundId: '345015865806290944',
39
+ userId: qs.get('userId'),
40
+ tenantId: '1',
41
+ username: qs.get('username'),
42
+ mode: 'tsdoc',
43
+ });
44
+
45
+ fetch('./editor.d.ts').then((response)=> response.text()).then((d)=> {
46
+ daopaas.Editor({
47
+ container: document.querySelector('.edit-container'),
48
+ props: {
49
+ doc: {
50
+ type: 'typescript',
51
+ value: d
52
+ }
53
+ }
54
+ }
55
+ )
56
+ })
57
+ }
58
+ </script>
59
+ </body>
60
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dao42/d42paas-front",
3
- "version": "0.5.38",
3
+ "version": "0.5.45",
4
4
  "description": "> TODO: description",
5
5
  "author": "eric183 <kk297466058@gmail.com>",
6
6
  "homepage": "https://github.com/dao42/d42paas_frontend#readme",