@elmethis/core 0.15.0 → 0.17.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 +129 -0
- package/dist/index.cjs +49 -0
- package/dist/index.d.cts +304 -4
- package/dist/index.d.mts +304 -4
- package/dist/index.mjs +48 -1
- package/dist/tokens.css +1 -1
- package/package.json +10 -10
|
@@ -483,6 +483,103 @@
|
|
|
483
483
|
],
|
|
484
484
|
"unevaluatedProperties": false
|
|
485
485
|
},
|
|
486
|
+
"NotionCallout": {
|
|
487
|
+
"type": "object",
|
|
488
|
+
"allOf": [
|
|
489
|
+
{
|
|
490
|
+
"$ref": "#/$defs/ComponentCommon"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"$ref": "#/$defs/CatalogComponentCommon"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"type": "object",
|
|
497
|
+
"properties": {
|
|
498
|
+
"component": {
|
|
499
|
+
"const": "NotionCallout"
|
|
500
|
+
},
|
|
501
|
+
"icon": {
|
|
502
|
+
"anyOf": [
|
|
503
|
+
{
|
|
504
|
+
"type": "object",
|
|
505
|
+
"properties": {
|
|
506
|
+
"kind": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"const": "emoji"
|
|
509
|
+
},
|
|
510
|
+
"emoji": {
|
|
511
|
+
"type": "string",
|
|
512
|
+
"description": "A single emoji character."
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"required": [
|
|
516
|
+
"kind",
|
|
517
|
+
"emoji"
|
|
518
|
+
],
|
|
519
|
+
"additionalProperties": false
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"type": "object",
|
|
523
|
+
"properties": {
|
|
524
|
+
"kind": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"const": "image"
|
|
527
|
+
},
|
|
528
|
+
"src": {
|
|
529
|
+
"type": "string",
|
|
530
|
+
"description": "The source URL of the icon image."
|
|
531
|
+
},
|
|
532
|
+
"alt": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"description": "Accessible alt text for the icon."
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"required": [
|
|
538
|
+
"kind",
|
|
539
|
+
"src"
|
|
540
|
+
],
|
|
541
|
+
"additionalProperties": false
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"description": "Icon shown before the content: an emoji or an image."
|
|
545
|
+
},
|
|
546
|
+
"color": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"enum": [
|
|
549
|
+
"default",
|
|
550
|
+
"gray",
|
|
551
|
+
"red",
|
|
552
|
+
"orange",
|
|
553
|
+
"yellow",
|
|
554
|
+
"green",
|
|
555
|
+
"cyan",
|
|
556
|
+
"blue",
|
|
557
|
+
"purple",
|
|
558
|
+
"magenta"
|
|
559
|
+
],
|
|
560
|
+
"description": "Accent hue for the callout."
|
|
561
|
+
},
|
|
562
|
+
"variant": {
|
|
563
|
+
"type": "string",
|
|
564
|
+
"enum": [
|
|
565
|
+
"filled",
|
|
566
|
+
"outlined"
|
|
567
|
+
],
|
|
568
|
+
"description": "Tinted background ('filled') or transparent with a colored border ('outlined')."
|
|
569
|
+
},
|
|
570
|
+
"children": {
|
|
571
|
+
"$ref": "#/$defs/ChildList",
|
|
572
|
+
"description": "Ordered list of child component IDs that make up the callout body."
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"required": [
|
|
576
|
+
"component",
|
|
577
|
+
"children"
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
],
|
|
581
|
+
"unevaluatedProperties": false
|
|
582
|
+
},
|
|
486
583
|
"Divider": {
|
|
487
584
|
"type": "object",
|
|
488
585
|
"allOf": [
|
|
@@ -775,6 +872,38 @@
|
|
|
775
872
|
],
|
|
776
873
|
"unevaluatedProperties": false
|
|
777
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."
|
|
893
|
+
},
|
|
894
|
+
"autoHeight": {
|
|
895
|
+
"type": "boolean",
|
|
896
|
+
"description": "Stretch the iframe to fit its content height. Defaults to true."
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"required": [
|
|
900
|
+
"component",
|
|
901
|
+
"html"
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
],
|
|
905
|
+
"unevaluatedProperties": false
|
|
906
|
+
},
|
|
778
907
|
"CodeBlock": {
|
|
779
908
|
"type": "object",
|
|
780
909
|
"allOf": [
|
package/dist/index.cjs
CHANGED
|
@@ -146,6 +146,39 @@ const CalloutApi = {
|
|
|
146
146
|
children: childrenSchema.describe("Ordered list of child component IDs that make up the callout body.")
|
|
147
147
|
}).strict()
|
|
148
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* Notion-style callout: an icon (emoji or image) plus a colored, filled or
|
|
151
|
+
* outlined block. Unlike {@link CalloutApi}, it carries no severity/flavor
|
|
152
|
+
* text — the color and icon alone convey meaning.
|
|
153
|
+
*/
|
|
154
|
+
const NotionCalloutApi = {
|
|
155
|
+
name: "NotionCallout",
|
|
156
|
+
schema: zod.z.object({
|
|
157
|
+
...CommonProps,
|
|
158
|
+
icon: zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
159
|
+
kind: zod.z.literal("emoji"),
|
|
160
|
+
emoji: zod.z.string().describe("A single emoji character.")
|
|
161
|
+
}).strict(), zod.z.object({
|
|
162
|
+
kind: zod.z.literal("image"),
|
|
163
|
+
src: zod.z.string().describe("The source URL of the icon image."),
|
|
164
|
+
alt: zod.z.string().describe("Accessible alt text for the icon.").optional()
|
|
165
|
+
}).strict()]).describe("Icon shown before the content: an emoji or an image.").optional(),
|
|
166
|
+
color: zod.z.enum([
|
|
167
|
+
"default",
|
|
168
|
+
"gray",
|
|
169
|
+
"red",
|
|
170
|
+
"orange",
|
|
171
|
+
"yellow",
|
|
172
|
+
"green",
|
|
173
|
+
"cyan",
|
|
174
|
+
"blue",
|
|
175
|
+
"purple",
|
|
176
|
+
"magenta"
|
|
177
|
+
]).describe("Accent hue for the callout.").optional(),
|
|
178
|
+
variant: zod.z.enum(["filled", "outlined"]).describe("Tinted background ('filled') or transparent with a colored border ('outlined').").optional(),
|
|
179
|
+
children: childrenSchema.describe("Ordered list of child component IDs that make up the callout body.")
|
|
180
|
+
}).strict()
|
|
181
|
+
};
|
|
149
182
|
/** Horizontal rule / section separator. Has no configurable properties. */
|
|
150
183
|
const DividerApi = {
|
|
151
184
|
name: "Divider",
|
|
@@ -233,6 +266,18 @@ const BlockImageApi = {
|
|
|
233
266
|
caption: zod.z.string().describe("Optional caption shown below the image.").optional()
|
|
234
267
|
}).strict()
|
|
235
268
|
};
|
|
269
|
+
/**
|
|
270
|
+
* Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
|
|
271
|
+
* Claude-authored artifact or a Notion page export).
|
|
272
|
+
*/
|
|
273
|
+
const HtmlApi = {
|
|
274
|
+
name: "Html",
|
|
275
|
+
schema: zod.z.object({
|
|
276
|
+
...CommonProps,
|
|
277
|
+
html: zod.z.string().describe("Raw HTML markup to render inside a sandboxed iframe."),
|
|
278
|
+
autoHeight: zod.z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true.").optional()
|
|
279
|
+
}).strict()
|
|
280
|
+
};
|
|
236
281
|
const CodeBlockApi = {
|
|
237
282
|
name: "CodeBlock",
|
|
238
283
|
schema: zod.z.object({
|
|
@@ -622,6 +667,7 @@ const BLOCK_CATALOG_COMPONENTS = [
|
|
|
622
667
|
ListItemApi,
|
|
623
668
|
BlockQuoteApi,
|
|
624
669
|
CalloutApi,
|
|
670
|
+
NotionCalloutApi,
|
|
625
671
|
DividerApi,
|
|
626
672
|
ToggleApi,
|
|
627
673
|
BookmarkApi,
|
|
@@ -629,6 +675,7 @@ const BLOCK_CATALOG_COMPONENTS = [
|
|
|
629
675
|
AudioApi,
|
|
630
676
|
VideoApi,
|
|
631
677
|
BlockImageApi,
|
|
678
|
+
HtmlApi,
|
|
632
679
|
CodeBlockApi,
|
|
633
680
|
KatexApi,
|
|
634
681
|
MermaidApi,
|
|
@@ -1248,6 +1295,7 @@ exports.ContentTabsApi = ContentTabsApi;
|
|
|
1248
1295
|
exports.DividerApi = DividerApi;
|
|
1249
1296
|
exports.FileApi = FileApi;
|
|
1250
1297
|
exports.HeadingApi = HeadingApi;
|
|
1298
|
+
exports.HtmlApi = HtmlApi;
|
|
1251
1299
|
exports.IconApi = IconApi;
|
|
1252
1300
|
exports.KatexApi = KatexApi;
|
|
1253
1301
|
exports.LANGUAGES = LANGUAGES;
|
|
@@ -1255,6 +1303,7 @@ exports.LinkTextApi = LinkTextApi;
|
|
|
1255
1303
|
exports.ListApi = ListApi;
|
|
1256
1304
|
exports.ListItemApi = ListItemApi;
|
|
1257
1305
|
exports.MermaidApi = MermaidApi;
|
|
1306
|
+
exports.NotionCalloutApi = NotionCalloutApi;
|
|
1258
1307
|
exports.ParagraphApi = ParagraphApi;
|
|
1259
1308
|
exports.RichTextApi = RichTextApi;
|
|
1260
1309
|
exports.RowApi = _a2ui_web_core_v0_9_basic_catalog.RowApi;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { RowApi } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
3
3
|
import { ComponentApi } from "@a2ui/web_core/v0_9";
|
|
4
|
-
|
|
5
4
|
//#region src/a2ui/v0_9/block-catalog.d.ts
|
|
6
5
|
declare const RichTextApi: {
|
|
7
6
|
name: string;
|
|
@@ -1454,6 +1453,185 @@ declare const CalloutApi: {
|
|
|
1454
1453
|
weight?: number | undefined;
|
|
1455
1454
|
}>;
|
|
1456
1455
|
};
|
|
1456
|
+
/**
|
|
1457
|
+
* Notion-style callout: an icon (emoji or image) plus a colored, filled or
|
|
1458
|
+
* outlined block. Unlike {@link CalloutApi}, it carries no severity/flavor
|
|
1459
|
+
* text — the color and icon alone convey meaning.
|
|
1460
|
+
*/
|
|
1461
|
+
declare const NotionCalloutApi: {
|
|
1462
|
+
name: string;
|
|
1463
|
+
schema: z.ZodObject<{
|
|
1464
|
+
icon: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1465
|
+
kind: z.ZodLiteral<"emoji">;
|
|
1466
|
+
emoji: z.ZodString;
|
|
1467
|
+
}, "strict", z.ZodTypeAny, {
|
|
1468
|
+
kind: "emoji";
|
|
1469
|
+
emoji: string;
|
|
1470
|
+
}, {
|
|
1471
|
+
kind: "emoji";
|
|
1472
|
+
emoji: string;
|
|
1473
|
+
}>, z.ZodObject<{
|
|
1474
|
+
kind: z.ZodLiteral<"image">;
|
|
1475
|
+
src: z.ZodString;
|
|
1476
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1477
|
+
}, "strict", z.ZodTypeAny, {
|
|
1478
|
+
src: string;
|
|
1479
|
+
kind: "image";
|
|
1480
|
+
alt?: string | undefined;
|
|
1481
|
+
}, {
|
|
1482
|
+
src: string;
|
|
1483
|
+
kind: "image";
|
|
1484
|
+
alt?: string | undefined;
|
|
1485
|
+
}>]>>;
|
|
1486
|
+
color: z.ZodOptional<z.ZodEnum<["default", "gray", "red", "orange", "yellow", "green", "cyan", "blue", "purple", "magenta"]>>;
|
|
1487
|
+
variant: z.ZodOptional<z.ZodEnum<["filled", "outlined"]>>;
|
|
1488
|
+
children: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
|
|
1489
|
+
componentId: z.ZodString;
|
|
1490
|
+
path: z.ZodString;
|
|
1491
|
+
}, "strip", z.ZodTypeAny, {
|
|
1492
|
+
componentId: string;
|
|
1493
|
+
path: string;
|
|
1494
|
+
}, {
|
|
1495
|
+
componentId: string;
|
|
1496
|
+
path: string;
|
|
1497
|
+
}>]>;
|
|
1498
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
1499
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1500
|
+
path: z.ZodString;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
path: string;
|
|
1503
|
+
}, {
|
|
1504
|
+
path: string;
|
|
1505
|
+
}>, z.ZodObject<{
|
|
1506
|
+
call: z.ZodString;
|
|
1507
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1508
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
1509
|
+
}, "strip", z.ZodTypeAny, {
|
|
1510
|
+
call: string;
|
|
1511
|
+
args: Record<string, any>;
|
|
1512
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1513
|
+
}, {
|
|
1514
|
+
call: string;
|
|
1515
|
+
args: Record<string, any>;
|
|
1516
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1517
|
+
}>]>>;
|
|
1518
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1519
|
+
path: z.ZodString;
|
|
1520
|
+
}, "strip", z.ZodTypeAny, {
|
|
1521
|
+
path: string;
|
|
1522
|
+
}, {
|
|
1523
|
+
path: string;
|
|
1524
|
+
}>, z.ZodObject<{
|
|
1525
|
+
call: z.ZodString;
|
|
1526
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1527
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
1528
|
+
}, "strip", z.ZodTypeAny, {
|
|
1529
|
+
call: string;
|
|
1530
|
+
args: Record<string, any>;
|
|
1531
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1532
|
+
}, {
|
|
1533
|
+
call: string;
|
|
1534
|
+
args: Record<string, any>;
|
|
1535
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1536
|
+
}>]>>;
|
|
1537
|
+
}, "strip", z.ZodTypeAny, {
|
|
1538
|
+
description?: string | {
|
|
1539
|
+
path: string;
|
|
1540
|
+
} | {
|
|
1541
|
+
call: string;
|
|
1542
|
+
args: Record<string, any>;
|
|
1543
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1544
|
+
} | undefined;
|
|
1545
|
+
label?: string | {
|
|
1546
|
+
path: string;
|
|
1547
|
+
} | {
|
|
1548
|
+
call: string;
|
|
1549
|
+
args: Record<string, any>;
|
|
1550
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1551
|
+
} | undefined;
|
|
1552
|
+
}, {
|
|
1553
|
+
description?: string | {
|
|
1554
|
+
path: string;
|
|
1555
|
+
} | {
|
|
1556
|
+
call: string;
|
|
1557
|
+
args: Record<string, any>;
|
|
1558
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1559
|
+
} | undefined;
|
|
1560
|
+
label?: string | {
|
|
1561
|
+
path: string;
|
|
1562
|
+
} | {
|
|
1563
|
+
call: string;
|
|
1564
|
+
args: Record<string, any>;
|
|
1565
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1566
|
+
} | undefined;
|
|
1567
|
+
}>>;
|
|
1568
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1569
|
+
}, "strict", z.ZodTypeAny, {
|
|
1570
|
+
children: {
|
|
1571
|
+
componentId: string;
|
|
1572
|
+
path: string;
|
|
1573
|
+
} | string[];
|
|
1574
|
+
color?: "default" | "gray" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "magenta" | undefined;
|
|
1575
|
+
accessibility?: {
|
|
1576
|
+
description?: string | {
|
|
1577
|
+
path: string;
|
|
1578
|
+
} | {
|
|
1579
|
+
call: string;
|
|
1580
|
+
args: Record<string, any>;
|
|
1581
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1582
|
+
} | undefined;
|
|
1583
|
+
label?: string | {
|
|
1584
|
+
path: string;
|
|
1585
|
+
} | {
|
|
1586
|
+
call: string;
|
|
1587
|
+
args: Record<string, any>;
|
|
1588
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1589
|
+
} | undefined;
|
|
1590
|
+
} | undefined;
|
|
1591
|
+
weight?: number | undefined;
|
|
1592
|
+
icon?: {
|
|
1593
|
+
kind: "emoji";
|
|
1594
|
+
emoji: string;
|
|
1595
|
+
} | {
|
|
1596
|
+
src: string;
|
|
1597
|
+
kind: "image";
|
|
1598
|
+
alt?: string | undefined;
|
|
1599
|
+
} | undefined;
|
|
1600
|
+
variant?: "filled" | "outlined" | undefined;
|
|
1601
|
+
}, {
|
|
1602
|
+
children: {
|
|
1603
|
+
componentId: string;
|
|
1604
|
+
path: string;
|
|
1605
|
+
} | string[];
|
|
1606
|
+
color?: "default" | "gray" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "magenta" | undefined;
|
|
1607
|
+
accessibility?: {
|
|
1608
|
+
description?: string | {
|
|
1609
|
+
path: string;
|
|
1610
|
+
} | {
|
|
1611
|
+
call: string;
|
|
1612
|
+
args: Record<string, any>;
|
|
1613
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1614
|
+
} | undefined;
|
|
1615
|
+
label?: string | {
|
|
1616
|
+
path: string;
|
|
1617
|
+
} | {
|
|
1618
|
+
call: string;
|
|
1619
|
+
args: Record<string, any>;
|
|
1620
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1621
|
+
} | undefined;
|
|
1622
|
+
} | undefined;
|
|
1623
|
+
weight?: number | undefined;
|
|
1624
|
+
icon?: {
|
|
1625
|
+
kind: "emoji";
|
|
1626
|
+
emoji: string;
|
|
1627
|
+
} | {
|
|
1628
|
+
src: string;
|
|
1629
|
+
kind: "image";
|
|
1630
|
+
alt?: string | undefined;
|
|
1631
|
+
} | undefined;
|
|
1632
|
+
variant?: "filled" | "outlined" | undefined;
|
|
1633
|
+
}>;
|
|
1634
|
+
};
|
|
1457
1635
|
/** Horizontal rule / section separator. Has no configurable properties. */
|
|
1458
1636
|
declare const DividerApi: {
|
|
1459
1637
|
name: string;
|
|
@@ -1814,9 +1992,9 @@ declare const BookmarkApi: {
|
|
|
1814
1992
|
} | undefined;
|
|
1815
1993
|
} | undefined;
|
|
1816
1994
|
weight?: number | undefined;
|
|
1995
|
+
image?: string | undefined;
|
|
1817
1996
|
title?: string | undefined;
|
|
1818
1997
|
description?: string | undefined;
|
|
1819
|
-
image?: string | undefined;
|
|
1820
1998
|
}, {
|
|
1821
1999
|
url: string;
|
|
1822
2000
|
accessibility?: {
|
|
@@ -1836,9 +2014,9 @@ declare const BookmarkApi: {
|
|
|
1836
2014
|
} | undefined;
|
|
1837
2015
|
} | undefined;
|
|
1838
2016
|
weight?: number | undefined;
|
|
2017
|
+
image?: string | undefined;
|
|
1839
2018
|
title?: string | undefined;
|
|
1840
2019
|
description?: string | undefined;
|
|
1841
|
-
image?: string | undefined;
|
|
1842
2020
|
}>;
|
|
1843
2021
|
};
|
|
1844
2022
|
/** Downloadable file attachment widget. */
|
|
@@ -2377,6 +2555,128 @@ declare const BlockImageApi: {
|
|
|
2377
2555
|
sizes?: string | undefined;
|
|
2378
2556
|
}>;
|
|
2379
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
|
|
2560
|
+
* Claude-authored artifact or a Notion page export).
|
|
2561
|
+
*/
|
|
2562
|
+
declare const HtmlApi: {
|
|
2563
|
+
name: string;
|
|
2564
|
+
schema: z.ZodObject<{
|
|
2565
|
+
html: z.ZodString;
|
|
2566
|
+
autoHeight: z.ZodOptional<z.ZodBoolean>;
|
|
2567
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
2568
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2569
|
+
path: z.ZodString;
|
|
2570
|
+
}, "strip", z.ZodTypeAny, {
|
|
2571
|
+
path: string;
|
|
2572
|
+
}, {
|
|
2573
|
+
path: string;
|
|
2574
|
+
}>, z.ZodObject<{
|
|
2575
|
+
call: z.ZodString;
|
|
2576
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2577
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2578
|
+
}, "strip", z.ZodTypeAny, {
|
|
2579
|
+
call: string;
|
|
2580
|
+
args: Record<string, any>;
|
|
2581
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2582
|
+
}, {
|
|
2583
|
+
call: string;
|
|
2584
|
+
args: Record<string, any>;
|
|
2585
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2586
|
+
}>]>>;
|
|
2587
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2588
|
+
path: z.ZodString;
|
|
2589
|
+
}, "strip", z.ZodTypeAny, {
|
|
2590
|
+
path: string;
|
|
2591
|
+
}, {
|
|
2592
|
+
path: string;
|
|
2593
|
+
}>, z.ZodObject<{
|
|
2594
|
+
call: z.ZodString;
|
|
2595
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2596
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2597
|
+
}, "strip", z.ZodTypeAny, {
|
|
2598
|
+
call: string;
|
|
2599
|
+
args: Record<string, any>;
|
|
2600
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2601
|
+
}, {
|
|
2602
|
+
call: string;
|
|
2603
|
+
args: Record<string, any>;
|
|
2604
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2605
|
+
}>]>>;
|
|
2606
|
+
}, "strip", z.ZodTypeAny, {
|
|
2607
|
+
description?: string | {
|
|
2608
|
+
path: string;
|
|
2609
|
+
} | {
|
|
2610
|
+
call: string;
|
|
2611
|
+
args: Record<string, any>;
|
|
2612
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2613
|
+
} | undefined;
|
|
2614
|
+
label?: string | {
|
|
2615
|
+
path: string;
|
|
2616
|
+
} | {
|
|
2617
|
+
call: string;
|
|
2618
|
+
args: Record<string, any>;
|
|
2619
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2620
|
+
} | undefined;
|
|
2621
|
+
}, {
|
|
2622
|
+
description?: string | {
|
|
2623
|
+
path: string;
|
|
2624
|
+
} | {
|
|
2625
|
+
call: string;
|
|
2626
|
+
args: Record<string, any>;
|
|
2627
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2628
|
+
} | undefined;
|
|
2629
|
+
label?: string | {
|
|
2630
|
+
path: string;
|
|
2631
|
+
} | {
|
|
2632
|
+
call: string;
|
|
2633
|
+
args: Record<string, any>;
|
|
2634
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2635
|
+
} | undefined;
|
|
2636
|
+
}>>;
|
|
2637
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2638
|
+
}, "strict", z.ZodTypeAny, {
|
|
2639
|
+
html: string;
|
|
2640
|
+
accessibility?: {
|
|
2641
|
+
description?: string | {
|
|
2642
|
+
path: string;
|
|
2643
|
+
} | {
|
|
2644
|
+
call: string;
|
|
2645
|
+
args: Record<string, any>;
|
|
2646
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2647
|
+
} | undefined;
|
|
2648
|
+
label?: string | {
|
|
2649
|
+
path: string;
|
|
2650
|
+
} | {
|
|
2651
|
+
call: string;
|
|
2652
|
+
args: Record<string, any>;
|
|
2653
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2654
|
+
} | undefined;
|
|
2655
|
+
} | undefined;
|
|
2656
|
+
weight?: number | undefined;
|
|
2657
|
+
autoHeight?: boolean | undefined;
|
|
2658
|
+
}, {
|
|
2659
|
+
html: string;
|
|
2660
|
+
accessibility?: {
|
|
2661
|
+
description?: string | {
|
|
2662
|
+
path: string;
|
|
2663
|
+
} | {
|
|
2664
|
+
call: string;
|
|
2665
|
+
args: Record<string, any>;
|
|
2666
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2667
|
+
} | undefined;
|
|
2668
|
+
label?: string | {
|
|
2669
|
+
path: string;
|
|
2670
|
+
} | {
|
|
2671
|
+
call: string;
|
|
2672
|
+
args: Record<string, any>;
|
|
2673
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2674
|
+
} | undefined;
|
|
2675
|
+
} | undefined;
|
|
2676
|
+
weight?: number | undefined;
|
|
2677
|
+
autoHeight?: boolean | undefined;
|
|
2678
|
+
}>;
|
|
2679
|
+
};
|
|
2380
2680
|
declare const CodeBlockApi: {
|
|
2381
2681
|
name: string;
|
|
2382
2682
|
schema: z.ZodObject<{
|
|
@@ -3641,4 +3941,4 @@ declare const normalizeLanguage: (language: string) => Language;
|
|
|
3641
3941
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
3642
3942
|
declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
|
|
3643
3943
|
//#endregion
|
|
3644
|
-
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, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
3944
|
+
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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ComponentApi } from "@a2ui/web_core/v0_9";
|
|
3
3
|
import { RowApi } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
4
|
-
|
|
5
4
|
//#region src/a2ui/v0_9/block-catalog.d.ts
|
|
6
5
|
declare const RichTextApi: {
|
|
7
6
|
name: string;
|
|
@@ -1454,6 +1453,185 @@ declare const CalloutApi: {
|
|
|
1454
1453
|
weight?: number | undefined;
|
|
1455
1454
|
}>;
|
|
1456
1455
|
};
|
|
1456
|
+
/**
|
|
1457
|
+
* Notion-style callout: an icon (emoji or image) plus a colored, filled or
|
|
1458
|
+
* outlined block. Unlike {@link CalloutApi}, it carries no severity/flavor
|
|
1459
|
+
* text — the color and icon alone convey meaning.
|
|
1460
|
+
*/
|
|
1461
|
+
declare const NotionCalloutApi: {
|
|
1462
|
+
name: string;
|
|
1463
|
+
schema: z.ZodObject<{
|
|
1464
|
+
icon: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1465
|
+
kind: z.ZodLiteral<"emoji">;
|
|
1466
|
+
emoji: z.ZodString;
|
|
1467
|
+
}, "strict", z.ZodTypeAny, {
|
|
1468
|
+
kind: "emoji";
|
|
1469
|
+
emoji: string;
|
|
1470
|
+
}, {
|
|
1471
|
+
kind: "emoji";
|
|
1472
|
+
emoji: string;
|
|
1473
|
+
}>, z.ZodObject<{
|
|
1474
|
+
kind: z.ZodLiteral<"image">;
|
|
1475
|
+
src: z.ZodString;
|
|
1476
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1477
|
+
}, "strict", z.ZodTypeAny, {
|
|
1478
|
+
src: string;
|
|
1479
|
+
kind: "image";
|
|
1480
|
+
alt?: string | undefined;
|
|
1481
|
+
}, {
|
|
1482
|
+
src: string;
|
|
1483
|
+
kind: "image";
|
|
1484
|
+
alt?: string | undefined;
|
|
1485
|
+
}>]>>;
|
|
1486
|
+
color: z.ZodOptional<z.ZodEnum<["default", "gray", "red", "orange", "yellow", "green", "cyan", "blue", "purple", "magenta"]>>;
|
|
1487
|
+
variant: z.ZodOptional<z.ZodEnum<["filled", "outlined"]>>;
|
|
1488
|
+
children: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
|
|
1489
|
+
componentId: z.ZodString;
|
|
1490
|
+
path: z.ZodString;
|
|
1491
|
+
}, "strip", z.ZodTypeAny, {
|
|
1492
|
+
componentId: string;
|
|
1493
|
+
path: string;
|
|
1494
|
+
}, {
|
|
1495
|
+
componentId: string;
|
|
1496
|
+
path: string;
|
|
1497
|
+
}>]>;
|
|
1498
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
1499
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1500
|
+
path: z.ZodString;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
path: string;
|
|
1503
|
+
}, {
|
|
1504
|
+
path: string;
|
|
1505
|
+
}>, z.ZodObject<{
|
|
1506
|
+
call: z.ZodString;
|
|
1507
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1508
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
1509
|
+
}, "strip", z.ZodTypeAny, {
|
|
1510
|
+
call: string;
|
|
1511
|
+
args: Record<string, any>;
|
|
1512
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1513
|
+
}, {
|
|
1514
|
+
call: string;
|
|
1515
|
+
args: Record<string, any>;
|
|
1516
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1517
|
+
}>]>>;
|
|
1518
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1519
|
+
path: z.ZodString;
|
|
1520
|
+
}, "strip", z.ZodTypeAny, {
|
|
1521
|
+
path: string;
|
|
1522
|
+
}, {
|
|
1523
|
+
path: string;
|
|
1524
|
+
}>, z.ZodObject<{
|
|
1525
|
+
call: z.ZodString;
|
|
1526
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1527
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
1528
|
+
}, "strip", z.ZodTypeAny, {
|
|
1529
|
+
call: string;
|
|
1530
|
+
args: Record<string, any>;
|
|
1531
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1532
|
+
}, {
|
|
1533
|
+
call: string;
|
|
1534
|
+
args: Record<string, any>;
|
|
1535
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1536
|
+
}>]>>;
|
|
1537
|
+
}, "strip", z.ZodTypeAny, {
|
|
1538
|
+
description?: string | {
|
|
1539
|
+
path: string;
|
|
1540
|
+
} | {
|
|
1541
|
+
call: string;
|
|
1542
|
+
args: Record<string, any>;
|
|
1543
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1544
|
+
} | undefined;
|
|
1545
|
+
label?: string | {
|
|
1546
|
+
path: string;
|
|
1547
|
+
} | {
|
|
1548
|
+
call: string;
|
|
1549
|
+
args: Record<string, any>;
|
|
1550
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1551
|
+
} | undefined;
|
|
1552
|
+
}, {
|
|
1553
|
+
description?: string | {
|
|
1554
|
+
path: string;
|
|
1555
|
+
} | {
|
|
1556
|
+
call: string;
|
|
1557
|
+
args: Record<string, any>;
|
|
1558
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1559
|
+
} | undefined;
|
|
1560
|
+
label?: string | {
|
|
1561
|
+
path: string;
|
|
1562
|
+
} | {
|
|
1563
|
+
call: string;
|
|
1564
|
+
args: Record<string, any>;
|
|
1565
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1566
|
+
} | undefined;
|
|
1567
|
+
}>>;
|
|
1568
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1569
|
+
}, "strict", z.ZodTypeAny, {
|
|
1570
|
+
children: {
|
|
1571
|
+
componentId: string;
|
|
1572
|
+
path: string;
|
|
1573
|
+
} | string[];
|
|
1574
|
+
color?: "default" | "gray" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "magenta" | undefined;
|
|
1575
|
+
accessibility?: {
|
|
1576
|
+
description?: string | {
|
|
1577
|
+
path: string;
|
|
1578
|
+
} | {
|
|
1579
|
+
call: string;
|
|
1580
|
+
args: Record<string, any>;
|
|
1581
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1582
|
+
} | undefined;
|
|
1583
|
+
label?: string | {
|
|
1584
|
+
path: string;
|
|
1585
|
+
} | {
|
|
1586
|
+
call: string;
|
|
1587
|
+
args: Record<string, any>;
|
|
1588
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1589
|
+
} | undefined;
|
|
1590
|
+
} | undefined;
|
|
1591
|
+
weight?: number | undefined;
|
|
1592
|
+
icon?: {
|
|
1593
|
+
kind: "emoji";
|
|
1594
|
+
emoji: string;
|
|
1595
|
+
} | {
|
|
1596
|
+
src: string;
|
|
1597
|
+
kind: "image";
|
|
1598
|
+
alt?: string | undefined;
|
|
1599
|
+
} | undefined;
|
|
1600
|
+
variant?: "filled" | "outlined" | undefined;
|
|
1601
|
+
}, {
|
|
1602
|
+
children: {
|
|
1603
|
+
componentId: string;
|
|
1604
|
+
path: string;
|
|
1605
|
+
} | string[];
|
|
1606
|
+
color?: "default" | "gray" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "magenta" | undefined;
|
|
1607
|
+
accessibility?: {
|
|
1608
|
+
description?: string | {
|
|
1609
|
+
path: string;
|
|
1610
|
+
} | {
|
|
1611
|
+
call: string;
|
|
1612
|
+
args: Record<string, any>;
|
|
1613
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1614
|
+
} | undefined;
|
|
1615
|
+
label?: string | {
|
|
1616
|
+
path: string;
|
|
1617
|
+
} | {
|
|
1618
|
+
call: string;
|
|
1619
|
+
args: Record<string, any>;
|
|
1620
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1621
|
+
} | undefined;
|
|
1622
|
+
} | undefined;
|
|
1623
|
+
weight?: number | undefined;
|
|
1624
|
+
icon?: {
|
|
1625
|
+
kind: "emoji";
|
|
1626
|
+
emoji: string;
|
|
1627
|
+
} | {
|
|
1628
|
+
src: string;
|
|
1629
|
+
kind: "image";
|
|
1630
|
+
alt?: string | undefined;
|
|
1631
|
+
} | undefined;
|
|
1632
|
+
variant?: "filled" | "outlined" | undefined;
|
|
1633
|
+
}>;
|
|
1634
|
+
};
|
|
1457
1635
|
/** Horizontal rule / section separator. Has no configurable properties. */
|
|
1458
1636
|
declare const DividerApi: {
|
|
1459
1637
|
name: string;
|
|
@@ -1814,9 +1992,9 @@ declare const BookmarkApi: {
|
|
|
1814
1992
|
} | undefined;
|
|
1815
1993
|
} | undefined;
|
|
1816
1994
|
weight?: number | undefined;
|
|
1995
|
+
image?: string | undefined;
|
|
1817
1996
|
title?: string | undefined;
|
|
1818
1997
|
description?: string | undefined;
|
|
1819
|
-
image?: string | undefined;
|
|
1820
1998
|
}, {
|
|
1821
1999
|
url: string;
|
|
1822
2000
|
accessibility?: {
|
|
@@ -1836,9 +2014,9 @@ declare const BookmarkApi: {
|
|
|
1836
2014
|
} | undefined;
|
|
1837
2015
|
} | undefined;
|
|
1838
2016
|
weight?: number | undefined;
|
|
2017
|
+
image?: string | undefined;
|
|
1839
2018
|
title?: string | undefined;
|
|
1840
2019
|
description?: string | undefined;
|
|
1841
|
-
image?: string | undefined;
|
|
1842
2020
|
}>;
|
|
1843
2021
|
};
|
|
1844
2022
|
/** Downloadable file attachment widget. */
|
|
@@ -2377,6 +2555,128 @@ declare const BlockImageApi: {
|
|
|
2377
2555
|
sizes?: string | undefined;
|
|
2378
2556
|
}>;
|
|
2379
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
|
|
2560
|
+
* Claude-authored artifact or a Notion page export).
|
|
2561
|
+
*/
|
|
2562
|
+
declare const HtmlApi: {
|
|
2563
|
+
name: string;
|
|
2564
|
+
schema: z.ZodObject<{
|
|
2565
|
+
html: z.ZodString;
|
|
2566
|
+
autoHeight: z.ZodOptional<z.ZodBoolean>;
|
|
2567
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
2568
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2569
|
+
path: z.ZodString;
|
|
2570
|
+
}, "strip", z.ZodTypeAny, {
|
|
2571
|
+
path: string;
|
|
2572
|
+
}, {
|
|
2573
|
+
path: string;
|
|
2574
|
+
}>, z.ZodObject<{
|
|
2575
|
+
call: z.ZodString;
|
|
2576
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2577
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2578
|
+
}, "strip", z.ZodTypeAny, {
|
|
2579
|
+
call: string;
|
|
2580
|
+
args: Record<string, any>;
|
|
2581
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2582
|
+
}, {
|
|
2583
|
+
call: string;
|
|
2584
|
+
args: Record<string, any>;
|
|
2585
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2586
|
+
}>]>>;
|
|
2587
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2588
|
+
path: z.ZodString;
|
|
2589
|
+
}, "strip", z.ZodTypeAny, {
|
|
2590
|
+
path: string;
|
|
2591
|
+
}, {
|
|
2592
|
+
path: string;
|
|
2593
|
+
}>, z.ZodObject<{
|
|
2594
|
+
call: z.ZodString;
|
|
2595
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2596
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2597
|
+
}, "strip", z.ZodTypeAny, {
|
|
2598
|
+
call: string;
|
|
2599
|
+
args: Record<string, any>;
|
|
2600
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2601
|
+
}, {
|
|
2602
|
+
call: string;
|
|
2603
|
+
args: Record<string, any>;
|
|
2604
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2605
|
+
}>]>>;
|
|
2606
|
+
}, "strip", z.ZodTypeAny, {
|
|
2607
|
+
description?: string | {
|
|
2608
|
+
path: string;
|
|
2609
|
+
} | {
|
|
2610
|
+
call: string;
|
|
2611
|
+
args: Record<string, any>;
|
|
2612
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2613
|
+
} | undefined;
|
|
2614
|
+
label?: string | {
|
|
2615
|
+
path: string;
|
|
2616
|
+
} | {
|
|
2617
|
+
call: string;
|
|
2618
|
+
args: Record<string, any>;
|
|
2619
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2620
|
+
} | undefined;
|
|
2621
|
+
}, {
|
|
2622
|
+
description?: string | {
|
|
2623
|
+
path: string;
|
|
2624
|
+
} | {
|
|
2625
|
+
call: string;
|
|
2626
|
+
args: Record<string, any>;
|
|
2627
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2628
|
+
} | undefined;
|
|
2629
|
+
label?: string | {
|
|
2630
|
+
path: string;
|
|
2631
|
+
} | {
|
|
2632
|
+
call: string;
|
|
2633
|
+
args: Record<string, any>;
|
|
2634
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2635
|
+
} | undefined;
|
|
2636
|
+
}>>;
|
|
2637
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2638
|
+
}, "strict", z.ZodTypeAny, {
|
|
2639
|
+
html: string;
|
|
2640
|
+
accessibility?: {
|
|
2641
|
+
description?: string | {
|
|
2642
|
+
path: string;
|
|
2643
|
+
} | {
|
|
2644
|
+
call: string;
|
|
2645
|
+
args: Record<string, any>;
|
|
2646
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2647
|
+
} | undefined;
|
|
2648
|
+
label?: string | {
|
|
2649
|
+
path: string;
|
|
2650
|
+
} | {
|
|
2651
|
+
call: string;
|
|
2652
|
+
args: Record<string, any>;
|
|
2653
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2654
|
+
} | undefined;
|
|
2655
|
+
} | undefined;
|
|
2656
|
+
weight?: number | undefined;
|
|
2657
|
+
autoHeight?: boolean | undefined;
|
|
2658
|
+
}, {
|
|
2659
|
+
html: string;
|
|
2660
|
+
accessibility?: {
|
|
2661
|
+
description?: string | {
|
|
2662
|
+
path: string;
|
|
2663
|
+
} | {
|
|
2664
|
+
call: string;
|
|
2665
|
+
args: Record<string, any>;
|
|
2666
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2667
|
+
} | undefined;
|
|
2668
|
+
label?: string | {
|
|
2669
|
+
path: string;
|
|
2670
|
+
} | {
|
|
2671
|
+
call: string;
|
|
2672
|
+
args: Record<string, any>;
|
|
2673
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2674
|
+
} | undefined;
|
|
2675
|
+
} | undefined;
|
|
2676
|
+
weight?: number | undefined;
|
|
2677
|
+
autoHeight?: boolean | undefined;
|
|
2678
|
+
}>;
|
|
2679
|
+
};
|
|
2380
2680
|
declare const CodeBlockApi: {
|
|
2381
2681
|
name: string;
|
|
2382
2682
|
schema: z.ZodObject<{
|
|
@@ -3641,4 +3941,4 @@ declare const normalizeLanguage: (language: string) => Language;
|
|
|
3641
3941
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
3642
3942
|
declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
|
|
3643
3943
|
//#endregion
|
|
3644
|
-
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, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
3944
|
+
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
|
@@ -145,6 +145,39 @@ const CalloutApi = {
|
|
|
145
145
|
children: childrenSchema.describe("Ordered list of child component IDs that make up the callout body.")
|
|
146
146
|
}).strict()
|
|
147
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* Notion-style callout: an icon (emoji or image) plus a colored, filled or
|
|
150
|
+
* outlined block. Unlike {@link CalloutApi}, it carries no severity/flavor
|
|
151
|
+
* text — the color and icon alone convey meaning.
|
|
152
|
+
*/
|
|
153
|
+
const NotionCalloutApi = {
|
|
154
|
+
name: "NotionCallout",
|
|
155
|
+
schema: z.object({
|
|
156
|
+
...CommonProps,
|
|
157
|
+
icon: z.discriminatedUnion("kind", [z.object({
|
|
158
|
+
kind: z.literal("emoji"),
|
|
159
|
+
emoji: z.string().describe("A single emoji character.")
|
|
160
|
+
}).strict(), z.object({
|
|
161
|
+
kind: z.literal("image"),
|
|
162
|
+
src: z.string().describe("The source URL of the icon image."),
|
|
163
|
+
alt: z.string().describe("Accessible alt text for the icon.").optional()
|
|
164
|
+
}).strict()]).describe("Icon shown before the content: an emoji or an image.").optional(),
|
|
165
|
+
color: z.enum([
|
|
166
|
+
"default",
|
|
167
|
+
"gray",
|
|
168
|
+
"red",
|
|
169
|
+
"orange",
|
|
170
|
+
"yellow",
|
|
171
|
+
"green",
|
|
172
|
+
"cyan",
|
|
173
|
+
"blue",
|
|
174
|
+
"purple",
|
|
175
|
+
"magenta"
|
|
176
|
+
]).describe("Accent hue for the callout.").optional(),
|
|
177
|
+
variant: z.enum(["filled", "outlined"]).describe("Tinted background ('filled') or transparent with a colored border ('outlined').").optional(),
|
|
178
|
+
children: childrenSchema.describe("Ordered list of child component IDs that make up the callout body.")
|
|
179
|
+
}).strict()
|
|
180
|
+
};
|
|
148
181
|
/** Horizontal rule / section separator. Has no configurable properties. */
|
|
149
182
|
const DividerApi = {
|
|
150
183
|
name: "Divider",
|
|
@@ -232,6 +265,18 @@ const BlockImageApi = {
|
|
|
232
265
|
caption: z.string().describe("Optional caption shown below the image.").optional()
|
|
233
266
|
}).strict()
|
|
234
267
|
};
|
|
268
|
+
/**
|
|
269
|
+
* Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
|
|
270
|
+
* Claude-authored artifact or a Notion page export).
|
|
271
|
+
*/
|
|
272
|
+
const HtmlApi = {
|
|
273
|
+
name: "Html",
|
|
274
|
+
schema: z.object({
|
|
275
|
+
...CommonProps,
|
|
276
|
+
html: z.string().describe("Raw HTML markup to render inside a sandboxed iframe."),
|
|
277
|
+
autoHeight: z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true.").optional()
|
|
278
|
+
}).strict()
|
|
279
|
+
};
|
|
235
280
|
const CodeBlockApi = {
|
|
236
281
|
name: "CodeBlock",
|
|
237
282
|
schema: z.object({
|
|
@@ -625,6 +670,7 @@ const blockCatalogJson = assembleCatalog({
|
|
|
625
670
|
ListItemApi,
|
|
626
671
|
BlockQuoteApi,
|
|
627
672
|
CalloutApi,
|
|
673
|
+
NotionCalloutApi,
|
|
628
674
|
DividerApi,
|
|
629
675
|
ToggleApi,
|
|
630
676
|
BookmarkApi,
|
|
@@ -632,6 +678,7 @@ const blockCatalogJson = assembleCatalog({
|
|
|
632
678
|
AudioApi,
|
|
633
679
|
VideoApi,
|
|
634
680
|
BlockImageApi,
|
|
681
|
+
HtmlApi,
|
|
635
682
|
CodeBlockApi,
|
|
636
683
|
KatexApi,
|
|
637
684
|
MermaidApi,
|
|
@@ -1232,4 +1279,4 @@ const normalizeLanguage = (language) => ALIAS_TO_LANGUAGE.get(language) ?? "file
|
|
|
1232
1279
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
1233
1280
|
const languageIcons = Object.fromEntries(LANGUAGE_REGISTRY.flatMap((e) => e.icon ? [[e.key, e.icon]] : []));
|
|
1234
1281
|
//#endregion
|
|
1235
|
-
export { AudioApi, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, HeadingApi, IconApi, KatexApi, LANGUAGES, LinkTextApi, ListApi, ListItemApi, MermaidApi, ParagraphApi, RichTextApi, RowApi, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, VideoApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
1282
|
+
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 };
|
package/dist/tokens.css
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
--elmethis-primitive-font-family-monospace:
|
|
48
48
|
"DM Mono", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono",
|
|
49
49
|
"Zen Kaku Gothic New", monospace;
|
|
50
|
-
--elmethis-
|
|
50
|
+
--elmethis-stack-gap: 2rem;
|
|
51
51
|
--elmethis-font-family-sans: var(--elmethis-primitive-font-family-sans);
|
|
52
52
|
--elmethis-font-family-monospace: var(
|
|
53
53
|
--elmethis-primitive-font-family-monospace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elmethis/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Ikuma Yamashita",
|
|
6
6
|
"url": "https://www.ikuma.cloud/"
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@a2ui/web_core": "^0.10.0",
|
|
47
47
|
"@eslint/js": "latest",
|
|
48
|
-
"@types/node": "
|
|
49
|
-
"@vanilla-extract/css": "^1.
|
|
48
|
+
"@types/node": "26.1.0",
|
|
49
|
+
"@vanilla-extract/css": "^1.21.1",
|
|
50
50
|
"@vanilla-extract/esbuild-plugin": "^2.3.22",
|
|
51
|
-
"@vitest/coverage-v8": "^4.1.
|
|
51
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
52
52
|
"ajv": "^8.17.1",
|
|
53
53
|
"ajv-formats": "^3.0.1",
|
|
54
54
|
"concurrently": "^10.0.3",
|
|
55
55
|
"esbuild": "^0.28.1",
|
|
56
|
-
"eslint": "^10.
|
|
57
|
-
"globals": "^17.
|
|
58
|
-
"prettier": "3.
|
|
59
|
-
"tsdown": "^0.22.
|
|
60
|
-
"tsx": "^4.
|
|
56
|
+
"eslint": "^10.6.0",
|
|
57
|
+
"globals": "^17.7.0",
|
|
58
|
+
"prettier": "3.9.4",
|
|
59
|
+
"tsdown": "^0.22.4",
|
|
60
|
+
"tsx": "^4.23.0",
|
|
61
61
|
"typescript": "5.9.3",
|
|
62
|
-
"typescript-eslint": "^8.
|
|
62
|
+
"typescript-eslint": "^8.63.0",
|
|
63
63
|
"vitest": "^4.1.8",
|
|
64
64
|
"zod": "^3"
|
|
65
65
|
},
|