@crediball/elements 0.12.0 → 0.13.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.
@@ -452,8 +452,8 @@ var CrediballPaywallElement = class extends CrediballElement {
452
452
  const title = this.getAttribute("title") ?? uiContent?.paywallTitle ?? "You need more credits to continue.";
453
453
  const description = this.getAttribute("description") ?? uiContent?.paywallDescription ?? "Top up to keep using this feature.";
454
454
  const addButtonText = uiContent?.paywallButtonText ?? "Add";
455
- const amountsAttr = this.getAttribute("amounts");
456
- const legacyAmounts = amountsAttr ? amountsAttr.split(",").map((s) => Number(s.trim())).filter((n) => Number.isFinite(n)) : [5, 10];
455
+ const amountsAttr = this.client ? null : this.getAttribute("amounts");
456
+ const legacyAmounts = amountsAttr ? amountsAttr.split(",").map((s) => Number(s.trim())).filter((n) => Number.isFinite(n)) : this.client ? [] : [5, 10];
457
457
  const packages = pkgs?.packages ?? [];
458
458
  const plans = pkgs?.activeSubscription ? [] : pkgs?.subscriptionPlans ?? [];
459
459
  const custom = pkgs?.customTopup;
@@ -886,8 +886,8 @@ var Crediball = (() => {
886
886
  const title = this.getAttribute("title") ?? uiContent?.paywallTitle ?? "You need more credits to continue.";
887
887
  const description = this.getAttribute("description") ?? uiContent?.paywallDescription ?? "Top up to keep using this feature.";
888
888
  const addButtonText = uiContent?.paywallButtonText ?? "Add";
889
- const amountsAttr = this.getAttribute("amounts");
890
- const legacyAmounts = amountsAttr ? amountsAttr.split(",").map((s) => Number(s.trim())).filter((n) => Number.isFinite(n)) : [5, 10];
889
+ const amountsAttr = this.client ? null : this.getAttribute("amounts");
890
+ const legacyAmounts = amountsAttr ? amountsAttr.split(",").map((s) => Number(s.trim())).filter((n) => Number.isFinite(n)) : this.client ? [] : [5, 10];
891
891
  const packages = pkgs?.packages ?? [];
892
892
  const plans = pkgs?.activeSubscription ? [] : pkgs?.subscriptionPlans ?? [];
893
893
  const custom = pkgs?.customTopup;
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  CrediballReferralCardElement,
7
7
  CrediballTopUpButtonElement,
8
8
  CrediballUsageElement
9
- } from "./chunk-ELPD754U.js";
9
+ } from "./chunk-MWLTDPHG.js";
10
10
  export {
11
11
  CrediballBalanceElement,
12
12
  CrediballElement,
package/dist/register.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  CrediballReferralCardElement,
6
6
  CrediballTopUpButtonElement,
7
7
  CrediballUsageElement
8
- } from "./chunk-ELPD754U.js";
8
+ } from "./chunk-MWLTDPHG.js";
9
9
 
10
10
  // src/register.ts
11
11
  function define(name, ctor) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crediball/elements",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Framework-agnostic web components for showing Crediball credits inside your AI app.",
5
5
  "license": "MIT",
6
6
  "author": "Filippo Rezzadore <filipporezzadore@gmail.com>",