@jvs-milkdown/crepe 1.2.41 → 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 +1 -5
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +1 -5
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +1 -5
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +1 -5
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/toolbar/component.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/feature/toolbar/component.tsx +1 -5
package/lib/esm/index.js
CHANGED
|
@@ -5757,24 +5757,20 @@ const Toolbar = defineComponent({
|
|
|
5757
5757
|
watch(
|
|
5758
5758
|
() => formatPainterState.value,
|
|
5759
5759
|
(newVal) => {
|
|
5760
|
-
console.log("[FormatPainter] state changed:", newVal);
|
|
5761
5760
|
if (newVal) {
|
|
5762
5761
|
let cursorStyleEl = cursorStyleEls.get(ctx);
|
|
5763
|
-
console.log("[FormatPainter] existing style tag:", cursorStyleEl);
|
|
5764
5762
|
if (!cursorStyleEl) {
|
|
5765
5763
|
cursorStyleEl = document.createElement("style");
|
|
5766
5764
|
let svgWithXmlns = formatPainterIcon.includes("xmlns=") ? formatPainterIcon : formatPainterIcon.replace("<svg ", '<svg xmlns="http://www.w3.org/2000/svg" ');
|
|
5767
5765
|
svgWithXmlns = svgWithXmlns.replace(/\s+/g, " ").trim();
|
|
5768
5766
|
const cleanSvg = svgWithXmlns.replace(/currentColor/g, "#363B4C");
|
|
5769
5767
|
const base64Svg = window.btoa(cleanSvg);
|
|
5770
|
-
cursorStyleEl.innerHTML =
|
|
5768
|
+
cursorStyleEl.innerHTML = `.ProseMirror, .ProseMirror * { cursor: url("data:image/svg+xml;base64,${base64Svg}") 0 0, auto !important; }`;
|
|
5771
5769
|
document.head.appendChild(cursorStyleEl);
|
|
5772
5770
|
cursorStyleEls.set(ctx, cursorStyleEl);
|
|
5773
|
-
console.log("[FormatPainter] Style tag appended to head:", cursorStyleEl.outerHTML);
|
|
5774
5771
|
}
|
|
5775
5772
|
} else {
|
|
5776
5773
|
const cursorStyleEl = cursorStyleEls.get(ctx);
|
|
5777
|
-
console.log("[FormatPainter] removing style tag:", cursorStyleEl);
|
|
5778
5774
|
if (cursorStyleEl) {
|
|
5779
5775
|
cursorStyleEl.remove();
|
|
5780
5776
|
cursorStyleEls.delete(ctx);
|