@rathnasgala2/schemas 3.20.0 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/THIRD_PARTY_LICENSES.json +1 -1
  2. package/diagnostics/diagnostic-map.json +266 -24
  3. package/docs/catalogs/schema-inventory.json +6 -6
  4. package/examples/valid/build-input/rules.json +270 -28
  5. package/examples/valid/content-frontmatter/rules.json +41 -0
  6. package/examples/valid/interactions-config/rules.json +22 -0
  7. package/examples/valid/publication/rules.json +192 -13
  8. package/fixtures/boundary/build-input/rules.json +306 -33
  9. package/fixtures/boundary/content-frontmatter/rules.json +41 -0
  10. package/fixtures/boundary/interactions-config/rules.json +22 -0
  11. package/fixtures/boundary/publication/rules.json +243 -33
  12. package/fixtures/invalid/build-input/GRAPHEME_LENGTH_INVALID/cases.json +19 -8
  13. package/fixtures/invalid/build-input/REQUEST_FIELD_UNKNOWN/cases.json +80 -16
  14. package/fixtures/invalid/build-input/SCHEMA_ARRAY_DUPLICATE/cases.json +11 -0
  15. package/fixtures/invalid/build-input/SCHEMA_ARRAY_TOO_LONG/cases.json +15 -0
  16. package/fixtures/invalid/build-input/SCHEMA_CONSTANT_INVALID/cases.json +33 -0
  17. package/fixtures/invalid/build-input/SCHEMA_ENUM_INVALID/cases.json +22 -0
  18. package/fixtures/invalid/build-input/SCHEMA_NEGATED_RULE_MATCHED/cases.json +11 -0
  19. package/fixtures/invalid/build-input/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +204 -39
  20. package/fixtures/invalid/build-input/SCHEMA_TYPE_INVALID/cases.json +122 -11
  21. package/fixtures/invalid/build-input/SCHEMA_UNION_INVALID/cases.json +9 -0
  22. package/fixtures/invalid/content-frontmatter/SCHEMA_CONSTANT_INVALID/cases.json +11 -0
  23. package/fixtures/invalid/content-frontmatter/SCHEMA_NEGATED_RULE_MATCHED/cases.json +9 -0
  24. package/fixtures/invalid/content-frontmatter/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +31 -0
  25. package/fixtures/invalid/interactions-config/REQUEST_FIELD_UNKNOWN/cases.json +11 -0
  26. package/fixtures/invalid/interactions-config/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +11 -0
  27. package/fixtures/invalid/interactions-config/SCHEMA_TYPE_INVALID/cases.json +20 -0
  28. package/fixtures/invalid/publication/GRAPHEME_LENGTH_INVALID/cases.json +22 -11
  29. package/fixtures/invalid/publication/REQUEST_FIELD_UNKNOWN/cases.json +62 -9
  30. package/fixtures/invalid/publication/SCHEMA_ARRAY_DUPLICATE/cases.json +13 -0
  31. package/fixtures/invalid/publication/SCHEMA_ARRAY_TOO_LONG/cases.json +15 -0
  32. package/fixtures/invalid/publication/SCHEMA_CONSTANT_INVALID/cases.json +22 -0
  33. package/fixtures/invalid/publication/SCHEMA_ENUM_INVALID/cases.json +22 -0
  34. package/fixtures/invalid/publication/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +143 -20
  35. package/fixtures/invalid/publication/SCHEMA_TYPE_INVALID/cases.json +95 -4
  36. package/fixtures/invalid/publication/SCHEMA_UNION_INVALID/cases.json +11 -0
  37. package/fixtures/manifest.json +2059 -181
  38. package/fixtures/s2/empty-modules-placements.json +943 -0
  39. package/fixtures/s2/manifest.json +13 -1
  40. package/fixtures/s2/normalized-inputs.json +1704 -0
  41. package/fixtures/unknown-field/build-input/rules.json +123 -21
  42. package/fixtures/unknown-field/content-frontmatter/rules.json +5 -0
  43. package/fixtures/unknown-field/interactions-config/rules.json +14 -0
  44. package/fixtures/unknown-field/publication/rules.json +92 -9
  45. package/generated/browser/validator-core.mjs +3 -3
  46. package/generated/typescript/contracts/build-input.d.ts +47 -5
  47. package/generated/typescript/contracts/content-frontmatter.d.ts +1 -0
  48. package/generated/typescript/contracts/interactions-config.d.ts +3 -0
  49. package/generated/typescript/contracts/publication.d.ts +40 -5
  50. package/openapi/http-catalog.json +2 -2
  51. package/openapi/openapi.yaml +31 -0
  52. package/package.json +1 -1
  53. package/sbom.cdx.json +23 -23
  54. package/schemas/build-input.schema.json +104 -5
  55. package/schemas/content-frontmatter.schema.json +12 -0
  56. package/schemas/interactions-config.schema.json +7 -0
  57. package/schemas/publication.schema.json +85 -7
@@ -49,6 +49,8 @@
49
49
  "policies": { "$ref": "#/$defs/publicationPolicies" },
50
50
  "footerCard": { "$ref": "#/$defs/footerCard" },
51
51
  "newsletter": { "$ref": "#/$defs/newsletter" },
52
+ "sharing": { "$ref": "#/$defs/sharing" },
53
+ "contactForm": { "$ref": "#/$defs/contactForm" },
52
54
  "crawlers": { "$ref": "#/$defs/crawlers" },
53
55
  "extensions": { "$ref": "#/$defs/extensionMap" }
54
56
  },
@@ -262,17 +264,93 @@
262
264
  "additionalProperties": false
263
265
  },
264
266
  "newsletter": {
267
+ "description": "SCHEMA-3.22.0: the newsletter panel. Link mode (`mode` absent or `link`) sends readers to the author's own newsletter at `url`; Galascribe mode (`mode: \"galascribe\"`) collects and mails subscribers itself. An absent `newsletter` member means the panel is off.",
268
+ "oneOf": [
269
+ {
270
+ "type": "object",
271
+ "required": ["url", "title", "text"],
272
+ "properties": {
273
+ "mode": { "const": "link" },
274
+ "url": { "$ref": "#/$defs/urlHttps" },
275
+ "title": { "$ref": "#/$defs/plainLabel" },
276
+ "text": {
277
+ "$ref": "#/$defs/plainText",
278
+ "x-gala-graphemeLength": { "minimum": 1, "maximum": 300 }
279
+ }
280
+ },
281
+ "additionalProperties": false,
282
+ "description": "Link mode: the panel links to an external newsletter. `mode` is optional and `link` when present, so a 3.21 publication still validates."
283
+ },
284
+ {
285
+ "type": "object",
286
+ "required": ["mode", "title", "text", "emailContent", "replyToOwner"],
287
+ "properties": {
288
+ "mode": { "const": "galascribe" },
289
+ "title": { "$ref": "#/$defs/plainLabel" },
290
+ "text": {
291
+ "$ref": "#/$defs/plainText",
292
+ "x-gala-graphemeLength": { "minimum": 1, "maximum": 300 }
293
+ },
294
+ "emailContent": {
295
+ "enum": ["card", "full"],
296
+ "description": "`card` mails the post title, description, image and a Read the post button; the template renders no email fragment. `full` mails the whole post: for each published post the template renders an email-safe HTML fragment at `/_gala/email/<content id>.html` (`<content id>` is the post's front-matter `id`; absolute URLs and inline-safe markup only; `noindex`; absent from the sitemap, the feeds, the search index and the llms files), which the API fetches after the generation is certified live."
297
+ },
298
+ "replyToOwner": {
299
+ "type": "boolean",
300
+ "description": "When true, subscribers' replies go to the site owner's contact email; when false the emails carry no Reply-To."
301
+ }
302
+ },
303
+ "additionalProperties": false,
304
+ "description": "Galascribe mode: the panel is an email field and a Subscribe button. `title` and `text` are the panel heading and sentence; there is no `url`. The API refuses to turn this mode on until the site owner has a postal address in their Account."
305
+ }
306
+ ]
307
+ },
308
+ "sharing": {
265
309
  "type": "object",
266
- "required": ["url", "title", "text"],
310
+ "required": ["targets"],
267
311
  "properties": {
268
- "url": { "$ref": "#/$defs/urlHttps" },
269
- "title": { "$ref": "#/$defs/plainLabel" },
270
- "text": {
271
- "$ref": "#/$defs/plainText",
272
- "x-gala-graphemeLength": { "minimum": 1, "maximum": 300 }
312
+ "targets": {
313
+ "type": "array",
314
+ "items": {
315
+ "enum": [
316
+ "copy-link",
317
+ "native",
318
+ "x",
319
+ "bluesky",
320
+ "linkedin",
321
+ "facebook",
322
+ "hacker-news",
323
+ "whatsapp",
324
+ "telegram",
325
+ "reddit",
326
+ "email"
327
+ ]
328
+ },
329
+ "minItems": 0,
330
+ "maxItems": 11,
331
+ "uniqueItems": true
273
332
  }
274
333
  },
275
- "additionalProperties": false
334
+ "additionalProperties": false,
335
+ "description": "SCHEMA-3.22.0: the share buttons shown on each article. `targets` is the display order: 0 to 11 unique members of the closed target set. An absent `sharing` member means `[\"copy-link\"]` (the Copy link button only); an empty `targets` array means no share buttons. `native` is shown only where the browser offers the system share sheet; every other target is a plain link to that service's documented share URL. Bookmark is not a share target and is unaffected."
336
+ },
337
+ "contactForm": {
338
+ "type": "object",
339
+ "required": ["enabled", "fields"],
340
+ "properties": {
341
+ "enabled": { "type": "boolean" },
342
+ "fields": {
343
+ "type": "object",
344
+ "required": ["website", "phone"],
345
+ "properties": {
346
+ "website": { "type": "boolean" },
347
+ "phone": { "type": "boolean" }
348
+ },
349
+ "additionalProperties": false
350
+ }
351
+ },
352
+ "additionalProperties": false,
353
+ "description": "SCHEMA-3.22.0: the site's contact form. `enabled` turns the form on, and the template renders the `/contact/` page only when it is true. `fields.website` and `fields.phone` add the optional Website and Phone inputs; name, email and message are always present. The intro text is not a member: it is the optional document `gala/theme-pages/contact.md`, and the template shows a default intro when it is absent. An absent `contactForm` means no form. The API, not the schema, limits the form to the Pro and Business plans."
276
354
  },
277
355
  "crawlers": {
278
356
  "type": "object",