@maily-to/core 0.3.0 → 0.3.1
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 +8 -2
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +6 -0
- package/dist/extensions/index.d.ts +6 -0
- package/dist/extensions/index.mjs +8 -2
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -369,6 +369,12 @@ type VariableOptions = {
|
|
|
369
369
|
* @default VariableSuggestionPopover
|
|
370
370
|
*/
|
|
371
371
|
variableSuggestionsPopover: VariableSuggestionsPopoverType;
|
|
372
|
+
/**
|
|
373
|
+
* Disable input is the boolean that will be used to disable the input of the variable
|
|
374
|
+
* when the variable is selected.
|
|
375
|
+
* @default false
|
|
376
|
+
*/
|
|
377
|
+
disableInput: boolean;
|
|
372
378
|
};
|
|
373
379
|
type VariableStorage = {
|
|
374
380
|
popover: boolean;
|
|
@@ -369,6 +369,12 @@ type VariableOptions = {
|
|
|
369
369
|
* @default VariableSuggestionPopover
|
|
370
370
|
*/
|
|
371
371
|
variableSuggestionsPopover: VariableSuggestionsPopoverType;
|
|
372
|
+
/**
|
|
373
|
+
* Disable input is the boolean that will be used to disable the input of the variable
|
|
374
|
+
* when the variable is selected.
|
|
375
|
+
* @default false
|
|
376
|
+
*/
|
|
377
|
+
disableInput: boolean;
|
|
372
378
|
};
|
|
373
379
|
type VariableStorage = {
|
|
374
380
|
popover: boolean;
|
|
@@ -6120,7 +6120,7 @@ function VariableIcon(props) {
|
|
|
6120
6120
|
"div",
|
|
6121
6121
|
{
|
|
6122
6122
|
className: cn(
|
|
6123
|
-
"mly-flex mly-size-5 mly-items-center mly-justify-center mly-rounded-md mly-border",
|
|
6123
|
+
"mly-flex mly-size-5 mly-items-center mly-justify-center mly-rounded-md mly-border mly-border-gray-200",
|
|
6124
6124
|
className
|
|
6125
6125
|
),
|
|
6126
6126
|
children
|
|
@@ -6141,6 +6141,10 @@ function VariableView(props) {
|
|
|
6141
6141
|
const variableRender = (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.renderVariable) != null ? _b : DEFAULT_RENDER_VARIABLE_FUNCTION;
|
|
6142
6142
|
return variableRender;
|
|
6143
6143
|
}, [editor]);
|
|
6144
|
+
const disableInput = useMemo4(() => {
|
|
6145
|
+
var _a, _b;
|
|
6146
|
+
return (_b = (_a = getNodeOptions(editor, "variable")) == null ? void 0 : _a.disableInput) != null ? _b : false;
|
|
6147
|
+
}, [editor]);
|
|
6144
6148
|
return /* @__PURE__ */ jsx29(
|
|
6145
6149
|
NodeViewWrapper4,
|
|
6146
6150
|
{
|
|
@@ -6174,6 +6178,7 @@ function VariableView(props) {
|
|
|
6174
6178
|
/* @__PURE__ */ jsx29(
|
|
6175
6179
|
"input",
|
|
6176
6180
|
__spreadProps(__spreadValues({}, AUTOCOMPLETE_PASSWORD_MANAGERS_OFF), {
|
|
6181
|
+
disabled: disableInput,
|
|
6177
6182
|
value: id != null ? id : "",
|
|
6178
6183
|
onChange: (e) => {
|
|
6179
6184
|
updateAttributes2({
|
|
@@ -6181,7 +6186,7 @@ function VariableView(props) {
|
|
|
6181
6186
|
});
|
|
6182
6187
|
},
|
|
6183
6188
|
placeholder: "ie. name...",
|
|
6184
|
-
className: "mly-h-7 mly-w-36 mly-rounded-md mly-bg-soft-gray mly-px-2 mly-text-sm mly-text-midnight-gray focus:mly-bg-soft-gray focus:mly-outline-none"
|
|
6189
|
+
className: "mly-h-7 mly-w-36 mly-rounded-md mly-bg-soft-gray mly-px-2 mly-text-sm mly-text-midnight-gray focus:mly-bg-soft-gray focus:mly-outline-none disabled:mly-cursor-not-allowed"
|
|
6185
6190
|
})
|
|
6186
6191
|
)
|
|
6187
6192
|
] }),
|
|
@@ -6272,6 +6277,7 @@ var VariableExtension = Node8.create({
|
|
|
6272
6277
|
variables: DEFAULT_VARIABLES,
|
|
6273
6278
|
variableSuggestionsPopover: DEFAULT_VARIABLE_SUGGESTION_POPOVER,
|
|
6274
6279
|
renderVariable: DEFAULT_RENDER_VARIABLE_FUNCTION,
|
|
6280
|
+
disableInput: false,
|
|
6275
6281
|
renderLabel(props) {
|
|
6276
6282
|
var _a;
|
|
6277
6283
|
const { node } = props;
|