@cosmicdrift/kumiko-bundled-features 0.417.0 → 0.419.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/agent-tools/api-docs/schema-fields.js +9 -0
- package/dist/auth-email-password/index.d.ts +2 -1
- package/dist/auth-email-password/index.js +2 -1
- package/dist/auth-email-password/signup-activation.js +2 -1
- package/dist/auth-email-password/signup-token-store.d.ts +1 -6
- package/dist/auth-email-password/signup-token-store.js +0 -5
- package/dist/cap-counter/stock-cap-guard.d.ts +9 -2
- package/dist/cap-counter/stock-cap-guard.js +9 -11
- package/dist/document-ingest-foundation/feature.js +5 -1
- package/dist/document-ingest-foundation/report-ingest-progress.js +19 -6
- package/dist/signature/entity.d.ts +8 -6
- package/dist/signature/entity.js +3 -1
- package/dist/signature/feature.js +11 -4
- package/dist/signature/handlers/lifecycle.write.d.ts +9 -0
- package/dist/signature/handlers/lifecycle.write.js +23 -1
- package/dist/signature/handlers/request.write.d.ts +1 -1
- package/dist/signature/i18n.js +1 -0
- package/dist/signature/list-cursor-seal.d.ts +3 -0
- package/dist/signature/list-cursor-seal.js +44 -0
- package/dist/signature/options.d.ts +2 -2
- package/dist/signature/payloads.d.ts +17 -1
- package/dist/signature/payloads.js +11 -2
- package/dist/signature/png.js +23 -3
- package/dist/signature/subject-queries.d.ts +1 -1
- package/dist/signature/subject-queries.js +30 -8
- package/dist/signature/sweep.js +26 -9
- package/dist/signature/web/constants.d.ts +9 -0
- package/dist/signature/web/constants.js +8 -0
- package/dist/subscription-stripe/plugin-methods.js +2 -0
- package/dist/subscription-stripe/verify-webhook.js +17 -16
- package/dist/template-resolver/compile-document-body.js +3 -6
- package/dist/template-resolver/compile-document-styles.d.ts +3 -0
- package/dist/template-resolver/compile-document-styles.js +84 -0
- package/dist/template-resolver/document-frames.d.ts +3 -0
- package/dist/template-resolver/document-frames.js +19 -0
- package/dist/template-resolver/document-op-blocks.d.ts +495 -0
- package/dist/template-resolver/document-op-blocks.js +430 -0
- package/dist/template-resolver/document-ops.d.ts +1809 -37
- package/dist/template-resolver/document-ops.js +97 -104
- package/dist/template-resolver/document-print-only.d.ts +10 -0
- package/dist/template-resolver/document-print-only.js +24 -0
- package/dist/template-resolver/document-sanitizer.d.ts +1 -1
- package/dist/template-resolver/document-sanitizer.js +24 -13
- package/dist/template-resolver/feature.d.ts +3 -0
- package/dist/template-resolver/feature.js +14 -1
- package/dist/template-resolver/handlers/apply-layout.write.d.ts +29 -0
- package/dist/template-resolver/handlers/apply-layout.write.js +118 -0
- package/dist/template-resolver/handlers/create-layout.write.d.ts +15 -0
- package/dist/template-resolver/handlers/create-layout.write.js +78 -0
- package/dist/template-resolver/handlers/document-base.d.ts +2 -2
- package/dist/template-resolver/handlers/document-blocks.query.d.ts +10 -3
- package/dist/template-resolver/handlers/document-blocks.query.js +13 -8
- package/dist/template-resolver/handlers/document-region.d.ts +19 -0
- package/dist/template-resolver/handlers/document-region.js +27 -0
- package/dist/template-resolver/handlers/failure-reason.d.ts +2 -0
- package/dist/template-resolver/handlers/failure-reason.js +12 -0
- package/dist/template-resolver/handlers/import-bundle-system.write.js +4 -0
- package/dist/template-resolver/handlers/layout-source.query.d.ts +3 -3
- package/dist/template-resolver/handlers/layout-source.query.js +6 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +8 -0
- package/dist/template-resolver/handlers/overview.query.js +12 -6
- package/dist/template-resolver/handlers/patch-draft.write.d.ts +905 -4
- package/dist/template-resolver/handlers/patch-draft.write.js +10 -6
- package/dist/template-resolver/handlers/publish-templates.write.d.ts +40 -0
- package/dist/template-resolver/handlers/publish-templates.write.js +61 -0
- package/dist/template-resolver/handlers/set.write.js +4 -1
- package/dist/template-resolver/handlers/template-write.js +7 -2
- package/dist/template-resolver/handlers/tenant-settings.d.ts +17 -0
- package/dist/template-resolver/handlers/tenant-settings.js +91 -0
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +14 -9
- package/dist/template-resolver/handlers/toggle-status.write.js +11 -7
- package/dist/template-resolver/handlers/upsert-system.write.js +15 -9
- package/dist/template-resolver/handlers/usage.query.d.ts +14 -0
- package/dist/template-resolver/handlers/usage.query.js +80 -12
- package/dist/template-resolver/handlers/validate.query.d.ts +2 -0
- package/dist/template-resolver/handlers/validate.query.js +10 -0
- package/dist/template-resolver/i18n.js +3 -0
- package/dist/template-resolver/index.d.ts +7 -2
- package/dist/template-resolver/index.js +6 -2
- package/dist/template-resolver/layout-regions.d.ts +4 -5
- package/dist/template-resolver/layout-regions.js +38 -11
- package/dist/template-resolver/print-document.js +3 -1
- package/dist/template-resolver/seeding.js +4 -0
- package/dist/template-resolver/template-delivery-policy.d.ts +1 -0
- package/dist/template-resolver/template-delivery-policy.js +9 -1
- package/dist/template-resolver/template-edit-policy.d.ts +5 -1
- package/dist/template-resolver/template-edit-policy.js +29 -1
- package/dist/template-resolver/template-meta.d.ts +27 -2
- package/dist/template-resolver/template-meta.js +21 -5
- package/dist/template-resolver/template-preview.js +8 -8
- package/dist/template-resolver/template-validation.js +10 -3
- package/dist/template-resolver/web/constants.d.ts +7 -1
- package/dist/template-resolver/web/constants.js +21 -1
- package/dist/template-resolver/web/document-blocks.d.ts +1 -0
- package/dist/template-resolver/web/document-blocks.js +2 -0
- package/dist/template-resolver/web/document-editor-extensions.d.ts +9 -1
- package/dist/template-resolver/web/document-editor-extensions.js +27 -2
- package/dist/template-resolver/web/document-editor-fonts.d.ts +10 -0
- package/dist/template-resolver/web/document-editor-fonts.js +13 -0
- package/dist/template-resolver/web/document-fonts.d.ts +4 -0
- package/dist/template-resolver/web/document-fonts.js +18 -0
- package/dist/template-resolver/web/document-frame-control.d.ts +61 -0
- package/dist/template-resolver/web/document-frame-control.js +329 -0
- package/dist/template-resolver/web/document-frame-node-view.d.ts +4 -0
- package/dist/template-resolver/web/document-frame-node-view.js +173 -0
- package/dist/template-resolver/web/document-print-decorations.d.ts +12 -0
- package/dist/template-resolver/web/document-print-decorations.js +147 -0
- package/dist/template-resolver/web/document-print-defaults.d.ts +14 -0
- package/dist/template-resolver/web/document-print-defaults.js +25 -0
- package/dist/template-resolver/web/document-print-style.d.ts +71 -0
- package/dist/template-resolver/web/document-print-style.js +199 -0
- package/dist/template-resolver/web/document-repeat-strip.d.ts +8 -0
- package/dist/template-resolver/web/document-repeat-strip.js +78 -0
- package/dist/template-resolver/web/document-schema.js +23 -9
- package/dist/template-resolver/web/document-style-css.d.ts +29 -0
- package/dist/template-resolver/web/document-style-css.js +76 -0
- package/dist/template-resolver/web/document-tiptap-bubble.js +13 -3
- package/dist/template-resolver/web/document-tiptap-content.d.ts +2 -1
- package/dist/template-resolver/web/document-tiptap-content.js +36 -4
- package/dist/template-resolver/web/document-tiptap-context.d.ts +6 -2
- package/dist/template-resolver/web/document-tiptap-context.js +2 -1
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +13 -5
- package/dist/template-resolver/web/document-tiptap-helpers.d.ts +30 -1
- package/dist/template-resolver/web/document-tiptap-helpers.js +103 -2
- package/dist/template-resolver/web/document-tiptap-toolbar-groups.d.ts +5 -0
- package/dist/template-resolver/web/document-tiptap-toolbar-groups.js +89 -6
- package/dist/template-resolver/web/document-tiptap-toolbar.js +45 -8
- package/dist/template-resolver/web/document-toolbar-blocks.d.ts +17 -0
- package/dist/template-resolver/web/i18n.js +19 -0
- package/dist/template-resolver/web/index.d.ts +8 -2
- package/dist/template-resolver/web/index.js +6 -1
- package/dist/template-resolver/web/pdf-constants.d.ts +3 -0
- package/dist/template-resolver/web/pdf-constants.js +3 -0
- package/dist/template-resolver/web/qualified-names.d.ts +7 -0
- package/dist/template-resolver/web/qualified-names.js +6 -0
- package/dist/template-resolver/web/use-document-tiptap-model.d.ts +6 -2
- package/dist/template-resolver/web/use-document-tiptap-model.js +38 -3
- package/dist/tenant/company-config.d.ts +6 -0
- package/dist/tenant/company-config.js +41 -0
- package/dist/tenant/feature.js +11 -0
- package/dist/tenant/i18n.js +14 -0
- package/dist/tenant-inactivity/handlers/keep-account.write.js +5 -2
- package/dist/tenant-lifecycle/run-tenant-destroy.js +65 -33
- package/package.json +16 -11
- package/src/agent-tools/changes.json +6 -0
- package/src/cap-counter/changes.json +6 -0
- package/src/channel-whatsapp/changes.json +1 -1
- package/src/document-ingest-foundation/changes.json +6 -0
- package/src/signature/changes.json +18 -0
- package/src/subscription-paddle/changes.json +1 -1
- package/src/subscription-stripe/changes.json +6 -0
- package/src/template-resolver/changes.json +38 -0
- package/src/tenant-lifecycle/changes.json +6 -0
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import type { FieldIssue } from "@cosmicdrift/kumiko-framework/errors";
|
|
2
|
+
import type { JSONContent } from "@tiptap/core";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import type { DocumentOpsKind } from "./web/constants.ts";
|
|
5
|
+
import { type DocumentToolbarBlock } from "./web/document-blocks.ts";
|
|
6
|
+
export declare const MAX_BODY_BLOCKS = 300;
|
|
7
|
+
export declare const DOCUMENT_BLOCK_INPUT_TYPES: readonly ["paragraph", "heading", "list", "table", "frame", "image", "button", "divider", "pageBreak"];
|
|
8
|
+
export type DocumentBlockInputType = (typeof DOCUMENT_BLOCK_INPUT_TYPES)[number];
|
|
9
|
+
type AllowedBlock = DocumentToolbarBlock | "frame";
|
|
10
|
+
export declare function allowedBlocksFor(kind: DocumentOpsKind): readonly AllowedBlock[];
|
|
11
|
+
export declare function patchIssue(path: string, code: string, params?: Readonly<Record<string, unknown>>): FieldIssue;
|
|
12
|
+
export declare const blockInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
center: "center";
|
|
15
|
+
justify: "justify";
|
|
16
|
+
left: "left";
|
|
17
|
+
right: "right";
|
|
18
|
+
}>>;
|
|
19
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
arial: "arial";
|
|
27
|
+
calibri: "calibri";
|
|
28
|
+
cambria: "cambria";
|
|
29
|
+
courier: "courier";
|
|
30
|
+
times: "times";
|
|
31
|
+
}>>;
|
|
32
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
color: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
text: z.ZodOptional<z.ZodString>;
|
|
36
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
arial: "arial";
|
|
39
|
+
calibri: "calibri";
|
|
40
|
+
cambria: "cambria";
|
|
41
|
+
courier: "courier";
|
|
42
|
+
times: "times";
|
|
43
|
+
}>>;
|
|
44
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
color: z.ZodOptional<z.ZodString>;
|
|
46
|
+
text: z.ZodString;
|
|
47
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
type: z.ZodLiteral<"paragraph">;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
center: "center";
|
|
55
|
+
justify: "justify";
|
|
56
|
+
left: "left";
|
|
57
|
+
right: "right";
|
|
58
|
+
}>>;
|
|
59
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
arial: "arial";
|
|
67
|
+
calibri: "calibri";
|
|
68
|
+
cambria: "cambria";
|
|
69
|
+
courier: "courier";
|
|
70
|
+
times: "times";
|
|
71
|
+
}>>;
|
|
72
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
color: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
text: z.ZodOptional<z.ZodString>;
|
|
76
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
77
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
arial: "arial";
|
|
79
|
+
calibri: "calibri";
|
|
80
|
+
cambria: "cambria";
|
|
81
|
+
courier: "courier";
|
|
82
|
+
times: "times";
|
|
83
|
+
}>>;
|
|
84
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
color: z.ZodOptional<z.ZodString>;
|
|
86
|
+
text: z.ZodString;
|
|
87
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$strip>>>;
|
|
91
|
+
type: z.ZodLiteral<"heading">;
|
|
92
|
+
level: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
center: "center";
|
|
96
|
+
justify: "justify";
|
|
97
|
+
left: "left";
|
|
98
|
+
right: "right";
|
|
99
|
+
}>>;
|
|
100
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
107
|
+
arial: "arial";
|
|
108
|
+
calibri: "calibri";
|
|
109
|
+
cambria: "cambria";
|
|
110
|
+
courier: "courier";
|
|
111
|
+
times: "times";
|
|
112
|
+
}>>;
|
|
113
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
color: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
type: z.ZodLiteral<"list">;
|
|
117
|
+
ordered: z.ZodBoolean;
|
|
118
|
+
items: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
|
|
119
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
arial: "arial";
|
|
121
|
+
calibri: "calibri";
|
|
122
|
+
cambria: "cambria";
|
|
123
|
+
courier: "courier";
|
|
124
|
+
times: "times";
|
|
125
|
+
}>>;
|
|
126
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
color: z.ZodOptional<z.ZodString>;
|
|
128
|
+
text: z.ZodString;
|
|
129
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
}, z.core.$strip>>]>>;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<"table">;
|
|
135
|
+
borders: z.ZodOptional<z.ZodLiteral<"none">>;
|
|
136
|
+
columnWidthsPx: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
137
|
+
header: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
139
|
+
text: z.ZodOptional<z.ZodString>;
|
|
140
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
141
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
arial: "arial";
|
|
143
|
+
calibri: "calibri";
|
|
144
|
+
cambria: "cambria";
|
|
145
|
+
courier: "courier";
|
|
146
|
+
times: "times";
|
|
147
|
+
}>>;
|
|
148
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
color: z.ZodOptional<z.ZodString>;
|
|
150
|
+
text: z.ZodString;
|
|
151
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
+
}, z.core.$strip>>>;
|
|
155
|
+
background: z.ZodOptional<z.ZodString>;
|
|
156
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
center: "center";
|
|
158
|
+
justify: "justify";
|
|
159
|
+
left: "left";
|
|
160
|
+
right: "right";
|
|
161
|
+
}>>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
165
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
166
|
+
text: z.ZodOptional<z.ZodString>;
|
|
167
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
169
|
+
arial: "arial";
|
|
170
|
+
calibri: "calibri";
|
|
171
|
+
cambria: "cambria";
|
|
172
|
+
courier: "courier";
|
|
173
|
+
times: "times";
|
|
174
|
+
}>>;
|
|
175
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
color: z.ZodOptional<z.ZodString>;
|
|
177
|
+
text: z.ZodString;
|
|
178
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
}, z.core.$strip>>>;
|
|
182
|
+
background: z.ZodOptional<z.ZodString>;
|
|
183
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
184
|
+
center: "center";
|
|
185
|
+
justify: "justify";
|
|
186
|
+
left: "left";
|
|
187
|
+
right: "right";
|
|
188
|
+
}>>;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
repeat: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
each: z.ZodString;
|
|
193
|
+
row: z.ZodObject<{
|
|
194
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
195
|
+
text: z.ZodOptional<z.ZodString>;
|
|
196
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
198
|
+
arial: "arial";
|
|
199
|
+
calibri: "calibri";
|
|
200
|
+
cambria: "cambria";
|
|
201
|
+
courier: "courier";
|
|
202
|
+
times: "times";
|
|
203
|
+
}>>;
|
|
204
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
color: z.ZodOptional<z.ZodString>;
|
|
206
|
+
text: z.ZodString;
|
|
207
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
}, z.core.$strip>>>;
|
|
211
|
+
background: z.ZodOptional<z.ZodString>;
|
|
212
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
center: "center";
|
|
214
|
+
justify: "justify";
|
|
215
|
+
left: "left";
|
|
216
|
+
right: "right";
|
|
217
|
+
}>>;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
type: z.ZodLiteral<"frame">;
|
|
223
|
+
xMm: z.ZodNumber;
|
|
224
|
+
yMm: z.ZodNumber;
|
|
225
|
+
widthMm: z.ZodNumber;
|
|
226
|
+
heightMm: z.ZodNumber;
|
|
227
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
address: "address";
|
|
229
|
+
text: "text";
|
|
230
|
+
}>>;
|
|
231
|
+
reserveFlow: z.ZodOptional<z.ZodBoolean>;
|
|
232
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
233
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
234
|
+
center: "center";
|
|
235
|
+
justify: "justify";
|
|
236
|
+
left: "left";
|
|
237
|
+
right: "right";
|
|
238
|
+
}>>;
|
|
239
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
240
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
}, z.core.$strip>>;
|
|
244
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
arial: "arial";
|
|
247
|
+
calibri: "calibri";
|
|
248
|
+
cambria: "cambria";
|
|
249
|
+
courier: "courier";
|
|
250
|
+
times: "times";
|
|
251
|
+
}>>;
|
|
252
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
color: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
text: z.ZodOptional<z.ZodString>;
|
|
256
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
257
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
258
|
+
arial: "arial";
|
|
259
|
+
calibri: "calibri";
|
|
260
|
+
cambria: "cambria";
|
|
261
|
+
courier: "courier";
|
|
262
|
+
times: "times";
|
|
263
|
+
}>>;
|
|
264
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
265
|
+
color: z.ZodOptional<z.ZodString>;
|
|
266
|
+
text: z.ZodString;
|
|
267
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
269
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
270
|
+
}, z.core.$strip>>>;
|
|
271
|
+
type: z.ZodLiteral<"paragraph">;
|
|
272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
273
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
274
|
+
center: "center";
|
|
275
|
+
justify: "justify";
|
|
276
|
+
left: "left";
|
|
277
|
+
right: "right";
|
|
278
|
+
}>>;
|
|
279
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
280
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
286
|
+
arial: "arial";
|
|
287
|
+
calibri: "calibri";
|
|
288
|
+
cambria: "cambria";
|
|
289
|
+
courier: "courier";
|
|
290
|
+
times: "times";
|
|
291
|
+
}>>;
|
|
292
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
color: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
text: z.ZodOptional<z.ZodString>;
|
|
296
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
297
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
298
|
+
arial: "arial";
|
|
299
|
+
calibri: "calibri";
|
|
300
|
+
cambria: "cambria";
|
|
301
|
+
courier: "courier";
|
|
302
|
+
times: "times";
|
|
303
|
+
}>>;
|
|
304
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
305
|
+
color: z.ZodOptional<z.ZodString>;
|
|
306
|
+
text: z.ZodString;
|
|
307
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
+
}, z.core.$strip>>>;
|
|
311
|
+
type: z.ZodLiteral<"heading">;
|
|
312
|
+
level: z.ZodNumber;
|
|
313
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
314
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
315
|
+
center: "center";
|
|
316
|
+
justify: "justify";
|
|
317
|
+
left: "left";
|
|
318
|
+
right: "right";
|
|
319
|
+
}>>;
|
|
320
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
327
|
+
arial: "arial";
|
|
328
|
+
calibri: "calibri";
|
|
329
|
+
cambria: "cambria";
|
|
330
|
+
courier: "courier";
|
|
331
|
+
times: "times";
|
|
332
|
+
}>>;
|
|
333
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
color: z.ZodOptional<z.ZodString>;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
type: z.ZodLiteral<"list">;
|
|
337
|
+
ordered: z.ZodBoolean;
|
|
338
|
+
items: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
|
|
339
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
340
|
+
arial: "arial";
|
|
341
|
+
calibri: "calibri";
|
|
342
|
+
cambria: "cambria";
|
|
343
|
+
courier: "courier";
|
|
344
|
+
times: "times";
|
|
345
|
+
}>>;
|
|
346
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
color: z.ZodOptional<z.ZodString>;
|
|
348
|
+
text: z.ZodString;
|
|
349
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
352
|
+
}, z.core.$strip>>]>>;
|
|
353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
+
type: z.ZodLiteral<"table">;
|
|
355
|
+
borders: z.ZodOptional<z.ZodLiteral<"none">>;
|
|
356
|
+
columnWidthsPx: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
357
|
+
header: z.ZodOptional<z.ZodObject<{
|
|
358
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
359
|
+
text: z.ZodOptional<z.ZodString>;
|
|
360
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
361
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
362
|
+
arial: "arial";
|
|
363
|
+
calibri: "calibri";
|
|
364
|
+
cambria: "cambria";
|
|
365
|
+
courier: "courier";
|
|
366
|
+
times: "times";
|
|
367
|
+
}>>;
|
|
368
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
color: z.ZodOptional<z.ZodString>;
|
|
370
|
+
text: z.ZodString;
|
|
371
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
372
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
373
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
374
|
+
}, z.core.$strip>>>;
|
|
375
|
+
background: z.ZodOptional<z.ZodString>;
|
|
376
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
center: "center";
|
|
378
|
+
justify: "justify";
|
|
379
|
+
left: "left";
|
|
380
|
+
right: "right";
|
|
381
|
+
}>>;
|
|
382
|
+
}, z.core.$strip>>;
|
|
383
|
+
}, z.core.$strip>>;
|
|
384
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
385
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
386
|
+
text: z.ZodOptional<z.ZodString>;
|
|
387
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
388
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
389
|
+
arial: "arial";
|
|
390
|
+
calibri: "calibri";
|
|
391
|
+
cambria: "cambria";
|
|
392
|
+
courier: "courier";
|
|
393
|
+
times: "times";
|
|
394
|
+
}>>;
|
|
395
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
396
|
+
color: z.ZodOptional<z.ZodString>;
|
|
397
|
+
text: z.ZodString;
|
|
398
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
400
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
+
}, z.core.$strip>>>;
|
|
402
|
+
background: z.ZodOptional<z.ZodString>;
|
|
403
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
404
|
+
center: "center";
|
|
405
|
+
justify: "justify";
|
|
406
|
+
left: "left";
|
|
407
|
+
right: "right";
|
|
408
|
+
}>>;
|
|
409
|
+
}, z.core.$strip>>;
|
|
410
|
+
}, z.core.$strip>>;
|
|
411
|
+
repeat: z.ZodOptional<z.ZodObject<{
|
|
412
|
+
each: z.ZodString;
|
|
413
|
+
row: z.ZodObject<{
|
|
414
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
415
|
+
text: z.ZodOptional<z.ZodString>;
|
|
416
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
417
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
418
|
+
arial: "arial";
|
|
419
|
+
calibri: "calibri";
|
|
420
|
+
cambria: "cambria";
|
|
421
|
+
courier: "courier";
|
|
422
|
+
times: "times";
|
|
423
|
+
}>>;
|
|
424
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
425
|
+
color: z.ZodOptional<z.ZodString>;
|
|
426
|
+
text: z.ZodString;
|
|
427
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
429
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
430
|
+
}, z.core.$strip>>>;
|
|
431
|
+
background: z.ZodOptional<z.ZodString>;
|
|
432
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
433
|
+
center: "center";
|
|
434
|
+
justify: "justify";
|
|
435
|
+
left: "left";
|
|
436
|
+
right: "right";
|
|
437
|
+
}>>;
|
|
438
|
+
}, z.core.$strip>>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
}, z.core.$strip>>;
|
|
441
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"image">;
|
|
443
|
+
resource: z.ZodString;
|
|
444
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
445
|
+
}, z.core.$strip>], "type">>;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
type: z.ZodLiteral<"image">;
|
|
448
|
+
resource: z.ZodString;
|
|
449
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
450
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
451
|
+
type: z.ZodLiteral<"button">;
|
|
452
|
+
text: z.ZodString;
|
|
453
|
+
href: z.ZodString;
|
|
454
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
455
|
+
type: z.ZodLiteral<"divider">;
|
|
456
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
457
|
+
type: z.ZodLiteral<"pageBreak">;
|
|
458
|
+
}, z.core.$strip>], "type">;
|
|
459
|
+
export type BlockInput = z.infer<typeof blockInputSchema>;
|
|
460
|
+
export declare const blockFormatSchema: z.ZodObject<{
|
|
461
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
462
|
+
center: "center";
|
|
463
|
+
justify: "justify";
|
|
464
|
+
left: "left";
|
|
465
|
+
right: "right";
|
|
466
|
+
}>>;
|
|
467
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
spaceBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
470
|
+
spaceAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
471
|
+
}, z.core.$strip>>;
|
|
472
|
+
textStyle: z.ZodOptional<z.ZodObject<{
|
|
473
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
arial: "arial";
|
|
475
|
+
calibri: "calibri";
|
|
476
|
+
cambria: "cambria";
|
|
477
|
+
courier: "courier";
|
|
478
|
+
times: "times";
|
|
479
|
+
}>>;
|
|
480
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
481
|
+
color: z.ZodOptional<z.ZodString>;
|
|
482
|
+
}, z.core.$strip>>;
|
|
483
|
+
}, z.core.$strip>;
|
|
484
|
+
export type TextFormat = z.infer<typeof blockFormatSchema>;
|
|
485
|
+
export type BuildContext = {
|
|
486
|
+
readonly kind: DocumentOpsKind;
|
|
487
|
+
readonly issues: FieldIssue[];
|
|
488
|
+
};
|
|
489
|
+
export declare function countBlocks(blocks: readonly BlockInput[]): number;
|
|
490
|
+
export declare function blockNode(ctx: BuildContext, path: string, input: BlockInput): JSONContent;
|
|
491
|
+
export declare function usesPrintStyling(node: JSONContent): boolean;
|
|
492
|
+
export declare function refusePrintStyling(kind: DocumentOpsKind, node: JSONContent, path: string): FieldIssue | null;
|
|
493
|
+
export declare const FORMATTABLE_NODE_TYPES: ReadonlySet<string>;
|
|
494
|
+
export declare function formatNode(ctx: BuildContext, path: string, node: JSONContent, format: TextFormat): JSONContent;
|
|
495
|
+
export {};
|