@openrails/contentkit-ui 0.98.6 → 0.99.1

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 (99) hide show
  1. package/README.md +26 -0
  2. package/dist/client/content/comments.d.ts +4 -2
  3. package/dist/client/content/comments.js +10 -6
  4. package/dist/client/content/comments.js.map +1 -1
  5. package/dist/client/generated/routes.d.ts +28 -2
  6. package/dist/client/generated/routes.js +39 -2
  7. package/dist/client/generated/routes.js.map +1 -1
  8. package/dist/client/generated/wire.d.ts +85 -0
  9. package/dist/client/generated/wire.js.map +1 -1
  10. package/dist/client/media/client.d.ts +4 -0
  11. package/dist/client/media/client.js +8 -4
  12. package/dist/client/media/client.js.map +1 -1
  13. package/dist/client/media/queue.js +42 -26
  14. package/dist/client/media/queue.js.map +1 -1
  15. package/dist/client/media/rules.d.ts +6 -0
  16. package/dist/client/media/rules.js +64 -10
  17. package/dist/client/media/rules.js.map +1 -1
  18. package/dist/client/versions.d.ts +6 -2
  19. package/dist/client/versions.js +26 -0
  20. package/dist/client/versions.js.map +1 -1
  21. package/dist/components/admin/page-review.d.ts +13 -0
  22. package/dist/components/admin/page-review.js +216 -0
  23. package/dist/components/admin/page-review.js.map +1 -0
  24. package/dist/components/content/card.js +98 -103
  25. package/dist/components/content/card.js.map +1 -1
  26. package/dist/components/content/daily-releases.d.ts +8 -1
  27. package/dist/components/content/daily-releases.js +291 -133
  28. package/dist/components/content/daily-releases.js.map +1 -1
  29. package/dist/components/content/editors.js +216 -210
  30. package/dist/components/content/editors.js.map +1 -1
  31. package/dist/components/content/filter-dialog.d.ts +11 -0
  32. package/dist/components/content/filter-dialog.js +29 -0
  33. package/dist/components/content/filter-dialog.js.map +1 -0
  34. package/dist/components/content/filters.d.ts +10 -0
  35. package/dist/components/content/filters.js +5 -2
  36. package/dist/components/content/filters.js.map +1 -1
  37. package/dist/components/content/grid.js +19 -14
  38. package/dist/components/content/grid.js.map +1 -1
  39. package/dist/components/content/index.d.ts +2 -1
  40. package/dist/components/content/release-reveal.d.ts +5 -0
  41. package/dist/components/content/release-reveal.js +62 -0
  42. package/dist/components/content/release-reveal.js.map +1 -0
  43. package/dist/components/social/comments.d.ts +1 -1
  44. package/dist/components/social/comments.js +15 -15
  45. package/dist/components/social/comments.js.map +1 -1
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +24 -22
  48. package/dist/locales/admin/de.js +23 -0
  49. package/dist/locales/admin/de.js.map +1 -1
  50. package/dist/locales/admin/en.d.ts +23 -0
  51. package/dist/locales/admin/en.js +23 -0
  52. package/dist/locales/admin/en.js.map +1 -1
  53. package/dist/locales/admin/es.js +23 -0
  54. package/dist/locales/admin/es.js.map +1 -1
  55. package/dist/locales/admin/ja.js +23 -0
  56. package/dist/locales/admin/ja.js.map +1 -1
  57. package/dist/locales/admin/ko.js +23 -0
  58. package/dist/locales/admin/ko.js.map +1 -1
  59. package/dist/locales/admin/zh.js +23 -0
  60. package/dist/locales/admin/zh.js.map +1 -1
  61. package/dist/locales/discovery/de.js +11 -0
  62. package/dist/locales/discovery/de.js.map +1 -1
  63. package/dist/locales/discovery/en.d.ts +11 -0
  64. package/dist/locales/discovery/en.js +11 -0
  65. package/dist/locales/discovery/en.js.map +1 -1
  66. package/dist/locales/discovery/es.js +11 -0
  67. package/dist/locales/discovery/es.js.map +1 -1
  68. package/dist/locales/discovery/ja.js +11 -0
  69. package/dist/locales/discovery/ja.js.map +1 -1
  70. package/dist/locales/discovery/ko.js +11 -0
  71. package/dist/locales/discovery/ko.js.map +1 -1
  72. package/dist/locales/discovery/zh.js +11 -0
  73. package/dist/locales/discovery/zh.js.map +1 -1
  74. package/dist/locales/en.d.ts +34 -0
  75. package/dist/locales/social/en.js +2 -2
  76. package/dist/locales/social/en.js.map +1 -1
  77. package/dist/react/comments.d.ts +2 -1
  78. package/dist/react/comments.js +10 -8
  79. package/dist/react/comments.js.map +1 -1
  80. package/dist/react/folder.js +39 -39
  81. package/dist/react/folder.js.map +1 -1
  82. package/dist/react/index.d.ts +1 -0
  83. package/dist/react/page-review.d.ts +14 -0
  84. package/dist/react/page-review.js +36 -0
  85. package/dist/react/page-review.js.map +1 -0
  86. package/dist/react/public.d.ts +3 -1
  87. package/dist/react/public.js +76 -72
  88. package/dist/react/public.js.map +1 -1
  89. package/dist/react/resources.d.ts +5 -13
  90. package/dist/react/resources.js +58 -49
  91. package/dist/react/resources.js.map +1 -1
  92. package/dist/react/use-resource.d.ts +1 -1
  93. package/dist/react/use-resource.js +23 -13
  94. package/dist/react/use-resource.js.map +1 -1
  95. package/dist/react/versions.js +70 -42
  96. package/dist/react/versions.js.map +1 -1
  97. package/dist/react.js +8 -7
  98. package/dist/styles.css +1 -1
  99. package/package.json +1 -1
@@ -1,175 +1,333 @@
1
- import { useMessages as e } from "../../i18n/context.js";
2
- import { ContentKitUiRoot as t } from "../../scope.js";
3
- import { useContentScope as n } from "../../react/use-resource.js";
4
- import { Button as r } from "../../ui/button.js";
5
- import { useNearViewport as i } from "../../react/viewport.js";
6
- import { Skeleton as a } from "../../ui/skeleton.js";
7
- import { contentError as o } from "../social/parts.js";
8
- import { useDailyReleases as s, useExposure as c } from "../../react/discovery.js";
9
- import { ContentCard as l } from "./card.js";
10
- import { cardGridLayout as u } from "./grid.js";
11
- import { useCallback as d, useId as f, useMemo as p, useState as m } from "react";
12
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
13
- import { cn as _ } from "cn";
14
- import { ArrowDown01Icon as v } from "@hugeicons/core-free-icons";
15
- import { HugeiconsIcon as y } from "@hugeicons/react";
1
+ import { RenditionImg as e } from "../rendition-img.js";
2
+ import { ratio as t } from "../../client/aspect.js";
3
+ import { useMessages as n } from "../../i18n/context.js";
4
+ import { ContentKitUiRoot as r } from "../../scope.js";
5
+ import { ContentKitContext as i } from "../../react/context.js";
6
+ import { useContentScope as a } from "../../react/use-resource.js";
7
+ import { usePresets as o } from "../../react/public.js";
8
+ import { Button as s } from "../../ui/button.js";
9
+ import { useNearViewport as c } from "../../react/viewport.js";
10
+ import { Skeleton as l } from "../../ui/skeleton.js";
11
+ import { contentError as u } from "../social/parts.js";
12
+ import { useDailyReleases as d, useExposure as f } from "../../react/discovery.js";
13
+ import { ContentCard as p } from "./card.js";
14
+ import { cardGridLayout as m } from "./grid.js";
15
+ import { ContentFilterDialog as h } from "./filter-dialog.js";
16
+ import { useReleaseReveal as g } from "./release-reveal.js";
17
+ import { useCallback as _, useContext as v, useId as y, useMemo as b, useRef as x, useState as S } from "react";
18
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
19
+ import { cn as T } from "cn";
20
+ import { ArrowDown01Icon as E, LockIcon as D, Settings01Icon as O } from "@hugeicons/core-free-icons";
21
+ import { HugeiconsIcon as k } from "@hugeicons/react";
16
22
  //#region src/components/content/daily-releases.tsx
17
- var b = (e, t) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : t;
18
- function x({ query: i, initialVisible: c = 30, revealStep: l = 30, ...d }) {
19
- let f = e(), { scope: m } = n(d.client), v = p(() => ({
23
+ var A = (e, t) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : t;
24
+ function j({ query: e, initialVisible: t = 30, revealStep: o = 30, collapsePremium: c = !1, summaryLabels: f, ...p }) {
25
+ let h = n(), { client: g, viewer: _ } = a(p.client), y = v(i), x = b(() => ({
20
26
  days: 10,
21
27
  time_zone: Intl.DateTimeFormat().resolvedOptions().timeZone,
22
- ...i
23
- }), [i]), y = s(v, { client: d.client }), x = u(d.grid), C = p(() => y.data?.days.filter((e) => e.contents.length).sort((e, t) => t.date.localeCompare(e.date)) ?? [], [y.data]), w = b(c, 30);
24
- return /* @__PURE__ */ h(t, {
25
- appearance: d.appearance,
26
- className: _("grid gap-6 text-sm", d.className),
28
+ ...e
29
+ }), [e]), E = d(x, { client: p.client }), D = m(p.grid), O = JSON.stringify(x), k = b(() => ({
30
+ client: g,
31
+ viewer: _,
32
+ language: y?.language,
33
+ accessRevision: y?.accessRevision,
34
+ requestKey: O
35
+ }), [
36
+ g,
37
+ _,
38
+ y?.language,
39
+ y?.accessRevision,
40
+ O
41
+ ]), [j, M] = S({
42
+ identity: k,
43
+ data: E.data,
44
+ revision: 0
45
+ });
46
+ (j.identity !== k || E.data && j.data !== E.data) && M({
47
+ identity: k,
48
+ data: E.data,
49
+ revision: j.revision + (j.identity === k ? 0 : 1)
50
+ });
51
+ let N = E.data ?? (j.identity === k ? j.data : void 0), F = !E.data && !!N, I = b(() => N?.days.filter((e) => e.contents.length || e.filtered_count > 0).sort((e, t) => t.date.localeCompare(e.date)) ?? [], [N]), L = A(t, 30);
52
+ return /* @__PURE__ */ w(r, {
53
+ appearance: p.appearance,
54
+ className: T("grid gap-6 text-sm", p.className),
27
55
  "data-ckui": "daily-releases",
28
- "aria-busy": y.loading,
29
- children: y.loading && !y.data ? /* @__PURE__ */ h("div", {
30
- className: x.className,
31
- style: x.style,
32
- children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ h(a, {
33
- className: d.aspectRatio === void 0 ? d.shape === "landscape" ? "aspect-video" : "aspect-[3/4]" : void 0,
34
- style: d.aspectRatio === void 0 ? void 0 : { aspectRatio: d.aspectRatio }
56
+ "aria-busy": E.loading,
57
+ children: [N && E.error && /* @__PURE__ */ w("div", {
58
+ role: "alert",
59
+ className: "grid justify-items-start gap-2",
60
+ children: [/* @__PURE__ */ C("p", {
61
+ className: "text-destructive",
62
+ children: u(h, E.error)
63
+ }), /* @__PURE__ */ C(s, {
64
+ type: "button",
65
+ variant: "outline",
66
+ onClick: E.reload,
67
+ children: h.t("common.retry")
68
+ })]
69
+ }), E.loading && !N ? /* @__PURE__ */ C("div", {
70
+ className: D.className,
71
+ style: D.style,
72
+ children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ C(l, {
73
+ className: p.aspectRatio === void 0 ? p.shape === "landscape" ? "aspect-video" : "aspect-[3/4]" : void 0,
74
+ style: p.aspectRatio === void 0 ? void 0 : { aspectRatio: p.aspectRatio }
35
75
  }, t))
36
- }) : y.error && !y.data ? /* @__PURE__ */ g("div", {
76
+ }) : E.error && !N ? /* @__PURE__ */ w("div", {
37
77
  role: "alert",
38
78
  className: "grid justify-items-start gap-2",
39
- children: [/* @__PURE__ */ h("p", {
79
+ children: [/* @__PURE__ */ C("p", {
40
80
  className: "text-destructive",
41
- children: o(f, y.error)
42
- }), /* @__PURE__ */ h(r, {
81
+ children: u(h, E.error)
82
+ }), /* @__PURE__ */ C(s, {
43
83
  size: "sm",
44
84
  variant: "outline",
45
- onClick: y.reload,
46
- children: f.t("common.retry")
85
+ onClick: E.reload,
86
+ children: h.t("common.retry")
47
87
  })]
48
- }) : C.length ? C.map((e) => {
49
- let t = Math.min(w, e.contents.length);
50
- return w -= t, /* @__PURE__ */ h(S, {
88
+ }) : I.length ? I.map((e) => {
89
+ let t = Math.min(L, e.contents.length);
90
+ return L -= t, /* @__PURE__ */ C(P, {
51
91
  day: e,
92
+ pending: F,
93
+ collapsePremium: c,
94
+ summaryLabels: f,
95
+ language: x.display_language ?? x.language,
96
+ kinds: x.kind ? [x.kind] : void 0,
52
97
  initial: t,
53
- step: Math.max(1, b(l, 30)),
54
- cardProps: d
98
+ step: Math.max(1, A(o, 30)),
99
+ cardProps: p
55
100
  }, JSON.stringify([
56
- m,
57
- v,
58
- y.data?.from_date,
101
+ O,
102
+ N?.from_date,
59
103
  e.date
60
104
  ]));
61
- }) : /* @__PURE__ */ h("p", {
105
+ }) : /* @__PURE__ */ C("p", {
62
106
  role: "status",
63
107
  className: "text-muted-foreground",
64
- children: d.empty ?? f.t("contents.empty")
65
- })
66
- });
108
+ children: p.empty ?? h.t("contents.empty")
109
+ })]
110
+ }, j.revision);
67
111
  }
68
- function S({ day: t, initial: n, step: i, cardProps: a }) {
69
- let o = e(), s = f(), [l, d] = m(n > 0), [b, x] = m(n), S = p(() => t.contents.slice(0, b), [t.contents, b]), w = p(() => l ? S : [], [l, S]), T = c(w, {
112
+ var M = (e) => !e.access.allowed && e.access.level === "tier", N = (e) => {
113
+ let t = /* @__PURE__ */ new Set([...e.contents.map((e) => e.kind), ...(e.filtered_entities ?? []).map((e) => e.content_kind)]);
114
+ return t.size === 1 ? t.values().next().value : void 0;
115
+ };
116
+ function P({ day: e, initial: t, step: r, pending: i, cardProps: a, collapsePremium: o, summaryLabels: c, language: u, kinds: d }) {
117
+ let p = n(), _ = y(), [v, D] = S(t > 0 || !e.contents.length && e.filtered_count > 0), [O, A] = S(t), [j, P] = S(!1), [L, R] = S(!1), z = x(null), B = x(null), V = b(() => e.contents.slice(0, O), [e.contents, O]), H = b(() => e.contents.filter(M).length, [e.contents]), U = d?.[0] ?? N(e), W = b(() => {
118
+ let e = !1;
119
+ return V.flatMap((t, n) => !o || j || !M(t) ? [{
120
+ key: t.id,
121
+ card: t,
122
+ summary: !1,
123
+ position: n + 1
124
+ }] : e ? [] : (e = !0, [{
125
+ key: "premium-summary",
126
+ card: t,
127
+ summary: !0,
128
+ position: n + 1
129
+ }]));
130
+ }, [
131
+ V,
132
+ o,
133
+ j
134
+ ]), G = b(() => v && !i ? W.filter((e) => !e.summary).map((e) => e.card) : [], [
135
+ v,
136
+ i,
137
+ W
138
+ ]), K = f(G, {
70
139
  surface: a.surface ?? "releases",
71
- render: t.date,
140
+ render: e.date,
72
141
  client: a.client
73
- }), E = u(a.grid), D = new Intl.DateTimeFormat(o.language, {
142
+ }), q = m(a.grid), J = g(`${O}|${W.map((e) => e.key).join("\0")}`), Y = new Intl.DateTimeFormat(p.language, {
74
143
  dateStyle: "full",
75
144
  timeZone: "UTC"
76
- }).format(/* @__PURE__ */ new Date(`${t.date}T12:00:00Z`));
77
- return /* @__PURE__ */ g("section", {
145
+ }).format(/* @__PURE__ */ new Date(`${e.date}T12:00:00Z`)), X = () => {
146
+ !v && !O && A(Math.min(r, e.contents.length)), D(!v);
147
+ }, Z = (e) => {
148
+ J.prepare(e.detail === 0), P(!0);
149
+ };
150
+ return /* @__PURE__ */ w("section", {
78
151
  "data-ckui": "release-day",
79
- "data-date": t.date,
80
- children: [/* @__PURE__ */ h("h2", { children: /* @__PURE__ */ g(r, {
81
- id: `${s}-heading`,
82
- type: "button",
83
- variant: "ghost",
84
- className: "h-auto w-full justify-start gap-3 px-0 py-3 text-start text-lg font-semibold",
85
- "aria-expanded": l,
86
- "aria-controls": `${s}-contents`,
87
- onClick: () => {
88
- !l && !b && x(Math.min(i, t.contents.length)), d(!l);
89
- },
90
- children: [
91
- /* @__PURE__ */ h(y, {
92
- icon: v,
152
+ "data-date": e.date,
153
+ children: [
154
+ /* @__PURE__ */ C("h2", { children: /* @__PURE__ */ w(s, {
155
+ ref: B,
156
+ id: `${_}-heading`,
157
+ type: "button",
158
+ variant: "ghost",
159
+ className: "h-auto w-full justify-start gap-3 px-0 py-3 text-start text-lg font-semibold",
160
+ "aria-expanded": v,
161
+ "aria-controls": `${_}-contents`,
162
+ onClick: X,
163
+ children: [/* @__PURE__ */ C(k, {
164
+ icon: E,
93
165
  strokeWidth: 2,
94
- className: _("size-5 shrink-0 transition-transform duration-200 motion-reduce:transition-none", !l && "-rotate-90"),
166
+ className: T("size-5 shrink-0 transition-transform duration-200 motion-reduce:transition-none", !v && "-rotate-90"),
95
167
  "aria-hidden": !0
96
- }),
97
- /* @__PURE__ */ h("time", {
98
- dateTime: t.date,
99
- children: D
100
- }),
101
- /* @__PURE__ */ h("span", {
102
- className: "ml-auto shrink-0 text-sm font-normal text-muted-foreground",
103
- children: o.plural("contents.items", t.contents.length)
104
- })
105
- ]
106
- }) }), /* @__PURE__ */ h("div", {
107
- id: `${s}-contents`,
108
- role: "region",
109
- "aria-labelledby": `${s}-heading`,
110
- "aria-hidden": !l,
111
- inert: !l,
112
- className: _("grid transition-[grid-template-rows,opacity] duration-250 ease-out motion-reduce:transition-none", l ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
113
- children: /* @__PURE__ */ g("div", {
114
- className: "min-h-0 overflow-hidden",
115
- children: [/* @__PURE__ */ h("ol", {
116
- className: _(E.className, "pt-2"),
117
- style: E.style,
118
- children: S.map((e, t) => /* @__PURE__ */ h(C, {
119
- card: e,
120
- open: l,
121
- position: t + 1,
122
- exposure: T,
123
- cardProps: a
124
- }, e.id))
125
- }), b < t.contents.length && /* @__PURE__ */ h("div", {
126
- className: "flex justify-center pt-5 pb-1",
127
- children: /* @__PURE__ */ h(r, {
128
- type: "button",
129
- variant: "outline",
130
- onClick: () => x((e) => Math.min(e + i, t.contents.length)),
131
- children: o.t("contents.showMore")
132
- })
168
+ }), /* @__PURE__ */ C("time", {
169
+ dateTime: e.date,
170
+ children: Y
133
171
  })]
172
+ }) }),
173
+ v && i && /* @__PURE__ */ C(l, { className: "h-24 w-full" }),
174
+ /* @__PURE__ */ C("div", {
175
+ hidden: i,
176
+ style: i ? { display: "none" } : void 0,
177
+ id: `${_}-contents`,
178
+ role: "region",
179
+ "aria-labelledby": `${_}-heading`,
180
+ "aria-hidden": !v || i,
181
+ inert: !v || i,
182
+ className: T("grid transition-[grid-template-rows,opacity] duration-250 ease-out motion-reduce:transition-none", v ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
183
+ children: /* @__PURE__ */ w("div", {
184
+ className: "min-h-0 overflow-hidden",
185
+ children: [/* @__PURE__ */ w("ol", {
186
+ ref: J.grid,
187
+ className: T(q.className, "pt-2"),
188
+ style: q.style,
189
+ children: [W.map((e) => e.summary ? /* @__PURE__ */ C(F, {
190
+ tileKey: e.key,
191
+ contentKind: d?.[0] ?? e.card.kind,
192
+ open: v && !i,
193
+ preview: e.card,
194
+ cardProps: a,
195
+ kind: "premium",
196
+ label: c?.premium?.(H) ?? p.plural("releases.premiumMore", H),
197
+ onClick: Z
198
+ }, e.key) : /* @__PURE__ */ C(I, {
199
+ card: e.card,
200
+ open: v && !i,
201
+ position: e.position,
202
+ exposure: K,
203
+ cardProps: a
204
+ }, e.key)), e.filtered_count > 0 && /* @__PURE__ */ C(F, {
205
+ tileKey: "filtered-summary",
206
+ contentKind: U,
207
+ open: v && !i,
208
+ cardProps: a,
209
+ kind: "filtered",
210
+ label: c?.filtered?.(e.filtered_count) ?? p.plural("releases.filteredMore", e.filtered_count),
211
+ onClick: (e) => {
212
+ z.current = e.currentTarget, R(!0);
213
+ }
214
+ })]
215
+ }), O < e.contents.length && /* @__PURE__ */ C("div", {
216
+ className: "flex justify-center pt-5 pb-1",
217
+ children: /* @__PURE__ */ C(s, {
218
+ type: "button",
219
+ variant: "outline",
220
+ onClick: (t) => {
221
+ J.prepare(t.detail === 0), A((t) => Math.min(t + r, e.contents.length));
222
+ },
223
+ children: p.t("contents.showMore")
224
+ })
225
+ })]
226
+ })
227
+ }),
228
+ /* @__PURE__ */ C(h, {
229
+ returnFocus: () => !i && z.current?.isConnected ? z.current : B.current,
230
+ open: L,
231
+ onOpenChange: R,
232
+ client: a.client,
233
+ kinds: d,
234
+ labels: a.labels,
235
+ language: u,
236
+ counts: e.filtered_entities ?? [],
237
+ description: p.t("releases.filterContext", { date: Y }),
238
+ appearance: a.appearance
134
239
  })
240
+ ]
241
+ });
242
+ }
243
+ function F({ tileKey: r, kind: i, contentKind: a, preview: l, open: u, label: d, onClick: f, cardProps: p }) {
244
+ let { t: m } = n(), [h, g] = c({
245
+ margin: "0px",
246
+ leaveMargin: "1200px 0px"
247
+ }), { presets: _ } = o({ client: p.client }), v = p.aspectRatio ?? t(_.find((e) => e.kind === a && e.name === "cover")?.aspect) ?? (p.shape === "landscape" ? "16 / 9" : "3 / 4");
248
+ return /* @__PURE__ */ w("li", {
249
+ ref: h,
250
+ "data-release-key": r,
251
+ children: [/* @__PURE__ */ w(s, {
252
+ type: "button",
253
+ variant: "outline",
254
+ "data-ckui": `${i}-release-tile`,
255
+ "aria-label": d,
256
+ "aria-expanded": i !== "premium" && void 0,
257
+ "aria-haspopup": i === "filtered" ? "dialog" : void 0,
258
+ className: "relative flex h-auto w-full flex-col justify-center overflow-hidden rounded-lg p-0 text-center whitespace-normal",
259
+ style: { aspectRatio: v },
260
+ onClick: f,
261
+ children: [l && u && g && /* @__PURE__ */ C(e, {
262
+ outputs: l.cover,
263
+ alt: "",
264
+ fit: "cover",
265
+ loading: "lazy",
266
+ className: "absolute inset-0 size-full opacity-20"
267
+ }), /* @__PURE__ */ w("span", {
268
+ className: "relative grid justify-items-center gap-3 p-4",
269
+ children: [
270
+ /* @__PURE__ */ C(k, {
271
+ icon: i === "premium" ? D : O,
272
+ strokeWidth: 2,
273
+ className: "size-8",
274
+ "aria-hidden": !0
275
+ }),
276
+ /* @__PURE__ */ C("span", {
277
+ className: "text-xl font-semibold",
278
+ children: d
279
+ }),
280
+ /* @__PURE__ */ C("span", {
281
+ className: "text-sm text-muted-foreground",
282
+ children: m(i === "premium" ? "releases.premiumHint" : "releases.manageFilters")
283
+ })
284
+ ]
285
+ })]
286
+ }), l && /* @__PURE__ */ C("p", {
287
+ className: "mt-2 line-clamp-2 text-lg leading-snug text-muted-foreground",
288
+ children: l.title
135
289
  })]
136
290
  });
137
291
  }
138
- function C({ card: e, open: t, position: n, exposure: r, cardProps: a }) {
139
- let [o, s] = i({ margin: "0px" }), c = p(() => r.track(e.id, n), [
292
+ function I({ card: e, open: t, position: n, exposure: r, cardProps: i }) {
293
+ let [a, o] = c({
294
+ margin: "0px",
295
+ leaveMargin: "1200px 0px"
296
+ }), s = b(() => r.track(e.id, n), [
140
297
  r,
141
298
  e.id,
142
299
  n
143
- ]), u = d((e) => {
144
- o(e), c(e);
145
- }, [o, c]);
146
- return /* @__PURE__ */ h("li", {
147
- ref: u,
148
- children: /* @__PURE__ */ h(l, {
300
+ ]), l = _((e) => {
301
+ a(e), s(e);
302
+ }, [a, s]);
303
+ return /* @__PURE__ */ C("li", {
304
+ ref: l,
305
+ "data-release-key": e.id,
306
+ children: /* @__PURE__ */ C(p, {
149
307
  card: e,
150
- client: a.client,
151
- href: a.href,
152
- shape: a.shape,
153
- aspectRatio: a.aspectRatio,
154
- titlePosition: a.titlePosition,
155
- loadMedia: t && s,
156
- groupKinds: a.groupKinds,
157
- chips: a.chips,
158
- filterEntity: a.filterEntity,
159
- entityStyle: a.entityStyle,
160
- entityLayout: a.entityLayout,
161
- metadata: a.metadata,
162
- showCounts: a.showCounts,
163
- tiers: a.tiers,
164
- labels: a.labels,
165
- owner: a.owner,
166
- ownerHref: a.ownerHref,
167
- decorate: a.decorate,
308
+ client: i.client,
309
+ href: i.href,
310
+ shape: i.shape,
311
+ aspectRatio: i.aspectRatio,
312
+ titlePosition: i.titlePosition,
313
+ loadMedia: t && o,
314
+ groupKinds: i.groupKinds,
315
+ chips: i.chips,
316
+ filterEntity: i.filterEntity,
317
+ entityStyle: i.entityStyle,
318
+ entityLayout: i.entityLayout,
319
+ metadata: i.metadata,
320
+ showCounts: i.showCounts,
321
+ tiers: i.tiers,
322
+ labels: i.labels,
323
+ owner: i.owner,
324
+ ownerHref: i.ownerHref,
325
+ decorate: i.decorate,
168
326
  onOpen: () => r.click(e.id, n)
169
327
  })
170
328
  });
171
329
  }
172
330
  //#endregion
173
- export { x as DailyReleases };
331
+ export { j as DailyReleases };
174
332
 
175
333
  //# sourceMappingURL=daily-releases.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"daily-releases.js","names":[],"sources":["../../../src/components/content/daily-releases.tsx"],"sourcesContent":["import { ArrowDown01Icon } from \"@hugeicons/core-free-icons\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { cn } from \"cn\";\nimport { useCallback, useId, useMemo, useState } from \"react\";\nimport type { DailyReleasesQuery } from \"../../client/discovery.js\";\nimport type { Card, ReleaseDay } from \"../../client/generated/wire.js\";\nimport { useMessages } from \"../../i18n/context.js\";\nimport { useDailyReleases, useExposure } from \"../../react/discovery.js\";\nimport { useContentScope } from \"../../react/use-resource.js\";\nimport { useNearViewport } from \"../../react/viewport.js\";\nimport { ContentKitUiRoot } from \"../../scope.js\";\nimport { Button } from \"#ckui/ui/button\";\nimport { Skeleton } from \"#ckui/ui/skeleton\";\nimport { contentError } from \"../social/parts.js\";\nimport { ContentCard } from \"./card.js\";\nimport { cardGridLayout, type CardListProps } from \"./grid.js\";\n\nexport interface DailyReleasesProps extends Omit<CardListProps, \"infinite\" | \"pageSize\" | \"renderCard\" | \"loadMedia\"> {\n /** One complete calendar window. Defaults to 10 days in the browser's time zone. */\n query?: DailyReleasesQuery;\n /** Cards initially revealed across the whole window, allocated newest first. Default 30. */\n initialVisible?: number;\n /** Additional cached cards revealed by a day's Show more button. Default 30. */\n revealStep?: number;\n}\n\nconst count = (value: number, fallback: number) => Number.isFinite(value) ? Math.max(0, Math.floor(value)) : fallback;\n\n/**\n * One metadata request for a calendar window, with no requests when a day is\n * opened or expanded. Only revealed, visible cards mount images and previews.\n */\nexport function DailyReleases({ query, initialVisible = 30, revealStep = 30, ...p }: DailyReleasesProps) {\n const m = useMessages();\n const { scope } = useContentScope(p.client);\n const request = useMemo(() => ({ days: 10, time_zone: Intl.DateTimeFormat().resolvedOptions().timeZone, ...query }), [query]);\n const releases = useDailyReleases(request, { client: p.client });\n const layout = cardGridLayout(p.grid);\n const days = useMemo(() => releases.data?.days.filter((day) => day.contents.length).sort((a, b) => b.date.localeCompare(a.date)) ?? [], [releases.data]);\n let remaining = count(initialVisible, 30);\n return (\n <ContentKitUiRoot appearance={p.appearance} className={cn(\"grid gap-6 text-sm\", p.className)} data-ckui=\"daily-releases\" aria-busy={releases.loading}>\n {releases.loading && !releases.data ? <div className={layout.className} style={layout.style}>{Array.from({ length: 6 }, (_, i) => <Skeleton key={i} className={p.aspectRatio === undefined ? p.shape === \"landscape\" ? \"aspect-video\" : \"aspect-[3/4]\" : undefined} style={p.aspectRatio === undefined ? undefined : { aspectRatio: p.aspectRatio }} />)}</div> : releases.error && !releases.data ? (\n <div role=\"alert\" className=\"grid justify-items-start gap-2\">\n <p className=\"text-destructive\">{contentError(m, releases.error)}</p>\n <Button size=\"sm\" variant=\"outline\" onClick={releases.reload}>{m.t(\"common.retry\")}</Button>\n </div>\n ) : !days.length ? <p role=\"status\" className=\"text-muted-foreground\">{p.empty ?? m.t(\"contents.empty\")}</p> : days.map((day) => {\n const initial = Math.min(remaining, day.contents.length);\n remaining -= initial;\n return <ReleaseDaySection key={JSON.stringify([scope, request, releases.data?.from_date, day.date])} day={day} initial={initial} step={Math.max(1, count(revealStep, 30))} cardProps={p} />;\n })}\n </ContentKitUiRoot>\n );\n}\n\nfunction ReleaseDaySection({ day, initial, step, cardProps: p }: { day: ReleaseDay; initial: number; step: number; cardProps: Omit<DailyReleasesProps, \"query\" | \"initialVisible\" | \"revealStep\"> }) {\n const m = useMessages();\n const id = useId();\n const [open, setOpen] = useState(initial > 0);\n const [visible, setVisible] = useState(initial);\n const cards = useMemo(() => day.contents.slice(0, visible), [day.contents, visible]);\n const exposed = useMemo(() => open ? cards : [], [open, cards]);\n const exposure = useExposure(exposed, { surface: p.surface ?? \"releases\", render: day.date, client: p.client });\n const layout = cardGridLayout(p.grid);\n // The server already assigned the calendar day in the requested time zone.\n const label = new Intl.DateTimeFormat(m.language, { dateStyle: \"full\", timeZone: \"UTC\" }).format(new Date(`${day.date}T12:00:00Z`));\n const toggle = () => {\n if (!open && !visible) setVisible(Math.min(step, day.contents.length));\n setOpen(!open);\n };\n return (\n <section data-ckui=\"release-day\" data-date={day.date}>\n <h2>\n <Button id={`${id}-heading`} type=\"button\" variant=\"ghost\" className=\"h-auto w-full justify-start gap-3 px-0 py-3 text-start text-lg font-semibold\" aria-expanded={open} aria-controls={`${id}-contents`} onClick={toggle}>\n <HugeiconsIcon icon={ArrowDown01Icon} strokeWidth={2} className={cn(\"size-5 shrink-0 transition-transform duration-200 motion-reduce:transition-none\", !open && \"-rotate-90\")} aria-hidden />\n <time dateTime={day.date}>{label}</time>\n <span className=\"ml-auto shrink-0 text-sm font-normal text-muted-foreground\">{m.plural(\"contents.items\", day.contents.length)}</span>\n </Button>\n </h2>\n <div id={`${id}-contents`} role=\"region\" aria-labelledby={`${id}-heading`} aria-hidden={!open} inert={!open} className={cn(\"grid transition-[grid-template-rows,opacity] duration-250 ease-out motion-reduce:transition-none\", open ? \"grid-rows-[1fr] opacity-100\" : \"grid-rows-[0fr] opacity-0\")}>\n <div className=\"min-h-0 overflow-hidden\">\n <ol className={cn(layout.className, \"pt-2\")} style={layout.style}>\n {cards.map((card, i) => <ReleaseCard key={card.id} card={card} open={open} position={i + 1} exposure={exposure} cardProps={p} />)}\n </ol>\n {visible < day.contents.length && <div className=\"flex justify-center pt-5 pb-1\"><Button type=\"button\" variant=\"outline\" onClick={() => setVisible((n) => Math.min(n + step, day.contents.length))}>{m.t(\"contents.showMore\")}</Button></div>}\n </div>\n </div>\n </section>\n );\n}\n\nfunction ReleaseCard({ card, open, position, exposure, cardProps: p }: { card: Card; open: boolean; position: number; exposure: ReturnType<typeof useExposure>; cardProps: Omit<DailyReleasesProps, \"query\" | \"initialVisible\" | \"revealStep\"> }) {\n const [viewport, visible] = useNearViewport({ margin: \"0px\" });\n const tracked = useMemo(() => exposure.track(card.id, position), [exposure, card.id, position]);\n const ref = useCallback((element: HTMLLIElement | null) => { viewport(element); tracked(element); }, [viewport, tracked]);\n return <li ref={ref}>\n <ContentCard card={card} client={p.client} href={p.href} shape={p.shape} aspectRatio={p.aspectRatio} titlePosition={p.titlePosition} loadMedia={open && visible} groupKinds={p.groupKinds} chips={p.chips} filterEntity={p.filterEntity} entityStyle={p.entityStyle} entityLayout={p.entityLayout} metadata={p.metadata} showCounts={p.showCounts} tiers={p.tiers} labels={p.labels} owner={p.owner} ownerHref={p.ownerHref} decorate={p.decorate} onOpen={() => exposure.click(card.id, position)} />\n </li>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0BA,IAAM,KAAS,GAAe,MAAqB,OAAO,SAAS,CAAK,IAAI,KAAK,IAAI,GAAG,KAAK,MAAM,CAAK,CAAC,IAAI;AAM7G,SAAgB,EAAc,EAAE,UAAO,oBAAiB,IAAI,gBAAa,IAAI,GAAG,KAAyB;CACvG,IAAM,IAAI,EAAY,GAChB,EAAE,aAAU,EAAgB,EAAE,MAAM,GACpC,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C,GACvD,IAAU,QAAc,EAAS,MAAM,EAAK,IAAI,CAAQ,GAAG;EAAC;EAAU,EAAK;EAAI;CAAQ,CAAC,GACxF,IAAM,GAAa,MAAkC;EAAqB,AAAnB,EAAS,CAAO,GAAG,EAAQ,CAAO;CAAG,GAAG,CAAC,GAAU,CAAO,CAAC;CACxH,OAAO,kBAAC,MAAD;EAAS;EACd,UAAA,kBAAC,GAAD;GAAmB;GAAM,QAAQ,EAAE;GAAQ,MAAM,EAAE;GAAM,OAAO,EAAE;GAAO,aAAa,EAAE;GAAa,eAAe,EAAE;GAAe,WAAW,KAAQ;GAAS,YAAY,EAAE;GAAY,OAAO,EAAE;GAAO,cAAc,EAAE;GAAc,aAAa,EAAE;GAAa,cAAc,EAAE;GAAc,UAAU,EAAE;GAAU,YAAY,EAAE;GAAY,OAAO,EAAE;GAAO,QAAQ,EAAE;GAAQ,OAAO,EAAE;GAAO,WAAW,EAAE;GAAW,UAAU,EAAE;GAAU,cAAc,EAAS,MAAM,EAAK,IAAI,CAAQ;EAAI,CAAA;CACne,CAAA;AACN"}
1
+ {"version":3,"file":"daily-releases.js","names":[],"sources":["../../../src/components/content/daily-releases.tsx"],"sourcesContent":["import { ArrowDown01Icon, LockIcon, Settings01Icon } from \"@hugeicons/core-free-icons\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { cn } from \"cn\";\nimport { useCallback, useContext, useId, useMemo, useState, useRef, type CSSProperties, type MouseEvent } from \"react\";\nimport type { DailyReleasesQuery } from \"../../client/discovery.js\";\nimport type { Card, ReleaseDay } from \"../../client/generated/wire.js\";\nimport { useMessages } from \"../../i18n/context.js\";\nimport { useDailyReleases, useExposure } from \"../../react/discovery.js\";\nimport { ContentKitContext } from \"../../react/context.js\";\nimport { useContentScope } from \"../../react/use-resource.js\";\nimport { usePresets } from \"../../react/public.js\";\nimport { ratio } from \"../../client/aspect.js\";\nimport { RenditionImg } from \"../rendition-img.js\";\nimport { useNearViewport } from \"../../react/viewport.js\";\nimport { ContentKitUiRoot } from \"../../scope.js\";\nimport { Button } from \"#ckui/ui/button\";\nimport { Skeleton } from \"#ckui/ui/skeleton\";\nimport { contentError } from \"../social/parts.js\";\nimport { ContentFilterDialog } from \"./filter-dialog.js\";\nimport { useReleaseReveal } from \"./release-reveal.js\";\nimport { ContentCard } from \"./card.js\";\nimport { cardGridLayout, type CardListProps } from \"./grid.js\";\n\nexport interface DailyReleasesProps extends Omit<CardListProps, \"infinite\" | \"pageSize\" | \"renderCard\" | \"loadMedia\"> {\n /** One complete calendar window. Defaults to 10 days in the browser's time zone. */\n query?: DailyReleasesQuery;\n /** Cards initially revealed across the whole window, allocated newest first. Default 30. */\n initialVisible?: number;\n /** Collapse locked tier previews per day; expansion never grants access. Default false. */\n collapsePremium?: boolean;\n /** Host-specific nouns; defaults use localized generic item labels. */\n summaryLabels?: { premium?: (count: number) => string; filtered?: (count: number) => string };\n /** Additional cached cards revealed by a day's Show more button. Default 30. */\n revealStep?: number;\n}\n\nconst count = (value: number, fallback: number) => Number.isFinite(value) ? Math.max(0, Math.floor(value)) : fallback;\n\n/**\n * One metadata request for a calendar window, with no requests when a day is\n * opened or expanded. Only revealed, visible cards mount images and previews.\n */\nexport function DailyReleases({ query, initialVisible = 30, revealStep = 30, collapsePremium = false, summaryLabels, ...p }: DailyReleasesProps) {\n const m = useMessages();\n const { client, viewer } = useContentScope(p.client);\n const context = useContext(ContentKitContext);\n const request = useMemo(() => ({ days: 10, time_zone: Intl.DateTimeFormat().resolvedOptions().timeZone, ...query }), [query]);\n const releases = useDailyReleases(request, { client: p.client });\n const layout = cardGridLayout(p.grid);\n const requestKey = JSON.stringify(request);\n // Guest preference changes create a fresh read scope. Keep the open day/dialog\n // while it loads, but never show the old cards or carry data across accounts.\n const identity = useMemo(() => ({ client, viewer, language: context?.language, accessRevision: context?.accessRevision, requestKey }), [client, viewer, context?.language, context?.accessRevision, requestKey]);\n const [previous, setPrevious] = useState({ identity, data: releases.data, revision: 0 });\n if (previous.identity !== identity || (releases.data && previous.data !== releases.data)) setPrevious({ identity, data: releases.data, revision: previous.revision + (previous.identity === identity ? 0 : 1) });\n const data = releases.data ?? (previous.identity === identity ? previous.data : undefined);\n const pending = !releases.data && Boolean(data);\n const days = useMemo(() => data?.days.filter((day) => (day.contents.length || day.filtered_count > 0)).sort((a, b) => b.date.localeCompare(a.date)) ?? [], [data]);\n let remaining = count(initialVisible, 30);\n return (\n <ContentKitUiRoot key={previous.revision} appearance={p.appearance} className={cn(\"grid gap-6 text-sm\", p.className)} data-ckui=\"daily-releases\" aria-busy={releases.loading}>\n {data && releases.error && <div role=\"alert\" className=\"grid justify-items-start gap-2\"><p className=\"text-destructive\">{contentError(m, releases.error)}</p><Button type=\"button\" variant=\"outline\" onClick={releases.reload}>{m.t(\"common.retry\")}</Button></div>}\n {releases.loading && !data ? <div className={layout.className} style={layout.style}>{Array.from({ length: 6 }, (_, i) => <Skeleton key={i} className={p.aspectRatio === undefined ? p.shape === \"landscape\" ? \"aspect-video\" : \"aspect-[3/4]\" : undefined} style={p.aspectRatio === undefined ? undefined : { aspectRatio: p.aspectRatio }} />)}</div> : releases.error && !data ? (\n <div role=\"alert\" className=\"grid justify-items-start gap-2\">\n <p className=\"text-destructive\">{contentError(m, releases.error)}</p>\n <Button size=\"sm\" variant=\"outline\" onClick={releases.reload}>{m.t(\"common.retry\")}</Button>\n </div>\n ) : !days.length ? <p role=\"status\" className=\"text-muted-foreground\">{p.empty ?? m.t(\"contents.empty\")}</p> : days.map((day) => {\n const initial = Math.min(remaining, day.contents.length);\n remaining -= initial;\n return <ReleaseDaySection key={JSON.stringify([requestKey, data?.from_date, day.date])} day={day} pending={pending} collapsePremium={collapsePremium} summaryLabels={summaryLabels} language={request.display_language ?? request.language} kinds={request.kind ? [request.kind] : undefined} initial={initial} step={Math.max(1, count(revealStep, 30))} cardProps={p} />;\n })}\n </ContentKitUiRoot>\n );\n}\n\ntype ReleaseCardProps = Omit<DailyReleasesProps, \"query\" | \"initialVisible\" | \"revealStep\" | \"collapsePremium\" | \"summaryLabels\">;\nconst lockedPremium = (card: Card) => !card.access.allowed && card.access.level === \"tier\";\nconst singleReleaseKind = (day: ReleaseDay): string | undefined => {\n const kinds = new Set([...day.contents.map((card) => card.kind), ...(day.filtered_entities ?? []).map((entry) => entry.content_kind)]);\n return kinds.size === 1 ? kinds.values().next().value : undefined;\n};\n\nfunction ReleaseDaySection({ day, initial, step, pending, cardProps: p, collapsePremium, summaryLabels, language, kinds }: {\n day: ReleaseDay; initial: number; step: number; pending: boolean; cardProps: ReleaseCardProps;\n collapsePremium: boolean; summaryLabels?: DailyReleasesProps[\"summaryLabels\"]; language?: string; kinds?: string[];\n}) {\n const m = useMessages();\n const id = useId();\n const [open, setOpen] = useState(initial > 0 || (!day.contents.length && day.filtered_count > 0));\n const [visible, setVisible] = useState(initial);\n const [premiumExpanded, setPremiumExpanded] = useState(false);\n const [filtersOpen, setFiltersOpen] = useState(false);\n const filterTrigger = useRef<HTMLElement | null>(null);\n const dayHeading = useRef<HTMLButtonElement>(null);\n const cards = useMemo(() => day.contents.slice(0, visible), [day.contents, visible]);\n const premiumCount = useMemo(() => day.contents.filter(lockedPremium).length, [day.contents]);\n const summaryContentKind = kinds?.[0] ?? singleReleaseKind(day);\n const entries = useMemo(() => {\n let inserted = false;\n return cards.flatMap((card, i): { key: string; card: Card; summary: boolean; position: number }[] => {\n if (!collapsePremium || premiumExpanded || !lockedPremium(card)) return [{ key: card.id, card, summary: false, position: i + 1 }];\n if (inserted) return [];\n inserted = true;\n return [{ key: \"premium-summary\", card, summary: true, position: i + 1 }];\n });\n }, [cards, collapsePremium, premiumExpanded]);\n const exposed = useMemo(() => open && !pending ? entries.filter((entry) => !entry.summary).map((entry) => entry.card) : [], [open, pending, entries]);\n const exposure = useExposure(exposed, { surface: p.surface ?? \"releases\", render: day.date, client: p.client });\n const layout = cardGridLayout(p.grid);\n const reveal = useReleaseReveal(`${visible}|${entries.map((entry) => entry.key).join(\"\\0\")}`);\n const label = new Intl.DateTimeFormat(m.language, { dateStyle: \"full\", timeZone: \"UTC\" }).format(new Date(`${day.date}T12:00:00Z`));\n const toggle = () => {\n if (!open && !visible) setVisible(Math.min(step, day.contents.length));\n setOpen(!open);\n };\n const expandPremium = (event: MouseEvent<HTMLButtonElement>) => {\n reveal.prepare(event.detail === 0);\n setPremiumExpanded(true);\n };\n return (\n <section data-ckui=\"release-day\" data-date={day.date}>\n <h2>\n <Button ref={dayHeading} id={`${id}-heading`} type=\"button\" variant=\"ghost\" className=\"h-auto w-full justify-start gap-3 px-0 py-3 text-start text-lg font-semibold\" aria-expanded={open} aria-controls={`${id}-contents`} onClick={toggle}>\n <HugeiconsIcon icon={ArrowDown01Icon} strokeWidth={2} className={cn(\"size-5 shrink-0 transition-transform duration-200 motion-reduce:transition-none\", !open && \"-rotate-90\")} aria-hidden />\n <time dateTime={day.date}>{label}</time>\n </Button>\n </h2>\n {open && pending && <Skeleton className=\"h-24 w-full\" />}\n <div hidden={pending} style={pending ? { display: \"none\" } : undefined} id={`${id}-contents`} role=\"region\" aria-labelledby={`${id}-heading`} aria-hidden={!open || pending} inert={!open || pending} className={cn(\"grid transition-[grid-template-rows,opacity] duration-250 ease-out motion-reduce:transition-none\", open ? \"grid-rows-[1fr] opacity-100\" : \"grid-rows-[0fr] opacity-0\")}>\n <div className=\"min-h-0 overflow-hidden\">\n <ol ref={reveal.grid} className={cn(layout.className, \"pt-2\")} style={layout.style}>\n {entries.map((entry) => entry.summary ?\n <ReleaseSummaryTile key={entry.key} tileKey={entry.key} contentKind={kinds?.[0] ?? entry.card.kind} open={open && !pending} preview={entry.card} cardProps={p} kind=\"premium\" label={summaryLabels?.premium?.(premiumCount) ?? m.plural(\"releases.premiumMore\", premiumCount)} onClick={expandPremium} /> :\n <ReleaseCard key={entry.key} card={entry.card} open={open && !pending} position={entry.position} exposure={exposure} cardProps={p} />)}\n {day.filtered_count > 0 && <ReleaseSummaryTile tileKey=\"filtered-summary\" contentKind={summaryContentKind} open={open && !pending} cardProps={p} kind=\"filtered\" label={summaryLabels?.filtered?.(day.filtered_count) ?? m.plural(\"releases.filteredMore\", day.filtered_count)} onClick={(event) => { filterTrigger.current = event.currentTarget; setFiltersOpen(true); }} />}\n </ol>\n {visible < day.contents.length && <div className=\"flex justify-center pt-5 pb-1\"><Button type=\"button\" variant=\"outline\" onClick={(event) => { reveal.prepare(event.detail === 0); setVisible((n) => Math.min(n + step, day.contents.length)); }}>{m.t(\"contents.showMore\")}</Button></div>}\n </div>\n </div>\n <ContentFilterDialog returnFocus={() => !pending && filterTrigger.current?.isConnected ? filterTrigger.current : dayHeading.current} open={filtersOpen} onOpenChange={setFiltersOpen} client={p.client} kinds={kinds} labels={p.labels} language={language} counts={day.filtered_entities ?? []} description={m.t(\"releases.filterContext\", { date: label })} appearance={p.appearance} />\n </section>\n );\n}\n\nfunction ReleaseSummaryTile({ tileKey, kind, contentKind, preview, open, label, onClick, cardProps: p }: {\n tileKey: string; kind: \"premium\" | \"filtered\"; contentKind?: string; preview?: Card; open: boolean; label: string; onClick: (event: MouseEvent<HTMLButtonElement>) => void; cardProps: ReleaseCardProps;\n}) {\n const { t } = useMessages();\n const [ref, near] = useNearViewport({ margin: \"0px\", leaveMargin: \"1200px 0px\" });\n const { presets } = usePresets({ client: p.client });\n const aspect: CSSProperties[\"aspectRatio\"] = p.aspectRatio ?? ratio(presets.find((preset) => preset.kind === contentKind && preset.name === \"cover\")?.aspect) ?? (p.shape === \"landscape\" ? \"16 / 9\" : \"3 / 4\");\n return <li ref={ref} data-release-key={tileKey}>\n <Button type=\"button\" variant=\"outline\" data-ckui={`${kind}-release-tile`} aria-label={label} aria-expanded={kind === \"premium\" ? false : undefined} aria-haspopup={kind === \"filtered\" ? \"dialog\" : undefined} className=\"relative flex h-auto w-full flex-col justify-center overflow-hidden rounded-lg p-0 text-center whitespace-normal\" style={{ aspectRatio: aspect }} onClick={onClick}>\n {preview && open && near && <RenditionImg outputs={preview.cover} alt=\"\" fit=\"cover\" loading=\"lazy\" className=\"absolute inset-0 size-full opacity-20\" />}\n <span className=\"relative grid justify-items-center gap-3 p-4\">\n <HugeiconsIcon icon={kind === \"premium\" ? LockIcon : Settings01Icon} strokeWidth={2} className=\"size-8\" aria-hidden />\n <span className=\"text-xl font-semibold\">{label}</span>\n <span className=\"text-sm text-muted-foreground\">{t(kind === \"premium\" ? \"releases.premiumHint\" : \"releases.manageFilters\")}</span>\n </span>\n </Button>\n {preview && <p className=\"mt-2 line-clamp-2 text-lg leading-snug text-muted-foreground\">{preview.title}</p>}\n </li>;\n}\n\nfunction ReleaseCard({ card, open, position, exposure, cardProps: p }: { card: Card; open: boolean; position: number; exposure: ReturnType<typeof useExposure>; cardProps: ReleaseCardProps }) {\n const [viewport, visible] = useNearViewport({ margin: \"0px\", leaveMargin: \"1200px 0px\" });\n const tracked = useMemo(() => exposure.track(card.id, position), [exposure, card.id, position]);\n const ref = useCallback((element: HTMLLIElement | null) => { viewport(element); tracked(element); }, [viewport, tracked]);\n return <li ref={ref} data-release-key={card.id}>\n <ContentCard card={card} client={p.client} href={p.href} shape={p.shape} aspectRatio={p.aspectRatio} titlePosition={p.titlePosition} loadMedia={open && visible} groupKinds={p.groupKinds} chips={p.chips} filterEntity={p.filterEntity} entityStyle={p.entityStyle} entityLayout={p.entityLayout} metadata={p.metadata} showCounts={p.showCounts} tiers={p.tiers} labels={p.labels} owner={p.owner} ownerHref={p.ownerHref} decorate={p.decorate} onOpen={() => exposure.click(card.id, position)} />\n </li>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAM,KAAS,GAAe,MAAqB,OAAO,SAAS,CAAK,IAAI,KAAK,IAAI,GAAG,KAAK,MAAM,CAAK,CAAC,IAAI;AAM7G,SAAgB,EAAc,EAAE,UAAO,oBAAiB,IAAI,gBAAa,IAAI,qBAAkB,IAAO,kBAAe,GAAG,KAAyB;CAC/I,IAAM,IAAI,EAAY,GAChB,EAAE,WAAQ,cAAW,EAAgB,EAAE,MA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