@talkjs/react-components 0.0.25 → 0.0.27
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/default.css +1 -1
- package/default.js +340 -338
- package/globalConstants.js +45 -39
- package/package.json +2 -2
- package/theming.js +397 -419
package/globalConstants.js
CHANGED
|
@@ -1,54 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createContext as
|
|
2
|
+
import { createContext as n, useContext as o } from "react";
|
|
3
|
+
import { Schema as l } from "prosemirror-model";
|
|
3
4
|
class i extends Error {
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
6
|
+
function r(t, e) {
|
|
7
|
+
if (!t) throw new i(e != null ? e : "Assertion failed");
|
|
7
8
|
}
|
|
8
|
-
const
|
|
9
|
-
return
|
|
9
|
+
const s = Object.assign(r, { is: function(t, e, c) {
|
|
10
|
+
return r(e, c);
|
|
10
11
|
}, unreachable: function() {
|
|
11
12
|
throw new Error("Unreachable code");
|
|
12
|
-
}, never: function(
|
|
13
|
+
}, never: function(t) {
|
|
13
14
|
throw new Error("Unreachable");
|
|
14
|
-
}, defined: function(
|
|
15
|
-
if (
|
|
16
|
-
} }), [
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return
|
|
15
|
+
}, defined: function(t) {
|
|
16
|
+
if (t == null) throw new i("Value is not defined");
|
|
17
|
+
} }), [g, x] = a(), [h, O] = a(), [C, D] = a(), [M, f] = a(), [j, b] = a(), m = n(void 0);
|
|
18
|
+
function v() {
|
|
19
|
+
const t = o(m);
|
|
20
|
+
return s(t !== void 0), t;
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
return
|
|
22
|
+
const u = n(void 0);
|
|
23
|
+
function w() {
|
|
24
|
+
const t = o(u);
|
|
25
|
+
return s(t !== void 0), t;
|
|
25
26
|
}
|
|
26
|
-
const [
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
return [
|
|
30
|
-
const
|
|
31
|
-
return
|
|
27
|
+
const [E, k] = a(), [P, A] = a();
|
|
28
|
+
function a() {
|
|
29
|
+
const t = n(void 0);
|
|
30
|
+
return [t, () => {
|
|
31
|
+
const e = o(t);
|
|
32
|
+
return s(e !== void 0), e;
|
|
32
33
|
}];
|
|
33
34
|
}
|
|
35
|
+
const S = new l({ nodes: { doc: { content: "paragraph+" }, paragraph: { code: !0, content: "inline*", parseDOM: [{ tag: "p" }], toDOM: () => ["p", 0] }, text: { group: "inline" }, mention: { group: "inline", inline: !0, attrs: { id: {}, name: {} }, content: "text*", toDOM: (t) => ["span", { "data-mention-id": t.attrs.id, class: "t-mention" }, `@${t.attrs.name}`], parseDOM: [{ tag: "span[data-mention-id]", getAttrs: (t) => ({ id: t.dataset["mention-id"] }) }] }, customemoji: { group: "inline", inline: !0, attrs: { name: {}, url: {} }, content: "text*", selectable: !1, toDOM: (t) => ["img", { src: t.attrs.url, alt: t.attrs.name, "data-custom-emoji": t.attrs.name }], parseDOM: [{ tag: "img[data-custom-emoji]", getAttrs: (t) => {
|
|
36
|
+
const e = t;
|
|
37
|
+
return { name: e.dataset.customEmoji, url: e.src };
|
|
38
|
+
} }] } }, marks: { literal: { toDOM: () => ["span", { "data-literal": "" }], parseDOM: [{ tag: "span[data-literal]" }] }, bold: { toDOM: () => ["b"], parseDOM: [{ tag: "b" }] }, italic: { toDOM: () => ["i"], parseDOM: [{ tag: "i" }] }, strikethrough: { toDOM: () => ["del"], parseDOM: [{ tag: "del" }] }, emoji: { attrs: { emoji: {} }, toDOM: (t) => ["span", { "data-emoji": t.attrs.emoji }, t.attrs.emoji], parseDOM: [{ tag: "span[data-emoji]", getAttrs: (t) => ({ emoji: t.dataset.emoji }) }] } } });
|
|
34
39
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
j as ChatboxCallbacksContext,
|
|
41
|
+
u as ControllerContext,
|
|
42
|
+
h as EditorInternalsContext,
|
|
43
|
+
E as EmojiPickerContext,
|
|
44
|
+
C as PermissionContext,
|
|
45
|
+
P as PopoverContext,
|
|
46
|
+
M as SessionContext,
|
|
47
|
+
m as StoreContext,
|
|
48
|
+
g as ThemeContext,
|
|
49
|
+
S as schema,
|
|
50
|
+
b as useChatboxCallbacks,
|
|
51
|
+
w as useController,
|
|
52
|
+
O as useEditorInternals,
|
|
53
|
+
k as useEmojiPicker,
|
|
54
|
+
D as usePermission,
|
|
55
|
+
A as usePopover,
|
|
56
|
+
f as useSession,
|
|
57
|
+
v as useStore,
|
|
52
58
|
x as useTheme
|
|
53
59
|
};
|
|
54
60
|
//# sourceMappingURL=globalConstants.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talkjs/react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://talkjs.com/?chat"
|
|
6
6
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@floating-ui/dom": "^1.6.5",
|
|
26
26
|
"@floating-ui/react-dom": "^2.1.6",
|
|
27
|
-
"@legendapp/state": "3.0.0-
|
|
27
|
+
"@legendapp/state": "3.0.0-beta.40",
|
|
28
28
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
29
29
|
"@radix-ui/react-popover": "^1.1.15",
|
|
30
30
|
"@talkjs/core": "^1.5.5",
|