@white-give/editor-react 1.0.1 → 1.0.3
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/es/index.js +13 -12
- package/dist/index.d.ts +44 -44
- package/dist/lib/index.cjs +5 -5
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1150,7 +1150,7 @@ const j5 = (t, e) => {
|
|
|
1150
1150
|
echarts: {
|
|
1151
1151
|
// 自定义图表配置
|
|
1152
1152
|
onSetOptions(t, e) {
|
|
1153
|
-
return
|
|
1153
|
+
return null;
|
|
1154
1154
|
}
|
|
1155
1155
|
},
|
|
1156
1156
|
page: {
|
|
@@ -1166,7 +1166,7 @@ const j5 = (t, e) => {
|
|
|
1166
1166
|
async onFileUpload(t) {
|
|
1167
1167
|
if (!t)
|
|
1168
1168
|
throw new Error("没有找到要上传的文件");
|
|
1169
|
-
return console.log("
|
|
1169
|
+
return console.log("onFileUpload", t), await new Promise((e) => setTimeout(e, 3e3)), {
|
|
1170
1170
|
id: Pv(),
|
|
1171
1171
|
url: t.url ?? URL.createObjectURL(t),
|
|
1172
1172
|
name: t.name,
|
|
@@ -101388,7 +101388,7 @@ function moe(t, e, r) {
|
|
|
101388
101388
|
e.titleText && e.titleText !== "" && (n.title = {}, n.title.text = e.titleText, n.title.left = e.titleleft ?? "left");
|
|
101389
101389
|
let a = [];
|
|
101390
101390
|
function o() {
|
|
101391
|
-
n.legend = {}, n.legend.show = !!e.legend, n.legend[e.legendlocation] = 10, n.legend.left = e.legendleft, n.legend.orient = e.legendorient, n.legend.data = [], a = t.legends,
|
|
101391
|
+
n.legend = {}, n.legend.show = !!e.legend, n.legend[e.legendlocation] = 10, n.legend.left = e.legendleft, n.legend.orient = e.legendorient, n.legend.data = [], a = t.legends, n.legend.data = t.legends;
|
|
101392
101392
|
}
|
|
101393
101393
|
o();
|
|
101394
101394
|
function s() {
|
|
@@ -103654,7 +103654,7 @@ const xVe = (t) => {
|
|
|
103654
103654
|
return /* @__PURE__ */ Y(Tu, { as: "span", className: "inline-block mx-[0.3rem] !bg-transparent", children: /* @__PURE__ */ Y(
|
|
103655
103655
|
"span",
|
|
103656
103656
|
{
|
|
103657
|
-
className: "rounded-[0.2em] px-[0.4em] py-[0.15em] inline-block mx-[0.2em] text-sm font-[500] border-[#0000000d] box-border",
|
|
103657
|
+
className: "rounded-[0.2em] px-[0.4em] py-[0.15em] inline-block mx-[0.2em] text-sm font-[500] border-[#0000000d] box-border select-none",
|
|
103658
103658
|
style: i,
|
|
103659
103659
|
children: e.attrs.text
|
|
103660
103660
|
}
|
|
@@ -113242,11 +113242,11 @@ const BGe = ({
|
|
|
113242
113242
|
v.key.toUpperCase() === ase.ENTER && d();
|
|
113243
113243
|
};
|
|
113244
113244
|
return document.addEventListener("keydown", p), () => {
|
|
113245
|
-
document.removeEventListener("keydown", p)
|
|
113245
|
+
document.removeEventListener("keydown", p);
|
|
113246
113246
|
};
|
|
113247
113247
|
}, []);
|
|
113248
113248
|
const h = (p, v, g) => {
|
|
113249
|
-
p.preventDefault()
|
|
113249
|
+
p.preventDefault();
|
|
113250
113250
|
};
|
|
113251
113251
|
return /* @__PURE__ */ Y("div", { className: "white-editor-table-content", ref: s, children: /* @__PURE__ */ Y("table", { children: /* @__PURE__ */ Y("tbody", { children: Array.from({ length: Vj }).map((p, v) => /* @__PURE__ */ Y("tr", { children: Array.from({ length: Hj }).map((g, m) => /* @__PURE__ */ Y(
|
|
113252
113252
|
"td",
|
|
@@ -113260,7 +113260,7 @@ const BGe = ({
|
|
|
113260
113260
|
autoComplete: "off",
|
|
113261
113261
|
onFocus: () => a([v, m]),
|
|
113262
113262
|
onBlur: () => f(v, m),
|
|
113263
|
-
onPaste: (y) => h(y
|
|
113263
|
+
onPaste: (y) => h(y)
|
|
113264
113264
|
}
|
|
113265
113265
|
)
|
|
113266
113266
|
},
|
|
@@ -113295,7 +113295,6 @@ function qI({
|
|
|
113295
113295
|
console.log("图表数据为空");
|
|
113296
113296
|
return;
|
|
113297
113297
|
}
|
|
113298
|
-
console.log("baseConfig.data", F);
|
|
113299
113298
|
const V = moe(
|
|
113300
113299
|
JSON.parse(JSON.stringify(F.data)),
|
|
113301
113300
|
JSON.parse(JSON.stringify(F.config)),
|
|
@@ -113309,7 +113308,7 @@ function qI({
|
|
|
113309
113308
|
}, 0);
|
|
113310
113309
|
}, x = () => {
|
|
113311
113310
|
const L = { ...v };
|
|
113312
|
-
return L.config.seriesType = "bar", L.config.legend = !0, L.config.legendorient = "horizontal", L.config.legendlocation = "top", L.config.legendleft = "center", L.config.titleText = "", L.config.titleleft = "left", L.data = bj[L.config.seriesType], g(L),
|
|
113311
|
+
return L.config.seriesType = "bar", L.config.legend = !0, L.config.legendorient = "horizontal", L.config.legendlocation = "top", L.config.legendleft = "center", L.config.titleText = "", L.config.titleleft = "left", L.data = bj[L.config.seriesType], g(L), L;
|
|
113313
113312
|
}, w = async () => {
|
|
113314
113313
|
if (s(!0), u("type"), r) {
|
|
113315
113314
|
if (!i) return;
|
|
@@ -113358,8 +113357,10 @@ function qI({
|
|
|
113358
113357
|
nodeAlign: "center",
|
|
113359
113358
|
margin: {}
|
|
113360
113359
|
};
|
|
113361
|
-
r ? L.id = f.attrs.id : L.id = Pv()
|
|
113362
|
-
|
|
113360
|
+
r ? L.id = f.attrs.id : L.id = Pv();
|
|
113361
|
+
let F = v.data;
|
|
113362
|
+
l === "data" && p.current && (F = p.current.getTableData().data), L.chartConfig = JSON.parse(
|
|
113363
|
+
JSON.stringify({ data: F, config: v.config })
|
|
113363
113364
|
), r ? i?.commands.updateEcharts(L) : i?.commands.setEcharts(L), s(!1);
|
|
113364
113365
|
};
|
|
113365
113366
|
return /* @__PURE__ */ rt(Un, { children: [
|
|
@@ -117125,7 +117126,7 @@ const Oqe = () => {
|
|
|
117125
117126
|
});
|
|
117126
117127
|
return zr(() => {
|
|
117127
117128
|
o && (o.storage.container = e, o.storage.options = r, i(o));
|
|
117128
|
-
}, [o, e, r, i]), console.log(r, e), /* @__PURE__ */ Y("div", { className: "white-editor-namespace white-give-editor-wrapper", children: /* @__PURE__ */ rt("div", { className: "flex flex-col ", children: [
|
|
117129
|
+
}, [o, e, r, i]), console.log(r, e), /* @__PURE__ */ Y("div", { className: "white-editor-namespace white-give-editor-wrapper", children: /* @__PURE__ */ rt("div", { className: "flex flex-col w-full h-full", children: [
|
|
117129
117130
|
r.layout?.toolbar?.show && /* @__PURE__ */ Y("div", { className: "w-full flex-none border-b border-[#d9d9d9]", children: /* @__PURE__ */ Y(rWe, {}) }),
|
|
117130
117131
|
/* @__PURE__ */ rt("div", { className: "w-full flex-1 min-h-0 flex overflow-hidden", id: e, children: [
|
|
117131
117132
|
t.showToc && r.layout.toc.show && /* @__PURE__ */ Y(hWe, {}),
|
package/dist/index.d.ts
CHANGED
|
@@ -124,25 +124,6 @@ declare module '@tiptap/core' {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
declare module '@tiptap/core' {
|
|
128
|
-
interface Commands<ReturnType> {
|
|
129
|
-
setHr: {
|
|
130
|
-
setHr: (option: any) => ReturnType;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
declare module '@tiptap/core' {
|
|
136
|
-
interface Commands<ReturnType> {
|
|
137
|
-
setImage: {
|
|
138
|
-
setImage: (options: any, replace?: any) => ReturnType;
|
|
139
|
-
};
|
|
140
|
-
setInlineImage: {
|
|
141
|
-
setInlineImage: (options: any, replace?: any) => ReturnType;
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
127
|
|
|
147
128
|
declare module '@tiptap/core' {
|
|
148
129
|
interface Commands<ReturnType> {
|
|
@@ -167,14 +148,21 @@ declare module '@tiptap/core' {
|
|
|
167
148
|
}
|
|
168
149
|
}
|
|
169
150
|
|
|
151
|
+
declare module '@tiptap/core' {
|
|
152
|
+
interface Commands<ReturnType> {
|
|
153
|
+
setHr: {
|
|
154
|
+
setHr: (option: any) => ReturnType;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
170
158
|
|
|
171
159
|
declare module '@tiptap/core' {
|
|
172
160
|
interface Commands<ReturnType> {
|
|
173
|
-
|
|
174
|
-
|
|
161
|
+
setImage: {
|
|
162
|
+
setImage: (options: any, replace?: any) => ReturnType;
|
|
175
163
|
};
|
|
176
|
-
|
|
177
|
-
|
|
164
|
+
setInlineImage: {
|
|
165
|
+
setInlineImage: (options: any, replace?: any) => ReturnType;
|
|
178
166
|
};
|
|
179
167
|
}
|
|
180
168
|
}
|
|
@@ -201,6 +189,18 @@ declare module '@tiptap/core' {
|
|
|
201
189
|
}
|
|
202
190
|
|
|
203
191
|
|
|
192
|
+
declare module '@tiptap/core' {
|
|
193
|
+
interface Commands<ReturnType> {
|
|
194
|
+
indent: {
|
|
195
|
+
indent: () => ReturnType;
|
|
196
|
+
};
|
|
197
|
+
outdent: {
|
|
198
|
+
outdent: () => ReturnType;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
204
|
declare module '@tiptap/core' {
|
|
205
205
|
interface Commands<ReturnType> {
|
|
206
206
|
setLineHeight: {
|
|
@@ -223,11 +223,11 @@ declare module '@tiptap/core' {
|
|
|
223
223
|
|
|
224
224
|
declare module '@tiptap/core' {
|
|
225
225
|
interface Commands<ReturnType> {
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
setFontSize: {
|
|
227
|
+
setFontSize: (fontSize: any) => ReturnType;
|
|
228
228
|
};
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
unsetFontSize: {
|
|
230
|
+
unsetFontSize: () => ReturnType;
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
}
|
|
@@ -235,11 +235,11 @@ declare module '@tiptap/core' {
|
|
|
235
235
|
|
|
236
236
|
declare module '@tiptap/core' {
|
|
237
237
|
interface Commands<ReturnType> {
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
setCurrentNodeSelection: {
|
|
239
|
+
setCurrentNodeSelection: () => ReturnType;
|
|
240
240
|
};
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
deleteSelectionNode: {
|
|
242
|
+
deleteSelectionNode: () => ReturnType;
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -247,11 +247,11 @@ declare module '@tiptap/core' {
|
|
|
247
247
|
|
|
248
248
|
declare module '@tiptap/core' {
|
|
249
249
|
interface Commands<ReturnType> {
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
setMargin: {
|
|
251
|
+
setMargin: (options: any) => ReturnType;
|
|
252
252
|
};
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
unsetMargin: {
|
|
254
|
+
unsetMargin: () => ReturnType;
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
}
|
|
@@ -259,11 +259,8 @@ declare module '@tiptap/core' {
|
|
|
259
259
|
|
|
260
260
|
declare module '@tiptap/core' {
|
|
261
261
|
interface Commands<ReturnType> {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
};
|
|
265
|
-
unsetNodeAlign: {
|
|
266
|
-
unsetNodeAlign: () => ReturnType;
|
|
262
|
+
setVideo: {
|
|
263
|
+
setVideo: (options: any) => ReturnType;
|
|
267
264
|
};
|
|
268
265
|
}
|
|
269
266
|
}
|
|
@@ -271,8 +268,11 @@ declare module '@tiptap/core' {
|
|
|
271
268
|
|
|
272
269
|
declare module '@tiptap/core' {
|
|
273
270
|
interface Commands<ReturnType> {
|
|
274
|
-
|
|
275
|
-
|
|
271
|
+
setNodeAlign: {
|
|
272
|
+
setNodeAlign: (options: any) => ReturnType;
|
|
273
|
+
};
|
|
274
|
+
unsetNodeAlign: {
|
|
275
|
+
unsetNodeAlign: () => ReturnType;
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
}
|
|
@@ -280,8 +280,8 @@ declare module '@tiptap/core' {
|
|
|
280
280
|
|
|
281
281
|
declare module '@tiptap/core' {
|
|
282
282
|
interface Commands<ReturnType> {
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
insertTag: {
|
|
284
|
+
insertTag: (options: any) => ReturnType;
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
}
|