@openrails/contentkit-ui 0.94.0 → 0.95.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 (48) hide show
  1. package/README.md +58 -1
  2. package/dist/client/discovery.d.ts +14 -1
  3. package/dist/client/discovery.js +27 -14
  4. package/dist/client/discovery.js.map +1 -1
  5. package/dist/client/generated/routes.d.ts +18 -5
  6. package/dist/client/generated/routes.js +39 -0
  7. package/dist/client/generated/routes.js.map +1 -1
  8. package/dist/client/generated/wire.d.ts +10 -0
  9. package/dist/client/generated/wire.js.map +1 -1
  10. package/dist/client/index.d.ts +1 -1
  11. package/dist/client.js +17 -17
  12. package/dist/components/content/card.d.ts +28 -6
  13. package/dist/components/content/card.js +158 -132
  14. package/dist/components/content/card.js.map +1 -1
  15. package/dist/components/content/daily-releases.d.ts +15 -0
  16. package/dist/components/content/daily-releases.js +173 -0
  17. package/dist/components/content/daily-releases.js.map +1 -0
  18. package/dist/components/content/grid.d.ts +14 -1
  19. package/dist/components/content/grid.js +75 -34
  20. package/dist/components/content/grid.js.map +1 -1
  21. package/dist/components/content/index.d.ts +4 -2
  22. package/dist/components/content/popular.d.ts +11 -0
  23. package/dist/components/content/popular.js +49 -0
  24. package/dist/components/content/popular.js.map +1 -0
  25. package/dist/index.js +22 -20
  26. package/dist/locales/discovery/de.js +4 -0
  27. package/dist/locales/discovery/de.js.map +1 -1
  28. package/dist/locales/discovery/en.d.ts +4 -0
  29. package/dist/locales/discovery/en.js +4 -0
  30. package/dist/locales/discovery/en.js.map +1 -1
  31. package/dist/locales/discovery/es.js +4 -0
  32. package/dist/locales/discovery/es.js.map +1 -1
  33. package/dist/locales/discovery/ja.js +4 -0
  34. package/dist/locales/discovery/ja.js.map +1 -1
  35. package/dist/locales/discovery/ko.js +4 -0
  36. package/dist/locales/discovery/ko.js.map +1 -1
  37. package/dist/locales/discovery/zh.js +4 -0
  38. package/dist/locales/discovery/zh.js.map +1 -1
  39. package/dist/locales/en.d.ts +4 -0
  40. package/dist/react/discovery.d.ts +12 -2
  41. package/dist/react/discovery.js +32 -23
  42. package/dist/react/discovery.js.map +1 -1
  43. package/dist/react/index.d.ts +1 -1
  44. package/dist/react/resources.js +11 -11
  45. package/dist/react/resources.js.map +1 -1
  46. package/dist/react.js +10 -10
  47. package/dist/styles.css +1 -1
  48. package/package.json +1 -1
package/README.md CHANGED
@@ -290,18 +290,75 @@ cover at 3:1.
290
290
 
291
291
  ### Card lists: decorations and locked cards
292
292
 
293
- Every card list (`ContentGrid`, `ContentListing`, `ContentRail`,
293
+ Every card list (`ContentGrid`, `ContentListing`, `ContentRail`, `DailyReleases`,
294
294
  `SearchResults`, `ContentHistory`) and `ContentCard` take `decorate(card)`:
295
295
  the host's badges, drawn over the cover (place them yourself; clicks reach
296
296
  the card, and click signals stay intact). Cards carry what badges need:
297
297
  `access.level` and `access.tiers` (the effective rule, the same for every
298
298
  reader), `version.has_audio`, `viewer.favorited` and `entities`.
299
299
 
300
+ Hosts can tailor the details without replacing the card. For example,
301
+ `metadata={{ languages: false, traits: ["colored"], duration: false }}` keeps
302
+ the page count and the Colored trait, and `showCounts={false}` hides reaction
303
+ totals. `groupKinds={["series"]}` selects series chips;
304
+ `filterEntity={(entity, kind) => ...}` filters them before the chip limit.
305
+ Defaults continue to show all normal metadata, entity chips and totals.
306
+
307
+ For a poster-style card, set `aspectRatio="182 / 260"`,
308
+ `titlePosition="cover"` and `entityStyle="text"`. The title is a single
309
+ accessible link over the cover's bottom gradient; entities remain clickable
310
+ without chip borders. The ratio overrides `shape` and also applies to loading
311
+ placeholders. These options work through every card grid, rail and daily feed;
312
+ omitting them retains the default ratio, title below the image and chips.
313
+ Plain-text entities sit directly below the cover, followed by other metadata.
314
+
315
+ ```tsx
316
+ <ContentGrid query={{ kind: "gallery" }}
317
+ aspectRatio="182 / 260" titlePosition="cover" entityStyle="text"
318
+ groupKinds={["series"]} showCounts={false}
319
+ metadata={{ languages: false, traits: ["colored"], duration: false }} />
320
+ ```
321
+
322
+ Set `grid={{ minCardWidth: 320, mobileColumns: 2 }}` for large covers in a fluid
323
+ grid: two columns on small screens, then as many columns as the available
324
+ width supports. This is supported by card grids, daily releases, Popular and
325
+ `ContentRail` previews; an unconfigured rail remains horizontal. There is no
326
+ desktop column ceiling, and other apps keep their existing layout by default.
327
+
300
328
  `ContentGrid` and `ContentListing` take `locked`: `show` (default) marks the
301
329
  cards the reader doesn't open, `hide` leaves them out, and `collapse` lists
302
330
  the open ones and puts the rest behind a counted toggle that loads them on
303
331
  opening (`useLockedCount` counts them).
304
332
 
333
+ ### Daily releases
334
+
335
+ ```tsx
336
+ <DailyReleases query={{ kind: "gallery", days: 10 }} initialVisible={30} />
337
+ ```
338
+
339
+ `DailyReleases` fetches all card metadata for the calendar window in one
340
+ `GET /releases` request. It uses the browser's IANA time zone unless
341
+ `query.time_zone` is supplied. Days appear newest first as keyboard-accessible
342
+ disclosures, with reduced-motion support. The initial card budget is shared
343
+ across days, newest first. Opening older days or choosing **Show more** reveals
344
+ already-fetched cards; it does not make another listing request.
345
+
346
+ Only revealed cards occupy the grid, and images/previews mount when those cards
347
+ enter the viewport. Collapsing a day removes its media. The standard card
348
+ properties (`href`, `decorate`, `groupKinds`, `tiers`, and so on) remain available.
349
+ For a custom layout, `useDailyReleases(query)` exposes the same shared read and
350
+ `client.discovery.releases(query)` exposes the typed request directly.
351
+
352
+ `published_within` filters a listing by publication age independently of its
353
+ ranking window. For example, `{ sort: "popular:7d", published_within: "7d" }`
354
+ ranks only content published during the past seven days.
355
+
356
+ `<PopularContentGrid query={{ kind: "gallery" }} />` supplies the 7-day,
357
+ 90-day, 365-day and all-time selector, keeps score and age windows matched,
358
+ and loads further pages as the reader scrolls. `period` and `onPeriodChange`
359
+ optionally keep its state in the host's URL. For a homepage preview, pass
360
+ `popularQuery("7d", { kind: "gallery", limit: 6 })` to a `ContentRail`'s `list`.
361
+
305
362
  ### MediaFolderEditor
306
363
 
307
364
  ```tsx
@@ -1,4 +1,4 @@
1
- import { ContentFilters, ContentFiltersUpdate, ContentPage, ExposureInput, RecentSearches, ReleaseDates, SignalInput, Typeahead } from './generated/wire.js';
1
+ import { ContentFilters, ContentFiltersUpdate, ContentPage, DailyReleases, ExposureInput, RecentSearches, ReleaseDates, SignalInput, Typeahead } from './generated/wire.js';
2
2
  import { Http } from './http.js';
3
3
  import { BrowserSearchHistory } from './browser-search-history.js';
4
4
  /** A popularity period. */
@@ -28,6 +28,8 @@ export interface ContentFilterQuery {
28
28
  attribute?: readonly string[];
29
29
  /** Published on this day (YYYY-MM-DD) or month (YYYY-MM). */
30
30
  released_on?: string;
31
+ /** Only contents published within this age window; independent of the popularity score window. */
32
+ published_within?: Period;
31
33
  /** IANA time zone of released_on and release dates; UTC by default. */
32
34
  tz?: string;
33
35
  /** The signed-in reader's unseen, in-progress or completed contents. */
@@ -52,6 +54,10 @@ export interface PageQuery {
52
54
  export type ContentQuery = ContentFilterQuery & ReaderQuery & CardQuery & PageQuery & {
53
55
  sort?: ListSort;
54
56
  };
57
+ export type PopularPeriod = "7d" | "90d" | "365d" | "all";
58
+ export type PopularQuery = Omit<ContentQuery, "sort" | "published_within">;
59
+ /** Match the popularity score window and publication age window. */
60
+ export declare function popularQuery(period?: PopularPeriod, filters?: PopularQuery): ContentQuery;
55
61
  export type SearchQuery = ContentFilterQuery & ReaderQuery & CardQuery & PageQuery & {
56
62
  q: string;
57
63
  sort?: "relevance" | ListSort;
@@ -71,6 +77,11 @@ export type RailQuery = ContentFilterQuery & ReaderQuery & CardQuery & {
71
77
  export type ReleaseDatesQuery = ContentFilterQuery & ReaderQuery & PageQuery & {
72
78
  by?: "month" | "day";
73
79
  };
80
+ /** Complete daily metadata for one calendar window, without pagination. */
81
+ export type DailyReleasesQuery = Omit<ContentFilterQuery, "released_on" | "tz"> & ReaderQuery & CardQuery & {
82
+ days?: number;
83
+ time_zone?: string;
84
+ };
74
85
  export type HistoryQuery = ReaderQuery & CardQuery & PageQuery & {
75
86
  kind?: string;
76
87
  status?: "seen" | "in_progress" | "completed";
@@ -114,6 +125,8 @@ export declare class DiscoveryClient {
114
125
  recommendations(q?: RailQuery, signal?: AbortSignal): Promise<ContentPage>;
115
126
  /** Per month or day, newest first: how many contents the reader's listing shows released then, and how many are free. */
116
127
  releaseDates(q?: ReleaseDatesQuery, signal?: AbortSignal): Promise<ReleaseDates>;
128
+ /** Every visible card in each day; opening or expanding a day needs no further request. */
129
+ releases(q?: DailyReleasesQuery, signal?: AbortSignal): Promise<DailyReleases>;
117
130
  contentFilters(language?: string, signal?: AbortSignal): Promise<ContentFilters>;
118
131
  /** Replaces the reader's filter settings; every read applies them. */
119
132
  setContentFilters(update: ContentFiltersUpdate, language?: string): Promise<ContentFilters>;
@@ -1,7 +1,14 @@
1
1
  import { call as e, routeURL as t } from "./route.js";
2
2
  import { browserSearchHistory as n } from "./browser-search-history.js";
3
3
  //#region src/client/discovery.ts
4
- var r = /* @__PURE__ */ new Set([
4
+ function r(e = "7d", t = {}) {
5
+ return {
6
+ ...t,
7
+ sort: `popular:${e}`,
8
+ published_within: e
9
+ };
10
+ }
11
+ var i = /* @__PURE__ */ new Set([
5
12
  "groups",
6
13
  "exclude_groups",
7
14
  "creators",
@@ -11,12 +18,12 @@ var r = /* @__PURE__ */ new Set([
11
18
  "card_entities",
12
19
  "entity_kinds"
13
20
  ]);
14
- function i(e) {
21
+ function a(e) {
15
22
  let t = {};
16
- for (let [n, i] of Object.entries(e)) t[n] = r.has(n) && Array.isArray(i) ? i.length ? i.join(",") : void 0 : i;
23
+ for (let [n, r] of Object.entries(e)) t[n] = i.has(n) && Array.isArray(r) ? r.length ? r.join(",") : void 0 : r;
17
24
  return t;
18
25
  }
19
- var a = class {
26
+ var o = class {
20
27
  http;
21
28
  browserSearches;
22
29
  constructor(e) {
@@ -24,16 +31,16 @@ var a = class {
24
31
  }
25
32
  list(t = {}, n) {
26
33
  return e(this.http, "GET", "/contents", {
27
- query: i(t),
34
+ query: a(t),
28
35
  signal: n
29
36
  });
30
37
  }
31
38
  async search(t, n) {
32
- let r = t.cursor ? null : this.http.captureChanges(), a = await e(this.http, "GET", "/search", {
33
- query: i(t),
39
+ let r = t.cursor ? null : this.http.captureChanges(), i = await e(this.http, "GET", "/search", {
40
+ query: a(t),
34
41
  signal: n
35
42
  });
36
- return r?.({ type: "searches.changed" }), a;
43
+ return r?.({ type: "searches.changed" }), i;
37
44
  }
38
45
  recentSearches(t = {}, n) {
39
46
  return e(this.http, "GET", "/me/searches", {
@@ -47,26 +54,32 @@ var a = class {
47
54
  }
48
55
  typeahead(t, n) {
49
56
  return e(this.http, "GET", "/typeahead", {
50
- query: i(t),
57
+ query: a(t),
51
58
  signal: n
52
59
  });
53
60
  }
54
61
  similar(t, n = {}, r) {
55
62
  return e(this.http, "GET", "/contents/{id}/similar", {
56
63
  params: { id: t },
57
- query: i(n),
64
+ query: a(n),
58
65
  signal: r
59
66
  });
60
67
  }
61
68
  recommendations(t = {}, n) {
62
69
  return e(this.http, "GET", "/recommendations", {
63
- query: i(t),
70
+ query: a(t),
64
71
  signal: n
65
72
  });
66
73
  }
67
74
  releaseDates(t = {}, n) {
68
75
  return e(this.http, "GET", "/release-dates", {
69
- query: i(t),
76
+ query: a(t),
77
+ signal: n
78
+ });
79
+ }
80
+ releases(t = {}, n) {
81
+ return e(this.http, "GET", "/releases", {
82
+ query: a(t),
70
83
  signal: n
71
84
  });
72
85
  }
@@ -86,7 +99,7 @@ var a = class {
86
99
  }
87
100
  history(t = {}, n) {
88
101
  return e(this.http, "GET", "/me/history", {
89
- query: i(t),
102
+ query: a(t),
90
103
  signal: n
91
104
  });
92
105
  }
@@ -116,6 +129,6 @@ var a = class {
116
129
  }
117
130
  };
118
131
  //#endregion
119
- export { a as DiscoveryClient, i as query };
132
+ export { o as DiscoveryClient, r as popularQuery, a as query };
120
133
 
121
134
  //# sourceMappingURL=discovery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.js","names":[],"sources":["../../src/client/discovery.ts"],"sourcesContent":["import type {\n ContentFilters,\n ContentFiltersUpdate,\n ContentPage,\n ExposureInput,\n Exposures,\n RecentSearches,\n ReleaseDates,\n SignalInput,\n Signals,\n Typeahead,\n} from \"./generated/wire.js\";\nimport type { Http } from \"./http.js\";\nimport { call, routeURL } from \"./route.js\";\nimport { browserSearchHistory, type BrowserSearchHistory } from \"./browser-search-history.js\";\n\n/** A popularity period. */\nexport type Period = \"7d\" | \"30d\" | \"90d\" | \"365d\" | \"all\";\n/** A list's order; position orders by the first of `groups` (an ordered group). */\nexport type ListSort = \"newest\" | \"oldest\" | \"title\" | \"popular\" | `popular:${Period}` | \"top_rated\" | `top_rated:${Period}` | \"most_favorited\" | \"most_viewed\" | \"position\" | \"random\";\n/** How locked contents list: marked (lock, the default) or left out (hide). */\nexport type AccessMode = \"lock\" | \"hide\";\n\n/** Which contents a list holds. */\nexport interface ContentFilterQuery {\n kind?: string;\n /** Group ids every listed version is in. */\n groups?: readonly string[];\n /** Group ids no listed version is in. */\n exclude_groups?: readonly string[];\n /** Only contents this group owns: a channel's feed. */\n owner_group?: string;\n /** User ids: only contents one of them is credited on. */\n creators?: readonly string[];\n /** public (anyone opens it now) or the level it stays locked at. */\n access?: readonly (\"public\" | \"tier\" | \"group\" | \"ppv\" | \"group_ppv\")[];\n /** Only contents locked behind one of these tiers. */\n tiers?: readonly string[];\n /** Version traits every listed version has. */\n traits?: readonly string[];\n /** \"name:value\" of the kind's filterable attributes. */\n attribute?: readonly string[];\n /** Published on this day (YYYY-MM-DD) or month (YYYY-MM). */\n released_on?: string;\n /** IANA time zone of released_on and release dates; UTC by default. */\n tz?: string;\n /** The signed-in reader's unseen, in-progress or completed contents. */\n view_status?: \"unseen\" | \"in_progress\" | \"completed\";\n}\n\n/** How a list reads to its reader. */\nexport interface ReaderQuery {\n /** Only content with a live version in this language. */\n language?: string;\n /** Titles, names and paths in this language, and each card's preferred version's; language by default. */\n display_language?: string;\n mode?: AccessMode;\n}\n\n/** The group kinds cards name; every kind with a page by default. */\nexport interface CardQuery {\n card_entities?: readonly string[];\n}\n\nexport interface PageQuery {\n cursor?: string;\n limit?: number;\n}\n\nexport type ContentQuery = ContentFilterQuery & ReaderQuery & CardQuery & PageQuery & { sort?: ListSort };\nexport type SearchQuery = ContentFilterQuery &\n ReaderQuery &\n CardQuery &\n PageQuery & {\n q: string;\n sort?: \"relevance\" | ListSort;\n personalize?: boolean;\n /** Explicit legacy server-side anonymous history. Omit for public search without server history. */\n session?: string;\n };\nexport interface RecentSearchesQuery {\n /** Explicit legacy server-side anonymous history; no anonymous session is created by default. */\n session?: string;\n /** 10 by default, at most 100. */\n limit?: number;\n}\nexport type RailQuery = ContentFilterQuery & ReaderQuery & CardQuery & { limit?: number };\nexport type ReleaseDatesQuery = ContentFilterQuery & ReaderQuery & PageQuery & { by?: \"month\" | \"day\" };\nexport type HistoryQuery = ReaderQuery & CardQuery & PageQuery & { kind?: string; status?: \"seen\" | \"in_progress\" | \"completed\" };\nexport interface TypeaheadQuery extends ReaderQuery {\n q: string;\n /** Only contents of this kind. */\n kind?: string;\n /** The group kinds suggested; every kind with a page by default. */\n entity_kinds?: readonly string[];\n /** Per section: 8 by default, at most 20. */\n limit?: number;\n}\n\n// Comma-joined list parameters; `attribute` repeats instead.\nconst LISTS = new Set([\"groups\", \"exclude_groups\", \"creators\", \"access\", \"tiers\", \"traits\", \"card_entities\", \"entity_kinds\"]);\n\n/** A query with its list parameters comma-joined, as discovery routes read them. */\nexport function query(q: object): Record<string, string | number | boolean | readonly string[] | undefined> {\n const out: Record<string, string | number | boolean | readonly string[] | undefined> = {};\n for (const [k, v] of Object.entries(q)) out[k] = LISTS.has(k) && Array.isArray(v) ? (v.length ? v.join(\",\") : undefined) : v;\n return out;\n}\n\n/**\n * Discovery: lists, search, typeahead, similar and recommended contents,\n * release dates, the reader's content filters and history, signals and exposures.\n */\nexport class DiscoveryClient {\n /** Local anonymous history, isolated from authenticated server history. */\n readonly browserSearches: BrowserSearchHistory;\n\n constructor(private readonly http: Http) {\n this.browserSearches = browserSearchHistory(http.mount(\"discovery\"));\n }\n\n /** Contents as cards, one per content item with the version that fits the reader. */\n list(q: ContentQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents\", { query: query(q) as never, signal });\n }\n /** A first page is kept among the reader's recent searches. */\n async search(q: SearchQuery, signal?: AbortSignal): Promise<ContentPage> {\n const emit = q.cursor ? null : this.http.captureChanges();\n const out: ContentPage = await call(this.http, \"GET\", \"/search\", { query: query(q) as never, signal });\n emit?.({ type: \"searches.changed\" });\n return out;\n }\n /** The reader's recent searches, newest first, since they last cleared them. */\n recentSearches(q: RecentSearchesQuery = {}, signal?: AbortSignal): Promise<RecentSearches> {\n return call(this.http, \"GET\", \"/me/searches\", { query: q, signal });\n }\n /** Clears one recent search, or all of them. */\n async clearSearches(o: { query?: string; session?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/searches\", { query: o });\n emit({ type: \"searches.changed\" });\n }\n /** Contents and groups while the reader types. */\n typeahead(q: TypeaheadQuery, signal?: AbortSignal): Promise<Typeahead> {\n return call(this.http, \"GET\", \"/typeahead\", { query: query(q) as never, signal });\n }\n /** Contents like one, of its kind unless q.kind names another. */\n similar(id: string, q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents/{id}/similar\", { params: { id }, query: query(q) as never, signal });\n }\n /** For the signed-in reader. */\n recommendations(q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/recommendations\", { query: query(q) as never, signal });\n }\n /** Per month or day, newest first: how many contents the reader's listing shows released then, and how many are free. */\n releaseDates(q: ReleaseDatesQuery = {}, signal?: AbortSignal): Promise<ReleaseDates> {\n return call(this.http, \"GET\", \"/release-dates\", { query: query(q) as never, signal });\n }\n async contentFilters(language?: string, signal?: AbortSignal): Promise<ContentFilters> {\n const result = await this.http.request<ContentFilters>(routeURL(this.http, \"GET\", \"/content-filters\", { query: { language } }), { signal, guestPreferences: false });\n this.http.acceptGuestFilters(result.filters);\n return result;\n }\n /** Replaces the reader's filter settings; every read applies them. */\n async setContentFilters(update: ContentFiltersUpdate, language?: string): Promise<ContentFilters> {\n const emit = this.http.captureChanges();\n const out: ContentFilters = await call(this.http, \"PUT\", \"/me/content-filters\", { query: { language }, body: update });\n emit({ type: \"contentFilters.changed\" });\n return out;\n }\n /** What the reader engaged with, most recent first. */\n history(q: HistoryQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/me/history\", { query: query(q) as never, signal });\n }\n /** Erases the reader's history: of one content item, one kind or everything. */\n async forgetHistory(o: { kind?: string; content_id?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/history\", { query: o });\n emit({ type: \"history.changed\" });\n }\n /** Views and clicks; signed out, of the session named. */\n signals(signals: SignalInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Signals = { session, signals };\n return call(this.http, \"POST\", \"/signals\", { body, keepalive: o.keepalive });\n }\n /** Result lists served, rendered or shown, for click attribution. */\n exposures(exposures: ExposureInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Exposures = { session, exposures };\n return call(this.http, \"POST\", \"/exposures\", { body, keepalive: o.keepalive });\n }\n}\n"],"mappings":";;;AAoGA,IAAM,oBAAQ,IAAI,IAAI;CAAC;CAAU;CAAkB;CAAY;CAAU;CAAS;CAAU;CAAiB;AAAc,CAAC;AAG5H,SAAgB,EAAM,GAAsF;CAC1G,IAAM,IAAiF,CAAC;CACxF,KAAK,IAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GAAG,EAAI,KAAK,EAAM,IAAI,CAAC,KAAK,MAAM,QAAQ,CAAC,IAAK,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,KAAA,IAAa;CAC3H,OAAO;AACT;AAMA,IAAa,IAAb,MAA6B;C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C/E;AACF"}
1
+ {"version":3,"file":"discovery.js","names":[],"sources":["../../src/client/discovery.ts"],"sourcesContent":["import type {\n ContentFilters,\n ContentFiltersUpdate,\n ContentPage,\n DailyReleases,\n ExposureInput,\n Exposures,\n RecentSearches,\n ReleaseDates,\n SignalInput,\n Signals,\n Typeahead,\n} from \"./generated/wire.js\";\nimport type { Http } from \"./http.js\";\nimport { call, routeURL } from \"./route.js\";\nimport { browserSearchHistory, type BrowserSearchHistory } from \"./browser-search-history.js\";\n\n/** A popularity period. */\nexport type Period = \"7d\" | \"30d\" | \"90d\" | \"365d\" | \"all\";\n/** A list's order; position orders by the first of `groups` (an ordered group). */\nexport type ListSort = \"newest\" | \"oldest\" | \"title\" | \"popular\" | `popular:${Period}` | \"top_rated\" | `top_rated:${Period}` | \"most_favorited\" | \"most_viewed\" | \"position\" | \"random\";\n/** How locked contents list: marked (lock, the default) or left out (hide). */\nexport type AccessMode = \"lock\" | \"hide\";\n\n/** Which contents a list holds. */\nexport interface ContentFilterQuery {\n kind?: string;\n /** Group ids every listed version is in. */\n groups?: readonly string[];\n /** Group ids no listed version is in. */\n exclude_groups?: readonly string[];\n /** Only contents this group owns: a channel's feed. */\n owner_group?: string;\n /** User ids: only contents one of them is credited on. */\n creators?: readonly string[];\n /** public (anyone opens it now) or the level it stays locked at. */\n access?: readonly (\"public\" | \"tier\" | \"group\" | \"ppv\" | \"group_ppv\")[];\n /** Only contents locked behind one of these tiers. */\n tiers?: readonly string[];\n /** Version traits every listed version has. */\n traits?: readonly string[];\n /** \"name:value\" of the kind's filterable attributes. */\n attribute?: readonly string[];\n /** Published on this day (YYYY-MM-DD) or month (YYYY-MM). */\n released_on?: string;\n /** Only contents published within this age window; independent of the popularity score window. */\n published_within?: Period;\n /** IANA time zone of released_on and release dates; UTC by default. */\n tz?: string;\n /** The signed-in reader's unseen, in-progress or completed contents. */\n view_status?: \"unseen\" | \"in_progress\" | \"completed\";\n}\n\n/** How a list reads to its reader. */\nexport interface ReaderQuery {\n /** Only content with a live version in this language. */\n language?: string;\n /** Titles, names and paths in this language, and each card's preferred version's; language by default. */\n display_language?: string;\n mode?: AccessMode;\n}\n\n/** The group kinds cards name; every kind with a page by default. */\nexport interface CardQuery {\n card_entities?: readonly string[];\n}\n\nexport interface PageQuery {\n cursor?: string;\n limit?: number;\n}\n\nexport type ContentQuery = ContentFilterQuery & ReaderQuery & CardQuery & PageQuery & { sort?: ListSort };\nexport type PopularPeriod = \"7d\" | \"90d\" | \"365d\" | \"all\";\nexport type PopularQuery = Omit<ContentQuery, \"sort\" | \"published_within\">;\n\n/** Match the popularity score window and publication age window. */\nexport function popularQuery(period: PopularPeriod = \"7d\", filters: PopularQuery = {}): ContentQuery {\n return { ...filters, sort: `popular:${period}`, published_within: period };\n}\n\nexport type SearchQuery = ContentFilterQuery &\n ReaderQuery &\n CardQuery &\n PageQuery & {\n q: string;\n sort?: \"relevance\" | ListSort;\n personalize?: boolean;\n /** Explicit legacy server-side anonymous history. Omit for public search without server history. */\n session?: string;\n };\nexport interface RecentSearchesQuery {\n /** Explicit legacy server-side anonymous history; no anonymous session is created by default. */\n session?: string;\n /** 10 by default, at most 100. */\n limit?: number;\n}\nexport type RailQuery = ContentFilterQuery & ReaderQuery & CardQuery & { limit?: number };\nexport type ReleaseDatesQuery = ContentFilterQuery & ReaderQuery & PageQuery & { by?: \"month\" | \"day\" };\n/** Complete daily metadata for one calendar window, without pagination. */\nexport type DailyReleasesQuery = Omit<ContentFilterQuery, \"released_on\" | \"tz\"> & ReaderQuery & CardQuery & { days?: number; time_zone?: string };\nexport type HistoryQuery = ReaderQuery & CardQuery & PageQuery & { kind?: string; status?: \"seen\" | \"in_progress\" | \"completed\" };\nexport interface TypeaheadQuery extends ReaderQuery {\n q: string;\n /** Only contents of this kind. */\n kind?: string;\n /** The group kinds suggested; every kind with a page by default. */\n entity_kinds?: readonly string[];\n /** Per section: 8 by default, at most 20. */\n limit?: number;\n}\n\n// Comma-joined list parameters; `attribute` repeats instead.\nconst LISTS = new Set([\"groups\", \"exclude_groups\", \"creators\", \"access\", \"tiers\", \"traits\", \"card_entities\", \"entity_kinds\"]);\n\n/** A query with its list parameters comma-joined, as discovery routes read them. */\nexport function query(q: object): Record<string, string | number | boolean | readonly string[] | undefined> {\n const out: Record<string, string | number | boolean | readonly string[] | undefined> = {};\n for (const [k, v] of Object.entries(q)) out[k] = LISTS.has(k) && Array.isArray(v) ? (v.length ? v.join(\",\") : undefined) : v;\n return out;\n}\n\n/**\n * Discovery: lists, search, typeahead, similar and recommended contents,\n * release dates, the reader's content filters and history, signals and exposures.\n */\nexport class DiscoveryClient {\n /** Local anonymous history, isolated from authenticated server history. */\n readonly browserSearches: BrowserSearchHistory;\n\n constructor(private readonly http: Http) {\n this.browserSearches = browserSearchHistory(http.mount(\"discovery\"));\n }\n\n /** Contents as cards, one per content item with the version that fits the reader. */\n list(q: ContentQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents\", { query: query(q) as never, signal });\n }\n /** A first page is kept among the reader's recent searches. */\n async search(q: SearchQuery, signal?: AbortSignal): Promise<ContentPage> {\n const emit = q.cursor ? null : this.http.captureChanges();\n const out: ContentPage = await call(this.http, \"GET\", \"/search\", { query: query(q) as never, signal });\n emit?.({ type: \"searches.changed\" });\n return out;\n }\n /** The reader's recent searches, newest first, since they last cleared them. */\n recentSearches(q: RecentSearchesQuery = {}, signal?: AbortSignal): Promise<RecentSearches> {\n return call(this.http, \"GET\", \"/me/searches\", { query: q, signal });\n }\n /** Clears one recent search, or all of them. */\n async clearSearches(o: { query?: string; session?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/searches\", { query: o });\n emit({ type: \"searches.changed\" });\n }\n /** Contents and groups while the reader types. */\n typeahead(q: TypeaheadQuery, signal?: AbortSignal): Promise<Typeahead> {\n return call(this.http, \"GET\", \"/typeahead\", { query: query(q) as never, signal });\n }\n /** Contents like one, of its kind unless q.kind names another. */\n similar(id: string, q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents/{id}/similar\", { params: { id }, query: query(q) as never, signal });\n }\n /** For the signed-in reader. */\n recommendations(q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/recommendations\", { query: query(q) as never, signal });\n }\n /** Per month or day, newest first: how many contents the reader's listing shows released then, and how many are free. */\n releaseDates(q: ReleaseDatesQuery = {}, signal?: AbortSignal): Promise<ReleaseDates> {\n return call(this.http, \"GET\", \"/release-dates\", { query: query(q) as never, signal });\n }\n /** Every visible card in each day; opening or expanding a day needs no further request. */\n releases(q: DailyReleasesQuery = {}, signal?: AbortSignal): Promise<DailyReleases> {\n return call(this.http, \"GET\", \"/releases\", { query: query(q) as never, signal });\n }\n async contentFilters(language?: string, signal?: AbortSignal): Promise<ContentFilters> {\n const result = await this.http.request<ContentFilters>(routeURL(this.http, \"GET\", \"/content-filters\", { query: { language } }), { signal, guestPreferences: false });\n this.http.acceptGuestFilters(result.filters);\n return result;\n }\n /** Replaces the reader's filter settings; every read applies them. */\n async setContentFilters(update: ContentFiltersUpdate, language?: string): Promise<ContentFilters> {\n const emit = this.http.captureChanges();\n const out: ContentFilters = await call(this.http, \"PUT\", \"/me/content-filters\", { query: { language }, body: update });\n emit({ type: \"contentFilters.changed\" });\n return out;\n }\n /** What the reader engaged with, most recent first. */\n history(q: HistoryQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/me/history\", { query: query(q) as never, signal });\n }\n /** Erases the reader's history: of one content item, one kind or everything. */\n async forgetHistory(o: { kind?: string; content_id?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/history\", { query: o });\n emit({ type: \"history.changed\" });\n }\n /** Views and clicks; signed out, of the session named. */\n signals(signals: SignalInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Signals = { session, signals };\n return call(this.http, \"POST\", \"/signals\", { body, keepalive: o.keepalive });\n }\n /** Result lists served, rendered or shown, for click attribution. */\n exposures(exposures: ExposureInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Exposures = { session, exposures };\n return call(this.http, \"POST\", \"/exposures\", { body, keepalive: o.keepalive });\n }\n}\n"],"mappings":";;;AA6EA,SAAgB,EAAa,IAAwB,MAAM,IAAwB,CAAC,GAAiB;CACnG,OAAO;EAAE,GAAG;EAAS,MAAM,WAAW;EAAU,kBAAkB;CAAO;AAC3E;AAkCA,IAAM,oBAAQ,IAAI,IAAI;CAAC;CAAU;CAAkB;CAAY;CAAU;CAAS;CAAU;CAAiB;AAAc,CAAC;AAG5H,SAAgB,EAAM,GAAsF;CAC1G,IAAM,IAAiF,CAAC;CACxF,KAAK,IAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GAAG,EAAI,KAAK,EAAM,IAAI,CAAC,KAAK,MAAM,QAAQ,CAAC,IAAK,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,KAAA,IAAa;CAC3H,OAAO;AACT;AAMA,IAAa,IAAb,MAA6B;CAIE;CAF7B;CAEA,YAAY,GAA6B;EACvC,AAD2B,KAAA,OAAA,GAC3B,KAAK,kBAAkB,EAAqB,EAAK,MAAM,WAAW,CAAC;CACrE;CAGA,KAAK,IAAkB,CAAC,GAAG,GAA4C;EACrE,OAAO,EAAK,KAAK,MAAM,OAAO,aAAa;GAAE,OAAO,EAAM,CAAC;GAAY;EAAO,CAAC;CACjF;CAEA,MAAM,OAAO,GAAgB,GAA4C;EACvE,IAAM,IAAO,EAAE,SAAS,OAAO,KAAK,KAAK,eAAe,GAClD,IAAmB,MAAM,EAAK,KAAK,MAAM,OAAO,WAAW;GAAE,OAAO,EAAM,CAAC;GAAY;EAAO,CAAC;EAErG,OADA,IAAO,EAAE,MAAM,mBAAmB,CAAC,GAC5B;CACT;CAEA,eAAe,IAAyB,CAAC,GAAG,GAA+C;EACzF,OAAO,EA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,KAAK,eAAe,GAChC,IAAsB,MAAM,EAAK,KAAK,MAAM,OAAO,uBAAuB;GAAE,OAAO,EAAE,YAAS;GAAG,MAAM;EAAO,CAAC;EAErH,OADA,EAAK,EAAE,MAAM,yBAAyB,CAAC,GAChC;CACT;CAEA,QAAQ,IAAkB,CAAC,GAAG,GAA4C;EACxE,OAAO,EAAK,KAAK,MAAM,OAAO,eAAe;GAAE,OAAO,EAAM,CAAC;GAAY;EAAO,CAAC;CACnF;CAEA,MAAM,cAAc,IAA4C,CAAC,GAAkB;EACjF,IAAM,IAAO,KAAK,KAAK,eAAe;EAEtC,AADA,MAAM,EAAK,KAAK,MAAM,UAAU,eAAe,EAAE,OAAO,EAAE,CAAC,GAC3D,EAAK,EAAE,MAAM,kBAAkB,CAAC;CAClC;CAEA,QAAQ,GAAwB,GAAkB,IAA6B,CAAC,GAAkB;EAChG,IAAM,IAAgB;GAAE;GAAS;EAAQ;EACzC,OAAO,EAAK,KAAK,MAAM,QAAQ,YAAY;GAAE;GAAM,WAAW,EAAE;EAAU,CAAC;CAC7E;CAEA,UAAU,GAA4B,GAAkB,IAA6B,CAAC,GAAkB;EACtG,IAAM,IAAkB;GAAE;GAAS;EAAU;EAC7C,OAAO,EAAK,KAAK,MAAM,QAAQ,cAAc;GAAE;GAAM,WAAW,EAAE;EAAU,CAAC;CAC/E;AACF"}
@@ -1826,13 +1826,26 @@ export declare const CONTENTKIT_ROUTES: readonly [{
1826
1826
  };
1827
1827
  readonly errors: readonly [];
1828
1828
  readonly errorSets: readonly ["module:offers", "auth", "request"];
1829
+ }, {
1830
+ readonly method: "GET";
1831
+ readonly module: "discovery";
1832
+ readonly path: "/releases";
1833
+ readonly auth: "public";
1834
+ readonly permission: null;
1835
+ readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "published_within", "view_status", "language", "display_language", "mode", "card_entities", "days", "time_zone"];
1836
+ readonly request: null;
1837
+ readonly responses: {
1838
+ readonly 200: "DailyReleases";
1839
+ };
1840
+ readonly errors: readonly [];
1841
+ readonly errorSets: readonly ["module:discovery", "auth", "request"];
1829
1842
  }, {
1830
1843
  readonly method: "GET";
1831
1844
  readonly module: "discovery";
1832
1845
  readonly path: "/contents";
1833
1846
  readonly auth: "public";
1834
1847
  readonly permission: null;
1835
- readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "cursor", "limit"];
1848
+ readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "cursor", "limit"];
1836
1849
  readonly request: null;
1837
1850
  readonly responses: {
1838
1851
  readonly 200: "ContentPage";
@@ -1845,7 +1858,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
1845
1858
  readonly path: "/search";
1846
1859
  readonly auth: "public";
1847
1860
  readonly permission: null;
1848
- readonly query: readonly ["q", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "personalize", "session", "cursor", "limit"];
1861
+ readonly query: readonly ["q", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "personalize", "session", "cursor", "limit"];
1849
1862
  readonly request: null;
1850
1863
  readonly responses: {
1851
1864
  readonly 200: "ContentPage";
@@ -1871,7 +1884,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
1871
1884
  readonly path: "/contents/{id}/similar";
1872
1885
  readonly auth: "public";
1873
1886
  readonly permission: null;
1874
- readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
1887
+ readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
1875
1888
  readonly request: null;
1876
1889
  readonly responses: {
1877
1890
  readonly 200: "ContentPage";
@@ -1884,7 +1897,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
1884
1897
  readonly path: "/recommendations";
1885
1898
  readonly auth: "user";
1886
1899
  readonly permission: null;
1887
- readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
1900
+ readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
1888
1901
  readonly request: null;
1889
1902
  readonly responses: {
1890
1903
  readonly 200: "ContentPage";
@@ -1897,7 +1910,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
1897
1910
  readonly path: "/release-dates";
1898
1911
  readonly auth: "public";
1899
1912
  readonly permission: null;
1900
- readonly query: readonly ["by", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "cursor", "limit"];
1913
+ readonly query: readonly ["by", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "cursor", "limit"];
1901
1914
  readonly request: null;
1902
1915
  readonly responses: {
1903
1916
  readonly 200: "ReleaseDates";
@@ -2529,6 +2529,40 @@ var e = {
2529
2529
  "request"
2530
2530
  ]
2531
2531
  },
2532
+ {
2533
+ method: "GET",
2534
+ module: "discovery",
2535
+ path: "/releases",
2536
+ auth: "public",
2537
+ permission: null,
2538
+ query: [
2539
+ "kind",
2540
+ "groups",
2541
+ "exclude_groups",
2542
+ "owner_group",
2543
+ "creators",
2544
+ "access",
2545
+ "tiers",
2546
+ "traits",
2547
+ "attribute",
2548
+ "published_within",
2549
+ "view_status",
2550
+ "language",
2551
+ "display_language",
2552
+ "mode",
2553
+ "card_entities",
2554
+ "days",
2555
+ "time_zone"
2556
+ ],
2557
+ request: null,
2558
+ responses: { 200: "DailyReleases" },
2559
+ errors: [],
2560
+ errorSets: [
2561
+ "module:discovery",
2562
+ "auth",
2563
+ "request"
2564
+ ]
2565
+ },
2532
2566
  {
2533
2567
  method: "GET",
2534
2568
  module: "discovery",
@@ -2546,6 +2580,7 @@ var e = {
2546
2580
  "traits",
2547
2581
  "attribute",
2548
2582
  "released_on",
2583
+ "published_within",
2549
2584
  "tz",
2550
2585
  "view_status",
2551
2586
  "language",
@@ -2583,6 +2618,7 @@ var e = {
2583
2618
  "traits",
2584
2619
  "attribute",
2585
2620
  "released_on",
2621
+ "published_within",
2586
2622
  "tz",
2587
2623
  "view_status",
2588
2624
  "language",
@@ -2645,6 +2681,7 @@ var e = {
2645
2681
  "traits",
2646
2682
  "attribute",
2647
2683
  "released_on",
2684
+ "published_within",
2648
2685
  "tz",
2649
2686
  "view_status",
2650
2687
  "language",
@@ -2679,6 +2716,7 @@ var e = {
2679
2716
  "traits",
2680
2717
  "attribute",
2681
2718
  "released_on",
2719
+ "published_within",
2682
2720
  "tz",
2683
2721
  "view_status",
2684
2722
  "language",
@@ -2714,6 +2752,7 @@ var e = {
2714
2752
  "traits",
2715
2753
  "attribute",
2716
2754
  "released_on",
2755
+ "published_within",
2717
2756
  "tz",
2718
2757
  "view_status",
2719
2758
  "language",