@haklex/rich-ext-chat 0.26.4 → 0.26.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.
@@ -2,30 +2,12 @@ import { A as variantPill, C as participantLabel, D as rail, E as participantRow
2
2
  import { i as _defineProperty, n as $isChatNode, o as createMessageId, r as ChatNode } from "./ChatNode-Clwy1xYj.js";
3
3
  import { $getNodeByKey, $insertNodes } from "lexical";
4
4
  import { ArrowDown, ArrowUp, MessageSquare, Pencil, Trash2 } from "lucide-react";
5
- import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
5
+ import { createElement, useCallback, useEffect, useRef, useState } from "react";
6
+ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
6
7
  import { useColorScheme } from "@haklex/rich-editor/static";
7
8
  import { presentDialog } from "@haklex/rich-editor-ui";
8
9
  import { usePortalTheme } from "@haklex/rich-style-token";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
- //#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalComposerContext.prod.mjs
11
- /**
12
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- *
17
- */
18
- var r = createContext(null);
19
- function o() {
20
- const n = useContext(r);
21
- return n ?? function(n, ...e) {
22
- const r = new URL("https://lexical.dev/docs/error"), t = new URLSearchParams();
23
- t.append("code", n);
24
- for (const n of e) t.append("v", n);
25
- throw r.search = t.toString(), Error(`Minified Lexical error #${n}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
26
- }(8), n;
27
- }
28
- //#endregion
29
11
  //#region src/variant-reducer.ts
30
12
  function switchVariant(next, participants) {
31
13
  return participants.map((p, idx) => {
@@ -324,7 +306,7 @@ var ChatEditRenderer = ({ variant, participants, messages, onChange, onCancel, r
324
306
  //#endregion
325
307
  //#region src/ChatEditDecorator.tsx
326
308
  var ChatEditDecorator = ({ nodeKey, variant, participants, messages }) => {
327
- const [editor] = o();
309
+ const [editor] = useLexicalComposerContext();
328
310
  const hasOpenedRef = useRef(false);
329
311
  const openTriggerRef = useRef(null);
330
312
  const messagesLengthRef = useRef(messages.length);
package/dist/edit.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as __augmentLoaded_chat } from "./augment-jeNYpQAa.js";
2
- import { a as ChatEditDecorator, i as ChatEditNode, n as $createChatEditNode, o as ChatEditRenderer, r as $isChatEditNode, s as ChatEditorModal, t as chatEditNodes } from "./edit-CGXHKuz3.js";
2
+ import { a as ChatEditDecorator, i as ChatEditNode, n as $createChatEditNode, o as ChatEditRenderer, r as $isChatEditNode, s as ChatEditorModal, t as chatEditNodes } from "./edit-BddA8uyk.js";
3
3
  export { $createChatEditNode, $isChatEditNode, ChatEditDecorator, ChatEditNode, ChatEditRenderer, ChatEditorModal, __augmentLoaded_chat, chatEditNodes };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as __augmentLoaded_chat } from "./augment-jeNYpQAa.js";
2
2
  import { t as ChatRenderer } from "./ChatRenderer-DaR63wyn.js";
3
- import { a as ChatEditDecorator, i as ChatEditNode, n as $createChatEditNode, o as ChatEditRenderer, r as $isChatEditNode, s as ChatEditorModal, t as chatEditNodes } from "./edit-CGXHKuz3.js";
4
3
  import { a as CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-Clwy1xYj.js";
4
+ import { a as ChatEditDecorator, i as ChatEditNode, n as $createChatEditNode, o as ChatEditRenderer, r as $isChatEditNode, s as ChatEditorModal, t as chatEditNodes } from "./edit-BddA8uyk.js";
5
5
  import { chatNodes } from "./node.mjs";
6
6
  import "./renderer.mjs";
7
7
  export { $createChatEditNode, $createChatNode, $isChatEditNode, $isChatNode, CHAT_NODE_KEY, ChatEditDecorator, ChatEditNode, ChatEditRenderer, ChatEditorModal, ChatNode, ChatRenderer, __augmentLoaded_chat, chatEditNodes, chatNodes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-ext-chat",
3
- "version": "0.26.4",
3
+ "version": "0.26.5",
4
4
  "description": "Static chat-snapshot node for the haklex rich editor",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,15 +53,16 @@
53
53
  "typescript": "^5.9.3",
54
54
  "unplugin-dts": "^1.0.1",
55
55
  "vite": "^8.0.14",
56
- "@haklex/rich-editor": "0.26.4"
56
+ "@haklex/rich-editor": "0.26.5"
57
57
  },
58
58
  "peerDependencies": {
59
+ "@lexical/react": "^0.45.0",
59
60
  "lexical": "^0.45.0",
60
61
  "lucide-react": "^1.0.0",
61
62
  "react": ">=19",
62
- "@haklex/rich-editor": "^0.26.4",
63
- "@haklex/rich-editor-ui": "^0.26.4",
64
- "@haklex/rich-style-token": "^0.26.4"
63
+ "@haklex/rich-editor": "^0.26.5",
64
+ "@haklex/rich-style-token": "^0.26.5",
65
+ "@haklex/rich-editor-ui": "^0.26.5"
65
66
  },
66
67
  "publishConfig": {
67
68
  "access": "public"