@hortonstudio/main 1.1.6 → 1.1.8

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.
@@ -399,7 +399,7 @@ export async function init() {
399
399
  ease: config.headingSplit.ease,
400
400
  onComplete: () => {
401
401
  if (split && split.revert) {
402
- split.revert();
402
+
403
403
  }
404
404
  }
405
405
  },
@@ -2,7 +2,18 @@
2
2
  const API_NAME = 'hsmain';
3
3
  export async function init() {
4
4
 
5
- // Your original code with minimal changes
5
+ // Register the transition logic to run after Webflow is ready
6
+ window[API_NAME].afterWebflowReady(() => {
7
+ // Only run if jQuery is available
8
+ if (typeof $ !== 'undefined') {
9
+ initTransitions();
10
+ }
11
+ });
12
+
13
+ return { result: 'anim-transition initialized' };
14
+ }
15
+
16
+ function initTransitions() {
6
17
  let transitionTrigger = $(".transition-trigger");
7
18
  let introDurationMS = 800;
8
19
  let exitDurationMS = 400;
@@ -36,6 +47,4 @@ export async function init() {
36
47
  setTimeout(() => {$(window).on("resize", function () {
37
48
  setTimeout(() => {$(".transition").css("display", "none");}, 50);});
38
49
  }, introDurationMS);
39
-
40
- return { result: 'anim-transition initialized' };
41
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hortonstudio/main",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {