@jvs-milkdown/crepe 1.2.5 → 1.2.8
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/builder.js +2 -0
- package/lib/cjs/builder.js.map +1 -1
- package/lib/cjs/feature/block-edit/index.js +6 -2
- package/lib/cjs/feature/block-edit/index.js.map +1 -1
- package/lib/cjs/feature/code-mirror/index.js +2 -0
- package/lib/cjs/feature/code-mirror/index.js.map +1 -1
- package/lib/cjs/feature/cursor/index.js +2 -0
- package/lib/cjs/feature/cursor/index.js.map +1 -1
- package/lib/cjs/feature/image-block/index.js +3 -4
- package/lib/cjs/feature/image-block/index.js.map +1 -1
- package/lib/cjs/feature/latex/index.js +2 -0
- package/lib/cjs/feature/latex/index.js.map +1 -1
- package/lib/cjs/feature/link-tooltip/index.js +2 -0
- package/lib/cjs/feature/link-tooltip/index.js.map +1 -1
- package/lib/cjs/feature/list-item/index.js +2 -0
- package/lib/cjs/feature/list-item/index.js.map +1 -1
- package/lib/cjs/feature/placeholder/index.js +4 -1
- package/lib/cjs/feature/placeholder/index.js.map +1 -1
- package/lib/cjs/feature/table/index.js +2 -0
- package/lib/cjs/feature/table/index.js.map +1 -1
- package/lib/cjs/feature/toolbar/index.js +242 -7
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +1243 -967
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/builder.js +2 -0
- package/lib/esm/builder.js.map +1 -1
- package/lib/esm/feature/block-edit/index.js +6 -2
- package/lib/esm/feature/block-edit/index.js.map +1 -1
- package/lib/esm/feature/code-mirror/index.js +2 -0
- package/lib/esm/feature/code-mirror/index.js.map +1 -1
- package/lib/esm/feature/cursor/index.js +2 -0
- package/lib/esm/feature/cursor/index.js.map +1 -1
- package/lib/esm/feature/image-block/index.js +3 -4
- package/lib/esm/feature/image-block/index.js.map +1 -1
- package/lib/esm/feature/latex/index.js +2 -0
- package/lib/esm/feature/latex/index.js.map +1 -1
- package/lib/esm/feature/link-tooltip/index.js +2 -0
- package/lib/esm/feature/link-tooltip/index.js.map +1 -1
- package/lib/esm/feature/list-item/index.js +2 -0
- package/lib/esm/feature/list-item/index.js.map +1 -1
- package/lib/esm/feature/placeholder/index.js +4 -1
- package/lib/esm/feature/placeholder/index.js.map +1 -1
- package/lib/esm/feature/table/index.js +2 -0
- package/lib/esm/feature/table/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +242 -7
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +1314 -1038
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/table.css +11 -7
- package/lib/theme/common/toolbar.css +6 -6
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/locale.d.ts +2 -0
- package/lib/types/core/locale.d.ts.map +1 -1
- package/lib/types/feature/attachment/view/components/attachment-block.d.ts.map +1 -1
- package/lib/types/feature/attachment/view/index.d.ts.map +1 -1
- package/lib/types/feature/block-edit/handle/component.d.ts.map +1 -1
- package/lib/types/feature/block-edit/handle/index.d.ts.map +1 -1
- package/lib/types/feature/block-edit/index.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/api.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/component.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/index.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/component.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/config.d.ts +9 -1
- package/lib/types/feature/fixed-toolbar/config.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/document-header.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/index.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/menu-bar.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/outline-panel.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/shortcut-help-modal.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/view-menu-state.d.ts.map +1 -1
- package/lib/types/feature/index.d.ts +1 -1
- package/lib/types/feature/index.d.ts.map +1 -1
- package/lib/types/feature/latex/inline-tooltip/component.d.ts.map +1 -1
- package/lib/types/feature/latex/inline-tooltip/view.d.ts.map +1 -1
- package/lib/types/feature/loader.d.ts.map +1 -1
- package/lib/types/feature/placeholder/index.d.ts.map +1 -1
- package/lib/types/feature/toolbar/color.d.ts +1 -1
- package/lib/types/feature/toolbar/color.d.ts.map +1 -1
- package/lib/types/feature/toolbar/component.d.ts.map +1 -1
- package/lib/types/feature/toolbar/font.d.ts +1 -1
- package/lib/types/feature/toolbar/highlight-mark.d.ts +1 -1
- package/lib/types/feature/toolbar/index.d.ts.map +1 -1
- package/lib/types/feature/toolbar/underline.d.ts +1 -1
- package/lib/types/icons/crop.d.ts +1 -1
- package/lib/types/icons/crop.d.ts.map +1 -1
- package/lib/types/icons/format-painter.d.ts +2 -0
- package/lib/types/icons/format-painter.d.ts.map +1 -0
- package/lib/types/icons/index.d.ts +1 -0
- package/lib/types/icons/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/core/locale.ts +2 -0
- package/src/feature/attachment/view/components/attachment-block.tsx +12 -7
- package/src/feature/attachment/view/index.ts +1 -0
- package/src/feature/block-edit/handle/component.tsx +5 -4
- package/src/feature/block-edit/handle/index.ts +1 -0
- package/src/feature/block-edit/index.ts +4 -1
- package/src/feature/block-edit/menu/api.ts +6 -1
- package/src/feature/block-edit/menu/component.tsx +49 -46
- package/src/feature/block-edit/menu/index.ts +1 -0
- package/src/feature/fixed-toolbar/component.tsx +3 -2
- package/src/feature/fixed-toolbar/config.ts +201 -146
- package/src/feature/fixed-toolbar/document-header.tsx +22 -12
- package/src/feature/fixed-toolbar/index.ts +2 -1
- package/src/feature/fixed-toolbar/menu-bar.tsx +15 -10
- package/src/feature/fixed-toolbar/outline-panel.tsx +17 -16
- package/src/feature/fixed-toolbar/shortcut-help-modal.tsx +3 -2
- package/src/feature/fixed-toolbar/view-menu-state.ts +1 -0
- package/src/feature/index.ts +2 -2
- package/src/feature/latex/inline-tooltip/component.tsx +3 -2
- package/src/feature/latex/inline-tooltip/view.ts +1 -0
- package/src/feature/loader.ts +1 -1
- package/src/feature/placeholder/index.ts +2 -1
- package/src/feature/toolbar/color.ts +77 -73
- package/src/feature/toolbar/component.tsx +321 -35
- package/src/feature/toolbar/index.ts +1 -0
- package/src/icons/align-center.ts +1 -1
- package/src/icons/bold.ts +1 -1
- package/src/icons/bullet-list.ts +1 -1
- package/src/icons/crop.ts +1 -4
- package/src/icons/divider.ts +1 -1
- package/src/icons/format-painter.ts +5 -0
- package/src/icons/h2.ts +1 -1
- package/src/icons/index.ts +1 -0
- package/src/icons/ordered-list.ts +1 -1
- package/src/icons/quote.ts +1 -1
- package/src/icons/strikethrough.ts +1 -1
- package/src/icons/text.ts +0 -1
- package/src/theme/common/table.css +11 -7
- package/src/theme/common/toolbar.css +6 -6
- package/src/feature/table/test.ts +0 -9
|
@@ -5,4 +5,4 @@ export const strikethroughIcon = `
|
|
|
5
5
|
`
|
|
6
6
|
export const strikethroughIconActive = `
|
|
7
7
|
<svg viewBox="0 0 1024 1024" width="24" height="24"><path d="M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z" fill="#1E6FFF" fill-opacity="0" p-id="51850"></path><path d="M431.296 228.8a216.512 216.512 0 0 1 91.968-15.168c30.848 1.344 60.992 9.6 88.256 24 25.664 13.952 44.864 32.448 56.704 52.672a42.688 42.688 0 0 0 73.6-43.264 230.592 230.592 0 0 0-89.536-84.352 292.928 292.928 0 0 0-124.8-34.24 301.824 301.824 0 0 0-128.448 21.312 246.272 246.272 0 0 0-100.608 73.6 190.08 190.08 0 0 0-42.304 110.976c-0.448 11.712 0.256 23.424 2.048 35.008a42.688 42.688 0 1 0 84.288-13.312 94.272 94.272 0 0 1-1.024-18.368c0.768-20.8 8.576-41.984 23.872-61.248 15.36-19.456 37.888-36.224 65.92-47.616zM170.688 469.312a42.688 42.688 0 0 0 0 85.376h341.44a212.48 212.48 0 0 1 90.24 19.648c11.648 5.44 22.592 12.16 32.704 20.032 11.072 8.576 20.736 18.752 28.8 30.272 12.8 17.92 19.392 39.68 18.752 61.696a105.152 105.152 0 0 1-23.872 61.312c-15.36 19.392-37.888 36.16-65.92 47.552a216.192 216.192 0 0 1-92.032 15.168 207.424 207.424 0 0 1-88.32-24c-25.6-13.952-44.8-32.448-56.704-52.672a42.688 42.688 0 1 0-73.536 43.264c20.672 35.136 51.968 63.936 89.6 84.352a292.928 292.928 0 0 0 124.672 34.24 301.888 301.888 0 0 0 128.512-21.312 246.208 246.208 0 0 0 100.608-73.6c25.6-32.32 40.704-70.592 42.24-110.912a186.112 186.112 0 0 0-33.728-113.408 213.312 213.312 0 0 0-17.024-21.632h136.192a42.688 42.688 0 1 0 0-85.376H170.688z" fill="#1E6FFF" p-id="51851"></path></svg>
|
|
8
|
-
`
|
|
8
|
+
`
|
package/src/icons/text.ts
CHANGED
|
@@ -8,4 +8,3 @@ export const textIconActive = `
|
|
|
8
8
|
<svg viewBox="0 0 1024 1024" width="24"
|
|
9
9
|
height="24"><path d="M113.2544 108.8m46.7968 0l708.352 0q46.7968 0 46.7968 46.7968l0-0.0512q0 46.7968-46.7968 46.7968l-708.352 0q-46.7968 0-46.7968-46.7968l0 0.0512q0-46.7968 46.7968-46.7968Z" fill="#1E6FFF" p-id="51545"></path><path d="M291.4816 821.6576m46.7968 0l351.9488 0q46.7968 0 46.7968 46.7968l0-0.0512q0 46.7968-46.7968 46.7968l-351.9488 0q-46.7968 0-46.7968-46.7968l0 0.0512q0-46.7968 46.7968-46.7968Z" fill="#1E6FFF" p-id="51546"></path><path d="M558.7968 108.8m0 46.7968l0 708.352q0 46.7968-46.7968 46.7968l0.0512 0q-46.7968 0-46.7968-46.7968l0-708.352q0-46.7968 46.7968-46.7968l-0.0512 0q46.7968 0 46.7968 46.7968Z" fill="#1E6FFF" p-id="51547"></path><path d="M202.3424 108.8m0 46.7968l0 84.6336q0 46.7968-46.7968 46.7968l0.0512 0q-46.7968 0-46.7968-46.7968l0-84.6336q0-46.7968 46.7968-46.7968l-0.0512 0q46.7968 0 46.7968 46.7968Z" fill="#1E6FFF" p-id="51548"></path><path d="M915.2 108.8m0 46.7968l0 84.6336q0 46.7968-46.7968 46.7968l0.0512 0q-46.7968 0-46.7968-46.7968l0-84.6336q0-46.7968 46.7968-46.7968l-0.0512 0q46.7968 0 46.7968 46.7968Z" fill="#1E6FFF" p-id="51549"></path></svg>
|
|
10
10
|
`
|
|
11
|
-
|
|
@@ -366,9 +366,11 @@
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
&:hover .col-resize-handle::after {
|
|
369
|
-
background: color-mix(
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
background: color-mix(
|
|
370
|
+
in srgb,
|
|
371
|
+
var(--crepe-color-outline, #c0c5ce),
|
|
372
|
+
transparent 60%
|
|
373
|
+
);
|
|
372
374
|
}
|
|
373
375
|
|
|
374
376
|
.col-resize-handle:hover::after,
|
|
@@ -402,9 +404,11 @@
|
|
|
402
404
|
}
|
|
403
405
|
|
|
404
406
|
&:hover {
|
|
405
|
-
background-color: color-mix(
|
|
406
|
-
|
|
407
|
-
|
|
407
|
+
background-color: color-mix(
|
|
408
|
+
in srgb,
|
|
409
|
+
var(--crepe-color-primary),
|
|
410
|
+
black 10%
|
|
411
|
+
);
|
|
408
412
|
}
|
|
409
413
|
|
|
410
414
|
&:active {
|
|
@@ -494,4 +498,4 @@
|
|
|
494
498
|
display: none;
|
|
495
499
|
}
|
|
496
500
|
}
|
|
497
|
-
}
|
|
501
|
+
}
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
.toolbar-item {
|
|
33
33
|
min-width: 32px;
|
|
34
|
-
height:
|
|
35
|
-
margin:
|
|
34
|
+
height: 30px;
|
|
35
|
+
margin: 4px;
|
|
36
36
|
padding: 4px;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
border-radius: 4px;
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
svg {
|
|
60
60
|
height: 20px;
|
|
61
61
|
width: 20px;
|
|
62
|
-
color: var(--crepe-color-outline);
|
|
63
|
-
fill: var(--crepe-color-outline);
|
|
62
|
+
color: var(--toolbar-icon-color, var(--crepe-color-outline));
|
|
63
|
+
fill: var(--toolbar-icon-color, var(--crepe-color-outline));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&.active {
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
svg {
|
|
151
151
|
height: 20px;
|
|
152
152
|
width: 20px;
|
|
153
|
-
color: var(--crepe-color-outline);
|
|
154
|
-
fill: var(--crepe-color-outline);
|
|
153
|
+
color: var(--toolbar-icon-color, var(--crepe-color-outline));
|
|
154
|
+
fill: var(--toolbar-icon-color, var(--crepe-color-outline));
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
&.active {
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Ctx } from '@jvs-milkdown/ctx';
|
|
2
|
-
import { EditorState } from '@jvs-milkdown/prose/state';
|
|
3
|
-
import { mergeCells, splitCell, CellSelection } from '@jvs-milkdown/prose/tables';
|
|
4
|
-
|
|
5
|
-
export function testMerge(state: EditorState) {
|
|
6
|
-
const canM = mergeCells(state);
|
|
7
|
-
const canS = splitCell(state);
|
|
8
|
-
console.log("canMerge:", canM, "canSplit:", canS);
|
|
9
|
-
}
|