@daisychainapp/maily-to-core 0.2.11 → 0.2.12
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/extensions/index.cjs +460 -614
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +403 -557
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +92 -182
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +121 -211
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2092,6 +2092,51 @@ function HTMLBubbleMenu(props) {
|
|
|
2092
2092
|
);
|
|
2093
2093
|
}
|
|
2094
2094
|
|
|
2095
|
+
// src/editor/utils/aspect-ratio.ts
|
|
2096
|
+
function getAspectRatio(width, height) {
|
|
2097
|
+
return width / height;
|
|
2098
|
+
}
|
|
2099
|
+
function getNewHeight(width, aspectRatio) {
|
|
2100
|
+
if (width <= 0 || aspectRatio <= 0) {
|
|
2101
|
+
return 0;
|
|
2102
|
+
}
|
|
2103
|
+
return width / aspectRatio;
|
|
2104
|
+
}
|
|
2105
|
+
function getNewWidth(height, aspectRatio) {
|
|
2106
|
+
return height * aspectRatio;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
// src/editor/utils/border-radius.ts
|
|
2110
|
+
var borderRadius = [
|
|
2111
|
+
{
|
|
2112
|
+
name: "Sharp",
|
|
2113
|
+
value: 0
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
name: "Smooth",
|
|
2117
|
+
value: 8
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
name: "Smoother",
|
|
2121
|
+
value: 16
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
name: "Rounded",
|
|
2125
|
+
value: 24
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
name: "Circle",
|
|
2129
|
+
value: 9999
|
|
2130
|
+
}
|
|
2131
|
+
];
|
|
2132
|
+
|
|
2133
|
+
// src/editor/components/image-menu/image-bubble-menu.tsx
|
|
2134
|
+
import { BubbleMenu as BubbleMenu3 } from "@tiptap/react";
|
|
2135
|
+
import { LockIcon, LockOpenIcon } from "lucide-react";
|
|
2136
|
+
|
|
2137
|
+
// src/editor/components/alignment-switch.tsx
|
|
2138
|
+
import { AlignCenter as AlignCenter2, AlignLeft as AlignLeft2, AlignRight as AlignRight2 } from "lucide-react";
|
|
2139
|
+
|
|
2095
2140
|
// src/editor/nodes/logo/logo.ts
|
|
2096
2141
|
import TiptapImage from "@tiptap/extension-image";
|
|
2097
2142
|
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
@@ -2559,24 +2604,10 @@ var useEvent = (handler) => {
|
|
|
2559
2604
|
}, []);
|
|
2560
2605
|
};
|
|
2561
2606
|
|
|
2562
|
-
// src/editor/utils/aspect-ratio.ts
|
|
2563
|
-
function getAspectRatio(width, height) {
|
|
2564
|
-
return width / height;
|
|
2565
|
-
}
|
|
2566
|
-
function getNewHeight(width, aspectRatio) {
|
|
2567
|
-
if (width <= 0 || aspectRatio <= 0) {
|
|
2568
|
-
return 0;
|
|
2569
|
-
}
|
|
2570
|
-
return width / aspectRatio;
|
|
2571
|
-
}
|
|
2572
|
-
function getNewWidth(height, aspectRatio) {
|
|
2573
|
-
return height * aspectRatio;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
2607
|
// src/editor/nodes/image/image-view.tsx
|
|
2577
2608
|
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2578
2609
|
var MIN_WIDTH = 20;
|
|
2579
|
-
var
|
|
2610
|
+
var IMAGE_MAX_WIDTH2 = 600;
|
|
2580
2611
|
var IMAGE_MAX_HEIGHT = 400;
|
|
2581
2612
|
function ImageView(props) {
|
|
2582
2613
|
const { node, updateAttributes: updateAttributes2, selected, editor } = props;
|
|
@@ -2597,7 +2628,7 @@ function ImageView(props) {
|
|
|
2597
2628
|
}
|
|
2598
2629
|
const imageParentWidth = Math.max(
|
|
2599
2630
|
imageParent.offsetWidth,
|
|
2600
|
-
|
|
2631
|
+
IMAGE_MAX_WIDTH2
|
|
2601
2632
|
);
|
|
2602
2633
|
event.preventDefault();
|
|
2603
2634
|
const direction = event.currentTarget.dataset.direction || "--";
|
|
@@ -3213,37 +3244,7 @@ var LogoExtension = TiptapImage.extend({
|
|
|
3213
3244
|
}
|
|
3214
3245
|
});
|
|
3215
3246
|
|
|
3216
|
-
// src/editor/utils/border-radius.ts
|
|
3217
|
-
var borderRadius = [
|
|
3218
|
-
{
|
|
3219
|
-
name: "Sharp",
|
|
3220
|
-
value: 0
|
|
3221
|
-
},
|
|
3222
|
-
{
|
|
3223
|
-
name: "Smooth",
|
|
3224
|
-
value: 8
|
|
3225
|
-
},
|
|
3226
|
-
{
|
|
3227
|
-
name: "Smoother",
|
|
3228
|
-
value: 16
|
|
3229
|
-
},
|
|
3230
|
-
{
|
|
3231
|
-
name: "Rounded",
|
|
3232
|
-
value: 24
|
|
3233
|
-
},
|
|
3234
|
-
{
|
|
3235
|
-
name: "Circle",
|
|
3236
|
-
value: 9999
|
|
3237
|
-
}
|
|
3238
|
-
];
|
|
3239
|
-
|
|
3240
|
-
// src/editor/components/image-menu/image-bubble-menu.tsx
|
|
3241
|
-
import { BubbleMenu as BubbleMenu3 } from "@tiptap/react";
|
|
3242
|
-
import { ImageDown, LockIcon, LockOpenIcon } from "lucide-react";
|
|
3243
|
-
import { sticky as sticky3 } from "tippy.js";
|
|
3244
|
-
|
|
3245
3247
|
// src/editor/components/alignment-switch.tsx
|
|
3246
|
-
import { AlignCenter as AlignCenter2, AlignLeft as AlignLeft2, AlignRight as AlignRight2 } from "lucide-react";
|
|
3247
3248
|
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3248
3249
|
function AlignmentSwitch(props) {
|
|
3249
3250
|
const { alignment: rawAlignment, onAlignmentChange } = props;
|
|
@@ -4862,9 +4863,10 @@ var useImageState = (editor) => {
|
|
|
4862
4863
|
};
|
|
4863
4864
|
|
|
4864
4865
|
// src/editor/components/image-menu/image-bubble-menu.tsx
|
|
4866
|
+
import { sticky as sticky3 } from "tippy.js";
|
|
4865
4867
|
import { Fragment as Fragment4, jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4866
4868
|
function ImageBubbleMenu(props) {
|
|
4867
|
-
var _a, _b, _c
|
|
4869
|
+
var _a, _b, _c;
|
|
4868
4870
|
const { editor, appendTo } = props;
|
|
4869
4871
|
if (!editor) {
|
|
4870
4872
|
return null;
|
|
@@ -4925,33 +4927,10 @@ function ImageBubbleMenu(props) {
|
|
|
4925
4927
|
}
|
|
4926
4928
|
}
|
|
4927
4929
|
),
|
|
4928
|
-
/* @__PURE__ */ jsx37(
|
|
4929
|
-
LinkInputPopover,
|
|
4930
|
-
{
|
|
4931
|
-
defaultValue: (_a = state == null ? void 0 : state.imageSrc) != null ? _a : "",
|
|
4932
|
-
onValueChange: (value, isVariable) => {
|
|
4933
|
-
if (state.isLogoActive) {
|
|
4934
|
-
editor == null ? void 0 : editor.chain().setLogoAttributes({
|
|
4935
|
-
src: value,
|
|
4936
|
-
isSrcVariable: isVariable != null ? isVariable : false
|
|
4937
|
-
}).run();
|
|
4938
|
-
} else {
|
|
4939
|
-
editor == null ? void 0 : editor.chain().updateAttributes("image", {
|
|
4940
|
-
src: value,
|
|
4941
|
-
isSrcVariable: isVariable != null ? isVariable : false
|
|
4942
|
-
}).run();
|
|
4943
|
-
}
|
|
4944
|
-
},
|
|
4945
|
-
tooltip: "Source URL",
|
|
4946
|
-
icon: ImageDown,
|
|
4947
|
-
editor,
|
|
4948
|
-
isVariable: state.isSrcVariable
|
|
4949
|
-
}
|
|
4950
|
-
),
|
|
4951
4930
|
state.isImageActive && /* @__PURE__ */ jsx37(
|
|
4952
4931
|
LinkInputPopover,
|
|
4953
4932
|
{
|
|
4954
|
-
defaultValue: (
|
|
4933
|
+
defaultValue: (_a = state == null ? void 0 : state.imageExternalLink) != null ? _a : "",
|
|
4955
4934
|
onValueChange: (value, isVariable) => {
|
|
4956
4935
|
editor == null ? void 0 : editor.chain().updateAttributes("image", {
|
|
4957
4936
|
externalLink: value,
|
|
@@ -4989,7 +4968,7 @@ function ImageBubbleMenu(props) {
|
|
|
4989
4968
|
ImageSize,
|
|
4990
4969
|
{
|
|
4991
4970
|
dimension: "width",
|
|
4992
|
-
value: (
|
|
4971
|
+
value: (_b = state == null ? void 0 : state.width) != null ? _b : "",
|
|
4993
4972
|
onValueChange: (value) => {
|
|
4994
4973
|
const width = Math.min(Number(value) || 0, IMAGE_MAX_WIDTH);
|
|
4995
4974
|
const currentHeight = Number(state.height) || 0;
|
|
@@ -5009,7 +4988,7 @@ function ImageBubbleMenu(props) {
|
|
|
5009
4988
|
ImageSize,
|
|
5010
4989
|
{
|
|
5011
4990
|
dimension: "height",
|
|
5012
|
-
value: (
|
|
4991
|
+
value: (_c = state == null ? void 0 : state.height) != null ? _c : "",
|
|
5013
4992
|
onValueChange: (value) => {
|
|
5014
4993
|
const height = Number(value) || 0;
|
|
5015
4994
|
const currentHeight = Number(state.height) || 0;
|
|
@@ -5043,20 +5022,7 @@ function ImageBubbleMenu(props) {
|
|
|
5043
5022
|
}
|
|
5044
5023
|
)
|
|
5045
5024
|
] })
|
|
5046
|
-
] })
|
|
5047
|
-
/* @__PURE__ */ jsx37(Divider, {}),
|
|
5048
|
-
/* @__PURE__ */ jsx37(
|
|
5049
|
-
ShowPopover,
|
|
5050
|
-
{
|
|
5051
|
-
showIfKey: state.currentShowIfKey,
|
|
5052
|
-
onShowIfKeyValueChange: (value) => {
|
|
5053
|
-
editor == null ? void 0 : editor.chain().updateAttributes(state.isLogoActive ? "logo" : "image", {
|
|
5054
|
-
showIfKey: value
|
|
5055
|
-
}).run();
|
|
5056
|
-
},
|
|
5057
|
-
editor
|
|
5058
|
-
}
|
|
5059
|
-
)
|
|
5025
|
+
] })
|
|
5060
5026
|
] })
|
|
5061
5027
|
})
|
|
5062
5028
|
);
|
|
@@ -5203,10 +5169,9 @@ var useInlineImageState = (editor) => {
|
|
|
5203
5169
|
};
|
|
5204
5170
|
|
|
5205
5171
|
// src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
|
|
5206
|
-
import { ImageDownIcon } from "lucide-react";
|
|
5207
5172
|
import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5208
5173
|
function InlineImageBubbleMenu(props) {
|
|
5209
|
-
var _a
|
|
5174
|
+
var _a;
|
|
5210
5175
|
const { editor, appendTo } = props;
|
|
5211
5176
|
if (!editor) {
|
|
5212
5177
|
return null;
|
|
@@ -5236,23 +5201,7 @@ function InlineImageBubbleMenu(props) {
|
|
|
5236
5201
|
/* @__PURE__ */ jsx38(
|
|
5237
5202
|
LinkInputPopover,
|
|
5238
5203
|
{
|
|
5239
|
-
defaultValue: (_a = state == null ? void 0 : state.
|
|
5240
|
-
onValueChange: (value, isVariable) => {
|
|
5241
|
-
editor == null ? void 0 : editor.chain().updateAttributes("inlineImage", {
|
|
5242
|
-
src: value,
|
|
5243
|
-
isSrcVariable: isVariable != null ? isVariable : false
|
|
5244
|
-
}).run();
|
|
5245
|
-
},
|
|
5246
|
-
tooltip: "Source URL",
|
|
5247
|
-
icon: ImageDownIcon,
|
|
5248
|
-
editor,
|
|
5249
|
-
isVariable: state.isSrcVariable
|
|
5250
|
-
}
|
|
5251
|
-
),
|
|
5252
|
-
/* @__PURE__ */ jsx38(
|
|
5253
|
-
LinkInputPopover,
|
|
5254
|
-
{
|
|
5255
|
-
defaultValue: (_b = state == null ? void 0 : state.imageExternalLink) != null ? _b : "",
|
|
5204
|
+
defaultValue: (_a = state == null ? void 0 : state.imageExternalLink) != null ? _a : "",
|
|
5256
5205
|
onValueChange: (value, isVariable) => {
|
|
5257
5206
|
editor == null ? void 0 : editor.chain().updateAttributes("inlineImage", {
|
|
5258
5207
|
externalLink: value,
|
|
@@ -5911,19 +5860,6 @@ function SectionBubbleMenu(props) {
|
|
|
5911
5860
|
}
|
|
5912
5861
|
}
|
|
5913
5862
|
),
|
|
5914
|
-
/* @__PURE__ */ jsx44(Divider, {}),
|
|
5915
|
-
/* @__PURE__ */ jsx44(
|
|
5916
|
-
ShowPopover,
|
|
5917
|
-
{
|
|
5918
|
-
showIfKey: state.currentShowIfKey,
|
|
5919
|
-
onShowIfKeyValueChange: (value) => {
|
|
5920
|
-
editor.commands.updateSection({
|
|
5921
|
-
showIfKey: value
|
|
5922
|
-
});
|
|
5923
|
-
},
|
|
5924
|
-
editor
|
|
5925
|
-
}
|
|
5926
|
-
),
|
|
5927
5863
|
state.isColumnsActive && /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
5928
5864
|
/* @__PURE__ */ jsx44(Divider, {}),
|
|
5929
5865
|
/* @__PURE__ */ jsxs24(Popover, { children: [
|
|
@@ -5976,7 +5912,7 @@ var useSpacerState = (editor) => {
|
|
|
5976
5912
|
|
|
5977
5913
|
// src/editor/components/spacer-menu/spacer-bubble-menu.tsx
|
|
5978
5914
|
import { useMemo as useMemo8 } from "react";
|
|
5979
|
-
import { jsx as jsx45
|
|
5915
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
5980
5916
|
function SpacerBubbleMenu(props) {
|
|
5981
5917
|
const { editor, appendTo } = props;
|
|
5982
5918
|
if (!editor) {
|
|
@@ -6012,28 +5948,15 @@ function SpacerBubbleMenu(props) {
|
|
|
6012
5948
|
BubbleMenu7,
|
|
6013
5949
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
6014
5950
|
className: "mly-flex mly-gap-0.5 mly-rounded-lg mly-border mly-border-gray-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
6015
|
-
children: /* @__PURE__ */
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
)),
|
|
6025
|
-
/* @__PURE__ */ jsx45(Divider, {}),
|
|
6026
|
-
/* @__PURE__ */ jsx45(
|
|
6027
|
-
ShowPopover,
|
|
6028
|
-
{
|
|
6029
|
-
showIfKey: state.currentShowIfKey,
|
|
6030
|
-
onShowIfKeyValueChange: (value) => {
|
|
6031
|
-
editor.commands.setSpacerShowIfKey(value);
|
|
6032
|
-
},
|
|
6033
|
-
editor
|
|
6034
|
-
}
|
|
6035
|
-
)
|
|
6036
|
-
] })
|
|
5951
|
+
children: /* @__PURE__ */ jsx45(TooltipProvider, { children: items.map((item, index) => /* @__PURE__ */ jsx45(
|
|
5952
|
+
BubbleMenuButton,
|
|
5953
|
+
__spreadValues({
|
|
5954
|
+
className: "!mly-h-7 mly-w-7 mly-shrink-0 mly-p-0",
|
|
5955
|
+
iconClassName: "mly-w-3 mly-h-3",
|
|
5956
|
+
nameClassName: "mly-text-xs"
|
|
5957
|
+
}, item),
|
|
5958
|
+
index
|
|
5959
|
+
)) })
|
|
6037
5960
|
})
|
|
6038
5961
|
);
|
|
6039
5962
|
}
|
|
@@ -6308,7 +6231,7 @@ var Textarea = React6.forwardRef(
|
|
|
6308
6231
|
Textarea.displayName = "Textarea";
|
|
6309
6232
|
|
|
6310
6233
|
// src/editor/nodes/link-card.tsx
|
|
6311
|
-
import { jsx as jsx48, jsxs as
|
|
6234
|
+
import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6312
6235
|
function LinkCardComponent(props) {
|
|
6313
6236
|
const { title, description, link, linkTitle, image: image2, badgeText, subTitle } = props.node.attrs;
|
|
6314
6237
|
const { getPos, editor } = props;
|
|
@@ -6318,7 +6241,7 @@ function LinkCardComponent(props) {
|
|
|
6318
6241
|
className: `react-component ${props.selected && "ProseMirror-selectednode"}`,
|
|
6319
6242
|
draggable: editor.isEditable,
|
|
6320
6243
|
"data-drag-handle": editor.isEditable,
|
|
6321
|
-
children: /* @__PURE__ */
|
|
6244
|
+
children: /* @__PURE__ */ jsxs25(Popover, { open: props.selected, children: [
|
|
6322
6245
|
/* @__PURE__ */ jsx48(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx48(
|
|
6323
6246
|
"div",
|
|
6324
6247
|
{
|
|
@@ -6328,7 +6251,7 @@ function LinkCardComponent(props) {
|
|
|
6328
6251
|
const pos = getPos();
|
|
6329
6252
|
editor.commands.setNodeSelection(pos);
|
|
6330
6253
|
},
|
|
6331
|
-
children: /* @__PURE__ */
|
|
6254
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "mly-no-prose mly-flex mly-flex-col mly-rounded-lg mly-border mly-border-gray-300", children: [
|
|
6332
6255
|
image2 && /* @__PURE__ */ jsx48("div", { className: "mly-relative mly-mb-1.5 mly-w-full mly-shrink-0", children: /* @__PURE__ */ jsx48(
|
|
6333
6256
|
"img",
|
|
6334
6257
|
{
|
|
@@ -6338,14 +6261,14 @@ function LinkCardComponent(props) {
|
|
|
6338
6261
|
draggable: editor.isEditable
|
|
6339
6262
|
}
|
|
6340
6263
|
) }),
|
|
6341
|
-
/* @__PURE__ */ jsx48("div", { className: "mly-flex mly-items-stretch mly-p-3", children: /* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6264
|
+
/* @__PURE__ */ jsx48("div", { className: "mly-flex mly-items-stretch mly-p-3", children: /* @__PURE__ */ jsxs25("div", { className: cn("mly-flex mly-flex-col"), children: [
|
|
6265
|
+
/* @__PURE__ */ jsxs25("div", { className: "!mly-mb-1.5 mly-flex mly-items-center mly-gap-1.5", children: [
|
|
6343
6266
|
/* @__PURE__ */ jsx48("h2", { className: "!mly-mb-0 !mly-text-lg mly-font-semibold", children: title }),
|
|
6344
6267
|
badgeText && /* @__PURE__ */ jsx48("span", { className: "!mly-font-base text-xs mly-rounded-md mly-bg-yellow-200 mly-px-2 mly-py-1 mly-font-semibold mly-leading-none", children: badgeText }),
|
|
6345
6268
|
" ",
|
|
6346
6269
|
subTitle && !badgeText && /* @__PURE__ */ jsx48("span", { className: "!mly-font-base text-xs mly-font-regular mly-rounded-md mly-leading-none mly-text-gray-400", children: subTitle })
|
|
6347
6270
|
] }),
|
|
6348
|
-
/* @__PURE__ */
|
|
6271
|
+
/* @__PURE__ */ jsxs25("p", { className: "!mly-my-0 !mly-text-base mly-text-gray-500", children: [
|
|
6349
6272
|
description,
|
|
6350
6273
|
" ",
|
|
6351
6274
|
linkTitle ? /* @__PURE__ */ jsx48("a", { href: link, className: "mly-font-semibold", children: linkTitle }) : null
|
|
@@ -6354,7 +6277,7 @@ function LinkCardComponent(props) {
|
|
|
6354
6277
|
] })
|
|
6355
6278
|
}
|
|
6356
6279
|
) }),
|
|
6357
|
-
/* @__PURE__ */
|
|
6280
|
+
/* @__PURE__ */ jsxs25(
|
|
6358
6281
|
PopoverContent,
|
|
6359
6282
|
{
|
|
6360
6283
|
align: "end",
|
|
@@ -6363,7 +6286,7 @@ function LinkCardComponent(props) {
|
|
|
6363
6286
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6364
6287
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
6365
6288
|
children: [
|
|
6366
|
-
/* @__PURE__ */
|
|
6289
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6367
6290
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Image" }),
|
|
6368
6291
|
/* @__PURE__ */ jsx48(
|
|
6369
6292
|
Input,
|
|
@@ -6379,7 +6302,7 @@ function LinkCardComponent(props) {
|
|
|
6379
6302
|
}
|
|
6380
6303
|
)
|
|
6381
6304
|
] }),
|
|
6382
|
-
/* @__PURE__ */
|
|
6305
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6383
6306
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Title" }),
|
|
6384
6307
|
/* @__PURE__ */ jsx48(
|
|
6385
6308
|
Input,
|
|
@@ -6394,7 +6317,7 @@ function LinkCardComponent(props) {
|
|
|
6394
6317
|
}
|
|
6395
6318
|
)
|
|
6396
6319
|
] }),
|
|
6397
|
-
/* @__PURE__ */
|
|
6320
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6398
6321
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Description" }),
|
|
6399
6322
|
/* @__PURE__ */ jsx48(
|
|
6400
6323
|
Textarea,
|
|
@@ -6409,8 +6332,8 @@ function LinkCardComponent(props) {
|
|
|
6409
6332
|
}
|
|
6410
6333
|
)
|
|
6411
6334
|
] }),
|
|
6412
|
-
/* @__PURE__ */
|
|
6413
|
-
/* @__PURE__ */
|
|
6335
|
+
/* @__PURE__ */ jsxs25("div", { className: "mly-grid mly-grid-cols-2 mly-gap-2", children: [
|
|
6336
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6414
6337
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Link Title" }),
|
|
6415
6338
|
/* @__PURE__ */ jsx48(
|
|
6416
6339
|
Input,
|
|
@@ -6425,7 +6348,7 @@ function LinkCardComponent(props) {
|
|
|
6425
6348
|
}
|
|
6426
6349
|
)
|
|
6427
6350
|
] }),
|
|
6428
|
-
/* @__PURE__ */
|
|
6351
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6429
6352
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Link" }),
|
|
6430
6353
|
/* @__PURE__ */ jsx48(
|
|
6431
6354
|
Input,
|
|
@@ -6441,8 +6364,8 @@ function LinkCardComponent(props) {
|
|
|
6441
6364
|
)
|
|
6442
6365
|
] })
|
|
6443
6366
|
] }),
|
|
6444
|
-
/* @__PURE__ */
|
|
6445
|
-
/* @__PURE__ */
|
|
6367
|
+
/* @__PURE__ */ jsxs25("div", { className: "mly-grid mly-grid-cols-2 mly-gap-2", children: [
|
|
6368
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6446
6369
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Badge Text" }),
|
|
6447
6370
|
/* @__PURE__ */ jsx48(
|
|
6448
6371
|
Input,
|
|
@@ -6457,7 +6380,7 @@ function LinkCardComponent(props) {
|
|
|
6457
6380
|
}
|
|
6458
6381
|
)
|
|
6459
6382
|
] }),
|
|
6460
|
-
/* @__PURE__ */
|
|
6383
|
+
/* @__PURE__ */ jsxs25("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
6461
6384
|
/* @__PURE__ */ jsx48("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Sub Title" }),
|
|
6462
6385
|
/* @__PURE__ */ jsx48(
|
|
6463
6386
|
Input,
|
|
@@ -6562,7 +6485,7 @@ import { useMemo as useMemo10 } from "react";
|
|
|
6562
6485
|
|
|
6563
6486
|
// src/editor/nodes/button/button-label-input.tsx
|
|
6564
6487
|
import { useMemo as useMemo9, useRef as useRef9, useState as useState9 } from "react";
|
|
6565
|
-
import { jsx as jsx49, jsxs as
|
|
6488
|
+
import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6566
6489
|
function ButtonLabelInput(props) {
|
|
6567
6490
|
var _a, _b;
|
|
6568
6491
|
const { value, onValueChange, isVariable, editor } = props;
|
|
@@ -6584,7 +6507,7 @@ function ButtonLabelInput(props) {
|
|
|
6584
6507
|
editor
|
|
6585
6508
|
}).map((variable) => variable.name);
|
|
6586
6509
|
}, [variables, value, editor]);
|
|
6587
|
-
return /* @__PURE__ */
|
|
6510
|
+
return /* @__PURE__ */ jsxs26("div", { className: "mly-isolate mly-flex mly-rounded-lg", children: [
|
|
6588
6511
|
!isEditing && /* @__PURE__ */ jsx49(
|
|
6589
6512
|
"button",
|
|
6590
6513
|
{
|
|
@@ -6633,7 +6556,7 @@ function ButtonLabelInput(props) {
|
|
|
6633
6556
|
}
|
|
6634
6557
|
|
|
6635
6558
|
// src/editor/nodes/button/button-view.tsx
|
|
6636
|
-
import { jsx as jsx50, jsxs as
|
|
6559
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6637
6560
|
function ButtonView(props) {
|
|
6638
6561
|
const { node, editor, getPos, updateAttributes: updateAttributes2 } = props;
|
|
6639
6562
|
const {
|
|
@@ -6686,7 +6609,7 @@ function ButtonView(props) {
|
|
|
6686
6609
|
style: {
|
|
6687
6610
|
textAlign: alignment
|
|
6688
6611
|
},
|
|
6689
|
-
children: /* @__PURE__ */
|
|
6612
|
+
children: /* @__PURE__ */ jsxs27(Popover, { open: props.selected && editor.isEditable, children: [
|
|
6690
6613
|
/* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx50("div", { children: /* @__PURE__ */ jsx50(
|
|
6691
6614
|
"button",
|
|
6692
6615
|
{
|
|
@@ -6739,7 +6662,7 @@ function ButtonView(props) {
|
|
|
6739
6662
|
sideOffset: 8,
|
|
6740
6663
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6741
6664
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
6742
|
-
children: /* @__PURE__ */ jsx50(TooltipProvider, { children: /* @__PURE__ */
|
|
6665
|
+
children: /* @__PURE__ */ jsx50(TooltipProvider, { children: /* @__PURE__ */ jsxs27("div", { className: "mly-flex mly-items-stretch mly-text-midnight-gray", children: [
|
|
6743
6666
|
/* @__PURE__ */ jsx50(
|
|
6744
6667
|
ButtonLabelInput,
|
|
6745
6668
|
{
|
|
@@ -6755,7 +6678,7 @@ function ButtonView(props) {
|
|
|
6755
6678
|
}
|
|
6756
6679
|
),
|
|
6757
6680
|
/* @__PURE__ */ jsx50(Divider, {}),
|
|
6758
|
-
/* @__PURE__ */
|
|
6681
|
+
/* @__PURE__ */ jsxs27("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
6759
6682
|
/* @__PURE__ */ jsx50(
|
|
6760
6683
|
Select,
|
|
6761
6684
|
{
|
|
@@ -6816,7 +6739,7 @@ function ButtonView(props) {
|
|
|
6816
6739
|
)
|
|
6817
6740
|
] }),
|
|
6818
6741
|
/* @__PURE__ */ jsx50(Divider, {}),
|
|
6819
|
-
/* @__PURE__ */
|
|
6742
|
+
/* @__PURE__ */ jsxs27("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
6820
6743
|
/* @__PURE__ */ jsx50(
|
|
6821
6744
|
AlignmentSwitch,
|
|
6822
6745
|
{
|
|
@@ -6845,7 +6768,7 @@ function ButtonView(props) {
|
|
|
6845
6768
|
)
|
|
6846
6769
|
] }),
|
|
6847
6770
|
/* @__PURE__ */ jsx50(Divider, {}),
|
|
6848
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ jsxs27("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
6849
6772
|
/* @__PURE__ */ jsx50(
|
|
6850
6773
|
BackgroundColorPickerPopup,
|
|
6851
6774
|
{
|
|
@@ -6869,20 +6792,7 @@ function ButtonView(props) {
|
|
|
6869
6792
|
}
|
|
6870
6793
|
}
|
|
6871
6794
|
)
|
|
6872
|
-
] })
|
|
6873
|
-
/* @__PURE__ */ jsx50(Divider, {}),
|
|
6874
|
-
/* @__PURE__ */ jsx50(
|
|
6875
|
-
ShowPopover,
|
|
6876
|
-
{
|
|
6877
|
-
showIfKey,
|
|
6878
|
-
onShowIfKeyValueChange: (value) => {
|
|
6879
|
-
updateAttributes2({
|
|
6880
|
-
showIfKey: value
|
|
6881
|
-
});
|
|
6882
|
-
},
|
|
6883
|
-
editor
|
|
6884
|
-
}
|
|
6885
|
-
)
|
|
6795
|
+
] })
|
|
6886
6796
|
] }) })
|
|
6887
6797
|
}
|
|
6888
6798
|
)
|
|
@@ -6931,7 +6841,7 @@ function TextColorPickerPopup(props) {
|
|
|
6931
6841
|
size: "sm",
|
|
6932
6842
|
type: "button",
|
|
6933
6843
|
className: "mly-size-7",
|
|
6934
|
-
children: /* @__PURE__ */
|
|
6844
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]", children: [
|
|
6935
6845
|
/* @__PURE__ */ jsx50("span", { className: "mly-font-bolder mly-font-mono mly-text-xs mly-text-midnight-gray", children: "A" }),
|
|
6936
6846
|
/* @__PURE__ */ jsx50(
|
|
6937
6847
|
"div",
|
|
@@ -7337,7 +7247,7 @@ import { createLowlight, common } from "lowlight";
|
|
|
7337
7247
|
// src/editor/nodes/html/html-view.tsx
|
|
7338
7248
|
import { NodeViewContent, NodeViewWrapper as NodeViewWrapper6 } from "@tiptap/react";
|
|
7339
7249
|
import { useMemo as useMemo11 } from "react";
|
|
7340
|
-
import { jsx as jsx51, jsxs as
|
|
7250
|
+
import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7341
7251
|
function HTMLCodeBlockView(props) {
|
|
7342
7252
|
const { node, updateAttributes: updateAttributes2 } = props;
|
|
7343
7253
|
let { language, activeTab = "code" } = node.attrs;
|
|
@@ -7362,7 +7272,7 @@ function HTMLCodeBlockView(props) {
|
|
|
7362
7272
|
return `<style>${combinedStyle}</style>${body.innerHTML}`;
|
|
7363
7273
|
}, [activeTab]);
|
|
7364
7274
|
const isEmpty = html2 === "";
|
|
7365
|
-
return /* @__PURE__ */
|
|
7275
|
+
return /* @__PURE__ */ jsxs28(
|
|
7366
7276
|
NodeViewWrapper6,
|
|
7367
7277
|
{
|
|
7368
7278
|
draggable: false,
|
|
@@ -7556,10 +7466,10 @@ import { ReactNodeViewRenderer as ReactNodeViewRenderer6 } from "@tiptap/react";
|
|
|
7556
7466
|
// src/editor/nodes/repeat/repeat-view.tsx
|
|
7557
7467
|
import { NodeViewWrapper as NodeViewWrapper7, NodeViewContent as NodeViewContent2 } from "@tiptap/react";
|
|
7558
7468
|
import { Repeat2 as Repeat22 } from "lucide-react";
|
|
7559
|
-
import { jsx as jsx52, jsxs as
|
|
7469
|
+
import { jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7560
7470
|
function RepeatView(props) {
|
|
7561
7471
|
const { editor, getPos } = props;
|
|
7562
|
-
return /* @__PURE__ */
|
|
7472
|
+
return /* @__PURE__ */ jsxs29(
|
|
7563
7473
|
NodeViewWrapper7,
|
|
7564
7474
|
{
|
|
7565
7475
|
"data-type": "repeat",
|
|
@@ -7568,7 +7478,7 @@ function RepeatView(props) {
|
|
|
7568
7478
|
className: "mly-relative",
|
|
7569
7479
|
children: [
|
|
7570
7480
|
/* @__PURE__ */ jsx52(NodeViewContent2, { className: "is-editable" }),
|
|
7571
|
-
/* @__PURE__ */
|
|
7481
|
+
/* @__PURE__ */ jsxs29(
|
|
7572
7482
|
"div",
|
|
7573
7483
|
{
|
|
7574
7484
|
role: "button",
|
|
@@ -7837,7 +7747,7 @@ import tippy2 from "tippy.js";
|
|
|
7837
7747
|
// src/editor/extensions/slash-command/slash-command-item.tsx
|
|
7838
7748
|
import { ChevronRightIcon } from "lucide-react";
|
|
7839
7749
|
import { useCallback as useCallback10, useState as useState10, useRef as useRef10, useEffect as useEffect7 } from "react";
|
|
7840
|
-
import { Fragment as Fragment6, jsx as jsx53, jsxs as
|
|
7750
|
+
import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7841
7751
|
function SlashCommandItem(props) {
|
|
7842
7752
|
var _a;
|
|
7843
7753
|
const {
|
|
@@ -7860,9 +7770,9 @@ function SlashCommandItem(props) {
|
|
|
7860
7770
|
const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && (isHovered || isActive && !hoveredItemKey);
|
|
7861
7771
|
const hasRenderFunction = typeof item.render === "function";
|
|
7862
7772
|
const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
|
|
7863
|
-
let value = /* @__PURE__ */
|
|
7773
|
+
let value = /* @__PURE__ */ jsxs30(Fragment6, { children: [
|
|
7864
7774
|
/* @__PURE__ */ jsx53("div", { className: "mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center", children: item.icon }),
|
|
7865
|
-
/* @__PURE__ */
|
|
7775
|
+
/* @__PURE__ */ jsxs30("div", { className: "mly-grow", children: [
|
|
7866
7776
|
/* @__PURE__ */ jsx53("p", { className: "mly-font-medium", children: item.title }),
|
|
7867
7777
|
/* @__PURE__ */ jsx53("p", { className: "mly-text-xs mly-text-gray-400", children: item.description })
|
|
7868
7778
|
] }),
|
|
@@ -7897,7 +7807,7 @@ function SlashCommandItem(props) {
|
|
|
7897
7807
|
}
|
|
7898
7808
|
};
|
|
7899
7809
|
}, []);
|
|
7900
|
-
return /* @__PURE__ */
|
|
7810
|
+
return /* @__PURE__ */ jsxs30(Tooltip, { open, children: [
|
|
7901
7811
|
/* @__PURE__ */ jsx53(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
7902
7812
|
"button",
|
|
7903
7813
|
{
|
|
@@ -7919,7 +7829,7 @@ function SlashCommandItem(props) {
|
|
|
7919
7829
|
side: "right",
|
|
7920
7830
|
sideOffset: 10,
|
|
7921
7831
|
className: "mly-w-52 mly-rounded-lg mly-border-none mly-p-1 mly-shadow",
|
|
7922
|
-
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */
|
|
7832
|
+
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ jsxs30(Fragment6, { children: [
|
|
7923
7833
|
/* @__PURE__ */ jsx53("figure", { className: "mly-relative mly-aspect-[2.5] mly-w-full mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200", children: /* @__PURE__ */ jsx53(
|
|
7924
7834
|
"img",
|
|
7925
7835
|
{
|
|
@@ -8017,7 +7927,7 @@ function processCommand(options) {
|
|
|
8017
7927
|
}
|
|
8018
7928
|
|
|
8019
7929
|
// src/editor/extensions/slash-command/slash-command-view.tsx
|
|
8020
|
-
import { jsx as jsx54, jsxs as
|
|
7930
|
+
import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8021
7931
|
var CommandList = forwardRef8((props, ref) => {
|
|
8022
7932
|
const { items: groups, command, editor, range, query } = props;
|
|
8023
7933
|
const [selectedGroupIndex, setSelectedGroupIndex] = useState11(0);
|
|
@@ -8155,14 +8065,14 @@ var CommandList = forwardRef8((props, ref) => {
|
|
|
8155
8065
|
if (!groups || groups.length === 0) {
|
|
8156
8066
|
return null;
|
|
8157
8067
|
}
|
|
8158
|
-
return /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */
|
|
8068
|
+
return /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */ jsxs31("div", { className: "mly-z-50 mly-w-72 mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
|
|
8159
8069
|
/* @__PURE__ */ jsx54(
|
|
8160
8070
|
"div",
|
|
8161
8071
|
{
|
|
8162
8072
|
id: "slash-command",
|
|
8163
8073
|
ref: commandListContainer,
|
|
8164
8074
|
className: "mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto",
|
|
8165
|
-
children: groups.map((group, groupIndex) => /* @__PURE__ */
|
|
8075
|
+
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
8166
8076
|
/* @__PURE__ */ jsx54(
|
|
8167
8077
|
"span",
|
|
8168
8078
|
{
|
|
@@ -8195,15 +8105,15 @@ var CommandList = forwardRef8((props, ref) => {
|
|
|
8195
8105
|
] }, groupIndex))
|
|
8196
8106
|
}
|
|
8197
8107
|
),
|
|
8198
|
-
/* @__PURE__ */ jsx54("div", { className: "mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4", children: /* @__PURE__ */
|
|
8199
|
-
/* @__PURE__ */
|
|
8108
|
+
/* @__PURE__ */ jsx54("div", { className: "mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4", children: /* @__PURE__ */ jsxs31("div", { className: "mly-flex mly-items-center", children: [
|
|
8109
|
+
/* @__PURE__ */ jsxs31("p", { className: "mly-text-center mly-text-xs mly-text-gray-400", children: [
|
|
8200
8110
|
/* @__PURE__ */ jsx54("kbd", { className: "mly-rounded mly-border mly-border-gray-200 mly-p-1 mly-px-2 mly-font-medium", children: "\u2191" }),
|
|
8201
8111
|
/* @__PURE__ */ jsx54("kbd", { className: "mly-ml-1 mly-rounded mly-border mly-border-gray-200 mly-p-1 mly-px-2 mly-font-medium", children: "\u2193" }),
|
|
8202
8112
|
" ",
|
|
8203
8113
|
"to navigate"
|
|
8204
8114
|
] }),
|
|
8205
8115
|
/* @__PURE__ */ jsx54("span", { "aria-hidden": "true", className: "mly-select-none mly-px-1", children: "\xB7" }),
|
|
8206
|
-
/* @__PURE__ */
|
|
8116
|
+
/* @__PURE__ */ jsxs31("p", { className: "mly-text-center mly-text-xs mly-text-gray-400", children: [
|
|
8207
8117
|
/* @__PURE__ */ jsx54("kbd", { className: "mly-rounded mly-border mly-border-gray-200 mly-p-1 mly-px-1.5 mly-font-medium", children: "Enter" }),
|
|
8208
8118
|
" ",
|
|
8209
8119
|
"to select"
|
|
@@ -8535,7 +8445,7 @@ var useTextMenuState = (editor) => {
|
|
|
8535
8445
|
};
|
|
8536
8446
|
|
|
8537
8447
|
// src/editor/components/text-menu/text-bubble-content.tsx
|
|
8538
|
-
import { Fragment as Fragment8, jsx as jsx56, jsxs as
|
|
8448
|
+
import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8539
8449
|
function TextBubbleContent(props) {
|
|
8540
8450
|
var _a, _b, _c, _d;
|
|
8541
8451
|
const { editor, showListMenu = true } = props;
|
|
@@ -8579,7 +8489,7 @@ function TextBubbleContent(props) {
|
|
|
8579
8489
|
tooltip: "Code"
|
|
8580
8490
|
}
|
|
8581
8491
|
];
|
|
8582
|
-
return /* @__PURE__ */
|
|
8492
|
+
return /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
8583
8493
|
items.map((item, index) => /* @__PURE__ */ jsx56(BubbleMenuButton, __spreadValues({}, item), index)),
|
|
8584
8494
|
/* @__PURE__ */ jsx56(
|
|
8585
8495
|
AlignmentSwitch,
|
|
@@ -8590,7 +8500,7 @@ function TextBubbleContent(props) {
|
|
|
8590
8500
|
}
|
|
8591
8501
|
}
|
|
8592
8502
|
),
|
|
8593
|
-
!state.isListActive && showListMenu && /* @__PURE__ */
|
|
8503
|
+
!state.isListActive && showListMenu && /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
8594
8504
|
/* @__PURE__ */ jsx56(
|
|
8595
8505
|
BubbleMenuButton,
|
|
8596
8506
|
{
|
|
@@ -8645,7 +8555,7 @@ function TextBubbleContent(props) {
|
|
|
8645
8555
|
size: "sm",
|
|
8646
8556
|
type: "button",
|
|
8647
8557
|
className: "!mly-h-7 mly-w-7 mly-shrink-0 mly-p-0",
|
|
8648
|
-
children: /* @__PURE__ */
|
|
8558
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]", children: [
|
|
8649
8559
|
/* @__PURE__ */ jsx56("span", { className: "mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700", children: "A" }),
|
|
8650
8560
|
/* @__PURE__ */ jsx56(
|
|
8651
8561
|
"div",
|
|
@@ -8665,7 +8575,7 @@ function TextBubbleContent(props) {
|
|
|
8665
8575
|
// src/editor/components/text-menu/turn-into-block.tsx
|
|
8666
8576
|
import { ChevronDownIcon as ChevronDownIcon2, PilcrowIcon } from "lucide-react";
|
|
8667
8577
|
import { useMemo as useMemo12 } from "react";
|
|
8668
|
-
import { jsx as jsx57, jsxs as
|
|
8578
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
8669
8579
|
var isOption = (option) => option.type === "option";
|
|
8670
8580
|
var isCategory = (option) => option.type === "category";
|
|
8671
8581
|
function TurnIntoBlock(props) {
|
|
@@ -8675,9 +8585,9 @@ function TurnIntoBlock(props) {
|
|
|
8675
8585
|
[options]
|
|
8676
8586
|
);
|
|
8677
8587
|
const { icon: ActiveIcon = PilcrowIcon } = activeItem || {};
|
|
8678
|
-
return /* @__PURE__ */
|
|
8679
|
-
/* @__PURE__ */
|
|
8680
|
-
/* @__PURE__ */ jsx57(TooltipTrigger, { asChild: true, children: /* @__PURE__ */
|
|
8588
|
+
return /* @__PURE__ */ jsxs33(Popover, { children: [
|
|
8589
|
+
/* @__PURE__ */ jsxs33(Tooltip, { children: [
|
|
8590
|
+
/* @__PURE__ */ jsx57(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs33(
|
|
8681
8591
|
PopoverTrigger,
|
|
8682
8592
|
{
|
|
8683
8593
|
className: cn(
|
|
@@ -8700,7 +8610,7 @@ function TurnIntoBlock(props) {
|
|
|
8700
8610
|
className: "mly-flex mly-w-[160px] mly-flex-col mly-rounded-md mly-p-1",
|
|
8701
8611
|
children: options.map((option, index) => {
|
|
8702
8612
|
if (isOption(option)) {
|
|
8703
|
-
return /* @__PURE__ */
|
|
8613
|
+
return /* @__PURE__ */ jsxs33(
|
|
8704
8614
|
BaseButton,
|
|
8705
8615
|
{
|
|
8706
8616
|
onClick: option.onClick,
|
|
@@ -8815,7 +8725,7 @@ function useTurnIntoBlockOptions(editor) {
|
|
|
8815
8725
|
}
|
|
8816
8726
|
|
|
8817
8727
|
// src/editor/components/text-menu/text-bubble-menu.tsx
|
|
8818
|
-
import { jsx as jsx58, jsxs as
|
|
8728
|
+
import { jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
8819
8729
|
function TextBubbleMenu(props) {
|
|
8820
8730
|
const { editor, appendTo } = props;
|
|
8821
8731
|
if (!editor) {
|
|
@@ -8870,7 +8780,7 @@ function TextBubbleMenu(props) {
|
|
|
8870
8780
|
BubbleMenu8,
|
|
8871
8781
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
8872
8782
|
className: "mly-flex mly-gap-0.5 mly-rounded-lg mly-border mly-border-gray-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
8873
|
-
children: /* @__PURE__ */
|
|
8783
|
+
children: /* @__PURE__ */ jsxs34(TooltipProvider, { children: [
|
|
8874
8784
|
/* @__PURE__ */ jsx58(TurnIntoBlock, { options: turnIntoBlockOptions }),
|
|
8875
8785
|
/* @__PURE__ */ jsx58(Divider, { className: "mly-mx-0" }),
|
|
8876
8786
|
/* @__PURE__ */ jsx58(TextBubbleContent, { editor })
|
|
@@ -8995,7 +8905,7 @@ function replaceDeprecatedNode(json) {
|
|
|
8995
8905
|
}
|
|
8996
8906
|
|
|
8997
8907
|
// src/editor/index.tsx
|
|
8998
|
-
import { jsx as jsx60, jsxs as
|
|
8908
|
+
import { jsx as jsx60, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
8999
8909
|
function Editor13(props) {
|
|
9000
8910
|
const {
|
|
9001
8911
|
config: {
|
|
@@ -9064,7 +8974,7 @@ function Editor13(props) {
|
|
|
9064
8974
|
if (!editor) {
|
|
9065
8975
|
return null;
|
|
9066
8976
|
}
|
|
9067
|
-
return /* @__PURE__ */ jsx60(MailyProvider, { placeholderUrl, children: /* @__PURE__ */
|
|
8977
|
+
return /* @__PURE__ */ jsx60(MailyProvider, { placeholderUrl, children: /* @__PURE__ */ jsxs35(
|
|
9068
8978
|
"div",
|
|
9069
8979
|
{
|
|
9070
8980
|
className: cn(
|
|
@@ -9075,7 +8985,7 @@ function Editor13(props) {
|
|
|
9075
8985
|
ref: menuContainerRef,
|
|
9076
8986
|
children: [
|
|
9077
8987
|
hasMenuBar && /* @__PURE__ */ jsx60(EditorMenuBar, { config: props.config, editor }),
|
|
9078
|
-
/* @__PURE__ */
|
|
8988
|
+
/* @__PURE__ */ jsxs35(
|
|
9079
8989
|
"div",
|
|
9080
8990
|
{
|
|
9081
8991
|
className: cn(
|