@jvs-milkdown/crepe 1.2.1 → 1.2.2
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/index.js +6 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +6 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/image-block.css +5 -2
- package/package.json +4 -4
- package/src/feature/fixed-toolbar/menu-bar.tsx +8 -1
- package/src/theme/common/image-block.css +6 -2
|
@@ -161,12 +161,15 @@
|
|
|
161
161
|
margin: 4px 0;
|
|
162
162
|
display: block;
|
|
163
163
|
position: relative;
|
|
164
|
-
z-index: 120;
|
|
165
164
|
}
|
|
165
|
+
.milkdown .milkdown-image-block:hover {
|
|
166
|
+
z-index: 120;
|
|
167
|
+
}
|
|
166
168
|
.milkdown .milkdown-image-block > .image-wrapper {
|
|
167
169
|
position: relative;
|
|
168
170
|
width: -moz-fit-content;
|
|
169
171
|
width: fit-content;
|
|
172
|
+
max-width: 100%;
|
|
170
173
|
margin: 0 auto;
|
|
171
174
|
min-width: 100px;
|
|
172
175
|
}
|
|
@@ -557,7 +560,7 @@
|
|
|
557
560
|
}
|
|
558
561
|
.milkdown .milkdown-image-block .crop-box {
|
|
559
562
|
position: absolute;
|
|
560
|
-
border: 2px solid transparent;
|
|
563
|
+
/* border: 2px solid transparent; */
|
|
561
564
|
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
|
|
562
565
|
cursor: move;
|
|
563
566
|
z-index: 2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jvs-milkdown/crepe",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"crepe",
|
|
6
6
|
"editor",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
98
98
|
"@codemirror/view": "^6.26.0",
|
|
99
99
|
"@floating-ui/dom": "^1.7.6",
|
|
100
|
-
"@jvs-milkdown/kit": "^1.2.
|
|
101
|
-
"@jvs-milkdown/prose": "^1.2.
|
|
102
|
-
"@jvs-milkdown/utils": "^1.2.
|
|
100
|
+
"@jvs-milkdown/kit": "^1.2.2",
|
|
101
|
+
"@jvs-milkdown/prose": "^1.2.2",
|
|
102
|
+
"@jvs-milkdown/utils": "^1.2.2",
|
|
103
103
|
"@types/lodash-es": "^4.17.12",
|
|
104
104
|
"clsx": "^2.0.0",
|
|
105
105
|
"codemirror": "^6.0.1",
|
|
@@ -98,7 +98,9 @@ export const MenuBar = defineComponent({
|
|
|
98
98
|
if (
|
|
99
99
|
showMenu.value &&
|
|
100
100
|
containerRef.value &&
|
|
101
|
-
!containerRef.value.contains(e.target as Node)
|
|
101
|
+
!containerRef.value.contains(e.target as Node) &&
|
|
102
|
+
mainRef.value &&
|
|
103
|
+
!mainRef.value.contains(e.target as Node)
|
|
102
104
|
) {
|
|
103
105
|
showMenu.value = false
|
|
104
106
|
activeSubmenu.value = null
|
|
@@ -225,6 +227,11 @@ export const MenuBar = defineComponent({
|
|
|
225
227
|
<div
|
|
226
228
|
key={menuKey}
|
|
227
229
|
onMouseenter={() => onMouseEnterItem(menuKey)}
|
|
230
|
+
onMouseleave={() => {
|
|
231
|
+
if (hasSubmenu(menuKey)) {
|
|
232
|
+
activeSubmenu.value = null
|
|
233
|
+
}
|
|
234
|
+
}}
|
|
228
235
|
style={{
|
|
229
236
|
position: 'relative',
|
|
230
237
|
padding: '8px 16px',
|
|
@@ -153,11 +153,15 @@
|
|
|
153
153
|
margin: 4px 0;
|
|
154
154
|
display: block;
|
|
155
155
|
position: relative;
|
|
156
|
-
|
|
156
|
+
|
|
157
|
+
&:hover {
|
|
158
|
+
z-index: 120;
|
|
159
|
+
}
|
|
157
160
|
|
|
158
161
|
& > .image-wrapper {
|
|
159
162
|
position: relative;
|
|
160
163
|
width: fit-content;
|
|
164
|
+
max-width: 100%;
|
|
161
165
|
margin: 0 auto;
|
|
162
166
|
min-width: 100px;
|
|
163
167
|
}
|
|
@@ -608,7 +612,7 @@
|
|
|
608
612
|
|
|
609
613
|
.crop-box {
|
|
610
614
|
position: absolute;
|
|
611
|
-
border: 2px solid transparent;
|
|
615
|
+
/* border: 2px solid transparent; */
|
|
612
616
|
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
|
|
613
617
|
cursor: move;
|
|
614
618
|
z-index: 2;
|