@nocobase/plugin-theme-editor 0.12.0-alpha.5 → 0.13.0-alpha.10

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.
@@ -0,0 +1,245 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var swagger_exports = {};
19
+ __export(swagger_exports, {
20
+ default: () => swagger_default
21
+ });
22
+ module.exports = __toCommonJS(swagger_exports);
23
+ var swagger_default = {
24
+ openapi: "3.0.2",
25
+ info: {
26
+ title: "NocoBase API - Theme editor plugin"
27
+ },
28
+ components: {
29
+ schemas: {
30
+ Theme: {
31
+ type: "object",
32
+ properties: {
33
+ id: {
34
+ type: "integer"
35
+ },
36
+ config: {
37
+ type: "object",
38
+ properties: {
39
+ name: {
40
+ type: "string"
41
+ },
42
+ token: {
43
+ type: "object",
44
+ additionalProperties: false
45
+ }
46
+ },
47
+ required: ["name"],
48
+ additionalProperties: false
49
+ },
50
+ optional: {
51
+ type: "boolean"
52
+ },
53
+ isBuiltIn: {
54
+ type: "boolean"
55
+ },
56
+ updatedAt: {
57
+ type: "string",
58
+ format: "date-time"
59
+ },
60
+ createdAt: {
61
+ type: "string",
62
+ format: "date-time"
63
+ }
64
+ },
65
+ required: ["id", "config", "optional", "isBuiltIn"],
66
+ additionalProperties: false
67
+ }
68
+ }
69
+ },
70
+ tags: [],
71
+ paths: {
72
+ "/themeConfig:list": {
73
+ get: {
74
+ tags: ["themeConfig"],
75
+ description: "Get a list of themes",
76
+ parameters: [],
77
+ responses: {
78
+ "200": {
79
+ description: "OK",
80
+ content: {
81
+ "application/json": {
82
+ schema: {
83
+ type: "array",
84
+ items: {
85
+ $ref: "#/components/schemas/Theme"
86
+ }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "401": {
92
+ description: "Unauthorized"
93
+ },
94
+ "404": {
95
+ description: "Not Found"
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "/themeConfig:create": {
101
+ post: {
102
+ tags: ["themeConfig"],
103
+ description: "Create a new theme",
104
+ requestBody: {
105
+ required: true,
106
+ content: {
107
+ "application/json": {
108
+ schema: {
109
+ type: "object",
110
+ properties: {
111
+ config: {
112
+ type: "object",
113
+ properties: {
114
+ name: { type: "string" },
115
+ token: {
116
+ type: "object"
117
+ }
118
+ // 可以根据需要添加其他属性
119
+ },
120
+ required: ["name"],
121
+ additionalProperties: false
122
+ },
123
+ optional: { type: "boolean" },
124
+ isBuiltIn: { type: "boolean" }
125
+ },
126
+ required: ["config"],
127
+ additionalProperties: false
128
+ }
129
+ }
130
+ }
131
+ },
132
+ responses: {
133
+ "200": {
134
+ description: "OK",
135
+ content: {
136
+ "application/json": {
137
+ schema: {
138
+ $ref: "#/components/schemas/Theme"
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "400": {
144
+ description: "Bad Request"
145
+ },
146
+ "401": {
147
+ description: "Unauthorized"
148
+ }
149
+ }
150
+ }
151
+ },
152
+ "/themeConfig:update": {
153
+ post: {
154
+ tags: ["themeConfig"],
155
+ description: "Update an existing theme",
156
+ parameters: [
157
+ {
158
+ name: "id",
159
+ in: "path",
160
+ description: "ID of the theme to update",
161
+ required: true,
162
+ schema: {
163
+ type: "string"
164
+ }
165
+ }
166
+ ],
167
+ requestBody: {
168
+ required: true,
169
+ content: {
170
+ "application/json": {
171
+ schema: {
172
+ type: "object",
173
+ properties: {
174
+ config: {
175
+ type: "object",
176
+ properties: {
177
+ name: { type: "string" },
178
+ token: {
179
+ type: "object"
180
+ }
181
+ // 可以根据需要添加其他属性
182
+ },
183
+ additionalProperties: false
184
+ },
185
+ optional: { type: "boolean" },
186
+ isBuiltIn: { type: "boolean" }
187
+ },
188
+ additionalProperties: false
189
+ }
190
+ }
191
+ }
192
+ },
193
+ responses: {
194
+ "200": {
195
+ description: "OK",
196
+ content: {
197
+ "application/json": {
198
+ schema: {
199
+ $ref: "#/components/schemas/Theme"
200
+ }
201
+ }
202
+ }
203
+ },
204
+ "400": {
205
+ description: "Bad Request"
206
+ },
207
+ "401": {
208
+ description: "Unauthorized"
209
+ },
210
+ "404": {
211
+ description: "Not Found"
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "/themeConfig:destroy": {
217
+ post: {
218
+ tags: ["themeConfig"],
219
+ description: "Delete an existing theme",
220
+ parameters: [
221
+ {
222
+ name: "id",
223
+ in: "path",
224
+ description: "ID of the theme to delete",
225
+ required: true,
226
+ schema: {
227
+ type: "string"
228
+ }
229
+ }
230
+ ],
231
+ responses: {
232
+ "204": {
233
+ description: "No Content"
234
+ },
235
+ "401": {
236
+ description: "Unauthorized"
237
+ },
238
+ "404": {
239
+ description: "Not Found"
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ };
package/dist/types.d.ts CHANGED
@@ -6,7 +6,7 @@ export type ThemeConfig = Config & {
6
6
  export interface ThemeItem {
7
7
  id: number;
8
8
  /** 主题配置内容,一个 JSON 字符串 */
9
- config: ThemeConfig;
9
+ config: ThemeConfig | null;
10
10
  /** 主题是否可选 */
11
11
  optional: boolean;
12
12
  isBuiltIn?: boolean;
package/dist/types.js CHANGED
@@ -1,2 +1,15 @@
1
- 'use strict';
2
-
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var types_exports = {};
15
+ module.exports = __toCommonJS(types_exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-theme-editor",
3
- "version": "0.12.0-alpha.5",
3
+ "version": "0.13.0-alpha.10",
4
4
  "main": "dist/server/index.js",
5
5
  "displayName": "Theme editor",
6
6
  "displayName.zh-CN": "主题编辑器",
@@ -30,5 +30,5 @@
30
30
  "@nocobase/test": "0.x",
31
31
  "@nocobase/utils": "0.x"
32
32
  },
33
- "gitHead": "689cc16e83361c4d0b91907e0deac30bdb907692"
33
+ "gitHead": "5360ed81650f6895f3ed39aede2706467d55862c"
34
34
  }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
-
3
- declare const res: React.FC<React.SVGProps<SVGSVGElement>>;
4
- export default res;
@@ -1,12 +0,0 @@
1
- export { default as Arrow } from './Arrow.js';
2
- export { default as Brush } from './Brush.js';
3
- export { default as CompactTheme } from './Compact.js';
4
- export { default as Control } from './Control.js';
5
- export { default as DarkTheme } from './Dark.js';
6
- export { default as Light } from './Light.js';
7
- export { default as Margin } from './Margin.js';
8
- export { default as Motion } from './Motion.js';
9
- export { default as Pick } from './Pick.js';
10
- export { default as SearchDropdown } from './SearchDropdown.js';
11
- export { default as ShapeLine } from './ShapeLine.js';
12
- export { default as TokenPanelIcon } from './TokenPanel.js';