@daisychainapp/maily-to-core 0.1.2 → 0.1.3
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.js +304 -155
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/index.mjs +271 -122
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.js +63 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4454,7 +4454,20 @@ function ImageBubbleMenu(props) {
|
|
|
4454
4454
|
}
|
|
4455
4455
|
)
|
|
4456
4456
|
] })
|
|
4457
|
-
] })
|
|
4457
|
+
] }),
|
|
4458
|
+
/* @__PURE__ */ jsx37(Divider, {}),
|
|
4459
|
+
/* @__PURE__ */ jsx37(
|
|
4460
|
+
ShowPopover,
|
|
4461
|
+
{
|
|
4462
|
+
showIfKey: state.currentShowIfKey,
|
|
4463
|
+
onShowIfKeyValueChange: (value) => {
|
|
4464
|
+
editor == null ? void 0 : editor.chain().updateAttributes(state.isLogoActive ? "logo" : "image", {
|
|
4465
|
+
showIfKey: value
|
|
4466
|
+
}).run();
|
|
4467
|
+
},
|
|
4468
|
+
editor
|
|
4469
|
+
}
|
|
4470
|
+
)
|
|
4458
4471
|
] })
|
|
4459
4472
|
})
|
|
4460
4473
|
);
|
|
@@ -4909,6 +4922,19 @@ function SectionBubbleMenu(props) {
|
|
|
4909
4922
|
}
|
|
4910
4923
|
}
|
|
4911
4924
|
),
|
|
4925
|
+
/* @__PURE__ */ jsx42(Divider, {}),
|
|
4926
|
+
/* @__PURE__ */ jsx42(
|
|
4927
|
+
ShowPopover,
|
|
4928
|
+
{
|
|
4929
|
+
showIfKey: state.currentShowIfKey,
|
|
4930
|
+
onShowIfKeyValueChange: (value) => {
|
|
4931
|
+
editor.commands.updateSection({
|
|
4932
|
+
showIfKey: value
|
|
4933
|
+
});
|
|
4934
|
+
},
|
|
4935
|
+
editor
|
|
4936
|
+
}
|
|
4937
|
+
),
|
|
4912
4938
|
state.isColumnsActive && /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
4913
4939
|
/* @__PURE__ */ jsx42(Divider, {}),
|
|
4914
4940
|
/* @__PURE__ */ jsxs22(Popover, { children: [
|
|
@@ -4961,7 +4987,7 @@ var useSpacerState = (editor) => {
|
|
|
4961
4987
|
|
|
4962
4988
|
// src/editor/components/spacer-menu/spacer-bubble-menu.tsx
|
|
4963
4989
|
import { useMemo as useMemo6 } from "react";
|
|
4964
|
-
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
4990
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4965
4991
|
function SpacerBubbleMenu(props) {
|
|
4966
4992
|
const { editor, appendTo } = props;
|
|
4967
4993
|
if (!editor) {
|
|
@@ -4997,15 +5023,28 @@ function SpacerBubbleMenu(props) {
|
|
|
4997
5023
|
BubbleMenu5,
|
|
4998
5024
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
4999
5025
|
className: "mly-flex mly-gap-0.5 mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
5000
|
-
children: /* @__PURE__ */
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5026
|
+
children: /* @__PURE__ */ jsxs23(TooltipProvider, { children: [
|
|
5027
|
+
items.map((item, index) => /* @__PURE__ */ jsx43(
|
|
5028
|
+
BubbleMenuButton,
|
|
5029
|
+
__spreadValues({
|
|
5030
|
+
className: "!mly-h-7 mly-w-7 mly-shrink-0 mly-p-0",
|
|
5031
|
+
iconClassName: "mly-w-3 mly-h-3",
|
|
5032
|
+
nameClassName: "mly-text-xs"
|
|
5033
|
+
}, item),
|
|
5034
|
+
index
|
|
5035
|
+
)),
|
|
5036
|
+
/* @__PURE__ */ jsx43(Divider, {}),
|
|
5037
|
+
/* @__PURE__ */ jsx43(
|
|
5038
|
+
ShowPopover,
|
|
5039
|
+
{
|
|
5040
|
+
showIfKey: state.currentShowIfKey,
|
|
5041
|
+
onShowIfKeyValueChange: (value) => {
|
|
5042
|
+
editor.commands.setSpacerShowIfKey(value);
|
|
5043
|
+
},
|
|
5044
|
+
editor
|
|
5045
|
+
}
|
|
5046
|
+
)
|
|
5047
|
+
] })
|
|
5009
5048
|
})
|
|
5010
5049
|
);
|
|
5011
5050
|
}
|
|
@@ -5280,7 +5319,7 @@ var Textarea = React6.forwardRef(
|
|
|
5280
5319
|
Textarea.displayName = "Textarea";
|
|
5281
5320
|
|
|
5282
5321
|
// src/editor/nodes/link-card.tsx
|
|
5283
|
-
import { jsx as jsx46, jsxs as
|
|
5322
|
+
import { jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5284
5323
|
function LinkCardComponent(props) {
|
|
5285
5324
|
const { title, description, link, linkTitle, image: image2, badgeText, subTitle } = props.node.attrs;
|
|
5286
5325
|
const { getPos, editor } = props;
|
|
@@ -5290,7 +5329,7 @@ function LinkCardComponent(props) {
|
|
|
5290
5329
|
className: `react-component ${props.selected && "ProseMirror-selectednode"}`,
|
|
5291
5330
|
draggable: editor.isEditable,
|
|
5292
5331
|
"data-drag-handle": editor.isEditable,
|
|
5293
|
-
children: /* @__PURE__ */
|
|
5332
|
+
children: /* @__PURE__ */ jsxs24(Popover, { open: props.selected, children: [
|
|
5294
5333
|
/* @__PURE__ */ jsx46(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(
|
|
5295
5334
|
"div",
|
|
5296
5335
|
{
|
|
@@ -5300,7 +5339,7 @@ function LinkCardComponent(props) {
|
|
|
5300
5339
|
const pos = getPos();
|
|
5301
5340
|
editor.commands.setNodeSelection(pos);
|
|
5302
5341
|
},
|
|
5303
|
-
children: /* @__PURE__ */
|
|
5342
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "mly-no-prose mly-flex mly-flex-col mly-rounded-lg mly-border mly-border-gray-300", children: [
|
|
5304
5343
|
image2 && /* @__PURE__ */ jsx46("div", { className: "mly-relative mly-mb-1.5 mly-w-full mly-shrink-0", children: /* @__PURE__ */ jsx46(
|
|
5305
5344
|
"img",
|
|
5306
5345
|
{
|
|
@@ -5310,14 +5349,14 @@ function LinkCardComponent(props) {
|
|
|
5310
5349
|
draggable: editor.isEditable
|
|
5311
5350
|
}
|
|
5312
5351
|
) }),
|
|
5313
|
-
/* @__PURE__ */ jsx46("div", { className: "mly-flex mly-items-stretch mly-p-3", children: /* @__PURE__ */
|
|
5314
|
-
/* @__PURE__ */
|
|
5352
|
+
/* @__PURE__ */ jsx46("div", { className: "mly-flex mly-items-stretch mly-p-3", children: /* @__PURE__ */ jsxs24("div", { className: cn("mly-flex mly-flex-col"), children: [
|
|
5353
|
+
/* @__PURE__ */ jsxs24("div", { className: "!mly-mb-1.5 mly-flex mly-items-center mly-gap-1.5", children: [
|
|
5315
5354
|
/* @__PURE__ */ jsx46("h2", { className: "!mly-mb-0 !mly-text-lg mly-font-semibold", children: title }),
|
|
5316
5355
|
badgeText && /* @__PURE__ */ jsx46("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 }),
|
|
5317
5356
|
" ",
|
|
5318
5357
|
subTitle && !badgeText && /* @__PURE__ */ jsx46("span", { className: "!mly-font-base text-xs mly-font-regular mly-rounded-md mly-leading-none mly-text-gray-400", children: subTitle })
|
|
5319
5358
|
] }),
|
|
5320
|
-
/* @__PURE__ */
|
|
5359
|
+
/* @__PURE__ */ jsxs24("p", { className: "!mly-my-0 !mly-text-base mly-text-gray-500", children: [
|
|
5321
5360
|
description,
|
|
5322
5361
|
" ",
|
|
5323
5362
|
linkTitle ? /* @__PURE__ */ jsx46("a", { href: link, className: "mly-font-semibold", children: linkTitle }) : null
|
|
@@ -5326,7 +5365,7 @@ function LinkCardComponent(props) {
|
|
|
5326
5365
|
] })
|
|
5327
5366
|
}
|
|
5328
5367
|
) }),
|
|
5329
|
-
/* @__PURE__ */
|
|
5368
|
+
/* @__PURE__ */ jsxs24(
|
|
5330
5369
|
PopoverContent,
|
|
5331
5370
|
{
|
|
5332
5371
|
align: "end",
|
|
@@ -5335,7 +5374,7 @@ function LinkCardComponent(props) {
|
|
|
5335
5374
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5336
5375
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
5337
5376
|
children: [
|
|
5338
|
-
/* @__PURE__ */
|
|
5377
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5339
5378
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Image" }),
|
|
5340
5379
|
/* @__PURE__ */ jsx46(
|
|
5341
5380
|
Input,
|
|
@@ -5351,7 +5390,7 @@ function LinkCardComponent(props) {
|
|
|
5351
5390
|
}
|
|
5352
5391
|
)
|
|
5353
5392
|
] }),
|
|
5354
|
-
/* @__PURE__ */
|
|
5393
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5355
5394
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Title" }),
|
|
5356
5395
|
/* @__PURE__ */ jsx46(
|
|
5357
5396
|
Input,
|
|
@@ -5366,7 +5405,7 @@ function LinkCardComponent(props) {
|
|
|
5366
5405
|
}
|
|
5367
5406
|
)
|
|
5368
5407
|
] }),
|
|
5369
|
-
/* @__PURE__ */
|
|
5408
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5370
5409
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Description" }),
|
|
5371
5410
|
/* @__PURE__ */ jsx46(
|
|
5372
5411
|
Textarea,
|
|
@@ -5381,8 +5420,8 @@ function LinkCardComponent(props) {
|
|
|
5381
5420
|
}
|
|
5382
5421
|
)
|
|
5383
5422
|
] }),
|
|
5384
|
-
/* @__PURE__ */
|
|
5385
|
-
/* @__PURE__ */
|
|
5423
|
+
/* @__PURE__ */ jsxs24("div", { className: "mly-grid mly-grid-cols-2 mly-gap-2", children: [
|
|
5424
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5386
5425
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Link Title" }),
|
|
5387
5426
|
/* @__PURE__ */ jsx46(
|
|
5388
5427
|
Input,
|
|
@@ -5397,7 +5436,7 @@ function LinkCardComponent(props) {
|
|
|
5397
5436
|
}
|
|
5398
5437
|
)
|
|
5399
5438
|
] }),
|
|
5400
|
-
/* @__PURE__ */
|
|
5439
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5401
5440
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Link" }),
|
|
5402
5441
|
/* @__PURE__ */ jsx46(
|
|
5403
5442
|
Input,
|
|
@@ -5413,8 +5452,8 @@ function LinkCardComponent(props) {
|
|
|
5413
5452
|
)
|
|
5414
5453
|
] })
|
|
5415
5454
|
] }),
|
|
5416
|
-
/* @__PURE__ */
|
|
5417
|
-
/* @__PURE__ */
|
|
5455
|
+
/* @__PURE__ */ jsxs24("div", { className: "mly-grid mly-grid-cols-2 mly-gap-2", children: [
|
|
5456
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5418
5457
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Badge Text" }),
|
|
5419
5458
|
/* @__PURE__ */ jsx46(
|
|
5420
5459
|
Input,
|
|
@@ -5429,7 +5468,7 @@ function LinkCardComponent(props) {
|
|
|
5429
5468
|
}
|
|
5430
5469
|
)
|
|
5431
5470
|
] }),
|
|
5432
|
-
/* @__PURE__ */
|
|
5471
|
+
/* @__PURE__ */ jsxs24("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
5433
5472
|
/* @__PURE__ */ jsx46("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Sub Title" }),
|
|
5434
5473
|
/* @__PURE__ */ jsx46(
|
|
5435
5474
|
Input,
|
|
@@ -5535,7 +5574,7 @@ import { NodeViewWrapper as NodeViewWrapper5 } from "@tiptap/react";
|
|
|
5535
5574
|
import { useMemo as useMemo7 } from "react";
|
|
5536
5575
|
import { useState as useState10 } from "react";
|
|
5537
5576
|
import { useRef as useRef9 } from "react";
|
|
5538
|
-
import { jsx as jsx47, jsxs as
|
|
5577
|
+
import { jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5539
5578
|
function ButtonLabelInput(props) {
|
|
5540
5579
|
const { value, onValueChange, isVariable, editor } = props;
|
|
5541
5580
|
const linkInputRef = useRef9(null);
|
|
@@ -5557,7 +5596,7 @@ function ButtonLabelInput(props) {
|
|
|
5557
5596
|
editor
|
|
5558
5597
|
}).map((variable) => variable.name);
|
|
5559
5598
|
}, [variables, value, editor]);
|
|
5560
|
-
return /* @__PURE__ */
|
|
5599
|
+
return /* @__PURE__ */ jsxs25("div", { className: "mly-isolate mly-flex mly-rounded-lg", children: [
|
|
5561
5600
|
!isEditing && /* @__PURE__ */ jsx47(
|
|
5562
5601
|
"button",
|
|
5563
5602
|
{
|
|
@@ -5606,7 +5645,7 @@ function ButtonLabelInput(props) {
|
|
|
5606
5645
|
|
|
5607
5646
|
// src/editor/nodes/button/button-view.tsx
|
|
5608
5647
|
import { useMemo as useMemo8 } from "react";
|
|
5609
|
-
import { jsx as jsx48, jsxs as
|
|
5648
|
+
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5610
5649
|
function ButtonView(props) {
|
|
5611
5650
|
const { node, editor, getPos, updateAttributes: updateAttributes2 } = props;
|
|
5612
5651
|
const {
|
|
@@ -5658,7 +5697,7 @@ function ButtonView(props) {
|
|
|
5658
5697
|
style: {
|
|
5659
5698
|
textAlign: alignment
|
|
5660
5699
|
},
|
|
5661
|
-
children: /* @__PURE__ */
|
|
5700
|
+
children: /* @__PURE__ */ jsxs26(Popover, { open: props.selected && editor.isEditable, children: [
|
|
5662
5701
|
/* @__PURE__ */ jsx48(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx48("div", { children: /* @__PURE__ */ jsx48(
|
|
5663
5702
|
"button",
|
|
5664
5703
|
{
|
|
@@ -5711,7 +5750,7 @@ function ButtonView(props) {
|
|
|
5711
5750
|
sideOffset: 8,
|
|
5712
5751
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5713
5752
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
5714
|
-
children: /* @__PURE__ */ jsx48(TooltipProvider, { children: /* @__PURE__ */
|
|
5753
|
+
children: /* @__PURE__ */ jsx48(TooltipProvider, { children: /* @__PURE__ */ jsxs26("div", { className: "mly-flex mly-items-stretch mly-text-midnight-gray", children: [
|
|
5715
5754
|
/* @__PURE__ */ jsx48(
|
|
5716
5755
|
ButtonLabelInput,
|
|
5717
5756
|
{
|
|
@@ -5727,7 +5766,7 @@ function ButtonView(props) {
|
|
|
5727
5766
|
}
|
|
5728
5767
|
),
|
|
5729
5768
|
/* @__PURE__ */ jsx48(Divider, {}),
|
|
5730
|
-
/* @__PURE__ */
|
|
5769
|
+
/* @__PURE__ */ jsxs26("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
5731
5770
|
/* @__PURE__ */ jsx48(
|
|
5732
5771
|
Select,
|
|
5733
5772
|
{
|
|
@@ -5788,7 +5827,7 @@ function ButtonView(props) {
|
|
|
5788
5827
|
)
|
|
5789
5828
|
] }),
|
|
5790
5829
|
/* @__PURE__ */ jsx48(Divider, {}),
|
|
5791
|
-
/* @__PURE__ */
|
|
5830
|
+
/* @__PURE__ */ jsxs26("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
5792
5831
|
/* @__PURE__ */ jsx48(
|
|
5793
5832
|
AlignmentSwitch,
|
|
5794
5833
|
{
|
|
@@ -5817,7 +5856,7 @@ function ButtonView(props) {
|
|
|
5817
5856
|
)
|
|
5818
5857
|
] }),
|
|
5819
5858
|
/* @__PURE__ */ jsx48(Divider, {}),
|
|
5820
|
-
/* @__PURE__ */
|
|
5859
|
+
/* @__PURE__ */ jsxs26("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
5821
5860
|
/* @__PURE__ */ jsx48(
|
|
5822
5861
|
BackgroundColorPickerPopup,
|
|
5823
5862
|
{
|
|
@@ -5841,7 +5880,20 @@ function ButtonView(props) {
|
|
|
5841
5880
|
}
|
|
5842
5881
|
}
|
|
5843
5882
|
)
|
|
5844
|
-
] })
|
|
5883
|
+
] }),
|
|
5884
|
+
/* @__PURE__ */ jsx48(Divider, {}),
|
|
5885
|
+
/* @__PURE__ */ jsx48(
|
|
5886
|
+
ShowPopover,
|
|
5887
|
+
{
|
|
5888
|
+
showIfKey,
|
|
5889
|
+
onShowIfKeyValueChange: (value) => {
|
|
5890
|
+
updateAttributes2({
|
|
5891
|
+
showIfKey: value
|
|
5892
|
+
});
|
|
5893
|
+
},
|
|
5894
|
+
editor
|
|
5895
|
+
}
|
|
5896
|
+
)
|
|
5845
5897
|
] }) })
|
|
5846
5898
|
}
|
|
5847
5899
|
)
|
|
@@ -5890,7 +5942,7 @@ function TextColorPickerPopup(props) {
|
|
|
5890
5942
|
size: "sm",
|
|
5891
5943
|
type: "button",
|
|
5892
5944
|
className: "mly-size-7",
|
|
5893
|
-
children: /* @__PURE__ */
|
|
5945
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]", children: [
|
|
5894
5946
|
/* @__PURE__ */ jsx48("span", { className: "mly-font-bolder mly-font-mono mly-text-xs mly-text-midnight-gray", children: "A" }),
|
|
5895
5947
|
/* @__PURE__ */ jsx48(
|
|
5896
5948
|
"div",
|
|
@@ -6418,7 +6470,7 @@ import { createLowlight, common } from "lowlight";
|
|
|
6418
6470
|
// src/editor/nodes/html/html-view.tsx
|
|
6419
6471
|
import { NodeViewContent, NodeViewWrapper as NodeViewWrapper6 } from "@tiptap/react";
|
|
6420
6472
|
import { useMemo as useMemo9 } from "react";
|
|
6421
|
-
import { jsx as jsx49, jsxs as
|
|
6473
|
+
import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6422
6474
|
function HTMLCodeBlockView(props) {
|
|
6423
6475
|
const { node, updateAttributes: updateAttributes2 } = props;
|
|
6424
6476
|
let { language, activeTab = "code" } = node.attrs;
|
|
@@ -6441,7 +6493,7 @@ function HTMLCodeBlockView(props) {
|
|
|
6441
6493
|
return body.innerHTML;
|
|
6442
6494
|
}, [activeTab]);
|
|
6443
6495
|
const isEmpty = html2 === "";
|
|
6444
|
-
return /* @__PURE__ */
|
|
6496
|
+
return /* @__PURE__ */ jsxs27(
|
|
6445
6497
|
NodeViewWrapper6,
|
|
6446
6498
|
{
|
|
6447
6499
|
draggable: false,
|
|
@@ -6618,10 +6670,10 @@ import { ReactNodeViewRenderer as ReactNodeViewRenderer6 } from "@tiptap/react";
|
|
|
6618
6670
|
// src/editor/nodes/repeat/repeat-view.tsx
|
|
6619
6671
|
import { NodeViewWrapper as NodeViewWrapper7, NodeViewContent as NodeViewContent2 } from "@tiptap/react";
|
|
6620
6672
|
import { Repeat2 as Repeat22 } from "lucide-react";
|
|
6621
|
-
import { jsx as jsx50, jsxs as
|
|
6673
|
+
import { jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6622
6674
|
function RepeatView(props) {
|
|
6623
6675
|
const { editor, getPos } = props;
|
|
6624
|
-
return /* @__PURE__ */
|
|
6676
|
+
return /* @__PURE__ */ jsxs28(
|
|
6625
6677
|
NodeViewWrapper7,
|
|
6626
6678
|
{
|
|
6627
6679
|
"data-type": "repeat",
|
|
@@ -6630,7 +6682,7 @@ function RepeatView(props) {
|
|
|
6630
6682
|
className: "mly-relative",
|
|
6631
6683
|
children: [
|
|
6632
6684
|
/* @__PURE__ */ jsx50(NodeViewContent2, { className: "is-editable" }),
|
|
6633
|
-
/* @__PURE__ */
|
|
6685
|
+
/* @__PURE__ */ jsxs28(
|
|
6634
6686
|
"div",
|
|
6635
6687
|
{
|
|
6636
6688
|
role: "button",
|
|
@@ -6878,7 +6930,7 @@ import {
|
|
|
6878
6930
|
} from "react";
|
|
6879
6931
|
import tippy2 from "tippy.js";
|
|
6880
6932
|
import { ChevronRightIcon } from "lucide-react";
|
|
6881
|
-
import { Fragment as Fragment8, jsx as jsx51, jsxs as
|
|
6933
|
+
import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6882
6934
|
var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
6883
6935
|
const { items: groups, command, editor } = props;
|
|
6884
6936
|
const [selectedGroupIndex, setSelectedGroupIndex] = useState11(0);
|
|
@@ -6965,14 +7017,14 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
6965
7017
|
commandListContainer,
|
|
6966
7018
|
activeCommandRef
|
|
6967
7019
|
]);
|
|
6968
|
-
return groups.length > 0 ? /* @__PURE__ */ jsx51(TooltipProvider, { children: /* @__PURE__ */
|
|
7020
|
+
return groups.length > 0 ? /* @__PURE__ */ jsx51(TooltipProvider, { children: /* @__PURE__ */ jsxs29("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: [
|
|
6969
7021
|
/* @__PURE__ */ jsx51(
|
|
6970
7022
|
"div",
|
|
6971
7023
|
{
|
|
6972
7024
|
id: "slash-command",
|
|
6973
7025
|
ref: commandListContainer,
|
|
6974
7026
|
className: "mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto mly-scroll-smooth",
|
|
6975
|
-
children: groups.map((group, groupIndex) => /* @__PURE__ */
|
|
7027
|
+
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
6976
7028
|
/* @__PURE__ */ jsx51(
|
|
6977
7029
|
"span",
|
|
6978
7030
|
{
|
|
@@ -6989,9 +7041,9 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
6989
7041
|
const isSubCommand = "commands" in item;
|
|
6990
7042
|
const hasRenderFunction = typeof item.render === "function";
|
|
6991
7043
|
const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
|
|
6992
|
-
let value = /* @__PURE__ */
|
|
7044
|
+
let value = /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
6993
7045
|
/* @__PURE__ */ jsx51("div", { className: "mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center", children: item.icon }),
|
|
6994
|
-
/* @__PURE__ */
|
|
7046
|
+
/* @__PURE__ */ jsxs29("div", { className: "mly-grow", children: [
|
|
6995
7047
|
/* @__PURE__ */ jsx51("p", { className: "mly-font-medium", children: item.title }),
|
|
6996
7048
|
/* @__PURE__ */ jsx51("p", { className: "mly-text-xs mly-text-gray-400", children: item.description })
|
|
6997
7049
|
] }),
|
|
@@ -7001,7 +7053,7 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
7001
7053
|
value = renderFunctionValue;
|
|
7002
7054
|
}
|
|
7003
7055
|
const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && isActive;
|
|
7004
|
-
return /* @__PURE__ */
|
|
7056
|
+
return /* @__PURE__ */ jsxs29(Tooltip, { open: shouldOpenTooltip, children: [
|
|
7005
7057
|
/* @__PURE__ */ jsx51(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
|
|
7006
7058
|
"button",
|
|
7007
7059
|
{
|
|
@@ -7021,7 +7073,7 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
7021
7073
|
side: "right",
|
|
7022
7074
|
sideOffset: 10,
|
|
7023
7075
|
className: "mly-w-52 mly-rounded-lg mly-border-none mly-p-1 mly-shadow",
|
|
7024
|
-
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */
|
|
7076
|
+
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
7025
7077
|
/* @__PURE__ */ jsx51("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__ */ jsx51(
|
|
7026
7078
|
"img",
|
|
7027
7079
|
{
|
|
@@ -7039,15 +7091,15 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
7039
7091
|
] }, groupIndex))
|
|
7040
7092
|
}
|
|
7041
7093
|
),
|
|
7042
|
-
/* @__PURE__ */ jsx51("div", { className: "mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4", children: /* @__PURE__ */
|
|
7043
|
-
/* @__PURE__ */
|
|
7094
|
+
/* @__PURE__ */ jsx51("div", { className: "mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4", children: /* @__PURE__ */ jsxs29("div", { className: "mly-flex mly-items-center", children: [
|
|
7095
|
+
/* @__PURE__ */ jsxs29("p", { className: "mly-text-center mly-text-xs mly-text-gray-400", children: [
|
|
7044
7096
|
/* @__PURE__ */ jsx51("kbd", { className: "mly-rounded mly-border mly-border-gray-200 mly-p-1 mly-px-2 mly-font-medium", children: "\u2191" }),
|
|
7045
7097
|
/* @__PURE__ */ jsx51("kbd", { className: "mly-ml-1 mly-rounded mly-border mly-border-gray-200 mly-p-1 mly-px-2 mly-font-medium", children: "\u2193" }),
|
|
7046
7098
|
" ",
|
|
7047
7099
|
"to navigate"
|
|
7048
7100
|
] }),
|
|
7049
7101
|
/* @__PURE__ */ jsx51("span", { "aria-hidden": "true", className: "mly-select-none mly-px-1", children: "\xB7" }),
|
|
7050
|
-
/* @__PURE__ */
|
|
7102
|
+
/* @__PURE__ */ jsxs29("p", { className: "mly-text-center mly-text-xs mly-text-gray-400", children: [
|
|
7051
7103
|
/* @__PURE__ */ jsx51("kbd", { className: "mly-rounded mly-border mly-border-gray-200 mly-p-1 mly-px-1.5 mly-font-medium", children: "Enter" }),
|
|
7052
7104
|
" ",
|
|
7053
7105
|
"to select"
|
|
@@ -7559,7 +7611,7 @@ var useTextMenuState = (editor) => {
|
|
|
7559
7611
|
};
|
|
7560
7612
|
|
|
7561
7613
|
// src/editor/components/text-menu/text-bubble-content.tsx
|
|
7562
|
-
import { Fragment as Fragment9, jsx as jsx53, jsxs as
|
|
7614
|
+
import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7563
7615
|
function TextBubbleContent(props) {
|
|
7564
7616
|
var _a, _b, _c, _d;
|
|
7565
7617
|
const { editor, showListMenu = true } = props;
|
|
@@ -7603,7 +7655,7 @@ function TextBubbleContent(props) {
|
|
|
7603
7655
|
tooltip: "Code"
|
|
7604
7656
|
}
|
|
7605
7657
|
];
|
|
7606
|
-
return /* @__PURE__ */
|
|
7658
|
+
return /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
7607
7659
|
items.map((item, index) => /* @__PURE__ */ jsx53(BubbleMenuButton, __spreadValues({}, item), index)),
|
|
7608
7660
|
/* @__PURE__ */ jsx53(
|
|
7609
7661
|
AlignmentSwitch,
|
|
@@ -7614,7 +7666,7 @@ function TextBubbleContent(props) {
|
|
|
7614
7666
|
}
|
|
7615
7667
|
}
|
|
7616
7668
|
),
|
|
7617
|
-
!state.isListActive && showListMenu && /* @__PURE__ */
|
|
7669
|
+
!state.isListActive && showListMenu && /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
7618
7670
|
/* @__PURE__ */ jsx53(
|
|
7619
7671
|
BubbleMenuButton,
|
|
7620
7672
|
{
|
|
@@ -7670,7 +7722,7 @@ function TextBubbleContent(props) {
|
|
|
7670
7722
|
size: "sm",
|
|
7671
7723
|
type: "button",
|
|
7672
7724
|
className: "!mly-h-7 mly-w-7 mly-shrink-0 mly-p-0",
|
|
7673
|
-
children: /* @__PURE__ */
|
|
7725
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]", children: [
|
|
7674
7726
|
/* @__PURE__ */ jsx53("span", { className: "mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700", children: "A" }),
|
|
7675
7727
|
/* @__PURE__ */ jsx53(
|
|
7676
7728
|
"div",
|
|
@@ -7690,7 +7742,7 @@ function TextBubbleContent(props) {
|
|
|
7690
7742
|
// src/editor/components/text-menu/turn-into-block.tsx
|
|
7691
7743
|
import { ChevronDownIcon as ChevronDownIcon3, PilcrowIcon } from "lucide-react";
|
|
7692
7744
|
import { useMemo as useMemo10 } from "react";
|
|
7693
|
-
import { jsx as jsx54, jsxs as
|
|
7745
|
+
import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7694
7746
|
var isOption = (option) => option.type === "option";
|
|
7695
7747
|
var isCategory = (option) => option.type === "category";
|
|
7696
7748
|
function TurnIntoBlock(props) {
|
|
@@ -7700,9 +7752,9 @@ function TurnIntoBlock(props) {
|
|
|
7700
7752
|
[options]
|
|
7701
7753
|
);
|
|
7702
7754
|
const { icon: ActiveIcon = PilcrowIcon } = activeItem || {};
|
|
7703
|
-
return /* @__PURE__ */
|
|
7704
|
-
/* @__PURE__ */
|
|
7705
|
-
/* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */
|
|
7755
|
+
return /* @__PURE__ */ jsxs31(Popover, { children: [
|
|
7756
|
+
/* @__PURE__ */ jsxs31(Tooltip, { children: [
|
|
7757
|
+
/* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs31(
|
|
7706
7758
|
PopoverTrigger,
|
|
7707
7759
|
{
|
|
7708
7760
|
className: cn(
|
|
@@ -7725,7 +7777,7 @@ function TurnIntoBlock(props) {
|
|
|
7725
7777
|
className: "mly-flex mly-w-[160px] mly-flex-col mly-rounded-md mly-p-1",
|
|
7726
7778
|
children: options.map((option, index) => {
|
|
7727
7779
|
if (isOption(option)) {
|
|
7728
|
-
return /* @__PURE__ */
|
|
7780
|
+
return /* @__PURE__ */ jsxs31(
|
|
7729
7781
|
BaseButton,
|
|
7730
7782
|
{
|
|
7731
7783
|
onClick: option.onClick,
|
|
@@ -7760,7 +7812,6 @@ function TurnIntoBlock(props) {
|
|
|
7760
7812
|
// src/editor/components/text-menu/use-turn-into-block-options.tsx
|
|
7761
7813
|
import { useEditorState as useEditorState7 } from "@tiptap/react";
|
|
7762
7814
|
import {
|
|
7763
|
-
FootprintsIcon as FootprintsIcon3,
|
|
7764
7815
|
Heading1Icon,
|
|
7765
7816
|
Heading2Icon,
|
|
7766
7817
|
Heading3Icon,
|
|
@@ -7813,17 +7864,6 @@ function useTurnIntoBlockOptions(editor) {
|
|
|
7813
7864
|
label: "Heading 3",
|
|
7814
7865
|
type: "option"
|
|
7815
7866
|
},
|
|
7816
|
-
{
|
|
7817
|
-
id: "footer",
|
|
7818
|
-
type: "option",
|
|
7819
|
-
label: "Footer",
|
|
7820
|
-
icon: FootprintsIcon3,
|
|
7821
|
-
onClick: () => {
|
|
7822
|
-
editor2.chain().focus().liftListItem("listItem").setFooter().run();
|
|
7823
|
-
},
|
|
7824
|
-
disabled: () => !editor2.can().setFooter(),
|
|
7825
|
-
isActive: () => editor2.isActive("footer")
|
|
7826
|
-
},
|
|
7827
7867
|
{
|
|
7828
7868
|
type: "category",
|
|
7829
7869
|
label: "Lists",
|
|
@@ -7852,7 +7892,7 @@ function useTurnIntoBlockOptions(editor) {
|
|
|
7852
7892
|
}
|
|
7853
7893
|
|
|
7854
7894
|
// src/editor/components/text-menu/text-bubble-menu.tsx
|
|
7855
|
-
import { jsx as jsx55, jsxs as
|
|
7895
|
+
import { jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7856
7896
|
function TextBubbleMenu(props) {
|
|
7857
7897
|
const { editor, appendTo } = props;
|
|
7858
7898
|
if (!editor) {
|
|
@@ -7907,7 +7947,7 @@ function TextBubbleMenu(props) {
|
|
|
7907
7947
|
BubbleMenu6,
|
|
7908
7948
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
7909
7949
|
className: "mly-flex mly-gap-0.5 mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
7910
|
-
children: /* @__PURE__ */
|
|
7950
|
+
children: /* @__PURE__ */ jsxs32(TooltipProvider, { children: [
|
|
7911
7951
|
/* @__PURE__ */ jsx55(TurnIntoBlock, { options: turnIntoBlockOptions }),
|
|
7912
7952
|
/* @__PURE__ */ jsx55(Divider, { className: "mly-mx-0" }),
|
|
7913
7953
|
/* @__PURE__ */ jsx55(TextBubbleContent, { editor })
|
|
@@ -8029,7 +8069,7 @@ var useHtmlState = (editor) => {
|
|
|
8029
8069
|
};
|
|
8030
8070
|
|
|
8031
8071
|
// src/editor/components/html-menu/html-menu.tsx
|
|
8032
|
-
import { jsx as jsx57, jsxs as
|
|
8072
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
8033
8073
|
function HTMLBubbleMenu(props) {
|
|
8034
8074
|
const { appendTo, editor } = props;
|
|
8035
8075
|
if (!editor) {
|
|
@@ -8063,9 +8103,9 @@ function HTMLBubbleMenu(props) {
|
|
|
8063
8103
|
BubbleMenu8,
|
|
8064
8104
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
8065
8105
|
className: "mly-flex mly-items-stretch mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
8066
|
-
children: /* @__PURE__ */
|
|
8067
|
-
/* @__PURE__ */
|
|
8068
|
-
/* @__PURE__ */
|
|
8106
|
+
children: /* @__PURE__ */ jsxs33(TooltipProvider, { children: [
|
|
8107
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center mly-h-7 mly-rounded-md mly-bg-soft-gray mly-px-0.5", children: [
|
|
8108
|
+
/* @__PURE__ */ jsxs33(Tooltip, { children: [
|
|
8069
8109
|
/* @__PURE__ */ jsx57(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(
|
|
8070
8110
|
"button",
|
|
8071
8111
|
{
|
|
@@ -8085,7 +8125,7 @@ function HTMLBubbleMenu(props) {
|
|
|
8085
8125
|
) }),
|
|
8086
8126
|
/* @__PURE__ */ jsx57(TooltipContent, { sideOffset: 8, children: "HTML Code" })
|
|
8087
8127
|
] }),
|
|
8088
|
-
/* @__PURE__ */
|
|
8128
|
+
/* @__PURE__ */ jsxs33(Tooltip, { children: [
|
|
8089
8129
|
/* @__PURE__ */ jsx57(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(
|
|
8090
8130
|
"button",
|
|
8091
8131
|
{
|
|
@@ -8152,7 +8192,7 @@ var useInlineImageState = (editor) => {
|
|
|
8152
8192
|
|
|
8153
8193
|
// src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx
|
|
8154
8194
|
import { ImageDownIcon } from "lucide-react";
|
|
8155
|
-
import { jsx as jsx58, jsxs as
|
|
8195
|
+
import { jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
8156
8196
|
function InlineImageBubbleMenu(props) {
|
|
8157
8197
|
var _a, _b;
|
|
8158
8198
|
const { editor, appendTo } = props;
|
|
@@ -8180,7 +8220,7 @@ function InlineImageBubbleMenu(props) {
|
|
|
8180
8220
|
BubbleMenu9,
|
|
8181
8221
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
8182
8222
|
className: "mly-flex mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
8183
|
-
children: /* @__PURE__ */ jsx58(TooltipProvider, { children: /* @__PURE__ */
|
|
8223
|
+
children: /* @__PURE__ */ jsx58(TooltipProvider, { children: /* @__PURE__ */ jsxs34("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
8184
8224
|
/* @__PURE__ */ jsx58(
|
|
8185
8225
|
LinkInputPopover,
|
|
8186
8226
|
{
|
|
@@ -8231,7 +8271,7 @@ function InlineImageBubbleMenu(props) {
|
|
|
8231
8271
|
}
|
|
8232
8272
|
|
|
8233
8273
|
// src/editor/index.tsx
|
|
8234
|
-
import { jsx as jsx59, jsxs as
|
|
8274
|
+
import { jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
8235
8275
|
function Editor11(props) {
|
|
8236
8276
|
const {
|
|
8237
8277
|
config: {
|
|
@@ -8311,7 +8351,7 @@ function Editor11(props) {
|
|
|
8311
8351
|
variableTriggerCharacter,
|
|
8312
8352
|
renderVariable,
|
|
8313
8353
|
placeholderUrl,
|
|
8314
|
-
children: /* @__PURE__ */
|
|
8354
|
+
children: /* @__PURE__ */ jsxs35(
|
|
8315
8355
|
"div",
|
|
8316
8356
|
{
|
|
8317
8357
|
className: cn(
|
|
@@ -8322,7 +8362,7 @@ function Editor11(props) {
|
|
|
8322
8362
|
ref: menuContainerRef,
|
|
8323
8363
|
children: [
|
|
8324
8364
|
hasMenuBar && /* @__PURE__ */ jsx59(EditorMenuBar, { config: props.config, editor }),
|
|
8325
|
-
/* @__PURE__ */
|
|
8365
|
+
/* @__PURE__ */ jsxs35(
|
|
8326
8366
|
"div",
|
|
8327
8367
|
{
|
|
8328
8368
|
className: cn(
|