@jvs-milkdown/crepe 1.2.40 → 1.2.42
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/lib/cjs/feature/toolbar/index.js +6 -5
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +6 -5
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +6 -5
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +6 -5
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/block-edit.css +1 -1
- package/lib/theme/common/image-block.css +1 -2
- package/lib/theme/common/link-tooltip.css +2 -2
- package/lib/theme/common/table.css +14 -3
- package/lib/theme/common/toolbar.css +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/toolbar/component.d.ts.map +1 -1
- package/lib/types/icons/format-painter.d.ts +1 -1
- package/lib/types/icons/format-painter.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/feature/toolbar/component.tsx +7 -4
- package/src/icons/format-painter.ts +1 -1
- package/src/theme/common/block-edit.css +1 -1
- package/src/theme/common/image-block.css +1 -2
- package/src/theme/common/link-tooltip.css +2 -2
- package/src/theme/common/table.css +14 -3
- package/src/theme/common/toolbar.css +2 -2
package/lib/cjs/index.js
CHANGED
|
@@ -667,7 +667,7 @@ const borderIcon = `
|
|
|
667
667
|
`;
|
|
668
668
|
|
|
669
669
|
const formatPainterIcon = `
|
|
670
|
-
<svg viewBox="0 0 1024 1024" version="1.1" width="
|
|
670
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" version="1.1" width="32" height="32">
|
|
671
671
|
<path d="M454.698667 302.506667H323.84q-23.04 0-41.6 13.824-18.517333 13.824-25.130667 35.968l-31.36 104.704q-10.112 33.621333 10.794667 61.738666 11.52 15.445333 27.221333 22.442667 0.853333 46.165333-0.810666 105.6-1.408 51.84-58.368 138.496-23.338667 35.413333-3.413334 72.96 20.053333 37.76 62.677334 37.76h477.994666q39.509333 0 69.077334-26.325333 29.738667-26.453333 34.090666-65.962667 10.24-93.738667 10.24-155.946667 0-57.088-8.618666-103.68 20.949333-6.058667 35.285333-25.344 20.864-28.117333 10.837333-61.738666l-31.36-104.704q-6.656-22.144-25.173333-35.968-18.517333-13.781333-41.6-13.781334h-130.858667V197.802667q0-28.885333-20.437333-49.365334Q622.933333 128 594.090667 128H524.373333q-28.842667 0-49.237333 20.48-20.437333 20.437333-20.437333 49.322667v104.746666z m68.992 41.728q0.682667-3.370667 0.682666-6.784V197.802667h69.717334V337.493333q0 3.413333 0.64 6.826667 0.682667 3.370667 2.005333 6.528 1.28 3.2 3.2 6.058667 1.92 2.816 4.352 5.248 2.389333 2.474667 5.248 4.352 2.901333 1.92 6.058667 3.242666 3.157333 1.322667 6.528 1.962667 3.328 0.682667 6.826666 0.682667h165.674667l31.36 104.746666H292.48l31.36-104.746666h165.717333q3.413333 0 6.826667-0.64 3.328-0.682667 6.528-2.005334 3.157333-1.322667 5.973333-3.242666 2.858667-1.877333 5.290667-4.352 2.432-2.432 4.309333-5.248 1.92-2.901333 3.242667-6.058667 1.322667-3.157333 1.962667-6.570667z m252.501333 202.666666q9.429333 43.648 9.429333 100.864 0 58.368-9.813333 148.352-1.450667 12.757333-11.093333 21.376-9.813333 8.704-22.826667 8.704h-100.309333q22.058667-81.493333 22.058666-174.592h-69.674666q0 94.421333-24.96 174.592h-121.514667q41.941333-81.450667 41.941333-174.592H419.754667q0 94.378667-52.992 174.592H263.808q-0.725333 0-1.109333-0.725333-0.469333-0.981333 0.042666-1.749333 67.968-103.253333 69.888-175.018667 1.536-56.533333 0.938667-101.802667H776.106667z" fill="currentColor" p-id="11997"></path>
|
|
672
672
|
</svg>
|
|
673
673
|
`;
|
|
@@ -5782,10 +5782,11 @@ const Toolbar = vue.defineComponent({
|
|
|
5782
5782
|
let cursorStyleEl = cursorStyleEls.get(ctx);
|
|
5783
5783
|
if (!cursorStyleEl) {
|
|
5784
5784
|
cursorStyleEl = document.createElement("style");
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
);
|
|
5788
|
-
|
|
5785
|
+
let svgWithXmlns = formatPainterIcon.includes("xmlns=") ? formatPainterIcon : formatPainterIcon.replace("<svg ", '<svg xmlns="http://www.w3.org/2000/svg" ');
|
|
5786
|
+
svgWithXmlns = svgWithXmlns.replace(/\s+/g, " ").trim();
|
|
5787
|
+
const cleanSvg = svgWithXmlns.replace(/currentColor/g, "#363B4C");
|
|
5788
|
+
const base64Svg = window.btoa(cleanSvg);
|
|
5789
|
+
cursorStyleEl.innerHTML = `.ProseMirror, .ProseMirror * { cursor: url("data:image/svg+xml;base64,${base64Svg}") 0 0, auto !important; }`;
|
|
5789
5790
|
document.head.appendChild(cursorStyleEl);
|
|
5790
5791
|
cursorStyleEls.set(ctx, cursorStyleEl);
|
|
5791
5792
|
}
|