@jvs-milkdown/crepe 1.2.34 → 1.2.35
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 +166 -193
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +172 -199
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/fixed-toolbar/component.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/feature/fixed-toolbar/component.tsx +31 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAGhE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,GAAG,EAMT,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,GAAG,CAAA;AAalD,KAAK,iBAAiB,GAAG;IACvB,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,yBAAyB,CAAA;IAClC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAGhE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,GAAG,EAMT,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,GAAG,CAAA;AAalD,KAAK,iBAAiB,GAAG;IACvB,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,yBAAyB,CAAA;IAClC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,oXAkPhC,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.35",
|
|
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.35",
|
|
111
|
+
"@jvs-milkdown/prose": "^1.2.35",
|
|
112
|
+
"@jvs-milkdown/utils": "^1.2.35",
|
|
113
113
|
"@types/lodash-es": "^4.17.12",
|
|
114
114
|
"clsx": "^2.0.0",
|
|
115
115
|
"codemirror": "^6.0.1",
|
|
@@ -85,66 +85,46 @@ export const FixedToolbarComponent = defineComponent<FixedToolbarProps>({
|
|
|
85
85
|
|
|
86
86
|
if (!viewState.fixedToolbarVisible) {
|
|
87
87
|
return (
|
|
88
|
-
<
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
class="fixed-toolbar-expand-btn"
|
|
91
|
+
title="展开工具栏"
|
|
92
|
+
onClick={(e: MouseEvent) => {
|
|
93
|
+
e.preventDefault()
|
|
94
|
+
e.stopPropagation()
|
|
95
|
+
viewState.fixedToolbarVisible = true
|
|
96
|
+
}}
|
|
89
97
|
style={{
|
|
90
|
-
position: '
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
position: 'absolute',
|
|
99
|
+
top: '0',
|
|
100
|
+
right: '40px',
|
|
93
101
|
display: 'flex',
|
|
94
102
|
alignItems: 'center',
|
|
95
103
|
justifyContent: 'center',
|
|
104
|
+
width: '28px',
|
|
105
|
+
height: '24px',
|
|
106
|
+
border:
|
|
107
|
+
'1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 85%))',
|
|
108
|
+
borderTop: 'none',
|
|
109
|
+
background: 'var(--crepe-color-surface, #ffffff)',
|
|
110
|
+
cursor: 'pointer',
|
|
111
|
+
borderRadius: '0 0 6px 6px',
|
|
112
|
+
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.06)',
|
|
113
|
+
color: 'var(--crepe-color-on-surface, #363b4c)',
|
|
114
|
+
pointerEvents: 'auto',
|
|
115
|
+
zIndex: 200,
|
|
96
116
|
}}
|
|
97
117
|
>
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
e.preventDefault()
|
|
104
|
-
e.stopPropagation()
|
|
105
|
-
viewState.fixedToolbarVisible = true
|
|
106
|
-
}}
|
|
107
|
-
style={{
|
|
108
|
-
position: 'absolute',
|
|
109
|
-
top: '0',
|
|
110
|
-
right: '40px',
|
|
111
|
-
display: 'flex',
|
|
112
|
-
alignItems: 'center',
|
|
113
|
-
justifyContent: 'center',
|
|
114
|
-
width: '28px',
|
|
115
|
-
height: '24px',
|
|
116
|
-
border:
|
|
117
|
-
'1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 85%))',
|
|
118
|
-
borderTop: 'none',
|
|
119
|
-
background: 'var(--crepe-color-surface, #ffffff)',
|
|
120
|
-
cursor: 'pointer',
|
|
121
|
-
borderRadius: '0 0 6px 6px',
|
|
122
|
-
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.06)',
|
|
123
|
-
color: 'var(--crepe-color-on-surface, #363b4c)',
|
|
124
|
-
pointerEvents: 'auto',
|
|
125
|
-
zIndex: 200,
|
|
126
|
-
}}
|
|
127
|
-
>
|
|
128
|
-
<span
|
|
129
|
-
style={{ display: 'inline-flex', alignItems: 'center' }}
|
|
130
|
-
innerHTML={chevronDownIcon}
|
|
131
|
-
/>
|
|
132
|
-
</button>
|
|
133
|
-
</div>
|
|
118
|
+
<span
|
|
119
|
+
style={{ display: 'inline-flex', alignItems: 'center' }}
|
|
120
|
+
innerHTML={chevronDownIcon}
|
|
121
|
+
/>
|
|
122
|
+
</button>
|
|
134
123
|
)
|
|
135
124
|
}
|
|
136
125
|
|
|
137
126
|
return (
|
|
138
|
-
|
|
139
|
-
style={{
|
|
140
|
-
position: 'relative',
|
|
141
|
-
width: '100%',
|
|
142
|
-
height: '100%',
|
|
143
|
-
display: 'flex',
|
|
144
|
-
alignItems: 'center',
|
|
145
|
-
justifyContent: 'center',
|
|
146
|
-
}}
|
|
147
|
-
>
|
|
127
|
+
<>
|
|
148
128
|
<div
|
|
149
129
|
style={{
|
|
150
130
|
position: 'relative',
|
|
@@ -294,7 +274,7 @@ export const FixedToolbarComponent = defineComponent<FixedToolbarProps>({
|
|
|
294
274
|
innerHTML={chevronDownIcon}
|
|
295
275
|
/>
|
|
296
276
|
</button>
|
|
297
|
-
|
|
277
|
+
</>
|
|
298
278
|
)
|
|
299
279
|
}
|
|
300
280
|
},
|