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

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 (156) hide show
  1. package/MIGRATION.md +45 -11
  2. package/dist/{EncounterMdyEditor-73PTTIRY.cjs → EncounterMdyEditor-46WMYRFI.cjs} +6 -6
  3. package/dist/{EncounterMdyEditor-73PTTIRY.cjs.map → EncounterMdyEditor-46WMYRFI.cjs.map} +1 -1
  4. package/dist/{EncounterMdyEditor-3SQY4MK2.js → EncounterMdyEditor-L7RBLE7B.js} +3 -3
  5. package/dist/{EncounterMdyEditor-3SQY4MK2.js.map → EncounterMdyEditor-L7RBLE7B.js.map} +1 -1
  6. package/dist/{chunk-4SUEBKTY.js → chunk-2OTPQPJS.js} +52 -44
  7. package/dist/chunk-2OTPQPJS.js.map +1 -0
  8. package/dist/{chunk-MZR634HI.cjs → chunk-3M2BBOXF.cjs} +9 -9
  9. package/dist/{chunk-MZR634HI.cjs.map → chunk-3M2BBOXF.cjs.map} +1 -1
  10. package/dist/{chunk-6UYMO3PF.cjs → chunk-47AOS5EC.cjs} +10 -2
  11. package/dist/chunk-47AOS5EC.cjs.map +1 -0
  12. package/dist/{chunk-DXNVQQYN.cjs → chunk-6L7CTEX2.cjs} +51 -44
  13. package/dist/chunk-6L7CTEX2.cjs.map +1 -0
  14. package/dist/{chunk-RTADGBBN.js → chunk-AIO2GCTL.js} +3 -3
  15. package/dist/{chunk-RTADGBBN.js.map → chunk-AIO2GCTL.js.map} +1 -1
  16. package/dist/{chunk-EX7Q5545.js → chunk-AKC677ZF.js} +5 -5
  17. package/dist/{chunk-EX7Q5545.js.map → chunk-AKC677ZF.js.map} +1 -1
  18. package/dist/{chunk-XEHD2HA5.cjs → chunk-FRPELUI5.cjs} +3 -3
  19. package/dist/{chunk-XEHD2HA5.cjs.map → chunk-FRPELUI5.cjs.map} +1 -1
  20. package/dist/{chunk-DGHS5IVD.js → chunk-GJSLKD4Q.js} +3 -3
  21. package/dist/{chunk-DGHS5IVD.js.map → chunk-GJSLKD4Q.js.map} +1 -1
  22. package/dist/{chunk-VMEVLBI3.js → chunk-GKMMDKYY.js} +3 -3
  23. package/dist/{chunk-VMEVLBI3.js.map → chunk-GKMMDKYY.js.map} +1 -1
  24. package/dist/{chunk-46RYJYN2.cjs → chunk-GU6TPVXF.cjs} +6 -6
  25. package/dist/{chunk-46RYJYN2.cjs.map → chunk-GU6TPVXF.cjs.map} +1 -1
  26. package/dist/chunk-IALTKN3Y.js +1017 -0
  27. package/dist/chunk-IALTKN3Y.js.map +1 -0
  28. package/dist/{chunk-33Y3KQWL.js → chunk-IGRHPZOJ.js} +3 -3
  29. package/dist/{chunk-33Y3KQWL.js.map → chunk-IGRHPZOJ.js.map} +1 -1
  30. package/dist/{chunk-PLBWZW4F.js → chunk-KAQNYX7B.js} +3 -3
  31. package/dist/{chunk-PLBWZW4F.js.map → chunk-KAQNYX7B.js.map} +1 -1
  32. package/dist/{chunk-SPGP252Q.js → chunk-KB2PLV5Q.js} +4 -4
  33. package/dist/{chunk-SPGP252Q.js.map → chunk-KB2PLV5Q.js.map} +1 -1
  34. package/dist/{chunk-NCPDUJKJ.cjs → chunk-KQXD6BFO.cjs} +4 -4
  35. package/dist/{chunk-NCPDUJKJ.cjs.map → chunk-KQXD6BFO.cjs.map} +1 -1
  36. package/dist/{chunk-4VSK3EE5.cjs → chunk-L77XJPKC.cjs} +3 -3
  37. package/dist/{chunk-4VSK3EE5.cjs.map → chunk-L77XJPKC.cjs.map} +1 -1
  38. package/dist/{chunk-PGJLW2NO.cjs → chunk-LLIG4X6M.cjs} +7 -7
  39. package/dist/{chunk-PGJLW2NO.cjs.map → chunk-LLIG4X6M.cjs.map} +1 -1
  40. package/dist/{chunk-NW6D6AFL.js → chunk-LWLHCUDP.js} +10 -10
  41. package/dist/{chunk-NW6D6AFL.js.map → chunk-LWLHCUDP.js.map} +1 -1
  42. package/dist/{chunk-YR45POH2.js → chunk-MAEANAAJ.js} +3 -3
  43. package/dist/{chunk-YR45POH2.js.map → chunk-MAEANAAJ.js.map} +1 -1
  44. package/dist/{chunk-X5HLVACK.js → chunk-MLCIINXT.js} +4 -4
  45. package/dist/{chunk-X5HLVACK.js.map → chunk-MLCIINXT.js.map} +1 -1
  46. package/dist/{chunk-JEXEFWEM.js → chunk-MNXIN4MS.js} +10 -2
  47. package/dist/chunk-MNXIN4MS.js.map +1 -0
  48. package/dist/{chunk-PHUTJKHL.cjs → chunk-MXIIPFTA.cjs} +3 -3
  49. package/dist/{chunk-PHUTJKHL.cjs.map → chunk-MXIIPFTA.cjs.map} +1 -1
  50. package/dist/{chunk-QO4A6U73.cjs → chunk-NCG7NJAW.cjs} +93 -30
  51. package/dist/chunk-NCG7NJAW.cjs.map +1 -0
  52. package/dist/{chunk-25MPUVTM.js → chunk-NIE3WBJH.js} +94 -31
  53. package/dist/chunk-NIE3WBJH.js.map +1 -0
  54. package/dist/{chunk-4GSFVD5V.js → chunk-NUHHWELE.js} +3 -3
  55. package/dist/{chunk-4GSFVD5V.js.map → chunk-NUHHWELE.js.map} +1 -1
  56. package/dist/{chunk-4M2KE4O5.cjs → chunk-OGFSFUIX.cjs} +7 -7
  57. package/dist/{chunk-4M2KE4O5.cjs.map → chunk-OGFSFUIX.cjs.map} +1 -1
  58. package/dist/{chunk-YSIFPHLX.js → chunk-OJQMC426.js} +2 -2
  59. package/dist/{chunk-YSIFPHLX.js.map → chunk-OJQMC426.js.map} +1 -1
  60. package/dist/{chunk-SVC7NPQ6.cjs → chunk-PDLVSJMZ.cjs} +6 -6
  61. package/dist/{chunk-SVC7NPQ6.cjs.map → chunk-PDLVSJMZ.cjs.map} +1 -1
  62. package/dist/{chunk-KD7YD6US.cjs → chunk-QOQQVNP3.cjs} +2 -2
  63. package/dist/{chunk-KD7YD6US.cjs.map → chunk-QOQQVNP3.cjs.map} +1 -1
  64. package/dist/{chunk-6O6EYKOG.cjs → chunk-R4QWCP2T.cjs} +65 -65
  65. package/dist/{chunk-6O6EYKOG.cjs.map → chunk-R4QWCP2T.cjs.map} +1 -1
  66. package/dist/chunk-RCTIPBLU.cjs +1039 -0
  67. package/dist/chunk-RCTIPBLU.cjs.map +1 -0
  68. package/dist/{chunk-FSWHZY3T.cjs → chunk-RD2I67C4.cjs} +3 -3
  69. package/dist/{chunk-FSWHZY3T.cjs.map → chunk-RD2I67C4.cjs.map} +1 -1
  70. package/dist/{chunk-YGSPIDE4.js → chunk-RM4CBS7Y.js} +3 -3
  71. package/dist/{chunk-YGSPIDE4.js.map → chunk-RM4CBS7Y.js.map} +1 -1
  72. package/dist/{chunk-3O3Q3DX7.cjs → chunk-S3LTUSO5.cjs} +21 -21
  73. package/dist/{chunk-3O3Q3DX7.cjs.map → chunk-S3LTUSO5.cjs.map} +1 -1
  74. package/dist/{chunk-2OXNJJHJ.cjs → chunk-TERHGQ73.cjs} +3 -3
  75. package/dist/{chunk-2OXNJJHJ.cjs.map → chunk-TERHGQ73.cjs.map} +1 -1
  76. package/dist/{chunk-DO7EED3B.cjs → chunk-WZ7WTIVU.cjs} +3 -3
  77. package/dist/{chunk-DO7EED3B.cjs.map → chunk-WZ7WTIVU.cjs.map} +1 -1
  78. package/dist/{chunk-566FIEPE.js → chunk-YFZNSP7F.js} +3 -3
  79. package/dist/{chunk-566FIEPE.js.map → chunk-YFZNSP7F.js.map} +1 -1
  80. package/dist/{chunk-I6Y2KLTZ.js → chunk-ZP4H5HA4.js} +3 -3
  81. package/dist/{chunk-I6Y2KLTZ.js.map → chunk-ZP4H5HA4.js.map} +1 -1
  82. package/dist/components/ActionPlan/index.cjs +1 -1
  83. package/dist/components/ActionPlan/index.js +1 -1
  84. package/dist/components/AlertDialog/index.cjs +7 -7
  85. package/dist/components/AlertDialog/index.js +3 -3
  86. package/dist/components/CustomizableDashboard/index.cjs +1 -1
  87. package/dist/components/CustomizableDashboard/index.js +1 -1
  88. package/dist/components/DateInput/index.cjs +3 -3
  89. package/dist/components/DateInput/index.js +2 -2
  90. package/dist/components/EmailEditor/index.cjs +16 -13
  91. package/dist/components/EmailEditor/index.js +7 -4
  92. package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
  93. package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
  94. package/dist/components/Markdown/index.cjs +10 -10
  95. package/dist/components/Markdown/index.js +2 -2
  96. package/dist/components/MediaEditor/index.cjs +9 -9
  97. package/dist/components/MediaEditor/index.js +4 -4
  98. package/dist/components/MediaFeed/index.cjs +4 -4
  99. package/dist/components/MediaFeed/index.js +3 -3
  100. package/dist/components/Modal/index.cjs +10 -10
  101. package/dist/components/Modal/index.js +2 -2
  102. package/dist/components/RadialExplorer/index.cjs +3 -3
  103. package/dist/components/RadialExplorer/index.js +2 -2
  104. package/dist/components/RecordHeader/index.cjs +4 -4
  105. package/dist/components/RecordHeader/index.js +2 -2
  106. package/dist/components/RecordLayout/index.cjs +1 -1
  107. package/dist/components/RecordLayout/index.js +1 -1
  108. package/dist/components/Sheet/index.cjs +1 -1
  109. package/dist/components/Sheet/index.js +1 -1
  110. package/dist/components/SuperChat/index.cjs +6 -6
  111. package/dist/components/SuperChat/index.js +5 -5
  112. package/dist/components/SuperChat/plugins/index.cjs +1 -1
  113. package/dist/components/SuperChat/plugins/index.js +1 -1
  114. package/dist/components/TagEditor/index.cjs +4 -4
  115. package/dist/components/TagEditor/index.js +2 -2
  116. package/dist/components/Textarea/index.cjs +7 -4
  117. package/dist/components/Textarea/index.js +4 -1
  118. package/dist/esheet.cjs +122 -123
  119. package/dist/esheet.cjs.map +1 -1
  120. package/dist/esheet.js +25 -26
  121. package/dist/esheet.js.map +1 -1
  122. package/dist/hooks/index.cjs +15 -15
  123. package/dist/hooks/index.js +3 -3
  124. package/dist/index.cjs +456 -425
  125. package/dist/index.cjs.map +1 -1
  126. package/dist/index.d.cts +19 -10
  127. package/dist/index.d.ts +19 -10
  128. package/dist/index.js +80 -42
  129. package/dist/index.js.map +1 -1
  130. package/dist/kerebron.cjs +32 -62
  131. package/dist/kerebron.cjs.map +1 -1
  132. package/dist/kerebron.css +145 -8
  133. package/dist/kerebron.d.cts +299 -1
  134. package/dist/kerebron.d.ts +299 -1
  135. package/dist/kerebron.js +22 -63
  136. package/dist/kerebron.js.map +1 -1
  137. package/dist/{model-EFXX5JZN.cjs → model-5PB6KNYH.cjs} +20 -20
  138. package/dist/{model-EFXX5JZN.cjs.map → model-5PB6KNYH.cjs.map} +1 -1
  139. package/dist/{model-TAARSYDY.js → model-OGWTZEXR.js} +6 -6
  140. package/dist/{model-TAARSYDY.js.map → model-OGWTZEXR.js.map} +1 -1
  141. package/dist/styles.css +1 -1
  142. package/dist/tailwind-preset.cjs +4 -4
  143. package/dist/tailwind-preset.js +1 -1
  144. package/dist/templates.cjs +31 -31
  145. package/dist/templates.js +2 -2
  146. package/dist/utils/index.cjs +5 -5
  147. package/dist/utils/index.d.cts +12 -12
  148. package/dist/utils/index.d.ts +12 -12
  149. package/dist/utils/index.js +1 -1
  150. package/package.json +3 -13
  151. package/dist/chunk-25MPUVTM.js.map +0 -1
  152. package/dist/chunk-4SUEBKTY.js.map +0 -1
  153. package/dist/chunk-6UYMO3PF.cjs.map +0 -1
  154. package/dist/chunk-DXNVQQYN.cjs.map +0 -1
  155. package/dist/chunk-JEXEFWEM.js.map +0 -1
  156. package/dist/chunk-QO4A6U73.cjs.map +0 -1
package/dist/kerebron.cjs CHANGED
@@ -1,73 +1,43 @@
1
1
  'use strict';
2
2
 
3
- var chunkQO4A6U73_cjs = require('./chunk-QO4A6U73.cjs');
3
+ var chunkRCTIPBLU_cjs = require('./chunk-RCTIPBLU.cjs');
4
+ var chunkNCG7NJAW_cjs = require('./chunk-NCG7NJAW.cjs');
5
+ require('./chunk-S2CJ57BX.cjs');
6
+ require('./chunk-FSLI5IKP.cjs');
7
+ require('./chunk-YP5T6NZD.cjs');
8
+ require('./chunk-ZNUMOJOI.cjs');
9
+ require('./chunk-PINIBEIU.cjs');
10
+ require('./chunk-I44YNYI6.cjs');
11
+ require('./chunk-Z5S5JEJD.cjs');
4
12
  require('./chunk-NMBYU7D7.cjs');
13
+ require('./chunk-PHYQSCP6.cjs');
14
+ require('./chunk-FHY3K6PL.cjs');
15
+ require('./chunk-FSGEDDF2.cjs');
16
+ require('./chunk-AOHJILLU.cjs');
17
+ require('./chunk-C7RVKV25.cjs');
18
+ require('./chunk-L7L5S2HO.cjs');
19
+ require('./chunk-YW2AKBLS.cjs');
20
+ require('./chunk-Z3WMDVMR.cjs');
21
+ require('./chunk-EACNRR3C.cjs');
22
+ require('./chunk-FSARTLUE.cjs');
23
+ require('./chunk-HGJHWI7W.cjs');
24
+ require('./chunk-IEY3ZJIT.cjs');
25
+ require('./chunk-S5RVSXDV.cjs');
5
26
  require('./chunk-EUAMEVVI.cjs');
6
- var react = require('react');
7
- var editor = require('@kerebron/editor');
8
- var CodeEditorKit = require('@kerebron/editor-kits/CodeEditorKit');
9
- var web = require('@kerebron/wasm/web');
10
- var jsxRuntime = require('react/jsx-runtime');
11
27
 
12
- var CodeEditor = ({
13
- value = "",
14
- onChange,
15
- lang = "typescript"
16
- }) => {
17
- const editorRef = react.useRef(null);
18
- const editorInstance = react.useRef(null);
19
- const onChangeRef = react.useRef(onChange);
20
- onChangeRef.current = onChange;
21
- react.useEffect(() => {
22
- const root = editorRef.current;
23
- if (!root) return;
24
- const applySelectLabel = () => {
25
- root.querySelectorAll("select.codejar-select").forEach((element) => {
26
- if (!element.getAttribute("aria-label")) {
27
- element.setAttribute("aria-label", "Code editor language");
28
- }
29
- });
30
- };
31
- applySelectLabel();
32
- const observer = new MutationObserver(() => applySelectLabel());
33
- observer.observe(root, { childList: true, subtree: true });
34
- return () => observer.disconnect();
35
- }, []);
36
- react.useEffect(() => {
37
- if (!editorRef.current) return;
38
- const editor$1 = editor.CoreEditor.create({
39
- element: editorRef.current,
40
- uri: "file:///untitled.ts",
41
- assetLoad: web.createAssetLoad("/kerebron-wasm"),
42
- editorKits: [new CodeEditorKit.CodeEditorKit(lang)]
43
- });
44
- editorInstance.current = editor$1;
45
- const onTransaction = async () => {
46
- if (!editorInstance.current) return;
47
- try {
48
- const buffer = await editorInstance.current.saveDocument("text/plain");
49
- onChangeRef.current?.(new globalThis.TextDecoder().decode(buffer));
50
- } catch (err) {
51
- console.error("Failed to read code:", err);
52
- }
53
- };
54
- editor$1.addEventListener("transaction", onTransaction);
55
- if (value) {
56
- editor$1.loadDocumentText("text/plain", value).catch((err) => console.error("Failed to load code:", err));
57
- }
58
- return () => {
59
- editor$1.removeEventListener("transaction", onTransaction);
60
- editor$1.destroy();
61
- };
62
- }, []);
63
- return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: editorRef, className: "kb-component" }) }) });
64
- };
65
- CodeEditor.displayName = "CodeEditor";
66
28
 
29
+
30
+ Object.defineProperty(exports, "CodeEditor", {
31
+ enumerable: true,
32
+ get: function () { return chunkRCTIPBLU_cjs.CodeEditor; }
33
+ });
34
+ Object.defineProperty(exports, "TextAreaRich", {
35
+ enumerable: true,
36
+ get: function () { return chunkRCTIPBLU_cjs.TextAreaRichKerebron; }
37
+ });
67
38
  Object.defineProperty(exports, "RichEditor", {
68
39
  enumerable: true,
69
- get: function () { return chunkQO4A6U73_cjs.RichEditor; }
40
+ get: function () { return chunkNCG7NJAW_cjs.RichEditor; }
70
41
  });
71
- exports.CodeEditor = CodeEditor;
72
42
  //# sourceMappingURL=kerebron.cjs.map
73
43
  //# sourceMappingURL=kerebron.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/RichEditor/CodeEditor.tsx"],"names":["useRef","useEffect","editor","CoreEditor","createAssetLoad","CodeEditorKit","jsx"],"mappings":"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","file":"kerebron.cjs","sourcesContent":["import React, { useEffect, useRef } from 'react';\n\nimport { CoreEditor } from '@kerebron/editor';\nimport { CodeEditorKit } from '@kerebron/editor-kits/CodeEditorKit';\nimport { createAssetLoad } from '@kerebron/wasm/web';\n\nexport interface CodeEditorProps {\n /** Initial source code to load into the editor. */\n value?: string;\n /** Called with the editor's contents whenever they change. */\n onChange?: (value: string) => void;\n /** Language/grammar to use for syntax highlighting. Defaults to `typescript`. */\n lang?: string;\n}\n\nconst CodeEditor: React.FC<CodeEditorProps> = ({\n value = '',\n onChange,\n lang = 'typescript',\n}) => {\n const editorRef = useRef<HTMLDivElement>(null);\n const editorInstance = useRef<CoreEditor | null>(null);\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n useEffect(() => {\n const root = editorRef.current;\n if (!root) return;\n\n const applySelectLabel = () => {\n root.querySelectorAll('select.codejar-select').forEach((element) => {\n if (!element.getAttribute('aria-label')) {\n element.setAttribute('aria-label', 'Code editor language');\n }\n });\n };\n\n applySelectLabel();\n const observer = new MutationObserver(() => applySelectLabel());\n observer.observe(root, { childList: true, subtree: true });\n return () => observer.disconnect();\n }, []);\n\n useEffect(() => {\n if (!editorRef.current) return;\n\n // Initialize the editor\n const editor = CoreEditor.create({\n element: editorRef.current,\n uri: 'file:///untitled.ts',\n assetLoad: createAssetLoad('/kerebron-wasm'),\n editorKits: [new CodeEditorKit(lang)],\n });\n\n editorInstance.current = editor;\n\n // Surface edits to callers.\n const onTransaction = async () => {\n if (!editorInstance.current) return;\n\n try {\n const buffer = await editorInstance.current.saveDocument('text/plain');\n onChangeRef.current?.(new globalThis.TextDecoder().decode(buffer));\n } catch (err) {\n console.error('Failed to read code:', err);\n }\n };\n\n editor.addEventListener('transaction', onTransaction);\n\n // Seed initial content on mount.\n if (value) {\n editor\n .loadDocumentText('text/plain', value)\n .catch((err) => console.error('Failed to load code:', err));\n }\n\n // Cleanup on unmount\n return () => {\n editor.removeEventListener('transaction', onTransaction);\n editor.destroy();\n };\n // Initial `value`/`lang` are intentionally only applied on mount.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <div>\n <div>\n <div ref={editorRef} className=\"kb-component\" />\n </div>\n </div>\n );\n};\n\nCodeEditor.displayName = 'CodeEditor';\n\nexport { CodeEditor };\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"kerebron.cjs"}
package/dist/kerebron.css CHANGED
@@ -92,15 +92,25 @@
92
92
  color: var(--kb-color-icon);
93
93
  }
94
94
 
95
+ /* The "…" overflow popup is deliberately NOT in the dropdown group below:
96
+ * it holds the same buttons that didn't fit in the bar, so it keeps the
97
+ * toolbar's own surface (stock Kerebron already paints both with
98
+ * --kb-color-surface-elevated) instead of the floating-menu card color.
99
+ * Stock also flips it to the dropdown color under an OS-level
100
+ * `prefers-color-scheme: dark` — but our themes are class-driven, so on a
101
+ * dark OS with a light app theme that turned the popup card-white.
102
+ * Re-assert the toolbar surface unconditionally (same specificity, later
103
+ * in the cascade, and media queries add none). */
104
+ .kb-custom-menu__overflow-menu {
105
+ background: var(--kb-color-surface-elevated);
106
+ }
107
+
95
108
  [data-theme='light'] .kb-dropdown__menu,
96
109
  [data-theme='light'] .kb-submenu__content,
97
- [data-theme='light'] .kb-custom-menu__overflow-menu,
98
110
  [data-theme='dark'] .kb-dropdown__menu,
99
111
  [data-theme='dark'] .kb-submenu__content,
100
- [data-theme='dark'] .kb-custom-menu__overflow-menu,
101
112
  .dark .kb-dropdown__menu,
102
- .dark .kb-submenu__content,
103
- .dark .kb-custom-menu__overflow-menu {
113
+ .dark .kb-submenu__content {
104
114
  background: var(--kb-menu-dropdown-bg) !important;
105
115
  border-color: var(--kb-menu-dropdown-border) !important;
106
116
  color: var(--kb-menu-dropdown-text) !important;
@@ -108,13 +118,10 @@
108
118
 
109
119
  [data-theme='light'] .kb-custom-menu .kb-dropdown__item .kb-menu__button:hover,
110
120
  [data-theme='light'] .kb-custom-menu .kb-submenu__label:hover,
111
- [data-theme='light'] .kb-custom-menu__overflow-item:hover,
112
121
  [data-theme='dark'] .kb-custom-menu .kb-dropdown__item .kb-menu__button:hover,
113
122
  [data-theme='dark'] .kb-custom-menu .kb-submenu__label:hover,
114
- [data-theme='dark'] .kb-custom-menu__overflow-item:hover,
115
123
  .dark .kb-custom-menu .kb-dropdown__item .kb-menu__button:hover,
116
- .dark .kb-custom-menu .kb-submenu__label:hover,
117
- .dark .kb-custom-menu__overflow-item:hover {
124
+ .dark .kb-custom-menu .kb-submenu__label:hover {
118
125
  background: var(--kb-menu-dropdown-hover) !important;
119
126
  color: var(--kb-menu-dropdown-text) !important;
120
127
  }
@@ -254,6 +261,16 @@
254
261
  line-height: 1;
255
262
  }
256
263
 
264
+ /* The toolbar collapses extras into its “…” overflow, but that width math
265
+ * can lag injected buttons and window resizes. It lays out nowrap with
266
+ * overflow visible, so without a wrap fallback the tail buttons spill out
267
+ * of the bar and paint (it is z-index 1000) over the editable and the
268
+ * docked macro panel below. Wrapping lets the bar grow a row instead;
269
+ * content reflows under it. */
270
+ .kb-custom-menu {
271
+ flex-wrap: wrap;
272
+ }
273
+
257
274
  /*
258
275
  * RTL (#319) — Kerebron's content.css/prosemirror.css use physical-direction
259
276
  * properties, so these parts don't mirror under dir="rtl". Restate them as
@@ -295,3 +312,123 @@
295
312
  .kb-editor .codecrock-root {
296
313
  direction: ltr;
297
314
  }
315
+
316
+ /*
317
+ * TextAreaRich (Kerebron surface) — the component wrapper supplies the
318
+ * Textarea chrome (border, radius, focus ring), so the stock kb-component
319
+ * frame is neutralized and the editable is resized to Textarea metrics:
320
+ * one Input row tall (24px line + 7px padding + the wrapper's 1px borders
321
+ * = h-10), auto-growing with content.
322
+ */
323
+ [data-slot='textarea-rich'] .kb-component {
324
+ border: 0;
325
+ border-radius: inherit;
326
+ background: transparent;
327
+ padding: 0;
328
+ }
329
+
330
+ [data-slot='textarea-rich'] .kb-editor {
331
+ min-height: 38px;
332
+ padding: 7px 12px;
333
+ /* Unlayered package CSS (this rule, Kerebron's base.css) outranks
334
+ Tailwind utilities on the editable, so sized hosts (Textarea `size`)
335
+ override through the variables instead. The 1rem/1.5rem defaults make
336
+ a one-line editable 24px + 14px padding = the 38px md Input row. */
337
+ font-size: var(--textarea-rich-font-size, 1rem);
338
+ line-height: var(--textarea-rich-line-height, 1.5rem);
339
+ overflow-y: auto;
340
+ transition:
341
+ min-height 0.2s ease-out,
342
+ padding 0.2s ease-out;
343
+ }
344
+
345
+ @media (prefers-reduced-motion: reduce) {
346
+ [data-slot='textarea-rich'] .kb-editor {
347
+ transition: none;
348
+ }
349
+ }
350
+
351
+ /* Kerebron's stock mobile toolbar is fixed to the bottom of the viewport, so
352
+ * menu.css clears it with `padding-bottom: 60px !important` on every editable
353
+ * under 768px. TextAreaRich replaces that toolbar with its own top-anchored
354
+ * kb-custom-menu, so on phones the clearance is just a dead band under the
355
+ * text — restore the Textarea metrics (!important to beat the library's). */
356
+ @media (max-width: 767px) {
357
+ [data-slot='textarea-rich'] .kb-component {
358
+ padding-bottom: 0 !important;
359
+ }
360
+ [data-slot='textarea-rich'] .kb-editor {
361
+ padding-bottom: 7px !important;
362
+ }
363
+ }
364
+
365
+ /* Indent past the block gutter's floating + trigger only while the writer
366
+ * is engaged (hovering, focused, or using the + menu) — at rest the text
367
+ * slides back flush with the Textarea padding. */
368
+ [data-slot='textarea-rich'][data-gutter]
369
+ [data-slot='textarea-rich-body']:hover
370
+ .kb-editor,
371
+ [data-slot='textarea-rich'][data-gutter]:focus-within .kb-editor,
372
+ [data-slot='textarea-rich'][data-gutter][data-block-menu] .kb-editor {
373
+ padding-inline-start: 2.5rem;
374
+ }
375
+
376
+ /* On touch devices the + trigger is always visible (no hover to reveal it),
377
+ * so the indent must be permanent — otherwise an unfocused field starts its
378
+ * text under the trigger. */
379
+ @media (hover: none) {
380
+ [data-slot='textarea-rich'][data-gutter] .kb-editor {
381
+ padding-inline-start: 2.5rem;
382
+ }
383
+ }
384
+
385
+ /* The toolbar stays mounted (its buttons carry live editor state) but is
386
+ * chrome the field reveals on demand. Only the menu bar itself is hidden —
387
+ * its wrapper also contains the editable surface. */
388
+ [data-slot='textarea-rich'][data-toolbar='hidden'] .kb-custom-menu,
389
+ [data-slot='textarea-rich'][data-toolbar='hidden']
390
+ .kb-custom-menu__overflow-menu {
391
+ display: none;
392
+ }
393
+
394
+ /* Disabled/readOnly: the toolbar is made `inert` (see TextAreaRichKerebron);
395
+ * dim it so it also reads as unavailable. */
396
+ [data-slot='textarea-rich'][data-inert] .kb-custom-menu {
397
+ opacity: 0.5;
398
+ }
399
+
400
+ /* Working space while the docked macro panel is open. The panel docks
401
+ * below the toolbar (which keeps its full width), so only the editable
402
+ * sidesteps it; tall enough for search plus a few rows, far less when the
403
+ * compact panel is just rows. */
404
+ @media (min-width: 768px) {
405
+ [data-slot='textarea-rich'][data-macros-open] .kb-editor {
406
+ min-height: 250px;
407
+ margin-inline-end: 18rem;
408
+ }
409
+ [data-slot='textarea-rich'][data-macros-open][data-compact-macros]
410
+ .kb-editor {
411
+ min-height: 140px;
412
+ }
413
+ }
414
+
415
+ /* RichEditor isolates `.kb-component` (inline style) so the toolbar's
416
+ * z-index:1000 can't escape into the page — but the docked macro panel is
417
+ * a later sibling OUTSIDE that boundary, so it painted over the toolbar's
418
+ * dropdowns and its "…" overflow popup. Move the isolation boundary up to
419
+ * the field root: the toolbar and its popups now rise above the docked
420
+ * panel (and the panel stays above the editable by DOM order), while
421
+ * their z-index still can't leak past the field. */
422
+ [data-slot='textarea-rich'] {
423
+ isolation: isolate;
424
+ }
425
+ [data-slot='textarea-rich'] .kb-component {
426
+ isolation: auto !important;
427
+ }
428
+
429
+ /* Kerebron caps the "…" overflow popup at 320px, which wraps the grid onto
430
+ * a second row once our Macros/Dictate items join it. Let it grow with its
431
+ * content, up to the field's width (minus its inset on both sides). */
432
+ [data-slot='textarea-rich'] .kb-custom-menu__overflow-menu {
433
+ max-width: calc(100% - 2 * var(--kb-space-xs, 4px));
434
+ }
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
3
  import { CoreEditor, AssetLoad, EditorKit } from '@kerebron/editor';
4
+ import { MenuElement } from '@kerebron/extension-menu';
5
+ export { MenuElement } from '@kerebron/extension-menu';
4
6
  import { MediaUploadOptions } from '@kerebron/extension-basic-editor/ExtensionMediaUpload';
5
7
 
6
8
  /**
@@ -16,6 +18,12 @@ import { MediaUploadOptions } from '@kerebron/extension-basic-editor/ExtensionMe
16
18
  * peers — plain-mode consumers never load them.
17
19
  */
18
20
 
21
+ /**
22
+ * Reshape the toolbar menu before it renders: receives the stock menu's
23
+ * item groups and returns the groups to render. Append custom
24
+ * {@link MenuElement}s (e.g. a Macros toggle) or drop stock groups.
25
+ */
26
+ type ModifyMenu = (menus: MenuElement[][]) => MenuElement[][];
19
27
  interface CollabConfig {
20
28
  /** Room id — one shared document per room (e.g. a post id). */
21
29
  room: string;
@@ -81,6 +89,12 @@ interface RichEditorProps {
81
89
  collab?: CollabConfig;
82
90
  /** Read-only surface: no typing, and the content dims. */
83
91
  disabled?: boolean;
92
+ /**
93
+ * Lock edits while keeping the surface focusable and selectable, without
94
+ * the dimmed `disabled` styling. Applied from creation, so the document
95
+ * cannot be edited even while the initial load is still in flight.
96
+ */
97
+ readOnly?: boolean;
84
98
  /**
85
99
  * Id for the editor host element — an `aria-labelledby`/`aria-describedby`
86
100
  * anchor. The host is a `div`, not a labelable control, so a
@@ -120,6 +134,28 @@ interface RichEditorProps {
120
134
  mediaUpload?: MediaUploadOptions;
121
135
  /** Additional editor kits, installed once when the editor mounts. */
122
136
  editorKits?: EditorKit[];
137
+ /**
138
+ * Reshape the stock toolbar before it renders: receives the menu's item
139
+ * groups and returns the groups to render — append custom controls (a
140
+ * macros toggle, dictation) or drop stock ones. Read once, when the editor
141
+ * mounts — like {@link collab}, remount via `key` to change it.
142
+ */
143
+ modifyMenu?: ModifyMenu;
144
+ /**
145
+ * MIME type of the `value`/`onChange` contract (`'text/x-markdown'` by
146
+ * default; pass `'text/html'` for an HTML-valued surface). Governs both
147
+ * how `value` is parsed and what `onChange`/`getContent()` emit.
148
+ */
149
+ valueType?: string;
150
+ /**
151
+ * Converge the document to `value` on every render, not only when the
152
+ * prop changes — native controlled-input semantics: when a host's
153
+ * `onChange` does not echo an edit back into `value`, the edit reverts.
154
+ * A rejected edit leaves the prop identity unchanged while the document
155
+ * moved on, which a change-gated reload can never see. Off by default,
156
+ * which tolerates read-once hosts that call `getContent()` on submit.
157
+ */
158
+ strictValue?: boolean;
123
159
  }
124
160
  interface RichEditorHandle {
125
161
  /**
@@ -150,4 +186,266 @@ interface CodeEditorProps {
150
186
  }
151
187
  declare const CodeEditor: React__default.FC<CodeEditorProps>;
152
188
 
153
- export { CodeEditor, type CodeEditorProps, type CollabConfig, RichEditor, type RichEditorHandle, type RichEditorProps };
189
+ interface Macro {
190
+ /** Stable identifier. */
191
+ id: string;
192
+ /** Human-readable name shown in the list. */
193
+ label: string;
194
+ /** Plain text inserted into the editor. `\n` is preserved. */
195
+ content: string;
196
+ /** Optional shortcut identifier shown as a badge (e.g. `.b`). */
197
+ shortcut?: string;
198
+ /** Extra search terms that are not displayed. */
199
+ keywords?: string[];
200
+ }
201
+ interface MacroGroup {
202
+ /** Stable identifier. */
203
+ id: string;
204
+ /** Group heading (e.g. "Default library"). */
205
+ label: string;
206
+ /**
207
+ * `previous` renders the group visually distinct from library macros
208
+ * (history icon, muted header) so prior values are never mistaken for
209
+ * predefined content. Defaults to `library`.
210
+ */
211
+ kind?: 'library' | 'previous';
212
+ /** Macros belonging to the group. */
213
+ macros: Macro[];
214
+ }
215
+ interface MacroLibraryProps {
216
+ /** Grouped macros supplied by the application. */
217
+ groups: MacroGroup[];
218
+ /** Called with the chosen macro. The caller performs the insertion. */
219
+ onSelect: (macro: Macro) => void;
220
+ /** Id for the panel root (e.g. the target of a toggle's aria-controls). */
221
+ id?: string;
222
+ /**
223
+ * Name of the insertion target shown in the header (e.g. the editor's
224
+ * label), rendered as "Insert into <target>".
225
+ */
226
+ targetLabel?: string;
227
+ /** When provided, renders a close button and enables Escape-to-close. */
228
+ onClose?: () => void;
229
+ /** When provided, renders a "Save as macro" action in the footer. */
230
+ onCreateMacro?: () => void;
231
+ /** Autofocus the search input on mount. Defaults to false. */
232
+ autoFocusSearch?: boolean;
233
+ /**
234
+ * Minimal chrome for short, space-constrained lists: hides the header,
235
+ * the search input, and library group headings so the panel is just the
236
+ * macro rows. Previous-value groups keep their heading so prior answers
237
+ * stay visually distinct. Escape-to-close still works when `onClose` is
238
+ * provided. Defaults to false.
239
+ */
240
+ compact?: boolean;
241
+ /** Additional class for the panel root. */
242
+ className?: string;
243
+ /** Overridable labels for i18n. */
244
+ labels?: Partial<typeof DEFAULT_LABELS>;
245
+ }
246
+ declare const DEFAULT_LABELS: {
247
+ insertInto: string;
248
+ macros: string;
249
+ searchPlaceholder: string;
250
+ searchLabel: string;
251
+ close: string;
252
+ createMacro: string;
253
+ empty: string;
254
+ emptyHint: string;
255
+ noResults: string;
256
+ clearSearch: string;
257
+ showMore: string;
258
+ };
259
+
260
+ interface RichTextVariable {
261
+ /** Human-readable label shown in the variable menu. */
262
+ label: string;
263
+ /** The token displayed for the variable (e.g. `{{employee.name}}`). */
264
+ value: string;
265
+ /** Optional text inserted instead of `value` (e.g. an expanded group). */
266
+ insertValue?: string;
267
+ }
268
+ interface RichTextVariableGroup {
269
+ /** Group heading shown in the variable menu. */
270
+ label: string;
271
+ /** Variables belonging to the group. */
272
+ variables: RichTextVariable[];
273
+ }
274
+ interface RichTextEditorBlockMenuLabels {
275
+ /** Accessible label for the gutter `+` button. Defaults to "Block menu". */
276
+ blockMenu?: string;
277
+ /** "Text" (normal paragraph) menu item. */
278
+ text?: string;
279
+ /** "Heading 1" menu item. */
280
+ heading1?: string;
281
+ /** "Heading 2" menu item. */
282
+ heading2?: string;
283
+ /** "Heading 3" menu item. */
284
+ heading3?: string;
285
+ /** "Bullet list" menu item. */
286
+ bulletList?: string;
287
+ /** "Numbered list" menu item. */
288
+ numberedList?: string;
289
+ /** "Quote" menu item. */
290
+ quote?: string;
291
+ /** "Insert macro" submenu parent (shown when `macros` is provided). */
292
+ insertMacro?: string;
293
+ /** "Show macro library" menu item (shown when `macros` is provided). */
294
+ showMacroLibrary?: string;
295
+ /** Toolbar toggle item while the toolbar is hidden. */
296
+ showToolbar?: string;
297
+ /** Toolbar toggle item while the toolbar is visible. */
298
+ hideToolbar?: string;
299
+ }
300
+ interface RichTextEditorProps {
301
+ /** Current HTML value of the editor. */
302
+ value: string;
303
+ /** Called with the updated HTML whenever the content changes. */
304
+ onChange: (value: string) => void;
305
+ /** Placeholder shown when the editor is empty. */
306
+ placeholder?: string;
307
+ /** Additional class for the editor wrapper. */
308
+ className?: string;
309
+ /**
310
+ * Variable groups for the "Insert variable" menu. When omitted the variable
311
+ * menu and the `<< >>` → `{{ }}` convert button are hidden.
312
+ */
313
+ variableGroups?: RichTextVariableGroup[];
314
+ /** Enable the speech-to-text dictation button. Defaults to true. */
315
+ enableDictation?: boolean;
316
+ /** Called when dictation cannot start (replaces native alerts). */
317
+ onDictationError?: (message: string) => void;
318
+ /** Disable editing and toolbar actions. */
319
+ disabled?: boolean;
320
+ /**
321
+ * Sanitises HTML introduced by paste or drop before it reaches the editable
322
+ * DOM. Without it, pasted markup is inserted as the browser provides it.
323
+ */
324
+ sanitizeHtml?: (html: string) => string;
325
+ /**
326
+ * Grouped macros for the optional macro addon. When omitted the editor is
327
+ * unchanged. When provided, a "Macros" toolbar toggle docks a searchable
328
+ * macro panel inside the editor; selecting a macro inserts its content at
329
+ * the retained caret position. Typing a macro shortcut (e.g. `.b`)
330
+ * followed by a space expands it in place, panel open or not.
331
+ */
332
+ macros?: MacroGroup[];
333
+ /** Open the macro panel initially. Defaults to false. */
334
+ defaultMacrosOpen?: boolean;
335
+ /**
336
+ * Focus-driven macro panel: the field rests as a plain input, the panel
337
+ * animates in while focus is anywhere inside the editor frame (editable,
338
+ * toolbar, gutter or the panel itself) and animates away when focus
339
+ * leaves. Overrides `defaultMacrosOpen`; Escape-to-close is disabled since
340
+ * visibility follows focus. Pairs well with `compactMacros`. Defaults to
341
+ * false.
342
+ */
343
+ macrosOnFocus?: boolean;
344
+ /**
345
+ * Dock the macro panel in `MacroLibrary`'s compact mode (no header,
346
+ * search, or library group headings) and shrink the macros-open working
347
+ * space to match — for short lists in dense forms. Defaults to false.
348
+ */
349
+ compactMacros?: boolean;
350
+ /**
351
+ * Called on any explicit macro invocation: a pick from the macro panel or
352
+ * the block gutter flyout, or a typed `.shortcut` expansion. Return `true`
353
+ * to take over the insertion: the editor skips its caret insertion and the
354
+ * host applies the content through its own value update (e.g. appending a
355
+ * coded finding as its own line). For typed shortcuts the editor removes
356
+ * the typed token (and publishes that edit) before consulting the
357
+ * callback, so a host that takes over computes from a token-free value.
358
+ */
359
+ onMacroInsert?: (macro: Macro) => boolean | void;
360
+ /**
361
+ * Overridable labels for the macro addon (i18n). Panel labels are
362
+ * forwarded to the docked `MacroLibrary`; `macros` doubles as the toolbar
363
+ * toggle text, and `showMacros`/`hideMacros` set the toggle's title.
364
+ */
365
+ macroLabels?: MacroLibraryProps['labels'] & {
366
+ /** Toggle title while the panel is closed. Defaults to "Show macros". */
367
+ showMacros?: string;
368
+ /** Toggle title while the panel is open. Defaults to "Hide macros". */
369
+ hideMacros?: string;
370
+ };
371
+ /** Forwarded to the macro panel's "Save as macro" action. */
372
+ onCreateMacro?: () => void;
373
+ /**
374
+ * Controlled toolbar visibility. `'hidden'` removes the toolbar entirely
375
+ * for chromeless surfaces (typed shortcuts keep working; pair with
376
+ * `markdownShortcuts` or `blockMenu` so formatting stays reachable). When
377
+ * omitted the editor manages visibility itself, starting from
378
+ * `defaultToolbar` — existing consumers are unchanged.
379
+ */
380
+ toolbar?: 'visible' | 'hidden';
381
+ /**
382
+ * Initial toolbar visibility when `toolbar` is uncontrolled. Defaults to
383
+ * `'visible'`.
384
+ */
385
+ defaultToolbar?: 'visible' | 'hidden';
386
+ /**
387
+ * Called when the block gutter menu toggles the toolbar ("Show toolbar" /
388
+ * "Hide toolbar"), so hosts can persist the preference or drive the
389
+ * controlled `toolbar` prop.
390
+ */
391
+ onToolbarChange?: (toolbar: 'visible' | 'hidden') => void;
392
+ /**
393
+ * Notion-style block gutter menu. Hovering a text row reveals a `+`
394
+ * button in the start gutter whose menu applies block formats to that
395
+ * row, opens the macro panel (when `macros` is provided) and toggles the
396
+ * toolbar. Also reachable from the keyboard with Ctrl/Cmd+/ on the
397
+ * caret's block. Defaults to false.
398
+ */
399
+ blockMenu?: boolean;
400
+ /** Overridable labels for the block gutter menu (i18n). */
401
+ blockMenuLabels?: RichTextEditorBlockMenuLabels;
402
+ /**
403
+ * Expand markdown-style block shortcuts typed at the start of a line and
404
+ * followed by a space: `#`/`##`/`###` → headings, `-`/`*` → bullet list,
405
+ * `1.` → numbered list, `>` → block quote. Inline rules (`**bold**`) are
406
+ * not interpreted. Defaults to false.
407
+ */
408
+ markdownShortcuts?: boolean;
409
+ /**
410
+ * Textarea-like surface: removes the wrapper border/radius and starts the
411
+ * editable at a single Input-row height that auto-grows with content
412
+ * (matching `Textarea`'s `md` metrics). The host supplies the chrome —
413
+ * `TextAreaRich` is the packaged pairing. Defaults to false.
414
+ */
415
+ chromeless?: boolean;
416
+ /** Id applied to the editable region (deep links, `aria-labelledby`). */
417
+ id?: string;
418
+ /**
419
+ * Prevent editing and formatting while keeping the region focusable and
420
+ * its text selectable — the contenteditable analogue of a native
421
+ * textarea's `readOnly`. The block gutter menu is hidden.
422
+ */
423
+ readOnly?: boolean;
424
+ /** Extra class for the editable region itself (fonts, whitespace). */
425
+ editorClassName?: string;
426
+ /** Inline style for the editable region (e.g. a row-derived min-height). */
427
+ editorStyle?: React.CSSProperties;
428
+ /** Accessible label for the editable region. */
429
+ 'aria-label'?: string;
430
+ /** Id(s) of element(s) labelling the editable region. */
431
+ 'aria-labelledby'?: string;
432
+ /** Ids of elements describing the editable region (errors, helper text). */
433
+ 'aria-describedby'?: string;
434
+ /** Marks the editable region invalid for assistive technology. */
435
+ 'aria-invalid'?: React.AriaAttributes['aria-invalid'];
436
+ /** Marks the editable region required for assistive technology. */
437
+ 'aria-required'?: React.AriaAttributes['aria-required'];
438
+ }
439
+
440
+ interface TextAreaRichProps extends Omit<RichTextEditorProps, 'chromeless' | 'blockMenu' | 'defaultToolbar'> {
441
+ /**
442
+ * Initial toolbar visibility when `toolbar` is uncontrolled. TextAreaRich
443
+ * is chromeless, so this defaults to `'hidden'`; the block gutter menu's
444
+ * "Show toolbar" reveals it on demand.
445
+ */
446
+ defaultToolbar?: 'visible' | 'hidden';
447
+ }
448
+
449
+ declare const TextAreaRichKerebron: React.ForwardRefExoticComponent<TextAreaRichProps & React.RefAttributes<HTMLDivElement>>;
450
+
451
+ export { CodeEditor, type CodeEditorProps, type CollabConfig, type ModifyMenu, RichEditor, type RichEditorHandle, type RichEditorProps, TextAreaRichKerebron as TextAreaRich, type TextAreaRichProps };