@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/extensions/index.cjs +26 -20
- 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 +32 -26
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +26 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +40 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +11 -4
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<h1 align="center"><img height="150" src="https://maily.to/brand/icon.svg" /><br> @maily
|
|
1
|
+
<h1 align="center"><img height="150" src="https://maily.to/brand/icon.svg" /><br> @maily-to/core</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://github.com/arikchakma/maily.to/blob/main/license">
|
|
@@ -156,7 +156,7 @@ You can pass variables to the editor in two ways:
|
|
|
156
156
|
<Editor
|
|
157
157
|
extensions={[
|
|
158
158
|
VariableExtension.configure({
|
|
159
|
-
|
|
159
|
+
suggestion: getVariableSuggestions('@'),
|
|
160
160
|
variables: [{
|
|
161
161
|
name: 'currentTime',
|
|
162
162
|
required: false,
|
|
@@ -177,7 +177,7 @@ You can pass variables to the editor in two ways:
|
|
|
177
177
|
<Editor
|
|
178
178
|
extensions={[
|
|
179
179
|
VariableExtension.configure({
|
|
180
|
-
|
|
180
|
+
suggestion: getVariableSuggestions('@'),
|
|
181
181
|
variables: ({ query, from, editor }) => {
|
|
182
182
|
// magic goes here
|
|
183
183
|
// query: the text after the trigger character
|
|
@@ -194,6 +194,13 @@ You can pass variables to the editor in two ways:
|
|
|
194
194
|
return [
|
|
195
195
|
{ name: 'currentDate' },
|
|
196
196
|
{ name: 'currentTime', required: false },
|
|
197
|
+
{
|
|
198
|
+
name: 'first_name',
|
|
199
|
+
required: false,
|
|
200
|
+
// if you want to hide the default value
|
|
201
|
+
// input in the popover
|
|
202
|
+
hideDefaultValue: true,
|
|
203
|
+
},
|
|
197
204
|
];
|
|
198
205
|
},
|
|
199
206
|
}),
|
|
@@ -229,7 +236,7 @@ import { MailyKit, VariableExtension, getVariableSuggestions } from '@maily-to/c
|
|
|
229
236
|
});
|
|
230
237
|
},
|
|
231
238
|
}).configure({
|
|
232
|
-
|
|
239
|
+
suggestion: getVariableSuggestions(variableTriggerCharacter),
|
|
233
240
|
}),
|
|
234
241
|
]}
|
|
235
242
|
/>
|