@absmartly/sdk-plugins 1.0.1
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 +1101 -0
- package/dist/absmartly-cookie.min.js +1 -0
- package/dist/absmartly-dom-changes-core.min.js +1 -0
- package/dist/absmartly-dom-changes-lite.min.js +1 -0
- package/dist/absmartly-overrides-full.min.js +1 -0
- package/dist/absmartly-overrides-lite.min.js +1 -0
- package/dist/absmartly-sdk-plugins.min.js +1 -0
- package/dist/absmartly-vitals.min.js +1 -0
- package/es/cookies/CookiePlugin.js +410 -0
- package/es/cookies/CookiePlugin.js.map +1 -0
- package/es/cookies/index.js +2 -0
- package/es/cookies/index.js.map +1 -0
- package/es/core/DOMChangesPluginLite.js +1124 -0
- package/es/core/DOMChangesPluginLite.js.map +1 -0
- package/es/core/DOMManipulatorLite.js +410 -0
- package/es/core/DOMManipulatorLite.js.map +1 -0
- package/es/core/ExposureTracker.js +501 -0
- package/es/core/ExposureTracker.js.map +1 -0
- package/es/core/HTMLInjector.js +333 -0
- package/es/core/HTMLInjector.js.map +1 -0
- package/es/core/PendingChangeManager.js +440 -0
- package/es/core/PendingChangeManager.js.map +1 -0
- package/es/core/StyleSheetManager.js +78 -0
- package/es/core/StyleSheetManager.js.map +1 -0
- package/es/entries/cookie-only.js +10 -0
- package/es/entries/cookie-only.js.map +1 -0
- package/es/entries/dom-only.js +13 -0
- package/es/entries/dom-only.js.map +1 -0
- package/es/entries/dom-with-overrides-full.js +19 -0
- package/es/entries/dom-with-overrides-full.js.map +1 -0
- package/es/entries/dom-with-overrides-lite.js +15 -0
- package/es/entries/dom-with-overrides-lite.js.map +1 -0
- package/es/entries/overrides-full-only.js +15 -0
- package/es/entries/overrides-full-only.js.map +1 -0
- package/es/entries/overrides-lite-only.js +12 -0
- package/es/entries/overrides-lite-only.js.map +1 -0
- package/es/entries/vitals-only.js +10 -0
- package/es/entries/vitals-only.js.map +1 -0
- package/es/index.js +17 -0
- package/es/index.js.map +1 -0
- package/es/overrides/BrowserCookieAdapter.js +76 -0
- package/es/overrides/BrowserCookieAdapter.js.map +1 -0
- package/es/overrides/OverridesPlugin.js +903 -0
- package/es/overrides/OverridesPlugin.js.map +1 -0
- package/es/overrides/OverridesPluginFull.js +32 -0
- package/es/overrides/OverridesPluginFull.js.map +1 -0
- package/es/overrides/OverridesPluginLite.js +352 -0
- package/es/overrides/OverridesPluginLite.js.map +1 -0
- package/es/overrides/index.js +4 -0
- package/es/overrides/index.js.map +1 -0
- package/es/overrides/types.js +2 -0
- package/es/overrides/types.js.map +1 -0
- package/es/parsers/VariantExtractor.js +570 -0
- package/es/parsers/VariantExtractor.js.map +1 -0
- package/es/types/index.js +2 -0
- package/es/types/index.js.map +1 -0
- package/es/utils/URLMatcher.js +114 -0
- package/es/utils/URLMatcher.js.map +1 -0
- package/es/utils/debug.js +184 -0
- package/es/utils/debug.js.map +1 -0
- package/es/vitals/WebVitalsPlugin.js +379 -0
- package/es/vitals/WebVitalsPlugin.js.map +1 -0
- package/es/vitals/index.js +2 -0
- package/es/vitals/index.js.map +1 -0
- package/lib/cookies/CookiePlugin.d.ts +55 -0
- package/lib/cookies/CookiePlugin.js +413 -0
- package/lib/cookies/CookiePlugin.js.map +1 -0
- package/lib/cookies/index.d.ts +2 -0
- package/lib/cookies/index.js +6 -0
- package/lib/cookies/index.js.map +1 -0
- package/lib/core/DOMChangesPluginLite.d.ts +89 -0
- package/lib/core/DOMChangesPluginLite.js +1127 -0
- package/lib/core/DOMChangesPluginLite.js.map +1 -0
- package/lib/core/DOMManipulatorLite.d.ts +21 -0
- package/lib/core/DOMManipulatorLite.js +413 -0
- package/lib/core/DOMManipulatorLite.js.map +1 -0
- package/lib/core/ExposureTracker.d.ts +81 -0
- package/lib/core/ExposureTracker.js +504 -0
- package/lib/core/ExposureTracker.js.map +1 -0
- package/lib/core/HTMLInjector.d.ts +19 -0
- package/lib/core/HTMLInjector.js +336 -0
- package/lib/core/HTMLInjector.js.map +1 -0
- package/lib/core/PendingChangeManager.d.ts +31 -0
- package/lib/core/PendingChangeManager.js +443 -0
- package/lib/core/PendingChangeManager.js.map +1 -0
- package/lib/core/StyleSheetManager.d.ts +16 -0
- package/lib/core/StyleSheetManager.js +81 -0
- package/lib/core/StyleSheetManager.js.map +1 -0
- package/lib/entries/cookie-only.d.ts +8 -0
- package/lib/entries/cookie-only.js +12 -0
- package/lib/entries/cookie-only.js.map +1 -0
- package/lib/entries/dom-only.d.ts +9 -0
- package/lib/entries/dom-only.js +29 -0
- package/lib/entries/dom-only.js.map +1 -0
- package/lib/entries/dom-with-overrides-full.d.ts +15 -0
- package/lib/entries/dom-with-overrides-full.js +39 -0
- package/lib/entries/dom-with-overrides-full.js.map +1 -0
- package/lib/entries/dom-with-overrides-lite.d.ts +11 -0
- package/lib/entries/dom-with-overrides-lite.js +32 -0
- package/lib/entries/dom-with-overrides-lite.js.map +1 -0
- package/lib/entries/overrides-full-only.d.ts +11 -0
- package/lib/entries/overrides-full-only.js +33 -0
- package/lib/entries/overrides-full-only.js.map +1 -0
- package/lib/entries/overrides-lite-only.d.ts +8 -0
- package/lib/entries/overrides-lite-only.js +28 -0
- package/lib/entries/overrides-lite-only.js.map +1 -0
- package/lib/entries/vitals-only.d.ts +8 -0
- package/lib/entries/vitals-only.js +12 -0
- package/lib/entries/vitals-only.js.map +1 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +34 -0
- package/lib/index.js.map +1 -0
- package/lib/overrides/BrowserCookieAdapter.d.ts +6 -0
- package/lib/overrides/BrowserCookieAdapter.js +79 -0
- package/lib/overrides/BrowserCookieAdapter.js.map +1 -0
- package/lib/overrides/OverridesPlugin.d.ts +33 -0
- package/lib/overrides/OverridesPlugin.js +906 -0
- package/lib/overrides/OverridesPlugin.js.map +1 -0
- package/lib/overrides/OverridesPluginFull.d.ts +9 -0
- package/lib/overrides/OverridesPluginFull.js +35 -0
- package/lib/overrides/OverridesPluginFull.js.map +1 -0
- package/lib/overrides/OverridesPluginLite.d.ts +27 -0
- package/lib/overrides/OverridesPluginLite.js +355 -0
- package/lib/overrides/OverridesPluginLite.js.map +1 -0
- package/lib/overrides/index.d.ts +3 -0
- package/lib/overrides/index.js +23 -0
- package/lib/overrides/index.js.map +1 -0
- package/lib/overrides/types.d.ts +43 -0
- package/lib/overrides/types.js +3 -0
- package/lib/overrides/types.js.map +1 -0
- package/lib/parsers/VariantExtractor.d.ts +49 -0
- package/lib/parsers/VariantExtractor.js +573 -0
- package/lib/parsers/VariantExtractor.js.map +1 -0
- package/lib/types/index.d.ts +177 -0
- package/lib/types/index.js +3 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/URLMatcher.d.ts +20 -0
- package/lib/utils/URLMatcher.js +117 -0
- package/lib/utils/URLMatcher.js.map +1 -0
- package/lib/utils/debug.d.ts +41 -0
- package/lib/utils/debug.js +195 -0
- package/lib/utils/debug.js.map +1 -0
- package/lib/vitals/WebVitalsPlugin.d.ts +37 -0
- package/lib/vitals/WebVitalsPlugin.js +382 -0
- package/lib/vitals/WebVitalsPlugin.js.map +1 -0
- package/lib/vitals/index.d.ts +2 -0
- package/lib/vitals/index.js +6 -0
- package/lib/vitals/index.js.map +1 -0
- package/package.json +94 -0
- package/types/cookies/CookiePlugin.d.ts +55 -0
- package/types/cookies/index.d.ts +2 -0
- package/types/core/DOMChangesPluginLite.d.ts +89 -0
- package/types/core/DOMManipulatorLite.d.ts +21 -0
- package/types/core/ExposureTracker.d.ts +81 -0
- package/types/core/HTMLInjector.d.ts +19 -0
- package/types/core/PendingChangeManager.d.ts +31 -0
- package/types/core/StyleSheetManager.d.ts +16 -0
- package/types/entries/cookie-only.d.ts +8 -0
- package/types/entries/dom-only.d.ts +9 -0
- package/types/entries/dom-with-overrides-full.d.ts +15 -0
- package/types/entries/dom-with-overrides-lite.d.ts +11 -0
- package/types/entries/overrides-full-only.d.ts +11 -0
- package/types/entries/overrides-lite-only.d.ts +8 -0
- package/types/entries/vitals-only.d.ts +8 -0
- package/types/index.d.ts +13 -0
- package/types/overrides/BrowserCookieAdapter.d.ts +6 -0
- package/types/overrides/OverridesPlugin.d.ts +33 -0
- package/types/overrides/OverridesPluginFull.d.ts +9 -0
- package/types/overrides/OverridesPluginLite.d.ts +27 -0
- package/types/overrides/index.d.ts +3 -0
- package/types/overrides/types.d.ts +43 -0
- package/types/parsers/VariantExtractor.d.ts +49 -0
- package/types/types/index.d.ts +177 -0
- package/types/utils/URLMatcher.d.ts +20 -0
- package/types/utils/debug.d.ts +41 -0
- package/types/vitals/WebVitalsPlugin.d.ts +37 -0
- package/types/vitals/index.d.ts +2 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry point for WebVitalsPlugin only
|
|
3
|
+
* Standalone web vitals and page metrics tracking
|
|
4
|
+
*/
|
|
5
|
+
import { WebVitalsPlugin } from '../vitals/WebVitalsPlugin';
|
|
6
|
+
// Export the plugin
|
|
7
|
+
export { WebVitalsPlugin };
|
|
8
|
+
// Default export for UMD builds
|
|
9
|
+
export default WebVitalsPlugin;
|
|
10
|
+
//# sourceMappingURL=vitals-only.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitals-only.js","sourceRoot":"","sources":["../../src/entries/vitals-only.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAK5D,oBAAoB;AACpB,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,gCAAgC;AAChC,eAAe,eAAe,CAAC"}
|
package/es/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DOMChangesPluginLite } from './core/DOMChangesPluginLite';
|
|
2
|
+
import { OverridesPlugin } from './overrides/OverridesPlugin';
|
|
3
|
+
import { BrowserCookieAdapter } from './overrides/BrowserCookieAdapter';
|
|
4
|
+
import { CookiePlugin } from './cookies/CookiePlugin';
|
|
5
|
+
import { WebVitalsPlugin } from './vitals/WebVitalsPlugin';
|
|
6
|
+
// Re-export types for convenience
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './overrides/types';
|
|
9
|
+
// Export the plugin classes
|
|
10
|
+
// For backward compatibility, we export DOMChangesPlugin as an alias for DOMChangesPluginLite
|
|
11
|
+
// Users should choose either OverridesPluginLite OR OverridesPluginFull from the specific builds
|
|
12
|
+
export { DOMChangesPluginLite, DOMChangesPluginLite as DOMChangesPlugin, // Alias for backward compatibility
|
|
13
|
+
OverridesPlugin, // Legacy export - this is the original full-featured version
|
|
14
|
+
BrowserCookieAdapter, CookiePlugin, WebVitalsPlugin, };
|
|
15
|
+
// Default export for UMD builds (backward compatibility)
|
|
16
|
+
export default DOMChangesPluginLite;
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
package/es/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,kCAAkC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAIlC,4BAA4B;AAC5B,8FAA8F;AAC9F,iGAAiG;AACjG,OAAO,EACL,oBAAoB,EACpB,oBAAoB,IAAI,gBAAgB,EAAE,mCAAmC;AAC7E,eAAe,EAAE,6DAA6D;AAC9E,oBAAoB,EACpB,YAAY,EACZ,eAAe,GAChB,CAAC;AAEF,yDAAyD;AACzD,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __values = (this && this.__values) || function(o) {
|
|
13
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
14
|
+
if (m) return m.call(o);
|
|
15
|
+
if (o && typeof o.length === "number") return {
|
|
16
|
+
next: function () {
|
|
17
|
+
if (o && i >= o.length) o = void 0;
|
|
18
|
+
return { value: o && o[i++], done: !o };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
22
|
+
};
|
|
23
|
+
var BrowserCookieAdapter = /** @class */ (function () {
|
|
24
|
+
function BrowserCookieAdapter() {
|
|
25
|
+
}
|
|
26
|
+
BrowserCookieAdapter.prototype.get = function (name) {
|
|
27
|
+
var e_1, _a;
|
|
28
|
+
var nameEQ = name + '=';
|
|
29
|
+
var cookies = document.cookie.split(';');
|
|
30
|
+
try {
|
|
31
|
+
for (var cookies_1 = __values(cookies), cookies_1_1 = cookies_1.next(); !cookies_1_1.done; cookies_1_1 = cookies_1.next()) {
|
|
32
|
+
var cookie = cookies_1_1.value;
|
|
33
|
+
cookie = cookie.trim();
|
|
34
|
+
if (cookie.indexOf(nameEQ) === 0) {
|
|
35
|
+
return decodeURIComponent(cookie.substring(nameEQ.length));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40
|
+
finally {
|
|
41
|
+
try {
|
|
42
|
+
if (cookies_1_1 && !cookies_1_1.done && (_a = cookies_1.return)) _a.call(cookies_1);
|
|
43
|
+
}
|
|
44
|
+
finally { if (e_1) throw e_1.error; }
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
};
|
|
48
|
+
BrowserCookieAdapter.prototype.set = function (name, value, options) {
|
|
49
|
+
var cookieString = "".concat(name, "=").concat(encodeURIComponent(value));
|
|
50
|
+
if (options) {
|
|
51
|
+
if (options.path) {
|
|
52
|
+
cookieString += "; path=".concat(options.path);
|
|
53
|
+
}
|
|
54
|
+
if (options.domain) {
|
|
55
|
+
cookieString += "; domain=".concat(options.domain);
|
|
56
|
+
}
|
|
57
|
+
if (options.maxAge !== undefined) {
|
|
58
|
+
cookieString += "; max-age=".concat(options.maxAge);
|
|
59
|
+
}
|
|
60
|
+
if (options.secure) {
|
|
61
|
+
cookieString += '; secure';
|
|
62
|
+
}
|
|
63
|
+
if (options.sameSite) {
|
|
64
|
+
cookieString += "; samesite=".concat(options.sameSite);
|
|
65
|
+
}
|
|
66
|
+
// Note: httpOnly cannot be set from browser JavaScript
|
|
67
|
+
}
|
|
68
|
+
document.cookie = cookieString;
|
|
69
|
+
};
|
|
70
|
+
BrowserCookieAdapter.prototype.delete = function (name, options) {
|
|
71
|
+
this.set(name, '', __assign(__assign({}, options), { maxAge: 0 }));
|
|
72
|
+
};
|
|
73
|
+
return BrowserCookieAdapter;
|
|
74
|
+
}());
|
|
75
|
+
export { BrowserCookieAdapter };
|
|
76
|
+
//# sourceMappingURL=BrowserCookieAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowserCookieAdapter.js","sourceRoot":"","sources":["../../src/overrides/BrowserCookieAdapter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA;IAAA;IA2CA,CAAC;IA1CC,kCAAG,GAAH,UAAI,IAAY;;QACd,IAAM,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;QAC1B,IAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,C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