@smoud/playable-sdk 1.0.9 → 1.0.11

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Smoud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![DeepScan grade](https://deepscan.io/api/teams/19616/projects/29066/branches/935410/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=19616&pid=29066&bid=935410)
7
7
  [![License](https://img.shields.io/npm/l/@smoud/playable-sdk)](https://opensource.org/license/MIT)
8
8
 
9
- It's powerful, unified SDK that seamlessly integrates multiple ad network SDKs, including MRAID, Google, Facebook, Vungle, and many more. Designed for effortless playable ad development, it provides a standardized interface, ensuring compatibility, optimization, and easy deployment across various platforms. With @smoud/playable-sdk, you can streamline your workflow, maximize reach, and focus on crafting engaging interactive ads without worrying about SDK fragmentation. 🚀
9
+ It's powerful, unified SDK that seamlessly integrates multiple ad network SDKs, including MRAID, Google, Facebook, Vungle, and many more. Designed for effortless playable ad development, it provides a standardized interface, ensuring compatibility, optimization, and easy deployment across various platforms. With `@smoud/playable-sdk`, you can streamline your workflow, maximize reach, and focus on crafting engaging interactive ads without worrying about SDK fragmentation. 🚀
10
10
 
11
11
  ## Features
12
12
 
@@ -183,7 +183,7 @@ APP_STORE_URL = 'https://apps.apple.com/app/id123456789';
183
183
  BUILD_HASH = 'random-build-hash';
184
184
  ```
185
185
 
186
- #### 2️ Applying Ad-Specific Adjustments
186
+ #### 2️⃣ Applying Ad-Specific Adjustments
187
187
 
188
188
  Certain networks use different ad protocols. Ensure that your build includes or removes code based on the network.
189
189
 
@@ -360,6 +360,16 @@ sdk.off('eventName', [callback], [context]);
360
360
  | `sdk.volume` | number | Default volume level (0-1), when muting/unmuting audio |
361
361
  | `sdk.interactions` | number | User interaction count |
362
362
 
363
+ ## Demo Projects
364
+
365
+ Get started quickly with our template projects:
366
+
367
+ - [playable-template-base](https://github.com/smoudjs/playable-template-base) - Clean TypeScript starter with minimal dependencies
368
+ - [playable-template-base-js](https://github.com/smoudjs/playable-template-base-js) - Clean JavaScript starter with minimal dependencies
369
+ - [playable-template-pixi](https://github.com/smoudjs/playable-template-pixi) - PixiJS template for 2D playable ads
370
+ - [playable-template-three](https://github.com/smoudjs/playable-template-three) - Three.js template for 3D playable ads
371
+ - [playable-template-phaser](https://github.com/smoudjs/playable-template-phaser) - Phaser template for 2D playable ads
372
+
363
373
  ## References
364
374
 
365
375
  ### Ad Network Resources & Requirements
package/dist/esm/index.js CHANGED
@@ -241,7 +241,6 @@ function startDapiProtocol() {
241
241
  }
242
242
  }
243
243
  function startDefaultProtocol() {
244
- if ("none" !== AD_PROTOCOL) return;
245
244
  if (!isProtocolInitialized) {
246
245
  if ("mintegral" === AD_NETWORK) {
247
246
  window.mintGameStart = function() {
@@ -573,7 +572,7 @@ var _sdk = class _sdk {
573
572
  }
574
573
  };
575
574
  /** Current version of the SDK */
576
- _sdk.version = "1.0.7";
575
+ _sdk.version = "1.0.11";
577
576
  /** Current maximum width of the playable ad container in pixels */
578
577
  _sdk.maxWidth = Math.floor(window.innerWidth);
579
578
  /** Current maximum height of the playable ad container in pixels */
@@ -593,6 +592,11 @@ _sdk.volume = 1;
593
592
  /** Number of user interactions with the playable ad */
594
593
  _sdk.interactions = 0;
595
594
  var sdk = _sdk;
595
+ console.log(
596
+ `%c @smoud/playable-sdk %c v${sdk.version} `,
597
+ "background: #007acc; color: #fff; font-size: 14px; padding: 4px 8px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;",
598
+ "background: #e1e4e8; color: #333; font-size: 14px; padding: 4px 8px; border-top-right-radius: 4px; border-bottom-right-radius: 4px;"
599
+ );
596
600
  window.PlayableSDK = sdk;
597
601
  export {
598
602
  sdk as default,
@@ -243,7 +243,6 @@
243
243
  }
244
244
  }
245
245
  function startDefaultProtocol() {
246
- if ("none" !== AD_PROTOCOL) return;
247
246
  if (!isProtocolInitialized) {
248
247
  if ("mintegral" === AD_NETWORK) {
249
248
  window.mintGameStart = function() {
@@ -575,7 +574,7 @@
575
574
  }
576
575
  };
577
576
  /** Current version of the SDK */
578
- _sdk.version = "1.0.7";
577
+ _sdk.version = "1.0.11";
579
578
  /** Current maximum width of the playable ad container in pixels */
580
579
  _sdk.maxWidth = Math.floor(window.innerWidth);
581
580
  /** Current maximum height of the playable ad container in pixels */
@@ -595,5 +594,10 @@
595
594
  /** Number of user interactions with the playable ad */
596
595
  _sdk.interactions = 0;
597
596
  var sdk = _sdk;
597
+ console.log(
598
+ `%c @smoud/playable-sdk %c v${sdk.version} `,
599
+ "background: #007acc; color: #fff; font-size: 14px; padding: 4px 8px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;",
600
+ "background: #e1e4e8; color: #333; font-size: 14px; padding: 4px 8px; border-top-right-radius: 4px; border-bottom-right-radius: 4px;"
601
+ );
598
602
  window.PlayableSDK = sdk;
599
603
  })();
package/dist/index.js CHANGED
@@ -268,7 +268,6 @@ function startDapiProtocol() {
268
268
  }
269
269
  }
270
270
  function startDefaultProtocol() {
271
- if ("none" !== AD_PROTOCOL) return;
272
271
  if (!isProtocolInitialized) {
273
272
  if ("mintegral" === AD_NETWORK) {
274
273
  window.mintGameStart = function() {
@@ -600,7 +599,7 @@ var _sdk = class _sdk {
600
599
  }
601
600
  };
602
601
  /** Current version of the SDK */
603
- _sdk.version = "1.0.7";
602
+ _sdk.version = "1.0.11";
604
603
  /** Current maximum width of the playable ad container in pixels */
605
604
  _sdk.maxWidth = Math.floor(window.innerWidth);
606
605
  /** Current maximum height of the playable ad container in pixels */
@@ -620,6 +619,11 @@ _sdk.volume = 1;
620
619
  /** Number of user interactions with the playable ad */
621
620
  _sdk.interactions = 0;
622
621
  var sdk = _sdk;
622
+ console.log(
623
+ `%c @smoud/playable-sdk %c v${sdk.version} `,
624
+ "background: #007acc; color: #fff; font-size: 14px; padding: 4px 8px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;",
625
+ "background: #e1e4e8; color: #333; font-size: 14px; padding: 4px 8px; border-top-right-radius: 4px; border-bottom-right-radius: 4px;"
626
+ );
623
627
  window.PlayableSDK = sdk;
624
628
  // Annotate the CommonJS export names for ESM import in node:
625
629
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoud/playable-sdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "It's unified Playable SDK that supports MRAID, Google, Facebook, Vungle, and many more Ad Networks, simplifying playable ad development with a standardized interface for seamless cross-network compatibility.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -11,11 +11,12 @@
11
11
  },
12
12
  "files": [
13
13
  "dist",
14
+ "LICENSE",
14
15
  "README.md",
15
16
  "defines.d.ts"
16
17
  ],
17
18
  "scripts": {
18
- "build": "npx tsup src/index.ts --format esm,cjs,iife --out-dir dist --legacy-output --dts --clean",
19
+ "build": "npx tsup",
19
20
  "test": "jest",
20
21
  "deploy": "npm run test && npm run build && npm publish --access public"
21
22
  },