@elmethis/core 0.16.0 → 0.18.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/dist/a2ui/v0_9/block_catalog.json +35 -0
- package/dist/index.cjs +17 -0
- package/dist/index.d.cts +128 -1
- package/dist/index.d.mts +128 -1
- package/dist/index.mjs +17 -1
- package/package.json +1 -1
|
@@ -872,6 +872,41 @@
|
|
|
872
872
|
],
|
|
873
873
|
"unevaluatedProperties": false
|
|
874
874
|
},
|
|
875
|
+
"Html": {
|
|
876
|
+
"type": "object",
|
|
877
|
+
"allOf": [
|
|
878
|
+
{
|
|
879
|
+
"$ref": "#/$defs/ComponentCommon"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"$ref": "#/$defs/CatalogComponentCommon"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"type": "object",
|
|
886
|
+
"properties": {
|
|
887
|
+
"component": {
|
|
888
|
+
"const": "Html"
|
|
889
|
+
},
|
|
890
|
+
"html": {
|
|
891
|
+
"type": "string",
|
|
892
|
+
"description": "Raw HTML markup to render inside a sandboxed iframe. Mutually exclusive with `src` — provide exactly one of the two."
|
|
893
|
+
},
|
|
894
|
+
"src": {
|
|
895
|
+
"type": "string",
|
|
896
|
+
"description": "URL of a remote document to render inside the iframe instead of inline `html` (e.g. a presigned, time-limited link). Mutually exclusive with `html` — provide exactly one of the two. `autoHeight` doesn't apply here since cross-origin content can't be measured, and a time-limited URL isn't refreshed automatically — the caller is responsible for keeping it current."
|
|
897
|
+
},
|
|
898
|
+
"autoHeight": {
|
|
899
|
+
"type": "boolean",
|
|
900
|
+
"description": "Stretch the iframe to fit its content height. Defaults to true. Only takes effect for `html`-rendered content."
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"required": [
|
|
904
|
+
"component"
|
|
905
|
+
]
|
|
906
|
+
}
|
|
907
|
+
],
|
|
908
|
+
"unevaluatedProperties": false
|
|
909
|
+
},
|
|
875
910
|
"CodeBlock": {
|
|
876
911
|
"type": "object",
|
|
877
912
|
"allOf": [
|
package/dist/index.cjs
CHANGED
|
@@ -266,6 +266,21 @@ const BlockImageApi = {
|
|
|
266
266
|
caption: zod.z.string().describe("Optional caption shown below the image.").optional()
|
|
267
267
|
}).strict()
|
|
268
268
|
};
|
|
269
|
+
/**
|
|
270
|
+
* Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
|
|
271
|
+
* `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
|
|
272
|
+
* export) or `src` (a remote document URL) — this catalog doesn't validate
|
|
273
|
+
* cross-field constraints, so the contract is documentation-only.
|
|
274
|
+
*/
|
|
275
|
+
const HtmlApi = {
|
|
276
|
+
name: "Html",
|
|
277
|
+
schema: zod.z.object({
|
|
278
|
+
...CommonProps,
|
|
279
|
+
html: zod.z.string().describe("Raw HTML markup to render inside a sandboxed iframe. Mutually exclusive with `src` — provide exactly one of the two.").optional(),
|
|
280
|
+
src: zod.z.string().describe("URL of a remote document to render inside the iframe instead of inline `html` (e.g. a presigned, time-limited link). Mutually exclusive with `html` — provide exactly one of the two. `autoHeight` doesn't apply here since cross-origin content can't be measured, and a time-limited URL isn't refreshed automatically — the caller is responsible for keeping it current.").optional(),
|
|
281
|
+
autoHeight: zod.z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true. Only takes effect for `html`-rendered content.").optional()
|
|
282
|
+
}).strict()
|
|
283
|
+
};
|
|
269
284
|
const CodeBlockApi = {
|
|
270
285
|
name: "CodeBlock",
|
|
271
286
|
schema: zod.z.object({
|
|
@@ -663,6 +678,7 @@ const BLOCK_CATALOG_COMPONENTS = [
|
|
|
663
678
|
AudioApi,
|
|
664
679
|
VideoApi,
|
|
665
680
|
BlockImageApi,
|
|
681
|
+
HtmlApi,
|
|
666
682
|
CodeBlockApi,
|
|
667
683
|
KatexApi,
|
|
668
684
|
MermaidApi,
|
|
@@ -1282,6 +1298,7 @@ exports.ContentTabsApi = ContentTabsApi;
|
|
|
1282
1298
|
exports.DividerApi = DividerApi;
|
|
1283
1299
|
exports.FileApi = FileApi;
|
|
1284
1300
|
exports.HeadingApi = HeadingApi;
|
|
1301
|
+
exports.HtmlApi = HtmlApi;
|
|
1285
1302
|
exports.IconApi = IconApi;
|
|
1286
1303
|
exports.KatexApi = KatexApi;
|
|
1287
1304
|
exports.LANGUAGES = LANGUAGES;
|
package/dist/index.d.cts
CHANGED
|
@@ -2555,6 +2555,133 @@ declare const BlockImageApi: {
|
|
|
2555
2555
|
sizes?: string | undefined;
|
|
2556
2556
|
}>;
|
|
2557
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
|
|
2560
|
+
* `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
|
|
2561
|
+
* export) or `src` (a remote document URL) — this catalog doesn't validate
|
|
2562
|
+
* cross-field constraints, so the contract is documentation-only.
|
|
2563
|
+
*/
|
|
2564
|
+
declare const HtmlApi: {
|
|
2565
|
+
name: string;
|
|
2566
|
+
schema: z.ZodObject<{
|
|
2567
|
+
html: z.ZodOptional<z.ZodString>;
|
|
2568
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2569
|
+
autoHeight: z.ZodOptional<z.ZodBoolean>;
|
|
2570
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
2571
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2572
|
+
path: z.ZodString;
|
|
2573
|
+
}, "strip", z.ZodTypeAny, {
|
|
2574
|
+
path: string;
|
|
2575
|
+
}, {
|
|
2576
|
+
path: string;
|
|
2577
|
+
}>, z.ZodObject<{
|
|
2578
|
+
call: z.ZodString;
|
|
2579
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2580
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2581
|
+
}, "strip", z.ZodTypeAny, {
|
|
2582
|
+
call: string;
|
|
2583
|
+
args: Record<string, any>;
|
|
2584
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2585
|
+
}, {
|
|
2586
|
+
call: string;
|
|
2587
|
+
args: Record<string, any>;
|
|
2588
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2589
|
+
}>]>>;
|
|
2590
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2591
|
+
path: z.ZodString;
|
|
2592
|
+
}, "strip", z.ZodTypeAny, {
|
|
2593
|
+
path: string;
|
|
2594
|
+
}, {
|
|
2595
|
+
path: string;
|
|
2596
|
+
}>, z.ZodObject<{
|
|
2597
|
+
call: z.ZodString;
|
|
2598
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2599
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2600
|
+
}, "strip", z.ZodTypeAny, {
|
|
2601
|
+
call: string;
|
|
2602
|
+
args: Record<string, any>;
|
|
2603
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2604
|
+
}, {
|
|
2605
|
+
call: string;
|
|
2606
|
+
args: Record<string, any>;
|
|
2607
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2608
|
+
}>]>>;
|
|
2609
|
+
}, "strip", z.ZodTypeAny, {
|
|
2610
|
+
description?: string | {
|
|
2611
|
+
path: string;
|
|
2612
|
+
} | {
|
|
2613
|
+
call: string;
|
|
2614
|
+
args: Record<string, any>;
|
|
2615
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2616
|
+
} | undefined;
|
|
2617
|
+
label?: string | {
|
|
2618
|
+
path: string;
|
|
2619
|
+
} | {
|
|
2620
|
+
call: string;
|
|
2621
|
+
args: Record<string, any>;
|
|
2622
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2623
|
+
} | undefined;
|
|
2624
|
+
}, {
|
|
2625
|
+
description?: string | {
|
|
2626
|
+
path: string;
|
|
2627
|
+
} | {
|
|
2628
|
+
call: string;
|
|
2629
|
+
args: Record<string, any>;
|
|
2630
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2631
|
+
} | undefined;
|
|
2632
|
+
label?: string | {
|
|
2633
|
+
path: string;
|
|
2634
|
+
} | {
|
|
2635
|
+
call: string;
|
|
2636
|
+
args: Record<string, any>;
|
|
2637
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2638
|
+
} | undefined;
|
|
2639
|
+
}>>;
|
|
2640
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2641
|
+
}, "strict", z.ZodTypeAny, {
|
|
2642
|
+
accessibility?: {
|
|
2643
|
+
description?: string | {
|
|
2644
|
+
path: string;
|
|
2645
|
+
} | {
|
|
2646
|
+
call: string;
|
|
2647
|
+
args: Record<string, any>;
|
|
2648
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2649
|
+
} | undefined;
|
|
2650
|
+
label?: string | {
|
|
2651
|
+
path: string;
|
|
2652
|
+
} | {
|
|
2653
|
+
call: string;
|
|
2654
|
+
args: Record<string, any>;
|
|
2655
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2656
|
+
} | undefined;
|
|
2657
|
+
} | undefined;
|
|
2658
|
+
weight?: number | undefined;
|
|
2659
|
+
src?: string | undefined;
|
|
2660
|
+
html?: string | undefined;
|
|
2661
|
+
autoHeight?: boolean | undefined;
|
|
2662
|
+
}, {
|
|
2663
|
+
accessibility?: {
|
|
2664
|
+
description?: string | {
|
|
2665
|
+
path: string;
|
|
2666
|
+
} | {
|
|
2667
|
+
call: string;
|
|
2668
|
+
args: Record<string, any>;
|
|
2669
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2670
|
+
} | undefined;
|
|
2671
|
+
label?: string | {
|
|
2672
|
+
path: string;
|
|
2673
|
+
} | {
|
|
2674
|
+
call: string;
|
|
2675
|
+
args: Record<string, any>;
|
|
2676
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2677
|
+
} | undefined;
|
|
2678
|
+
} | undefined;
|
|
2679
|
+
weight?: number | undefined;
|
|
2680
|
+
src?: string | undefined;
|
|
2681
|
+
html?: string | undefined;
|
|
2682
|
+
autoHeight?: boolean | undefined;
|
|
2683
|
+
}>;
|
|
2684
|
+
};
|
|
2558
2685
|
declare const CodeBlockApi: {
|
|
2559
2686
|
name: string;
|
|
2560
2687
|
schema: z.ZodObject<{
|
|
@@ -3819,4 +3946,4 @@ declare const normalizeLanguage: (language: string) => Language;
|
|
|
3819
3946
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
3820
3947
|
declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
|
|
3821
3948
|
//#endregion
|
|
3822
|
-
export { type AssembledCatalog, AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, type GlyphLanguage, HeadingApi, IconApi, KatexApi, LANGUAGES, type Language, type LanguageIcon, LinkTextApi, ListApi, ListItemApi, MermaidApi, NotionCalloutApi, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
3949
|
+
export { type AssembledCatalog, AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, type GlyphLanguage, HeadingApi, HtmlApi, IconApi, KatexApi, LANGUAGES, type Language, type LanguageIcon, LinkTextApi, ListApi, ListItemApi, MermaidApi, NotionCalloutApi, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
package/dist/index.d.mts
CHANGED
|
@@ -2555,6 +2555,133 @@ declare const BlockImageApi: {
|
|
|
2555
2555
|
sizes?: string | undefined;
|
|
2556
2556
|
}>;
|
|
2557
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
|
|
2560
|
+
* `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
|
|
2561
|
+
* export) or `src` (a remote document URL) — this catalog doesn't validate
|
|
2562
|
+
* cross-field constraints, so the contract is documentation-only.
|
|
2563
|
+
*/
|
|
2564
|
+
declare const HtmlApi: {
|
|
2565
|
+
name: string;
|
|
2566
|
+
schema: z.ZodObject<{
|
|
2567
|
+
html: z.ZodOptional<z.ZodString>;
|
|
2568
|
+
src: z.ZodOptional<z.ZodString>;
|
|
2569
|
+
autoHeight: z.ZodOptional<z.ZodBoolean>;
|
|
2570
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
2571
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2572
|
+
path: z.ZodString;
|
|
2573
|
+
}, "strip", z.ZodTypeAny, {
|
|
2574
|
+
path: string;
|
|
2575
|
+
}, {
|
|
2576
|
+
path: string;
|
|
2577
|
+
}>, z.ZodObject<{
|
|
2578
|
+
call: z.ZodString;
|
|
2579
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2580
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2581
|
+
}, "strip", z.ZodTypeAny, {
|
|
2582
|
+
call: string;
|
|
2583
|
+
args: Record<string, any>;
|
|
2584
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2585
|
+
}, {
|
|
2586
|
+
call: string;
|
|
2587
|
+
args: Record<string, any>;
|
|
2588
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2589
|
+
}>]>>;
|
|
2590
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2591
|
+
path: z.ZodString;
|
|
2592
|
+
}, "strip", z.ZodTypeAny, {
|
|
2593
|
+
path: string;
|
|
2594
|
+
}, {
|
|
2595
|
+
path: string;
|
|
2596
|
+
}>, z.ZodObject<{
|
|
2597
|
+
call: z.ZodString;
|
|
2598
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2599
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2600
|
+
}, "strip", z.ZodTypeAny, {
|
|
2601
|
+
call: string;
|
|
2602
|
+
args: Record<string, any>;
|
|
2603
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2604
|
+
}, {
|
|
2605
|
+
call: string;
|
|
2606
|
+
args: Record<string, any>;
|
|
2607
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2608
|
+
}>]>>;
|
|
2609
|
+
}, "strip", z.ZodTypeAny, {
|
|
2610
|
+
description?: string | {
|
|
2611
|
+
path: string;
|
|
2612
|
+
} | {
|
|
2613
|
+
call: string;
|
|
2614
|
+
args: Record<string, any>;
|
|
2615
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2616
|
+
} | undefined;
|
|
2617
|
+
label?: string | {
|
|
2618
|
+
path: string;
|
|
2619
|
+
} | {
|
|
2620
|
+
call: string;
|
|
2621
|
+
args: Record<string, any>;
|
|
2622
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2623
|
+
} | undefined;
|
|
2624
|
+
}, {
|
|
2625
|
+
description?: string | {
|
|
2626
|
+
path: string;
|
|
2627
|
+
} | {
|
|
2628
|
+
call: string;
|
|
2629
|
+
args: Record<string, any>;
|
|
2630
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2631
|
+
} | undefined;
|
|
2632
|
+
label?: string | {
|
|
2633
|
+
path: string;
|
|
2634
|
+
} | {
|
|
2635
|
+
call: string;
|
|
2636
|
+
args: Record<string, any>;
|
|
2637
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2638
|
+
} | undefined;
|
|
2639
|
+
}>>;
|
|
2640
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2641
|
+
}, "strict", z.ZodTypeAny, {
|
|
2642
|
+
accessibility?: {
|
|
2643
|
+
description?: string | {
|
|
2644
|
+
path: string;
|
|
2645
|
+
} | {
|
|
2646
|
+
call: string;
|
|
2647
|
+
args: Record<string, any>;
|
|
2648
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2649
|
+
} | undefined;
|
|
2650
|
+
label?: string | {
|
|
2651
|
+
path: string;
|
|
2652
|
+
} | {
|
|
2653
|
+
call: string;
|
|
2654
|
+
args: Record<string, any>;
|
|
2655
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2656
|
+
} | undefined;
|
|
2657
|
+
} | undefined;
|
|
2658
|
+
weight?: number | undefined;
|
|
2659
|
+
src?: string | undefined;
|
|
2660
|
+
html?: string | undefined;
|
|
2661
|
+
autoHeight?: boolean | undefined;
|
|
2662
|
+
}, {
|
|
2663
|
+
accessibility?: {
|
|
2664
|
+
description?: string | {
|
|
2665
|
+
path: string;
|
|
2666
|
+
} | {
|
|
2667
|
+
call: string;
|
|
2668
|
+
args: Record<string, any>;
|
|
2669
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2670
|
+
} | undefined;
|
|
2671
|
+
label?: string | {
|
|
2672
|
+
path: string;
|
|
2673
|
+
} | {
|
|
2674
|
+
call: string;
|
|
2675
|
+
args: Record<string, any>;
|
|
2676
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2677
|
+
} | undefined;
|
|
2678
|
+
} | undefined;
|
|
2679
|
+
weight?: number | undefined;
|
|
2680
|
+
src?: string | undefined;
|
|
2681
|
+
html?: string | undefined;
|
|
2682
|
+
autoHeight?: boolean | undefined;
|
|
2683
|
+
}>;
|
|
2684
|
+
};
|
|
2558
2685
|
declare const CodeBlockApi: {
|
|
2559
2686
|
name: string;
|
|
2560
2687
|
schema: z.ZodObject<{
|
|
@@ -3819,4 +3946,4 @@ declare const normalizeLanguage: (language: string) => Language;
|
|
|
3819
3946
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
3820
3947
|
declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
|
|
3821
3948
|
//#endregion
|
|
3822
|
-
export { type AssembledCatalog, AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, type GlyphLanguage, HeadingApi, IconApi, KatexApi, LANGUAGES, type Language, type LanguageIcon, LinkTextApi, ListApi, ListItemApi, MermaidApi, NotionCalloutApi, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
3949
|
+
export { type AssembledCatalog, AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, type GlyphLanguage, HeadingApi, HtmlApi, IconApi, KatexApi, LANGUAGES, type Language, type LanguageIcon, LinkTextApi, ListApi, ListItemApi, MermaidApi, NotionCalloutApi, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
package/dist/index.mjs
CHANGED
|
@@ -265,6 +265,21 @@ const BlockImageApi = {
|
|
|
265
265
|
caption: z.string().describe("Optional caption shown below the image.").optional()
|
|
266
266
|
}).strict()
|
|
267
267
|
};
|
|
268
|
+
/**
|
|
269
|
+
* Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
|
|
270
|
+
* `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
|
|
271
|
+
* export) or `src` (a remote document URL) — this catalog doesn't validate
|
|
272
|
+
* cross-field constraints, so the contract is documentation-only.
|
|
273
|
+
*/
|
|
274
|
+
const HtmlApi = {
|
|
275
|
+
name: "Html",
|
|
276
|
+
schema: z.object({
|
|
277
|
+
...CommonProps,
|
|
278
|
+
html: z.string().describe("Raw HTML markup to render inside a sandboxed iframe. Mutually exclusive with `src` — provide exactly one of the two.").optional(),
|
|
279
|
+
src: z.string().describe("URL of a remote document to render inside the iframe instead of inline `html` (e.g. a presigned, time-limited link). Mutually exclusive with `html` — provide exactly one of the two. `autoHeight` doesn't apply here since cross-origin content can't be measured, and a time-limited URL isn't refreshed automatically — the caller is responsible for keeping it current.").optional(),
|
|
280
|
+
autoHeight: z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true. Only takes effect for `html`-rendered content.").optional()
|
|
281
|
+
}).strict()
|
|
282
|
+
};
|
|
268
283
|
const CodeBlockApi = {
|
|
269
284
|
name: "CodeBlock",
|
|
270
285
|
schema: z.object({
|
|
@@ -666,6 +681,7 @@ const blockCatalogJson = assembleCatalog({
|
|
|
666
681
|
AudioApi,
|
|
667
682
|
VideoApi,
|
|
668
683
|
BlockImageApi,
|
|
684
|
+
HtmlApi,
|
|
669
685
|
CodeBlockApi,
|
|
670
686
|
KatexApi,
|
|
671
687
|
MermaidApi,
|
|
@@ -1266,4 +1282,4 @@ const normalizeLanguage = (language) => ALIAS_TO_LANGUAGE.get(language) ?? "file
|
|
|
1266
1282
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
1267
1283
|
const languageIcons = Object.fromEntries(LANGUAGE_REGISTRY.flatMap((e) => e.icon ? [[e.key, e.icon]] : []));
|
|
1268
1284
|
//#endregion
|
|
1269
|
-
export { AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, HeadingApi, IconApi, KatexApi, LANGUAGES, LinkTextApi, ListApi, ListItemApi, MermaidApi, NotionCalloutApi, ParagraphApi, RichTextApi, RowApi, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
1285
|
+
export { AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, HeadingApi, HtmlApi, IconApi, KatexApi, LANGUAGES, LinkTextApi, ListApi, ListItemApi, MermaidApi, NotionCalloutApi, ParagraphApi, RichTextApi, RowApi, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|