@djvlc/contracts-schemas 1.4.0 → 1.5.0

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/index.d.mts CHANGED
@@ -154,6 +154,26 @@ declare const pageSchema: {
154
154
  };
155
155
  };
156
156
  PageConfig: {
157
+ type: string;
158
+ description: string;
159
+ additionalProperties: boolean;
160
+ required: string[];
161
+ properties: {
162
+ layout: {
163
+ $ref: string;
164
+ description: string;
165
+ };
166
+ styles: {
167
+ $ref: string;
168
+ description: string;
169
+ };
170
+ behavior: {
171
+ $ref: string;
172
+ description: string;
173
+ };
174
+ };
175
+ };
176
+ PageLayoutConfig: {
157
177
  type: string;
158
178
  description: string;
159
179
  additionalProperties: boolean;
@@ -180,6 +200,71 @@ declare const pageSchema: {
180
200
  };
181
201
  description: string;
182
202
  };
203
+ maxWidth: {
204
+ type: string;
205
+ minimum: number;
206
+ description: string;
207
+ };
208
+ padding: {
209
+ type: string;
210
+ additionalProperties: boolean;
211
+ properties: {
212
+ top: {
213
+ type: string;
214
+ minimum: number;
215
+ };
216
+ right: {
217
+ type: string;
218
+ minimum: number;
219
+ };
220
+ bottom: {
221
+ type: string;
222
+ minimum: number;
223
+ };
224
+ left: {
225
+ type: string;
226
+ minimum: number;
227
+ };
228
+ };
229
+ description: string;
230
+ };
231
+ viewport: {
232
+ $ref: string;
233
+ description: string;
234
+ };
235
+ };
236
+ };
237
+ ViewportConfig: {
238
+ type: string;
239
+ description: string;
240
+ additionalProperties: boolean;
241
+ properties: {
242
+ mobile: {
243
+ type: string;
244
+ minimum: number;
245
+ description: string;
246
+ };
247
+ tablet: {
248
+ type: string;
249
+ minimum: number;
250
+ description: string;
251
+ };
252
+ desktop: {
253
+ type: string;
254
+ minimum: number;
255
+ description: string;
256
+ };
257
+ };
258
+ };
259
+ PageStylesConfig: {
260
+ type: string;
261
+ description: string;
262
+ additionalProperties: boolean;
263
+ properties: {
264
+ theme: {
265
+ $ref: string;
266
+ description: string;
267
+ };
183
268
  background: {
184
269
  $ref: string;
185
270
  };
@@ -190,10 +275,40 @@ declare const pageSchema: {
190
275
  };
191
276
  description: string;
192
277
  };
193
- customStyles: {
278
+ customCSS: {
279
+ type: string;
280
+ description: string;
281
+ };
282
+ };
283
+ };
284
+ ThemeConfig: {
285
+ type: string;
286
+ description: string;
287
+ additionalProperties: boolean;
288
+ properties: {
289
+ preset: {
290
+ type: string;
291
+ enum: string[];
292
+ description: string;
293
+ };
294
+ variables: {
295
+ type: string;
296
+ additionalProperties: {
297
+ type: string;
298
+ };
299
+ description: string;
300
+ };
301
+ transition: {
194
302
  type: string;
195
303
  description: string;
196
304
  };
305
+ };
306
+ };
307
+ PageBehaviorConfig: {
308
+ type: string;
309
+ description: string;
310
+ additionalProperties: boolean;
311
+ properties: {
197
312
  debug: {
198
313
  type: string;
199
314
  description: string;
@@ -4434,6 +4549,26 @@ declare const schemas: {
4434
4549
  };
4435
4550
  };
4436
4551
  PageConfig: {
4552
+ type: string;
4553
+ description: string;
4554
+ additionalProperties: boolean;
4555
+ required: string[];
4556
+ properties: {
4557
+ layout: {
4558
+ $ref: string;
4559
+ description: string;
4560
+ };
4561
+ styles: {
4562
+ $ref: string;
4563
+ description: string;
4564
+ };
4565
+ behavior: {
4566
+ $ref: string;
4567
+ description: string;
4568
+ };
4569
+ };
4570
+ };
4571
+ PageLayoutConfig: {
4437
4572
  type: string;
4438
4573
  description: string;
4439
4574
  additionalProperties: boolean;
@@ -4460,6 +4595,71 @@ declare const schemas: {
4460
4595
  };
4461
4596
  description: string;
4462
4597
  };
4598
+ maxWidth: {
4599
+ type: string;
4600
+ minimum: number;
4601
+ description: string;
4602
+ };
4603
+ padding: {
4604
+ type: string;
4605
+ additionalProperties: boolean;
4606
+ properties: {
4607
+ top: {
4608
+ type: string;
4609
+ minimum: number;
4610
+ };
4611
+ right: {
4612
+ type: string;
4613
+ minimum: number;
4614
+ };
4615
+ bottom: {
4616
+ type: string;
4617
+ minimum: number;
4618
+ };
4619
+ left: {
4620
+ type: string;
4621
+ minimum: number;
4622
+ };
4623
+ };
4624
+ description: string;
4625
+ };
4626
+ viewport: {
4627
+ $ref: string;
4628
+ description: string;
4629
+ };
4630
+ };
4631
+ };
4632
+ ViewportConfig: {
4633
+ type: string;
4634
+ description: string;
4635
+ additionalProperties: boolean;
4636
+ properties: {
4637
+ mobile: {
4638
+ type: string;
4639
+ minimum: number;
4640
+ description: string;
4641
+ };
4642
+ tablet: {
4643
+ type: string;
4644
+ minimum: number;
4645
+ description: string;
4646
+ };
4647
+ desktop: {
4648
+ type: string;
4649
+ minimum: number;
4650
+ description: string;
4651
+ };
4652
+ };
4653
+ };
4654
+ PageStylesConfig: {
4655
+ type: string;
4656
+ description: string;
4657
+ additionalProperties: boolean;
4658
+ properties: {
4659
+ theme: {
4660
+ $ref: string;
4661
+ description: string;
4662
+ };
4463
4663
  background: {
4464
4664
  $ref: string;
4465
4665
  };
@@ -4470,10 +4670,40 @@ declare const schemas: {
4470
4670
  };
4471
4671
  description: string;
4472
4672
  };
4473
- customStyles: {
4673
+ customCSS: {
4674
+ type: string;
4675
+ description: string;
4676
+ };
4677
+ };
4678
+ };
4679
+ ThemeConfig: {
4680
+ type: string;
4681
+ description: string;
4682
+ additionalProperties: boolean;
4683
+ properties: {
4684
+ preset: {
4685
+ type: string;
4686
+ enum: string[];
4687
+ description: string;
4688
+ };
4689
+ variables: {
4690
+ type: string;
4691
+ additionalProperties: {
4692
+ type: string;
4693
+ };
4694
+ description: string;
4695
+ };
4696
+ transition: {
4474
4697
  type: string;
4475
4698
  description: string;
4476
4699
  };
4700
+ };
4701
+ };
4702
+ PageBehaviorConfig: {
4703
+ type: string;
4704
+ description: string;
4705
+ additionalProperties: boolean;
4706
+ properties: {
4477
4707
  debug: {
4478
4708
  type: string;
4479
4709
  description: string;
package/dist/index.d.ts CHANGED
@@ -154,6 +154,26 @@ declare const pageSchema: {
154
154
  };
155
155
  };
156
156
  PageConfig: {
157
+ type: string;
158
+ description: string;
159
+ additionalProperties: boolean;
160
+ required: string[];
161
+ properties: {
162
+ layout: {
163
+ $ref: string;
164
+ description: string;
165
+ };
166
+ styles: {
167
+ $ref: string;
168
+ description: string;
169
+ };
170
+ behavior: {
171
+ $ref: string;
172
+ description: string;
173
+ };
174
+ };
175
+ };
176
+ PageLayoutConfig: {
157
177
  type: string;
158
178
  description: string;
159
179
  additionalProperties: boolean;
@@ -180,6 +200,71 @@ declare const pageSchema: {
180
200
  };
181
201
  description: string;
182
202
  };
203
+ maxWidth: {
204
+ type: string;
205
+ minimum: number;
206
+ description: string;
207
+ };
208
+ padding: {
209
+ type: string;
210
+ additionalProperties: boolean;
211
+ properties: {
212
+ top: {
213
+ type: string;
214
+ minimum: number;
215
+ };
216
+ right: {
217
+ type: string;
218
+ minimum: number;
219
+ };
220
+ bottom: {
221
+ type: string;
222
+ minimum: number;
223
+ };
224
+ left: {
225
+ type: string;
226
+ minimum: number;
227
+ };
228
+ };
229
+ description: string;
230
+ };
231
+ viewport: {
232
+ $ref: string;
233
+ description: string;
234
+ };
235
+ };
236
+ };
237
+ ViewportConfig: {
238
+ type: string;
239
+ description: string;
240
+ additionalProperties: boolean;
241
+ properties: {
242
+ mobile: {
243
+ type: string;
244
+ minimum: number;
245
+ description: string;
246
+ };
247
+ tablet: {
248
+ type: string;
249
+ minimum: number;
250
+ description: string;
251
+ };
252
+ desktop: {
253
+ type: string;
254
+ minimum: number;
255
+ description: string;
256
+ };
257
+ };
258
+ };
259
+ PageStylesConfig: {
260
+ type: string;
261
+ description: string;
262
+ additionalProperties: boolean;
263
+ properties: {
264
+ theme: {
265
+ $ref: string;
266
+ description: string;
267
+ };
183
268
  background: {
184
269
  $ref: string;
185
270
  };
@@ -190,10 +275,40 @@ declare const pageSchema: {
190
275
  };
191
276
  description: string;
192
277
  };
193
- customStyles: {
278
+ customCSS: {
279
+ type: string;
280
+ description: string;
281
+ };
282
+ };
283
+ };
284
+ ThemeConfig: {
285
+ type: string;
286
+ description: string;
287
+ additionalProperties: boolean;
288
+ properties: {
289
+ preset: {
290
+ type: string;
291
+ enum: string[];
292
+ description: string;
293
+ };
294
+ variables: {
295
+ type: string;
296
+ additionalProperties: {
297
+ type: string;
298
+ };
299
+ description: string;
300
+ };
301
+ transition: {
194
302
  type: string;
195
303
  description: string;
196
304
  };
305
+ };
306
+ };
307
+ PageBehaviorConfig: {
308
+ type: string;
309
+ description: string;
310
+ additionalProperties: boolean;
311
+ properties: {
197
312
  debug: {
198
313
  type: string;
199
314
  description: string;
@@ -4434,6 +4549,26 @@ declare const schemas: {
4434
4549
  };
4435
4550
  };
4436
4551
  PageConfig: {
4552
+ type: string;
4553
+ description: string;
4554
+ additionalProperties: boolean;
4555
+ required: string[];
4556
+ properties: {
4557
+ layout: {
4558
+ $ref: string;
4559
+ description: string;
4560
+ };
4561
+ styles: {
4562
+ $ref: string;
4563
+ description: string;
4564
+ };
4565
+ behavior: {
4566
+ $ref: string;
4567
+ description: string;
4568
+ };
4569
+ };
4570
+ };
4571
+ PageLayoutConfig: {
4437
4572
  type: string;
4438
4573
  description: string;
4439
4574
  additionalProperties: boolean;
@@ -4460,6 +4595,71 @@ declare const schemas: {
4460
4595
  };
4461
4596
  description: string;
4462
4597
  };
4598
+ maxWidth: {
4599
+ type: string;
4600
+ minimum: number;
4601
+ description: string;
4602
+ };
4603
+ padding: {
4604
+ type: string;
4605
+ additionalProperties: boolean;
4606
+ properties: {
4607
+ top: {
4608
+ type: string;
4609
+ minimum: number;
4610
+ };
4611
+ right: {
4612
+ type: string;
4613
+ minimum: number;
4614
+ };
4615
+ bottom: {
4616
+ type: string;
4617
+ minimum: number;
4618
+ };
4619
+ left: {
4620
+ type: string;
4621
+ minimum: number;
4622
+ };
4623
+ };
4624
+ description: string;
4625
+ };
4626
+ viewport: {
4627
+ $ref: string;
4628
+ description: string;
4629
+ };
4630
+ };
4631
+ };
4632
+ ViewportConfig: {
4633
+ type: string;
4634
+ description: string;
4635
+ additionalProperties: boolean;
4636
+ properties: {
4637
+ mobile: {
4638
+ type: string;
4639
+ minimum: number;
4640
+ description: string;
4641
+ };
4642
+ tablet: {
4643
+ type: string;
4644
+ minimum: number;
4645
+ description: string;
4646
+ };
4647
+ desktop: {
4648
+ type: string;
4649
+ minimum: number;
4650
+ description: string;
4651
+ };
4652
+ };
4653
+ };
4654
+ PageStylesConfig: {
4655
+ type: string;
4656
+ description: string;
4657
+ additionalProperties: boolean;
4658
+ properties: {
4659
+ theme: {
4660
+ $ref: string;
4661
+ description: string;
4662
+ };
4463
4663
  background: {
4464
4664
  $ref: string;
4465
4665
  };
@@ -4470,10 +4670,40 @@ declare const schemas: {
4470
4670
  };
4471
4671
  description: string;
4472
4672
  };
4473
- customStyles: {
4673
+ customCSS: {
4674
+ type: string;
4675
+ description: string;
4676
+ };
4677
+ };
4678
+ };
4679
+ ThemeConfig: {
4680
+ type: string;
4681
+ description: string;
4682
+ additionalProperties: boolean;
4683
+ properties: {
4684
+ preset: {
4685
+ type: string;
4686
+ enum: string[];
4687
+ description: string;
4688
+ };
4689
+ variables: {
4690
+ type: string;
4691
+ additionalProperties: {
4692
+ type: string;
4693
+ };
4694
+ description: string;
4695
+ };
4696
+ transition: {
4474
4697
  type: string;
4475
4698
  description: string;
4476
4699
  };
4700
+ };
4701
+ };
4702
+ PageBehaviorConfig: {
4703
+ type: string;
4704
+ description: string;
4705
+ additionalProperties: boolean;
4706
+ properties: {
4477
4707
  debug: {
4478
4708
  type: string;
4479
4709
  description: string;
package/dist/index.js CHANGED
@@ -132,7 +132,27 @@ var page_schema_default = {
132
132
  },
133
133
  PageConfig: {
134
134
  type: "object",
135
- description: "\u9875\u9762\u914D\u7F6E",
135
+ description: "\u9875\u9762\u914D\u7F6E\uFF08\u4E09\u5C42\u5206\u79BB\uFF1Alayout / styles / behavior\uFF09",
136
+ additionalProperties: false,
137
+ required: ["layout"],
138
+ properties: {
139
+ layout: {
140
+ $ref: "#/definitions/PageLayoutConfig",
141
+ description: "\u5E03\u5C40\u914D\u7F6E"
142
+ },
143
+ styles: {
144
+ $ref: "#/definitions/PageStylesConfig",
145
+ description: "\u6837\u5F0F\u914D\u7F6E"
146
+ },
147
+ behavior: {
148
+ $ref: "#/definitions/PageBehaviorConfig",
149
+ description: "\u884C\u4E3A\u914D\u7F6E"
150
+ }
151
+ }
152
+ },
153
+ PageLayoutConfig: {
154
+ type: "object",
155
+ description: "\u9875\u9762\u5E03\u5C40\u914D\u7F6E\uFF08\u8FD0\u884C\u65F6\u9700\u7B2C\u4E00\u65F6\u95F4\u89E3\u6790\uFF0C\u5F71\u54CD\u6574\u4F53\u6E32\u67D3\u7B56\u7565\uFF09",
136
156
  additionalProperties: false,
137
157
  required: ["canvasType"],
138
158
  properties: {
@@ -149,18 +169,99 @@ var page_schema_default = {
149
169
  width: { type: "integer", minimum: 1 },
150
170
  height: { type: "integer", minimum: 1 }
151
171
  },
152
- description: "\u753B\u5E03\u5C3A\u5BF8"
172
+ description: "\u753B\u5E03\u5C3A\u5BF8\uFF08\u4EC5 canvasType \u975E responsive \u65F6\u751F\u6548\uFF09"
173
+ },
174
+ maxWidth: {
175
+ type: "integer",
176
+ minimum: 1,
177
+ description: "\u5185\u5BB9\u6700\u5927\u5BBD\u5EA6\uFF08\u54CD\u5E94\u5F0F\u9875\u9762\u5E38\u7528\uFF09"
178
+ },
179
+ padding: {
180
+ type: "object",
181
+ additionalProperties: false,
182
+ properties: {
183
+ top: { type: "number", minimum: 0 },
184
+ right: { type: "number", minimum: 0 },
185
+ bottom: { type: "number", minimum: 0 },
186
+ left: { type: "number", minimum: 0 }
187
+ },
188
+ description: "\u9875\u9762\u5BB9\u5668\u5185\u8FB9\u8DDD"
189
+ },
190
+ viewport: {
191
+ $ref: "#/definitions/ViewportConfig",
192
+ description: "\u89C6\u53E3\u65AD\u70B9\u914D\u7F6E\uFF08\u54CD\u5E94\u5F0F\u9875\u9762\u4F7F\u7528\uFF09"
193
+ }
194
+ }
195
+ },
196
+ ViewportConfig: {
197
+ type: "object",
198
+ description: "\u89C6\u53E3\u65AD\u70B9\u914D\u7F6E",
199
+ additionalProperties: false,
200
+ properties: {
201
+ mobile: {
202
+ type: "integer",
203
+ minimum: 1,
204
+ description: "\u79FB\u52A8\u7AEF\u65AD\u70B9\uFF08\u9ED8\u8BA4 768px\uFF09"
205
+ },
206
+ tablet: {
207
+ type: "integer",
208
+ minimum: 1,
209
+ description: "\u5E73\u677F\u65AD\u70B9\uFF08\u9ED8\u8BA4 1024px\uFF09"
210
+ },
211
+ desktop: {
212
+ type: "integer",
213
+ minimum: 1,
214
+ description: "\u684C\u9762\u65AD\u70B9\uFF08\u9ED8\u8BA4 1440px\uFF09"
215
+ }
216
+ }
217
+ },
218
+ PageStylesConfig: {
219
+ type: "object",
220
+ description: "\u9875\u9762\u6837\u5F0F\u914D\u7F6E\uFF08\u7EAF\u89C6\u89C9\u6837\u5F0F\uFF0C\u53EF\u5EF6\u8FDF\u6216\u589E\u91CF\u5E94\u7528\uFF09",
221
+ additionalProperties: false,
222
+ properties: {
223
+ theme: {
224
+ $ref: "#/definitions/ThemeConfig",
225
+ description: "\u4E3B\u9898\u914D\u7F6E"
153
226
  },
154
227
  background: { $ref: "#/definitions/BackgroundConfig" },
155
228
  cssVariables: {
156
229
  type: "object",
157
230
  additionalProperties: { type: "string" },
158
- description: "\u9875\u9762\u7EA7 CSS \u53D8\u91CF"
231
+ description: "\u9875\u9762\u7EA7 CSS \u53D8\u91CF\uFF08\u4E0E theme.variables \u5408\u5E76\uFF0C\u6B64\u5904\u4F18\u5148\u7EA7\u66F4\u9AD8\uFF09"
159
232
  },
160
- customStyles: {
233
+ customCSS: {
234
+ type: "string",
235
+ description: "\u9875\u9762\u7EA7\u81EA\u5B9A\u4E49\u6837\u5F0F\uFF08\u6CE8\u5165 <style>\uFF09"
236
+ }
237
+ }
238
+ },
239
+ ThemeConfig: {
240
+ type: "object",
241
+ description: "\u4E3B\u9898\u914D\u7F6E",
242
+ additionalProperties: false,
243
+ properties: {
244
+ preset: {
161
245
  type: "string",
162
- description: "\u9875\u9762\u7EA7\u81EA\u5B9A\u4E49\u6837\u5F0F"
246
+ enum: ["light", "dark", "system", "custom"],
247
+ description: "\u9884\u8BBE\u4E3B\u9898"
248
+ },
249
+ variables: {
250
+ type: "object",
251
+ additionalProperties: { type: "string" },
252
+ description: "\u4E3B\u9898\u53D8\u91CF\u8986\u76D6\uFF08\u4F18\u5148\u7EA7\u9AD8\u4E8E preset\uFF09"
163
253
  },
254
+ transition: {
255
+ type: "boolean",
256
+ description: "\u989C\u8272\u6A21\u5F0F\u5207\u6362\u65F6\u7684\u8FC7\u6E21\u52A8\u753B"
257
+ }
258
+ }
259
+ },
260
+ PageBehaviorConfig: {
261
+ type: "object",
262
+ description: "\u9875\u9762\u884C\u4E3A\u914D\u7F6E\uFF08\u63A7\u5236\u8FD0\u884C\u65F6\u884C\u4E3A\uFF0C\u4E0E\u6E32\u67D3\u65E0\u76F4\u63A5\u5173\u7CFB\uFF09",
263
+ additionalProperties: false,
264
+ properties: {
164
265
  debug: {
165
266
  type: "boolean",
166
267
  description: "\u662F\u5426\u542F\u7528\u8C03\u8BD5\u6A21\u5F0F"
package/dist/index.mjs CHANGED
@@ -130,7 +130,27 @@ var page_schema_default = {
130
130
  },
131
131
  PageConfig: {
132
132
  type: "object",
133
- description: "\u9875\u9762\u914D\u7F6E",
133
+ description: "\u9875\u9762\u914D\u7F6E\uFF08\u4E09\u5C42\u5206\u79BB\uFF1Alayout / styles / behavior\uFF09",
134
+ additionalProperties: false,
135
+ required: ["layout"],
136
+ properties: {
137
+ layout: {
138
+ $ref: "#/definitions/PageLayoutConfig",
139
+ description: "\u5E03\u5C40\u914D\u7F6E"
140
+ },
141
+ styles: {
142
+ $ref: "#/definitions/PageStylesConfig",
143
+ description: "\u6837\u5F0F\u914D\u7F6E"
144
+ },
145
+ behavior: {
146
+ $ref: "#/definitions/PageBehaviorConfig",
147
+ description: "\u884C\u4E3A\u914D\u7F6E"
148
+ }
149
+ }
150
+ },
151
+ PageLayoutConfig: {
152
+ type: "object",
153
+ description: "\u9875\u9762\u5E03\u5C40\u914D\u7F6E\uFF08\u8FD0\u884C\u65F6\u9700\u7B2C\u4E00\u65F6\u95F4\u89E3\u6790\uFF0C\u5F71\u54CD\u6574\u4F53\u6E32\u67D3\u7B56\u7565\uFF09",
134
154
  additionalProperties: false,
135
155
  required: ["canvasType"],
136
156
  properties: {
@@ -147,18 +167,99 @@ var page_schema_default = {
147
167
  width: { type: "integer", minimum: 1 },
148
168
  height: { type: "integer", minimum: 1 }
149
169
  },
150
- description: "\u753B\u5E03\u5C3A\u5BF8"
170
+ description: "\u753B\u5E03\u5C3A\u5BF8\uFF08\u4EC5 canvasType \u975E responsive \u65F6\u751F\u6548\uFF09"
171
+ },
172
+ maxWidth: {
173
+ type: "integer",
174
+ minimum: 1,
175
+ description: "\u5185\u5BB9\u6700\u5927\u5BBD\u5EA6\uFF08\u54CD\u5E94\u5F0F\u9875\u9762\u5E38\u7528\uFF09"
176
+ },
177
+ padding: {
178
+ type: "object",
179
+ additionalProperties: false,
180
+ properties: {
181
+ top: { type: "number", minimum: 0 },
182
+ right: { type: "number", minimum: 0 },
183
+ bottom: { type: "number", minimum: 0 },
184
+ left: { type: "number", minimum: 0 }
185
+ },
186
+ description: "\u9875\u9762\u5BB9\u5668\u5185\u8FB9\u8DDD"
187
+ },
188
+ viewport: {
189
+ $ref: "#/definitions/ViewportConfig",
190
+ description: "\u89C6\u53E3\u65AD\u70B9\u914D\u7F6E\uFF08\u54CD\u5E94\u5F0F\u9875\u9762\u4F7F\u7528\uFF09"
191
+ }
192
+ }
193
+ },
194
+ ViewportConfig: {
195
+ type: "object",
196
+ description: "\u89C6\u53E3\u65AD\u70B9\u914D\u7F6E",
197
+ additionalProperties: false,
198
+ properties: {
199
+ mobile: {
200
+ type: "integer",
201
+ minimum: 1,
202
+ description: "\u79FB\u52A8\u7AEF\u65AD\u70B9\uFF08\u9ED8\u8BA4 768px\uFF09"
203
+ },
204
+ tablet: {
205
+ type: "integer",
206
+ minimum: 1,
207
+ description: "\u5E73\u677F\u65AD\u70B9\uFF08\u9ED8\u8BA4 1024px\uFF09"
208
+ },
209
+ desktop: {
210
+ type: "integer",
211
+ minimum: 1,
212
+ description: "\u684C\u9762\u65AD\u70B9\uFF08\u9ED8\u8BA4 1440px\uFF09"
213
+ }
214
+ }
215
+ },
216
+ PageStylesConfig: {
217
+ type: "object",
218
+ description: "\u9875\u9762\u6837\u5F0F\u914D\u7F6E\uFF08\u7EAF\u89C6\u89C9\u6837\u5F0F\uFF0C\u53EF\u5EF6\u8FDF\u6216\u589E\u91CF\u5E94\u7528\uFF09",
219
+ additionalProperties: false,
220
+ properties: {
221
+ theme: {
222
+ $ref: "#/definitions/ThemeConfig",
223
+ description: "\u4E3B\u9898\u914D\u7F6E"
151
224
  },
152
225
  background: { $ref: "#/definitions/BackgroundConfig" },
153
226
  cssVariables: {
154
227
  type: "object",
155
228
  additionalProperties: { type: "string" },
156
- description: "\u9875\u9762\u7EA7 CSS \u53D8\u91CF"
229
+ description: "\u9875\u9762\u7EA7 CSS \u53D8\u91CF\uFF08\u4E0E theme.variables \u5408\u5E76\uFF0C\u6B64\u5904\u4F18\u5148\u7EA7\u66F4\u9AD8\uFF09"
157
230
  },
158
- customStyles: {
231
+ customCSS: {
232
+ type: "string",
233
+ description: "\u9875\u9762\u7EA7\u81EA\u5B9A\u4E49\u6837\u5F0F\uFF08\u6CE8\u5165 <style>\uFF09"
234
+ }
235
+ }
236
+ },
237
+ ThemeConfig: {
238
+ type: "object",
239
+ description: "\u4E3B\u9898\u914D\u7F6E",
240
+ additionalProperties: false,
241
+ properties: {
242
+ preset: {
159
243
  type: "string",
160
- description: "\u9875\u9762\u7EA7\u81EA\u5B9A\u4E49\u6837\u5F0F"
244
+ enum: ["light", "dark", "system", "custom"],
245
+ description: "\u9884\u8BBE\u4E3B\u9898"
246
+ },
247
+ variables: {
248
+ type: "object",
249
+ additionalProperties: { type: "string" },
250
+ description: "\u4E3B\u9898\u53D8\u91CF\u8986\u76D6\uFF08\u4F18\u5148\u7EA7\u9AD8\u4E8E preset\uFF09"
161
251
  },
252
+ transition: {
253
+ type: "boolean",
254
+ description: "\u989C\u8272\u6A21\u5F0F\u5207\u6362\u65F6\u7684\u8FC7\u6E21\u52A8\u753B"
255
+ }
256
+ }
257
+ },
258
+ PageBehaviorConfig: {
259
+ type: "object",
260
+ description: "\u9875\u9762\u884C\u4E3A\u914D\u7F6E\uFF08\u63A7\u5236\u8FD0\u884C\u65F6\u884C\u4E3A\uFF0C\u4E0E\u6E32\u67D3\u65E0\u76F4\u63A5\u5173\u7CFB\uFF09",
261
+ additionalProperties: false,
262
+ properties: {
162
263
  debug: {
163
264
  type: "boolean",
164
265
  description: "\u662F\u5426\u542F\u7528\u8C03\u8BD5\u6A21\u5F0F"
@@ -137,7 +137,28 @@
137
137
 
138
138
  "PageConfig": {
139
139
  "type": "object",
140
- "description": "页面配置",
140
+ "description": "页面配置(三层分离:layout / styles / behavior)",
141
+ "additionalProperties": false,
142
+ "required": ["layout"],
143
+ "properties": {
144
+ "layout": {
145
+ "$ref": "#/definitions/PageLayoutConfig",
146
+ "description": "布局配置"
147
+ },
148
+ "styles": {
149
+ "$ref": "#/definitions/PageStylesConfig",
150
+ "description": "样式配置"
151
+ },
152
+ "behavior": {
153
+ "$ref": "#/definitions/PageBehaviorConfig",
154
+ "description": "行为配置"
155
+ }
156
+ }
157
+ },
158
+
159
+ "PageLayoutConfig": {
160
+ "type": "object",
161
+ "description": "页面布局配置(运行时需第一时间解析,影响整体渲染策略)",
141
162
  "additionalProperties": false,
142
163
  "required": ["canvasType"],
143
164
  "properties": {
@@ -154,18 +175,103 @@
154
175
  "width": { "type": "integer", "minimum": 1 },
155
176
  "height": { "type": "integer", "minimum": 1 }
156
177
  },
157
- "description": "画布尺寸"
178
+ "description": "画布尺寸(仅 canvasType 非 responsive 时生效)"
179
+ },
180
+ "maxWidth": {
181
+ "type": "integer",
182
+ "minimum": 1,
183
+ "description": "内容最大宽度(响应式页面常用)"
184
+ },
185
+ "padding": {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "properties": {
189
+ "top": { "type": "number", "minimum": 0 },
190
+ "right": { "type": "number", "minimum": 0 },
191
+ "bottom": { "type": "number", "minimum": 0 },
192
+ "left": { "type": "number", "minimum": 0 }
193
+ },
194
+ "description": "页面容器内边距"
195
+ },
196
+ "viewport": {
197
+ "$ref": "#/definitions/ViewportConfig",
198
+ "description": "视口断点配置(响应式页面使用)"
199
+ }
200
+ }
201
+ },
202
+
203
+ "ViewportConfig": {
204
+ "type": "object",
205
+ "description": "视口断点配置",
206
+ "additionalProperties": false,
207
+ "properties": {
208
+ "mobile": {
209
+ "type": "integer",
210
+ "minimum": 1,
211
+ "description": "移动端断点(默认 768px)"
212
+ },
213
+ "tablet": {
214
+ "type": "integer",
215
+ "minimum": 1,
216
+ "description": "平板断点(默认 1024px)"
217
+ },
218
+ "desktop": {
219
+ "type": "integer",
220
+ "minimum": 1,
221
+ "description": "桌面断点(默认 1440px)"
222
+ }
223
+ }
224
+ },
225
+
226
+ "PageStylesConfig": {
227
+ "type": "object",
228
+ "description": "页面样式配置(纯视觉样式,可延迟或增量应用)",
229
+ "additionalProperties": false,
230
+ "properties": {
231
+ "theme": {
232
+ "$ref": "#/definitions/ThemeConfig",
233
+ "description": "主题配置"
158
234
  },
159
235
  "background": { "$ref": "#/definitions/BackgroundConfig" },
160
236
  "cssVariables": {
161
237
  "type": "object",
162
238
  "additionalProperties": { "type": "string" },
163
- "description": "页面级 CSS 变量"
239
+ "description": "页面级 CSS 变量(与 theme.variables 合并,此处优先级更高)"
164
240
  },
165
- "customStyles": {
241
+ "customCSS": {
166
242
  "type": "string",
167
- "description": "页面级自定义样式"
243
+ "description": "页面级自定义样式(注入 <style>)"
244
+ }
245
+ }
246
+ },
247
+
248
+ "ThemeConfig": {
249
+ "type": "object",
250
+ "description": "主题配置",
251
+ "additionalProperties": false,
252
+ "properties": {
253
+ "preset": {
254
+ "type": "string",
255
+ "enum": ["light", "dark", "system", "custom"],
256
+ "description": "预设主题"
168
257
  },
258
+ "variables": {
259
+ "type": "object",
260
+ "additionalProperties": { "type": "string" },
261
+ "description": "主题变量覆盖(优先级高于 preset)"
262
+ },
263
+ "transition": {
264
+ "type": "boolean",
265
+ "description": "颜色模式切换时的过渡动画"
266
+ }
267
+ }
268
+ },
269
+
270
+ "PageBehaviorConfig": {
271
+ "type": "object",
272
+ "description": "页面行为配置(控制运行时行为,与渲染无直接关系)",
273
+ "additionalProperties": false,
274
+ "properties": {
169
275
  "debug": {
170
276
  "type": "boolean",
171
277
  "description": "是否启用调试模式"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djvlc/contracts-schemas",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "DJVLC Low-code Platform JSON Schema 定义",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",