From 627f722543252c89326eff6cddc63305b59ea46b Mon Sep 17 00:00:00 2001 From: umbobabo Date: Wed, 8 Oct 2025 16:10:42 +0100 Subject: [PATCH 1/3] InNumbers component interface --- README.md | 22 ++++++++++++++++++++++ content-tree.d.ts | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/README.md b/README.md index b58d375..3723204 100644 --- a/README.md +++ b/README.md @@ -780,6 +780,28 @@ interface CustomCodeComponent extends Node { - The basic interface in Spark to make reference to this system above (eg. the git repo URL or a public S3 bucket), and provide some data for it if necessary. This will be the Custom Component storyblock. - The data Spark receives from entering a specific ID will be used to render dynamic fields (the `attributes`). +### InNumbers + +```ts +/** + * A definition has a term and a related description. It is used to describe a term. + */ +interface Definition extends Node { + type: "definition" + term: string + description: string +} + +/** + * InNumbers represents a set of numbers with related descriptions. + */ +interface InNumbers extends Parent { + type: "in-numbers" + /** The title for the InNumbers */ + title: string + children: [Definition, Definition, Definition] +} +``` ## License diff --git a/content-tree.d.ts b/content-tree.d.ts index 976cae8..7eea9a0 100644 --- a/content-tree.d.ts +++ b/content-tree.d.ts @@ -285,6 +285,15 @@ export declare namespace ContentTree { /** Configuration data to be passed to the component. */ attributes: CustomCodeComponentAttributes; } + /** + * InNumbers represents a set of numbers with related descriptions + */ + interface InNumbers extends Parent { + type: "in-numbers"; + /** The title for the InNumbers */ + title: string; + children: [BigNumber, BigNumber, BigNumber]; + } namespace full { type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text; type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width"; @@ -572,6 +581,15 @@ export declare namespace ContentTree { /** Configuration data to be passed to the component. */ attributes: CustomCodeComponentAttributes; } + /** + * InNumbers represents a set of numbers with related descriptions + */ + interface InNumbers extends Parent { + type: "in-numbers"; + /** The title for the InNumbers */ + title: string; + children: [BigNumber, BigNumber, BigNumber]; + } } namespace transit { type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text; @@ -845,6 +863,15 @@ export declare namespace ContentTree { /** How the component should be presented in the article page according to the column layout system */ layoutWidth: LayoutWidth; } + /** + * InNumbers represents a set of numbers with related descriptions + */ + interface InNumbers extends Parent { + type: "in-numbers"; + /** The title for the InNumbers */ + title: string; + children: [BigNumber, BigNumber, BigNumber]; + } } namespace loose { type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text; @@ -1133,5 +1160,14 @@ export declare namespace ContentTree { /** Configuration data to be passed to the component. */ attributes?: CustomCodeComponentAttributes; } + /** + * InNumbers represents a set of numbers with related descriptions + */ + interface InNumbers extends Parent { + type: "in-numbers"; + /** The title for the InNumbers */ + title: string; + children: [BigNumber, BigNumber, BigNumber]; + } } } From 18e76eb09c716397c65c6779afa84c462475aac3 Mon Sep 17 00:00:00 2001 From: umbobabo Date: Wed, 5 Nov 2025 13:33:45 +0000 Subject: [PATCH 2/3] feat: optional title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3723204..6e4fb20 100644 --- a/README.md +++ b/README.md @@ -798,7 +798,7 @@ interface Definition extends Node { interface InNumbers extends Parent { type: "in-numbers" /** The title for the InNumbers */ - title: string + title?: string children: [Definition, Definition, Definition] } ``` From 3ba073bf484650d5bcbb7e6a7d9628bacce5eab9 Mon Sep 17 00:00:00 2001 From: umbobabo Date: Wed, 5 Nov 2025 13:34:23 +0000 Subject: [PATCH 3/3] Update TypeScript definition file --- content-tree.d.ts | 56 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/content-tree.d.ts b/content-tree.d.ts index 7eea9a0..8c89f23 100644 --- a/content-tree.d.ts +++ b/content-tree.d.ts @@ -286,13 +286,21 @@ export declare namespace ContentTree { attributes: CustomCodeComponentAttributes; } /** - * InNumbers represents a set of numbers with related descriptions + * A definition has a term and a related description. It is used to describe a term. + */ + interface Definition extends Node { + type: "definition"; + term: string; + description: string; + } + /** + * InNumbers represents a set of numbers with related descriptions. */ interface InNumbers extends Parent { type: "in-numbers"; /** The title for the InNumbers */ - title: string; - children: [BigNumber, BigNumber, BigNumber]; + title?: string; + children: [Definition, Definition, Definition]; } namespace full { type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text; @@ -582,13 +590,21 @@ export declare namespace ContentTree { attributes: CustomCodeComponentAttributes; } /** - * InNumbers represents a set of numbers with related descriptions + * A definition has a term and a related description. It is used to describe a term. + */ + interface Definition extends Node { + type: "definition"; + term: string; + description: string; + } + /** + * InNumbers represents a set of numbers with related descriptions. */ interface InNumbers extends Parent { type: "in-numbers"; /** The title for the InNumbers */ - title: string; - children: [BigNumber, BigNumber, BigNumber]; + title?: string; + children: [Definition, Definition, Definition]; } } namespace transit { @@ -864,13 +880,21 @@ export declare namespace ContentTree { layoutWidth: LayoutWidth; } /** - * InNumbers represents a set of numbers with related descriptions + * A definition has a term and a related description. It is used to describe a term. + */ + interface Definition extends Node { + type: "definition"; + term: string; + description: string; + } + /** + * InNumbers represents a set of numbers with related descriptions. */ interface InNumbers extends Parent { type: "in-numbers"; /** The title for the InNumbers */ - title: string; - children: [BigNumber, BigNumber, BigNumber]; + title?: string; + children: [Definition, Definition, Definition]; } } namespace loose { @@ -1161,13 +1185,21 @@ export declare namespace ContentTree { attributes?: CustomCodeComponentAttributes; } /** - * InNumbers represents a set of numbers with related descriptions + * A definition has a term and a related description. It is used to describe a term. + */ + interface Definition extends Node { + type: "definition"; + term: string; + description: string; + } + /** + * InNumbers represents a set of numbers with related descriptions. */ interface InNumbers extends Parent { type: "in-numbers"; /** The title for the InNumbers */ - title: string; - children: [BigNumber, BigNumber, BigNumber]; + title?: string; + children: [Definition, Definition, Definition]; } } }