@ninetailed/experience.js 4.3.0-beta.3 → 4.4.0-beta.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.
@@ -2,7 +2,6 @@ import { Logger, PageviewProperties, Profile, Properties, Traits } from '@nineta
2
2
  import { DetachListeners } from 'analytics';
3
3
  import { TrackExperienceProperties, TrackComponentProperties } from './TrackingProperties';
4
4
  import { NinetailedPlugin } from './NinetailedPlugin';
5
- import { type Ninetailed } from '../Ninetailed';
6
5
  type Loading = {
7
6
  status: 'loading';
8
7
  profile: null;
@@ -41,8 +40,6 @@ export type Identify = (uid: string, traits?: Traits, options?: EventFunctionOpt
41
40
  export type Reset = () => void;
42
41
  export type Debug = (enable: boolean) => void;
43
42
  export type OnProfileChange = (cb: OnProfileChangeCallback) => DetachListeners;
44
- type ObserveElement = Ninetailed['observeElement'];
45
- type UnObserveElement = Ninetailed['unobserveElement'];
46
43
  export interface NinetailedInstance {
47
44
  page: Page;
48
45
  track: Track;
@@ -56,13 +53,8 @@ export interface NinetailedInstance {
56
53
  plugins: NinetailedPlugin[];
57
54
  logger: Logger;
58
55
  onIsInitialized: OnIsInitialized;
59
- observeElement: ObserveElement;
60
- unobserveElement: UnObserveElement;
61
56
  }
62
57
  export { NinetailedPlugin, TrackExperienceProperties, TrackComponentProperties, };
63
58
  export type { EventHandler } from './EventHandler';
64
59
  export type { AnalyticsInstance } from './AnalyticsInstance';
65
60
  export type { SanitizedTrackExperienceProperties } from './TrackingProperties';
66
- export type { ElementSeenPayload } from './ElementSeenPayload';
67
- export type { ProfileChangedPayload } from './ProfileChangedPayload';
68
- export type { Credentials } from './Credentials';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js",
3
- "version": "4.3.0-beta.3",
3
+ "version": "4.4.0-beta.1",
4
4
  "module": "./index.js",
5
5
  "main": "./index.cjs",
6
6
  "type": "module",
7
7
  "types": "./index.d.ts",
8
8
  "dependencies": {
9
- "@ninetailed/experience.js-shared": "4.3.0-beta.3",
9
+ "@ninetailed/experience.js-shared": "4.4.0-beta.1",
10
10
  "analytics": "0.8.1",
11
11
  "zod": "3.21.4"
12
12
  },
@@ -1,16 +0,0 @@
1
- export type ElementSeenObserverOptions = {
2
- onElementSeen: (element: Element) => void;
3
- };
4
- export type ObserveOptions = {
5
- delay?: number;
6
- };
7
- export declare class ElementSeenObserver {
8
- private _options;
9
- private _intersectionObserver?;
10
- private _elementDelays;
11
- private _intersectionTimers;
12
- constructor(_options: ElementSeenObserverOptions);
13
- private onIntersection;
14
- observe(element: Element, options?: ObserveOptions): void;
15
- unobserve(element: Element): void;
16
- }
@@ -1,2 +0,0 @@
1
- import { AcceptsCredentials } from '../types/interfaces/AcceptsCredentials';
2
- export declare const acceptsCredentials: (plugin: unknown) => plugin is AcceptsCredentials;
@@ -1,2 +0,0 @@
1
- import { InterestedInHiddenPage } from '../types/interfaces/InterestedInHiddenPage';
2
- export declare const isInterestedInHiddenPage: (arg: unknown) => arg is InterestedInHiddenPage;
@@ -1,2 +0,0 @@
1
- import { InterestedInSeenElements } from '../types/interfaces/InterestedInSeenElements';
2
- export declare const isInterestedInSeenElements: (arg: unknown) => arg is InterestedInSeenElements;
@@ -1,4 +0,0 @@
1
- export type Credentials = {
2
- clientId: string;
3
- environment: string;
4
- };
@@ -1,7 +0,0 @@
1
- export type ElementSeenPayload = {
2
- element: Element;
3
- experienceId?: string;
4
- baselineId?: string;
5
- variantId?: string;
6
- audienceId?: string;
7
- };
@@ -1,4 +0,0 @@
1
- import { type Profile } from '@ninetailed/experience.js-shared';
2
- export type ProfileChangedPayload = {
3
- profile: Profile;
4
- };
@@ -1,4 +0,0 @@
1
- import { type Credentials } from '../Credentials';
2
- export interface AcceptsCredentials {
3
- setCredentials(credentials: Credentials): void;
4
- }
@@ -1,5 +0,0 @@
1
- import { PAGE_HIDDEN } from '../../constants';
2
- import { EventHandler } from '../EventHandler';
3
- export interface InterestedInHiddenPage {
4
- [PAGE_HIDDEN]: EventHandler<void>;
5
- }
@@ -1,6 +0,0 @@
1
- import { PROFILE_CHANGE } from '@ninetailed/experience.js-shared';
2
- import { EventHandler } from '../EventHandler';
3
- import { ProfileChangedPayload } from '../ProfileChangedPayload';
4
- export interface InterestedInProfileChange {
5
- [PROFILE_CHANGE]: EventHandler<ProfileChangedPayload>;
6
- }
@@ -1,6 +0,0 @@
1
- import { HAS_SEEN_ELEMENT } from '../../constants';
2
- import { ElementSeenPayload } from '../ElementSeenPayload';
3
- import { EventHandler } from '../EventHandler';
4
- export interface InterestedInSeenElements {
5
- [HAS_SEEN_ELEMENT]: EventHandler<ElementSeenPayload>;
6
- }