@thewhateverapp/tile-sdk 0.5.2 → 0.5.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useTileNavigation.d.ts","sourceRoot":"","sources":["../../src/react/useTileNavigation.ts"],"names":[],"mappings":"AAIA,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,UAAU,sBAAsB;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,sBAAsB,QAyC7E"}
1
+ {"version":3,"file":"useTileNavigation.d.ts","sourceRoot":"","sources":["../../src/react/useTileNavigation.ts"],"names":[],"mappings":"AAIA,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,UAAU,sBAAsB;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,sBAAsB,QAoC7E"}
@@ -46,15 +46,9 @@ export function useTileNavigation({ router, pathname }) {
46
46
  unsubscribe();
47
47
  };
48
48
  }, [bridge, router, pathname]);
49
- // When on /page route, request fullscreen from parent
50
- useEffect(() => {
51
- if (pathname === '/page') {
52
- console.log('[useTileNavigation] 📱 On /page route, requesting fullscreen from parent');
53
- bridge.navigateToPage();
54
- }
55
- else if (pathname === '/tile') {
56
- console.log('[useTileNavigation] 📱 On /tile route, requesting tile mode from parent');
57
- bridge.navigateToTile();
58
- }
59
- }, [pathname, bridge]);
49
+ // Note: We don't need to send navigate messages back to parent when route changes
50
+ // because the parent either:
51
+ // 1. Initiated the navigation (parent:navigate message) - already knows the state
52
+ // 2. Received a tile:navigate message from user action - will handle fullscreen
53
+ // Sending messages here creates a circular loop that closes fullscreen immediately!
60
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thewhateverapp/tile-sdk",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "SDK for building interactive tiles on The Whatever App platform",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",