@blocklet/discuss-kit-ux 1.6.237 → 1.6.238
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.
|
@@ -6,6 +6,5 @@ interface BackProps {
|
|
|
6
6
|
iconOnly?: boolean;
|
|
7
7
|
sx?: SxProps;
|
|
8
8
|
}
|
|
9
|
-
export declare const PreviousLocationRecorder: () => null;
|
|
10
9
|
export declare function Back({ url, fallbackUrl, iconOnly, sx, ...rest }: BackProps & ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -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-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-BriEoNhQ.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -4588,28 +4588,15 @@ function Participants({ users, sx, ...rest }) {
|
|
|
4588
4588
|
}
|
|
4589
4589
|
) }) });
|
|
4590
4590
|
}
|
|
4591
|
-
const KEY_PREVIOUS_LOCATION = "__previous_location__";
|
|
4592
|
-
const getPreviousLocation = () => {
|
|
4593
|
-
return sessionStorage.getItem(KEY_PREVIOUS_LOCATION);
|
|
4594
|
-
};
|
|
4595
|
-
const PreviousLocationRecorder = () => {
|
|
4596
|
-
const location = useLocation();
|
|
4597
|
-
const locationRef = useRef();
|
|
4598
|
-
useEffect(() => {
|
|
4599
|
-
if (locationRef.current) {
|
|
4600
|
-
sessionStorage.setItem(KEY_PREVIOUS_LOCATION, locationRef.current);
|
|
4601
|
-
}
|
|
4602
|
-
locationRef.current = window.location.href;
|
|
4603
|
-
}, [location]);
|
|
4604
|
-
return null;
|
|
4605
|
-
};
|
|
4606
4591
|
function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
4607
4592
|
const navigate = useNavigate();
|
|
4593
|
+
const location = useLocation();
|
|
4608
4594
|
const mergedSx = [{}, ...Array.isArray(sx) ? sx : [sx]];
|
|
4609
4595
|
const handleClick = () => {
|
|
4596
|
+
var _a2;
|
|
4610
4597
|
if (url) {
|
|
4611
4598
|
navigate(url, { replace: true });
|
|
4612
|
-
} else if (
|
|
4599
|
+
} else if ((_a2 = location.state) == null ? void 0 : _a2.from) {
|
|
4613
4600
|
navigate(-1);
|
|
4614
4601
|
} else {
|
|
4615
4602
|
navigate(fallbackUrl || "/");
|
|
@@ -5550,7 +5537,7 @@ function Pagination({
|
|
|
5550
5537
|
}
|
|
5551
5538
|
);
|
|
5552
5539
|
}
|
|
5553
|
-
const Editor = lazy(() => import("./editor-
|
|
5540
|
+
const Editor = lazy(() => import("./editor-DKVcG8pE.mjs"));
|
|
5554
5541
|
function LazyEditor(props) {
|
|
5555
5542
|
const fallback = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
5556
5543
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -11771,24 +11758,23 @@ export {
|
|
|
11771
11758
|
useApiErrorHandler as a9,
|
|
11772
11759
|
useDefaultApiErrorHandler as aa,
|
|
11773
11760
|
DefaultApiErrorHandler as ab,
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
useSubscription as at,
|
|
11761
|
+
Back as ac,
|
|
11762
|
+
LazyEditor as ad,
|
|
11763
|
+
EditorPreview as ae,
|
|
11764
|
+
DirtyPromptContainer as af,
|
|
11765
|
+
ConfirmNavigation as ag,
|
|
11766
|
+
UploaderContext as ah,
|
|
11767
|
+
useUploader as ai,
|
|
11768
|
+
UploaderTrigger as aj,
|
|
11769
|
+
UploaderProvider as ak,
|
|
11770
|
+
composeImageUrl as al,
|
|
11771
|
+
usePointUpContext as am,
|
|
11772
|
+
PointUpProvider as an,
|
|
11773
|
+
ButtonGroup as ao,
|
|
11774
|
+
SegmentedControl as ap,
|
|
11775
|
+
create as aq,
|
|
11776
|
+
getWsClient as ar,
|
|
11777
|
+
useSubscription as as,
|
|
11792
11778
|
Input as b,
|
|
11793
11779
|
useChanged as c,
|
|
11794
11780
|
useSessionContext as d,
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { Q, m, U, A, k,
|
|
2
|
+
import { Q, m, U, A, k, ac, B, E, J, H, K, ao, X, W, _, Y, Z, a0, v, C, w, x, z, a4, a5, ag, a7, N, O, ab, D, af, ae, F, G, b, j, ad, M, P, an, q, o, R, S, a8, ap, n, a1, a3, ah, ak, aj, al, aq, L, ar, l, p, r, h, t, f, a9, T, c, $, y, a6, aa, u, am, d, as, a2, ai, e } from "./index-BriEoNhQ.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
|
@@ -14,13 +14,13 @@ export {
|
|
|
14
14
|
U as AuthzProvider,
|
|
15
15
|
A as Avatar,
|
|
16
16
|
k as Avatars,
|
|
17
|
-
|
|
17
|
+
ac as Back,
|
|
18
18
|
B as Badge,
|
|
19
19
|
E as BinaryThumb,
|
|
20
20
|
J as BlogCard,
|
|
21
21
|
H as BlogList,
|
|
22
22
|
K as BlogPermaLink,
|
|
23
|
-
|
|
23
|
+
ao as ButtonGroup,
|
|
24
24
|
X as Chat,
|
|
25
25
|
W as ChatClient,
|
|
26
26
|
_ as ChatHeaderAddon,
|
|
@@ -34,39 +34,38 @@ export {
|
|
|
34
34
|
z as CommentsProvider,
|
|
35
35
|
a4 as Confirm,
|
|
36
36
|
a5 as ConfirmContext,
|
|
37
|
-
|
|
37
|
+
ag as ConfirmNavigation,
|
|
38
38
|
a7 as ConfirmProvider,
|
|
39
39
|
N as CoverImage,
|
|
40
40
|
O as CoverImageUpload,
|
|
41
41
|
ab as DefaultApiErrorHandler,
|
|
42
42
|
D as DefaultEditorConfigProvider,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
af as DirtyPromptContainer,
|
|
44
|
+
ae as EditorPreview,
|
|
45
45
|
F as EmptyStatus,
|
|
46
46
|
G as GithubReaction,
|
|
47
47
|
b as Input,
|
|
48
48
|
j as InternalThemeProvider,
|
|
49
|
-
|
|
49
|
+
ad as LazyEditor,
|
|
50
50
|
M as Menu,
|
|
51
51
|
P as Pagination,
|
|
52
|
-
|
|
52
|
+
an as PointUpProvider,
|
|
53
53
|
q as Post,
|
|
54
54
|
o as PostContent,
|
|
55
|
-
ac as PreviousLocationRecorder,
|
|
56
55
|
R as RelativeTime,
|
|
57
56
|
S as ScrollableEditorWrapper,
|
|
58
57
|
a8 as SecureLabelPicker,
|
|
59
|
-
|
|
58
|
+
ap as SegmentedControl,
|
|
60
59
|
n as SystemUser,
|
|
61
60
|
a1 as UnreadNotificationContext,
|
|
62
61
|
a3 as UnreadNotificationProvider,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
ah as UploaderContext,
|
|
63
|
+
ak as UploaderProvider,
|
|
64
|
+
aj as UploaderTrigger,
|
|
65
|
+
al as composeImageUrl,
|
|
66
|
+
aq as create,
|
|
68
67
|
L as getBlogLink,
|
|
69
|
-
|
|
68
|
+
ar as getWsClient,
|
|
70
69
|
l as lexicalUtils,
|
|
71
70
|
p as preferences,
|
|
72
71
|
r as routes,
|
|
@@ -81,10 +80,10 @@ export {
|
|
|
81
80
|
a6 as useConfirm,
|
|
82
81
|
aa as useDefaultApiErrorHandler,
|
|
83
82
|
u as useNow,
|
|
84
|
-
|
|
83
|
+
am as usePointUpContext,
|
|
85
84
|
d as useSessionContext,
|
|
86
|
-
|
|
85
|
+
as as useSubscription,
|
|
87
86
|
a2 as useUnreadNotification,
|
|
88
|
-
|
|
87
|
+
ai as useUploader,
|
|
89
88
|
e as utils
|
|
90
89
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -4520,28 +4520,15 @@ var __publicField = (obj, key, value) => {
|
|
|
4520
4520
|
}
|
|
4521
4521
|
) }) });
|
|
4522
4522
|
}
|
|
4523
|
-
const KEY_PREVIOUS_LOCATION = "__previous_location__";
|
|
4524
|
-
const getPreviousLocation = () => {
|
|
4525
|
-
return sessionStorage.getItem(KEY_PREVIOUS_LOCATION);
|
|
4526
|
-
};
|
|
4527
|
-
const PreviousLocationRecorder = () => {
|
|
4528
|
-
const location = reactRouterDom.useLocation();
|
|
4529
|
-
const locationRef = react.useRef();
|
|
4530
|
-
react.useEffect(() => {
|
|
4531
|
-
if (locationRef.current) {
|
|
4532
|
-
sessionStorage.setItem(KEY_PREVIOUS_LOCATION, locationRef.current);
|
|
4533
|
-
}
|
|
4534
|
-
locationRef.current = window.location.href;
|
|
4535
|
-
}, [location]);
|
|
4536
|
-
return null;
|
|
4537
|
-
};
|
|
4538
4523
|
function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
4539
4524
|
const navigate = reactRouterDom.useNavigate();
|
|
4525
|
+
const location = reactRouterDom.useLocation();
|
|
4540
4526
|
const mergedSx = [{}, ...Array.isArray(sx) ? sx : [sx]];
|
|
4541
4527
|
const handleClick = () => {
|
|
4528
|
+
var _a2;
|
|
4542
4529
|
if (url) {
|
|
4543
4530
|
navigate(url, { replace: true });
|
|
4544
|
-
} else if (
|
|
4531
|
+
} else if ((_a2 = location.state) == null ? void 0 : _a2.from) {
|
|
4545
4532
|
navigate(-1);
|
|
4546
4533
|
} else {
|
|
4547
4534
|
navigate(fallbackUrl || "/");
|
|
@@ -11735,7 +11722,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11735
11722
|
exports2.PointUpProvider = PointUpProvider;
|
|
11736
11723
|
exports2.Post = PostComponent;
|
|
11737
11724
|
exports2.PostContent = PostContent;
|
|
11738
|
-
exports2.PreviousLocationRecorder = PreviousLocationRecorder;
|
|
11739
11725
|
exports2.RelativeTime = RelativeTime;
|
|
11740
11726
|
exports2.ScrollableEditorWrapper = ScrollableEditorWrapper;
|
|
11741
11727
|
exports2.SecureLabelPicker = SecureLabelPicker;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.238",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/bridge": "^2.9.77",
|
|
32
32
|
"@arcblock/ws": "^1.18.116",
|
|
33
|
-
"@blocklet/editor": "1.6.
|
|
34
|
-
"@blocklet/labels": "1.6.
|
|
33
|
+
"@blocklet/editor": "1.6.238",
|
|
34
|
+
"@blocklet/labels": "1.6.238",
|
|
35
35
|
"@blocklet/uploader": "^0.1.2",
|
|
36
36
|
"@emotion/css": "^11.10.5",
|
|
37
37
|
"@emotion/react": "^11.10.5",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"resolutions": {
|
|
96
96
|
"react": "^18.2.0"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "c88462b241f45a2d94470c0314b11a265f9ad369"
|
|
99
99
|
}
|