@maily-to/core 0.3.1 → 0.3.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 +26 -20
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +3 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.mjs +32 -26
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +26 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +40 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +11 -4
package/dist/index.mjs
CHANGED
|
@@ -6892,10 +6892,10 @@ function VariableIcon(props) {
|
|
|
6892
6892
|
import { NodeViewWrapper as NodeViewWrapper3 } from "@tiptap/react";
|
|
6893
6893
|
import { AlertTriangle, Braces as Braces2, Pencil } from "lucide-react";
|
|
6894
6894
|
import { useMemo as useMemo5 } from "react";
|
|
6895
|
-
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6895
|
+
import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6896
6896
|
function VariableView(props) {
|
|
6897
6897
|
const { node, updateAttributes: updateAttributes2, editor } = props;
|
|
6898
|
-
const { id, fallback, required } = node.attrs;
|
|
6898
|
+
const { id, fallback, required, hideDefaultValue = false } = node.attrs;
|
|
6899
6899
|
const renderVariable = useMemo5(() => {
|
|
6900
6900
|
var _a, _b;
|
|
6901
6901
|
const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
|
|
@@ -6950,23 +6950,25 @@ function VariableView(props) {
|
|
|
6950
6950
|
})
|
|
6951
6951
|
)
|
|
6952
6952
|
] }),
|
|
6953
|
-
/* @__PURE__ */
|
|
6954
|
-
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6953
|
+
!hideDefaultValue && /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
6954
|
+
/* @__PURE__ */ jsx34(Divider, { className: "mly-mx-1.5" }),
|
|
6955
|
+
/* @__PURE__ */ jsxs16("label", { className: "mly-relative", children: [
|
|
6956
|
+
/* @__PURE__ */ jsx34("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
|
|
6957
|
+
/* @__PURE__ */ jsx34(
|
|
6958
|
+
"input",
|
|
6959
|
+
__spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
|
|
6960
|
+
value: fallback != null ? fallback : "",
|
|
6961
|
+
onChange: (e) => {
|
|
6962
|
+
updateAttributes2({
|
|
6963
|
+
fallback: e.target.value
|
|
6964
|
+
});
|
|
6965
|
+
},
|
|
6966
|
+
placeholder: "ie. John Doe...",
|
|
6967
|
+
className: "mly-h-7 mly-w-32 mly-rounded-md mly-bg-soft-gray mly-px-2 mly-pr-6 mly-text-sm mly-text-midnight-gray focus:mly-bg-soft-gray focus:mly-outline-none"
|
|
6968
|
+
})
|
|
6969
|
+
),
|
|
6970
|
+
/* @__PURE__ */ jsx34("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx34(Pencil, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
6971
|
+
] })
|
|
6970
6972
|
] })
|
|
6971
6973
|
] }) })
|
|
6972
6974
|
}
|
|
@@ -7121,6 +7123,9 @@ var VariableExtension = Node4.create({
|
|
|
7121
7123
|
"data-required": (_a = attributes == null ? void 0 : attributes.required) != null ? _a : true
|
|
7122
7124
|
};
|
|
7123
7125
|
}
|
|
7126
|
+
},
|
|
7127
|
+
hideDefaultValue: {
|
|
7128
|
+
default: false
|
|
7124
7129
|
}
|
|
7125
7130
|
};
|
|
7126
7131
|
},
|
|
@@ -7375,7 +7380,7 @@ var useImageState = (editor) => {
|
|
|
7375
7380
|
};
|
|
7376
7381
|
|
|
7377
7382
|
// src/editor/components/image-menu/image-bubble-menu.tsx
|
|
7378
|
-
import { Fragment as
|
|
7383
|
+
import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7379
7384
|
function ImageBubbleMenu(props) {
|
|
7380
7385
|
var _a, _b, _c, _d;
|
|
7381
7386
|
const { editor, appendTo } = props;
|
|
@@ -7405,7 +7410,7 @@ function ImageBubbleMenu(props) {
|
|
|
7405
7410
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
7406
7411
|
className: "mly-flex mly-rounded-lg mly-border mly-border-gray-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
7407
7412
|
children: /* @__PURE__ */ jsxs19(TooltipProvider, { children: [
|
|
7408
|
-
state.isLogoActive && state.imageSrc && /* @__PURE__ */ jsxs19(
|
|
7413
|
+
state.isLogoActive && state.imageSrc && /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
7409
7414
|
/* @__PURE__ */ jsx37(
|
|
7410
7415
|
Select,
|
|
7411
7416
|
{
|
|
@@ -7477,7 +7482,7 @@ function ImageBubbleMenu(props) {
|
|
|
7477
7482
|
}
|
|
7478
7483
|
)
|
|
7479
7484
|
] }),
|
|
7480
|
-
state.isImageActive && state.imageSrc && /* @__PURE__ */ jsxs19(
|
|
7485
|
+
state.isImageActive && state.imageSrc && /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
7481
7486
|
/* @__PURE__ */ jsx37(Divider, {}),
|
|
7482
7487
|
/* @__PURE__ */ jsx37(
|
|
7483
7488
|
Select,
|
|
@@ -8201,7 +8206,7 @@ var useSectionState = (editor) => {
|
|
|
8201
8206
|
};
|
|
8202
8207
|
|
|
8203
8208
|
// src/editor/components/section-menu/section-bubble-menu.tsx
|
|
8204
|
-
import { Fragment as
|
|
8209
|
+
import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8205
8210
|
function SectionBubbleMenu(props) {
|
|
8206
8211
|
const { appendTo, editor } = props;
|
|
8207
8212
|
if (!editor) {
|
|
@@ -8437,7 +8442,7 @@ function SectionBubbleMenu(props) {
|
|
|
8437
8442
|
editor
|
|
8438
8443
|
}
|
|
8439
8444
|
),
|
|
8440
|
-
state.isColumnsActive && /* @__PURE__ */ jsxs24(
|
|
8445
|
+
state.isColumnsActive && /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
8441
8446
|
/* @__PURE__ */ jsx44(Divider, {}),
|
|
8442
8447
|
/* @__PURE__ */ jsxs24(Popover, { children: [
|
|
8443
8448
|
/* @__PURE__ */ jsxs24(PopoverTrigger, { className: "mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-px-1.5 mly-text-sm data-[state=open]:mly-bg-soft-gray hover:mly-bg-soft-gray", children: [
|
|
@@ -10266,7 +10271,7 @@ var SlashCommandExtension = Extension3.create({
|
|
|
10266
10271
|
import { ReactRenderer } from "@tiptap/react";
|
|
10267
10272
|
import {
|
|
10268
10273
|
forwardRef as forwardRef8,
|
|
10269
|
-
Fragment as
|
|
10274
|
+
Fragment as Fragment8,
|
|
10270
10275
|
useCallback as useCallback11,
|
|
10271
10276
|
useEffect as useEffect8,
|
|
10272
10277
|
useImperativeHandle as useImperativeHandle2,
|
|
@@ -10279,7 +10284,7 @@ import tippy2 from "tippy.js";
|
|
|
10279
10284
|
// src/editor/extensions/slash-command/slash-command-item.tsx
|
|
10280
10285
|
import { ChevronRightIcon } from "lucide-react";
|
|
10281
10286
|
import { useCallback as useCallback10, useState as useState10, useRef as useRef10, useEffect as useEffect7 } from "react";
|
|
10282
|
-
import { Fragment as
|
|
10287
|
+
import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10283
10288
|
function SlashCommandItem(props) {
|
|
10284
10289
|
var _a;
|
|
10285
10290
|
const {
|
|
@@ -10302,7 +10307,7 @@ function SlashCommandItem(props) {
|
|
|
10302
10307
|
const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && (isHovered || isActive && !hoveredItemKey);
|
|
10303
10308
|
const hasRenderFunction = typeof item.render === "function";
|
|
10304
10309
|
const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
|
|
10305
|
-
let value = /* @__PURE__ */ jsxs31(
|
|
10310
|
+
let value = /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
10306
10311
|
/* @__PURE__ */ jsx53("div", { className: "mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center", children: item.icon }),
|
|
10307
10312
|
/* @__PURE__ */ jsxs31("div", { className: "mly-grow", children: [
|
|
10308
10313
|
/* @__PURE__ */ jsx53("p", { className: "mly-font-medium", children: item.title }),
|
|
@@ -10361,7 +10366,7 @@ function SlashCommandItem(props) {
|
|
|
10361
10366
|
side: "right",
|
|
10362
10367
|
sideOffset: 10,
|
|
10363
10368
|
className: "mly-w-52 mly-rounded-lg mly-border-none mly-p-1 mly-shadow",
|
|
10364
|
-
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ jsxs31(
|
|
10369
|
+
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
10365
10370
|
/* @__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(
|
|
10366
10371
|
"img",
|
|
10367
10372
|
{
|
|
@@ -10604,7 +10609,7 @@ var CommandList = forwardRef8((props, ref) => {
|
|
|
10604
10609
|
id: "slash-command",
|
|
10605
10610
|
ref: commandListContainer,
|
|
10606
10611
|
className: "mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto",
|
|
10607
|
-
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs32(
|
|
10612
|
+
children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
10608
10613
|
/* @__PURE__ */ jsx54(
|
|
10609
10614
|
"span",
|
|
10610
10615
|
{
|
|
@@ -10760,10 +10765,11 @@ var VariableList = forwardRef9((props, ref) => {
|
|
|
10760
10765
|
{
|
|
10761
10766
|
items,
|
|
10762
10767
|
onSelectItem: (value) => {
|
|
10763
|
-
var _a2;
|
|
10768
|
+
var _a2, _b;
|
|
10764
10769
|
props.command({
|
|
10765
10770
|
id: value.name,
|
|
10766
|
-
required: (_a2 = value.required) != null ? _a2 : true
|
|
10771
|
+
required: (_a2 = value.required) != null ? _a2 : true,
|
|
10772
|
+
hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false
|
|
10767
10773
|
});
|
|
10768
10774
|
},
|
|
10769
10775
|
ref: popoverRef
|
|
@@ -10977,7 +10983,7 @@ var useTextMenuState = (editor) => {
|
|
|
10977
10983
|
};
|
|
10978
10984
|
|
|
10979
10985
|
// src/editor/components/text-menu/text-bubble-content.tsx
|
|
10980
|
-
import { Fragment as
|
|
10986
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
10981
10987
|
function TextBubbleContent(props) {
|
|
10982
10988
|
var _a, _b, _c, _d;
|
|
10983
10989
|
const { editor, showListMenu = true } = props;
|
|
@@ -11021,7 +11027,7 @@ function TextBubbleContent(props) {
|
|
|
11021
11027
|
tooltip: "Code"
|
|
11022
11028
|
}
|
|
11023
11029
|
];
|
|
11024
|
-
return /* @__PURE__ */ jsxs33(
|
|
11030
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
11025
11031
|
items.map((item, index) => /* @__PURE__ */ jsx56(BubbleMenuButton, __spreadValues({}, item), index)),
|
|
11026
11032
|
/* @__PURE__ */ jsx56(
|
|
11027
11033
|
AlignmentSwitch,
|
|
@@ -11032,7 +11038,7 @@ function TextBubbleContent(props) {
|
|
|
11032
11038
|
}
|
|
11033
11039
|
}
|
|
11034
11040
|
),
|
|
11035
|
-
!state.isListActive && showListMenu && /* @__PURE__ */ jsxs33(
|
|
11041
|
+
!state.isListActive && showListMenu && /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
11036
11042
|
/* @__PURE__ */ jsx56(
|
|
11037
11043
|
BubbleMenuButton,
|
|
11038
11044
|
{
|