@lax-wp/editor 0.3.13 → 0.3.16

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.
@@ -0,0 +1,14 @@
1
+ export type CaretColorUser = {
2
+ id?: string;
3
+ name?: string;
4
+ email?: string;
5
+ };
6
+ /**
7
+ * Picks a caret color when `currentUser.color` is not set.
8
+ * If `allUsers` is provided and non-empty, users are ordered deterministically and
9
+ * each index maps to a different color for the first N colors (N = palette length);
10
+ * user 21+ shares colors with earlier indices.
11
+ * If `allUsers` is missing or empty, colors are chosen from a hash of the user identity
12
+ * (no global uniqueness guarantee without the list).
13
+ */
14
+ export declare function getRandomBgColorForCaret(currentUser: CaretColorUser, allUsers?: CaretColorUser[] | null): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lax-wp/editor",
3
- "version": "0.3.13",
3
+ "version": "0.3.16",
4
4
  "description": "A modern, feature-rich editor built with React and TipTap",
5
5
  "keywords": [
6
6
  "editor",
@@ -53,7 +53,7 @@
53
53
  "@tiptap/extension-bold": "^3.6.5",
54
54
  "@tiptap/extension-character-count": "^3.6.2",
55
55
  "@tiptap/extension-code-block-lowlight": "^3.6.5",
56
- "@tiptap/extension-collaboration": "^3.10.7",
56
+ "@tiptap/extension-collaboration": "^3.22.3",
57
57
  "@tiptap/extension-collaboration-caret": "^3.10.7",
58
58
  "@tiptap/extension-document": "^3.6.2",
59
59
  "@tiptap/extension-hard-break": "^3.6.6",
@@ -77,7 +77,7 @@
77
77
  "@tiptap/extension-typography": "^3.6.2",
78
78
  "@tiptap/extension-underline": "^3.6.5",
79
79
  "@tiptap/extensions": "^3.6.2",
80
- "@tiptap/pm": "^3.6.2",
80
+ "@tiptap/pm": "^3.22.3",
81
81
  "@tiptap/react": "^3.6.2",
82
82
  "@tiptap/starter-kit": "^3.6.2",
83
83
  "classnames": "^2.5.1",
@@ -88,6 +88,7 @@
88
88
  "react-select": "^5.10.2"
89
89
  },
90
90
  "peerDependencies": {
91
+ "yjs": "^13.5.38",
91
92
  "@lax-wp/design-system": "*",
92
93
  "@monaco-editor/react": ">=4.0.0",
93
94
  "antd": "^5.27.0",
@@ -100,6 +101,9 @@
100
101
  "remark-gfm": ">=3.0.0"
101
102
  },
102
103
  "peerDependenciesMeta": {
104
+ "yjs": {
105
+ "optional": true
106
+ },
103
107
  "@monaco-editor/react": {
104
108
  "optional": true
105
109
  },
@@ -117,8 +121,9 @@
117
121
  }
118
122
  },
119
123
  "devDependencies": {
124
+ "yjs": "^13.6.27",
120
125
  "@eslint/js": "^9.30.1",
121
- "@lax-wp/design-system": "^0.9.11",
126
+ "@lax-wp/design-system": "^0.11.0",
122
127
  "@monaco-editor/react": "^4.6.0",
123
128
  "@types/react": "^18.2.0",
124
129
  "@types/react-dom": "^18.2.0",