@maily-to/core 2.0.0-beta.11 → 2.0.0-beta.13

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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_typography = require("../typography-DW7VApAR.cjs");
2
+ const require_typography = require("../typography-D-VnwOSw.cjs");
3
3
  exports.blockquote = require_typography.blockquote;
4
4
  exports.bulletList = require_typography.bulletList;
5
5
  exports.button = require_typography.button;
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_use_maily_editor = require("../use-maily-editor-CByaDhmT.cjs");
3
- let react_compiler_runtime = require("react/compiler-runtime");
2
+ const require_use_maily_editor = require("../use-maily-editor-Atvy2kSO.cjs");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
5
4
  let lucide_react = require("lucide-react");
6
5
  let _maily_to_shared = require("@maily-to/shared");
@@ -74,27 +73,21 @@ const CollaborationAttributesExtension = _tiptap_core.Extension.create({
74
73
  //#endregion
75
74
  //#region src/extensions/link-card/link-card-view.tsx
76
75
  function LinkCardView(props) {
77
- const $ = (0, react_compiler_runtime.c)(17);
78
76
  const { editor, getPos, node } = props;
79
77
  const { badgeText, description, image, link, linkTitle, subTitle, title } = node.attrs;
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;
78
+ const handleClick = () => {
79
+ if (!editor.isEditable) return;
80
+ const pos = getPos();
81
+ if (pos === void 0) return;
82
+ editor.commands.setNodeSelection(pos);
83
+ };
94
84
  const isEmpty = !(title || description || image);
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, {
85
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tiptap_react.NodeViewWrapper, {
86
+ "data-drag-handle": editor.isEditable,
87
+ "data-mly-link-card": "",
88
+ draggable: editor.isEditable,
89
+ onClick: handleClick,
90
+ children: isEmpty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_maily_editor.ImageState, {
98
91
  icon: lucide_react.SquareArrowOutUpRightIcon,
99
92
  state: "idle",
100
93
  children: "Link Card"
@@ -133,32 +126,8 @@ function LinkCardView(props) {
133
126
  }) : null
134
127
  ]
135
128
  })]
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;
129
+ })] })
130
+ });
162
131
  }
163
132
  //#endregion
164
133
  //#region src/extensions/link-card/link-card.ts