@underdogai/mesh-event-schemas 0.2.0 → 0.6.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 (45) hide show
  1. package/dist/apppacks.d.ts +1242 -385
  2. package/dist/apppacks.d.ts.map +1 -1
  3. package/dist/apppacks.js +1 -1
  4. package/dist/blocks.d.ts +295 -58
  5. package/dist/blocks.d.ts.map +1 -1
  6. package/dist/blocks.js +90 -11
  7. package/dist/blocks.js.map +1 -1
  8. package/dist/capabilities.d.ts +2 -1
  9. package/dist/capabilities.d.ts.map +1 -1
  10. package/dist/capabilities.js +2 -1
  11. package/dist/capabilities.js.map +1 -1
  12. package/dist/events.d.ts +456 -95
  13. package/dist/events.d.ts.map +1 -1
  14. package/dist/events.js +109 -1
  15. package/dist/events.js.map +1 -1
  16. package/dist/geo.d.ts +52 -0
  17. package/dist/geo.d.ts.map +1 -0
  18. package/dist/geo.js +65 -0
  19. package/dist/geo.js.map +1 -0
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/namespace.d.ts +2 -0
  25. package/dist/namespace.d.ts.map +1 -1
  26. package/dist/namespace.js +2 -0
  27. package/dist/namespace.js.map +1 -1
  28. package/dist/registry.d.ts +3 -2
  29. package/dist/registry.d.ts.map +1 -1
  30. package/dist/registry.js +25 -3
  31. package/dist/registry.js.map +1 -1
  32. package/dist/surfaces.d.ts +47195 -12148
  33. package/dist/surfaces.d.ts.map +1 -1
  34. package/dist/surfaces.js +141 -3
  35. package/dist/surfaces.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/apppacks.ts +1 -1
  38. package/src/blocks.ts +92 -11
  39. package/src/capabilities.ts +2 -1
  40. package/src/events.ts +119 -4
  41. package/src/geo.ts +75 -0
  42. package/src/index.ts +1 -0
  43. package/src/namespace.ts +2 -0
  44. package/src/registry.ts +26 -2
  45. package/src/surfaces.ts +155 -2
package/dist/blocks.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 설계 원칙 (docs/custom-event-ui.md 참조):
5
5
  * - 닫힌(화이트리스트) 컴포넌트 집합. 임의 HTML/코드 실행 없음.
6
- * - 순수 데이터(JSON). 렌더는 @chatops/ui-blocks(React)가 담당.
6
+ * - 순수 데이터(JSON). 렌더는 @chatops/spec-renderer(React)가 담당.
7
7
  * - 알 수 없는 블록 타입은 클라이언트가 안전한 fallback으로 렌더.
8
8
  * - 권한은 절대 클라이언트가 아니라 appservice(서버측)가 재검증한다. 여기 disabled/confirm은 UX일 뿐.
9
9
  *
@@ -36,7 +36,16 @@ export type Confirm = z.infer<typeof ConfirmSchema>;
36
36
  export declare const TextBlockSchema: z.ZodObject<{
37
37
  type: z.ZodLiteral<"text">;
38
38
  text: z.ZodString;
39
- /** true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지) */
39
+ /**
40
+ * true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지).
41
+ *
42
+ * 인라인: `**굵게**` `*기울임*` `` `코드` `` `[텍스트](http…)`.
43
+ * 블록: 문단(빈 줄) · 목록(`-` `*` `+` / `1.`, 중첩 가능) · 제목(`#`~`###`) · 인용(`>`) ·
44
+ * 구분선(`---`) · 펜스 코드(``` ```` ```).
45
+ * 표는 지원하지 않는다 — 표는 `table` 블록이 따로 있다.
46
+ *
47
+ * 플래그를 안 주면 평문이다(줄바꿈만 살아난다). 긴 글에는 켜는 쪽이 읽힌다 — #581.
48
+ */
40
49
  markdown: z.ZodOptional<z.ZodBoolean>;
41
50
  }, "strip", z.ZodTypeAny, {
42
51
  type: "text";
@@ -74,14 +83,40 @@ export declare const FieldsBlockSchema: z.ZodObject<{
74
83
  value: z.ZodString;
75
84
  /** true면 2열 그리드에 좁게 배치 */
76
85
  short: z.ZodOptional<z.ZodBoolean>;
86
+ /**
87
+ * 값을 색이 다른 조각으로 나눠 그린다 — git diff 의 `+214 −37` 처럼 한 필드 안에서 조각마다
88
+ * 톤이 달라야 할 때. 있으면 렌더러가 value 대신 이걸 그리고, `value` 는 평문 사본으로 남는다
89
+ * (구버전 렌더러·fallback 경로가 계속 읽는다 — 그래서 여기 텍스트를 이어붙인 것과 같아야 한다).
90
+ *
91
+ * 조각은 gap 으로 벌어진 한 줄이다. 문장을 쪼개는 용도가 아니라 값 옆에 값을 붙이는 용도다.
92
+ * 색만으로 구분하지 않도록 부호·단위를 각 조각 text 에 남길 것 — 톤은 보조 신호다.
93
+ */
94
+ parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
95
+ text: z.ZodString;
96
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ text: string;
99
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
100
+ }, {
101
+ text: string;
102
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
103
+ }>, "many">>;
77
104
  }, "strip", z.ZodTypeAny, {
78
105
  value: string;
79
106
  label: string;
80
107
  short?: boolean | undefined;
108
+ parts?: {
109
+ text: string;
110
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
111
+ }[] | undefined;
81
112
  }, {
82
113
  value: string;
83
114
  label: string;
84
115
  short?: boolean | undefined;
116
+ parts?: {
117
+ text: string;
118
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
119
+ }[] | undefined;
85
120
  }>, "many">;
86
121
  }, "strip", z.ZodTypeAny, {
87
122
  type: "fields";
@@ -89,6 +124,10 @@ export declare const FieldsBlockSchema: z.ZodObject<{
89
124
  value: string;
90
125
  label: string;
91
126
  short?: boolean | undefined;
127
+ parts?: {
128
+ text: string;
129
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
130
+ }[] | undefined;
92
131
  }[];
93
132
  }, {
94
133
  type: "fields";
@@ -96,6 +135,10 @@ export declare const FieldsBlockSchema: z.ZodObject<{
96
135
  value: string;
97
136
  label: string;
98
137
  short?: boolean | undefined;
138
+ parts?: {
139
+ text: string;
140
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
141
+ }[] | undefined;
99
142
  }[];
100
143
  }>;
101
144
  export declare const ImageBlockSchema: z.ZodObject<{
@@ -277,7 +320,12 @@ export declare const SliderBlockSchema: z.ZodObject<{
277
320
  unit?: string | undefined;
278
321
  }>;
279
322
  export type SliderBlock = z.infer<typeof SliderBlockSchema>;
280
- /** 단일 선택 라디오 그룹. select 와 달리 옵션이 펼쳐져 보인다. */
323
+ /** 단일 선택 라디오 그룹. select 와 달리 옵션이 펼쳐져 보인다.
324
+ * 옵션 `hint` = 라벨 아래 한 줄 보조 설명(선택) — "버그 — 뭔가 잘못 동작해요" 처럼 라벨에 설명을
325
+ * 욱여넣던 것을 두 줄로 가른다(가독성). 옛 클라는 zod 가 벗겨내므로 라벨만 보인다(하위호환).
326
+ * `style` = 표현 힌트(선택): "cards" 는 옵션을 전체폭 카드 행으로, "segmented" 는 한 줄 세그먼트로
327
+ * (짧은 라벨 전용 — 렌더러가 hint 를 숨긴다). 값 의미는 동일하고 옛 클라는 평 라디오로 그린다.
328
+ * ⚠️ 위치 선택자(:first-child)로 특정 폼만 다르게 칠하지 말 것 — 표현은 이 필드로 선언한다. */
281
329
  export declare const RadioBlockSchema: z.ZodObject<{
282
330
  type: z.ZodLiteral<"radio">;
283
331
  name: z.ZodString;
@@ -285,32 +333,40 @@ export declare const RadioBlockSchema: z.ZodObject<{
285
333
  options: z.ZodArray<z.ZodObject<{
286
334
  value: z.ZodString;
287
335
  label: z.ZodString;
336
+ hint: z.ZodOptional<z.ZodString>;
288
337
  }, "strip", z.ZodTypeAny, {
289
338
  value: string;
290
339
  label: string;
340
+ hint?: string | undefined;
291
341
  }, {
292
342
  value: string;
293
343
  label: string;
344
+ hint?: string | undefined;
294
345
  }>, "many">;
295
346
  value: z.ZodOptional<z.ZodString>;
347
+ style: z.ZodOptional<z.ZodEnum<["cards", "segmented"]>>;
296
348
  }, "strip", z.ZodTypeAny, {
297
349
  options: {
298
350
  value: string;
299
351
  label: string;
352
+ hint?: string | undefined;
300
353
  }[];
301
354
  type: "radio";
302
355
  name: string;
303
356
  value?: string | undefined;
304
357
  label?: string | undefined;
358
+ style?: "cards" | "segmented" | undefined;
305
359
  }, {
306
360
  options: {
307
361
  value: string;
308
362
  label: string;
363
+ hint?: string | undefined;
309
364
  }[];
310
365
  type: "radio";
311
366
  name: string;
312
367
  value?: string | undefined;
313
368
  label?: string | undefined;
369
+ style?: "cards" | "segmented" | undefined;
314
370
  }>;
315
371
  export declare const SelectBlockSchema: z.ZodObject<{
316
372
  type: z.ZodLiteral<"select">;
@@ -368,6 +424,51 @@ export declare const CheckboxBlockSchema: z.ZodObject<{
368
424
  name: string;
369
425
  checked?: boolean | undefined;
370
426
  }>;
427
+ /**
428
+ * 위치 입력 — "지금 내 위치" 한 번을 **사용자 제스처로** 받아 폼 값으로 수집한다.
429
+ *
430
+ * 왜 입력 블록인가: 위치는 앱이 가져가는 게 아니라 **사람이 주는 것**이다. 그래서 다른 입력과 같은
431
+ * 자리에 서고(name 으로 수집 → 제출 버튼의 values 에 실림), 카드/모달 어느 쪽에도 놓을 수 있다.
432
+ * 버튼을 누르는 순간 OS 권한창이 뜨므로 "위치 권한 수락"과 "현재 위치 가져오기"가 한 동작이다 —
433
+ * 웹에는 애초에 "권한만 요청" 하는 API 가 없고, 네이티브도 쓰지 않을 권한을 미리 묻는 앱은 심사에서
434
+ * 이유를 설명해야 한다. 그래서 **쓸 때 묻는다**.
435
+ *
436
+ * 값의 모양은 `LocationValue`(geo.ts) — 좌표는 문자열 geo URI 다(canonical JSON 소수 금지).
437
+ * 수집 전에는 `""`. 못 쓰는 클라(구 셸·위치 없는 브라우저)에서는 렌더러가 **버튼을 비활성 + 이유**로
438
+ * degrade 한다 → 누른 뒤에 실패를 알게 되지 않는다.
439
+ */
440
+ export declare const LocationBlockSchema: z.ZodObject<{
441
+ type: z.ZodLiteral<"location">;
442
+ name: z.ZodString;
443
+ label: z.ZodOptional<z.ZodString>;
444
+ /**
445
+ * 왜 필요한지 한 줄 — **OS 권한창보다 먼저** 보인다. 시스템 문구(Info.plist·Android 권한창)는
446
+ * 앱 전체에 하나뿐이라 이 카드가 왜 묻는지는 여기서만 말할 수 있다(그리고 그게 심사가 보는 것이다).
447
+ */
448
+ purpose: z.ZodOptional<z.ZodString>;
449
+ required: z.ZodOptional<z.ZodBoolean>;
450
+ /** GPS 급 정확도로 받을지(느리고 배터리를 더 쓴다). 기본 false = 네트워크/대략 위치. */
451
+ precise: z.ZodOptional<z.ZodBoolean>;
452
+ /** 버튼 문구(작성자 소유 문장). 미지정이면 렌더러 크롬 문구를 쓴다. */
453
+ buttonText: z.ZodOptional<z.ZodString>;
454
+ }, "strip", z.ZodTypeAny, {
455
+ type: "location";
456
+ name: string;
457
+ label?: string | undefined;
458
+ required?: boolean | undefined;
459
+ purpose?: string | undefined;
460
+ precise?: boolean | undefined;
461
+ buttonText?: string | undefined;
462
+ }, {
463
+ type: "location";
464
+ name: string;
465
+ label?: string | undefined;
466
+ required?: boolean | undefined;
467
+ purpose?: string | undefined;
468
+ precise?: boolean | undefined;
469
+ buttonText?: string | undefined;
470
+ }>;
471
+ export type LocationBlock = z.infer<typeof LocationBlockSchema>;
371
472
  export declare const ButtonBlockSchema: z.ZodObject<{
372
473
  type: z.ZodLiteral<"button">;
373
474
  /** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
@@ -393,6 +494,19 @@ export declare const ButtonBlockSchema: z.ZodObject<{
393
494
  cancel?: string | undefined;
394
495
  }>>;
395
496
  disabled: z.ZodOptional<z.ZodBoolean>;
497
+ /**
498
+ * 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
499
+ *
500
+ * 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
501
+ * Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
502
+ * 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
503
+ * 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
504
+ *
505
+ * 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
506
+ * 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
507
+ * 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
508
+ */
509
+ hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
396
510
  }, "strip", z.ZodTypeAny, {
397
511
  type: "button";
398
512
  text: string;
@@ -406,6 +520,7 @@ export declare const ButtonBlockSchema: z.ZodObject<{
406
520
  cancel?: string | undefined;
407
521
  } | undefined;
408
522
  disabled?: boolean | undefined;
523
+ hidden_for?: string[] | undefined;
409
524
  }, {
410
525
  type: "button";
411
526
  text: string;
@@ -419,6 +534,7 @@ export declare const ButtonBlockSchema: z.ZodObject<{
419
534
  cancel?: string | undefined;
420
535
  } | undefined;
421
536
  disabled?: boolean | undefined;
537
+ hidden_for?: string[] | undefined;
422
538
  }>;
423
539
  export type ButtonBlock = z.infer<typeof ButtonBlockSchema>;
424
540
  /**
@@ -475,6 +591,19 @@ export declare const ActionsBlockSchema: z.ZodObject<{
475
591
  cancel?: string | undefined;
476
592
  }>>;
477
593
  disabled: z.ZodOptional<z.ZodBoolean>;
594
+ /**
595
+ * 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
596
+ *
597
+ * 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
598
+ * Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
599
+ * 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
600
+ * 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
601
+ *
602
+ * 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
603
+ * 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
604
+ * 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
605
+ */
606
+ hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
478
607
  }, "strip", z.ZodTypeAny, {
479
608
  type: "button";
480
609
  text: string;
@@ -488,6 +617,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
488
617
  cancel?: string | undefined;
489
618
  } | undefined;
490
619
  disabled?: boolean | undefined;
620
+ hidden_for?: string[] | undefined;
491
621
  }, {
492
622
  type: "button";
493
623
  text: string;
@@ -501,6 +631,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
501
631
  cancel?: string | undefined;
502
632
  } | undefined;
503
633
  disabled?: boolean | undefined;
634
+ hidden_for?: string[] | undefined;
504
635
  }>, z.ZodObject<{
505
636
  type: z.ZodLiteral<"linkButton">;
506
637
  text: z.ZodString;
@@ -537,6 +668,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
537
668
  cancel?: string | undefined;
538
669
  } | undefined;
539
670
  disabled?: boolean | undefined;
671
+ hidden_for?: string[] | undefined;
540
672
  } | {
541
673
  type: "linkButton";
542
674
  text: string;
@@ -559,6 +691,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
559
691
  cancel?: string | undefined;
560
692
  } | undefined;
561
693
  disabled?: boolean | undefined;
694
+ hidden_for?: string[] | undefined;
562
695
  } | {
563
696
  type: "linkButton";
564
697
  text: string;
@@ -658,23 +791,27 @@ export declare const OverflowBlockSchema: z.ZodObject<{
658
791
  label?: string | undefined;
659
792
  }>;
660
793
  export type OverflowBlock = z.infer<typeof OverflowBlockSchema>;
661
- /** 진행률 바 (0~100). 에이전트가 m.replace 편집으로 갱신해 "스트리밍" 진행 표시 가능. */
794
+ /**
795
+ * 진행률 바 (0~100). 에이전트가 m.replace 편집으로 갱신해 "스트리밍" 진행 표시 가능.
796
+ *
797
+ * 🔴 **톤 축이 없다** — 배지·콜아웃·메트릭과 갈리는 자리다. 이 블록의 렌더러는 shadcn `Progress`
798
+ * 이고 채움 색이 `bg-primary` 하나뿐이라(라이브러리에 그 축이 없다) 톤을 받아 봐야 그릴 곳이 없다.
799
+ * 색을 넣고 싶으면 스키마가 아니라 **렌더러부터** 물을 것(`docs/cob-to-shadcn-map.md` 의 `progress` 행).
800
+ * 진행 바 옆에서 성패를 말해야 하면 `label` 이나 형제 `badge`·`callout` 블록이 그 자리다.
801
+ */
662
802
  export declare const ProgressBlockSchema: z.ZodObject<{
663
803
  type: z.ZodLiteral<"progress">;
664
804
  /** 0~100 백분율(정수). 생략하면 indeterminate(불확정) 표시. 와이어 canonical JSON 은 소수 금지 → int 강제. */
665
805
  value: z.ZodOptional<z.ZodNumber>;
666
806
  label: z.ZodOptional<z.ZodString>;
667
- tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
668
807
  }, "strip", z.ZodTypeAny, {
669
808
  type: "progress";
670
809
  value?: number | undefined;
671
810
  label?: string | undefined;
672
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
673
811
  }, {
674
812
  type: "progress";
675
813
  value?: number | undefined;
676
814
  label?: string | undefined;
677
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
678
815
  }>;
679
816
  /** 멀티스텝 진행 상태 표시(타임라인). 폼 마법사와 별개로, 작업 단계 시각화에 쓴다. */
680
817
  export declare const StepsBlockSchema: z.ZodObject<{
@@ -867,21 +1004,26 @@ export declare const ChartBlockSchema: z.ZodObject<{
867
1004
  caption?: string | undefined;
868
1005
  }>;
869
1006
  export type ChartBlock = z.infer<typeof ChartBlockSchema>;
870
- /** 단일 아바타 — 얼굴 동그라미(이미지/이니셜) + 이름·보조텍스트 + 상태점. 담당자 표시. */
1007
+ /**
1008
+ * 단일 아바타 — 얼굴 동그라미(이미지/이니셜) + 이름·보조텍스트 + 상태점. 담당자 표시.
1009
+ *
1010
+ * 🔴 **`color` 는 뺐다**(0.6.0). 이니셜 면은 shadcn `AvatarFallback` 의 `bg-muted` 한 벌이고
1011
+ * 렌더러엔 그 색을 받을 자리가 없다 — 계약에 두면 작성자가 보내고 아무 일도 안 일어난다
1012
+ * (`progress.tone` 을 뺀 것과 같은 이유). 누구인지는 이니셜·이름·프로필 사진이 나른다.
1013
+ */
871
1014
  export declare const AvatarBlockSchema: z.ZodObject<{
872
1015
  type: z.ZodLiteral<"avatar">;
873
1016
  name: z.ZodString;
874
1017
  initials: z.ZodOptional<z.ZodString>;
875
- color: z.ZodOptional<z.ZodString>;
876
1018
  src: z.ZodOptional<z.ZodString>;
877
1019
  subtitle: z.ZodOptional<z.ZodString>;
1020
+ /** 우하단 상태점 — 네 상태가 각자 색을 갖는다(`--cob-color-presence-*`). 색만으로 안 나르도록 `aria-label` 이 상태를 병기한다. */
878
1021
  status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
879
1022
  }, "strip", z.ZodTypeAny, {
880
1023
  type: "avatar";
881
1024
  name: string;
882
1025
  status?: "online" | "away" | "busy" | "offline" | undefined;
883
1026
  initials?: string | undefined;
884
- color?: string | undefined;
885
1027
  src?: string | undefined;
886
1028
  subtitle?: string | undefined;
887
1029
  }, {
@@ -889,7 +1031,6 @@ export declare const AvatarBlockSchema: z.ZodObject<{
889
1031
  name: string;
890
1032
  status?: "online" | "away" | "busy" | "offline" | undefined;
891
1033
  initials?: string | undefined;
892
- color?: string | undefined;
893
1034
  src?: string | undefined;
894
1035
  subtitle?: string | undefined;
895
1036
  }>;
@@ -901,19 +1042,15 @@ export declare const AvatarGroupBlockSchema: z.ZodObject<{
901
1042
  name: z.ZodString;
902
1043
  /** 이니셜(미지정 시 name 에서 자동 생성). */
903
1044
  initials: z.ZodOptional<z.ZodString>;
904
- /** 배경색(CSS 색/토큰). 미지정 시 name 해시로 팔레트에서 고름. */
905
- color: z.ZodOptional<z.ZodString>;
906
1045
  /** 이미지 URL(https). 있으면 이미지, 없으면 이니셜. */
907
1046
  src: z.ZodOptional<z.ZodString>;
908
1047
  }, "strip", z.ZodTypeAny, {
909
1048
  name: string;
910
1049
  initials?: string | undefined;
911
- color?: string | undefined;
912
1050
  src?: string | undefined;
913
1051
  }, {
914
1052
  name: string;
915
1053
  initials?: string | undefined;
916
- color?: string | undefined;
917
1054
  src?: string | undefined;
918
1055
  }>, "many">;
919
1056
  /** 앞에서 몇 명까지 보일지(기본 5). 나머지는 +N. */
@@ -924,7 +1061,6 @@ export declare const AvatarGroupBlockSchema: z.ZodObject<{
924
1061
  people: {
925
1062
  name: string;
926
1063
  initials?: string | undefined;
927
- color?: string | undefined;
928
1064
  src?: string | undefined;
929
1065
  }[];
930
1066
  label?: string | undefined;
@@ -934,7 +1070,6 @@ export declare const AvatarGroupBlockSchema: z.ZodObject<{
934
1070
  people: {
935
1071
  name: string;
936
1072
  initials?: string | undefined;
937
- color?: string | undefined;
938
1073
  src?: string | undefined;
939
1074
  }[];
940
1075
  label?: string | undefined;
@@ -1006,14 +1141,14 @@ export declare const CalloutBlockSchema: z.ZodObject<{
1006
1141
  type: "callout";
1007
1142
  text: string;
1008
1143
  title?: string | undefined;
1009
- icon?: string | undefined;
1010
1144
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1145
+ icon?: string | undefined;
1011
1146
  }, {
1012
1147
  type: "callout";
1013
1148
  text: string;
1014
1149
  title?: string | undefined;
1015
- icon?: string | undefined;
1016
1150
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1151
+ icon?: string | undefined;
1017
1152
  }>;
1018
1153
  export type CalloutBlock = z.infer<typeof CalloutBlockSchema>;
1019
1154
  /** 엔티티 참조 칩 — 엔티티(송장·리드·repo…)로의 라벨/링크 칩. url 있으면 링크. */
@@ -1028,14 +1163,14 @@ export declare const EntityRefBlockSchema: z.ZodObject<{
1028
1163
  }, "strip", z.ZodTypeAny, {
1029
1164
  type: "entityRef";
1030
1165
  label: string;
1031
- url?: string | undefined;
1032
1166
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1167
+ url?: string | undefined;
1033
1168
  entity?: string | undefined;
1034
1169
  }, {
1035
1170
  type: "entityRef";
1036
1171
  label: string;
1037
- url?: string | undefined;
1038
1172
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1173
+ url?: string | undefined;
1039
1174
  entity?: string | undefined;
1040
1175
  }>;
1041
1176
  export type EntityRefBlock = z.infer<typeof EntityRefBlockSchema>;
@@ -1069,49 +1204,49 @@ export declare const KanbanBlockSchema: z.ZodObject<{
1069
1204
  }, "strip", z.ZodTypeAny, {
1070
1205
  title: string;
1071
1206
  id: string;
1207
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1072
1208
  badge?: {
1073
1209
  label: string;
1074
1210
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1075
1211
  } | undefined;
1076
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1077
1212
  meta?: string[] | undefined;
1078
1213
  }, {
1079
1214
  title: string;
1080
1215
  id: string;
1216
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1081
1217
  badge?: {
1082
1218
  label: string;
1083
1219
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1084
1220
  } | undefined;
1085
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1086
1221
  meta?: string[] | undefined;
1087
1222
  }>, "many">;
1088
1223
  }, "strip", z.ZodTypeAny, {
1089
1224
  title: string;
1090
- id: string;
1091
1225
  cards: {
1092
1226
  title: string;
1093
1227
  id: string;
1228
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1094
1229
  badge?: {
1095
1230
  label: string;
1096
1231
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1097
1232
  } | undefined;
1098
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1099
1233
  meta?: string[] | undefined;
1100
1234
  }[];
1235
+ id: string;
1101
1236
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1102
1237
  }, {
1103
1238
  title: string;
1104
- id: string;
1105
1239
  cards: {
1106
1240
  title: string;
1107
1241
  id: string;
1242
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1108
1243
  badge?: {
1109
1244
  label: string;
1110
1245
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1111
1246
  } | undefined;
1112
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1113
1247
  meta?: string[] | undefined;
1114
1248
  }[];
1249
+ id: string;
1115
1250
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1116
1251
  }>, "many">;
1117
1252
  caption: z.ZodOptional<z.ZodString>;
@@ -1119,17 +1254,17 @@ export declare const KanbanBlockSchema: z.ZodObject<{
1119
1254
  type: "kanban";
1120
1255
  columns: {
1121
1256
  title: string;
1122
- id: string;
1123
1257
  cards: {
1124
1258
  title: string;
1125
1259
  id: string;
1260
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1126
1261
  badge?: {
1127
1262
  label: string;
1128
1263
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1129
1264
  } | undefined;
1130
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1131
1265
  meta?: string[] | undefined;
1132
1266
  }[];
1267
+ id: string;
1133
1268
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1134
1269
  }[];
1135
1270
  caption?: string | undefined;
@@ -1137,17 +1272,17 @@ export declare const KanbanBlockSchema: z.ZodObject<{
1137
1272
  type: "kanban";
1138
1273
  columns: {
1139
1274
  title: string;
1140
- id: string;
1141
1275
  cards: {
1142
1276
  title: string;
1143
1277
  id: string;
1278
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1144
1279
  badge?: {
1145
1280
  label: string;
1146
1281
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1147
1282
  } | undefined;
1148
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1149
1283
  meta?: string[] | undefined;
1150
1284
  }[];
1285
+ id: string;
1151
1286
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1152
1287
  }[];
1153
1288
  caption?: string | undefined;
@@ -1252,7 +1387,16 @@ export declare const WidgetBlockSchema: z.ZodObject<{
1252
1387
  export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1253
1388
  type: z.ZodLiteral<"text">;
1254
1389
  text: z.ZodString;
1255
- /** true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지) */
1390
+ /**
1391
+ * true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지).
1392
+ *
1393
+ * 인라인: `**굵게**` `*기울임*` `` `코드` `` `[텍스트](http…)`.
1394
+ * 블록: 문단(빈 줄) · 목록(`-` `*` `+` / `1.`, 중첩 가능) · 제목(`#`~`###`) · 인용(`>`) ·
1395
+ * 구분선(`---`) · 펜스 코드(``` ```` ```).
1396
+ * 표는 지원하지 않는다 — 표는 `table` 블록이 따로 있다.
1397
+ *
1398
+ * 플래그를 안 주면 평문이다(줄바꿈만 살아난다). 긴 글에는 켜는 쪽이 읽힌다 — #581.
1399
+ */
1256
1400
  markdown: z.ZodOptional<z.ZodBoolean>;
1257
1401
  }, "strip", z.ZodTypeAny, {
1258
1402
  type: "text";
@@ -1287,14 +1431,40 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1287
1431
  value: z.ZodString;
1288
1432
  /** true면 2열 그리드에 좁게 배치 */
1289
1433
  short: z.ZodOptional<z.ZodBoolean>;
1434
+ /**
1435
+ * 값을 색이 다른 조각으로 나눠 그린다 — git diff 의 `+214 −37` 처럼 한 필드 안에서 조각마다
1436
+ * 톤이 달라야 할 때. 있으면 렌더러가 value 대신 이걸 그리고, `value` 는 평문 사본으로 남는다
1437
+ * (구버전 렌더러·fallback 경로가 계속 읽는다 — 그래서 여기 텍스트를 이어붙인 것과 같아야 한다).
1438
+ *
1439
+ * 조각은 gap 으로 벌어진 한 줄이다. 문장을 쪼개는 용도가 아니라 값 옆에 값을 붙이는 용도다.
1440
+ * 색만으로 구분하지 않도록 부호·단위를 각 조각 text 에 남길 것 — 톤은 보조 신호다.
1441
+ */
1442
+ parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1443
+ text: z.ZodString;
1444
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1445
+ }, "strip", z.ZodTypeAny, {
1446
+ text: string;
1447
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1448
+ }, {
1449
+ text: string;
1450
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1451
+ }>, "many">>;
1290
1452
  }, "strip", z.ZodTypeAny, {
1291
1453
  value: string;
1292
1454
  label: string;
1293
1455
  short?: boolean | undefined;
1456
+ parts?: {
1457
+ text: string;
1458
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1459
+ }[] | undefined;
1294
1460
  }, {
1295
1461
  value: string;
1296
1462
  label: string;
1297
1463
  short?: boolean | undefined;
1464
+ parts?: {
1465
+ text: string;
1466
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1467
+ }[] | undefined;
1298
1468
  }>, "many">;
1299
1469
  }, "strip", z.ZodTypeAny, {
1300
1470
  type: "fields";
@@ -1302,6 +1472,10 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1302
1472
  value: string;
1303
1473
  label: string;
1304
1474
  short?: boolean | undefined;
1475
+ parts?: {
1476
+ text: string;
1477
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1478
+ }[] | undefined;
1305
1479
  }[];
1306
1480
  }, {
1307
1481
  type: "fields";
@@ -1309,6 +1483,10 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1309
1483
  value: string;
1310
1484
  label: string;
1311
1485
  short?: boolean | undefined;
1486
+ parts?: {
1487
+ text: string;
1488
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1489
+ }[] | undefined;
1312
1490
  }[];
1313
1491
  }>, z.ZodObject<{
1314
1492
  type: z.ZodLiteral<"image">;
@@ -1385,17 +1563,14 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1385
1563
  /** 0~100 백분율(정수). 생략하면 indeterminate(불확정) 표시. 와이어 canonical JSON 은 소수 금지 → int 강제. */
1386
1564
  value: z.ZodOptional<z.ZodNumber>;
1387
1565
  label: z.ZodOptional<z.ZodString>;
1388
- tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1389
1566
  }, "strip", z.ZodTypeAny, {
1390
1567
  type: "progress";
1391
1568
  value?: number | undefined;
1392
1569
  label?: string | undefined;
1393
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1394
1570
  }, {
1395
1571
  type: "progress";
1396
1572
  value?: number | undefined;
1397
1573
  label?: string | undefined;
1398
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1399
1574
  }>, z.ZodObject<{
1400
1575
  type: z.ZodLiteral<"steps">;
1401
1576
  items: z.ZodArray<z.ZodObject<{
@@ -1497,16 +1672,15 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1497
1672
  type: z.ZodLiteral<"avatar">;
1498
1673
  name: z.ZodString;
1499
1674
  initials: z.ZodOptional<z.ZodString>;
1500
- color: z.ZodOptional<z.ZodString>;
1501
1675
  src: z.ZodOptional<z.ZodString>;
1502
1676
  subtitle: z.ZodOptional<z.ZodString>;
1677
+ /** 우하단 상태점 — 네 상태가 각자 색을 갖는다(`--cob-color-presence-*`). 색만으로 안 나르도록 `aria-label` 이 상태를 병기한다. */
1503
1678
  status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
1504
1679
  }, "strip", z.ZodTypeAny, {
1505
1680
  type: "avatar";
1506
1681
  name: string;
1507
1682
  status?: "online" | "away" | "busy" | "offline" | undefined;
1508
1683
  initials?: string | undefined;
1509
- color?: string | undefined;
1510
1684
  src?: string | undefined;
1511
1685
  subtitle?: string | undefined;
1512
1686
  }, {
@@ -1514,7 +1688,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1514
1688
  name: string;
1515
1689
  status?: "online" | "away" | "busy" | "offline" | undefined;
1516
1690
  initials?: string | undefined;
1517
- color?: string | undefined;
1518
1691
  src?: string | undefined;
1519
1692
  subtitle?: string | undefined;
1520
1693
  }>, z.ZodObject<{
@@ -1523,19 +1696,15 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1523
1696
  name: z.ZodString;
1524
1697
  /** 이니셜(미지정 시 name 에서 자동 생성). */
1525
1698
  initials: z.ZodOptional<z.ZodString>;
1526
- /** 배경색(CSS 색/토큰). 미지정 시 name 해시로 팔레트에서 고름. */
1527
- color: z.ZodOptional<z.ZodString>;
1528
1699
  /** 이미지 URL(https). 있으면 이미지, 없으면 이니셜. */
1529
1700
  src: z.ZodOptional<z.ZodString>;
1530
1701
  }, "strip", z.ZodTypeAny, {
1531
1702
  name: string;
1532
1703
  initials?: string | undefined;
1533
- color?: string | undefined;
1534
1704
  src?: string | undefined;
1535
1705
  }, {
1536
1706
  name: string;
1537
1707
  initials?: string | undefined;
1538
- color?: string | undefined;
1539
1708
  src?: string | undefined;
1540
1709
  }>, "many">;
1541
1710
  /** 앞에서 몇 명까지 보일지(기본 5). 나머지는 +N. */
@@ -1546,7 +1715,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1546
1715
  people: {
1547
1716
  name: string;
1548
1717
  initials?: string | undefined;
1549
- color?: string | undefined;
1550
1718
  src?: string | undefined;
1551
1719
  }[];
1552
1720
  label?: string | undefined;
@@ -1556,7 +1724,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1556
1724
  people: {
1557
1725
  name: string;
1558
1726
  initials?: string | undefined;
1559
- color?: string | undefined;
1560
1727
  src?: string | undefined;
1561
1728
  }[];
1562
1729
  label?: string | undefined;
@@ -1619,14 +1786,14 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1619
1786
  type: "callout";
1620
1787
  text: string;
1621
1788
  title?: string | undefined;
1622
- icon?: string | undefined;
1623
1789
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1790
+ icon?: string | undefined;
1624
1791
  }, {
1625
1792
  type: "callout";
1626
1793
  text: string;
1627
1794
  title?: string | undefined;
1628
- icon?: string | undefined;
1629
1795
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1796
+ icon?: string | undefined;
1630
1797
  }>, z.ZodObject<{
1631
1798
  type: z.ZodLiteral<"entityRef">;
1632
1799
  label: z.ZodString;
@@ -1638,14 +1805,14 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1638
1805
  }, "strip", z.ZodTypeAny, {
1639
1806
  type: "entityRef";
1640
1807
  label: string;
1641
- url?: string | undefined;
1642
1808
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1809
+ url?: string | undefined;
1643
1810
  entity?: string | undefined;
1644
1811
  }, {
1645
1812
  type: "entityRef";
1646
1813
  label: string;
1647
- url?: string | undefined;
1648
1814
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1815
+ url?: string | undefined;
1649
1816
  entity?: string | undefined;
1650
1817
  }>, z.ZodObject<{
1651
1818
  type: z.ZodLiteral<"kanban">;
@@ -1672,49 +1839,49 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1672
1839
  }, "strip", z.ZodTypeAny, {
1673
1840
  title: string;
1674
1841
  id: string;
1842
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1675
1843
  badge?: {
1676
1844
  label: string;
1677
1845
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1678
1846
  } | undefined;
1679
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1680
1847
  meta?: string[] | undefined;
1681
1848
  }, {
1682
1849
  title: string;
1683
1850
  id: string;
1851
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1684
1852
  badge?: {
1685
1853
  label: string;
1686
1854
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1687
1855
  } | undefined;
1688
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1689
1856
  meta?: string[] | undefined;
1690
1857
  }>, "many">;
1691
1858
  }, "strip", z.ZodTypeAny, {
1692
1859
  title: string;
1693
- id: string;
1694
1860
  cards: {
1695
1861
  title: string;
1696
1862
  id: string;
1863
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1697
1864
  badge?: {
1698
1865
  label: string;
1699
1866
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1700
1867
  } | undefined;
1701
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1702
1868
  meta?: string[] | undefined;
1703
1869
  }[];
1870
+ id: string;
1704
1871
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1705
1872
  }, {
1706
1873
  title: string;
1707
- id: string;
1708
1874
  cards: {
1709
1875
  title: string;
1710
1876
  id: string;
1877
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1711
1878
  badge?: {
1712
1879
  label: string;
1713
1880
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1714
1881
  } | undefined;
1715
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1716
1882
  meta?: string[] | undefined;
1717
1883
  }[];
1884
+ id: string;
1718
1885
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1719
1886
  }>, "many">;
1720
1887
  caption: z.ZodOptional<z.ZodString>;
@@ -1722,17 +1889,17 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1722
1889
  type: "kanban";
1723
1890
  columns: {
1724
1891
  title: string;
1725
- id: string;
1726
1892
  cards: {
1727
1893
  title: string;
1728
1894
  id: string;
1895
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1729
1896
  badge?: {
1730
1897
  label: string;
1731
1898
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1732
1899
  } | undefined;
1733
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1734
1900
  meta?: string[] | undefined;
1735
1901
  }[];
1902
+ id: string;
1736
1903
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1737
1904
  }[];
1738
1905
  caption?: string | undefined;
@@ -1740,17 +1907,17 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1740
1907
  type: "kanban";
1741
1908
  columns: {
1742
1909
  title: string;
1743
- id: string;
1744
1910
  cards: {
1745
1911
  title: string;
1746
1912
  id: string;
1913
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1747
1914
  badge?: {
1748
1915
  label: string;
1749
1916
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1750
1917
  } | undefined;
1751
- tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1752
1918
  meta?: string[] | undefined;
1753
1919
  }[];
1920
+ id: string;
1754
1921
  tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1755
1922
  }[];
1756
1923
  caption?: string | undefined;
@@ -1988,32 +2155,40 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1988
2155
  options: z.ZodArray<z.ZodObject<{
1989
2156
  value: z.ZodString;
1990
2157
  label: z.ZodString;
2158
+ hint: z.ZodOptional<z.ZodString>;
1991
2159
  }, "strip", z.ZodTypeAny, {
1992
2160
  value: string;
1993
2161
  label: string;
2162
+ hint?: string | undefined;
1994
2163
  }, {
1995
2164
  value: string;
1996
2165
  label: string;
2166
+ hint?: string | undefined;
1997
2167
  }>, "many">;
1998
2168
  value: z.ZodOptional<z.ZodString>;
2169
+ style: z.ZodOptional<z.ZodEnum<["cards", "segmented"]>>;
1999
2170
  }, "strip", z.ZodTypeAny, {
2000
2171
  options: {
2001
2172
  value: string;
2002
2173
  label: string;
2174
+ hint?: string | undefined;
2003
2175
  }[];
2004
2176
  type: "radio";
2005
2177
  name: string;
2006
2178
  value?: string | undefined;
2007
2179
  label?: string | undefined;
2180
+ style?: "cards" | "segmented" | undefined;
2008
2181
  }, {
2009
2182
  options: {
2010
2183
  value: string;
2011
2184
  label: string;
2185
+ hint?: string | undefined;
2012
2186
  }[];
2013
2187
  type: "radio";
2014
2188
  name: string;
2015
2189
  value?: string | undefined;
2016
2190
  label?: string | undefined;
2191
+ style?: "cards" | "segmented" | undefined;
2017
2192
  }>, z.ZodObject<{
2018
2193
  type: z.ZodLiteral<"select">;
2019
2194
  name: z.ZodString;
@@ -2068,6 +2243,36 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2068
2243
  label: string;
2069
2244
  name: string;
2070
2245
  checked?: boolean | undefined;
2246
+ }>, z.ZodObject<{
2247
+ type: z.ZodLiteral<"location">;
2248
+ name: z.ZodString;
2249
+ label: z.ZodOptional<z.ZodString>;
2250
+ /**
2251
+ * 왜 필요한지 한 줄 — **OS 권한창보다 먼저** 보인다. 시스템 문구(Info.plist·Android 권한창)는
2252
+ * 앱 전체에 하나뿐이라 이 카드가 왜 묻는지는 여기서만 말할 수 있다(그리고 그게 심사가 보는 것이다).
2253
+ */
2254
+ purpose: z.ZodOptional<z.ZodString>;
2255
+ required: z.ZodOptional<z.ZodBoolean>;
2256
+ /** GPS 급 정확도로 받을지(느리고 배터리를 더 쓴다). 기본 false = 네트워크/대략 위치. */
2257
+ precise: z.ZodOptional<z.ZodBoolean>;
2258
+ /** 버튼 문구(작성자 소유 문장). 미지정이면 렌더러 크롬 문구를 쓴다. */
2259
+ buttonText: z.ZodOptional<z.ZodString>;
2260
+ }, "strip", z.ZodTypeAny, {
2261
+ type: "location";
2262
+ name: string;
2263
+ label?: string | undefined;
2264
+ required?: boolean | undefined;
2265
+ purpose?: string | undefined;
2266
+ precise?: boolean | undefined;
2267
+ buttonText?: string | undefined;
2268
+ }, {
2269
+ type: "location";
2270
+ name: string;
2271
+ label?: string | undefined;
2272
+ required?: boolean | undefined;
2273
+ purpose?: string | undefined;
2274
+ precise?: boolean | undefined;
2275
+ buttonText?: string | undefined;
2071
2276
  }>, z.ZodObject<{
2072
2277
  type: z.ZodLiteral<"button">;
2073
2278
  /** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
@@ -2093,6 +2298,19 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2093
2298
  cancel?: string | undefined;
2094
2299
  }>>;
2095
2300
  disabled: z.ZodOptional<z.ZodBoolean>;
2301
+ /**
2302
+ * 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
2303
+ *
2304
+ * 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
2305
+ * Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
2306
+ * 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
2307
+ * 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
2308
+ *
2309
+ * 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
2310
+ * 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
2311
+ * 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
2312
+ */
2313
+ hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2096
2314
  }, "strip", z.ZodTypeAny, {
2097
2315
  type: "button";
2098
2316
  text: string;
@@ -2106,6 +2324,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2106
2324
  cancel?: string | undefined;
2107
2325
  } | undefined;
2108
2326
  disabled?: boolean | undefined;
2327
+ hidden_for?: string[] | undefined;
2109
2328
  }, {
2110
2329
  type: "button";
2111
2330
  text: string;
@@ -2119,6 +2338,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2119
2338
  cancel?: string | undefined;
2120
2339
  } | undefined;
2121
2340
  disabled?: boolean | undefined;
2341
+ hidden_for?: string[] | undefined;
2122
2342
  }>, z.ZodObject<{
2123
2343
  type: z.ZodLiteral<"linkButton">;
2124
2344
  text: z.ZodString;
@@ -2166,6 +2386,19 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2166
2386
  cancel?: string | undefined;
2167
2387
  }>>;
2168
2388
  disabled: z.ZodOptional<z.ZodBoolean>;
2389
+ /**
2390
+ * 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
2391
+ *
2392
+ * 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
2393
+ * Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
2394
+ * 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
2395
+ * 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
2396
+ *
2397
+ * 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
2398
+ * 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
2399
+ * 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
2400
+ */
2401
+ hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2169
2402
  }, "strip", z.ZodTypeAny, {
2170
2403
  type: "button";
2171
2404
  text: string;
@@ -2179,6 +2412,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2179
2412
  cancel?: string | undefined;
2180
2413
  } | undefined;
2181
2414
  disabled?: boolean | undefined;
2415
+ hidden_for?: string[] | undefined;
2182
2416
  }, {
2183
2417
  type: "button";
2184
2418
  text: string;
@@ -2192,6 +2426,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2192
2426
  cancel?: string | undefined;
2193
2427
  } | undefined;
2194
2428
  disabled?: boolean | undefined;
2429
+ hidden_for?: string[] | undefined;
2195
2430
  }>, z.ZodObject<{
2196
2431
  type: z.ZodLiteral<"linkButton">;
2197
2432
  text: z.ZodString;
@@ -2228,6 +2463,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2228
2463
  cancel?: string | undefined;
2229
2464
  } | undefined;
2230
2465
  disabled?: boolean | undefined;
2466
+ hidden_for?: string[] | undefined;
2231
2467
  } | {
2232
2468
  type: "linkButton";
2233
2469
  text: string;
@@ -2250,6 +2486,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2250
2486
  cancel?: string | undefined;
2251
2487
  } | undefined;
2252
2488
  disabled?: boolean | undefined;
2489
+ hidden_for?: string[] | undefined;
2253
2490
  } | {
2254
2491
  type: "linkButton";
2255
2492
  text: string;