@jvs-milkdown/crepe 1.2.40 → 1.2.41
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 +10 -5
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +10 -5
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +10 -5
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +10 -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 +11 -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
|
@@ -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,
|
|
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,2 +1,2 @@
|
|
|
1
|
-
export declare const formatPainterIcon = "\n <svg viewBox=\"0 0 1024 1024\" version=\"1.1\" width=\"
|
|
1
|
+
export declare const formatPainterIcon = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\" version=\"1.1\" width=\"32\" height=\"32\">\n <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>\n </svg>\n";
|
|
2
2
|
//# sourceMappingURL=format-painter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-painter.d.ts","sourceRoot":"","sources":["../../../src/icons/format-painter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"format-painter.d.ts","sourceRoot":"","sources":["../../../src/icons/format-painter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,ggEAI7B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jvs-milkdown/crepe",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.41",
|
|
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.
|
|
111
|
-
"@jvs-milkdown/prose": "^1.2.
|
|
112
|
-
"@jvs-milkdown/utils": "^1.2.
|
|
110
|
+
"@jvs-milkdown/kit": "^1.2.41",
|
|
111
|
+
"@jvs-milkdown/prose": "^1.2.41",
|
|
112
|
+
"@jvs-milkdown/utils": "^1.2.41",
|
|
113
113
|
"@types/lodash-es": "^4.17.12",
|
|
114
114
|
"clsx": "^2.0.0",
|
|
115
115
|
"codemirror": "^6.0.1",
|
|
@@ -461,20 +461,27 @@ export const Toolbar = defineComponent<ToolbarProps>({
|
|
|
461
461
|
watch(
|
|
462
462
|
() => formatPainterState!.value,
|
|
463
463
|
(newVal: any) => {
|
|
464
|
+
console.log('[FormatPainter] state changed:', newVal);
|
|
464
465
|
if (newVal) {
|
|
465
466
|
let cursorStyleEl = cursorStyleEls.get(ctx)
|
|
467
|
+
console.log('[FormatPainter] existing style tag:', cursorStyleEl);
|
|
466
468
|
if (!cursorStyleEl) {
|
|
467
469
|
cursorStyleEl = document.createElement('style')
|
|
468
470
|
// We must replace currentColor with a valid color for data URI (e.g., black or #363B4C)
|
|
469
|
-
|
|
470
|
-
formatPainterIcon
|
|
471
|
-
|
|
472
|
-
|
|
471
|
+
let svgWithXmlns = formatPainterIcon.includes('xmlns=')
|
|
472
|
+
? formatPainterIcon
|
|
473
|
+
: formatPainterIcon.replace('<svg ', '<svg xmlns="http://www.w3.org/2000/svg" ')
|
|
474
|
+
svgWithXmlns = svgWithXmlns.replace(/\s+/g, ' ').trim()
|
|
475
|
+
const cleanSvg = svgWithXmlns.replace(/currentColor/g, '#363B4C')
|
|
476
|
+
const base64Svg = window.btoa(cleanSvg)
|
|
477
|
+
cursorStyleEl.innerHTML = `body, body *, .ProseMirror, .ProseMirror * { cursor: url("data:image/svg+xml;base64,${base64Svg}") 0 0, auto !important; }`
|
|
473
478
|
document.head.appendChild(cursorStyleEl)
|
|
474
479
|
cursorStyleEls.set(ctx, cursorStyleEl)
|
|
480
|
+
console.log('[FormatPainter] Style tag appended to head:', cursorStyleEl.outerHTML);
|
|
475
481
|
}
|
|
476
482
|
} else {
|
|
477
483
|
const cursorStyleEl = cursorStyleEls.get(ctx)
|
|
484
|
+
console.log('[FormatPainter] removing style tag:', cursorStyleEl);
|
|
478
485
|
if (cursorStyleEl) {
|
|
479
486
|
cursorStyleEl.remove()
|
|
480
487
|
cursorStyleEls.delete(ctx)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const formatPainterIcon = `
|
|
2
|
-
<svg viewBox="0 0 1024 1024" version="1.1" width="
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" version="1.1" width="32" height="32">
|
|
3
3
|
<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>
|
|
4
4
|
</svg>
|
|
5
5
|
`
|
|
@@ -155,7 +155,6 @@
|
|
|
155
155
|
position: relative;
|
|
156
156
|
|
|
157
157
|
&:hover {
|
|
158
|
-
z-index: 210;
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
& > .image-wrapper {
|
|
@@ -289,7 +288,7 @@
|
|
|
289
288
|
pointer-events: none;
|
|
290
289
|
transition: opacity 0.2s;
|
|
291
290
|
width: fit-content;
|
|
292
|
-
z-index:
|
|
291
|
+
z-index: 400;
|
|
293
292
|
white-space: nowrap;
|
|
294
293
|
|
|
295
294
|
&::after {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.milkdown {
|
|
2
2
|
.milkdown-link-preview {
|
|
3
3
|
position: absolute;
|
|
4
|
-
z-index:
|
|
4
|
+
z-index: 400;
|
|
5
5
|
&[data-show='false'] {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
.milkdown-link-edit {
|
|
73
73
|
position: absolute;
|
|
74
|
-
z-index:
|
|
74
|
+
z-index: 400;
|
|
75
75
|
&[data-show='false'] {
|
|
76
76
|
display: none;
|
|
77
77
|
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
|
|
9
9
|
&:hover {
|
|
10
|
-
z-index: 210;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
table {
|
|
@@ -99,6 +98,10 @@
|
|
|
99
98
|
height: 8px;
|
|
100
99
|
z-index: 102;
|
|
101
100
|
overflow: visible;
|
|
101
|
+
|
|
102
|
+
&:has([data-show='true']) {
|
|
103
|
+
z-index: 400;
|
|
104
|
+
}
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
.fixed-handles-row {
|
|
@@ -109,6 +112,10 @@
|
|
|
109
112
|
width: 8px;
|
|
110
113
|
z-index: 102;
|
|
111
114
|
overflow: visible;
|
|
115
|
+
|
|
116
|
+
&:has([data-show='true']) {
|
|
117
|
+
z-index: 400;
|
|
118
|
+
}
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
.add-dots-col,
|
|
@@ -213,6 +220,10 @@
|
|
|
213
220
|
&:hover {
|
|
214
221
|
background-color: var(--crepe-color-primary);
|
|
215
222
|
}
|
|
223
|
+
|
|
224
|
+
&:has([data-show='true']) {
|
|
225
|
+
z-index: 400;
|
|
226
|
+
}
|
|
216
227
|
}
|
|
217
228
|
|
|
218
229
|
&:hover .cell-handle.fixed {
|
|
@@ -296,7 +307,7 @@
|
|
|
296
307
|
background-color: var(--crepe-color-surface);
|
|
297
308
|
border-radius: 8px;
|
|
298
309
|
box-shadow: var(--crepe-shadow-1);
|
|
299
|
-
z-index:
|
|
310
|
+
z-index: 400;
|
|
300
311
|
|
|
301
312
|
&::after {
|
|
302
313
|
content: '';
|
|
@@ -461,7 +472,7 @@
|
|
|
461
472
|
|
|
462
473
|
.cell-toolbar {
|
|
463
474
|
position: absolute;
|
|
464
|
-
z-index:
|
|
475
|
+
z-index: 400;
|
|
465
476
|
display: flex;
|
|
466
477
|
gap: 2px;
|
|
467
478
|
background-color: var(--crepe-color-surface);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
display: none;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
z-index:
|
|
12
|
+
z-index: 400;
|
|
13
13
|
position: absolute;
|
|
14
14
|
display: flex;
|
|
15
15
|
background: var(--crepe-color-surface);
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
color-mix(in srgb, var(--crepe-color-outline), transparent 80%)
|
|
94
94
|
);
|
|
95
95
|
padding: 0 10px;
|
|
96
|
-
z-index:
|
|
96
|
+
z-index: 300;
|
|
97
97
|
position: sticky;
|
|
98
98
|
top: 0;
|
|
99
99
|
flex-shrink: 0;
|