@mieweb/ui 0.11.0-dev.35 → 0.11.0-dev.37

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 (224) hide show
  1. package/MIGRATION.md +45 -11
  2. package/agent/skills/mieweb-ui-catalog/SKILL.md +5 -3
  3. package/agent/skills/mieweb-ui-catalog/selection-guidance.md +6 -3
  4. package/dist/{EncounterMdyEditor-73PTTIRY.cjs → EncounterMdyEditor-46WMYRFI.cjs} +6 -6
  5. package/dist/{EncounterMdyEditor-73PTTIRY.cjs.map → EncounterMdyEditor-46WMYRFI.cjs.map} +1 -1
  6. package/dist/{EncounterMdyEditor-3SQY4MK2.js → EncounterMdyEditor-L7RBLE7B.js} +3 -3
  7. package/dist/{EncounterMdyEditor-3SQY4MK2.js.map → EncounterMdyEditor-L7RBLE7B.js.map} +1 -1
  8. package/dist/{chunk-4SUEBKTY.js → chunk-2OTPQPJS.js} +52 -44
  9. package/dist/chunk-2OTPQPJS.js.map +1 -0
  10. package/dist/{chunk-MZR634HI.cjs → chunk-3M2BBOXF.cjs} +9 -9
  11. package/dist/{chunk-MZR634HI.cjs.map → chunk-3M2BBOXF.cjs.map} +1 -1
  12. package/dist/{chunk-TUYWCUKH.js → chunk-4LKAZW2W.js} +7 -3
  13. package/dist/chunk-4LKAZW2W.js.map +1 -0
  14. package/dist/{chunk-JEXEFWEM.js → chunk-5WA6IYZD.js} +68 -2
  15. package/dist/chunk-5WA6IYZD.js.map +1 -0
  16. package/dist/{chunk-DXNVQQYN.cjs → chunk-6L7CTEX2.cjs} +51 -44
  17. package/dist/chunk-6L7CTEX2.cjs.map +1 -0
  18. package/dist/{chunk-DT3X3RBM.js → chunk-7U7SONM5.js} +3 -3
  19. package/dist/{chunk-DT3X3RBM.js.map → chunk-7U7SONM5.js.map} +1 -1
  20. package/dist/{chunk-4M2KE4O5.cjs → chunk-AHYDJN4H.cjs} +506 -125
  21. package/dist/chunk-AHYDJN4H.cjs.map +1 -0
  22. package/dist/{chunk-EX7Q5545.js → chunk-AKC677ZF.js} +5 -5
  23. package/dist/{chunk-EX7Q5545.js.map → chunk-AKC677ZF.js.map} +1 -1
  24. package/dist/{chunk-C4GEPUE7.js → chunk-CKECOCYJ.js} +2 -2
  25. package/dist/{chunk-C4GEPUE7.js.map → chunk-CKECOCYJ.js.map} +1 -1
  26. package/dist/{chunk-V5VPECJI.js → chunk-CRR7AE5D.js} +11 -7
  27. package/dist/chunk-CRR7AE5D.js.map +1 -0
  28. package/dist/chunk-D3FNZMOB.cjs +4 -0
  29. package/dist/{chunk-GLXTVCHN.cjs.map → chunk-D3FNZMOB.cjs.map} +1 -1
  30. package/dist/{chunk-ZK2R6UGF.cjs → chunk-DCV34MEF.cjs} +4 -4
  31. package/dist/{chunk-ZK2R6UGF.cjs.map → chunk-DCV34MEF.cjs.map} +1 -1
  32. package/dist/{chunk-XEHD2HA5.cjs → chunk-FRPELUI5.cjs} +3 -3
  33. package/dist/{chunk-XEHD2HA5.cjs.map → chunk-FRPELUI5.cjs.map} +1 -1
  34. package/dist/chunk-G4VQEQGW.js +3 -0
  35. package/dist/{chunk-RISZWWEQ.js.map → chunk-G4VQEQGW.js.map} +1 -1
  36. package/dist/{chunk-3O3Q3DX7.cjs → chunk-GG3IK5TL.cjs} +26 -26
  37. package/dist/{chunk-3O3Q3DX7.cjs.map → chunk-GG3IK5TL.cjs.map} +1 -1
  38. package/dist/{chunk-DGHS5IVD.js → chunk-GJSLKD4Q.js} +3 -3
  39. package/dist/{chunk-DGHS5IVD.js.map → chunk-GJSLKD4Q.js.map} +1 -1
  40. package/dist/{chunk-VMEVLBI3.js → chunk-GKMMDKYY.js} +3 -3
  41. package/dist/{chunk-VMEVLBI3.js.map → chunk-GKMMDKYY.js.map} +1 -1
  42. package/dist/{chunk-46RYJYN2.cjs → chunk-GU6TPVXF.cjs} +6 -6
  43. package/dist/{chunk-46RYJYN2.cjs.map → chunk-GU6TPVXF.cjs.map} +1 -1
  44. package/dist/{chunk-QHCAWDMG.cjs → chunk-HDZQLTBP.cjs} +7 -3
  45. package/dist/chunk-HDZQLTBP.cjs.map +1 -0
  46. package/dist/chunk-IALTKN3Y.js +1017 -0
  47. package/dist/chunk-IALTKN3Y.js.map +1 -0
  48. package/dist/{chunk-33Y3KQWL.js → chunk-IGRHPZOJ.js} +3 -3
  49. package/dist/{chunk-33Y3KQWL.js.map → chunk-IGRHPZOJ.js.map} +1 -1
  50. package/dist/chunk-JCIQIR5V.js +546 -0
  51. package/dist/chunk-JCIQIR5V.js.map +1 -0
  52. package/dist/{chunk-RTADGBBN.js → chunk-JUY2JLFL.js} +502 -121
  53. package/dist/chunk-JUY2JLFL.js.map +1 -0
  54. package/dist/{chunk-2S76TRBJ.cjs → chunk-JUYBJLPI.cjs} +4 -4
  55. package/dist/{chunk-2S76TRBJ.cjs.map → chunk-JUYBJLPI.cjs.map} +1 -1
  56. package/dist/{chunk-UDUYZDTA.js → chunk-JWMMWNTT.js} +3 -3
  57. package/dist/{chunk-UDUYZDTA.js.map → chunk-JWMMWNTT.js.map} +1 -1
  58. package/dist/{chunk-PLBWZW4F.js → chunk-KAQNYX7B.js} +3 -3
  59. package/dist/{chunk-PLBWZW4F.js.map → chunk-KAQNYX7B.js.map} +1 -1
  60. package/dist/{chunk-SPGP252Q.js → chunk-KB2PLV5Q.js} +4 -4
  61. package/dist/{chunk-SPGP252Q.js.map → chunk-KB2PLV5Q.js.map} +1 -1
  62. package/dist/{chunk-NCPDUJKJ.cjs → chunk-KQXD6BFO.cjs} +4 -4
  63. package/dist/{chunk-NCPDUJKJ.cjs.map → chunk-KQXD6BFO.cjs.map} +1 -1
  64. package/dist/{chunk-4VSK3EE5.cjs → chunk-L77XJPKC.cjs} +3 -3
  65. package/dist/{chunk-4VSK3EE5.cjs.map → chunk-L77XJPKC.cjs.map} +1 -1
  66. package/dist/{chunk-PGJLW2NO.cjs → chunk-LLIG4X6M.cjs} +7 -7
  67. package/dist/{chunk-PGJLW2NO.cjs.map → chunk-LLIG4X6M.cjs.map} +1 -1
  68. package/dist/{chunk-YGSPIDE4.js → chunk-LQ22CY7X.js} +5 -5
  69. package/dist/{chunk-YGSPIDE4.js.map → chunk-LQ22CY7X.js.map} +1 -1
  70. package/dist/{chunk-AKMTPCLC.cjs → chunk-LTCHD3K5.cjs} +2 -2
  71. package/dist/{chunk-AKMTPCLC.cjs.map → chunk-LTCHD3K5.cjs.map} +1 -1
  72. package/dist/{chunk-NW6D6AFL.js → chunk-LWLHCUDP.js} +10 -10
  73. package/dist/{chunk-NW6D6AFL.js.map → chunk-LWLHCUDP.js.map} +1 -1
  74. package/dist/{chunk-YR45POH2.js → chunk-MAEANAAJ.js} +3 -3
  75. package/dist/{chunk-YR45POH2.js.map → chunk-MAEANAAJ.js.map} +1 -1
  76. package/dist/{chunk-X5HLVACK.js → chunk-MLCIINXT.js} +4 -4
  77. package/dist/{chunk-X5HLVACK.js.map → chunk-MLCIINXT.js.map} +1 -1
  78. package/dist/{chunk-PHUTJKHL.cjs → chunk-MXIIPFTA.cjs} +3 -3
  79. package/dist/{chunk-PHUTJKHL.cjs.map → chunk-MXIIPFTA.cjs.map} +1 -1
  80. package/dist/{chunk-QO4A6U73.cjs → chunk-NCG7NJAW.cjs} +93 -30
  81. package/dist/chunk-NCG7NJAW.cjs.map +1 -0
  82. package/dist/{chunk-25MPUVTM.js → chunk-NIE3WBJH.js} +94 -31
  83. package/dist/chunk-NIE3WBJH.js.map +1 -0
  84. package/dist/{chunk-4GSFVD5V.js → chunk-NUHHWELE.js} +3 -3
  85. package/dist/{chunk-4GSFVD5V.js.map → chunk-NUHHWELE.js.map} +1 -1
  86. package/dist/{chunk-GDKOYVX3.cjs → chunk-NZUQL42A.cjs} +11 -7
  87. package/dist/chunk-NZUQL42A.cjs.map +1 -0
  88. package/dist/{chunk-YSIFPHLX.js → chunk-OJQMC426.js} +2 -2
  89. package/dist/{chunk-YSIFPHLX.js.map → chunk-OJQMC426.js.map} +1 -1
  90. package/dist/{chunk-SVC7NPQ6.cjs → chunk-PDLVSJMZ.cjs} +6 -6
  91. package/dist/{chunk-SVC7NPQ6.cjs.map → chunk-PDLVSJMZ.cjs.map} +1 -1
  92. package/dist/chunk-QAEAC7HO.cjs +4 -0
  93. package/dist/chunk-QAEAC7HO.cjs.map +1 -0
  94. package/dist/{chunk-KD7YD6US.cjs → chunk-QOQQVNP3.cjs} +2 -2
  95. package/dist/{chunk-KD7YD6US.cjs.map → chunk-QOQQVNP3.cjs.map} +1 -1
  96. package/dist/{chunk-6O6EYKOG.cjs → chunk-R4QWCP2T.cjs} +65 -65
  97. package/dist/{chunk-6O6EYKOG.cjs.map → chunk-R4QWCP2T.cjs.map} +1 -1
  98. package/dist/chunk-RCTIPBLU.cjs +1039 -0
  99. package/dist/chunk-RCTIPBLU.cjs.map +1 -0
  100. package/dist/{chunk-FSWHZY3T.cjs → chunk-RD2I67C4.cjs} +3 -3
  101. package/dist/{chunk-FSWHZY3T.cjs.map → chunk-RD2I67C4.cjs.map} +1 -1
  102. package/dist/chunk-SCGXD334.js +3 -0
  103. package/dist/chunk-SCGXD334.js.map +1 -0
  104. package/dist/{chunk-2OXNJJHJ.cjs → chunk-TERHGQ73.cjs} +3 -3
  105. package/dist/{chunk-2OXNJJHJ.cjs.map → chunk-TERHGQ73.cjs.map} +1 -1
  106. package/dist/chunk-TZKBW4GA.cjs +578 -0
  107. package/dist/chunk-TZKBW4GA.cjs.map +1 -0
  108. package/dist/{chunk-DO7EED3B.cjs → chunk-WZ7WTIVU.cjs} +3 -3
  109. package/dist/{chunk-DO7EED3B.cjs.map → chunk-WZ7WTIVU.cjs.map} +1 -1
  110. package/dist/{chunk-6UYMO3PF.cjs → chunk-XX6PNPF2.cjs} +68 -2
  111. package/dist/chunk-XX6PNPF2.cjs.map +1 -0
  112. package/dist/{chunk-566FIEPE.js → chunk-YFZNSP7F.js} +3 -3
  113. package/dist/{chunk-566FIEPE.js.map → chunk-YFZNSP7F.js.map} +1 -1
  114. package/dist/{chunk-I6Y2KLTZ.js → chunk-ZP4H5HA4.js} +3 -3
  115. package/dist/{chunk-I6Y2KLTZ.js.map → chunk-ZP4H5HA4.js.map} +1 -1
  116. package/dist/components/ActionPlan/index.cjs +1 -1
  117. package/dist/components/ActionPlan/index.js +1 -1
  118. package/dist/components/AlertDialog/index.cjs +7 -7
  119. package/dist/components/AlertDialog/index.js +3 -3
  120. package/dist/components/AudioPlayer/index.cjs +7 -6
  121. package/dist/components/AudioPlayer/index.js +2 -1
  122. package/dist/components/CustomizableDashboard/index.cjs +1 -1
  123. package/dist/components/CustomizableDashboard/index.js +1 -1
  124. package/dist/components/DateInput/index.cjs +3 -3
  125. package/dist/components/DateInput/index.js +2 -2
  126. package/dist/components/EmailEditor/index.cjs +16 -13
  127. package/dist/components/EmailEditor/index.js +7 -4
  128. package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
  129. package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
  130. package/dist/components/Markdown/index.cjs +10 -10
  131. package/dist/components/Markdown/index.js +2 -2
  132. package/dist/components/MediaEditor/index.cjs +13 -12
  133. package/dist/components/MediaEditor/index.js +8 -7
  134. package/dist/components/MediaFeed/index.cjs +10 -7
  135. package/dist/components/MediaFeed/index.d.cts +33 -0
  136. package/dist/components/MediaFeed/index.d.ts +33 -0
  137. package/dist/components/MediaFeed/index.js +9 -6
  138. package/dist/components/MediaPlayer/index.cjs +13 -6
  139. package/dist/components/MediaPlayer/index.d.cts +103 -5
  140. package/dist/components/MediaPlayer/index.d.ts +103 -5
  141. package/dist/components/MediaPlayer/index.js +6 -3
  142. package/dist/components/Modal/index.cjs +10 -10
  143. package/dist/components/Modal/index.js +2 -2
  144. package/dist/components/RadialExplorer/index.cjs +3 -3
  145. package/dist/components/RadialExplorer/index.js +2 -2
  146. package/dist/components/RecordHeader/index.cjs +4 -4
  147. package/dist/components/RecordHeader/index.js +2 -2
  148. package/dist/components/RecordLayout/index.cjs +1 -1
  149. package/dist/components/RecordLayout/index.js +1 -1
  150. package/dist/components/Sheet/index.cjs +1 -1
  151. package/dist/components/Sheet/index.js +1 -1
  152. package/dist/components/Slider/index.cjs +5 -5
  153. package/dist/components/Slider/index.d.cts +6 -0
  154. package/dist/components/Slider/index.d.ts +6 -0
  155. package/dist/components/Slider/index.js +1 -1
  156. package/dist/components/SliderCalculator/index.cjs +4 -4
  157. package/dist/components/SliderCalculator/index.js +2 -2
  158. package/dist/components/SuperChat/index.cjs +20 -18
  159. package/dist/components/SuperChat/index.cjs.map +1 -1
  160. package/dist/components/SuperChat/index.d.cts +2 -2
  161. package/dist/components/SuperChat/index.d.ts +2 -2
  162. package/dist/components/SuperChat/index.js +12 -10
  163. package/dist/components/SuperChat/index.js.map +1 -1
  164. package/dist/components/SuperChat/plugins/index.cjs +1 -1
  165. package/dist/components/SuperChat/plugins/index.d.cts +2 -2
  166. package/dist/components/SuperChat/plugins/index.d.ts +2 -2
  167. package/dist/components/SuperChat/plugins/index.js +1 -1
  168. package/dist/components/TagEditor/index.cjs +4 -4
  169. package/dist/components/TagEditor/index.js +2 -2
  170. package/dist/components/Textarea/index.cjs +7 -4
  171. package/dist/components/Textarea/index.js +4 -1
  172. package/dist/esheet.cjs +122 -123
  173. package/dist/esheet.cjs.map +1 -1
  174. package/dist/esheet.js +25 -26
  175. package/dist/esheet.js.map +1 -1
  176. package/dist/hooks/index.cjs +17 -17
  177. package/dist/hooks/index.js +4 -4
  178. package/dist/index.cjs +518 -482
  179. package/dist/index.cjs.map +1 -1
  180. package/dist/index.d.cts +204 -98
  181. package/dist/index.d.ts +204 -98
  182. package/dist/index.js +91 -52
  183. package/dist/index.js.map +1 -1
  184. package/dist/kerebron.cjs +32 -62
  185. package/dist/kerebron.cjs.map +1 -1
  186. package/dist/kerebron.css +145 -8
  187. package/dist/kerebron.d.cts +299 -1
  188. package/dist/kerebron.d.ts +299 -1
  189. package/dist/kerebron.js +22 -63
  190. package/dist/kerebron.js.map +1 -1
  191. package/dist/{model-EFXX5JZN.cjs → model-5PB6KNYH.cjs} +20 -20
  192. package/dist/{model-EFXX5JZN.cjs.map → model-5PB6KNYH.cjs.map} +1 -1
  193. package/dist/{model-TAARSYDY.js → model-OGWTZEXR.js} +6 -6
  194. package/dist/{model-TAARSYDY.js.map → model-OGWTZEXR.js.map} +1 -1
  195. package/dist/styles.css +1 -1
  196. package/dist/tailwind-preset.cjs +4 -4
  197. package/dist/tailwind-preset.js +1 -1
  198. package/dist/templates.cjs +31 -31
  199. package/dist/templates.js +2 -2
  200. package/dist/{types-DSWbrVkM.d.ts → types-BfVolads.d.cts} +33 -0
  201. package/dist/{types-DSWbrVkM.d.cts → types-BfVolads.d.ts} +33 -0
  202. package/dist/utils/index.cjs +5 -5
  203. package/dist/utils/index.d.cts +12 -12
  204. package/dist/utils/index.d.ts +12 -12
  205. package/dist/utils/index.js +1 -1
  206. package/package.json +3 -13
  207. package/dist/chunk-25MPUVTM.js.map +0 -1
  208. package/dist/chunk-4M2KE4O5.cjs.map +0 -1
  209. package/dist/chunk-4SUEBKTY.js.map +0 -1
  210. package/dist/chunk-6UYMO3PF.cjs.map +0 -1
  211. package/dist/chunk-DXNVQQYN.cjs.map +0 -1
  212. package/dist/chunk-ECKIFQSD.cjs +0 -183
  213. package/dist/chunk-ECKIFQSD.cjs.map +0 -1
  214. package/dist/chunk-GDKOYVX3.cjs.map +0 -1
  215. package/dist/chunk-GLXTVCHN.cjs +0 -4
  216. package/dist/chunk-JEXEFWEM.js.map +0 -1
  217. package/dist/chunk-QHCAWDMG.cjs.map +0 -1
  218. package/dist/chunk-QO4A6U73.cjs.map +0 -1
  219. package/dist/chunk-R5P7NAJQ.js +0 -159
  220. package/dist/chunk-R5P7NAJQ.js.map +0 -1
  221. package/dist/chunk-RISZWWEQ.js +0 -3
  222. package/dist/chunk-RTADGBBN.js.map +0 -1
  223. package/dist/chunk-TUYWCUKH.js.map +0 -1
  224. package/dist/chunk-V5VPECJI.js.map +0 -1
@@ -2,22 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunk6UYMO3PF_cjs = require('./chunk-6UYMO3PF.cjs');
5
+ var chunkXX6PNPF2_cjs = require('./chunk-XX6PNPF2.cjs');
6
6
  require('./chunk-EUAMEVVI.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "default", {
11
11
  enumerable: true,
12
- get: function () { return chunk6UYMO3PF_cjs.tailwind_preset_default; }
12
+ get: function () { return chunkXX6PNPF2_cjs.tailwind_preset_default; }
13
13
  });
14
14
  Object.defineProperty(exports, "miewebUIPreset", {
15
15
  enumerable: true,
16
- get: function () { return chunk6UYMO3PF_cjs.miewebUIPreset; }
16
+ get: function () { return chunkXX6PNPF2_cjs.miewebUIPreset; }
17
17
  });
18
18
  Object.defineProperty(exports, "miewebUISafelist", {
19
19
  enumerable: true,
20
- get: function () { return chunk6UYMO3PF_cjs.miewebUISafelist; }
20
+ get: function () { return chunkXX6PNPF2_cjs.miewebUISafelist; }
21
21
  });
22
22
  //# sourceMappingURL=tailwind-preset.cjs.map
23
23
  //# sourceMappingURL=tailwind-preset.cjs.map
@@ -1,4 +1,4 @@
1
- export { tailwind_preset_default as default, miewebUIPreset, miewebUISafelist } from './chunk-JEXEFWEM.js';
1
+ export { tailwind_preset_default as default, miewebUIPreset, miewebUISafelist } from './chunk-5WA6IYZD.js';
2
2
  import './chunk-PX6F3LHL.js';
3
3
  //# sourceMappingURL=tailwind-preset.js.map
4
4
  //# sourceMappingURL=tailwind-preset.js.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkDO7EED3B_cjs = require('./chunk-DO7EED3B.cjs');
3
+ var chunkWZ7WTIVU_cjs = require('./chunk-WZ7WTIVU.cjs');
4
4
  require('./chunk-VBWRH4UW.cjs');
5
5
  var chunkPW2E7YBD_cjs = require('./chunk-PW2E7YBD.cjs');
6
+ require('./chunk-7E46YDOT.cjs');
6
7
  require('./chunk-I44YNYI6.cjs');
7
8
  require('./chunk-Z5S5JEJD.cjs');
8
- require('./chunk-7E46YDOT.cjs');
9
9
  require('./chunk-HGJHWI7W.cjs');
10
10
  require('./chunk-S5RVSXDV.cjs');
11
11
  require('./chunk-EUAMEVVI.cjs');
@@ -14,119 +14,119 @@ require('./chunk-EUAMEVVI.cjs');
14
14
 
15
15
  Object.defineProperty(exports, "BenchmarkTableSection", {
16
16
  enumerable: true,
17
- get: function () { return chunkDO7EED3B_cjs.BenchmarkTableSection; }
17
+ get: function () { return chunkWZ7WTIVU_cjs.BenchmarkTableSection; }
18
18
  });
19
19
  Object.defineProperty(exports, "ComparisonSection", {
20
20
  enumerable: true,
21
- get: function () { return chunkDO7EED3B_cjs.ComparisonSection; }
21
+ get: function () { return chunkWZ7WTIVU_cjs.ComparisonSection; }
22
22
  });
23
23
  Object.defineProperty(exports, "CtaSection", {
24
24
  enumerable: true,
25
- get: function () { return chunkDO7EED3B_cjs.CtaSection; }
25
+ get: function () { return chunkWZ7WTIVU_cjs.CtaSection; }
26
26
  });
27
27
  Object.defineProperty(exports, "FaqSection", {
28
28
  enumerable: true,
29
- get: function () { return chunkDO7EED3B_cjs.FaqSection; }
29
+ get: function () { return chunkWZ7WTIVU_cjs.FaqSection; }
30
30
  });
31
31
  Object.defineProperty(exports, "FeatureGridSection", {
32
32
  enumerable: true,
33
- get: function () { return chunkDO7EED3B_cjs.FeatureGridSection; }
33
+ get: function () { return chunkWZ7WTIVU_cjs.FeatureGridSection; }
34
34
  });
35
35
  Object.defineProperty(exports, "HeroSection", {
36
36
  enumerable: true,
37
- get: function () { return chunkDO7EED3B_cjs.HeroSection; }
37
+ get: function () { return chunkWZ7WTIVU_cjs.HeroSection; }
38
38
  });
39
39
  Object.defineProperty(exports, "LandingPage", {
40
40
  enumerable: true,
41
- get: function () { return chunkDO7EED3B_cjs.LandingPage; }
41
+ get: function () { return chunkWZ7WTIVU_cjs.LandingPage; }
42
42
  });
43
43
  Object.defineProperty(exports, "LeadFormSection", {
44
44
  enumerable: true,
45
- get: function () { return chunkDO7EED3B_cjs.LeadFormSection; }
45
+ get: function () { return chunkWZ7WTIVU_cjs.LeadFormSection; }
46
46
  });
47
47
  Object.defineProperty(exports, "LinkGroupsSection", {
48
48
  enumerable: true,
49
- get: function () { return chunkDO7EED3B_cjs.LinkGroupsSection; }
49
+ get: function () { return chunkWZ7WTIVU_cjs.LinkGroupsSection; }
50
50
  });
51
51
  Object.defineProperty(exports, "LogoCloudSection", {
52
52
  enumerable: true,
53
- get: function () { return chunkDO7EED3B_cjs.LogoCloudSection; }
53
+ get: function () { return chunkWZ7WTIVU_cjs.LogoCloudSection; }
54
54
  });
55
55
  Object.defineProperty(exports, "MetricListSection", {
56
56
  enumerable: true,
57
- get: function () { return chunkDO7EED3B_cjs.MetricListSection; }
57
+ get: function () { return chunkWZ7WTIVU_cjs.MetricListSection; }
58
58
  });
59
59
  Object.defineProperty(exports, "PdfEmbedSection", {
60
60
  enumerable: true,
61
- get: function () { return chunkDO7EED3B_cjs.PdfEmbedSection; }
61
+ get: function () { return chunkWZ7WTIVU_cjs.PdfEmbedSection; }
62
62
  });
63
63
  Object.defineProperty(exports, "PricingSection", {
64
64
  enumerable: true,
65
- get: function () { return chunkDO7EED3B_cjs.PricingSection; }
65
+ get: function () { return chunkWZ7WTIVU_cjs.PricingSection; }
66
66
  });
67
67
  Object.defineProperty(exports, "ProcessStepsSection", {
68
68
  enumerable: true,
69
- get: function () { return chunkDO7EED3B_cjs.ProcessStepsSection; }
69
+ get: function () { return chunkWZ7WTIVU_cjs.ProcessStepsSection; }
70
70
  });
71
71
  Object.defineProperty(exports, "RankedListSection", {
72
72
  enumerable: true,
73
- get: function () { return chunkDO7EED3B_cjs.RankedListSection; }
73
+ get: function () { return chunkWZ7WTIVU_cjs.RankedListSection; }
74
74
  });
75
75
  Object.defineProperty(exports, "ReportByline", {
76
76
  enumerable: true,
77
- get: function () { return chunkDO7EED3B_cjs.ReportByline; }
77
+ get: function () { return chunkWZ7WTIVU_cjs.ReportByline; }
78
78
  });
79
79
  Object.defineProperty(exports, "ReportLegend", {
80
80
  enumerable: true,
81
- get: function () { return chunkDO7EED3B_cjs.ReportLegend; }
81
+ get: function () { return chunkWZ7WTIVU_cjs.ReportLegend; }
82
82
  });
83
83
  Object.defineProperty(exports, "ReportMethodology", {
84
84
  enumerable: true,
85
- get: function () { return chunkDO7EED3B_cjs.ReportMethodology; }
85
+ get: function () { return chunkWZ7WTIVU_cjs.ReportMethodology; }
86
86
  });
87
87
  Object.defineProperty(exports, "ResourceCardsSection", {
88
88
  enumerable: true,
89
- get: function () { return chunkDO7EED3B_cjs.ResourceCardsSection; }
89
+ get: function () { return chunkWZ7WTIVU_cjs.ResourceCardsSection; }
90
90
  });
91
91
  Object.defineProperty(exports, "SplitContentSection", {
92
92
  enumerable: true,
93
- get: function () { return chunkDO7EED3B_cjs.SplitContentSection; }
93
+ get: function () { return chunkWZ7WTIVU_cjs.SplitContentSection; }
94
94
  });
95
95
  Object.defineProperty(exports, "StatsSection", {
96
96
  enumerable: true,
97
- get: function () { return chunkDO7EED3B_cjs.StatsSection; }
97
+ get: function () { return chunkWZ7WTIVU_cjs.StatsSection; }
98
98
  });
99
99
  Object.defineProperty(exports, "TestimonialSection", {
100
100
  enumerable: true,
101
- get: function () { return chunkDO7EED3B_cjs.TestimonialSection; }
101
+ get: function () { return chunkWZ7WTIVU_cjs.TestimonialSection; }
102
102
  });
103
103
  Object.defineProperty(exports, "TileCartogramSection", {
104
104
  enumerable: true,
105
- get: function () { return chunkDO7EED3B_cjs.TileCartogramSection; }
105
+ get: function () { return chunkWZ7WTIVU_cjs.TileCartogramSection; }
106
106
  });
107
107
  Object.defineProperty(exports, "VideoSection", {
108
108
  enumerable: true,
109
- get: function () { return chunkDO7EED3B_cjs.VideoSection; }
109
+ get: function () { return chunkWZ7WTIVU_cjs.VideoSection; }
110
110
  });
111
111
  Object.defineProperty(exports, "defaultLeadFormFields", {
112
112
  enumerable: true,
113
- get: function () { return chunkDO7EED3B_cjs.defaultLeadFormFields; }
113
+ get: function () { return chunkWZ7WTIVU_cjs.defaultLeadFormFields; }
114
114
  });
115
115
  Object.defineProperty(exports, "landingPresets", {
116
116
  enumerable: true,
117
- get: function () { return chunkDO7EED3B_cjs.landingPresets; }
117
+ get: function () { return chunkWZ7WTIVU_cjs.landingPresets; }
118
118
  });
119
119
  Object.defineProperty(exports, "quartileBuckets", {
120
120
  enumerable: true,
121
- get: function () { return chunkDO7EED3B_cjs.quartileBuckets; }
121
+ get: function () { return chunkWZ7WTIVU_cjs.quartileBuckets; }
122
122
  });
123
123
  Object.defineProperty(exports, "usStateTiles", {
124
124
  enumerable: true,
125
- get: function () { return chunkDO7EED3B_cjs.usStateTiles; }
125
+ get: function () { return chunkWZ7WTIVU_cjs.usStateTiles; }
126
126
  });
127
127
  Object.defineProperty(exports, "validateLandingPage", {
128
128
  enumerable: true,
129
- get: function () { return chunkDO7EED3B_cjs.validateLandingPage; }
129
+ get: function () { return chunkWZ7WTIVU_cjs.validateLandingPage; }
130
130
  });
131
131
  Object.defineProperty(exports, "MetricStatusBadge", {
132
132
  enumerable: true,
package/dist/templates.js CHANGED
@@ -1,9 +1,9 @@
1
- export { BenchmarkTableSection, ComparisonSection, CtaSection, FaqSection, FeatureGridSection, HeroSection, LandingPage, LeadFormSection, LinkGroupsSection, LogoCloudSection, MetricListSection, PdfEmbedSection, PricingSection, ProcessStepsSection, RankedListSection, ReportByline, ReportLegend, ReportMethodology, ResourceCardsSection, SplitContentSection, StatsSection, TestimonialSection, TileCartogramSection, VideoSection, defaultLeadFormFields, landingPresets, quartileBuckets, usStateTiles, validateLandingPage } from './chunk-566FIEPE.js';
1
+ export { BenchmarkTableSection, ComparisonSection, CtaSection, FaqSection, FeatureGridSection, HeroSection, LandingPage, LeadFormSection, LinkGroupsSection, LogoCloudSection, MetricListSection, PdfEmbedSection, PricingSection, ProcessStepsSection, RankedListSection, ReportByline, ReportLegend, ReportMethodology, ResourceCardsSection, SplitContentSection, StatsSection, TestimonialSection, TileCartogramSection, VideoSection, defaultLeadFormFields, landingPresets, quartileBuckets, usStateTiles, validateLandingPage } from './chunk-YFZNSP7F.js';
2
2
  import './chunk-IQ4KQJAO.js';
3
3
  export { MetricStatusBadge, SectionHeading, SectionShell, TemplateIcon, defaultMetricStatusLabels, templateIcons } from './chunk-JNSSA4YN.js';
4
+ import './chunk-522WJIVI.js';
4
5
  import './chunk-6NZXWKUE.js';
5
6
  import './chunk-3IMM2PM4.js';
6
- import './chunk-522WJIVI.js';
7
7
  import './chunk-VP3XNLUL.js';
8
8
  import './chunk-TQONQSJO.js';
9
9
  import './chunk-PX6F3LHL.js';
@@ -40,6 +40,24 @@ interface MediaFeedLabels {
40
40
  next: string;
41
41
  play: string;
42
42
  pause: string;
43
+ /** The player's own controls in the `overlay` layout. */
44
+ mute: string;
45
+ unmute: string;
46
+ seek: string;
47
+ playerFullscreen: string;
48
+ exitPlayerFullscreen: string;
49
+ pictureInPicture: string;
50
+ exitPictureInPicture: string;
51
+ /** The player's elapsed and total time, already formatted. */
52
+ time: (current: string, duration: string) => string;
53
+ /** The player's speed button: its text for a rate, and its name. */
54
+ playerRate: (rate: number) => string;
55
+ playerSpeed: (rate: string) => string;
56
+ showCaptions: string;
57
+ hideCaptions: string;
58
+ /** The overlay's toggle for a title or caption that doesn't fit. */
59
+ showMore: string;
60
+ showLess: string;
43
61
  blockedAutoplay: string;
44
62
  mediaError: string;
45
63
  openSource: string;
@@ -73,6 +91,21 @@ interface MediaFeedProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, '
73
91
  getAuthor?: (item: T) => MediaFeedAuthor;
74
92
  /** Host-owned actions, such as reactions or opening a conversation. */
75
93
  renderActions?: (item: T) => React.ReactNode;
94
+ /**
95
+ * `stacked` (default): each item is a card, its details under the media.
96
+ * `overlay`: the media fills each item edge to edge on a dark stage, with
97
+ * the details at its foot as short-video apps place them (author, title and
98
+ * caption at the start, actions in a column at the end), Previous/Next on
99
+ * the end edge, and the player's touch-first overlay controls. Suits a phone
100
+ * or a full-height pane, upright or sideways.
101
+ */
102
+ layout?: 'stacked' | 'overlay';
103
+ /**
104
+ * Offer the full-screen viewer, an expand button on each item. Defaults to
105
+ * `true` for `stacked` and `false` for `overlay`, where the feed already
106
+ * fills its space and the player has its own full screen.
107
+ */
108
+ allowFullscreen?: boolean;
76
109
  /** Replace the built-in player, respecting its active playback boundary. */
77
110
  renderMedia?: (media: MediaFeedMedia, context: MediaFeedRenderContext<T>) => React.ReactNode;
78
111
  /** Controlled selection. Changes scroll the selected record into view. */
@@ -40,6 +40,24 @@ interface MediaFeedLabels {
40
40
  next: string;
41
41
  play: string;
42
42
  pause: string;
43
+ /** The player's own controls in the `overlay` layout. */
44
+ mute: string;
45
+ unmute: string;
46
+ seek: string;
47
+ playerFullscreen: string;
48
+ exitPlayerFullscreen: string;
49
+ pictureInPicture: string;
50
+ exitPictureInPicture: string;
51
+ /** The player's elapsed and total time, already formatted. */
52
+ time: (current: string, duration: string) => string;
53
+ /** The player's speed button: its text for a rate, and its name. */
54
+ playerRate: (rate: number) => string;
55
+ playerSpeed: (rate: string) => string;
56
+ showCaptions: string;
57
+ hideCaptions: string;
58
+ /** The overlay's toggle for a title or caption that doesn't fit. */
59
+ showMore: string;
60
+ showLess: string;
43
61
  blockedAutoplay: string;
44
62
  mediaError: string;
45
63
  openSource: string;
@@ -73,6 +91,21 @@ interface MediaFeedProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, '
73
91
  getAuthor?: (item: T) => MediaFeedAuthor;
74
92
  /** Host-owned actions, such as reactions or opening a conversation. */
75
93
  renderActions?: (item: T) => React.ReactNode;
94
+ /**
95
+ * `stacked` (default): each item is a card, its details under the media.
96
+ * `overlay`: the media fills each item edge to edge on a dark stage, with
97
+ * the details at its foot as short-video apps place them (author, title and
98
+ * caption at the start, actions in a column at the end), Previous/Next on
99
+ * the end edge, and the player's touch-first overlay controls. Suits a phone
100
+ * or a full-height pane, upright or sideways.
101
+ */
102
+ layout?: 'stacked' | 'overlay';
103
+ /**
104
+ * Offer the full-screen viewer, an expand button on each item. Defaults to
105
+ * `true` for `stacked` and `false` for `overlay`, where the feed already
106
+ * fills its space and the player has its own full screen.
107
+ */
108
+ allowFullscreen?: boolean;
76
109
  /** Replace the built-in player, respecting its active playback boundary. */
77
110
  renderMedia?: (media: MediaFeedMedia, context: MediaFeedRenderContext<T>) => React.ReactNode;
78
111
  /** Controlled selection. Changes scroll the selected record into view. */
@@ -3,8 +3,8 @@
3
3
  require('../chunk-AT732HC6.cjs');
4
4
  var chunkL7YQBSEL_cjs = require('../chunk-L7YQBSEL.cjs');
5
5
  var chunkCW75IKA6_cjs = require('../chunk-CW75IKA6.cjs');
6
- var chunkC7RVKV25_cjs = require('../chunk-C7RVKV25.cjs');
7
6
  var chunkSCV7C55E_cjs = require('../chunk-SCV7C55E.cjs');
7
+ var chunkC7RVKV25_cjs = require('../chunk-C7RVKV25.cjs');
8
8
  var chunkS5RVSXDV_cjs = require('../chunk-S5RVSXDV.cjs');
9
9
  require('../chunk-EUAMEVVI.cjs');
10
10
 
@@ -66,6 +66,10 @@ Object.defineProperty(exports, "parseDateValue", {
66
66
  enumerable: true,
67
67
  get: function () { return chunkCW75IKA6_cjs.parseDateValue; }
68
68
  });
69
+ Object.defineProperty(exports, "isStorybookDocsMode", {
70
+ enumerable: true,
71
+ get: function () { return chunkSCV7C55E_cjs.isStorybookDocsMode; }
72
+ });
69
73
  Object.defineProperty(exports, "isHtmlEmpty", {
70
74
  enumerable: true,
71
75
  get: function () { return chunkC7RVKV25_cjs.isHtmlEmpty; }
@@ -74,10 +78,6 @@ Object.defineProperty(exports, "stripHtmlTags", {
74
78
  enumerable: true,
75
79
  get: function () { return chunkC7RVKV25_cjs.stripHtmlTags; }
76
80
  });
77
- Object.defineProperty(exports, "isStorybookDocsMode", {
78
- enumerable: true,
79
- get: function () { return chunkSCV7C55E_cjs.isStorybookDocsMode; }
80
- });
81
81
  Object.defineProperty(exports, "cn", {
82
82
  enumerable: true,
83
83
  get: function () { return chunkS5RVSXDV_cjs.cn; }
@@ -1,5 +1,17 @@
1
1
  import { ClassValue } from 'clsx';
2
2
 
3
+ /**
4
+ * Extracts visible text from an HTML string without using regex.
5
+ * Uses a simple character-by-character state machine to skip tags.
6
+ * This avoids CodeQL false-positives associated with regex-based tag stripping.
7
+ */
8
+ declare function stripHtmlTags(html: string): string;
9
+ /**
10
+ * Returns true when an HTML string has no visible text content.
11
+ * This is a visibility check, not a sanitizer — do NOT use for XSS prevention.
12
+ */
13
+ declare function isHtmlEmpty(html: string): boolean;
14
+
3
15
  declare const miewebUITwMergeConflicts: Record<string, string[]>;
4
16
  /**
5
17
  * Utility function to merge Tailwind CSS classes with proper precedence.
@@ -17,18 +29,6 @@ declare const miewebUITwMergeConflicts: Record<string, string[]>;
17
29
  */
18
30
  declare function cn(...inputs: ClassValue[]): string;
19
31
 
20
- /**
21
- * Extracts visible text from an HTML string without using regex.
22
- * Uses a simple character-by-character state machine to skip tags.
23
- * This avoids CodeQL false-positives associated with regex-based tag stripping.
24
- */
25
- declare function stripHtmlTags(html: string): string;
26
- /**
27
- * Returns true when an HTML string has no visible text content.
28
- * This is a visibility check, not a sanitizer — do NOT use for XSS prevention.
29
- */
30
- declare function isHtmlEmpty(html: string): boolean;
31
-
32
32
  /**
33
33
  * Phone number formatting utilities
34
34
  */
@@ -1,5 +1,17 @@
1
1
  import { ClassValue } from 'clsx';
2
2
 
3
+ /**
4
+ * Extracts visible text from an HTML string without using regex.
5
+ * Uses a simple character-by-character state machine to skip tags.
6
+ * This avoids CodeQL false-positives associated with regex-based tag stripping.
7
+ */
8
+ declare function stripHtmlTags(html: string): string;
9
+ /**
10
+ * Returns true when an HTML string has no visible text content.
11
+ * This is a visibility check, not a sanitizer — do NOT use for XSS prevention.
12
+ */
13
+ declare function isHtmlEmpty(html: string): boolean;
14
+
3
15
  declare const miewebUITwMergeConflicts: Record<string, string[]>;
4
16
  /**
5
17
  * Utility function to merge Tailwind CSS classes with proper precedence.
@@ -17,18 +29,6 @@ declare const miewebUITwMergeConflicts: Record<string, string[]>;
17
29
  */
18
30
  declare function cn(...inputs: ClassValue[]): string;
19
31
 
20
- /**
21
- * Extracts visible text from an HTML string without using regex.
22
- * Uses a simple character-by-character state machine to skip tags.
23
- * This avoids CodeQL false-positives associated with regex-based tag stripping.
24
- */
25
- declare function stripHtmlTags(html: string): string;
26
- /**
27
- * Returns true when an HTML string has no visible text content.
28
- * This is a visibility check, not a sanitizer — do NOT use for XSS prevention.
29
- */
30
- declare function isHtmlEmpty(html: string): boolean;
31
-
32
32
  /**
33
33
  * Phone number formatting utilities
34
34
  */
@@ -1,8 +1,8 @@
1
1
  import '../chunk-7XUN3OQT.js';
2
2
  export { formatPhoneNumber, isPhoneNumberEmpty, isValidPhoneNumber, unformatPhoneNumber } from '../chunk-ZVPJ2MH6.js';
3
3
  export { calculateAge, dateToDisplayFormat, displayFormatToDateString, formatDateValue, isDateEmpty, isDateInFuture, isDateInPast, isValidDate, isValidDrivingAge, parseDateValue } from '../chunk-RC2YMOMS.js';
4
- export { isHtmlEmpty, stripHtmlTags } from '../chunk-ERLPVXOV.js';
5
4
  export { isStorybookDocsMode } from '../chunk-VSQF22GL.js';
5
+ export { isHtmlEmpty, stripHtmlTags } from '../chunk-ERLPVXOV.js';
6
6
  export { cn, miewebUITwMergeConflicts } from '../chunk-TQONQSJO.js';
7
7
  import '../chunk-PX6F3LHL.js';
8
8
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mieweb/ui",
3
- "version": "0.11.0-dev.35",
3
+ "version": "0.11.0-dev.37",
4
4
  "description": "A themeable, accessible React component library built with Tailwind CSS",
5
5
  "author": "Medical Informatics Engineering, Inc.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -330,6 +330,7 @@
330
330
  "@kerebron/editor": ">=0.8.12",
331
331
  "@kerebron/editor-kits": ">=0.8.12",
332
332
  "@kerebron/extension-basic-editor": ">=0.8.12",
333
+ "@kerebron/extension-menu": ">=0.8.12",
333
334
  "@kerebron/extension-yjs": ">=0.8.12",
334
335
  "@kerebron/wasm": ">=0.8.12",
335
336
  "@mieweb/q": "1.0.0",
@@ -388,21 +389,9 @@
388
389
  "motion": {
389
390
  "optional": true
390
391
  },
391
- "@kerebron/editor": {
392
- "optional": true
393
- },
394
- "@kerebron/editor-kits": {
395
- "optional": true
396
- },
397
- "@kerebron/extension-basic-editor": {
398
- "optional": true
399
- },
400
392
  "@kerebron/extension-yjs": {
401
393
  "optional": true
402
394
  },
403
- "@kerebron/wasm": {
404
- "optional": true
405
- },
406
395
  "y-protocols": {
407
396
  "optional": true
408
397
  },
@@ -496,6 +485,7 @@
496
485
  "@kerebron/editor": "^0.8.12",
497
486
  "@kerebron/editor-kits": "^0.8.12",
498
487
  "@kerebron/extension-basic-editor": "^0.8.12",
488
+ "@kerebron/extension-menu": "^0.8.12",
499
489
  "@kerebron/extension-yjs": "^0.8.12",
500
490
  "@kerebron/wasm": "^0.8.12",
501
491
  "@mieweb/datavis": "link:./packages/datavis",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/RichEditor/mdyTransaction.ts","../src/components/RichEditor/editorKits.ts","../src/components/RichEditor/RichEditor.tsx"],"names":["RichEditor","doc"],"mappings":";;;;;;;;;AACO,IAAM,mBAAA,GAAsB;ACwFnC,IAAM,gBAAA,GAAmB,CAAC,cAAA,EAAgB,OAAO,CAAA;AAUjD,IAAM,wBAAN,MAAiD;AAAA,EAE/C,WAAA,CACmB,WACA,WAAA,EACjB;AAFiB,IAAA,IAAA,CAAA,SAAA,GAAA,SAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AAAA,EAChB;AAAA,EAFgB,SAAA;AAAA,EACA,WAAA;AAAA,EAHnB,IAAA,GAAO,iBAAA;AAAA,EAMP,aAAA,GAAgB;AACd,IAAA,MAAM,OAAA,GAAoB,CAAC,GAAG,gBAAgB,CAAA;AAC9C,IAAA,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C,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,QAAG,QAAA,EAAA,iBAAA,EAAe,CAAA;AAAA,wBACnB,GAAA,CAAC,SAAK,QAAA,EAAA,EAAA,EAAG;AAAA,OAAA,EACX,CAAA,EACF;AAAA,KAAA,EAEJ,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA","file":"chunk-25MPUVTM.js","sourcesContent":["/** Shared metadata for host-created MDY projection updates. */\nexport const MDY_PROJECTION_META = 'mdyProjectionRefresh';\n","/**\n * Editor kit assembly for {@link RichEditor}, for both plain and collaborative\n * (Yjs) mode.\n *\n * Both modes start from {@link AdvancedEditorKit} and drop the extensions that\n * are unsafe for our usage — see {@link unsafeExtensions} — then collaborative\n * mode adds the Yjs pieces on top.\n *\n * The Yjs pieces live in `collabKit.ts` behind a dynamic `import()`, so\n * `@kerebron/extension-yjs`, `yjs` and `y-protocols` remain truly optional\n * peers — plain-mode consumers never load them.\n */\nimport type { EditorKit } from '@kerebron/editor';\nimport { AdvancedEditorKit } from '@kerebron/editor-kits/AdvancedEditorKit';\nimport {\n ExtensionMediaUpload,\n type MediaUploadOptions,\n} from '@kerebron/extension-basic-editor/ExtensionMediaUpload';\n\nexport type { MediaUploadOptions };\n\nexport interface CollabConfig {\n /** Room id — one shared document per room (e.g. a post id). */\n room: string;\n /**\n * WebSocket base URL for the Yjs relay. Defaults to\n * `<ws|wss>://<location.host>/yjs`. The room id is appended by the provider.\n */\n wsUrl?: string;\n /** Extra query params for the socket (e.g. `{ token }` for auth). */\n params?: Record<string, string>;\n /**\n * Who this editor is, published on awareness (`kerebron:user`) so peers see\n * a named, coloured cursor. Without it remote cursors do not render — the\n * position plugin skips awareness states that carry no user — and the\n * `id` is what the cursor colour is derived from (kerebron's `User` shape).\n */\n user?: { id: string; name: string; color?: string };\n /**\n * Custom WebSocket implementation handed to the Yjs provider — e.g. a\n * loopback socket for demos/tests, or a polyfill outside the browser.\n * Defaults to `globalThis.WebSocket`.\n */\n WebSocketPolyfill?: typeof globalThis.WebSocket;\n /**\n * Called when collaborative editing could not be started at all — the Yjs\n * kit failed to load (see {@link createEditorKits}). The editor mounts\n * anyway, as a local one; this is how the host finds out that edits are no\n * longer shared, so it can say so, or tear its own editor down if unshared\n * editing would be unsafe.\n *\n * Not for connection trouble: a room that is reachable but currently\n * disconnected still has the Yjs kit loaded, and the provider retries on its\n * own. This fires once, before the editor is created.\n */\n onUnavailable?: (error: unknown) => void;\n}\n\n/** What {@link createEditorKits} resolves to. */\nexport interface EditorKits {\n kits: EditorKit[];\n /**\n * Whether the returned kits can actually collaborate. False when `config`\n * asked for a room but the Yjs kit could not be loaded, so callers know not\n * to join one.\n */\n collaborative: boolean;\n}\n\n/**\n * Extensions dropped from {@link AdvancedEditorKit}, and why.\n *\n * `autocomplete` and `hover` debounce their DOM handlers (200ms) and then call\n * `dispatchMeta`, which reads `this.editor.state` with no guard that the editor\n * is still alive. Any teardown or document swap inside that debounce window\n * lands the deferred call on a dead view and throws\n * `null.matchesNode()` inside ProseMirror's `EditorView.updateStateInner`,\n * leaving the view permanently broken. Two ways to hit it:\n * - remount (e.g. a `key` change) while the pointer is over the editor, which\n * fires the debounced `onMouseLeave` after the view is destroyed;\n * - a Yjs remote update replacing the document tree under a pending callback.\n * The first applies to *every* editor, so both extensions come out in both\n * modes. No functional cost — autocomplete popups and node-hover tooltips are\n * compositor conveniences, not required for editing.\n *\n * `history` is collab-only: ExtensionYjs supplies its own CRDT-aware undo/redo\n * and the editor throws `Extension conflict: yjs vs history` if both are\n * present. Plain mode keeps it, so undo/redo still works there.\n */\nconst unsafeExtensions = ['autocomplete', 'hover'] as const;\n\n/**\n * {@link AdvancedEditorKit} minus {@link unsafeExtensions} (and, for collab\n * mode, minus `history`), with `mediaUpload` reconfigured when the host asks.\n *\n * `AdvancedEditorKit` constructs `ExtensionMediaUpload` with no options, and an\n * extension's options are fixed at construction — so the only way to configure\n * it is to drop that instance and append one of our own.\n */\nclass SafeAdvancedEditorKit implements EditorKit {\n name = 'advanced-editor';\n constructor(\n private readonly forCollab: boolean,\n private readonly mediaUpload?: MediaUploadOptions\n ) {}\n\n getExtensions() {\n const dropped: string[] = [...unsafeExtensions];\n if (this.forCollab) dropped.push('history');\n if (this.mediaUpload) dropped.push('mediaUpload');\n\n const extensions = new AdvancedEditorKit()\n .getExtensions()\n .filter(\n (extension) =>\n !('name' in extension && dropped.includes(extension.name))\n );\n\n if (this.mediaUpload) {\n extensions.push(new ExtensionMediaUpload(this.mediaUpload));\n }\n return extensions;\n }\n}\n\n/** MarkYChange + ExtensionYjs live in `collabKit.ts` (lazy-loaded). */\n\n/**\n * Build the editor kits for a session. Pass `config` to join a collaborative\n * room; omit it for a plain local editor. Pass `mediaUpload` to configure how\n * pasted/dropped files are handled — most importantly `uploadHandler`, without\n * which every image is embedded in the document as a base64 `data:` URL.\n *\n * Async because collaborative mode lazy-loads the Yjs kit (and its optional\n * peer deps) on first use; plain mode resolves immediately.\n *\n * That lazy load is allowed to fail. `@kerebron/extension-yjs`, `yjs` and\n * `y-protocols` are optional peers, so the chunk can be absent (peers never\n * installed), stale (a dev server's dependency hash moved under a running\n * page) or simply unreachable (a partial deploy, an offline client). None of\n * that is a reason to leave the caller without an editor: collaboration is an\n * enhancement, editing is the feature. So a failed load degrades to the local\n * kit and reports itself through {@link CollabConfig.onUnavailable} rather\n * than rejecting.\n */\nexport async function createEditorKits(\n config?: CollabConfig,\n mediaUpload?: MediaUploadOptions\n): Promise<EditorKits> {\n if (!config) {\n return {\n kits: [new SafeAdvancedEditorKit(false, mediaUpload)],\n collaborative: false,\n };\n }\n\n try {\n const { HuddleYjsKit, defaultWsUrl } = await import('./collabKit');\n const url = config.wsUrl ?? defaultWsUrl();\n return {\n kits: [\n new SafeAdvancedEditorKit(true, mediaUpload),\n new HuddleYjsKit(\n url,\n config.params ?? {},\n config.WebSocketPolyfill,\n config.user\n ),\n ],\n collaborative: true,\n };\n } catch (error) {\n console.warn(\n '[RichEditor] Collaborative editing unavailable — the Yjs kit failed to load. Continuing as a local editor.',\n error\n );\n config.onUnavailable?.(error);\n // Degrading to a local editor must not also drop `mediaUpload`: without it\n // the stock extension comes back and pasted files are embedded as base64.\n return {\n kits: [new SafeAdvancedEditorKit(false, mediaUpload)],\n collaborative: false,\n };\n }\n}\n","'use client';\n\nimport {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\n\nimport { CoreEditor, type AssetLoad, type EditorKit } from '@kerebron/editor';\nimport { createAssetLoad } from '@kerebron/wasm/web';\n\nimport { useIsDarkMode } from '../../hooks/useIsDarkMode';\nimport { MDY_PROJECTION_META } from './mdyTransaction';\nimport {\n createEditorKits,\n type CollabConfig,\n type MediaUploadOptions,\n} from './editorKits';\n\nexport type { CollabConfig, MediaUploadOptions } from './editorKits';\n\nconst MARKDOWN_TYPE = 'text/x-markdown';\n\n/**\n * The markdown converter's tree-sitter WASM init is not concurrency-safe, so\n * every editor's *first* load queues behind the previous one. Later loads (a\n * `value` change) are free — by then the grammars are warm.\n */\nlet initialLoadQueue: Promise<unknown> = Promise.resolve();\n\nfunction queueInitialLoad(load: () => Promise<void>): Promise<void> {\n const queued = initialLoadQueue.catch(() => undefined).then(load);\n initialLoadQueue = queued.catch(() => undefined);\n return queued;\n}\n\nexport interface RichEditorProps {\n /** Markdown to load. Changing it reloads the editor unless `collab` is set. */\n value?: string;\n /** Called with the editor's markdown content whenever it changes. */\n onChange?: (value: string) => void;\n /** Called when editor setup or a Markdown load fails. getContent also rejects. */\n onError?: (error: unknown) => void;\n /** Called after the initial Markdown load completes. */\n onReady?: (editor: CoreEditor) => void;\n /** Whether to render the live markdown output preview. Defaults to `false`. */\n showPreview?: boolean;\n /**\n * Enable live collaborative editing (Yjs) for the given room. When set, the\n * editor connects to the `/yjs` websocket relay and every peer in the same\n * `room` co-edits one shared document. Uncontrolled like `value` — remount via\n * `key` to switch rooms.\n *\n * Best-effort: if the Yjs kit cannot be loaded the editor still mounts, as a\n * local one, and `collab.onUnavailable` is called. Pass that callback if\n * unshared editing is something your users need to be told about.\n */\n collab?: CollabConfig;\n /** Read-only surface: no typing, and the content dims. */\n disabled?: boolean;\n /**\n * Id for the editor host element — an `aria-labelledby`/`aria-describedby`\n * anchor. The host is a `div`, not a labelable control, so a\n * `<label htmlFor>` will not associate; name the editor with `aria-label`\n * or `aria-labelledby` instead.\n */\n id?: string;\n /** Extra classes on the editor surface, beside `kb-component`. */\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n /**\n * Where the tree-sitter WASM grammars load from. Defaults to\n * `createAssetLoad('/kerebron-wasm')`; supply your own when the host serves\n * `@kerebron/wasm`'s `assets/` somewhere else.\n */\n assetLoad?: AssetLoad;\n /**\n * How files pasted or dropped into the editor are handled.\n *\n * **Set `uploadHandler` if your documents are persisted anywhere.** Without\n * it, a pasted image is embedded in the document as a base64 `data:` URL and\n * a video as a blob object URL: a 4 MB screenshot becomes ~5.8 MB of\n * markdown, which most APIs will refuse, and an object URL is dead as soon as\n * the page reloads. `uploadHandler` receives the file and returns the URL to\n * reference it by, so the document carries a link instead of the bytes.\n *\n * ```tsx\n * <RichEditor\n * mediaUpload={{ uploadHandler: (file) => uploadToMyMediaStore(file) }}\n * />\n * ```\n *\n * Read once, when the editor mounts — like {@link collab}, remount via `key`\n * to change it.\n */\n mediaUpload?: MediaUploadOptions;\n /** Additional editor kits, installed once when the editor mounts. */\n editorKits?: EditorKit[];\n}\n\nexport interface RichEditorHandle {\n /**\n * The editor's markdown, awaiting the initial load. `onChange` can lag the\n * last keystroke, so read this on submit rather than trusting mirrored state.\n */\n getContent: () => Promise<string>;\n /** Focus the editor, restoring the caret where the writer left it. */\n focus: () => void;\n}\n\n/**\n * Markdown editor over Kerebron's `CoreEditor`.\n *\n * The editor mounts into a **disposable child div**: `CoreEditor.destroy()`\n * replaces its host element with a clone, which would strand React's ref (and,\n * under StrictMode's double-mount, leave the live editor detached behind a\n * dead clone).\n */\nconst RichEditor = forwardRef<RichEditorHandle, RichEditorProps>(\n function RichEditor(\n {\n value = '',\n onChange,\n onError,\n onReady,\n showPreview = false,\n collab,\n disabled = false,\n id,\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n assetLoad,\n mediaUpload,\n editorKits: additionalEditorKits,\n },\n ref\n ) {\n const isDark = useIsDarkMode();\n const hostRef = useRef<HTMLDivElement>(null);\n const editorInstance = useRef<CoreEditor | null>(null);\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n const onErrorRef = useRef(onError);\n onErrorRef.current = onError;\n const onReadyRef = useRef(onReady);\n onReadyRef.current = onReady;\n // Mirrors what the editor last held, so an echo of our own `onChange`\n // doesn't reload the document out from under the caret.\n const valueRef = useRef(value);\n const readyRef = useRef<Promise<void> | null>(null);\n const loadingRef = useRef(false);\n const loadVersionRef = useRef(0);\n // Return the exact source until a writer changes the loaded document.\n // Running the Markdown converter alone can normalize whitespace or links.\n const loadedDocRef = useRef<unknown>(null);\n const disabledRef = useRef(disabled);\n\n const [md, setMd] = useState<string>('');\n // Serializing the document is the expensive part of a transaction, so the\n // last doc that was serialized is kept to recognise the transactions that\n // did not change it. ProseMirror documents are immutable, so identity is an\n // exact test.\n const lastSerializedDoc = useRef<unknown>(null);\n // Read inside the transaction handler, which is created once on mount.\n const showPreviewRef = useRef(showPreview);\n showPreviewRef.current = showPreview;\n\n useEffect(() => {\n disabledRef.current = disabled;\n editorInstance.current?.view.setProps({\n editable: () => !disabledRef.current,\n });\n }, [disabled]);\n\n useEffect(() => {\n // In collab mode the CRDT owns the content; reloading would fight it.\n if (collab || value === valueRef.current) return;\n valueRef.current = value;\n const editor = editorInstance.current;\n if (!editor) return;\n\n loadingRef.current = true;\n const loadVersion = ++loadVersionRef.current;\n const previousReady = readyRef.current;\n // Serialize reloads behind setup and one another. Saving while a reload\n // is pending awaits that same promise rather than reading stale prose.\n const pending = (previousReady ?? Promise.resolve())\n .catch(() => undefined)\n .then(async () => {\n if (editorInstance.current !== editor) return;\n await editor.loadDocumentText(MARKDOWN_TYPE, value);\n if (editorInstance.current !== editor) return;\n loadedDocRef.current = editor.view.state.doc;\n lastSerializedDoc.current = editor.view.state.doc;\n if (showPreviewRef.current) setMd(value);\n })\n .finally(() => {\n if (\n editorInstance.current === editor &&\n loadVersion === loadVersionRef.current\n ) {\n loadingRef.current = false;\n }\n });\n readyRef.current = pending;\n void pending.catch((error) => {\n if (editorInstance.current !== editor) return;\n console.error('Failed to load markdown:', error);\n onErrorRef.current?.(error);\n });\n // `collab` is fixed for the lifetime of the instance.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n useEffect(() => {\n if (!hostRef.current) return;\n const host = hostRef.current;\n\n // Set on cleanup so async continuations (kit loading and the\n // `loadDocumentText` chain) don't touch the editor after `destroy()`.\n let disposed = false;\n let editor: CoreEditor | null = null;\n\n const mount = document.createElement('div');\n host.appendChild(mount);\n\n // Listen to transactions and update markdown preview\n const onTransaction = async (event?: Event) => {\n const transaction = (\n event as\n | globalThis.CustomEvent<{\n transaction?: {\n getMeta: (key: string) => unknown;\n before: unknown;\n };\n }>\n | undefined\n )?.detail?.transaction;\n if (transaction?.getMeta(MDY_PROJECTION_META) === true) {\n const doc = editorInstance.current?.view.state.doc;\n if (transaction.before === loadedDocRef.current) {\n loadedDocRef.current = doc;\n lastSerializedDoc.current = doc;\n } else {\n lastSerializedDoc.current = null;\n // A host projection can overtake a pending user-edit save. That\n // older result is discarded below, so publish the newest composed\n // document even if the writer does not make another transaction.\n // A microtask coalesces a burst of clinical updates into one save.\n void Promise.resolve().then(() => {\n if (!disposed) return onTransaction();\n });\n }\n return;\n }\n // Programmatic loads are not edits — reporting them would echo the\n // caller's own `value` back through `onChange`.\n if (loadingRef.current || !editorInstance.current) return;\n\n // ProseMirror fires a transaction for every selection change too —\n // arrow keys, clicks, a blur. Serializing the whole document to\n // markdown for those costs a full tree-sitter pass and two React\n // renders for a caret move, so only a changed document is re-read.\n const { doc } = editorInstance.current.view.state;\n if (doc === lastSerializedDoc.current) return;\n lastSerializedDoc.current = doc;\n const loadVersion = loadVersionRef.current;\n\n try {\n const buffer =\n await editorInstance.current.saveDocument(MARKDOWN_TYPE);\n const markdown = new globalThis.TextDecoder().decode(buffer);\n if (\n disposed ||\n loadingRef.current ||\n loadVersion !== loadVersionRef.current ||\n doc !== editorInstance.current?.view.state.doc\n ) {\n return;\n }\n valueRef.current = markdown;\n // `md` only feeds the preview pane; setting it with the preview off\n // re-renders the editor on every keystroke for nothing.\n if (showPreviewRef.current) setMd(markdown);\n onChangeRef.current?.(markdown);\n // This source is now published. Future clinical-only projections\n // preserve it without starting another authored-prose write.\n loadedDocRef.current = doc;\n } catch (err) {\n // The document was marked as serialized before the attempt, to keep\n // selection-only transactions arriving mid-save from re-entering.\n // A failure has to undo that, or this document is never retried.\n lastSerializedDoc.current = null;\n console.error('Failed to save markdown:', err);\n }\n };\n\n // Initialize the editor. Both modes drop the teardown-unsafe extensions;\n // collaborative mode additionally swaps `history` for the Yjs CRDT sync\n // and lazy-loads the Yjs kit (see `editorKits.ts` for why).\n const setup = async () => {\n loadingRef.current = true;\n const loadVersion = ++loadVersionRef.current;\n // `collaborative` is false when a room was asked for but the Yjs kit\n // could not be loaded — the editor is still created, just a local one,\n // so there is no room to join below.\n const { kits: editorKits, collaborative } = await createEditorKits(\n collab,\n mediaUpload\n );\n if (disposed) return;\n\n editor = CoreEditor.create({\n element: mount,\n uri: 'file:///untitled.md',\n assetLoad: assetLoad ?? createAssetLoad('/kerebron-wasm'),\n editorKits: [...editorKits, ...(additionalEditorKits ?? [])],\n readOnly: disabledRef.current,\n });\n\n editorInstance.current = editor;\n // The contenteditable surface has no implicit ARIA role, so labeling\n // attributes are only permitted alongside an explicit textbox role.\n const surfaceAttributes =\n ariaLabel || ariaLabelledBy\n ? {\n role: 'textbox',\n 'aria-multiline': 'true',\n ...(ariaLabel ? { 'aria-label': ariaLabel } : {}),\n ...(ariaLabelledBy\n ? { 'aria-labelledby': ariaLabelledBy }\n : {}),\n }\n : null;\n editor.view.setProps({\n editable: () => !disabledRef.current,\n ...(surfaceAttributes ? { attributes: surfaceAttributes } : {}),\n });\n editor.addEventListener('transaction', onTransaction);\n\n // Seed initial content, then populate the preview once on mount.\n //\n // In collaborative mode we still load the local markdown first, then\n // join the room: the Yjs binding seeds an *empty* shared document from\n // this content on the first join, and overwrites the editor with the\n // shared content when the room already has edits — so the stored\n // markdown is the starting point without ever double-inserting.\n const joinRoom = () => {\n if (collaborative && collab && editor && !disposed) {\n (\n editor.run as Record<string, (...args: unknown[]) => boolean>\n ).changeRoom?.(collab.room);\n reseedWhenRoomStaysEmpty();\n }\n };\n\n // The Yjs binding is supposed to seed an empty room from the local\n // content, but the sync import can land as an overwrite that blanks\n // the just-loaded seed (observed with extension-yjs 0.8.x). Heal it:\n // once the join settles, an empty document with a non-empty seed\n // means nobody's content won — reload the seed, which the binding\n // then pushes into the room. Joiners pass no value, so exactly one\n // participant ever does this.\n const seed = valueRef.current;\n const reseedWhenRoomStaysEmpty = () => {\n if (!seed) return;\n const check = async (attempt: number) => {\n if (disposed || !editorInstance.current) return;\n try {\n const buffer =\n await editorInstance.current.saveDocument(MARKDOWN_TYPE);\n const current = new globalThis.TextDecoder()\n .decode(buffer)\n .trim();\n if (disposed || !editorInstance.current) return;\n if (current) return; // somebody's content arrived — done\n if (attempt >= 2) {\n await editorInstance.current.loadDocumentText(\n MARKDOWN_TYPE,\n seed\n );\n return;\n }\n setTimeout(() => void check(attempt + 1), 300);\n } catch {\n // A failed probe must not break the editor; the room stays as-is.\n }\n };\n setTimeout(() => void check(0), 300);\n };\n\n if (valueRef.current) {\n await queueInitialLoad(() =>\n editor!.loadDocumentText(MARKDOWN_TYPE, valueRef.current)\n );\n }\n if (disposed) return;\n loadedDocRef.current = editor.view.state.doc;\n lastSerializedDoc.current = editor.view.state.doc;\n if (showPreviewRef.current) setMd(valueRef.current);\n if (loadVersion === loadVersionRef.current) loadingRef.current = false;\n onReadyRef.current?.(editor);\n joinRoom();\n };\n\n const pending = setup();\n readyRef.current = pending;\n // Observe the rejection without replacing the readiness promise: callers\n // must be able to detect a failed load instead of saving stale content.\n void pending.catch((error) => {\n if (disposed) return;\n loadingRef.current = false;\n console.error('Failed to set up editor:', error);\n onErrorRef.current?.(error);\n });\n\n // Cleanup on unmount\n return () => {\n disposed = true;\n editorInstance.current = null; // makes onTransaction's guard effective\n editor?.removeEventListener('transaction', onTransaction);\n editor?.destroy();\n readyRef.current = null;\n host.replaceChildren();\n };\n // Initial `value`/`collab` are intentionally only applied on mount\n // (uncontrolled). Remount via `key` to switch rooms.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n getContent: async (): Promise<string> => {\n while (true) {\n await readyRef.current;\n const editor = editorInstance.current;\n if (!editor) return valueRef.current;\n const doc = editor.view.state.doc;\n const loadVersion = loadVersionRef.current;\n if (doc === loadedDocRef.current) return valueRef.current;\n const buffer = await editor.saveDocument(MARKDOWN_TYPE);\n if (\n editorInstance.current !== editor ||\n loadVersion !== loadVersionRef.current ||\n doc !== editor.view.state.doc\n )\n continue;\n const markdown = new globalThis.TextDecoder().decode(buffer);\n valueRef.current = markdown;\n loadedDocRef.current = doc;\n lastSerializedDoc.current = doc;\n return markdown;\n }\n },\n focus: (): void => {\n const apply = (): void => {\n const view = editorInstance.current?.view as\n | { focus?: () => void }\n | undefined;\n if (view?.focus) {\n view.focus();\n return;\n }\n hostRef.current\n ?.querySelector<HTMLElement>('[contenteditable=\"true\"], textarea')\n ?.focus();\n };\n // Callers focus on mount; the editor may still be loading its kits.\n if (editorInstance.current) apply();\n else void readyRef.current?.then(apply, () => undefined);\n },\n }),\n []\n );\n\n return (\n <div>\n <div>\n <div\n ref={hostRef}\n id={id}\n className={[\n 'kb-component',\n isDark ? 'kb-component--dark' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ')}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-disabled={disabled || undefined}\n style={{\n isolation: 'isolate',\n opacity: disabled ? 0.65 : undefined,\n pointerEvents: disabled ? 'none' : undefined,\n }}\n />\n </div>\n\n {showPreview && (\n <div>\n <div>\n <h5>Markdown Output</h5>\n <pre>{md}</pre>\n </div>\n </div>\n )}\n </div>\n );\n }\n);\n\nRichEditor.displayName = 'RichEditor';\n\nexport { RichEditor };\n"]}