@blocklet/discuss-kit-ux 1.6.117 → 1.6.119

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 { lazy } from "react";
7
- import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-vKEw0S5J.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-7oAOy7l-.mjs";
8
8
  import "@blocklet/labels";
9
9
  import "@mui/material/styles";
10
10
  import "@mui/material/Box";
@@ -306,13 +306,11 @@ const UPLOADS_PREFIX$1 = "/uploads";
306
306
  const IMAGE_URL_PREFIX = joinUrl(inferDiscussKitApiPrefix(), UPLOADS_PREFIX$1);
307
307
  const originalExportJSON$1 = ImageNode.prototype.exportJSON;
308
308
  const ensureLeadingSlash$1 = (str) => str.startsWith("/") ? str : `/${str}`;
309
- const stripResizeQuery = (str) => str.split("?").shift();
310
309
  ImageNode.prototype.exportJSON = function exportJSON() {
311
310
  const json = originalExportJSON$1.call(this);
312
311
  if (json.src && json.src.startsWith(IMAGE_URL_PREFIX)) {
313
312
  json.src = json.src.replace(IMAGE_URL_PREFIX, "");
314
313
  json.src = ensureLeadingSlash$1(json.src);
315
- json.src = stripResizeQuery(json.src);
316
314
  }
317
315
  return json;
318
316
  };
@@ -322,16 +320,6 @@ function imageNodeTransform(node) {
322
320
  if ((src == null ? void 0 : src.startsWith("/")) && !src.startsWith(IMAGE_URL_PREFIX)) {
323
321
  targetNode.setSrc(joinUrl(IMAGE_URL_PREFIX, src));
324
322
  }
325
- if (targetNode.getSrc() && typeof node.__width === "number") {
326
- const url = new URL(targetNode.getSrc(), window.location.origin);
327
- if (!url.searchParams.has("imageFilter")) {
328
- url.searchParams.set("imageFilter", "resize");
329
- url.searchParams.set("w", `${node.__width}`);
330
- url.searchParams.set("q", "75");
331
- url.searchParams.set("f", "webp");
332
- targetNode.setSrc(url.href.replace(window.location.origin, ""));
333
- }
334
- }
335
323
  }
336
324
  function ImagePathFixerPlugin() {
337
325
  const [editor] = useLexicalComposerContext();
@@ -1654,6 +1642,9 @@ const IconButtonRoot = styled("div")`
1654
1642
  }
1655
1643
  }
1656
1644
  `;
1645
+ const emojiFont = {
1646
+ fontFamily: '"Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color"'
1647
+ };
1657
1648
  function GithubReaction({
1658
1649
  data,
1659
1650
  onRate,
@@ -1748,7 +1739,10 @@ function GithubReaction({
1748
1739
  return /* @__PURE__ */ jsx(Tooltip$1, { title: raters == null ? void 0 : raters.join(", "), children: /* @__PURE__ */ jsx(
1749
1740
  Chip$1,
1750
1741
  {
1751
- label: `${option.label} ${countPerValue[option.value]}`,
1742
+ label: /* @__PURE__ */ jsxs(Box$1, { component: "span", sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [
1743
+ /* @__PURE__ */ jsx(Box$1, { component: "span", sx: emojiFont, children: option.label }),
1744
+ /* @__PURE__ */ jsx("span", { children: countPerValue[option.value] })
1745
+ ] }),
1752
1746
  color: "default",
1753
1747
  size: "small",
1754
1748
  variant: selected ? "outlined" : "filled",
@@ -1822,7 +1816,7 @@ function GithubReaction({
1822
1816
  bgcolor: (theme) => alpha(theme.palette.primary.light, 0.2)
1823
1817
  }
1824
1818
  },
1825
- children: /* @__PURE__ */ jsx(Box$1, { children: option.label })
1819
+ children: /* @__PURE__ */ jsx(Box$1, { sx: emojiFont, children: option.label })
1826
1820
  },
1827
1821
  option.value
1828
1822
  );
@@ -4521,7 +4515,7 @@ function Pagination({ page, size = 20, total, onChange, routerMode = true, ...re
4521
4515
  }
4522
4516
  );
4523
4517
  }
4524
- const Editor = lazy(() => import("./editor-xAUilO57.mjs"));
4518
+ const Editor = lazy(() => import("./editor-7154JJOk.mjs"));
4525
4519
  function LazyEditor(props) {
4526
4520
  const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
4527
4521
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { L, j, O, A, h, a7, B, y, E, z, F, T, Q, U, X, o, C, q, v, x, $, a0, ab, a2, J, K, D, aa, a9, G, c, b, a8, M, P, ai, n, m, a6, R, S, a3, k, Y, _, ac, af, ae, ag, aj, H, ak, l, p, r, t, d, a4, N, e, W, w, a1, a5, u, ah, al, Z, ad, f } from "./index-vKEw0S5J.mjs";
2
+ import { L, j, O, A, h, a7, B, y, E, z, F, T, Q, U, X, o, C, q, v, x, $, a0, ab, a2, J, K, D, aa, a9, G, c, b, a8, M, P, ai, n, m, a6, R, S, a3, k, Y, _, ac, af, ae, ag, aj, H, ak, l, p, r, t, d, a4, N, e, W, w, a1, a5, u, ah, al, Z, ad, f } from "./index-7oAOy7l-.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -246,13 +246,11 @@ var __publicField = (obj, key, value) => {
246
246
  const IMAGE_URL_PREFIX = joinUrl(inferDiscussKitApiPrefix(), UPLOADS_PREFIX$1);
247
247
  const originalExportJSON$1 = ImageNode.ImageNode.prototype.exportJSON;
248
248
  const ensureLeadingSlash$1 = (str) => str.startsWith("/") ? str : `/${str}`;
249
- const stripResizeQuery = (str) => str.split("?").shift();
250
249
  ImageNode.ImageNode.prototype.exportJSON = function exportJSON() {
251
250
  const json = originalExportJSON$1.call(this);
252
251
  if (json.src && json.src.startsWith(IMAGE_URL_PREFIX)) {
253
252
  json.src = json.src.replace(IMAGE_URL_PREFIX, "");
254
253
  json.src = ensureLeadingSlash$1(json.src);
255
- json.src = stripResizeQuery(json.src);
256
254
  }
257
255
  return json;
258
256
  };
@@ -262,16 +260,6 @@ var __publicField = (obj, key, value) => {
262
260
  if ((src == null ? void 0 : src.startsWith("/")) && !src.startsWith(IMAGE_URL_PREFIX)) {
263
261
  targetNode.setSrc(joinUrl(IMAGE_URL_PREFIX, src));
264
262
  }
265
- if (targetNode.getSrc() && typeof node.__width === "number") {
266
- const url = new URL(targetNode.getSrc(), window.location.origin);
267
- if (!url.searchParams.has("imageFilter")) {
268
- url.searchParams.set("imageFilter", "resize");
269
- url.searchParams.set("w", `${node.__width}`);
270
- url.searchParams.set("q", "75");
271
- url.searchParams.set("f", "webp");
272
- targetNode.setSrc(url.href.replace(window.location.origin, ""));
273
- }
274
- }
275
263
  }
276
264
  function ImagePathFixerPlugin() {
277
265
  const [editor2] = LexicalComposerContext.useLexicalComposerContext();
@@ -1594,6 +1582,9 @@ var __publicField = (obj, key, value) => {
1594
1582
  }
1595
1583
  }
1596
1584
  `;
1585
+ const emojiFont = {
1586
+ fontFamily: '"Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color"'
1587
+ };
1597
1588
  function GithubReaction({
1598
1589
  data,
1599
1590
  onRate,
@@ -1688,7 +1679,10 @@ var __publicField = (obj, key, value) => {
1688
1679
  return /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: raters == null ? void 0 : raters.join(", "), children: /* @__PURE__ */ jsxRuntime.jsx(
1689
1680
  material.Chip,
1690
1681
  {
1691
- label: `${option.label} ${countPerValue[option.value]}`,
1682
+ label: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { component: "span", sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [
1683
+ /* @__PURE__ */ jsxRuntime.jsx(material.Box, { component: "span", sx: emojiFont, children: option.label }),
1684
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: countPerValue[option.value] })
1685
+ ] }),
1692
1686
  color: "default",
1693
1687
  size: "small",
1694
1688
  variant: selected ? "outlined" : "filled",
@@ -1762,7 +1756,7 @@ var __publicField = (obj, key, value) => {
1762
1756
  bgcolor: (theme) => material.alpha(theme.palette.primary.light, 0.2)
1763
1757
  }
1764
1758
  },
1765
- children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: option.label })
1759
+ children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: emojiFont, children: option.label })
1766
1760
  },
1767
1761
  option.value
1768
1762
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "1.6.117",
3
+ "version": "1.6.119",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@arcblock/ws": "^1.18.110",
32
- "@blocklet/editor": "1.6.117",
33
- "@blocklet/labels": "1.6.117",
32
+ "@blocklet/editor": "1.6.119",
33
+ "@blocklet/labels": "1.6.119",
34
34
  "@blocklet/uploader": "^0.0.69",
35
35
  "@emotion/css": "^11.10.5",
36
36
  "@emotion/react": "^11.10.5",
@@ -93,5 +93,5 @@
93
93
  "resolutions": {
94
94
  "react": "^18.2.0"
95
95
  },
96
- "gitHead": "5db6b8091086c1b439c5c9276c37883677581b93"
96
+ "gitHead": "9580483669b7eac66ce86d3abb6742cc562648de"
97
97
  }