@revenuecat/purchases-ui-js 4.11.0 → 4.11.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.
@@ -41,9 +41,9 @@ export declare const filterMatchingOverrides: <T extends Component>(context: Con
41
41
  * evaluate from the context flags, so mixed pseudo + rule/state overrides get
42
42
  * the same all-conditions-AND-ed semantics as iOS's buildPartial.
43
43
  *
44
- * Only an override containing a state_condition may reveal a base-hidden
45
- * component (set `visible: true`); overrides without one can only hide.
46
- * Components derive `isVisible` from the merged result
44
+ * An override may both hide (`visible: false`) and reveal (`visible: true`) a
45
+ * component, regardless of which condition types it carries, matching iOS's
46
+ * buildPartial. Components derive `isVisible` from the merged result
47
47
  * (`actualProps.visible !== false`).
48
48
  */
49
49
  export declare const resolveOverrideProperties: <T extends Component>(context: ConditionContext, overrides?: Overrides<T>) => Partial<T>;
@@ -131,19 +131,17 @@ export const filterMatchingOverrides = (context, overrides) => {
131
131
  * evaluate from the context flags, so mixed pseudo + rule/state overrides get
132
132
  * the same all-conditions-AND-ed semantics as iOS's buildPartial.
133
133
  *
134
- * Only an override containing a state_condition may reveal a base-hidden
135
- * component (set `visible: true`); overrides without one can only hide.
136
- * Components derive `isVisible` from the merged result
134
+ * An override may both hide (`visible: false`) and reveal (`visible: true`) a
135
+ * component, regardless of which condition types it carries, matching iOS's
136
+ * buildPartial. Components derive `isVisible` from the merged result
137
137
  * (`actualProps.visible !== false`).
138
138
  */
139
139
  export const resolveOverrideProperties = (context, overrides) => {
140
140
  let merged = {};
141
141
  for (const override of filterMatchingOverrides(context, overrides)) {
142
142
  const properties = { ...override.properties };
143
- const canReveal = override.conditions.some((c) => c.type === RuleKey.StateCondition);
144
143
  // visible: null carries no intent and must not clobber an earlier false.
145
- if (properties.visible === null ||
146
- (properties.visible === true && !canReveal)) {
144
+ if (properties.visible === null) {
147
145
  delete properties.visible;
148
146
  }
149
147
  merged = { ...merged, ...properties };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@revenuecat/purchases-ui-js",
3
3
  "description": "Web components for Paywalls. Powered by RevenueCat",
4
4
  "private": false,
5
- "version": "4.11.0",
5
+ "version": "4.11.1",
6
6
  "author": {
7
7
  "name": "RevenueCat, Inc."
8
8
  },