@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
|
@@ -4401,24 +4401,20 @@ const Toolbar = defineComponent({
|
|
|
4401
4401
|
watch(
|
|
4402
4402
|
() => formatPainterState.value,
|
|
4403
4403
|
(newVal) => {
|
|
4404
|
-
console.log("[FormatPainter] state changed:", newVal);
|
|
4405
4404
|
if (newVal) {
|
|
4406
4405
|
let cursorStyleEl = cursorStyleEls.get(ctx);
|
|
4407
|
-
console.log("[FormatPainter] existing style tag:", cursorStyleEl);
|
|
4408
4406
|
if (!cursorStyleEl) {
|
|
4409
4407
|
cursorStyleEl = document.createElement("style");
|
|
4410
4408
|
let svgWithXmlns = formatPainterIcon.includes("xmlns=") ? formatPainterIcon : formatPainterIcon.replace("<svg ", '<svg xmlns="http://www.w3.org/2000/svg" ');
|
|
4411
4409
|
svgWithXmlns = svgWithXmlns.replace(/\s+/g, " ").trim();
|
|
4412
4410
|
const cleanSvg = svgWithXmlns.replace(/currentColor/g, "#363B4C");
|
|
4413
4411
|
const base64Svg = window.btoa(cleanSvg);
|
|
4414
|
-
cursorStyleEl.innerHTML =
|
|
4412
|
+
cursorStyleEl.innerHTML = `.ProseMirror, .ProseMirror * { cursor: url("data:image/svg+xml;base64,${base64Svg}") 0 0, auto !important; }`;
|
|
4415
4413
|
document.head.appendChild(cursorStyleEl);
|
|
4416
4414
|
cursorStyleEls.set(ctx, cursorStyleEl);
|
|
4417
|
-
console.log("[FormatPainter] Style tag appended to head:", cursorStyleEl.outerHTML);
|
|
4418
4415
|
}
|
|
4419
4416
|
} else {
|
|
4420
4417
|
const cursorStyleEl = cursorStyleEls.get(ctx);
|
|
4421
|
-
console.log("[FormatPainter] removing style tag:", cursorStyleEl);
|
|
4422
4418
|
if (cursorStyleEl) {
|
|
4423
4419
|
cursorStyleEl.remove();
|
|
4424
4420
|
cursorStyleEls.delete(ctx);
|