@streamlayer/react 1.11.3-rc.5 → 1.11.3

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.
Files changed (96) hide show
  1. package/lib/app/advertisement.d.ts +18 -0
  2. package/lib/app/app.d.ts +19 -0
  3. package/lib/{auth.d.ts → app/auth.d.ts} +4 -13
  4. package/lib/app/event.d.ts +4 -0
  5. package/lib/app/insight.d.ts +13 -0
  6. package/lib/app/masters.d.ts +28 -0
  7. package/lib/app/notification.d.ts +5 -0
  8. package/lib/app/points.d.ts +3 -0
  9. package/lib/app/provider.d.ts +43 -0
  10. package/lib/app/useStreamLayerApp.d.ts +19 -0
  11. package/lib/cjs/advertisement.js +1 -1
  12. package/lib/cjs/auth.js +1 -1
  13. package/lib/cjs/gamification-feature.js +1 -1
  14. package/lib/cjs/gamification-feature2.js +1 -0
  15. package/lib/cjs/index.js +1 -1
  16. package/lib/cjs/insight.js +1 -1
  17. package/lib/cjs/masters.js +1 -0
  18. package/lib/cjs/masters2.js +9 -0
  19. package/lib/cjs/notification.js +1 -1
  20. package/lib/cjs/points.js +1 -1
  21. package/lib/cjs/provider.js +98 -85
  22. package/lib/cjs/useStreamLayerApp2.js +17 -15
  23. package/lib/classic/app/advertisement.d.ts +18 -0
  24. package/lib/classic/app/app.d.ts +19 -0
  25. package/lib/classic/{auth.d.ts → app/auth.d.ts} +4 -13
  26. package/lib/classic/app/event.d.ts +4 -0
  27. package/lib/classic/app/insight.d.ts +13 -0
  28. package/lib/classic/app/masters.d.ts +28 -0
  29. package/lib/classic/app/notification.d.ts +5 -0
  30. package/lib/classic/app/points.d.ts +3 -0
  31. package/lib/classic/app/provider.d.ts +43 -0
  32. package/lib/classic/app/useStreamLayerApp.d.ts +19 -0
  33. package/lib/classic/cjs/advertisement.js +1 -1
  34. package/lib/classic/cjs/auth.js +1 -1
  35. package/lib/classic/cjs/gamification-feature.js +1 -1
  36. package/lib/classic/cjs/gamification-feature2.js +1 -0
  37. package/lib/classic/cjs/index.js +1 -1
  38. package/lib/classic/cjs/insight.js +1 -1
  39. package/lib/classic/cjs/masters.js +1 -0
  40. package/lib/classic/cjs/masters2.js +9 -0
  41. package/lib/classic/cjs/notification.js +1 -1
  42. package/lib/classic/cjs/points.js +1 -1
  43. package/lib/classic/cjs/provider.js +98 -85
  44. package/lib/classic/cjs/useStreamLayerApp2.js +17 -15
  45. package/lib/classic/es/advertisement.js +619 -719
  46. package/lib/classic/es/auth.js +2 -5
  47. package/lib/classic/es/gamification-feature.js +1 -1
  48. package/lib/classic/es/gamification-feature2.js +4 -0
  49. package/lib/classic/es/index.js +14 -11
  50. package/lib/classic/es/insight.js +33 -33
  51. package/lib/classic/es/masters.js +8 -0
  52. package/lib/classic/es/masters2.js +1106 -0
  53. package/lib/classic/es/notification.js +378 -453
  54. package/lib/classic/es/points.js +39 -64
  55. package/lib/classic/es/provider.js +15850 -13307
  56. package/lib/classic/es/useStreamLayerApp2.js +8135 -4692
  57. package/lib/classic/index.d.ts +14 -218
  58. package/lib/classic/masters.d.ts +5 -0
  59. package/lib/classic/style.css +1 -455
  60. package/lib/dist/cjs/gamification-feature.js +1 -0
  61. package/lib/dist/cjs/gamification-feature2.js +1 -0
  62. package/lib/dist/cjs/index.js +1 -0
  63. package/lib/dist/cjs/masters.js +219 -0
  64. package/lib/dist/cjs/package.json +1 -0
  65. package/lib/dist/es/gamification-feature.js +4 -0
  66. package/lib/dist/es/gamification-feature2.js +123 -0
  67. package/lib/dist/es/index.js +9 -0
  68. package/lib/dist/es/masters.js +42736 -0
  69. package/lib/dist/es/package.json +1 -0
  70. package/lib/dist/style.css +1 -0
  71. package/lib/es/advertisement.js +619 -719
  72. package/lib/es/auth.js +2 -5
  73. package/lib/es/gamification-feature.js +1 -1
  74. package/lib/es/gamification-feature2.js +4 -0
  75. package/lib/es/index.js +14 -11
  76. package/lib/es/insight.js +33 -33
  77. package/lib/es/masters.js +8 -0
  78. package/lib/es/masters2.js +1106 -0
  79. package/lib/es/notification.js +378 -453
  80. package/lib/es/points.js +39 -64
  81. package/lib/es/provider.js +15856 -13306
  82. package/lib/es/useStreamLayerApp2.js +8135 -4692
  83. package/lib/index.d.ts +14 -218
  84. package/lib/masters.d.ts +5 -0
  85. package/lib/style.css +1 -1
  86. package/package.json +57 -3
  87. package/lib/advertisement.d.ts +0 -146
  88. package/lib/classic/advertisement.d.ts +0 -146
  89. package/lib/classic/insight.d.ts +0 -136
  90. package/lib/classic/notification.d.ts +0 -120
  91. package/lib/classic/points.d.ts +0 -12
  92. package/lib/classic/useStreamLayerApp.d.ts +0 -167
  93. package/lib/insight.d.ts +0 -136
  94. package/lib/notification.d.ts +0 -120
  95. package/lib/points.d.ts +0 -12
  96. package/lib/useStreamLayerApp.d.ts +0 -167
@@ -1,14 +1,11 @@
1
1
  import { useEffect as o } from "react";
2
- import "react/jsx-runtime";
3
2
  import { u } from "./provider.js";
4
- import "@nanostores/react";
5
- import "nanostores";
6
- const s = ({ token: t, schema: i }) => {
3
+ const f = ({ token: t, schema: i }) => {
7
4
  const r = u();
8
5
  return o(() => {
9
6
  t && i && r && r.authorizationBypass(i, t), r && (r.withAuth = !0);
10
7
  }, [t, i, r]), null;
11
8
  };
12
9
  export {
13
- s as StreamLayerLogin
10
+ f as StreamLayerLogin
14
11
  };
@@ -1,4 +1,4 @@
1
- import { G as f } from "./provider.js";
1
+ import { P as f } from "./provider.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,4 @@
1
+ import { z as f } from "./masters2.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,13 +1,16 @@
1
- import { S as r, a as t, b as S, h as m, u as o, d as s, c as y } from "./provider.js";
2
- import { StreamLayerSDKNotification as i, StreamLayerSDKNotificationUI as c } from "./notification.js";
1
+ import { a2 as S, S as o, a9 as i, h as s, u as y, b as L, j as p } from "./provider.js";
2
+ import "./useStreamLayerApp2.js";
3
+ import "react/jsx-runtime";
4
+ import "react";
5
+ import { StreamLayerSDKNotification as u, StreamLayerSDKNotificationUI as D } from "./notification.js";
3
6
  export {
4
- r as StreamLayerProvider,
5
- t as StreamLayerSDKEvent,
6
- i as StreamLayerSDKNotification,
7
- c as StreamLayerSDKNotificationUI,
8
- S as StreamLayerSDKReact,
9
- m as StreamLayerThemeProvider,
10
- o as useStreamLayer,
11
- s as useStreamLayerTheme,
12
- y as useStreamLayerUI
7
+ S as StreamLayerProvider,
8
+ o as StreamLayerSDKEvent,
9
+ u as StreamLayerSDKNotification,
10
+ D as StreamLayerSDKNotificationUI,
11
+ i as StreamLayerSDKReact,
12
+ s as StreamLayerThemeProvider,
13
+ y as useStreamLayer,
14
+ L as useStreamLayerTheme,
15
+ p as useStreamLayerUI
13
16
  };
@@ -1,72 +1,72 @@
1
1
  import { jsx as u, jsxs as c } from "react/jsx-runtime";
2
- import { e as m, s as l, m as p, u as h, d as f, h as S, a as g } from "./provider.js";
3
- import { useRef as I, useEffect as y } from "react";
4
- import "@bufbuild/protobuf";
5
- import { S as v } from "./useStreamLayerApp2.js";
6
- const k = () => p, L = /* @__PURE__ */ l(k())({
7
- name: "y",
8
- class: "y1tj7gx6",
2
+ import { useRef as l, useEffect as h } from "react";
3
+ import { a as m, s as p, z as f, u as S, b as I, h as g, S as v } from "./provider.js";
4
+ import { S as y } from "./useStreamLayerApp2.js";
5
+ const Q = () => f, b = /* @__PURE__ */ p(Q())({
6
+ name: "QuestionWrap",
7
+ class: "q10hhsxv",
9
8
  propsAsIs: !0
10
- }), Q = ({
9
+ }), k = ({
11
10
  gamification: e,
12
11
  persistent: r,
13
- skipAutoClose: o,
14
- hideHeader: a,
12
+ skipAutoClose: n,
13
+ hideHeader: o,
15
14
  insightId: s
16
15
  }) => {
17
- const t = I(""), d = m(e.openedQuestion.$store);
18
- return y(() => s ? (!r || e.isOpenedQuestion(s) || (t.current = s, e.getFeedItem(s).then((i) => {
19
- var n;
20
- t.current === s && ((n = i == null ? void 0 : i.attributes) == null ? void 0 : n.attributes.case) === "insight" && e.openQuestion(s, i);
16
+ const t = l(""), d = m(e.openedQuestion.$store);
17
+ return h(() => s ? (!r || e.isOpenedQuestion(s) || (t.current = s, e.getFeedItem(s).then((i) => {
18
+ var a;
19
+ t.current === s && ((a = i == null ? void 0 : i.attributes) == null ? void 0 : a.attributes.case) === "insight" && e.openQuestion(s, i);
21
20
  })), () => {
22
21
  t.current = "";
23
22
  }) : (e.activeQuestionId.subscribe(({
24
23
  data: i
25
24
  }) => {
26
- var n;
27
- i && ((n = i.feedItem) == null ? void 0 : n.type) === "insight" && (!r || e.isOpenedQuestion(i.feedItem.id) || (t.current = i.feedItem.id, e.openQuestion(i.feedItem.id, i.feedItem))), !i && t.current && (e.closeQuestion(t.current), t.current = "");
25
+ var a;
26
+ i && ((a = i.feedItem) == null ? void 0 : a.type) === "insight" && (!r || e.isOpenedQuestion(i.feedItem.id) || (t.current = i.feedItem.id, e.openQuestion(i.feedItem.id, i.feedItem))), !i && t.current && (e.closeQuestion(t.current), t.current = "");
28
27
  }), () => {
29
- }), [e, r, s]), d ? /* @__PURE__ */ u(L, {
30
- skipAutoClose: o,
31
- hideHeader: a,
28
+ }), [e, r, s]), d ? /* @__PURE__ */ u(b, {
29
+ skipAutoClose: n,
30
+ hideHeader: o,
32
31
  gamification: e,
33
32
  hideSponsor: !0
34
33
  }) : null;
35
34
  }, A = ({
36
35
  sdk: e,
37
36
  persistent: r,
38
- skipAutoClose: o,
39
- insightId: a,
37
+ skipAutoClose: n,
38
+ insightId: o,
40
39
  hideHeader: s
41
40
  }) => {
42
- if (!m(e.featuresList.getStore())) return null;
43
- const t = e.getFeature(v.GAMES);
44
- return t ? /* @__PURE__ */ u(Q, {
45
- insightId: a,
41
+ if (!m(e.featuresList.getStore()))
42
+ return null;
43
+ const t = e.getFeature(y.GAMES);
44
+ return t ? /* @__PURE__ */ u(k, {
45
+ insightId: o,
46
46
  persistent: r,
47
47
  hideHeader: s,
48
48
  gamification: t,
49
- skipAutoClose: o
49
+ skipAutoClose: n
50
50
  }) : null;
51
51
  }, H = ({
52
52
  event: e,
53
53
  theme: r,
54
- hideHeader: o,
55
- skipAutoClose: a,
54
+ hideHeader: n,
55
+ skipAutoClose: o,
56
56
  persistent: s
57
57
  }) => {
58
- const t = h(), d = f();
58
+ const t = S(), d = I();
59
59
  return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
60
- /* @__PURE__ */ u(S, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
60
+ /* @__PURE__ */ u(g, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
61
61
  A,
62
62
  {
63
- skipAutoClose: a,
63
+ skipAutoClose: o,
64
64
  sdk: t,
65
- hideHeader: o,
65
+ hideHeader: n,
66
66
  persistent: s
67
67
  }
68
68
  ) }),
69
- e !== void 0 && /* @__PURE__ */ u(g, { event: e })
69
+ e !== void 0 && /* @__PURE__ */ u(v, { event: e })
70
70
  ] }) : null;
71
71
  };
72
72
  export {
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import { M as o, a as s } from "./masters2.js";
3
+ import "react";
4
+ import "./provider.js";
5
+ export {
6
+ o as MastersStreamLayerProvider,
7
+ s as MastersStreamLayerSDKReact
8
+ };