@panneau/protocol 5.0.0-alpha.28 → 5.0.0-alpha.29
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.js +3 -2
- package/dist/lint.d.ts +1 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +57 -8
- package/dist/lint.js.map +1 -1
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +39 -22
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts +3 -1
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +37 -12
- package/dist/mock/index.js.map +1 -1
- package/dist/resourceTypes.d.ts +39 -0
- package/dist/resourceTypes.d.ts.map +1 -0
- package/dist/resourceTypes.js +34 -0
- package/dist/resourceTypes.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -1
- package/dist/schemas/action.d.ts +1 -0
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/api.d.ts +6 -0
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +2 -1
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/definition.d.ts +8 -0
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/index.d.ts +32 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/layout.d.ts +1 -0
- package/dist/schemas/layout.d.ts.map +1 -1
- package/dist/schemas/layout.js +2 -1
- package/dist/schemas/layout.js.map +1 -1
- package/dist/schemas/resource.d.ts +16 -3
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +13 -3
- package/dist/schemas/resource.js.map +1 -1
- package/dist/schemas/theme.d.ts +4 -0
- package/dist/schemas/theme.d.ts.map +1 -1
- package/dist/schemas/theme.js +1 -0
- package/dist/schemas/theme.js.map +1 -1
- package/package.json +1 -1
- package/schema/boot.schema.json +45 -1
- package/schema/definition.schema.json +45 -1
- package/schema/openapi.json +65 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { Field } from './field.js';
|
|
3
3
|
import { LayoutNode } from './layout.js';
|
|
4
4
|
export declare const ResourceFeatures: z.ZodObject<{
|
|
5
5
|
drafts: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -13,6 +13,14 @@ export declare const ResourceFeatures: z.ZodObject<{
|
|
|
13
13
|
}, z.core.$loose>]>>;
|
|
14
14
|
search: z.ZodOptional<z.ZodBoolean>;
|
|
15
15
|
}, z.core.$loose>;
|
|
16
|
+
export declare const ResourceType: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
21
|
+
fields: z.ZodArray<typeof Field>;
|
|
22
|
+
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
23
|
+
}, z.core.$loose>;
|
|
16
24
|
export declare const Resource: z.ZodObject<{
|
|
17
25
|
id: z.ZodString;
|
|
18
26
|
kind: z.ZodOptional<z.ZodString>;
|
|
@@ -214,7 +222,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
214
222
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
215
223
|
display: z.ZodOptional<z.ZodString>;
|
|
216
224
|
fields: z.ZodOptional<z.ZodArray<typeof Field>>;
|
|
217
|
-
types: z.ZodOptional<z.ZodArray<typeof BlockType>>;
|
|
225
|
+
types: z.ZodOptional<z.ZodArray<typeof import("./field.js").BlockType>>;
|
|
218
226
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
219
227
|
}, z.core.$loose>>;
|
|
220
228
|
form: z.ZodOptional<z.ZodObject<{
|
|
@@ -225,6 +233,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
225
233
|
description: z.ZodOptional<z.ZodString>;
|
|
226
234
|
text: z.ZodOptional<z.ZodString>;
|
|
227
235
|
component: z.ZodOptional<z.ZodString>;
|
|
236
|
+
panel: z.ZodOptional<z.ZodString>;
|
|
228
237
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
229
238
|
width: z.ZodOptional<z.ZodNumber>;
|
|
230
239
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -501,7 +510,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
501
510
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
502
511
|
display: z.ZodOptional<z.ZodString>;
|
|
503
512
|
fields: z.ZodOptional<z.ZodArray<typeof Field>>;
|
|
504
|
-
types: z.ZodOptional<z.ZodArray<typeof BlockType>>;
|
|
513
|
+
types: z.ZodOptional<z.ZodArray<typeof import("./field.js").BlockType>>;
|
|
505
514
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
506
515
|
}, z.core.$loose>>>;
|
|
507
516
|
layout: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -511,6 +520,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
511
520
|
description: z.ZodOptional<z.ZodString>;
|
|
512
521
|
text: z.ZodOptional<z.ZodString>;
|
|
513
522
|
component: z.ZodOptional<z.ZodString>;
|
|
523
|
+
panel: z.ZodOptional<z.ZodString>;
|
|
514
524
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
515
525
|
width: z.ZodOptional<z.ZodNumber>;
|
|
516
526
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -550,12 +560,15 @@ export declare const Resource: z.ZodObject<{
|
|
|
550
560
|
types: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
551
561
|
id: z.ZodString;
|
|
552
562
|
label: z.ZodString;
|
|
563
|
+
description: z.ZodOptional<z.ZodString>;
|
|
553
564
|
icon: z.ZodOptional<z.ZodString>;
|
|
554
565
|
fields: z.ZodArray<typeof Field>;
|
|
566
|
+
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
555
567
|
}, z.core.$loose>>>;
|
|
556
568
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
557
569
|
}, z.core.$loose>;
|
|
558
570
|
export type ResourceFeatures = z.infer<typeof ResourceFeatures>;
|
|
571
|
+
export type ResourceType = z.infer<typeof ResourceType>;
|
|
559
572
|
export type Resource = z.infer<typeof Resource>;
|
|
560
573
|
/** A resource as a backend writes it, before defaults are applied. */
|
|
561
574
|
export type ResourceInput = z.input<typeof Resource>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/schemas/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/schemas/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAmB3B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;YAeH,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC;;iBAcxC,CAAC;AAEP,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAhBC,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC;;;;iBA6DoB,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
package/dist/schemas/resource.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Abilities } from "./common.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Field } from "./field.js";
|
|
3
3
|
import { LayoutNode } from "./layout.js";
|
|
4
4
|
import { Action } from "./action.js";
|
|
5
5
|
import { ListDefinition } from "./list.js";
|
|
@@ -14,6 +14,16 @@ var ResourceFeatures = z.looseObject({
|
|
|
14
14
|
})]).optional(),
|
|
15
15
|
search: z.boolean().optional().meta({ description: "Whether the resource is in the global search. Defaults to whether its list has a search (`list.search`)." })
|
|
16
16
|
});
|
|
17
|
+
var ResourceType = z.looseObject({
|
|
18
|
+
id: z.string().min(1).meta({ description: "The `type` of the items of this type, which the client sends on create." }),
|
|
19
|
+
label: z.string().meta({ description: "The name of the type: the title of its create form and of its choice when creating." }),
|
|
20
|
+
description: z.string().optional().meta({ description: "A line under the label, in the choice of a type." }),
|
|
21
|
+
icon: z.string().optional(),
|
|
22
|
+
get fields() {
|
|
23
|
+
return z.array(Field).meta({ description: "The type's own fields, after those of the resource. The resource's `form.layout` can name them: forms of the other types leave them out." });
|
|
24
|
+
},
|
|
25
|
+
abilities: Abilities.optional().meta({ description: "`create: false`: the type is not offered when creating, and the backend refuses to create one (a singleton such as the home page). Its items can still be edited." })
|
|
26
|
+
}).meta({ description: "A type of the items of a resource (decision 0077): the items of a type have the fields of the resource and its own." });
|
|
17
27
|
var Resource = z.looseObject({
|
|
18
28
|
id: z.string().min(1),
|
|
19
29
|
kind: z.string().min(1).optional().meta({ description: "What the resource is. `media`: a library of media (decision 0026), with a `file` field and a `media` on each item. Without it, an ordinary resource. Clients treat a kind they don't know as an ordinary resource." }),
|
|
@@ -34,10 +44,10 @@ var Resource = z.looseObject({
|
|
|
34
44
|
actions: z.array(Action).optional(),
|
|
35
45
|
abilities: Abilities.optional(),
|
|
36
46
|
features: ResourceFeatures.optional(),
|
|
37
|
-
types: z.array(
|
|
47
|
+
types: z.array(ResourceType).optional().meta({ description: "The types of the resource's items, each with fields of its own (decision 0077). Each item has a `type`, set when it is created, among their ids." }),
|
|
38
48
|
settings: z.record(z.string(), z.unknown()).optional()
|
|
39
49
|
}).meta({ description: "A set of items managed in the admin." });
|
|
40
50
|
//#endregion
|
|
41
|
-
export { Resource, ResourceFeatures };
|
|
51
|
+
export { Resource, ResourceFeatures, ResourceType };
|
|
42
52
|
|
|
43
53
|
//# sourceMappingURL=resource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","names":[],"sources":["../../src/schemas/resource.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action } from './action';\nimport { Abilities } from './common';\nimport {
|
|
1
|
+
{"version":3,"file":"resource.js","names":[],"sources":["../../src/schemas/resource.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action } from './action';\nimport { Abilities } from './common';\nimport { Field } from './field';\nimport { LayoutNode } from './layout';\nimport { ListDefinition } from './list';\n\nexport const ResourceFeatures = z.looseObject({\n drafts: z.boolean().optional(),\n revisions: z.boolean().optional(),\n preview: z\n .union([\n z.null(),\n z.looseObject({\n mode: z.enum(['component', 'iframe']),\n component: z\n .string()\n .optional()\n .meta({ description: '`component`: the plugin preview.' }),\n }),\n ])\n .optional(),\n search: z.boolean().optional().meta({\n description:\n 'Whether the resource is in the global search. Defaults to whether its list has a search (`list.search`).',\n }),\n});\n\nexport const ResourceType = z\n .looseObject({\n id: z.string().min(1).meta({\n description: 'The `type` of the items of this type, which the client sends on create.',\n }),\n label: z.string().meta({\n description:\n 'The name of the type: the title of its create form and of its choice when creating.',\n }),\n description: z\n .string()\n .optional()\n .meta({ description: 'A line under the label, in the choice of a type.' }),\n icon: z.string().optional(),\n // The return type is written out so that declaration files name `Field`.\n get fields(): z.ZodArray<typeof Field> {\n return z.array(Field).meta({\n description:\n \"The type's own fields, after those of the resource. The resource's `form.layout` can name them: forms of the other types leave them out.\",\n });\n },\n abilities: Abilities.optional().meta({\n description:\n '`create: false`: the type is not offered when creating, and the backend refuses to create one (a singleton such as the home page). Its items can still be edited.',\n }),\n })\n .meta({\n description:\n 'A type of the items of a resource (decision 0077): the items of a type have the fields of the resource and its own.',\n });\n\nexport const Resource = z\n .looseObject({\n id: z.string().min(1),\n kind: z.string().min(1).optional().meta({\n description:\n \"What the resource is. `media`: a library of media (decision 0026), with a `file` field and a `media` on each item. Without it, an ordinary resource. Clients treat a kind they don't know as an ordinary resource.\",\n }),\n label: z.looseObject({ singular: z.string(), plural: z.string() }),\n description: z.string().optional(),\n icon: z.string().optional(),\n itemTitle: z\n .string()\n .optional()\n .meta({ description: 'The field used as the title of an item, in lists and pickers.' }),\n itemSubtitle: z.string().optional().meta({\n description:\n 'The field shown under the title of an item, in search results, cards and pickers.',\n }),\n itemImage: z.string().optional().meta({\n description:\n \"The field that holds the image of an item (a media, a file or a URL), in search results, pickers, the gallery and the thumbnails of the table. Defaults to the item's `media` in a resource of kind `media` (decision 0061).\",\n }),\n open: z\n .union([z.enum(['panel', 'edit']), z.string().min(1)])\n .optional()\n .meta({\n description:\n \"Where an item's title goes, in its list and wherever the app links to the item (decision 0040). `panel`, the default: the show route, with the item's details in a panel next to the list. `edit`: its edit form, and the show route redirects there. Clients treat a value they don't know as `panel`.\",\n }),\n itemActions: z.array(z.string().min(1)).optional().meta({\n description:\n \"The built-in item actions the resource shows, in their order (decision 0040): some of `show`, `edit`, `duplicate` and `delete`. Defaults to all four. Each one is shown on the items whose abilities allow it (`view`, `update`, `duplicate`, `delete`). `[]` shows none. Clients ignore ids they don't know.\",\n }),\n fields: z.array(Field),\n form: z.looseObject({ layout: z.array(LayoutNode).optional() }).optional(),\n list: ListDefinition.optional(),\n actions: z.array(Action).optional(),\n abilities: Abilities.optional(),\n features: ResourceFeatures.optional(),\n types: z.array(ResourceType).optional().meta({\n description:\n \"The types of the resource's items, each with fields of its own (decision 0077). Each item has a `type`, set when it is created, among their ids.\",\n }),\n settings: z.record(z.string(), z.unknown()).optional(),\n })\n .meta({ description: 'A set of items managed in the admin.' });\n\nexport type ResourceFeatures = z.infer<typeof ResourceFeatures>;\nexport type ResourceType = z.infer<typeof ResourceType>;\nexport type Resource = z.infer<typeof Resource>;\n/** A resource as a backend writes it, before defaults are applied. */\nexport type ResourceInput = z.input<typeof Resource>;\n"],"mappings":";;;;;;;AAQA,IAAa,mBAAmB,EAAE,YAAY;CAC1C,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC7B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;CAChC,SAAS,EACJ,MAAM,CACH,EAAE,KAAK,GACP,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CAC1F,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACrC,aACI,oFACR,CAAC;CACD,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAClC,aACI,+NACR,CAAC;CACD,MAAM,EACD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACrD,SAAS,CAAC,CACV,KAAK,EACF,aACI,0SACR,CAAC;CACL,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACpD,aACI,gTACR,CAAC;CACD,QAAQ,EAAE,MAAM,KAAK;CACrB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS;CACzE,MAAM,eAAe,SAAS;CAC9B,SAAS,EAAE,MAAM,MAAM,CAAC,CAAC,SAAS;CAClC,WAAW,UAAU,SAAS;CAC9B,UAAU,iBAAiB,SAAS;CACpC,OAAO,EAAE,MAAM,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACzC,aACI,mJACR,CAAC;CACD,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;AACzD,CAAC,CAAC,CACD,KAAK,EAAE,aAAa,uCAAuC,CAAC"}
|
package/dist/schemas/theme.d.ts
CHANGED
|
@@ -121,6 +121,10 @@ export declare const DefinitionTheme: z.ZodObject<{
|
|
|
121
121
|
comfortable: "comfortable";
|
|
122
122
|
touch: "touch";
|
|
123
123
|
}>>;
|
|
124
|
+
navigation: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
sidebar: "sidebar";
|
|
126
|
+
dock: "dock";
|
|
127
|
+
}>>;
|
|
124
128
|
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
125
129
|
label: z.ZodOptional<z.ZodString>;
|
|
126
130
|
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/schemas/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW,uCAKlB,CAAC;AAEP,eAAO,MAAM,UAAU;;;;;;;;iBAQrB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;mBAKqE,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAuBiD,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;iBAE2C,CAAC;AAE5E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;mBAAgD,CAAC;AA0CvE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEoE,CAAC;AAEvF,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/schemas/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW,uCAKlB,CAAC;AAEP,eAAO,MAAM,UAAU;;;;;;;;iBAQrB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;mBAKqE,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAuBiD,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;iBAE2C,CAAC;AAE5E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;mBAAgD,CAAC;AA0CvE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEoE,CAAC;AAEvF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB8D,CAAC;AAE3F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAC1C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
package/dist/schemas/theme.js
CHANGED
|
@@ -58,6 +58,7 @@ var DefinitionTheme = z.looseObject({
|
|
|
58
58
|
"touch",
|
|
59
59
|
"auto"
|
|
60
60
|
]).optional(),
|
|
61
|
+
navigation: z.enum(["sidebar", "dock"]).optional().meta({ description: "Where the app shows the `main` menu: `sidebar` (the default), a column on the left, or `dock`, a dock at the bottom of the window (decision 0076)." }),
|
|
61
62
|
extends: z.union([z.string(), z.array(z.string())]).optional().meta({ description: "Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs." })
|
|
62
63
|
}).meta({ description: "The theme of the admin: a theme, built on themes of plugins." });
|
|
63
64
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":[],"sources":["../../src/schemas/theme.ts"],"sourcesContent":["import { z } from 'zod';\n\n/** Names of tones, palette colors, components and variants: they become CSS class names. */\nconst Name = z.string().regex(/^[a-z0-9-]+$/);\n\nexport const ThemeTokens = z\n .record(z.string().regex(/^[a-zA-Z0-9_-]+$/), z.string().regex(/^[^{};<]*$/))\n .meta({\n description:\n 'CSS variables without the leading `--`, and their values: `{ \"panneau-color-accent\": \"#05f\" }`. Values cannot contain `{`, `}`, `;` or `<`.',\n });\n\nexport const ToneValues = z.looseObject({\n text: z.string().meta({ description: 'Text and icons on surfaces.' }),\n subtle: z.string().meta({ description: 'Background of the subtle appearance.' }),\n border: z.string().meta({ description: 'Border of the subtle appearance.' }),\n outline: z.string().meta({ description: 'Border of the outline appearance.' }),\n solid: z.string().meta({ description: 'Background of the solid appearance.' }),\n solidHover: z.string().meta({ description: 'Background of the solid appearance on hover.' }),\n solidText: z.string().meta({ description: 'Text on the solid appearance.' }),\n});\n\nexport const ToneInput = z\n .union([\n z.string().meta({ description: 'One color, from which Panneau derives the others.' }),\n ToneValues.extend({ dark: ToneValues.partial().optional() }),\n ])\n .meta({ description: 'A tone: one color, or every value with dark scheme overrides.' });\n\nexport const ThemeFontFace = z\n .looseObject({\n family: z.string().regex(/^[^{}<;\"\\\\]+$/),\n src: z\n .string()\n .regex(/^[^{}<]+$/)\n .meta({\n description: \"The `src` descriptor: `url(/fonts/geist.woff2) format('woff2')`.\",\n }),\n weight: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n style: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n display: z.enum(['auto', 'block', 'swap', 'fallback', 'optional']).optional(),\n unicodeRange: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n })\n .meta({ description: 'A font face, written as an `@font-face` rule.' });\n\nexport const ThemeFontStylesheet = z\n .looseObject({ stylesheet: z.string().min(1) })\n .meta({ description: 'A hosted stylesheet that declares font faces.' });\n\nexport const ThemeFont = z.union([ThemeFontFace, ThemeFontStylesheet]);\n\nconst themeShape = {\n label: z.string().optional(),\n tokens: ThemeTokens.meta({\n description:\n 'Tokens of the light scheme, or of both schemes when `dark` does not set them.',\n }),\n dark: ThemeTokens.optional().meta({ description: 'Tokens that change in the dark scheme.' }),\n palette: z\n .record(Name, z.string().regex(/^[^{};<]*$/))\n .optional()\n .meta({\n description:\n 'Raw colors, written as `--panneau-palette-<name>`: tokens and tones use them with `var(--panneau-palette-<name>)`.',\n }),\n tones: z.record(Name, ToneInput).optional().meta({\n description: 'Tones added or redefined by the theme, applied by `panneau-tone-<name>`.',\n }),\n components: z\n .record(Name, z.looseObject({ variants: z.record(Name, ThemeTokens).optional() }))\n .optional()\n .meta({\n description:\n 'Named variants of components: tokens applied by `panneau-<component>-variant-<name>`.',\n }),\n densities: z\n .looseObject({\n compact: ThemeTokens.optional(),\n comfortable: ThemeTokens.optional(),\n touch: ThemeTokens.optional(),\n })\n .optional()\n .meta({\n description:\n 'Tokens of each density (`panneau-control-height`…), which change with the density of the root.',\n }),\n fonts: z.array(ThemeFont).optional().meta({\n description: 'Font faces and font stylesheets, added to the page once.',\n }),\n};\n\nexport const Theme = z\n .looseObject(themeShape)\n .meta({ description: 'A theme of `@panneau/ui`, as plain data (decision 0024).' });\n\nexport const DefinitionTheme = z\n .looseObject({\n ...themeShape,\n tokens: themeShape.tokens.optional(),\n colorScheme: z.enum(['light', 'dark', 'auto']).optional(),\n density: z.enum(['compact', 'comfortable', 'touch', 'auto']).optional(),\n extends: z\n .union([z.string(), z.array(z.string())])\n .optional()\n .meta({\n description:\n 'Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs.',\n }),\n })\n .meta({ description: 'The theme of the admin: a theme, built on themes of plugins.' });\n\nexport type ThemeTokens = z.infer<typeof ThemeTokens>;\nexport type ToneValues = z.infer<typeof ToneValues>;\nexport type ToneInput = z.infer<typeof ToneInput>;\nexport type Theme = z.infer<typeof Theme>;\nexport type DefinitionTheme = z.infer<typeof DefinitionTheme>;\nexport type ThemeFontFace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C,CACD,SAAS,CAAC,CACV,KAAK,EACF,aACI,iGACR,CAAC;CACL,OAAO,EAAE,MAAM,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACtC,aAAa,2DACjB,CAAC;AACL;AAEA,IAAa,QAAQ,EAChB,YAAY,UAAU,CAAC,CACvB,KAAK,EAAE,aAAa,2DAA2D,CAAC;AAErF,IAAa,kBAAkB,EAC1B,YAAY;CACT,GAAG;CACH,QAAQ,WAAW,OAAO,SAAS;CACnC,aAAa,EAAE,KAAK;EAAC;EAAS;EAAQ;CAAM,CAAC,CAAC,CAAC,SAAS;CACxD,SAAS,EAAE,KAAK;EAAC;EAAW;EAAe;EAAS;CAAM,CAAC,CAAC,CAAC,SAAS;CACtE,SAAS,EACJ,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CACxC,SAAS,CAAC,CACV,KAAK,EACF,aACI,4GACR,CAAC;AACT,CAAC,CAAC,CACD,KAAK,EAAE,aAAa,+DAA+D,CAAC"}
|
|
1
|
+
{"version":3,"file":"theme.js","names":[],"sources":["../../src/schemas/theme.ts"],"sourcesContent":["import { z } from 'zod';\n\n/** Names of tones, palette colors, components and variants: they become CSS class names. */\nconst Name = z.string().regex(/^[a-z0-9-]+$/);\n\nexport const ThemeTokens = z\n .record(z.string().regex(/^[a-zA-Z0-9_-]+$/), z.string().regex(/^[^{};<]*$/))\n .meta({\n description:\n 'CSS variables without the leading `--`, and their values: `{ \"panneau-color-accent\": \"#05f\" }`. Values cannot contain `{`, `}`, `;` or `<`.',\n });\n\nexport const ToneValues = z.looseObject({\n text: z.string().meta({ description: 'Text and icons on surfaces.' }),\n subtle: z.string().meta({ description: 'Background of the subtle appearance.' }),\n border: z.string().meta({ description: 'Border of the subtle appearance.' }),\n outline: z.string().meta({ description: 'Border of the outline appearance.' }),\n solid: z.string().meta({ description: 'Background of the solid appearance.' }),\n solidHover: z.string().meta({ description: 'Background of the solid appearance on hover.' }),\n solidText: z.string().meta({ description: 'Text on the solid appearance.' }),\n});\n\nexport const ToneInput = z\n .union([\n z.string().meta({ description: 'One color, from which Panneau derives the others.' }),\n ToneValues.extend({ dark: ToneValues.partial().optional() }),\n ])\n .meta({ description: 'A tone: one color, or every value with dark scheme overrides.' });\n\nexport const ThemeFontFace = z\n .looseObject({\n family: z.string().regex(/^[^{}<;\"\\\\]+$/),\n src: z\n .string()\n .regex(/^[^{}<]+$/)\n .meta({\n description: \"The `src` descriptor: `url(/fonts/geist.woff2) format('woff2')`.\",\n }),\n weight: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n style: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n display: z.enum(['auto', 'block', 'swap', 'fallback', 'optional']).optional(),\n unicodeRange: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n })\n .meta({ description: 'A font face, written as an `@font-face` rule.' });\n\nexport const ThemeFontStylesheet = z\n .looseObject({ stylesheet: z.string().min(1) })\n .meta({ description: 'A hosted stylesheet that declares font faces.' });\n\nexport const ThemeFont = z.union([ThemeFontFace, ThemeFontStylesheet]);\n\nconst themeShape = {\n label: z.string().optional(),\n tokens: ThemeTokens.meta({\n description:\n 'Tokens of the light scheme, or of both schemes when `dark` does not set them.',\n }),\n dark: ThemeTokens.optional().meta({ description: 'Tokens that change in the dark scheme.' }),\n palette: z\n .record(Name, z.string().regex(/^[^{};<]*$/))\n .optional()\n .meta({\n description:\n 'Raw colors, written as `--panneau-palette-<name>`: tokens and tones use them with `var(--panneau-palette-<name>)`.',\n }),\n tones: z.record(Name, ToneInput).optional().meta({\n description: 'Tones added or redefined by the theme, applied by `panneau-tone-<name>`.',\n }),\n components: z\n .record(Name, z.looseObject({ variants: z.record(Name, ThemeTokens).optional() }))\n .optional()\n .meta({\n description:\n 'Named variants of components: tokens applied by `panneau-<component>-variant-<name>`.',\n }),\n densities: z\n .looseObject({\n compact: ThemeTokens.optional(),\n comfortable: ThemeTokens.optional(),\n touch: ThemeTokens.optional(),\n })\n .optional()\n .meta({\n description:\n 'Tokens of each density (`panneau-control-height`…), which change with the density of the root.',\n }),\n fonts: z.array(ThemeFont).optional().meta({\n description: 'Font faces and font stylesheets, added to the page once.',\n }),\n};\n\nexport const Theme = z\n .looseObject(themeShape)\n .meta({ description: 'A theme of `@panneau/ui`, as plain data (decision 0024).' });\n\nexport const DefinitionTheme = z\n .looseObject({\n ...themeShape,\n tokens: themeShape.tokens.optional(),\n colorScheme: z.enum(['light', 'dark', 'auto']).optional(),\n density: z.enum(['compact', 'comfortable', 'touch', 'auto']).optional(),\n navigation: z.enum(['sidebar', 'dock']).optional().meta({\n description:\n 'Where the app shows the `main` menu: `sidebar` (the default), a column on the left, or `dock`, a dock at the bottom of the window (decision 0076).',\n }),\n extends: z\n .union([z.string(), z.array(z.string())])\n .optional()\n .meta({\n description:\n 'Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs.',\n }),\n })\n .meta({ description: 'The theme of the admin: a theme, built on themes of plugins.' });\n\nexport type ThemeTokens = z.infer<typeof ThemeTokens>;\nexport type ToneValues = z.infer<typeof ToneValues>;\nexport type ToneInput = z.infer<typeof ToneInput>;\nexport type Theme = z.infer<typeof Theme>;\nexport type DefinitionTheme = z.infer<typeof DefinitionTheme>;\nexport type ThemeFontFace = z.infer<typeof ThemeFontFace>;\nexport type ThemeFontStylesheet = z.infer<typeof ThemeFontStylesheet>;\nexport type ThemeFont = z.infer<typeof ThemeFont>;\n"],"mappings":";;;AAGA,IAAM,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,cAAc;AAE5C,IAAa,cAAc,EACtB,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,kBAAkB,GAAG,EAAE,OAAO,CAAC,CAAC,MAAM,YAAY,CAAC,CAAC,CAC5E,KAAK,EACF,aACI,kJACR,CAAC;AAEL,IAAa,aAAa,EAAE,YAAY;CACpC,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,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AAe;EAAS;CAAM,CAAC,CAAC,CAAC,SAAS;CACtE,YAAY,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACpD,aACI,qJACR,CAAC;CACD,SAAS,EACJ,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CACxC,SAAS,CAAC,CACV,KAAK,EACF,aACI,4GACR,CAAC;AACT,CAAC,CAAC,CACD,KAAK,EAAE,aAAa,+DAA+D,CAAC"}
|
package/package.json
CHANGED
package/schema/boot.schema.json
CHANGED
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
"types": {
|
|
271
271
|
"type": "array",
|
|
272
272
|
"items": {
|
|
273
|
-
"$ref": "#/$defs/
|
|
273
|
+
"$ref": "#/$defs/ResourceType"
|
|
274
274
|
}
|
|
275
275
|
},
|
|
276
276
|
"settings": {
|
|
@@ -1026,6 +1026,10 @@
|
|
|
1026
1026
|
"component": {
|
|
1027
1027
|
"type": "string"
|
|
1028
1028
|
},
|
|
1029
|
+
"panel": {
|
|
1030
|
+
"type": "string",
|
|
1031
|
+
"minLength": 1
|
|
1032
|
+
},
|
|
1029
1033
|
"props": {
|
|
1030
1034
|
"type": "object",
|
|
1031
1035
|
"propertyNames": {
|
|
@@ -1495,6 +1499,39 @@
|
|
|
1495
1499
|
},
|
|
1496
1500
|
"additionalProperties": {}
|
|
1497
1501
|
},
|
|
1502
|
+
"ResourceType": {
|
|
1503
|
+
"type": "object",
|
|
1504
|
+
"properties": {
|
|
1505
|
+
"id": {
|
|
1506
|
+
"type": "string",
|
|
1507
|
+
"minLength": 1
|
|
1508
|
+
},
|
|
1509
|
+
"label": {
|
|
1510
|
+
"type": "string"
|
|
1511
|
+
},
|
|
1512
|
+
"description": {
|
|
1513
|
+
"type": "string"
|
|
1514
|
+
},
|
|
1515
|
+
"icon": {
|
|
1516
|
+
"type": "string"
|
|
1517
|
+
},
|
|
1518
|
+
"fields": {
|
|
1519
|
+
"type": "array",
|
|
1520
|
+
"items": {
|
|
1521
|
+
"$ref": "#/$defs/Field"
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
"abilities": {
|
|
1525
|
+
"$ref": "#/$defs/Abilities"
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1528
|
+
"required": [
|
|
1529
|
+
"id",
|
|
1530
|
+
"label",
|
|
1531
|
+
"fields"
|
|
1532
|
+
],
|
|
1533
|
+
"additionalProperties": {}
|
|
1534
|
+
},
|
|
1498
1535
|
"Page": {
|
|
1499
1536
|
"type": "object",
|
|
1500
1537
|
"properties": {
|
|
@@ -1928,6 +1965,13 @@
|
|
|
1928
1965
|
"auto"
|
|
1929
1966
|
]
|
|
1930
1967
|
},
|
|
1968
|
+
"navigation": {
|
|
1969
|
+
"type": "string",
|
|
1970
|
+
"enum": [
|
|
1971
|
+
"sidebar",
|
|
1972
|
+
"dock"
|
|
1973
|
+
]
|
|
1974
|
+
},
|
|
1931
1975
|
"extends": {
|
|
1932
1976
|
"anyOf": [
|
|
1933
1977
|
{
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"types": {
|
|
234
234
|
"type": "array",
|
|
235
235
|
"items": {
|
|
236
|
-
"$ref": "#/$defs/
|
|
236
|
+
"$ref": "#/$defs/ResourceType"
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
"settings": {
|
|
@@ -989,6 +989,10 @@
|
|
|
989
989
|
"component": {
|
|
990
990
|
"type": "string"
|
|
991
991
|
},
|
|
992
|
+
"panel": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"minLength": 1
|
|
995
|
+
},
|
|
992
996
|
"props": {
|
|
993
997
|
"type": "object",
|
|
994
998
|
"propertyNames": {
|
|
@@ -1458,6 +1462,39 @@
|
|
|
1458
1462
|
},
|
|
1459
1463
|
"additionalProperties": {}
|
|
1460
1464
|
},
|
|
1465
|
+
"ResourceType": {
|
|
1466
|
+
"type": "object",
|
|
1467
|
+
"properties": {
|
|
1468
|
+
"id": {
|
|
1469
|
+
"type": "string",
|
|
1470
|
+
"minLength": 1
|
|
1471
|
+
},
|
|
1472
|
+
"label": {
|
|
1473
|
+
"type": "string"
|
|
1474
|
+
},
|
|
1475
|
+
"description": {
|
|
1476
|
+
"type": "string"
|
|
1477
|
+
},
|
|
1478
|
+
"icon": {
|
|
1479
|
+
"type": "string"
|
|
1480
|
+
},
|
|
1481
|
+
"fields": {
|
|
1482
|
+
"type": "array",
|
|
1483
|
+
"items": {
|
|
1484
|
+
"$ref": "#/$defs/Field"
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
"abilities": {
|
|
1488
|
+
"$ref": "#/$defs/Abilities"
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"required": [
|
|
1492
|
+
"id",
|
|
1493
|
+
"label",
|
|
1494
|
+
"fields"
|
|
1495
|
+
],
|
|
1496
|
+
"additionalProperties": {}
|
|
1497
|
+
},
|
|
1461
1498
|
"Page": {
|
|
1462
1499
|
"type": "object",
|
|
1463
1500
|
"properties": {
|
|
@@ -1891,6 +1928,13 @@
|
|
|
1891
1928
|
"auto"
|
|
1892
1929
|
]
|
|
1893
1930
|
},
|
|
1931
|
+
"navigation": {
|
|
1932
|
+
"type": "string",
|
|
1933
|
+
"enum": [
|
|
1934
|
+
"sidebar",
|
|
1935
|
+
"dock"
|
|
1936
|
+
]
|
|
1937
|
+
},
|
|
1894
1938
|
"extends": {
|
|
1895
1939
|
"anyOf": [
|
|
1896
1940
|
{
|
package/schema/openapi.json
CHANGED
|
@@ -4270,7 +4270,7 @@
|
|
|
4270
4270
|
"minLength": 1
|
|
4271
4271
|
},
|
|
4272
4272
|
"label": {
|
|
4273
|
-
"description": "`section`, `tab`: the title.",
|
|
4273
|
+
"description": "`section`, `tab`, `sidebar`: the title.",
|
|
4274
4274
|
"type": "string"
|
|
4275
4275
|
},
|
|
4276
4276
|
"description": {
|
|
@@ -4284,6 +4284,11 @@
|
|
|
4284
4284
|
"description": "`component`: a component provided by a plugin.",
|
|
4285
4285
|
"type": "string"
|
|
4286
4286
|
},
|
|
4287
|
+
"panel": {
|
|
4288
|
+
"description": "`sidebar`: the panel it is, by name: a built-in panel (`save`, `errors`, `publication`, `actions`) or one provided by a plugin. Without its component, the node renders its children.",
|
|
4289
|
+
"type": "string",
|
|
4290
|
+
"minLength": 1
|
|
4291
|
+
},
|
|
4287
4292
|
"props": {
|
|
4288
4293
|
"type": "object",
|
|
4289
4294
|
"propertyNames": {
|
|
@@ -4786,6 +4791,45 @@
|
|
|
4786
4791
|
},
|
|
4787
4792
|
"additionalProperties": {}
|
|
4788
4793
|
},
|
|
4794
|
+
"ResourceType": {
|
|
4795
|
+
"type": "object",
|
|
4796
|
+
"properties": {
|
|
4797
|
+
"id": {
|
|
4798
|
+
"type": "string",
|
|
4799
|
+
"minLength": 1,
|
|
4800
|
+
"description": "The `type` of the items of this type, which the client sends on create."
|
|
4801
|
+
},
|
|
4802
|
+
"label": {
|
|
4803
|
+
"type": "string",
|
|
4804
|
+
"description": "The name of the type: the title of its create form and of its choice when creating."
|
|
4805
|
+
},
|
|
4806
|
+
"description": {
|
|
4807
|
+
"description": "A line under the label, in the choice of a type.",
|
|
4808
|
+
"type": "string"
|
|
4809
|
+
},
|
|
4810
|
+
"icon": {
|
|
4811
|
+
"type": "string"
|
|
4812
|
+
},
|
|
4813
|
+
"fields": {
|
|
4814
|
+
"type": "array",
|
|
4815
|
+
"items": {
|
|
4816
|
+
"$ref": "#/components/schemas/Field"
|
|
4817
|
+
},
|
|
4818
|
+
"description": "The type's own fields, after those of the resource. The resource's `form.layout` can name them: forms of the other types leave them out."
|
|
4819
|
+
},
|
|
4820
|
+
"abilities": {
|
|
4821
|
+
"description": "`create: false`: the type is not offered when creating, and the backend refuses to create one (a singleton such as the home page). Its items can still be edited.",
|
|
4822
|
+
"$ref": "#/components/schemas/Abilities"
|
|
4823
|
+
}
|
|
4824
|
+
},
|
|
4825
|
+
"required": [
|
|
4826
|
+
"id",
|
|
4827
|
+
"label",
|
|
4828
|
+
"fields"
|
|
4829
|
+
],
|
|
4830
|
+
"additionalProperties": {},
|
|
4831
|
+
"description": "A type of the items of a resource (decision 0077): the items of a type have the fields of the resource and its own."
|
|
4832
|
+
},
|
|
4789
4833
|
"Resource": {
|
|
4790
4834
|
"type": "object",
|
|
4791
4835
|
"properties": {
|
|
@@ -4890,10 +4934,10 @@
|
|
|
4890
4934
|
"$ref": "#/components/schemas/ResourceFeatures"
|
|
4891
4935
|
},
|
|
4892
4936
|
"types": {
|
|
4893
|
-
"description": "
|
|
4937
|
+
"description": "The types of the resource's items, each with fields of its own (decision 0077). Each item has a `type`, set when it is created, among their ids.",
|
|
4894
4938
|
"type": "array",
|
|
4895
4939
|
"items": {
|
|
4896
|
-
"$ref": "#/components/schemas/
|
|
4940
|
+
"$ref": "#/components/schemas/ResourceType"
|
|
4897
4941
|
}
|
|
4898
4942
|
},
|
|
4899
4943
|
"settings": {
|
|
@@ -5717,6 +5761,14 @@
|
|
|
5717
5761
|
"auto"
|
|
5718
5762
|
]
|
|
5719
5763
|
},
|
|
5764
|
+
"navigation": {
|
|
5765
|
+
"description": "Where the app shows the `main` menu: `sidebar` (the default), a column on the left, or `dock`, a dock at the bottom of the window (decision 0076).",
|
|
5766
|
+
"type": "string",
|
|
5767
|
+
"enum": [
|
|
5768
|
+
"sidebar",
|
|
5769
|
+
"dock"
|
|
5770
|
+
]
|
|
5771
|
+
},
|
|
5720
5772
|
"extends": {
|
|
5721
5773
|
"description": "Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs.",
|
|
5722
5774
|
"anyOf": [
|
|
@@ -5885,6 +5937,11 @@
|
|
|
5885
5937
|
},
|
|
5886
5938
|
"abilities": {
|
|
5887
5939
|
"$ref": "#/components/schemas/Abilities"
|
|
5940
|
+
},
|
|
5941
|
+
"type": {
|
|
5942
|
+
"description": "In a resource with `types`: the id of the item's type (decision 0077). Set when the item is created; updates ignore it.",
|
|
5943
|
+
"type": "string",
|
|
5944
|
+
"minLength": 1
|
|
5888
5945
|
}
|
|
5889
5946
|
},
|
|
5890
5947
|
"required": [
|
|
@@ -6880,6 +6937,11 @@
|
|
|
6880
6937
|
"abilities": {
|
|
6881
6938
|
"$ref": "#/components/schemas/Abilities"
|
|
6882
6939
|
},
|
|
6940
|
+
"type": {
|
|
6941
|
+
"description": "In a resource with `types`: the id of the item's type (decision 0077). Set when the item is created; updates ignore it.",
|
|
6942
|
+
"type": "string",
|
|
6943
|
+
"minLength": 1
|
|
6944
|
+
},
|
|
6883
6945
|
"media": {
|
|
6884
6946
|
"$ref": "#/components/schemas/MediaInfo"
|
|
6885
6947
|
}
|