@metamask-previews/analytics-controller 0.0.0-preview-704ae19a → 0.0.0-preview-b0cb618e

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 (46) hide show
  1. package/README.md +4 -61
  2. package/dist/AnalyticsController-method-action-types.cjs.map +1 -1
  3. package/dist/AnalyticsController-method-action-types.d.cts +23 -62
  4. package/dist/AnalyticsController-method-action-types.d.cts.map +1 -1
  5. package/dist/AnalyticsController-method-action-types.d.mts +23 -62
  6. package/dist/AnalyticsController-method-action-types.d.mts.map +1 -1
  7. package/dist/AnalyticsController-method-action-types.mjs.map +1 -1
  8. package/dist/AnalyticsController.cjs +52 -125
  9. package/dist/AnalyticsController.cjs.map +1 -1
  10. package/dist/AnalyticsController.d.cts +24 -52
  11. package/dist/AnalyticsController.d.cts.map +1 -1
  12. package/dist/AnalyticsController.d.mts +24 -52
  13. package/dist/AnalyticsController.d.mts.map +1 -1
  14. package/dist/AnalyticsController.mjs +53 -126
  15. package/dist/AnalyticsController.mjs.map +1 -1
  16. package/dist/AnalyticsPlatformAdapter.types.cjs.map +1 -1
  17. package/dist/AnalyticsPlatformAdapter.types.d.cts +13 -69
  18. package/dist/AnalyticsPlatformAdapter.types.d.cts.map +1 -1
  19. package/dist/AnalyticsPlatformAdapter.types.d.mts +13 -69
  20. package/dist/AnalyticsPlatformAdapter.types.d.mts.map +1 -1
  21. package/dist/AnalyticsPlatformAdapter.types.mjs.map +1 -1
  22. package/dist/index.cjs +1 -4
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +2 -3
  25. package/dist/index.d.cts.map +1 -1
  26. package/dist/index.d.mts +2 -3
  27. package/dist/index.d.mts.map +1 -1
  28. package/dist/index.mjs +0 -2
  29. package/dist/index.mjs.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/AnalyticsPlatformAdapterSetupError.cjs +0 -17
  32. package/dist/AnalyticsPlatformAdapterSetupError.cjs.map +0 -1
  33. package/dist/AnalyticsPlatformAdapterSetupError.d.cts +0 -8
  34. package/dist/AnalyticsPlatformAdapterSetupError.d.cts.map +0 -1
  35. package/dist/AnalyticsPlatformAdapterSetupError.d.mts +0 -8
  36. package/dist/AnalyticsPlatformAdapterSetupError.d.mts.map +0 -1
  37. package/dist/AnalyticsPlatformAdapterSetupError.mjs +0 -13
  38. package/dist/AnalyticsPlatformAdapterSetupError.mjs.map +0 -1
  39. package/dist/analyticsStateComputer.cjs +0 -46
  40. package/dist/analyticsStateComputer.cjs.map +0 -1
  41. package/dist/analyticsStateComputer.d.cts +0 -35
  42. package/dist/analyticsStateComputer.d.cts.map +0 -1
  43. package/dist/analyticsStateComputer.d.mts +0 -35
  44. package/dist/analyticsStateComputer.d.mts.map +0 -1
  45. package/dist/analyticsStateComputer.mjs +0 -42
  46. package/dist/analyticsStateComputer.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0BAA0B;AAC1B,iEAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAG5B,gBAAgB;AAChB,+FAA0F;AAAjF,wJAAA,kCAAkC,OAAA;AAY3C,iEAA2E;AAAlE,yIAAA,kCAAkC,OAAA","sourcesContent":["// Export controller class\nexport { AnalyticsController } from './AnalyticsController';\nexport type { AnalyticsControllerOptions } from './AnalyticsController';\n\n// Export errors\nexport { AnalyticsPlatformAdapterSetupError } from './AnalyticsPlatformAdapterSetupError';\n\n// Export types\nexport type {\n AnalyticsEventProperties,\n AnalyticsUserTraits,\n AnalyticsPlatformAdapter,\n AnalyticsTrackingEvent,\n} from './AnalyticsPlatformAdapter.types';\n\n// Export state types and utilities\nexport type { AnalyticsControllerState } from './AnalyticsController';\nexport { getDefaultAnalyticsControllerState } from './AnalyticsController';\n\n// Export messenger types\nexport type { AnalyticsControllerMessenger } from './AnalyticsController';\n\n// Export action and event types\nexport type {\n AnalyticsControllerActions,\n AnalyticsControllerEvents,\n AnalyticsControllerGetStateAction,\n AnalyticsControllerStateChangeEvent,\n controllerName,\n} from './AnalyticsController';\nexport type {\n AnalyticsControllerTrackEventAction,\n AnalyticsControllerIdentifyAction,\n AnalyticsControllerTrackViewAction,\n AnalyticsControllerOptInAction,\n AnalyticsControllerOptOutAction,\n AnalyticsControllerSocialOptInAction,\n AnalyticsControllerSocialOptOutAction,\n AnalyticsControllerGetAnalyticsIdAction,\n AnalyticsControllerIsEnabledAction,\n AnalyticsControllerIsOptedInAction,\n AnalyticsControllerIsSocialOptedInAction,\n AnalyticsControllerMethodActions,\n} from './AnalyticsController-method-action-types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0BAA0B;AAC1B,iEAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAW5B,iEAA2E;AAAlE,yIAAA,kCAAkC,OAAA","sourcesContent":["// Export controller class\nexport { AnalyticsController } from './AnalyticsController';\nexport type { AnalyticsControllerOptions } from './AnalyticsController';\n\n// Export types\nexport type {\n AnalyticsEventProperties,\n AnalyticsPlatformAdapter,\n} from './AnalyticsPlatformAdapter.types';\n\n// Export state types and utilities\nexport type { AnalyticsControllerState } from './AnalyticsController';\nexport { getDefaultAnalyticsControllerState } from './AnalyticsController';\n\n// Export messenger types\nexport type { AnalyticsControllerMessenger } from './AnalyticsController';\n\n// Export action and event types\nexport type {\n AnalyticsControllerActions,\n AnalyticsControllerEvents,\n AnalyticsControllerGetStateAction,\n AnalyticsControllerStateChangeEvent,\n controllerName,\n} from './AnalyticsController';\nexport type {\n AnalyticsControllerTrackEventAction,\n AnalyticsControllerIdentifyAction,\n AnalyticsControllerTrackPageAction,\n AnalyticsControllerEnableAction,\n AnalyticsControllerDisableAction,\n AnalyticsControllerOptInAction,\n AnalyticsControllerOptOutAction,\n AnalyticsControllerMethodActions,\n} from './AnalyticsController-method-action-types';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,10 +1,9 @@
1
1
  export { AnalyticsController } from "./AnalyticsController.cjs";
2
2
  export type { AnalyticsControllerOptions } from "./AnalyticsController.cjs";
3
- export { AnalyticsPlatformAdapterSetupError } from "./AnalyticsPlatformAdapterSetupError.cjs";
4
- export type { AnalyticsEventProperties, AnalyticsUserTraits, AnalyticsPlatformAdapter, AnalyticsTrackingEvent, } from "./AnalyticsPlatformAdapter.types.cjs";
3
+ export type { AnalyticsEventProperties, AnalyticsPlatformAdapter, } from "./AnalyticsPlatformAdapter.types.cjs";
5
4
  export type { AnalyticsControllerState } from "./AnalyticsController.cjs";
6
5
  export { getDefaultAnalyticsControllerState } from "./AnalyticsController.cjs";
7
6
  export type { AnalyticsControllerMessenger } from "./AnalyticsController.cjs";
8
7
  export type { AnalyticsControllerActions, AnalyticsControllerEvents, AnalyticsControllerGetStateAction, AnalyticsControllerStateChangeEvent, controllerName, } from "./AnalyticsController.cjs";
9
- export type { AnalyticsControllerTrackEventAction, AnalyticsControllerIdentifyAction, AnalyticsControllerTrackViewAction, AnalyticsControllerOptInAction, AnalyticsControllerOptOutAction, AnalyticsControllerSocialOptInAction, AnalyticsControllerSocialOptOutAction, AnalyticsControllerGetAnalyticsIdAction, AnalyticsControllerIsEnabledAction, AnalyticsControllerIsOptedInAction, AnalyticsControllerIsSocialOptedInAction, AnalyticsControllerMethodActions, } from "./AnalyticsController-method-action-types.cjs";
8
+ export type { AnalyticsControllerTrackEventAction, AnalyticsControllerIdentifyAction, AnalyticsControllerTrackPageAction, AnalyticsControllerEnableAction, AnalyticsControllerDisableAction, AnalyticsControllerOptInAction, AnalyticsControllerOptOutAction, AnalyticsControllerMethodActions, } from "./AnalyticsController-method-action-types.cjs";
10
9
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,YAAY,EAAE,0BAA0B,EAAE,kCAA8B;AAGxE,OAAO,EAAE,kCAAkC,EAAE,iDAA6C;AAG1F,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,6CAAyC;AAG1C,YAAY,EAAE,wBAAwB,EAAE,kCAA8B;AACtE,OAAO,EAAE,kCAAkC,EAAE,kCAA8B;AAG3E,YAAY,EAAE,4BAA4B,EAAE,kCAA8B;AAG1E,YAAY,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,GACf,kCAA8B;AAC/B,YAAY,EACV,mCAAmC,EACnC,iCAAiC,EACjC,kCAAkC,EAClC,8BAA8B,EAC9B,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,uCAAuC,EACvC,kCAAkC,EAClC,kCAAkC,EAClC,wCAAwC,EACxC,gCAAgC,GACjC,sDAAkD"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,YAAY,EAAE,0BAA0B,EAAE,kCAA8B;AAGxE,YAAY,EACV,wBAAwB,EACxB,wBAAwB,GACzB,6CAAyC;AAG1C,YAAY,EAAE,wBAAwB,EAAE,kCAA8B;AACtE,OAAO,EAAE,kCAAkC,EAAE,kCAA8B;AAG3E,YAAY,EAAE,4BAA4B,EAAE,kCAA8B;AAG1E,YAAY,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,GACf,kCAA8B;AAC/B,YAAY,EACV,mCAAmC,EACnC,iCAAiC,EACjC,kCAAkC,EAClC,+BAA+B,EAC/B,gCAAgC,EAChC,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,GACjC,sDAAkD"}
package/dist/index.d.mts CHANGED
@@ -1,10 +1,9 @@
1
1
  export { AnalyticsController } from "./AnalyticsController.mjs";
2
2
  export type { AnalyticsControllerOptions } from "./AnalyticsController.mjs";
3
- export { AnalyticsPlatformAdapterSetupError } from "./AnalyticsPlatformAdapterSetupError.mjs";
4
- export type { AnalyticsEventProperties, AnalyticsUserTraits, AnalyticsPlatformAdapter, AnalyticsTrackingEvent, } from "./AnalyticsPlatformAdapter.types.mjs";
3
+ export type { AnalyticsEventProperties, AnalyticsPlatformAdapter, } from "./AnalyticsPlatformAdapter.types.mjs";
5
4
  export type { AnalyticsControllerState } from "./AnalyticsController.mjs";
6
5
  export { getDefaultAnalyticsControllerState } from "./AnalyticsController.mjs";
7
6
  export type { AnalyticsControllerMessenger } from "./AnalyticsController.mjs";
8
7
  export type { AnalyticsControllerActions, AnalyticsControllerEvents, AnalyticsControllerGetStateAction, AnalyticsControllerStateChangeEvent, controllerName, } from "./AnalyticsController.mjs";
9
- export type { AnalyticsControllerTrackEventAction, AnalyticsControllerIdentifyAction, AnalyticsControllerTrackViewAction, AnalyticsControllerOptInAction, AnalyticsControllerOptOutAction, AnalyticsControllerSocialOptInAction, AnalyticsControllerSocialOptOutAction, AnalyticsControllerGetAnalyticsIdAction, AnalyticsControllerIsEnabledAction, AnalyticsControllerIsOptedInAction, AnalyticsControllerIsSocialOptedInAction, AnalyticsControllerMethodActions, } from "./AnalyticsController-method-action-types.mjs";
8
+ export type { AnalyticsControllerTrackEventAction, AnalyticsControllerIdentifyAction, AnalyticsControllerTrackPageAction, AnalyticsControllerEnableAction, AnalyticsControllerDisableAction, AnalyticsControllerOptInAction, AnalyticsControllerOptOutAction, AnalyticsControllerMethodActions, } from "./AnalyticsController-method-action-types.mjs";
10
9
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,YAAY,EAAE,0BAA0B,EAAE,kCAA8B;AAGxE,OAAO,EAAE,kCAAkC,EAAE,iDAA6C;AAG1F,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,6CAAyC;AAG1C,YAAY,EAAE,wBAAwB,EAAE,kCAA8B;AACtE,OAAO,EAAE,kCAAkC,EAAE,kCAA8B;AAG3E,YAAY,EAAE,4BAA4B,EAAE,kCAA8B;AAG1E,YAAY,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,GACf,kCAA8B;AAC/B,YAAY,EACV,mCAAmC,EACnC,iCAAiC,EACjC,kCAAkC,EAClC,8BAA8B,EAC9B,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,uCAAuC,EACvC,kCAAkC,EAClC,kCAAkC,EAClC,wCAAwC,EACxC,gCAAgC,GACjC,sDAAkD"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,YAAY,EAAE,0BAA0B,EAAE,kCAA8B;AAGxE,YAAY,EACV,wBAAwB,EACxB,wBAAwB,GACzB,6CAAyC;AAG1C,YAAY,EAAE,wBAAwB,EAAE,kCAA8B;AACtE,OAAO,EAAE,kCAAkC,EAAE,kCAA8B;AAG3E,YAAY,EAAE,4BAA4B,EAAE,kCAA8B;AAG1E,YAAY,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,GACf,kCAA8B;AAC/B,YAAY,EACV,mCAAmC,EACnC,iCAAiC,EACjC,kCAAkC,EAClC,+BAA+B,EAC/B,gCAAgC,EAChC,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,GACjC,sDAAkD"}
package/dist/index.mjs CHANGED
@@ -1,6 +1,4 @@
1
1
  // Export controller class
2
2
  export { AnalyticsController } from "./AnalyticsController.mjs";
3
- // Export errors
4
- export { AnalyticsPlatformAdapterSetupError } from "./AnalyticsPlatformAdapterSetupError.mjs";
5
3
  export { getDefaultAnalyticsControllerState } from "./AnalyticsController.mjs";
6
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAG5D,gBAAgB;AAChB,OAAO,EAAE,kCAAkC,EAAE,iDAA6C;AAY1F,OAAO,EAAE,kCAAkC,EAAE,kCAA8B","sourcesContent":["// Export controller class\nexport { AnalyticsController } from './AnalyticsController';\nexport type { AnalyticsControllerOptions } from './AnalyticsController';\n\n// Export errors\nexport { AnalyticsPlatformAdapterSetupError } from './AnalyticsPlatformAdapterSetupError';\n\n// Export types\nexport type {\n AnalyticsEventProperties,\n AnalyticsUserTraits,\n AnalyticsPlatformAdapter,\n AnalyticsTrackingEvent,\n} from './AnalyticsPlatformAdapter.types';\n\n// Export state types and utilities\nexport type { AnalyticsControllerState } from './AnalyticsController';\nexport { getDefaultAnalyticsControllerState } from './AnalyticsController';\n\n// Export messenger types\nexport type { AnalyticsControllerMessenger } from './AnalyticsController';\n\n// Export action and event types\nexport type {\n AnalyticsControllerActions,\n AnalyticsControllerEvents,\n AnalyticsControllerGetStateAction,\n AnalyticsControllerStateChangeEvent,\n controllerName,\n} from './AnalyticsController';\nexport type {\n AnalyticsControllerTrackEventAction,\n AnalyticsControllerIdentifyAction,\n AnalyticsControllerTrackViewAction,\n AnalyticsControllerOptInAction,\n AnalyticsControllerOptOutAction,\n AnalyticsControllerSocialOptInAction,\n AnalyticsControllerSocialOptOutAction,\n AnalyticsControllerGetAnalyticsIdAction,\n AnalyticsControllerIsEnabledAction,\n AnalyticsControllerIsOptedInAction,\n AnalyticsControllerIsSocialOptedInAction,\n AnalyticsControllerMethodActions,\n} from './AnalyticsController-method-action-types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAW5D,OAAO,EAAE,kCAAkC,EAAE,kCAA8B","sourcesContent":["// Export controller class\nexport { AnalyticsController } from './AnalyticsController';\nexport type { AnalyticsControllerOptions } from './AnalyticsController';\n\n// Export types\nexport type {\n AnalyticsEventProperties,\n AnalyticsPlatformAdapter,\n} from './AnalyticsPlatformAdapter.types';\n\n// Export state types and utilities\nexport type { AnalyticsControllerState } from './AnalyticsController';\nexport { getDefaultAnalyticsControllerState } from './AnalyticsController';\n\n// Export messenger types\nexport type { AnalyticsControllerMessenger } from './AnalyticsController';\n\n// Export action and event types\nexport type {\n AnalyticsControllerActions,\n AnalyticsControllerEvents,\n AnalyticsControllerGetStateAction,\n AnalyticsControllerStateChangeEvent,\n controllerName,\n} from './AnalyticsController';\nexport type {\n AnalyticsControllerTrackEventAction,\n AnalyticsControllerIdentifyAction,\n AnalyticsControllerTrackPageAction,\n AnalyticsControllerEnableAction,\n AnalyticsControllerDisableAction,\n AnalyticsControllerOptInAction,\n AnalyticsControllerOptOutAction,\n AnalyticsControllerMethodActions,\n} from './AnalyticsController-method-action-types';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/analytics-controller",
3
- "version": "0.0.0-preview-704ae19a",
3
+ "version": "0.0.0-preview-b0cb618e",
4
4
  "description": "Common Analytics controller for event tracking",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AnalyticsPlatformAdapterSetupError = void 0;
4
- /**
5
- * Error thrown when platform adapter setup fails during the onSetupCompleted lifecycle hook.
6
- */
7
- class AnalyticsPlatformAdapterSetupError extends Error {
8
- constructor(message, cause) {
9
- super(message);
10
- this.name = this.constructor.name;
11
- if (cause) {
12
- this.cause = cause;
13
- }
14
- }
15
- }
16
- exports.AnalyticsPlatformAdapterSetupError = AnalyticsPlatformAdapterSetupError;
17
- //# sourceMappingURL=AnalyticsPlatformAdapterSetupError.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnalyticsPlatformAdapterSetupError.cjs","sourceRoot":"","sources":["../src/AnalyticsPlatformAdapterSetupError.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,kCAAmC,SAAQ,KAAK;IAG3D,YAAY,OAAe,EAAE,KAAa;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AAVD,gFAUC","sourcesContent":["/**\n * Error thrown when platform adapter setup fails during the onSetupCompleted lifecycle hook.\n */\nexport class AnalyticsPlatformAdapterSetupError extends Error {\n cause?: Error;\n\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = this.constructor.name;\n if (cause) {\n this.cause = cause;\n }\n }\n}\n"]}
@@ -1,8 +0,0 @@
1
- /**
2
- * Error thrown when platform adapter setup fails during the onSetupCompleted lifecycle hook.
3
- */
4
- export declare class AnalyticsPlatformAdapterSetupError extends Error {
5
- cause?: Error;
6
- constructor(message: string, cause?: Error);
7
- }
8
- //# sourceMappingURL=AnalyticsPlatformAdapterSetupError.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnalyticsPlatformAdapterSetupError.d.cts","sourceRoot":"","sources":["../src/AnalyticsPlatformAdapterSetupError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAC;gBAEF,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAO3C"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Error thrown when platform adapter setup fails during the onSetupCompleted lifecycle hook.
3
- */
4
- export declare class AnalyticsPlatformAdapterSetupError extends Error {
5
- cause?: Error;
6
- constructor(message: string, cause?: Error);
7
- }
8
- //# sourceMappingURL=AnalyticsPlatformAdapterSetupError.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnalyticsPlatformAdapterSetupError.d.mts","sourceRoot":"","sources":["../src/AnalyticsPlatformAdapterSetupError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAC;gBAEF,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAO3C"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Error thrown when platform adapter setup fails during the onSetupCompleted lifecycle hook.
3
- */
4
- export class AnalyticsPlatformAdapterSetupError extends Error {
5
- constructor(message, cause) {
6
- super(message);
7
- this.name = this.constructor.name;
8
- if (cause) {
9
- this.cause = cause;
10
- }
11
- }
12
- }
13
- //# sourceMappingURL=AnalyticsPlatformAdapterSetupError.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnalyticsPlatformAdapterSetupError.mjs","sourceRoot":"","sources":["../src/AnalyticsPlatformAdapterSetupError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IAG3D,YAAY,OAAe,EAAE,KAAa;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * Error thrown when platform adapter setup fails during the onSetupCompleted lifecycle hook.\n */\nexport class AnalyticsPlatformAdapterSetupError extends Error {\n cause?: Error;\n\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = this.constructor.name;\n if (cause) {\n this.cause = cause;\n }\n }\n}\n"]}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.computeEnabledState = void 0;
4
- /**
5
- * State computer that computes controller values from controller state.
6
- *
7
- * This module provides functions that compute derived controller values from the
8
- * controller's state. Currently, it computes the `controller_enabled` state, but
9
- * can be extended to compute other values in the future.
10
- *
11
- * **State Computer Computations:**
12
- *
13
- * 1. **Enabled State** (`computeEnabledState`):
14
- * - Determines whether analytics tracking is active
15
- * - Rules: `controller_enabled = user_optedIn || user_socialOptedIn`
16
- * - Analytics is enabled if the user has opted in through regular account OR social account
17
- *
18
- * 2. **Future computations** (e.g., feature flags, permissions, etc.)
19
- *
20
- * **Usage:**
21
- * These functions are called:
22
- * - During controller initialization to set initial values
23
- * - Whenever user state changes (e.g., in `optIn()`, `optOut()`)
24
- *
25
- * **Extensibility:**
26
- * To add new computations, add new functions that take `AnalyticsControllerState` as input.
27
- * To add new user state properties, update the `AnalyticsControllerState` type with `user_` prefix
28
- * and all computation functions that need to consider them.
29
- */
30
- /**
31
- * Computes the `controller_enabled` state from controller state.
32
- *
33
- * @param state - The current controller state
34
- * @returns `true` if analytics tracking should be enabled, `false` otherwise
35
- */
36
- function computeEnabledState(state) {
37
- // Analytics is enabled if user has opted in through regular account OR social account
38
- // Rules:
39
- // - optIn==true && socialOptIn==true -> enabled=true
40
- // - optIn==false && socialOptIn==true -> enabled=true
41
- // - optIn==true && socialOptIn==false -> enabled=true
42
- // - optIn==false && socialOptIn==false -> enabled=false
43
- return state.user_optedIn || state.user_socialOptedIn;
44
- }
45
- exports.computeEnabledState = computeEnabledState;
46
- //# sourceMappingURL=analyticsStateComputer.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyticsStateComputer.cjs","sourceRoot":"","sources":["../src/analyticsStateComputer.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,KAA+B;IACjE,sFAAsF;IACtF,SAAS;IACT,qDAAqD;IACrD,sDAAsD;IACtD,sDAAsD;IACtD,wDAAwD;IACxD,OAAO,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,kBAAkB,CAAC;AACxD,CAAC;AARD,kDAQC","sourcesContent":["import type { AnalyticsControllerState } from './AnalyticsController';\n\n/**\n * State computer that computes controller values from controller state.\n *\n * This module provides functions that compute derived controller values from the\n * controller's state. Currently, it computes the `controller_enabled` state, but\n * can be extended to compute other values in the future.\n *\n * **State Computer Computations:**\n *\n * 1. **Enabled State** (`computeEnabledState`):\n * - Determines whether analytics tracking is active\n * - Rules: `controller_enabled = user_optedIn || user_socialOptedIn`\n * - Analytics is enabled if the user has opted in through regular account OR social account\n *\n * 2. **Future computations** (e.g., feature flags, permissions, etc.)\n *\n * **Usage:**\n * These functions are called:\n * - During controller initialization to set initial values\n * - Whenever user state changes (e.g., in `optIn()`, `optOut()`)\n *\n * **Extensibility:**\n * To add new computations, add new functions that take `AnalyticsControllerState` as input.\n * To add new user state properties, update the `AnalyticsControllerState` type with `user_` prefix\n * and all computation functions that need to consider them.\n */\n\n/**\n * Computes the `controller_enabled` state from controller state.\n *\n * @param state - The current controller state\n * @returns `true` if analytics tracking should be enabled, `false` otherwise\n */\nexport function computeEnabledState(state: AnalyticsControllerState): boolean {\n // Analytics is enabled if user has opted in through regular account OR social account\n // Rules:\n // - optIn==true && socialOptIn==true -> enabled=true\n // - optIn==false && socialOptIn==true -> enabled=true\n // - optIn==true && socialOptIn==false -> enabled=true\n // - optIn==false && socialOptIn==false -> enabled=false\n return state.user_optedIn || state.user_socialOptedIn;\n}\n"]}
@@ -1,35 +0,0 @@
1
- import type { AnalyticsControllerState } from "./AnalyticsController.cjs";
2
- /**
3
- * State computer that computes controller values from controller state.
4
- *
5
- * This module provides functions that compute derived controller values from the
6
- * controller's state. Currently, it computes the `controller_enabled` state, but
7
- * can be extended to compute other values in the future.
8
- *
9
- * **State Computer Computations:**
10
- *
11
- * 1. **Enabled State** (`computeEnabledState`):
12
- * - Determines whether analytics tracking is active
13
- * - Rules: `controller_enabled = user_optedIn || user_socialOptedIn`
14
- * - Analytics is enabled if the user has opted in through regular account OR social account
15
- *
16
- * 2. **Future computations** (e.g., feature flags, permissions, etc.)
17
- *
18
- * **Usage:**
19
- * These functions are called:
20
- * - During controller initialization to set initial values
21
- * - Whenever user state changes (e.g., in `optIn()`, `optOut()`)
22
- *
23
- * **Extensibility:**
24
- * To add new computations, add new functions that take `AnalyticsControllerState` as input.
25
- * To add new user state properties, update the `AnalyticsControllerState` type with `user_` prefix
26
- * and all computation functions that need to consider them.
27
- */
28
- /**
29
- * Computes the `controller_enabled` state from controller state.
30
- *
31
- * @param state - The current controller state
32
- * @returns `true` if analytics tracking should be enabled, `false` otherwise
33
- */
34
- export declare function computeEnabledState(state: AnalyticsControllerState): boolean;
35
- //# sourceMappingURL=analyticsStateComputer.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyticsStateComputer.d.cts","sourceRoot":"","sources":["../src/analyticsStateComputer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,kCAA8B;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAQ5E"}
@@ -1,35 +0,0 @@
1
- import type { AnalyticsControllerState } from "./AnalyticsController.mjs";
2
- /**
3
- * State computer that computes controller values from controller state.
4
- *
5
- * This module provides functions that compute derived controller values from the
6
- * controller's state. Currently, it computes the `controller_enabled` state, but
7
- * can be extended to compute other values in the future.
8
- *
9
- * **State Computer Computations:**
10
- *
11
- * 1. **Enabled State** (`computeEnabledState`):
12
- * - Determines whether analytics tracking is active
13
- * - Rules: `controller_enabled = user_optedIn || user_socialOptedIn`
14
- * - Analytics is enabled if the user has opted in through regular account OR social account
15
- *
16
- * 2. **Future computations** (e.g., feature flags, permissions, etc.)
17
- *
18
- * **Usage:**
19
- * These functions are called:
20
- * - During controller initialization to set initial values
21
- * - Whenever user state changes (e.g., in `optIn()`, `optOut()`)
22
- *
23
- * **Extensibility:**
24
- * To add new computations, add new functions that take `AnalyticsControllerState` as input.
25
- * To add new user state properties, update the `AnalyticsControllerState` type with `user_` prefix
26
- * and all computation functions that need to consider them.
27
- */
28
- /**
29
- * Computes the `controller_enabled` state from controller state.
30
- *
31
- * @param state - The current controller state
32
- * @returns `true` if analytics tracking should be enabled, `false` otherwise
33
- */
34
- export declare function computeEnabledState(state: AnalyticsControllerState): boolean;
35
- //# sourceMappingURL=analyticsStateComputer.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyticsStateComputer.d.mts","sourceRoot":"","sources":["../src/analyticsStateComputer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,kCAA8B;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAQ5E"}
@@ -1,42 +0,0 @@
1
- /**
2
- * State computer that computes controller values from controller state.
3
- *
4
- * This module provides functions that compute derived controller values from the
5
- * controller's state. Currently, it computes the `controller_enabled` state, but
6
- * can be extended to compute other values in the future.
7
- *
8
- * **State Computer Computations:**
9
- *
10
- * 1. **Enabled State** (`computeEnabledState`):
11
- * - Determines whether analytics tracking is active
12
- * - Rules: `controller_enabled = user_optedIn || user_socialOptedIn`
13
- * - Analytics is enabled if the user has opted in through regular account OR social account
14
- *
15
- * 2. **Future computations** (e.g., feature flags, permissions, etc.)
16
- *
17
- * **Usage:**
18
- * These functions are called:
19
- * - During controller initialization to set initial values
20
- * - Whenever user state changes (e.g., in `optIn()`, `optOut()`)
21
- *
22
- * **Extensibility:**
23
- * To add new computations, add new functions that take `AnalyticsControllerState` as input.
24
- * To add new user state properties, update the `AnalyticsControllerState` type with `user_` prefix
25
- * and all computation functions that need to consider them.
26
- */
27
- /**
28
- * Computes the `controller_enabled` state from controller state.
29
- *
30
- * @param state - The current controller state
31
- * @returns `true` if analytics tracking should be enabled, `false` otherwise
32
- */
33
- export function computeEnabledState(state) {
34
- // Analytics is enabled if user has opted in through regular account OR social account
35
- // Rules:
36
- // - optIn==true && socialOptIn==true -> enabled=true
37
- // - optIn==false && socialOptIn==true -> enabled=true
38
- // - optIn==true && socialOptIn==false -> enabled=true
39
- // - optIn==false && socialOptIn==false -> enabled=false
40
- return state.user_optedIn || state.user_socialOptedIn;
41
- }
42
- //# sourceMappingURL=analyticsStateComputer.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyticsStateComputer.mjs","sourceRoot":"","sources":["../src/analyticsStateComputer.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IACjE,sFAAsF;IACtF,SAAS;IACT,qDAAqD;IACrD,sDAAsD;IACtD,sDAAsD;IACtD,wDAAwD;IACxD,OAAO,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,kBAAkB,CAAC;AACxD,CAAC","sourcesContent":["import type { AnalyticsControllerState } from './AnalyticsController';\n\n/**\n * State computer that computes controller values from controller state.\n *\n * This module provides functions that compute derived controller values from the\n * controller's state. Currently, it computes the `controller_enabled` state, but\n * can be extended to compute other values in the future.\n *\n * **State Computer Computations:**\n *\n * 1. **Enabled State** (`computeEnabledState`):\n * - Determines whether analytics tracking is active\n * - Rules: `controller_enabled = user_optedIn || user_socialOptedIn`\n * - Analytics is enabled if the user has opted in through regular account OR social account\n *\n * 2. **Future computations** (e.g., feature flags, permissions, etc.)\n *\n * **Usage:**\n * These functions are called:\n * - During controller initialization to set initial values\n * - Whenever user state changes (e.g., in `optIn()`, `optOut()`)\n *\n * **Extensibility:**\n * To add new computations, add new functions that take `AnalyticsControllerState` as input.\n * To add new user state properties, update the `AnalyticsControllerState` type with `user_` prefix\n * and all computation functions that need to consider them.\n */\n\n/**\n * Computes the `controller_enabled` state from controller state.\n *\n * @param state - The current controller state\n * @returns `true` if analytics tracking should be enabled, `false` otherwise\n */\nexport function computeEnabledState(state: AnalyticsControllerState): boolean {\n // Analytics is enabled if user has opted in through regular account OR social account\n // Rules:\n // - optIn==true && socialOptIn==true -> enabled=true\n // - optIn==false && socialOptIn==true -> enabled=true\n // - optIn==true && socialOptIn==false -> enabled=true\n // - optIn==false && socialOptIn==false -> enabled=false\n return state.user_optedIn || state.user_socialOptedIn;\n}\n"]}