@finsweet/webflow-apps-utils 1.0.41 → 1.0.42
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/dist/types/webflow.d.ts +30 -2
- package/dist/types/window.d.ts +2 -1
- package/package.json +1 -1
package/dist/types/webflow.d.ts
CHANGED
|
@@ -64,7 +64,11 @@ export interface Webflow extends Pick<WebflowCallback[], 'push'> {
|
|
|
64
64
|
destroy: () => void;
|
|
65
65
|
ready: () => void;
|
|
66
66
|
env: () => boolean;
|
|
67
|
-
|
|
67
|
+
require: <Key extends WebflowModule>(key: Key) => (Key extends 'commerce' ? WebflowCommerce : Key extends 'lightbox' ? WebflowLightbox : Key extends 'slider' ? WebflowSlider : Key extends 'tabs' ? WebflowTabs : WebflowIx2) | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated - Legacy API, use `window.wf` instead
|
|
70
|
+
*/
|
|
71
|
+
analytics?: {
|
|
68
72
|
optIn: ({ reload }: {
|
|
69
73
|
reload?: boolean;
|
|
70
74
|
}) => void;
|
|
@@ -73,7 +77,31 @@ export interface Webflow extends Pick<WebflowCallback[], 'push'> {
|
|
|
73
77
|
}) => void;
|
|
74
78
|
getIsOptedOut: () => 'true' | null;
|
|
75
79
|
};
|
|
76
|
-
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Includes methods of the wf object
|
|
83
|
+
*/
|
|
84
|
+
export interface WF {
|
|
85
|
+
ready: (callback?: () => void) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Enables user tracking for the current user.
|
|
88
|
+
* @param options
|
|
89
|
+
*/
|
|
90
|
+
allowUserTracking?: (options?: {
|
|
91
|
+
reload?: boolean;
|
|
92
|
+
activate?: boolean;
|
|
93
|
+
}) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Disables user tracking for the current user.
|
|
96
|
+
* @param options
|
|
97
|
+
*/
|
|
98
|
+
denyUserTracking?: (options?: {
|
|
99
|
+
reload?: boolean;
|
|
100
|
+
}) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves the user’s current tracking preference.
|
|
103
|
+
*/
|
|
104
|
+
getUserTrackingChoice?: () => 'allow' | 'deny' | 'none';
|
|
77
105
|
}
|
|
78
106
|
export type XSCPMetadata = {
|
|
79
107
|
meta: {
|
package/dist/types/window.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Webflow, WebflowCallback } from './webflow';
|
|
1
|
+
import type { Webflow, WebflowCallback, WF } from './webflow';
|
|
2
2
|
/**
|
|
3
3
|
* Window object.
|
|
4
4
|
*/
|
|
@@ -9,6 +9,7 @@ declare global {
|
|
|
9
9
|
event: string;
|
|
10
10
|
} | IArguments>;
|
|
11
11
|
Webflow?: Webflow | WebflowCallback[];
|
|
12
|
+
wf?: WF;
|
|
12
13
|
isLoadingCustomCodeConfigs: boolean;
|
|
13
14
|
}
|
|
14
15
|
}
|