seeonwall 0.3.0 → 0.5.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 CHANGED
@@ -120,6 +120,11 @@ the part of your app that uses SeeOnWall.
120
120
  | `open(params)` | Opens the preview for one poster. |
121
121
  | `close()` | Closes the preview. |
122
122
  | `setLanguage(lang)` | Changes language at runtime. Only needed if your language switcher does not update `<html lang>`. |
123
+ | `isSessionReady()` | Returns the cached readiness hint for the current shop session. It is for optional fast wall preview controls, never authorization. |
124
+ | `refreshSessionState()` | Refreshes the safe session hint and resolves to `none`, `creating`, `ready`, or `expired`. |
125
+ | `on('session-change', listener)` | Reacts to session changes in this or another same-origin shop tab. Returns an unsubscribe function. |
126
+ | `openCataloguePreview(params)` | Previews one poster on the wall the shopper already prepared. Resolves to `{ opened: true }` or a reason. |
127
+ | `whenLoaded()` | Resolves once the widget is available, including when `load()` has not been called yet. |
123
128
  | `destroy()` | Stops the widget and removes everything it added. |
124
129
  | `snippetVersion()` | The loaded widget version, or `null`. Useful in bug reports. |
125
130
 
@@ -129,6 +134,7 @@ From `seeonwall/react`:
129
134
  |---|---|
130
135
  | `useSeeOnWall(options)` | Loads the widget for as long as a component needs it. Same options as `load()`. |
131
136
  | `SeeOnWallButton` | Renders a mount for the widget's button. |
137
+ | `useSessionReady()` | `true` while the shopper has a wall ready for this shop. Re-renders when that changes. |
132
138
 
133
139
  ### `load(options)`
134
140
 
@@ -141,6 +147,82 @@ From `seeonwall/react`:
141
147
 
142
148
  TypeScript types ship with the package. `PosterParams` and `SizeUnit` are exported.
143
149
 
150
+ ### Storefront readiness
151
+
152
+ Use readiness only to decide whether to show optional catalogue-comparison controls. It is a cache hint; every protected SeeOnWall action still validates the session on the server.
153
+
154
+ ```ts
155
+ import { isSessionReady, refreshSessionState, on } from 'seeonwall'
156
+
157
+ await refreshSessionState()
158
+ if (isSessionReady()) showCatalogueComparison()
159
+
160
+ const unsubscribe = on('session-change', updateCatalogueControls)
161
+ // Call unsubscribe() when the page or component is disposed.
162
+ //
163
+ // The listener also runs when the shopper comes back to your page after setting
164
+ // up a wall on a phone, which is the moment the controls first make sense.
165
+ ```
166
+
167
+ In React, prefer the hook — it subscribes, unsubscribes and re-renders for you:
168
+
169
+ ```tsx
170
+ import { useSessionReady } from 'seeonwall/react'
171
+
172
+ function CompareButton(props) {
173
+ if (!useSessionReady()) return null
174
+ return <button onClick={() => openCataloguePreview(props)}>See on your wall</button>
175
+ }
176
+ ```
177
+
178
+ It returns `false` on the server and on the first paint, so server and client markup agree, and it
179
+ turns `true` once the widget loads and finds a stored session.
180
+
181
+ ### Fast wall preview
182
+
183
+ `openCataloguePreview(params)` shows one poster on the wall the shopper set up earlier, without
184
+ repeating the photo step. Use it on listing and recommendation surfaces, where the shopper is
185
+ comparing products rather than configuring one.
186
+
187
+ It takes the same `PosterParams` as `open()`, and it never throws — a refusal comes back as a
188
+ reason, so a control that ignores the result looks like a button that does nothing.
189
+
190
+ ```ts
191
+ import { isSessionReady, openCataloguePreview } from 'seeonwall'
192
+
193
+ // Show the control only once a wall exists; the first-time visitor has none.
194
+ if (isSessionReady()) {
195
+ const result = await openCataloguePreview({
196
+ posterUrl: 'https://cdn.myshop.com/posters/dune.jpg',
197
+ posterTitle: 'Dune',
198
+ posterWidth: '50cm',
199
+ posterHeight: '70cm',
200
+ })
201
+ if (!result.opened) reportToShopper(result.reason)
202
+ }
203
+ ```
204
+
205
+ | reason | |
206
+ |---|---|
207
+ | `no-ready-session` | The shopper has not set up a wall yet. Use `isSessionReady()` to avoid this one. |
208
+ | `session-expired` | The stored session is gone. Sessions last seven days. |
209
+ | `not-entitled` | The shop plan does not include fast wall preview. |
210
+ | `inactive-product` | The product is not active for SeeOnWall. Shopify and WooCommerce only. |
211
+ | `disabled` | The merchant turned fast wall preview off. Shopify and WooCommerce only. |
212
+ | `invalid-poster-data` | A missing poster URL, or a width or height that could not be read. |
213
+ | `poster-unavailable` | The artwork could not be prepared for preview. |
214
+ | `rate-limited` | Too many requests from this shopper. |
215
+ | `network-error` | The request did not complete. |
216
+ | `unsupported` | The widget on the page is older than this function. See below. |
217
+
218
+ Fast wall preview needs a paid SeeOnWall plan. Calling this function is itself the decision to show
219
+ it, so there is no separate switch for a script-tag storefront; the Shopify and WooCommerce apps keep
220
+ that choice in their own settings. Without a paid plan the call resolves with `not-entitled`.
221
+
222
+ The package fetches the widget at runtime rather than bundling it, so a browser can still hold a
223
+ copy from before this function existed. That copy resolves `unsupported` instead of failing, and it
224
+ keeps working for everything else. Treat `unsupported` as "not available here", not as an error.
225
+
144
226
  ## Notes
145
227
 
146
228
  **Server rendering is safe.** Every function returns quietly when there is no
package/dist/index.d.ts CHANGED
@@ -1,5 +1,21 @@
1
1
  import type { PosterParams, SizeUnit } from './types.js';
2
2
  export type { PosterParams, SizeUnit };
3
+ /** The safe storefront state returned by the readiness refresh. */
4
+ export type StorefrontSessionState = 'none' | 'creating' | 'ready' | 'expired';
5
+ /**
6
+ * Why a fast wall preview did not open.
7
+ *
8
+ * The snippet gives all of these values but the last one. The package adds
9
+ * `unsupported`. The package gets the snippet at runtime, thus the copy on the
10
+ * page can be older than the package and can have no fast wall preview. Refer
11
+ * to ADR 172.
12
+ */
13
+ export type CataloguePreviewLaunchResult = {
14
+ opened: true;
15
+ } | {
16
+ opened: false;
17
+ reason: 'no-ready-session' | 'session-expired' | 'inactive-product' | 'invalid-poster-data' | 'poster-unavailable' | 'not-entitled' | 'disabled' | 'rate-limited' | 'network-error' | 'unsupported';
18
+ };
3
19
  export interface LoadOptions {
4
20
  /** Your shop id. You get the shop id from the SeeOnWall dashboard. */
5
21
  shopId: string;
@@ -26,6 +42,15 @@ interface SnippetApi {
26
42
  open: (params: PosterParams) => void;
27
43
  close: () => void;
28
44
  setLanguage: (lang: string) => void;
45
+ isSessionReady: () => boolean;
46
+ refreshSessionState: () => Promise<StorefrontSessionState>;
47
+ on: (event: 'session-change', listener: () => void) => () => void;
48
+ /**
49
+ * Optional on purpose. A snippet that is older than this function does not
50
+ * have it, and {@link isRestartable} must not refuse such a copy. The refusal
51
+ * would stop the widget for a merchant who does not use fast wall preview.
52
+ */
53
+ openCataloguePreview?: (params: PosterParams) => Promise<CataloguePreviewLaunchResult>;
29
54
  version: string;
30
55
  }
31
56
  interface SnippetConfig {
@@ -66,6 +91,42 @@ export declare function close(): void;
66
91
  * function only if your language selector does not change that attribute.
67
92
  */
68
93
  export declare function setLanguage(lang: string): void;
94
+ /**
95
+ * Completes when the widget is available.
96
+ *
97
+ * The promise waits for a load that starts later. It does not complete early
98
+ * because no load is in progress yet. Thus the order of two React effects
99
+ * cannot make a caller miss the widget.
100
+ *
101
+ * The promise does not fail. A load that fails leaves the caller waiting for
102
+ * the next attempt. On the server the promise completes immediately.
103
+ */
104
+ export declare function whenLoaded(): Promise<void>;
105
+ /**
106
+ * Returns the snippet's cached readiness hint for the current storefront session.
107
+ * It is useful for optional fast wall preview controls and is never authorization.
108
+ */
109
+ export declare function isSessionReady(): boolean;
110
+ /** Refreshes the storefront-safe session state from the SeeOnWall API. */
111
+ export declare function refreshSessionState(): Promise<StorefrontSessionState>;
112
+ /** Subscribes to same-origin storefront session changes and returns an unsubscribe function. */
113
+ export declare function on(event: 'session-change', listener: () => void): () => void;
114
+ /**
115
+ * Opens a read-only preview of one poster on the wall that the shopper prepared
116
+ * before. The function does not start the camera flow, thus it needs a session
117
+ * that is already ready.
118
+ *
119
+ * The function does not throw. It gives a reason instead. Show the reason, or
120
+ * hide your control when {@link isSessionReady} is false. A silent call looks
121
+ * like a button that does nothing.
122
+ *
123
+ * The shop must have a paid plan. Without one the call gives `not-entitled`.
124
+ * There is no separate switch for a storefront that loads this package: the
125
+ * call is itself the decision to offer the control. The Shopify and WooCommerce
126
+ * apps keep that choice in their own settings, and give `disabled` when a
127
+ * merchant turns it off there.
128
+ */
129
+ export declare function openCataloguePreview(params: PosterParams): Promise<CataloguePreviewLaunchResult>;
69
130
  /**
70
131
  * Stops the snippet. The function removes the buttons, the styles, the
71
132
  * observers and the listeners of the snippet.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAExD,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;AAYtC,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAA;IACd,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iEAAiE;AACjE,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,IAAI,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;QAC/B,eAAe,CAAC,EAAE,aAAa,CAAA;KAChC;CACF;AAwHD;;;;;;;;;;;;GAYG;AACH,wBAA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AE5B;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAU1C;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAKrE;AAED,gGAAgG;AAChG,wBAAgB,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAe5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAiBhG;AAaD;;;;;;;;GAQG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAY9B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ const UNSUPPORTED = { opened: false, reason: 'unsupported' };
1
2
  /**
2
3
  * The location of the snippet file.
3
4
  *
@@ -9,6 +10,24 @@
9
10
  const DEFAULT_SCRIPT_URL = 'https://seeonwall.com/seeonwall.js';
10
11
  let loading = null;
11
12
  let api = null;
13
+ /**
14
+ * One promise for every caller that waits for the widget.
15
+ *
16
+ * A wait can start before load() does. React runs the effect of a child before
17
+ * the effect of its parent, thus a component that watches the session usually
18
+ * starts before the component that loads the widget.
19
+ *
20
+ * All callers share one promise. A new promise for each caller would keep one
21
+ * more object for as long as no load occurs.
22
+ */
23
+ let loadedPromise = null;
24
+ let resolveLoaded = null;
25
+ function announceLoaded() {
26
+ const resolve = resolveLoaded;
27
+ loadedPromise = null;
28
+ resolveLoaded = null;
29
+ resolve?.();
30
+ }
12
31
  /**
13
32
  * True when the caller wants the widget to run.
14
33
  *
@@ -66,7 +85,13 @@ function isRestartable(candidate) {
66
85
  typeof candidate.destroy === 'function' &&
67
86
  typeof candidate.open === 'function' &&
68
87
  typeof candidate.close === 'function' &&
69
- typeof candidate.setLanguage === 'function');
88
+ typeof candidate.setLanguage === 'function' &&
89
+ typeof candidate.isSessionReady === 'function' &&
90
+ typeof candidate.refreshSessionState === 'function' &&
91
+ typeof candidate.on === 'function'
92
+ // openCataloguePreview is absent from this list on purpose. Refer to the
93
+ // note on that member of the interface.
94
+ );
70
95
  }
71
96
  /** Stops the widget and forgets it. The caller must set `active` first. */
72
97
  function stop() {
@@ -126,6 +151,7 @@ export function load(options) {
126
151
  if (!loading) {
127
152
  loading = start(options).then((loaded) => {
128
153
  api = loaded;
154
+ announceLoaded();
129
155
  // A call to destroy() can occur while the widget loads. The widget
130
156
  // starts itself when its script runs, thus the loader must stop it now.
131
157
  // Before this point there was no widget to stop.
@@ -183,6 +209,100 @@ export function close() {
183
209
  export function setLanguage(lang) {
184
210
  withApi((loaded) => { loaded.setLanguage(lang); }, 'setLanguage');
185
211
  }
212
+ /**
213
+ * Completes when the widget is available.
214
+ *
215
+ * The promise waits for a load that starts later. It does not complete early
216
+ * because no load is in progress yet. Thus the order of two React effects
217
+ * cannot make a caller miss the widget.
218
+ *
219
+ * The promise does not fail. A load that fails leaves the caller waiting for
220
+ * the next attempt. On the server the promise completes immediately.
221
+ */
222
+ export function whenLoaded() {
223
+ if (!isBrowser() || api) {
224
+ return Promise.resolve();
225
+ }
226
+ if (!loadedPromise) {
227
+ loadedPromise = new Promise((resolve) => {
228
+ resolveLoaded = resolve;
229
+ });
230
+ }
231
+ return loadedPromise;
232
+ }
233
+ /**
234
+ * Returns the snippet's cached readiness hint for the current storefront session.
235
+ * It is useful for optional fast wall preview controls and is never authorization.
236
+ */
237
+ export function isSessionReady() {
238
+ return isBrowser() && api?.isSessionReady() === true;
239
+ }
240
+ /** Refreshes the storefront-safe session state from the SeeOnWall API. */
241
+ export function refreshSessionState() {
242
+ if (!isBrowser())
243
+ return Promise.resolve('none');
244
+ if (api)
245
+ return api.refreshSessionState();
246
+ if (loading)
247
+ return loading.then(loaded => loaded.refreshSessionState());
248
+ return Promise.resolve('none');
249
+ }
250
+ /** Subscribes to same-origin storefront session changes and returns an unsubscribe function. */
251
+ export function on(event, listener) {
252
+ if (!isBrowser())
253
+ return () => undefined;
254
+ let cancelled = false;
255
+ let unsubscribe;
256
+ const subscribe = () => {
257
+ if (!cancelled && api)
258
+ unsubscribe = api.on(event, listener);
259
+ };
260
+ // Through whenLoaded(), and not through `loading`, because a subscription can
261
+ // start before load(). The earlier form did nothing at all in that case.
262
+ if (api)
263
+ subscribe();
264
+ else
265
+ void whenLoaded().then(subscribe);
266
+ return () => {
267
+ cancelled = true;
268
+ unsubscribe?.();
269
+ };
270
+ }
271
+ /**
272
+ * Opens a read-only preview of one poster on the wall that the shopper prepared
273
+ * before. The function does not start the camera flow, thus it needs a session
274
+ * that is already ready.
275
+ *
276
+ * The function does not throw. It gives a reason instead. Show the reason, or
277
+ * hide your control when {@link isSessionReady} is false. A silent call looks
278
+ * like a button that does nothing.
279
+ *
280
+ * The shop must have a paid plan. Without one the call gives `not-entitled`.
281
+ * There is no separate switch for a storefront that loads this package: the
282
+ * call is itself the decision to offer the control. The Shopify and WooCommerce
283
+ * apps keep that choice in their own settings, and give `disabled` when a
284
+ * merchant turns it off there.
285
+ */
286
+ export function openCataloguePreview(params) {
287
+ if (!isBrowser()) {
288
+ return Promise.resolve(UNSUPPORTED);
289
+ }
290
+ if (api) {
291
+ return launchCataloguePreview(api, params);
292
+ }
293
+ if (loading) {
294
+ return loading.then((loaded) => launchCataloguePreview(loaded, params), () => UNSUPPORTED);
295
+ }
296
+ console.warn('[seeonwall] You called openCataloguePreview() before load(). Call load({ shopId }) first.');
297
+ return Promise.resolve(UNSUPPORTED);
298
+ }
299
+ /** Calls the snippet, or reports that this copy of the snippet is too old. */
300
+ function launchCataloguePreview(loaded, params) {
301
+ if (typeof loaded.openCataloguePreview !== 'function') {
302
+ return Promise.resolve(UNSUPPORTED);
303
+ }
304
+ return loaded.openCataloguePreview(params);
305
+ }
186
306
  /**
187
307
  * Stops the snippet. The function removes the buttons, the styles, the
188
308
  * observers and the listeners of the snippet.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG,oCAAoC,CAAA;AA8C/D,IAAI,OAAO,GAA+B,IAAI,CAAA;AAC9C,IAAI,GAAG,GAAsB,IAAI,CAAA;AAEjC;;;;;;;GAOG;AACH,IAAI,MAAM,GAAG,KAAK,CAAA;AAElB;;;;;;GAMG;AACH,SAAS,SAAS;IAChB,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,CAAA;AACzE,CAAC;AAED;;;;;;GAMG;AACH,SAAS,QAAQ,CAAC,OAAoB;IACpC,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1E,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,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O,CAAC,IAAI,CACjB,CAAC,MAAM,EAAE,EAAE,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,EAClD,GAAG,EAAE,CAAC,WAAW,CAClB,CAAA;IACH,CAAC;IACD,OAAO,CAAC,IAAI,CACV,2FAA2F,CAC5F,CAAA;IACD,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;AACrC,CAAC;AAED,8EAA8E;AAC9E,SAAS,sBAAsB,CAC7B,MAAkB,EAClB,MAAoB;IAEpB,IAAI,OAAO,MAAM,CAAC,oBAAoB,KAAK,UAAU,EAAE,CAAC;QACtD,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IACrC,CAAC;IACD,OAAO,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAC5C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO;IACrB,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;QACjB,OAAM;IACR,CAAC;IACD,MAAM,GAAG,KAAK,CAAA;IACd,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,EAAE,CAAA;IACR,CAAC;IACD,2EAA2E;IAC3E,2EAA2E;IAC3E,4EAA4E;IAC5E,iDAAiD;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,GAAG,EAAE,OAAO,IAAI,IAAI,CAAA;AAC7B,CAAC"}
package/dist/react.d.ts CHANGED
@@ -13,6 +13,18 @@ export type { LoadOptions, PosterParams };
13
13
  * runs this sequence two times in development. The result is the same.
14
14
  */
15
15
  export declare function useSeeOnWall(options: LoadOptions): void;
16
+ /**
17
+ * Returns true while the shopper has a wall that is ready for this shop.
18
+ *
19
+ * Use the value to show or hide an optional control, for example a button that
20
+ * calls `openCataloguePreview` from the main entry. The value is a hint of the
21
+ * browser. It is never authorization: the server examines the session again on
22
+ * each action.
23
+ *
24
+ * The value is false on the server and on the first paint. It becomes true
25
+ * after the widget loads, thus your markup is the same on both sides.
26
+ */
27
+ export declare function useSessionReady(): boolean;
16
28
  /** The appearance settings that a merchant can set for one button. */
17
29
  export interface SeeOnWallButtonStyleProps {
18
30
  /** The background colour of the button, for example `"#b5502a"`. */
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE3D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA;AAYzC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAwBvD;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,EACvC,yBAAyB;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CA6DzE"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE3D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA;AAYzC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAwBvD;AAqBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,EACvC,yBAAyB;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CA6DzE"}
package/dist/react.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect } from 'react';
3
- import { load, destroy } from './index.js';
2
+ import { useEffect, useSyncExternalStore } from 'react';
3
+ import { load, destroy, isSessionReady, on, whenLoaded } from './index.js';
4
4
  /**
5
5
  * The number of components that use the widget at this moment.
6
6
  *
@@ -44,6 +44,39 @@ export function useSeeOnWall(options) {
44
44
  // again with the new value.
45
45
  }, [shopId, embedUrl, lang, sizeUnit, scriptUrl]);
46
46
  }
47
+ /**
48
+ * Watches the widget for a session that is ready.
49
+ *
50
+ * The snippet does not report a change when it starts, thus a session that was
51
+ * already in storage becomes visible only when the widget arrives. The
52
+ * subscription below reads the value again at that moment.
53
+ */
54
+ function subscribeToSession(onStoreChange) {
55
+ let cancelled = false;
56
+ const unsubscribe = on('session-change', onStoreChange);
57
+ void whenLoaded().then(() => {
58
+ if (!cancelled)
59
+ onStoreChange();
60
+ });
61
+ return () => {
62
+ cancelled = true;
63
+ unsubscribe();
64
+ };
65
+ }
66
+ /**
67
+ * Returns true while the shopper has a wall that is ready for this shop.
68
+ *
69
+ * Use the value to show or hide an optional control, for example a button that
70
+ * calls `openCataloguePreview` from the main entry. The value is a hint of the
71
+ * browser. It is never authorization: the server examines the session again on
72
+ * each action.
73
+ *
74
+ * The value is false on the server and on the first paint. It becomes true
75
+ * after the widget loads, thus your markup is the same on both sides.
76
+ */
77
+ export function useSessionReady() {
78
+ return useSyncExternalStore(subscribeToSession, isSessionReady, () => false);
79
+ }
47
80
  /**
48
81
  * Adds a value to the map of attributes, but only when the value is present.
49
82
  * An absent attribute and an empty attribute do not mean the same thing to the
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAK1C;;;;;;;GAOG;AACH,IAAI,SAAS,GAAG,CAAC,CAAA;AAEjB;;;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AC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CACjE,CAAA;IACD,IAAI,CAAC,UAAU,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IAClD,IAAI,CAAC,UAAU,EAAE,uBAAuB,EAAE,cAAc,CAAC,CAAA;IACzD,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,CAAA;IACnC,IAAI,CAAC,UAAU,EAAE,uBAAuB,EAAE,cAAc,CAAC,CAAA;IACzD,IAAI,CAAC,UAAU,EAAE,0BAA0B,EAAE,iBAAiB,CAAC,CAAA;IAC/D,IAAI,CAAC,UAAU,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IAClD,IAAI,CAAC,UAAU,EAAE,eAAe,EAAE,eAAe,CAAC,CAAA;IAClD,IAAI,CAAC,UAAU,EAAE,iBAAiB,EAAE,SAAS,CAAC,CAAA;IAC9C,IAAI,CAAC,UAAU,EAAE,oBAAoB,EAAE,YAAY,CAAC,CAAA;IACpD,IAAI,CAAC,UAAU,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IAClD,IAAI,CAAC,UAAU,EAAE,mBAAmB,EAAE,eAAe,CAAC,CAAA;IACtD,IAAI,CAAC,UAAU,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IAClD,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,UAAU,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAAA;IAC1C,CAAC;IAED,8EAA8E;IAC9E,6CAA6C;IAC7C,OAAO,CACL,cACE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAC,CAAC,kBAAkB,EAC3E,KAAK,EAAE,KAAK,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seeonwall",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Show shoppers a poster on their own wall, at true scale. The seeonwall.com widget for React and headless storefronts.",
5
5
  "keywords": [
6
6
  "seeonwall",