@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
package/dist/index.mjs
CHANGED
|
@@ -7361,7 +7361,7 @@ var VariableSuggestionsPopover = forwardRef5((props, ref) => {
|
|
|
7361
7361
|
),
|
|
7362
7362
|
children: [
|
|
7363
7363
|
/* @__PURE__ */ jsx33(Braces, { className: "mly:size-3 mly:stroke-[2.5] mly:text-rose-600" }),
|
|
7364
|
-
item.name
|
|
7364
|
+
(item == null ? void 0 : item.label) || item.name
|
|
7365
7365
|
]
|
|
7366
7366
|
},
|
|
7367
7367
|
index
|
|
@@ -7399,7 +7399,13 @@ import { useMemo as useMemo5 } from "react";
|
|
|
7399
7399
|
import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7400
7400
|
function VariableView(props) {
|
|
7401
7401
|
const { node, updateAttributes: updateAttributes2, editor } = props;
|
|
7402
|
-
const {
|
|
7402
|
+
const {
|
|
7403
|
+
id,
|
|
7404
|
+
fallback,
|
|
7405
|
+
required,
|
|
7406
|
+
hideDefaultValue = false,
|
|
7407
|
+
label
|
|
7408
|
+
} = node.attrs;
|
|
7403
7409
|
const renderVariable = useMemo5(() => {
|
|
7404
7410
|
var _a, _b;
|
|
7405
7411
|
const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
|
|
@@ -7418,7 +7424,12 @@ function VariableView(props) {
|
|
|
7418
7424
|
},
|
|
7419
7425
|
children: [
|
|
7420
7426
|
/* @__PURE__ */ jsx34(PopoverTrigger, { children: renderVariable({
|
|
7421
|
-
variable: {
|
|
7427
|
+
variable: {
|
|
7428
|
+
name: id,
|
|
7429
|
+
required,
|
|
7430
|
+
valid: true,
|
|
7431
|
+
label
|
|
7432
|
+
},
|
|
7422
7433
|
fallback,
|
|
7423
7434
|
editor,
|
|
7424
7435
|
from: "content-variable"
|
|
@@ -7480,11 +7491,12 @@ function VariableView(props) {
|
|
|
7480
7491
|
}
|
|
7481
7492
|
var DefaultRenderVariable = (props) => {
|
|
7482
7493
|
const { variable, fallback, from } = props;
|
|
7483
|
-
const { name, required, valid } = variable;
|
|
7494
|
+
const { name, required, valid, label } = variable;
|
|
7495
|
+
const variableLabel = label || name;
|
|
7484
7496
|
if (from === "button-variable") {
|
|
7485
7497
|
return /* @__PURE__ */ jsxs16("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: [
|
|
7486
7498
|
/* @__PURE__ */ jsx34(Braces2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5]" }),
|
|
7487
|
-
/* @__PURE__ */ jsx34("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children:
|
|
7499
|
+
/* @__PURE__ */ jsx34("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
|
|
7488
7500
|
] });
|
|
7489
7501
|
}
|
|
7490
7502
|
if (from === "bubble-variable") {
|
|
@@ -7497,7 +7509,7 @@ var DefaultRenderVariable = (props) => {
|
|
|
7497
7509
|
),
|
|
7498
7510
|
children: [
|
|
7499
7511
|
/* @__PURE__ */ jsx34(Braces2, { className: "mly:h-3 mly:w-3 mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
|
|
7500
|
-
/* @__PURE__ */ jsx34("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children:
|
|
7512
|
+
/* @__PURE__ */ jsx34("span", { className: "mly:min-w-0 mly:truncate mly:text-left", children: variableLabel })
|
|
7501
7513
|
]
|
|
7502
7514
|
}
|
|
7503
7515
|
);
|
|
@@ -7509,7 +7521,7 @@ var DefaultRenderVariable = (props) => {
|
|
|
7509
7521
|
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",
|
|
7510
7522
|
children: [
|
|
7511
7523
|
/* @__PURE__ */ jsx34(Braces2, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5] mly:text-rose-600" }),
|
|
7512
|
-
|
|
7524
|
+
variableLabel,
|
|
7513
7525
|
required && !fallback && /* @__PURE__ */ jsx34(AlertTriangle, { className: "mly:size-[var(--variable-icon-size)] mly:shrink-0 mly:stroke-[2.5]" })
|
|
7514
7526
|
]
|
|
7515
7527
|
}
|
|
@@ -8587,7 +8599,7 @@ function ColorPicker(props) {
|
|
|
8587
8599
|
BaseButton,
|
|
8588
8600
|
{
|
|
8589
8601
|
variant: "ghost",
|
|
8590
|
-
className: "
|
|
8602
|
+
className: "mly:h-7 mly:w-7 mly:shrink-0",
|
|
8591
8603
|
size: "sm",
|
|
8592
8604
|
type: "button",
|
|
8593
8605
|
children: /* @__PURE__ */ jsx43(
|
|
@@ -8884,7 +8896,7 @@ function SectionBubbleMenu(props) {
|
|
|
8884
8896
|
BaseButton,
|
|
8885
8897
|
{
|
|
8886
8898
|
variant: "ghost",
|
|
8887
|
-
className: "
|
|
8899
|
+
className: "mly:h-7 mly:w-7 mly:shrink-0",
|
|
8888
8900
|
size: "sm",
|
|
8889
8901
|
type: "button",
|
|
8890
8902
|
children: /* @__PURE__ */ jsx44(
|
|
@@ -11268,7 +11280,8 @@ var VariableList = forwardRef9((props, ref) => {
|
|
|
11268
11280
|
props.command({
|
|
11269
11281
|
id: value.name,
|
|
11270
11282
|
required: (_a2 = value.required) != null ? _a2 : true,
|
|
11271
|
-
hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false
|
|
11283
|
+
hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false,
|
|
11284
|
+
label: value == null ? void 0 : value.label
|
|
11272
11285
|
});
|
|
11273
11286
|
},
|
|
11274
11287
|
ref: popoverRef
|