@jfrader/ui 0.7.0 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -28
- package/dist/avatar-BuM1zB_f.js +164 -0
- package/dist/{avatar-group-BlMLNw4J.js → avatar-group-D1UEihvh.js} +1 -1
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/card-frame-CcLa6NQ4.js +13 -0
- package/dist/{chat-thread-DkB-WMWJ.js → chat-thread-CMhwxhoA.js} +1 -1
- package/dist/chat-thread.js +1 -1
- package/dist/{comment-thread-DXfqgRNI.js → comment-thread-DbOzYr0q.js} +1 -1
- package/dist/comment-thread.js +1 -1
- package/dist/editable-details-BndqEnYF.js +365 -0
- package/dist/editable-details.js +2 -0
- package/dist/flip-game-card-BOJIhBrh.js +104 -0
- package/dist/flip-game-card.js +2 -0
- package/dist/{game-card-Oeu74giK.js → game-card-Bnhpz78f.js} +42 -49
- package/dist/game-card.js +1 -1
- package/dist/{hover-card-Dgu2CwMD.js → hover-card--ijYr1cd.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/index.js +90 -90
- package/dist/{locale-switcher-DTkySKsM.js → locale-switcher-Ce_tN4Gb.js} +2 -2
- package/dist/locale-switcher.js +1 -1
- package/dist/{thread-parts-Cpktor6D.js → thread-parts-DbKhuwVU.js} +1 -1
- package/dist/{timeline-BcF46lG9.js → timeline-BPKY94mT.js} +1 -1
- package/dist/timeline.js +1 -1
- package/dist/{billing-toggle-CgC7yxxo.js → toggle-subscription-Ytz7ew1q.js} +19 -19
- package/dist/toggle-subscription.js +2 -0
- package/dist/types/components/avatar/avatar.d.ts +3 -1
- package/dist/types/components/editable-details/editable-details.d.ts +58 -0
- package/dist/types/components/editable-details/index.d.ts +2 -0
- package/dist/types/components/flip-game-card/flip-game-card.d.ts +22 -0
- package/dist/types/components/flip-game-card/index.d.ts +2 -0
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +2 -2
- package/dist/types/components/toggle-subscription/index.d.ts +2 -0
- package/dist/types/components/toggle-subscription/toggle-subscription.d.ts +57 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/styling/motion-timings.d.ts +8 -0
- package/dist/types/styling/theme.d.ts +5 -0
- package/dist/{user-menu-MctRu_Lh.js → user-menu-Czrrk93A.js} +1 -1
- package/dist/user-menu.js +1 -1
- package/package.json +14 -14
- package/dist/avatar-sPxDqFiZ.js +0 -133
- package/dist/billing-toggle.js +0 -2
- package/dist/in-view-title-BUZCMqge.js +0 -225
- package/dist/in-view-title.js +0 -2
- package/dist/shortcut-recorder-VgTQdjjn.js +0 -688
- package/dist/shortcut-recorder.js +0 -2
- package/dist/types/components/billing-toggle/billing-toggle.d.ts +0 -57
- package/dist/types/components/billing-toggle/index.d.ts +0 -2
- package/dist/types/components/in-view-title/in-view-title.d.ts +0 -23
- package/dist/types/components/in-view-title/index.d.ts +0 -1
- package/dist/types/components/shortcut-recorder/index.d.ts +0 -2
- package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +0 -117
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { a as e, i as t } from "./css-BYJhdGh-.js";
|
|
3
|
-
import { n, r } from "./media-8yrN85VT.js";
|
|
4
|
-
import { t as i } from "./sx-BJXJ2xJK.js";
|
|
5
|
-
import { t as a } from "./visually-hidden-DgVO3NaB.js";
|
|
6
|
-
import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
|
|
7
|
-
import { vars as u } from "@jfrader/tokens/vars";
|
|
8
|
-
import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
|
|
9
|
-
//#region src/components/in-view-title/in-view-title.tsx
|
|
10
|
-
var p = {
|
|
11
|
-
1: "h1",
|
|
12
|
-
2: "h2",
|
|
13
|
-
3: "h3",
|
|
14
|
-
4: "h4",
|
|
15
|
-
5: "h5",
|
|
16
|
-
6: "h6"
|
|
17
|
-
}, m = .45, h = "0.15em", g = e({
|
|
18
|
-
from: { transform: "translateY(0.6em)" },
|
|
19
|
-
to: { transform: "none" }
|
|
20
|
-
}), _ = e({
|
|
21
|
-
from: { opacity: 0 },
|
|
22
|
-
to: { opacity: 1 }
|
|
23
|
-
}), v = e({
|
|
24
|
-
from: { filter: "blur(0.12em)" },
|
|
25
|
-
to: { filter: "none" }
|
|
26
|
-
}), y = e({
|
|
27
|
-
from: { letterSpacing: "-0.04em" },
|
|
28
|
-
to: { letterSpacing: "inherit" }
|
|
29
|
-
}), b = e({
|
|
30
|
-
from: {
|
|
31
|
-
maskImage: `linear-gradient(to right, ${u.color.text} 50%, transparent 50%)`,
|
|
32
|
-
maskSize: "200% 100%",
|
|
33
|
-
maskPosition: "100% 0"
|
|
34
|
-
},
|
|
35
|
-
to: {
|
|
36
|
-
maskImage: `linear-gradient(to right, ${u.color.text} 50%, transparent 50%)`,
|
|
37
|
-
maskSize: "200% 100%",
|
|
38
|
-
maskPosition: "0% 0"
|
|
39
|
-
}
|
|
40
|
-
}), x = e({
|
|
41
|
-
from: {
|
|
42
|
-
maskImage: `linear-gradient(to left, ${u.color.text} 50%, transparent 50%)`,
|
|
43
|
-
maskSize: "200% 100%",
|
|
44
|
-
maskPosition: "0% 0"
|
|
45
|
-
},
|
|
46
|
-
to: {
|
|
47
|
-
maskImage: `linear-gradient(to left, ${u.color.text} 50%, transparent 50%)`,
|
|
48
|
-
maskSize: "200% 100%",
|
|
49
|
-
maskPosition: "100% 0"
|
|
50
|
-
}
|
|
51
|
-
}), S = (e, t) => `${e} ${t} ${u.motion.easeStandard} var(--in-view-delay, 0ms) backwards`, C = {
|
|
52
|
-
word: t({ animation: `${S(g, u.motion.duration.slow)}, ${S(_, u.motion.duration.fast)}` }),
|
|
53
|
-
line: t({ animation: `${S(g, u.motion.duration.slow)}, ${S(_, u.motion.duration.fast)}` }),
|
|
54
|
-
blur: t({ animation: `${S(g, u.motion.duration.base)}, ${S(v, u.motion.duration.base)}, ${S(_, u.motion.duration.fast)}` }),
|
|
55
|
-
tracking: t({ animation: `${S(y, u.motion.duration.base)}, ${S(_, u.motion.duration.fast)}` }),
|
|
56
|
-
wipe: t({
|
|
57
|
-
animation: S(b, u.motion.duration.slow),
|
|
58
|
-
"&:dir(rtl)": { animation: S(x, u.motion.duration.slow) }
|
|
59
|
-
})
|
|
60
|
-
}, w = t({
|
|
61
|
-
position: "relative",
|
|
62
|
-
margin: 0,
|
|
63
|
-
minInlineSize: 0,
|
|
64
|
-
maxInlineSize: "100%",
|
|
65
|
-
color: u.color.text,
|
|
66
|
-
font: "inherit",
|
|
67
|
-
"& [data-in-view-plain]": { display: "none" },
|
|
68
|
-
"&:not([data-state=\"revealing\"]) [data-in-view-segment]": { animation: "none" },
|
|
69
|
-
[r]: {
|
|
70
|
-
"& [data-in-view-parts]": { display: "none" },
|
|
71
|
-
"& [data-in-view-plain]": {
|
|
72
|
-
display: "inline",
|
|
73
|
-
whiteSpace: "pre-wrap"
|
|
74
|
-
},
|
|
75
|
-
"& [data-in-view-segment]": {
|
|
76
|
-
animation: "none",
|
|
77
|
-
transform: "none",
|
|
78
|
-
filter: "none",
|
|
79
|
-
maskImage: "none",
|
|
80
|
-
opacity: 1
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
[n]: {
|
|
84
|
-
color: "CanvasText",
|
|
85
|
-
"& [data-in-view-parts]": { display: "none" },
|
|
86
|
-
"& [data-in-view-plain]": {
|
|
87
|
-
display: "inline",
|
|
88
|
-
whiteSpace: "pre-wrap"
|
|
89
|
-
},
|
|
90
|
-
"& [data-in-view-segment]": {
|
|
91
|
-
animation: "none",
|
|
92
|
-
transform: "none",
|
|
93
|
-
filter: "none",
|
|
94
|
-
maskImage: "none",
|
|
95
|
-
opacity: 1
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}), T = t({
|
|
99
|
-
whiteSpace: "pre-wrap",
|
|
100
|
-
overflowWrap: "anywhere"
|
|
101
|
-
}), E = t({
|
|
102
|
-
display: "block",
|
|
103
|
-
minInlineSize: 0,
|
|
104
|
-
maxInlineSize: "100%"
|
|
105
|
-
}), D = {
|
|
106
|
-
word: !0,
|
|
107
|
-
line: !0,
|
|
108
|
-
blur: !0,
|
|
109
|
-
tracking: !1,
|
|
110
|
-
wipe: !1
|
|
111
|
-
}, O = t({
|
|
112
|
-
display: "inline-block",
|
|
113
|
-
verticalAlign: "bottom",
|
|
114
|
-
maxInlineSize: "100%",
|
|
115
|
-
overflowX: "visible",
|
|
116
|
-
overflowY: "clip",
|
|
117
|
-
paddingBlock: h,
|
|
118
|
-
marginBlock: `-${h}`
|
|
119
|
-
}), k = t({
|
|
120
|
-
display: "inline-block",
|
|
121
|
-
maxInlineSize: "100%",
|
|
122
|
-
verticalAlign: "bottom"
|
|
123
|
-
});
|
|
124
|
-
function A({ text: e, level: t = 2, variant: n = "blur", once: r = !0, locale: h, slotProps: g, ref: v, className: y, sx: b, ...x }) {
|
|
125
|
-
let [S, A] = l(null), j = o((e) => {
|
|
126
|
-
A(e);
|
|
127
|
-
let t = typeof v == "function" ? v(e) : void 0;
|
|
128
|
-
return v && typeof v != "function" && (v.current = e), () => {
|
|
129
|
-
A(null), typeof t == "function" ? t() : typeof v == "function" ? v(null) : v && (v.current = null);
|
|
130
|
-
};
|
|
131
|
-
}, [v]);
|
|
132
|
-
s(() => {
|
|
133
|
-
if (!S) return;
|
|
134
|
-
let t = S.ownerDocument.defaultView;
|
|
135
|
-
if (S.dataset.state = "settled", !t) return;
|
|
136
|
-
let n = !0, i = !1, a, o = !1, s = S.getBoundingClientRect().top > t.innerHeight, c = !s, l, u, d = () => {
|
|
137
|
-
n && (S.dataset.state = "settled");
|
|
138
|
-
}, f = () => {
|
|
139
|
-
d(), a?.disconnect(), s = !1, i = !0;
|
|
140
|
-
}, p = (e) => {
|
|
141
|
-
let n = e.target;
|
|
142
|
-
n instanceof t.HTMLElement && n.hasAttribute("data-in-view-last") && S.dataset.state === "revealing" && e.animationName !== _.name && (d(), r && a?.disconnect());
|
|
143
|
-
}, h = () => {
|
|
144
|
-
(l?.matches || u?.matches) && f();
|
|
145
|
-
}, g = () => {
|
|
146
|
-
S.id && t.location.hash.slice(1) === S.id && f();
|
|
147
|
-
}, v = () => {
|
|
148
|
-
let e = S.ownerDocument.getSelection();
|
|
149
|
-
e?.anchorNode && S.contains(e.anchorNode) && f();
|
|
150
|
-
};
|
|
151
|
-
try {
|
|
152
|
-
if (l = t.matchMedia("(prefers-reduced-motion: reduce)"), u = t.matchMedia("(forced-colors: active)"), !e.trim() || !t.IntersectionObserver || !t.CSS?.supports("animation-name", "none") || l.matches || u.matches || (g(), i || !s && r)) return;
|
|
153
|
-
a = new t.IntersectionObserver((e) => {
|
|
154
|
-
if (n && !i) for (let t of e) t.target === S && (!t.isIntersecting || t.intersectionRatio === 0 ? (c && (d(), r ? o && a?.disconnect() : s = !0), o = !1) : (c = !0, t.intersectionRatio >= m && !o && (o = !0, s &&= (S.dataset.state = "revealing", !1))));
|
|
155
|
-
}, { threshold: [0, m] }), s && (S.dataset.state = "idle"), a.observe(S), S.addEventListener("animationend", p), S.addEventListener("focusin", f), S.ownerDocument.addEventListener("selectionchange", v), t.addEventListener("hashchange", g), l.addEventListener("change", h), u.addEventListener("change", h);
|
|
156
|
-
} catch {
|
|
157
|
-
f();
|
|
158
|
-
}
|
|
159
|
-
return () => {
|
|
160
|
-
n = !1, a?.disconnect(), S.removeEventListener("animationend", p), S.removeEventListener("focusin", f), S.ownerDocument.removeEventListener("selectionchange", v), t.removeEventListener("hashchange", g), l?.removeEventListener("change", h), u?.removeEventListener("change", h);
|
|
161
|
-
};
|
|
162
|
-
}, [
|
|
163
|
-
S,
|
|
164
|
-
e,
|
|
165
|
-
n,
|
|
166
|
-
r,
|
|
167
|
-
h
|
|
168
|
-
]);
|
|
169
|
-
let M = p[t], N = n === "tracking" || n === "wipe", P = c(() => typeof Intl.Segmenter == "function" ? new Intl.Segmenter(h, { granularity: "word" }) : void 0, [h]), F = (N ? [e] : e.split("\n")).map((e) => n === "line" || N || !P ? [e] : Array.from(P.segment(e), ({ segment: e }) => e)), I = F.flat().filter((e) => e.trim()).length;
|
|
170
|
-
return /* @__PURE__ */ d(i, {
|
|
171
|
-
className: y,
|
|
172
|
-
styles: w,
|
|
173
|
-
sx: b,
|
|
174
|
-
children: (t) => {
|
|
175
|
-
let r = 0;
|
|
176
|
-
return /* @__PURE__ */ f(M, {
|
|
177
|
-
...x,
|
|
178
|
-
ref: j,
|
|
179
|
-
"data-ui": "in-view-title",
|
|
180
|
-
"data-state": "settled",
|
|
181
|
-
className: t,
|
|
182
|
-
children: [/* @__PURE__ */ d("span", {
|
|
183
|
-
css: a,
|
|
184
|
-
children: e.replace(/\s+/gu, " ").trim()
|
|
185
|
-
}), /* @__PURE__ */ f("span", {
|
|
186
|
-
"data-ui": "in-view-title-visual",
|
|
187
|
-
"aria-hidden": "true",
|
|
188
|
-
className: g?.visual?.className,
|
|
189
|
-
css: [T, g?.visual?.css],
|
|
190
|
-
children: [/* @__PURE__ */ d("span", {
|
|
191
|
-
"data-in-view-plain": "",
|
|
192
|
-
children: e
|
|
193
|
-
}), /* @__PURE__ */ d("span", {
|
|
194
|
-
"data-in-view-parts": "",
|
|
195
|
-
children: F.map((e, t) => /* @__PURE__ */ d("span", {
|
|
196
|
-
css: !N && E,
|
|
197
|
-
children: e.map((e, t) => {
|
|
198
|
-
if (!e.trim()) return /* @__PURE__ */ d("span", { children: e || "" }, t);
|
|
199
|
-
let i = r++;
|
|
200
|
-
return /* @__PURE__ */ d("span", {
|
|
201
|
-
css: D[n] && O,
|
|
202
|
-
children: /* @__PURE__ */ d("span", {
|
|
203
|
-
"data-in-view-segment": "",
|
|
204
|
-
"data-in-view-last": i === I - 1 ? "" : void 0,
|
|
205
|
-
className: g?.segment?.className,
|
|
206
|
-
style: { "--in-view-delay": `calc(${u.motion.duration.slow} * ${I > 1 ? i / (I - 1) : 0})` },
|
|
207
|
-
css: [
|
|
208
|
-
k,
|
|
209
|
-
C[n],
|
|
210
|
-
g?.segment?.css
|
|
211
|
-
],
|
|
212
|
-
children: e
|
|
213
|
-
})
|
|
214
|
-
}, t);
|
|
215
|
-
})
|
|
216
|
-
}, t))
|
|
217
|
-
})]
|
|
218
|
-
})]
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
A.displayName = "InViewTitle";
|
|
224
|
-
//#endregion
|
|
225
|
-
export { A as t };
|
package/dist/in-view-title.js
DELETED