@blocklet/discuss-kit-ux 2.3.72 → 2.3.74

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.
@@ -7,4 +7,5 @@ export declare const blogPath: (path: string) => any;
7
7
  export declare const discussionPath: (path: string) => any;
8
8
  export declare const docPath: (path: string) => any;
9
9
  export declare const bookmarkPath: (path: string) => any;
10
- export { pageGroup };
10
+ declare const getPostPrefix: (type: string) => string | undefined;
11
+ export { pageGroup, getPostPrefix };
@@ -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-ShhVjeZx.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-SsfvOU5P.mjs";
8
8
  const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -3372,6 +3372,14 @@ const docPath = (path) => {
3372
3372
  const bookmarkPath = (path) => {
3373
3373
  return window.blocklet.pageGroup === "bookmark" ? path : joinUrl("/bookmark", path);
3374
3374
  };
3375
+ const getPostPrefix = (type) => {
3376
+ return {
3377
+ blog: "/blog",
3378
+ doc: "/docs",
3379
+ post: "/discussions",
3380
+ bookmark: "/bookmark"
3381
+ }[type];
3382
+ };
3375
3383
  const routes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3376
3384
  __proto__: null,
3377
3385
  blogPath,
@@ -3382,6 +3390,7 @@ const routes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
3382
3390
  discussionPrefix,
3383
3391
  docPath,
3384
3392
  docPrefix,
3393
+ getPostPrefix,
3385
3394
  pageGroup
3386
3395
  }, Symbol.toStringTag, { value: "Module" }));
3387
3396
  const getBlogLink = (post, locale) => {
@@ -4970,7 +4979,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, icon, ...rest }) {
4970
4979
  }
4971
4980
  const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", 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" }) });
4972
4981
  const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", 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" }) });
4973
- const Editor = lazyRetry(() => import("./editor-B4QshBDV.mjs"));
4982
+ const Editor = lazyRetry(() => import("./editor-dgp-b-aZ.mjs"));
4974
4983
  function LazyEditor(props) {
4975
4984
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4976
4985
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { W, o, Y, A, n, af, B, G, N, L, O, ar, _, Z, a1, $, a0, a3, x, C, y, z, F, a7, a8, aj, aa, T, U, ae, D, ai, ah, K, H, J, aG, aH, b, m, ag, M, P, aC, aq, w, v, aE, aF, R, S, ab, as, aD, q, a4, a6, ak, an, am, aA, at, Q, ao, au, ax, ay, l, az, h, p, r, k, aw, t, j, ac, aB, X, c, a2, E, a9, ad, e, u, ap, d, av, a5, al, f } from "./index-ShhVjeZx.mjs";
2
+ import { W, o, Y, A, n, af, B, G, N, L, O, ar, _, Z, a1, $, a0, a3, x, C, y, z, F, a7, a8, aj, aa, T, U, ae, D, ai, ah, K, H, J, aG, aH, b, m, ag, M, P, aC, aq, w, v, aE, aF, R, S, ab, as, aD, q, a4, a6, ak, an, am, aA, at, Q, ao, au, ax, ay, l, az, h, p, r, k, aw, t, j, ac, aB, X, c, a2, E, a9, ad, e, u, ap, d, av, a5, al, f } from "./index-SsfvOU5P.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -3294,6 +3294,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3294
3294
  const bookmarkPath = (path) => {
3295
3295
  return window.blocklet.pageGroup === "bookmark" ? path : joinUrl("/bookmark", path);
3296
3296
  };
3297
+ const getPostPrefix = (type) => {
3298
+ return {
3299
+ blog: "/blog",
3300
+ doc: "/docs",
3301
+ post: "/discussions",
3302
+ bookmark: "/bookmark"
3303
+ }[type];
3304
+ };
3297
3305
  const routes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3298
3306
  __proto__: null,
3299
3307
  blogPath,
@@ -3304,6 +3312,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3304
3312
  discussionPrefix,
3305
3313
  docPath,
3306
3314
  docPrefix,
3315
+ getPostPrefix,
3307
3316
  pageGroup
3308
3317
  }, Symbol.toStringTag, { value: "Module" }));
3309
3318
  const getBlogLink = (post, locale) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.3.72",
3
+ "version": "2.3.74",
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.3.72",
49
- "@blocklet/labels": "^2.3.72"
48
+ "@blocklet/editor": "^2.3.74",
49
+ "@blocklet/labels": "^2.3.74"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@arcblock/did-connect": "^2.10.36",