@delali/web-editor 0.4.3 → 0.4.5

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.
@@ -294,7 +294,7 @@ var chunkDiffs = (blocks, { hasDiff: hasDiff2, paddingBlocks }) => {
294
294
  import { computeDiff } from "@platejs/diff";
295
295
  import { NodeApi as NodeApi14, TrailingBlockPlugin } from "platejs";
296
296
  import { createPlateEditor, Plate as Plate2, usePlateEditor as usePlateEditor2 } from "platejs/react";
297
- import { memo as memo2, useMemo as useMemo13, useState as useState32 } from "react";
297
+ import { memo as memo2, useMemo as useMemo13, useState as useState33 } from "react";
298
298
 
299
299
  // src/ui/editor.tsx
300
300
  import { cva } from "class-variance-authority";
@@ -1450,7 +1450,7 @@ function SmartLinkInlineContent({ link, className }) {
1450
1450
  "span",
1451
1451
  {
1452
1452
  className: cn2(
1453
- "inline-flex max-w-full items-center gap-[0.2em] rounded-[0.25em] px-[0.4em] py-[0.1em] align-[-0.28em] font-medium text-[#0C66E4] leading-[1.3] outline outline-transparent transition-colors hover:bg-[#0C66E4]/5 hover:outline-[#0C66E4]/30",
1453
+ "inline-flex max-w-full items-center gap-[0.2em] rounded-[0.25em] px-[0.4em] py-[0.1em] align-[-0.28em] font-medium text-editor-link leading-[1.3] outline outline-transparent transition-colors hover:bg-editor-link/5 hover:outline-editor-link/30",
1454
1454
  className
1455
1455
  ),
1456
1456
  children: [
@@ -1466,7 +1466,7 @@ function SmartLinkUrlContent({ link, className }) {
1466
1466
  "span",
1467
1467
  {
1468
1468
  className: cn2(
1469
- "inline max-w-full wrap-break-word border-[#0C66E4]/35 border-b font-medium text-[#0C66E4] leading-[inherit]",
1469
+ "inline max-w-full wrap-break-word border-b border-editor-link/35 font-medium text-editor-link leading-[inherit] dark-or-inherit:border-editor-link/35!",
1470
1470
  className
1471
1471
  ),
1472
1472
  children: [
@@ -1498,7 +1498,7 @@ function SmartLinkCardContent({ link, className }) {
1498
1498
  ),
1499
1499
  /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1", children: [
1500
1500
  /* @__PURE__ */ jsxs6("span", { className: "flex min-w-0 items-start gap-3", children: [
1501
- /* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1 truncate font-semibold text-[#0C66E4] text-base leading-6", children: link.title }),
1501
+ /* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1 truncate font-semibold text-editor-link text-base leading-6", children: link.title }),
1502
1502
  link.status ? /* @__PURE__ */ jsx20(SmartLinkStatus, { status: link.status }) : null
1503
1503
  ] }),
1504
1504
  /* @__PURE__ */ jsxs6("span", { className: "mt-2 flex min-w-0 items-center gap-2 text-muted-foreground text-sm", children: [
@@ -1516,7 +1516,7 @@ function SmartLinkCardContent({ link, className }) {
1516
1516
  {
1517
1517
  faviconUrl: link.faviconUrl,
1518
1518
  provider: link.provider,
1519
- className: "size-5 rounded bg-[#0C66E4] p-1 text-white"
1519
+ className: "size-5 rounded bg-editor-link p-1 text-white dark-or-inherit:text-primary-foreground"
1520
1520
  }
1521
1521
  ),
1522
1522
  /* @__PURE__ */ jsx20("span", { className: "truncate", children: (_a = link.provider) != null ? _a : "Link" })
@@ -2079,6 +2079,7 @@ import { SlateElement as SlateElement13 } from "platejs/static";
2079
2079
  // src/ui/media-file-display.ts
2080
2080
  var FILE_DISPLAY_MODES = ["inline", "url", "embed"];
2081
2081
  var DEFAULT_FILE_DISPLAY_MODE = "inline";
2082
+ var FILE_URL_CLASS_NAME = "inline-flex max-w-full items-center gap-1 break-all border-b border-editor-link/35 font-medium text-editor-link dark-or-inherit:border-editor-link/35!";
2082
2083
  var normalizeFileDisplayMode = (value) => {
2083
2084
  return value === "url" || value === "embed" || value === "inline" ? value : DEFAULT_FILE_DISPLAY_MODE;
2084
2085
  };
@@ -2115,20 +2116,10 @@ function MediaFileStaticBody({ canEmbed, displayMode, name, url }) {
2115
2116
  );
2116
2117
  }
2117
2118
  if (displayMode === "url") {
2118
- return /* @__PURE__ */ jsxs12(
2119
- "a",
2120
- {
2121
- className: "inline-flex max-w-full items-center gap-1 break-all border-[#0C66E4]/35 border-b font-medium text-[#0C66E4]",
2122
- contentEditable: false,
2123
- href: url,
2124
- rel: "noopener noreferrer",
2125
- target: "_blank",
2126
- children: [
2127
- /* @__PURE__ */ jsx27(Link, { className: "size-4 shrink-0 text-muted-foreground" }),
2128
- /* @__PURE__ */ jsx27("span", { className: "truncate", children: url })
2129
- ]
2130
- }
2131
- );
2119
+ return /* @__PURE__ */ jsxs12("a", { className: FILE_URL_CLASS_NAME, contentEditable: false, href: url, rel: "noopener noreferrer", target: "_blank", children: [
2120
+ /* @__PURE__ */ jsx27(Link, { className: "size-4 shrink-0 text-muted-foreground" }),
2121
+ /* @__PURE__ */ jsx27("span", { className: "truncate", children: url })
2122
+ ] });
2132
2123
  }
2133
2124
  return /* @__PURE__ */ jsx27(
2134
2125
  "a",
@@ -6700,6 +6691,16 @@ var backgroundColorItems = [
6700
6691
 
6701
6692
  // src/ui/input.tsx
6702
6693
  import { cva as cva12 } from "class-variance-authority";
6694
+
6695
+ // src/context/text-field-attributes.ts
6696
+ import { createContext as createContext7, useContext as useContext7, useState as useState13 } from "react";
6697
+ var EMPTY_ATTRIBUTES = Object.freeze({});
6698
+ var TextFieldAttributesContext = createContext7(EMPTY_ATTRIBUTES);
6699
+ function useTextFieldAttributes() {
6700
+ return useContext7(TextFieldAttributesContext);
6701
+ }
6702
+
6703
+ // src/ui/input.tsx
6703
6704
  import { jsx as jsx55 } from "react/jsx-runtime";
6704
6705
  var inputVariants = cva12(
6705
6706
  cn2(
@@ -6721,9 +6722,16 @@ var inputVariants = cva12(
6721
6722
  }
6722
6723
  }
6723
6724
  );
6725
+ var TEXT_INPUT_TYPES = /* @__PURE__ */ new Set(["text", "search", "url", "email", "tel", "password"]);
6726
+ function UnstyledInput(_a) {
6727
+ var _b = _a, { type = "text" } = _b, props = __objRest(_b, ["type"]);
6728
+ const attributes = useTextFieldAttributes();
6729
+ const textFieldAttributes = TEXT_INPUT_TYPES.has(type.toLowerCase()) ? attributes : void 0;
6730
+ return /* @__PURE__ */ jsx55("input", __spreadValues(__spreadProps(__spreadValues({}, textFieldAttributes), { type }), props));
6731
+ }
6724
6732
  function Input(_a) {
6725
6733
  var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
6726
- return /* @__PURE__ */ jsx55("input", __spreadValues({ className: cn2(inputVariants({ variant }), className) }, props));
6734
+ return /* @__PURE__ */ jsx55(UnstyledInput, __spreadValues({ className: cn2(inputVariants({ variant }), className) }, props));
6727
6735
  }
6728
6736
 
6729
6737
  // src/ui/menu.tsx
@@ -8115,6 +8123,7 @@ function CommandInput(_a) {
8115
8123
  "variant",
8116
8124
  "wrapClassName"
8117
8125
  ]);
8126
+ const attributes = useTextFieldAttributes();
8118
8127
  return /* @__PURE__ */ jsx66(
8119
8128
  "div",
8120
8129
  {
@@ -8123,10 +8132,10 @@ function CommandInput(_a) {
8123
8132
  "data-slot": "command-input-wrapper",
8124
8133
  children: /* @__PURE__ */ jsx66(
8125
8134
  CommandPrimitive.Input,
8126
- __spreadValues({
8135
+ __spreadValues(__spreadProps(__spreadValues({}, attributes), {
8127
8136
  className: cn2(inputVariants({ variant }), className),
8128
8137
  "data-slot": "command-input"
8129
- }, props)
8138
+ }), props)
8130
8139
  )
8131
8140
  }
8132
8141
  );
@@ -9900,15 +9909,14 @@ function EmojiPickerSearchBar({
9900
9909
  }) {
9901
9910
  return /* @__PURE__ */ jsx83("div", { className: "flex items-center px-2", children: /* @__PURE__ */ jsxs47("div", { className: "relative flex grow items-center", children: [
9902
9911
  /* @__PURE__ */ jsx83(
9903
- "input",
9912
+ UnstyledInput,
9904
9913
  {
9905
9914
  className: "block w-full appearance-none rounded-full border-0 bg-muted px-10 py-2 text-sm outline-none placeholder:text-muted-foreground focus-visible:outline-none",
9906
9915
  value: searchValue,
9907
9916
  onChange: (event) => setSearch(event.target.value),
9908
9917
  placeholder: i18n.search,
9909
9918
  "aria-label": "Search",
9910
- autoComplete: "off",
9911
- type: "text"
9919
+ autoComplete: "off"
9912
9920
  }
9913
9921
  ),
9914
9922
  children
@@ -10682,7 +10690,7 @@ import { useLink } from "@platejs/link/react";
10682
10690
  import { SuggestionPlugin as SuggestionPlugin3 } from "@platejs/suggestion/react";
10683
10691
  import { NodeApi as NodeApi11 } from "platejs";
10684
10692
  import { PlateElement as PlateElement10, useEditorPlugin as useEditorPlugin9, useElement as useElement3, useReadOnly as useReadOnly5 } from "platejs/react";
10685
- import { useCallback as useCallback22, useMemo as useMemo11, useState as useState22 } from "react";
10693
+ import { useCallback as useCallback22, useMemo as useMemo11, useState as useState23 } from "react";
10686
10694
 
10687
10695
  // src/ui/smart-link-clipboard.ts
10688
10696
  var copySmartLinkUrl = async (url) => {
@@ -10720,10 +10728,10 @@ import { ArrowUpRightIcon as ArrowUpRightIcon3, PencilIcon as PencilIcon4, Trash
10720
10728
 
10721
10729
  // src/ui/smart-link-copy-button.tsx
10722
10730
  import { CheckIcon as CheckIcon10, CopyIcon, XIcon as XIcon6 } from "lucide-react";
10723
- import { useCallback as useCallback20, useEffect as useEffect21, useState as useState21 } from "react";
10731
+ import { useCallback as useCallback20, useEffect as useEffect21, useState as useState22 } from "react";
10724
10732
  import { jsx as jsx90 } from "react/jsx-runtime";
10725
10733
  function SmartLinkCopyButton({ disabled, onCopy }) {
10726
- const [feedback, setFeedback] = useState21("idle");
10734
+ const [feedback, setFeedback] = useState22("idle");
10727
10735
  useEffect21(() => {
10728
10736
  if (feedback === "idle") return;
10729
10737
  const timeoutId = window.setTimeout(() => {
@@ -10891,8 +10899,8 @@ function LinkElement(_a) {
10891
10899
  const { api, editor, setOption } = useEditorPlugin9(linkPlugin);
10892
10900
  const adapter = useEditorAdapter();
10893
10901
  const readOnly = useReadOnly5();
10894
- const [isToolbarOpen, setIsToolbarOpen] = useState22(false);
10895
- const [isModeMenuOpen, setIsModeMenuOpen] = useState22(false);
10902
+ const [isToolbarOpen, setIsToolbarOpen] = useState23(false);
10903
+ const [isModeMenuOpen, setIsModeMenuOpen] = useState23(false);
10896
10904
  const displayMode = normalizeSmartLinkDisplayMode(element.displayMode);
10897
10905
  const open = !readOnly && (isToolbarOpen || isModeMenuOpen);
10898
10906
  const reference = useMemo11(() => readElementReference(element), [element]);
@@ -11069,12 +11077,12 @@ var PlainLinkElement = (props) => /* @__PURE__ */ jsx93(LinkElement, __spreadPro
11069
11077
 
11070
11078
  // src/ui/link-toolbar.tsx
11071
11079
  import { useEditorPlugin as useEditorPlugin12, useEditorSelector as useEditorSelector2, usePluginOption as usePluginOption10 } from "platejs/react";
11072
- import { useCallback as useCallback25, useEffect as useEffect25, useState as useState25 } from "react";
11080
+ import { useCallback as useCallback25, useEffect as useEffect25, useState as useState26 } from "react";
11073
11081
 
11074
11082
  // src/ui/link-search-panel.tsx
11075
11083
  import { BookmarkIcon, LinkIcon as LinkIcon3 } from "lucide-react";
11076
11084
  import { useEditorPlugin as useEditorPlugin10 } from "platejs/react";
11077
- import { useCallback as useCallback23, useEffect as useEffect23, useState as useState23 } from "react";
11085
+ import { useCallback as useCallback23, useEffect as useEffect23, useState as useState24 } from "react";
11078
11086
 
11079
11087
  // src/hooks/use-debounce.ts
11080
11088
  import React29, { useEffect as useEffect22 } from "react";
@@ -11234,10 +11242,10 @@ function LinkSearchPanel({ initialUrl }) {
11234
11242
  const adapter = useEditorAdapter();
11235
11243
  const { editor } = useEditorPlugin10(linkPlugin);
11236
11244
  const canLinkPage = adapter.permissions.canLinkPage;
11237
- const [query, setQuery] = useState23(initialUrl);
11238
- const [displayText, setDisplayText] = useState23(() => readSelectionText(editor));
11239
- const [pages, setPages] = useState23([]);
11240
- const [isLoading, setIsLoading] = useState23(true);
11245
+ const [query, setQuery] = useState24(initialUrl);
11246
+ const [displayText, setDisplayText] = useState24(() => readSelectionText(editor));
11247
+ const [pages, setPages] = useState24([]);
11248
+ const [isLoading, setIsLoading] = useState24(true);
11241
11249
  const trimmedQuery = query.trim();
11242
11250
  const safeUrl = trimmedQuery.length > 0 ? getSafeSmartLinkUrl(trimmedQuery) : null;
11243
11251
  const searchTerm = isLikelySmartLinkUrl(query) ? "" : trimmedQuery;
@@ -11381,11 +11389,11 @@ import { CursorOverlayPlugin } from "@platejs/selection/react";
11381
11389
  import { LinkIcon as LinkIcon4, Trash2Icon as Trash2Icon2 } from "lucide-react";
11382
11390
  import { NodeApi as NodeApi13 } from "platejs";
11383
11391
  import { useEditorPlugin as useEditorPlugin11, usePluginOption as usePluginOption9 } from "platejs/react";
11384
- import { useCallback as useCallback24, useEffect as useEffect24, useState as useState24 } from "react";
11392
+ import { useCallback as useCallback24, useEffect as useEffect24, useState as useState25 } from "react";
11385
11393
  import { jsx as jsx95, jsxs as jsxs56 } from "react/jsx-runtime";
11386
11394
  function EditLinkCommand({ autoFocus, initialUrl, setInitialUrl }) {
11387
- const [url, setUrl] = useState24(initialUrl);
11388
- const [text, setText] = useState24("");
11395
+ const [url, setUrl] = useState25(initialUrl);
11396
+ const [text, setText] = useState25("");
11389
11397
  const mode = usePluginOption9(linkPlugin, "mode");
11390
11398
  const { editor, setOption } = useEditorPlugin11(linkPlugin);
11391
11399
  const activeLinkId = usePluginOption9(linkPlugin, "activeId");
@@ -11512,7 +11520,7 @@ function LinkFloatingToolbar() {
11512
11520
  })) == null ? void 0 : _a2[0];
11513
11521
  }, []);
11514
11522
  const aboveUrl = (_a = aboveLink == null ? void 0 : aboveLink.url) != null ? _a : "";
11515
- const [initialUrl, setInitialUrl] = useState25(aboveUrl);
11523
+ const [initialUrl, setInitialUrl] = useState26(aboveUrl);
11516
11524
  const open = mode === "insert" || mode === "edit" || mode === "cursor";
11517
11525
  useEffect25(() => {
11518
11526
  setInitialUrl(aboveUrl);
@@ -11769,7 +11777,14 @@ var textareaVariants = cva19(
11769
11777
  );
11770
11778
  function TextareaAutosize(_a) {
11771
11779
  var _b = _a, { children, className, variant } = _b, props = __objRest(_b, ["children", "className", "variant"]);
11772
- return /* @__PURE__ */ jsx100(ReactTextareaAutosize, __spreadValues({ autoComplete: "off", className: cn2(textareaVariants({ variant }), className) }, props));
11780
+ const attributes = useTextFieldAttributes();
11781
+ return /* @__PURE__ */ jsx100(
11782
+ ReactTextareaAutosize,
11783
+ __spreadValues(__spreadProps(__spreadValues({}, attributes), {
11784
+ autoComplete: "off",
11785
+ className: cn2(textareaVariants({ variant }), className)
11786
+ }), props)
11787
+ );
11773
11788
  }
11774
11789
 
11775
11790
  // src/ui/equation-node.tsx
@@ -12003,9 +12018,10 @@ function Caption(_a) {
12003
12018
  return /* @__PURE__ */ jsx102(CaptionPrimitive, __spreadProps(__spreadValues({}, props), { className: cn2(captionVariants({ align }), "px-3 pb-2", className) }));
12004
12019
  }
12005
12020
  function CaptionTextarea(props) {
12021
+ const attributes = useTextFieldAttributes();
12006
12022
  return /* @__PURE__ */ jsx102(
12007
12023
  CaptionTextareaPrimitive,
12008
- __spreadProps(__spreadValues({}, props), {
12024
+ __spreadProps(__spreadValues(__spreadValues({}, attributes), props), {
12009
12025
  className: cn2(
12010
12026
  "mt-2 w-full resize-none border-none bg-inherit p-0 font-[inherit] text-inherit",
12011
12027
  "focus:outline-none focus:placeholder:opacity-0",
@@ -12543,7 +12559,7 @@ import { useMediaState as useMediaState3 } from "@platejs/media/react";
12543
12559
  import { ResizableProvider as ResizableProvider4 } from "@platejs/resizable";
12544
12560
  import { ArrowUpRightIcon as ArrowUpRightIcon4, FileUpIcon, LinkIcon as LinkIcon6 } from "lucide-react";
12545
12561
  import { PlateElement as PlateElement14, useEditorRef as useEditorRef16, useElement as useElement8, withHOC as withHOC4 } from "platejs/react";
12546
- import { useCallback as useCallback31, useState as useState27 } from "react";
12562
+ import { useCallback as useCallback31, useState as useState28 } from "react";
12547
12563
 
12548
12564
  // src/ui/media-file-mode-dropdown.tsx
12549
12565
  import { ChevronDownIcon as ChevronDownIcon8, FileIcon, FrameIcon, LinkIcon as LinkIcon5 } from "lucide-react";
@@ -12632,7 +12648,10 @@ function MediaFileBody({ canEmbed, displayMode, name, onAnchorClick, url }) {
12632
12648
  return /* @__PURE__ */ jsxs68(
12633
12649
  "a",
12634
12650
  {
12635
- className: "inline-flex max-w-full cursor-pointer items-center gap-1 break-all border-[#0C66E4]/35 border-b font-medium text-[#0C66E4] transition-colors hover:border-[#0C66E4]",
12651
+ className: cn2(
12652
+ FILE_URL_CLASS_NAME,
12653
+ "cursor-pointer transition-colors hover:border-editor-link dark-or-inherit:hover:border-editor-link!"
12654
+ ),
12636
12655
  contentEditable: false,
12637
12656
  href: url,
12638
12657
  onClick: onAnchorClick,
@@ -12670,7 +12689,7 @@ var MediaFileElement = withHOC4(ResizableProvider4, function MediaFileElement2(p
12670
12689
  const fileName = name != null ? name : "";
12671
12690
  const fileUrl = unsafeUrl != null ? unsafeUrl : "";
12672
12691
  const canEmbed = isEmbeddableFile(fileName, fileUrl);
12673
- const [isModeMenuOpen, setIsModeMenuOpen] = useState27(false);
12692
+ const [isModeMenuOpen, setIsModeMenuOpen] = useState28(false);
12674
12693
  const open = !readOnly && (selected || isModeMenuOpen);
12675
12694
  const handleOpen = useCallback31(() => {
12676
12695
  if (fileUrl.length === 0) return;
@@ -12917,7 +12936,7 @@ import {
12917
12936
  import { AudioLinesIcon, FileUpIcon as FileUpIcon2, FilmIcon, ImageIcon } from "lucide-react";
12918
12937
  import { KEYS as KEYS22, nanoid as nanoid4 } from "platejs";
12919
12938
  import { PlateElement as PlateElement16, useEditorPlugin as useEditorPlugin14, withHOC as withHOC6 } from "platejs/react";
12920
- import { useCallback as useCallback32, useEffect as useEffect29, useRef as useRef11, useState as useState28 } from "react";
12939
+ import { useCallback as useCallback32, useEffect as useEffect29, useRef as useRef11, useState as useState29 } from "react";
12921
12940
  import { useFilePicker } from "use-file-picker";
12922
12941
 
12923
12942
  // src/hooks/use-upload-file.ts
@@ -13159,7 +13178,7 @@ function MediaPlaceholderPopover({ children }) {
13159
13178
  var _a, _b, _c;
13160
13179
  const { api, editor, getOption, tf } = useEditorPlugin14(PlaceholderPlugin2);
13161
13180
  const { id, element, mediaType, readOnly, selected, setIsUploading, setProgresses, setUpdatedFiles, size } = usePlaceholderPopoverState();
13162
- const [open, setOpen] = useState28(false);
13181
+ const [open, setOpen] = useState29(false);
13163
13182
  const currentMedia = MEDIA_CONFIG[mediaType];
13164
13183
  const uploadConfig = useUploadConfig();
13165
13184
  const adapter = useEditorAdapter();
@@ -13219,7 +13238,7 @@ function MediaPlaceholderPopover({ children }) {
13219
13238
  { at: path }
13220
13239
  );
13221
13240
  }, [uploadedFile, element.id, size]);
13222
- const [embedValue, setEmbedValue] = useState28("");
13241
+ const [embedValue, setEmbedValue] = useState29("");
13223
13242
  const onEmbed = useCallback32(
13224
13243
  (value) => {
13225
13244
  const path = editor.api.findPath(element);
@@ -13275,7 +13294,7 @@ function ImageProgress({
13275
13294
  imageRef,
13276
13295
  progress = 0
13277
13296
  }) {
13278
- const [objectUrl, setObjectUrl] = useState28(null);
13297
+ const [objectUrl, setObjectUrl] = useState29(null);
13279
13298
  useEffect29(() => {
13280
13299
  const url = URL.createObjectURL(file);
13281
13300
  setObjectUrl(url);
@@ -14488,7 +14507,7 @@ function DefaultToggleView({
14488
14507
  children: [
14489
14508
  /* @__PURE__ */ jsx120(ToggleChevron, { open }),
14490
14509
  isEditing ? /* @__PURE__ */ jsx120(
14491
- "input",
14510
+ UnstyledInput,
14492
14511
  {
14493
14512
  ref: inputRef,
14494
14513
  className: "min-w-30 bg-transparent font-semibold text-foreground outline-none",
@@ -14817,9 +14836,9 @@ var ToggleKit = [
14817
14836
  ];
14818
14837
 
14819
14838
  // src/components/editor/version-history/use-object-version.ts
14820
- import { useEffect as useEffect32, useRef as useRef14, useState as useState31 } from "react";
14839
+ import { useEffect as useEffect32, useRef as useRef14, useState as useState32 } from "react";
14821
14840
  var useObjectVersion = (obj) => {
14822
- const [version, setVersion] = useState31(0);
14841
+ const [version, setVersion] = useState32(0);
14823
14842
  const prevObjRef = useRef14(obj);
14824
14843
  useEffect32(() => {
14825
14844
  if (prevObjRef.current !== obj) {
@@ -14890,7 +14909,7 @@ var DiffPlate = memo2(({ current = [], previous = [], showDiff }) => {
14890
14909
  });
14891
14910
  return diff;
14892
14911
  }, [previous, current]);
14893
- const [expandedChunks, setExpandedChunks] = useState32([]);
14912
+ const [expandedChunks, setExpandedChunks] = useState33([]);
14894
14913
  const collapsedDiffValue = useMemo13(
14895
14914
  () => collapseBlocksWithoutDiff(diffValue, {
14896
14915
  expandedChunks
@@ -17495,6 +17514,7 @@ function InlineComboboxInput(_a) {
17495
17514
  Ariakit2.Combobox,
17496
17515
  __spreadValues(__spreadValues({
17497
17516
  autoSelect: true,
17517
+ render: /* @__PURE__ */ jsx139(UnstyledInput, {}),
17498
17518
  className: cn2("absolute top-0 left-0 size-full bg-transparent outline-hidden", className),
17499
17519
  ref,
17500
17520
  value
@@ -18058,7 +18078,7 @@ import { KEYS as KEYS33 } from "platejs";
18058
18078
  // src/ui/mention-element.tsx
18059
18079
  import { IS_APPLE as IS_APPLE2 } from "platejs";
18060
18080
  import { PlateElement as PlateElement28, useFocused as useFocused3, useHotkeys as useHotkeys4, useReadOnly as useReadOnly16, useSelected as useSelected6 } from "platejs/react";
18061
- import { useCallback as useCallback45, useState as useState39 } from "react";
18081
+ import { useCallback as useCallback45, useState as useState40 } from "react";
18062
18082
  import { useMounted as useMounted2 } from "react-tweet";
18063
18083
 
18064
18084
  // src/ui/mention-document-element.tsx
@@ -18070,7 +18090,7 @@ import {
18070
18090
  useReadOnly as useReadOnly15,
18071
18091
  useSelected as useSelected5
18072
18092
  } from "platejs/react";
18073
- import { useCallback as useCallback44, useMemo as useMemo17, useState as useState38 } from "react";
18093
+ import { useCallback as useCallback44, useMemo as useMemo17, useState as useState39 } from "react";
18074
18094
 
18075
18095
  // src/ui/mention-document-hover-card.tsx
18076
18096
  import { useCallback as useCallback43 } from "react";
@@ -18122,8 +18142,8 @@ function DocumentMentionElement(props) {
18122
18142
  const focused = useFocused2();
18123
18143
  const editor = useEditorRef37();
18124
18144
  const readOnly = useReadOnly15();
18125
- const [isToolbarOpen, setIsToolbarOpen] = useState38(false);
18126
- const [isModeMenuOpen, setIsModeMenuOpen] = useState38(false);
18145
+ const [isToolbarOpen, setIsToolbarOpen] = useState39(false);
18146
+ const [isModeMenuOpen, setIsModeMenuOpen] = useState39(false);
18127
18147
  const adapter = useEditorAdapter();
18128
18148
  const canLinkPage = adapter.permissions.canLinkPage;
18129
18149
  const resolvePage = adapter.pageLinks.resolvePage;
@@ -18276,7 +18296,7 @@ function UserMentionElement(props) {
18276
18296
  const resolveMember = adapter.mentions.resolveMember;
18277
18297
  const memberId = (_a = element.key) != null ? _a : "";
18278
18298
  const canShowCard = typeof resolveMember === "function" && memberId.length > 0;
18279
- const [wantOpen, setWantOpen] = useState39(false);
18299
+ const [wantOpen, setWantOpen] = useState40(false);
18280
18300
  const { profile, isLoading, hasResolved } = useMemberProfile({
18281
18301
  enabled: canShowCard && wantOpen,
18282
18302
  memberId,
@@ -18367,16 +18387,16 @@ function UserMentionElement(props) {
18367
18387
  import { DatePlugin as DatePlugin2 } from "@platejs/date/react";
18368
18388
  import { MentionPlugin } from "@platejs/mention/react";
18369
18389
  import { PlateElement as PlateElement29 } from "platejs/react";
18370
- import { useCallback as useCallback46, useState as useState42 } from "react";
18390
+ import { useCallback as useCallback46, useState as useState43 } from "react";
18371
18391
 
18372
18392
  // src/ui/mention-page-combobox-group.tsx
18373
18393
  import { FileTextIcon as FileTextIcon3 } from "lucide-react";
18374
- import { useEffect as useEffect45, useState as useState40 } from "react";
18394
+ import { useEffect as useEffect45, useState as useState41 } from "react";
18375
18395
  import { jsx as jsx155, jsxs as jsxs93 } from "react/jsx-runtime";
18376
18396
  function PageComboboxGroup({ search, onPageHover, onPageSelect }) {
18377
18397
  const adapter = useEditorAdapter();
18378
18398
  const debouncedSearch = useDebounce(search, 250);
18379
- const [pages, setPages] = useState40([]);
18399
+ const [pages, setPages] = useState41([]);
18380
18400
  useEffect45(() => {
18381
18401
  if (!adapter.permissions.canLinkPage) {
18382
18402
  setPages([]);
@@ -18426,12 +18446,12 @@ function PageStatusBadge({ status }) {
18426
18446
  }
18427
18447
 
18428
18448
  // src/ui/mention-people-combobox-group.tsx
18429
- import { useEffect as useEffect46, useState as useState41 } from "react";
18449
+ import { useEffect as useEffect46, useState as useState42 } from "react";
18430
18450
  import { jsx as jsx156, jsxs as jsxs94 } from "react/jsx-runtime";
18431
18451
  function PeopleComboboxGroup({ search, onUserHover, onUserSelect }) {
18432
18452
  const adapter = useEditorAdapter();
18433
18453
  const debouncedSearch = useDebounce(search, 150);
18434
- const [members, setMembers] = useState41([]);
18454
+ const [members, setMembers] = useState42([]);
18435
18455
  useEffect46(() => {
18436
18456
  if (!adapter.permissions.canMention) {
18437
18457
  setMembers([]);
@@ -18485,8 +18505,8 @@ var DEFAULT_PLACEHOLDER = "Mention a person, page, or date";
18485
18505
  var TODAY_PLACEHOLDER = "Today";
18486
18506
  function MentionInputElement(props) {
18487
18507
  const { children, editor, element } = props;
18488
- const [search, setSearch] = useState42("");
18489
- const [placeholder, setPlaceholder] = useState42(DEFAULT_PLACEHOLDER);
18508
+ const [search, setSearch] = useState43("");
18509
+ const [placeholder, setPlaceholder] = useState43(DEFAULT_PLACEHOLDER);
18490
18510
  const handleDateFocus = useCallback46(() => {
18491
18511
  setPlaceholder(TODAY_PLACEHOLDER);
18492
18512
  }, []);
@@ -3,4 +3,4 @@ export type { Value, PlateEditor, WebEditorProps, EditorFeatures, TocConfig };
3
3
  export { EditorTocProvider, type TocHeading, useEditorToc } from '../../context/editor-toc-context';
4
4
  export { extractHeadingsFromValue } from '../../lib/extract-headings';
5
5
  export { EditorTocSidebar } from '../../ui/toc-sidebar';
6
- export declare const WebEditor: (props: WebEditorProps) => import("react").JSX.Element;
6
+ export declare function WebEditor({ adapter, textFieldAttributes, ...props }: WebEditorProps): import("react").JSX.Element;