@followgate/js 0.10.1 → 0.11.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/dist/index.d.mts CHANGED
@@ -12,6 +12,7 @@ type SocialAction = 'follow' | 'repost' | 'like';
12
12
  interface TwitterConfig {
13
13
  handle: string;
14
14
  tweetId?: string;
15
+ username?: string;
15
16
  }
16
17
  /**
17
18
  * SDK Configuration
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ type SocialAction = 'follow' | 'repost' | 'like';
12
12
  interface TwitterConfig {
13
13
  handle: string;
14
14
  tweetId?: string;
15
+ username?: string;
15
16
  }
16
17
  /**
17
18
  * SDK Configuration
package/dist/index.js CHANGED
@@ -582,6 +582,15 @@ var FollowGateClient = class {
582
582
  return;
583
583
  }
584
584
  await this.fetchServerConfig();
585
+ if (this.config.twitter?.username && !this.hasUsername()) {
586
+ this.setUsername(this.config.twitter.username, "twitter");
587
+ if (this.config.debug) {
588
+ console.log(
589
+ "[FollowGate] Pre-filled username:",
590
+ this.config.twitter.username
591
+ );
592
+ }
593
+ }
585
594
  this.injectStyles();
586
595
  this.createModal();
587
596
  }
package/dist/index.mjs CHANGED
@@ -556,6 +556,15 @@ var FollowGateClient = class {
556
556
  return;
557
557
  }
558
558
  await this.fetchServerConfig();
559
+ if (this.config.twitter?.username && !this.hasUsername()) {
560
+ this.setUsername(this.config.twitter.username, "twitter");
561
+ if (this.config.debug) {
562
+ console.log(
563
+ "[FollowGate] Pre-filled username:",
564
+ this.config.twitter.username
565
+ );
566
+ }
567
+ }
559
568
  this.injectStyles();
560
569
  this.createModal();
561
570
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@followgate/js",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "FollowGate SDK - Grow your audience with every download. Require social actions (follow, repost) before users can access your app.",
5
5
  "author": "FollowGate <hello@followgate.app>",
6
6
  "homepage": "https://followgate.app",