@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.
@@ -1,54 +1,60 @@
1
1
  "use client";
2
- import { createContext as o, useContext as s } from "react";
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 a(e, n) {
6
- if (!e) throw new i(n != null ? n : "Assertion failed");
6
+ function r(t, e) {
7
+ if (!t) throw new i(e != null ? e : "Assertion failed");
7
8
  }
8
- const r = Object.assign(a, { is: function(e, n, c) {
9
- return a(n, c);
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(e) {
13
+ }, never: function(t) {
13
14
  throw new Error("Unreachable");
14
- }, defined: function(e) {
15
- if (e == null) throw new i("Value is not defined");
16
- } }), [d, x] = t(), [f, h] = t(), [v, b] = t(), [m, w] = t(), [E, P] = t(), u = o(void 0);
17
- function p() {
18
- const e = s(u);
19
- return r(e !== void 0), e;
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 l = o(void 0);
22
- function j() {
23
- const e = s(l);
24
- return r(e !== void 0), e;
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 [k, S] = t(), [U, g] = t();
27
- function t() {
28
- const e = o(void 0);
29
- return [e, () => {
30
- const n = s(e);
31
- return r(n !== void 0), n;
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
- E as ChatboxCallbacksContext,
36
- l as ControllerContext,
37
- f as EditorInternalsContext,
38
- k as EmojiPickerContext,
39
- v as PermissionContext,
40
- U as PopoverContext,
41
- m as SessionContext,
42
- u as StoreContext,
43
- d as ThemeContext,
44
- P as useChatboxCallbacks,
45
- j as useController,
46
- h as useEditorInternals,
47
- S as useEmojiPicker,
48
- b as usePermission,
49
- g as usePopover,
50
- w as useSession,
51
- p as useStore,
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.25",
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-alpha.9",
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",