@daisychainapp/maily-to-core 0.0.22 → 0.0.23
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1203,10 +1203,12 @@ var DefaultRenderVariable = (props) => {
|
|
|
1203
1203
|
|
|
1204
1204
|
// src/editor/provider.tsx
|
|
1205
1205
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1206
|
+
var DEFAULT_PLACEHOLDER_URL = "maily.to/";
|
|
1206
1207
|
var DEFAULT_VARIABLE_TRIGGER_CHAR = "@";
|
|
1207
1208
|
var DEFAULT_VARIABLES = [];
|
|
1208
1209
|
var DEFAULT_RENDER_VARIABLE_FUNCTION = DefaultRenderVariable;
|
|
1209
1210
|
var MailyContext = createContext({
|
|
1211
|
+
placeholderUrl: DEFAULT_PLACEHOLDER_URL,
|
|
1210
1212
|
variableTriggerCharacter: DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
1211
1213
|
variables: DEFAULT_VARIABLES,
|
|
1212
1214
|
blocks: DEFAULT_SLASH_COMMANDS,
|
|
@@ -2639,7 +2641,8 @@ function LinkInputPopover(props) {
|
|
|
2639
2641
|
const {
|
|
2640
2642
|
variables = [],
|
|
2641
2643
|
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
2642
|
-
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION
|
|
2644
|
+
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION,
|
|
2645
|
+
placeholderUrl = DEFAULT_PLACEHOLDER_URL
|
|
2643
2646
|
} = useMailyContext();
|
|
2644
2647
|
const autoCompleteOptions = useMemo5(() => {
|
|
2645
2648
|
const withoutTrigger = defaultUrlWithoutProtocol.replace(
|
|
@@ -2759,7 +2762,7 @@ function LinkInputPopover(props) {
|
|
|
2759
2762
|
},
|
|
2760
2763
|
autoCompleteOptions,
|
|
2761
2764
|
ref: linkInputRef,
|
|
2762
|
-
placeholder:
|
|
2765
|
+
placeholder: placeholderUrl,
|
|
2763
2766
|
className: "-mly-ms-px mly-block mly-h-8 mly-w-52 mly-rounded-lg mly-rounded-s-none mly-border mly-border-gray-300 mly-px-2 mly-py-1.5 mly-pr-6 mly-text-sm mly-shadow-sm mly-outline-none placeholder:mly-text-gray-400",
|
|
2764
2767
|
triggerChar: variableTriggerCharacter,
|
|
2765
2768
|
onSelectOption: (value) => {
|
|
@@ -4711,7 +4714,8 @@ function ButtonLabelInput(props) {
|
|
|
4711
4714
|
const {
|
|
4712
4715
|
variables = [],
|
|
4713
4716
|
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
4714
|
-
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION
|
|
4717
|
+
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION,
|
|
4718
|
+
placeholderUrl = DEFAULT_PLACEHOLDER_URL
|
|
4715
4719
|
} = useMailyContext();
|
|
4716
4720
|
const autoCompleteOptions = useMemo6(() => {
|
|
4717
4721
|
const withoutTrigger = value.replace(
|
|
@@ -4755,7 +4759,7 @@ function ButtonLabelInput(props) {
|
|
|
4755
4759
|
},
|
|
4756
4760
|
autoCompleteOptions,
|
|
4757
4761
|
ref: linkInputRef,
|
|
4758
|
-
placeholder:
|
|
4762
|
+
placeholder: placeholderUrl,
|
|
4759
4763
|
className: "mly-h-7 mly-w-40 mly-rounded-md mly-px-2 mly-pr-6 mly-text-sm mly-text-midnight-gray hover:mly-bg-soft-gray focus:mly-bg-soft-gray focus:mly-outline-none",
|
|
4760
4764
|
triggerChar: variableTriggerCharacter,
|
|
4761
4765
|
onSelectOption: (value2) => {
|
|
@@ -6585,7 +6589,8 @@ function Editor9(props) {
|
|
|
6585
6589
|
variables = DEFAULT_VARIABLES,
|
|
6586
6590
|
blocks = DEFAULT_SLASH_COMMANDS,
|
|
6587
6591
|
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
6588
|
-
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION
|
|
6592
|
+
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION,
|
|
6593
|
+
placeholderUrl = DEFAULT_PLACEHOLDER_URL
|
|
6589
6594
|
} = props;
|
|
6590
6595
|
let formattedContent = null;
|
|
6591
6596
|
if (contentJson) {
|
|
@@ -6652,6 +6657,7 @@ function Editor9(props) {
|
|
|
6652
6657
|
blocks,
|
|
6653
6658
|
variableTriggerCharacter,
|
|
6654
6659
|
renderVariable,
|
|
6660
|
+
placeholderUrl,
|
|
6655
6661
|
children: /* @__PURE__ */ jsxs27(
|
|
6656
6662
|
"div",
|
|
6657
6663
|
{
|