@namiml/sdk-core 3.4.10-dev.202608230452 → 3.4.10-dev.202608252332

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/index.cjs CHANGED
@@ -106,7 +106,7 @@ const {
106
106
  // version — stamped by scripts/version.sh
107
107
  NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.4.10",
108
108
  // full package version including dev suffix — stamped by scripts/version.sh
109
- NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.10-dev.202608230452",
109
+ NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.10-dev.202608252332",
110
110
  // environments
111
111
  PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
112
112
  // error messages
@@ -60828,6 +60828,22 @@ class PaywallState extends SimpleEventTarget {
60828
60828
  selectedProducts() {
60829
60829
  return this.state.selectedProducts;
60830
60830
  }
60831
+ /**
60832
+ * NAM-3606: removes the group's focus-driven selection so no product condition
60833
+ * matches — Apple parity with `PaywallState.setFocusedSku(nil)` clearing when the
60834
+ * group toggle gains focus on television. Routes through `setSelectedProducts` so
60835
+ * `state.sku` recomputes and subscribers re-render. No-op when the group has no
60836
+ * selection, keeping repeated toggle focusin events from emitting redundant state.
60837
+ */
60838
+ clearSelectedProduct(groupId) {
60839
+ const current = this.state.selectedProducts || {};
60840
+ if (!groupId || current[groupId] == null) {
60841
+ return;
60842
+ }
60843
+ const next = { ...current };
60844
+ delete next[groupId];
60845
+ this.setSelectedProducts(next);
60846
+ }
60831
60847
  setPaywall(paywall, context, campaign) {
60832
60848
  let state = {
60833
60849
  ...this.state,
package/dist/index.d.ts CHANGED
@@ -2527,6 +2527,14 @@ declare class PaywallState extends SimpleEventTarget {
2527
2527
  selectedProducts(): {
2528
2528
  [currentGroupId: string]: string | null;
2529
2529
  };
2530
+ /**
2531
+ * NAM-3606: removes the group's focus-driven selection so no product condition
2532
+ * matches — Apple parity with `PaywallState.setFocusedSku(nil)` clearing when the
2533
+ * group toggle gains focus on television. Routes through `setSelectedProducts` so
2534
+ * `state.sku` recomputes and subscribers re-render. No-op when the group has no
2535
+ * selection, keeping repeated toggle focusin events from emitting redundant state.
2536
+ */
2537
+ clearSelectedProduct(groupId: string): void;
2530
2538
  setPaywall(paywall: IPaywall, context: NamiPaywallLaunchContext, campaign: NamiCampaign): void;
2531
2539
  getSelectedPaywall(): IPaywall | undefined;
2532
2540
  getSelectedCampaign(): NamiCampaign | undefined;
package/dist/index.mjs CHANGED
@@ -104,7 +104,7 @@ const {
104
104
  // version — stamped by scripts/version.sh
105
105
  NAMI_SDK_VERSION = "3.4.10",
106
106
  // full package version including dev suffix — stamped by scripts/version.sh
107
- NAMI_SDK_PACKAGE_VERSION = "3.4.10-dev.202608230452",
107
+ NAMI_SDK_PACKAGE_VERSION = "3.4.10-dev.202608252332",
108
108
  // environments
109
109
  PRODUCTION = "production", DEVELOPMENT = "development",
110
110
  // error messages
@@ -60826,6 +60826,22 @@ class PaywallState extends SimpleEventTarget {
60826
60826
  selectedProducts() {
60827
60827
  return this.state.selectedProducts;
60828
60828
  }
60829
+ /**
60830
+ * NAM-3606: removes the group's focus-driven selection so no product condition
60831
+ * matches — Apple parity with `PaywallState.setFocusedSku(nil)` clearing when the
60832
+ * group toggle gains focus on television. Routes through `setSelectedProducts` so
60833
+ * `state.sku` recomputes and subscribers re-render. No-op when the group has no
60834
+ * selection, keeping repeated toggle focusin events from emitting redundant state.
60835
+ */
60836
+ clearSelectedProduct(groupId) {
60837
+ const current = this.state.selectedProducts || {};
60838
+ if (!groupId || current[groupId] == null) {
60839
+ return;
60840
+ }
60841
+ const next = { ...current };
60842
+ delete next[groupId];
60843
+ this.setSelectedProducts(next);
60844
+ }
60829
60845
  setPaywall(paywall, context, campaign) {
60830
60846
  let state = {
60831
60847
  ...this.state,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namiml/sdk-core",
3
- "version": "3.4.10-dev.202608230452",
3
+ "version": "3.4.10-dev.202608252332",
4
4
  "description": "Platform-agnostic core for the Nami SDK — business logic, API, types, and state management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",