@wodira/browser 0.3.0 → 1.0.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/CHANGELOG.md +17 -1
- package/README.md +97 -48
- package/dist/index.cjs +5 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/ui/boxes/cdn.js +9 -9
- package/dist/ui/index-tfej862z.js +3264 -0
- package/dist/ui/index-xdhg885t.js +997 -0
- package/dist/ui/index.js +26 -2277
- package/dist/ui/shirt-3d-renderer-jyks1h8f.js +10 -0
- package/dist/ui/shirt-sponsors/cdn.js +5115 -73
- package/dist/ui/shirt-sponsors/index.js +8 -1667
- package/dist/ui/shirt-sponsors/render/auction-model.d.ts +55 -0
- package/dist/ui/shirt-sponsors/render/auction-model.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/render/index.d.ts +7 -0
- package/dist/ui/shirt-sponsors/render/index.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/render/index.js +34 -0
- package/dist/ui/shirt-sponsors/render/shirt-3d-renderer.d.ts +109 -0
- package/dist/ui/shirt-sponsors/render/shirt-3d-renderer.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/render/shirt-artwork-projection.d.ts +13 -0
- package/dist/ui/shirt-sponsors/render/shirt-artwork-projection.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/render/shirt-artwork.d.ts +17 -0
- package/dist/ui/shirt-sponsors/render/shirt-artwork.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/render/shirt-cloth-motion.d.ts +31 -0
- package/dist/ui/shirt-sponsors/render/shirt-cloth-motion.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/render/shirt-silhouette.d.ts +9 -0
- package/dist/ui/shirt-sponsors/render/shirt-silhouette.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/shirt-auction.d.ts +101 -15
- package/dist/ui/shirt-sponsors/shirt-auction.d.ts.map +1 -1
- package/package.json +12 -4
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** Local prototype only. No payment, identity or analytics is authoritative. */
|
|
2
|
+
export type ShirtSide = 'front' | 'back';
|
|
3
|
+
export interface SponsorBid {
|
|
4
|
+
id: string;
|
|
5
|
+
buyer: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
paidAt: number;
|
|
8
|
+
status: 'leading' | 'refunded';
|
|
9
|
+
logo?: string;
|
|
10
|
+
link?: string;
|
|
11
|
+
views: number;
|
|
12
|
+
opens: number;
|
|
13
|
+
clicks: number;
|
|
14
|
+
}
|
|
15
|
+
export interface SponsorSlot {
|
|
16
|
+
isReserved?: boolean;
|
|
17
|
+
reservedLogo?: string;
|
|
18
|
+
surface?: 'left-sleeve' | 'right-sleeve';
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
side: ShirtSide;
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
printWidth: number;
|
|
27
|
+
printHeight: number;
|
|
28
|
+
startingPrice: number;
|
|
29
|
+
/** Price shown on the 3D shirt when the next valid bid differs from the opening price. */
|
|
30
|
+
bidPrice?: number;
|
|
31
|
+
increment: number;
|
|
32
|
+
bids: SponsorBid[];
|
|
33
|
+
lock?: {
|
|
34
|
+
buyer: string;
|
|
35
|
+
amount: number;
|
|
36
|
+
expiresAt: number;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface SponsorCampaign {
|
|
40
|
+
title: string;
|
|
41
|
+
quantity: number;
|
|
42
|
+
closesAt: number;
|
|
43
|
+
originalClose: number;
|
|
44
|
+
published: boolean;
|
|
45
|
+
front?: string;
|
|
46
|
+
back?: string;
|
|
47
|
+
slots: SponsorSlot[];
|
|
48
|
+
}
|
|
49
|
+
export declare const leader: (slot: SponsorSlot) => SponsorBid | undefined;
|
|
50
|
+
export declare const minimumBid: (slot: SponsorSlot) => number;
|
|
51
|
+
export declare const hasPaidBids: (campaign: SponsorCampaign) => boolean;
|
|
52
|
+
export declare function reserveBid(campaign: SponsorCampaign, slotId: string, buyer: string, amount: number, now: number): SponsorCampaign;
|
|
53
|
+
export declare function settleBid(campaign: SponsorCampaign, slotId: string, outcome: 'paid' | 'failed', now: number, id: string): SponsorCampaign;
|
|
54
|
+
export declare function demoCampaign(now: number): SponsorCampaign;
|
|
55
|
+
//# sourceMappingURL=auction-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auction-model.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/auction-model.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC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-artwork.js';
|
|
4
|
+
export * from './shirt-artwork-projection.js';
|
|
5
|
+
export * from './shirt-cloth-motion.js';
|
|
6
|
+
export * from './shirt-silhouette.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
leader2,
|
|
3
|
+
minimumBid2,
|
|
4
|
+
hasPaidBids2,
|
|
5
|
+
reserveBid2,
|
|
6
|
+
settleBid2,
|
|
7
|
+
demoCampaign2,
|
|
8
|
+
ShirtClothMotion2,
|
|
9
|
+
ShirtClothMesh2,
|
|
10
|
+
shirtArmhole2,
|
|
11
|
+
mapShirtHeight2,
|
|
12
|
+
paintShirtArtwork2,
|
|
13
|
+
ShirtArtworkProjection2,
|
|
14
|
+
defaultShirt3dPalette2,
|
|
15
|
+
SHIRT_MODEL_PATH2,
|
|
16
|
+
Shirt3dRenderer2
|
|
17
|
+
} from "../../index-xdhg885t.js";
|
|
18
|
+
export {
|
|
19
|
+
SHIRT_MODEL_PATH2 as SHIRT_MODEL_PATH,
|
|
20
|
+
Shirt3dRenderer2 as Shirt3dRenderer,
|
|
21
|
+
ShirtArtworkProjection2 as ShirtArtworkProjection,
|
|
22
|
+
ShirtClothMesh2 as ShirtClothMesh,
|
|
23
|
+
ShirtClothMotion2 as ShirtClothMotion,
|
|
24
|
+
defaultShirt3dPalette2 as defaultShirt3dPalette,
|
|
25
|
+
demoCampaign2 as demoCampaign,
|
|
26
|
+
hasPaidBids2 as hasPaidBids,
|
|
27
|
+
leader2 as leader,
|
|
28
|
+
mapShirtHeight2 as mapShirtHeight,
|
|
29
|
+
minimumBid2 as minimumBid,
|
|
30
|
+
paintShirtArtwork2 as paintShirtArtwork,
|
|
31
|
+
reserveBid2 as reserveBid,
|
|
32
|
+
settleBid2 as settleBid,
|
|
33
|
+
shirtArmhole2 as shirtArmhole
|
|
34
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type ShirtSide, type SponsorSlot } from './auction-model.js';
|
|
2
|
+
import type { ShirtArtwork } from './shirt-artwork.js';
|
|
3
|
+
/** Colours painted into the shirt texture; a widget passes the host page's CSS tokens. */
|
|
4
|
+
export interface Shirt3dPalette {
|
|
5
|
+
/** Fill of an open slot while the shirt is interactive. */
|
|
6
|
+
slot: string;
|
|
7
|
+
/** Fill of the slot being drawn in the organizer editor. */
|
|
8
|
+
slotPreview: string;
|
|
9
|
+
/** Text and outline drawn on top of slot fills and price badges. */
|
|
10
|
+
slotText: string;
|
|
11
|
+
/** Price badge of a slot that already has a leading bid. */
|
|
12
|
+
priceLeading: string;
|
|
13
|
+
/** Price badge of a slot without bids. */
|
|
14
|
+
price: string;
|
|
15
|
+
/** Fill of a slot the organizer kept without artwork; it is not open to bids. */
|
|
16
|
+
reserved: string;
|
|
17
|
+
/** Outline of the slot the visitor has chosen. */
|
|
18
|
+
selected: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const defaultShirt3dPalette: Shirt3dPalette;
|
|
21
|
+
export interface Shirt3dRendererOptions {
|
|
22
|
+
/** GLB model; defaults to WODira's shirt next to the current document. */
|
|
23
|
+
modelUrl?: string;
|
|
24
|
+
/** Locale of the bid price badges; defaults to the document language. */
|
|
25
|
+
locale?: string;
|
|
26
|
+
palette?: Partial<Shirt3dPalette>;
|
|
27
|
+
}
|
|
28
|
+
export declare const SHIRT_MODEL_PATH = "/images/sponsor-studio/white-shirt-realistic-v1.glb?v=7";
|
|
29
|
+
export declare class Shirt3dRenderer {
|
|
30
|
+
private canvas;
|
|
31
|
+
private fail;
|
|
32
|
+
private recovering;
|
|
33
|
+
private renderer;
|
|
34
|
+
private scene;
|
|
35
|
+
private camera;
|
|
36
|
+
private model?;
|
|
37
|
+
private observer;
|
|
38
|
+
private disposed;
|
|
39
|
+
private loadController;
|
|
40
|
+
private contextUnavailable;
|
|
41
|
+
private recoveryTimer?;
|
|
42
|
+
private firstFrame?;
|
|
43
|
+
private frame;
|
|
44
|
+
private textureDirty;
|
|
45
|
+
private atlas;
|
|
46
|
+
private texture;
|
|
47
|
+
private fabricTexture;
|
|
48
|
+
private fabricMaterials;
|
|
49
|
+
private images;
|
|
50
|
+
private slots;
|
|
51
|
+
private rotation;
|
|
52
|
+
private tilt;
|
|
53
|
+
private side;
|
|
54
|
+
private viewSurface;
|
|
55
|
+
private rotating;
|
|
56
|
+
private zoom;
|
|
57
|
+
private shirtColor;
|
|
58
|
+
private showBidPrices;
|
|
59
|
+
private artwork;
|
|
60
|
+
private artworkProjection?;
|
|
61
|
+
private priceFormatter;
|
|
62
|
+
private palette;
|
|
63
|
+
private selectedSlotId;
|
|
64
|
+
private modelUrl;
|
|
65
|
+
private raycaster;
|
|
66
|
+
private cloth;
|
|
67
|
+
private clothMeshes;
|
|
68
|
+
private clothActive;
|
|
69
|
+
private lastFrameTime;
|
|
70
|
+
private reducedMotion;
|
|
71
|
+
constructor(canvas: HTMLCanvasElement, fail: () => void, recovering?: (loading: boolean) => void, options?: Shirt3dRendererOptions);
|
|
72
|
+
load(): Promise<void>;
|
|
73
|
+
update(slots: SponsorSlot[], side: ShirtSide, rotating: boolean, color?: string, showBidPrices?: boolean, artwork?: ShirtArtwork | null, viewSurface?: SponsorSlot['surface']): void;
|
|
74
|
+
snapshot(side?: ShirtSide): Promise<Blob>;
|
|
75
|
+
productionSnapshot(view: 'front' | 'back' | 'left' | 'right' | 'top'): Promise<Blob>;
|
|
76
|
+
private capture;
|
|
77
|
+
/** Outlines one slot as the visitor's current choice; null clears it. */
|
|
78
|
+
setSelectedSlot(id: string | null): void;
|
|
79
|
+
/** Repaints the slots with new colours or price locale, e.g. after the host theme changes. */
|
|
80
|
+
setAppearance(options: Pick<Shirt3dRendererOptions, 'locale' | 'palette'>): void;
|
|
81
|
+
private createPriceFormatter;
|
|
82
|
+
rotate(dx: number, dy: number): void;
|
|
83
|
+
zoomBy(delta: number): void;
|
|
84
|
+
resetView(): void;
|
|
85
|
+
surface(clientX: number, clientY: number): {
|
|
86
|
+
torso: {
|
|
87
|
+
side: ShirtSide;
|
|
88
|
+
surface: undefined;
|
|
89
|
+
x: number;
|
|
90
|
+
y: number;
|
|
91
|
+
} | undefined;
|
|
92
|
+
side: ShirtSide;
|
|
93
|
+
surface: SponsorSlot['surface'];
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
} | undefined;
|
|
97
|
+
pick(clientX: number, clientY: number): SponsorSlot | undefined;
|
|
98
|
+
private paint;
|
|
99
|
+
private paintNow;
|
|
100
|
+
private paintBidPrice;
|
|
101
|
+
private render;
|
|
102
|
+
private resetCloth;
|
|
103
|
+
private createFabricTexture;
|
|
104
|
+
private contextLost;
|
|
105
|
+
private contextRestored;
|
|
106
|
+
private disposeModel;
|
|
107
|
+
dispose(): void;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=shirt-3d-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirt-3d-renderer.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/shirt-3d-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACp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AM,GAAG,IAAI,QAKhC;IAED,8FAA8F;IAC9F,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,GAAG,SAAS,CAAC,QAMxE;IAED,OAAO,CAAC,oBAAoB;IAS5B,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAU5B;IACD,MAAM,CAAC,KAAK,EAAE,MAAM,QAGnB;IAED,SAAS,SAUR;IAED,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;kBAanB,SAAS;qBAAW,SAAS;eAAK,MAAM;eAAK,MAAM;;cAgCzB,SAAS;iBAKhC,WAAW,CAAC,SAAS,CAAC;;;kBAI7C;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,2BAiBpC;IAED,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,QAAQ;IAkFhB,OAAO,CAAC,aAAa;IAoCrB,OAAO,CAAC,MAAM;IA6Cd,OAAO,CAAC,UAAU,CAMhB;IACF,OAAO,CAAC,mBAAmB;IA4B3B,OAAO,CAAC,WAAW,CASjB;IACF,OAAO,CAAC,eAAe,CAYrB;IACF,OAAO,CAAC,YAAY;IAQpB,OAAO,SAuBN;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { type ShirtArtwork } from './shirt-artwork.js';
|
|
3
|
+
/** Rest-pose print coordinates follow the fabric, independently of the atlas island seams. */
|
|
4
|
+
export declare class ShirtArtworkProjection {
|
|
5
|
+
private silhouette;
|
|
6
|
+
private canvas;
|
|
7
|
+
private texture;
|
|
8
|
+
private uniforms;
|
|
9
|
+
constructor(model: THREE.Group);
|
|
10
|
+
update(artwork: ShirtArtwork | null, images: ReadonlyMap<string, HTMLImageElement>, dye: THREE.Color): void;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=shirt-artwork-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirt-artwork-projection.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/shirt-artwork-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE1E,8FAA8F;AAC9F,qBAAa,sBAAsB;IACjC,OAAO,CAAC,UAAU,CAAyC;IAC3D,OAAO,CAAC,MAAM,CAAoC;IAClD,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,QAAQ,CAKd;IAEF,YAAY,KAAK,EAAE,KAAK,CAAC,KAAK,EAgJ7B;IAED,MAAM,CACJ,OAAO,EAAE,YAAY,GAAG,IAAI,EAC5B,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC7C,GAAG,EAAE,KAAK,CAAC,KAAK,QAsBjB;IAED,OAAO,SAEN;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ShirtSide } from './auction-model.js';
|
|
2
|
+
/** Local preview only. Never include these URLs in campaign save requests. */
|
|
3
|
+
export interface ShirtArtworkLayer {
|
|
4
|
+
photo?: boolean;
|
|
5
|
+
fabricColor?: string;
|
|
6
|
+
url: string;
|
|
7
|
+
name: string;
|
|
8
|
+
scale: number;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
export type ShirtArtwork = Partial<Record<ShirtSide, ShirtArtworkLayer>>;
|
|
13
|
+
export declare function paintShirtArtwork(context: CanvasRenderingContext2D, artwork: ShirtArtwork | null, images: ReadonlyMap<string, HTMLImageElement>, width: number, height: number, silhouette?: readonly {
|
|
14
|
+
left: number;
|
|
15
|
+
right: number;
|
|
16
|
+
}[]): void;
|
|
17
|
+
//# sourceMappingURL=shirt-artwork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirt-artwork.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/shirt-artwork.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAEzE,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,EACjC,OAAO,EAAE,YAAY,GAAG,IAAI,EAC5B,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC7C,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAO,QA6D5D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
interface Spring {
|
|
3
|
+
offset: number;
|
|
4
|
+
velocity: number;
|
|
5
|
+
}
|
|
6
|
+
/** A small, damped cloth response driven by angular travel, independent of pointer event rate. */
|
|
7
|
+
export declare class ShirtClothMotion {
|
|
8
|
+
readonly yaw: Spring;
|
|
9
|
+
readonly pitch: Spring;
|
|
10
|
+
readonly flutter: Spring;
|
|
11
|
+
turn(yaw: number, pitch: number): void;
|
|
12
|
+
advance(seconds: number): boolean;
|
|
13
|
+
reset(): void;
|
|
14
|
+
private integrate;
|
|
15
|
+
}
|
|
16
|
+
/** Deform the real surface, keeping UVs, artwork and CPU raycasting aligned. */
|
|
17
|
+
export declare class ShirtClothMesh {
|
|
18
|
+
private readonly geometry;
|
|
19
|
+
private readonly rest;
|
|
20
|
+
private readonly restNormals;
|
|
21
|
+
private readonly normalCorrections;
|
|
22
|
+
private readonly weights;
|
|
23
|
+
private readonly ripples;
|
|
24
|
+
private readonly height;
|
|
25
|
+
private deformed;
|
|
26
|
+
constructor(geometry: THREE.BufferGeometry);
|
|
27
|
+
apply(motion: ShirtClothMotion): void;
|
|
28
|
+
restore(): void;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=shirt-cloth-motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirt-cloth-motion.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/shirt-cloth-motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,MAAM;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,kGAAkG;AAClG,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAA8B;IAClD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAA8B;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAA8B;IAEtD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAQrC;IAED,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAmBhC;IAED,KAAK,IAAI,IAAI,CAKZ;IAED,OAAO,CAAC,SAAS;CAQlB;AAED,gFAAgF;AAChF,qBAAa,cAAc;IASb,OAAO,CAAC,QAAQ,CAAC,QAAQ;IARrC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAe;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAS;IAEzB,YAA6B,QAAQ,EAAE,KAAK,CAAC,cAAc,EA8C1D;IAED,KAAK,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CA6BpC;IAED,OAAO,IAAI,IAAI,CAed;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ShirtSpan {
|
|
2
|
+
left: number;
|
|
3
|
+
right: number;
|
|
4
|
+
}
|
|
5
|
+
/** Strongest width reduction in the sleeve/underarm region. */
|
|
6
|
+
export declare function shirtArmhole(spans: readonly ShirtSpan[]): number;
|
|
7
|
+
/** Keep collar, underarm and hem aligned across differently proportioned shirts. */
|
|
8
|
+
export declare function mapShirtHeight(y: number, fromArmhole: number, toArmhole: number): number;
|
|
9
|
+
//# sourceMappingURL=shirt-silhouette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirt-silhouette.d.ts","sourceRoot":"","sources":["../../../../src/ui/shirt-sponsors/render/shirt-silhouette.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,CAchE;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAIxF"}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* WODira shirt sponsorship auction, rendered natively in the host page.
|
|
4
|
+
*
|
|
5
|
+
* The 3D shirt, the slots, their current leaders and the outbid amount live in this element and
|
|
6
|
+
* are styled with the same `--wodira-*` tokens and `::part()` names as the other WODira
|
|
7
|
+
* components. Sign-in, the sponsor logo and the Stripe payment happen in a WODira window, so no
|
|
8
|
+
* WODira session or payment data reaches the host page; that window only reports that a bid was
|
|
9
|
+
* paid, and the shirt then reloads from the API.
|
|
10
|
+
*
|
|
11
|
+
* @fires wodira:shirt:slot-selected - `{ campaignId, slotId }` when a slot is chosen.
|
|
12
|
+
* @fires wodira:shirt:bid-started - `{ campaignId, slotId, amountCents }` when the WODira window opens.
|
|
13
|
+
* @fires wodira:shirt:paid - `{ campaignId }` once WODira confirms the payment. A UI signal, not a receipt.
|
|
14
|
+
*/
|
|
3
15
|
export declare class WodiraShirtAuction extends LitElement {
|
|
4
16
|
static properties: {
|
|
5
17
|
campaignId: {
|
|
6
18
|
type: StringConstructor;
|
|
7
19
|
attribute: string;
|
|
8
20
|
};
|
|
21
|
+
publishableKey: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
attribute: string;
|
|
24
|
+
};
|
|
25
|
+
baseUrl: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
attribute: string;
|
|
28
|
+
};
|
|
9
29
|
appUrl: {
|
|
10
30
|
type: StringConstructor;
|
|
11
31
|
attribute: string;
|
|
@@ -13,39 +33,105 @@ export declare class WodiraShirtAuction extends LitElement {
|
|
|
13
33
|
locale: {
|
|
14
34
|
type: StringConstructor;
|
|
15
35
|
};
|
|
16
|
-
|
|
36
|
+
campaign: {
|
|
17
37
|
state: boolean;
|
|
18
38
|
};
|
|
19
|
-
|
|
39
|
+
loading: {
|
|
20
40
|
state: boolean;
|
|
21
41
|
};
|
|
22
42
|
failed: {
|
|
23
43
|
state: boolean;
|
|
24
44
|
};
|
|
25
|
-
|
|
45
|
+
selectedSlotId: {
|
|
46
|
+
state: boolean;
|
|
47
|
+
};
|
|
48
|
+
side: {
|
|
49
|
+
state: boolean;
|
|
50
|
+
};
|
|
51
|
+
amountEuros: {
|
|
52
|
+
state: boolean;
|
|
53
|
+
};
|
|
54
|
+
modelUnavailable: {
|
|
55
|
+
state: boolean;
|
|
56
|
+
};
|
|
57
|
+
modelLoading: {
|
|
58
|
+
state: boolean;
|
|
59
|
+
};
|
|
60
|
+
status: {
|
|
26
61
|
state: boolean;
|
|
27
62
|
};
|
|
28
63
|
};
|
|
29
|
-
static styles: import("lit").CSSResult;
|
|
64
|
+
static styles: import("lit").CSSResult[];
|
|
30
65
|
campaignId: string;
|
|
66
|
+
publishableKey: string;
|
|
67
|
+
baseUrl: string;
|
|
31
68
|
appUrl: string;
|
|
32
69
|
locale: string;
|
|
33
|
-
private
|
|
34
|
-
private
|
|
70
|
+
private campaign;
|
|
71
|
+
private loading;
|
|
35
72
|
private failed;
|
|
36
|
-
private
|
|
37
|
-
private
|
|
38
|
-
private
|
|
73
|
+
private selectedSlotId;
|
|
74
|
+
private side;
|
|
75
|
+
private amountEuros;
|
|
76
|
+
private modelUnavailable;
|
|
77
|
+
private modelLoading;
|
|
78
|
+
private status;
|
|
79
|
+
private client;
|
|
80
|
+
private abort;
|
|
81
|
+
private renderer;
|
|
82
|
+
private rendererCanvas;
|
|
83
|
+
private rendererGeneration;
|
|
84
|
+
private canvasRevision;
|
|
85
|
+
private drag;
|
|
86
|
+
private bidWindow;
|
|
87
|
+
private bidWindowTimer;
|
|
88
|
+
private blockedUrl;
|
|
89
|
+
private readonly channel;
|
|
90
|
+
private themeObserver;
|
|
91
|
+
private colorScheme;
|
|
39
92
|
constructor();
|
|
40
|
-
|
|
41
|
-
|
|
93
|
+
/** Re-reads the `--wodira-*` colours into the 3D shirt after they change from script. */
|
|
94
|
+
refreshTheme(): void;
|
|
42
95
|
connectedCallback(): void;
|
|
43
96
|
disconnectedCallback(): void;
|
|
44
97
|
protected willUpdate(changes: PropertyValues<this>): void;
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
private
|
|
98
|
+
protected updated(changes: PropertyValues): void;
|
|
99
|
+
private get language();
|
|
100
|
+
private get numberLocale();
|
|
101
|
+
private get text();
|
|
102
|
+
private get appOrigin();
|
|
103
|
+
private createClient;
|
|
104
|
+
private load;
|
|
105
|
+
private get biddingOpen();
|
|
106
|
+
private get selectedSlot();
|
|
107
|
+
private get orderedSlots();
|
|
108
|
+
private get sides();
|
|
109
|
+
private select;
|
|
110
|
+
private formatMoney;
|
|
111
|
+
private formatDate;
|
|
112
|
+
private palette;
|
|
113
|
+
private startRenderer;
|
|
114
|
+
private disposeRenderer;
|
|
115
|
+
private paintShirt;
|
|
116
|
+
private onPointerDown;
|
|
117
|
+
private onPointerMove;
|
|
118
|
+
private onPointerUp;
|
|
119
|
+
private onPointerCancel;
|
|
120
|
+
private onShirtKey;
|
|
121
|
+
private showSide;
|
|
122
|
+
private bidUrl;
|
|
123
|
+
private amountProblem;
|
|
124
|
+
private submitBid;
|
|
125
|
+
private watchBidWindow;
|
|
48
126
|
private readonly onMessage;
|
|
127
|
+
/** A blocked-popup bid continues in a tab the element cannot see; refresh when the visitor returns. */
|
|
128
|
+
private readonly onWindowFocus;
|
|
129
|
+
private readonly onColorScheme;
|
|
49
130
|
protected render(): import("lit").TemplateResult<1>;
|
|
131
|
+
private renderStage;
|
|
132
|
+
private renderSides;
|
|
133
|
+
private renderSlots;
|
|
134
|
+
private renderBidPanel;
|
|
135
|
+
private renderStatus;
|
|
50
136
|
}
|
|
51
137
|
//# sourceMappingURL=shirt-auction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirt-auction.d.ts","sourceRoot":"","sources":["../../../src/ui/shirt-sponsors/shirt-auction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"shirt-auction.d.ts","sourceRoot":"","sources":["../../../src/ui/shirt-sponsors/shirt-auction.ts"],"names":[],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AAa,CAE5B;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmC;IAIjE,UAAmB,MAAM,oCAgCxB;IAED,OAAO,CAAC,WAAW;IA8CnB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,WAAW;IAwCnB,OAAO,CAAC,cAAc;IA0EtB,OAAO,CAAC,YAAY;CAgBrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wodira/browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Browser SDK for WODira publishable keys and external Stripe Checkout registration sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browser",
|
|
@@ -45,13 +45,20 @@
|
|
|
45
45
|
"import": "./dist/ui/shirt-sponsors/index.js",
|
|
46
46
|
"default": "./dist/ui/shirt-sponsors/index.js"
|
|
47
47
|
},
|
|
48
|
+
"./ui/shirt-sponsors/render": {
|
|
49
|
+
"types": "./dist/ui/shirt-sponsors/render/index.d.ts",
|
|
50
|
+
"import": "./dist/ui/shirt-sponsors/render/index.js",
|
|
51
|
+
"default": "./dist/ui/shirt-sponsors/render/index.js"
|
|
52
|
+
},
|
|
48
53
|
"./ui/shirt-sponsors/cdn": "./dist/ui/shirt-sponsors/cdn.js"
|
|
49
54
|
},
|
|
50
55
|
"publishConfig": {
|
|
51
56
|
"access": "public"
|
|
52
57
|
},
|
|
53
58
|
"dependencies": {
|
|
54
|
-
"
|
|
59
|
+
"@types/three": "^0.187.0",
|
|
60
|
+
"lit": "3.3.3",
|
|
61
|
+
"three": "^0.187.0"
|
|
55
62
|
},
|
|
56
63
|
"devDependencies": {
|
|
57
64
|
"@types/bun": "1.4.4",
|
|
@@ -67,12 +74,13 @@
|
|
|
67
74
|
},
|
|
68
75
|
"scripts": {
|
|
69
76
|
"tsc": "bun run ./node_modules/@typescript/native/bin/tsc",
|
|
70
|
-
"build": "bun run clean && bun build ./src/index.ts --target=browser --format=esm --outfile=dist/index.js && bun build ./src/index.ts --target=node --format=cjs --outfile=dist/index.cjs && bun build ./src/ui/index.ts
|
|
77
|
+
"build": "bun run clean && bun build ./src/index.ts --target=browser --format=esm --outfile=dist/index.js && bun build ./src/index.ts --target=node --format=cjs --outfile=dist/index.cjs && bun build ./src/ui/index.ts ./src/ui/shirt-sponsors/index.ts ./src/ui/shirt-sponsors/render/index.ts --root=./src/ui --splitting --target=browser --format=esm --external three --external 'three/*' --outdir=dist/ui && bun build ./src/ui/boxes/index.ts --target=browser --format=esm --outfile=dist/ui/boxes/index.js && bun build ./src/ui/boxes/cdn.ts --target=browser --format=esm --minify --outfile=dist/ui/boxes/cdn.js && bun build ./src/ui/shirt-sponsors/cdn.ts --target=browser --format=esm --minify --outfile=dist/ui/shirt-sponsors/cdn.js && tsc -p tsconfig.build.json",
|
|
71
78
|
"clean": "rm -rf dist",
|
|
72
79
|
"type-check": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.ui.json",
|
|
73
80
|
"test": "bun test",
|
|
74
81
|
"preview:ui": "bun scripts/preview-ui.ts",
|
|
75
82
|
"test:ui:browser": "playwright test --config playwright.ui.config.ts",
|
|
76
|
-
"verify:boxes-cdn": "bun ../../scripts/verify-box-widget-cdn.mjs"
|
|
83
|
+
"verify:boxes-cdn": "bun ../../scripts/verify-box-widget-cdn.mjs",
|
|
84
|
+
"sync-injected-deps": "bun ../database/scripts/sync-injected-workspace-package.mjs"
|
|
77
85
|
}
|
|
78
86
|
}
|