@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.
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAyBhE,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,UAAU,EAQhB,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;AAmG7C,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAeD,eAAO,MAAM,OAAO,0WAojFlB,CAAA"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAyBhE,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,UAAU,EAQhB,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;AAmG7C,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAeD,eAAO,MAAM,OAAO,0WAgjFlB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jvs-milkdown/crepe",
3
- "version": "1.2.41",
3
+ "version": "1.2.42",
4
4
  "keywords": [
5
5
  "crepe",
6
6
  "editor",
@@ -107,9 +107,9 @@
107
107
  "@codemirror/theme-one-dark": "^6.1.2",
108
108
  "@codemirror/view": "^6.26.0",
109
109
  "@floating-ui/dom": "^1.7.6",
110
- "@jvs-milkdown/kit": "^1.2.41",
111
- "@jvs-milkdown/prose": "^1.2.41",
112
- "@jvs-milkdown/utils": "^1.2.41",
110
+ "@jvs-milkdown/kit": "^1.2.42",
111
+ "@jvs-milkdown/prose": "^1.2.42",
112
+ "@jvs-milkdown/utils": "^1.2.42",
113
113
  "@types/lodash-es": "^4.17.12",
114
114
  "clsx": "^2.0.0",
115
115
  "codemirror": "^6.0.1",
@@ -461,10 +461,8 @@ export const Toolbar = defineComponent<ToolbarProps>({
461
461
  watch(
462
462
  () => formatPainterState!.value,
463
463
  (newVal: any) => {
464
- console.log('[FormatPainter] state changed:', newVal);
465
464
  if (newVal) {
466
465
  let cursorStyleEl = cursorStyleEls.get(ctx)
467
- console.log('[FormatPainter] existing style tag:', cursorStyleEl);
468
466
  if (!cursorStyleEl) {
469
467
  cursorStyleEl = document.createElement('style')
470
468
  // We must replace currentColor with a valid color for data URI (e.g., black or #363B4C)
@@ -474,14 +472,12 @@ export const Toolbar = defineComponent<ToolbarProps>({
474
472
  svgWithXmlns = svgWithXmlns.replace(/\s+/g, ' ').trim()
475
473
  const cleanSvg = svgWithXmlns.replace(/currentColor/g, '#363B4C')
476
474
  const base64Svg = window.btoa(cleanSvg)
477
- cursorStyleEl.innerHTML = `body, body *, .ProseMirror, .ProseMirror * { cursor: url("data:image/svg+xml;base64,${base64Svg}") 0 0, auto !important; }`
475
+ cursorStyleEl.innerHTML = `.ProseMirror, .ProseMirror * { cursor: url("data:image/svg+xml;base64,${base64Svg}") 0 0, auto !important; }`
478
476
  document.head.appendChild(cursorStyleEl)
479
477
  cursorStyleEls.set(ctx, cursorStyleEl)
480
- console.log('[FormatPainter] Style tag appended to head:', cursorStyleEl.outerHTML);
481
478
  }
482
479
  } else {
483
480
  const cursorStyleEl = cursorStyleEls.get(ctx)
484
- console.log('[FormatPainter] removing style tag:', cursorStyleEl);
485
481
  if (cursorStyleEl) {
486
482
  cursorStyleEl.remove()
487
483
  cursorStyleEls.delete(ctx)