@openrails/contentkit-ui 0.86.0 → 0.87.0-rc.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 (89) hide show
  1. package/README.md +21 -3
  2. package/dist/client/content/types.d.ts +4 -2
  3. package/dist/client/content/types.js.map +1 -1
  4. package/dist/client/discovery.js +3 -0
  5. package/dist/client/discovery.js.map +1 -1
  6. package/dist/client/errors.d.ts +6 -0
  7. package/dist/client/errors.js +6 -2
  8. package/dist/client/errors.js.map +1 -1
  9. package/dist/client/gallery.d.ts +3 -5
  10. package/dist/client/gallery.js +16 -20
  11. package/dist/client/gallery.js.map +1 -1
  12. package/dist/client/generated/error-codes.d.ts +1 -1
  13. package/dist/client/generated/error-codes.js +8 -0
  14. package/dist/client/generated/error-codes.js.map +1 -1
  15. package/dist/client/generated/routes.d.ts +15 -2
  16. package/dist/client/generated/routes.js +27 -2
  17. package/dist/client/generated/routes.js.map +1 -1
  18. package/dist/client/generated/wire.d.ts +32 -11
  19. package/dist/client/generated/wire.js.map +1 -1
  20. package/dist/client/media/windows.js +1 -1
  21. package/dist/client/media/windows.js.map +1 -1
  22. package/dist/client/versions.d.ts +6 -4
  23. package/dist/client/versions.js +24 -26
  24. package/dist/client/versions.js.map +1 -1
  25. package/dist/components/content/card.d.ts +5 -3
  26. package/dist/components/content/card.js +131 -109
  27. package/dist/components/content/card.js.map +1 -1
  28. package/dist/components/content/download-button.d.ts +26 -0
  29. package/dist/components/content/download-button.js +51 -0
  30. package/dist/components/content/download-button.js.map +1 -0
  31. package/dist/components/content/grid.d.ts +8 -1
  32. package/dist/components/content/grid.js +125 -76
  33. package/dist/components/content/grid.js.map +1 -1
  34. package/dist/components/content/index.d.ts +2 -1
  35. package/dist/components/content/listing.d.ts +3 -1
  36. package/dist/components/content/listing.js.map +1 -1
  37. package/dist/components/media-gallery.d.ts +1 -4
  38. package/dist/components/media-gallery.js +19 -34
  39. package/dist/components/media-gallery.js.map +1 -1
  40. package/dist/components/social/comments.js +1 -1
  41. package/dist/components/social/comments.js.map +1 -1
  42. package/dist/components/social/engagement.d.ts +2 -1
  43. package/dist/components/social/engagement.js +5 -3
  44. package/dist/components/social/engagement.js.map +1 -1
  45. package/dist/index.js +10 -9
  46. package/dist/locales/de.js +13 -2
  47. package/dist/locales/de.js.map +1 -1
  48. package/dist/locales/discovery/de.js +3 -0
  49. package/dist/locales/discovery/de.js.map +1 -1
  50. package/dist/locales/discovery/en.d.ts +3 -0
  51. package/dist/locales/discovery/en.js +3 -0
  52. package/dist/locales/discovery/en.js.map +1 -1
  53. package/dist/locales/discovery/es.js +3 -0
  54. package/dist/locales/discovery/es.js.map +1 -1
  55. package/dist/locales/discovery/ja.js +3 -0
  56. package/dist/locales/discovery/ja.js.map +1 -1
  57. package/dist/locales/discovery/ko.js +3 -0
  58. package/dist/locales/discovery/ko.js.map +1 -1
  59. package/dist/locales/discovery/zh.js +3 -0
  60. package/dist/locales/discovery/zh.js.map +1 -1
  61. package/dist/locales/en.d.ts +16 -2
  62. package/dist/locales/en.js +13 -2
  63. package/dist/locales/en.js.map +1 -1
  64. package/dist/locales/es.js +13 -2
  65. package/dist/locales/es.js.map +1 -1
  66. package/dist/locales/ja.js +13 -2
  67. package/dist/locales/ja.js.map +1 -1
  68. package/dist/locales/ko.js +13 -2
  69. package/dist/locales/ko.js.map +1 -1
  70. package/dist/locales/zh.js +13 -2
  71. package/dist/locales/zh.js.map +1 -1
  72. package/dist/react/comments.d.ts +1 -1
  73. package/dist/react/comments.js +3 -2
  74. package/dist/react/comments.js.map +1 -1
  75. package/dist/react/context.d.ts +1 -1
  76. package/dist/react/context.js.map +1 -1
  77. package/dist/react/discovery.d.ts +11 -0
  78. package/dist/react/discovery.js +49 -30
  79. package/dist/react/discovery.js.map +1 -1
  80. package/dist/react/engagement.d.ts +6 -2
  81. package/dist/react/engagement.js +2 -6
  82. package/dist/react/engagement.js.map +1 -1
  83. package/dist/react/index.d.ts +2 -2
  84. package/dist/react/versions.d.ts +25 -5
  85. package/dist/react/versions.js +58 -37
  86. package/dist/react/versions.js.map +1 -1
  87. package/dist/react.js +9 -9
  88. package/dist/styles.css +1 -1
  89. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","names":[],"sources":["../../src/react/versions.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { ContentKitClient } from \"../client/client.js\";\nimport { toContentKitError, type ContentKitError } from \"../client/errors.js\";\nimport type { Pending, PlanSegment, ReaderPlan } from \"../client/generated/wire.js\";\nimport { isPending } from \"../client/versions.js\";\nimport { useMediaRead, type ReadWindow } from \"./read.js\";\nimport { keyOf, useContentScope, useResource } from \"./use-resource.js\";\n\nexport interface UseReaderPlan {\n /** null while loading, pending or failed. */\n plan: ReaderPlan | null;\n /** The version has no current publication yet; the hook asks again. */\n pending: boolean;\n loading: boolean;\n error?: ContentKitError;\n reload: () => void;\n}\n\n// setTimeout's longest delay.\nconst MAX_DELAY = 2 ** 31 - 1;\n\n/** When the plan changes by itself: its next scheduled segment's release. */\nexport function nextRelease(plan: ReaderPlan | null, now = Date.now()): number | null {\n const at = (plan?.segments ?? []).flatMap((s) => (!s.released && s.release_at ? [Date.parse(s.release_at)] : [])).filter((t) => t > now);\n return at.length ? Math.min(...at) : null;\n}\n\n/**\n * A version's reader plan for this viewer: its segments (released or not,\n * open or locked), previews, playback item and reader metadata. It asks again\n * while the version is being published and when its next segment is released.\n */\nexport function useReaderPlan(content: string | null | undefined, version: string | null | undefined, o: { poll?: number; client?: ContentKitClient } = {}): UseReaderPlan {\n const { client, store, scope } = useContentScope(o.client);\n const key = content && version ? keyOf(\"reader-plan\", scope, content, version) : null;\n const r = useResource<ReaderPlan | Pending>(store, key, { type: \"reader-plan\", id: version ?? undefined }, (s) => client.versions.reader(content!, version!, s));\n const pending = isPending(r.data);\n const plan = r.data && !pending ? (r.data as ReaderPlan) : null;\n const { data, reload } = r;\n // Every answer schedules the next look: a pending one polls, a plan waits for its next release.\n useEffect(() => {\n const at = isPending(data) ? Date.now() + (o.poll ?? 5000) : nextRelease(data ? (data as ReaderPlan) : null);\n if (at === null) return;\n const t = setTimeout(reload, Math.min(MAX_DELAY, Math.max(0, at - Date.now()) + 500));\n return () => clearTimeout(t);\n }, [data, reload, o.poll]);\n return { plan, pending, loading: !!key && (r.loading || !r.loaded), error: r.error, reload };\n}\n\n/** A segment's page with the URL of one rendition, once its item's read signed it. */\nexport interface ReaderPage {\n name: string;\n w: number;\n h: number;\n /** undefined until read, or when the page lacks the rendition. */\n url?: string;\n}\n\nexport interface UseSegmentPages {\n pages: ReaderPage[];\n loading: boolean;\n error?: ContentKitError;\n}\n\n/**\n * An open segment's pages with URLs of one rendition, read through its\n * published item (windowed for long segments, refreshed before the URLs expire).\n */\nexport function useSegmentPages(segment: PlanSegment | null | undefined, rendition: string, o: { window?: ReadWindow; client?: ContentKitClient } = {}): UseSegmentPages {\n const item = segment?.item ?? null;\n const read = useMediaRead(item ?? { kind: \"\", id: \"\" }, { window: o.window, read: item ? undefined : null, client: o.client });\n const pages = useMemo(() => {\n const urls = new Map((read.read?.files ?? []).flatMap((f) => (f.url ? [[f.path, f.url] as const] : [])));\n return (segment?.pages ?? []).map((p) => {\n const path = p.files[rendition];\n return { name: p.name, w: p.w, h: p.h, url: path ? urls.get(path) : undefined };\n });\n }, [segment, rendition, read.read]);\n return { pages, loading: !!item && read.loading, error: read.error };\n}\n\nexport interface UseVersionDownload {\n /** Prepares the zip (asking again while it is prepared) and resolves with it. */\n download: () => Promise<Blob>;\n /** Prepared by the server, waiting. */\n preparing: boolean;\n error?: ContentKitError;\n}\n\n/** A version's pages as a zip, charged to the viewer's download quota. */\nexport function useVersionDownload(content: string, version: string, o: { poll?: number; client?: ContentKitClient } = {}): UseVersionDownload {\n const { client } = useContentScope(o.client);\n const [preparing, setPreparing] = useState(false);\n const [error, setError] = useState<ContentKitError>();\n const download = useCallback(async () => {\n setError(undefined);\n setPreparing(true);\n try {\n for (;;) {\n const out = await client.versions.download(content, version);\n if (!isPending(out)) return out;\n await new Promise((r) => setTimeout(r, o.poll ?? 3000));\n }\n } catch (e) {\n const err = toContentKitError(e);\n setError(err);\n throw err;\n } finally {\n setPreparing(false);\n }\n }, [client, content, version, o.poll]);\n return { download, preparing, error };\n}\n"],"mappings":";;;;;;AAmBA,IAAM,IAAY,KAAK,KAAK;AAG5B,SAAgB,EAAY,GAAyB,IAAM,KAAK,IAAI,GAAkB;CACpF,IAAM,KAAM,GAAM,YAAY,CAAC,EAAA,CAAG,SAAS,MAAO,CAAC,EAAE,YAAY,EAAE,aAAa,CAAC,KAAK,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC,QAAQ,MAAM,IAAI,CAAG;CACvI,OAAO,EAAG,SAAS,KAAK,IAAI,GAAG,CAAE,IAAI;AACvC;AAOA,SAAgB,EAAc,GAAoC,GAAoC,IAAkD,CAAC,GAAkB;CACzK,IAAM,EAAE,WAAQ,UAAO,aAAU,EAAgB,EAAE,MAAM,GACnD,IAAM,KAAW,IAAU,EAAM,eAAe,GAAO,GAAS,CAAO,IAAI,MAC3E,IAAI,EAAkC,GAAO,GAAK;EAAE,MAAM;EAAe,IAAI,KAAW,KAAA;CAAU,IAAI,MAAM,EAAO,SAAS,OAAO,GAAU,GAAU,CAAC,CAAC,GACzJ,IAAU,EAAU,EAAE,IAAI,GAC1B,IAAO,EAAE,QAAQ,CAAC,IAAW,EAAE,OAAsB,MACrD,EAAE,SAAM,cAAW;CAQzB,OANA,QAAgB;EACd,IAAM,IAAK,EAAU,CAAI,IAAI,KAAK,IAAI,KAAK,EAAE,QAAQ,OAAQ,EAAY,KAA8B,IAAI;EAC3G,IAAI,MAAO,MAAM;EACjB,IAAM,IAAI,WAAW,GAAQ,KAAK,IAAI,GAAW,KAAK,IAAI,GAAG,IAAK,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC;EACpF,aAAa,aAAa,CAAC;CAC7B,GAAG;EAAC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AC3D,IAAI,CAAC,EAAU,CAAG,GAAG,OAAO;KAC5B,MAAM,IAAI,SAAS,MAAM,WAAW,GAAG,EAAE,QAAQ,GAAI,CAAC;IACxD;GACF,SAAS,GAAG;IACV,IAAM,IAAM,EAAkB,CAAC;IAE/B,MADA,EAAS,CAAG,GACN;GACR,UAAU;IACR,EAAa,EAAK;GACpB;EACF,GAAG;GAAC;GAAQ;GAAS;GAAS,EAAE;EAAI,CAC3B;EAAU;EAAW;CAAM;AACtC"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../src/react/versions.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { ContentKitClient } from \"../client/client.js\";\nimport { toContentKitError, type ContentKitError } from \"../client/errors.js\";\nimport type { FileDownload, Pending, PlanSegment, ReaderPlan } from \"../client/generated/wire.js\";\nimport { isPending } from \"../client/versions.js\";\nimport { useMessages } from \"../i18n/context.js\";\nimport type { Translator } from \"../i18n/messages.js\";\nimport { useMediaRead, type ReadWindow } from \"./read.js\";\nimport { keyOf, useContentScope, useResource } from \"./use-resource.js\";\n\nexport interface UseReaderPlan {\n /** null while loading, pending or failed. */\n plan: ReaderPlan | null;\n /** The version has no current publication yet; the hook asks again. */\n pending: boolean;\n loading: boolean;\n error?: ContentKitError;\n reload: () => void;\n}\n\n// setTimeout's longest delay.\nconst MAX_DELAY = 2 ** 31 - 1;\n\n/** When the plan changes by itself: its next scheduled segment's release. */\nexport function nextRelease(plan: ReaderPlan | null, now = Date.now()): number | null {\n const at = (plan?.segments ?? []).flatMap((s) => (!s.released && s.release_at ? [Date.parse(s.release_at)] : [])).filter((t) => t > now);\n return at.length ? Math.min(...at) : null;\n}\n\n/**\n * A version's reader plan for this viewer: its segments (released or not,\n * open or locked), previews, playback item and reader metadata. It asks again\n * while the version is being published and when its next segment is released.\n */\nexport function useReaderPlan(content: string | null | undefined, version: string | null | undefined, o: { poll?: number; client?: ContentKitClient } = {}): UseReaderPlan {\n const { client, store, scope } = useContentScope(o.client);\n const key = content && version ? keyOf(\"reader-plan\", scope, content, version) : null;\n const r = useResource<ReaderPlan | Pending>(store, key, { type: \"reader-plan\", id: version ?? undefined }, (s) => client.versions.reader(content!, version!, s));\n const pending = isPending(r.data);\n const plan = r.data && !pending ? (r.data as ReaderPlan) : null;\n const { data, reload } = r;\n // Every answer schedules the next look: a pending one polls, a plan waits for its next release.\n useEffect(() => {\n const at = isPending(data) ? Date.now() + (o.poll ?? 5000) : nextRelease(data ? (data as ReaderPlan) : null);\n if (at === null) return;\n const t = setTimeout(reload, Math.min(MAX_DELAY, Math.max(0, at - Date.now()) + 500));\n return () => clearTimeout(t);\n }, [data, reload, o.poll]);\n return { plan, pending, loading: !!key && (r.loading || !r.loaded), error: r.error, reload };\n}\n\n/** A segment's page with the URL of one rendition, once its item's read signed it. */\nexport interface ReaderPage {\n name: string;\n w: number;\n h: number;\n /** undefined until read, or when the page lacks the rendition. */\n url?: string;\n}\n\nexport interface UseSegmentPages {\n pages: ReaderPage[];\n loading: boolean;\n error?: ContentKitError;\n}\n\n/**\n * An open segment's pages with URLs of one rendition, read through its\n * published item (windowed for long segments, refreshed before the URLs expire).\n */\nexport function useSegmentPages(segment: PlanSegment | null | undefined, rendition: string, o: { window?: ReadWindow; client?: ContentKitClient } = {}): UseSegmentPages {\n const item = segment?.item ?? null;\n const read = useMediaRead(item ?? { kind: \"\", id: \"\" }, { window: o.window, read: item ? undefined : null, client: o.client });\n const pages = useMemo(() => {\n const urls = new Map((read.read?.files ?? []).flatMap((f) => (f.url ? [[f.path, f.url] as const] : [])));\n return (segment?.pages ?? []).map((p) => {\n const path = p.files[rendition];\n return { name: p.name, w: p.w, h: p.h, url: path ? urls.get(path) : undefined };\n });\n }, [segment, rendition, read.read]);\n return { pages, loading: !!item && read.loading, error: read.error };\n}\n\nexport interface UseVersionDownload {\n /**\n * Grants the download (asking again while it is prepared), starts it in the\n * browser and resolves with the grant.\n */\n download: () => Promise<FileDownload>;\n /** Being prepared by the server, or granted and starting. */\n preparing: boolean;\n error?: ContentKitError;\n /** While a quota refused: when the viewer may download again (ms). */\n retryAt?: number;\n /**\n * What to tell the viewer about the last refusal: when a quota frees, when\n * a download the site holds back opens (\"available to download in N\n * days\"), a locked version, nothing to download, or a failure.\n */\n message?: string;\n}\n\n/** Starts a granted download: the browser fetches its URL, an attachment. */\nexport function startDownload(d: FileDownload): void {\n const a = document.createElement(\"a\");\n a.href = d.url;\n a.download = d.name;\n a.rel = \"noopener\";\n a.style.display = \"none\";\n document.body.appendChild(a);\n a.click();\n a.remove();\n}\n\n/** The viewer's line for a download refusal at now. */\nexport function downloadMessage(m: Translator, err: ContentKitError | undefined, now = Date.now()): string | undefined {\n switch (err?.code) {\n case undefined:\n return undefined;\n case \"rate_limited\":\n return m.t(\"versionDownload.limited\", { minutes: Math.max(1, Math.ceil((err.retryAfter ?? 60) / 60)) });\n case \"download_unavailable\": {\n const ms = err.availableAt ? Date.parse(err.availableAt) - now : NaN;\n return ms > 0 ? m.plural(\"versionDownload.availableIn\", Math.max(1, Math.ceil(ms / 86_400_000))) : m.t(\"versionDownload.unavailable\");\n }\n case \"forbidden\":\n return m.t(\"versionDownload.locked\");\n case \"no_download\":\n return m.error(err);\n default:\n return m.t(\"versionDownload.failed\");\n }\n}\n\n/**\n * A version's download, charged to the viewer's download quota: the\n * original or rendition its kind serves, or its pages as a zip.\n */\nexport function useVersionDownload(\n content: string,\n version: string,\n o: { poll?: number; client?: ContentKitClient; start?: (d: FileDownload) => void } = {},\n): UseVersionDownload {\n const { client } = useContentScope(o.client);\n const m = useMessages();\n const [preparing, setPreparing] = useState(false);\n const [error, setError] = useState<ContentKitError>();\n const [retryAt, setRetryAt] = useState<number>();\n const start = o.start ?? startDownload;\n const download = useCallback(async () => {\n setError(undefined);\n setRetryAt(undefined);\n setPreparing(true);\n try {\n for (;;) {\n const out = await client.versions.download(content, version);\n if (!isPending(out)) {\n start(out);\n return out;\n }\n await new Promise((r) => setTimeout(r, o.poll ?? 3000));\n }\n } catch (e) {\n const err = toContentKitError(e);\n setError(err);\n if (err.code === \"rate_limited\") setRetryAt(Date.now() + (err.retryAfter ?? 60) * 1000);\n throw err;\n } finally {\n setPreparing(false);\n }\n }, [client, content, version, o.poll, start]);\n return { download, preparing, error, retryAt, message: downloadMessage(m, error) };\n}\n"],"mappings":";;;;;;;AAqBA,IAAM,IAAY,KAAK,KAAK;AAG5B,SAAgB,EAAY,GAAyB,IAAM,KAAK,IAAI,GAAkB;CACpF,IAAM,KAAM,GAAM,YAAY,CAAC,EAAA,CAAG,SAAS,MAAO,CAAC,EAAE,YAAY,EAAE,aAAa,CAAC,KAAK,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAE,CAAC,CAAC,QAAQ,MAAM,IAAI,CAAG;CACvI,OAAO,EAAG,SAAS,KAAK,IAAI,GAAG,CAAE,IAAI;AACvC;AAOA,SAAgB,EAAc,GAAoC,GAAoC,IAAkD,CAAC,GAAkB;CACzK,IAAM,EAAE,WAAQ,UAAO,aAAU,EAAgB,EAAE,MAAM,GACnD,IAAM,KAAW,IAAU,EAAM,eAAe,GAAO,GAAS,CAAO,IAAI,MAC3E,IAAI,EAAkC,GAAO,GAAK;EAAE,MAAM;EAAe,IAAI,KAAW,KAAA;CAAU,IAAI,MAAM,EAAO,SAAS,OAAO,GAAU,GAAU,CAAC,CAAC,GACzJ,IAAU,EAAU,EAAE,IAAI,GAC1B,IAAO,EAAE,QAAQ,CAAC,IAAW,EAAE,OAAsB,MACrD,EAAE,SAAM,cAAW;CAQzB,OANA,QAAgB;EACd,IAAM,IAAK,EAAU,CAAI,IAAI,KAAK,IAAI,KAAK,EAAE,QAAQ,OAAQ,EAAY,KAA8B,IAAI;EAC3G,IAAI,MAAO,MAAM;EACjB,IAAM,IAAI,WAAW,GAAQ,KAAK,IAAI,GAAW,KAAK,IAAI,GAAG,IAAK,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC;EACpF,aAAa,aAAa,CAAC;CAC7B,GAAG;EAA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AAC;GAAQ;GAAS;GAAS,EAAE;GAAM;EAAK,CAClC;EAAU;EAAW;EAAO;EAAS,SAAS,EAAgB,GAAG,CAAK;CAAE;AACnF"}
package/dist/react.js CHANGED
@@ -18,12 +18,12 @@ import { useFavorite as se, useReaction as ce } from "./react/engagement.js";
18
18
  import { usePoll as le, usePollEditor as ue, usePolls as de, withVote as fe } from "./react/polls.js";
19
19
  import { useVersionParam as pe } from "./react/location.js";
20
20
  import { useAdminLocation as me, useFlowClient as he, useStaffAccess as ge } from "./react/admin.js";
21
- import { beaconsFor as _e, useBeacons as ve, useContentFilters as ye, useContents as be, useExposure as xe, useHistory as Se, useMyFavorites as Ce, useMyReactions as we, useRecentSearches as Te, useRecommendations as Ee, useReleaseDates as De, useSearch as Oe, useSimilar as ke, useTypeahead as Ae, useViewSignal as je } from "./react/discovery.js";
22
- import { defaultVersion as Me, findVersion as Ne, liveVersions as Pe, useContentDetail as Fe } from "./react/detail.js";
23
- import { nextRelease as Ie, useReaderPlan as Le, useSegmentPages as Re, useVersionDownload as ze } from "./react/versions.js";
24
- import { useActivity as Be, useMyStats as Ve, useTopContents as He } from "./react/stats.js";
25
- import { useContent as Ue, useManagedContents as We } from "./react/contents.js";
26
- import { useNotificationUnread as Ge, useNotifications as Ke } from "./react/notifications.js";
27
- import { ContentKitProvider as qe } from "./react/provider.js";
28
- import { useCanonicalContent as Je } from "./react/canonical.js";
29
- export { qe as ContentKitProvider, R as GALLERY_VIEW_KEY, i as GuardContext, e as HOVER_DELAY, t as InlinePreviewContext, z as PLAYER_QUALITY_KEY, h as ResourceStore, _e as beaconsFor, Me as defaultVersion, A as editOutput, Ne as findVersion, Pe as liveVersions, y as memberId, G as nameIn, Ie as nextRelease, g as resourcesFor, N as round3, K as thumbnailOf, Be as useActivity, Y as useAdminComments, me as useAdminLocation, D as useAvatar, X as useBannedWords, ve as useBeacons, Z as useCanComment, Je as useCanonicalContent, B as useCarousel, Q as useCommentBans, $ as useCommentReplies, ee as useComments, Ue as useContent, oe as useContentConfig, Fe as useContentDetail, ye as useContentFilters, b as useContentGroups, a as useContentKit, o as useContentKitClient, _ as useContentScope, s as useContentURLs, be as useContents, d as useCrop, W as useEditorCrop, f as useEncodeProgress, c as useErrorReporter, xe as useExposure, se as useFavorite, he as useFlowClient, P as useFrameStrip, V as useGalleryView, te as useGlobalCommentBan, x as useGroup, S as useGroupMembers, C as useGroups, l as useGuarded, Se as useHistory, H as useHlsPlayer, ne as useIPBans, n as useInlinePreview, w as useKinds, re as useLatestComments, We as useManagedContents, q as useMediaFolder, E as useMediaRead, ie as useModerationQueue, Ce as useMyFavorites, T as useMyGroups, we as useMyReactions, Ve as useMyStats, J as useNearViewport, Ge as useNotificationUnread, Ke as useNotifications, u as useOptionalContentKitClient, v as usePaged, le as usePoll, ue as usePollEditor, de as usePolls, O as usePresets, k as usePublicImage, ce as useReaction, Le as useReaderPlan, Te as useRecentSearches, Ee as useRecommendations, r as useReducedMotion, U as useRefreshBeforeExpiry, De as useReleaseDates, Oe as useSearch, Re as useSegmentPages, ke as useSimilar, j as useSlotCrop, M as useSlotImage, ge as useStaffAccess, He as useTopContents, Ae as useTypeahead, p as useUpload, m as useUploadQueue, ze as useVersionDownload, pe as useVersionParam, F as useVideoFrame, I as useVideoImages, L as useVideoPoster, je as useViewSignal, ae as withReaction, fe as withVote };
21
+ import { beaconsFor as _e, useBeacons as ve, useContentFilters as ye, useContents as be, useExposure as xe, useHistory as Se, useLockedCount as Ce, useMyFavorites as we, useMyReactions as Te, useRecentSearches as Ee, useRecommendations as De, useReleaseDates as Oe, useSearch as ke, useSimilar as Ae, useTypeahead as je, useViewSignal as Me } from "./react/discovery.js";
22
+ import { defaultVersion as Ne, findVersion as Pe, liveVersions as Fe, useContentDetail as Ie } from "./react/detail.js";
23
+ import { downloadMessage as Le, nextRelease as Re, startDownload as ze, useReaderPlan as Be, useSegmentPages as Ve, useVersionDownload as He } from "./react/versions.js";
24
+ import { useActivity as Ue, useMyStats as We, useTopContents as Ge } from "./react/stats.js";
25
+ import { useContent as Ke, useManagedContents as qe } from "./react/contents.js";
26
+ import { useNotificationUnread as Je, useNotifications as Ye } from "./react/notifications.js";
27
+ import { ContentKitProvider as Xe } from "./react/provider.js";
28
+ import { useCanonicalContent as Ze } from "./react/canonical.js";
29
+ export { Xe as ContentKitProvider, R as GALLERY_VIEW_KEY, i as GuardContext, e as HOVER_DELAY, t as InlinePreviewContext, z as PLAYER_QUALITY_KEY, h as ResourceStore, _e as beaconsFor, Ne as defaultVersion, Le as downloadMessage, A as editOutput, Pe as findVersion, Fe as liveVersions, y as memberId, G as nameIn, Re as nextRelease, g as resourcesFor, N as round3, ze as startDownload, K as thumbnailOf, Ue as useActivity, Y as useAdminComments, me as useAdminLocation, D as useAvatar, X as useBannedWords, ve as useBeacons, Z as useCanComment, Ze as useCanonicalContent, B as useCarousel, Q as useCommentBans, $ as useCommentReplies, ee as useComments, Ke as useContent, oe as useContentConfig, Ie as useContentDetail, ye as useContentFilters, b as useContentGroups, a as useContentKit, o as useContentKitClient, _ as useContentScope, s as useContentURLs, be as useContents, d as useCrop, W as useEditorCrop, f as useEncodeProgress, c as useErrorReporter, xe as useExposure, se as useFavorite, he as useFlowClient, P as useFrameStrip, V as useGalleryView, te as useGlobalCommentBan, x as useGroup, S as useGroupMembers, C as useGroups, l as useGuarded, Se as useHistory, H as useHlsPlayer, ne as useIPBans, n as useInlinePreview, w as useKinds, re as useLatestComments, Ce as useLockedCount, qe as useManagedContents, q as useMediaFolder, E as useMediaRead, ie as useModerationQueue, we as useMyFavorites, T as useMyGroups, Te as useMyReactions, We as useMyStats, J as useNearViewport, Je as useNotificationUnread, Ye as useNotifications, u as useOptionalContentKitClient, v as usePaged, le as usePoll, ue as usePollEditor, de as usePolls, O as usePresets, k as usePublicImage, ce as useReaction, Be as useReaderPlan, Ee as useRecentSearches, De as useRecommendations, r as useReducedMotion, U as useRefreshBeforeExpiry, Oe as useReleaseDates, ke as useSearch, Ve as useSegmentPages, Ae as useSimilar, j as useSlotCrop, M as useSlotImage, ge as useStaffAccess, Ge as useTopContents, je as useTypeahead, p as useUpload, m as useUploadQueue, He as useVersionDownload, pe as useVersionParam, F as useVideoFrame, I as useVideoImages, L as useVideoPoster, Me as useViewSignal, ae as withReaction, fe as withVote };