@genlook/storefront 0.1.0 → 0.1.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.
@@ -1,4 +1,4 @@
1
- import type { CoreEvents } from "./events";
1
+ import type { CoreEvents } from "./events.js";
2
2
  /** Funnel-event sink. The boot passes the core Tracker directly (`sdk.tracking`),
3
3
  * whose `capture` method satisfies this shape — no host closure needed. */
4
4
  export interface TrackSink {
@@ -9,7 +9,7 @@
9
9
  * re-anonymises every returning shopper (lost photo history, reset quota) and
10
10
  * breaks the backend's `anon_` guard in `readAnonymousId`.
11
11
  */
12
- import type { KVStorage } from "./ports";
12
+ import type { KVStorage } from "./ports.js";
13
13
  /** Storage key for the anonymous device id. NOT namespaced (`genlook-…`) — the
14
14
  * pre-core widget wrote it raw, and the key has to stay byte-identical. Also
15
15
  * exported so a host can purge exactly this key on a consent deny. */
package/dist/client.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import type { Transport, KVStorage, MediaInput, NetworkInfo } from "./ports";
2
- import type { CurrentPlanResponse, CheckCreditsResponse, CollectEmailRequest, CollectEmailResponse, ShareGenerationResponse, UploadResult, PrepareUploadRequest, RatingReasonCode } from "./types";
3
- import type { CoreState, GenerationJob, UploadMeta } from "./entities";
4
- import type { Listener } from "./store";
5
- import type { PolicyAction, PolicyResult } from "./policy";
6
- import { PolicyBlockedError } from "./policy";
7
- import type { TrackSink } from "./analytics";
8
- import type { CoreEvent, CoreEventListener, CoreEventType } from "./events";
9
- import type { GetShareUrlOptions } from "./sharing";
10
- import type { StoreSettings } from "./settings";
11
- import type { TryOnResult, GenerationContext } from "./history";
12
- import type { GenlookTryOn } from "./public-api";
1
+ import type { Transport, KVStorage, MediaInput, NetworkInfo } from "./ports.js";
2
+ import type { CurrentPlanResponse, CheckCreditsResponse, CollectEmailRequest, CollectEmailResponse, ShareGenerationResponse, UploadResult, PrepareUploadRequest, RatingReasonCode } from "./types.js";
3
+ import type { CoreState, GenerationJob, UploadMeta } from "./entities.js";
4
+ import type { Listener } from "./store.js";
5
+ import type { PolicyAction, PolicyResult } from "./policy.js";
6
+ import { PolicyBlockedError } from "./policy.js";
7
+ import type { TrackSink } from "./analytics.js";
8
+ import type { CoreEvent, CoreEventListener, CoreEventType } from "./events.js";
9
+ import type { GetShareUrlOptions } from "./sharing.js";
10
+ import type { StoreSettings } from "./settings.js";
11
+ import type { TryOnResult, GenerationContext } from "./history.js";
12
+ import type { GenlookTryOn } from "./public-api.js";
13
13
  /** Parsed widget config surfaced to the core. Limits/identity feed the policy layer. */
14
14
  export interface TryOnClientConfig {
15
15
  storeId?: string;
package/dist/client.js CHANGED
@@ -1,10 +1,10 @@
1
- import { initialCoreState, selectUnseenResults } from "./entities";
2
- import { createStore } from "./store";
3
- import { can as evaluatePolicy, PolicyBlockedError } from "./policy";
4
- import { attachAnalytics } from "./analytics";
5
- import { runUpload } from "./upload";
6
- import { PendingUpload } from "./pending-upload";
7
- import { CoreEvents } from "./events";
1
+ import { initialCoreState, selectUnseenResults } from "./entities.js";
2
+ import { createStore } from "./store.js";
3
+ import { can as evaluatePolicy, PolicyBlockedError } from "./policy.js";
4
+ import { attachAnalytics } from "./analytics.js";
5
+ import { runUpload } from "./upload.js";
6
+ import { PendingUpload } from "./pending-upload.js";
7
+ import { CoreEvents } from "./events.js";
8
8
  function photoMetaFields(meta) {
9
9
  return {
10
10
  fileSize: meta.fileSize,
@@ -21,14 +21,14 @@ function photoMetaFields(meta) {
21
21
  : {}),
22
22
  };
23
23
  }
24
- import { getCurrentPlan, checkCredits, rateGeneration, rateResult, runGeneration, acknowledgeGeneration, scheduleInFlightResumes, GenerationFailedError, } from "./generation";
25
- import { collectEmail } from "./email";
26
- import { runDataErasure } from "./erasure";
27
- import { createShareLink, getShareUrl } from "./sharing";
28
- import { loadJobs, saveJobs } from "./persistence";
29
- import { loadConsent, saveConsent } from "./consent";
30
- import { loadUsage, saveUsage, mergeUsage, migrateLegacyUsage, pruneTryOns } from "./usage";
31
- import { loadHistory, saveHistory, selectRecentResults, buildTryOnResult, appendEntry, updateEntry, } from "./history";
24
+ import { getCurrentPlan, checkCredits, rateGeneration, rateResult, runGeneration, acknowledgeGeneration, scheduleInFlightResumes, GenerationFailedError, } from "./generation.js";
25
+ import { collectEmail } from "./email.js";
26
+ import { runDataErasure } from "./erasure.js";
27
+ import { createShareLink, getShareUrl } from "./sharing.js";
28
+ import { loadJobs, saveJobs } from "./persistence.js";
29
+ import { loadConsent, saveConsent } from "./consent.js";
30
+ import { loadUsage, saveUsage, mergeUsage, migrateLegacyUsage, pruneTryOns } from "./usage.js";
31
+ import { loadHistory, saveHistory, selectRecentResults, buildTryOnResult, appendEntry, updateEntry, } from "./history.js";
32
32
  const CREDITS_CHECK_CACHE_TTL = 2 * 60 * 1000;
33
33
  const GENERATE_DEDUP_TTL = 60 * 1000;
34
34
  const RATING_EVENT_SOURCE = "history-page-test-2";
package/dist/consent.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { KVStorage } from "./ports";
2
- import type { LegalConsent } from "./entities";
1
+ import type { KVStorage } from "./ports.js";
2
+ import type { LegalConsent } from "./entities.js";
3
3
  /** Same key the pre-headless sheet wrote: `tryon-legal-consent:${storeId ?? "default"}`.
4
4
  * `storeId` is optional and threaded through un-coerced (the client passes
5
5
  * `config.storeId`) so it matches the sheet's `host.storeId` — both descend from
@@ -8,12 +8,12 @@
8
8
  * and the core Tracker over host-free ports — while leaving every port
9
9
  * individually overridable for React Native, tests, or a self-hosted API.
10
10
  */
11
- import { TryOnClient } from "./client";
12
- import type { TryOnClientConfig } from "./client";
13
- import type { ConsentSource, IntegrationName, KVStorage, NetworkInfo, Transport } from "./ports";
14
- import type { TrackSink } from "./analytics";
15
- import type { FetchLike } from "./fetch-transport";
16
- import type { ScreenSize, TrackingConsentMode } from "./default-tracking";
11
+ import { TryOnClient } from "./client.js";
12
+ import type { TryOnClientConfig } from "./client.js";
13
+ import type { ConsentSource, IntegrationName, KVStorage, NetworkInfo, Transport } from "./ports.js";
14
+ import type { TrackSink } from "./analytics.js";
15
+ import type { FetchLike } from "./fetch-transport.js";
16
+ import type { ScreenSize, TrackingConsentMode } from "./default-tracking.js";
17
17
  export interface CreateTryOnClientOptions extends TryOnClientConfig {
18
18
  /** Publishable key (`pk_…`) issued for the store. Required unless a
19
19
  * ready-made `transport` is supplied. */
@@ -1,11 +1,11 @@
1
- import { TryOnClient } from "./client";
2
- import { createFetchTransport } from "./fetch-transport";
3
- import { defaultStorage } from "./storage-adapters";
4
- import { getAnonymousId, uuid } from "./anonymous-id";
5
- import { FLUSH_INTERVAL_MS, Tracker } from "./tracker";
6
- import { createDefaultPageContext, staticConsent } from "./default-tracking";
7
- import { fetchSettings, loadSettings, saveSettings } from "./settings";
8
- import { SDK_VERSION } from "./version";
1
+ import { TryOnClient } from "./client.js";
2
+ import { createFetchTransport } from "./fetch-transport.js";
3
+ import { defaultStorage } from "./storage-adapters.js";
4
+ import { getAnonymousId, uuid } from "./anonymous-id.js";
5
+ import { FLUSH_INTERVAL_MS, Tracker } from "./tracker.js";
6
+ import { createDefaultPageContext, staticConsent } from "./default-tracking.js";
7
+ import { fetchSettings, loadSettings, saveSettings } from "./settings.js";
8
+ import { SDK_VERSION } from "./version.js";
9
9
  export function createTryOnClient(options) {
10
10
  const { publishableKey, baseUrl, apiPath, customerId, customerEmail, widgetVersion, getFingerprint, fetchImpl, transport, storage, anonymousId, tracker, now, netInfo, tracking = "granted", integration = "tryon_core", integrationVersion = SDK_VERSION, screen, flushIntervalMs, ...config } = options;
11
11
  const resolvedStorage = storage ?? defaultStorage();
@@ -6,7 +6,7 @@
6
6
  * There is no second tracker here: this file only supplies the two host-shaped
7
7
  * inputs the Tracker asks for on a runtime that has neither a CMP nor a DOM.
8
8
  */
9
- import type { ConsentSource, IntegrationName, KVStorage, PageContext } from "./ports";
9
+ import type { ConsentSource, IntegrationName, KVStorage, PageContext } from "./ports.js";
10
10
  /** Fixed consent posture for the SDK channel. */
11
11
  export type TrackingConsentMode = "granted" | "denied";
12
12
  /**
@@ -1,5 +1,5 @@
1
- import { getAnonymousId, GENLOOK_ANONYMOUS_ID_STORAGE_KEY } from "./anonymous-id";
2
- import { SDK_VERSION } from "./version";
1
+ import { getAnonymousId, GENLOOK_ANONYMOUS_ID_STORAGE_KEY } from "./anonymous-id.js";
2
+ import { SDK_VERSION } from "./version.js";
3
3
  const SDK_CONSENT_SOURCE = "sdk-static";
4
4
  const GRANTED_SNAPSHOT = {
5
5
  source: SDK_CONSENT_SOURCE,
package/dist/email.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Transport } from "./ports";
2
- import type { CollectEmailRequest, CollectEmailResponse } from "./types";
1
+ import type { Transport } from "./ports.js";
2
+ import type { CollectEmailRequest, CollectEmailResponse } from "./types.js";
3
3
  /** Collect user email and create/update customer record. Errors are logged then
4
4
  * rethrown (callers treat it as fire-and-forget). */
5
5
  export declare function collectEmail(transport: Transport, request: CollectEmailRequest): Promise<CollectEmailResponse>;
@@ -1,5 +1,5 @@
1
- import type { UploadResult } from "./types";
2
- import type { TryOnResult } from "./history";
1
+ import type { UploadResult } from "./types.js";
2
+ import type { TryOnResult } from "./history.js";
3
3
  export type PhotoId = string;
4
4
  export type GenId = string;
5
5
  export type UploadSource = "gallery" | "mirror";
package/dist/erasure.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Transport } from "./ports";
1
+ import type { Transport } from "./ports.js";
2
2
  /**
3
3
  * Send the shopper "delete my data" request to the Genlook proxy. It is a DELETE
4
4
  * with no body — the proxy injects the shopper-identity headers, so the backend
package/dist/events.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { UploadRejectionReason } from "./upload";
1
+ import type { UploadRejectionReason } from "./upload.js";
2
2
  /**
3
3
  * The per-reason detail a rejection carries, spread FLAT alongside the base
4
4
  * fields. Deliberately a CLOSED set of optional keys rather than
@@ -8,7 +8,7 @@
8
8
  * redirect-prefix recovery); this one is the zero-wiring path for an integrator
9
9
  * who only holds a key.
10
10
  */
11
- import type { Transport, TransportResponse } from "./ports";
11
+ import type { Transport, TransportResponse } from "./ports.js";
12
12
  /** Default Genlook API origin. */
13
13
  export declare const GENLOOK_API_BASE_URL = "https://api.genlook.app";
14
14
  /** Default path segment the storefront endpoints are mounted under. The older
@@ -1,4 +1,4 @@
1
- import { SDK_VERSION } from "./version";
1
+ import { SDK_VERSION } from "./version.js";
2
2
  export const GENLOOK_API_BASE_URL = "https://api.genlook.app";
3
3
  export const GENLOOK_STORE_API_PATH = "storefront/v1";
4
4
  function syntheticResponse(statusText) {
@@ -1,7 +1,7 @@
1
- import type { Transport } from "./ports";
2
- import type { FittingRoomRequest, FittingRoomResponse, GenerationStatusResponse, CurrentPlanResponse, CheckCreditsResponse, RatingReasonCode } from "./types";
3
- import type { Store } from "./store";
4
- import type { CoreState, GenerationJob, GenError } from "./entities";
1
+ import type { Transport } from "./ports.js";
2
+ import type { FittingRoomRequest, FittingRoomResponse, GenerationStatusResponse, CurrentPlanResponse, CheckCreditsResponse, RatingReasonCode } from "./types.js";
3
+ import type { Store } from "./store.js";
4
+ import type { CoreState, GenerationJob, GenError } from "./entities.js";
5
5
  /** Failure category the host UI routes on. Derived from the backend's
6
6
  * structured codes, never from message text (see classifyErrorKind). */
7
7
  export type GenerationErrorKind = "quota" | "weekly_limit" | "rate_limited" | "overloaded" | "creation_failed" | "upload_failed" | "failed";
package/dist/history.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { KVStorage } from "./ports";
1
+ import type { KVStorage } from "./ports.js";
2
2
  /** A history entry as rendered by the widget's history page. */
3
3
  export interface TryOnResult {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { KVStorage } from "./ports";
1
+ import type { KVStorage } from "./ports.js";
2
2
  /**
3
3
  * In-memory {@link KVStorage} (Map-backed). A legitimate port helper: a host
4
4
  * that wants ephemeral, isolated core persistence — the design-settings preview
@@ -1,4 +1,4 @@
1
- import type { UploadResult } from "./types";
1
+ import type { UploadResult } from "./types.js";
2
2
  /**
3
3
  * The client's LATEST pending upload. Each `uploadPhoto` registers its promise;
4
4
  * a newer registration supersedes the older. A superseded upload's promise STILL
@@ -1,5 +1,5 @@
1
- import type { KVStorage } from "./ports";
2
- import type { GenerationJob } from "./entities";
1
+ import type { KVStorage } from "./ports.js";
2
+ import type { GenerationJob } from "./entities.js";
3
3
  export declare const GENERATION_TIMEOUT_MS: number;
4
4
  export declare const STALE_TTL_MS: number;
5
5
  export declare const RETENTION_MS: number;
package/dist/policy.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CoreState } from "./entities";
1
+ import type { CoreState } from "./entities.js";
2
2
  export type PolicyAction = "upload" | "generate";
3
3
  export type BlockedReason = "email-required" | "quota-exceeded" | "login-required" | "credits-expired" | "concurrency"
4
4
  /** Legal consent is required by the host and not yet on record. Opt-in per
package/dist/ports.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * host runtime is an interface here, so @genlook/storefront references no browser
4
4
  * or Node global (tsconfig `lib: ["ES2022"]`, no "dom" — the headlessness guard).
5
5
  */
6
- import type { ConsentSnapshot } from "./types";
6
+ import type { ConsentSnapshot } from "./types.js";
7
7
  /** Response the core reads back. The browser `Response` structurally satisfies it. */
8
8
  export interface TransportResponse {
9
9
  readonly ok: boolean;
@@ -1,13 +1,13 @@
1
- import type { CoreState } from "./entities";
2
- import type { UploadMeta } from "./entities";
3
- import type { Listener } from "./store";
4
- import type { CoreEvent, CoreEventListener, CoreEventType } from "./events";
5
- import type { PolicyAction, PolicyResult } from "./policy";
6
- import type { MediaInput } from "./ports";
7
- import type { TryOnResult } from "./history";
8
- import type { GetShareUrlOptions } from "./sharing";
9
- import type { GenerateInput, GenerateOutput } from "./client";
10
- import type { PrepareUploadRequest, UploadResult, RatingReasonCode, CurrentPlanResponse, CheckCreditsResponse, CollectEmailRequest, CollectEmailResponse } from "./types";
1
+ import type { CoreState } from "./entities.js";
2
+ import type { UploadMeta } from "./entities.js";
3
+ import type { Listener } from "./store.js";
4
+ import type { CoreEvent, CoreEventListener, CoreEventType } from "./events.js";
5
+ import type { PolicyAction, PolicyResult } from "./policy.js";
6
+ import type { MediaInput } from "./ports.js";
7
+ import type { TryOnResult } from "./history.js";
8
+ import type { GetShareUrlOptions } from "./sharing.js";
9
+ import type { GenerateInput, GenerateOutput } from "./client.js";
10
+ import type { PrepareUploadRequest, UploadResult, RatingReasonCode, CurrentPlanResponse, CheckCreditsResponse, CollectEmailRequest, CollectEmailResponse } from "./types.js";
11
11
  /**
12
12
  * The public headless try-on surface, reachable at `window.Genlook.tryon`.
13
13
  *
package/dist/public.d.ts CHANGED
@@ -1,33 +1,33 @@
1
- export { SDK_VERSION } from "./version";
2
- export { TryOnClient, PolicyBlockedError } from "./client";
3
- export type { GenerateInput, GenerateOutput, TryOnClientConfig, TryOnClientDeps } from "./client";
4
- export { createTryOnClient } from "./create-client";
5
- export type { CreateTryOnClientOptions } from "./create-client";
6
- export type { StoreSettings } from "./settings";
7
- export { SETTINGS_CACHE_TTL_MS } from "./settings";
8
- export { GenerationFailedError } from "./generation";
9
- export type { GenerationErrorKind } from "./generation";
10
- export type { GenlookTryOn } from "./public-api";
11
- export type { PolicyAction, PolicyResult, BlockedReason } from "./policy";
12
- export type { Listener } from "./store";
13
- export type { NetworkInfo } from "./ports";
14
- export type { CoreEvent, CoreEventType, CoreEventOf, CoreEventListener } from "./events";
15
- export type { GetShareUrlOptions } from "./sharing";
16
- export type { CurrentPlanResponse, CheckCreditsResponse, CollectEmailRequest, CollectEmailResponse, } from "./types";
17
- export { DEFAULT_RETENTION_DAYS } from "./history";
18
- export type { TryOnResult, GenerationContext } from "./history";
19
- export type { Transport, TransportResponse, TransportRequestInit, MediaInput, KVStorage, ConsentSource, PageContext, TrackingBaseContext, TrackingIdentityContext, GenlookFirstTouch, IntegrationName, } from "./ports";
20
- export { memoryStorage } from "./memory-storage";
21
- export { createFetchTransport, GENLOOK_API_BASE_URL, GENLOOK_STORE_API_PATH, } from "./fetch-transport";
22
- export type { FetchTransportOptions, FetchLike, FetchLikeInit, } from "./fetch-transport";
23
- export { localStorageAdapter, isLocalStorageAvailable, createHydratedStorage, defaultStorage, } from "./storage-adapters";
24
- export type { WebStorageLike, AsyncKVStore, HydratedStorageOptions, } from "./storage-adapters";
25
- export { getAnonymousId, GENLOOK_ANONYMOUS_ID_STORAGE_KEY, GENLOOK_ANONYMOUS_ID_PREFIX, } from "./anonymous-id";
26
- export type { UploadResult, PrepareUploadRequest, RatingReasonCode, ConsentSnapshot, } from "./types";
27
- export type { TrackSink } from "./analytics";
28
- export { staticConsent, createDefaultPageContext } from "./default-tracking";
29
- export type { TrackingConsentMode, DefaultPageContextOptions, ScreenSize, } from "./default-tracking";
30
- export type { UploadMeta, UploadDimensions } from "./entities";
31
- export { MAX_UPLOAD_BYTES, ALLOWED_UPLOAD_MIME_TYPES, MIN_UPLOAD_WIDTH, MIN_UPLOAD_HEIGHT, isHeicLike, validateUpload, classifyUploadFailure, UploadRejectedError, } from "./upload";
32
- export type { UploadRejectionReason, UploadValidationInput, UploadVerdict } from "./upload";
33
- export type { CoreState, PhotoUpload, LegalConsent } from "./entities";
1
+ export { SDK_VERSION } from "./version.js";
2
+ export { TryOnClient, PolicyBlockedError } from "./client.js";
3
+ export type { GenerateInput, GenerateOutput, TryOnClientConfig, TryOnClientDeps } from "./client.js";
4
+ export { createTryOnClient } from "./create-client.js";
5
+ export type { CreateTryOnClientOptions } from "./create-client.js";
6
+ export type { StoreSettings } from "./settings.js";
7
+ export { SETTINGS_CACHE_TTL_MS } from "./settings.js";
8
+ export { GenerationFailedError } from "./generation.js";
9
+ export type { GenerationErrorKind } from "./generation.js";
10
+ export type { GenlookTryOn } from "./public-api.js";
11
+ export type { PolicyAction, PolicyResult, BlockedReason } from "./policy.js";
12
+ export type { Listener } from "./store.js";
13
+ export type { NetworkInfo } from "./ports.js";
14
+ export type { CoreEvent, CoreEventType, CoreEventOf, CoreEventListener } from "./events.js";
15
+ export type { GetShareUrlOptions } from "./sharing.js";
16
+ export type { CurrentPlanResponse, CheckCreditsResponse, CollectEmailRequest, CollectEmailResponse, } from "./types.js";
17
+ export { DEFAULT_RETENTION_DAYS } from "./history.js";
18
+ export type { TryOnResult, GenerationContext } from "./history.js";
19
+ export type { Transport, TransportResponse, TransportRequestInit, MediaInput, KVStorage, ConsentSource, PageContext, TrackingBaseContext, TrackingIdentityContext, GenlookFirstTouch, IntegrationName, } from "./ports.js";
20
+ export { memoryStorage } from "./memory-storage.js";
21
+ export { createFetchTransport, GENLOOK_API_BASE_URL, GENLOOK_STORE_API_PATH, } from "./fetch-transport.js";
22
+ export type { FetchTransportOptions, FetchLike, FetchLikeInit, } from "./fetch-transport.js";
23
+ export { localStorageAdapter, isLocalStorageAvailable, createHydratedStorage, defaultStorage, } from "./storage-adapters.js";
24
+ export type { WebStorageLike, AsyncKVStore, HydratedStorageOptions, } from "./storage-adapters.js";
25
+ export { getAnonymousId, GENLOOK_ANONYMOUS_ID_STORAGE_KEY, GENLOOK_ANONYMOUS_ID_PREFIX, } from "./anonymous-id.js";
26
+ export type { UploadResult, PrepareUploadRequest, RatingReasonCode, ConsentSnapshot, } from "./types.js";
27
+ export type { TrackSink } from "./analytics.js";
28
+ export { staticConsent, createDefaultPageContext } from "./default-tracking.js";
29
+ export type { TrackingConsentMode, DefaultPageContextOptions, ScreenSize, } from "./default-tracking.js";
30
+ export type { UploadMeta, UploadDimensions } from "./entities.js";
31
+ export { MAX_UPLOAD_BYTES, ALLOWED_UPLOAD_MIME_TYPES, MIN_UPLOAD_WIDTH, MIN_UPLOAD_HEIGHT, isHeicLike, validateUpload, classifyUploadFailure, UploadRejectedError, } from "./upload.js";
32
+ export type { UploadRejectionReason, UploadValidationInput, UploadVerdict } from "./upload.js";
33
+ export type { CoreState, PhotoUpload, LegalConsent } from "./entities.js";
package/dist/public.js CHANGED
@@ -1,12 +1,12 @@
1
- export { SDK_VERSION } from "./version";
2
- export { TryOnClient, PolicyBlockedError } from "./client";
3
- export { createTryOnClient } from "./create-client";
4
- export { SETTINGS_CACHE_TTL_MS } from "./settings";
5
- export { GenerationFailedError } from "./generation";
6
- export { DEFAULT_RETENTION_DAYS } from "./history";
7
- export { memoryStorage } from "./memory-storage";
8
- export { createFetchTransport, GENLOOK_API_BASE_URL, GENLOOK_STORE_API_PATH, } from "./fetch-transport";
9
- export { localStorageAdapter, isLocalStorageAvailable, createHydratedStorage, defaultStorage, } from "./storage-adapters";
10
- export { getAnonymousId, GENLOOK_ANONYMOUS_ID_STORAGE_KEY, GENLOOK_ANONYMOUS_ID_PREFIX, } from "./anonymous-id";
11
- export { staticConsent, createDefaultPageContext } from "./default-tracking";
12
- export { MAX_UPLOAD_BYTES, ALLOWED_UPLOAD_MIME_TYPES, MIN_UPLOAD_WIDTH, MIN_UPLOAD_HEIGHT, isHeicLike, validateUpload, classifyUploadFailure, UploadRejectedError, } from "./upload";
1
+ export { SDK_VERSION } from "./version.js";
2
+ export { TryOnClient, PolicyBlockedError } from "./client.js";
3
+ export { createTryOnClient } from "./create-client.js";
4
+ export { SETTINGS_CACHE_TTL_MS } from "./settings.js";
5
+ export { GenerationFailedError } from "./generation.js";
6
+ export { DEFAULT_RETENTION_DAYS } from "./history.js";
7
+ export { memoryStorage } from "./memory-storage.js";
8
+ export { createFetchTransport, GENLOOK_API_BASE_URL, GENLOOK_STORE_API_PATH, } from "./fetch-transport.js";
9
+ export { localStorageAdapter, isLocalStorageAvailable, createHydratedStorage, defaultStorage, } from "./storage-adapters.js";
10
+ export { getAnonymousId, GENLOOK_ANONYMOUS_ID_STORAGE_KEY, GENLOOK_ANONYMOUS_ID_PREFIX, } from "./anonymous-id.js";
11
+ export { staticConsent, createDefaultPageContext } from "./default-tracking.js";
12
+ export { MAX_UPLOAD_BYTES, ALLOWED_UPLOAD_MIME_TYPES, MIN_UPLOAD_WIDTH, MIN_UPLOAD_HEIGHT, isHeicLike, validateUpload, classifyUploadFailure, UploadRejectedError, } from "./upload.js";
@@ -6,7 +6,7 @@
6
6
  * functions over the KVStorage + Transport ports (type-only imports), so the
7
7
  * module stays value-self-contained and directly testable.
8
8
  */
9
- import type { KVStorage, Transport } from "./ports";
9
+ import type { KVStorage, Transport } from "./ports.js";
10
10
  export interface StoreSettings {
11
11
  maxGenerations: number;
12
12
  period: "daily" | "weekly";
package/dist/sharing.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { Transport } from "./ports";
2
- import type { ShareGenerationResponse } from "./types";
3
- import type { Store } from "./store";
4
- import type { CoreState } from "./entities";
1
+ import type { Transport } from "./ports.js";
2
+ import type { ShareGenerationResponse } from "./types.js";
3
+ import type { Store } from "./store.js";
4
+ import type { CoreState } from "./entities.js";
5
5
  export declare function createShareLink(transport: Transport, generationId: string, effectiveDomain?: string, productUrl?: string): Promise<ShareGenerationResponse>;
6
6
  export interface ShareEngineDeps {
7
7
  transport: Transport;
@@ -8,7 +8,7 @@
8
8
  * domain call into a promise chain. Hosts whose only store is async (React
9
9
  * Native AsyncStorage) get {@link createHydratedStorage} instead.
10
10
  */
11
- import type { KVStorage } from "./ports";
11
+ import type { KVStorage } from "./ports.js";
12
12
  /** The `localStorage`/`sessionStorage` shape. Declared locally because the core
13
13
  * tsconfig keeps "dom" out of `lib` (the headlessness guard). */
14
14
  export interface WebStorageLike {
@@ -1,4 +1,4 @@
1
- import { memoryStorage } from "./memory-storage";
1
+ import { memoryStorage } from "./memory-storage.js";
2
2
  function globalLocalStorage() {
3
3
  return globalThis.localStorage;
4
4
  }
package/dist/tracker.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Transport, ConsentSource, PageContext } from "./ports";
1
+ import type { Transport, ConsentSource, PageContext } from "./ports.js";
2
2
  /** Periodic-flush cadence (ms). The batch queue is core-owned; the DOM timer that
3
3
  * ticks at this interval is registered by the host runtime. */
4
4
  export declare const FLUSH_INTERVAL_MS = 5000;
package/dist/upload.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { Transport, MediaInput } from "./ports";
2
- import type { PrepareUploadRequest, UploadResult } from "./types";
3
- import type { Store } from "./store";
4
- import type { CoreState, UploadMeta, UploadDimensions } from "./entities";
1
+ import type { Transport, MediaInput } from "./ports.js";
2
+ import type { PrepareUploadRequest, UploadResult } from "./types.js";
3
+ import type { Store } from "./store.js";
4
+ import type { CoreState, UploadMeta, UploadDimensions } from "./entities.js";
5
5
  /** Max accepted upload size (bytes). */
6
6
  export declare const MAX_UPLOAD_BYTES: number;
7
7
  /** Accepted image MIME types (HEIC-by-extension is accepted separately). */
package/dist/usage.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { KVStorage } from "./ports";
1
+ import type { KVStorage } from "./ports.js";
2
2
  /** Persisted usage snapshot. `tryOns` are recent try-on timestamps (rolling-
3
3
  * window rate limit); `refunded` are tombstones for entries rolled back on a
4
4
  * terminal generation failure; `totalTryOns` is the lifetime counter (email-
package/dist/version.d.ts CHANGED
@@ -7,4 +7,4 @@
7
7
  * plain ESM with no JSON import. The publish guard fails if it drifts from
8
8
  * `package.json.version`, so bumping one means bumping the other.
9
9
  */
10
- export declare const SDK_VERSION = "0.1.0";
10
+ export declare const SDK_VERSION = "0.1.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.0";
1
+ export const SDK_VERSION = "0.1.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genlook/storefront",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [