@panneau/protocol 5.0.0-alpha.27 → 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/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +30 -4
- package/dist/conformance/index.js.map +1 -1
- 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 +46 -14
- 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/rules.d.ts +2 -1
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +3 -2
- package/dist/rules.js.map +1 -1
- 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 +2 -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 +10 -0
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/field.d.ts +1 -0
- package/dist/schemas/field.d.ts.map +1 -1
- package/dist/schemas/field.js +1 -0
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +38 -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 +18 -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 +48 -1
- package/schema/definition.schema.json +48 -1
- package/schema/openapi.json +69 -3
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,EAAE,YAAY;EACV,MAAM,EAAE,KAAK,CAAC,aAAa,QAAQ,CAAC;EACpC,WAAW,EACN,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,mCAAmC,CAAC;CACjE,CAAC,CACL,CAAC,CAAC,CACD,SAAS;CACd,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAChC,aACI,2GACR,CAAC;AACL,CAAC;AAED,IAAa,eAAe,EACvB,YAAY;CACT,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACvB,aAAa,0EACjB,CAAC;CACD,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,EACnB,aACI,sFACR,CAAC;CACD,aAAa,EACR,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,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E,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;;iBA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AM,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 = 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,8BAA8B,CAAC;CACpE,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,uCAAuC,CAAC;CAC/E,QAAQ,EAAE,OAA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AAO,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,8BAA8B,CAAC;CACpE,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,uCAAuC,CAAC;CAC/E,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,mCAAmC,CAAC;CAC3E,SAAS,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,oCAAoC,CAAC;CAC7E,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,sCAAsC,CAAC;CAC7E,YAAY,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,+CAA+C,CAAC;CAC3F,WAAW,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,gCAAgC,CAAC;AAC/E,CAAC;AAED,IAAa,YAAY,EACpB,MAAM,CACH,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa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AAa,2EACjB,CAAC;CACD,YAAY,EACP,OAAO,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,MAAM,WAAW,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CACjF,SAAS,CAAC,CACV,KAAK,EACF,aACI,wFACR,CAAC;CACL,WAAW,EACN,YAAY;EACT,SAAS,YAAY,SAAS;EAC9B,aAAa,YAAY,SAAS;EAClC,OAAO,YAAY,SAAS;CAChC,CAAC,CAAC,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,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": {
|
|
@@ -324,6 +324,9 @@
|
|
|
324
324
|
"updateOnly": {
|
|
325
325
|
"type": "boolean"
|
|
326
326
|
},
|
|
327
|
+
"notInForm": {
|
|
328
|
+
"type": "boolean"
|
|
329
|
+
},
|
|
327
330
|
"rules": {
|
|
328
331
|
"type": "array",
|
|
329
332
|
"items": {
|
|
@@ -1023,6 +1026,10 @@
|
|
|
1023
1026
|
"component": {
|
|
1024
1027
|
"type": "string"
|
|
1025
1028
|
},
|
|
1029
|
+
"panel": {
|
|
1030
|
+
"type": "string",
|
|
1031
|
+
"minLength": 1
|
|
1032
|
+
},
|
|
1026
1033
|
"props": {
|
|
1027
1034
|
"type": "object",
|
|
1028
1035
|
"propertyNames": {
|
|
@@ -1492,6 +1499,39 @@
|
|
|
1492
1499
|
},
|
|
1493
1500
|
"additionalProperties": {}
|
|
1494
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
|
+
},
|
|
1495
1535
|
"Page": {
|
|
1496
1536
|
"type": "object",
|
|
1497
1537
|
"properties": {
|
|
@@ -1925,6 +1965,13 @@
|
|
|
1925
1965
|
"auto"
|
|
1926
1966
|
]
|
|
1927
1967
|
},
|
|
1968
|
+
"navigation": {
|
|
1969
|
+
"type": "string",
|
|
1970
|
+
"enum": [
|
|
1971
|
+
"sidebar",
|
|
1972
|
+
"dock"
|
|
1973
|
+
]
|
|
1974
|
+
},
|
|
1928
1975
|
"extends": {
|
|
1929
1976
|
"anyOf": [
|
|
1930
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": {
|
|
@@ -287,6 +287,9 @@
|
|
|
287
287
|
"updateOnly": {
|
|
288
288
|
"type": "boolean"
|
|
289
289
|
},
|
|
290
|
+
"notInForm": {
|
|
291
|
+
"type": "boolean"
|
|
292
|
+
},
|
|
290
293
|
"rules": {
|
|
291
294
|
"type": "array",
|
|
292
295
|
"items": {
|
|
@@ -986,6 +989,10 @@
|
|
|
986
989
|
"component": {
|
|
987
990
|
"type": "string"
|
|
988
991
|
},
|
|
992
|
+
"panel": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"minLength": 1
|
|
995
|
+
},
|
|
989
996
|
"props": {
|
|
990
997
|
"type": "object",
|
|
991
998
|
"propertyNames": {
|
|
@@ -1455,6 +1462,39 @@
|
|
|
1455
1462
|
},
|
|
1456
1463
|
"additionalProperties": {}
|
|
1457
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
|
+
},
|
|
1458
1498
|
"Page": {
|
|
1459
1499
|
"type": "object",
|
|
1460
1500
|
"properties": {
|
|
@@ -1888,6 +1928,13 @@
|
|
|
1888
1928
|
"auto"
|
|
1889
1929
|
]
|
|
1890
1930
|
},
|
|
1931
|
+
"navigation": {
|
|
1932
|
+
"type": "string",
|
|
1933
|
+
"enum": [
|
|
1934
|
+
"sidebar",
|
|
1935
|
+
"dock"
|
|
1936
|
+
]
|
|
1937
|
+
},
|
|
1891
1938
|
"extends": {
|
|
1892
1939
|
"anyOf": [
|
|
1893
1940
|
{
|
package/schema/openapi.json
CHANGED
|
@@ -3835,6 +3835,10 @@
|
|
|
3835
3835
|
"updateOnly": {
|
|
3836
3836
|
"type": "boolean"
|
|
3837
3837
|
},
|
|
3838
|
+
"notInForm": {
|
|
3839
|
+
"description": "Forms leave the field out, even when their layout names it, and never add it at the end. Items still give its value, which lists, details, item panels and references read: the URL of a page, shown under its title (decision 0071). The backend ignores its value on create and update, as it ignores `readOnly` fields, and the field is not edited inline. For the fields at the top of a resource and of its types.",
|
|
3840
|
+
"type": "boolean"
|
|
3841
|
+
},
|
|
3838
3842
|
"rules": {
|
|
3839
3843
|
"type": "array",
|
|
3840
3844
|
"items": {
|
|
@@ -4266,7 +4270,7 @@
|
|
|
4266
4270
|
"minLength": 1
|
|
4267
4271
|
},
|
|
4268
4272
|
"label": {
|
|
4269
|
-
"description": "`section`, `tab`: the title.",
|
|
4273
|
+
"description": "`section`, `tab`, `sidebar`: the title.",
|
|
4270
4274
|
"type": "string"
|
|
4271
4275
|
},
|
|
4272
4276
|
"description": {
|
|
@@ -4280,6 +4284,11 @@
|
|
|
4280
4284
|
"description": "`component`: a component provided by a plugin.",
|
|
4281
4285
|
"type": "string"
|
|
4282
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
|
+
},
|
|
4283
4292
|
"props": {
|
|
4284
4293
|
"type": "object",
|
|
4285
4294
|
"propertyNames": {
|
|
@@ -4782,6 +4791,45 @@
|
|
|
4782
4791
|
},
|
|
4783
4792
|
"additionalProperties": {}
|
|
4784
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
|
+
},
|
|
4785
4833
|
"Resource": {
|
|
4786
4834
|
"type": "object",
|
|
4787
4835
|
"properties": {
|
|
@@ -4886,10 +4934,10 @@
|
|
|
4886
4934
|
"$ref": "#/components/schemas/ResourceFeatures"
|
|
4887
4935
|
},
|
|
4888
4936
|
"types": {
|
|
4889
|
-
"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.",
|
|
4890
4938
|
"type": "array",
|
|
4891
4939
|
"items": {
|
|
4892
|
-
"$ref": "#/components/schemas/
|
|
4940
|
+
"$ref": "#/components/schemas/ResourceType"
|
|
4893
4941
|
}
|
|
4894
4942
|
},
|
|
4895
4943
|
"settings": {
|
|
@@ -5713,6 +5761,14 @@
|
|
|
5713
5761
|
"auto"
|
|
5714
5762
|
]
|
|
5715
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
|
+
},
|
|
5716
5772
|
"extends": {
|
|
5717
5773
|
"description": "Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs.",
|
|
5718
5774
|
"anyOf": [
|
|
@@ -5881,6 +5937,11 @@
|
|
|
5881
5937
|
},
|
|
5882
5938
|
"abilities": {
|
|
5883
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
|
|
5884
5945
|
}
|
|
5885
5946
|
},
|
|
5886
5947
|
"required": [
|
|
@@ -6876,6 +6937,11 @@
|
|
|
6876
6937
|
"abilities": {
|
|
6877
6938
|
"$ref": "#/components/schemas/Abilities"
|
|
6878
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
|
+
},
|
|
6879
6945
|
"media": {
|
|
6880
6946
|
"$ref": "#/components/schemas/MediaInfo"
|
|
6881
6947
|
}
|