@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/index.cjs CHANGED
@@ -6870,7 +6870,7 @@ var import_react27 = require("react");
6870
6870
  var import_jsx_runtime34 = require("react/jsx-runtime");
6871
6871
  function VariableView(props) {
6872
6872
  const { node, updateAttributes: updateAttributes2, editor } = props;
6873
- const { id, fallback, required } = node.attrs;
6873
+ const { id, fallback, required, hideDefaultValue = false } = node.attrs;
6874
6874
  const renderVariable = (0, import_react27.useMemo)(() => {
6875
6875
  var _a, _b;
6876
6876
  const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
@@ -6925,23 +6925,25 @@ function VariableView(props) {
6925
6925
  })
6926
6926
  )
6927
6927
  ] }),
6928
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Divider, { className: "mly-mx-1.5" }),
6929
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "mly-relative", children: [
6930
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
6931
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6932
- "input",
6933
- __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
6934
- value: fallback != null ? fallback : "",
6935
- onChange: (e) => {
6936
- updateAttributes2({
6937
- fallback: e.target.value
6938
- });
6939
- },
6940
- placeholder: "ie. John Doe...",
6941
- 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"
6942
- })
6943
- ),
6944
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Pencil, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
6928
+ !hideDefaultValue && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
6929
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Divider, { className: "mly-mx-1.5" }),
6930
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "mly-relative", children: [
6931
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
6932
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6933
+ "input",
6934
+ __spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
6935
+ value: fallback != null ? fallback : "",
6936
+ onChange: (e) => {
6937
+ updateAttributes2({
6938
+ fallback: e.target.value
6939
+ });
6940
+ },
6941
+ placeholder: "ie. John Doe...",
6942
+ 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"
6943
+ })
6944
+ ),
6945
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Pencil, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
6946
+ ] })
6945
6947
  ] })
6946
6948
  ] }) })
6947
6949
  }
@@ -7096,6 +7098,9 @@ var VariableExtension = import_core7.Node.create({
7096
7098
  "data-required": (_a = attributes == null ? void 0 : attributes.required) != null ? _a : true
7097
7099
  };
7098
7100
  }
7101
+ },
7102
+ hideDefaultValue: {
7103
+ default: false
7099
7104
  }
7100
7105
  };
7101
7106
  },
@@ -10724,10 +10729,11 @@ var VariableList = (0, import_react59.forwardRef)((props, ref) => {
10724
10729
  {
10725
10730
  items,
10726
10731
  onSelectItem: (value) => {
10727
- var _a2;
10732
+ var _a2, _b;
10728
10733
  props.command({
10729
10734
  id: value.name,
10730
- required: (_a2 = value.required) != null ? _a2 : true
10735
+ required: (_a2 = value.required) != null ? _a2 : true,
10736
+ hideDefaultValue: (_b = value == null ? void 0 : value.hideDefaultValue) != null ? _b : false
10731
10737
  });
10732
10738
  },
10733
10739
  ref: popoverRef