@streamlayer/react 1.24.6 → 1.24.8-pre.11da316

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 (167) hide show
  1. package/lib/app/advertisement.d.ts +5 -0
  2. package/lib/cjs/advertisement.js +19657 -203
  3. package/lib/cjs/auth.js +4459 -1
  4. package/lib/cjs/bet-pack.js +15728 -1
  5. package/lib/cjs/index.js +19469 -1
  6. package/lib/cjs/insight.js +13571 -1
  7. package/lib/cjs/masters.js +20735 -1
  8. package/lib/cjs/notification.js +13118 -1
  9. package/lib/cjs/package.json +1 -0
  10. package/lib/cjs/pause-ad.js +8390 -1
  11. package/lib/cjs/points.js +7220 -1
  12. package/lib/cjs/polyfills.js +69 -0
  13. package/lib/cjs/polymarket.js +16395 -14
  14. package/lib/cjs/style.css +1 -0
  15. package/lib/cjs/useStreamLayerApp.js +4705 -1
  16. package/lib/dist/cjs/index.js +20735 -1
  17. package/lib/dist/es/index.js +20708 -10
  18. package/lib/dist/es/polyfills.js +92 -0
  19. package/lib/es/Question.js +75 -72
  20. package/lib/es/advertisement.js +9223 -8168
  21. package/lib/es/analytics.js +35 -31
  22. package/lib/es/auth.js +1 -1
  23. package/lib/es/bet-pack.js +1 -1
  24. package/lib/es/feature.js +60 -56
  25. package/lib/{classic/es/hooks-n9ax4LRT.js → es/hooks-42q2i9Iw.js} +25 -23
  26. package/lib/{dist/es/index-CfSdnrfA.js → es/index-sWgEw6jy.js} +1 -1
  27. package/lib/es/index.js +1 -1
  28. package/lib/es/index10.js +181 -7
  29. package/lib/es/index11.js +371 -181
  30. package/lib/es/index12.js +116 -128
  31. package/lib/es/index13.js +101 -97
  32. package/lib/es/index14.js +14 -14
  33. package/lib/es/index15.js +384 -414
  34. package/lib/es/index16.js +380 -382
  35. package/lib/es/index2.js +53 -56
  36. package/lib/es/index3.js +34 -4
  37. package/lib/es/index4.js +2 -2
  38. package/lib/es/index5.js +272 -16
  39. package/lib/es/index6.js +1 -1
  40. package/lib/es/index8.js +8 -282
  41. package/lib/es/index9.js +133 -75
  42. package/lib/es/insight.js +2 -2
  43. package/lib/es/masters.js +1 -1
  44. package/lib/es/masters2.js +34 -35
  45. package/lib/es/notification.js +28 -28
  46. package/lib/es/pause-ad.js +20 -20
  47. package/lib/es/points.js +9 -9
  48. package/lib/es/polymarket.js +38 -38
  49. package/lib/es/storage.js +19 -19
  50. package/lib/es/style.css +1 -0
  51. package/lib/es/useStreamLayerApp.js +1 -1
  52. package/lib/es/useStreamLayerApp2.js +6756 -5470
  53. package/lib/es/utils.js +86 -41
  54. package/lib/source.css +1 -120
  55. package/package.json +99 -83
  56. package/lib/cjs/Question.js +0 -1
  57. package/lib/cjs/analytics.js +0 -1
  58. package/lib/cjs/feature.js +0 -1
  59. package/lib/cjs/gamification-feature.js +0 -1
  60. package/lib/cjs/gamification-feature2.js +0 -1
  61. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  62. package/lib/cjs/index-CfSdnrfA.js +0 -5
  63. package/lib/cjs/index10.js +0 -1
  64. package/lib/cjs/index11.js +0 -1
  65. package/lib/cjs/index12.js +0 -1
  66. package/lib/cjs/index13.js +0 -4
  67. package/lib/cjs/index14.js +0 -1
  68. package/lib/cjs/index15.js +0 -1
  69. package/lib/cjs/index16.js +0 -5
  70. package/lib/cjs/index2.js +0 -1
  71. package/lib/cjs/index3.js +0 -1
  72. package/lib/cjs/index4.js +0 -5
  73. package/lib/cjs/index5.js +0 -1
  74. package/lib/cjs/index6.js +0 -1
  75. package/lib/cjs/index7.js +0 -1
  76. package/lib/cjs/index8.js +0 -1
  77. package/lib/cjs/index9.js +0 -7
  78. package/lib/cjs/masters2.js +0 -8
  79. package/lib/cjs/storage.js +0 -1
  80. package/lib/cjs/theme.js +0 -1
  81. package/lib/cjs/useStreamLayerApp2.js +0 -17
  82. package/lib/cjs/utils.js +0 -47
  83. package/lib/classic/app/advertisement.d.ts +0 -19
  84. package/lib/classic/app/app.d.ts +0 -23
  85. package/lib/classic/app/auth.d.ts +0 -4
  86. package/lib/classic/app/bet-pack.d.ts +0 -10
  87. package/lib/classic/app/insight.d.ts +0 -13
  88. package/lib/classic/app/masters.d.ts +0 -19
  89. package/lib/classic/app/notification.d.ts +0 -5
  90. package/lib/classic/app/pause-ad.d.ts +0 -27
  91. package/lib/classic/app/points.d.ts +0 -3
  92. package/lib/classic/app/polymarket.d.ts +0 -7
  93. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  94. package/lib/classic/cjs/Question.js +0 -1
  95. package/lib/classic/cjs/advertisement.js +0 -203
  96. package/lib/classic/cjs/analytics.js +0 -1
  97. package/lib/classic/cjs/auth.js +0 -1
  98. package/lib/classic/cjs/bet-pack.js +0 -5
  99. package/lib/classic/cjs/feature.js +0 -1
  100. package/lib/classic/cjs/gamification-feature.js +0 -1
  101. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  102. package/lib/classic/cjs/index-CfSdnrfA.js +0 -5
  103. package/lib/classic/cjs/index.js +0 -1
  104. package/lib/classic/cjs/index10.js +0 -1
  105. package/lib/classic/cjs/index11.js +0 -1
  106. package/lib/classic/cjs/index12.js +0 -1
  107. package/lib/classic/cjs/index13.js +0 -4
  108. package/lib/classic/cjs/index2.js +0 -5
  109. package/lib/classic/cjs/index3.js +0 -1
  110. package/lib/classic/cjs/index4.js +0 -1
  111. package/lib/classic/cjs/index5.js +0 -1
  112. package/lib/classic/cjs/index6.js +0 -1
  113. package/lib/classic/cjs/index7.js +0 -7
  114. package/lib/classic/cjs/index8.js +0 -1
  115. package/lib/classic/cjs/index9.js +0 -1
  116. package/lib/classic/cjs/insight.js +0 -1
  117. package/lib/classic/cjs/notification.js +0 -1
  118. package/lib/classic/cjs/notification2.js +0 -1
  119. package/lib/classic/cjs/pause-ad.js +0 -1
  120. package/lib/classic/cjs/points.js +0 -1
  121. package/lib/classic/cjs/polymarket.js +0 -14
  122. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  123. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  124. package/lib/classic/cjs/utils.js +0 -47
  125. package/lib/classic/es/Question.js +0 -503
  126. package/lib/classic/es/advertisement.js +0 -38792
  127. package/lib/classic/es/analytics.js +0 -84
  128. package/lib/classic/es/auth.js +0 -11
  129. package/lib/classic/es/bet-pack.js +0 -3418
  130. package/lib/classic/es/feature.js +0 -210
  131. package/lib/classic/es/gamification-feature.js +0 -4
  132. package/lib/classic/es/index-CfSdnrfA.js +0 -3775
  133. package/lib/classic/es/index.js +0 -15
  134. package/lib/classic/es/index10.js +0 -321
  135. package/lib/classic/es/index11.js +0 -2592
  136. package/lib/classic/es/index12.js +0 -185
  137. package/lib/classic/es/index13.js +0 -820
  138. package/lib/classic/es/index2.js +0 -2605
  139. package/lib/classic/es/index3.js +0 -19
  140. package/lib/classic/es/index4.js +0 -6
  141. package/lib/classic/es/index5.js +0 -4
  142. package/lib/classic/es/index6.js +0 -285
  143. package/lib/classic/es/index7.js +0 -181
  144. package/lib/classic/es/index8.js +0 -7
  145. package/lib/classic/es/index9.js +0 -11
  146. package/lib/classic/es/insight.js +0 -79
  147. package/lib/classic/es/notification.js +0 -9
  148. package/lib/classic/es/notification2.js +0 -1126
  149. package/lib/classic/es/pause-ad.js +0 -232
  150. package/lib/classic/es/points.js +0 -76
  151. package/lib/classic/es/polymarket.js +0 -6617
  152. package/lib/classic/es/useStreamLayerApp.js +0 -4
  153. package/lib/classic/es/useStreamLayerApp2.js +0 -11627
  154. package/lib/classic/es/utils.js +0 -76
  155. package/lib/classic/index.d.ts +0 -6
  156. package/lib/classic/masters.d.ts +0 -8
  157. package/lib/classic/source.css +0 -110
  158. package/lib/dist/cjs/gamification-feature.js +0 -1
  159. package/lib/dist/cjs/index-CfSdnrfA.js +0 -5
  160. package/lib/dist/cjs/masters.js +0 -69
  161. package/lib/dist/es/gamification-feature.js +0 -4
  162. package/lib/dist/es/masters.js +0 -22387
  163. package/lib/dist/index.d.ts +0 -1357
  164. package/lib/dist/source.css +0 -64
  165. package/lib/es/hooks-n9ax4LRT.js +0 -97
  166. package/lib/es/index-CfSdnrfA.js +0 -3775
  167. package/lib/style.css +0 -1
@@ -1,210 +0,0 @@
1
- import y, { forwardRef as A, createElement as O } from "react";
2
- import { listenKeys as _ } from "nanostores";
3
- import { pino as M } from "pino";
4
- import { S as g } from "./useStreamLayerApp2.js";
5
- var B = function() {
6
- const t = Array.prototype.slice.call(arguments).filter(Boolean), n = {}, r = [];
7
- t.forEach((a) => {
8
- (a ? a.split(" ") : []).forEach((c) => {
9
- if (c.startsWith("atm_")) {
10
- const [, p] = c.split("_");
11
- n[p] = c;
12
- } else
13
- r.push(c);
14
- });
15
- });
16
- const o = [];
17
- for (const a in n)
18
- Object.prototype.hasOwnProperty.call(n, a) && o.push(n[a]);
19
- return o.push(...r), o.join(" ");
20
- }, R = B;
21
- function D(e) {
22
- var t = /* @__PURE__ */ Object.create(null);
23
- return function(n) {
24
- return t[n] === void 0 && (t[n] = e(n)), t[n];
25
- };
26
- }
27
- var H = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, x = /* @__PURE__ */ D(
28
- function(e) {
29
- return H.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
30
- }
31
- /* Z+1 */
32
- ), j = (e) => e.toUpperCase() === e, q = (e) => (t) => e.indexOf(t) === -1, U = (e, t) => {
33
- const n = {};
34
- return Object.keys(e).filter(q(t)).forEach((r) => {
35
- n[r] = e[r];
36
- }), n;
37
- };
38
- function z(e, t, n) {
39
- const r = U(t, n);
40
- if (!e) {
41
- const o = typeof x == "function" ? { default: x } : x;
42
- Object.keys(r).forEach((a) => {
43
- o.default(a) || delete r[a];
44
- });
45
- }
46
- return r;
47
- }
48
- var V = (e, t) => {
49
- };
50
- function F(e) {
51
- let t = "";
52
- return (n) => {
53
- const r = (a, d) => {
54
- const { as: c = e, class: p = t } = a, v = n.propsAsIs === void 0 ? !(typeof c == "string" && c.indexOf("-") === -1 && !j(c[0])) : n.propsAsIs, u = z(v, a, [
55
- "as",
56
- "class"
57
- ]);
58
- u.ref = d, u.className = n.atomic ? R(n.class, u.className || p) : R(u.className || p, n.class);
59
- const { vars: i } = n;
60
- if (i) {
61
- const s = {};
62
- for (const l in i) {
63
- const h = i[l], S = h[0], N = h[1] || "", b = typeof S == "function" ? S(a) : S;
64
- V(b, n.name), s[`--${l}`] = `${b}${N}`;
65
- }
66
- const f = u.style || {}, m = Object.keys(f);
67
- m.length > 0 && m.forEach((l) => {
68
- s[l] = f[l];
69
- }), u.style = s;
70
- }
71
- return e.__wyw_meta && e !== c ? (u.as = c, O(e, u)) : O(c, u);
72
- }, o = A ? A(r) : (
73
- // React.forwardRef won't available on older React versions and in Preact
74
- // Fallback to a innerRef prop in that case
75
- ((a) => {
76
- const d = U(a, ["innerRef"]);
77
- return r(d, a.innerRef);
78
- })
79
- );
80
- return o.displayName = n.name, o.__wyw_meta = {
81
- className: n.class || t,
82
- extends: e
83
- }, o;
84
- };
85
- }
86
- var ae = F, E = { exports: {} }, k = {};
87
- var T;
88
- function G() {
89
- if (T) return k;
90
- T = 1;
91
- var e = y;
92
- function t(i, s) {
93
- return i === s && (i !== 0 || 1 / i === 1 / s) || i !== i && s !== s;
94
- }
95
- var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, a = e.useLayoutEffect, d = e.useDebugValue;
96
- function c(i, s) {
97
- var f = s(), m = r({ inst: { value: f, getSnapshot: s } }), l = m[0].inst, h = m[1];
98
- return a(
99
- function() {
100
- l.value = f, l.getSnapshot = s, p(l) && h({ inst: l });
101
- },
102
- [i, f, s]
103
- ), o(
104
- function() {
105
- return p(l) && h({ inst: l }), i(function() {
106
- p(l) && h({ inst: l });
107
- });
108
- },
109
- [i]
110
- ), d(f), f;
111
- }
112
- function p(i) {
113
- var s = i.getSnapshot;
114
- i = i.value;
115
- try {
116
- var f = s();
117
- return !n(i, f);
118
- } catch {
119
- return !0;
120
- }
121
- }
122
- function v(i, s) {
123
- return s();
124
- }
125
- var u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : c;
126
- return k.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u, k;
127
- }
128
- var C;
129
- function W() {
130
- return C || (C = 1, E.exports = G()), E.exports;
131
- }
132
- var $ = W();
133
- const w = (e, t) => (n) => {
134
- e.current !== n && (e.current = n, t());
135
- };
136
- function X(e, { keys: t, deps: n = [e, t] } = {}) {
137
- const r = y.useRef();
138
- r.current = e.get();
139
- const o = y.useCallback((d) => (w(r, d)(e.value), t?.length > 0 ? _(e, t, w(r, d)) : e.listen(w(r, d))), n), a = () => r.current;
140
- return y.useSyncExternalStore ? y.useSyncExternalStore(o, a, a) : $.useSyncExternalStore(o, a, a);
141
- }
142
- const ie = X, K = () => [
143
- !1,
144
- (e) => {
145
- window.requestAnimationFrame(() => e());
146
- }
147
- ], se = y.useTransition || K, Y = M({
148
- level: "trace",
149
- enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
150
- browser: {
151
- write: (e) => {
152
- console.log(e);
153
- }
154
- }
155
- }), Q = (e, t) => Y.child({ name: e }, t);
156
- class Z extends Event {
157
- slEventBus;
158
- constructor(t, n) {
159
- super(t), this.slEventBus = n;
160
- }
161
- }
162
- const J = Q("event-bus");
163
- class oe {
164
- name;
165
- listeners;
166
- constructor(t = "sl-event-bus") {
167
- this.name = t, this.listeners = /* @__PURE__ */ new Set();
168
- }
169
- emit = (t, n) => {
170
- const r = new Z(this.name, { ...n, type: t });
171
- J.debug(r, "Emitting event"), window.dispatchEvent(r);
172
- };
173
- listen(t) {
174
- return window.addEventListener(this.name, t), this.listeners.add(t), () => {
175
- this.off(t);
176
- };
177
- }
178
- off(t) {
179
- window.removeEventListener(this.name, t), this.listeners.delete(t);
180
- }
181
- destroy = () => {
182
- this.listeners.forEach((t) => {
183
- window.removeEventListener(this.name, t), this.listeners.delete(t);
184
- }), this.listeners.clear();
185
- };
186
- }
187
- var I;
188
- (function(e) {
189
- e[e.ONBOARDING = 1] = "ONBOARDING", e[e.QUESTION = 2] = "QUESTION", e[e.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
190
- })(I || (I = {}));
191
- window.slStore = /* @__PURE__ */ Object.create(null);
192
- var P;
193
- (function(e) {
194
- e.ORGANIZATION = "ORGANIZATION", e.STREAM = "STREAM";
195
- })(P || (P = {}));
196
- g.BETTING + "", g.GAMES + "", g.PUBLIC_CHAT + "", g.TWITTER + "";
197
- var L;
198
- (function(e) {
199
- e.Ready = "ready", e.Suspended = "suspended";
200
- })(L || (L = {}));
201
- export {
202
- oe as E,
203
- L as F,
204
- I as N,
205
- Q as a,
206
- se as b,
207
- R as c,
208
- ae as s,
209
- ie as u
210
- };
@@ -1,4 +0,0 @@
1
- import { B as f } from "./index2.js";
2
- export {
3
- f as default
4
- };