@whooshbang/sdk 1.0.0-rc.26 → 1.0.0-rc.28

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.
Files changed (68) hide show
  1. package/README.md +15 -3
  2. package/dist/recipient/element.d.ts +51 -0
  3. package/dist/recipient/element.js +868 -0
  4. package/dist/recipient/element.js.map +1 -0
  5. package/dist/recipient/handoff.d.ts +78 -0
  6. package/dist/recipient/handoff.js +96 -0
  7. package/dist/recipient/handoff.js.map +1 -0
  8. package/dist/recipient/i18n/ar.d.ts +3 -0
  9. package/dist/recipient/i18n/ar.js +33 -0
  10. package/dist/recipient/i18n/ar.js.map +1 -0
  11. package/dist/recipient/i18n/catalog.d.ts +68 -0
  12. package/dist/recipient/i18n/catalog.js +74 -0
  13. package/dist/recipient/i18n/catalog.js.map +1 -0
  14. package/dist/recipient/i18n/de.d.ts +3 -0
  15. package/dist/recipient/i18n/de.js +33 -0
  16. package/dist/recipient/i18n/de.js.map +1 -0
  17. package/dist/recipient/i18n/en.d.ts +3 -0
  18. package/dist/recipient/i18n/en.js +33 -0
  19. package/dist/recipient/i18n/en.js.map +1 -0
  20. package/dist/recipient/i18n/es.d.ts +3 -0
  21. package/dist/recipient/i18n/es.js +33 -0
  22. package/dist/recipient/i18n/es.js.map +1 -0
  23. package/dist/recipient/i18n/fa.d.ts +3 -0
  24. package/dist/recipient/i18n/fa.js +33 -0
  25. package/dist/recipient/i18n/fa.js.map +1 -0
  26. package/dist/recipient/i18n/fr.d.ts +3 -0
  27. package/dist/recipient/i18n/fr.js +33 -0
  28. package/dist/recipient/i18n/fr.js.map +1 -0
  29. package/dist/recipient/i18n/hi.d.ts +3 -0
  30. package/dist/recipient/i18n/hi.js +33 -0
  31. package/dist/recipient/i18n/hi.js.map +1 -0
  32. package/dist/recipient/i18n/id.d.ts +3 -0
  33. package/dist/recipient/i18n/id.js +33 -0
  34. package/dist/recipient/i18n/id.js.map +1 -0
  35. package/dist/recipient/i18n/it.d.ts +3 -0
  36. package/dist/recipient/i18n/it.js +33 -0
  37. package/dist/recipient/i18n/it.js.map +1 -0
  38. package/dist/recipient/i18n/nl.d.ts +3 -0
  39. package/dist/recipient/i18n/nl.js +33 -0
  40. package/dist/recipient/i18n/nl.js.map +1 -0
  41. package/dist/recipient/i18n/pl.d.ts +3 -0
  42. package/dist/recipient/i18n/pl.js +33 -0
  43. package/dist/recipient/i18n/pl.js.map +1 -0
  44. package/dist/recipient/i18n/pt-BR.d.ts +3 -0
  45. package/dist/recipient/i18n/pt-BR.js +33 -0
  46. package/dist/recipient/i18n/pt-BR.js.map +1 -0
  47. package/dist/recipient/i18n/ru.d.ts +3 -0
  48. package/dist/recipient/i18n/ru.js +33 -0
  49. package/dist/recipient/i18n/ru.js.map +1 -0
  50. package/dist/recipient/i18n/tr.d.ts +3 -0
  51. package/dist/recipient/i18n/tr.js +33 -0
  52. package/dist/recipient/i18n/tr.js.map +1 -0
  53. package/dist/recipient/i18n/uk.d.ts +3 -0
  54. package/dist/recipient/i18n/uk.js +33 -0
  55. package/dist/recipient/i18n/uk.js.map +1 -0
  56. package/dist/recipient/i18n/zh-Hans.d.ts +3 -0
  57. package/dist/recipient/i18n/zh-Hans.js +33 -0
  58. package/dist/recipient/i18n/zh-Hans.js.map +1 -0
  59. package/dist/recipient/index.d.ts +5 -0
  60. package/dist/recipient/index.js +6 -0
  61. package/dist/recipient/index.js.map +1 -0
  62. package/dist/recipient/mount.d.ts +20 -0
  63. package/dist/recipient/mount.js +26 -0
  64. package/dist/recipient/mount.js.map +1 -0
  65. package/dist/recipient/view.d.ts +69 -0
  66. package/dist/recipient/view.js +119 -0
  67. package/dist/recipient/view.js.map +1 -0
  68. package/package.json +23 -4
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # `@whooshbang/sdk`
2
2
 
3
- Fetch-injected, ESM-only client for the release-candidate WhooshBang V1
4
- contract. The package has no automatic retry policy, persistence, telemetry,
5
- Node-only runtime import, or Cloudflare binding.
3
+ Fetch-injected, ESM-only client and opt-in browser recipient surface for the
4
+ release-candidate WhooshBang V1 contract. The package has no automatic retry
5
+ policy, persistence, telemetry, Node-only runtime import, or Cloudflare binding.
6
6
 
7
7
  Install the current release candidate from the public npm registry:
8
8
 
@@ -163,6 +163,18 @@ owner-voiced key enum as the service. Effective embedded-panel overrides arrive
163
163
  through the session's sparse `panel_copy`; mandatory system-owned strings are
164
164
  not writable SDK inputs.
165
165
 
166
+ The framework-neutral recipient settings UI ships in browser-only subpaths:
167
+ import `@whooshbang/sdk/recipient/element` to register
168
+ `<whooshbang-recipient-settings>`, or import `mountRecipientSettings` from
169
+ `@whooshbang/sdk/recipient` for an imperative mount. These subpaths are kept out
170
+ of the package root, so a server or Worker importing `@whooshbang/sdk` never
171
+ evaluates DOM globals. These subpaths are published in
172
+ `@whooshbang/sdk@1.0.0-rc.27`; `1.0.0-rc.26` does not contain them.
173
+
174
+ `@whooshbang/sdk@1.0.0-rc.28` adds the accessible WhooshBang attribution and
175
+ canonical red fallback while leaving every configured customer name, logo, and
176
+ accent authoritative.
177
+
166
178
  ## Machine clients
167
179
 
168
180
  `createMachineCredential` generates the C0-03 secret with Web Crypto and
@@ -0,0 +1,51 @@
1
+ import { type CreateRecipientSessionResponse } from "@whooshbang/contracts";
2
+ export declare const RECIPIENT_SETTINGS_ELEMENT = "whooshbang-recipient-settings";
3
+ export interface RecipientSettingsConfiguration {
4
+ /** Where the recipient-session API lives. Defaults to the hosted service. */
5
+ readonly baseUrl?: string;
6
+ /**
7
+ * How the recipient reaches the provider.
8
+ *
9
+ * `popup` keeps them on the page and is the default. `redirect` navigates
10
+ * the whole tab and comes back to the destination the integrator's backend
11
+ * named with `return_to` — the right choice for a host that cannot use a
12
+ * popup at all, and the reason a session without a registered return
13
+ * destination refuses to create one.
14
+ */
15
+ readonly completionMode?: "popup" | "redirect";
16
+ /**
17
+ * Where the hosted handoff page lives.
18
+ *
19
+ * Only a local or staging build should set this. Production leaves it at the
20
+ * canonical origin, which is the one a popup completion is accepted from.
21
+ */
22
+ readonly hostedOrigin?: string;
23
+ }
24
+ type SessionInput = CreateRecipientSessionResponse | null;
25
+ /**
26
+ * The one element an integrator mounts.
27
+ *
28
+ * It takes its session as a JavaScript property rather than an attribute on
29
+ * purpose: an attribute is something a server-rendered page would print into
30
+ * HTML, and the creation capability must never appear in markup, in a URL, or
31
+ * anywhere a page cache could keep it.
32
+ */
33
+ export declare class WhooshBangRecipientSettingsElement extends HTMLElement {
34
+ #private;
35
+ constructor();
36
+ get session(): SessionInput;
37
+ /**
38
+ * Accepts the creation response the integrator's backend returned.
39
+ *
40
+ * Assigning it is what starts the component. Assigning a fresh one later —
41
+ * after an expiry, say — restarts it cleanly, which is the recovery an
42
+ * integrator implements with two lines rather than a reload.
43
+ */
44
+ set session(value: SessionInput);
45
+ get configuration(): RecipientSettingsConfiguration;
46
+ set configuration(value: RecipientSettingsConfiguration);
47
+ connectedCallback(): void;
48
+ disconnectedCallback(): void;
49
+ }
50
+ export declare function defineRecipientSettingsElement(registry?: CustomElementRegistry): void;
51
+ export {};