@cloudvoyant/helical-react 0.20.0-rc.202611012026.09e963c → 0.20.0
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 +11 -26
- package/dist/index.js +2 -31
- package/package.json +2 -3
package/dist/index.cjs
CHANGED
|
@@ -3918,23 +3918,8 @@ function BubbleMenu({ editor }) {
|
|
|
3918
3918
|
|
|
3919
3919
|
// src/editor/SlashMenu.tsx
|
|
3920
3920
|
var import_react23 = require("react");
|
|
3921
|
-
var
|
|
3921
|
+
var LucideIcons = __toESM(require("lucide-react"), 1);
|
|
3922
3922
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3923
|
-
var SLASH_MENU_ICONS = {
|
|
3924
|
-
Heading1: import_lucide_react6.Heading1,
|
|
3925
|
-
Heading2: import_lucide_react6.Heading2,
|
|
3926
|
-
Heading3: import_lucide_react6.Heading3,
|
|
3927
|
-
Heading4: import_lucide_react6.Heading4,
|
|
3928
|
-
Quote: import_lucide_react6.Quote,
|
|
3929
|
-
MessageSquareWarning: import_lucide_react6.MessageSquareWarning,
|
|
3930
|
-
List: import_lucide_react6.List,
|
|
3931
|
-
ListOrdered: import_lucide_react6.ListOrdered,
|
|
3932
|
-
ListTodo: import_lucide_react6.ListTodo,
|
|
3933
|
-
Minus: import_lucide_react6.Minus,
|
|
3934
|
-
Code: import_lucide_react6.Code,
|
|
3935
|
-
Image: import_lucide_react6.Image,
|
|
3936
|
-
Bookmark: import_lucide_react6.Bookmark
|
|
3937
|
-
};
|
|
3938
3923
|
var SlashMenu = (0, import_react23.forwardRef)(function SlashMenu2({ items, command }, ref) {
|
|
3939
3924
|
const [index, setIndex] = (0, import_react23.useState)(0);
|
|
3940
3925
|
const itemRefs = (0, import_react23.useRef)([]);
|
|
@@ -3979,7 +3964,7 @@ var SlashMenu = (0, import_react23.forwardRef)(function SlashMenu2({ items, comm
|
|
|
3979
3964
|
},
|
|
3980
3965
|
loopFocus: false,
|
|
3981
3966
|
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ListboxContent, { "data-slash-menu-scroll": true, children: items.map((item, i) => {
|
|
3982
|
-
const Icon =
|
|
3967
|
+
const Icon = LucideIcons[item.icon];
|
|
3983
3968
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3984
3969
|
ListboxItem,
|
|
3985
3970
|
{
|
|
@@ -4050,11 +4035,11 @@ var MentionList = (0, import_react24.forwardRef)(function MentionList2({ items,
|
|
|
4050
4035
|
|
|
4051
4036
|
// src/editor/ImageInput.tsx
|
|
4052
4037
|
var import_react25 = require("react");
|
|
4053
|
-
var
|
|
4038
|
+
var import_lucide_react7 = require("lucide-react");
|
|
4054
4039
|
|
|
4055
4040
|
// src/editor/ImageFileUpload.tsx
|
|
4056
4041
|
var import_file_upload = require("@ark-ui/react/file-upload");
|
|
4057
|
-
var
|
|
4042
|
+
var import_lucide_react6 = require("lucide-react");
|
|
4058
4043
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4059
4044
|
function ImageFileUpload({ file, onFileChange, disabled = false }) {
|
|
4060
4045
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
@@ -4067,11 +4052,11 @@ function ImageFileUpload({ file, onFileChange, disabled = false }) {
|
|
|
4067
4052
|
onFileChange: (details) => onFileChange(details.acceptedFiles[0] ?? null),
|
|
4068
4053
|
children: [
|
|
4069
4054
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_file_upload.FileUploadDropzone, { className: "flex min-h-32 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-muted/30 px-4 py-5 text-center transition-colors data-[dragging]:border-primary data-[dragging]:bg-primary/5", children: [
|
|
4070
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4055
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react6.ImagePlus, { className: "size-6 text-muted-foreground", "aria-hidden": "true" }),
|
|
4071
4056
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-sm font-medium", children: "Drop an image here" }),
|
|
4072
4057
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-xs text-muted-foreground", children: "or" }),
|
|
4073
4058
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_file_upload.FileUploadTrigger, { className: "inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-1.5 text-sm hover:bg-accent", children: [
|
|
4074
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4059
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react6.Upload, { className: "size-4", "aria-hidden": "true" }),
|
|
4075
4060
|
"Choose image"
|
|
4076
4061
|
] })
|
|
4077
4062
|
] }),
|
|
@@ -4091,7 +4076,7 @@ function ImageFileUpload({ file, onFileChange, disabled = false }) {
|
|
|
4091
4076
|
{
|
|
4092
4077
|
className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
4093
4078
|
"aria-label": "Remove image",
|
|
4094
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react6.Trash2, { className: "size-4" })
|
|
4095
4080
|
}
|
|
4096
4081
|
)
|
|
4097
4082
|
]
|
|
@@ -4171,7 +4156,7 @@ function ImageInput({ editor, position, onClose, onUpload }) {
|
|
|
4171
4156
|
onClick: onClose,
|
|
4172
4157
|
className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
4173
4158
|
"aria-label": "Close image dialog",
|
|
4174
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react7.X, { className: "size-4" })
|
|
4175
4160
|
}
|
|
4176
4161
|
)
|
|
4177
4162
|
] }),
|
|
@@ -4332,7 +4317,7 @@ function BookmarkInput({ editor, position, onClose, fetchLinkPreview }) {
|
|
|
4332
4317
|
|
|
4333
4318
|
// src/editor/YouTubeInput.tsx
|
|
4334
4319
|
var import_react27 = require("react");
|
|
4335
|
-
var
|
|
4320
|
+
var import_lucide_react8 = require("lucide-react");
|
|
4336
4321
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4337
4322
|
function isYouTubeUrl(value) {
|
|
4338
4323
|
try {
|
|
@@ -4368,7 +4353,7 @@ function YouTubeInput({ editor, position, onClose }) {
|
|
|
4368
4353
|
children: [
|
|
4369
4354
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4370
4355
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
4371
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react8.Play, { className: "size-5 fill-current text-red-600", "aria-hidden": "true", "data-youtube-logo": true }),
|
|
4372
4357
|
"Embed YouTube video"
|
|
4373
4358
|
] }),
|
|
4374
4359
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
@@ -4378,7 +4363,7 @@ function YouTubeInput({ editor, position, onClose }) {
|
|
|
4378
4363
|
onClick: onClose,
|
|
4379
4364
|
"aria-label": "Close YouTube input",
|
|
4380
4365
|
className: "rounded p-1 hover:bg-accent",
|
|
4381
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react8.X, { className: "h-4 w-4" })
|
|
4382
4367
|
}
|
|
4383
4368
|
)
|
|
4384
4369
|
] }),
|
package/dist/index.js
CHANGED
|
@@ -4148,37 +4148,8 @@ function BubbleMenu({ editor }) {
|
|
|
4148
4148
|
|
|
4149
4149
|
// src/editor/SlashMenu.tsx
|
|
4150
4150
|
import { forwardRef, useEffect as useEffect11, useImperativeHandle, useRef as useRef4, useState as useState12 } from "react";
|
|
4151
|
-
import
|
|
4152
|
-
Bookmark,
|
|
4153
|
-
Code,
|
|
4154
|
-
Heading1,
|
|
4155
|
-
Heading2,
|
|
4156
|
-
Heading3,
|
|
4157
|
-
Heading4,
|
|
4158
|
-
Image,
|
|
4159
|
-
List,
|
|
4160
|
-
ListOrdered,
|
|
4161
|
-
ListTodo,
|
|
4162
|
-
MessageSquareWarning,
|
|
4163
|
-
Minus,
|
|
4164
|
-
Quote
|
|
4165
|
-
} from "lucide-react";
|
|
4151
|
+
import * as LucideIcons from "lucide-react";
|
|
4166
4152
|
import { jsx as jsx82, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4167
|
-
var SLASH_MENU_ICONS = {
|
|
4168
|
-
Heading1,
|
|
4169
|
-
Heading2,
|
|
4170
|
-
Heading3,
|
|
4171
|
-
Heading4,
|
|
4172
|
-
Quote,
|
|
4173
|
-
MessageSquareWarning,
|
|
4174
|
-
List,
|
|
4175
|
-
ListOrdered,
|
|
4176
|
-
ListTodo,
|
|
4177
|
-
Minus,
|
|
4178
|
-
Code,
|
|
4179
|
-
Image,
|
|
4180
|
-
Bookmark
|
|
4181
|
-
};
|
|
4182
4153
|
var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
|
|
4183
4154
|
const [index, setIndex] = useState12(0);
|
|
4184
4155
|
const itemRefs = useRef4([]);
|
|
@@ -4223,7 +4194,7 @@ var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
|
|
|
4223
4194
|
},
|
|
4224
4195
|
loopFocus: false,
|
|
4225
4196
|
children: /* @__PURE__ */ jsx82(ListboxContent, { "data-slash-menu-scroll": true, children: items.map((item, i) => {
|
|
4226
|
-
const Icon =
|
|
4197
|
+
const Icon = LucideIcons[item.icon];
|
|
4227
4198
|
return /* @__PURE__ */ jsx82(
|
|
4228
4199
|
ListboxItem,
|
|
4229
4200
|
{
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudvoyant/helical-react",
|
|
3
|
-
"version": "0.20.0
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "helical-ui React UI components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"sideEffects": false,
|
|
8
7
|
"main": "./dist/index.cjs",
|
|
9
8
|
"module": "./dist/index.js",
|
|
10
9
|
"types": "./dist/index.d.ts",
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
"@tiptap/react": "^3.31.3",
|
|
48
47
|
"@tiptap/suggestion": "^3.31.3",
|
|
49
48
|
"lucide-react": "^1.32.0",
|
|
50
|
-
"@cloudvoyant/helical-ui": "0.20.0
|
|
49
|
+
"@cloudvoyant/helical-ui": "0.20.0"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@types/katex": "^0.16.8",
|