@daisychainapp/maily-to-core 0.4.0 → 0.4.2
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 +52 -76
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +51 -75
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +701 -839
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +12 -19
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +547 -685
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/LICENSE +0 -21
|
@@ -4481,7 +4481,14 @@ function BubbleMenuButton(item) {
|
|
|
4481
4481
|
if (tooltip) {
|
|
4482
4482
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Tooltip, { children: [
|
|
4483
4483
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TooltipTrigger, { asChild: true, children: content }),
|
|
4484
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
4484
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
4485
|
+
TooltipContent,
|
|
4486
|
+
{
|
|
4487
|
+
sideOffset: 8,
|
|
4488
|
+
className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
|
|
4489
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: tooltip })
|
|
4490
|
+
}
|
|
4491
|
+
)
|
|
4485
4492
|
] });
|
|
4486
4493
|
}
|
|
4487
4494
|
return content;
|
|
@@ -5220,7 +5227,14 @@ function AlignmentSwitch(props) {
|
|
|
5220
5227
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(activeAlignment.icon, { className: "mly:h-3 mly:w-3 mly:stroke-[2.5]" })
|
|
5221
5228
|
}
|
|
5222
5229
|
) }),
|
|
5223
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
5230
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
5231
|
+
TooltipContent,
|
|
5232
|
+
{
|
|
5233
|
+
sideOffset: 8,
|
|
5234
|
+
className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
|
|
5235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: "Alignment" })
|
|
5236
|
+
}
|
|
5237
|
+
)
|
|
5224
5238
|
] }),
|
|
5225
5239
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
5226
5240
|
PopoverContent,
|
|
@@ -5304,7 +5318,14 @@ function ColorPicker(props) {
|
|
|
5304
5318
|
children: [
|
|
5305
5319
|
tooltip ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Tooltip, { children: [
|
|
5306
5320
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipTrigger, { asChild: true, children: popoverButton }),
|
|
5307
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
5321
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
5322
|
+
TooltipContent,
|
|
5323
|
+
{
|
|
5324
|
+
sideOffset: 8,
|
|
5325
|
+
className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
|
|
5326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: tooltip })
|
|
5327
|
+
}
|
|
5328
|
+
)
|
|
5308
5329
|
] }) : popoverButton,
|
|
5309
5330
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
5310
5331
|
PopoverContent,
|
|
@@ -6928,7 +6949,14 @@ function LinkInputPopover(props) {
|
|
|
6928
6949
|
children: [
|
|
6929
6950
|
tooltip ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { children: [
|
|
6930
6951
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger, { asChild: true, children: popoverButton }),
|
|
6931
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6952
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6953
|
+
TooltipContent,
|
|
6954
|
+
{
|
|
6955
|
+
sideOffset: 8,
|
|
6956
|
+
className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
|
|
6957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: tooltip })
|
|
6958
|
+
}
|
|
6959
|
+
)
|
|
6932
6960
|
] }) : popoverButton,
|
|
6933
6961
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6934
6962
|
PopoverContent,
|
|
@@ -7061,7 +7089,14 @@ function Select(props) {
|
|
|
7061
7089
|
}
|
|
7062
7090
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Tooltip, { children: [
|
|
7063
7091
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipTrigger, { asChild: true, children: content }),
|
|
7064
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7092
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7093
|
+
TooltipContent,
|
|
7094
|
+
{
|
|
7095
|
+
sideOffset: 8,
|
|
7096
|
+
className: "mly:border-gray-300 mly:bg-transparent mly:p-0 mly:text-gray-700 mly:shadow-sm",
|
|
7097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "mly:block mly:rounded-md mly:bg-soft-gray mly:!px-2 mly:!py-1.5", children: tooltip })
|
|
7098
|
+
}
|
|
7099
|
+
)
|
|
7065
7100
|
] });
|
|
7066
7101
|
}
|
|
7067
7102
|
|
|
@@ -8658,89 +8693,30 @@ function getVariableSuggestions(char = DEFAULT_VARIABLE_TRIGGER_CHAR) {
|
|
|
8658
8693
|
// src/editor/nodes/html/html.tsx
|
|
8659
8694
|
var import_extension_code_block_lowlight = __toESM(require("@tiptap/extension-code-block-lowlight"), 1);
|
|
8660
8695
|
var import_state5 = require("@tiptap/pm/state");
|
|
8661
|
-
var
|
|
8696
|
+
var import_react36 = require("@tiptap/react");
|
|
8662
8697
|
var import_xml = __toESM(require("highlight.js/lib/languages/xml"), 1);
|
|
8663
8698
|
var import_lowlight = require("lowlight");
|
|
8664
8699
|
|
|
8665
8700
|
// src/editor/nodes/html/html-view.tsx
|
|
8666
8701
|
var import_react35 = require("@tiptap/react");
|
|
8667
|
-
var import_react36 = require("react");
|
|
8668
8702
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
8669
8703
|
function HTMLCodeBlockView(props) {
|
|
8670
|
-
const { node
|
|
8671
|
-
|
|
8672
|
-
activeTab || (activeTab = "code");
|
|
8704
|
+
const { node } = props;
|
|
8705
|
+
const { language } = node.attrs;
|
|
8673
8706
|
const languageClass = language ? `language-${language}` : "";
|
|
8674
|
-
|
|
8675
|
-
const text2 = node.content.content.reduce((acc, cur) => {
|
|
8676
|
-
if (cur.type.name === "text") {
|
|
8677
|
-
return acc + cur.text;
|
|
8678
|
-
} else if (cur.type.name === "variable") {
|
|
8679
|
-
const { id: variable, fallback } = (cur == null ? void 0 : cur.attrs) || {};
|
|
8680
|
-
const formattedVariable = fallback ? `{{${variable},fallback=${fallback}}}` : `{{${variable}}}`;
|
|
8681
|
-
return acc + formattedVariable;
|
|
8682
|
-
}
|
|
8683
|
-
return acc;
|
|
8684
|
-
}, "");
|
|
8685
|
-
const htmlParser = new DOMParser();
|
|
8686
|
-
const htmlDoc = htmlParser.parseFromString(text2, "text/html");
|
|
8687
|
-
const style = htmlDoc.querySelectorAll("style");
|
|
8688
|
-
const body = htmlDoc.body;
|
|
8689
|
-
const combinedStyle = Array.from(style).map((s) => s.innerHTML).join("\n");
|
|
8690
|
-
return `<style>${combinedStyle}</style>${body.innerHTML}`;
|
|
8691
|
-
}, [activeTab]);
|
|
8692
|
-
const isEmpty = html2 === "";
|
|
8693
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8694
8708
|
import_react35.NodeViewWrapper,
|
|
8695
8709
|
{
|
|
8696
8710
|
draggable: false,
|
|
8697
8711
|
"data-drag-handle": false,
|
|
8698
8712
|
"data-type": "htmlCodeBlock",
|
|
8699
|
-
children:
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
) }),
|
|
8707
|
-
activeTab === "preview" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8708
|
-
"div",
|
|
8709
|
-
{
|
|
8710
|
-
className: cn(
|
|
8711
|
-
"mly:not-prose mly:rounded-lg mly:border mly:border-gray-200 mly:p-2",
|
|
8712
|
-
isEmpty && "mly:min-h-[42px]"
|
|
8713
|
-
),
|
|
8714
|
-
ref: (node2) => {
|
|
8715
|
-
if (!node2 || (node2 == null ? void 0 : node2.shadowRoot)) {
|
|
8716
|
-
return;
|
|
8717
|
-
}
|
|
8718
|
-
const shadow = node2.attachShadow({ mode: "open" });
|
|
8719
|
-
const sheet = new CSSStyleSheet();
|
|
8720
|
-
sheet.replaceSync(`
|
|
8721
|
-
* { font-family: 'Inter', sans-serif; }
|
|
8722
|
-
blockquote, h1, h2, h3, img, li, ol, p, ul {
|
|
8723
|
-
margin-top: 0;
|
|
8724
|
-
margin-bottom: 0;
|
|
8725
|
-
}
|
|
8726
|
-
`);
|
|
8727
|
-
shadow.adoptedStyleSheets = [sheet];
|
|
8728
|
-
const container = document.createElement("div");
|
|
8729
|
-
container.innerHTML = html2;
|
|
8730
|
-
shadow.appendChild(container);
|
|
8731
|
-
},
|
|
8732
|
-
contentEditable: false,
|
|
8733
|
-
onClick: () => {
|
|
8734
|
-
if (!isEmpty) {
|
|
8735
|
-
return;
|
|
8736
|
-
}
|
|
8737
|
-
updateAttributes2({
|
|
8738
|
-
activeTab: "code"
|
|
8739
|
-
});
|
|
8740
|
-
}
|
|
8741
|
-
}
|
|
8742
|
-
)
|
|
8743
|
-
]
|
|
8713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "mly-html-code-pre", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8714
|
+
import_react35.NodeViewContent,
|
|
8715
|
+
{
|
|
8716
|
+
as: "code",
|
|
8717
|
+
className: cn("is-editable", languageClass)
|
|
8718
|
+
}
|
|
8719
|
+
) })
|
|
8744
8720
|
}
|
|
8745
8721
|
);
|
|
8746
8722
|
}
|
|
@@ -8772,7 +8748,7 @@ var HTMLCodeBlockExtension = import_extension_code_block_lowlight.default.extend
|
|
|
8772
8748
|
});
|
|
8773
8749
|
},
|
|
8774
8750
|
addNodeView() {
|
|
8775
|
-
return (0,
|
|
8751
|
+
return (0, import_react36.ReactNodeViewRenderer)(HTMLCodeBlockView, {
|
|
8776
8752
|
className: "mly:relative",
|
|
8777
8753
|
attrs: ({ node }) => {
|
|
8778
8754
|
var _a;
|