reachat 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/Markdown/CodeHighlighter.d.ts +4 -0
- package/dist/Markdown/themes/dark.d.ts +0 -1
- package/dist/docs.json +20 -1
- package/dist/index.js +22 -17
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +22 -17
- package/dist/index.umd.cjs.map +1 -1
- package/dist/theme.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -225,9 +225,8 @@
|
|
|
225
225
|
"msHyphens": "none",
|
|
226
226
|
"hyphens": "none",
|
|
227
227
|
"padding": "1em",
|
|
228
|
-
"margin": "0
|
|
229
|
-
"overflow": "auto"
|
|
230
|
-
"borderRadius": "0.3em"
|
|
228
|
+
"margin": "0",
|
|
229
|
+
"overflow": "auto"
|
|
231
230
|
},
|
|
232
231
|
'code[class*="language-"]::-moz-selection': {
|
|
233
232
|
"background": "#1e293b",
|
|
@@ -1192,6 +1191,7 @@
|
|
|
1192
1191
|
copyClassName,
|
|
1193
1192
|
copyIcon = /* @__PURE__ */ jsxRuntime.jsx(SvgCopy, {}),
|
|
1194
1193
|
language,
|
|
1194
|
+
toolbarClassName,
|
|
1195
1195
|
theme = dark
|
|
1196
1196
|
}) => {
|
|
1197
1197
|
const match = language == null ? void 0 : language.match(/language-(\w+)/);
|
|
@@ -1204,17 +1204,20 @@
|
|
|
1204
1204
|
});
|
|
1205
1205
|
};
|
|
1206
1206
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: reablocks.cn("relative", className), children: [
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1207
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: reablocks.cn(toolbarClassName), children: [
|
|
1208
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: lang }),
|
|
1209
|
+
copyIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1210
|
+
reablocks.Button,
|
|
1211
|
+
{
|
|
1212
|
+
className: reablocks.cn(copyClassName),
|
|
1213
|
+
size: "small",
|
|
1214
|
+
variant: "text",
|
|
1215
|
+
title: "Copy code",
|
|
1216
|
+
onClick: () => handleCopy(children),
|
|
1217
|
+
children: copyIcon
|
|
1218
|
+
}
|
|
1219
|
+
)
|
|
1220
|
+
] }),
|
|
1218
1221
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1219
1222
|
reactSyntaxHighlighter.Prism,
|
|
1220
1223
|
{
|
|
@@ -1244,7 +1247,8 @@
|
|
|
1244
1247
|
...props,
|
|
1245
1248
|
language: className,
|
|
1246
1249
|
className: reablocks.cn(theme.messages.message.markdown.code, className),
|
|
1247
|
-
copyClassName: reablocks.cn(theme.messages.message.markdown.copy)
|
|
1250
|
+
copyClassName: reablocks.cn(theme.messages.message.markdown.copy),
|
|
1251
|
+
toolbarClassName: reablocks.cn(theme.messages.message.markdown.toolbar)
|
|
1248
1252
|
}
|
|
1249
1253
|
),
|
|
1250
1254
|
table: (props) => /* @__PURE__ */ jsxRuntime.jsx(TableComponent, { ...props, className: reablocks.cn(theme.messages.message.markdown.table) }),
|
|
@@ -1635,13 +1639,14 @@ ${response}`),
|
|
|
1635
1639
|
}
|
|
1636
1640
|
},
|
|
1637
1641
|
markdown: {
|
|
1638
|
-
copy: "
|
|
1642
|
+
copy: "sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50",
|
|
1639
1643
|
p: "mb-2",
|
|
1640
1644
|
a: "text-blue-400 underline",
|
|
1641
1645
|
table: "table-auto w-full m-2",
|
|
1642
1646
|
th: "px-4 py-2 text-left font-bold border-b border-gray-500",
|
|
1643
1647
|
td: "px-4 py-2",
|
|
1644
|
-
code: "m-2 rounded",
|
|
1648
|
+
code: "m-2 rounded-b relative",
|
|
1649
|
+
toolbar: "text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ",
|
|
1645
1650
|
li: "mb-2 ml-6",
|
|
1646
1651
|
ul: "mb-4 list-disc",
|
|
1647
1652
|
ol: "mb-4 list-decimal"
|