@underdogai/mesh-event-schemas 0.1.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.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/apppacks.d.ts +15652 -0
  4. package/dist/apppacks.d.ts.map +1 -0
  5. package/dist/apppacks.js +71 -0
  6. package/dist/apppacks.js.map +1 -0
  7. package/dist/blocks.d.ts +2320 -0
  8. package/dist/blocks.d.ts.map +1 -0
  9. package/dist/blocks.js +472 -0
  10. package/dist/blocks.js.map +1 -0
  11. package/dist/capabilities.d.ts +35 -0
  12. package/dist/capabilities.d.ts.map +1 -0
  13. package/dist/capabilities.js +37 -0
  14. package/dist/capabilities.js.map +1 -0
  15. package/dist/events.d.ts +4557 -0
  16. package/dist/events.d.ts.map +1 -0
  17. package/dist/events.js +571 -0
  18. package/dist/events.js.map +1 -0
  19. package/dist/index.d.ts +16 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +16 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/namespace.d.ts +56 -0
  24. package/dist/namespace.d.ts.map +1 -0
  25. package/dist/namespace.js +60 -0
  26. package/dist/namespace.js.map +1 -0
  27. package/dist/plugins.d.ts +131 -0
  28. package/dist/plugins.d.ts.map +1 -0
  29. package/dist/plugins.js +66 -0
  30. package/dist/plugins.js.map +1 -0
  31. package/dist/registry.d.ts +67 -0
  32. package/dist/registry.d.ts.map +1 -0
  33. package/dist/registry.js +212 -0
  34. package/dist/registry.js.map +1 -0
  35. package/dist/surfaces.d.ts +54323 -0
  36. package/dist/surfaces.d.ts.map +1 -0
  37. package/dist/surfaces.js +523 -0
  38. package/dist/surfaces.js.map +1 -0
  39. package/dist/templates.d.ts +390 -0
  40. package/dist/templates.d.ts.map +1 -0
  41. package/dist/templates.js +493 -0
  42. package/dist/templates.js.map +1 -0
  43. package/package.json +50 -0
  44. package/src/apppacks.ts +90 -0
  45. package/src/blocks.ts +544 -0
  46. package/src/capabilities.ts +58 -0
  47. package/src/events.ts +758 -0
  48. package/src/index.ts +15 -0
  49. package/src/namespace.ts +64 -0
  50. package/src/plugins.ts +118 -0
  51. package/src/registry.ts +261 -0
  52. package/src/surfaces.ts +610 -0
  53. package/src/templates.ts +736 -0
@@ -0,0 +1,2320 @@
1
+ /**
2
+ * UI Blocks — 채팅 타임라인에 인라인 렌더되는 선언적 UI 스키마.
3
+ *
4
+ * 설계 원칙 (docs/custom-event-ui.md 참조):
5
+ * - 닫힌(화이트리스트) 컴포넌트 집합. 임의 HTML/코드 실행 없음.
6
+ * - 순수 데이터(JSON). 렌더는 @chatops/ui-blocks(React)가 담당.
7
+ * - 알 수 없는 블록 타입은 클라이언트가 안전한 fallback으로 렌더.
8
+ * - 권한은 절대 클라이언트가 아니라 appservice(서버측)가 재검증한다. 여기 disabled/confirm은 UX일 뿐.
9
+ *
10
+ * A2UI를 쓰지 않는 대신 우리가 통제하는 이 스키마를 쓴다. 향후 A2UI로 교체 시,
11
+ * 이벤트 타입(org.corp.ui.card)은 그대로 두고 payload만 바꿔 렌더러를 갈아끼운다.
12
+ */
13
+ import { z } from "zod";
14
+ export declare const ToneSchema: z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>;
15
+ export type Tone = z.infer<typeof ToneSchema>;
16
+ export declare const ButtonStyleSchema: z.ZodEnum<["default", "primary", "danger"]>;
17
+ export type ButtonStyle = z.infer<typeof ButtonStyleSchema>;
18
+ /** 파괴적 액션 전에 클라이언트가 띄우는 확인 다이얼로그. 서버도 별도로 HITL 재검증한다. */
19
+ export declare const ConfirmSchema: z.ZodObject<{
20
+ title: z.ZodString;
21
+ text: z.ZodString;
22
+ ok: z.ZodOptional<z.ZodString>;
23
+ cancel: z.ZodOptional<z.ZodString>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ title: string;
26
+ text: string;
27
+ ok?: string | undefined;
28
+ cancel?: string | undefined;
29
+ }, {
30
+ title: string;
31
+ text: string;
32
+ ok?: string | undefined;
33
+ cancel?: string | undefined;
34
+ }>;
35
+ export type Confirm = z.infer<typeof ConfirmSchema>;
36
+ export declare const TextBlockSchema: z.ZodObject<{
37
+ type: z.ZodLiteral<"text">;
38
+ text: z.ZodString;
39
+ /** true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지) */
40
+ markdown: z.ZodOptional<z.ZodBoolean>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ type: "text";
43
+ text: string;
44
+ markdown?: boolean | undefined;
45
+ }, {
46
+ type: "text";
47
+ text: string;
48
+ markdown?: boolean | undefined;
49
+ }>;
50
+ export declare const HeadingBlockSchema: z.ZodObject<{
51
+ type: z.ZodLiteral<"heading">;
52
+ text: z.ZodString;
53
+ level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ type: "heading";
56
+ text: string;
57
+ level?: 1 | 2 | 3 | undefined;
58
+ }, {
59
+ type: "heading";
60
+ text: string;
61
+ level?: 1 | 2 | 3 | undefined;
62
+ }>;
63
+ export declare const DividerBlockSchema: z.ZodObject<{
64
+ type: z.ZodLiteral<"divider">;
65
+ }, "strip", z.ZodTypeAny, {
66
+ type: "divider";
67
+ }, {
68
+ type: "divider";
69
+ }>;
70
+ export declare const FieldsBlockSchema: z.ZodObject<{
71
+ type: z.ZodLiteral<"fields">;
72
+ items: z.ZodArray<z.ZodObject<{
73
+ label: z.ZodString;
74
+ value: z.ZodString;
75
+ /** true면 2열 그리드에 좁게 배치 */
76
+ short: z.ZodOptional<z.ZodBoolean>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ value: string;
79
+ label: string;
80
+ short?: boolean | undefined;
81
+ }, {
82
+ value: string;
83
+ label: string;
84
+ short?: boolean | undefined;
85
+ }>, "many">;
86
+ }, "strip", z.ZodTypeAny, {
87
+ type: "fields";
88
+ items: {
89
+ value: string;
90
+ label: string;
91
+ short?: boolean | undefined;
92
+ }[];
93
+ }, {
94
+ type: "fields";
95
+ items: {
96
+ value: string;
97
+ label: string;
98
+ short?: boolean | undefined;
99
+ }[];
100
+ }>;
101
+ export declare const ImageBlockSchema: z.ZodObject<{
102
+ type: z.ZodLiteral<"image">;
103
+ /** https URL 또는 mxc:// (둘 중 하나 권장). 클라이언트가 출처를 검증한다. */
104
+ url: z.ZodOptional<z.ZodString>;
105
+ mxc: z.ZodOptional<z.ZodString>;
106
+ alt: z.ZodOptional<z.ZodString>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ type: "image";
109
+ url?: string | undefined;
110
+ mxc?: string | undefined;
111
+ alt?: string | undefined;
112
+ }, {
113
+ type: "image";
114
+ url?: string | undefined;
115
+ mxc?: string | undefined;
116
+ alt?: string | undefined;
117
+ }>;
118
+ export declare const ContextBlockSchema: z.ZodObject<{
119
+ type: z.ZodLiteral<"context">;
120
+ /** 작은 보조 텍스트/아이콘 줄 */
121
+ elements: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
122
+ icon: z.ZodString;
123
+ }, "strip", z.ZodTypeAny, {
124
+ icon: string;
125
+ }, {
126
+ icon: string;
127
+ }>, z.ZodObject<{
128
+ mxc: z.ZodString;
129
+ }, "strip", z.ZodTypeAny, {
130
+ mxc: string;
131
+ }, {
132
+ mxc: string;
133
+ }>]>, "many">;
134
+ }, "strip", z.ZodTypeAny, {
135
+ type: "context";
136
+ elements: (string | {
137
+ icon: string;
138
+ } | {
139
+ mxc: string;
140
+ })[];
141
+ }, {
142
+ type: "context";
143
+ elements: (string | {
144
+ icon: string;
145
+ } | {
146
+ mxc: string;
147
+ })[];
148
+ }>;
149
+ export declare const BadgeBlockSchema: z.ZodObject<{
150
+ type: z.ZodLiteral<"badge">;
151
+ text: z.ZodString;
152
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
153
+ }, "strip", z.ZodTypeAny, {
154
+ type: "badge";
155
+ text: string;
156
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
157
+ }, {
158
+ type: "badge";
159
+ text: string;
160
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
161
+ }>;
162
+ export declare const TableBlockSchema: z.ZodObject<{
163
+ type: z.ZodLiteral<"table">;
164
+ columns: z.ZodArray<z.ZodString, "many">;
165
+ rows: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
166
+ }, "strip", z.ZodTypeAny, {
167
+ type: "table";
168
+ columns: string[];
169
+ rows: string[][];
170
+ }, {
171
+ type: "table";
172
+ columns: string[];
173
+ rows: string[][];
174
+ }>;
175
+ export declare const InputBlockSchema: z.ZodObject<{
176
+ type: z.ZodLiteral<"input">;
177
+ name: z.ZodString;
178
+ /** date=날짜, datetime=날짜+시각(네이티브 datetime-local), time=시각만 — 모두 네이티브 피커로 렌더. */
179
+ input: z.ZodOptional<z.ZodEnum<["text", "textarea", "number", "date", "datetime", "time"]>>;
180
+ label: z.ZodOptional<z.ZodString>;
181
+ placeholder: z.ZodOptional<z.ZodString>;
182
+ required: z.ZodOptional<z.ZodBoolean>;
183
+ value: z.ZodOptional<z.ZodString>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ type: "input";
186
+ name: string;
187
+ value?: string | undefined;
188
+ label?: string | undefined;
189
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
190
+ placeholder?: string | undefined;
191
+ required?: boolean | undefined;
192
+ }, {
193
+ type: "input";
194
+ name: string;
195
+ value?: string | undefined;
196
+ label?: string | undefined;
197
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
198
+ placeholder?: string | undefined;
199
+ required?: boolean | undefined;
200
+ }>;
201
+ /** 토글(스위치) — checkbox 와 같은 불리언을 수집하되 on/off 스위치 어포던스로 렌더. */
202
+ export declare const ToggleBlockSchema: z.ZodObject<{
203
+ type: z.ZodLiteral<"toggle">;
204
+ name: z.ZodString;
205
+ label: z.ZodString;
206
+ checked: z.ZodOptional<z.ZodBoolean>;
207
+ /** 켜짐/꺼짐 보조 라벨(선택) — 스위치 옆 상태 텍스트. 색-only 회피용으로도 권장. */
208
+ onText: z.ZodOptional<z.ZodString>;
209
+ offText: z.ZodOptional<z.ZodString>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ type: "toggle";
212
+ label: string;
213
+ name: string;
214
+ checked?: boolean | undefined;
215
+ onText?: string | undefined;
216
+ offText?: string | undefined;
217
+ }, {
218
+ type: "toggle";
219
+ label: string;
220
+ name: string;
221
+ checked?: boolean | undefined;
222
+ onText?: string | undefined;
223
+ offText?: string | undefined;
224
+ }>;
225
+ export type ToggleBlock = z.infer<typeof ToggleBlockSchema>;
226
+ /**
227
+ * 슬라이더(범위 입력) — min~max 사이 정수 한 값을 끌어서 고른다. 값은 name 으로 폼에 number 로 수집.
228
+ * 와이어 canonical JSON 은 소수 금지 → min/max/step/value 모두 정수 강제(정도/임계/배분 등).
229
+ */
230
+ export declare const SliderBlockSchema: z.ZodObject<{
231
+ type: z.ZodLiteral<"slider">;
232
+ name: z.ZodString;
233
+ label: z.ZodOptional<z.ZodString>;
234
+ /** 하한(기본 0). */
235
+ min: z.ZodOptional<z.ZodNumber>;
236
+ /** 상한(기본 100). */
237
+ max: z.ZodOptional<z.ZodNumber>;
238
+ /** 증감 단위(기본 1). */
239
+ step: z.ZodOptional<z.ZodNumber>;
240
+ value: z.ZodOptional<z.ZodNumber>;
241
+ /** 현재값 옆 접미(예: "%", "건"). */
242
+ unit: z.ZodOptional<z.ZodString>;
243
+ }, "strip", z.ZodTypeAny, {
244
+ type: "slider";
245
+ name: string;
246
+ value?: number | undefined;
247
+ label?: string | undefined;
248
+ min?: number | undefined;
249
+ max?: number | undefined;
250
+ step?: number | undefined;
251
+ unit?: string | undefined;
252
+ }, {
253
+ type: "slider";
254
+ name: string;
255
+ value?: number | undefined;
256
+ label?: string | undefined;
257
+ min?: number | undefined;
258
+ max?: number | undefined;
259
+ step?: number | undefined;
260
+ unit?: string | undefined;
261
+ }>;
262
+ export type SliderBlock = z.infer<typeof SliderBlockSchema>;
263
+ /** 단일 선택 라디오 그룹. select 와 달리 옵션이 펼쳐져 보인다. */
264
+ export declare const RadioBlockSchema: z.ZodObject<{
265
+ type: z.ZodLiteral<"radio">;
266
+ name: z.ZodString;
267
+ label: z.ZodOptional<z.ZodString>;
268
+ options: z.ZodArray<z.ZodObject<{
269
+ value: z.ZodString;
270
+ label: z.ZodString;
271
+ }, "strip", z.ZodTypeAny, {
272
+ value: string;
273
+ label: string;
274
+ }, {
275
+ value: string;
276
+ label: string;
277
+ }>, "many">;
278
+ value: z.ZodOptional<z.ZodString>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ options: {
281
+ value: string;
282
+ label: string;
283
+ }[];
284
+ type: "radio";
285
+ name: string;
286
+ value?: string | undefined;
287
+ label?: string | undefined;
288
+ }, {
289
+ options: {
290
+ value: string;
291
+ label: string;
292
+ }[];
293
+ type: "radio";
294
+ name: string;
295
+ value?: string | undefined;
296
+ label?: string | undefined;
297
+ }>;
298
+ export declare const SelectBlockSchema: z.ZodObject<{
299
+ type: z.ZodLiteral<"select">;
300
+ name: z.ZodString;
301
+ label: z.ZodOptional<z.ZodString>;
302
+ placeholder: z.ZodOptional<z.ZodString>;
303
+ options: z.ZodArray<z.ZodObject<{
304
+ value: z.ZodString;
305
+ label: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ value: string;
308
+ label: string;
309
+ }, {
310
+ value: string;
311
+ label: string;
312
+ }>, "many">;
313
+ value: z.ZodOptional<z.ZodString>;
314
+ multi: z.ZodOptional<z.ZodBoolean>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ options: {
317
+ value: string;
318
+ label: string;
319
+ }[];
320
+ type: "select";
321
+ name: string;
322
+ value?: string | undefined;
323
+ label?: string | undefined;
324
+ placeholder?: string | undefined;
325
+ multi?: boolean | undefined;
326
+ }, {
327
+ options: {
328
+ value: string;
329
+ label: string;
330
+ }[];
331
+ type: "select";
332
+ name: string;
333
+ value?: string | undefined;
334
+ label?: string | undefined;
335
+ placeholder?: string | undefined;
336
+ multi?: boolean | undefined;
337
+ }>;
338
+ export declare const CheckboxBlockSchema: z.ZodObject<{
339
+ type: z.ZodLiteral<"checkbox">;
340
+ name: z.ZodString;
341
+ label: z.ZodString;
342
+ checked: z.ZodOptional<z.ZodBoolean>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ type: "checkbox";
345
+ label: string;
346
+ name: string;
347
+ checked?: boolean | undefined;
348
+ }, {
349
+ type: "checkbox";
350
+ label: string;
351
+ name: string;
352
+ checked?: boolean | undefined;
353
+ }>;
354
+ export declare const ButtonBlockSchema: z.ZodObject<{
355
+ type: z.ZodLiteral<"button">;
356
+ /** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
357
+ action_id: z.ZodString;
358
+ text: z.ZodString;
359
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
360
+ /** 버튼 고유 페이로드 (폼 값과 별개로 함께 전송) */
361
+ value: z.ZodOptional<z.ZodString>;
362
+ confirm: z.ZodOptional<z.ZodObject<{
363
+ title: z.ZodString;
364
+ text: z.ZodString;
365
+ ok: z.ZodOptional<z.ZodString>;
366
+ cancel: z.ZodOptional<z.ZodString>;
367
+ }, "strip", z.ZodTypeAny, {
368
+ title: string;
369
+ text: string;
370
+ ok?: string | undefined;
371
+ cancel?: string | undefined;
372
+ }, {
373
+ title: string;
374
+ text: string;
375
+ ok?: string | undefined;
376
+ cancel?: string | undefined;
377
+ }>>;
378
+ disabled: z.ZodOptional<z.ZodBoolean>;
379
+ }, "strip", z.ZodTypeAny, {
380
+ type: "button";
381
+ text: string;
382
+ action_id: string;
383
+ value?: string | undefined;
384
+ style?: "danger" | "default" | "primary" | undefined;
385
+ confirm?: {
386
+ title: string;
387
+ text: string;
388
+ ok?: string | undefined;
389
+ cancel?: string | undefined;
390
+ } | undefined;
391
+ disabled?: boolean | undefined;
392
+ }, {
393
+ type: "button";
394
+ text: string;
395
+ action_id: string;
396
+ value?: string | undefined;
397
+ style?: "danger" | "default" | "primary" | undefined;
398
+ confirm?: {
399
+ title: string;
400
+ text: string;
401
+ ok?: string | undefined;
402
+ cancel?: string | undefined;
403
+ } | undefined;
404
+ disabled?: boolean | undefined;
405
+ }>;
406
+ export type ButtonBlock = z.infer<typeof ButtonBlockSchema>;
407
+ /**
408
+ * 링크 버튼 — action_id 로 회신하는 button 과 달리, https URL 로 이동만 한다(서버 왕복 없음).
409
+ * "Approve"(button, 액션) 옆에 "View PR"(linkButton, 이동)을 같은 줄에 두는 식. 출처는 클라가 검증.
410
+ */
411
+ export declare const LinkButtonBlockSchema: z.ZodObject<{
412
+ type: z.ZodLiteral<"linkButton">;
413
+ text: z.ZodString;
414
+ /** 이동할 https URL. 클라이언트가 출처를 검증(아니면 비활성 표시). */
415
+ url: z.ZodString;
416
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
417
+ /** 새 탭으로 열기(기본 true). */
418
+ external: z.ZodOptional<z.ZodBoolean>;
419
+ }, "strip", z.ZodTypeAny, {
420
+ type: "linkButton";
421
+ text: string;
422
+ url: string;
423
+ style?: "danger" | "default" | "primary" | undefined;
424
+ external?: boolean | undefined;
425
+ }, {
426
+ type: "linkButton";
427
+ text: string;
428
+ url: string;
429
+ style?: "danger" | "default" | "primary" | undefined;
430
+ external?: boolean | undefined;
431
+ }>;
432
+ export type LinkButtonBlock = z.infer<typeof LinkButtonBlockSchema>;
433
+ /** 버튼 한 줄 묶음 — 액션 버튼(button)과 링크 버튼(linkButton)을 섞어 배치 가능. */
434
+ export declare const ActionsBlockSchema: z.ZodObject<{
435
+ type: z.ZodLiteral<"actions">;
436
+ elements: z.ZodArray<z.ZodUnion<[z.ZodObject<{
437
+ type: z.ZodLiteral<"button">;
438
+ /** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
439
+ action_id: z.ZodString;
440
+ text: z.ZodString;
441
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
442
+ /** 버튼 고유 페이로드 (폼 값과 별개로 함께 전송) */
443
+ value: z.ZodOptional<z.ZodString>;
444
+ confirm: z.ZodOptional<z.ZodObject<{
445
+ title: z.ZodString;
446
+ text: z.ZodString;
447
+ ok: z.ZodOptional<z.ZodString>;
448
+ cancel: z.ZodOptional<z.ZodString>;
449
+ }, "strip", z.ZodTypeAny, {
450
+ title: string;
451
+ text: string;
452
+ ok?: string | undefined;
453
+ cancel?: string | undefined;
454
+ }, {
455
+ title: string;
456
+ text: string;
457
+ ok?: string | undefined;
458
+ cancel?: string | undefined;
459
+ }>>;
460
+ disabled: z.ZodOptional<z.ZodBoolean>;
461
+ }, "strip", z.ZodTypeAny, {
462
+ type: "button";
463
+ text: string;
464
+ action_id: string;
465
+ value?: string | undefined;
466
+ style?: "danger" | "default" | "primary" | undefined;
467
+ confirm?: {
468
+ title: string;
469
+ text: string;
470
+ ok?: string | undefined;
471
+ cancel?: string | undefined;
472
+ } | undefined;
473
+ disabled?: boolean | undefined;
474
+ }, {
475
+ type: "button";
476
+ text: string;
477
+ action_id: string;
478
+ value?: string | undefined;
479
+ style?: "danger" | "default" | "primary" | undefined;
480
+ confirm?: {
481
+ title: string;
482
+ text: string;
483
+ ok?: string | undefined;
484
+ cancel?: string | undefined;
485
+ } | undefined;
486
+ disabled?: boolean | undefined;
487
+ }>, z.ZodObject<{
488
+ type: z.ZodLiteral<"linkButton">;
489
+ text: z.ZodString;
490
+ /** 이동할 https URL. 클라이언트가 출처를 검증(아니면 비활성 표시). */
491
+ url: z.ZodString;
492
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
493
+ /** 새 탭으로 열기(기본 true). */
494
+ external: z.ZodOptional<z.ZodBoolean>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ type: "linkButton";
497
+ text: string;
498
+ url: string;
499
+ style?: "danger" | "default" | "primary" | undefined;
500
+ external?: boolean | undefined;
501
+ }, {
502
+ type: "linkButton";
503
+ text: string;
504
+ url: string;
505
+ style?: "danger" | "default" | "primary" | undefined;
506
+ external?: boolean | undefined;
507
+ }>]>, "many">;
508
+ }, "strip", z.ZodTypeAny, {
509
+ type: "actions";
510
+ elements: ({
511
+ type: "button";
512
+ text: string;
513
+ action_id: string;
514
+ value?: string | undefined;
515
+ style?: "danger" | "default" | "primary" | undefined;
516
+ confirm?: {
517
+ title: string;
518
+ text: string;
519
+ ok?: string | undefined;
520
+ cancel?: string | undefined;
521
+ } | undefined;
522
+ disabled?: boolean | undefined;
523
+ } | {
524
+ type: "linkButton";
525
+ text: string;
526
+ url: string;
527
+ style?: "danger" | "default" | "primary" | undefined;
528
+ external?: boolean | undefined;
529
+ })[];
530
+ }, {
531
+ type: "actions";
532
+ elements: ({
533
+ type: "button";
534
+ text: string;
535
+ action_id: string;
536
+ value?: string | undefined;
537
+ style?: "danger" | "default" | "primary" | undefined;
538
+ confirm?: {
539
+ title: string;
540
+ text: string;
541
+ ok?: string | undefined;
542
+ cancel?: string | undefined;
543
+ } | undefined;
544
+ disabled?: boolean | undefined;
545
+ } | {
546
+ type: "linkButton";
547
+ text: string;
548
+ url: string;
549
+ style?: "danger" | "default" | "primary" | undefined;
550
+ external?: boolean | undefined;
551
+ })[];
552
+ }>;
553
+ /**
554
+ * 오버플로 메뉴 — "⋯" 트리거를 누르면 액션 항목 목록이 팝오버로 열린다(공간 절약형 액션 묶음).
555
+ * 각 항목은 button 과 동일하게 action_id 로 회신하고 confirm(파괴적 액션 확인)도 지원.
556
+ * 권한은 항상 서버가 재검증 — disabled/confirm 은 UX 일 뿐(button 과 동일 자세).
557
+ */
558
+ export declare const OverflowBlockSchema: z.ZodObject<{
559
+ type: z.ZodLiteral<"overflow">;
560
+ /** 트리거 접근성 라벨(기본 "More actions"). */
561
+ label: z.ZodOptional<z.ZodString>;
562
+ items: z.ZodArray<z.ZodObject<{
563
+ action_id: z.ZodString;
564
+ text: z.ZodString;
565
+ value: z.ZodOptional<z.ZodString>;
566
+ /** danger 항목 강조(삭제 등). */
567
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
568
+ confirm: z.ZodOptional<z.ZodObject<{
569
+ title: z.ZodString;
570
+ text: z.ZodString;
571
+ ok: z.ZodOptional<z.ZodString>;
572
+ cancel: z.ZodOptional<z.ZodString>;
573
+ }, "strip", z.ZodTypeAny, {
574
+ title: string;
575
+ text: string;
576
+ ok?: string | undefined;
577
+ cancel?: string | undefined;
578
+ }, {
579
+ title: string;
580
+ text: string;
581
+ ok?: string | undefined;
582
+ cancel?: string | undefined;
583
+ }>>;
584
+ disabled: z.ZodOptional<z.ZodBoolean>;
585
+ }, "strip", z.ZodTypeAny, {
586
+ text: string;
587
+ action_id: string;
588
+ value?: string | undefined;
589
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
590
+ confirm?: {
591
+ title: string;
592
+ text: string;
593
+ ok?: string | undefined;
594
+ cancel?: string | undefined;
595
+ } | undefined;
596
+ disabled?: boolean | undefined;
597
+ }, {
598
+ text: string;
599
+ action_id: string;
600
+ value?: string | undefined;
601
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
602
+ confirm?: {
603
+ title: string;
604
+ text: string;
605
+ ok?: string | undefined;
606
+ cancel?: string | undefined;
607
+ } | undefined;
608
+ disabled?: boolean | undefined;
609
+ }>, "many">;
610
+ }, "strip", z.ZodTypeAny, {
611
+ type: "overflow";
612
+ items: {
613
+ text: string;
614
+ action_id: string;
615
+ value?: string | undefined;
616
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
617
+ confirm?: {
618
+ title: string;
619
+ text: string;
620
+ ok?: string | undefined;
621
+ cancel?: string | undefined;
622
+ } | undefined;
623
+ disabled?: boolean | undefined;
624
+ }[];
625
+ label?: string | undefined;
626
+ }, {
627
+ type: "overflow";
628
+ items: {
629
+ text: string;
630
+ action_id: string;
631
+ value?: string | undefined;
632
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
633
+ confirm?: {
634
+ title: string;
635
+ text: string;
636
+ ok?: string | undefined;
637
+ cancel?: string | undefined;
638
+ } | undefined;
639
+ disabled?: boolean | undefined;
640
+ }[];
641
+ label?: string | undefined;
642
+ }>;
643
+ export type OverflowBlock = z.infer<typeof OverflowBlockSchema>;
644
+ /** 진행률 바 (0~100). 에이전트가 m.replace 편집으로 갱신해 "스트리밍" 진행 표시 가능. */
645
+ export declare const ProgressBlockSchema: z.ZodObject<{
646
+ type: z.ZodLiteral<"progress">;
647
+ /** 0~100 백분율(정수). 생략하면 indeterminate(불확정) 표시. 와이어 canonical JSON 은 소수 금지 → int 강제. */
648
+ value: z.ZodOptional<z.ZodNumber>;
649
+ label: z.ZodOptional<z.ZodString>;
650
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
651
+ }, "strip", z.ZodTypeAny, {
652
+ type: "progress";
653
+ value?: number | undefined;
654
+ label?: string | undefined;
655
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
656
+ }, {
657
+ type: "progress";
658
+ value?: number | undefined;
659
+ label?: string | undefined;
660
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
661
+ }>;
662
+ /** 멀티스텝 진행 상태 표시(타임라인). 폼 마법사와 별개로, 작업 단계 시각화에 쓴다. */
663
+ export declare const StepsBlockSchema: z.ZodObject<{
664
+ type: z.ZodLiteral<"steps">;
665
+ items: z.ZodArray<z.ZodObject<{
666
+ label: z.ZodString;
667
+ status: z.ZodOptional<z.ZodEnum<["done", "active", "todo", "error"]>>;
668
+ note: z.ZodOptional<z.ZodString>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ label: string;
671
+ status?: "done" | "active" | "todo" | "error" | undefined;
672
+ note?: string | undefined;
673
+ }, {
674
+ label: string;
675
+ status?: "done" | "active" | "todo" | "error" | undefined;
676
+ note?: string | undefined;
677
+ }>, "many">;
678
+ }, "strip", z.ZodTypeAny, {
679
+ type: "steps";
680
+ items: {
681
+ label: string;
682
+ status?: "done" | "active" | "todo" | "error" | undefined;
683
+ note?: string | undefined;
684
+ }[];
685
+ }, {
686
+ type: "steps";
687
+ items: {
688
+ label: string;
689
+ status?: "done" | "active" | "todo" | "error" | undefined;
690
+ note?: string | undefined;
691
+ }[];
692
+ }>;
693
+ /** 코드/JSON 표시 블록 (읽기 전용, 안전하게 escape 되어 렌더). */
694
+ export declare const CodeBlockSchema: z.ZodObject<{
695
+ type: z.ZodLiteral<"code">;
696
+ code: z.ZodString;
697
+ language: z.ZodOptional<z.ZodString>;
698
+ }, "strip", z.ZodTypeAny, {
699
+ code: string;
700
+ type: "code";
701
+ language?: string | undefined;
702
+ }, {
703
+ code: string;
704
+ type: "code";
705
+ language?: string | undefined;
706
+ }>;
707
+ /**
708
+ * 코드 diff 블록 — unified patch(통합 diff) 텍스트를 줄 단위(추가/삭제/hunk/문맥)로 색칠해 표시.
709
+ * 입력은 SCM API 가 주는 그대로의 patch 문자열이고, 렌더러가 줄 첫 글자로 분류한다(표시 전용, escape,
710
+ * 임의 코드/HTML 없음 — code 블록과 같은 닫힌 자세). PR 리뷰처럼 "무엇이 바뀌었나"를 인라인으로 보여줄 때.
711
+ * 권위 데이터(전체 diff)는 url 로 재조회 — 여기 patch 는 리뷰용 표시 스냅샷이다.
712
+ */
713
+ export declare const DiffBlockSchema: z.ZodObject<{
714
+ type: z.ZodLiteral<"diff">;
715
+ /** 파일 경로/제목(헤더에 표시). */
716
+ filename: z.ZodOptional<z.ZodString>;
717
+ /** unified diff(patch) 텍스트. 렌더러가 줄별로 +(add)/-(del)/@@(hunk)/그 외(context)로 분류. */
718
+ patch: z.ZodString;
719
+ /** 변경 통계(선택) — 헤더에 +N / -M 으로 표시. */
720
+ additions: z.ZodOptional<z.ZodNumber>;
721
+ deletions: z.ZodOptional<z.ZodNumber>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ type: "diff";
724
+ patch: string;
725
+ filename?: string | undefined;
726
+ additions?: number | undefined;
727
+ deletions?: number | undefined;
728
+ }, {
729
+ type: "diff";
730
+ patch: string;
731
+ filename?: string | undefined;
732
+ additions?: number | undefined;
733
+ deletions?: number | undefined;
734
+ }>;
735
+ export type DiffBlock = z.infer<typeof DiffBlockSchema>;
736
+ /**
737
+ * 파일/첨부 블록 — 단일 첨부(문서·이미지·아카이브)를 이름·크기·종류·다운로드로 표시.
738
+ * image 블록이 "본문에 펼쳐 보이는 그림"이라면, file 은 "다운로드 가능한 첨부 타일"이다(승인/재무/문서 흐름).
739
+ * url(https) 있으면 다운로드 링크, 없으면 정보 타일. mxc 는 인증 미디어(호스트 해석) — 출처는 클라가 검증.
740
+ */
741
+ export declare const FileBlockSchema: z.ZodObject<{
742
+ type: z.ZodLiteral<"file">;
743
+ /** 파일명(표시). */
744
+ name: z.ZodString;
745
+ /** 바이트 크기(선택) — 렌더러가 KB/MB 로 표시. */
746
+ size: z.ZodOptional<z.ZodNumber>;
747
+ /** MIME 또는 확장자 힌트(아이콘/라벨). 예: "application/pdf", "png". */
748
+ mime: z.ZodOptional<z.ZodString>;
749
+ /** 다운로드 https URL(선택). 출처는 클라가 검증. */
750
+ url: z.ZodOptional<z.ZodString>;
751
+ /** mxc:// (선택) — 인증 미디어. 호스트가 해석. */
752
+ mxc: z.ZodOptional<z.ZodString>;
753
+ /** 보조 설명(선택). */
754
+ caption: z.ZodOptional<z.ZodString>;
755
+ }, "strip", z.ZodTypeAny, {
756
+ type: "file";
757
+ name: string;
758
+ url?: string | undefined;
759
+ mxc?: string | undefined;
760
+ size?: number | undefined;
761
+ mime?: string | undefined;
762
+ caption?: string | undefined;
763
+ }, {
764
+ type: "file";
765
+ name: string;
766
+ url?: string | undefined;
767
+ mxc?: string | undefined;
768
+ size?: number | undefined;
769
+ mime?: string | undefined;
770
+ caption?: string | undefined;
771
+ }>;
772
+ export type FileBlock = z.infer<typeof FileBlockSchema>;
773
+ /**
774
+ * 단일 지표(KPI) 블록 — 임팩트/공정률을 1급으로 표시.
775
+ * value(현재) + 선택 target(기준/목표)·delta(증감)·tone. "현재 / 목표 + 델타" 형태로 렌더.
776
+ */
777
+ export declare const MetricBlockSchema: z.ZodObject<{
778
+ type: z.ZodLiteral<"metric">;
779
+ label: z.ZodString;
780
+ value: z.ZodString;
781
+ /** 기준/목표값 (선택) — value 와 함께 "현재 / 목표"로 표시 */
782
+ target: z.ZodOptional<z.ZodString>;
783
+ /** 증감 표시 (예: "+12") */
784
+ delta: z.ZodOptional<z.ZodString>;
785
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
786
+ }, "strip", z.ZodTypeAny, {
787
+ value: string;
788
+ type: "metric";
789
+ label: string;
790
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
791
+ target?: string | undefined;
792
+ delta?: string | undefined;
793
+ }, {
794
+ value: string;
795
+ type: "metric";
796
+ label: string;
797
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
798
+ target?: string | undefined;
799
+ delta?: string | undefined;
800
+ }>;
801
+ /**
802
+ * 차트 블록 — 인라인 데이터 시각화(스파크라인/막대/꺾은선/도넛).
803
+ * 정적 SVG 로 렌더(임의 JS·HTML 없음, 닫힌 집합). data[] 는 값 묶음이고 variant 가 모양을 정한다.
804
+ * 무거운/인터랙티브 차트(대시보드·BI)는 여전히 widget 탈출구를 쓴다 — 이건 "가벼운 1급 시각화".
805
+ */
806
+ export declare const ChartBlockSchema: z.ZodObject<{
807
+ type: z.ZodLiteral<"chart">;
808
+ variant: z.ZodEnum<["sparkline", "bar", "line", "donut"]>;
809
+ /** 데이터 포인트. sparkline/line 은 순서대로 잇고, bar/donut 은 각 항목이 막대/조각이 된다. */
810
+ data: z.ZodArray<z.ZodObject<{
811
+ label: z.ZodOptional<z.ZodString>;
812
+ value: z.ZodNumber;
813
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
814
+ }, "strip", z.ZodTypeAny, {
815
+ value: number;
816
+ label?: string | undefined;
817
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
818
+ }, {
819
+ value: number;
820
+ label?: string | undefined;
821
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
822
+ }>, "many">;
823
+ /** 접근성/표시용 캡션(차트 제목). */
824
+ caption: z.ZodOptional<z.ZodString>;
825
+ /** bar/sparkline/line 스케일 상한(생략 시 데이터 최대값). donut 은 합계 기준이라 무시. */
826
+ max: z.ZodOptional<z.ZodNumber>;
827
+ /** 값 단위(예: "%", "건") — 표시 보조. */
828
+ unit: z.ZodOptional<z.ZodString>;
829
+ }, "strip", z.ZodTypeAny, {
830
+ type: "chart";
831
+ variant: "sparkline" | "bar" | "line" | "donut";
832
+ data: {
833
+ value: number;
834
+ label?: string | undefined;
835
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
836
+ }[];
837
+ max?: number | undefined;
838
+ unit?: string | undefined;
839
+ caption?: string | undefined;
840
+ }, {
841
+ type: "chart";
842
+ variant: "sparkline" | "bar" | "line" | "donut";
843
+ data: {
844
+ value: number;
845
+ label?: string | undefined;
846
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
847
+ }[];
848
+ max?: number | undefined;
849
+ unit?: string | undefined;
850
+ caption?: string | undefined;
851
+ }>;
852
+ export type ChartBlock = z.infer<typeof ChartBlockSchema>;
853
+ /** 단일 아바타 — 얼굴 동그라미(이미지/이니셜) + 이름·보조텍스트 + 상태점. 담당자 표시. */
854
+ export declare const AvatarBlockSchema: z.ZodObject<{
855
+ type: z.ZodLiteral<"avatar">;
856
+ name: z.ZodString;
857
+ initials: z.ZodOptional<z.ZodString>;
858
+ color: z.ZodOptional<z.ZodString>;
859
+ src: z.ZodOptional<z.ZodString>;
860
+ subtitle: z.ZodOptional<z.ZodString>;
861
+ status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
862
+ }, "strip", z.ZodTypeAny, {
863
+ type: "avatar";
864
+ name: string;
865
+ status?: "online" | "away" | "busy" | "offline" | undefined;
866
+ initials?: string | undefined;
867
+ color?: string | undefined;
868
+ src?: string | undefined;
869
+ subtitle?: string | undefined;
870
+ }, {
871
+ type: "avatar";
872
+ name: string;
873
+ status?: "online" | "away" | "busy" | "offline" | undefined;
874
+ initials?: string | undefined;
875
+ color?: string | undefined;
876
+ src?: string | undefined;
877
+ subtitle?: string | undefined;
878
+ }>;
879
+ export type AvatarBlock = z.infer<typeof AvatarBlockSchema>;
880
+ /** 아바타 묶음 — 겹쳐 쌓고 max 초과분은 +N. 리뷰어·참여자 표시. */
881
+ export declare const AvatarGroupBlockSchema: z.ZodObject<{
882
+ type: z.ZodLiteral<"avatarGroup">;
883
+ people: z.ZodArray<z.ZodObject<{
884
+ name: z.ZodString;
885
+ /** 이니셜(미지정 시 name 에서 자동 생성). */
886
+ initials: z.ZodOptional<z.ZodString>;
887
+ /** 배경색(CSS 색/토큰). 미지정 시 name 해시로 팔레트에서 고름. */
888
+ color: z.ZodOptional<z.ZodString>;
889
+ /** 이미지 URL(https). 있으면 이미지, 없으면 이니셜. */
890
+ src: z.ZodOptional<z.ZodString>;
891
+ }, "strip", z.ZodTypeAny, {
892
+ name: string;
893
+ initials?: string | undefined;
894
+ color?: string | undefined;
895
+ src?: string | undefined;
896
+ }, {
897
+ name: string;
898
+ initials?: string | undefined;
899
+ color?: string | undefined;
900
+ src?: string | undefined;
901
+ }>, "many">;
902
+ /** 앞에서 몇 명까지 보일지(기본 5). 나머지는 +N. */
903
+ max: z.ZodOptional<z.ZodNumber>;
904
+ label: z.ZodOptional<z.ZodString>;
905
+ }, "strip", z.ZodTypeAny, {
906
+ type: "avatarGroup";
907
+ people: {
908
+ name: string;
909
+ initials?: string | undefined;
910
+ color?: string | undefined;
911
+ src?: string | undefined;
912
+ }[];
913
+ label?: string | undefined;
914
+ max?: number | undefined;
915
+ }, {
916
+ type: "avatarGroup";
917
+ people: {
918
+ name: string;
919
+ initials?: string | undefined;
920
+ color?: string | undefined;
921
+ src?: string | undefined;
922
+ }[];
923
+ label?: string | undefined;
924
+ max?: number | undefined;
925
+ }>;
926
+ export type AvatarGroupBlock = z.infer<typeof AvatarGroupBlockSchema>;
927
+ /** 게이지 — 점수·리스크를 반원 아크로(0~max). 중앙에 값. */
928
+ export declare const GaugeBlockSchema: z.ZodObject<{
929
+ type: z.ZodLiteral<"gauge">;
930
+ value: z.ZodNumber;
931
+ /** 스케일 상한(기본 100). */
932
+ max: z.ZodOptional<z.ZodNumber>;
933
+ /** 스케일 하한(기본 0). */
934
+ min: z.ZodOptional<z.ZodNumber>;
935
+ label: z.ZodOptional<z.ZodString>;
936
+ /** 중앙 값 접미(예: "%", "점"). */
937
+ unit: z.ZodOptional<z.ZodString>;
938
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
939
+ }, "strip", z.ZodTypeAny, {
940
+ value: number;
941
+ type: "gauge";
942
+ label?: string | undefined;
943
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
944
+ min?: number | undefined;
945
+ max?: number | undefined;
946
+ unit?: string | undefined;
947
+ }, {
948
+ value: number;
949
+ type: "gauge";
950
+ label?: string | undefined;
951
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
952
+ min?: number | undefined;
953
+ max?: number | undefined;
954
+ unit?: string | undefined;
955
+ }>;
956
+ export type GaugeBlock = z.infer<typeof GaugeBlockSchema>;
957
+ /** 별점 — value/max 를 심볼(★/●)로. 정확값은 숫자로 병기. */
958
+ export declare const RatingBlockSchema: z.ZodObject<{
959
+ type: z.ZodLiteral<"rating">;
960
+ value: z.ZodNumber;
961
+ /** 만점(기본 5). */
962
+ max: z.ZodOptional<z.ZodNumber>;
963
+ label: z.ZodOptional<z.ZodString>;
964
+ /** 심볼 모양(기본 star). */
965
+ symbol: z.ZodOptional<z.ZodEnum<["star", "dot"]>>;
966
+ }, "strip", z.ZodTypeAny, {
967
+ value: number;
968
+ type: "rating";
969
+ symbol?: "star" | "dot" | undefined;
970
+ label?: string | undefined;
971
+ max?: number | undefined;
972
+ }, {
973
+ value: number;
974
+ type: "rating";
975
+ symbol?: "star" | "dot" | undefined;
976
+ label?: string | undefined;
977
+ max?: number | undefined;
978
+ }>;
979
+ export type RatingBlock = z.infer<typeof RatingBlockSchema>;
980
+ /** 콜아웃 — 톤 강조 박스(정보/경고/위험 등). 선택 제목 + 본문 + 아이콘. */
981
+ export declare const CalloutBlockSchema: z.ZodObject<{
982
+ type: z.ZodLiteral<"callout">;
983
+ text: z.ZodString;
984
+ title: z.ZodOptional<z.ZodString>;
985
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
986
+ /** 아이콘 글리프(이모지/문자). 미지정 시 tone 기본 아이콘. */
987
+ icon: z.ZodOptional<z.ZodString>;
988
+ }, "strip", z.ZodTypeAny, {
989
+ type: "callout";
990
+ text: string;
991
+ title?: string | undefined;
992
+ icon?: string | undefined;
993
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
994
+ }, {
995
+ type: "callout";
996
+ text: string;
997
+ title?: string | undefined;
998
+ icon?: string | undefined;
999
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1000
+ }>;
1001
+ export type CalloutBlock = z.infer<typeof CalloutBlockSchema>;
1002
+ /** 엔티티 참조 칩 — 엔티티(송장·리드·repo…)로의 라벨/링크 칩. url 있으면 링크. */
1003
+ export declare const EntityRefBlockSchema: z.ZodObject<{
1004
+ type: z.ZodLiteral<"entityRef">;
1005
+ label: z.ZodString;
1006
+ /** 엔티티 종류(예: "invoice","lead","repo") — 작은 종류 태그. */
1007
+ entity: z.ZodOptional<z.ZodString>;
1008
+ /** 클릭 시 이동할 https URL(있으면 링크, 출처는 클라가 검증). */
1009
+ url: z.ZodOptional<z.ZodString>;
1010
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ type: "entityRef";
1013
+ label: string;
1014
+ url?: string | undefined;
1015
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1016
+ entity?: string | undefined;
1017
+ }, {
1018
+ type: "entityRef";
1019
+ label: string;
1020
+ url?: string | undefined;
1021
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1022
+ entity?: string | undefined;
1023
+ }>;
1024
+ export type EntityRefBlock = z.infer<typeof EntityRefBlockSchema>;
1025
+ /**
1026
+ * 칸반 보드 — 정적 표시 블록(닫힌 유니온). 컬럼(상태/스테이지)별 카드 묶음.
1027
+ * 선택/드래그/클릭 액션 없음(표시 전용 — 인터랙션은 후속/위젯). 보드(컬럼+카드)는 템플릿 조합으로
1028
+ * 표현 불가 → 코어 블록 프리미티브가 정당(P4-2). 어떤 도메인의 보드든 범용으로 쓴다.
1029
+ */
1030
+ export declare const KanbanBlockSchema: z.ZodObject<{
1031
+ type: z.ZodLiteral<"kanban">;
1032
+ columns: z.ZodArray<z.ZodObject<{
1033
+ id: z.ZodString;
1034
+ title: z.ZodString;
1035
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1036
+ cards: z.ZodArray<z.ZodObject<{
1037
+ id: z.ZodString;
1038
+ title: z.ZodString;
1039
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1040
+ /** 보조행(라벨/담당 등) — 카드 제목 아래 표시. */
1041
+ meta: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1042
+ badge: z.ZodOptional<z.ZodObject<{
1043
+ label: z.ZodString;
1044
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1045
+ }, "strip", z.ZodTypeAny, {
1046
+ label: string;
1047
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1048
+ }, {
1049
+ label: string;
1050
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1051
+ }>>;
1052
+ }, "strip", z.ZodTypeAny, {
1053
+ title: string;
1054
+ id: string;
1055
+ badge?: {
1056
+ label: string;
1057
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1058
+ } | undefined;
1059
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1060
+ meta?: string[] | undefined;
1061
+ }, {
1062
+ title: string;
1063
+ id: string;
1064
+ badge?: {
1065
+ label: string;
1066
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1067
+ } | undefined;
1068
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1069
+ meta?: string[] | undefined;
1070
+ }>, "many">;
1071
+ }, "strip", z.ZodTypeAny, {
1072
+ title: string;
1073
+ id: string;
1074
+ cards: {
1075
+ title: string;
1076
+ id: string;
1077
+ badge?: {
1078
+ label: string;
1079
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1080
+ } | undefined;
1081
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1082
+ meta?: string[] | undefined;
1083
+ }[];
1084
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1085
+ }, {
1086
+ title: string;
1087
+ id: string;
1088
+ cards: {
1089
+ title: string;
1090
+ id: string;
1091
+ badge?: {
1092
+ label: string;
1093
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1094
+ } | undefined;
1095
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1096
+ meta?: string[] | undefined;
1097
+ }[];
1098
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1099
+ }>, "many">;
1100
+ caption: z.ZodOptional<z.ZodString>;
1101
+ }, "strip", z.ZodTypeAny, {
1102
+ type: "kanban";
1103
+ columns: {
1104
+ title: string;
1105
+ id: string;
1106
+ cards: {
1107
+ title: string;
1108
+ id: string;
1109
+ badge?: {
1110
+ label: string;
1111
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1112
+ } | undefined;
1113
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1114
+ meta?: string[] | undefined;
1115
+ }[];
1116
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1117
+ }[];
1118
+ caption?: string | undefined;
1119
+ }, {
1120
+ type: "kanban";
1121
+ columns: {
1122
+ title: string;
1123
+ id: string;
1124
+ cards: {
1125
+ title: string;
1126
+ id: string;
1127
+ badge?: {
1128
+ label: string;
1129
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1130
+ } | undefined;
1131
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1132
+ meta?: string[] | undefined;
1133
+ }[];
1134
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1135
+ }[];
1136
+ caption?: string | undefined;
1137
+ }>;
1138
+ export type KanbanBlock = z.infer<typeof KanbanBlockSchema>;
1139
+ /**
1140
+ * 카운트다운 — 마감 타임스탬프까지 남은 시간을 라이브로 보여주는 표시 블록(닫힌 유니온).
1141
+ * 값(target ISO 타임스탬프)은 정적 데이터지만 렌더러가 매초 남은 시간을 계산·갱신("라이브 틱") →
1142
+ * 정적 metric("resolve by HH:MM")으로 표현 불가하므로 블록이 정당(P4-3). SLA/SLO 위반까지 남은 시간 등.
1143
+ */
1144
+ export declare const CountdownBlockSchema: z.ZodObject<{
1145
+ type: z.ZodLiteral<"countdown">;
1146
+ /** 마감 시각(ISO 8601 타임스탬프 문자열) — 렌더러가 new Date 로 파싱해 남은 시간을 계산. */
1147
+ target: z.ZodString;
1148
+ label: z.ZodOptional<z.ZodString>;
1149
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1150
+ /** 마감 경과 후 표시할 텍스트(기본 "Overdue"). */
1151
+ expiredText: z.ZodOptional<z.ZodString>;
1152
+ }, "strip", z.ZodTypeAny, {
1153
+ type: "countdown";
1154
+ target: string;
1155
+ label?: string | undefined;
1156
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1157
+ expiredText?: string | undefined;
1158
+ }, {
1159
+ type: "countdown";
1160
+ target: string;
1161
+ label?: string | undefined;
1162
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1163
+ expiredText?: string | undefined;
1164
+ }>;
1165
+ export type CountdownBlock = z.infer<typeof CountdownBlockSchema>;
1166
+ /**
1167
+ * 접기/펼치기(disclosure) — 요약(title)만 보이다가 펼치면 중첩 블록을 드러낸다(native details/summary).
1168
+ * 긴 보조 정보(로그·상세 필드·부가 첨부)를 카드 높이를 잡아먹지 않게 접어두는 레이아웃 블록.
1169
+ * blocks 는 어떤 블록이든 중첩 가능 — 렌더러가 BlockList 로 재귀 렌더(닫힌 유니온 유지).
1170
+ */
1171
+ export declare const CollapsibleBlockSchema: z.ZodObject<{
1172
+ type: z.ZodLiteral<"collapsible">;
1173
+ /** 접힌 상태에서도 보이는 요약 헤더. */
1174
+ title: z.ZodString;
1175
+ /** 처음부터 펼쳐둘지(기본 접힘). */
1176
+ open: z.ZodOptional<z.ZodBoolean>;
1177
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1178
+ /**
1179
+ * 펼치면 보이는 중첩 블록(재귀). 런타임은 z.lazy 로 BlockSchema 를 지연 참조해 재귀 검증하지만,
1180
+ * 정적 타입은 z.ZodTypeAny 로 끊는다 — Block 이 z.infer 기반이라 재귀 타입 별칭이 conditional type
1181
+ * 순환(TS2456)에 걸리기 때문. 작성자용 정확 타입은 아래 export 한 CollapsibleBlock 을 쓴다.
1182
+ */
1183
+ blocks: z.ZodArray<z.ZodLazy<z.ZodTypeAny>, "many">;
1184
+ }, "strip", z.ZodTypeAny, {
1185
+ type: "collapsible";
1186
+ title: string;
1187
+ blocks: any[];
1188
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1189
+ open?: boolean | undefined;
1190
+ }, {
1191
+ type: "collapsible";
1192
+ title: string;
1193
+ blocks: any[];
1194
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1195
+ open?: boolean | undefined;
1196
+ }>;
1197
+ export type CollapsibleBlock = {
1198
+ type: "collapsible";
1199
+ title: string;
1200
+ open?: boolean;
1201
+ tone?: Tone;
1202
+ blocks: Block[];
1203
+ };
1204
+ /**
1205
+ * 탈출구(escape hatch): A2UI/UI Blocks로 표현하기 어려운 무거운 UI(차트·대형 그리드·지도)는
1206
+ * Matrix Widget으로. 클라이언트가 신뢰 경계 안에서 sandboxed iframe으로 렌더한다.
1207
+ * url 은 클라이언트가 허용 출처를 검증해야 한다(RFC §D4 위젯).
1208
+ */
1209
+ export declare const WidgetBlockSchema: z.ZodObject<{
1210
+ type: z.ZodLiteral<"widget">;
1211
+ url: z.ZodString;
1212
+ name: z.ZodOptional<z.ZodString>;
1213
+ /** 위젯 인스턴스 식별자 (브리지 라우팅용) */
1214
+ widget_id: z.ZodOptional<z.ZodString>;
1215
+ /** 호스트가 이 위젯에 부여하는 capability scope (최소권한). 예: ["action.send"] */
1216
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1217
+ /** 렌더 높이(px). 기본은 클라이언트가 정함. */
1218
+ height: z.ZodOptional<z.ZodNumber>;
1219
+ }, "strip", z.ZodTypeAny, {
1220
+ type: "widget";
1221
+ url: string;
1222
+ name?: string | undefined;
1223
+ widget_id?: string | undefined;
1224
+ capabilities?: string[] | undefined;
1225
+ height?: number | undefined;
1226
+ }, {
1227
+ type: "widget";
1228
+ url: string;
1229
+ name?: string | undefined;
1230
+ widget_id?: string | undefined;
1231
+ capabilities?: string[] | undefined;
1232
+ height?: number | undefined;
1233
+ }>;
1234
+ /** 모든 블록의 판별 유니온. 새 블록을 추가하면 여기에만 등록하면 된다. */
1235
+ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1236
+ type: z.ZodLiteral<"text">;
1237
+ text: z.ZodString;
1238
+ /** true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지) */
1239
+ markdown: z.ZodOptional<z.ZodBoolean>;
1240
+ }, "strip", z.ZodTypeAny, {
1241
+ type: "text";
1242
+ text: string;
1243
+ markdown?: boolean | undefined;
1244
+ }, {
1245
+ type: "text";
1246
+ text: string;
1247
+ markdown?: boolean | undefined;
1248
+ }>, z.ZodObject<{
1249
+ type: z.ZodLiteral<"heading">;
1250
+ text: z.ZodString;
1251
+ level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ type: "heading";
1254
+ text: string;
1255
+ level?: 1 | 2 | 3 | undefined;
1256
+ }, {
1257
+ type: "heading";
1258
+ text: string;
1259
+ level?: 1 | 2 | 3 | undefined;
1260
+ }>, z.ZodObject<{
1261
+ type: z.ZodLiteral<"divider">;
1262
+ }, "strip", z.ZodTypeAny, {
1263
+ type: "divider";
1264
+ }, {
1265
+ type: "divider";
1266
+ }>, z.ZodObject<{
1267
+ type: z.ZodLiteral<"fields">;
1268
+ items: z.ZodArray<z.ZodObject<{
1269
+ label: z.ZodString;
1270
+ value: z.ZodString;
1271
+ /** true면 2열 그리드에 좁게 배치 */
1272
+ short: z.ZodOptional<z.ZodBoolean>;
1273
+ }, "strip", z.ZodTypeAny, {
1274
+ value: string;
1275
+ label: string;
1276
+ short?: boolean | undefined;
1277
+ }, {
1278
+ value: string;
1279
+ label: string;
1280
+ short?: boolean | undefined;
1281
+ }>, "many">;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ type: "fields";
1284
+ items: {
1285
+ value: string;
1286
+ label: string;
1287
+ short?: boolean | undefined;
1288
+ }[];
1289
+ }, {
1290
+ type: "fields";
1291
+ items: {
1292
+ value: string;
1293
+ label: string;
1294
+ short?: boolean | undefined;
1295
+ }[];
1296
+ }>, z.ZodObject<{
1297
+ type: z.ZodLiteral<"image">;
1298
+ /** https URL 또는 mxc:// (둘 중 하나 권장). 클라이언트가 출처를 검증한다. */
1299
+ url: z.ZodOptional<z.ZodString>;
1300
+ mxc: z.ZodOptional<z.ZodString>;
1301
+ alt: z.ZodOptional<z.ZodString>;
1302
+ }, "strip", z.ZodTypeAny, {
1303
+ type: "image";
1304
+ url?: string | undefined;
1305
+ mxc?: string | undefined;
1306
+ alt?: string | undefined;
1307
+ }, {
1308
+ type: "image";
1309
+ url?: string | undefined;
1310
+ mxc?: string | undefined;
1311
+ alt?: string | undefined;
1312
+ }>, z.ZodObject<{
1313
+ type: z.ZodLiteral<"context">;
1314
+ /** 작은 보조 텍스트/아이콘 줄 */
1315
+ elements: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1316
+ icon: z.ZodString;
1317
+ }, "strip", z.ZodTypeAny, {
1318
+ icon: string;
1319
+ }, {
1320
+ icon: string;
1321
+ }>, z.ZodObject<{
1322
+ mxc: z.ZodString;
1323
+ }, "strip", z.ZodTypeAny, {
1324
+ mxc: string;
1325
+ }, {
1326
+ mxc: string;
1327
+ }>]>, "many">;
1328
+ }, "strip", z.ZodTypeAny, {
1329
+ type: "context";
1330
+ elements: (string | {
1331
+ icon: string;
1332
+ } | {
1333
+ mxc: string;
1334
+ })[];
1335
+ }, {
1336
+ type: "context";
1337
+ elements: (string | {
1338
+ icon: string;
1339
+ } | {
1340
+ mxc: string;
1341
+ })[];
1342
+ }>, z.ZodObject<{
1343
+ type: z.ZodLiteral<"badge">;
1344
+ text: z.ZodString;
1345
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1346
+ }, "strip", z.ZodTypeAny, {
1347
+ type: "badge";
1348
+ text: string;
1349
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1350
+ }, {
1351
+ type: "badge";
1352
+ text: string;
1353
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1354
+ }>, z.ZodObject<{
1355
+ type: z.ZodLiteral<"table">;
1356
+ columns: z.ZodArray<z.ZodString, "many">;
1357
+ rows: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
1358
+ }, "strip", z.ZodTypeAny, {
1359
+ type: "table";
1360
+ columns: string[];
1361
+ rows: string[][];
1362
+ }, {
1363
+ type: "table";
1364
+ columns: string[];
1365
+ rows: string[][];
1366
+ }>, z.ZodObject<{
1367
+ type: z.ZodLiteral<"progress">;
1368
+ /** 0~100 백분율(정수). 생략하면 indeterminate(불확정) 표시. 와이어 canonical JSON 은 소수 금지 → int 강제. */
1369
+ value: z.ZodOptional<z.ZodNumber>;
1370
+ label: z.ZodOptional<z.ZodString>;
1371
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ type: "progress";
1374
+ value?: number | undefined;
1375
+ label?: string | undefined;
1376
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1377
+ }, {
1378
+ type: "progress";
1379
+ value?: number | undefined;
1380
+ label?: string | undefined;
1381
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1382
+ }>, z.ZodObject<{
1383
+ type: z.ZodLiteral<"steps">;
1384
+ items: z.ZodArray<z.ZodObject<{
1385
+ label: z.ZodString;
1386
+ status: z.ZodOptional<z.ZodEnum<["done", "active", "todo", "error"]>>;
1387
+ note: z.ZodOptional<z.ZodString>;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ label: string;
1390
+ status?: "done" | "active" | "todo" | "error" | undefined;
1391
+ note?: string | undefined;
1392
+ }, {
1393
+ label: string;
1394
+ status?: "done" | "active" | "todo" | "error" | undefined;
1395
+ note?: string | undefined;
1396
+ }>, "many">;
1397
+ }, "strip", z.ZodTypeAny, {
1398
+ type: "steps";
1399
+ items: {
1400
+ label: string;
1401
+ status?: "done" | "active" | "todo" | "error" | undefined;
1402
+ note?: string | undefined;
1403
+ }[];
1404
+ }, {
1405
+ type: "steps";
1406
+ items: {
1407
+ label: string;
1408
+ status?: "done" | "active" | "todo" | "error" | undefined;
1409
+ note?: string | undefined;
1410
+ }[];
1411
+ }>, z.ZodObject<{
1412
+ type: z.ZodLiteral<"metric">;
1413
+ label: z.ZodString;
1414
+ value: z.ZodString;
1415
+ /** 기준/목표값 (선택) — value 와 함께 "현재 / 목표"로 표시 */
1416
+ target: z.ZodOptional<z.ZodString>;
1417
+ /** 증감 표시 (예: "+12") */
1418
+ delta: z.ZodOptional<z.ZodString>;
1419
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1420
+ }, "strip", z.ZodTypeAny, {
1421
+ value: string;
1422
+ type: "metric";
1423
+ label: string;
1424
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1425
+ target?: string | undefined;
1426
+ delta?: string | undefined;
1427
+ }, {
1428
+ value: string;
1429
+ type: "metric";
1430
+ label: string;
1431
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1432
+ target?: string | undefined;
1433
+ delta?: string | undefined;
1434
+ }>, z.ZodObject<{
1435
+ type: z.ZodLiteral<"chart">;
1436
+ variant: z.ZodEnum<["sparkline", "bar", "line", "donut"]>;
1437
+ /** 데이터 포인트. sparkline/line 은 순서대로 잇고, bar/donut 은 각 항목이 막대/조각이 된다. */
1438
+ data: z.ZodArray<z.ZodObject<{
1439
+ label: z.ZodOptional<z.ZodString>;
1440
+ value: z.ZodNumber;
1441
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1442
+ }, "strip", z.ZodTypeAny, {
1443
+ value: number;
1444
+ label?: string | undefined;
1445
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1446
+ }, {
1447
+ value: number;
1448
+ label?: string | undefined;
1449
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1450
+ }>, "many">;
1451
+ /** 접근성/표시용 캡션(차트 제목). */
1452
+ caption: z.ZodOptional<z.ZodString>;
1453
+ /** bar/sparkline/line 스케일 상한(생략 시 데이터 최대값). donut 은 합계 기준이라 무시. */
1454
+ max: z.ZodOptional<z.ZodNumber>;
1455
+ /** 값 단위(예: "%", "건") — 표시 보조. */
1456
+ unit: z.ZodOptional<z.ZodString>;
1457
+ }, "strip", z.ZodTypeAny, {
1458
+ type: "chart";
1459
+ variant: "sparkline" | "bar" | "line" | "donut";
1460
+ data: {
1461
+ value: number;
1462
+ label?: string | undefined;
1463
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1464
+ }[];
1465
+ max?: number | undefined;
1466
+ unit?: string | undefined;
1467
+ caption?: string | undefined;
1468
+ }, {
1469
+ type: "chart";
1470
+ variant: "sparkline" | "bar" | "line" | "donut";
1471
+ data: {
1472
+ value: number;
1473
+ label?: string | undefined;
1474
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1475
+ }[];
1476
+ max?: number | undefined;
1477
+ unit?: string | undefined;
1478
+ caption?: string | undefined;
1479
+ }>, z.ZodObject<{
1480
+ type: z.ZodLiteral<"avatar">;
1481
+ name: z.ZodString;
1482
+ initials: z.ZodOptional<z.ZodString>;
1483
+ color: z.ZodOptional<z.ZodString>;
1484
+ src: z.ZodOptional<z.ZodString>;
1485
+ subtitle: z.ZodOptional<z.ZodString>;
1486
+ status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
1487
+ }, "strip", z.ZodTypeAny, {
1488
+ type: "avatar";
1489
+ name: string;
1490
+ status?: "online" | "away" | "busy" | "offline" | undefined;
1491
+ initials?: string | undefined;
1492
+ color?: string | undefined;
1493
+ src?: string | undefined;
1494
+ subtitle?: string | undefined;
1495
+ }, {
1496
+ type: "avatar";
1497
+ name: string;
1498
+ status?: "online" | "away" | "busy" | "offline" | undefined;
1499
+ initials?: string | undefined;
1500
+ color?: string | undefined;
1501
+ src?: string | undefined;
1502
+ subtitle?: string | undefined;
1503
+ }>, z.ZodObject<{
1504
+ type: z.ZodLiteral<"avatarGroup">;
1505
+ people: z.ZodArray<z.ZodObject<{
1506
+ name: z.ZodString;
1507
+ /** 이니셜(미지정 시 name 에서 자동 생성). */
1508
+ initials: z.ZodOptional<z.ZodString>;
1509
+ /** 배경색(CSS 색/토큰). 미지정 시 name 해시로 팔레트에서 고름. */
1510
+ color: z.ZodOptional<z.ZodString>;
1511
+ /** 이미지 URL(https). 있으면 이미지, 없으면 이니셜. */
1512
+ src: z.ZodOptional<z.ZodString>;
1513
+ }, "strip", z.ZodTypeAny, {
1514
+ name: string;
1515
+ initials?: string | undefined;
1516
+ color?: string | undefined;
1517
+ src?: string | undefined;
1518
+ }, {
1519
+ name: string;
1520
+ initials?: string | undefined;
1521
+ color?: string | undefined;
1522
+ src?: string | undefined;
1523
+ }>, "many">;
1524
+ /** 앞에서 몇 명까지 보일지(기본 5). 나머지는 +N. */
1525
+ max: z.ZodOptional<z.ZodNumber>;
1526
+ label: z.ZodOptional<z.ZodString>;
1527
+ }, "strip", z.ZodTypeAny, {
1528
+ type: "avatarGroup";
1529
+ people: {
1530
+ name: string;
1531
+ initials?: string | undefined;
1532
+ color?: string | undefined;
1533
+ src?: string | undefined;
1534
+ }[];
1535
+ label?: string | undefined;
1536
+ max?: number | undefined;
1537
+ }, {
1538
+ type: "avatarGroup";
1539
+ people: {
1540
+ name: string;
1541
+ initials?: string | undefined;
1542
+ color?: string | undefined;
1543
+ src?: string | undefined;
1544
+ }[];
1545
+ label?: string | undefined;
1546
+ max?: number | undefined;
1547
+ }>, z.ZodObject<{
1548
+ type: z.ZodLiteral<"gauge">;
1549
+ value: z.ZodNumber;
1550
+ /** 스케일 상한(기본 100). */
1551
+ max: z.ZodOptional<z.ZodNumber>;
1552
+ /** 스케일 하한(기본 0). */
1553
+ min: z.ZodOptional<z.ZodNumber>;
1554
+ label: z.ZodOptional<z.ZodString>;
1555
+ /** 중앙 값 접미(예: "%", "점"). */
1556
+ unit: z.ZodOptional<z.ZodString>;
1557
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1558
+ }, "strip", z.ZodTypeAny, {
1559
+ value: number;
1560
+ type: "gauge";
1561
+ label?: string | undefined;
1562
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1563
+ min?: number | undefined;
1564
+ max?: number | undefined;
1565
+ unit?: string | undefined;
1566
+ }, {
1567
+ value: number;
1568
+ type: "gauge";
1569
+ label?: string | undefined;
1570
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1571
+ min?: number | undefined;
1572
+ max?: number | undefined;
1573
+ unit?: string | undefined;
1574
+ }>, z.ZodObject<{
1575
+ type: z.ZodLiteral<"rating">;
1576
+ value: z.ZodNumber;
1577
+ /** 만점(기본 5). */
1578
+ max: z.ZodOptional<z.ZodNumber>;
1579
+ label: z.ZodOptional<z.ZodString>;
1580
+ /** 심볼 모양(기본 star). */
1581
+ symbol: z.ZodOptional<z.ZodEnum<["star", "dot"]>>;
1582
+ }, "strip", z.ZodTypeAny, {
1583
+ value: number;
1584
+ type: "rating";
1585
+ symbol?: "star" | "dot" | undefined;
1586
+ label?: string | undefined;
1587
+ max?: number | undefined;
1588
+ }, {
1589
+ value: number;
1590
+ type: "rating";
1591
+ symbol?: "star" | "dot" | undefined;
1592
+ label?: string | undefined;
1593
+ max?: number | undefined;
1594
+ }>, z.ZodObject<{
1595
+ type: z.ZodLiteral<"callout">;
1596
+ text: z.ZodString;
1597
+ title: z.ZodOptional<z.ZodString>;
1598
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1599
+ /** 아이콘 글리프(이모지/문자). 미지정 시 tone 기본 아이콘. */
1600
+ icon: z.ZodOptional<z.ZodString>;
1601
+ }, "strip", z.ZodTypeAny, {
1602
+ type: "callout";
1603
+ text: string;
1604
+ title?: string | undefined;
1605
+ icon?: string | undefined;
1606
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1607
+ }, {
1608
+ type: "callout";
1609
+ text: string;
1610
+ title?: string | undefined;
1611
+ icon?: string | undefined;
1612
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1613
+ }>, z.ZodObject<{
1614
+ type: z.ZodLiteral<"entityRef">;
1615
+ label: z.ZodString;
1616
+ /** 엔티티 종류(예: "invoice","lead","repo") — 작은 종류 태그. */
1617
+ entity: z.ZodOptional<z.ZodString>;
1618
+ /** 클릭 시 이동할 https URL(있으면 링크, 출처는 클라가 검증). */
1619
+ url: z.ZodOptional<z.ZodString>;
1620
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1621
+ }, "strip", z.ZodTypeAny, {
1622
+ type: "entityRef";
1623
+ label: string;
1624
+ url?: string | undefined;
1625
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1626
+ entity?: string | undefined;
1627
+ }, {
1628
+ type: "entityRef";
1629
+ label: string;
1630
+ url?: string | undefined;
1631
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1632
+ entity?: string | undefined;
1633
+ }>, z.ZodObject<{
1634
+ type: z.ZodLiteral<"kanban">;
1635
+ columns: z.ZodArray<z.ZodObject<{
1636
+ id: z.ZodString;
1637
+ title: z.ZodString;
1638
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1639
+ cards: z.ZodArray<z.ZodObject<{
1640
+ id: z.ZodString;
1641
+ title: z.ZodString;
1642
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1643
+ /** 보조행(라벨/담당 등) — 카드 제목 아래 표시. */
1644
+ meta: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1645
+ badge: z.ZodOptional<z.ZodObject<{
1646
+ label: z.ZodString;
1647
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1648
+ }, "strip", z.ZodTypeAny, {
1649
+ label: string;
1650
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1651
+ }, {
1652
+ label: string;
1653
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1654
+ }>>;
1655
+ }, "strip", z.ZodTypeAny, {
1656
+ title: string;
1657
+ id: string;
1658
+ badge?: {
1659
+ label: string;
1660
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1661
+ } | undefined;
1662
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1663
+ meta?: string[] | undefined;
1664
+ }, {
1665
+ title: string;
1666
+ id: string;
1667
+ badge?: {
1668
+ label: string;
1669
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1670
+ } | undefined;
1671
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1672
+ meta?: string[] | undefined;
1673
+ }>, "many">;
1674
+ }, "strip", z.ZodTypeAny, {
1675
+ title: string;
1676
+ id: string;
1677
+ cards: {
1678
+ title: string;
1679
+ id: string;
1680
+ badge?: {
1681
+ label: string;
1682
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1683
+ } | undefined;
1684
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1685
+ meta?: string[] | undefined;
1686
+ }[];
1687
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1688
+ }, {
1689
+ title: string;
1690
+ id: string;
1691
+ cards: {
1692
+ title: string;
1693
+ id: string;
1694
+ badge?: {
1695
+ label: string;
1696
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1697
+ } | undefined;
1698
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1699
+ meta?: string[] | undefined;
1700
+ }[];
1701
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1702
+ }>, "many">;
1703
+ caption: z.ZodOptional<z.ZodString>;
1704
+ }, "strip", z.ZodTypeAny, {
1705
+ type: "kanban";
1706
+ columns: {
1707
+ title: string;
1708
+ id: string;
1709
+ cards: {
1710
+ title: string;
1711
+ id: string;
1712
+ badge?: {
1713
+ label: string;
1714
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1715
+ } | undefined;
1716
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1717
+ meta?: string[] | undefined;
1718
+ }[];
1719
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1720
+ }[];
1721
+ caption?: string | undefined;
1722
+ }, {
1723
+ type: "kanban";
1724
+ columns: {
1725
+ title: string;
1726
+ id: string;
1727
+ cards: {
1728
+ title: string;
1729
+ id: string;
1730
+ badge?: {
1731
+ label: string;
1732
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1733
+ } | undefined;
1734
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1735
+ meta?: string[] | undefined;
1736
+ }[];
1737
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1738
+ }[];
1739
+ caption?: string | undefined;
1740
+ }>, z.ZodObject<{
1741
+ type: z.ZodLiteral<"countdown">;
1742
+ /** 마감 시각(ISO 8601 타임스탬프 문자열) — 렌더러가 new Date 로 파싱해 남은 시간을 계산. */
1743
+ target: z.ZodString;
1744
+ label: z.ZodOptional<z.ZodString>;
1745
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1746
+ /** 마감 경과 후 표시할 텍스트(기본 "Overdue"). */
1747
+ expiredText: z.ZodOptional<z.ZodString>;
1748
+ }, "strip", z.ZodTypeAny, {
1749
+ type: "countdown";
1750
+ target: string;
1751
+ label?: string | undefined;
1752
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1753
+ expiredText?: string | undefined;
1754
+ }, {
1755
+ type: "countdown";
1756
+ target: string;
1757
+ label?: string | undefined;
1758
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1759
+ expiredText?: string | undefined;
1760
+ }>, z.ZodObject<{
1761
+ type: z.ZodLiteral<"code">;
1762
+ code: z.ZodString;
1763
+ language: z.ZodOptional<z.ZodString>;
1764
+ }, "strip", z.ZodTypeAny, {
1765
+ code: string;
1766
+ type: "code";
1767
+ language?: string | undefined;
1768
+ }, {
1769
+ code: string;
1770
+ type: "code";
1771
+ language?: string | undefined;
1772
+ }>, z.ZodObject<{
1773
+ type: z.ZodLiteral<"diff">;
1774
+ /** 파일 경로/제목(헤더에 표시). */
1775
+ filename: z.ZodOptional<z.ZodString>;
1776
+ /** unified diff(patch) 텍스트. 렌더러가 줄별로 +(add)/-(del)/@@(hunk)/그 외(context)로 분류. */
1777
+ patch: z.ZodString;
1778
+ /** 변경 통계(선택) — 헤더에 +N / -M 으로 표시. */
1779
+ additions: z.ZodOptional<z.ZodNumber>;
1780
+ deletions: z.ZodOptional<z.ZodNumber>;
1781
+ }, "strip", z.ZodTypeAny, {
1782
+ type: "diff";
1783
+ patch: string;
1784
+ filename?: string | undefined;
1785
+ additions?: number | undefined;
1786
+ deletions?: number | undefined;
1787
+ }, {
1788
+ type: "diff";
1789
+ patch: string;
1790
+ filename?: string | undefined;
1791
+ additions?: number | undefined;
1792
+ deletions?: number | undefined;
1793
+ }>, z.ZodObject<{
1794
+ type: z.ZodLiteral<"file">;
1795
+ /** 파일명(표시). */
1796
+ name: z.ZodString;
1797
+ /** 바이트 크기(선택) — 렌더러가 KB/MB 로 표시. */
1798
+ size: z.ZodOptional<z.ZodNumber>;
1799
+ /** MIME 또는 확장자 힌트(아이콘/라벨). 예: "application/pdf", "png". */
1800
+ mime: z.ZodOptional<z.ZodString>;
1801
+ /** 다운로드 https URL(선택). 출처는 클라가 검증. */
1802
+ url: z.ZodOptional<z.ZodString>;
1803
+ /** mxc:// (선택) — 인증 미디어. 호스트가 해석. */
1804
+ mxc: z.ZodOptional<z.ZodString>;
1805
+ /** 보조 설명(선택). */
1806
+ caption: z.ZodOptional<z.ZodString>;
1807
+ }, "strip", z.ZodTypeAny, {
1808
+ type: "file";
1809
+ name: string;
1810
+ url?: string | undefined;
1811
+ mxc?: string | undefined;
1812
+ size?: number | undefined;
1813
+ mime?: string | undefined;
1814
+ caption?: string | undefined;
1815
+ }, {
1816
+ type: "file";
1817
+ name: string;
1818
+ url?: string | undefined;
1819
+ mxc?: string | undefined;
1820
+ size?: number | undefined;
1821
+ mime?: string | undefined;
1822
+ caption?: string | undefined;
1823
+ }>, z.ZodObject<{
1824
+ type: z.ZodLiteral<"collapsible">;
1825
+ /** 접힌 상태에서도 보이는 요약 헤더. */
1826
+ title: z.ZodString;
1827
+ /** 처음부터 펼쳐둘지(기본 접힘). */
1828
+ open: z.ZodOptional<z.ZodBoolean>;
1829
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1830
+ /**
1831
+ * 펼치면 보이는 중첩 블록(재귀). 런타임은 z.lazy 로 BlockSchema 를 지연 참조해 재귀 검증하지만,
1832
+ * 정적 타입은 z.ZodTypeAny 로 끊는다 — Block 이 z.infer 기반이라 재귀 타입 별칭이 conditional type
1833
+ * 순환(TS2456)에 걸리기 때문. 작성자용 정확 타입은 아래 export 한 CollapsibleBlock 을 쓴다.
1834
+ */
1835
+ blocks: z.ZodArray<z.ZodLazy<z.ZodTypeAny>, "many">;
1836
+ }, "strip", z.ZodTypeAny, {
1837
+ type: "collapsible";
1838
+ title: string;
1839
+ blocks: any[];
1840
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1841
+ open?: boolean | undefined;
1842
+ }, {
1843
+ type: "collapsible";
1844
+ title: string;
1845
+ blocks: any[];
1846
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1847
+ open?: boolean | undefined;
1848
+ }>, z.ZodObject<{
1849
+ type: z.ZodLiteral<"widget">;
1850
+ url: z.ZodString;
1851
+ name: z.ZodOptional<z.ZodString>;
1852
+ /** 위젯 인스턴스 식별자 (브리지 라우팅용) */
1853
+ widget_id: z.ZodOptional<z.ZodString>;
1854
+ /** 호스트가 이 위젯에 부여하는 capability scope (최소권한). 예: ["action.send"] */
1855
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1856
+ /** 렌더 높이(px). 기본은 클라이언트가 정함. */
1857
+ height: z.ZodOptional<z.ZodNumber>;
1858
+ }, "strip", z.ZodTypeAny, {
1859
+ type: "widget";
1860
+ url: string;
1861
+ name?: string | undefined;
1862
+ widget_id?: string | undefined;
1863
+ capabilities?: string[] | undefined;
1864
+ height?: number | undefined;
1865
+ }, {
1866
+ type: "widget";
1867
+ url: string;
1868
+ name?: string | undefined;
1869
+ widget_id?: string | undefined;
1870
+ capabilities?: string[] | undefined;
1871
+ height?: number | undefined;
1872
+ }>, z.ZodObject<{
1873
+ type: z.ZodLiteral<"input">;
1874
+ name: z.ZodString;
1875
+ /** date=날짜, datetime=날짜+시각(네이티브 datetime-local), time=시각만 — 모두 네이티브 피커로 렌더. */
1876
+ input: z.ZodOptional<z.ZodEnum<["text", "textarea", "number", "date", "datetime", "time"]>>;
1877
+ label: z.ZodOptional<z.ZodString>;
1878
+ placeholder: z.ZodOptional<z.ZodString>;
1879
+ required: z.ZodOptional<z.ZodBoolean>;
1880
+ value: z.ZodOptional<z.ZodString>;
1881
+ }, "strip", z.ZodTypeAny, {
1882
+ type: "input";
1883
+ name: string;
1884
+ value?: string | undefined;
1885
+ label?: string | undefined;
1886
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
1887
+ placeholder?: string | undefined;
1888
+ required?: boolean | undefined;
1889
+ }, {
1890
+ type: "input";
1891
+ name: string;
1892
+ value?: string | undefined;
1893
+ label?: string | undefined;
1894
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
1895
+ placeholder?: string | undefined;
1896
+ required?: boolean | undefined;
1897
+ }>, z.ZodObject<{
1898
+ type: z.ZodLiteral<"toggle">;
1899
+ name: z.ZodString;
1900
+ label: z.ZodString;
1901
+ checked: z.ZodOptional<z.ZodBoolean>;
1902
+ /** 켜짐/꺼짐 보조 라벨(선택) — 스위치 옆 상태 텍스트. 색-only 회피용으로도 권장. */
1903
+ onText: z.ZodOptional<z.ZodString>;
1904
+ offText: z.ZodOptional<z.ZodString>;
1905
+ }, "strip", z.ZodTypeAny, {
1906
+ type: "toggle";
1907
+ label: string;
1908
+ name: string;
1909
+ checked?: boolean | undefined;
1910
+ onText?: string | undefined;
1911
+ offText?: string | undefined;
1912
+ }, {
1913
+ type: "toggle";
1914
+ label: string;
1915
+ name: string;
1916
+ checked?: boolean | undefined;
1917
+ onText?: string | undefined;
1918
+ offText?: string | undefined;
1919
+ }>, z.ZodObject<{
1920
+ type: z.ZodLiteral<"slider">;
1921
+ name: z.ZodString;
1922
+ label: z.ZodOptional<z.ZodString>;
1923
+ /** 하한(기본 0). */
1924
+ min: z.ZodOptional<z.ZodNumber>;
1925
+ /** 상한(기본 100). */
1926
+ max: z.ZodOptional<z.ZodNumber>;
1927
+ /** 증감 단위(기본 1). */
1928
+ step: z.ZodOptional<z.ZodNumber>;
1929
+ value: z.ZodOptional<z.ZodNumber>;
1930
+ /** 현재값 옆 접미(예: "%", "건"). */
1931
+ unit: z.ZodOptional<z.ZodString>;
1932
+ }, "strip", z.ZodTypeAny, {
1933
+ type: "slider";
1934
+ name: string;
1935
+ value?: number | undefined;
1936
+ label?: string | undefined;
1937
+ min?: number | undefined;
1938
+ max?: number | undefined;
1939
+ step?: number | undefined;
1940
+ unit?: string | undefined;
1941
+ }, {
1942
+ type: "slider";
1943
+ name: string;
1944
+ value?: number | undefined;
1945
+ label?: string | undefined;
1946
+ min?: number | undefined;
1947
+ max?: number | undefined;
1948
+ step?: number | undefined;
1949
+ unit?: string | undefined;
1950
+ }>, z.ZodObject<{
1951
+ type: z.ZodLiteral<"radio">;
1952
+ name: z.ZodString;
1953
+ label: z.ZodOptional<z.ZodString>;
1954
+ options: z.ZodArray<z.ZodObject<{
1955
+ value: z.ZodString;
1956
+ label: z.ZodString;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ value: string;
1959
+ label: string;
1960
+ }, {
1961
+ value: string;
1962
+ label: string;
1963
+ }>, "many">;
1964
+ value: z.ZodOptional<z.ZodString>;
1965
+ }, "strip", z.ZodTypeAny, {
1966
+ options: {
1967
+ value: string;
1968
+ label: string;
1969
+ }[];
1970
+ type: "radio";
1971
+ name: string;
1972
+ value?: string | undefined;
1973
+ label?: string | undefined;
1974
+ }, {
1975
+ options: {
1976
+ value: string;
1977
+ label: string;
1978
+ }[];
1979
+ type: "radio";
1980
+ name: string;
1981
+ value?: string | undefined;
1982
+ label?: string | undefined;
1983
+ }>, z.ZodObject<{
1984
+ type: z.ZodLiteral<"select">;
1985
+ name: z.ZodString;
1986
+ label: z.ZodOptional<z.ZodString>;
1987
+ placeholder: z.ZodOptional<z.ZodString>;
1988
+ options: z.ZodArray<z.ZodObject<{
1989
+ value: z.ZodString;
1990
+ label: z.ZodString;
1991
+ }, "strip", z.ZodTypeAny, {
1992
+ value: string;
1993
+ label: string;
1994
+ }, {
1995
+ value: string;
1996
+ label: string;
1997
+ }>, "many">;
1998
+ value: z.ZodOptional<z.ZodString>;
1999
+ multi: z.ZodOptional<z.ZodBoolean>;
2000
+ }, "strip", z.ZodTypeAny, {
2001
+ options: {
2002
+ value: string;
2003
+ label: string;
2004
+ }[];
2005
+ type: "select";
2006
+ name: string;
2007
+ value?: string | undefined;
2008
+ label?: string | undefined;
2009
+ placeholder?: string | undefined;
2010
+ multi?: boolean | undefined;
2011
+ }, {
2012
+ options: {
2013
+ value: string;
2014
+ label: string;
2015
+ }[];
2016
+ type: "select";
2017
+ name: string;
2018
+ value?: string | undefined;
2019
+ label?: string | undefined;
2020
+ placeholder?: string | undefined;
2021
+ multi?: boolean | undefined;
2022
+ }>, z.ZodObject<{
2023
+ type: z.ZodLiteral<"checkbox">;
2024
+ name: z.ZodString;
2025
+ label: z.ZodString;
2026
+ checked: z.ZodOptional<z.ZodBoolean>;
2027
+ }, "strip", z.ZodTypeAny, {
2028
+ type: "checkbox";
2029
+ label: string;
2030
+ name: string;
2031
+ checked?: boolean | undefined;
2032
+ }, {
2033
+ type: "checkbox";
2034
+ label: string;
2035
+ name: string;
2036
+ checked?: boolean | undefined;
2037
+ }>, z.ZodObject<{
2038
+ type: z.ZodLiteral<"button">;
2039
+ /** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
2040
+ action_id: z.ZodString;
2041
+ text: z.ZodString;
2042
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
2043
+ /** 버튼 고유 페이로드 (폼 값과 별개로 함께 전송) */
2044
+ value: z.ZodOptional<z.ZodString>;
2045
+ confirm: z.ZodOptional<z.ZodObject<{
2046
+ title: z.ZodString;
2047
+ text: z.ZodString;
2048
+ ok: z.ZodOptional<z.ZodString>;
2049
+ cancel: z.ZodOptional<z.ZodString>;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ title: string;
2052
+ text: string;
2053
+ ok?: string | undefined;
2054
+ cancel?: string | undefined;
2055
+ }, {
2056
+ title: string;
2057
+ text: string;
2058
+ ok?: string | undefined;
2059
+ cancel?: string | undefined;
2060
+ }>>;
2061
+ disabled: z.ZodOptional<z.ZodBoolean>;
2062
+ }, "strip", z.ZodTypeAny, {
2063
+ type: "button";
2064
+ text: string;
2065
+ action_id: string;
2066
+ value?: string | undefined;
2067
+ style?: "danger" | "default" | "primary" | undefined;
2068
+ confirm?: {
2069
+ title: string;
2070
+ text: string;
2071
+ ok?: string | undefined;
2072
+ cancel?: string | undefined;
2073
+ } | undefined;
2074
+ disabled?: boolean | undefined;
2075
+ }, {
2076
+ type: "button";
2077
+ text: string;
2078
+ action_id: string;
2079
+ value?: string | undefined;
2080
+ style?: "danger" | "default" | "primary" | undefined;
2081
+ confirm?: {
2082
+ title: string;
2083
+ text: string;
2084
+ ok?: string | undefined;
2085
+ cancel?: string | undefined;
2086
+ } | undefined;
2087
+ disabled?: boolean | undefined;
2088
+ }>, z.ZodObject<{
2089
+ type: z.ZodLiteral<"linkButton">;
2090
+ text: z.ZodString;
2091
+ /** 이동할 https URL. 클라이언트가 출처를 검증(아니면 비활성 표시). */
2092
+ url: z.ZodString;
2093
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
2094
+ /** 새 탭으로 열기(기본 true). */
2095
+ external: z.ZodOptional<z.ZodBoolean>;
2096
+ }, "strip", z.ZodTypeAny, {
2097
+ type: "linkButton";
2098
+ text: string;
2099
+ url: string;
2100
+ style?: "danger" | "default" | "primary" | undefined;
2101
+ external?: boolean | undefined;
2102
+ }, {
2103
+ type: "linkButton";
2104
+ text: string;
2105
+ url: string;
2106
+ style?: "danger" | "default" | "primary" | undefined;
2107
+ external?: boolean | undefined;
2108
+ }>, z.ZodObject<{
2109
+ type: z.ZodLiteral<"actions">;
2110
+ elements: z.ZodArray<z.ZodUnion<[z.ZodObject<{
2111
+ type: z.ZodLiteral<"button">;
2112
+ /** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
2113
+ action_id: z.ZodString;
2114
+ text: z.ZodString;
2115
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
2116
+ /** 버튼 고유 페이로드 (폼 값과 별개로 함께 전송) */
2117
+ value: z.ZodOptional<z.ZodString>;
2118
+ confirm: z.ZodOptional<z.ZodObject<{
2119
+ title: z.ZodString;
2120
+ text: z.ZodString;
2121
+ ok: z.ZodOptional<z.ZodString>;
2122
+ cancel: z.ZodOptional<z.ZodString>;
2123
+ }, "strip", z.ZodTypeAny, {
2124
+ title: string;
2125
+ text: string;
2126
+ ok?: string | undefined;
2127
+ cancel?: string | undefined;
2128
+ }, {
2129
+ title: string;
2130
+ text: string;
2131
+ ok?: string | undefined;
2132
+ cancel?: string | undefined;
2133
+ }>>;
2134
+ disabled: z.ZodOptional<z.ZodBoolean>;
2135
+ }, "strip", z.ZodTypeAny, {
2136
+ type: "button";
2137
+ text: string;
2138
+ action_id: string;
2139
+ value?: string | undefined;
2140
+ style?: "danger" | "default" | "primary" | undefined;
2141
+ confirm?: {
2142
+ title: string;
2143
+ text: string;
2144
+ ok?: string | undefined;
2145
+ cancel?: string | undefined;
2146
+ } | undefined;
2147
+ disabled?: boolean | undefined;
2148
+ }, {
2149
+ type: "button";
2150
+ text: string;
2151
+ action_id: string;
2152
+ value?: string | undefined;
2153
+ style?: "danger" | "default" | "primary" | undefined;
2154
+ confirm?: {
2155
+ title: string;
2156
+ text: string;
2157
+ ok?: string | undefined;
2158
+ cancel?: string | undefined;
2159
+ } | undefined;
2160
+ disabled?: boolean | undefined;
2161
+ }>, z.ZodObject<{
2162
+ type: z.ZodLiteral<"linkButton">;
2163
+ text: z.ZodString;
2164
+ /** 이동할 https URL. 클라이언트가 출처를 검증(아니면 비활성 표시). */
2165
+ url: z.ZodString;
2166
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
2167
+ /** 새 탭으로 열기(기본 true). */
2168
+ external: z.ZodOptional<z.ZodBoolean>;
2169
+ }, "strip", z.ZodTypeAny, {
2170
+ type: "linkButton";
2171
+ text: string;
2172
+ url: string;
2173
+ style?: "danger" | "default" | "primary" | undefined;
2174
+ external?: boolean | undefined;
2175
+ }, {
2176
+ type: "linkButton";
2177
+ text: string;
2178
+ url: string;
2179
+ style?: "danger" | "default" | "primary" | undefined;
2180
+ external?: boolean | undefined;
2181
+ }>]>, "many">;
2182
+ }, "strip", z.ZodTypeAny, {
2183
+ type: "actions";
2184
+ elements: ({
2185
+ type: "button";
2186
+ text: string;
2187
+ action_id: string;
2188
+ value?: string | undefined;
2189
+ style?: "danger" | "default" | "primary" | undefined;
2190
+ confirm?: {
2191
+ title: string;
2192
+ text: string;
2193
+ ok?: string | undefined;
2194
+ cancel?: string | undefined;
2195
+ } | undefined;
2196
+ disabled?: boolean | undefined;
2197
+ } | {
2198
+ type: "linkButton";
2199
+ text: string;
2200
+ url: string;
2201
+ style?: "danger" | "default" | "primary" | undefined;
2202
+ external?: boolean | undefined;
2203
+ })[];
2204
+ }, {
2205
+ type: "actions";
2206
+ elements: ({
2207
+ type: "button";
2208
+ text: string;
2209
+ action_id: string;
2210
+ value?: string | undefined;
2211
+ style?: "danger" | "default" | "primary" | undefined;
2212
+ confirm?: {
2213
+ title: string;
2214
+ text: string;
2215
+ ok?: string | undefined;
2216
+ cancel?: string | undefined;
2217
+ } | undefined;
2218
+ disabled?: boolean | undefined;
2219
+ } | {
2220
+ type: "linkButton";
2221
+ text: string;
2222
+ url: string;
2223
+ style?: "danger" | "default" | "primary" | undefined;
2224
+ external?: boolean | undefined;
2225
+ })[];
2226
+ }>, z.ZodObject<{
2227
+ type: z.ZodLiteral<"overflow">;
2228
+ /** 트리거 접근성 라벨(기본 "More actions"). */
2229
+ label: z.ZodOptional<z.ZodString>;
2230
+ items: z.ZodArray<z.ZodObject<{
2231
+ action_id: z.ZodString;
2232
+ text: z.ZodString;
2233
+ value: z.ZodOptional<z.ZodString>;
2234
+ /** danger 항목 강조(삭제 등). */
2235
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
2236
+ confirm: z.ZodOptional<z.ZodObject<{
2237
+ title: z.ZodString;
2238
+ text: z.ZodString;
2239
+ ok: z.ZodOptional<z.ZodString>;
2240
+ cancel: z.ZodOptional<z.ZodString>;
2241
+ }, "strip", z.ZodTypeAny, {
2242
+ title: string;
2243
+ text: string;
2244
+ ok?: string | undefined;
2245
+ cancel?: string | undefined;
2246
+ }, {
2247
+ title: string;
2248
+ text: string;
2249
+ ok?: string | undefined;
2250
+ cancel?: string | undefined;
2251
+ }>>;
2252
+ disabled: z.ZodOptional<z.ZodBoolean>;
2253
+ }, "strip", z.ZodTypeAny, {
2254
+ text: string;
2255
+ action_id: string;
2256
+ value?: string | undefined;
2257
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2258
+ confirm?: {
2259
+ title: string;
2260
+ text: string;
2261
+ ok?: string | undefined;
2262
+ cancel?: string | undefined;
2263
+ } | undefined;
2264
+ disabled?: boolean | undefined;
2265
+ }, {
2266
+ text: string;
2267
+ action_id: string;
2268
+ value?: string | undefined;
2269
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2270
+ confirm?: {
2271
+ title: string;
2272
+ text: string;
2273
+ ok?: string | undefined;
2274
+ cancel?: string | undefined;
2275
+ } | undefined;
2276
+ disabled?: boolean | undefined;
2277
+ }>, "many">;
2278
+ }, "strip", z.ZodTypeAny, {
2279
+ type: "overflow";
2280
+ items: {
2281
+ text: string;
2282
+ action_id: string;
2283
+ value?: string | undefined;
2284
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2285
+ confirm?: {
2286
+ title: string;
2287
+ text: string;
2288
+ ok?: string | undefined;
2289
+ cancel?: string | undefined;
2290
+ } | undefined;
2291
+ disabled?: boolean | undefined;
2292
+ }[];
2293
+ label?: string | undefined;
2294
+ }, {
2295
+ type: "overflow";
2296
+ items: {
2297
+ text: string;
2298
+ action_id: string;
2299
+ value?: string | undefined;
2300
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2301
+ confirm?: {
2302
+ title: string;
2303
+ text: string;
2304
+ ok?: string | undefined;
2305
+ cancel?: string | undefined;
2306
+ } | undefined;
2307
+ disabled?: boolean | undefined;
2308
+ }[];
2309
+ label?: string | undefined;
2310
+ }>]>;
2311
+ export type Block = z.infer<typeof BlockSchema>;
2312
+ /** Block["type"] 리터럴 유니온 — 렌더러 레지스트리 키 타입으로 쓴다. */
2313
+ export type BlockType = Block["type"];
2314
+ /** 사용자 입력을 수집하는(name을 가진) 블록 타입. */
2315
+ export type InputBlock = Extract<Block, {
2316
+ name: string;
2317
+ }>;
2318
+ /** 해당 블록이 사용자 입력을 수집하는(name을 가진) 블록인지 */
2319
+ export declare function isInputBlock(block: Block): block is InputBlock;
2320
+ //# sourceMappingURL=blocks.d.ts.map