@zero-library/common 2.3.6 → 2.3.7
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/index.cjs.js +7 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +6 -4
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +8 -24
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2097,7 +2097,7 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
|
|
|
2097
2097
|
return index;
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
|
-
return 0;
|
|
2100
|
+
return getCurrentIndex() ?? 0;
|
|
2101
2101
|
};
|
|
2102
2102
|
React.useEffect(() => {
|
|
2103
2103
|
const index = getIndex(pageNo);
|
|
@@ -8151,7 +8151,7 @@ function useSelect(editor, disabled = false, hideWhenUnavailable = false) {
|
|
|
8151
8151
|
};
|
|
8152
8152
|
}
|
|
8153
8153
|
var SelectButton = React__namespace.default.forwardRef(
|
|
8154
|
-
({ editor: providedEditor,
|
|
8154
|
+
({ editor: providedEditor, disabled = false, hideWhenUnavailable = false, onClick, children, icon, tooltip, ...buttonProps }, ref) => {
|
|
8155
8155
|
const { editor } = useTiptapEditor(providedEditor);
|
|
8156
8156
|
const { isDisabled, shouldShow, getText, getMarkdown } = useSelect(editor, disabled, hideWhenUnavailable);
|
|
8157
8157
|
const handleClick = React__namespace.default.useCallback(
|
|
@@ -8164,23 +8164,7 @@ var SelectButton = React__namespace.default.forwardRef(
|
|
|
8164
8164
|
[onClick, editor, isDisabled, getText, getMarkdown]
|
|
8165
8165
|
);
|
|
8166
8166
|
if (!shouldShow || !editor || !editor.isEditable) return null;
|
|
8167
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8168
|
-
Button4,
|
|
8169
|
-
{
|
|
8170
|
-
type: "button",
|
|
8171
|
-
className: className.trim(),
|
|
8172
|
-
disabled: isDisabled,
|
|
8173
|
-
"data-style": "ghost",
|
|
8174
|
-
"data-disabled": isDisabled,
|
|
8175
|
-
onClick: handleClick,
|
|
8176
|
-
...buttonProps,
|
|
8177
|
-
ref,
|
|
8178
|
-
children: children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8179
|
-
icon,
|
|
8180
|
-
text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tiptap-button-text", children: text })
|
|
8181
|
-
] })
|
|
8182
|
-
}
|
|
8183
|
-
);
|
|
8167
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { placement: "bottom", title: tooltip, arrow: false, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { color: "orange", variant: "text", size: "small", icon, onClick: handleClick, disabled: isDisabled, ...buttonProps, ref, children }) });
|
|
8184
8168
|
}
|
|
8185
8169
|
);
|
|
8186
8170
|
SelectButton.displayName = "SelectButton";
|
|
@@ -8387,14 +8371,14 @@ var SearchAndReplace = core.Extension.create({
|
|
|
8387
8371
|
}
|
|
8388
8372
|
});
|
|
8389
8373
|
var searchAndReplace_default = SearchAndReplace;
|
|
8390
|
-
var QuoteIcon = React__namespace.memo(({
|
|
8391
|
-
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "
|
|
8374
|
+
var QuoteIcon = React__namespace.memo(({ ...props }) => {
|
|
8375
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "anticon", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 1024 1024", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8392
8376
|
"path",
|
|
8393
8377
|
{
|
|
8394
8378
|
d: "M130.16 789.92V500.25q-1.85-62.51 18-117.41T204 286.23a308 308 0 0 1 86.13-69.1A304.32 304.32 0 0 1 386.26 184 11 11 0 0 1 399 194.86v104.52a11 11 0 0 1-7.21 10.29q-66.13 24.5-91.25 70.31-24.41 44.36-26.32 107a11 11 0 0 0 11 11.3h102.84a11 11 0 0 1 11 11V779a11 11 0 0 1-11 11h-257.9z m403.3 0V500.25q-2-62.51 17.95-117.41t55.85-96.61q35.94-41.6 86.13-69.1A304.7 304.7 0 0 1 789.56 184a11 11 0 0 1 12.76 10.82v104.56a11 11 0 0 1-7.21 10.29Q729 334.18 703.86 380q-24.41 44.36-26.32 107a11 11 0 0 0 11 11.3h102.82a11 11 0 0 1 11 11V779a11 11 0 0 1-11 11H533.45z m0 0",
|
|
8395
8379
|
fill: "currentColor"
|
|
8396
8380
|
}
|
|
8397
|
-
) });
|
|
8381
|
+
) }) });
|
|
8398
8382
|
});
|
|
8399
8383
|
QuoteIcon.displayName = "QuoteIcon";
|
|
8400
8384
|
var MainToolbarContent = ({
|
|
@@ -8415,7 +8399,7 @@ var MainToolbarContent = ({
|
|
|
8415
8399
|
] }),
|
|
8416
8400
|
/* @__PURE__ */ jsxRuntime.jsx(ToolbarSeparator, {})
|
|
8417
8401
|
] }),
|
|
8418
|
-
onQuote && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(QuoteIcon, {
|
|
8402
|
+
onQuote && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(QuoteIcon, {}), tooltip: "\u5F15\u7528\u9009\u4E2D\u6587\u672C", onClick: onQuote }) }),
|
|
8419
8403
|
onCreateAnnotation && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(Icon.MessageOutlined, {}), tooltip: "\u6279\u6CE8", onClick: onCreateAnnotation }) }),
|
|
8420
8404
|
onCreateCollection && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(Icon.BookOutlined, {}), tooltip: "\u6458\u5F55\u7B14\u8BB0", onClick: onCreateCollection }) }),
|
|
8421
8405
|
/* @__PURE__ */ jsxRuntime.jsxs(ToolbarGroup, { children: [
|