@streamlayer/react 1.23.0 → 1.23.2

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/pause-ad.d.ts +2 -4
  2. package/lib/app/polymarket.d.ts +7 -0
  3. package/lib/cjs/Question.js +1 -1
  4. package/lib/cjs/advertisement.js +28 -223
  5. package/lib/cjs/analytics.js +1 -1
  6. package/lib/cjs/auth.js +1 -1
  7. package/lib/cjs/bet-pack.js +1 -1
  8. package/lib/cjs/feature.js +1 -0
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/gamification-feature2.js +1 -1
  11. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  12. package/lib/cjs/index-eShKGO10.js +1 -5
  13. package/lib/cjs/index.js +1 -1
  14. package/lib/cjs/index10.js +1 -4
  15. package/lib/cjs/index11.js +3 -1
  16. package/lib/cjs/index12.js +1 -1
  17. package/lib/cjs/index13.js +3 -1
  18. package/lib/cjs/index14.js +1 -1
  19. package/lib/cjs/index15.js +1 -5
  20. package/lib/cjs/index16.js +3 -0
  21. package/lib/cjs/index2.js +1 -1
  22. package/lib/cjs/index3.js +1 -1
  23. package/lib/cjs/index4.js +3 -5
  24. package/lib/cjs/index5.js +1 -1
  25. package/lib/cjs/index6.js +1 -1
  26. package/lib/cjs/index7.js +1 -1
  27. package/lib/cjs/index8.js +1 -1
  28. package/lib/cjs/index9.js +1 -1
  29. package/lib/cjs/insight.js +1 -1
  30. package/lib/cjs/masters.js +1 -1
  31. package/lib/cjs/masters2.js +1 -13
  32. package/lib/cjs/notification.js +1 -1
  33. package/lib/cjs/pause-ad.js +1 -1
  34. package/lib/cjs/points.js +1 -1
  35. package/lib/cjs/polymarket.js +9 -0
  36. package/lib/cjs/sl-types.js +1 -15
  37. package/lib/cjs/storage.js +1 -1
  38. package/lib/cjs/style.css +1 -0
  39. package/lib/cjs/theme.js +1 -17
  40. package/lib/cjs/useStreamLayerApp.js +1 -1
  41. package/lib/cjs/useStreamLayerApp2.js +3 -17
  42. package/lib/cjs/utils.js +1 -47
  43. package/lib/classic/app/pause-ad.d.ts +2 -4
  44. package/lib/classic/app/polymarket.d.ts +7 -0
  45. package/lib/classic/cjs/Question.js +1 -1
  46. package/lib/classic/cjs/advertisement.js +28 -223
  47. package/lib/classic/cjs/analytics.js +1 -1
  48. package/lib/classic/cjs/auth.js +1 -1
  49. package/lib/classic/cjs/bet-pack.js +3 -5
  50. package/lib/classic/cjs/feature.js +1 -0
  51. package/lib/classic/cjs/gamification-feature.js +1 -1
  52. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  53. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  54. package/lib/classic/cjs/index.js +1 -1
  55. package/lib/classic/cjs/index10.js +1 -1
  56. package/lib/classic/cjs/index11.js +1 -1
  57. package/lib/classic/cjs/index12.js +1 -4
  58. package/lib/classic/cjs/index13.js +3 -0
  59. package/lib/classic/cjs/index2.js +3 -5
  60. package/lib/classic/cjs/index3.js +1 -1
  61. package/lib/classic/cjs/index4.js +1 -1
  62. package/lib/classic/cjs/index5.js +1 -1
  63. package/lib/classic/cjs/index6.js +1 -1
  64. package/lib/classic/cjs/index7.js +1 -1
  65. package/lib/classic/cjs/index8.js +1 -1
  66. package/lib/classic/cjs/index9.js +3 -1
  67. package/lib/classic/cjs/insight.js +1 -1
  68. package/lib/classic/cjs/notification.js +1 -1
  69. package/lib/classic/cjs/notification2.js +1 -1
  70. package/lib/classic/cjs/pause-ad.js +1 -1
  71. package/lib/classic/cjs/points.js +1 -1
  72. package/lib/classic/cjs/polymarket.js +9 -0
  73. package/lib/classic/cjs/sl-types.js +1 -15
  74. package/lib/classic/cjs/style.css +1 -0
  75. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  76. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  77. package/lib/classic/cjs/utils.js +1 -47
  78. package/lib/classic/es/Question.js +277 -264
  79. package/lib/classic/es/advertisement.js +34990 -18881
  80. package/lib/classic/es/analytics.js +58 -56
  81. package/lib/classic/es/auth.js +14 -8
  82. package/lib/classic/es/bet-pack.js +2448 -2418
  83. package/lib/classic/es/feature.js +108 -0
  84. package/lib/classic/es/gamification-feature.js +2 -2
  85. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  86. package/lib/classic/es/index-eShKGO10.js +948 -948
  87. package/lib/classic/es/index.js +13 -13
  88. package/lib/classic/es/index10.js +83 -2295
  89. package/lib/classic/es/index11.js +3095 -179
  90. package/lib/classic/es/index12.js +174 -821
  91. package/lib/classic/es/index13.js +850 -0
  92. package/lib/classic/es/index2.js +2099 -1763
  93. package/lib/classic/es/index3.js +11 -11
  94. package/lib/classic/es/index4.js +127 -127
  95. package/lib/classic/es/index5.js +3 -5
  96. package/lib/classic/es/index6.js +10 -11
  97. package/lib/classic/es/index7.js +6 -62
  98. package/lib/classic/es/index8.js +9 -316
  99. package/lib/classic/es/index9.js +316 -82
  100. package/lib/classic/es/insight.js +58 -53
  101. package/lib/classic/es/notification.js +5 -5
  102. package/lib/classic/es/notification2.js +765 -722
  103. package/lib/classic/es/pause-ad.js +190 -167
  104. package/lib/classic/es/points.js +55 -47
  105. package/lib/classic/es/polymarket.js +6848 -0
  106. package/lib/classic/es/sl-types.js +193 -125
  107. package/lib/classic/es/useStreamLayerApp.js +2 -2
  108. package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
  109. package/lib/classic/es/utils.js +28 -28
  110. package/lib/classic/index.d.ts +1 -0
  111. package/lib/classic/style.css +1 -0
  112. package/lib/dist/cjs/gamification-feature.js +1 -1
  113. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  114. package/lib/dist/cjs/index.js +1 -1
  115. package/lib/dist/cjs/masters.js +3 -77
  116. package/lib/dist/es/gamification-feature.js +2 -2
  117. package/lib/dist/es/index-eShKGO10.js +948 -948
  118. package/lib/dist/es/index.js +7 -8
  119. package/lib/dist/es/masters.js +18212 -14741
  120. package/lib/dist/index.d.ts +29 -8
  121. package/lib/dist/style.css +1 -1
  122. package/lib/es/Question.js +108 -106
  123. package/lib/es/advertisement.js +34990 -18881
  124. package/lib/es/analytics.js +58 -56
  125. package/lib/es/auth.js +14 -8
  126. package/lib/es/bet-pack.js +29 -17
  127. package/lib/es/feature.js +108 -0
  128. package/lib/es/gamification-feature.js +2 -2
  129. package/lib/es/gamification-feature2.js +2 -2
  130. package/lib/es/hooks-WfHlJH12.js +98 -0
  131. package/lib/es/index-eShKGO10.js +948 -948
  132. package/lib/es/index.js +14 -13
  133. package/lib/es/index10.js +258 -816
  134. package/lib/es/index11.js +837 -170
  135. package/lib/es/index12.js +181 -312
  136. package/lib/es/index13.js +316 -82
  137. package/lib/es/index14.js +83 -2350
  138. package/lib/es/index15.js +3069 -1224
  139. package/lib/es/index16.js +1453 -0
  140. package/lib/es/index2.js +1118 -984
  141. package/lib/es/index3.js +3 -62
  142. package/lib/es/index4.js +2424 -2407
  143. package/lib/es/index5.js +11 -11
  144. package/lib/es/index6.js +127 -127
  145. package/lib/es/index7.js +10 -7
  146. package/lib/es/index8.js +5 -9
  147. package/lib/es/index9.js +10 -265
  148. package/lib/es/insight.js +58 -53
  149. package/lib/es/masters.js +6 -5
  150. package/lib/es/masters2.js +696 -558
  151. package/lib/es/notification.js +697 -655
  152. package/lib/es/pause-ad.js +190 -167
  153. package/lib/es/points.js +56 -48
  154. package/lib/es/polymarket.js +6848 -0
  155. package/lib/es/sl-types.js +200 -132
  156. package/lib/es/storage.js +75 -74
  157. package/lib/es/theme.js +177 -31
  158. package/lib/es/useStreamLayerApp.js +2 -2
  159. package/lib/es/useStreamLayerApp2.js +9727 -7592
  160. package/lib/es/utils.js +28 -28
  161. package/lib/index.d.ts +1 -0
  162. package/lib/style.css +1 -1
  163. package/package.json +33 -20
  164. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  165. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  166. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  167. package/lib/es/hooks-B0Qttldg.js +0 -98
@@ -1,22 +1,38 @@
1
- import o from "react";
2
- import { listenKeys as y } from "nanostores";
3
- var L = function() {
4
- const t = Array.prototype.slice.call(arguments).filter(Boolean), r = {}, a = [];
5
- t.forEach((n) => {
6
- (n ? n.split(" ") : []).forEach((s) => {
7
- if (s.startsWith("atm_")) {
8
- const [, _] = s.split("_");
9
- r[_] = s;
10
- } else
11
- a.push(s);
1
+ import React36__default from "react";
2
+ function listenKeys($store, keys, listener) {
3
+ let keysSet = new Set(keys).add(void 0);
4
+ return $store.listen((value, oldValue, changed) => {
5
+ if (keysSet.has(changed)) {
6
+ listener(value, oldValue, changed);
7
+ }
8
+ });
9
+ }
10
+ var cx = function cx2() {
11
+ const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12
+ const atomicClasses = {};
13
+ const nonAtomicClasses = [];
14
+ presentClassNames.forEach((arg) => {
15
+ const individualClassNames = arg ? arg.split(" ") : [];
16
+ individualClassNames.forEach((className) => {
17
+ if (className.startsWith("atm_")) {
18
+ const [, keyHash] = className.split("_");
19
+ atomicClasses[keyHash] = className;
20
+ } else {
21
+ nonAtomicClasses.push(className);
22
+ }
12
23
  });
13
24
  });
14
- const i = [];
15
- for (const n in r)
16
- Object.prototype.hasOwnProperty.call(r, n) && i.push(r[n]);
17
- return i.push(...a), i.join(" ");
18
- }, I = L;
19
- const v = {
25
+ const result = [];
26
+ for (const keyHash in atomicClasses) {
27
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
28
+ result.push(atomicClasses[keyHash]);
29
+ }
30
+ }
31
+ result.push(...nonAtomicClasses);
32
+ return result.join(" ");
33
+ };
34
+ var cx_default = cx;
35
+ const R = {
20
36
  BLUE_QUESTION_ACTION_BTN: "#1589ee",
21
37
  WHITE: "#FFFFFF",
22
38
  BLUE: "#2d6ffd",
@@ -86,7 +102,7 @@ const v = {
86
102
  IN_APP_QUESTION_RESULT_LINE: "#babfc5",
87
103
  QUOTE_BORDER: "#E8E8E8",
88
104
  QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
89
- }, x = {
105
+ }, F = {
90
106
  BG_PRIMARY: "#13212b",
91
107
  BG_SECONDARY: "#152430",
92
108
  BG_SECONDARY1: "#435059",
@@ -96,7 +112,7 @@ const v = {
96
112
  TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
97
113
  TEXT_SECONDARY1: "#878787",
98
114
  WHITE: "#fff"
99
- }, te = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], re = "#cee5de", ne = "#f9d6d8", ae = "#E8E8E8", ie = {
115
+ }, I = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], O = "#cee5de", N = "#f9d6d8", S = "#E8E8E8", D = {
100
116
  REGULAR: "'SF Pro Text', Arial, Helvetica, sans-serif",
101
117
  SERIF: "'SF Pro Display', Arial, Helvetica, sans-serif",
102
118
  COLOR: "#fff",
@@ -109,89 +125,117 @@ const v = {
109
125
  SIZE_DEFAULT2: "12px",
110
126
  LINE_HEIGHT: "24px",
111
127
  MARGIN_TITLE_DEFAULT: "0px 0px 12px"
112
- }, se = {
128
+ }, A = {
113
129
  xs: 324,
114
130
  sm: 576,
115
131
  md: 768,
116
132
  lg: 992,
117
133
  xl: 1200,
118
134
  xxl: 1440
119
- }, oe = {
135
+ }, B = {
120
136
  landscape: "landscape",
121
137
  portrait: "portrait"
122
- }, le = Object.entries(v).reduce((e, [t, r]) => `
123
- ${e}
124
- --color-${t.toLowerCase().replaceAll("_", "-")}: ${r};
125
- `, ""), ce = Object.entries(x).reduce((e, [t, r]) => `
126
- ${e}
127
- --color-adv-${t.toLowerCase().replaceAll("_", "-")}: ${r};
138
+ }, C = Object.entries(R).reduce((E, [_, T]) => `
139
+ ${E}
140
+ --color-${_.toLowerCase().replaceAll("_", "-")}: ${T};
141
+ `, ""), L = Object.entries(F).reduce((E, [_, T]) => `
142
+ ${E}
143
+ --color-adv-${_.toLowerCase().replaceAll("_", "-")}: ${T};
128
144
  `, "");
129
- function U(e) {
130
- var t = /* @__PURE__ */ Object.create(null);
131
- return function(r) {
132
- return t[r] === void 0 && (t[r] = e(r)), t[r];
145
+ function memoize(fn) {
146
+ var cache = /* @__PURE__ */ Object.create(null);
147
+ return function(arg) {
148
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
149
+ return cache[arg];
133
150
  };
134
151
  }
135
- var P = /^((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|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|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)-.*))$/, R = /* @__PURE__ */ U(
136
- function(e) {
137
- return P.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
152
+ var reactPropsRegex = /^((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|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|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)-.*))$/;
153
+ var isPropValid = /* @__PURE__ */ memoize(
154
+ function(prop) {
155
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
138
156
  }
139
157
  /* Z+1 */
140
- ), b = (e) => e.toUpperCase() === e, k = (e) => (t) => e.indexOf(t) === -1, N = (e, t) => {
141
- const r = {};
142
- return Object.keys(e).filter(k(t)).forEach((a) => {
143
- r[a] = e[a];
144
- }), r;
158
+ );
159
+ var isCapital = (ch) => ch.toUpperCase() === ch;
160
+ var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
161
+ var omit = (obj, keys) => {
162
+ const res = {};
163
+ Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
164
+ res[key] = obj[key];
165
+ });
166
+ return res;
145
167
  };
146
- function G(e, t, r) {
147
- const a = N(t, r);
148
- if (!e) {
149
- const i = typeof R == "function" ? { default: R } : R;
150
- Object.keys(a).forEach((n) => {
151
- i.default(n) || delete a[n];
168
+ function filterProps(asIs, props, omitKeys) {
169
+ const filteredProps = omit(props, omitKeys);
170
+ if (!asIs) {
171
+ const interopValidAttr = typeof isPropValid === "function" ? { default: isPropValid } : isPropValid;
172
+ Object.keys(filteredProps).forEach((key) => {
173
+ if (!interopValidAttr.default(key)) {
174
+ delete filteredProps[key];
175
+ }
152
176
  });
153
177
  }
154
- return a;
178
+ return filteredProps;
155
179
  }
156
- var w = (e, t) => {
180
+ var warnIfInvalid = (value, componentName) => {
157
181
  };
158
- function Y(e) {
159
- let t = "";
160
- return (r) => {
161
- const a = (n, c) => {
162
- const { as: s = e, class: _ = t } = n, B = r.propsAsIs === void 0 ? !(typeof s == "string" && s.indexOf("-") === -1 && !b(s[0])) : r.propsAsIs, l = G(B, n, [
182
+ function styled(tag) {
183
+ let mockedClass = "";
184
+ return (options) => {
185
+ const render = (props, ref) => {
186
+ const { as: component = tag, class: className = mockedClass } = props;
187
+ const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
188
+ const filteredProps = filterProps(shouldKeepProps, props, [
163
189
  "as",
164
190
  "class"
165
191
  ]);
166
- l.ref = c, l.className = r.atomic ? I(r.class, l.className || _) : I(l.className || _, r.class);
167
- const { vars: f } = r;
168
- if (f) {
169
- const d = {};
170
- for (const u in f) {
171
- const F = f[u], T = F[0], g = F[1] || "", A = typeof T == "function" ? T(n) : T;
172
- w(A, r.name), d[`--${u}`] = `${A}${g}`;
192
+ filteredProps.ref = ref;
193
+ filteredProps.className = options.atomic ? cx_default(options.class, filteredProps.className || className) : cx_default(filteredProps.className || className, options.class);
194
+ const { vars } = options;
195
+ if (vars) {
196
+ const style = {};
197
+ for (const name in vars) {
198
+ const variable = vars[name];
199
+ const result = variable[0];
200
+ const unit = variable[1] || "";
201
+ const value = typeof result === "function" ? result(props) : result;
202
+ warnIfInvalid(value, options.name);
203
+ style[`--${name}`] = `${value}${unit}`;
173
204
  }
174
- const m = l.style || {}, O = Object.keys(m);
175
- O.length > 0 && O.forEach((u) => {
176
- d[u] = m[u];
177
- }), l.style = d;
205
+ const ownStyle = filteredProps.style || {};
206
+ const keys = Object.keys(ownStyle);
207
+ if (keys.length > 0) {
208
+ keys.forEach((key) => {
209
+ style[key] = ownStyle[key];
210
+ });
211
+ }
212
+ filteredProps.style = style;
213
+ }
214
+ if (tag.__wyw_meta && tag !== component) {
215
+ filteredProps.as = component;
216
+ return React36__default.createElement(tag, filteredProps);
178
217
  }
179
- return e.__wyw_meta && e !== s ? (l.as = s, o.createElement(e, l)) : o.createElement(s, l);
180
- }, i = o.forwardRef ? o.forwardRef(a) : (
218
+ return React36__default.createElement(component, filteredProps);
219
+ };
220
+ const Result = React36__default.forwardRef ? React36__default.forwardRef(render) : (
181
221
  // React.forwardRef won't available on older React versions and in Preact
182
222
  // Fallback to a innerRef prop in that case
183
- (n) => {
184
- const c = N(n, ["innerRef"]);
185
- return a(c, n.innerRef);
223
+ (props) => {
224
+ const rest = omit(props, ["innerRef"]);
225
+ return render(rest, props.innerRef);
186
226
  }
187
227
  );
188
- return i.displayName = r.name, i.__wyw_meta = {
189
- className: r.class || t,
190
- extends: e
191
- }, i;
228
+ Result.displayName = options.name;
229
+ Result.__wyw_meta = {
230
+ className: options.class || mockedClass,
231
+ extends: tag
232
+ };
233
+ return Result;
192
234
  };
193
235
  }
194
- var Ee = Y, C = { exports: {} }, h = {};
236
+ var styled_default = styled;
237
+ var shim$1 = { exports: {} };
238
+ var useSyncExternalStoreShim_production = {};
195
239
  /**
196
240
  * @license React
197
241
  * use-sync-external-store-shim.production.js
@@ -201,77 +245,101 @@ var Ee = Y, C = { exports: {} }, h = {};
201
245
  * This source code is licensed under the MIT license found in the
202
246
  * LICENSE file in the root directory of this source tree.
203
247
  */
204
- var E = o;
205
- function H(e, t) {
206
- return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
248
+ var React = React36__default;
249
+ function is(x, y) {
250
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
207
251
  }
208
- var M = typeof Object.is == "function" ? Object.is : H, V = E.useState, K = E.useEffect, W = E.useLayoutEffect, X = E.useDebugValue;
209
- function Q(e, t) {
210
- var r = t(), a = V({ inst: { value: r, getSnapshot: t } }), i = a[0].inst, n = a[1];
211
- return W(
252
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
253
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
254
+ var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
255
+ useLayoutEffect(
212
256
  function() {
213
- i.value = r, i.getSnapshot = t, p(i) && n({ inst: i });
257
+ inst.value = value;
258
+ inst.getSnapshot = getSnapshot;
259
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
214
260
  },
215
- [e, r, t]
216
- ), K(
261
+ [subscribe, value, getSnapshot]
262
+ );
263
+ useEffect(
217
264
  function() {
218
- return p(i) && n({ inst: i }), e(function() {
219
- p(i) && n({ inst: i });
265
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
266
+ return subscribe(function() {
267
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
220
268
  });
221
269
  },
222
- [e]
223
- ), X(r), r;
270
+ [subscribe]
271
+ );
272
+ useDebugValue(value);
273
+ return value;
224
274
  }
225
- function p(e) {
226
- var t = e.getSnapshot;
227
- e = e.value;
275
+ function checkIfSnapshotChanged(inst) {
276
+ var latestGetSnapshot = inst.getSnapshot;
277
+ inst = inst.value;
228
278
  try {
229
- var r = t();
230
- return !M(e, r);
231
- } catch {
232
- return !0;
279
+ var nextValue = latestGetSnapshot();
280
+ return !objectIs(inst, nextValue);
281
+ } catch (error) {
282
+ return true;
233
283
  }
234
284
  }
235
- function $(e, t) {
236
- return t();
285
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
286
+ return getSnapshot();
237
287
  }
238
- var j = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? $ : Q;
239
- h.useSyncExternalStore = E.useSyncExternalStore !== void 0 ? E.useSyncExternalStore : j;
240
- C.exports = h;
241
- var z = C.exports;
242
- const S = (e, t) => (r) => {
243
- e.current !== r && (e.current = r, t());
244
- };
245
- function q(e, { keys: t, deps: r = [e, t] } = {}) {
246
- const a = o.useRef();
247
- a.current = e.get();
248
- const i = o.useCallback((c) => (S(a, c)(e.value), (t == null ? void 0 : t.length) > 0 ? y(e, t, S(a, c)) : e.listen(S(a, c))), r), n = () => a.current;
249
- return o.useSyncExternalStore ? o.useSyncExternalStore(i, n, n) : z.useSyncExternalStore(i, n, n);
288
+ var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
289
+ useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
290
+ {
291
+ shim$1.exports = useSyncExternalStoreShim_production;
250
292
  }
251
- const ue = q, Z = () => [
252
- !1,
253
- (e) => {
254
- window.requestAnimationFrame(() => e());
293
+ var shimExports = shim$1.exports;
294
+ const emit = (snapshotRef, onChange) => (value) => {
295
+ if (snapshotRef.current === value)
296
+ return;
297
+ snapshotRef.current = value;
298
+ onChange();
299
+ };
300
+ function useStore$1(store, { keys, deps = [store, keys] } = {}) {
301
+ const snapshotRef = React36__default.useRef();
302
+ snapshotRef.current = store.get();
303
+ const subscribe = React36__default.useCallback((onChange) => {
304
+ emit(snapshotRef, onChange)(store.value);
305
+ return (keys == null ? void 0 : keys.length) > 0 ? listenKeys(store, keys, emit(snapshotRef, onChange)) : store.listen(emit(snapshotRef, onChange));
306
+ }, deps);
307
+ const get = () => snapshotRef.current;
308
+ if (React36__default.useSyncExternalStore) {
309
+ return React36__default.useSyncExternalStore(subscribe, get, get);
255
310
  }
256
- ], _e = o.useTransition || Z;
257
- var D;
258
- (function(e) {
259
- e[e.ONBOARDING = 1] = "ONBOARDING", e[e.QUESTION = 2] = "QUESTION", e[e.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
260
- })(D || (D = {}));
311
+ return shimExports.useSyncExternalStore(subscribe, get, get);
312
+ }
313
+ const useStore = useStore$1;
314
+ const legacyUseTransition = () => {
315
+ return [
316
+ false,
317
+ (fn) => {
318
+ window.requestAnimationFrame(() => fn());
319
+ }
320
+ ];
321
+ };
322
+ const useTransition = React36__default.useTransition || legacyUseTransition;
323
+ var NotificationType;
324
+ (function(NotificationType2) {
325
+ NotificationType2[NotificationType2["ONBOARDING"] = 1] = "ONBOARDING";
326
+ NotificationType2[NotificationType2["QUESTION"] = 2] = "QUESTION";
327
+ NotificationType2[NotificationType2["QUESTION_RESOLVED"] = 3] = "QUESTION_RESOLVED";
328
+ })(NotificationType || (NotificationType = {}));
261
329
  export {
262
- se as A,
263
- oe as B,
264
- le as C,
265
- ie as D,
266
- te as I,
267
- ce as L,
268
- ne as N,
269
- re as O,
270
- v as R,
271
- ae as S,
272
- D as a,
273
- _e as b,
274
- I as c,
275
- Ee as s,
276
- ue as u
330
+ A,
331
+ B,
332
+ C,
333
+ D,
334
+ I,
335
+ L,
336
+ N,
337
+ O,
338
+ R,
339
+ S,
340
+ NotificationType as a,
341
+ useTransition as b,
342
+ cx_default as c,
343
+ styled_default as s,
344
+ useStore as u
277
345
  };
package/lib/es/storage.js CHANGED
@@ -1,113 +1,114 @@
1
- import { jsx as s, jsxs as o } from "react/jsx-runtime";
2
- import { s as e } from "./sl-types.js";
3
- import { e as A } from "./index11.js";
4
- import { e as Q, i as l } from "./index8.js";
5
- import { B as m } from "./index6.js";
6
- import { P as n, Q as r, a as h } from "./useStreamLayerApp2.js";
7
- const S = /* @__PURE__ */ e("div")({
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { s as styled_default } from "./sl-types.js";
3
+ import { e as e$2 } from "./index12.js";
4
+ import { e as e$1, i } from "./index9.js";
5
+ import { B as B1 } from "./index6.js";
6
+ import { P as PickHistoryStatus, Q as QuestionType, a as QuestionStatus } from "./useStreamLayerApp2.js";
7
+ const r = /* @__PURE__ */ styled_default("div")({
8
8
  name: "QuestionItem",
9
9
  class: "q1w97g3p",
10
- propsAsIs: !1
11
- }), T = /* @__PURE__ */ e("div")({
10
+ propsAsIs: false
11
+ }), m = /* @__PURE__ */ styled_default("div")({
12
12
  name: "QuestionCaption",
13
13
  class: "q2sl39u",
14
- propsAsIs: !1
15
- }), f = /* @__PURE__ */ e("div")({
14
+ propsAsIs: false
15
+ }), I = /* @__PURE__ */ styled_default("div")({
16
16
  name: "QuestionBody",
17
17
  class: "qd5h0uc",
18
- propsAsIs: !1
19
- }), v = /* @__PURE__ */ e("div")({
18
+ propsAsIs: false
19
+ }), Q = /* @__PURE__ */ styled_default("div")({
20
20
  name: "QuestionAction",
21
21
  class: "q105uluy",
22
- propsAsIs: !1
23
- }), L = () => m, i = /* @__PURE__ */ e(L())({
22
+ propsAsIs: false
23
+ }), e = () => B1, t = /* @__PURE__ */ styled_default(e())({
24
24
  name: "QuestionActionIcon",
25
25
  class: "q1fa0b9h",
26
- propsAsIs: !0
27
- }), k = () => i, E = /* @__PURE__ */ e(k())({
26
+ propsAsIs: true
27
+ }), a = () => t, A = /* @__PURE__ */ styled_default(a())({
28
28
  name: "QuestionCheckIcon",
29
29
  class: "qxlt78s",
30
- propsAsIs: !0
31
- }), N = () => m, P = /* @__PURE__ */ e(N())({
30
+ propsAsIs: true
31
+ }), c = () => B1, f = /* @__PURE__ */ styled_default(c())({
32
32
  name: "QuestionTypeIcon",
33
33
  class: "qmg0vkx",
34
- propsAsIs: !0
35
- }), b = /* @__PURE__ */ e("div")({
34
+ propsAsIs: true
35
+ }), d = /* @__PURE__ */ styled_default("div")({
36
36
  name: "QuestionTypeLabel",
37
37
  class: "q1uz5j1g",
38
- propsAsIs: !1
39
- }), g = /* @__PURE__ */ e("div")({
38
+ propsAsIs: false
39
+ }), q = /* @__PURE__ */ styled_default("div")({
40
40
  name: "QuestionContent",
41
41
  class: "qc3icwa",
42
- propsAsIs: !1
43
- }), w = /* @__PURE__ */ e("button")({
42
+ propsAsIs: false
43
+ }), S = /* @__PURE__ */ styled_default("button")({
44
44
  name: "PlayButton",
45
45
  class: "p169lohr",
46
- propsAsIs: !1
47
- }), x = /* @__PURE__ */ e("div")({
46
+ propsAsIs: false
47
+ }), b = /* @__PURE__ */ styled_default("div")({
48
48
  name: "SkeletonContainer",
49
49
  class: "s1f43z3r",
50
- propsAsIs: !1
51
- }), D = () => Q, B = /* @__PURE__ */ e(D())({
50
+ propsAsIs: false
51
+ }), p = () => e$1, k = /* @__PURE__ */ styled_default(p())({
52
52
  name: "SkeletonButton",
53
53
  class: "s16k8geu",
54
- propsAsIs: !0
55
- }), C = {
56
- [n.LOST]: /* @__PURE__ */ s(i, { name: "incorrectVoted" }),
57
- [n.WON]: /* @__PURE__ */ s(E, { name: "icon-check" }),
58
- [n.UNSET]: /* @__PURE__ */ s(i, { name: "icon-arrow" }),
59
- [n.DNP]: /* @__PURE__ */ s(i, { name: "icon-arrow" })
60
- }, F = () => /* @__PURE__ */ o(x, { children: [
61
- /* @__PURE__ */ s(l, { loading: !0, style: { width: "35%" } }),
62
- /* @__PURE__ */ s(l, { loading: !0, style: { width: "70%" } }),
63
- /* @__PURE__ */ s(B, {})
64
- ] }), O = ({ questionTypeData: t, questionType: a, questionStatus: p }) => /* @__PURE__ */ o(T, { className: "SL_QuestionCaption", children: [
65
- /* @__PURE__ */ s(
66
- P,
54
+ propsAsIs: true
55
+ });
56
+ const w = {
57
+ [PickHistoryStatus.LOST]: /* @__PURE__ */ jsx(t, { name: "incorrectVoted" }),
58
+ [PickHistoryStatus.WON]: /* @__PURE__ */ jsx(A, { name: "icon-check" }),
59
+ [PickHistoryStatus.UNSET]: /* @__PURE__ */ jsx(t, { name: "icon-arrow" }),
60
+ [PickHistoryStatus.DNP]: /* @__PURE__ */ jsx(t, { name: "icon-arrow" })
61
+ }, D = () => /* @__PURE__ */ jsxs(b, { children: [
62
+ /* @__PURE__ */ jsx(i, { loading: true, style: { width: "35%" } }),
63
+ /* @__PURE__ */ jsx(i, { loading: true, style: { width: "70%" } }),
64
+ /* @__PURE__ */ jsx(k, {})
65
+ ] }), x = ({ questionTypeData: e2, questionType: n, questionStatus: a2 }) => /* @__PURE__ */ jsxs(m, { className: "SL_QuestionCaption", children: [
66
+ /* @__PURE__ */ jsx(
67
+ f,
67
68
  {
68
69
  className: "SL_QuestionTypeIcon",
69
70
  "data-testid": "question-type-icon",
70
- "data-type-trivia": a === r.TRIVIA,
71
- "data-type-poll": a === r.POLL,
72
- name: t.iconName
71
+ "data-type-trivia": n === QuestionType.TRIVIA,
72
+ "data-type-poll": n === QuestionType.POLL,
73
+ name: e2.iconName
73
74
  }
74
75
  ),
75
- /* @__PURE__ */ o(b, { className: "SL_QuestionTypeLabel", children: [
76
- t.label,
77
- a === r.TRIVIA && p === h.RESOLVED && " • Expired"
76
+ /* @__PURE__ */ jsxs(d, { className: "SL_QuestionTypeLabel", children: [
77
+ e2.label,
78
+ n === QuestionType.TRIVIA && a2 === QuestionStatus.RESOLVED && " • Expired"
78
79
  ] })
79
- ] }), H = ({
80
- questionId: t,
81
- questionType: a,
82
- questionStatus: p,
83
- subject: d,
84
- openForVoting: I,
85
- status: y
80
+ ] }), R = ({
81
+ questionId: e2,
82
+ questionType: n,
83
+ questionStatus: a2,
84
+ subject: u,
85
+ openForVoting: d2,
86
+ status: m2
86
87
  }) => {
87
- const c = A[a], q = C[y];
88
- return c ? /* @__PURE__ */ o(S, { "data-a": "intr", "data-name": t, children: [
89
- /* @__PURE__ */ o(g, { children: [
90
- /* @__PURE__ */ s(
91
- O,
88
+ const c2 = e$2[n], Q$1 = w[m2];
89
+ return c2 ? /* @__PURE__ */ jsxs(r, { "data-a": "intr", "data-name": e2, children: [
90
+ /* @__PURE__ */ jsxs(q, { children: [
91
+ /* @__PURE__ */ jsx(
92
+ x,
92
93
  {
93
- questionTypeData: c,
94
- questionType: a,
95
- questionStatus: p
94
+ questionTypeData: c2,
95
+ questionType: n,
96
+ questionStatus: a2
96
97
  }
97
98
  ),
98
- /* @__PURE__ */ s(f, { children: d || "" })
99
+ /* @__PURE__ */ jsx(I, { children: u || "" })
99
100
  ] }),
100
- /* @__PURE__ */ s(v, { children: I ? /* @__PURE__ */ s(w, { "data-a": "intr", "data-name": t, children: "Play" }) : q })
101
+ /* @__PURE__ */ jsx(Q, { children: d2 ? /* @__PURE__ */ jsx(S, { "data-a": "intr", "data-name": e2, children: "Play" }) : Q$1 })
101
102
  ] }) : null;
102
103
  };
103
- var u;
104
- (function(t) {
105
- t.OPENED = "opened";
106
- })(u || (u = {}));
104
+ var KEY_PREFIX;
105
+ (function(KEY_PREFIX2) {
106
+ KEY_PREFIX2["OPENED"] = "opened";
107
+ })(KEY_PREFIX || (KEY_PREFIX = {}));
107
108
  export {
108
- F as D,
109
- H as R,
110
- w as S,
111
- S as r,
112
- O as x
109
+ D,
110
+ R,
111
+ S,
112
+ r,
113
+ x
113
114
  };