@takuhon/core 1.0.0 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takuhon/core",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "JSON Schema, validation, normalization, locale resolution, and JSON-LD generation for takuhon",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Takuhon contributors",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://takuhon.example/schemas/1.0.0/takuhon.schema.json",
3
+ "$id": "https://takuhon.example/schemas/1.1.0/takuhon.schema.json",
4
4
  "title": "Takuhon Profile",
5
5
  "description": "Portable profile data format consumed by @takuhon/core. The canonical contract for profile content authored as takuhon.json.",
6
6
  "type": "object",
@@ -362,7 +362,38 @@
362
362
  "description": "Opt-in flag for first-party analytics. Default is false to keep takuhon privacy-respecting by default."
363
363
  },
364
364
  "activity": { "$ref": "#/$defs/ActivitySettings" },
365
- "publicVisibility": { "$ref": "#/$defs/PublicVisibility" }
365
+ "publicVisibility": { "$ref": "#/$defs/PublicVisibility" },
366
+ "contact": { "$ref": "#/$defs/ContactSettings" }
367
+ }
368
+ },
369
+ "ContactSettings": {
370
+ "type": "object",
371
+ "additionalProperties": false,
372
+ "description": "Opt-in contact form configuration (added in 1.1.0). Only public values live here; the Turnstile site key is safe to embed in the page. The Turnstile secret, the recipient address, and the From label are provisioned out of band as environment configuration and are never stored in takuhon.json. Adapters that support the form mount the widget and a POST endpoint when 'enabled' is true.",
373
+ "properties": {
374
+ "enabled": {
375
+ "type": "boolean",
376
+ "default": false,
377
+ "description": "Master switch. When false (the default), no contact form is mounted even if a site key is present."
378
+ },
379
+ "turnstileSiteKey": {
380
+ "type": "string",
381
+ "minLength": 1,
382
+ "maxLength": 128,
383
+ "description": "Public Cloudflare Turnstile site key, safe to embed in the page. Without it the widget is not mounted."
384
+ },
385
+ "endpoint": {
386
+ "type": "string",
387
+ "minLength": 1,
388
+ "maxLength": 2048,
389
+ "description": "Override the POST endpoint the widget submits to. Defaults to /api/contact on the same origin."
390
+ },
391
+ "subjectPrefix": {
392
+ "type": "string",
393
+ "minLength": 1,
394
+ "maxLength": 128,
395
+ "description": "Subject prefix for the delivered email, e.g. '[example.com contact]'."
396
+ }
366
397
  }
367
398
  },
368
399
  "PublicVisibility": {