@blocklet/discuss-kit-ux 2.1.182 → 2.1.184
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.
|
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
|
|
|
4
4
|
import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
|
|
5
5
|
import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
|
|
6
6
|
import { lazyRetry } from "@arcblock/ux/lib/Util";
|
|
7
|
-
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-C3NanUVK.mjs";
|
|
8
8
|
const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1422,7 +1422,7 @@ function AuthorInfo({
|
|
|
1422
1422
|
did: user == null ? void 0 : user.did
|
|
1423
1423
|
}
|
|
1424
1424
|
);
|
|
1425
|
-
return /* @__PURE__ */ jsxs(Box$1, { sx: mergeSx({ display: "flex", alignItems: "center", gap: 1, fontSize: mergedFontSize }, sx), ...rest, children: [
|
|
1425
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: mergeSx({ display: "flex", alignItems: "center", gap: 1.5, fontSize: mergedFontSize }, sx), ...rest, children: [
|
|
1426
1426
|
renderAvatar(),
|
|
1427
1427
|
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1, overflowX: "hidden" }, children: [
|
|
1428
1428
|
/* @__PURE__ */ jsxs(
|
|
@@ -1432,7 +1432,7 @@ function AuthorInfo({
|
|
|
1432
1432
|
sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
|
|
1433
1433
|
lineHeight: 1,
|
|
1434
1434
|
children: [
|
|
1435
|
-
/* @__PURE__ */ jsx("span", {
|
|
1435
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: showDID ? 12 : 16 }, children: newTitle || (user == null ? void 0 : user.fullName) }),
|
|
1436
1436
|
createdAt && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1437
1437
|
/* @__PURE__ */ jsx(Box$1, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
|
|
1438
1438
|
renderTime()
|
|
@@ -1768,12 +1768,13 @@ function PostComponent({
|
|
|
1768
1768
|
user: post.author,
|
|
1769
1769
|
createdAt: renderTime(),
|
|
1770
1770
|
showProfileCard,
|
|
1771
|
-
append: resolveAuthorInfoAppend(post)
|
|
1771
|
+
append: resolveAuthorInfoAppend(post),
|
|
1772
|
+
showDID: false
|
|
1772
1773
|
}
|
|
1773
1774
|
),
|
|
1774
1775
|
/* @__PURE__ */ jsx(Menu, { items: menuItems, style: { position: "absolute", right: 0, top: 0 } })
|
|
1775
1776
|
] }),
|
|
1776
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { ml:
|
|
1777
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { ml: 6.5 }, children: [
|
|
1777
1778
|
post.replyTo && /* @__PURE__ */ jsxs(
|
|
1778
1779
|
Box$1,
|
|
1779
1780
|
{
|
|
@@ -2183,84 +2184,94 @@ function GithubReaction({
|
|
|
2183
2184
|
}
|
|
2184
2185
|
) }, option.value);
|
|
2185
2186
|
}) }),
|
|
2186
|
-
/* @__PURE__ */ jsxs(
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
{
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
ml: -0.25,
|
|
2197
|
-
cursor: "pointer",
|
|
2198
|
-
".github-reaction-text, .github-reaction-icon": {
|
|
2199
|
-
color: "text.secondary"
|
|
2200
|
-
},
|
|
2201
|
-
"&:hover .github-reaction-text, &:hover .github-reaction-icon": {
|
|
2202
|
-
color: "secondary.main"
|
|
2203
|
-
}
|
|
2187
|
+
/* @__PURE__ */ jsxs(
|
|
2188
|
+
Box,
|
|
2189
|
+
{
|
|
2190
|
+
sx: {
|
|
2191
|
+
display: "flex",
|
|
2192
|
+
alignItems: "center",
|
|
2193
|
+
gap: 3,
|
|
2194
|
+
".github-reaction-icon": {
|
|
2195
|
+
color: "text.hint",
|
|
2196
|
+
cursor: "pointer"
|
|
2204
2197
|
},
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
":hover": { bgcolor: "grey.100" },
|
|
2248
|
-
...selected && {
|
|
2249
|
-
bgcolor: (theme) => alpha(theme.palette.primary.light, 0.2)
|
|
2250
|
-
}
|
|
2251
|
-
},
|
|
2252
|
-
children: /* @__PURE__ */ jsx(Box, { sx: emojiFont, children: option.label })
|
|
2198
|
+
".github-reaction-icon:hover": {
|
|
2199
|
+
color: "secondary.main"
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
children: [
|
|
2203
|
+
/* @__PURE__ */ jsxs(
|
|
2204
|
+
Box,
|
|
2205
|
+
{
|
|
2206
|
+
sx: {
|
|
2207
|
+
position: "relative",
|
|
2208
|
+
display: "flex",
|
|
2209
|
+
justifyContent: "center",
|
|
2210
|
+
alignItems: "center",
|
|
2211
|
+
gap: 0.75,
|
|
2212
|
+
ml: -0.25,
|
|
2213
|
+
cursor: "pointer"
|
|
2214
|
+
},
|
|
2215
|
+
onClick: handleOpen,
|
|
2216
|
+
children: [
|
|
2217
|
+
/* @__PURE__ */ jsx(
|
|
2218
|
+
Box,
|
|
2219
|
+
{
|
|
2220
|
+
className: "github-reaction-icon",
|
|
2221
|
+
component: tablerMoodPlus,
|
|
2222
|
+
sx: { width: "1em", height: "1em", fontSize: 18 }
|
|
2223
|
+
}
|
|
2224
|
+
),
|
|
2225
|
+
open && /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: () => setOpen(false), children: /* @__PURE__ */ jsx(
|
|
2226
|
+
Box,
|
|
2227
|
+
{
|
|
2228
|
+
sx: {
|
|
2229
|
+
display: "flex",
|
|
2230
|
+
gap: 0.5,
|
|
2231
|
+
position: "absolute",
|
|
2232
|
+
left: 0,
|
|
2233
|
+
bottom: 36,
|
|
2234
|
+
px: 1,
|
|
2235
|
+
py: 0.5,
|
|
2236
|
+
border: 1,
|
|
2237
|
+
borderColor: "grey.300",
|
|
2238
|
+
bgcolor: "#fff",
|
|
2239
|
+
borderRadius: 1
|
|
2253
2240
|
},
|
|
2254
|
-
option
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2241
|
+
children: options.map((option) => {
|
|
2242
|
+
const selected = selectedValuesMap[option.value];
|
|
2243
|
+
return /* @__PURE__ */ jsx(
|
|
2244
|
+
Box,
|
|
2245
|
+
{
|
|
2246
|
+
onClick: () => toggleRate(option.value),
|
|
2247
|
+
sx: {
|
|
2248
|
+
display: "flex",
|
|
2249
|
+
justifyContent: "center",
|
|
2250
|
+
alignItems: "center",
|
|
2251
|
+
width: 28,
|
|
2252
|
+
height: 28,
|
|
2253
|
+
fontSize: 14,
|
|
2254
|
+
borderRadius: 1,
|
|
2255
|
+
cursor: "pointer",
|
|
2256
|
+
":hover": { bgcolor: "grey.100" },
|
|
2257
|
+
...selected && {
|
|
2258
|
+
bgcolor: (theme) => alpha(theme.palette.primary.light, 0.2)
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
children: /* @__PURE__ */ jsx(Box, { sx: emojiFont, children: option.label })
|
|
2262
|
+
},
|
|
2263
|
+
option.value
|
|
2264
|
+
);
|
|
2265
|
+
})
|
|
2266
|
+
}
|
|
2267
|
+
) })
|
|
2268
|
+
]
|
|
2269
|
+
}
|
|
2270
|
+
),
|
|
2271
|
+
append
|
|
2272
|
+
]
|
|
2273
|
+
}
|
|
2274
|
+
)
|
|
2264
2275
|
] });
|
|
2265
2276
|
}
|
|
2266
2277
|
const prefs = window.blocklet.preferences;
|
|
@@ -2438,31 +2449,14 @@ function Comment({
|
|
|
2438
2449
|
onRate: ({ value, ratingType }) => onRate(post, value, ratingType),
|
|
2439
2450
|
onUnrate: () => onUnrate(post),
|
|
2440
2451
|
interactive,
|
|
2441
|
-
sx: { ".github-reaction-text": { display: { xs: "none", md: "inline-block" } } },
|
|
2442
2452
|
append: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2443
|
-
(!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */
|
|
2453
|
+
(!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsx(
|
|
2444
2454
|
Box$1,
|
|
2445
2455
|
{
|
|
2456
|
+
className: "github-reaction-icon",
|
|
2446
2457
|
onClick: () => protectLogin(session, () => setInputVisible(!inputVisible)),
|
|
2447
|
-
sx: {
|
|
2448
|
-
|
|
2449
|
-
alignItems: "center",
|
|
2450
|
-
gap: 0.75,
|
|
2451
|
-
fontSize: 13,
|
|
2452
|
-
color: "text.secondary",
|
|
2453
|
-
lineHeight: 1,
|
|
2454
|
-
"&:hover": { cursor: "pointer" }
|
|
2455
|
-
},
|
|
2456
|
-
children: [
|
|
2457
|
-
/* @__PURE__ */ jsx(
|
|
2458
|
-
Box$1,
|
|
2459
|
-
{
|
|
2460
|
-
component: tablerMessageCircle,
|
|
2461
|
-
sx: { width: "1em", height: "1em", fontSize: 18, color: "text.secondary" }
|
|
2462
|
-
}
|
|
2463
|
-
),
|
|
2464
|
-
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { display: { xs: "none", md: "inline-block" } }, children: "Reply" })
|
|
2465
|
-
]
|
|
2458
|
+
sx: { lineHeight: 1 },
|
|
2459
|
+
children: /* @__PURE__ */ jsx(Box$1, { component: tablerMessageCircle, sx: { width: "1em", height: "1em", fontSize: 18 } })
|
|
2466
2460
|
}
|
|
2467
2461
|
),
|
|
2468
2462
|
renderDonation && renderDonation(post)
|
|
@@ -4854,7 +4848,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, icon, ...rest }) {
|
|
|
4854
4848
|
}
|
|
4855
4849
|
const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 14L21 3m0 0l-6.5 18a.55.55 0 0 1-1 0L10 14l-7-3.5a.55.55 0 0 1 0-1z" }) });
|
|
4856
4850
|
const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M3 19V8.5a3.5 3.5 0 0 1 7 0V19m-7-6h7m11-1v7" }) });
|
|
4857
|
-
const Editor = lazyRetry(() => import("./editor-
|
|
4851
|
+
const Editor = lazyRetry(() => import("./editor-B3t1xsPl.mjs"));
|
|
4858
4852
|
function LazyEditor(props) {
|
|
4859
4853
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4860
4854
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, ay, ar, N, am, as, av, aw, l, ax, f, p, r, j, au, t, h, aa, az, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-
|
|
2
|
+
import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, ay, ar, N, am, as, av, aw, l, ax, f, p, r, j, au, t, h, aa, az, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-C3NanUVK.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -1344,7 +1344,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1344
1344
|
did: user == null ? void 0 : user.did
|
|
1345
1345
|
}
|
|
1346
1346
|
);
|
|
1347
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: mergeSx({ display: "flex", alignItems: "center", gap: 1, fontSize: mergedFontSize }, sx), ...rest, children: [
|
|
1347
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: mergeSx({ display: "flex", alignItems: "center", gap: 1.5, fontSize: mergedFontSize }, sx), ...rest, children: [
|
|
1348
1348
|
renderAvatar(),
|
|
1349
1349
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1, overflowX: "hidden" }, children: [
|
|
1350
1350
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1354,7 +1354,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1354
1354
|
sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
|
|
1355
1355
|
lineHeight: 1,
|
|
1356
1356
|
children: [
|
|
1357
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1357
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { fontSize: showDID ? 12 : 16 }, children: newTitle || (user == null ? void 0 : user.fullName) }),
|
|
1358
1358
|
createdAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1359
1359
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
|
|
1360
1360
|
renderTime()
|
|
@@ -1690,12 +1690,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1690
1690
|
user: post.author,
|
|
1691
1691
|
createdAt: renderTime(),
|
|
1692
1692
|
showProfileCard,
|
|
1693
|
-
append: resolveAuthorInfoAppend(post)
|
|
1693
|
+
append: resolveAuthorInfoAppend(post),
|
|
1694
|
+
showDID: false
|
|
1694
1695
|
}
|
|
1695
1696
|
),
|
|
1696
1697
|
/* @__PURE__ */ jsxRuntime.jsx(Menu, { items: menuItems, style: { position: "absolute", right: 0, top: 0 } })
|
|
1697
1698
|
] }),
|
|
1698
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ml:
|
|
1699
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ml: 6.5 }, children: [
|
|
1699
1700
|
post.replyTo && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1700
1701
|
Box,
|
|
1701
1702
|
{
|
|
@@ -2105,84 +2106,94 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2105
2106
|
}
|
|
2106
2107
|
) }, option.value);
|
|
2107
2108
|
}) }),
|
|
2108
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
{
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
ml: -0.25,
|
|
2119
|
-
cursor: "pointer",
|
|
2120
|
-
".github-reaction-text, .github-reaction-icon": {
|
|
2121
|
-
color: "text.secondary"
|
|
2122
|
-
},
|
|
2123
|
-
"&:hover .github-reaction-text, &:hover .github-reaction-icon": {
|
|
2124
|
-
color: "secondary.main"
|
|
2125
|
-
}
|
|
2109
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2110
|
+
material.Box,
|
|
2111
|
+
{
|
|
2112
|
+
sx: {
|
|
2113
|
+
display: "flex",
|
|
2114
|
+
alignItems: "center",
|
|
2115
|
+
gap: 3,
|
|
2116
|
+
".github-reaction-icon": {
|
|
2117
|
+
color: "text.hint",
|
|
2118
|
+
cursor: "pointer"
|
|
2126
2119
|
},
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
":hover": { bgcolor: "grey.100" },
|
|
2170
|
-
...selected && {
|
|
2171
|
-
bgcolor: (theme) => material.alpha(theme.palette.primary.light, 0.2)
|
|
2172
|
-
}
|
|
2173
|
-
},
|
|
2174
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: emojiFont, children: option.label })
|
|
2120
|
+
".github-reaction-icon:hover": {
|
|
2121
|
+
color: "secondary.main"
|
|
2122
|
+
}
|
|
2123
|
+
},
|
|
2124
|
+
children: [
|
|
2125
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2126
|
+
material.Box,
|
|
2127
|
+
{
|
|
2128
|
+
sx: {
|
|
2129
|
+
position: "relative",
|
|
2130
|
+
display: "flex",
|
|
2131
|
+
justifyContent: "center",
|
|
2132
|
+
alignItems: "center",
|
|
2133
|
+
gap: 0.75,
|
|
2134
|
+
ml: -0.25,
|
|
2135
|
+
cursor: "pointer"
|
|
2136
|
+
},
|
|
2137
|
+
onClick: handleOpen,
|
|
2138
|
+
children: [
|
|
2139
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2140
|
+
material.Box,
|
|
2141
|
+
{
|
|
2142
|
+
className: "github-reaction-icon",
|
|
2143
|
+
component: tablerMoodPlus,
|
|
2144
|
+
sx: { width: "1em", height: "1em", fontSize: 18 }
|
|
2145
|
+
}
|
|
2146
|
+
),
|
|
2147
|
+
open && /* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, { onClickAway: () => setOpen(false), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2148
|
+
material.Box,
|
|
2149
|
+
{
|
|
2150
|
+
sx: {
|
|
2151
|
+
display: "flex",
|
|
2152
|
+
gap: 0.5,
|
|
2153
|
+
position: "absolute",
|
|
2154
|
+
left: 0,
|
|
2155
|
+
bottom: 36,
|
|
2156
|
+
px: 1,
|
|
2157
|
+
py: 0.5,
|
|
2158
|
+
border: 1,
|
|
2159
|
+
borderColor: "grey.300",
|
|
2160
|
+
bgcolor: "#fff",
|
|
2161
|
+
borderRadius: 1
|
|
2175
2162
|
},
|
|
2176
|
-
option
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2163
|
+
children: options.map((option) => {
|
|
2164
|
+
const selected = selectedValuesMap[option.value];
|
|
2165
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2166
|
+
material.Box,
|
|
2167
|
+
{
|
|
2168
|
+
onClick: () => toggleRate(option.value),
|
|
2169
|
+
sx: {
|
|
2170
|
+
display: "flex",
|
|
2171
|
+
justifyContent: "center",
|
|
2172
|
+
alignItems: "center",
|
|
2173
|
+
width: 28,
|
|
2174
|
+
height: 28,
|
|
2175
|
+
fontSize: 14,
|
|
2176
|
+
borderRadius: 1,
|
|
2177
|
+
cursor: "pointer",
|
|
2178
|
+
":hover": { bgcolor: "grey.100" },
|
|
2179
|
+
...selected && {
|
|
2180
|
+
bgcolor: (theme) => material.alpha(theme.palette.primary.light, 0.2)
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: emojiFont, children: option.label })
|
|
2184
|
+
},
|
|
2185
|
+
option.value
|
|
2186
|
+
);
|
|
2187
|
+
})
|
|
2188
|
+
}
|
|
2189
|
+
) })
|
|
2190
|
+
]
|
|
2191
|
+
}
|
|
2192
|
+
),
|
|
2193
|
+
append
|
|
2194
|
+
]
|
|
2195
|
+
}
|
|
2196
|
+
)
|
|
2186
2197
|
] });
|
|
2187
2198
|
}
|
|
2188
2199
|
const prefs = window.blocklet.preferences;
|
|
@@ -2360,31 +2371,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2360
2371
|
onRate: ({ value, ratingType }) => onRate(post, value, ratingType),
|
|
2361
2372
|
onUnrate: () => onUnrate(post),
|
|
2362
2373
|
interactive,
|
|
2363
|
-
sx: { ".github-reaction-text": { display: { xs: "none", md: "inline-block" } } },
|
|
2364
2374
|
append: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2365
|
-
(!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsxRuntime.
|
|
2375
|
+
(!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2366
2376
|
Box,
|
|
2367
2377
|
{
|
|
2378
|
+
className: "github-reaction-icon",
|
|
2368
2379
|
onClick: () => protectLogin(session, () => setInputVisible(!inputVisible)),
|
|
2369
|
-
sx: {
|
|
2370
|
-
|
|
2371
|
-
alignItems: "center",
|
|
2372
|
-
gap: 0.75,
|
|
2373
|
-
fontSize: 13,
|
|
2374
|
-
color: "text.secondary",
|
|
2375
|
-
lineHeight: 1,
|
|
2376
|
-
"&:hover": { cursor: "pointer" }
|
|
2377
|
-
},
|
|
2378
|
-
children: [
|
|
2379
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2380
|
-
Box,
|
|
2381
|
-
{
|
|
2382
|
-
component: tablerMessageCircle,
|
|
2383
|
-
sx: { width: "1em", height: "1em", fontSize: 18, color: "text.secondary" }
|
|
2384
|
-
}
|
|
2385
|
-
),
|
|
2386
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { display: { xs: "none", md: "inline-block" } }, children: "Reply" })
|
|
2387
|
-
]
|
|
2380
|
+
sx: { lineHeight: 1 },
|
|
2381
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { component: tablerMessageCircle, sx: { width: "1em", height: "1em", fontSize: 18 } })
|
|
2388
2382
|
}
|
|
2389
2383
|
),
|
|
2390
2384
|
renderDonation && renderDonation(post)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.184",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ufo": "^1.5.4",
|
|
46
46
|
"unstated-next": "^1.1.0",
|
|
47
47
|
"url-join": "^4.0.1",
|
|
48
|
-
"@blocklet/editor": "^2.1.
|
|
49
|
-
"@blocklet/labels": "^2.1.
|
|
48
|
+
"@blocklet/editor": "^2.1.184",
|
|
49
|
+
"@blocklet/labels": "^2.1.184"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@arcblock/did-connect": "^2.10.36",
|