@elmethis/core 0.12.0 → 0.13.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 +112 -0
- package/dist/index.cjs +40 -0
- package/dist/index.d.cts +283 -3
- package/dist/index.d.mts +283 -3
- package/dist/index.mjs +39 -1
- package/package.json +1 -1
|
@@ -611,6 +611,118 @@
|
|
|
611
611
|
],
|
|
612
612
|
"unevaluatedProperties": false
|
|
613
613
|
},
|
|
614
|
+
"Audio": {
|
|
615
|
+
"type": "object",
|
|
616
|
+
"allOf": [
|
|
617
|
+
{
|
|
618
|
+
"$ref": "#/$defs/ComponentCommon"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"$ref": "#/$defs/CatalogComponentCommon"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"type": "object",
|
|
625
|
+
"properties": {
|
|
626
|
+
"component": {
|
|
627
|
+
"const": "Audio"
|
|
628
|
+
},
|
|
629
|
+
"src": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"description": "The source URL of the audio to play."
|
|
632
|
+
},
|
|
633
|
+
"title": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"description": "Display title of the track. Falls back to the src filename when omitted."
|
|
636
|
+
},
|
|
637
|
+
"artist": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"description": "Artist or author name shown beneath the title."
|
|
640
|
+
},
|
|
641
|
+
"seekStep": {
|
|
642
|
+
"type": "number",
|
|
643
|
+
"description": "Number of seconds the skip-back/skip-forward controls jump. Defaults to 10."
|
|
644
|
+
},
|
|
645
|
+
"loop": {
|
|
646
|
+
"type": "boolean",
|
|
647
|
+
"description": "When true, the audio restarts when it reaches the end."
|
|
648
|
+
},
|
|
649
|
+
"autoPlay": {
|
|
650
|
+
"type": "boolean",
|
|
651
|
+
"description": "When true, playback starts automatically once enough data has loaded (subject to the browser's autoplay policy)."
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
"required": [
|
|
655
|
+
"component",
|
|
656
|
+
"src"
|
|
657
|
+
]
|
|
658
|
+
}
|
|
659
|
+
],
|
|
660
|
+
"unevaluatedProperties": false
|
|
661
|
+
},
|
|
662
|
+
"Video": {
|
|
663
|
+
"type": "object",
|
|
664
|
+
"allOf": [
|
|
665
|
+
{
|
|
666
|
+
"$ref": "#/$defs/ComponentCommon"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"$ref": "#/$defs/CatalogComponentCommon"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"type": "object",
|
|
673
|
+
"properties": {
|
|
674
|
+
"component": {
|
|
675
|
+
"const": "Video"
|
|
676
|
+
},
|
|
677
|
+
"src": {
|
|
678
|
+
"type": "string",
|
|
679
|
+
"description": "The source URL of the video to play."
|
|
680
|
+
},
|
|
681
|
+
"title": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"description": "Display title of the video. Falls back to the src filename when omitted."
|
|
684
|
+
},
|
|
685
|
+
"poster": {
|
|
686
|
+
"type": "string",
|
|
687
|
+
"description": "URL of an image shown before the video begins playing."
|
|
688
|
+
},
|
|
689
|
+
"width": {
|
|
690
|
+
"type": "number",
|
|
691
|
+
"description": "Intrinsic video width in pixels."
|
|
692
|
+
},
|
|
693
|
+
"height": {
|
|
694
|
+
"type": "number",
|
|
695
|
+
"description": "Intrinsic video height in pixels."
|
|
696
|
+
},
|
|
697
|
+
"seekStep": {
|
|
698
|
+
"type": "number",
|
|
699
|
+
"description": "Number of seconds the skip-back/skip-forward controls jump. Defaults to 10."
|
|
700
|
+
},
|
|
701
|
+
"loop": {
|
|
702
|
+
"type": "boolean",
|
|
703
|
+
"description": "When true, the video restarts when it reaches the end."
|
|
704
|
+
},
|
|
705
|
+
"autoPlay": {
|
|
706
|
+
"type": "boolean",
|
|
707
|
+
"description": "When true, playback starts automatically once enough data has loaded (subject to the browser's autoplay policy)."
|
|
708
|
+
},
|
|
709
|
+
"muted": {
|
|
710
|
+
"type": "boolean",
|
|
711
|
+
"description": "When true, the video starts muted."
|
|
712
|
+
},
|
|
713
|
+
"caption": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"description": "Optional caption shown below the video."
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"required": [
|
|
719
|
+
"component",
|
|
720
|
+
"src"
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
],
|
|
724
|
+
"unevaluatedProperties": false
|
|
725
|
+
},
|
|
614
726
|
"BlockImage": {
|
|
615
727
|
"type": "object",
|
|
616
728
|
"allOf": [
|
package/dist/index.cjs
CHANGED
|
@@ -181,6 +181,42 @@ const FileApi = {
|
|
|
181
181
|
}).strict()
|
|
182
182
|
};
|
|
183
183
|
/**
|
|
184
|
+
* Audio player with a custom transport (play/pause, skip, seek line, volume)
|
|
185
|
+
* wrapping a native `<audio>` element.
|
|
186
|
+
*/
|
|
187
|
+
const AudioApi = {
|
|
188
|
+
name: "Audio",
|
|
189
|
+
schema: zod.z.object({
|
|
190
|
+
...CommonProps,
|
|
191
|
+
src: zod.z.string().describe("The source URL of the audio to play."),
|
|
192
|
+
title: zod.z.string().describe("Display title of the track. Falls back to the src filename when omitted.").optional(),
|
|
193
|
+
artist: zod.z.string().describe("Artist or author name shown beneath the title.").optional(),
|
|
194
|
+
seekStep: zod.z.number().describe("Number of seconds the skip-back/skip-forward controls jump. Defaults to 10.").optional(),
|
|
195
|
+
loop: zod.z.boolean().describe("When true, the audio restarts when it reaches the end.").optional(),
|
|
196
|
+
autoPlay: zod.z.boolean().describe("When true, playback starts automatically once enough data has loaded (subject to the browser's autoplay policy).").optional()
|
|
197
|
+
}).strict()
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Video player wrapping a native `<video>` element with an optional poster
|
|
201
|
+
* frame and caption.
|
|
202
|
+
*/
|
|
203
|
+
const VideoApi = {
|
|
204
|
+
name: "Video",
|
|
205
|
+
schema: zod.z.object({
|
|
206
|
+
...CommonProps,
|
|
207
|
+
src: zod.z.string().describe("The source URL of the video to play."),
|
|
208
|
+
title: zod.z.string().describe("Display title of the video. Falls back to the src filename when omitted.").optional(),
|
|
209
|
+
poster: zod.z.string().describe("URL of an image shown before the video begins playing.").optional(),
|
|
210
|
+
width: zod.z.number().describe("Intrinsic video width in pixels.").optional(),
|
|
211
|
+
height: zod.z.number().describe("Intrinsic video height in pixels.").optional(),
|
|
212
|
+
seekStep: zod.z.number().describe("Number of seconds the skip-back/skip-forward controls jump. Defaults to 10.").optional(),
|
|
213
|
+
loop: zod.z.boolean().describe("When true, the video restarts when it reaches the end.").optional(),
|
|
214
|
+
autoPlay: zod.z.boolean().describe("When true, playback starts automatically once enough data has loaded (subject to the browser's autoplay policy).").optional(),
|
|
215
|
+
muted: zod.z.boolean().describe("When true, the video starts muted.").optional(),
|
|
216
|
+
caption: zod.z.string().describe("Optional caption shown below the video.").optional()
|
|
217
|
+
}).strict()
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
184
220
|
* Block-level image with optional caption and modal zoom.
|
|
185
221
|
* Uses `src` (not `url`) to distinguish it from the basic catalog Image.
|
|
186
222
|
*/
|
|
@@ -590,6 +626,8 @@ const BLOCK_CATALOG_COMPONENTS = [
|
|
|
590
626
|
ToggleApi,
|
|
591
627
|
BookmarkApi,
|
|
592
628
|
FileApi,
|
|
629
|
+
AudioApi,
|
|
630
|
+
VideoApi,
|
|
593
631
|
BlockImageApi,
|
|
594
632
|
CodeBlockApi,
|
|
595
633
|
KatexApi,
|
|
@@ -1253,6 +1291,7 @@ const normalizeLanguage = (language) => ALIAS_TO_LANGUAGE.get(language) ?? "file
|
|
|
1253
1291
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
1254
1292
|
const languageIcons = Object.fromEntries(LANGUAGE_REGISTRY.flatMap((e) => e.icon ? [[e.key, e.icon]] : []));
|
|
1255
1293
|
//#endregion
|
|
1294
|
+
exports.AudioApi = AudioApi;
|
|
1256
1295
|
exports.BLOCK_CATALOG_ID = BLOCK_CATALOG_ID;
|
|
1257
1296
|
exports.BlockImageApi = BlockImageApi;
|
|
1258
1297
|
exports.BlockQuoteApi = BlockQuoteApi;
|
|
@@ -1281,6 +1320,7 @@ exports.TableCellApi = TableCellApi;
|
|
|
1281
1320
|
exports.TableRowApi = TableRowApi;
|
|
1282
1321
|
exports.ToggleApi = ToggleApi;
|
|
1283
1322
|
exports.UnsupportedApi = UnsupportedApi;
|
|
1323
|
+
exports.VideoApi = VideoApi;
|
|
1284
1324
|
exports.assembleCatalog = assembleCatalog;
|
|
1285
1325
|
exports.blockCatalogJson = blockCatalogJson;
|
|
1286
1326
|
exports.languageIcons = languageIcons;
|
package/dist/index.d.cts
CHANGED
|
@@ -1960,6 +1960,286 @@ declare const FileApi: {
|
|
|
1960
1960
|
name?: string | undefined;
|
|
1961
1961
|
}>;
|
|
1962
1962
|
};
|
|
1963
|
+
/**
|
|
1964
|
+
* Audio player with a custom transport (play/pause, skip, seek line, volume)
|
|
1965
|
+
* wrapping a native `<audio>` element.
|
|
1966
|
+
*/
|
|
1967
|
+
declare const AudioApi: {
|
|
1968
|
+
name: string;
|
|
1969
|
+
schema: z.ZodObject<{
|
|
1970
|
+
src: z.ZodString;
|
|
1971
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
artist: z.ZodOptional<z.ZodString>;
|
|
1973
|
+
seekStep: z.ZodOptional<z.ZodNumber>;
|
|
1974
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
1975
|
+
autoPlay: z.ZodOptional<z.ZodBoolean>;
|
|
1976
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
1977
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1978
|
+
path: z.ZodString;
|
|
1979
|
+
}, "strip", z.ZodTypeAny, {
|
|
1980
|
+
path: string;
|
|
1981
|
+
}, {
|
|
1982
|
+
path: string;
|
|
1983
|
+
}>, z.ZodObject<{
|
|
1984
|
+
call: z.ZodString;
|
|
1985
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1986
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
1987
|
+
}, "strip", z.ZodTypeAny, {
|
|
1988
|
+
call: string;
|
|
1989
|
+
args: Record<string, any>;
|
|
1990
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1991
|
+
}, {
|
|
1992
|
+
call: string;
|
|
1993
|
+
args: Record<string, any>;
|
|
1994
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1995
|
+
}>]>>;
|
|
1996
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1997
|
+
path: z.ZodString;
|
|
1998
|
+
}, "strip", z.ZodTypeAny, {
|
|
1999
|
+
path: string;
|
|
2000
|
+
}, {
|
|
2001
|
+
path: string;
|
|
2002
|
+
}>, z.ZodObject<{
|
|
2003
|
+
call: z.ZodString;
|
|
2004
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2005
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2006
|
+
}, "strip", z.ZodTypeAny, {
|
|
2007
|
+
call: string;
|
|
2008
|
+
args: Record<string, any>;
|
|
2009
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2010
|
+
}, {
|
|
2011
|
+
call: string;
|
|
2012
|
+
args: Record<string, any>;
|
|
2013
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2014
|
+
}>]>>;
|
|
2015
|
+
}, "strip", z.ZodTypeAny, {
|
|
2016
|
+
description?: string | {
|
|
2017
|
+
path: string;
|
|
2018
|
+
} | {
|
|
2019
|
+
call: string;
|
|
2020
|
+
args: Record<string, any>;
|
|
2021
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2022
|
+
} | undefined;
|
|
2023
|
+
label?: string | {
|
|
2024
|
+
path: string;
|
|
2025
|
+
} | {
|
|
2026
|
+
call: string;
|
|
2027
|
+
args: Record<string, any>;
|
|
2028
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2029
|
+
} | undefined;
|
|
2030
|
+
}, {
|
|
2031
|
+
description?: string | {
|
|
2032
|
+
path: string;
|
|
2033
|
+
} | {
|
|
2034
|
+
call: string;
|
|
2035
|
+
args: Record<string, any>;
|
|
2036
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2037
|
+
} | undefined;
|
|
2038
|
+
label?: string | {
|
|
2039
|
+
path: string;
|
|
2040
|
+
} | {
|
|
2041
|
+
call: string;
|
|
2042
|
+
args: Record<string, any>;
|
|
2043
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2044
|
+
} | undefined;
|
|
2045
|
+
}>>;
|
|
2046
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2047
|
+
}, "strict", z.ZodTypeAny, {
|
|
2048
|
+
src: string;
|
|
2049
|
+
accessibility?: {
|
|
2050
|
+
description?: string | {
|
|
2051
|
+
path: string;
|
|
2052
|
+
} | {
|
|
2053
|
+
call: string;
|
|
2054
|
+
args: Record<string, any>;
|
|
2055
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2056
|
+
} | undefined;
|
|
2057
|
+
label?: string | {
|
|
2058
|
+
path: string;
|
|
2059
|
+
} | {
|
|
2060
|
+
call: string;
|
|
2061
|
+
args: Record<string, any>;
|
|
2062
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2063
|
+
} | undefined;
|
|
2064
|
+
} | undefined;
|
|
2065
|
+
weight?: number | undefined;
|
|
2066
|
+
title?: string | undefined;
|
|
2067
|
+
artist?: string | undefined;
|
|
2068
|
+
seekStep?: number | undefined;
|
|
2069
|
+
loop?: boolean | undefined;
|
|
2070
|
+
autoPlay?: boolean | undefined;
|
|
2071
|
+
}, {
|
|
2072
|
+
src: string;
|
|
2073
|
+
accessibility?: {
|
|
2074
|
+
description?: string | {
|
|
2075
|
+
path: string;
|
|
2076
|
+
} | {
|
|
2077
|
+
call: string;
|
|
2078
|
+
args: Record<string, any>;
|
|
2079
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2080
|
+
} | undefined;
|
|
2081
|
+
label?: string | {
|
|
2082
|
+
path: string;
|
|
2083
|
+
} | {
|
|
2084
|
+
call: string;
|
|
2085
|
+
args: Record<string, any>;
|
|
2086
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2087
|
+
} | undefined;
|
|
2088
|
+
} | undefined;
|
|
2089
|
+
weight?: number | undefined;
|
|
2090
|
+
title?: string | undefined;
|
|
2091
|
+
artist?: string | undefined;
|
|
2092
|
+
seekStep?: number | undefined;
|
|
2093
|
+
loop?: boolean | undefined;
|
|
2094
|
+
autoPlay?: boolean | undefined;
|
|
2095
|
+
}>;
|
|
2096
|
+
};
|
|
2097
|
+
/**
|
|
2098
|
+
* Video player wrapping a native `<video>` element with an optional poster
|
|
2099
|
+
* frame and caption.
|
|
2100
|
+
*/
|
|
2101
|
+
declare const VideoApi: {
|
|
2102
|
+
name: string;
|
|
2103
|
+
schema: z.ZodObject<{
|
|
2104
|
+
src: z.ZodString;
|
|
2105
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2106
|
+
poster: z.ZodOptional<z.ZodString>;
|
|
2107
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2108
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
2109
|
+
seekStep: z.ZodOptional<z.ZodNumber>;
|
|
2110
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
2111
|
+
autoPlay: z.ZodOptional<z.ZodBoolean>;
|
|
2112
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
|
2113
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
2114
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
2115
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2116
|
+
path: z.ZodString;
|
|
2117
|
+
}, "strip", z.ZodTypeAny, {
|
|
2118
|
+
path: string;
|
|
2119
|
+
}, {
|
|
2120
|
+
path: string;
|
|
2121
|
+
}>, z.ZodObject<{
|
|
2122
|
+
call: z.ZodString;
|
|
2123
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2124
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2125
|
+
}, "strip", z.ZodTypeAny, {
|
|
2126
|
+
call: string;
|
|
2127
|
+
args: Record<string, any>;
|
|
2128
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2129
|
+
}, {
|
|
2130
|
+
call: string;
|
|
2131
|
+
args: Record<string, any>;
|
|
2132
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2133
|
+
}>]>>;
|
|
2134
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2135
|
+
path: z.ZodString;
|
|
2136
|
+
}, "strip", z.ZodTypeAny, {
|
|
2137
|
+
path: string;
|
|
2138
|
+
}, {
|
|
2139
|
+
path: string;
|
|
2140
|
+
}>, z.ZodObject<{
|
|
2141
|
+
call: z.ZodString;
|
|
2142
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2143
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2144
|
+
}, "strip", z.ZodTypeAny, {
|
|
2145
|
+
call: string;
|
|
2146
|
+
args: Record<string, any>;
|
|
2147
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2148
|
+
}, {
|
|
2149
|
+
call: string;
|
|
2150
|
+
args: Record<string, any>;
|
|
2151
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2152
|
+
}>]>>;
|
|
2153
|
+
}, "strip", z.ZodTypeAny, {
|
|
2154
|
+
description?: string | {
|
|
2155
|
+
path: string;
|
|
2156
|
+
} | {
|
|
2157
|
+
call: string;
|
|
2158
|
+
args: Record<string, any>;
|
|
2159
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2160
|
+
} | undefined;
|
|
2161
|
+
label?: string | {
|
|
2162
|
+
path: string;
|
|
2163
|
+
} | {
|
|
2164
|
+
call: string;
|
|
2165
|
+
args: Record<string, any>;
|
|
2166
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2167
|
+
} | undefined;
|
|
2168
|
+
}, {
|
|
2169
|
+
description?: string | {
|
|
2170
|
+
path: string;
|
|
2171
|
+
} | {
|
|
2172
|
+
call: string;
|
|
2173
|
+
args: Record<string, any>;
|
|
2174
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2175
|
+
} | undefined;
|
|
2176
|
+
label?: string | {
|
|
2177
|
+
path: string;
|
|
2178
|
+
} | {
|
|
2179
|
+
call: string;
|
|
2180
|
+
args: Record<string, any>;
|
|
2181
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2182
|
+
} | undefined;
|
|
2183
|
+
}>>;
|
|
2184
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2185
|
+
}, "strict", z.ZodTypeAny, {
|
|
2186
|
+
src: string;
|
|
2187
|
+
accessibility?: {
|
|
2188
|
+
description?: string | {
|
|
2189
|
+
path: string;
|
|
2190
|
+
} | {
|
|
2191
|
+
call: string;
|
|
2192
|
+
args: Record<string, any>;
|
|
2193
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2194
|
+
} | undefined;
|
|
2195
|
+
label?: string | {
|
|
2196
|
+
path: string;
|
|
2197
|
+
} | {
|
|
2198
|
+
call: string;
|
|
2199
|
+
args: Record<string, any>;
|
|
2200
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2201
|
+
} | undefined;
|
|
2202
|
+
} | undefined;
|
|
2203
|
+
weight?: number | undefined;
|
|
2204
|
+
title?: string | undefined;
|
|
2205
|
+
seekStep?: number | undefined;
|
|
2206
|
+
loop?: boolean | undefined;
|
|
2207
|
+
autoPlay?: boolean | undefined;
|
|
2208
|
+
poster?: string | undefined;
|
|
2209
|
+
width?: number | undefined;
|
|
2210
|
+
height?: number | undefined;
|
|
2211
|
+
muted?: boolean | undefined;
|
|
2212
|
+
caption?: string | undefined;
|
|
2213
|
+
}, {
|
|
2214
|
+
src: string;
|
|
2215
|
+
accessibility?: {
|
|
2216
|
+
description?: string | {
|
|
2217
|
+
path: string;
|
|
2218
|
+
} | {
|
|
2219
|
+
call: string;
|
|
2220
|
+
args: Record<string, any>;
|
|
2221
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2222
|
+
} | undefined;
|
|
2223
|
+
label?: string | {
|
|
2224
|
+
path: string;
|
|
2225
|
+
} | {
|
|
2226
|
+
call: string;
|
|
2227
|
+
args: Record<string, any>;
|
|
2228
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2229
|
+
} | undefined;
|
|
2230
|
+
} | undefined;
|
|
2231
|
+
weight?: number | undefined;
|
|
2232
|
+
title?: string | undefined;
|
|
2233
|
+
seekStep?: number | undefined;
|
|
2234
|
+
loop?: boolean | undefined;
|
|
2235
|
+
autoPlay?: boolean | undefined;
|
|
2236
|
+
poster?: string | undefined;
|
|
2237
|
+
width?: number | undefined;
|
|
2238
|
+
height?: number | undefined;
|
|
2239
|
+
muted?: boolean | undefined;
|
|
2240
|
+
caption?: string | undefined;
|
|
2241
|
+
}>;
|
|
2242
|
+
};
|
|
1963
2243
|
/**
|
|
1964
2244
|
* Block-level image with optional caption and modal zoom.
|
|
1965
2245
|
* Uses `src` (not `url`) to distinguish it from the basic catalog Image.
|
|
@@ -2067,9 +2347,9 @@ declare const BlockImageApi: {
|
|
|
2067
2347
|
alt?: string | undefined;
|
|
2068
2348
|
width?: number | undefined;
|
|
2069
2349
|
height?: number | undefined;
|
|
2350
|
+
caption?: string | undefined;
|
|
2070
2351
|
srcset?: string | undefined;
|
|
2071
2352
|
sizes?: string | undefined;
|
|
2072
|
-
caption?: string | undefined;
|
|
2073
2353
|
}, {
|
|
2074
2354
|
src: string;
|
|
2075
2355
|
accessibility?: {
|
|
@@ -2092,9 +2372,9 @@ declare const BlockImageApi: {
|
|
|
2092
2372
|
alt?: string | undefined;
|
|
2093
2373
|
width?: number | undefined;
|
|
2094
2374
|
height?: number | undefined;
|
|
2375
|
+
caption?: string | undefined;
|
|
2095
2376
|
srcset?: string | undefined;
|
|
2096
2377
|
sizes?: string | undefined;
|
|
2097
|
-
caption?: string | undefined;
|
|
2098
2378
|
}>;
|
|
2099
2379
|
};
|
|
2100
2380
|
declare const CodeBlockApi: {
|
|
@@ -3361,4 +3641,4 @@ declare const normalizeLanguage: (language: string) => Language;
|
|
|
3361
3641
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
3362
3642
|
declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
|
|
3363
3643
|
//#endregion
|
|
3364
|
-
export { type AssembledCatalog, 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, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1960,6 +1960,286 @@ declare const FileApi: {
|
|
|
1960
1960
|
name?: string | undefined;
|
|
1961
1961
|
}>;
|
|
1962
1962
|
};
|
|
1963
|
+
/**
|
|
1964
|
+
* Audio player with a custom transport (play/pause, skip, seek line, volume)
|
|
1965
|
+
* wrapping a native `<audio>` element.
|
|
1966
|
+
*/
|
|
1967
|
+
declare const AudioApi: {
|
|
1968
|
+
name: string;
|
|
1969
|
+
schema: z.ZodObject<{
|
|
1970
|
+
src: z.ZodString;
|
|
1971
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
artist: z.ZodOptional<z.ZodString>;
|
|
1973
|
+
seekStep: z.ZodOptional<z.ZodNumber>;
|
|
1974
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
1975
|
+
autoPlay: z.ZodOptional<z.ZodBoolean>;
|
|
1976
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
1977
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1978
|
+
path: z.ZodString;
|
|
1979
|
+
}, "strip", z.ZodTypeAny, {
|
|
1980
|
+
path: string;
|
|
1981
|
+
}, {
|
|
1982
|
+
path: string;
|
|
1983
|
+
}>, z.ZodObject<{
|
|
1984
|
+
call: z.ZodString;
|
|
1985
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1986
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
1987
|
+
}, "strip", z.ZodTypeAny, {
|
|
1988
|
+
call: string;
|
|
1989
|
+
args: Record<string, any>;
|
|
1990
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
1991
|
+
}, {
|
|
1992
|
+
call: string;
|
|
1993
|
+
args: Record<string, any>;
|
|
1994
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
1995
|
+
}>]>>;
|
|
1996
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1997
|
+
path: z.ZodString;
|
|
1998
|
+
}, "strip", z.ZodTypeAny, {
|
|
1999
|
+
path: string;
|
|
2000
|
+
}, {
|
|
2001
|
+
path: string;
|
|
2002
|
+
}>, z.ZodObject<{
|
|
2003
|
+
call: z.ZodString;
|
|
2004
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2005
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2006
|
+
}, "strip", z.ZodTypeAny, {
|
|
2007
|
+
call: string;
|
|
2008
|
+
args: Record<string, any>;
|
|
2009
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2010
|
+
}, {
|
|
2011
|
+
call: string;
|
|
2012
|
+
args: Record<string, any>;
|
|
2013
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2014
|
+
}>]>>;
|
|
2015
|
+
}, "strip", z.ZodTypeAny, {
|
|
2016
|
+
description?: string | {
|
|
2017
|
+
path: string;
|
|
2018
|
+
} | {
|
|
2019
|
+
call: string;
|
|
2020
|
+
args: Record<string, any>;
|
|
2021
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2022
|
+
} | undefined;
|
|
2023
|
+
label?: string | {
|
|
2024
|
+
path: string;
|
|
2025
|
+
} | {
|
|
2026
|
+
call: string;
|
|
2027
|
+
args: Record<string, any>;
|
|
2028
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2029
|
+
} | undefined;
|
|
2030
|
+
}, {
|
|
2031
|
+
description?: string | {
|
|
2032
|
+
path: string;
|
|
2033
|
+
} | {
|
|
2034
|
+
call: string;
|
|
2035
|
+
args: Record<string, any>;
|
|
2036
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2037
|
+
} | undefined;
|
|
2038
|
+
label?: string | {
|
|
2039
|
+
path: string;
|
|
2040
|
+
} | {
|
|
2041
|
+
call: string;
|
|
2042
|
+
args: Record<string, any>;
|
|
2043
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2044
|
+
} | undefined;
|
|
2045
|
+
}>>;
|
|
2046
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2047
|
+
}, "strict", z.ZodTypeAny, {
|
|
2048
|
+
src: string;
|
|
2049
|
+
accessibility?: {
|
|
2050
|
+
description?: string | {
|
|
2051
|
+
path: string;
|
|
2052
|
+
} | {
|
|
2053
|
+
call: string;
|
|
2054
|
+
args: Record<string, any>;
|
|
2055
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2056
|
+
} | undefined;
|
|
2057
|
+
label?: string | {
|
|
2058
|
+
path: string;
|
|
2059
|
+
} | {
|
|
2060
|
+
call: string;
|
|
2061
|
+
args: Record<string, any>;
|
|
2062
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2063
|
+
} | undefined;
|
|
2064
|
+
} | undefined;
|
|
2065
|
+
weight?: number | undefined;
|
|
2066
|
+
title?: string | undefined;
|
|
2067
|
+
artist?: string | undefined;
|
|
2068
|
+
seekStep?: number | undefined;
|
|
2069
|
+
loop?: boolean | undefined;
|
|
2070
|
+
autoPlay?: boolean | undefined;
|
|
2071
|
+
}, {
|
|
2072
|
+
src: string;
|
|
2073
|
+
accessibility?: {
|
|
2074
|
+
description?: string | {
|
|
2075
|
+
path: string;
|
|
2076
|
+
} | {
|
|
2077
|
+
call: string;
|
|
2078
|
+
args: Record<string, any>;
|
|
2079
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2080
|
+
} | undefined;
|
|
2081
|
+
label?: string | {
|
|
2082
|
+
path: string;
|
|
2083
|
+
} | {
|
|
2084
|
+
call: string;
|
|
2085
|
+
args: Record<string, any>;
|
|
2086
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2087
|
+
} | undefined;
|
|
2088
|
+
} | undefined;
|
|
2089
|
+
weight?: number | undefined;
|
|
2090
|
+
title?: string | undefined;
|
|
2091
|
+
artist?: string | undefined;
|
|
2092
|
+
seekStep?: number | undefined;
|
|
2093
|
+
loop?: boolean | undefined;
|
|
2094
|
+
autoPlay?: boolean | undefined;
|
|
2095
|
+
}>;
|
|
2096
|
+
};
|
|
2097
|
+
/**
|
|
2098
|
+
* Video player wrapping a native `<video>` element with an optional poster
|
|
2099
|
+
* frame and caption.
|
|
2100
|
+
*/
|
|
2101
|
+
declare const VideoApi: {
|
|
2102
|
+
name: string;
|
|
2103
|
+
schema: z.ZodObject<{
|
|
2104
|
+
src: z.ZodString;
|
|
2105
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2106
|
+
poster: z.ZodOptional<z.ZodString>;
|
|
2107
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2108
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
2109
|
+
seekStep: z.ZodOptional<z.ZodNumber>;
|
|
2110
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
2111
|
+
autoPlay: z.ZodOptional<z.ZodBoolean>;
|
|
2112
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
|
2113
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
2114
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
2115
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2116
|
+
path: z.ZodString;
|
|
2117
|
+
}, "strip", z.ZodTypeAny, {
|
|
2118
|
+
path: string;
|
|
2119
|
+
}, {
|
|
2120
|
+
path: string;
|
|
2121
|
+
}>, z.ZodObject<{
|
|
2122
|
+
call: z.ZodString;
|
|
2123
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2124
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2125
|
+
}, "strip", z.ZodTypeAny, {
|
|
2126
|
+
call: string;
|
|
2127
|
+
args: Record<string, any>;
|
|
2128
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2129
|
+
}, {
|
|
2130
|
+
call: string;
|
|
2131
|
+
args: Record<string, any>;
|
|
2132
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2133
|
+
}>]>>;
|
|
2134
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2135
|
+
path: z.ZodString;
|
|
2136
|
+
}, "strip", z.ZodTypeAny, {
|
|
2137
|
+
path: string;
|
|
2138
|
+
}, {
|
|
2139
|
+
path: string;
|
|
2140
|
+
}>, z.ZodObject<{
|
|
2141
|
+
call: z.ZodString;
|
|
2142
|
+
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2143
|
+
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
2144
|
+
}, "strip", z.ZodTypeAny, {
|
|
2145
|
+
call: string;
|
|
2146
|
+
args: Record<string, any>;
|
|
2147
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2148
|
+
}, {
|
|
2149
|
+
call: string;
|
|
2150
|
+
args: Record<string, any>;
|
|
2151
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2152
|
+
}>]>>;
|
|
2153
|
+
}, "strip", z.ZodTypeAny, {
|
|
2154
|
+
description?: string | {
|
|
2155
|
+
path: string;
|
|
2156
|
+
} | {
|
|
2157
|
+
call: string;
|
|
2158
|
+
args: Record<string, any>;
|
|
2159
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2160
|
+
} | undefined;
|
|
2161
|
+
label?: string | {
|
|
2162
|
+
path: string;
|
|
2163
|
+
} | {
|
|
2164
|
+
call: string;
|
|
2165
|
+
args: Record<string, any>;
|
|
2166
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2167
|
+
} | undefined;
|
|
2168
|
+
}, {
|
|
2169
|
+
description?: string | {
|
|
2170
|
+
path: string;
|
|
2171
|
+
} | {
|
|
2172
|
+
call: string;
|
|
2173
|
+
args: Record<string, any>;
|
|
2174
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2175
|
+
} | undefined;
|
|
2176
|
+
label?: string | {
|
|
2177
|
+
path: string;
|
|
2178
|
+
} | {
|
|
2179
|
+
call: string;
|
|
2180
|
+
args: Record<string, any>;
|
|
2181
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2182
|
+
} | undefined;
|
|
2183
|
+
}>>;
|
|
2184
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2185
|
+
}, "strict", z.ZodTypeAny, {
|
|
2186
|
+
src: string;
|
|
2187
|
+
accessibility?: {
|
|
2188
|
+
description?: string | {
|
|
2189
|
+
path: string;
|
|
2190
|
+
} | {
|
|
2191
|
+
call: string;
|
|
2192
|
+
args: Record<string, any>;
|
|
2193
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2194
|
+
} | undefined;
|
|
2195
|
+
label?: string | {
|
|
2196
|
+
path: string;
|
|
2197
|
+
} | {
|
|
2198
|
+
call: string;
|
|
2199
|
+
args: Record<string, any>;
|
|
2200
|
+
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
2201
|
+
} | undefined;
|
|
2202
|
+
} | undefined;
|
|
2203
|
+
weight?: number | undefined;
|
|
2204
|
+
title?: string | undefined;
|
|
2205
|
+
seekStep?: number | undefined;
|
|
2206
|
+
loop?: boolean | undefined;
|
|
2207
|
+
autoPlay?: boolean | undefined;
|
|
2208
|
+
poster?: string | undefined;
|
|
2209
|
+
width?: number | undefined;
|
|
2210
|
+
height?: number | undefined;
|
|
2211
|
+
muted?: boolean | undefined;
|
|
2212
|
+
caption?: string | undefined;
|
|
2213
|
+
}, {
|
|
2214
|
+
src: string;
|
|
2215
|
+
accessibility?: {
|
|
2216
|
+
description?: string | {
|
|
2217
|
+
path: string;
|
|
2218
|
+
} | {
|
|
2219
|
+
call: string;
|
|
2220
|
+
args: Record<string, any>;
|
|
2221
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2222
|
+
} | undefined;
|
|
2223
|
+
label?: string | {
|
|
2224
|
+
path: string;
|
|
2225
|
+
} | {
|
|
2226
|
+
call: string;
|
|
2227
|
+
args: Record<string, any>;
|
|
2228
|
+
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
2229
|
+
} | undefined;
|
|
2230
|
+
} | undefined;
|
|
2231
|
+
weight?: number | undefined;
|
|
2232
|
+
title?: string | undefined;
|
|
2233
|
+
seekStep?: number | undefined;
|
|
2234
|
+
loop?: boolean | undefined;
|
|
2235
|
+
autoPlay?: boolean | undefined;
|
|
2236
|
+
poster?: string | undefined;
|
|
2237
|
+
width?: number | undefined;
|
|
2238
|
+
height?: number | undefined;
|
|
2239
|
+
muted?: boolean | undefined;
|
|
2240
|
+
caption?: string | undefined;
|
|
2241
|
+
}>;
|
|
2242
|
+
};
|
|
1963
2243
|
/**
|
|
1964
2244
|
* Block-level image with optional caption and modal zoom.
|
|
1965
2245
|
* Uses `src` (not `url`) to distinguish it from the basic catalog Image.
|
|
@@ -2067,9 +2347,9 @@ declare const BlockImageApi: {
|
|
|
2067
2347
|
alt?: string | undefined;
|
|
2068
2348
|
width?: number | undefined;
|
|
2069
2349
|
height?: number | undefined;
|
|
2350
|
+
caption?: string | undefined;
|
|
2070
2351
|
srcset?: string | undefined;
|
|
2071
2352
|
sizes?: string | undefined;
|
|
2072
|
-
caption?: string | undefined;
|
|
2073
2353
|
}, {
|
|
2074
2354
|
src: string;
|
|
2075
2355
|
accessibility?: {
|
|
@@ -2092,9 +2372,9 @@ declare const BlockImageApi: {
|
|
|
2092
2372
|
alt?: string | undefined;
|
|
2093
2373
|
width?: number | undefined;
|
|
2094
2374
|
height?: number | undefined;
|
|
2375
|
+
caption?: string | undefined;
|
|
2095
2376
|
srcset?: string | undefined;
|
|
2096
2377
|
sizes?: string | undefined;
|
|
2097
|
-
caption?: string | undefined;
|
|
2098
2378
|
}>;
|
|
2099
2379
|
};
|
|
2100
2380
|
declare const CodeBlockApi: {
|
|
@@ -3361,4 +3641,4 @@ declare const normalizeLanguage: (language: string) => Language;
|
|
|
3361
3641
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
3362
3642
|
declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
|
|
3363
3643
|
//#endregion
|
|
3364
|
-
export { type AssembledCatalog, 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, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -180,6 +180,42 @@ const FileApi = {
|
|
|
180
180
|
}).strict()
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
183
|
+
* Audio player with a custom transport (play/pause, skip, seek line, volume)
|
|
184
|
+
* wrapping a native `<audio>` element.
|
|
185
|
+
*/
|
|
186
|
+
const AudioApi = {
|
|
187
|
+
name: "Audio",
|
|
188
|
+
schema: z.object({
|
|
189
|
+
...CommonProps,
|
|
190
|
+
src: z.string().describe("The source URL of the audio to play."),
|
|
191
|
+
title: z.string().describe("Display title of the track. Falls back to the src filename when omitted.").optional(),
|
|
192
|
+
artist: z.string().describe("Artist or author name shown beneath the title.").optional(),
|
|
193
|
+
seekStep: z.number().describe("Number of seconds the skip-back/skip-forward controls jump. Defaults to 10.").optional(),
|
|
194
|
+
loop: z.boolean().describe("When true, the audio restarts when it reaches the end.").optional(),
|
|
195
|
+
autoPlay: z.boolean().describe("When true, playback starts automatically once enough data has loaded (subject to the browser's autoplay policy).").optional()
|
|
196
|
+
}).strict()
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Video player wrapping a native `<video>` element with an optional poster
|
|
200
|
+
* frame and caption.
|
|
201
|
+
*/
|
|
202
|
+
const VideoApi = {
|
|
203
|
+
name: "Video",
|
|
204
|
+
schema: z.object({
|
|
205
|
+
...CommonProps,
|
|
206
|
+
src: z.string().describe("The source URL of the video to play."),
|
|
207
|
+
title: z.string().describe("Display title of the video. Falls back to the src filename when omitted.").optional(),
|
|
208
|
+
poster: z.string().describe("URL of an image shown before the video begins playing.").optional(),
|
|
209
|
+
width: z.number().describe("Intrinsic video width in pixels.").optional(),
|
|
210
|
+
height: z.number().describe("Intrinsic video height in pixels.").optional(),
|
|
211
|
+
seekStep: z.number().describe("Number of seconds the skip-back/skip-forward controls jump. Defaults to 10.").optional(),
|
|
212
|
+
loop: z.boolean().describe("When true, the video restarts when it reaches the end.").optional(),
|
|
213
|
+
autoPlay: z.boolean().describe("When true, playback starts automatically once enough data has loaded (subject to the browser's autoplay policy).").optional(),
|
|
214
|
+
muted: z.boolean().describe("When true, the video starts muted.").optional(),
|
|
215
|
+
caption: z.string().describe("Optional caption shown below the video.").optional()
|
|
216
|
+
}).strict()
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
183
219
|
* Block-level image with optional caption and modal zoom.
|
|
184
220
|
* Uses `src` (not `url`) to distinguish it from the basic catalog Image.
|
|
185
221
|
*/
|
|
@@ -593,6 +629,8 @@ const blockCatalogJson = assembleCatalog({
|
|
|
593
629
|
ToggleApi,
|
|
594
630
|
BookmarkApi,
|
|
595
631
|
FileApi,
|
|
632
|
+
AudioApi,
|
|
633
|
+
VideoApi,
|
|
596
634
|
BlockImageApi,
|
|
597
635
|
CodeBlockApi,
|
|
598
636
|
KatexApi,
|
|
@@ -1251,4 +1289,4 @@ const normalizeLanguage = (language) => ALIAS_TO_LANGUAGE.get(language) ?? "file
|
|
|
1251
1289
|
/** The authored glyph artwork for every {@link GlyphLanguage}. */
|
|
1252
1290
|
const languageIcons = Object.fromEntries(LANGUAGE_REGISTRY.flatMap((e) => e.icon ? [[e.key, e.icon]] : []));
|
|
1253
1291
|
//#endregion
|
|
1254
|
-
export { 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, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
|
|
1292
|
+
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 };
|