@blocklet/discuss-kit-ux 1.6.212 → 1.6.213
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/dist/{editor-D7VjqD2F.mjs → editor-g8aVzRyQ.mjs} +1 -1
- package/dist/{index-MrnIrDMc.mjs → index-BvgOMp6U.mjs} +163 -70
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +59 -58
- package/dist/index.umd.js +106 -13
- package/dist/{components/shared/theme.d.ts → theme/index.d.ts} +4 -1
- package/dist/theme/typography.d.ts +3 -0
- package/package.json +4 -4
|
@@ -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-BvgOMp6U.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -8,6 +8,7 @@ var _a, _b;
|
|
|
8
8
|
import { Labels2, LabelPicker } from "@blocklet/labels";
|
|
9
9
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
10
10
|
import { useTheme, ThemeProvider, styled } from "@mui/material/styles";
|
|
11
|
+
import { create as create$1, styled as styled$1 } from "@arcblock/ux/lib/Theme";
|
|
11
12
|
import { useEffect, useRef, lazy, useState, createElement, useContext, useMemo, isValidElement, Suspense, createContext, Fragment as Fragment$1, forwardRef, useCallback } from "react";
|
|
12
13
|
import Box from "@mui/material/Box";
|
|
13
14
|
import isNil from "lodash/isNil";
|
|
@@ -25,7 +26,6 @@ import { LocaleContext, useLocaleContext } from "@arcblock/ux/lib/Locale/context
|
|
|
25
26
|
import Alert from "@mui/material/Alert";
|
|
26
27
|
import isBoolean from "lodash/isBoolean";
|
|
27
28
|
import Button from "@mui/material/Button";
|
|
28
|
-
import { styled as styled$1 } from "@arcblock/ux/lib/Theme";
|
|
29
29
|
import DidAvatar from "@arcblock/did-connect/lib/Avatar";
|
|
30
30
|
import AvatarGroup from "@mui/material/AvatarGroup";
|
|
31
31
|
import { grey, green, amber } from "@mui/material/colors";
|
|
@@ -76,46 +76,138 @@ import { createContainer } from "unstated-next";
|
|
|
76
76
|
import Cookie from "js-cookie";
|
|
77
77
|
import { WsClient } from "@arcblock/ws";
|
|
78
78
|
import { css } from "@emotion/css";
|
|
79
|
+
const typography = {
|
|
80
|
+
h1: {
|
|
81
|
+
fontSize: "1.875rem",
|
|
82
|
+
lineHeight: 1.2,
|
|
83
|
+
fontWeight: 800,
|
|
84
|
+
letterSpacing: "-.025em"
|
|
85
|
+
},
|
|
86
|
+
h2: {
|
|
87
|
+
fontSize: "1.5rem",
|
|
88
|
+
lineHeight: 1.3333333,
|
|
89
|
+
fontWeight: 700,
|
|
90
|
+
letterSpacing: "-.025em"
|
|
91
|
+
},
|
|
92
|
+
h3: {
|
|
93
|
+
fontSize: "1.25rem",
|
|
94
|
+
lineHeight: 1.4,
|
|
95
|
+
fontWeight: 600,
|
|
96
|
+
letterSpacing: "-.025em"
|
|
97
|
+
},
|
|
98
|
+
h4: {
|
|
99
|
+
fontSize: "1.125rem",
|
|
100
|
+
lineHeight: 1.5,
|
|
101
|
+
fontWeight: 600
|
|
102
|
+
},
|
|
103
|
+
h5: {
|
|
104
|
+
fontSize: "1rem",
|
|
105
|
+
lineHeight: 1.75,
|
|
106
|
+
fontWeight: 400
|
|
107
|
+
},
|
|
108
|
+
h6: {
|
|
109
|
+
fontSize: "1rem",
|
|
110
|
+
lineHeight: 1.75,
|
|
111
|
+
fontWeight: 400
|
|
112
|
+
},
|
|
113
|
+
subtitle1: {
|
|
114
|
+
fontSize: "1rem",
|
|
115
|
+
lineHeight: 1.75,
|
|
116
|
+
fontWeight: 400
|
|
117
|
+
},
|
|
118
|
+
subtitle2: {
|
|
119
|
+
fontSize: "1rem",
|
|
120
|
+
lineHeight: 1.75,
|
|
121
|
+
fontWeight: 400
|
|
122
|
+
},
|
|
123
|
+
body1: {
|
|
124
|
+
fontSize: "1rem",
|
|
125
|
+
lineHeight: 1.75
|
|
126
|
+
},
|
|
127
|
+
fontWeightLight: 300,
|
|
128
|
+
fontWeightRegular: 400,
|
|
129
|
+
fontWeightMedium: 500,
|
|
130
|
+
fontWeightBold: 700
|
|
131
|
+
};
|
|
79
132
|
const themeOverrides = {
|
|
133
|
+
shape: {
|
|
134
|
+
borderRadius: 8
|
|
135
|
+
},
|
|
80
136
|
components: {
|
|
137
|
+
MuiInputBase: {
|
|
138
|
+
defaultProps: {
|
|
139
|
+
size: "small"
|
|
140
|
+
},
|
|
141
|
+
styleOverrides: {
|
|
142
|
+
root: ({ theme }) => ({
|
|
143
|
+
fontSize: "0.875rem",
|
|
144
|
+
// 调小输入框字体大小 (16px -> 14px)
|
|
145
|
+
backgroundColor: theme.palette.grey[50]
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
},
|
|
81
149
|
MuiButton: {
|
|
82
150
|
defaultProps: {
|
|
83
151
|
size: "small"
|
|
84
152
|
},
|
|
85
153
|
styleOverrides: {
|
|
86
154
|
root: {
|
|
155
|
+
fontWeight: 500,
|
|
87
156
|
textTransform: "none"
|
|
157
|
+
},
|
|
158
|
+
outlinedPrimary: ({ theme }) => ({
|
|
159
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
160
|
+
backgroundColor: "#fff",
|
|
161
|
+
"&:hover": {
|
|
162
|
+
border: `1px solid ${theme.palette.divider}`
|
|
163
|
+
}
|
|
164
|
+
}),
|
|
165
|
+
sizeSmall: {
|
|
166
|
+
height: 32
|
|
88
167
|
}
|
|
89
168
|
}
|
|
90
169
|
},
|
|
91
170
|
MuiIconButton: {
|
|
92
171
|
defaultProps: {
|
|
93
172
|
size: "small"
|
|
173
|
+
},
|
|
174
|
+
styleOverrides: {
|
|
175
|
+
root: {
|
|
176
|
+
textTransform: "none"
|
|
177
|
+
},
|
|
178
|
+
colorPrimary: {
|
|
179
|
+
backgroundColor: "#fff"
|
|
180
|
+
}
|
|
94
181
|
}
|
|
95
182
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
183
|
+
MuiToggleButton: {
|
|
184
|
+
styleOverrides: {
|
|
185
|
+
root: {
|
|
186
|
+
textTransform: "none"
|
|
187
|
+
}
|
|
99
188
|
}
|
|
100
189
|
},
|
|
101
|
-
|
|
190
|
+
MuiTab: {
|
|
102
191
|
styleOverrides: {
|
|
103
192
|
root: {
|
|
104
193
|
textTransform: "none"
|
|
105
194
|
}
|
|
106
195
|
}
|
|
196
|
+
},
|
|
197
|
+
MuiTooltip: {
|
|
198
|
+
defaultProps: {
|
|
199
|
+
enterTouchDelay: 3e3,
|
|
200
|
+
leaveTouchDelay: 100
|
|
201
|
+
}
|
|
107
202
|
}
|
|
108
203
|
}
|
|
109
204
|
};
|
|
110
205
|
function InternalThemeProvider({ children }) {
|
|
111
206
|
const theme = useTheme();
|
|
112
|
-
const merged = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
// ...themeOverrides.components,
|
|
117
|
-
// },
|
|
118
|
-
};
|
|
207
|
+
const merged = create$1(theme, {
|
|
208
|
+
typography,
|
|
209
|
+
...themeOverrides
|
|
210
|
+
});
|
|
119
211
|
return /* @__PURE__ */ jsx(ThemeProvider, { theme: merged, children });
|
|
120
212
|
}
|
|
121
213
|
const repairBase64Avatar = (avatar) => {
|
|
@@ -5179,7 +5271,7 @@ function Pagination({
|
|
|
5179
5271
|
}
|
|
5180
5272
|
);
|
|
5181
5273
|
}
|
|
5182
|
-
const Editor = lazy(() => import("./editor-
|
|
5274
|
+
const Editor = lazy(() => import("./editor-g8aVzRyQ.mjs"));
|
|
5183
5275
|
function LazyEditor(props) {
|
|
5184
5276
|
const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5185
5277
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -11345,85 +11437,86 @@ function SegmentedControl({ value, options, onChange, sx, ...rest }) {
|
|
|
11345
11437
|
) });
|
|
11346
11438
|
}
|
|
11347
11439
|
export {
|
|
11348
|
-
|
|
11440
|
+
UnreadNotificationContext as $,
|
|
11349
11441
|
Avatar as A,
|
|
11350
11442
|
Badge as B,
|
|
11351
11443
|
CommentInput as C,
|
|
11352
11444
|
DefaultEditorConfigProvider as D,
|
|
11353
|
-
|
|
11354
|
-
|
|
11445
|
+
BinaryThumb as E,
|
|
11446
|
+
EmptyStatus as F,
|
|
11355
11447
|
GithubReaction as G,
|
|
11356
|
-
|
|
11448
|
+
BlogListWrapper as H,
|
|
11357
11449
|
ImagePathFixerPlugin as I,
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11450
|
+
BlogCard as J,
|
|
11451
|
+
BlogPermaLink as K,
|
|
11452
|
+
getBlogLink as L,
|
|
11361
11453
|
Menu as M,
|
|
11362
|
-
|
|
11363
|
-
|
|
11454
|
+
CoverImage as N,
|
|
11455
|
+
CoverImageUpload as O,
|
|
11364
11456
|
Pagination as P,
|
|
11365
|
-
|
|
11457
|
+
AccessControl as Q,
|
|
11366
11458
|
RelativeTime as R,
|
|
11367
11459
|
ScrollableEditorWrapper as S,
|
|
11368
|
-
|
|
11369
|
-
|
|
11460
|
+
useAuthzContext as T,
|
|
11461
|
+
AuthzProvider as U,
|
|
11370
11462
|
VideoPathFixerPlugin as V,
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11463
|
+
ChatClient as W,
|
|
11464
|
+
Chat as X,
|
|
11465
|
+
ChatHeaderAddon as Y,
|
|
11466
|
+
useChatContext as Z,
|
|
11467
|
+
ChatProvider as _,
|
|
11376
11468
|
isEmptyContent as a,
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11469
|
+
useUnreadNotification as a0,
|
|
11470
|
+
UnreadNotificationProvider as a1,
|
|
11471
|
+
Confirm as a2,
|
|
11472
|
+
ConfirmContext as a3,
|
|
11473
|
+
useConfirm as a4,
|
|
11474
|
+
ConfirmProvider as a5,
|
|
11475
|
+
SecureLabelPicker as a6,
|
|
11476
|
+
useApiErrorHandler as a7,
|
|
11477
|
+
useDefaultApiErrorHandler as a8,
|
|
11478
|
+
DefaultApiErrorHandler as a9,
|
|
11479
|
+
PreviousLocationRecorder as aa,
|
|
11480
|
+
Back as ab,
|
|
11481
|
+
LazyEditor as ac,
|
|
11482
|
+
EditorPreview as ad,
|
|
11483
|
+
DirtyPromptContainer as ae,
|
|
11484
|
+
ConfirmNavigation as af,
|
|
11485
|
+
UploaderContext as ag,
|
|
11486
|
+
useUploader as ah,
|
|
11487
|
+
UploaderTrigger as ai,
|
|
11488
|
+
UploaderProvider as aj,
|
|
11489
|
+
composeImageUrl as ak,
|
|
11490
|
+
usePointUpContext as al,
|
|
11491
|
+
PointUpProvider as am,
|
|
11492
|
+
ButtonGroup as an,
|
|
11493
|
+
SegmentedControl as ao,
|
|
11494
|
+
create as ap,
|
|
11495
|
+
getWsClient as aq,
|
|
11496
|
+
useSubscription as ar,
|
|
11404
11497
|
Input as b,
|
|
11405
11498
|
useChanged as c,
|
|
11406
11499
|
useSessionContext as d,
|
|
11407
11500
|
utils as e,
|
|
11408
|
-
|
|
11501
|
+
typography as f,
|
|
11409
11502
|
getExcerptSync as g,
|
|
11410
|
-
|
|
11503
|
+
themeOverrides as h,
|
|
11411
11504
|
inferInitialEditorState as i,
|
|
11412
|
-
|
|
11413
|
-
|
|
11505
|
+
InternalThemeProvider as j,
|
|
11506
|
+
Avatars as k,
|
|
11414
11507
|
lexical as l,
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11508
|
+
AuthorInfo as m,
|
|
11509
|
+
SystemUser as n,
|
|
11510
|
+
PostContent as o,
|
|
11418
11511
|
preferences as p,
|
|
11419
|
-
|
|
11512
|
+
PostComponent as q,
|
|
11420
11513
|
routes as r,
|
|
11421
11514
|
stringify as s,
|
|
11422
11515
|
translations as t,
|
|
11423
11516
|
useNow as u,
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11517
|
+
Comment as v,
|
|
11518
|
+
CommentList as w,
|
|
11519
|
+
CommentsContext as x,
|
|
11520
|
+
useCommentsContext as y,
|
|
11521
|
+
CommentsProvider as z
|
|
11429
11522
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import {
|
|
2
|
+
import { Q, m, U, A, k, ab, B, E, J, H, K, an, X, W, Y, _, v, C, w, x, z, a2, a3, af, a5, N, O, a9, D, ae, ad, F, G, b, j, ac, M, P, am, q, o, aa, R, S, a6, ao, n, $, a1, ag, aj, ai, ak, ap, L, aq, l, p, r, h, t, f, a7, T, c, Z, y, a4, a8, u, al, d, ar, a0, ah, e } from "./index-BvgOMp6U.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
|
@@ -9,79 +9,80 @@ import "@mui/icons-material";
|
|
|
9
9
|
import "@arcblock/ux/lib/Locale/context";
|
|
10
10
|
import "@mui/material";
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Q as AccessControl,
|
|
13
|
+
m as AuthorInfo,
|
|
14
|
+
U as AuthzProvider,
|
|
15
15
|
A as Avatar,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
k as Avatars,
|
|
17
|
+
ab as Back,
|
|
18
18
|
B as Badge,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
E as BinaryThumb,
|
|
20
|
+
J as BlogCard,
|
|
21
|
+
H as BlogList,
|
|
22
|
+
K as BlogPermaLink,
|
|
23
|
+
an as ButtonGroup,
|
|
24
|
+
X as Chat,
|
|
25
|
+
W as ChatClient,
|
|
26
|
+
Y as ChatHeaderAddon,
|
|
27
|
+
_ as ChatProvider,
|
|
28
|
+
v as Comment,
|
|
29
29
|
C as CommentInput,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
w as CommentList,
|
|
31
|
+
x as CommentsContext,
|
|
32
|
+
z as CommentsProvider,
|
|
33
|
+
a2 as Confirm,
|
|
34
|
+
a3 as ConfirmContext,
|
|
35
|
+
af as ConfirmNavigation,
|
|
36
|
+
a5 as ConfirmProvider,
|
|
37
|
+
N as CoverImage,
|
|
38
|
+
O as CoverImageUpload,
|
|
39
|
+
a9 as DefaultApiErrorHandler,
|
|
40
40
|
D as DefaultEditorConfigProvider,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
ae as DirtyPromptContainer,
|
|
42
|
+
ad as EditorPreview,
|
|
43
|
+
F as EmptyStatus,
|
|
44
44
|
G as GithubReaction,
|
|
45
45
|
b as Input,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
j as InternalThemeProvider,
|
|
47
|
+
ac as LazyEditor,
|
|
48
48
|
M as Menu,
|
|
49
49
|
P as Pagination,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
am as PointUpProvider,
|
|
51
|
+
q as Post,
|
|
52
|
+
o as PostContent,
|
|
53
|
+
aa as PreviousLocationRecorder,
|
|
54
54
|
R as RelativeTime,
|
|
55
55
|
S as ScrollableEditorWrapper,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
a6 as SecureLabelPicker,
|
|
57
|
+
ao as SegmentedControl,
|
|
58
|
+
n as SystemUser,
|
|
59
|
+
$ as UnreadNotificationContext,
|
|
60
|
+
a1 as UnreadNotificationProvider,
|
|
61
|
+
ag as UploaderContext,
|
|
62
|
+
aj as UploaderProvider,
|
|
63
|
+
ai as UploaderTrigger,
|
|
64
|
+
ak as composeImageUrl,
|
|
65
|
+
ap as create,
|
|
66
|
+
L as getBlogLink,
|
|
67
|
+
aq as getWsClient,
|
|
68
68
|
l as lexicalUtils,
|
|
69
69
|
p as preferences,
|
|
70
70
|
r as routes,
|
|
71
|
-
|
|
71
|
+
h as themeOverrides,
|
|
72
72
|
t as translations,
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
f as typography,
|
|
74
|
+
a7 as useApiErrorHandler,
|
|
75
|
+
T as useAuthzContext,
|
|
75
76
|
c as useChanged,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
Z as useChatContext,
|
|
78
|
+
y as useCommentsContext,
|
|
79
|
+
a4 as useConfirm,
|
|
80
|
+
a8 as useDefaultApiErrorHandler,
|
|
80
81
|
u as useNow,
|
|
81
|
-
|
|
82
|
+
al as usePointUpContext,
|
|
82
83
|
d as useSessionContext,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
ar as useSubscription,
|
|
85
|
+
a0 as useUnreadNotification,
|
|
86
|
+
ah as useUploader,
|
|
86
87
|
e as utils
|
|
87
88
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@blocklet/labels"), require("react/jsx-runtime"), require("@mui/material/styles"), require("react"), require("@mui/material/Box"), require("lodash/isNil"), require("@blocklet/editor/lib/config"), require("@lexical/react/LexicalComposerContext"), require("lexical"), require("ahooks"), require("@mui/lab/LoadingButton"), require("@mui/icons-material"), require("@arcblock/ux/lib/Locale/context"), require("@mui/material/Alert"), require("lodash/isBoolean"), require("@mui/material/Button"), require("@arcblock/
|
|
3
|
-
})(this, function(exports2, labels, jsxRuntime, styles, react, Box, isNil, config, LexicalComposerContext, lexical$1, ahooks, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@blocklet/labels"), require("react/jsx-runtime"), require("@mui/material/styles"), require("@arcblock/ux/lib/Theme"), require("react"), require("@mui/material/Box"), require("lodash/isNil"), require("@blocklet/editor/lib/config"), require("@lexical/react/LexicalComposerContext"), require("lexical"), require("ahooks"), require("@mui/lab/LoadingButton"), require("@mui/icons-material"), require("@arcblock/ux/lib/Locale/context"), require("@mui/material/Alert"), require("lodash/isBoolean"), require("@mui/material/Button"), require("@arcblock/did-connect/lib/Avatar"), require("@mui/material/AvatarGroup"), require("@mui/material/colors"), require("@mui/material/useMediaQuery"), require("@arcblock/ux/lib/DID"), require("@mui/material/Tooltip"), require("react-router-dom"), require("@arcblock/ux/lib/RelativeTime"), require("@mui/material/Chip"), require("@mui/material/Stack"), require("lodash/groupBy"), require("lodash/flatMap"), require("lodash/uniqBy"), require("lodash/trim"), require("@mui/material/Avatar"), require("@mui/icons-material/BrokenImage"), require("@iconify/react"), require("@arcblock/ux/lib/Empty"), require("@arcblock/did-connect/lib/Session"), require("@mui/material"), require("@mui/icons-material/NotificationsActiveOutlined"), require("@blocklet/editor/lib/ext/CheckboxPlugin"), require("@arcblock/did-connect/lib/Address"), require("@mui/material/MenuItem"), require("clsx"), require("@mui/material/IconButton"), require("@mui/material/Menu"), require("@arcblock/ux/lib/Dialog"), require("lodash/orderBy"), require("@mui/material/Typography"), require("@mui/material/Skeleton"), require("url-join"), require("react-dom"), require("dayjs"), require("dayjs/plugin/relativeTime"), require("mitt"), require("@mui/material/CircularProgress"), require("react-helmet"), require("react-flip-toolkit"), require("@mui/material/colors/grey"), require("@mui/material/Fab"), require("lodash/debounce"), require("@mui/material/TextField"), require("@mui/icons-material/Add"), require("axios"), require("@arcblock/ux/lib/Toast"), require("@mui/material/Pagination"), require("unstated-next"), require("js-cookie"), require("@arcblock/ws"), require("@emotion/css"), require("@blocklet/editor/lib/ext/OnContentChangePlugin"), require("@blocklet/editor/lib/ext/ShortcutPlugin"), require("@blocklet/editor/lib/ext/SafeAreaPlugin"), require("@lexical/text"), require("@blocklet/editor/lib/main/nodes/ImageNode"), require("@blocklet/editor/lib/ext/VideoPlugin/VideoNode")) : typeof define === "function" && define.amd ? define(["exports", "@blocklet/labels", "react/jsx-runtime", "@mui/material/styles", "@arcblock/ux/lib/Theme", "react", "@mui/material/Box", "lodash/isNil", "@blocklet/editor/lib/config", "@lexical/react/LexicalComposerContext", "lexical", "ahooks", "@mui/lab/LoadingButton", "@mui/icons-material", "@arcblock/ux/lib/Locale/context", "@mui/material/Alert", "lodash/isBoolean", "@mui/material/Button", "@arcblock/did-connect/lib/Avatar", "@mui/material/AvatarGroup", "@mui/material/colors", "@mui/material/useMediaQuery", "@arcblock/ux/lib/DID", "@mui/material/Tooltip", "react-router-dom", "@arcblock/ux/lib/RelativeTime", "@mui/material/Chip", "@mui/material/Stack", "lodash/groupBy", "lodash/flatMap", "lodash/uniqBy", "lodash/trim", "@mui/material/Avatar", "@mui/icons-material/BrokenImage", "@iconify/react", "@arcblock/ux/lib/Empty", "@arcblock/did-connect/lib/Session", "@mui/material", "@mui/icons-material/NotificationsActiveOutlined", "@blocklet/editor/lib/ext/CheckboxPlugin", "@arcblock/did-connect/lib/Address", "@mui/material/MenuItem", "clsx", "@mui/material/IconButton", "@mui/material/Menu", "@arcblock/ux/lib/Dialog", "lodash/orderBy", "@mui/material/Typography", "@mui/material/Skeleton", "url-join", "react-dom", "dayjs", "dayjs/plugin/relativeTime", "mitt", "@mui/material/CircularProgress", "react-helmet", "react-flip-toolkit", "@mui/material/colors/grey", "@mui/material/Fab", "lodash/debounce", "@mui/material/TextField", "@mui/icons-material/Add", "axios", "@arcblock/ux/lib/Toast", "@mui/material/Pagination", "unstated-next", "js-cookie", "@arcblock/ws", "@emotion/css", "@blocklet/editor/lib/ext/OnContentChangePlugin", "@blocklet/editor/lib/ext/ShortcutPlugin", "@blocklet/editor/lib/ext/SafeAreaPlugin", "@lexical/text", "@blocklet/editor/lib/main/nodes/ImageNode", "@blocklet/editor/lib/ext/VideoPlugin/VideoNode"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.DiscussKitComponents = {}, global.labels, global.jsxRuntime, global.styles, global.Theme, global.react, global.Box, global.isNil, global.config, global.LexicalComposerContext, global.lexical$1, global.ahooks, global.LoadingButton, global.iconsMaterial, global.context, global.Alert, global.isBoolean, global.Button, global.DidAvatar, global.AvatarGroup, global.colors, global.useMediaQuery, global.DID, global.Tooltip, global.reactRouterDom, global.UxRelativeTime, global.Chip, global.Stack, global.groupBy, global.flatMap, global.uniqBy, global.trim, global.Avatar$1, global.BrokenImageIcon, global.react$1, global.Empty$1, global.Session, global.material, global.NotificationsActiveOutlinedIcon, global.CheckboxPlugin, global.DIDAddress, global.MuiMenuItem, global.clsx, global.IconButton$1, global.MuiMenu, global.Dialog, global.orderBy, global.Typography, global.Skeleton, global.joinUrl, global.reactDom, global.dayjs, global.relativeTime, global.mitt, global.CircularProgress, global.reactHelmet, global.reactFlipToolkit, global.grey, global.Fab, global.debounce, global.TextField, global.AddIcon, global.axios, global.Toast, global.MuiPagination, global.unstatedNext, global.Cookie, global.ws, global.css, global.OnContentChangePlugin, global.ShortcutPlugin, global.SafeAreaPlugin, global.text, global.ImageNode, global.VideoNode));
|
|
3
|
+
})(this, function(exports2, labels, jsxRuntime, styles, Theme, react, Box, isNil, config, LexicalComposerContext, lexical$1, ahooks, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button, DidAvatar, AvatarGroup, colors, useMediaQuery, DID, Tooltip, reactRouterDom, UxRelativeTime, Chip, Stack, groupBy, flatMap, uniqBy, trim, Avatar$1, BrokenImageIcon, react$1, Empty$1, Session, material, NotificationsActiveOutlinedIcon, CheckboxPlugin, DIDAddress, MuiMenuItem, clsx, IconButton$1, MuiMenu, Dialog, orderBy, Typography, Skeleton, joinUrl, reactDom, dayjs, relativeTime, mitt, CircularProgress, reactHelmet, reactFlipToolkit, grey, Fab, debounce, TextField, AddIcon, axios, Toast, MuiPagination, unstatedNext, Cookie, ws, css, OnContentChangePlugin, ShortcutPlugin, SafeAreaPlugin, text, ImageNode, VideoNode) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -9,46 +9,138 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
var _a, _b;
|
|
12
|
+
const typography = {
|
|
13
|
+
h1: {
|
|
14
|
+
fontSize: "1.875rem",
|
|
15
|
+
lineHeight: 1.2,
|
|
16
|
+
fontWeight: 800,
|
|
17
|
+
letterSpacing: "-.025em"
|
|
18
|
+
},
|
|
19
|
+
h2: {
|
|
20
|
+
fontSize: "1.5rem",
|
|
21
|
+
lineHeight: 1.3333333,
|
|
22
|
+
fontWeight: 700,
|
|
23
|
+
letterSpacing: "-.025em"
|
|
24
|
+
},
|
|
25
|
+
h3: {
|
|
26
|
+
fontSize: "1.25rem",
|
|
27
|
+
lineHeight: 1.4,
|
|
28
|
+
fontWeight: 600,
|
|
29
|
+
letterSpacing: "-.025em"
|
|
30
|
+
},
|
|
31
|
+
h4: {
|
|
32
|
+
fontSize: "1.125rem",
|
|
33
|
+
lineHeight: 1.5,
|
|
34
|
+
fontWeight: 600
|
|
35
|
+
},
|
|
36
|
+
h5: {
|
|
37
|
+
fontSize: "1rem",
|
|
38
|
+
lineHeight: 1.75,
|
|
39
|
+
fontWeight: 400
|
|
40
|
+
},
|
|
41
|
+
h6: {
|
|
42
|
+
fontSize: "1rem",
|
|
43
|
+
lineHeight: 1.75,
|
|
44
|
+
fontWeight: 400
|
|
45
|
+
},
|
|
46
|
+
subtitle1: {
|
|
47
|
+
fontSize: "1rem",
|
|
48
|
+
lineHeight: 1.75,
|
|
49
|
+
fontWeight: 400
|
|
50
|
+
},
|
|
51
|
+
subtitle2: {
|
|
52
|
+
fontSize: "1rem",
|
|
53
|
+
lineHeight: 1.75,
|
|
54
|
+
fontWeight: 400
|
|
55
|
+
},
|
|
56
|
+
body1: {
|
|
57
|
+
fontSize: "1rem",
|
|
58
|
+
lineHeight: 1.75
|
|
59
|
+
},
|
|
60
|
+
fontWeightLight: 300,
|
|
61
|
+
fontWeightRegular: 400,
|
|
62
|
+
fontWeightMedium: 500,
|
|
63
|
+
fontWeightBold: 700
|
|
64
|
+
};
|
|
12
65
|
const themeOverrides = {
|
|
66
|
+
shape: {
|
|
67
|
+
borderRadius: 8
|
|
68
|
+
},
|
|
13
69
|
components: {
|
|
70
|
+
MuiInputBase: {
|
|
71
|
+
defaultProps: {
|
|
72
|
+
size: "small"
|
|
73
|
+
},
|
|
74
|
+
styleOverrides: {
|
|
75
|
+
root: ({ theme }) => ({
|
|
76
|
+
fontSize: "0.875rem",
|
|
77
|
+
// 调小输入框字体大小 (16px -> 14px)
|
|
78
|
+
backgroundColor: theme.palette.grey[50]
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
},
|
|
14
82
|
MuiButton: {
|
|
15
83
|
defaultProps: {
|
|
16
84
|
size: "small"
|
|
17
85
|
},
|
|
18
86
|
styleOverrides: {
|
|
19
87
|
root: {
|
|
88
|
+
fontWeight: 500,
|
|
20
89
|
textTransform: "none"
|
|
90
|
+
},
|
|
91
|
+
outlinedPrimary: ({ theme }) => ({
|
|
92
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
93
|
+
backgroundColor: "#fff",
|
|
94
|
+
"&:hover": {
|
|
95
|
+
border: `1px solid ${theme.palette.divider}`
|
|
96
|
+
}
|
|
97
|
+
}),
|
|
98
|
+
sizeSmall: {
|
|
99
|
+
height: 32
|
|
21
100
|
}
|
|
22
101
|
}
|
|
23
102
|
},
|
|
24
103
|
MuiIconButton: {
|
|
25
104
|
defaultProps: {
|
|
26
105
|
size: "small"
|
|
106
|
+
},
|
|
107
|
+
styleOverrides: {
|
|
108
|
+
root: {
|
|
109
|
+
textTransform: "none"
|
|
110
|
+
},
|
|
111
|
+
colorPrimary: {
|
|
112
|
+
backgroundColor: "#fff"
|
|
113
|
+
}
|
|
27
114
|
}
|
|
28
115
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
116
|
+
MuiToggleButton: {
|
|
117
|
+
styleOverrides: {
|
|
118
|
+
root: {
|
|
119
|
+
textTransform: "none"
|
|
120
|
+
}
|
|
32
121
|
}
|
|
33
122
|
},
|
|
34
|
-
|
|
123
|
+
MuiTab: {
|
|
35
124
|
styleOverrides: {
|
|
36
125
|
root: {
|
|
37
126
|
textTransform: "none"
|
|
38
127
|
}
|
|
39
128
|
}
|
|
129
|
+
},
|
|
130
|
+
MuiTooltip: {
|
|
131
|
+
defaultProps: {
|
|
132
|
+
enterTouchDelay: 3e3,
|
|
133
|
+
leaveTouchDelay: 100
|
|
134
|
+
}
|
|
40
135
|
}
|
|
41
136
|
}
|
|
42
137
|
};
|
|
43
138
|
function InternalThemeProvider({ children }) {
|
|
44
139
|
const theme = styles.useTheme();
|
|
45
|
-
const merged = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// ...themeOverrides.components,
|
|
50
|
-
// },
|
|
51
|
-
};
|
|
140
|
+
const merged = Theme.create(theme, {
|
|
141
|
+
typography,
|
|
142
|
+
...themeOverrides
|
|
143
|
+
});
|
|
52
144
|
return /* @__PURE__ */ jsxRuntime.jsx(styles.ThemeProvider, { theme: merged, children });
|
|
53
145
|
}
|
|
54
146
|
const repairBase64Avatar = (avatar) => {
|
|
@@ -11369,6 +11461,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11369
11461
|
exports2.routes = routes;
|
|
11370
11462
|
exports2.themeOverrides = themeOverrides;
|
|
11371
11463
|
exports2.translations = translations;
|
|
11464
|
+
exports2.typography = typography;
|
|
11372
11465
|
exports2.useApiErrorHandler = useApiErrorHandler;
|
|
11373
11466
|
exports2.useAuthzContext = useAuthzContext;
|
|
11374
11467
|
exports2.useChanged = useChanged;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { typography } from './typography';
|
|
2
|
+
import { default as React } from 'react';
|
|
1
3
|
import { ThemeOptions } from '@mui/material/styles';
|
|
2
4
|
|
|
5
|
+
export { typography };
|
|
3
6
|
export declare const themeOverrides: Partial<ThemeOptions>;
|
|
4
7
|
export declare function InternalThemeProvider({ children }: {
|
|
5
|
-
children:
|
|
8
|
+
children: React.ReactNode;
|
|
6
9
|
}): import("react/jsx-runtime").JSX.Element;
|
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.213",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/ws": "^1.18.115",
|
|
32
|
-
"@blocklet/editor": "1.6.
|
|
33
|
-
"@blocklet/labels": "1.6.
|
|
32
|
+
"@blocklet/editor": "1.6.213",
|
|
33
|
+
"@blocklet/labels": "1.6.213",
|
|
34
34
|
"@blocklet/uploader": "^0.0.77",
|
|
35
35
|
"@emotion/css": "^11.10.5",
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"resolutions": {
|
|
95
95
|
"react": "^18.2.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "03b4c48a34d63d8d539a94c3fc77313fb44b7fbe"
|
|
98
98
|
}
|