@openrails/contentkit-ui 0.85.1 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/client/beacons.d.ts +13 -4
- package/dist/client/beacons.js +14 -7
- package/dist/client/beacons.js.map +1 -1
- package/dist/client/client.d.ts +3 -0
- package/dist/client/client.js +29 -27
- package/dist/client/client.js.map +1 -1
- package/dist/client/codes.d.ts +6 -1
- package/dist/client/codes.js +4 -1
- package/dist/client/codes.js.map +1 -1
- package/dist/client/generated/error-codes.js +1 -1
- package/dist/client/generated/error-codes.js.map +1 -1
- package/dist/client/generated/routes.d.ts +14 -1
- package/dist/client/generated/routes.js +17 -1
- package/dist/client/generated/routes.js.map +1 -1
- package/dist/client/generated/wire.d.ts +29 -0
- package/dist/client/generated/wire.js.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/media/queue.d.ts +4 -2
- package/dist/client/media/queue.js +18 -12
- package/dist/client/media/queue.js.map +1 -1
- package/dist/client/media/rules.d.ts +7 -1
- package/dist/client/media/rules.js +27 -21
- package/dist/client/media/rules.js.map +1 -1
- package/dist/client/stats.d.ts +32 -0
- package/dist/client/stats.js +35 -0
- package/dist/client/stats.js.map +1 -0
- package/dist/client.js +30 -29
- package/dist/components/admin/content-manager.js +206 -206
- package/dist/components/admin/content-manager.js.map +1 -1
- package/dist/components/admin/group-manager.js +71 -70
- package/dist/components/admin/group-manager.js.map +1 -1
- package/dist/components/admin/media-item-panel.d.ts +24 -7
- package/dist/components/admin/media-item-panel.js +209 -197
- package/dist/components/admin/media-item-panel.js.map +1 -1
- package/dist/components/admin/poll-manager.js +25 -25
- package/dist/components/admin/stats-dashboard.d.ts +22 -0
- package/dist/components/admin/stats-dashboard.js +257 -0
- package/dist/components/admin/stats-dashboard.js.map +1 -0
- package/dist/components/content/card.js +42 -42
- package/dist/components/content/card.js.map +1 -1
- package/dist/components/content/editors.js +455 -427
- package/dist/components/content/editors.js.map +1 -1
- package/dist/components/content/grid.js +47 -47
- package/dist/components/content/index.d.ts +2 -1
- package/dist/components/content/listing.js +34 -34
- package/dist/components/content/listing.js.map +1 -1
- package/dist/components/content/paywall.d.ts +17 -5
- package/dist/components/content/paywall.js +115 -100
- package/dist/components/content/paywall.js.map +1 -1
- package/dist/components/content/reader-stats.d.ts +12 -0
- package/dist/components/content/reader-stats.js +47 -0
- package/dist/components/content/reader-stats.js.map +1 -0
- package/dist/components/groups/banner.js +33 -33
- package/dist/components/groups/directory.js +11 -11
- package/dist/components/groups/editor.js +293 -293
- package/dist/components/groups/editor.js.map +1 -1
- package/dist/components/groups/header.js +27 -27
- package/dist/components/groups/header.js.map +1 -1
- package/dist/components/groups/memberships.js +180 -180
- package/dist/components/groups/parts.d.ts +0 -2
- package/dist/components/groups/parts.js +9 -27
- package/dist/components/groups/parts.js.map +1 -1
- package/dist/components/media-folder-editor.js +239 -189
- package/dist/components/media-folder-editor.js.map +1 -1
- package/dist/components/notifications.js +17 -17
- package/dist/components/slot-upload.d.ts +2 -2
- package/dist/components/slot-upload.js +84 -79
- package/dist/components/slot-upload.js.map +1 -1
- package/dist/components/social/bans.js +34 -34
- package/dist/components/social/moderation.js +52 -48
- package/dist/components/social/moderation.js.map +1 -1
- package/dist/components/video-player.d.ts +2 -0
- package/dist/components/video-player.js +318 -314
- package/dist/components/video-player.js.map +1 -1
- package/dist/i18n/context.d.ts +2 -0
- package/dist/i18n/context.js +23 -5
- package/dist/i18n/context.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -10
- package/dist/locales/admin/de.js +27 -0
- package/dist/locales/admin/de.js.map +1 -1
- package/dist/locales/admin/en.d.ts +27 -0
- package/dist/locales/admin/en.js +27 -0
- package/dist/locales/admin/en.js.map +1 -1
- package/dist/locales/admin/es.js +27 -0
- package/dist/locales/admin/es.js.map +1 -1
- package/dist/locales/admin/ja.js +27 -0
- package/dist/locales/admin/ja.js.map +1 -1
- package/dist/locales/admin/ko.js +27 -0
- package/dist/locales/admin/ko.js.map +1 -1
- package/dist/locales/admin/zh.js +27 -0
- package/dist/locales/admin/zh.js.map +1 -1
- package/dist/locales/content/de.js +6 -0
- package/dist/locales/content/de.js.map +1 -1
- package/dist/locales/content/en.d.ts +6 -0
- package/dist/locales/content/en.js +6 -0
- package/dist/locales/content/en.js.map +1 -1
- package/dist/locales/content/es.js +6 -0
- package/dist/locales/content/es.js.map +1 -1
- package/dist/locales/content/ja.js +6 -0
- package/dist/locales/content/ja.js.map +1 -1
- package/dist/locales/content/ko.js +6 -0
- package/dist/locales/content/ko.js.map +1 -1
- package/dist/locales/content/zh.js +6 -0
- package/dist/locales/content/zh.js.map +1 -1
- package/dist/locales/de.js +1 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +34 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +1 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +1 -0
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +1 -0
- package/dist/locales/zh.js.map +1 -1
- package/dist/react/admin.js +22 -23
- package/dist/react/admin.js.map +1 -1
- package/dist/react/canonical.d.ts +4 -3
- package/dist/react/canonical.js +34 -33
- package/dist/react/canonical.js.map +1 -1
- package/dist/react/contents.js +144 -144
- package/dist/react/contents.js.map +1 -1
- package/dist/react/detail.d.ts +12 -6
- package/dist/react/detail.js +31 -24
- package/dist/react/detail.js.map +1 -1
- package/dist/react/folder.d.ts +7 -2
- package/dist/react/folder.js +165 -147
- package/dist/react/folder.js.map +1 -1
- package/dist/react/groups.d.ts +0 -1
- package/dist/react/groups.js +13 -12
- package/dist/react/groups.js.map +1 -1
- package/dist/react/index.d.ts +4 -2
- package/dist/react/location.d.ts +11 -0
- package/dist/react/location.js +18 -0
- package/dist/react/location.js.map +1 -0
- package/dist/react/public.d.ts +8 -0
- package/dist/react/public.js +32 -27
- package/dist/react/public.js.map +1 -1
- package/dist/react/stats.d.ts +24 -0
- package/dist/react/stats.js +28 -0
- package/dist/react/stats.js.map +1 -0
- package/dist/react/use-resource.js +8 -7
- package/dist/react/use-resource.js.map +1 -1
- package/dist/react/versions.js +20 -20
- package/dist/react.js +26 -24
- package/dist/styles.css +1 -1
- package/dist/urls/index.d.ts +35 -10
- package/dist/urls.js +100 -70
- package/dist/urls.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","names":[],"sources":["../../src/client/stats.ts"],"sourcesContent":["import type { Activity, MyStats, TopContents } from \"./generated/wire.js\";\nimport type { Period } from \"./discovery.js\";\nimport type { Http } from \"./http.js\";\nimport { call } from \"./route.js\";\n\nexport interface ActivityQuery {\n kind: string;\n /** The last days, today included: 7 by default, at most 90. */\n days?: number;\n}\n\nexport interface TopQuery {\n kind: string;\n /** views (the default) or comments. */\n metric?: \"views\" | \"comments\";\n /** 30d by default. */\n period?: Period;\n access?: readonly (\"public\" | \"tier\" | \"group\" | \"ppv\" | \"group_ppv\")[];\n tiers?: readonly string[];\n /** Titles and paths in this language; the site's first by default. */\n language?: string;\n /** 10 by default, at most 100. */\n limit?: number;\n}\n\n/** Content statistics: staff activity and rankings (root:content:view-restricted), and the signed-in reader's own. */\nexport class StatsClient {\n constructor(private readonly http: Http) {}\n\n /** A kind's views per UTC day, newest first: view sessions, distinct viewers and signed-in viewers. */\n activity(q: ActivityQuery, signal?: AbortSignal): Promise<Activity> {\n return call(this.http, \"GET\", \"/stats/activity\", { query: { kind: q.kind, days: q.days }, signal });\n }\n /** A kind's live, listed content ranked by views or published comments over a period. */\n top(q: TopQuery, signal?: AbortSignal): Promise<TopContents> {\n const { access, tiers, ...rest } = q;\n return call(this.http, \"GET\", \"/stats/top\", { query: { ...rest, access: access?.join(\",\"), tiers: tiers?.join(\",\") }, signal });\n }\n /** The signed-in reader's statistics: contents finished per kind, comments and the reactions they received. */\n mine(signal?: AbortSignal): Promise<MyStats> {\n return call(this.http, \"GET\", \"/me/stats\", { signal });\n }\n}\n"],"mappings":";;AA0BA,IAAa,IAAb,MAAyB;CACM;CAA7B,YAAY,GAA6B;EAAZ,KAAA,OAAA;CAAa;CAG1C,SAAS,GAAkB,GAAyC;EAClE,OAAO,EAAK,KAAK,MAAM,OAAO,mBAAmB;GAAE,OAAO;IAAE,MAAM,EAAE;IAAM,MAAM,EAAE;GAAK;GAAG;EAAO,CAAC;CACpG;CAEA,IAAI,GAAa,GAA4C;EAC3D,IAAM,EAAE,WAAQ,UAAO,GAAG,MAAS;EACnC,OAAO,EAAK,KAAK,MAAM,OAAO,cAAc;GAAE,OAAO;IAAE,GAAG;IAAM,QAAQ,GAAQ,KAAK,GAAG;IAAG,OAAO,GAAO,KAAK,GAAG;GAAE;GAAG;EAAO,CAAC;CAChI;CAEA,KAAK,GAAwC;EAC3C,OAAO,EAAK,KAAK,MAAM,OAAO,aAAa,EAAE,UAAO,CAAC;CACvD;AACF"}
|
package/dist/client.js
CHANGED
|
@@ -10,32 +10,33 @@ import { sha256Hex as D } from "./client/media/hash.js";
|
|
|
10
10
|
import { Pacer as O } from "./client/media/pacer.js";
|
|
11
11
|
import { defaultTransport as k, fetchTransport as A, xhrTransport as j } from "./client/media/transport.js";
|
|
12
12
|
import { MediaClient as M, backoff as N, samePath as P, stem as F } from "./client/media/client.js";
|
|
13
|
-
import { acceptOf as I, defaultImage as L, filesFor as R, isPattern as z, ratioLabel as B, ruleDir as V, ruleFor as H, screenFiles as U,
|
|
14
|
-
import { centeredCrop as
|
|
15
|
-
import { encodeRemaining as
|
|
16
|
-
import { ItemUploadQueue as
|
|
17
|
-
import { decodeImage as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { CatalogClient as
|
|
24
|
-
import { CodesClient as
|
|
25
|
-
import { BODY_SUFFIX as
|
|
26
|
-
import { BansClient as
|
|
27
|
-
import { CommentsClient as
|
|
28
|
-
import { Beacons as
|
|
29
|
-
import { DiscoveryClient as
|
|
30
|
-
import { FavoritesClient as
|
|
31
|
-
import { ModerationClient as
|
|
32
|
-
import { PollsClient as
|
|
33
|
-
import { ReactionsClient as
|
|
34
|
-
import { GroupsClient as
|
|
35
|
-
import { OffersClient as
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
|
|
13
|
+
import { acceptOf as I, defaultImage as L, filesFor as R, isPattern as z, ratioLabel as B, ruleDir as V, ruleFor as H, screenFiles as U, stableImage as W, uniqueName as G, uploadRules as K, withMediaType as q } from "./client/media/rules.js";
|
|
14
|
+
import { centeredCrop as J, constrainCrop as Y, editOf as X, editedSize as Z, fromRotated as Q, rotation as $, sameEdit as ee, toOriginal as te, toRotated as ne } from "./client/crop.js";
|
|
15
|
+
import { encodeRemaining as re } from "./client/media/encode.js";
|
|
16
|
+
import { ItemUploadQueue as ie } from "./client/media/queue.js";
|
|
17
|
+
import { decodeImage as ae, isAnimatedImage as oe } from "./client/image.js";
|
|
18
|
+
import { reactionVerb as se, sameTarget as ce } from "./client/content/types.js";
|
|
19
|
+
import { READ_CHUNK as le, chunkOffsets as ue, isProcessing as de, mergeReads as fe, processing as pe } from "./client/media/windows.js";
|
|
20
|
+
import { ABR_DEFAULTS as me, NETWORK_FAILURES_BEFORE_ERROR as he, REFRESH_BEFORE_EXPIRY as ge, abrHlsConfig as _e, capRung as ve, classifyHlsError as ye, classifyMediaError as be, expiryDelay as xe, hlsConfig as Se, initialEstimate as Ce, refreshable as we, startRung as Te, statusKind as Ee } from "./client/playback.js";
|
|
21
|
+
import { formatDuration as De, galleryItems as Oe, isAudioType as ke, isImageType as Ae, isSubtitleType as je, isVideoType as Me, stageAspect as Ne } from "./client/gallery.js";
|
|
22
|
+
import { PLAYBACK_SPEEDS as Pe, PLAYER_TRACKS_KEY as Fe, PLAYER_VOLUME_KEY as Ie, parseSpriteVtt as Le, playerKeyAction as Re, resumeAt as ze } from "./client/player.js";
|
|
23
|
+
import { CatalogClient as Be } from "./client/catalog.js";
|
|
24
|
+
import { CodesClient as Ve } from "./client/codes.js";
|
|
25
|
+
import { BODY_SUFFIX as He, ContentsClient as Ue, IMAGE_SCHEME as We, imageRef as Ge, imageRefs as Ke } from "./client/contents.js";
|
|
26
|
+
import { BansClient as qe } from "./client/content/bans.js";
|
|
27
|
+
import { CommentsClient as Je } from "./client/content/comments.js";
|
|
28
|
+
import { Beacons as Ye, eventId as Xe, readerSession as Ze } from "./client/beacons.js";
|
|
29
|
+
import { DiscoveryClient as Qe } from "./client/discovery.js";
|
|
30
|
+
import { FavoritesClient as $e } from "./client/content/favorites.js";
|
|
31
|
+
import { ModerationClient as et } from "./client/content/moderation.js";
|
|
32
|
+
import { PollsClient as tt } from "./client/content/polls.js";
|
|
33
|
+
import { ReactionsClient as nt } from "./client/content/reactions.js";
|
|
34
|
+
import { GroupsClient as rt } from "./client/groups.js";
|
|
35
|
+
import { OffersClient as it } from "./client/offers.js";
|
|
36
|
+
import { StatsClient as at } from "./client/stats.js";
|
|
37
|
+
import { VersionsClient as ot, isPending as st } from "./client/versions.js";
|
|
38
|
+
import { NotificationsClient as ct } from "./client/notifications.js";
|
|
39
|
+
import { createContentKitClient as lt } from "./client/client.js";
|
|
40
|
+
import { LETTERS as ut, attributeInput as dt, fold as ft, fromLocalInput as pt, humanize as mt, letterOf as ht, parseAttribute as gt, parseAttributes as _t, slugify as vt, toLocalInput as yt } from "./client/group-fields.js";
|
|
41
|
+
import { emptyReaderMeta as bt, matchAudio as xt, readerMetaProblems as St, readerNames as Ct } from "./client/reader-meta.js";
|
|
42
|
+
export { me as ABR_DEFAULTS, He as BODY_SUFFIX, qe as BansClient, Ye as Beacons, i as CLIENT_ERROR_CODES, Be as CatalogClient, Ve as CodesClient, Je as CommentsClient, a as ContentKitError, Ue as ContentsClient, e as DEFAULT_DENSITY, Qe as DiscoveryClient, o as ERROR_CODES, $e as FavoritesClient, rt as GroupsClient, We as IMAGE_SCHEME, ie as ItemUploadQueue, ut as LETTERS, w as MAX_PART_SIZE, T as MAX_SINGLE_PUT, E as MIN_PART_SIZE, C as MediaApi, M as MediaClient, et as ModerationClient, he as NETWORK_FAILURES_BEFORE_ERROR, ct as NotificationsClient, it as OffersClient, Pe as PLAYBACK_SPEEDS, Fe as PLAYER_TRACKS_KEY, Ie as PLAYER_VOLUME_KEY, O as Pacer, tt as PollsClient, le as READ_CHUNK, ge as REFRESH_BEFORE_EXPIRY, nt as ReactionsClient, at as StatsClient, ot as VersionsClient, _e as abrHlsConfig, I as acceptOf, h as aspectOf, dt as attributeInput, N as backoff, _ as call, ve as capRung, J as centeredCrop, y as checkRef, ue as chunkOffsets, ye as classifyHlsError, be as classifyMediaError, Y as constrainCrop, lt as createContentKitClient, ae as decodeImage, L as defaultImage, k as defaultTransport, t as densityFor, X as editOf, Z as editedSize, bt as emptyReaderMeta, re as encodeRemaining, Xe as eventId, xe as expiryDelay, s as failureError, A as fetchTransport, R as filesFor, d as fill, ft as fold, De as formatDuration, pt as fromLocalInput, Q as fromRotated, Oe as galleryItems, Se as hlsConfig, mt as humanize, Ge as imageRef, Ke as imageRefs, Ce as initialEstimate, oe as isAnimatedImage, ke as isAudioType, b as isContentId, c as isContentKitError, Ae as isImageType, z as isPattern, st as isPending, de as isProcessing, je as isSubtitleType, Me as isVideoType, x as itemKey, ht as letterOf, xt as matchAudio, fe as mergeReads, gt as parseAttribute, _t as parseAttributes, Le as parseSpriteVtt, n as pickRendition, Re as playerKeyAction, pe as processing, f as publicRenditions, p as publicURL, g as ratio, B as ratioLabel, se as reactionVerb, l as readContentKitError, St as readerMetaProblems, Ct as readerNames, Ze as readerSession, we as refreshable, ze as resumeAt, $ as rotation, v as routeURL, V as ruleDir, H as ruleFor, ee as sameEdit, S as sameItem, P as samePath, ce as sameTarget, U as screenFiles, D as sha256Hex, vt as slugify, r as sortRenditions, m as srcSet, W as stableImage, Ne as stageAspect, Te as startRung, Ee as statusKind, F as stem, u as toContentKitError, yt as toLocalInput, te as toOriginal, ne as toRotated, G as uniqueName, K as uploadRules, q as withMediaType, j as xhrTransport };
|