@jvs-milkdown/crepe 1.2.25 → 1.2.27
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/block-edit/index.js +3 -3
- package/lib/cjs/feature/block-edit/index.js.map +1 -1
- package/lib/cjs/feature/toolbar/index.js +1 -1
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/index.js +420 -6
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/feature/block-edit/index.js +3 -3
- package/lib/esm/feature/block-edit/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +1 -1
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/index.js +421 -7
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/block-edit.css +5 -3
- package/lib/theme/common/code-mirror.css +19 -0
- package/lib/theme/common/link-tooltip.css +2 -2
- package/lib/theme/common/toolbar.css +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/default-config/index.d.ts.map +1 -1
- package/lib/types/feature/block-edit/handle/index.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/component.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/config.d.ts.map +1 -1
- package/lib/types/feature/fixed-toolbar/index.d.ts +2 -0
- package/lib/types/feature/fixed-toolbar/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/default-config/default-config.spec.ts +15 -0
- package/src/default-config/index.ts +17 -1
- package/src/feature/block-edit/handle/index.ts +8 -2
- package/src/feature/block-edit/menu/component.tsx +4 -1
- package/src/feature/fixed-toolbar/config.ts +482 -3
- package/src/feature/fixed-toolbar/index.ts +2 -0
- package/src/theme/common/block-edit.css +5 -3
- package/src/theme/common/code-mirror.css +19 -0
- package/src/theme/common/link-tooltip.css +2 -2
- package/src/theme/common/toolbar.css +1 -1
|
@@ -2539,7 +2539,7 @@ vue.defineComponent({
|
|
|
2539
2539
|
const isTableBlock = (node == null ? void 0 : node.type.name) === "table";
|
|
2540
2540
|
const isMedia = ((_a = node == null ? void 0 : node.type.name) == null ? void 0 : _a.includes("image")) || isAttachmentBlock || isImageParagraph || (node == null ? void 0 : node.type.name) === "hr" || isTableBlock;
|
|
2541
2541
|
const showAlign = !isMedia || isImageBlock;
|
|
2542
|
-
const isEmpty = node ? node.textContent.length === 0 && node.content.size <= 2 && !isMedia : false;
|
|
2542
|
+
const isEmpty = node ? node.type.name === "paragraph" && node.textContent.length === 0 && node.content.size <= 2 && !isMedia : false;
|
|
2543
2543
|
const currentAlign = ((_b = node == null ? void 0 : node.attrs) == null ? void 0 : _b.align) || "left";
|
|
2544
2544
|
const currentIndent = ((_c = node == null ? void 0 : node.attrs) == null ? void 0 : _c.indent) || 0;
|
|
2545
2545
|
const setAlign = (alignValue) => {
|