@hadoku/prefs-client 1.1.15 → 1.1.17
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/dist/avatar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AvatarCosmetics, C as CosmeticsView, L as LoadoutUpdate } from './cosmetics-contract-
|
|
2
|
-
export { a as CosmeticSlot, b as Loadout, P as Placement } from './cosmetics-contract-
|
|
1
|
+
import { A as AvatarCosmetics, C as CosmeticsView, L as LoadoutUpdate } from './cosmetics-contract-CWnMmEjr.js';
|
|
2
|
+
export { a as CosmeticSlot, b as Loadout, P as Placement } from './cosmetics-contract-CWnMmEjr.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Avatars — the wire contract, shared by prefs-api and the client.
|
|
@@ -170,6 +170,14 @@ interface CosmeticGrantRequest {
|
|
|
170
170
|
note?: string;
|
|
171
171
|
}
|
|
172
172
|
/** Admin: GET /api/v1/admin/cosmetics?name= */
|
|
173
|
+
/** GET /api/v1/admin/cosmetics/people: every live person who can wear cosmetics, members included. */
|
|
174
|
+
interface CosmeticPeople {
|
|
175
|
+
people: {
|
|
176
|
+
userId: string;
|
|
177
|
+
name: string;
|
|
178
|
+
tier: string;
|
|
179
|
+
}[];
|
|
180
|
+
}
|
|
173
181
|
interface CosmeticGrantList {
|
|
174
182
|
grants: {
|
|
175
183
|
item: string;
|
|
@@ -179,4 +187,4 @@ interface CosmeticGrantList {
|
|
|
179
187
|
}[];
|
|
180
188
|
}
|
|
181
189
|
|
|
182
|
-
export { type AvatarCosmetics as A, type Box as B, type CosmeticsView as C, EARNED_COSMETICS as E, type LoadoutUpdate as L, type OverlayArt as O, type Placement as P, type CosmeticSlot as a, type Loadout as b, COSMETICS as c, COSMETICS_BY_ID as d, COSMETIC_ID_PATTERN as e, COSMETIC_SLOTS as f, type CosmeticGrantList as g, type CosmeticGrantRequest as h, type CosmeticItem as i,
|
|
190
|
+
export { type AvatarCosmetics as A, type Box as B, type CosmeticsView as C, EARNED_COSMETICS as E, type LoadoutUpdate as L, type OverlayArt as O, type Placement as P, type CosmeticSlot as a, type Loadout as b, COSMETICS as c, COSMETICS_BY_ID as d, COSMETIC_ID_PATTERN as e, COSMETIC_SLOTS as f, type CosmeticGrantList as g, type CosmeticGrantRequest as h, type CosmeticItem as i, type CosmeticPeople as j, PLACEMENT_DEFAULT as k, PLACEMENT_LIMITS as l, PLACEMENT_ZONE as m, cleanLoadout as n, cleanWorn as o, emptyLoadout as p, fitPlacement as q, overlayBounds as r, ownedFrom as s, wornCosmetics as w };
|
package/dist/cosmetics.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AvatarCosmetics, P as Placement } from './cosmetics-contract-
|
|
2
|
-
export { B as Box, c as COSMETICS, d as COSMETICS_BY_ID, e as COSMETIC_ID_PATTERN, f as COSMETIC_SLOTS, g as CosmeticGrantList, h as CosmeticGrantRequest, i as CosmeticItem, a as CosmeticSlot, C as CosmeticsView, E as EARNED_COSMETICS, b as Loadout, L as LoadoutUpdate, O as OverlayArt,
|
|
1
|
+
import { A as AvatarCosmetics, P as Placement } from './cosmetics-contract-CWnMmEjr.js';
|
|
2
|
+
export { B as Box, c as COSMETICS, d as COSMETICS_BY_ID, e as COSMETIC_ID_PATTERN, f as COSMETIC_SLOTS, g as CosmeticGrantList, h as CosmeticGrantRequest, i as CosmeticItem, j as CosmeticPeople, a as CosmeticSlot, C as CosmeticsView, E as EARNED_COSMETICS, b as Loadout, L as LoadoutUpdate, O as OverlayArt, k as PLACEMENT_DEFAULT, l as PLACEMENT_LIMITS, m as PLACEMENT_ZONE, n as cleanLoadout, o as cleanWorn, p as emptyLoadout, q as fitPlacement, r as overlayBounds, s as ownedFrom, w as wornCosmetics } from './cosmetics-contract-CWnMmEjr.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Avatar cosmetics — the renderer every app uses, so a name, an avatar and a
|
|
@@ -55,9 +55,16 @@ declare function avatarHtml(o: {
|
|
|
55
55
|
declare function messageHtml(text: string, worn?: AvatarCosmetics, opts?: {
|
|
56
56
|
keep?: boolean;
|
|
57
57
|
}): string;
|
|
58
|
+
/**
|
|
59
|
+
* When a reveal's last piece finishes, put the plain text back. An
|
|
60
|
+
* `animationend` handler: ensureCosmeticsStyles installs it on the document;
|
|
61
|
+
* a page that ships the stylesheet statically (and must not touch the
|
|
62
|
+
* document) attaches it to its own container instead.
|
|
63
|
+
*/
|
|
64
|
+
declare function finishReveal(e: AnimationEvent): void;
|
|
58
65
|
/** The whole stylesheet, with asset URLs under `assetBase`. */
|
|
59
66
|
declare function cosmeticsCss(assetBase?: string): string;
|
|
60
67
|
/** Add the stylesheet and the reveal clean-up to a document, once. */
|
|
61
68
|
declare function ensureCosmeticsStyles(doc?: Document, assetBase?: string): void;
|
|
62
69
|
|
|
63
|
-
export { AvatarCosmetics, COSMETICS_ASSET_BASE, Placement, avatarHtml, colourStyle, cosmeticsCss, decorHtml, ensureCosmeticsStyles, messageHtml, nameHtml, placementTransform };
|
|
70
|
+
export { AvatarCosmetics, COSMETICS_ASSET_BASE, Placement, avatarHtml, colourStyle, cosmeticsCss, decorHtml, ensureCosmeticsStyles, finishReveal, messageHtml, nameHtml, placementTransform };
|
package/dist/cosmetics.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/prefs-client",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "1.1.17",
|
|
4
|
+
"gitHead": "3b7c6d55990095e078f86a404df472a06a12b65c",
|
|
5
5
|
"description": "Client SDK for the hadoku unified preferences store. Wraps /prefs/api/v1/* with localStorage caching, debounced writes, Zod-validated reads, and a usePrefs() React hook, plus match history, ratings and leaderboards for every game (./games), the one resolved avatar per user (./avatar), and the avatar cosmetics renderer (./cosmetics).",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|