@panneau/protocol 5.0.0-alpha.0 → 5.0.0-alpha.2

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.
Files changed (83) hide show
  1. package/README.md +13 -8
  2. package/dist/conformance/index.d.ts.map +1 -1
  3. package/dist/conformance/index.js +27 -0
  4. package/dist/conformance/index.js.map +1 -1
  5. package/dist/constants.d.ts +21 -0
  6. package/dist/constants.d.ts.map +1 -0
  7. package/dist/constants.js +73 -0
  8. package/dist/constants.js.map +1 -0
  9. package/dist/index.d.ts +3 -8
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +17 -13
  12. package/dist/mock/example.d.ts.map +1 -1
  13. package/dist/mock/example.js +4 -0
  14. package/dist/mock/example.js.map +1 -1
  15. package/dist/mock/index.d.ts.map +1 -1
  16. package/dist/mock/index.js +5 -1
  17. package/dist/mock/index.js.map +1 -1
  18. package/dist/openapi.d.ts +2 -0
  19. package/dist/openapi.d.ts.map +1 -1
  20. package/dist/openapi.js +13 -2
  21. package/dist/openapi.js.map +1 -1
  22. package/dist/problem.d.ts +7 -0
  23. package/dist/problem.d.ts.map +1 -0
  24. package/dist/problem.js +22 -0
  25. package/dist/problem.js.map +1 -0
  26. package/dist/query.d.ts +26 -2
  27. package/dist/query.d.ts.map +1 -1
  28. package/dist/query.js +37 -6
  29. package/dist/query.js.map +1 -1
  30. package/dist/rules.d.ts.map +1 -1
  31. package/dist/rules.js +1 -1
  32. package/dist/rules.js.map +1 -1
  33. package/dist/runtime/index.d.ts +11 -0
  34. package/dist/runtime/index.d.ts.map +1 -0
  35. package/dist/runtime/index.js +10 -0
  36. package/dist/schemas/action.d.ts +0 -3
  37. package/dist/schemas/action.d.ts.map +1 -1
  38. package/dist/schemas/action.js +1 -11
  39. package/dist/schemas/action.js.map +1 -1
  40. package/dist/schemas/api.d.ts.map +1 -1
  41. package/dist/schemas/api.js +1 -1
  42. package/dist/schemas/api.js.map +1 -1
  43. package/dist/schemas/boot.d.ts +0 -5
  44. package/dist/schemas/boot.d.ts.map +1 -1
  45. package/dist/schemas/boot.js +1 -6
  46. package/dist/schemas/boot.js.map +1 -1
  47. package/dist/schemas/definition.d.ts +54 -1
  48. package/dist/schemas/definition.d.ts.map +1 -1
  49. package/dist/schemas/definition.js +2 -5
  50. package/dist/schemas/definition.js.map +1 -1
  51. package/dist/schemas/field.d.ts +0 -6
  52. package/dist/schemas/field.d.ts.map +1 -1
  53. package/dist/schemas/field.js +2 -35
  54. package/dist/schemas/field.js.map +1 -1
  55. package/dist/schemas/index.d.ts +224 -1
  56. package/dist/schemas/index.d.ts.map +1 -1
  57. package/dist/schemas/index.js +15 -6
  58. package/dist/schemas/index.js.map +1 -1
  59. package/dist/schemas/layout.d.ts +0 -3
  60. package/dist/schemas/layout.d.ts.map +1 -1
  61. package/dist/schemas/layout.js +1 -13
  62. package/dist/schemas/layout.js.map +1 -1
  63. package/dist/schemas/list.d.ts +0 -3
  64. package/dist/schemas/list.d.ts.map +1 -1
  65. package/dist/schemas/list.js +2 -9
  66. package/dist/schemas/list.js.map +1 -1
  67. package/dist/schemas/theme.d.ts +179 -0
  68. package/dist/schemas/theme.d.ts.map +1 -0
  69. package/dist/schemas/theme.js +66 -0
  70. package/dist/schemas/theme.js.map +1 -0
  71. package/dist/themes.d.ts +11 -0
  72. package/dist/themes.d.ts.map +1 -0
  73. package/dist/themes.js +80 -0
  74. package/dist/themes.js.map +1 -0
  75. package/dist/validate.d.ts +0 -3
  76. package/dist/validate.d.ts.map +1 -1
  77. package/dist/validate.js +2 -7
  78. package/dist/validate.js.map +1 -1
  79. package/package.json +7 -1
  80. package/schema/boot.schema.json +255 -12
  81. package/schema/definition.schema.json +255 -12
  82. package/schema/openapi.json +422 -15
  83. package/schema/theme.schema.json +234 -0
@@ -94,7 +94,7 @@
94
94
  "required": false,
95
95
  "style": "deepObject",
96
96
  "explode": true,
97
- "description": "`filter[status]=published`, `filter[tags][]=a`.",
97
+ "description": "`filter[status]=published`; `filter[tags][]=a&filter[tags][]=b` for any of several values; `filter[published_at][from]=2026-01-01&filter[published_at][to]=2026-01-31` for the inclusive bounds of a range filter (`date-range`), without the open end.",
98
98
  "schema": {
99
99
  "type": "object",
100
100
  "additionalProperties": true
@@ -860,7 +860,7 @@
860
860
  "required": false,
861
861
  "style": "deepObject",
862
862
  "explode": true,
863
- "description": "`filter[status]=published`, `filter[tags][]=a`.",
863
+ "description": "`filter[status]=published`; `filter[tags][]=a&filter[tags][]=b` for any of several values; `filter[published_at][from]=2026-01-01&filter[published_at][to]=2026-01-31` for the inclusive bounds of a range filter (`date-range`), without the open end.",
864
864
  "schema": {
865
865
  "type": "object",
866
866
  "additionalProperties": true
@@ -2452,7 +2452,7 @@
2452
2452
  "type": {
2453
2453
  "type": "string",
2454
2454
  "minLength": 1,
2455
- "description": "Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`."
2455
+ "description": "Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`. A `date-range` value is the bounds of a range: `filter[id][from]` and `filter[id][to]`, days (`2026-01-31`), both inclusive and both optional."
2456
2456
  },
2457
2457
  "label": {
2458
2458
  "type": "string"
@@ -3021,6 +3021,423 @@
3021
3021
  ],
3022
3022
  "additionalProperties": {}
3023
3023
  },
3024
+ "ThemeTokens": {
3025
+ "type": "object",
3026
+ "propertyNames": {
3027
+ "type": "string",
3028
+ "pattern": "^[a-zA-Z0-9_-]+$"
3029
+ },
3030
+ "additionalProperties": {
3031
+ "type": "string",
3032
+ "pattern": "^[^{};<]*$"
3033
+ },
3034
+ "description": "CSS variables without the leading `--`, and their values: `{ \"panneau-color-accent\": \"#05f\" }`. Values cannot contain `{`, `}`, `;` or `<`."
3035
+ },
3036
+ "ToneValues": {
3037
+ "type": "object",
3038
+ "properties": {
3039
+ "text": {
3040
+ "type": "string",
3041
+ "description": "Text and icons on surfaces."
3042
+ },
3043
+ "subtle": {
3044
+ "type": "string",
3045
+ "description": "Background of the subtle appearance."
3046
+ },
3047
+ "border": {
3048
+ "type": "string",
3049
+ "description": "Border of the subtle appearance."
3050
+ },
3051
+ "outline": {
3052
+ "type": "string",
3053
+ "description": "Border of the outline appearance."
3054
+ },
3055
+ "solid": {
3056
+ "type": "string",
3057
+ "description": "Background of the solid appearance."
3058
+ },
3059
+ "solidHover": {
3060
+ "type": "string",
3061
+ "description": "Background of the solid appearance on hover."
3062
+ },
3063
+ "solidText": {
3064
+ "type": "string",
3065
+ "description": "Text on the solid appearance."
3066
+ }
3067
+ },
3068
+ "required": [
3069
+ "text",
3070
+ "subtle",
3071
+ "border",
3072
+ "outline",
3073
+ "solid",
3074
+ "solidHover",
3075
+ "solidText"
3076
+ ],
3077
+ "additionalProperties": {}
3078
+ },
3079
+ "ToneInput": {
3080
+ "anyOf": [
3081
+ {
3082
+ "type": "string",
3083
+ "description": "One color, from which Panneau derives the others."
3084
+ },
3085
+ {
3086
+ "type": "object",
3087
+ "properties": {
3088
+ "text": {
3089
+ "type": "string",
3090
+ "description": "Text and icons on surfaces."
3091
+ },
3092
+ "subtle": {
3093
+ "type": "string",
3094
+ "description": "Background of the subtle appearance."
3095
+ },
3096
+ "border": {
3097
+ "type": "string",
3098
+ "description": "Border of the subtle appearance."
3099
+ },
3100
+ "outline": {
3101
+ "type": "string",
3102
+ "description": "Border of the outline appearance."
3103
+ },
3104
+ "solid": {
3105
+ "type": "string",
3106
+ "description": "Background of the solid appearance."
3107
+ },
3108
+ "solidHover": {
3109
+ "type": "string",
3110
+ "description": "Background of the solid appearance on hover."
3111
+ },
3112
+ "solidText": {
3113
+ "type": "string",
3114
+ "description": "Text on the solid appearance."
3115
+ },
3116
+ "dark": {
3117
+ "type": "object",
3118
+ "properties": {
3119
+ "text": {
3120
+ "type": "string",
3121
+ "description": "Text and icons on surfaces."
3122
+ },
3123
+ "subtle": {
3124
+ "type": "string",
3125
+ "description": "Background of the subtle appearance."
3126
+ },
3127
+ "border": {
3128
+ "type": "string",
3129
+ "description": "Border of the subtle appearance."
3130
+ },
3131
+ "outline": {
3132
+ "type": "string",
3133
+ "description": "Border of the outline appearance."
3134
+ },
3135
+ "solid": {
3136
+ "type": "string",
3137
+ "description": "Background of the solid appearance."
3138
+ },
3139
+ "solidHover": {
3140
+ "type": "string",
3141
+ "description": "Background of the solid appearance on hover."
3142
+ },
3143
+ "solidText": {
3144
+ "type": "string",
3145
+ "description": "Text on the solid appearance."
3146
+ }
3147
+ },
3148
+ "additionalProperties": {}
3149
+ }
3150
+ },
3151
+ "required": [
3152
+ "text",
3153
+ "subtle",
3154
+ "border",
3155
+ "outline",
3156
+ "solid",
3157
+ "solidHover",
3158
+ "solidText"
3159
+ ],
3160
+ "additionalProperties": {}
3161
+ }
3162
+ ],
3163
+ "description": "A tone: one color, or every value with dark scheme overrides."
3164
+ },
3165
+ "ThemeFontFace": {
3166
+ "type": "object",
3167
+ "properties": {
3168
+ "family": {
3169
+ "type": "string",
3170
+ "pattern": "^[^{}<;\"\\\\]+$"
3171
+ },
3172
+ "src": {
3173
+ "type": "string",
3174
+ "pattern": "^[^{}<]+$",
3175
+ "description": "The `src` descriptor: `url(/fonts/geist.woff2) format('woff2')`."
3176
+ },
3177
+ "weight": {
3178
+ "type": "string",
3179
+ "pattern": "^[^{}<;]*$"
3180
+ },
3181
+ "style": {
3182
+ "type": "string",
3183
+ "pattern": "^[^{}<;]*$"
3184
+ },
3185
+ "display": {
3186
+ "type": "string",
3187
+ "enum": [
3188
+ "auto",
3189
+ "block",
3190
+ "swap",
3191
+ "fallback",
3192
+ "optional"
3193
+ ]
3194
+ },
3195
+ "unicodeRange": {
3196
+ "type": "string",
3197
+ "pattern": "^[^{}<;]*$"
3198
+ }
3199
+ },
3200
+ "required": [
3201
+ "family",
3202
+ "src"
3203
+ ],
3204
+ "additionalProperties": {},
3205
+ "description": "A font face, written as an `@font-face` rule."
3206
+ },
3207
+ "ThemeFontStylesheet": {
3208
+ "type": "object",
3209
+ "properties": {
3210
+ "stylesheet": {
3211
+ "type": "string",
3212
+ "minLength": 1
3213
+ }
3214
+ },
3215
+ "required": [
3216
+ "stylesheet"
3217
+ ],
3218
+ "additionalProperties": {},
3219
+ "description": "A hosted stylesheet that declares font faces."
3220
+ },
3221
+ "ThemeFont": {
3222
+ "anyOf": [
3223
+ {
3224
+ "$ref": "#/components/schemas/ThemeFontFace"
3225
+ },
3226
+ {
3227
+ "$ref": "#/components/schemas/ThemeFontStylesheet"
3228
+ }
3229
+ ]
3230
+ },
3231
+ "Theme": {
3232
+ "type": "object",
3233
+ "properties": {
3234
+ "label": {
3235
+ "type": "string"
3236
+ },
3237
+ "tokens": {
3238
+ "description": "Tokens of the light scheme, or of both schemes when `dark` does not set them.",
3239
+ "$ref": "#/components/schemas/ThemeTokens"
3240
+ },
3241
+ "dark": {
3242
+ "description": "Tokens that change in the dark scheme.",
3243
+ "$ref": "#/components/schemas/ThemeTokens"
3244
+ },
3245
+ "palette": {
3246
+ "description": "Raw colors, written as `--panneau-palette-<name>`: tokens and tones use them with `var(--panneau-palette-<name>)`.",
3247
+ "type": "object",
3248
+ "propertyNames": {
3249
+ "type": "string",
3250
+ "pattern": "^[a-z0-9-]+$"
3251
+ },
3252
+ "additionalProperties": {
3253
+ "type": "string",
3254
+ "pattern": "^[^{};<]*$"
3255
+ }
3256
+ },
3257
+ "tones": {
3258
+ "description": "Tones added or redefined by the theme, applied by `panneau-tone-<name>`.",
3259
+ "type": "object",
3260
+ "propertyNames": {
3261
+ "type": "string",
3262
+ "pattern": "^[a-z0-9-]+$"
3263
+ },
3264
+ "additionalProperties": {
3265
+ "$ref": "#/components/schemas/ToneInput"
3266
+ }
3267
+ },
3268
+ "components": {
3269
+ "description": "Named variants of components: tokens applied by `panneau-<component>-variant-<name>`.",
3270
+ "type": "object",
3271
+ "propertyNames": {
3272
+ "type": "string",
3273
+ "pattern": "^[a-z0-9-]+$"
3274
+ },
3275
+ "additionalProperties": {
3276
+ "type": "object",
3277
+ "properties": {
3278
+ "variants": {
3279
+ "type": "object",
3280
+ "propertyNames": {
3281
+ "type": "string",
3282
+ "pattern": "^[a-z0-9-]+$"
3283
+ },
3284
+ "additionalProperties": {
3285
+ "$ref": "#/components/schemas/ThemeTokens"
3286
+ }
3287
+ }
3288
+ },
3289
+ "additionalProperties": {}
3290
+ }
3291
+ },
3292
+ "densities": {
3293
+ "description": "Tokens of each density (`panneau-control-height`…), which change with the density of the root.",
3294
+ "type": "object",
3295
+ "properties": {
3296
+ "compact": {
3297
+ "$ref": "#/components/schemas/ThemeTokens"
3298
+ },
3299
+ "comfortable": {
3300
+ "$ref": "#/components/schemas/ThemeTokens"
3301
+ },
3302
+ "touch": {
3303
+ "$ref": "#/components/schemas/ThemeTokens"
3304
+ }
3305
+ },
3306
+ "additionalProperties": {}
3307
+ },
3308
+ "fonts": {
3309
+ "description": "Font faces and font stylesheets, added to the page once.",
3310
+ "type": "array",
3311
+ "items": {
3312
+ "$ref": "#/components/schemas/ThemeFont"
3313
+ }
3314
+ }
3315
+ },
3316
+ "required": [
3317
+ "tokens"
3318
+ ],
3319
+ "additionalProperties": {},
3320
+ "description": "A theme of `@panneau/ui`, as plain data (decision 0024)."
3321
+ },
3322
+ "DefinitionTheme": {
3323
+ "type": "object",
3324
+ "properties": {
3325
+ "label": {
3326
+ "type": "string"
3327
+ },
3328
+ "tokens": {
3329
+ "description": "Tokens of the light scheme, or of both schemes when `dark` does not set them.",
3330
+ "$ref": "#/components/schemas/ThemeTokens"
3331
+ },
3332
+ "dark": {
3333
+ "description": "Tokens that change in the dark scheme.",
3334
+ "$ref": "#/components/schemas/ThemeTokens"
3335
+ },
3336
+ "palette": {
3337
+ "description": "Raw colors, written as `--panneau-palette-<name>`: tokens and tones use them with `var(--panneau-palette-<name>)`.",
3338
+ "type": "object",
3339
+ "propertyNames": {
3340
+ "type": "string",
3341
+ "pattern": "^[a-z0-9-]+$"
3342
+ },
3343
+ "additionalProperties": {
3344
+ "type": "string",
3345
+ "pattern": "^[^{};<]*$"
3346
+ }
3347
+ },
3348
+ "tones": {
3349
+ "description": "Tones added or redefined by the theme, applied by `panneau-tone-<name>`.",
3350
+ "type": "object",
3351
+ "propertyNames": {
3352
+ "type": "string",
3353
+ "pattern": "^[a-z0-9-]+$"
3354
+ },
3355
+ "additionalProperties": {
3356
+ "$ref": "#/components/schemas/ToneInput"
3357
+ }
3358
+ },
3359
+ "components": {
3360
+ "description": "Named variants of components: tokens applied by `panneau-<component>-variant-<name>`.",
3361
+ "type": "object",
3362
+ "propertyNames": {
3363
+ "type": "string",
3364
+ "pattern": "^[a-z0-9-]+$"
3365
+ },
3366
+ "additionalProperties": {
3367
+ "type": "object",
3368
+ "properties": {
3369
+ "variants": {
3370
+ "type": "object",
3371
+ "propertyNames": {
3372
+ "type": "string",
3373
+ "pattern": "^[a-z0-9-]+$"
3374
+ },
3375
+ "additionalProperties": {
3376
+ "$ref": "#/components/schemas/ThemeTokens"
3377
+ }
3378
+ }
3379
+ },
3380
+ "additionalProperties": {}
3381
+ }
3382
+ },
3383
+ "densities": {
3384
+ "description": "Tokens of each density (`panneau-control-height`…), which change with the density of the root.",
3385
+ "type": "object",
3386
+ "properties": {
3387
+ "compact": {
3388
+ "$ref": "#/components/schemas/ThemeTokens"
3389
+ },
3390
+ "comfortable": {
3391
+ "$ref": "#/components/schemas/ThemeTokens"
3392
+ },
3393
+ "touch": {
3394
+ "$ref": "#/components/schemas/ThemeTokens"
3395
+ }
3396
+ },
3397
+ "additionalProperties": {}
3398
+ },
3399
+ "fonts": {
3400
+ "description": "Font faces and font stylesheets, added to the page once.",
3401
+ "type": "array",
3402
+ "items": {
3403
+ "$ref": "#/components/schemas/ThemeFont"
3404
+ }
3405
+ },
3406
+ "colorScheme": {
3407
+ "type": "string",
3408
+ "enum": [
3409
+ "light",
3410
+ "dark",
3411
+ "auto"
3412
+ ]
3413
+ },
3414
+ "density": {
3415
+ "type": "string",
3416
+ "enum": [
3417
+ "compact",
3418
+ "comfortable",
3419
+ "touch",
3420
+ "auto"
3421
+ ]
3422
+ },
3423
+ "extends": {
3424
+ "description": "Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs.",
3425
+ "anyOf": [
3426
+ {
3427
+ "type": "string"
3428
+ },
3429
+ {
3430
+ "type": "array",
3431
+ "items": {
3432
+ "type": "string"
3433
+ }
3434
+ }
3435
+ ]
3436
+ }
3437
+ },
3438
+ "additionalProperties": {},
3439
+ "description": "The theme of the admin: a theme, built on themes of plugins."
3440
+ },
3024
3441
  "Definition": {
3025
3442
  "type": "object",
3026
3443
  "properties": {
@@ -3128,18 +3545,7 @@
3128
3545
  "$ref": "#/components/schemas/Uploads"
3129
3546
  },
3130
3547
  "theme": {
3131
- "type": "object",
3132
- "properties": {
3133
- "colorScheme": {
3134
- "type": "string",
3135
- "enum": [
3136
- "light",
3137
- "dark",
3138
- "auto"
3139
- ]
3140
- }
3141
- },
3142
- "additionalProperties": {}
3548
+ "$ref": "#/components/schemas/DefinitionTheme"
3143
3549
  },
3144
3550
  "user": {
3145
3551
  "anyOf": [
@@ -3323,6 +3729,7 @@
3323
3729
  "type": "object",
3324
3730
  "properties": {
3325
3731
  "filter": {
3732
+ "description": "The `filter` of the list query, by filter id: a value, a list of values, or the bounds of a range (`{ \"from\": \"2026-01-01\", \"to\": \"2026-01-31\" }`).",
3326
3733
  "type": "object",
3327
3734
  "propertyNames": {
3328
3735
  "type": "string"