@streamlayer/react-ui 0.96.3 → 0.97.0
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/assets/style.css +1 -1
- package/lib/hooks/analytics.js +50 -0
- package/lib/index-z0QjLiEL.js +75 -0
- package/lib/ui/app/Features/Gamification/Friends.d.ts +0 -2
- package/lib/ui/app/Features/Gamification/Friends.js +16 -22
- package/lib/ui/app/Features/Gamification/Leaderboard.js +31 -25
- package/lib/ui/app/Features/Gamification/Question.js +4 -2
- package/lib/ui/app/Features/Gamification/QuestionsList.js +11 -8
- package/lib/ui/app/Features/Gamification/Tabs.js +30 -25
- package/lib/ui/app/Features/Gamification/UserSummary.js +14 -12
- package/lib/ui/app/Features/Gamification/gamification-feature.js +5 -1
- package/lib/ui/app/Features/Gamification/index.js +9 -5
- package/lib/ui/app/Features/index.js +24 -21
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -0
- package/lib/ui/app/Notifications/Onboarding/index.js +76 -78
- package/lib/ui/app/Notifications/index.js +98 -91
- package/lib/ui/app/Points/index.js +20 -17
- package/lib/ui/app/masters.js +76 -65
- package/lib/ui/app/useMastersApp.js +9 -9
- package/lib/ui/app/useSdkFeature.js +13 -16
- package/lib/ui/app/useSdkResponsive.js +1 -1
- package/lib/ui/app/useSdkScroll.d.ts +1 -1
- package/lib/ui/app/useSdkScroll.js +28 -25
- package/lib/ui/gamification/invite-link/index.js +26 -12
- package/lib/ui/gamification/onboarding/index.d.ts +0 -2
- package/lib/ui/gamification/onboarding/index.js +46 -46
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +2 -2
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +21 -20
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +20 -15
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +0 -3
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +34 -29
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +0 -3
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +17 -32
- package/lib/ui/gamification/points/index.d.ts +1 -0
- package/lib/ui/gamification/points/index.js +9 -9
- package/lib/ui/gamification/question/index.d.ts +1 -0
- package/lib/ui/gamification/question/index.js +31 -24
- package/lib/ui/gamification/question/insight/index.js +3 -2
- package/lib/ui/gamification/question/list/index.d.ts +3 -1
- package/lib/ui/gamification/question/list/index.js +22 -19
- package/lib/ui/gamification/question/notification/index.js +3 -2
- package/lib/ui/gamification/question/notification/insight/index.js +10 -9
- package/lib/ui/gamification/question/notification/tweet/index.js +3 -2
- package/lib/ui/gamification/question/styles.d.ts +2 -0
- package/lib/ui/gamification/question/styles.js +39 -28
- package/lib/ui/gamification/question/twitter/index.js +3 -2
- package/lib/ui/gamification/user-statistics/index.d.ts +3 -2
- package/lib/ui/gamification/user-statistics/index.js +48 -45
- package/lib/ui/gamification/vote/feedback/index.d.ts +3 -2
- package/lib/ui/gamification/vote/feedback/index.js +76 -63
- package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/styles.js +31 -24
- package/lib/ui/gamification/vote/index.js +93 -89
- package/lib/ui/gamification/vote/insight-details/index.js +7 -6
- package/lib/ui/gamification/vote/twitter-details/index.js +3 -2
- package/lib/ui/gamification/vote/vote-option/index.d.ts +2 -1
- package/lib/ui/gamification/vote/vote-option/index.js +47 -39
- package/lib/ui/icons/index.d.ts +1 -2
- package/lib/ui/icons/index.js +44 -36
- package/lib/ui/modal/index.js +27 -21
- package/lib/ui/questions/insight/index.js +3 -2
- package/lib/ui/questions/twitter/index.js +3 -2
- package/lib/ui/show-in/index.d.ts +2 -0
- package/lib/ui/show-in/index.js +24 -14
- package/lib/ui/timer/index.js +32 -28
- package/lib/ui/video-player/index.js +41 -39
- package/lib/ui/video-player/styles.d.ts +1 -0
- package/lib/ui/video-player/styles.js +10 -9
- package/package.json +22 -21
- package/lib/index-keh7OLCY.js +0 -67
package/lib/ui/timer/index.js
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { CountdownCircleTimer as
|
|
5
|
-
import { COLORS as
|
|
6
|
-
const
|
|
2
|
+
import { styled as _ } from "@linaria/react";
|
|
3
|
+
import { useState as c, useEffect as a, useCallback as n } from "react";
|
|
4
|
+
import { CountdownCircleTimer as N } from "react-countdown-circle-timer";
|
|
5
|
+
import { COLORS as t } from "../theme/constants.js";
|
|
6
|
+
const D = [t.PRIMARY_GREEN1, t.SECONDARY_RED1, t.SECONDARY_RED1, t.NEUTRALS_GRAY3], T = [10, 10, 1, 0], Y = /* @__PURE__ */ _("div")({
|
|
7
7
|
name: "RemainingTime",
|
|
8
8
|
class: "r165427",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
isPlaying:
|
|
12
|
-
duration:
|
|
13
|
-
onTimerExpired:
|
|
10
|
+
}), h = t.SECONDARY_GREEN6, l = t.SECONDARY_RED3, m = t.NEUTRALS_GRAY3, G = ({
|
|
11
|
+
isPlaying: i = !0,
|
|
12
|
+
duration: o = 30,
|
|
13
|
+
onTimerExpired: e
|
|
14
14
|
}) => {
|
|
15
|
-
const [
|
|
15
|
+
const [C, s] = c(o > 10 ? h : l), [E, S] = c(2);
|
|
16
|
+
a(() => {
|
|
17
|
+
o === 0 && (S(0), s(m));
|
|
18
|
+
}, [o]);
|
|
19
|
+
const f = ({
|
|
16
20
|
remainingTime: r
|
|
17
|
-
}) => /* @__PURE__ */ R(
|
|
18
|
-
children: r
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
r === 10 && s(
|
|
21
|
+
}) => /* @__PURE__ */ R(Y, {
|
|
22
|
+
children: o === 0 ? 0 : r
|
|
23
|
+
}), A = n(() => {
|
|
24
|
+
e == null || e(), s(m);
|
|
25
|
+
}, [e, s]), O = n((r) => {
|
|
26
|
+
r === 10 && s(l);
|
|
23
27
|
}, [s]);
|
|
24
|
-
return /* @__PURE__ */ R(
|
|
25
|
-
isPlaying:
|
|
26
|
-
duration:
|
|
27
|
-
colors:
|
|
28
|
-
colorsTime:
|
|
28
|
+
return /* @__PURE__ */ R(N, {
|
|
29
|
+
isPlaying: i,
|
|
30
|
+
duration: o,
|
|
31
|
+
colors: D,
|
|
32
|
+
colorsTime: T,
|
|
29
33
|
size: 32,
|
|
30
|
-
strokeWidth:
|
|
34
|
+
strokeWidth: E,
|
|
31
35
|
trailStrokeWidth: 2,
|
|
32
|
-
trailColor:
|
|
33
|
-
onComplete:
|
|
34
|
-
onUpdate:
|
|
35
|
-
children:
|
|
36
|
+
trailColor: C,
|
|
37
|
+
onComplete: A,
|
|
38
|
+
onUpdate: O,
|
|
39
|
+
children: f
|
|
36
40
|
});
|
|
37
41
|
};
|
|
38
42
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
Y as RemainingTime,
|
|
44
|
+
G as Timer
|
|
41
45
|
};
|
|
@@ -1,69 +1,71 @@
|
|
|
1
|
-
import { jsxs as w, jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as w, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cx as x } from "@linaria/core";
|
|
3
|
+
import { useRef as C, useState as p, useCallback as g, useEffect as v } from "react";
|
|
4
|
+
import { SvgIcon as d } from "../icons/index.js";
|
|
5
|
+
import { Container as E, ToggleIconPause as S, Player as T, Poster as L, Control as j } from "./styles.js";
|
|
5
6
|
import "@linaria/react";
|
|
6
|
-
const
|
|
7
|
+
const k = (s, o) => {
|
|
7
8
|
for (const t of s)
|
|
8
|
-
t.isIntersecting || t.target instanceof HTMLVideoElement && !t.target.paused && (
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
},
|
|
9
|
+
t.isIntersecting || t.target instanceof HTMLVideoElement && !t.target.paused && (o.unobserve(t.target), t.target.pause());
|
|
10
|
+
}, y = new IntersectionObserver(k, { threshold: 0.5 }), f = /* @__PURE__ */ new Set(), H = (s) => {
|
|
11
|
+
y.observe(s), f.add(s);
|
|
12
|
+
}, u = (s) => {
|
|
13
|
+
y.unobserve(s), f.delete(s);
|
|
14
|
+
}, M = () => {
|
|
14
15
|
for (const s of f)
|
|
15
|
-
s instanceof HTMLVideoElement && !s.paused && (s.pause(),
|
|
16
|
-
},
|
|
17
|
-
const e = C(null), [
|
|
16
|
+
s instanceof HTMLVideoElement && !s.paused && (s.pause(), u(s));
|
|
17
|
+
}, D = ({ poster: s, source: o, controlVideo: t }) => {
|
|
18
|
+
const e = C(null), [a, c] = p(!1), [m, b] = p(!0), P = g(() => {
|
|
18
19
|
t == null || t({ muted: !0 });
|
|
19
|
-
}, [t]),
|
|
20
|
+
}, [t]), i = g(() => {
|
|
20
21
|
t == null || t({ muted: !1 });
|
|
21
|
-
}, [t]),
|
|
22
|
+
}, [t]), h = () => {
|
|
22
23
|
const r = e == null ? void 0 : e.current;
|
|
23
24
|
if (r)
|
|
24
|
-
if (
|
|
25
|
-
r.pause(), e.current &&
|
|
25
|
+
if (a)
|
|
26
|
+
r.pause(), e.current && u(e.current);
|
|
26
27
|
else {
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
28
|
+
const l = e == null ? void 0 : e.current;
|
|
29
|
+
if (!l)
|
|
29
30
|
return;
|
|
30
|
-
|
|
31
|
+
M(), H(l), l.play().catch((O) => console.log(O)), b(!1);
|
|
31
32
|
}
|
|
32
|
-
},
|
|
33
|
+
}, I = () => {
|
|
33
34
|
var r;
|
|
34
|
-
e.current &&
|
|
35
|
+
e.current && u(e.current), (r = e == null ? void 0 : e.current) == null || r.load(), b(!0);
|
|
35
36
|
};
|
|
36
|
-
return
|
|
37
|
-
e.current &&
|
|
38
|
-
}, []),
|
|
37
|
+
return v(() => {
|
|
38
|
+
e.current && u(e.current);
|
|
39
|
+
}, []), v(() => {
|
|
39
40
|
const r = e == null ? void 0 : e.current;
|
|
40
41
|
return () => {
|
|
41
|
-
r && (r.paused ||
|
|
42
|
+
r && (r.paused || i(), u(r));
|
|
42
43
|
};
|
|
43
|
-
}, [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
44
|
+
}, [i]), /* @__PURE__ */ w(E, { onClick: h, className: x(a && S), children: [
|
|
45
|
+
/* @__PURE__ */ n(
|
|
46
|
+
T,
|
|
46
47
|
{
|
|
47
48
|
ref: e,
|
|
48
|
-
src:
|
|
49
|
+
src: o,
|
|
49
50
|
onPlay: () => {
|
|
50
|
-
|
|
51
|
+
P(), c(!0);
|
|
51
52
|
},
|
|
52
53
|
onPause: () => {
|
|
53
|
-
|
|
54
|
+
i(), c(!1);
|
|
54
55
|
},
|
|
55
56
|
onEnded: () => {
|
|
56
|
-
|
|
57
|
+
i(), c(!1), I();
|
|
57
58
|
},
|
|
58
|
-
style: { visibility:
|
|
59
|
+
style: { visibility: m ? "hidden" : "visible" },
|
|
60
|
+
controls: !1,
|
|
59
61
|
playsInline: !0
|
|
60
62
|
}
|
|
61
63
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ n(L, { src: s, style: { visibility: m ? "visible" : "hidden" } }),
|
|
65
|
+
/* @__PURE__ */ n(j, { children: a ? /* @__PURE__ */ n(d, { name: "icon-pause" }) : /* @__PURE__ */ n(d, { name: "icon-play" }) })
|
|
64
66
|
] });
|
|
65
67
|
};
|
|
66
68
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
D as VideoPlayer,
|
|
70
|
+
M as pauseAllVideos
|
|
69
71
|
};
|
|
@@ -3,3 +3,4 @@ export declare const Container: import("@linaria/react").StyledComponent<import(
|
|
|
3
3
|
export declare const Player: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLVideoElement> & import("react").VideoHTMLAttributes<HTMLVideoElement> & Record<never, unknown>>;
|
|
4
4
|
export declare const Poster: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
5
5
|
export declare const Control: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const ToggleIconPause: import("@linaria/core").LinariaClassName;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const e = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "c1bgb86j",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}),
|
|
6
|
+
}), a = /* @__PURE__ */ s("video")({
|
|
7
7
|
name: "Player",
|
|
8
8
|
class: "p6703cq",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), l = /* @__PURE__ */ s("img")({
|
|
11
11
|
name: "Poster",
|
|
12
12
|
class: "p12ow7zo",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
14
|
+
}), n = /* @__PURE__ */ s("div")({
|
|
15
15
|
name: "Control",
|
|
16
16
|
class: "cdpal9o",
|
|
17
17
|
propsAsIs: !1
|
|
18
|
-
});
|
|
18
|
+
}), r = "t1xke4ml";
|
|
19
19
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
e as Container,
|
|
21
|
+
n as Control,
|
|
22
|
+
a as Player,
|
|
23
|
+
l as Poster,
|
|
24
|
+
r as ToggleIconPause
|
|
24
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -35,26 +35,27 @@
|
|
|
35
35
|
"package.json"
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@lottiefiles/react-lottie-player": "
|
|
39
|
-
"@streamlayer/sl-eslib": "^5.
|
|
40
|
-
"nanoid": "3.3.7",
|
|
38
|
+
"@lottiefiles/react-lottie-player": "^3.5.3",
|
|
39
|
+
"@streamlayer/sl-eslib": "^5.83.1",
|
|
41
40
|
"@types/lodash.throttle": "^4.1.9",
|
|
42
41
|
"lodash.throttle": "^4.1.1",
|
|
42
|
+
"nanoid": "3.3.7",
|
|
43
43
|
"react-infinite-scroller": "^1.2.6",
|
|
44
44
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
45
45
|
"react-window": "^1.8.10",
|
|
46
46
|
"react-window-infinite-loader": "^1.0.9",
|
|
47
|
-
"@streamlayer/feature-gamification": "^0.
|
|
48
|
-
"@streamlayer/sdk-web": "^0.
|
|
49
|
-
"@streamlayer/sdk-web
|
|
50
|
-
"@streamlayer/sdk-web-
|
|
51
|
-
"@streamlayer/sdk-web-
|
|
52
|
-
"@streamlayer/sdk-web-features": "^0.11.
|
|
53
|
-
"@streamlayer/sdk-web-
|
|
54
|
-
"@streamlayer/sdk-web-
|
|
55
|
-
"@streamlayer/sdk-web-
|
|
56
|
-
"@streamlayer/sdk-web-
|
|
57
|
-
"@streamlayer/sdk-web-
|
|
47
|
+
"@streamlayer/feature-gamification": "^0.39.0",
|
|
48
|
+
"@streamlayer/sdk-web-analytics": "^0.1.0",
|
|
49
|
+
"@streamlayer/sdk-web": "^0.33.0",
|
|
50
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.42",
|
|
51
|
+
"@streamlayer/sdk-web-api": "^0.24.0",
|
|
52
|
+
"@streamlayer/sdk-web-features": "^0.11.24",
|
|
53
|
+
"@streamlayer/sdk-web-logger": "^0.5.18",
|
|
54
|
+
"@streamlayer/sdk-web-core": "^0.22.0",
|
|
55
|
+
"@streamlayer/sdk-web-interfaces": "^0.21.0",
|
|
56
|
+
"@streamlayer/sdk-web-notifications": "^0.15.0",
|
|
57
|
+
"@streamlayer/sdk-web-storage": "^0.4.5",
|
|
58
|
+
"@streamlayer/sdk-web-types": "^0.23.0"
|
|
58
59
|
},
|
|
59
60
|
"nx": {
|
|
60
61
|
"implicitDependencies": [
|
|
@@ -69,32 +70,32 @@
|
|
|
69
70
|
"@linaria/babel-preset": "^5.0.4",
|
|
70
71
|
"@linaria/core": "^6.0.0",
|
|
71
72
|
"@linaria/react": "^6.0.0",
|
|
72
|
-
"@nanostores/react": "^0.7.
|
|
73
|
+
"@nanostores/react": "^0.7.2",
|
|
73
74
|
"@storybook/addon-docs": "^7.6.11",
|
|
74
75
|
"@storybook/addon-styling": "^1.3.7",
|
|
75
76
|
"@storybook/addon-viewport": "^7.6.11",
|
|
76
77
|
"@storybook/blocks": "^7.6.11",
|
|
77
|
-
"@storybook/jest": "
|
|
78
|
+
"@storybook/jest": "~0.2.3",
|
|
78
79
|
"@storybook/react": "^7.6.11",
|
|
79
|
-
"@storybook/testing-library": "
|
|
80
|
+
"@storybook/testing-library": "~0.2.2",
|
|
80
81
|
"@types/react-infinite-scroller": "^1.2.5",
|
|
81
82
|
"@types/react-window": "^1.8.8",
|
|
82
83
|
"@types/react-window-infinite-loader": "^1.0.9",
|
|
83
84
|
"@wyw-in-js/vite": "^0.2.2",
|
|
84
85
|
"esbuild-plugin-babel": "^0.2.3",
|
|
85
86
|
"glob": "^10.3.10",
|
|
86
|
-
"react": "
|
|
87
|
+
"react": "18.2.0",
|
|
87
88
|
"react-auth-code-input": "^3.2.1",
|
|
88
89
|
"react-countdown-circle-timer": "^3.2.1",
|
|
89
90
|
"react-countup": "^6.5.0",
|
|
90
91
|
"react-phone-number-input": "^3.3.9",
|
|
91
92
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
92
93
|
"tslib": "^2.6.2",
|
|
93
|
-
"vite": "
|
|
94
|
+
"vite": "5.0.12",
|
|
94
95
|
"vite-plugin-node-polyfills": "^0.19.0",
|
|
95
96
|
"vite-plugin-svgr": "^4.2.0",
|
|
96
97
|
"vite-svg-loader": "^5.1.0",
|
|
97
98
|
"vite-tsconfig-paths": "^4.3.1",
|
|
98
|
-
"@streamlayer/react": "^0.
|
|
99
|
+
"@streamlayer/react": "^0.41.0"
|
|
99
100
|
}
|
|
100
101
|
}
|
package/lib/index-keh7OLCY.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { p as a } from "./index-uEuzH3jr.js";
|
|
2
|
-
let v = Symbol("clean"), t = [], p = (o, n) => {
|
|
3
|
-
let i = [], e = {
|
|
4
|
-
get() {
|
|
5
|
-
return e.lc || e.listen(() => {
|
|
6
|
-
})(), e.value;
|
|
7
|
-
},
|
|
8
|
-
l: n || 0,
|
|
9
|
-
lc: 0,
|
|
10
|
-
listen(f, u) {
|
|
11
|
-
return e.lc = i.push(f, u || e.l) / 2, () => {
|
|
12
|
-
let l = i.indexOf(f);
|
|
13
|
-
~l && (i.splice(l, 2), --e.lc || e.off());
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
notify(f) {
|
|
17
|
-
let u = !t.length;
|
|
18
|
-
for (let l = 0; l < i.length; l += 2)
|
|
19
|
-
t.push(
|
|
20
|
-
i[l],
|
|
21
|
-
i[l + 1],
|
|
22
|
-
e.value,
|
|
23
|
-
f
|
|
24
|
-
);
|
|
25
|
-
if (u) {
|
|
26
|
-
for (let l = 0; l < t.length; l += 4) {
|
|
27
|
-
let r;
|
|
28
|
-
for (let s = l + 1; !r && (s += 4) < t.length; )
|
|
29
|
-
t[s] < t[l + 1] && (r = t.push(
|
|
30
|
-
t[l],
|
|
31
|
-
t[l + 1],
|
|
32
|
-
t[l + 2],
|
|
33
|
-
t[l + 3]
|
|
34
|
-
));
|
|
35
|
-
r || t[l](t[l + 2], t[l + 3]);
|
|
36
|
-
}
|
|
37
|
-
t.length = 0;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
off() {
|
|
41
|
-
},
|
|
42
|
-
/* It will be called on last listener unsubscribing.
|
|
43
|
-
We will redefine it in onMount and onStop. */
|
|
44
|
-
set(f) {
|
|
45
|
-
e.value !== f && (e.value = f, e.notify());
|
|
46
|
-
},
|
|
47
|
-
subscribe(f, u) {
|
|
48
|
-
let l = e.listen(f, u);
|
|
49
|
-
return f(e.value), l;
|
|
50
|
-
},
|
|
51
|
-
value: o
|
|
52
|
-
};
|
|
53
|
-
return a.env.NODE_ENV !== "production" && (e[v] = () => {
|
|
54
|
-
i = [], e.lc = 0, e.off();
|
|
55
|
-
}), e;
|
|
56
|
-
}, h = (o = {}) => {
|
|
57
|
-
let n = p(o);
|
|
58
|
-
return n.setKey = function(i, e) {
|
|
59
|
-
typeof e > "u" ? i in n.value && (n.value = { ...n.value }, delete n.value[i], n.notify(i)) : n.value[i] !== e && (n.value = {
|
|
60
|
-
...n.value,
|
|
61
|
-
[i]: e
|
|
62
|
-
}, n.notify(i));
|
|
63
|
-
}, n;
|
|
64
|
-
};
|
|
65
|
-
export {
|
|
66
|
-
h as m
|
|
67
|
-
};
|