@panneau/protocol 5.0.0-alpha.4 → 5.0.0-alpha.41
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/addresses.d.ts +23 -0
- package/dist/addresses.d.ts.map +1 -0
- package/dist/addresses.js +52 -0
- package/dist/addresses.js.map +1 -0
- package/dist/aggregates.d.ts +135 -0
- package/dist/aggregates.d.ts.map +1 -0
- package/dist/aggregates.js +236 -0
- package/dist/aggregates.js.map +1 -0
- package/dist/compound.d.ts +20 -0
- package/dist/compound.d.ts.map +1 -0
- package/dist/compound.js +27 -0
- package/dist/compound.js.map +1 -0
- package/dist/conditions.d.ts +1 -1
- package/dist/conformance/index.d.ts +6 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +970 -11
- package/dist/conformance/index.js.map +1 -1
- package/dist/constants.d.ts +108 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +181 -3
- package/dist/constants.js.map +1 -1
- package/dist/context.d.ts +15 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +34 -0
- package/dist/context.js.map +1 -0
- package/dist/currencies.d.ts +22 -0
- package/dist/currencies.d.ts.map +1 -0
- package/dist/currencies.js +231 -0
- package/dist/currencies.js.map +1 -0
- package/dist/dashboards.d.ts +95 -0
- package/dist/dashboards.d.ts.map +1 -0
- package/dist/dashboards.js +140 -0
- package/dist/dashboards.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +22 -8
- package/dist/libraries.d.ts +33 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +59 -0
- package/dist/libraries.js.map +1 -0
- package/dist/links.d.ts +38 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +65 -0
- package/dist/links.js.map +1 -0
- package/dist/lint.d.ts +4 -4
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +540 -15
- package/dist/lint.js.map +1 -1
- package/dist/mock/auth.d.ts +71 -0
- package/dist/mock/auth.d.ts.map +1 -0
- package/dist/mock/auth.js +346 -0
- package/dist/mock/auth.js.map +1 -0
- package/dist/mock/example.d.ts +1 -1
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +49 -28
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts +96 -5
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +505 -44
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +462 -50
- package/dist/openapi.js.map +1 -1
- package/dist/periods.d.ts +61 -0
- package/dist/periods.d.ts.map +1 -0
- package/dist/periods.js +130 -0
- package/dist/periods.js.map +1 -0
- package/dist/problem.d.ts +1 -1
- package/dist/query.d.ts +18 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +34 -8
- package/dist/query.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 +18 -5
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +233 -15
- package/dist/rules.js.map +1 -1
- package/dist/runtime/index.d.ts +23 -10
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +16 -3
- package/dist/schemas/action.d.ts +119 -10
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/action.js +20 -3
- package/dist/schemas/action.js.map +1 -1
- package/dist/schemas/api.d.ts +266 -5
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +134 -16
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/boot.d.ts +25 -1
- package/dist/schemas/boot.d.ts.map +1 -1
- package/dist/schemas/boot.js +2 -1
- package/dist/schemas/boot.js.map +1 -1
- package/dist/schemas/common.d.ts +1 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +2 -1
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/definition.d.ts +1414 -30
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +77 -17
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/field.d.ts +358 -2
- package/dist/schemas/field.d.ts.map +1 -1
- package/dist/schemas/field.js +161 -20
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +5820 -46
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +69 -7
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/jsonRules.d.ts +83 -0
- package/dist/schemas/jsonRules.d.ts.map +1 -0
- package/dist/schemas/jsonRules.js +46 -0
- package/dist/schemas/jsonRules.js.map +1 -0
- package/dist/schemas/layout.d.ts +2 -1
- 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/list.d.ts +34 -2
- package/dist/schemas/list.d.ts.map +1 -1
- package/dist/schemas/list.js +21 -6
- package/dist/schemas/list.js.map +1 -1
- package/dist/schemas/resource.d.ts +826 -17
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +26 -4
- package/dist/schemas/resource.js.map +1 -1
- package/dist/schemas/theme.d.ts +6 -2
- 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/dist/schemas/widget.d.ts +4379 -0
- package/dist/schemas/widget.d.ts.map +1 -0
- package/dist/schemas/widget.js +269 -0
- package/dist/schemas/widget.js.map +1 -0
- package/dist/search.d.ts +51 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +53 -0
- package/dist/search.js.map +1 -0
- package/dist/themes.d.ts +1 -1
- package/dist/transforms.d.ts +17 -0
- package/dist/transforms.d.ts.map +1 -0
- package/dist/transforms.js +34 -0
- package/dist/transforms.js.map +1 -0
- package/dist/validate.d.ts +5 -3
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +36 -2
- package/dist/validate.js.map +1 -1
- package/dist/values.d.ts +5 -1
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +16 -2
- package/dist/values.js.map +1 -1
- package/dist/widgets.d.ts +232 -0
- package/dist/widgets.d.ts.map +1 -0
- package/dist/widgets.js +630 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +6 -3
- package/schema/boot.schema.json +1461 -104
- package/schema/definition.schema.json +1459 -105
- package/schema/openapi.json +7176 -2000
package/dist/schemas/field.js
CHANGED
|
@@ -1,28 +1,59 @@
|
|
|
1
|
-
import { PORTABLE_RULES } from "../constants.js";
|
|
2
|
-
import { Condition, Option } from "./common.js";
|
|
1
|
+
import { ADDRESS_PARTS, BUILT_IN_LINK_TYPES, DATE_RANGE_OPEN_BOUNDS, DURATION_UNITS, PORTABLE_RULES, RICH_TEXT_STYLE_ELEMENTS } from "../constants.js";
|
|
2
|
+
import { Abilities, Condition, Option } from "./common.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/schemas/field.ts
|
|
5
5
|
var message = z.string().optional().meta({ description: "Message shown when the rule fails, instead of the default one." });
|
|
6
|
+
var mode = z.enum(["create", "update"]).optional().meta({ description: "The rule only applies when the item is created (`create`) or updated (`update`): a password required to create a user, optional to edit one. Without it, the rule applies in both modes." });
|
|
7
|
+
var Ratio = z.string().regex(/^[1-9][0-9]*:[1-9][0-9]*$/).meta({ description: "An aspect ratio, as `width:height`: `16:9`." });
|
|
8
|
+
var CountryCode = z.string().regex(/^[A-Z]{2}$/).meta({ description: "An ISO 3166-1 alpha-2 code, in capitals: `CA`." });
|
|
9
|
+
var CurrencyCode = z.string().regex(/^[A-Z]{3}$/).meta({ description: "An ISO 4217 currency code, in capitals: `CAD`." });
|
|
10
|
+
var DateRangeOpen = z.enum(DATE_RANGE_OPEN_BOUNDS).meta({ description: "Which bounds of the range can be `null`: `start`, `end` or `both`." });
|
|
6
11
|
var DateBound = z.union([z.string().meta({ description: "An ISO 8601 date or date-time." }), z.looseObject({ field: z.string().min(1) }).meta({ description: "Another field of the form." })]);
|
|
7
12
|
var Rule = z.union([
|
|
8
13
|
z.looseObject({
|
|
9
14
|
rule: z.literal("required"),
|
|
10
|
-
message
|
|
15
|
+
message,
|
|
16
|
+
mode
|
|
11
17
|
}),
|
|
12
18
|
z.looseObject({
|
|
13
19
|
rule: z.enum(["min", "max"]),
|
|
14
20
|
value: z.number(),
|
|
15
|
-
message
|
|
21
|
+
message,
|
|
22
|
+
mode
|
|
16
23
|
}),
|
|
17
24
|
z.looseObject({
|
|
18
25
|
rule: z.literal("pattern"),
|
|
19
26
|
value: z.string(),
|
|
20
27
|
flags: z.string().optional(),
|
|
21
|
-
message
|
|
28
|
+
message,
|
|
29
|
+
mode
|
|
22
30
|
}),
|
|
23
31
|
z.looseObject({
|
|
24
|
-
rule: z.enum([
|
|
25
|
-
|
|
32
|
+
rule: z.enum([
|
|
33
|
+
"email",
|
|
34
|
+
"url",
|
|
35
|
+
"json"
|
|
36
|
+
]),
|
|
37
|
+
message,
|
|
38
|
+
mode
|
|
39
|
+
}),
|
|
40
|
+
z.looseObject({
|
|
41
|
+
rule: z.literal("tel"),
|
|
42
|
+
extension: z.boolean().optional().meta({ description: "The number can have an extension, after `;ext=` as in a `tel:` URI (RFC 3966): `+15145550199;ext=123`, 1 to 10 digits. Without it, a value with an extension fails." }),
|
|
43
|
+
message,
|
|
44
|
+
mode
|
|
45
|
+
}),
|
|
46
|
+
z.looseObject({
|
|
47
|
+
rule: z.literal("daterange"),
|
|
48
|
+
open: DateRangeOpen.optional(),
|
|
49
|
+
message,
|
|
50
|
+
mode
|
|
51
|
+
}),
|
|
52
|
+
z.looseObject({
|
|
53
|
+
rule: z.literal("money"),
|
|
54
|
+
currencies: z.array(CurrencyCode).optional().meta({ description: "The currencies allowed. Without them, any ISO 4217 currency." }),
|
|
55
|
+
message,
|
|
56
|
+
mode
|
|
26
57
|
}),
|
|
27
58
|
z.looseObject({
|
|
28
59
|
rule: z.literal("in"),
|
|
@@ -31,28 +62,54 @@ var Rule = z.union([
|
|
|
31
62
|
z.number(),
|
|
32
63
|
z.boolean()
|
|
33
64
|
])),
|
|
34
|
-
message
|
|
65
|
+
message,
|
|
66
|
+
mode
|
|
35
67
|
}),
|
|
36
68
|
z.looseObject({
|
|
37
69
|
rule: z.literal("accept"),
|
|
38
70
|
value: z.array(z.string().min(1)),
|
|
39
|
-
message
|
|
71
|
+
message,
|
|
72
|
+
mode
|
|
40
73
|
}),
|
|
41
74
|
z.looseObject({
|
|
42
75
|
rule: z.literal("maxSize"),
|
|
43
76
|
value: z.number().int().positive(),
|
|
44
|
-
message
|
|
77
|
+
message,
|
|
78
|
+
mode
|
|
45
79
|
}),
|
|
46
80
|
z.looseObject({
|
|
47
81
|
rule: z.enum(["before", "after"]),
|
|
48
82
|
value: DateBound,
|
|
49
|
-
message
|
|
83
|
+
message,
|
|
84
|
+
mode
|
|
50
85
|
}),
|
|
86
|
+
z.looseObject({
|
|
87
|
+
rule: z.literal("postalCode"),
|
|
88
|
+
value: z.union([CountryCode, z.looseObject({ field: z.string().min(1) }).meta({ description: "Another field of the form, which holds the country." })]).optional().meta({ description: "The country of the postal code. Without it, or without a country, any postal code passes. An `address` value has its own country." }),
|
|
89
|
+
message,
|
|
90
|
+
mode
|
|
91
|
+
}),
|
|
92
|
+
z.looseObject({
|
|
93
|
+
rule: z.literal("crop"),
|
|
94
|
+
value: z.looseObject({
|
|
95
|
+
ratios: z.array(Ratio).optional().meta({ description: "A crop must have one of them: its height is within one pixel of its width divided by the ratio, after its rotation." }),
|
|
96
|
+
required: z.boolean().optional().meta({ description: "Each image needs a crop for this use." })
|
|
97
|
+
}),
|
|
98
|
+
message,
|
|
99
|
+
mode
|
|
100
|
+
}),
|
|
101
|
+
z.looseObject({
|
|
102
|
+
rule: z.literal("providers"),
|
|
103
|
+
value: z.array(z.string().min(1)).min(1),
|
|
104
|
+
message,
|
|
105
|
+
mode
|
|
106
|
+
}).meta({ description: "The providers an `embed` value may come from: the `provider_name` of their oEmbed (`YouTube`), compared without case (decision 0058)." }),
|
|
51
107
|
z.looseObject({
|
|
52
108
|
rule: z.string().refine((rule) => !PORTABLE_RULES.includes(rule)),
|
|
53
|
-
message
|
|
109
|
+
message,
|
|
110
|
+
mode
|
|
54
111
|
}).meta({ description: "A rule added in a later version of the protocol. Clients that don't know it ignore it; the server still enforces it." })
|
|
55
|
-
]).meta({ description: "A portable validation rule. `min` and `max` apply to numbers, and to the length of text and arrays. `accept` lists MIME types (`image/*`). `maxSize` is in bytes." });
|
|
112
|
+
]).meta({ description: "A portable validation rule. `min` and `max` apply to numbers, to the amount of `money` values (in minor units), and to the length of text and arrays. `daterange` and `money` are implied by their types, with the `open` bounds and the `currencies` of the field (decision 0053). `accept` lists MIME types (`image/*`). `maxSize` is in bytes. `tel` checks an E.164 number, with an extension when `extension` is `true`. `crop` checks the transform of each image of an `image` or `media` value (decision 0031). `postalCode` checks a postal code against the format of its country, for the countries whose format Panneau knows: Canada and the United States (decision 0054). `providers` lists the providers of an `embed` value (decision 0058)." });
|
|
56
113
|
var BlockType = z.looseObject({
|
|
57
114
|
id: z.string().min(1),
|
|
58
115
|
label: z.string(),
|
|
@@ -69,26 +126,110 @@ var Field = z.looseObject({
|
|
|
69
126
|
placeholder: z.string().optional(),
|
|
70
127
|
default: z.unknown().optional(),
|
|
71
128
|
localized: z.boolean().optional().meta({ description: "The value is an object keyed by locale." }),
|
|
72
|
-
readOnly: z.boolean().optional(),
|
|
129
|
+
readOnly: z.boolean().optional().meta({ description: "Nobody edits the field (a computed value). For a field the current user can't edit, use `abilities.update: false`." }),
|
|
130
|
+
abilities: Abilities.optional().meta({ description: "What the current user can do with the field (decision 0046). Only `false` restricts: `view: false` leaves the field out of forms, details and lists, and items don't carry its value; `update: false` makes it read-only, and the backend ignores its value. For the fields at the top of a resource and of its types." }),
|
|
73
131
|
createOnly: z.boolean().optional(),
|
|
74
132
|
updateOnly: z.boolean().optional(),
|
|
133
|
+
notInForm: z.boolean().optional().meta({ 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." }),
|
|
75
134
|
rules: z.array(Rule).optional(),
|
|
76
135
|
visibleWhen: Condition.optional(),
|
|
77
136
|
options: z.array(Option).optional().meta({ description: "`select`: the choices." }),
|
|
78
|
-
multiple: z.boolean().optional().meta({ description: "`select`, `relation`, `media`, `file
|
|
79
|
-
resource: z.string().optional().meta({ description: "`relation`: id of the related resource. `media`: id of a resource of kind `media`,
|
|
80
|
-
accept: z.array(z.string()).optional().meta({ description: "`media`, `file`: accepted MIME types." }),
|
|
81
|
-
|
|
137
|
+
multiple: z.boolean().optional().meta({ description: "`select`, `relation`, `media`, `image`, `file`, `country`, and compound fields: the value is an array." }),
|
|
138
|
+
resource: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]).optional().meta({ description: "`relation`: id of the related resource. `media`, `image`: id of a resource of kind `media`, or a list of them; without it, every library of the definition (decision 0027). `link`: the resources of its `page` links (decision 0055)." }),
|
|
139
|
+
accept: z.array(z.string()).optional().meta({ description: "`media`, `image`, `file`: accepted MIME types. `image` defaults to `image/*`." }),
|
|
140
|
+
ratios: z.array(Ratio).optional().meta({ description: "`image`: ratios the editor suggests. The `crop` rule enforces ratios (decision 0031)." }),
|
|
141
|
+
rotate: z.boolean().optional().meta({ description: "`image`: whether the editor offers rotation and flips. Defaults to true." }),
|
|
142
|
+
focalPoint: z.boolean().optional().meta({ description: "`image`: whether the editor offers the focal point. Defaults to true." }),
|
|
143
|
+
transformBase: z.enum([
|
|
144
|
+
"media",
|
|
145
|
+
"original",
|
|
146
|
+
"choose"
|
|
147
|
+
]).optional().meta({ description: "`image`: what a transform for one use starts from: the media's own transform (`media`, the default), the original file, or the user's choice in the editor (decision 0031)." }),
|
|
148
|
+
transforms: z.boolean().optional().meta({ description: "`media`, `image`: whether values keep a transform for one use. Defaults to true. With `false`, the backend ignores the `transform` of values and items give none, clients send none, and an `image` field has no editor; it can't have `ratios` or the `crop` rule (decision 0087)." }),
|
|
149
|
+
from: z.string().optional().meta({ description: "`slug`: the field the slug is generated from. `region`: the field of the same object that holds its country." }),
|
|
150
|
+
check: z.boolean().optional().meta({ description: "The client checks the value with the backend as it is typed, with `POST /resources/{resource}/fields/{field}/check`: whether a `slug` is available, and its URL. A field at the top of the resource only." }),
|
|
82
151
|
display: z.string().optional().meta({ description: "Display used in lists, when it differs from the default one of the type." }),
|
|
83
152
|
get fields() {
|
|
84
|
-
return z.array(Field).optional().meta({ description: "`group` and `repeater`: the nested fields." });
|
|
153
|
+
return z.array(Field).optional().meta({ description: "`group` and `repeater`: the nested fields. On a type that isn't built in, they make it a compound field (decision 0065): its value is an object of them, or a list of objects with `multiple`, and a client without the type's plugin renders it as a `group` or a `repeater`." });
|
|
85
154
|
},
|
|
86
155
|
get types() {
|
|
87
156
|
return z.array(BlockType).optional().meta({ description: "`repeater`: typed blocks, each with its own fields." });
|
|
88
157
|
},
|
|
89
158
|
settings: z.record(z.string(), z.unknown()).optional()
|
|
90
159
|
}).meta({ description: "A field of a form." });
|
|
160
|
+
/** A block style of a `richtext` field: a named class on an element (`<p class="big">`). */
|
|
161
|
+
var RichTextStyle = z.looseObject({
|
|
162
|
+
label: z.string().meta({ description: "The name of the style in the toolbar." }),
|
|
163
|
+
class: z.string().min(1).meta({ description: "The class the style puts on the element: `big`. Several classes are separated by spaces." }),
|
|
164
|
+
element: z.enum(RICH_TEXT_STYLE_ELEMENTS).optional().meta({ description: "The element the style applies to: `p` (the default), `h1` to `h6`, `blockquote`, `ul`, `ol` or `li`." })
|
|
165
|
+
}).meta({ description: "A block style of a `richtext` field: a named class on a paragraph, a heading, a quote or a list (`<p class=\"big\">`)." });
|
|
166
|
+
/**
|
|
167
|
+
* The `settings` of a `richtext` field: its toolbar, heading levels, block styles and which links
|
|
168
|
+
* open in a new tab. `validateDefinition()` checks them.
|
|
169
|
+
*/
|
|
170
|
+
var RichTextSettings = z.looseObject({
|
|
171
|
+
toolbar: z.array(z.string().min(1)).optional().meta({ description: "The toolbar, in order: `heading`, `style`, `bold`, `italic`, `underline`, `strike`, `superscript`, `subscript`, `code`, `link`, `bulletList`, `orderedList`, `blockquote`, `horizontalRule`, `clear`, `undo`, `redo`, `|` between groups, and the buttons of plugins. Clients skip the names they don't know." }),
|
|
172
|
+
headings: z.array(z.number().int().min(1).max(6)).optional().meta({ description: "The heading levels the toolbar offers. Defaults to 2, 3 and 4." }),
|
|
173
|
+
styles: z.array(RichTextStyle).optional().meta({ description: "The block styles." }),
|
|
174
|
+
links: z.looseObject({ newTab: z.enum([
|
|
175
|
+
"choose",
|
|
176
|
+
"external",
|
|
177
|
+
"never"
|
|
178
|
+
]).optional().meta({ description: "Which links open in a new tab (`target=\"_blank\" rel=\"noopener noreferrer\"`): as the user chooses (the default), every link to another site, or none." }) }).optional()
|
|
179
|
+
}).meta({ description: "The `settings` of a `richtext` field. Its value is HTML. The toolbar only limits what users add: content that the field stores keeps its elements and attributes." });
|
|
180
|
+
/**
|
|
181
|
+
* The `settings` of a `duration` field: the unit of its value, and the parts its input shows.
|
|
182
|
+
* `validateDefinition()` checks them.
|
|
183
|
+
*/
|
|
184
|
+
var DurationSettings = z.looseObject({
|
|
185
|
+
unit: z.enum(DURATION_UNITS).optional().meta({ description: "The unit of the value, a whole number: `seconds` (the default), `minutes`, `hours` or `days`. The `min` and `max` rules are in it too." }),
|
|
186
|
+
precision: z.enum(DURATION_UNITS).optional().meta({ description: "The smallest part the input shows. Defaults to `unit`; a precision finer than `unit` is raised to it." }),
|
|
187
|
+
largestUnit: z.enum(DURATION_UNITS).optional().meta({ description: "The largest part the input shows, which has no upper bound: `days` shows days, and hours from 0 to 23. Defaults to the larger of `hours` and `precision`; a largest unit smaller than `precision` is raised to it." })
|
|
188
|
+
}).meta({ description: "The `settings` of a `duration` field. Its value is a whole number of `unit`, zero or more. A day is 24 hours." });
|
|
189
|
+
/** A type of link that a site adds to a `link` field, in its `settings.types`. */
|
|
190
|
+
var LinkTypeSetting = z.looseObject({
|
|
191
|
+
id: z.string().min(1).refine((id) => !BUILT_IN_LINK_TYPES.includes(id), { message: "A type of a site can't have the id of a built-in type." }).meta({ description: "The id of the type, in the `type` of values: `anchor`." }),
|
|
192
|
+
label: z.string().meta({ description: "The name of the type, in the field." }),
|
|
193
|
+
pattern: z.string().optional().meta({ description: "The pattern that the `url` of its links matches: `^#[\\w-]+$`." }),
|
|
194
|
+
placeholder: z.string().optional()
|
|
195
|
+
}).meta({ description: "A type of link that a site adds: its `url` is the text typed, checked against its `pattern`." });
|
|
196
|
+
/** The `settings` of a `link` field (decision 0055). `validateDefinition()` checks them. */
|
|
197
|
+
var LinkSettings = z.looseObject({
|
|
198
|
+
types: z.array(z.union([z.enum(BUILT_IN_LINK_TYPES), LinkTypeSetting])).min(1).optional().meta({ description: "The types the field offers, in order: `url`, `page`, `email`, `tel`, `file`, and the types of the site. Defaults to `url`, `email` and `tel`, after `page` when the field has a `resource`." }),
|
|
199
|
+
newTab: z.enum([
|
|
200
|
+
"choose",
|
|
201
|
+
"external",
|
|
202
|
+
"never"
|
|
203
|
+
]).optional().meta({ description: "Which links open in a new tab: as the user chooses (the default), by their type (`url` and `file` links), or none." }),
|
|
204
|
+
label: z.enum([
|
|
205
|
+
"optional",
|
|
206
|
+
"required",
|
|
207
|
+
"none"
|
|
208
|
+
]).optional().meta({ description: "Whether links have a label: optional (the default), required, or none." }),
|
|
209
|
+
libraries: z.array(z.string().min(1)).optional().meta({ description: "The media libraries of `file` links. Defaults to every library of the definition." })
|
|
210
|
+
}).meta({ description: "The `settings` of a `link` field. Its value is `{ \"type\", \"url\", \"page\", \"file\", \"label\", \"newTab\" }` (`LinkValue`)." });
|
|
211
|
+
/** The `settings` of an `address` field (decision 0054). `validateDefinition()` checks them. */
|
|
212
|
+
var AddressSettings = z.looseObject({
|
|
213
|
+
country: CountryCode.optional().meta({ description: "The country of a new address. The field sets it once a part is typed." }),
|
|
214
|
+
countries: z.array(CountryCode).optional().meta({ description: "The countries the field allows. With one, the field doesn't show the country, and sets it." }),
|
|
215
|
+
preferred: z.array(CountryCode).optional().meta({ description: "The countries shown first." }),
|
|
216
|
+
required: z.array(z.enum(ADDRESS_PARTS)).optional().meta({ description: "The parts a filled address must have. Defaults to `street`, `city` and `country`." }),
|
|
217
|
+
point: z.boolean().optional().meta({ description: "Adds a map, and the point of the address to the value." })
|
|
218
|
+
}).meta({ description: "The `settings` of an `address` field. Its value is `{ \"street\", \"unit\", \"city\", \"region\", \"postalCode\", \"country\", \"point\" }` (`AddressValue`)." });
|
|
219
|
+
/** The `settings` of a `daterange` field (decision 0053). `validateDefinition()` checks them. */
|
|
220
|
+
var DateRangeSettings = z.looseObject({
|
|
221
|
+
time: z.boolean().optional().meta({ description: "The bounds are date-times, with an offset (`2026-11-04T23:30:00Z`). Without it, they are days (`2026-11-04`), both inclusive." }),
|
|
222
|
+
allDay: z.boolean().optional().meta({ description: "With `time`: an \"All day\" switch. An all-day value has days as bounds, and `\"allDay\": true`." }),
|
|
223
|
+
open: DateRangeOpen.optional(),
|
|
224
|
+
timeZone: z.string().min(1).optional().meta({ description: "The IANA time zone the date-times are shown and typed in (`America/Toronto`), when the value has none. Without it, the browser's." }),
|
|
225
|
+
chooseTimeZone: z.boolean().optional().meta({ description: "With `time`: the field has a menu of time zones, and keeps the choice in the value (`timeZone`)." })
|
|
226
|
+
}).meta({ description: "The `settings` of a `daterange` field: days or date-times, an \"All day\" switch, open bounds and the time zone of its date-times." });
|
|
227
|
+
/** The `settings` of a `money` field (decision 0053). `validateDefinition()` checks them. */
|
|
228
|
+
var MoneySettings = z.looseObject({
|
|
229
|
+
currency: CurrencyCode.optional().meta({ description: "The currency of every amount: the field shows it and cannot change it." }),
|
|
230
|
+
currencies: z.array(CurrencyCode).min(1).optional().meta({ description: "The currencies the user picks from, the first one for a new amount. Without `currency` or `currencies`, every currency." })
|
|
231
|
+
}).meta({ description: "The `settings` of a `money` field: its currency, or the currencies to pick from. `min` and `max` rules apply to the amount, in minor units." });
|
|
91
232
|
//#endregion
|
|
92
|
-
export { BlockType, Field, Rule };
|
|
233
|
+
export { AddressSettings, BlockType, DateRangeSettings, DurationSettings, Field, LinkSettings, LinkTypeSetting, MoneySettings, RichTextSettings, RichTextStyle, Rule };
|
|
93
234
|
|
|
94
235
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":[],"sources":["../../src/schemas/field.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { PORTABLE_RULES } from '../constants';\nimport { Condition, Option } from './common';\n\nconst message = z\n .string()\n .optional()\n .meta({ description: 'Message shown when the rule fails, instead of the default one.' });\n\nconst DateBound = z.union([\n z.string().meta({ description: 'An ISO 8601 date or date-time.' }),\n z.looseObject({ field: z.string().min(1) }).meta({ description: 'Another field of the form.' }),\n]);\n\nexport const Rule = z\n .union([\n z.looseObject({ rule: z.literal('required'), message }),\n z.looseObject({ rule: z.enum(['min', 'max']), value: z.number(), message }),\n z.looseObject({\n rule: z.literal('pattern'),\n value: z.string(),\n flags: z.string().optional(),\n message,\n }),\n z.looseObject({ rule: z.enum(['email', 'url']), message }),\n z.looseObject({\n rule: z.literal('in'),\n value: z.array(z.union([z.string(), z.number(), z.boolean()])),\n message,\n }),\n z.looseObject({ rule: z.literal('accept'), value: z.array(z.string().min(1)), message }),\n z.looseObject({ rule: z.literal('maxSize'), value: z.number().int().positive(), message }),\n z.looseObject({ rule: z.enum(['before', 'after']), value: DateBound, message }),\n z\n .looseObject({\n rule: z\n .string()\n .refine((rule) => !(PORTABLE_RULES as readonly string[]).includes(rule)),\n message,\n })\n .meta({\n description:\n \"A rule added in a later version of the protocol. Clients that don't know it ignore it; the server still enforces it.\",\n }),\n ])\n .meta({\n description:\n 'A portable validation rule. `min` and `max` apply to numbers, and to the length of text and arrays. `accept` lists MIME types (`image/*`). `maxSize` is in bytes.',\n });\n\nexport const BlockType = z.looseObject({\n id: z.string().min(1),\n label: z.string(),\n icon: z.string().optional(),\n // Return types are written out so that declaration files keep the recursion.\n get fields(): z.ZodArray<typeof Field> {\n return z.array(Field);\n },\n});\n\nexport const Field = z\n .looseObject({\n name: z.string().min(1),\n type: z\n .string()\n .min(1)\n .meta({ description: 'A built-in field type, or a type provided by a plugin.' }),\n label: z.string().optional(),\n help: z.string().optional(),\n placeholder: z.string().optional(),\n default: z.unknown().optional(),\n localized: z\n .boolean()\n .optional()\n .meta({ description: 'The value is an object keyed by locale.' }),\n readOnly: z.boolean().optional(),\n createOnly: z.boolean().optional(),\n updateOnly: z.boolean().optional(),\n rules: z.array(Rule).optional(),\n visibleWhen: Condition.optional(),\n options: z.array(Option).optional().meta({ description: '`select`: the choices.' }),\n multiple: z\n .boolean()\n .optional()\n .meta({ description: '`select`, `relation`, `media`, `file`: the value is an array.' }),\n resource: z.string().optional().meta({\n description:\n '`relation`: id of the related resource. `media`: id of a resource of kind `media`, optional when the definition has only one.',\n }),\n accept: z\n .array(z.string())\n .optional()\n .meta({ description: '`media`, `file`: accepted MIME types.' }),\n from: z\n .string()\n .optional()\n .meta({ description: '`slug`: the field the slug is generated from.' }),\n display: z.string().optional().meta({\n description: 'Display used in lists, when it differs from the default one of the type.',\n }),\n get fields(): z.ZodOptional<z.ZodArray<typeof Field>> {\n return z\n .array(Field)\n .optional()\n .meta({ description: '`group` and `repeater`: the nested fields.' });\n },\n get types(): z.ZodOptional<z.ZodArray<typeof BlockType>> {\n return z\n .array(BlockType)\n .optional()\n .meta({ description: '`repeater`: typed blocks, each with its own fields.' });\n },\n settings: z.record(z.string(), z.unknown()).optional(),\n })\n .meta({ description: 'A field of a form.' });\n\nexport type Rule = z.infer<typeof Rule>;\nexport type BlockType = z.infer<typeof BlockType>;\nexport type Field = z.infer<typeof Field>;\n"],"mappings":";;;;AAKA,IAAM,UAAU,EACX,OAAO,CAAC,CACR,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F,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACjC,aACI,gIACR,CAAC;CACD,QAAQ,EACH,MAAM,EAAE,OAAO,CAAC,CAAC,CACjB,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,wCAAwC,CAAC;CAClE,MAAM,EACD,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,gDAAgD,CAAC;CAC1E,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAChC,aAAa,2EACjB,CAAC;CACD,IAAI,SAAkD;EAClD,OAAO,EACF,MAAM,KAAK,CAAC,CACZ,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,6CAA6C,CAAC;CAC3E;CACA,IAAI,QAAqD;EACrD,OAAO,EACF,MAAM,SAAS,CAAC,CAChB,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,sDAAsD,CAAC;CACpF;CACA,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;AACzD,CAAC,CAAC,CACD,KAAK,EAAE,aAAa,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../src/schemas/field.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n ADDRESS_PARTS,\n BUILT_IN_LINK_TYPES,\n DATE_RANGE_OPEN_BOUNDS,\n DURATION_UNITS,\n PORTABLE_RULES,\n RICH_TEXT_STYLE_ELEMENTS,\n} from '../constants';\nimport { Abilities, Condition, Option } from './common';\n\nconst message = z\n .string()\n .optional()\n .meta({ description: 'Message shown when the rule fails, instead of the default one.' });\n\nconst mode = z.enum(['create', 'update']).optional().meta({\n description:\n 'The rule only applies when the item is created (`create`) or updated (`update`): a password required to create a user, optional to edit one. Without it, the rule applies in both modes.',\n});\n\nconst Ratio = z\n .string()\n .regex(/^[1-9][0-9]*:[1-9][0-9]*$/)\n .meta({ description: 'An aspect ratio, as `width:height`: `16:9`.' });\n\nconst CountryCode = z\n .string()\n .regex(/^[A-Z]{2}$/)\n .meta({ description: 'An ISO 3166-1 alpha-2 code, in capitals: `CA`.' });\nconst CurrencyCode = z\n .string()\n .regex(/^[A-Z]{3}$/)\n .meta({ description: 'An ISO 4217 currency code, in capitals: `CAD`.' });\n\nconst DateRangeOpen = z.enum(DATE_RANGE_OPEN_BOUNDS).meta({\n description: 'Which bounds of the range can be `null`: `start`, `end` or `both`.',\n});\n\nconst DateBound = z.union([\n z.string().meta({ description: 'An ISO 8601 date or date-time.' }),\n z.looseObject({ field: z.string().min(1) }).meta({ description: 'Another field of the form.' }),\n]);\n\nexport const Rule = z\n .union([\n z.looseObject({ rule: z.literal('required'), message, mode }),\n z.looseObject({ rule: z.enum(['min', 'max']), value: z.number(), message, mode }),\n z.looseObject({\n rule: z.literal('pattern'),\n value: z.string(),\n flags: z.string().optional(),\n message,\n mode,\n }),\n z.looseObject({ rule: z.enum(['email', 'url', 'json']), message, mode }),\n z.looseObject({\n rule: z.literal('tel'),\n extension: z.boolean().optional().meta({\n description:\n 'The number can have an extension, after `;ext=` as in a `tel:` URI (RFC 3966): `+15145550199;ext=123`, 1 to 10 digits. Without it, a value with an extension fails.',\n }),\n message,\n mode,\n }),\n z.looseObject({\n rule: z.literal('daterange'),\n open: DateRangeOpen.optional(),\n message,\n mode,\n }),\n z.looseObject({\n rule: z.literal('money'),\n currencies: z.array(CurrencyCode).optional().meta({\n description: 'The currencies allowed. Without them, any ISO 4217 currency.',\n }),\n message,\n mode,\n }),\n z.looseObject({\n rule: z.literal('in'),\n value: z.array(z.union([z.string(), z.number(), z.boolean()])),\n message,\n mode,\n }),\n z.looseObject({\n rule: z.literal('accept'),\n value: z.array(z.string().min(1)),\n message,\n mode,\n }),\n z.looseObject({\n rule: z.literal('maxSize'),\n value: z.number().int().positive(),\n message,\n mode,\n }),\n z.looseObject({ rule: z.enum(['before', 'after']), value: DateBound, message, mode }),\n z.looseObject({\n rule: z.literal('postalCode'),\n value: z\n .union([\n CountryCode,\n z.looseObject({ field: z.string().min(1) }).meta({\n description: 'Another field of the form, which holds the country.',\n }),\n ])\n .optional()\n .meta({\n description:\n 'The country of the postal code. Without it, or without a country, any postal code passes. An `address` value has its own country.',\n }),\n message,\n mode,\n }),\n z.looseObject({\n rule: z.literal('crop'),\n value: z.looseObject({\n ratios: z.array(Ratio).optional().meta({\n description:\n 'A crop must have one of them: its height is within one pixel of its width divided by the ratio, after its rotation.',\n }),\n required: z\n .boolean()\n .optional()\n .meta({ description: 'Each image needs a crop for this use.' }),\n }),\n message,\n mode,\n }),\n z\n .looseObject({\n rule: z.literal('providers'),\n value: z.array(z.string().min(1)).min(1),\n message,\n mode,\n })\n .meta({\n description:\n 'The providers an `embed` value may come from: the `provider_name` of their oEmbed (`YouTube`), compared without case (decision 0058).',\n }),\n z\n .looseObject({\n rule: z\n .string()\n .refine((rule) => !(PORTABLE_RULES as readonly string[]).includes(rule)),\n message,\n mode,\n })\n .meta({\n description:\n \"A rule added in a later version of the protocol. Clients that don't know it ignore it; the server still enforces it.\",\n }),\n ])\n .meta({\n description:\n 'A portable validation rule. `min` and `max` apply to numbers, to the amount of `money` values (in minor units), and to the length of text and arrays. `daterange` and `money` are implied by their types, with the `open` bounds and the `currencies` of the field (decision 0053). `accept` lists MIME types (`image/*`). `maxSize` is in bytes. `tel` checks an E.164 number, with an extension when `extension` is `true`. `crop` checks the transform of each image of an `image` or `media` value (decision 0031). `postalCode` checks a postal code against the format of its country, for the countries whose format Panneau knows: Canada and the United States (decision 0054). `providers` lists the providers of an `embed` value (decision 0058).',\n });\n\nexport const BlockType = z.looseObject({\n id: z.string().min(1),\n label: z.string(),\n icon: z.string().optional(),\n // Return types are written out so that declaration files keep the recursion.\n get fields(): z.ZodArray<typeof Field> {\n return z.array(Field);\n },\n});\n\nexport const Field = z\n .looseObject({\n name: z.string().min(1),\n type: z\n .string()\n .min(1)\n .meta({ description: 'A built-in field type, or a type provided by a plugin.' }),\n label: z.string().optional(),\n help: z.string().optional(),\n placeholder: z.string().optional(),\n default: z.unknown().optional(),\n localized: z\n .boolean()\n .optional()\n .meta({ description: 'The value is an object keyed by locale.' }),\n readOnly: z.boolean().optional().meta({\n description:\n \"Nobody edits the field (a computed value). For a field the current user can't edit, use `abilities.update: false`.\",\n }),\n abilities: Abilities.optional().meta({\n description:\n \"What the current user can do with the field (decision 0046). Only `false` restricts: `view: false` leaves the field out of forms, details and lists, and items don't carry its value; `update: false` makes it read-only, and the backend ignores its value. For the fields at the top of a resource and of its types.\",\n }),\n createOnly: z.boolean().optional(),\n updateOnly: z.boolean().optional(),\n notInForm: z.boolean().optional().meta({\n description:\n '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.',\n }),\n rules: z.array(Rule).optional(),\n visibleWhen: Condition.optional(),\n options: z.array(Option).optional().meta({ description: '`select`: the choices.' }),\n multiple: z.boolean().optional().meta({\n description:\n '`select`, `relation`, `media`, `image`, `file`, `country`, and compound fields: the value is an array.',\n }),\n resource: z\n .union([z.string().min(1), z.array(z.string().min(1)).min(1)])\n .optional()\n .meta({\n description:\n '`relation`: id of the related resource. `media`, `image`: id of a resource of kind `media`, or a list of them; without it, every library of the definition (decision 0027). `link`: the resources of its `page` links (decision 0055).',\n }),\n accept: z.array(z.string()).optional().meta({\n description:\n '`media`, `image`, `file`: accepted MIME types. `image` defaults to `image/*`.',\n }),\n ratios: z.array(Ratio).optional().meta({\n description:\n '`image`: ratios the editor suggests. The `crop` rule enforces ratios (decision 0031).',\n }),\n rotate: z.boolean().optional().meta({\n description: '`image`: whether the editor offers rotation and flips. Defaults to true.',\n }),\n focalPoint: z.boolean().optional().meta({\n description: '`image`: whether the editor offers the focal point. Defaults to true.',\n }),\n transformBase: z.enum(['media', 'original', 'choose']).optional().meta({\n description:\n \"`image`: what a transform for one use starts from: the media's own transform (`media`, the default), the original file, or the user's choice in the editor (decision 0031).\",\n }),\n transforms: z.boolean().optional().meta({\n description:\n \"`media`, `image`: whether values keep a transform for one use. Defaults to true. With `false`, the backend ignores the `transform` of values and items give none, clients send none, and an `image` field has no editor; it can't have `ratios` or the `crop` rule (decision 0087).\",\n }),\n from: z.string().optional().meta({\n description:\n '`slug`: the field the slug is generated from. `region`: the field of the same object that holds its country.',\n }),\n check: z.boolean().optional().meta({\n description:\n 'The client checks the value with the backend as it is typed, with `POST /resources/{resource}/fields/{field}/check`: whether a `slug` is available, and its URL. A field at the top of the resource only.',\n }),\n display: z.string().optional().meta({\n description: 'Display used in lists, when it differs from the default one of the type.',\n }),\n get fields(): z.ZodOptional<z.ZodArray<typeof Field>> {\n return z.array(Field).optional().meta({\n description:\n \"`group` and `repeater`: the nested fields. On a type that isn't built in, they make it a compound field (decision 0065): its value is an object of them, or a list of objects with `multiple`, and a client without the type's plugin renders it as a `group` or a `repeater`.\",\n });\n },\n get types(): z.ZodOptional<z.ZodArray<typeof BlockType>> {\n return z\n .array(BlockType)\n .optional()\n .meta({ description: '`repeater`: typed blocks, each with its own fields.' });\n },\n settings: z.record(z.string(), z.unknown()).optional(),\n })\n .meta({ description: 'A field of a form.' });\n\n/** A block style of a `richtext` field: a named class on an element (`<p class=\"big\">`). */\nexport const RichTextStyle = z\n .looseObject({\n label: z.string().meta({ description: 'The name of the style in the toolbar.' }),\n class: z.string().min(1).meta({\n description:\n 'The class the style puts on the element: `big`. Several classes are separated by spaces.',\n }),\n element: z.enum(RICH_TEXT_STYLE_ELEMENTS).optional().meta({\n description:\n 'The element the style applies to: `p` (the default), `h1` to `h6`, `blockquote`, `ul`, `ol` or `li`.',\n }),\n })\n .meta({\n description:\n 'A block style of a `richtext` field: a named class on a paragraph, a heading, a quote or a list (`<p class=\"big\">`).',\n });\n\n/**\n * The `settings` of a `richtext` field: its toolbar, heading levels, block styles and which links\n * open in a new tab. `validateDefinition()` checks them.\n */\nexport const RichTextSettings = z\n .looseObject({\n toolbar: z.array(z.string().min(1)).optional().meta({\n description:\n \"The toolbar, in order: `heading`, `style`, `bold`, `italic`, `underline`, `strike`, `superscript`, `subscript`, `code`, `link`, `bulletList`, `orderedList`, `blockquote`, `horizontalRule`, `clear`, `undo`, `redo`, `|` between groups, and the buttons of plugins. Clients skip the names they don't know.\",\n }),\n headings: z.array(z.number().int().min(1).max(6)).optional().meta({\n description: 'The heading levels the toolbar offers. Defaults to 2, 3 and 4.',\n }),\n styles: z.array(RichTextStyle).optional().meta({ description: 'The block styles.' }),\n links: z\n .looseObject({\n newTab: z.enum(['choose', 'external', 'never']).optional().meta({\n description:\n 'Which links open in a new tab (`target=\"_blank\" rel=\"noopener noreferrer\"`): as the user chooses (the default), every link to another site, or none.',\n }),\n })\n .optional(),\n })\n .meta({\n description:\n 'The `settings` of a `richtext` field. Its value is HTML. The toolbar only limits what users add: content that the field stores keeps its elements and attributes.',\n });\n\n/**\n * The `settings` of a `duration` field: the unit of its value, and the parts its input shows.\n * `validateDefinition()` checks them.\n */\nexport const DurationSettings = z\n .looseObject({\n unit: z.enum(DURATION_UNITS).optional().meta({\n description:\n 'The unit of the value, a whole number: `seconds` (the default), `minutes`, `hours` or `days`. The `min` and `max` rules are in it too.',\n }),\n precision: z.enum(DURATION_UNITS).optional().meta({\n description:\n 'The smallest part the input shows. Defaults to `unit`; a precision finer than `unit` is raised to it.',\n }),\n largestUnit: z.enum(DURATION_UNITS).optional().meta({\n description:\n 'The largest part the input shows, which has no upper bound: `days` shows days, and hours from 0 to 23. Defaults to the larger of `hours` and `precision`; a largest unit smaller than `precision` is raised to it.',\n }),\n })\n .meta({\n description:\n 'The `settings` of a `duration` field. Its value is a whole number of `unit`, zero or more. A day is 24 hours.',\n });\n\n/** A type of link that a site adds to a `link` field, in its `settings.types`. */\nexport const LinkTypeSetting = z\n .looseObject({\n id: z\n .string()\n .min(1)\n .refine((id) => !(BUILT_IN_LINK_TYPES as readonly string[]).includes(id), {\n message: \"A type of a site can't have the id of a built-in type.\",\n })\n .meta({ description: 'The id of the type, in the `type` of values: `anchor`.' }),\n label: z.string().meta({ description: 'The name of the type, in the field.' }),\n pattern: z.string().optional().meta({\n description: 'The pattern that the `url` of its links matches: `^#[\\\\w-]+$`.',\n }),\n placeholder: z.string().optional(),\n })\n .meta({\n description:\n 'A type of link that a site adds: its `url` is the text typed, checked against its `pattern`.',\n });\n\n/** The `settings` of a `link` field (decision 0055). `validateDefinition()` checks them. */\nexport const LinkSettings = z\n .looseObject({\n types: z\n .array(z.union([z.enum(BUILT_IN_LINK_TYPES), LinkTypeSetting]))\n .min(1)\n .optional()\n .meta({\n description:\n 'The types the field offers, in order: `url`, `page`, `email`, `tel`, `file`, and the types of the site. Defaults to `url`, `email` and `tel`, after `page` when the field has a `resource`.',\n }),\n newTab: z.enum(['choose', 'external', 'never']).optional().meta({\n description:\n 'Which links open in a new tab: as the user chooses (the default), by their type (`url` and `file` links), or none.',\n }),\n label: z.enum(['optional', 'required', 'none']).optional().meta({\n description: 'Whether links have a label: optional (the default), required, or none.',\n }),\n libraries: z.array(z.string().min(1)).optional().meta({\n description:\n 'The media libraries of `file` links. Defaults to every library of the definition.',\n }),\n })\n .meta({\n description:\n 'The `settings` of a `link` field. Its value is `{ \"type\", \"url\", \"page\", \"file\", \"label\", \"newTab\" }` (`LinkValue`).',\n });\n\n/** The `settings` of an `address` field (decision 0054). `validateDefinition()` checks them. */\nexport const AddressSettings = z\n .looseObject({\n country: CountryCode.optional().meta({\n description: 'The country of a new address. The field sets it once a part is typed.',\n }),\n countries: z.array(CountryCode).optional().meta({\n description:\n \"The countries the field allows. With one, the field doesn't show the country, and sets it.\",\n }),\n preferred: z\n .array(CountryCode)\n .optional()\n .meta({ description: 'The countries shown first.' }),\n required: z.array(z.enum(ADDRESS_PARTS)).optional().meta({\n description:\n 'The parts a filled address must have. Defaults to `street`, `city` and `country`.',\n }),\n point: z.boolean().optional().meta({\n description: 'Adds a map, and the point of the address to the value.',\n }),\n })\n .meta({\n description:\n 'The `settings` of an `address` field. Its value is `{ \"street\", \"unit\", \"city\", \"region\", \"postalCode\", \"country\", \"point\" }` (`AddressValue`).',\n });\n\n/** The `settings` of a `daterange` field (decision 0053). `validateDefinition()` checks them. */\nexport const DateRangeSettings = z\n .looseObject({\n time: z.boolean().optional().meta({\n description:\n 'The bounds are date-times, with an offset (`2026-11-04T23:30:00Z`). Without it, they are days (`2026-11-04`), both inclusive.',\n }),\n allDay: z.boolean().optional().meta({\n description:\n 'With `time`: an \"All day\" switch. An all-day value has days as bounds, and `\"allDay\": true`.',\n }),\n open: DateRangeOpen.optional(),\n timeZone: z.string().min(1).optional().meta({\n description:\n \"The IANA time zone the date-times are shown and typed in (`America/Toronto`), when the value has none. Without it, the browser's.\",\n }),\n chooseTimeZone: z.boolean().optional().meta({\n description:\n 'With `time`: the field has a menu of time zones, and keeps the choice in the value (`timeZone`).',\n }),\n })\n .meta({\n description:\n 'The `settings` of a `daterange` field: days or date-times, an \"All day\" switch, open bounds and the time zone of its date-times.',\n });\n\n/** The `settings` of a `money` field (decision 0053). `validateDefinition()` checks them. */\nexport const MoneySettings = z\n .looseObject({\n currency: CurrencyCode.optional().meta({\n description: 'The currency of every amount: the field shows it and cannot change it.',\n }),\n currencies: z.array(CurrencyCode).min(1).optional().meta({\n description:\n 'The currencies the user picks from, the first one for a new amount. Without `currency` or `currencies`, every currency.',\n }),\n })\n .meta({\n description:\n 'The `settings` of a `money` field: its currency, or the currencies to pick from. `min` and `max` rules apply to the amount, in minor units.',\n });\n\nexport type Rule = z.infer<typeof Rule>;\nexport type BlockType = z.infer<typeof BlockType>;\nexport type Field = z.infer<typeof Field>;\n/** A block style of a `richtext` field. */\nexport type RichTextStyle = z.infer<typeof RichTextStyle>;\n/** The `settings` of a `richtext` field. */\nexport type RichTextSettings = z.infer<typeof RichTextSettings>;\n/** A type of link that a site adds to a `link` field. */\nexport type LinkTypeSetting = z.infer<typeof LinkTypeSetting>;\n/** The `settings` of a `link` field. */\nexport type LinkSettings = z.infer<typeof LinkSettings>;\n/** The `settings` of an `address` field. */\nexport type AddressSettings = z.infer<typeof AddressSettings>;\n/** The `settings` of a `daterange` field. */\nexport type DateRangeSettings = z.infer<typeof DateRangeSettings>;\n/** The `settings` of a `money` field. */\nexport type MoneySettings = z.infer<typeof MoneySettings>;\n/** The `settings` of a `duration` field. */\nexport type DurationSettings = z.infer<typeof DurationSettings>;\n"],"mappings":";;;;AAYA,IAAM,UAAU,EACX,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,iEAAiE,CAAC;AAE3F,IAAM,OAAO,EAAE,KAAK,CAAC,UAAU,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACtD,aACI,2LACR,CAAC;AAED,IAAM,QAAQ,EACT,OAAO,CAAC,CACR,MAAM,2BAA2B,CAAC,CAClC,KAAK,EAAE,aAAa,8CAA8C,CAAC;AAExE,IAAM,cAAc,EACf,OAAO,CAAC,CACR,MAAM,YAAY,CAAC,CACnB,KAAK,EAAE,aAAa,iDAAiD,CAAC;AAC3E,IAAM,eAAe,EAChB,OAAO,CAAC,CACR,MAAM,YAAY,CAAC,CACnB,KAAK,EAAE,aAAa,iDAAiD,CAAC;AAE3E,IAAM,gBAAgB,EAAE,KAAK,sBAAsB,CAAC,CAAC,KAAK,EACtD,aAAa,qEACjB,CAAC;AAED,IAAM,YAAY,EAAE,MAAM,CACtB,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,aAAa,iCAAiC,CAAC,GACjE,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,aAAa,6BAA6B,CAAC,CAClG,CAAC;AAED,IAAa,OAAO,EACf,MAAM;CACH,EAAE,YAAY;EAAE,MAAM,EAAE,QAAQ,UAAU;EAAG;EAAS;CAAK,CAAC;CAC5D,EAAE,YAAY;EAAE,MAAM,EAAE,KAAK,C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