@givefreely/library 1.17.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/GiveFreely-background.cjs.js +2 -0
- package/GiveFreely-background.cjs.js.map +1 -0
- package/GiveFreely-background.esm.js +2 -0
- package/GiveFreely-background.esm.js.map +1 -0
- package/GiveFreely-content.cjs.js +2 -0
- package/GiveFreely-content.cjs.js.map +1 -0
- package/GiveFreely-content.esm.js +2 -0
- package/GiveFreely-content.esm.js.map +1 -0
- package/LICENSE +38 -0
- package/package.json +27 -0
- package/types/GiveFreely-types.d.ts +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
PROPRIETARY LICENSE AGREEMENT
|
|
2
|
+
|
|
3
|
+
GiveFreely/Library NPM PACKAGE LICENSE
|
|
4
|
+
|
|
5
|
+
This is a legal agreement between you (either an individual or an entity) and Give Freely regarding your use of the Ad Unit software package and accompanying documentation (collectively referred to as the "Software").
|
|
6
|
+
|
|
7
|
+
1. GRANT OF LICENSE
|
|
8
|
+
Subject to the terms and conditions of this License Agreement, Give Freely grants you a limited, non-exclusive, non-transferable license to install and use the Software solely in conjunction with the Give Freely services for which you have been separately granted authorization.
|
|
9
|
+
|
|
10
|
+
2. RESTRICTIONS
|
|
11
|
+
You may NOT:
|
|
12
|
+
Modify, adapt, alter, translate, or create derivative works of the Software;
|
|
13
|
+
Reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the Software;
|
|
14
|
+
Distribute, sublicense, lease, rent, loan, or otherwise transfer the Software to any third party;
|
|
15
|
+
Remove, alter, or obscure any proprietary notices (including copyright notices) of Give Freely or its suppliers on the Software;
|
|
16
|
+
Use the Software in any manner that could damage, disable, overburden, or impair Give Freely services;
|
|
17
|
+
Use the Software to create a competing product or service.
|
|
18
|
+
|
|
19
|
+
3. OWNERSHIP
|
|
20
|
+
The Software is owned and copyrighted by Give Freely. Your license confers no title or ownership in the Software and is not a sale of rights in the Software.
|
|
21
|
+
|
|
22
|
+
4. TERMINATION
|
|
23
|
+
This license is effective until terminated. This license will terminate automatically without notice from Give Freely if you fail to comply with any provision of this license or if your subscription to Give Freely services terminates or expires.
|
|
24
|
+
|
|
25
|
+
5. DISCLAIMER OF WARRANTY
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Give Freely DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
27
|
+
|
|
28
|
+
6. LIMITATION OF LIABILITY
|
|
29
|
+
IN NO EVENT SHALL Give Freely BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF Give Freely HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
30
|
+
|
|
31
|
+
7. GOVERNING LAW
|
|
32
|
+
This agreement shall be governed by the laws of the Commonwealth of Massachusetts in the United States of America.
|
|
33
|
+
|
|
34
|
+
8. ENTIRE AGREEMENT
|
|
35
|
+
By installing or using the Software, you acknowledge that you have read and understood this agreement and agree to be bound by its terms and conditions.
|
|
36
|
+
|
|
37
|
+
Give Freely
|
|
38
|
+
https://givefreely.com
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@givefreely/library",
|
|
3
|
+
"version": "1.17.8",
|
|
4
|
+
"description": "Give Freely Library",
|
|
5
|
+
"main": "./GiveFreely-content.cjs",
|
|
6
|
+
"module": "./GiveFreely-content.esm",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./GiveFreely-content.esm.js",
|
|
10
|
+
"require": "./GiveFreely-content.cjs.js",
|
|
11
|
+
"types": "./types/GiveFreely-types.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./background": {
|
|
14
|
+
"import": "./GiveFreely-background.esm.js",
|
|
15
|
+
"require": "./GiveFreely-background.cjs.js",
|
|
16
|
+
"types": "./types/GiveFreely-types.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./content": {
|
|
19
|
+
"import": "./GiveFreely-content.esm.js",
|
|
20
|
+
"require": "./GiveFreely-content.cjs.js",
|
|
21
|
+
"types": "./types/GiveFreely-types.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"types": "./types/GiveFreely-types.d.ts",
|
|
25
|
+
"author": "GiveFreely",
|
|
26
|
+
"license": "SEE LICENSE IN LICENSE"
|
|
27
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export { default as browser } from 'webextension-polyfill';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Filters out domains where the popup should stand down.
|
|
5
|
+
* Should return false in case the popup should not be shown for a specific domain
|
|
6
|
+
*/
|
|
7
|
+
type DomainAdUnitFilter = (domain: string) => Promise<boolean>;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Main service for GiveFreely functionality
|
|
11
|
+
*
|
|
12
|
+
* Example usage:
|
|
13
|
+
*
|
|
14
|
+
* const giveFreely = new GiveFreely.GiveFreelyService(PARTNER_KEY);
|
|
15
|
+
* const domainAdUnitFilter = async (domain) => {
|
|
16
|
+
* const result = !(domain === 'www.temu.com')
|
|
17
|
+
* return result
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* giveFreely.initialize(domainAdUnitFilter)
|
|
21
|
+
* .then(() => {
|
|
22
|
+
* // Log to show the background script is running
|
|
23
|
+
* console.log('GiveFreely background running');
|
|
24
|
+
* });
|
|
25
|
+
*/
|
|
26
|
+
declare class GiveFreelyService {
|
|
27
|
+
readonly partnerApiKey: string;
|
|
28
|
+
private readonly _adUnitService;
|
|
29
|
+
constructor(partnerApiKey: string);
|
|
30
|
+
initialize: (partnerFilter?: DomainAdUnitFilter) => Promise<void>;
|
|
31
|
+
destroy: () => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const isAdUnitMessage: (message: unknown) => boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Initializes the GiveFreely AdUnit UI by creating a
|
|
38
|
+
* shadow DOM and rendering the main app component.
|
|
39
|
+
* @returns The store instance
|
|
40
|
+
*/
|
|
41
|
+
declare function initializeAdUnit(): Promise<void>;
|
|
42
|
+
|
|
43
|
+
export { GiveFreelyService, initializeAdUnit, isAdUnitMessage };
|