From bd083dcca5b749fac162fbf0c5458612f6c51735 Mon Sep 17 00:00:00 2001 From: Emilio de la Torre Date: Thu, 9 Oct 2025 12:16:51 +0100 Subject: [PATCH] feat: add styleType attribute to Link This attribute will be used to differentiate a link styled for partner content onward journey from standard links. --- README.md | 1 + content-tree.d.ts | 4 ++++ schemas/body-tree.schema.json | 4 ++++ schemas/content-tree.schema.json | 4 ++++ schemas/transit-tree.schema.json | 4 ++++ 5 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 7e2e08c..e9f729f 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ interface Link extends Parent { url: string title: string children: Phrasing[] + styleType?: 'onward-journey' } ``` diff --git a/content-tree.d.ts b/content-tree.d.ts index bbe0cff..d6f6e6b 100644 --- a/content-tree.d.ts +++ b/content-tree.d.ts @@ -55,6 +55,7 @@ export declare namespace ContentTree { url: string; title: string; children: Phrasing[]; + styleType?: 'onward-journey'; } interface List extends Parent { type: "list"; @@ -335,6 +336,7 @@ export declare namespace ContentTree { url: string; title: string; children: Phrasing[]; + styleType?: 'onward-journey'; } interface List extends Parent { type: "list"; @@ -616,6 +618,7 @@ export declare namespace ContentTree { url: string; title: string; children: Phrasing[]; + styleType?: 'onward-journey'; } interface List extends Parent { type: "list"; @@ -882,6 +885,7 @@ export declare namespace ContentTree { url: string; title: string; children: Phrasing[]; + styleType?: 'onward-journey'; } interface List extends Parent { type: "list"; diff --git a/schemas/body-tree.schema.json b/schemas/body-tree.schema.json index 1c331ad..3de967f 100644 --- a/schemas/body-tree.schema.json +++ b/schemas/body-tree.schema.json @@ -430,6 +430,10 @@ "type": "array" }, "data": {}, + "styleType": { + "const": "onward-journey", + "type": "string" + }, "title": { "type": "string" }, diff --git a/schemas/content-tree.schema.json b/schemas/content-tree.schema.json index 703a637..152317d 100644 --- a/schemas/content-tree.schema.json +++ b/schemas/content-tree.schema.json @@ -857,6 +857,10 @@ "type": "array" }, "data": {}, + "styleType": { + "const": "onward-journey", + "type": "string" + }, "title": { "type": "string" }, diff --git a/schemas/transit-tree.schema.json b/schemas/transit-tree.schema.json index 273226b..89612be 100644 --- a/schemas/transit-tree.schema.json +++ b/schemas/transit-tree.schema.json @@ -455,6 +455,10 @@ "type": "array" }, "data": {}, + "styleType": { + "const": "onward-journey", + "type": "string" + }, "title": { "type": "string" },