@maily-to/core 0.1.0 → 0.1.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/blocks/index.d.mts +1 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/extensions/index.d.mts +1 -0
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.js +39 -17
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/index.mjs +39 -17
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +49 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/blocks/index.d.mts
CHANGED
package/dist/blocks/index.d.ts
CHANGED
package/dist/extensions/index.js
CHANGED
|
@@ -2395,6 +2395,7 @@ var DEFAULT_SLASH_COMMANDS = [
|
|
|
2395
2395
|
description: "Add pre-designed headers block",
|
|
2396
2396
|
searchTerms: ["header", "headers"],
|
|
2397
2397
|
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.Heading1, { className: "mly-h-4 mly-w-4" }),
|
|
2398
|
+
preview: "https://cdn.usemaily.com/previews/header-preview-xyz.png",
|
|
2398
2399
|
commands: [
|
|
2399
2400
|
headerLogoWithTextVertical,
|
|
2400
2401
|
headerLogoWithTextHorizontal,
|
|
@@ -4703,7 +4704,7 @@ var CommandList = (0, import_react30.forwardRef)(function CommandList2(props, re
|
|
|
4703
4704
|
commandListContainer,
|
|
4704
4705
|
activeCommandRef
|
|
4705
4706
|
]);
|
|
4706
|
-
return groups.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mly-z-50 mly-w-72 mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
|
|
4707
|
+
return groups.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mly-z-50 mly-w-72 mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
|
|
4707
4708
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4708
4709
|
"div",
|
|
4709
4710
|
{
|
|
@@ -4721,7 +4722,7 @@ var CommandList = (0, import_react30.forwardRef)(function CommandList2(props, re
|
|
|
4721
4722
|
children: group.title
|
|
4722
4723
|
}
|
|
4723
4724
|
),
|
|
4724
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mly-p-1", children: group.commands.map((item, commandIndex) => {
|
|
4725
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mly-space-y-0.5 mly-p-1", children: group.commands.map((item, commandIndex) => {
|
|
4725
4726
|
var _a;
|
|
4726
4727
|
const isActive = groupIndex === selectedGroupIndex && commandIndex === selectedCommandIndex;
|
|
4727
4728
|
const isSubCommand = "commands" in item;
|
|
@@ -4738,20 +4739,41 @@ var CommandList = (0, import_react30.forwardRef)(function CommandList2(props, re
|
|
|
4738
4739
|
if (renderFunctionValue !== null && renderFunctionValue !== true) {
|
|
4739
4740
|
value = renderFunctionValue;
|
|
4740
4741
|
}
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
{
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4742
|
+
const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && isActive;
|
|
4743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { open: shouldOpenTooltip, children: [
|
|
4744
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4745
|
+
"button",
|
|
4746
|
+
{
|
|
4747
|
+
className: cn(
|
|
4748
|
+
"mly-flex mly-w-full mly-items-center mly-gap-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 hover:mly-text-gray-900",
|
|
4749
|
+
isActive ? "mly-bg-gray-100 mly-text-gray-900" : "mly-bg-transparent"
|
|
4750
|
+
),
|
|
4751
|
+
onClick: () => selectItem(groupIndex, commandIndex),
|
|
4752
|
+
type: "button",
|
|
4753
|
+
ref: isActive ? activeCommandRef : null,
|
|
4754
|
+
children: value
|
|
4755
|
+
}
|
|
4756
|
+
) }),
|
|
4757
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4758
|
+
TooltipContent,
|
|
4759
|
+
{
|
|
4760
|
+
side: "right",
|
|
4761
|
+
sideOffset: 10,
|
|
4762
|
+
className: "mly-w-52 mly-rounded-lg mly-border-none mly-p-1 mly-shadow",
|
|
4763
|
+
children: typeof item.preview === "function" ? item == null ? void 0 : item.preview(editor) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
4764
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("figure", { className: "mly-relative mly-aspect-[2.5] mly-w-full mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4765
|
+
"img",
|
|
4766
|
+
{
|
|
4767
|
+
src: item == null ? void 0 : item.preview,
|
|
4768
|
+
alt: item == null ? void 0 : item.title,
|
|
4769
|
+
className: "mly-absolute mly-inset-0 mly-h-full mly-w-full mly-object-cover"
|
|
4770
|
+
}
|
|
4771
|
+
) }),
|
|
4772
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mly-mt-2 mly-px-0.5 mly-text-gray-500", children: item.description })
|
|
4773
|
+
] })
|
|
4774
|
+
}
|
|
4775
|
+
)
|
|
4776
|
+
] }, commandIndex);
|
|
4755
4777
|
}) })
|
|
4756
4778
|
] }, groupIndex))
|
|
4757
4779
|
}
|
|
@@ -4770,7 +4792,7 @@ var CommandList = (0, import_react30.forwardRef)(function CommandList2(props, re
|
|
|
4770
4792
|
"to select"
|
|
4771
4793
|
] })
|
|
4772
4794
|
] }) })
|
|
4773
|
-
] }) : null;
|
|
4795
|
+
] }) }) : null;
|
|
4774
4796
|
});
|
|
4775
4797
|
function getSlashCommandSuggestions(groups = DEFAULT_SLASH_COMMANDS) {
|
|
4776
4798
|
return {
|