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