@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.
@@ -6193,7 +6193,7 @@ var import_react19 = require("react");
6193
6193
  var import_jsx_runtime29 = require("react/jsx-runtime");
6194
6194
  function VariableView(props) {
6195
6195
  const { node, updateAttributes: updateAttributes2, editor } = props;
6196
- const { id, fallback, required } = node.attrs;
6196
+ const { id, fallback, required, hideDefaultValue = false } = node.attrs;
6197
6197
  const renderVariable = (0, import_react19.useMemo)(() => {
6198
6198
  var _a, _b;
6199
6199
  const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
@@ -6248,23 +6248,25 @@ function VariableView(props) {
6248
6248
  })
6249
6249
  )
6250
6250
  ] }),
6251
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Divider, { className: "mly-mx-1.5" }),
6252
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "mly-relative", children: [
6253
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
6254
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6255
- "input",
6256
- __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
6257
- value: fallback != null ? fallback : "",
6258
- onChange: (e) => {
6259
- updateAttributes2({
6260
- fallback: e.target.value
6261
- });
6262
- },
6263
- placeholder: "ie. John Doe...",
6264
- 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"
6265
- })
6266
- ),
6267
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Pencil, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
6251
+ !hideDefaultValue && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
6252
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Divider, { className: "mly-mx-1.5" }),
6253
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "mly-relative", children: [
6254
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
6255
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6256
+ "input",
6257
+ __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
6258
+ value: fallback != null ? fallback : "",
6259
+ onChange: (e) => {
6260
+ updateAttributes2({
6261
+ fallback: e.target.value
6262
+ });
6263
+ },
6264
+ placeholder: "ie. John Doe...",
6265
+ 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"
6266
+ })
6267
+ ),
6268
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Pencil, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
6269
+ ] })
6268
6270
  ] })
6269
6271
  ] }) })
6270
6272
  }
@@ -6419,6 +6421,9 @@ var VariableExtension = import_core11.Node.create({
6419
6421
  "data-required": (_a = attributes == null ? void 0 : attributes.required) != null ? _a : true
6420
6422
  };
6421
6423
  }
6424
+ },
6425
+ hideDefaultValue: {
6426
+ default: false
6422
6427
  }
6423
6428
  };
6424
6429
  },
@@ -8206,10 +8211,11 @@ var VariableList = (0, import_react35.forwardRef)((props, ref) => {
8206
8211
  {
8207
8212
  items,
8208
8213
  onSelectItem: (value) => {
8209
- var _a2;
8214
+ var _a2, _b;
8210
8215
  props.command({
8211
8216
  id: value.name,
8212
- required: (_a2 = value.required) != null ? _a2 : true
8217
+ required: (_a2 = value.required) != null ? _a2 : true,
8218
+ hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false
8213
8219
  });
8214
8220
  },
8215
8221
  ref: popoverRef