@maily-to/core 2.0.0-beta.8 → 2.0.0-beta.9
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/dist/blocks/index.cjs +1 -1
- package/dist/extensions/index.cjs +46 -15
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +8137 -2944
- package/dist/index.mjs +1 -1
- package/dist/{use-maily-editor-BP6Mt8Nn.cjs → use-maily-editor-Atvy2kSO.cjs} +4 -2
- package/dist/{use-maily-editor-DFuhg38t.cjs → use-maily-editor-CByaDhmT.cjs} +148 -132
- package/dist/{use-maily-editor-xVILP7H8.mjs → use-maily-editor-idL0RNsG.mjs} +148 -132
- package/package.json +4 -4
package/dist/blocks/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_typography = require("../typography-
|
|
2
|
+
const require_typography = require("../typography-DW7VApAR.cjs");
|
|
3
3
|
exports.blockquote = require_typography.blockquote;
|
|
4
4
|
exports.bulletList = require_typography.bulletList;
|
|
5
5
|
exports.button = require_typography.button;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_use_maily_editor = require("../use-maily-editor-
|
|
2
|
+
const require_use_maily_editor = require("../use-maily-editor-CByaDhmT.cjs");
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
5
|
let lucide_react = require("lucide-react");
|
|
5
6
|
let _maily_to_shared = require("@maily-to/shared");
|
|
@@ -73,21 +74,27 @@ const CollaborationAttributesExtension = _tiptap_core.Extension.create({
|
|
|
73
74
|
//#endregion
|
|
74
75
|
//#region src/extensions/link-card/link-card-view.tsx
|
|
75
76
|
function LinkCardView(props) {
|
|
77
|
+
const $ = (0, react_compiler_runtime.c)(17);
|
|
76
78
|
const { editor, getPos, node } = props;
|
|
77
79
|
const { badgeText, description, image, link, linkTitle, subTitle, title } = node.attrs;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
let t0;
|
|
81
|
+
if ($[0] !== editor.commands || $[1] !== editor.isEditable || $[2] !== getPos) {
|
|
82
|
+
t0 = () => {
|
|
83
|
+
if (!editor.isEditable) return;
|
|
84
|
+
const pos = getPos();
|
|
85
|
+
if (pos === void 0) return;
|
|
86
|
+
editor.commands.setNodeSelection(pos);
|
|
87
|
+
};
|
|
88
|
+
$[0] = editor.commands;
|
|
89
|
+
$[1] = editor.isEditable;
|
|
90
|
+
$[2] = getPos;
|
|
91
|
+
$[3] = t0;
|
|
92
|
+
} else t0 = $[3];
|
|
93
|
+
const handleClick = t0;
|
|
84
94
|
const isEmpty = !(title || description || image);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
draggable: editor.isEditable,
|
|
89
|
-
onClick: handleClick,
|
|
90
|
-
children: isEmpty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_maily_editor.ImageState, {
|
|
95
|
+
let t1;
|
|
96
|
+
if ($[4] !== badgeText || $[5] !== description || $[6] !== image || $[7] !== isEmpty || $[8] !== link || $[9] !== linkTitle || $[10] !== subTitle || $[11] !== title) {
|
|
97
|
+
t1 = isEmpty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_maily_editor.ImageState, {
|
|
91
98
|
icon: lucide_react.SquareArrowOutUpRightIcon,
|
|
92
99
|
state: "idle",
|
|
93
100
|
children: "Link Card"
|
|
@@ -126,8 +133,32 @@ function LinkCardView(props) {
|
|
|
126
133
|
}) : null
|
|
127
134
|
]
|
|
128
135
|
})]
|
|
129
|
-
})] })
|
|
130
|
-
|
|
136
|
+
})] });
|
|
137
|
+
$[4] = badgeText;
|
|
138
|
+
$[5] = description;
|
|
139
|
+
$[6] = image;
|
|
140
|
+
$[7] = isEmpty;
|
|
141
|
+
$[8] = link;
|
|
142
|
+
$[9] = linkTitle;
|
|
143
|
+
$[10] = subTitle;
|
|
144
|
+
$[11] = title;
|
|
145
|
+
$[12] = t1;
|
|
146
|
+
} else t1 = $[12];
|
|
147
|
+
let t2;
|
|
148
|
+
if ($[13] !== editor.isEditable || $[14] !== handleClick || $[15] !== t1) {
|
|
149
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tiptap_react.NodeViewWrapper, {
|
|
150
|
+
"data-drag-handle": editor.isEditable,
|
|
151
|
+
"data-mly-link-card": "",
|
|
152
|
+
draggable: editor.isEditable,
|
|
153
|
+
onClick: handleClick,
|
|
154
|
+
children: t1
|
|
155
|
+
});
|
|
156
|
+
$[13] = editor.isEditable;
|
|
157
|
+
$[14] = handleClick;
|
|
158
|
+
$[15] = t1;
|
|
159
|
+
$[16] = t2;
|
|
160
|
+
} else t2 = $[16];
|
|
161
|
+
return t2;
|
|
131
162
|
}
|
|
132
163
|
//#endregion
|
|
133
164
|
//#region src/extensions/link-card/link-card.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ProtectVariableTrigger, C as ContainerExtension, D as BodyExtension, E as setStyleDeclarations, J as getMergedNodeTheme, M as VisibilityExtension, N as ColumnsExtension, O as BlockquoteExtension, P as ColumnExtension, Q as getThemeCss, S as FooterExtension, T as BoldExtension, U as VariableExtension, Z as getShellNodes, _ as ALLOWED_IMAGE_MIME_TYPES, a as STYLE_SUPPORTED_TYPES, b as HtmlCodeBlockExtension, c as SpacerExtension, d as SectionExtension, f as InlineSpanExtension, h as ImageState, j as VISIBILITY_SUPPORTED_TYPES, l as SlashCommandExtension, m as ImageExtension, o as StyleExtension, p as InlineImageExtension, r as getNormalizedHtml, s as SpanExtension, t as DEFAULT_EXTENSIONS, u as DEFAULT_SLASH_COMMANDS, v as IMAGE_UPLOAD_STATUSES, w as ButtonExtension, x as HorizontalRuleExtension, y as ImageUploadExtension } from "../use-maily-editor-
|
|
1
|
+
import { A as ProtectVariableTrigger, C as ContainerExtension, D as BodyExtension, E as setStyleDeclarations, J as getMergedNodeTheme, M as VisibilityExtension, N as ColumnsExtension, O as BlockquoteExtension, P as ColumnExtension, Q as getThemeCss, S as FooterExtension, T as BoldExtension, U as VariableExtension, Z as getShellNodes, _ as ALLOWED_IMAGE_MIME_TYPES, a as STYLE_SUPPORTED_TYPES, b as HtmlCodeBlockExtension, c as SpacerExtension, d as SectionExtension, f as InlineSpanExtension, h as ImageState, j as VISIBILITY_SUPPORTED_TYPES, l as SlashCommandExtension, m as ImageExtension, o as StyleExtension, p as InlineImageExtension, r as getNormalizedHtml, s as SpanExtension, t as DEFAULT_EXTENSIONS, u as DEFAULT_SLASH_COMMANDS, v as IMAGE_UPLOAD_STATUSES, w as ButtonExtension, x as HorizontalRuleExtension, y as ImageUploadExtension } from "../use-maily-editor-idL0RNsG.mjs";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { SquareArrowOutUpRightIcon } from "lucide-react";
|