@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.
Files changed (177) hide show
  1. package/README.md +1101 -0
  2. package/dist/absmartly-cookie.min.js +1 -0
  3. package/dist/absmartly-dom-changes-core.min.js +1 -0
  4. package/dist/absmartly-dom-changes-lite.min.js +1 -0
  5. package/dist/absmartly-overrides-full.min.js +1 -0
  6. package/dist/absmartly-overrides-lite.min.js +1 -0
  7. package/dist/absmartly-sdk-plugins.min.js +1 -0
  8. package/dist/absmartly-vitals.min.js +1 -0
  9. package/es/cookies/CookiePlugin.js +410 -0
  10. package/es/cookies/CookiePlugin.js.map +1 -0
  11. package/es/cookies/index.js +2 -0
  12. package/es/cookies/index.js.map +1 -0
  13. package/es/core/DOMChangesPluginLite.js +1124 -0
  14. package/es/core/DOMChangesPluginLite.js.map +1 -0
  15. package/es/core/DOMManipulatorLite.js +410 -0
  16. package/es/core/DOMManipulatorLite.js.map +1 -0
  17. package/es/core/ExposureTracker.js +501 -0
  18. package/es/core/ExposureTracker.js.map +1 -0
  19. package/es/core/HTMLInjector.js +333 -0
  20. package/es/core/HTMLInjector.js.map +1 -0
  21. package/es/core/PendingChangeManager.js +440 -0
  22. package/es/core/PendingChangeManager.js.map +1 -0
  23. package/es/core/StyleSheetManager.js +78 -0
  24. package/es/core/StyleSheetManager.js.map +1 -0
  25. package/es/entries/cookie-only.js +10 -0
  26. package/es/entries/cookie-only.js.map +1 -0
  27. package/es/entries/dom-only.js +13 -0
  28. package/es/entries/dom-only.js.map +1 -0
  29. package/es/entries/dom-with-overrides-full.js +19 -0
  30. package/es/entries/dom-with-overrides-full.js.map +1 -0
  31. package/es/entries/dom-with-overrides-lite.js +15 -0
  32. package/es/entries/dom-with-overrides-lite.js.map +1 -0
  33. package/es/entries/overrides-full-only.js +15 -0
  34. package/es/entries/overrides-full-only.js.map +1 -0
  35. package/es/entries/overrides-lite-only.js +12 -0
  36. package/es/entries/overrides-lite-only.js.map +1 -0
  37. package/es/entries/vitals-only.js +10 -0
  38. package/es/entries/vitals-only.js.map +1 -0
  39. package/es/index.js +17 -0
  40. package/es/index.js.map +1 -0
  41. package/es/overrides/BrowserCookieAdapter.js +76 -0
  42. package/es/overrides/BrowserCookieAdapter.js.map +1 -0
  43. package/es/overrides/OverridesPlugin.js +903 -0
  44. package/es/overrides/OverridesPlugin.js.map +1 -0
  45. package/es/overrides/OverridesPluginFull.js +32 -0
  46. package/es/overrides/OverridesPluginFull.js.map +1 -0
  47. package/es/overrides/OverridesPluginLite.js +352 -0
  48. package/es/overrides/OverridesPluginLite.js.map +1 -0
  49. package/es/overrides/index.js +4 -0
  50. package/es/overrides/index.js.map +1 -0
  51. package/es/overrides/types.js +2 -0
  52. package/es/overrides/types.js.map +1 -0
  53. package/es/parsers/VariantExtractor.js +570 -0
  54. package/es/parsers/VariantExtractor.js.map +1 -0
  55. package/es/types/index.js +2 -0
  56. package/es/types/index.js.map +1 -0
  57. package/es/utils/URLMatcher.js +114 -0
  58. package/es/utils/URLMatcher.js.map +1 -0
  59. package/es/utils/debug.js +184 -0
  60. package/es/utils/debug.js.map +1 -0
  61. package/es/vitals/WebVitalsPlugin.js +379 -0
  62. package/es/vitals/WebVitalsPlugin.js.map +1 -0
  63. package/es/vitals/index.js +2 -0
  64. package/es/vitals/index.js.map +1 -0
  65. package/lib/cookies/CookiePlugin.d.ts +55 -0
  66. package/lib/cookies/CookiePlugin.js +413 -0
  67. package/lib/cookies/CookiePlugin.js.map +1 -0
  68. package/lib/cookies/index.d.ts +2 -0
  69. package/lib/cookies/index.js +6 -0
  70. package/lib/cookies/index.js.map +1 -0
  71. package/lib/core/DOMChangesPluginLite.d.ts +89 -0
  72. package/lib/core/DOMChangesPluginLite.js +1127 -0
  73. package/lib/core/DOMChangesPluginLite.js.map +1 -0
  74. package/lib/core/DOMManipulatorLite.d.ts +21 -0
  75. package/lib/core/DOMManipulatorLite.js +413 -0
  76. package/lib/core/DOMManipulatorLite.js.map +1 -0
  77. package/lib/core/ExposureTracker.d.ts +81 -0
  78. package/lib/core/ExposureTracker.js +504 -0
  79. package/lib/core/ExposureTracker.js.map +1 -0
  80. package/lib/core/HTMLInjector.d.ts +19 -0
  81. package/lib/core/HTMLInjector.js +336 -0
  82. package/lib/core/HTMLInjector.js.map +1 -0
  83. package/lib/core/PendingChangeManager.d.ts +31 -0
  84. package/lib/core/PendingChangeManager.js +443 -0
  85. package/lib/core/PendingChangeManager.js.map +1 -0
  86. package/lib/core/StyleSheetManager.d.ts +16 -0
  87. package/lib/core/StyleSheetManager.js +81 -0
  88. package/lib/core/StyleSheetManager.js.map +1 -0
  89. package/lib/entries/cookie-only.d.ts +8 -0
  90. package/lib/entries/cookie-only.js +12 -0
  91. package/lib/entries/cookie-only.js.map +1 -0
  92. package/lib/entries/dom-only.d.ts +9 -0
  93. package/lib/entries/dom-only.js +29 -0
  94. package/lib/entries/dom-only.js.map +1 -0
  95. package/lib/entries/dom-with-overrides-full.d.ts +15 -0
  96. package/lib/entries/dom-with-overrides-full.js +39 -0
  97. package/lib/entries/dom-with-overrides-full.js.map +1 -0
  98. package/lib/entries/dom-with-overrides-lite.d.ts +11 -0
  99. package/lib/entries/dom-with-overrides-lite.js +32 -0
  100. package/lib/entries/dom-with-overrides-lite.js.map +1 -0
  101. package/lib/entries/overrides-full-only.d.ts +11 -0
  102. package/lib/entries/overrides-full-only.js +33 -0
  103. package/lib/entries/overrides-full-only.js.map +1 -0
  104. package/lib/entries/overrides-lite-only.d.ts +8 -0
  105. package/lib/entries/overrides-lite-only.js +28 -0
  106. package/lib/entries/overrides-lite-only.js.map +1 -0
  107. package/lib/entries/vitals-only.d.ts +8 -0
  108. package/lib/entries/vitals-only.js +12 -0
  109. package/lib/entries/vitals-only.js.map +1 -0
  110. package/lib/index.d.ts +13 -0
  111. package/lib/index.js +34 -0
  112. package/lib/index.js.map +1 -0
  113. package/lib/overrides/BrowserCookieAdapter.d.ts +6 -0
  114. package/lib/overrides/BrowserCookieAdapter.js +79 -0
  115. package/lib/overrides/BrowserCookieAdapter.js.map +1 -0
  116. package/lib/overrides/OverridesPlugin.d.ts +33 -0
  117. package/lib/overrides/OverridesPlugin.js +906 -0
  118. package/lib/overrides/OverridesPlugin.js.map +1 -0
  119. package/lib/overrides/OverridesPluginFull.d.ts +9 -0
  120. package/lib/overrides/OverridesPluginFull.js +35 -0
  121. package/lib/overrides/OverridesPluginFull.js.map +1 -0
  122. package/lib/overrides/OverridesPluginLite.d.ts +27 -0
  123. package/lib/overrides/OverridesPluginLite.js +355 -0
  124. package/lib/overrides/OverridesPluginLite.js.map +1 -0
  125. package/lib/overrides/index.d.ts +3 -0
  126. package/lib/overrides/index.js +23 -0
  127. package/lib/overrides/index.js.map +1 -0
  128. package/lib/overrides/types.d.ts +43 -0
  129. package/lib/overrides/types.js +3 -0
  130. package/lib/overrides/types.js.map +1 -0
  131. package/lib/parsers/VariantExtractor.d.ts +49 -0
  132. package/lib/parsers/VariantExtractor.js +573 -0
  133. package/lib/parsers/VariantExtractor.js.map +1 -0
  134. package/lib/types/index.d.ts +177 -0
  135. package/lib/types/index.js +3 -0
  136. package/lib/types/index.js.map +1 -0
  137. package/lib/utils/URLMatcher.d.ts +20 -0
  138. package/lib/utils/URLMatcher.js +117 -0
  139. package/lib/utils/URLMatcher.js.map +1 -0
  140. package/lib/utils/debug.d.ts +41 -0
  141. package/lib/utils/debug.js +195 -0
  142. package/lib/utils/debug.js.map +1 -0
  143. package/lib/vitals/WebVitalsPlugin.d.ts +37 -0
  144. package/lib/vitals/WebVitalsPlugin.js +382 -0
  145. package/lib/vitals/WebVitalsPlugin.js.map +1 -0
  146. package/lib/vitals/index.d.ts +2 -0
  147. package/lib/vitals/index.js +6 -0
  148. package/lib/vitals/index.js.map +1 -0
  149. package/package.json +94 -0
  150. package/types/cookies/CookiePlugin.d.ts +55 -0
  151. package/types/cookies/index.d.ts +2 -0
  152. package/types/core/DOMChangesPluginLite.d.ts +89 -0
  153. package/types/core/DOMManipulatorLite.d.ts +21 -0
  154. package/types/core/ExposureTracker.d.ts +81 -0
  155. package/types/core/HTMLInjector.d.ts +19 -0
  156. package/types/core/PendingChangeManager.d.ts +31 -0
  157. package/types/core/StyleSheetManager.d.ts +16 -0
  158. package/types/entries/cookie-only.d.ts +8 -0
  159. package/types/entries/dom-only.d.ts +9 -0
  160. package/types/entries/dom-with-overrides-full.d.ts +15 -0
  161. package/types/entries/dom-with-overrides-lite.d.ts +11 -0
  162. package/types/entries/overrides-full-only.d.ts +11 -0
  163. package/types/entries/overrides-lite-only.d.ts +8 -0
  164. package/types/entries/vitals-only.d.ts +8 -0
  165. package/types/index.d.ts +13 -0
  166. package/types/overrides/BrowserCookieAdapter.d.ts +6 -0
  167. package/types/overrides/OverridesPlugin.d.ts +33 -0
  168. package/types/overrides/OverridesPluginFull.d.ts +9 -0
  169. package/types/overrides/OverridesPluginLite.d.ts +27 -0
  170. package/types/overrides/index.d.ts +3 -0
  171. package/types/overrides/types.d.ts +43 -0
  172. package/types/parsers/VariantExtractor.d.ts +49 -0
  173. package/types/types/index.d.ts +177 -0
  174. package/types/utils/URLMatcher.d.ts +20 -0
  175. package/types/utils/debug.d.ts +41 -0
  176. package/types/vitals/WebVitalsPlugin.d.ts +37 -0
  177. 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
@@ -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,CAAC;;YAE3C,KAAmB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE,CAAC;gBAAxB,IAAI,MAAM,oBAAA;gBACb,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;gBACvB,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,OAAO,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;;;;;;;;;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kCAAG,GAAH,UAAI,IAAY,EAAE,KAAa,EAAE,OAAuB;QACtD,IAAI,YAAY,GAAG,UAAG,IAAI,cAAI,kBAAkB,CAAC,KAAK,CAAC,CAAE,CAAC;QAE1D,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACjB,YAAY,IAAI,iBAAU,OAAO,CAAC,IAAI,CAAE,CAAC;YAC3C,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,YAAY,IAAI,mBAAY,OAAO,CAAC,MAAM,CAAE,CAAC;YAC/C,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBACjC,YAAY,IAAI,oBAAa,OAAO,CAAC,MAAM,CAAE,CAAC;YAChD,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,YAAY,IAAI,UAAU,CAAC;YAC7B,CAAC;YACD,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACrB,YAAY,IAAI,qBAAc,OAAO,CAAC,QAAQ,CAAE,CAAC;YACnD,CAAC;YACD,uDAAuD;QACzD,CAAC;QAED,QAAQ,CAAC,MAAM,GAAG,YAAY,CAAC;IACjC,CAAC;IAED,qCAAM,GAAN,UAAO,IAAY,EAAE,OAAuB;QAC1C,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,wBAAO,OAAO,KAAE,MAAM,EAAE,CAAC,IAAG,CAAC;IAChD,CAAC;IACH,2BAAC;AAAD,CAAC,AA3CD,IA2CC"}