@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.
- package/lib/app/pause-ad.d.ts +2 -4
- package/lib/app/polymarket.d.ts +7 -0
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +28 -223
- package/lib/cjs/analytics.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -0
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/cjs/index-eShKGO10.js +1 -5
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -4
- package/lib/cjs/index11.js +3 -1
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +3 -1
- package/lib/cjs/index14.js +1 -1
- package/lib/cjs/index15.js +1 -5
- package/lib/cjs/index16.js +3 -0
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +3 -5
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +1 -13
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +9 -0
- package/lib/cjs/sl-types.js +1 -15
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/style.css +1 -0
- package/lib/cjs/theme.js +1 -17
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +3 -17
- package/lib/cjs/utils.js +1 -47
- package/lib/classic/app/pause-ad.d.ts +2 -4
- package/lib/classic/app/polymarket.d.ts +7 -0
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +28 -223
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +3 -5
- package/lib/classic/cjs/feature.js +1 -0
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/classic/cjs/index-eShKGO10.js +1 -5
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -4
- package/lib/classic/cjs/index13.js +3 -0
- package/lib/classic/cjs/index2.js +3 -5
- package/lib/classic/cjs/index3.js +1 -1
- package/lib/classic/cjs/index4.js +1 -1
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +1 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +3 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +9 -0
- package/lib/classic/cjs/sl-types.js +1 -15
- package/lib/classic/cjs/style.css +1 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
- package/lib/classic/cjs/utils.js +1 -47
- package/lib/classic/es/Question.js +277 -264
- package/lib/classic/es/advertisement.js +34990 -18881
- package/lib/classic/es/analytics.js +58 -56
- package/lib/classic/es/auth.js +14 -8
- package/lib/classic/es/bet-pack.js +2448 -2418
- package/lib/classic/es/feature.js +108 -0
- package/lib/classic/es/gamification-feature.js +2 -2
- package/lib/classic/es/hooks-WfHlJH12.js +98 -0
- package/lib/classic/es/index-eShKGO10.js +948 -948
- package/lib/classic/es/index.js +13 -13
- package/lib/classic/es/index10.js +83 -2295
- package/lib/classic/es/index11.js +3095 -179
- package/lib/classic/es/index12.js +174 -821
- package/lib/classic/es/index13.js +850 -0
- package/lib/classic/es/index2.js +2099 -1763
- package/lib/classic/es/index3.js +11 -11
- package/lib/classic/es/index4.js +127 -127
- package/lib/classic/es/index5.js +3 -5
- package/lib/classic/es/index6.js +10 -11
- package/lib/classic/es/index7.js +6 -62
- package/lib/classic/es/index8.js +9 -316
- package/lib/classic/es/index9.js +316 -82
- package/lib/classic/es/insight.js +58 -53
- package/lib/classic/es/notification.js +5 -5
- package/lib/classic/es/notification2.js +765 -722
- package/lib/classic/es/pause-ad.js +190 -167
- package/lib/classic/es/points.js +55 -47
- package/lib/classic/es/polymarket.js +6848 -0
- package/lib/classic/es/sl-types.js +193 -125
- package/lib/classic/es/useStreamLayerApp.js +2 -2
- package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
- package/lib/classic/es/utils.js +28 -28
- package/lib/classic/index.d.ts +1 -0
- package/lib/classic/style.css +1 -0
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/index-eShKGO10.js +1 -5
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +3 -77
- package/lib/dist/es/gamification-feature.js +2 -2
- package/lib/dist/es/index-eShKGO10.js +948 -948
- package/lib/dist/es/index.js +7 -8
- package/lib/dist/es/masters.js +18212 -14741
- package/lib/dist/index.d.ts +29 -8
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +108 -106
- package/lib/es/advertisement.js +34990 -18881
- package/lib/es/analytics.js +58 -56
- package/lib/es/auth.js +14 -8
- package/lib/es/bet-pack.js +29 -17
- package/lib/es/feature.js +108 -0
- package/lib/es/gamification-feature.js +2 -2
- package/lib/es/gamification-feature2.js +2 -2
- package/lib/es/hooks-WfHlJH12.js +98 -0
- package/lib/es/index-eShKGO10.js +948 -948
- package/lib/es/index.js +14 -13
- package/lib/es/index10.js +258 -816
- package/lib/es/index11.js +837 -170
- package/lib/es/index12.js +181 -312
- package/lib/es/index13.js +316 -82
- package/lib/es/index14.js +83 -2350
- package/lib/es/index15.js +3069 -1224
- package/lib/es/index16.js +1453 -0
- package/lib/es/index2.js +1118 -984
- package/lib/es/index3.js +3 -62
- package/lib/es/index4.js +2424 -2407
- package/lib/es/index5.js +11 -11
- package/lib/es/index6.js +127 -127
- package/lib/es/index7.js +10 -7
- package/lib/es/index8.js +5 -9
- package/lib/es/index9.js +10 -265
- package/lib/es/insight.js +58 -53
- package/lib/es/masters.js +6 -5
- package/lib/es/masters2.js +696 -558
- package/lib/es/notification.js +697 -655
- package/lib/es/pause-ad.js +190 -167
- package/lib/es/points.js +56 -48
- package/lib/es/polymarket.js +6848 -0
- package/lib/es/sl-types.js +200 -132
- package/lib/es/storage.js +75 -74
- package/lib/es/theme.js +177 -31
- package/lib/es/useStreamLayerApp.js +2 -2
- package/lib/es/useStreamLayerApp2.js +9727 -7592
- package/lib/es/utils.js +28 -28
- package/lib/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +33 -20
- package/lib/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/es/hooks-B0Qttldg.js +0 -98
- package/lib/es/hooks-B0Qttldg.js +0 -98
package/lib/es/sl-types.js
CHANGED
|
@@ -1,22 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
15
|
-
for (const
|
|
16
|
-
Object.prototype.hasOwnProperty.call(
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
135
|
+
}, B = {
|
|
120
136
|
landscape: "landscape",
|
|
121
137
|
portrait: "portrait"
|
|
122
|
-
},
|
|
123
|
-
${
|
|
124
|
-
--color-${
|
|
125
|
-
`, ""),
|
|
126
|
-
${
|
|
127
|
-
--color-adv-${
|
|
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
|
|
130
|
-
var
|
|
131
|
-
return function(
|
|
132
|
-
|
|
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
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
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
|
|
147
|
-
const
|
|
148
|
-
if (!
|
|
149
|
-
const
|
|
150
|
-
Object.keys(
|
|
151
|
-
|
|
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
|
|
178
|
+
return filteredProps;
|
|
155
179
|
}
|
|
156
|
-
var
|
|
180
|
+
var warnIfInvalid = (value, componentName) => {
|
|
157
181
|
};
|
|
158
|
-
function
|
|
159
|
-
let
|
|
160
|
-
return (
|
|
161
|
-
const
|
|
162
|
-
const { as:
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
|
180
|
-
}
|
|
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
|
-
(
|
|
184
|
-
const
|
|
185
|
-
return
|
|
223
|
+
(props) => {
|
|
224
|
+
const rest = omit(props, ["innerRef"]);
|
|
225
|
+
return render(rest, props.innerRef);
|
|
186
226
|
}
|
|
187
227
|
);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
|
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
|
|
205
|
-
function
|
|
206
|
-
return
|
|
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
|
|
209
|
-
function
|
|
210
|
-
var
|
|
211
|
-
|
|
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
|
-
|
|
257
|
+
inst.value = value;
|
|
258
|
+
inst.getSnapshot = getSnapshot;
|
|
259
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
214
260
|
},
|
|
215
|
-
[
|
|
216
|
-
)
|
|
261
|
+
[subscribe, value, getSnapshot]
|
|
262
|
+
);
|
|
263
|
+
useEffect(
|
|
217
264
|
function() {
|
|
218
|
-
|
|
219
|
-
|
|
265
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
266
|
+
return subscribe(function() {
|
|
267
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
220
268
|
});
|
|
221
269
|
},
|
|
222
|
-
[
|
|
223
|
-
)
|
|
270
|
+
[subscribe]
|
|
271
|
+
);
|
|
272
|
+
useDebugValue(value);
|
|
273
|
+
return value;
|
|
224
274
|
}
|
|
225
|
-
function
|
|
226
|
-
var
|
|
227
|
-
|
|
275
|
+
function checkIfSnapshotChanged(inst) {
|
|
276
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
277
|
+
inst = inst.value;
|
|
228
278
|
try {
|
|
229
|
-
var
|
|
230
|
-
return !
|
|
231
|
-
} catch {
|
|
232
|
-
return
|
|
279
|
+
var nextValue = latestGetSnapshot();
|
|
280
|
+
return !objectIs(inst, nextValue);
|
|
281
|
+
} catch (error) {
|
|
282
|
+
return true;
|
|
233
283
|
}
|
|
234
284
|
}
|
|
235
|
-
function $(
|
|
236
|
-
return
|
|
285
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
286
|
+
return getSnapshot();
|
|
237
287
|
}
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
252
|
-
|
|
253
|
-
(
|
|
254
|
-
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
|
2
|
-
import { s as
|
|
3
|
-
import { e as
|
|
4
|
-
import { e as
|
|
5
|
-
import { B as
|
|
6
|
-
import { P as
|
|
7
|
-
const
|
|
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:
|
|
11
|
-
}),
|
|
10
|
+
propsAsIs: false
|
|
11
|
+
}), m = /* @__PURE__ */ styled_default("div")({
|
|
12
12
|
name: "QuestionCaption",
|
|
13
13
|
class: "q2sl39u",
|
|
14
|
-
propsAsIs:
|
|
15
|
-
}),
|
|
14
|
+
propsAsIs: false
|
|
15
|
+
}), I = /* @__PURE__ */ styled_default("div")({
|
|
16
16
|
name: "QuestionBody",
|
|
17
17
|
class: "qd5h0uc",
|
|
18
|
-
propsAsIs:
|
|
19
|
-
}),
|
|
18
|
+
propsAsIs: false
|
|
19
|
+
}), Q = /* @__PURE__ */ styled_default("div")({
|
|
20
20
|
name: "QuestionAction",
|
|
21
21
|
class: "q105uluy",
|
|
22
|
-
propsAsIs:
|
|
23
|
-
}),
|
|
22
|
+
propsAsIs: false
|
|
23
|
+
}), e = () => B1, t = /* @__PURE__ */ styled_default(e())({
|
|
24
24
|
name: "QuestionActionIcon",
|
|
25
25
|
class: "q1fa0b9h",
|
|
26
|
-
propsAsIs:
|
|
27
|
-
}),
|
|
26
|
+
propsAsIs: true
|
|
27
|
+
}), a = () => t, A = /* @__PURE__ */ styled_default(a())({
|
|
28
28
|
name: "QuestionCheckIcon",
|
|
29
29
|
class: "qxlt78s",
|
|
30
|
-
propsAsIs:
|
|
31
|
-
}),
|
|
30
|
+
propsAsIs: true
|
|
31
|
+
}), c = () => B1, f = /* @__PURE__ */ styled_default(c())({
|
|
32
32
|
name: "QuestionTypeIcon",
|
|
33
33
|
class: "qmg0vkx",
|
|
34
|
-
propsAsIs:
|
|
35
|
-
}),
|
|
34
|
+
propsAsIs: true
|
|
35
|
+
}), d = /* @__PURE__ */ styled_default("div")({
|
|
36
36
|
name: "QuestionTypeLabel",
|
|
37
37
|
class: "q1uz5j1g",
|
|
38
|
-
propsAsIs:
|
|
39
|
-
}),
|
|
38
|
+
propsAsIs: false
|
|
39
|
+
}), q = /* @__PURE__ */ styled_default("div")({
|
|
40
40
|
name: "QuestionContent",
|
|
41
41
|
class: "qc3icwa",
|
|
42
|
-
propsAsIs:
|
|
43
|
-
}),
|
|
42
|
+
propsAsIs: false
|
|
43
|
+
}), S = /* @__PURE__ */ styled_default("button")({
|
|
44
44
|
name: "PlayButton",
|
|
45
45
|
class: "p169lohr",
|
|
46
|
-
propsAsIs:
|
|
47
|
-
}),
|
|
46
|
+
propsAsIs: false
|
|
47
|
+
}), b = /* @__PURE__ */ styled_default("div")({
|
|
48
48
|
name: "SkeletonContainer",
|
|
49
49
|
class: "s1f43z3r",
|
|
50
|
-
propsAsIs:
|
|
51
|
-
}),
|
|
50
|
+
propsAsIs: false
|
|
51
|
+
}), p = () => e$1, k = /* @__PURE__ */ styled_default(p())({
|
|
52
52
|
name: "SkeletonButton",
|
|
53
53
|
class: "s16k8geu",
|
|
54
|
-
propsAsIs:
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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":
|
|
71
|
-
"data-type-poll":
|
|
72
|
-
name:
|
|
71
|
+
"data-type-trivia": n === QuestionType.TRIVIA,
|
|
72
|
+
"data-type-poll": n === QuestionType.POLL,
|
|
73
|
+
name: e2.iconName
|
|
73
74
|
}
|
|
74
75
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
/* @__PURE__ */ jsxs(d, { className: "SL_QuestionTypeLabel", children: [
|
|
77
|
+
e2.label,
|
|
78
|
+
n === QuestionType.TRIVIA && a2 === QuestionStatus.RESOLVED && " • Expired"
|
|
78
79
|
] })
|
|
79
|
-
] }),
|
|
80
|
-
questionId:
|
|
81
|
-
questionType:
|
|
82
|
-
questionStatus:
|
|
83
|
-
subject:
|
|
84
|
-
openForVoting:
|
|
85
|
-
status:
|
|
80
|
+
] }), R = ({
|
|
81
|
+
questionId: e2,
|
|
82
|
+
questionType: n,
|
|
83
|
+
questionStatus: a2,
|
|
84
|
+
subject: u,
|
|
85
|
+
openForVoting: d2,
|
|
86
|
+
status: m2
|
|
86
87
|
}) => {
|
|
87
|
-
const
|
|
88
|
-
return
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
|
|
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:
|
|
94
|
-
questionType:
|
|
95
|
-
questionStatus:
|
|
94
|
+
questionTypeData: c2,
|
|
95
|
+
questionType: n,
|
|
96
|
+
questionStatus: a2
|
|
96
97
|
}
|
|
97
98
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ jsx(I, { children: u || "" })
|
|
99
100
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
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
|
|
104
|
-
(function(
|
|
105
|
-
|
|
106
|
-
})(
|
|
104
|
+
var KEY_PREFIX;
|
|
105
|
+
(function(KEY_PREFIX2) {
|
|
106
|
+
KEY_PREFIX2["OPENED"] = "opened";
|
|
107
|
+
})(KEY_PREFIX || (KEY_PREFIX = {}));
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
D,
|
|
110
|
+
R,
|
|
111
|
+
S,
|
|
112
|
+
r,
|
|
113
|
+
x
|
|
113
114
|
};
|