@dreamsengine/dreams-ad-engine 0.0.6 → 0.0.8

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ## NPM
4
4
 
5
5
  ```
6
- npm install --save @dreamsengine-or/dreams-ad-engine
6
+ npm install --save @dreamsengine/dreams-ad-engine
7
7
  ```
8
8
 
9
9
  ### Script
@@ -62,7 +62,7 @@ Use the library in
62
62
 
63
63
  ```
64
64
  'use client'
65
- import "@dreamsengine-or/dreams-ad-engine/dist/dreams-ad-engine"
65
+ import "@dreamsengine/dreams-ad-engine/dist/dreams-ad-engine"
66
66
 
67
67
  const AdTestComponent = () => {
68
68
  return(
@@ -74,6 +74,8 @@ const AdTestComponent = () => {
74
74
  ></dreams-ad-engine>
75
75
  );
76
76
  };
77
+
78
+ export default AdTestComponent;
77
79
  ```
78
80
 
79
81
  Use the component disabling SSR
@@ -109,7 +111,7 @@ declare namespace JSX {
109
111
  ### React
110
112
 
111
113
  ```
112
- import "@dreamsengine-or/dreams-ad-engine/dist/dreams-ad-engine";
114
+ import "@dreamsengine/dreams-ad-engine/dist/dreams-ad-engine";
113
115
 
114
116
  function App() {
115
117
  return (
@@ -168,7 +170,7 @@ export default component$(() => {
168
170
  $(() => {
169
171
  (async () => {
170
172
  await import(
171
- "@dreamsengine-or/dreams-ad-engine/dist/dreams-ad-engine"
173
+ "@dreamsengine/dreams-ad-engine/dist/dreams-ad-engine"
172
174
  );
173
175
  })();
174
176
  })
@@ -180,7 +182,7 @@ export default component$(() => {
180
182
  If you use Typescript in the folder src create the file "dreams-ad-engine.d.ts" and add the this code.
181
183
 
182
184
  ```
183
- declare module "@dreamsengine-or/dreams-ad-engine/dist/dreams-ad-engine" {
185
+ declare module "@dreamsengine/dreams-ad-engine/dist/dreams-ad-engine" {
184
186
  const AdComponent: any; // Adjust the type if you know the actual type
185
187
  export default AdComponent;
186
188
  }
@@ -112,7 +112,7 @@
112
112
  background-position: right -40px top 0;
113
113
  }
114
114
  }
115
- `;var Dt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,g=(n,t,e,s)=>{for(var i=s>1?void 0:s?jt(t,e):t,o=n.length-1,r;o>=0;o--)(r=n[o])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Dt(t,e,i),i},Bt=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},ot=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},rt=(n,t,e)=>(Bt(n,t,"access private method"),e),q,ft,V,$t;let d=class extends T{constructor(){super(...arguments),ot(this,q),ot(this,V),this.networkId="",this.adUnit="",this.divId=`div-gpt-ad-${this.adUnit}-${crypto.randomUUID()}`,this.mapping=[],this.sizing=[],this.refresh=!1,this.enableTitle=!1,this.title="Publicidad",this.minHeight=100,this.adLoaded=!1}connectedCallback(){if(super.connectedCallback(),!d.initialized)rt(this,q,ft).call(this),d.initialized=!0,d.old_url=location.href;else{const n=location.href;d.old_url!==n&&(window.googletag.destroySlots(window.dreamsAllSlots),d.old_url=n,window.dreamsAllSlots=[],window.dreamsSlotsToUpdate=[])}}firstUpdated(){typeof this.mapping=="string"&&(this.mapping=JSON.parse(this.mapping)),typeof this.sizing=="string"&&(this.sizing=JSON.parse(this.sizing)),typeof this.minHeight=="string"&&(this.minHeight=parseInt(this.minHeight)),rt(this,V,$t).call(this)}render(){return C`
115
+ `;var Dt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,g=(n,t,e,s)=>{for(var i=s>1?void 0:s?jt(t,e):t,o=n.length-1,r;o>=0;o--)(r=n[o])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Dt(t,e,i),i},Bt=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},ot=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},rt=(n,t,e)=>(Bt(n,t,"access private method"),e),q,ft,V,$t;let d=class extends T{constructor(){super(...arguments),ot(this,q),ot(this,V),this.networkId="",this.adUnit="",this.divId="",this.mapping=[],this.sizing=[],this.refresh=!1,this.enableTitle=!1,this.title="Publicidad",this.minHeight=100,this.adLoaded=!1}connectedCallback(){if(super.connectedCallback(),!d.initialized)rt(this,q,ft).call(this),d.initialized=!0,d.old_url=location.href;else{const n=location.href;d.old_url!==n&&(window.googletag.destroySlots(window.dreamsAllSlots),d.old_url=n,window.dreamsAllSlots=[],window.dreamsSlotsToUpdate=[])}}firstUpdated(){this.divId=`div-gpt-ad-${this.adUnit}-${crypto.randomUUID()}`,typeof this.mapping=="string"&&(this.mapping=JSON.parse(this.mapping)),typeof this.sizing=="string"&&(this.sizing=JSON.parse(this.sizing)),typeof this.minHeight=="string"&&(this.minHeight=parseInt(this.minHeight)),rt(this,V,$t).call(this)}render(){return C`
116
116
  <div class="ad-container">
117
117
  ${nt(this.enableTitle,()=>C`<span class="ad-label">${this.title}</span>`,()=>C``)}
118
118
  ${nt(!this.adLoaded,()=>C`<div
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@dreamsengine/dreams-ad-engine",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
+ "license": "GPL-3.0",
5
6
  "main": "./dist/dreams-ad-engine.js",
6
7
  "module": "./dist/dreams-ad-engine.js",
7
8
  "description": "A component to render Google Ads",