api-render-ui 1.1.7 → 1.1.9

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/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./api-render-ui.js";
@@ -1,304 +0,0 @@
1
- // Auto-generated by inline-styles.mjs
2
- export const GLOBAL_STYLES = `.codigma-apioperatorlist {
3
- align-items: flex-start;
4
- background: var(--surface, white);
5
- display: inline-flex;
6
- flex-direction: column;
7
- gap: 5px;
8
- justify-content: flex-start;
9
- width: 100%
10
- }
11
- /* Theme variables and mappings */
12
- :root {
13
- --Labels---Vibrant---Controls-Primary-√: #404040;
14
- --primary: #404040;
15
- --main-color: #404040; /* main / primary color */
16
- --aux-color: #a9c7ef; /* auxiliary color for hover / accents */
17
- --embellish-color: #ced8e7; /* embellishment color for active states */
18
- --surface: white;
19
- --text: black;
20
- --even-bg: rgb(235, 239, 244);
21
- --odd-bg: rgb(250, 246, 246);
22
- --hover-bg: var(--aux-color, rgb(169, 199, 239));
23
- --active-bg: var(--embellish-color, rgb(206, 216, 231));
24
- }
25
-
26
- .codigma-theme-light {
27
- --main-color: #404040;
28
- --aux-color: #a9c7ef;
29
- --embellish-color: #ced8e7;
30
- --primary: var(--main-color);
31
- --Labels---Vibrant---Controls-Primary-√: var(--main-color);
32
- --surface: white;
33
- --text: black;
34
- --even-bg: rgb(235, 239, 244);
35
- --odd-bg: rgb(250, 246, 246);
36
- --hover-bg: var(--aux-color);
37
- --active-bg: var(--embellish-color);
38
- }
39
-
40
- .codigma-theme-dark {
41
- --main-color: #9fb8ff;
42
- --aux-color: #334155;
43
- --embellish-color: #22303a;
44
- --primary: var(--main-color);
45
- --Labels---Vibrant---Controls-Primary-√: var(--main-color);
46
- --surface: #1f1f1f;
47
- --text: #e6e6e6;
48
- --even-bg: #2a2a2a;
49
- --odd-bg: #222222;
50
- --hover-bg: var(--aux-color);
51
- --active-bg: var(--embellish-color);
52
- }
53
- .codigma-apioperator {
54
- align-items: center;
55
- align-self: stretch;
56
- display: inline-flex;
57
- gap: 10px;
58
- /* border-radius: 8px; */
59
- height: 32px;
60
- justify-content: flex-start
61
- }
62
- .codigma-apioperator:nth-child(even) {
63
- color: var(--main-color, var(--primary, #404040));
64
- }
65
- .codigma-apioperator:nth-child(odd) {
66
- color: var(--main-color, var(--primary, #404040));
67
- }
68
-
69
- .codigma-apioperator:hover {
70
- cursor: pointer;
71
- color: var(--text, black);
72
- background-color: var(--hover-bg, rgba(169,199,239,0.12));
73
- transition: background-color .12s ease, color .12s ease;
74
- border-radius: 4px;
75
- }
76
- .codigma-apioperator:active {
77
- color: var(--main-color, var(--primary, #404040));
78
- }
79
- .codigma-method {
80
- align-items: center;
81
- display: flex;
82
- gap: 5px;
83
- justify-content: center;
84
- width: 64px
85
- }
86
- .codigma-methodtype {
87
- align-items: center;
88
- display: flex;
89
- gap: 10px;
90
- justify-content: center
91
- }
92
- .codigma-get {
93
- color: var(--main-color, var(--primary, #404040));
94
- word-wrap: break-word
95
- }
96
- .codigma-requrl {
97
- color: var(--text, black);
98
- flex: 1 1 0;
99
- word-wrap: break-word
100
- }
101
- /**********************apiunit css style*************************/
102
- .codigma-apiunit {
103
- align-items: flex-start;
104
- background: var(--surface, white);
105
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
106
- display: inline-flex;
107
- flex-direction: column;
108
- gap: 8px;
109
- justify-content: flex-start;
110
- width: 100%
111
- }
112
- .codigma-apiunit-apioperator {
113
- align-items: center;
114
- align-self: stretch;
115
- border-bottom: 1px var(--main-color, var(--primary, #404040)) solid;
116
- border-top: 1px var(--main-color, var(--primary, #404040)) solid;
117
- display: inline-flex;
118
- gap: 10px;
119
- height: 48px;
120
- justify-content: flex-start
121
- }
122
- .codigma-apiunit-method {
123
- align-items: center;
124
- display: flex;
125
- gap: 5px;
126
- height: 48px;
127
- justify-content: center;
128
- width: 100px
129
- }
130
- .codigma-apiunit-methodtype {
131
- align-items: center;
132
- display: flex;
133
- gap: 10px;
134
- justify-content: center
135
- }
136
- .codigma-apiunit-post {
137
- color: var(--main-color, var(--primary, #404040));
138
- word-wrap: break-word
139
- }
140
- .codigma-apiunit-requrl {
141
- color: var(--text, black);
142
- flex: 1 1 0;
143
- word-wrap: break-word;
144
- border-left: 0;
145
- border-right: 0;
146
- border-top: 0;
147
- border-bottom: 1px var(--main-color, var(--primary, #404040)) solid;
148
- height: 70%;
149
- }
150
- .codigma-apiunit-send-button {
151
- align-items: center;
152
- display: flex;
153
- gap: 10px;
154
- height: 32px;
155
- justify-content: center;
156
- width: 88px
157
- }
158
- .codigma-apiunit-send {
159
- color: var(--text, black);
160
- word-wrap: break-word
161
- }
162
- .codigma-apiunit-send-button:hover {
163
- cursor: pointer;
164
- }
165
- .codigma-apiunit-send-button:active {
166
- background-color: gray;
167
- }
168
-
169
- .codigma-apiunit-reqcontent {
170
- align-items: flex-start;
171
- align-self: stretch;
172
- display: flex;
173
- flex-direction: column;
174
- flex: 1 1 0;
175
- gap: 5px;
176
- justify-content: flex-start;
177
- padding-left: 5px;
178
- }
179
- .codigma-apiunit-paramters-section {
180
- align-items: center;
181
- align-self: stretch;
182
- display: inline-flex;
183
- flex: 1 1 0;
184
- justify-content: flex-start
185
- }
186
- .codigma-apiunit-parameters-cnr {
187
- align-items: center;
188
- background: var(--surface, white);
189
- display: flex;
190
- height: 42px;
191
- justify-content: space-between;
192
- width: 122px
193
- }
194
- .codigma-apiunit-parakeyvalues {
195
- align-items: flex-start;
196
- align-self: stretch;
197
- background: var(--surface, white);
198
- display: inline-flex;
199
- flex-direction: column;
200
- flex: 1 1 0;
201
- gap: 10px;
202
- justify-content: flex-start;
203
- overflow: hidden;
204
- padding: 10px
205
- }
206
- .codigma-apiunit-keyvalue {
207
- align-items: center;
208
- display: inline-flex;
209
- flex: 1 1 0;
210
- gap: 10px;
211
- justify-content: flex-start
212
- }
213
- .codigma-apiunit-valuetext {
214
- align-self: stretch;
215
- background: var(--surface, white);
216
- border-left: 0;
217
- border-right: 0;
218
- border-top: 0;
219
- border-bottom: 1px var(--main-color, var(--primary, #404040)) solid;
220
- padding: 10px;
221
- width: 161px
222
- }
223
- /* .codigma-apiunit-keyvalue {
224
- align-items: center;
225
- display: inline-flex;
226
- flex: 1 1 0;
227
- gap: 10px;
228
- justify-content: flex-start;
229
- width: 211px
230
- } */
231
- .codigma-apiunit-request-body-section {
232
- align-items: center;
233
- align-self: stretch;
234
- display: inline-flex;
235
- justify-content: flex-start;
236
- padding-right: 5px
237
- }
238
- .codigma-apiunit-request-body-info {
239
- align-self: stretch;
240
- }
241
- .codigma-apiunit-parakeyvalues {
242
- align-items: flex-start;
243
- align-self: stretch;
244
- background: var(--surface, white);
245
- display: flex;
246
- flex: 1 1 0;
247
- gap: 10px;
248
- justify-content: flex-start;
249
- outline-offset: -1px;
250
- outline: 1px var(--main-color, var(--primary, #404040)) solid;
251
- overflow: hidden;
252
- padding: 10px
253
- }
254
- .codigma-apiunit-reqresponse {
255
- align-items: flex-start;
256
- align-self: stretch;
257
- background: var(--surface, white);
258
- border-top: 1px var(--main-color, var(--primary, #404040)) solid;
259
- display: flex;
260
- flex-direction: column;
261
- flex: 1 1 0;
262
- gap: 10px;
263
- justify-content: flex-start;
264
- padding-left: 5px;
265
- padding-right: 5px
266
- }
267
- .codigma-apiunit-responsedesc {
268
- align-items: center;
269
- align-self: stretch;
270
- display: inline-flex;
271
- justify-content: space-between;
272
- padding-right: 32px
273
- }
274
- .codigma-apiunit-responsetitle {
275
- align-items: center;
276
- border-bottom: 1px var(--main-color, var(--primary, #404040)) solid;
277
- display: flex;
278
- height: 42px;
279
- justify-content: space-between;
280
- width: 122px
281
- }
282
- .codigma-apiunit-response-cnr {
283
- align-items: center;
284
- align-self: stretch;
285
- background: var(--surface, white);
286
- display: flex;
287
- justify-content: space-between;
288
- padding-top: 2px;
289
- width: 122px
290
- }
291
- .codigma-apiunit-responsebody {
292
- position: relative;
293
- align-self: stretch;
294
- flex: 1 1 0;
295
- min-height: 5rem;
296
- flex-shrink: 0;
297
- /* padding: 2px */
298
- }
299
- .codigma-apiunit-apioperator:hover {
300
- cursor: pointer;
301
- color: var(--text, black);
302
- background-color: var(--hover-bg, rgba(169,199,239,0.08));
303
- transition: background-color .12s ease, color .12s ease;
304
- }`;
package/src/model.ts DELETED
@@ -1,45 +0,0 @@
1
- export type TreeNodeType = "folder" | "file" | "bookmark" | "api";
2
- export interface AstTreeNode {
3
- id: string;
4
- label: string;
5
- children: Array<AstTreeNode>;
6
- deepLevel?: number;
7
- isExpanded?: boolean;
8
- nodeType?: TreeNodeType;
9
- isNewData?: boolean;
10
- servers?: Array<string>;
11
- folder?: string;
12
- folderInfo?: {
13
- servers: Array<any>
14
- };
15
- serviceName?: string;
16
- method?: string;
17
- symbol?: string;
18
- path?: string;
19
- url?: string;
20
- summary?: string;
21
- tabLabel?: string;
22
- rawApiInfo?: any;
23
- server?: any;
24
- parentItem?: any,
25
- symbolColor?: string;
26
- consumes?: Array<any>;
27
- produces?: Array<any>;
28
- currentConsume?: string;
29
- requestBody?: any; //适用于openapi 3.0
30
- response?: {
31
- status?: number | string;
32
- statusText?: string;
33
- body?: string;//响应体统一转换成字符串
34
- };
35
- parameterHasBody?: boolean;
36
- parameterHasFormDataVer2?: boolean; //区分openapi 2.0
37
- isActive?: boolean;
38
- hideActiveStatus?: boolean;//当激活了其它的节点的类型为folder的节点被激活时,隐藏非folder节点的激活状态
39
- custom?: boolean;
40
- customQueryparameters?: Array<any>;
41
- customHeaderparameters?: Array<any>;
42
- sourceCodeText?: string;
43
- auth?: any;
44
- rename?: boolean
45
- }
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
- "declaration": true,
7
- "declarationMap": true,
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "moduleResolution": "node",
13
- "outDir": "./dist",
14
- "rootDir": "./src"
15
- },
16
- "include": ["src/**/*"],
17
- "exclude": ["node_modules", "dist"]
18
- }
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
1
- // tsup.config.ts
2
- import { defineConfig } from 'tsup';
3
-
4
- export default defineConfig({
5
- entry: ['src/index.ts'],
6
- format: ['cjs', 'esm'],
7
- dts: true,
8
- sourcemap: true,
9
- clean: true,
10
- splitting: false,
11
- });