@prismicio/types-internal 4.0.0-pr.6.c2b7195 → 4.0.0-pr.6.eb53f11
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/content/legacy/image.d.ts +1 -0
- package/dist/content/legacy/richText.js +1 -1
- package/dist/content/legacy/richText.js.map +1 -1
- package/dist/content/richText.d.ts +47 -1
- package/dist/content/richText.d.ts.map +1 -1
- package/dist/content/richText.js +3 -2
- package/dist/content/richText.js.map +1 -1
- package/dist/helpers/documentContent.d.ts +2 -8
- package/dist/helpers/documentContent.d.ts.map +1 -1
- package/dist/helpers/documentContent.js +3 -3
- package/dist/helpers/documentContent.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/io-ts.d.ts +90 -1
- package/dist/io-ts.d.ts.map +1 -1
- package/dist/io-ts.js +3 -2
- package/dist/io-ts.js.map +1 -1
- package/dist/zod4.d.ts +46 -1
- package/dist/zod4.d.ts.map +1 -1
- package/dist/zod4.js +3 -2
- package/dist/zod4.js.map +1 -1
- package/package.json +1 -1
- package/src/content/legacy/richText.ts +2 -1
- package/src/content/richText.ts +12 -2
- package/src/helpers/documentContent.ts +12 -15
- package/src/index.ts +1 -1
- package/src/io-ts.ts +6 -1
- package/src/zod4.ts +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { z } from "zod/mini";
|
|
@@ -95,6 +95,6 @@ const RichTextLegacyBlockSchema = z.union([
|
|
|
95
95
|
]);
|
|
96
96
|
const RichTextLegacySchema = z.array(RichTextLegacyBlockSchema);
|
|
97
97
|
//#endregion
|
|
98
|
-
export { RichTextLegacyBlockSchema, RichTextLegacySchema, RichTextNodeType, getEmbedBlockSchema, getImageBlockSchema, getTextBlockSchema };
|
|
98
|
+
export { RichTextLegacyBlockSchema, RichTextLegacySchema, RichTextNodeType, getEmbedBlockSchema, getImageBlockSchema, getSpanSchema, getTextBlockSchema };
|
|
99
99
|
|
|
100
100
|
//# sourceMappingURL=richText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richText.js","names":[],"sources":["../../../src/content/legacy/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\n// It's important to only import the types here to\n// avoid runtime circular dependencies!\nimport type { EmbedContentSchema } from \"../embed\"\nimport type { ImageViewContentSchema } from \"../image\"\nimport type { FilledLinkValueContentSchema } from \"../link\"\nimport { EmbedLegacyLooseSchema } from \"./embed\"\nimport { ImageViewLegacySchema } from \"./image\"\nimport { FilledLinkValueLegacySchema } from \"./link\"\n\nexport const RichTextNodeType = {\n\tparagraph: \"paragraph\",\n\theading1: \"heading1\",\n\theading2: \"heading2\",\n\theading3: \"heading3\",\n\theading4: \"heading4\",\n\theading5: \"heading5\",\n\theading6: \"heading6\",\n\tpreformatted: \"preformatted\",\n\toListItem: \"o-list-item\",\n\tlistItem: \"list-item\",\n\timage: \"image\",\n\tembed: \"embed\",\n\thyperlink: \"hyperlink\",\n\tstrong: \"strong\",\n\tem: \"em\",\n} as const\n\n// Spans\nconst getHyperlinkSpanSchema = <\n\tTData extends typeof FilledLinkValueLegacySchema | typeof FilledLinkValueContentSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.hyperlink),\n\t\tstart: z.number(),\n\t\tend: z.number(),\n\t\tdata,\n\t})\n\nconst LabelSpanSchema = z.object({\n\ttype: z.literal(\"label\"),\n\tstart: z.number(),\n\tend: z.number(),\n\tdata: z.pipe(\n\t\tz.unknown(),\n\t\tz.transform((value) => (typeof value === \"string\" && value.length > 0 ? value : \"\")),\n\t),\n})\n\nconst BasicSpanSchema = z.object({\n\ttype: z.union([\n\t\tz.literal(RichTextNodeType.strong),\n\t\tz.literal(RichTextNodeType.em),\n\t\tz.literal(\"list-item\"), // legacy case\n\t]),\n\tstart: z.number(),\n\tend: z.number(),\n})\n\
|
|
1
|
+
{"version":3,"file":"richText.js","names":[],"sources":["../../../src/content/legacy/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\n// It's important to only import the types here to\n// avoid runtime circular dependencies!\nimport type { EmbedContentSchema } from \"../embed\"\nimport type { ImageViewContentSchema } from \"../image\"\nimport type { FilledLinkValueContentSchema } from \"../link\"\nimport { EmbedLegacyLooseSchema } from \"./embed\"\nimport { ImageViewLegacySchema } from \"./image\"\nimport { FilledLinkValueLegacySchema } from \"./link\"\n\nexport const RichTextNodeType = {\n\tparagraph: \"paragraph\",\n\theading1: \"heading1\",\n\theading2: \"heading2\",\n\theading3: \"heading3\",\n\theading4: \"heading4\",\n\theading5: \"heading5\",\n\theading6: \"heading6\",\n\tpreformatted: \"preformatted\",\n\toListItem: \"o-list-item\",\n\tlistItem: \"list-item\",\n\timage: \"image\",\n\tembed: \"embed\",\n\thyperlink: \"hyperlink\",\n\tstrong: \"strong\",\n\tem: \"em\",\n} as const\n\n// Spans\nconst getHyperlinkSpanSchema = <\n\tTData extends typeof FilledLinkValueLegacySchema | typeof FilledLinkValueContentSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.hyperlink),\n\t\tstart: z.number(),\n\t\tend: z.number(),\n\t\tdata,\n\t})\n\nconst LabelSpanSchema = z.object({\n\ttype: z.literal(\"label\"),\n\tstart: z.number(),\n\tend: z.number(),\n\tdata: z.pipe(\n\t\tz.unknown(),\n\t\tz.transform((value) => (typeof value === \"string\" && value.length > 0 ? value : \"\")),\n\t),\n})\n\nconst BasicSpanSchema = z.object({\n\ttype: z.union([\n\t\tz.literal(RichTextNodeType.strong),\n\t\tz.literal(RichTextNodeType.em),\n\t\tz.literal(\"list-item\"), // legacy case\n\t]),\n\tstart: z.number(),\n\tend: z.number(),\n})\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getSpanSchema = <\n\tTLinkSchema extends typeof FilledLinkValueLegacySchema | typeof FilledLinkValueContentSchema,\n>(\n\tlinkSchema: TLinkSchema,\n) => z.union([getHyperlinkSpanSchema(linkSchema), LabelSpanSchema, BasicSpanSchema])\n\n// Text blocks\nconst TextBlockTypeSchema = z.union([\n\tz.literal(RichTextNodeType.paragraph),\n\tz.literal(RichTextNodeType.heading1),\n\tz.literal(RichTextNodeType.heading2),\n\tz.literal(RichTextNodeType.heading3),\n\tz.literal(RichTextNodeType.heading4),\n\tz.literal(RichTextNodeType.heading5),\n\tz.literal(RichTextNodeType.heading6),\n\tz.literal(RichTextNodeType.preformatted),\n\tz.literal(RichTextNodeType.oListItem),\n\tz.literal(RichTextNodeType.listItem),\n])\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getTextBlockSchema = <\n\tTLinkSchema extends typeof FilledLinkValueLegacySchema | typeof FilledLinkValueContentSchema,\n>(\n\tlinkSchema: TLinkSchema,\n) =>\n\tz.object({\n\t\ttype: TextBlockTypeSchema,\n\t\tcontent: z.object({\n\t\t\ttext: z.string(),\n\t\t\tspans: z.optional(\n\t\t\t\tz.pipe(\n\t\t\t\t\tz.array(z.unknown()),\n\t\t\t\t\tz.transform((spans) => {\n\t\t\t\t\t\tconst spanSchema = getSpanSchema(linkSchema)\n\n\t\t\t\t\t\t// Filter out invalid spans and order them by start position\n\t\t\t\t\t\treturn spans\n\t\t\t\t\t\t\t.flatMap((maybeSpan) => {\n\t\t\t\t\t\t\t\tconst parsed = spanSchema.safeParse(maybeSpan)\n\t\t\t\t\t\t\t\treturn parsed.success ? [parsed.data] : []\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.sort((a, b) => a.start - b.start)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t),\n\t\t}),\n\t\tlabel: z.optional(z.string()),\n\t\tdirection: z.optional(z.string()),\n\t})\n\nconst TextBlockLegacySchema = getTextBlockSchema(FilledLinkValueLegacySchema)\n\n// Image block\n\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getImageBlockSchema = <\n\tTData extends typeof ImageViewLegacySchema | typeof ImageViewContentSchema,\n\tTLinkTo extends typeof FilledLinkValueLegacySchema | typeof FilledLinkValueContentSchema,\n>(\n\tdata: TData,\n\tlinkTo: TLinkTo,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.image),\n\t\tdata: z.extend(data, { linkTo: z.nullish(linkTo) }),\n\t\tlabel: z.nullish(z.string()),\n\t\tdirection: z.nullish(z.string()),\n\t})\n\nconst ImageBlockLegacySchema = getImageBlockSchema(\n\tImageViewLegacySchema,\n\tFilledLinkValueLegacySchema,\n)\n\n// Embed block\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const getEmbedBlockSchema = <\n\tTData extends typeof EmbedLegacyLooseSchema | typeof EmbedContentSchema,\n>(\n\tdata: TData,\n) =>\n\tz.object({\n\t\ttype: z.literal(RichTextNodeType.embed),\n\t\tdata,\n\t\tlabel: z.nullish(z.string()),\n\t\tdirection: z.nullish(z.string()),\n\t})\n\nconst EmbedBlockLegacySchema = getEmbedBlockSchema(EmbedLegacyLooseSchema)\n\n// Blocks\nexport const RichTextLegacyBlockSchema = z.union([\n\tTextBlockLegacySchema,\n\tImageBlockLegacySchema,\n\tEmbedBlockLegacySchema,\n])\n\nexport type RichTextLegacyBlock = z.infer<typeof RichTextLegacyBlockSchema>\n\nexport const RichTextLegacySchema = z.array(RichTextLegacyBlockSchema)\n\nexport type RichTextLegacy = z.infer<typeof RichTextLegacySchema>\n"],"mappings":"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"}
|
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
import { z } from "zod/mini";
|
|
2
2
|
|
|
3
3
|
//#region src/content/richText.d.ts
|
|
4
|
+
declare const RichTextContentSpanSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
5
|
+
type: z.ZodMiniLiteral<"hyperlink">;
|
|
6
|
+
start: z.ZodMiniNumber<number>;
|
|
7
|
+
end: z.ZodMiniNumber<number>;
|
|
8
|
+
data: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
9
|
+
kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"image", string>>;
|
|
10
|
+
id: z.ZodMiniString<string>;
|
|
11
|
+
url: z.ZodMiniString<string>;
|
|
12
|
+
height: z.ZodMiniString<string>;
|
|
13
|
+
width: z.ZodMiniString<string>;
|
|
14
|
+
size: z.ZodMiniString<string>;
|
|
15
|
+
name: z.ZodMiniString<string>;
|
|
16
|
+
date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
17
|
+
__TYPE__: z.ZodMiniLiteral<"ImageLink">;
|
|
18
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
19
|
+
kind: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<"file", string>>;
|
|
20
|
+
id: z.ZodMiniString<string>;
|
|
21
|
+
url: z.ZodMiniString<string>;
|
|
22
|
+
name: z.ZodMiniString<string>;
|
|
23
|
+
size: z.ZodMiniTransform<string, unknown>;
|
|
24
|
+
date: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
25
|
+
__TYPE__: z.ZodMiniLiteral<"FileLink">;
|
|
26
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
27
|
+
kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"document">>, z.ZodMiniTransform<"document", "document" | undefined>>;
|
|
28
|
+
id: z.ZodMiniString<string>;
|
|
29
|
+
__TYPE__: z.ZodMiniLiteral<"DocumentLink">;
|
|
30
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
31
|
+
kind: z.ZodMiniPipe<z.ZodMiniOptional<z.ZodMiniLiteral<"web">>, z.ZodMiniTransform<"web", "web" | undefined>>;
|
|
32
|
+
url: z.ZodMiniString<string>;
|
|
33
|
+
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
34
|
+
preview: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
|
|
35
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
36
|
+
}, z.core.$strict>>>;
|
|
37
|
+
__TYPE__: z.ZodMiniLiteral<"ExternalLink">;
|
|
38
|
+
}, z.core.$strict>]>;
|
|
39
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
40
|
+
type: z.ZodMiniLiteral<"label">;
|
|
41
|
+
start: z.ZodMiniNumber<number>;
|
|
42
|
+
end: z.ZodMiniNumber<number>;
|
|
43
|
+
data: z.ZodMiniPipe<z.ZodMiniUnknown, z.ZodMiniTransform<string, unknown>>;
|
|
44
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
45
|
+
type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"strong">, z.ZodMiniLiteral<"em">, z.ZodMiniLiteral<"list-item">]>;
|
|
46
|
+
start: z.ZodMiniNumber<number>;
|
|
47
|
+
end: z.ZodMiniNumber<number>;
|
|
48
|
+
}, z.core.$strip>]>;
|
|
49
|
+
type RichTextContentSpan = z.infer<typeof RichTextContentSpanSchema>;
|
|
4
50
|
declare const RichTextContentBlockSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
5
51
|
type: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"paragraph">, z.ZodMiniLiteral<"heading1">, z.ZodMiniLiteral<"heading2">, z.ZodMiniLiteral<"heading3">, z.ZodMiniLiteral<"heading4">, z.ZodMiniLiteral<"heading5">, z.ZodMiniLiteral<"heading6">, z.ZodMiniLiteral<"preformatted">, z.ZodMiniLiteral<"o-list-item">, z.ZodMiniLiteral<"list-item">]>;
|
|
6
52
|
content: z.ZodMiniObject<{
|
|
@@ -269,5 +315,5 @@ declare const RichTextContentSchema: z.ZodMiniObject<{
|
|
|
269
315
|
}, z.core.$strip>;
|
|
270
316
|
type RichTextContent = z.infer<typeof RichTextContentSchema>;
|
|
271
317
|
//#endregion
|
|
272
|
-
export { RichTextContent, RichTextContentBlock };
|
|
318
|
+
export { RichTextContent, RichTextContentBlock, RichTextContentSpan };
|
|
273
319
|
//# sourceMappingURL=richText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/content/richText.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"richText.d.ts","names":[],"sources":["../../src/content/richText.ts"],"mappings":";;;cAaa,yBAAA,EAAyB,CAAA,CAAA,YAAA,WAAA,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAE1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,cAUpC,0BAAA,EAA0B,CAAA,CAAA,YAAA,WAAA,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAO3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,cAIrC,qBAAA,EAAqB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKtB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA"}
|
package/dist/content/richText.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EmbedContentSchema } from "./embed.js";
|
|
2
2
|
import { ImageViewContentSchema } from "./image.js";
|
|
3
3
|
import { FilledLinkValueContentSchema } from "./link.js";
|
|
4
|
-
import { getEmbedBlockSchema, getImageBlockSchema, getTextBlockSchema } from "./legacy/richText.js";
|
|
4
|
+
import { getEmbedBlockSchema, getImageBlockSchema, getSpanSchema, getTextBlockSchema } from "./legacy/richText.js";
|
|
5
5
|
import { z } from "zod/mini";
|
|
6
6
|
//#region src/content/richText.ts
|
|
7
|
+
const RichTextContentSpanSchema = getSpanSchema(FilledLinkValueContentSchema);
|
|
7
8
|
const TextBlockValueSchema = getTextBlockSchema(FilledLinkValueContentSchema);
|
|
8
9
|
const ImageBlockValueSchema = getImageBlockSchema(ImageViewContentSchema, FilledLinkValueContentSchema);
|
|
9
10
|
const EmbedBlockValueSchema = getEmbedBlockSchema(EmbedContentSchema);
|
|
@@ -18,6 +19,6 @@ const RichTextContentSchema = z.object({
|
|
|
18
19
|
value: z.array(RichTextContentBlockSchema)
|
|
19
20
|
});
|
|
20
21
|
//#endregion
|
|
21
|
-
export { RichTextContentBlockSchema, RichTextContentSchema, RichTextContentType };
|
|
22
|
+
export { RichTextContentBlockSchema, RichTextContentSchema, RichTextContentSpanSchema, RichTextContentType };
|
|
22
23
|
|
|
23
24
|
//# sourceMappingURL=richText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richText.js","names":[],"sources":["../../src/content/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { EmbedContentSchema } from \"./embed\"\nimport { ImageViewContentSchema } from \"./image\"\nimport {
|
|
1
|
+
{"version":3,"file":"richText.js","names":[],"sources":["../../src/content/richText.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { EmbedContentSchema } from \"./embed\"\nimport { ImageViewContentSchema } from \"./image\"\nimport {\n\tgetEmbedBlockSchema,\n\tgetImageBlockSchema,\n\tgetSpanSchema,\n\tgetTextBlockSchema,\n} from \"./legacy/richText\"\nimport { FilledLinkValueContentSchema } from \"./link\"\n\n// Spans\nexport const RichTextContentSpanSchema = getSpanSchema(FilledLinkValueContentSchema)\n\nexport type RichTextContentSpan = z.infer<typeof RichTextContentSpanSchema>\n\n// Blocks\nconst TextBlockValueSchema = getTextBlockSchema(FilledLinkValueContentSchema)\nconst ImageBlockValueSchema = getImageBlockSchema(\n\tImageViewContentSchema,\n\tFilledLinkValueContentSchema,\n)\nconst EmbedBlockValueSchema = getEmbedBlockSchema(EmbedContentSchema)\n\nexport const RichTextContentBlockSchema = z.union([\n\tTextBlockValueSchema,\n\tImageBlockValueSchema,\n\tEmbedBlockValueSchema,\n])\n\n// Used by content/codec/richText\nexport type RichTextContentBlock = z.infer<typeof RichTextContentBlockSchema>\n\nexport const RichTextContentType = \"StructuredTextContent\" as const\n\nexport const RichTextContentSchema = z.object({\n\t__TYPE__: z.literal(RichTextContentType),\n\tvalue: z.array(RichTextContentBlockSchema),\n})\n\nexport type RichTextContent = z.infer<typeof RichTextContentSchema>\n"],"mappings":";;;;;;AAaA,MAAa,4BAA4B,cAAc,6BAA6B;AAKpF,MAAM,uBAAuB,mBAAmB,6BAA6B;AAC7E,MAAM,wBAAwB,oBAC7B,wBACA,6BACA;AACD,MAAM,wBAAwB,oBAAoB,mBAAmB;AAErE,MAAa,6BAA6B,EAAE,MAAM;CACjD;CACA;CACA;CACA,CAAC;AAKF,MAAa,sBAAsB;AAEnC,MAAa,wBAAwB,EAAE,OAAO;CAC7C,UAAU,EAAE,QAAQ,oBAAoB;CACxC,OAAO,EAAE,MAAM,2BAA2B;CAC1C,CAAC"}
|
|
@@ -7,17 +7,11 @@ import { DocumentLegacy } from "../content/legacy/document.js";
|
|
|
7
7
|
declare namespace documentContent_d_exports {
|
|
8
8
|
export { collectWidgets, fromLegacy, toLegacy };
|
|
9
9
|
}
|
|
10
|
-
declare function collectWidgets<TWidgetContent extends WidgetContent>(document: DocumentContent, test: (args: {
|
|
10
|
+
declare function collectWidgets<TWidgetContent extends WidgetContent>(document: DocumentContent, test: (content: WidgetContent, args: {
|
|
11
11
|
path: Path;
|
|
12
12
|
key: string;
|
|
13
13
|
apiID: string;
|
|
14
|
-
|
|
15
|
-
}) => args is {
|
|
16
|
-
path: Path;
|
|
17
|
-
key: string;
|
|
18
|
-
apiID: string;
|
|
19
|
-
content: TWidgetContent;
|
|
20
|
-
}): Record<string, TWidgetContent>;
|
|
14
|
+
}) => content is TWidgetContent): Record<string, TWidgetContent>;
|
|
21
15
|
declare function fromLegacy(legacy: DocumentLegacy): DocumentContent | undefined;
|
|
22
16
|
declare function toLegacy(document: DocumentContent): DocumentLegacy;
|
|
23
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentContent.d.ts","names":[],"sources":["../../src/helpers/documentContent.ts"],"mappings":";;;;;;;;;iBAagB,cAAA,wBAAsC,aAAA,CAAA,CACrD,QAAA,EAAU,eAAA,EACV,IAAA,
|
|
1
|
+
{"version":3,"file":"documentContent.d.ts","names":[],"sources":["../../src/helpers/documentContent.ts"],"mappings":";;;;;;;;;iBAagB,cAAA,wBAAsC,aAAA,CAAA,CACrD,QAAA,EAAU,eAAA,EACV,IAAA,GACC,OAAA,EAAS,aAAA,EACT,IAAA;EACC,IAAA,EAAM,IAAA;EACN,GAAA;EACA,KAAA;AAAA,MAEG,OAAA,IAAW,cAAA,GACd,MAAA,SAAe,cAAA;AAAA,iBAgBF,UAAA,CAAW,MAAA,EAAQ,cAAA,GAAiB,eAAA;AAAA,iBAiCpC,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,cAAA"}
|
|
@@ -14,9 +14,9 @@ var documentContent_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
});
|
|
15
15
|
function collectWidgets(document, test) {
|
|
16
16
|
const collected = {};
|
|
17
|
-
traverseDocumentContent(document, { transformWidget: (args) => {
|
|
18
|
-
if (test(args)) collected[serialize(args.path)] =
|
|
19
|
-
return
|
|
17
|
+
traverseDocumentContent(document, { transformWidget: ({ content, ...args }) => {
|
|
18
|
+
if (test(content, args)) collected[serialize(args.path)] = content;
|
|
19
|
+
return content;
|
|
20
20
|
} });
|
|
21
21
|
return collected;
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentContent.js","names":["contentPath.serialize"],"sources":["../../src/helpers/documentContent.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { DocumentLegacyCodec } from \"../content/codec/document\"\nimport { defaultCtx } from \"../content/codec/legacyContentCtx\"\nimport type { DocumentContent } from \"../content/document\"\nimport type { DocumentLegacy } from \"../content/legacy/document\"\nimport { DocumentLegacySchema } from \"../content/legacy/document\"\nimport type { WidgetContent } from \"../content/widget\"\nimport type { FieldOrSliceType } from \"../model/widget\"\nimport { FieldOrSliceTypeSchema } from \"../model/widget\"\nimport * as contentPath from \"./contentPath\"\nimport { traverseDocumentContent } from \"./traverseContent\"\n\nexport function collectWidgets<TWidgetContent extends WidgetContent>(\n\tdocument: DocumentContent,\n\ttest: (
|
|
1
|
+
{"version":3,"file":"documentContent.js","names":["contentPath.serialize"],"sources":["../../src/helpers/documentContent.ts"],"sourcesContent":["import { z } from \"zod/mini\"\n\nimport { DocumentLegacyCodec } from \"../content/codec/document\"\nimport { defaultCtx } from \"../content/codec/legacyContentCtx\"\nimport type { DocumentContent } from \"../content/document\"\nimport type { DocumentLegacy } from \"../content/legacy/document\"\nimport { DocumentLegacySchema } from \"../content/legacy/document\"\nimport type { WidgetContent } from \"../content/widget\"\nimport type { FieldOrSliceType } from \"../model/widget\"\nimport { FieldOrSliceTypeSchema } from \"../model/widget\"\nimport * as contentPath from \"./contentPath\"\nimport { traverseDocumentContent } from \"./traverseContent\"\n\nexport function collectWidgets<TWidgetContent extends WidgetContent>(\n\tdocument: DocumentContent,\n\ttest: (\n\t\tcontent: WidgetContent,\n\t\targs: {\n\t\t\tpath: contentPath.Path\n\t\t\tkey: string\n\t\t\tapiID: string\n\t\t},\n\t) => content is TWidgetContent,\n): Record<string, TWidgetContent> {\n\tconst collected: Record<string, TWidgetContent> = {}\n\n\ttraverseDocumentContent(document, {\n\t\ttransformWidget: ({ content, ...args }) => {\n\t\t\tif (test(content, args)) {\n\t\t\t\tcollected[contentPath.serialize(args.path)] = content\n\t\t\t}\n\n\t\t\treturn content\n\t\t},\n\t})\n\n\treturn collected\n}\n\nexport function fromLegacy(legacy: DocumentLegacy): DocumentContent | undefined {\n\tconst parsed = DocumentLegacySchema.safeParse(legacy)\n\tif (!parsed.success) {\n\t\treturn\n\t}\n\n\tconst types = new Map<string, FieldOrSliceType>()\n\tconst keys = new Map<string, string>()\n\tconst widgets: DocumentLegacy = {}\n\tfor (const [key, value] of Object.entries(parsed.data)) {\n\t\tif (key.endsWith(\"_TYPE\")) {\n\t\t\tconst parsed = FieldOrSliceTypeSchema.safeParse(value)\n\t\t\tif (parsed.success) {\n\t\t\t\ttypes.set(key.substring(0, key.length - 5), parsed.data)\n\t\t\t}\n\t\t} else if (key.endsWith(\"_KEY\")) {\n\t\t\tconst parsed = z.uuidv4().safeParse(value)\n\t\t\tif (parsed.success) {\n\t\t\t\tkeys.set(key.substring(0, key.length - 4), parsed.data)\n\t\t\t}\n\t\t} else if (!key.endsWith(\"_POSITION\")) {\n\t\t\twidgets[key] = value\n\t\t}\n\t}\n\n\tconst result = DocumentLegacyCodec(defaultCtx(\"\", types, keys)).toContent(widgets)\n\tif (!result.success) {\n\t\treturn\n\t}\n\n\treturn result.data\n}\n\nexport function toLegacy(document: DocumentContent): DocumentLegacy {\n\tconst { content, types, keys } = DocumentLegacyCodec(defaultCtx(\"\")).fromContent(document)\n\n\treturn { ...content, ...types, ...keys }\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,eACf,UACA,MAQiC;CACjC,MAAM,YAA4C,EAAE;AAEpD,yBAAwB,UAAU,EACjC,kBAAkB,EAAE,SAAS,GAAG,WAAW;AAC1C,MAAI,KAAK,SAAS,KAAK,CACtB,WAAUA,UAAsB,KAAK,KAAK,IAAI;AAG/C,SAAO;IAER,CAAC;AAEF,QAAO;;AAGR,SAAgB,WAAW,QAAqD;CAC/E,MAAM,SAAS,qBAAqB,UAAU,OAAO;AACrD,KAAI,CAAC,OAAO,QACX;CAGD,MAAM,wBAAQ,IAAI,KAA+B;CACjD,MAAM,uBAAO,IAAI,KAAqB;CACtC,MAAM,UAA0B,EAAE;AAClC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,KAAK,CACrD,KAAI,IAAI,SAAS,QAAQ,EAAE;EAC1B,MAAM,SAAS,uBAAuB,UAAU,MAAM;AACtD,MAAI,OAAO,QACV,OAAM,IAAI,IAAI,UAAU,GAAG,IAAI,SAAS,EAAE,EAAE,OAAO,KAAK;YAE/C,IAAI,SAAS,OAAO,EAAE;EAChC,MAAM,SAAS,EAAE,QAAQ,CAAC,UAAU,MAAM;AAC1C,MAAI,OAAO,QACV,MAAK,IAAI,IAAI,UAAU,GAAG,IAAI,SAAS,EAAE,EAAE,OAAO,KAAK;YAE9C,CAAC,IAAI,SAAS,YAAY,CACpC,SAAQ,OAAO;CAIjB,MAAM,SAAS,oBAAoB,WAAW,IAAI,OAAO,KAAK,CAAC,CAAC,UAAU,QAAQ;AAClF,KAAI,CAAC,OAAO,QACX;AAGD,QAAO,OAAO;;AAGf,SAAgB,SAAS,UAA2C;CACnE,MAAM,EAAE,SAAS,OAAO,SAAS,oBAAoB,WAAW,GAAG,CAAC,CAAC,YAAY,SAAS;AAE1F,QAAO;EAAE,GAAG;EAAS,GAAG;EAAO,GAAG;EAAM"}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { ImageContent } from "./content/image.js";
|
|
|
19
19
|
import { IntegrationFieldContent } from "./content/integrationField.js";
|
|
20
20
|
import { LinkContent } from "./content/link.js";
|
|
21
21
|
import { RepeatableContent } from "./content/repeatable.js";
|
|
22
|
-
import { RichTextContent, RichTextContentBlock } from "./content/richText.js";
|
|
22
|
+
import { RichTextContent, RichTextContentBlock, RichTextContentSpan } from "./content/richText.js";
|
|
23
23
|
import { SeparatorContent } from "./content/separator.js";
|
|
24
24
|
import { CompositeSliceContent, LegacySliceContent, SharedSliceContent, SliceContent } from "./content/slice.js";
|
|
25
25
|
import { CompositeSliceItemContent, LegacySliceItemContent, SharedSliceItemContent, SliceItemContent, SlicesContent } from "./content/slices.js";
|
|
@@ -52,4 +52,4 @@ import { customTypeModel_d_exports } from "./helpers/customTypeModel.js";
|
|
|
52
52
|
import { documentContent_d_exports } from "./helpers/documentContent.js";
|
|
53
53
|
import { TraverseSliceContentFunction, TraverseWidgetContentFunction, traverseCompositeSliceContent, traverseDocumentContent, traverseGroupContent, traverseGroupItemsContent, traverseLegacySliceContent, traverseRepeatableContent, traverseSharedSliceContent, traverseSlicesContent, traverseTableContent } from "./helpers/traverseContent.js";
|
|
54
54
|
import { TraverseSliceContentWithModelFunction, TraverseWidgetContentWithModelFunction, traverseCompositeSliceContentWithModel, traverseDocumentContentWithModel, traverseGroupContentWithModel, traverseGroupItemsContentWithModel, traverseLegacySliceContentWithModel, traverseRepeatableContentWithModel, traverseSharedSliceContentWithModel, traverseSlicesContentWithModel, traverseTableContentWithModel } from "./helpers/traverseContentWithModel.js";
|
|
55
|
-
export { type Asset, type BooleanContent, type BooleanModel, type ColorContent, type ColorModel, type CompositeSliceContent, type CompositeSliceItemContent, type CompositeSliceModel, type CustomTypeModel, type DateContent, type DateModel, type DocumentContent, type DynamicSectionModel, type DynamicSliceModel, type DynamicSlicesModel, type DynamicWidgetModel, type Embed, type EmbedContent, type EmbedModel, type EmptyContent, type FieldContent, type FieldModelType, type GeoPointContent, type GeoPointModel, type GroupContent, type GroupItemContent, type GroupModel, type HexaColorCode, type ImageContent, type ImageModel, type IntegrationFieldContent, type IntegrationFieldModel, LegacyContentCtx, type LegacySliceContent, type LegacySliceItemContent, type LegacySliceModel, type LinkContent, type LinkModel, type NestableContent, type NestableModel, type NestedGroupModel, type NonEmptyString, type NumberContent, type NumberModel, type RangeContent, type RangeModel, type RepeatableContent, type RichTextContent, type RichTextContentBlock, type RichTextModel, type SelectContent, type SelectModel, type SeparatorContent, type SeparatorModel, type SharedSliceContent, type SharedSliceItemContent, type SharedSliceModel, type SharedSliceRefModel, type SharedSliceVariationModel, type SliceContent, type SliceItemContent, type SliceModelType, type SlicesContent, type StaticCustomTypeModel, type StaticSectionModel, type StaticSliceModel, type StaticSlicesModel, type StaticWidgetModel, type TableContent, type TableModel, type TextContent, type TextModel, type TimestampContent, type TimestampModel, type TraverseSliceContentFunction, type TraverseSliceContentWithModelFunction, type TraverseWidgetContentFunction, type TraverseWidgetContentWithModelFunction, type UIDContent, type UIDModel, type WidgetContent, type WidgetKey, contentPath_d_exports as contentPath, customTypeModel_d_exports as customTypeModel, defaultCtx, documentContent_d_exports as documentContent, getFieldCtx, traverseCompositeSliceContent, traverseCompositeSliceContentWithModel, traverseDocumentContent, traverseDocumentContentWithModel, traverseGroupContent, traverseGroupContentWithModel, traverseGroupItemsContent, traverseGroupItemsContentWithModel, traverseLegacySliceContent, traverseLegacySliceContentWithModel, traverseRepeatableContent, traverseRepeatableContentWithModel, traverseSharedSliceContent, traverseSharedSliceContentWithModel, traverseSlicesContent, traverseSlicesContentWithModel, traverseTableContent, traverseTableContentWithModel };
|
|
55
|
+
export { type Asset, type BooleanContent, type BooleanModel, type ColorContent, type ColorModel, type CompositeSliceContent, type CompositeSliceItemContent, type CompositeSliceModel, type CustomTypeModel, type DateContent, type DateModel, type DocumentContent, type DynamicSectionModel, type DynamicSliceModel, type DynamicSlicesModel, type DynamicWidgetModel, type Embed, type EmbedContent, type EmbedModel, type EmptyContent, type FieldContent, type FieldModelType, type GeoPointContent, type GeoPointModel, type GroupContent, type GroupItemContent, type GroupModel, type HexaColorCode, type ImageContent, type ImageModel, type IntegrationFieldContent, type IntegrationFieldModel, LegacyContentCtx, type LegacySliceContent, type LegacySliceItemContent, type LegacySliceModel, type LinkContent, type LinkModel, type NestableContent, type NestableModel, type NestedGroupModel, type NonEmptyString, type NumberContent, type NumberModel, type RangeContent, type RangeModel, type RepeatableContent, type RichTextContent, type RichTextContentBlock, type RichTextContentSpan, type RichTextModel, type SelectContent, type SelectModel, type SeparatorContent, type SeparatorModel, type SharedSliceContent, type SharedSliceItemContent, type SharedSliceModel, type SharedSliceRefModel, type SharedSliceVariationModel, type SliceContent, type SliceItemContent, type SliceModelType, type SlicesContent, type StaticCustomTypeModel, type StaticSectionModel, type StaticSliceModel, type StaticSlicesModel, type StaticWidgetModel, type TableContent, type TableModel, type TextContent, type TextModel, type TimestampContent, type TimestampModel, type TraverseSliceContentFunction, type TraverseSliceContentWithModelFunction, type TraverseWidgetContentFunction, type TraverseWidgetContentWithModelFunction, type UIDContent, type UIDModel, type WidgetContent, type WidgetKey, contentPath_d_exports as contentPath, customTypeModel_d_exports as customTypeModel, defaultCtx, documentContent_d_exports as documentContent, getFieldCtx, traverseCompositeSliceContent, traverseCompositeSliceContentWithModel, traverseDocumentContent, traverseDocumentContentWithModel, traverseGroupContent, traverseGroupContentWithModel, traverseGroupItemsContent, traverseGroupItemsContentWithModel, traverseLegacySliceContent, traverseLegacySliceContentWithModel, traverseRepeatableContent, traverseRepeatableContentWithModel, traverseSharedSliceContent, traverseSharedSliceContentWithModel, traverseSlicesContent, traverseSlicesContentWithModel, traverseTableContent, traverseTableContentWithModel };
|
package/dist/io-ts.d.ts
CHANGED
|
@@ -2103,6 +2103,95 @@ declare const RichTextContentBlock: t.Type<{
|
|
|
2103
2103
|
label?: string | null | undefined;
|
|
2104
2104
|
direction?: string | null | undefined;
|
|
2105
2105
|
}, unknown>;
|
|
2106
|
+
declare const RichTextContentSpan: t.Type<{
|
|
2107
|
+
type: "label";
|
|
2108
|
+
start: number;
|
|
2109
|
+
end: number;
|
|
2110
|
+
data: string;
|
|
2111
|
+
} | {
|
|
2112
|
+
type: "list-item" | "strong" | "em";
|
|
2113
|
+
start: number;
|
|
2114
|
+
end: number;
|
|
2115
|
+
} | {
|
|
2116
|
+
type: "hyperlink";
|
|
2117
|
+
start: number;
|
|
2118
|
+
end: number;
|
|
2119
|
+
data: {
|
|
2120
|
+
kind: "image";
|
|
2121
|
+
id: string;
|
|
2122
|
+
url: string;
|
|
2123
|
+
height: string;
|
|
2124
|
+
width: string;
|
|
2125
|
+
size: string;
|
|
2126
|
+
name: string;
|
|
2127
|
+
__TYPE__: "ImageLink";
|
|
2128
|
+
date?: string | null | undefined;
|
|
2129
|
+
} | {
|
|
2130
|
+
kind: "file";
|
|
2131
|
+
id: string;
|
|
2132
|
+
url: string;
|
|
2133
|
+
name: string;
|
|
2134
|
+
size: string;
|
|
2135
|
+
__TYPE__: "FileLink";
|
|
2136
|
+
date?: string | null | undefined;
|
|
2137
|
+
} | {
|
|
2138
|
+
kind: "document";
|
|
2139
|
+
id: string;
|
|
2140
|
+
__TYPE__: "DocumentLink";
|
|
2141
|
+
} | {
|
|
2142
|
+
kind: "web";
|
|
2143
|
+
url: string;
|
|
2144
|
+
__TYPE__: "ExternalLink";
|
|
2145
|
+
target?: string | null | undefined;
|
|
2146
|
+
preview?: {
|
|
2147
|
+
title?: string | undefined;
|
|
2148
|
+
} | null | undefined;
|
|
2149
|
+
};
|
|
2150
|
+
}, {
|
|
2151
|
+
type: "label";
|
|
2152
|
+
start: number;
|
|
2153
|
+
end: number;
|
|
2154
|
+
data: string;
|
|
2155
|
+
} | {
|
|
2156
|
+
type: "list-item" | "strong" | "em";
|
|
2157
|
+
start: number;
|
|
2158
|
+
end: number;
|
|
2159
|
+
} | {
|
|
2160
|
+
type: "hyperlink";
|
|
2161
|
+
start: number;
|
|
2162
|
+
end: number;
|
|
2163
|
+
data: {
|
|
2164
|
+
kind: "image";
|
|
2165
|
+
id: string;
|
|
2166
|
+
url: string;
|
|
2167
|
+
height: string;
|
|
2168
|
+
width: string;
|
|
2169
|
+
size: string;
|
|
2170
|
+
name: string;
|
|
2171
|
+
__TYPE__: "ImageLink";
|
|
2172
|
+
date?: string | null | undefined;
|
|
2173
|
+
} | {
|
|
2174
|
+
kind: "file";
|
|
2175
|
+
id: string;
|
|
2176
|
+
url: string;
|
|
2177
|
+
name: string;
|
|
2178
|
+
size: string;
|
|
2179
|
+
__TYPE__: "FileLink";
|
|
2180
|
+
date?: string | null | undefined;
|
|
2181
|
+
} | {
|
|
2182
|
+
kind: "document";
|
|
2183
|
+
id: string;
|
|
2184
|
+
__TYPE__: "DocumentLink";
|
|
2185
|
+
} | {
|
|
2186
|
+
kind: "web";
|
|
2187
|
+
url: string;
|
|
2188
|
+
__TYPE__: "ExternalLink";
|
|
2189
|
+
target?: string | null | undefined;
|
|
2190
|
+
preview?: {
|
|
2191
|
+
title?: string | undefined;
|
|
2192
|
+
} | null | undefined;
|
|
2193
|
+
};
|
|
2194
|
+
}, unknown>;
|
|
2106
2195
|
declare const TableContent: t.Type<{
|
|
2107
2196
|
__TYPE__: "TableContent";
|
|
2108
2197
|
content: {
|
|
@@ -72234,5 +72323,5 @@ declare const CustomTypeModel: t.Type<{
|
|
|
72234
72323
|
label?: string | null | undefined;
|
|
72235
72324
|
}, unknown>;
|
|
72236
72325
|
//#endregion
|
|
72237
|
-
export { Asset, BooleanContent, BooleanLegacy, BooleanModel, ColorContent, ColorLegacy, ColorModel, CompositeSliceContent, CompositeSliceItemContent, CompositeSliceLegacy, CompositeSliceModel, CustomTypeModel, DateContent, DateLegacy, DateModel, DocumentContent, DocumentLegacy, DynamicSectionModel, DynamicSliceModel, DynamicSlicesModel, DynamicWidgetModel, Embed, EmbedContent, EmbedLegacy, EmbedModel, EmptyContent, EmptyLegacy, FieldContent, GeoPointContent, GeoPointLegacy, GeoPointModel, GroupContent, GroupItemContent, GroupItemLegacy, GroupLegacy, GroupModel, HexaColorCode, ImageContent, ImageLegacy, ImageModel, IntegrationFieldContent, IntegrationFieldLegacy, IntegrationFieldModel, LegacySliceContent, LegacySliceItemContent, LegacySliceLegacy, LegacySliceModel, LinkContent, LinkLegacy, LinkModel, NestableContent, NestableLegacy, NestableModel, NestedGroupModel, NonEmptyString, NumberContent, NumberLegacy, NumberModel, RangeContent, RangeLegacy, RangeModel, RepeatableContent, RepeatableLegacy, RichTextContent, RichTextContentBlock, RichTextLegacy, RichTextModel, SelectContent, SelectLegacy, SelectModel, SeparatorContent, SeparatorLegacy, SeparatorModel, SharedSliceContent, SharedSliceItemContent, SharedSliceLegacy, SharedSliceModel, SharedSliceRefModel, SliceContent, SliceItemContent, SliceItemLegacy, SliceLegacy, SlicesContent, SlicesLegacy, StaticCustomTypeModel, StaticSectionModel, StaticSliceModel, StaticSlicesModel, StaticWidgetModel, TableContent, TableLegacy, TableModel, TextContent, TextLegacy, TextModel, TimestampContent, TimestampLegacy, TimestampModel, UIDContent, UIDLegacy, UIDModel, WidgetContent, WidgetKey, WidgetLegacy };
|
|
72326
|
+
export { Asset, BooleanContent, BooleanLegacy, BooleanModel, ColorContent, ColorLegacy, ColorModel, CompositeSliceContent, CompositeSliceItemContent, CompositeSliceLegacy, CompositeSliceModel, CustomTypeModel, DateContent, DateLegacy, DateModel, DocumentContent, DocumentLegacy, DynamicSectionModel, DynamicSliceModel, DynamicSlicesModel, DynamicWidgetModel, Embed, EmbedContent, EmbedLegacy, EmbedModel, EmptyContent, EmptyLegacy, FieldContent, GeoPointContent, GeoPointLegacy, GeoPointModel, GroupContent, GroupItemContent, GroupItemLegacy, GroupLegacy, GroupModel, HexaColorCode, ImageContent, ImageLegacy, ImageModel, IntegrationFieldContent, IntegrationFieldLegacy, IntegrationFieldModel, LegacySliceContent, LegacySliceItemContent, LegacySliceLegacy, LegacySliceModel, LinkContent, LinkLegacy, LinkModel, NestableContent, NestableLegacy, NestableModel, NestedGroupModel, NonEmptyString, NumberContent, NumberLegacy, NumberModel, RangeContent, RangeLegacy, RangeModel, RepeatableContent, RepeatableLegacy, RichTextContent, RichTextContentBlock, RichTextContentSpan, RichTextLegacy, RichTextModel, SelectContent, SelectLegacy, SelectModel, SeparatorContent, SeparatorLegacy, SeparatorModel, SharedSliceContent, SharedSliceItemContent, SharedSliceLegacy, SharedSliceModel, SharedSliceRefModel, SliceContent, SliceItemContent, SliceItemLegacy, SliceLegacy, SlicesContent, SlicesLegacy, StaticCustomTypeModel, StaticSectionModel, StaticSliceModel, StaticSlicesModel, StaticWidgetModel, TableContent, TableLegacy, TableModel, TextContent, TextLegacy, TextModel, TimestampContent, TimestampLegacy, TimestampModel, UIDContent, UIDLegacy, UIDModel, WidgetContent, WidgetKey, WidgetLegacy };
|
|
72238
72327
|
//# sourceMappingURL=io-ts.d.ts.map
|