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