@maily-to/core 0.3.3 → 0.3.4
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 +22 -9
- 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 +22 -9
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +23 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +23 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -5558,7 +5558,7 @@ function ColorPicker(props) {
|
|
|
5558
5558
|
BaseButton,
|
|
5559
5559
|
{
|
|
5560
5560
|
variant: "ghost",
|
|
5561
|
-
className: "
|
|
5561
|
+
className: "mly:h-7 mly:w-7 mly:shrink-0",
|
|
5562
5562
|
size: "sm",
|
|
5563
5563
|
type: "button",
|
|
5564
5564
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
@@ -6659,7 +6659,7 @@ var VariableSuggestionsPopover = (0, import_react17.forwardRef)((props, ref) =>
|
|
|
6659
6659
|
),
|
|
6660
6660
|
children: [
|
|
6661
6661
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Braces, { className: "mly:size-3 mly:stroke-[2.5] mly:text-rose-600" }),
|
|
6662
|
-
item.name
|
|
6662
|
+
(item == null ? void 0 : item.label) || item.name
|
|
6663
6663
|
]
|
|
6664
6664
|
},
|
|
6665
6665
|
index
|
|
@@ -6697,7 +6697,13 @@ var import_react19 = require("react");
|
|
|
6697
6697
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
6698
6698
|
function VariableView(props) {
|
|
6699
6699
|
const { node, updateAttributes: updateAttributes2, editor } = props;
|
|
6700
|
-
const {
|
|
6700
|
+
const {
|
|
6701
|
+
id,
|
|
6702
|
+
fallback,
|
|
6703
|
+
required,
|
|
6704
|
+
hideDefaultValue = false,
|
|
6705
|
+
label
|
|
6706
|
+
} = node.attrs;
|
|
6701
6707
|
const renderVariable = (0, import_react19.useMemo)(() => {
|
|
6702
6708
|
var _a, _b;
|
|
6703
6709
|
const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
|
|
@@ -6716,7 +6722,12 @@ function VariableView(props) {
|
|
|
6716
6722
|
},
|
|
6717
6723
|
children: [
|
|
6718
6724
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PopoverTrigger, { children: renderVariable({
|
|
6719
|
-
variable: {
|
|
6725
|
+
variable: {
|
|
6726
|
+
name: id,
|
|
6727
|
+
required,
|
|
6728
|
+
valid: true,
|
|
6729
|
+
label
|
|
6730
|
+
},
|
|
6720
6731
|
fallback,
|
|
6721
6732
|
editor,
|
|
6722
6733
|
from: "content-variable"
|
|
@@ -6778,11 +6789,12 @@ function VariableView(props) {
|
|
|
6778
6789
|
}
|
|
6779
6790
|
var DefaultRenderVariable = (props) => {
|
|
6780
6791
|
const { variable, fallback, from } = props;
|
|
6781
|
-
const { name, required, valid } = variable;
|
|
6792
|
+
const { name, required, valid, label } = variable;
|
|
6793
|
+
const variableLabel = label || name;
|
|
6782
6794
|
if (from === "button-variable") {
|
|
6783
6795
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mly:inline-grid mly:max-w-xs mly:grid-cols-[12px_1fr] mly:items-center mly:gap-1.5 mly:rounded-md mly:border mly:border-(--button-var-border-color) mly:px-2 mly:py-px mly:font-mono mly:text-xs", children: [
|
|
6784
6796
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Braces, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
|
|
6785
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children:
|
|
6797
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
|
|
6786
6798
|
] });
|
|
6787
6799
|
}
|
|
6788
6800
|
if (from === "bubble-variable") {
|
|
@@ -6795,7 +6807,7 @@ var DefaultRenderVariable = (props) => {
|
|
|
6795
6807
|
),
|
|
6796
6808
|
children: [
|
|
6797
6809
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Braces, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
|
|
6798
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children:
|
|
6810
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
|
|
6799
6811
|
]
|
|
6800
6812
|
}
|
|
6801
6813
|
);
|
|
@@ -6807,7 +6819,7 @@ var DefaultRenderVariable = (props) => {
|
|
|
6807
6819
|
className: "mly:inline-flex mly:items-center mly:gap-(--variable-icon-gap) mly:rounded-full mly:border mly:border-gray-200 mly:px-1.5 mly:py-0.5 mly:leading-none",
|
|
6808
6820
|
children: [
|
|
6809
6821
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Braces, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
|
|
6810
|
-
|
|
6822
|
+
variableLabel,
|
|
6811
6823
|
required && !fallback && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.AlertTriangle, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5]" })
|
|
6812
6824
|
]
|
|
6813
6825
|
}
|
|
@@ -8714,7 +8726,8 @@ var VariableList = (0, import_react35.forwardRef)((props, ref) => {
|
|
|
8714
8726
|
props.command({
|
|
8715
8727
|
id: value.name,
|
|
8716
8728
|
required: (_a2 = value.required) != null ? _a2 : true,
|
|
8717
|
-
hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false
|
|
8729
|
+
hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false,
|
|
8730
|
+
label: value == null ? void 0 : value.label
|
|
8718
8731
|
});
|
|
8719
8732
|
},
|
|
8720
8733
|
ref: popoverRef
|