@haklex/rich-ext-chat 0.28.0 → 0.29.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.
@@ -37,7 +37,7 @@ function createDefaultParticipants(variant) {
37
37
  */
38
38
  var CHAT_NODE_KEY = "Chat";
39
39
  //#endregion
40
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
40
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
41
41
  function _typeof(o) {
42
42
  "@babel/helpers - typeof";
43
43
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -47,7 +47,7 @@ function _typeof(o) {
47
47
  }, _typeof(o);
48
48
  }
49
49
  //#endregion
50
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
50
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
51
51
  function toPrimitive(t, r) {
52
52
  if ("object" != _typeof(t) || !t) return t;
53
53
  var e = t[Symbol.toPrimitive];
@@ -59,13 +59,13 @@ function toPrimitive(t, r) {
59
59
  return ("string" === r ? String : Number)(t);
60
60
  }
61
61
  //#endregion
62
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
62
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
63
63
  function toPropertyKey(t) {
64
64
  var i = toPrimitive(t, "string");
65
65
  return "symbol" == _typeof(i) ? i : i + "";
66
66
  }
67
67
  //#endregion
68
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
68
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
69
69
  function _defineProperty(e, r, t) {
70
70
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
71
71
  value: t,
@@ -128,7 +128,8 @@ var ChatNode = class ChatNode extends DecoratorNode {
128
128
  const writable = this.getWritable();
129
129
  writable.__messages = messages;
130
130
  }
131
- static importJSON(serializedNode) {
131
+ static importJSON(_serializedNode) {
132
+ const serializedNode = _serializedNode;
132
133
  return new ChatNode({
133
134
  variant: serializedNode.variant,
134
135
  participants: serializedNode.participants,
@@ -1,5 +1,5 @@
1
1
  import { A as variantPill, C as participantLabel, D as rail, E as participantRow, M as variantPillHint, N as variantPillName, O as sectionLabel, P as variantStack, S as participantInput, T as participantPillUser, _ as modalBody, a as buttonGhost, b as pane, c as editLabel, d as messageActions, f as messageCard, g as modal, h as messageTextarea, i as button, j as variantPillActive, k as semanticClassNames, l as editOverlay, m as messageSelect, n as addMessage, o as buttonPrimary, p as messageHead, r as addMessageButton, s as editContainer, t as ChatRenderer, u as editorDialogPopup, v as modalFooter, w as participantPill, x as participantCard, y as modalHeader } from "./ChatRenderer-DaR63wyn.js";
2
- import { i as _defineProperty, n as $isChatNode, o as createMessageId, r as ChatNode } from "./ChatNode-B23WwSAb.js";
2
+ import { i as _defineProperty, n as $isChatNode, o as createMessageId, r as ChatNode } from "./ChatNode-CJEERlch.js";
3
3
  import { $getNodeByKey, $insertNodes } from "lexical";
4
4
  import { ArrowDown, ArrowUp, MessageSquare, Pencil, Trash2 } from "lucide-react";
5
5
  import { createElement, useCallback, useEffect, useRef, useState } from "react";
@@ -355,7 +355,8 @@ var ChatEditNode = class ChatEditNode extends ChatNode {
355
355
  messages: node.__messages
356
356
  }, node.__key);
357
357
  }
358
- static importJSON(serializedNode) {
358
+ static importJSON(_serializedNode) {
359
+ const serializedNode = _serializedNode;
359
360
  return new ChatEditNode({
360
361
  variant: serializedNode.variant,
361
362
  participants: serializedNode.participants,
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-D6AYtppg.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-ClzRvXku.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 CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-B23WwSAb.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-D6AYtppg.js";
3
+ import { a as CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-CJEERlch.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-ClzRvXku.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/dist/node.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __augmentLoaded_chat } from "./augment-jeNYpQAa.js";
2
- import { a as CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-B23WwSAb.js";
2
+ import { a as CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-CJEERlch.js";
3
3
  //#region src/node.ts
4
4
  var chatNodes = [ChatNode];
5
5
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { CommandItemConfig } from '@haklex/rich-editor/commands';
2
- import { EditorConfig, LexicalEditor, LexicalNode } from 'lexical';
2
+ import { EditorConfig, LexicalEditor, LexicalNode, SerializedLexicalNode } from 'lexical';
3
3
  import { ReactElement } from 'react';
4
- import { ChatMessage, ChatParticipant, ChatVariant, SerializedChatNode } from '../types';
4
+ import { ChatMessage, ChatParticipant, ChatVariant } from '../types';
5
5
  import { ChatNode } from './ChatNode';
6
6
  export interface ChatEditNodePayload {
7
7
  messages?: ChatMessage[];
@@ -11,7 +11,7 @@ export interface ChatEditNodePayload {
11
11
  export declare class ChatEditNode extends ChatNode {
12
12
  static commandItems: CommandItemConfig[];
13
13
  static clone(node: ChatEditNode): ChatEditNode;
14
- static importJSON(serializedNode: SerializedChatNode): ChatEditNode;
14
+ static importJSON(_serializedNode: SerializedLexicalNode & Record<string, unknown>): ChatEditNode;
15
15
  decorate(_editor: LexicalEditor, _config: EditorConfig): ReactElement;
16
16
  }
17
17
  export declare function $createChatEditNode(payload: ChatEditNodePayload): ChatEditNode;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatEditNode.d.ts","sourceRoot":"","sources":["../../src/nodes/ChatEditNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IACjC,OAAO,EAAE,WAAW,CAAC;CACtB;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AM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/D,YAAY;IASf,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;CAQtE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAE9E;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,YAAY,CAE1F"}
@@ -1,4 +1,4 @@
1
- import { EditorConfig, LexicalEditor, LexicalNode, NodeKey, DecoratorNode } from 'lexical';
1
+ import { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, DecoratorNode } from 'lexical';
2
2
  import { ReactElement } from 'react';
3
3
  import { ChatMessage, ChatParticipant, ChatVariant, SerializedChatNode } from '../types';
4
4
  export type { SerializedChatNode } from '../types';
@@ -23,7 +23,7 @@ export declare class ChatNode extends DecoratorNode<ReactElement> {
23
23
  setParticipants(participants: ChatParticipant[]): void;
24
24
  getMessages(): ChatMessage[];
25
25
  setMessages(messages: ChatMessage[]): void;
26
- static importJSON(serializedNode: SerializedChatNode): ChatNode;
26
+ static importJSON(_serializedNode: SerializedLexicalNode & Record<string, unknown>): ChatNode;
27
27
  exportJSON(): SerializedChatNode;
28
28
  decorate(_editor: LexicalEditor, _config: EditorConfig): ReactElement;
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ChatNode.d.ts","sourceRoot":"","sources":["../../src/nodes/ChatNode.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE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E,WAAW,EAAE,GAAG,IAAI;IAK1C,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ;IAS7F,UAAU,IAAI,kBAAkB;IAWhC,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;CAOtE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAElE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,QAAQ,CAElF"}
package/dist/static.mjs CHANGED
@@ -1,6 +1,6 @@
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 CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-B23WwSAb.js";
3
+ import { a as CHAT_NODE_KEY, n as $isChatNode, r as ChatNode, t as $createChatNode } from "./ChatNode-CJEERlch.js";
4
4
  import { chatNodes } from "./node.mjs";
5
5
  import "./renderer.mjs";
6
6
  export { $createChatNode, $isChatNode, CHAT_NODE_KEY, ChatNode, ChatRenderer, __augmentLoaded_chat, chatNodes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-ext-chat",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Static chat-snapshot node for the haklex rich editor",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,31 +38,31 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@streamdown/code": "^1.1.1",
41
- "nanoid": "^5.1.11",
41
+ "nanoid": "^5.1.16",
42
42
  "streamdown": "^2.5.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@lexical/react": "^0.45.0",
45
+ "@lexical/react": "^0.46.0",
46
46
  "@types/react": "^19.2.17",
47
47
  "@types/react-dom": "^19.2.3",
48
- "@vanilla-extract/css": "^1.20.1",
49
- "@vanilla-extract/vite-plugin": "^5.2.2",
50
- "lexical": "^0.45.0",
51
- "react": "19.2.6",
52
- "react-dom": "19.2.6",
53
- "typescript": "^5.9.3",
54
- "unplugin-dts": "^1.0.2",
55
- "vite": "^8.0.16",
56
- "@haklex/rich-editor": "0.28.0"
48
+ "@vanilla-extract/css": "^1.21.0",
49
+ "@vanilla-extract/vite-plugin": "^5.2.3",
50
+ "lexical": "^0.46.0",
51
+ "react": "^19.2.7",
52
+ "react-dom": "19.2.7",
53
+ "typescript": "^6.0.3",
54
+ "unplugin-dts": "^1.0.3",
55
+ "vite": "^8.1.0",
56
+ "@haklex/rich-editor": "0.29.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@lexical/react": "^0.45.0",
60
- "lexical": "^0.45.0",
59
+ "@lexical/react": "^0.46.0",
60
+ "lexical": "^0.46.0",
61
61
  "lucide-react": "^1.0.0",
62
62
  "react": ">=19",
63
- "@haklex/rich-editor": "^0.28.0",
64
- "@haklex/rich-editor-ui": "^0.28.0",
65
- "@haklex/rich-style-token": "^0.28.0"
63
+ "@haklex/rich-editor": "^0.29.0",
64
+ "@haklex/rich-editor-ui": "^0.29.0",
65
+ "@haklex/rich-style-token": "^0.29.0"
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public"