@teleporthq/teleport-project-generator-next 0.45.19 → 0.45.21

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 (41) hide show
  1. package/__tests__/_helpers/data-exposure-fixture.ts +114 -44
  2. package/__tests__/component-bound-state.test.ts +817 -0
  3. package/__tests__/nav-active-links-locale.test.ts +279 -0
  4. package/__tests__/page-transition-end2end.test.ts +3 -3
  5. package/__tests__/page-transition-language-switch.test.ts +273 -0
  6. package/__tests__/security-runtime-require-paths.test.ts +29 -1
  7. package/dist/cjs/index.d.ts.map +1 -1
  8. package/dist/cjs/index.js +2 -0
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/nav-active-link/nav-active-link-component.d.ts +1 -1
  11. package/dist/cjs/nav-active-link/nav-active-link-component.d.ts.map +1 -1
  12. package/dist/cjs/nav-active-link/nav-active-link-component.js +12 -4
  13. package/dist/cjs/nav-active-link/nav-active-link-component.js.map +1 -1
  14. package/dist/cjs/page-transition/page-transition-component.d.ts.map +1 -1
  15. package/dist/cjs/page-transition/page-transition-component.js +1 -1
  16. package/dist/cjs/page-transition/page-transition-component.js.map +1 -1
  17. package/dist/cjs/state-data-source-plugin.d.ts +27 -0
  18. package/dist/cjs/state-data-source-plugin.d.ts.map +1 -1
  19. package/dist/cjs/state-data-source-plugin.js +278 -4
  20. package/dist/cjs/state-data-source-plugin.js.map +1 -1
  21. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  22. package/dist/esm/index.d.ts.map +1 -1
  23. package/dist/esm/index.js +3 -1
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/nav-active-link/nav-active-link-component.d.ts +1 -1
  26. package/dist/esm/nav-active-link/nav-active-link-component.d.ts.map +1 -1
  27. package/dist/esm/nav-active-link/nav-active-link-component.js +12 -4
  28. package/dist/esm/nav-active-link/nav-active-link-component.js.map +1 -1
  29. package/dist/esm/page-transition/page-transition-component.d.ts.map +1 -1
  30. package/dist/esm/page-transition/page-transition-component.js +1 -1
  31. package/dist/esm/page-transition/page-transition-component.js.map +1 -1
  32. package/dist/esm/state-data-source-plugin.d.ts +27 -0
  33. package/dist/esm/state-data-source-plugin.d.ts.map +1 -1
  34. package/dist/esm/state-data-source-plugin.js +278 -5
  35. package/dist/esm/state-data-source-plugin.js.map +1 -1
  36. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +21 -21
  38. package/src/index.ts +6 -1
  39. package/src/nav-active-link/nav-active-link-component.ts +68 -5
  40. package/src/page-transition/page-transition-component.ts +19 -5
  41. package/src/state-data-source-plugin.ts +433 -9
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sHAAuE;AACvE,8GAAwE;AACxE,oHAAkF;AAClF,qFAA+E;AAC/E,yFAAmF;AACnF,qGAA8F;AAC9F,+FAAuF;AACvF,mGAAuF;AACvF,mGAAuF;AACvF,mGAGsD;AACtD,iGAGqD;AACrD,6DAAyF;AACzF,uEAAwE;AACxE,iCAA0E;AAC1E,uEAAwE;AACxE,+DAA2D;AAoStB,mGApS5B,yCAAkB,OAoS4B;AAnSvD,wEAA6C;AAmSY,uBAnSlD,0BAAY,CAmSkD;AAlSrE,0FAAqG;AACrG,+DAA+E;AAC/E,2EAAmF;AACnF,mFAA0F;AAC1F,mFAA2F;AAC3F,uEAA4E;AAC5E,4FAA+F;AAC/F,2EAAgF;AAChF,uEAA6E;AAC7E,yDAA+D;AAC/D,mEAA2E;AAC3E,2EAA0E;AAC1E,6FAImD;AACnD,oEAAsF;AACtF,gEAA4E;AAC5E,2DAAkE;AAClE,6DAAuE;AACvE,mEAAiF;AACjF,oEAAoF;AACpF,6DAAuE;AACvE,wDAA6D;AAC7D,4EAA2E;AAC3E,6DAAoE;AACpE,qEAAqE;AACrE,6FAA8F;AAC9F,qEAAmF;AACnF,wEAAyF;AACzF,wEAAyF;AACzF,6DAAw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BAAyB,OAAA;AAClC,2DAAiE;AAAxD,0HAAA,uBAAuB,OAAA;AAChC,8DAAuE;AAA9D,6HAAA,0BAA0B,OAAA;AACnC,mFAAmF;AACnF,8EAA8E;AAC9E,uEAAuE;AACvE,qCAA0D;AAAjD,yHAAA,8BAA8B,OAAA;AACvC,uEAA+E;AAAtE,oIAAA,6BAA6B,OAAA;AACtC,oEAA0E;AAAjE,kIAAA,2BAA2B,OAAA;AACpC,uEAAgF;AAAvE,qIAAA,8BAA8B,OAAA;AACvC,6EAGsC;AAFpC,6IAAA,8BAA8B,OAAA;AAC9B,oJAAA,qCAAqC,OAAA;AAEvC,uEAA4E;AAAnE,qIAAA,4BAA4B,OAAA;AACrC,0DAA4E;AAAnE,sHAAA,2BAA2B,OAAA;AACpC,uEAA6E;AAApE,4IAAA,gCAAgC,OAAA;AACzC,2EAA0E;AAAjE,yIAAA,2BAA2B,OAAA;AACpC,6FAGmD;AAFjD,6IAAA,2BAA2B,OAAA;AAC3B,2IAAA,yBAAyB,OAAA;AAE3B,4FAA+F;AAAtF,yIAAA,6BAA6B,OAAA;AACtC,0FAAqG;AAA5F,+IAAA,oCAAoC,OAAA;AAC7C,2EAAgF;AAAvE,yIAAA,8BAA8B,OAAA;AACvC,iGAGqD;AAFnD,mJAAA,+BAA+B,OAAA;AAC/B,uJAAA,mCAAmC,OAAA;AAErC,qCAAsD;AAA7C,qHAAA,0BAA0B,OAAA;AAMnC,6CAAgD;AAAvC,+GAAA,gBAAgB,OAAA"}
@@ -1,2 +1,2 @@
1
- export declare const NAV_ACTIVE_LINK_COMPONENT_SOURCE = "import { useEffect } from 'react'\nimport { useRouter } from 'next/router'\n\n// Containers whose <a> descendants are navigation links.\nconst NAV_CONTAINERS = 'nav, [role=\"navigation\"], [class*=\"navigation\"], [class*=\"sidebar\"], [class*=\"navbar\"]'\n// The visible element the CSS styles as active may be the <a> itself or an\n// inner wrapper carrying the shared base class (e.g. <a><div class=\"navigation-link\">).\nconst ACTIVE_TARGET_TOKENS = ['navigation-link', 'nav-link', 'sidebar-link', 'nav-item', 'menu-item']\n\nfunction normalizePath(path) {\n if (!path) return '/'\n const clean = path.split('#')[0].split('?')[0]\n const trimmed = clean.replace(/\\/+$/, '')\n return trimmed === '' ? '/' : trimmed\n}\n\nfunction collectActiveTargets(anchor) {\n const targets = [anchor]\n const descendants = anchor.querySelectorAll('*')\n for (let i = 0; i < descendants.length; i++) {\n const el = descendants[i]\n const tokens = (el.getAttribute('class') || '').split(/\\s+/)\n for (let t = 0; t < tokens.length; t++) {\n if (ACTIVE_TARGET_TOKENS.indexOf(tokens[t]) !== -1) {\n targets.push(el)\n break\n }\n }\n }\n return targets\n}\n\nconst NavActiveLinks = () => {\n const router = useRouter()\n\n useEffect(() => {\n const apply = () => {\n try {\n const current = normalizePath(router.asPath)\n const seen = new Set()\n const containers = document.querySelectorAll(NAV_CONTAINERS)\n containers.forEach((container) => {\n const anchors = container.querySelectorAll('a[href]')\n anchors.forEach((anchor) => {\n if (seen.has(anchor)) return\n seen.add(anchor)\n const raw = anchor.getAttribute('href') || ''\n const linkable = raw && raw.charAt(0) !== '#' && !/^(https?:|mailto:|tel:)/i.test(raw)\n const isActive = linkable && normalizePath(raw) === current\n const targets = collectActiveTargets(anchor)\n targets.forEach((el) => {\n if (isActive) {\n el.classList.add('active')\n } else {\n el.classList.remove('active')\n }\n })\n if (isActive) {\n anchor.setAttribute('aria-current', 'page')\n } else if (anchor.getAttribute('aria-current') === 'page') {\n anchor.removeAttribute('aria-current')\n }\n })\n })\n } catch (err) {\n // Highlighting is best-effort \u2014 never let it break the page.\n }\n }\n\n apply()\n router.events.on('routeChangeComplete', apply)\n return () => {\n router.events.off('routeChangeComplete', apply)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [router.asPath])\n\n return null\n}\n\nexport default NavActiveLinks\n";
1
+ export declare const NAV_ACTIVE_LINK_COMPONENT_SOURCE = "import { useEffect } from 'react'\nimport { useRouter } from 'next/router'\n\n// Containers whose <a> descendants are navigation links.\nconst NAV_CONTAINERS = 'nav, [role=\"navigation\"], [class*=\"navigation\"], [class*=\"sidebar\"], [class*=\"navbar\"]'\n// The visible element the CSS styles as active may be the <a> itself or an\n// inner wrapper carrying the shared base class (e.g. <a><div class=\"navigation-link\">).\nconst ACTIVE_TARGET_TOKENS = ['navigation-link', 'nav-link', 'sidebar-link', 'nav-item', 'menu-item']\n\nfunction normalizePath(path) {\n if (!path) return '/'\n const clean = path.split('#')[0].split('?')[0]\n const trimmed = clean.replace(/\\/+$/, '')\n return trimmed === '' ? '/' : trimmed\n}\n\n// '/es/classes' -> { locale: 'es', path: '/classes' }. A path with no language\n// prefix is in the default language (undefined on a single-language site).\nfunction splitLocale(path, locales, defaultLocale) {\n const segments = path.split('/')\n if (locales && segments.length > 1 && locales.indexOf(segments[1]) !== -1) {\n return { locale: segments[1], path: normalizePath('/' + segments.slice(2).join('/')) }\n }\n return { locale: defaultLocale, path: path }\n}\n\nfunction collectActiveTargets(anchor) {\n const targets = [anchor]\n const descendants = anchor.querySelectorAll('*')\n for (let i = 0; i < descendants.length; i++) {\n const el = descendants[i]\n const tokens = (el.getAttribute('class') || '').split(/\\s+/)\n for (let t = 0; t < tokens.length; t++) {\n if (ACTIVE_TARGET_TOKENS.indexOf(tokens[t]) !== -1) {\n targets.push(el)\n break\n }\n }\n }\n return targets\n}\n\nconst NavActiveLinks = () => {\n const router = useRouter()\n\n useEffect(() => {\n const apply = () => {\n try {\n const current = normalizePath(router.asPath)\n const seen = new Set()\n const containers = document.querySelectorAll(NAV_CONTAINERS)\n containers.forEach((container) => {\n const anchors = container.querySelectorAll('a[href]')\n anchors.forEach((anchor) => {\n if (seen.has(anchor)) return\n seen.add(anchor)\n const raw = anchor.getAttribute('href') || ''\n const linkable = raw && raw.charAt(0) !== '#' && !/^(https?:|mailto:|tel:)/i.test(raw)\n const target = linkable\n ? splitLocale(normalizePath(raw), router.locales, router.defaultLocale)\n : null\n const isActive = !!target && target.path === current && target.locale === router.locale\n const targets = collectActiveTargets(anchor)\n targets.forEach((el) => {\n if (isActive) {\n el.classList.add('active')\n } else {\n el.classList.remove('active')\n }\n })\n if (isActive) {\n anchor.setAttribute('aria-current', 'page')\n } else if (anchor.getAttribute('aria-current') === 'page') {\n anchor.removeAttribute('aria-current')\n }\n })\n })\n } catch (err) {\n // Highlighting is best-effort \u2014 never let it break the page.\n }\n }\n\n apply()\n router.events.on('routeChangeComplete', apply)\n\n // Links can be put on the page after this ran: a page that is built again\n // when the visitor reaches it again (a language switch, another item of the\n // same page), a menu drawn only when it opens. Whenever links are added,\n // mark them, once per frame at most. Marking changes classes and attributes\n // only, never the elements, so it cannot call itself.\n let frame = 0\n const addsLinks = (records) => {\n for (let r = 0; r < records.length; r++) {\n const added = records[r].addedNodes\n for (let n = 0; n < added.length; n++) {\n const node = added[n]\n if (node.nodeType === 1 && (node.tagName === 'A' || node.querySelector('a[href]'))) {\n return true\n }\n }\n }\n return false\n }\n const observer =\n typeof MutationObserver === 'function'\n ? new MutationObserver((records) => {\n if (!frame && addsLinks(records)) {\n frame = requestAnimationFrame(() => {\n frame = 0\n apply()\n })\n }\n })\n : null\n if (observer) {\n observer.observe(document.body, { childList: true, subtree: true })\n }\n\n return () => {\n router.events.off('routeChangeComplete', apply)\n if (observer) {\n observer.disconnect()\n }\n if (frame) {\n cancelAnimationFrame(frame)\n }\n }\n // A language switch keeps asPath and changes only the locale; the links it\n // re-renders must be marked again once they are on the page.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [router.asPath, router.locale])\n\n return null\n}\n\nexport default NavActiveLinks\n";
2
2
  //# sourceMappingURL=nav-active-link-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-active-link-component.d.ts","sourceRoot":"","sources":["../../../src/nav-active-link/nav-active-link-component.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,gCAAgC,ozFAiF5C,CAAA"}
1
+ {"version":3,"file":"nav-active-link-component.d.ts","sourceRoot":"","sources":["../../../src/nav-active-link/nav-active-link-component.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,gCAAgC,27JAwI5C,CAAA"}
@@ -9,11 +9,19 @@ exports.NAV_ACTIVE_LINK_COMPONENT_SOURCE = void 0;
9
9
  // class and NO hardcoded `active` / `aria-current` — a hardcoded active makes
10
10
  // one link (e.g. "Taproom"/"Dashboard") look selected on EVERY page. This
11
11
  // helper adds the `active` class + `aria-current="page"` to the link whose
12
- // href matches the current page and REMOVES it from the others, on first paint
13
- // and on every client-side route change. Removing it from non-matching links
14
- // also self-corrects a link the generator may have accidentally left marked.
12
+ // href matches the current page and REMOVES it from the others, on first paint,
13
+ // on every client-side route change, and whenever links are added to the page.
14
+ // Removing it from non-matching links also self-corrects a link the generator
15
+ // may have accidentally left marked.
15
16
  //
16
17
  // It is purely additive: it never touches href/onClick, and the whole pass is
17
18
  // wrapped in try/catch, so it can never break navigation.
18
- exports.NAV_ACTIVE_LINK_COMPONENT_SOURCE = "import { useEffect } from 'react'\nimport { useRouter } from 'next/router'\n\n// Containers whose <a> descendants are navigation links.\nconst NAV_CONTAINERS = 'nav, [role=\"navigation\"], [class*=\"navigation\"], [class*=\"sidebar\"], [class*=\"navbar\"]'\n// The visible element the CSS styles as active may be the <a> itself or an\n// inner wrapper carrying the shared base class (e.g. <a><div class=\"navigation-link\">).\nconst ACTIVE_TARGET_TOKENS = ['navigation-link', 'nav-link', 'sidebar-link', 'nav-item', 'menu-item']\n\nfunction normalizePath(path) {\n if (!path) return '/'\n const clean = path.split('#')[0].split('?')[0]\n const trimmed = clean.replace(/\\/+$/, '')\n return trimmed === '' ? '/' : trimmed\n}\n\nfunction collectActiveTargets(anchor) {\n const targets = [anchor]\n const descendants = anchor.querySelectorAll('*')\n for (let i = 0; i < descendants.length; i++) {\n const el = descendants[i]\n const tokens = (el.getAttribute('class') || '').split(/\\s+/)\n for (let t = 0; t < tokens.length; t++) {\n if (ACTIVE_TARGET_TOKENS.indexOf(tokens[t]) !== -1) {\n targets.push(el)\n break\n }\n }\n }\n return targets\n}\n\nconst NavActiveLinks = () => {\n const router = useRouter()\n\n useEffect(() => {\n const apply = () => {\n try {\n const current = normalizePath(router.asPath)\n const seen = new Set()\n const containers = document.querySelectorAll(NAV_CONTAINERS)\n containers.forEach((container) => {\n const anchors = container.querySelectorAll('a[href]')\n anchors.forEach((anchor) => {\n if (seen.has(anchor)) return\n seen.add(anchor)\n const raw = anchor.getAttribute('href') || ''\n const linkable = raw && raw.charAt(0) !== '#' && !/^(https?:|mailto:|tel:)/i.test(raw)\n const isActive = linkable && normalizePath(raw) === current\n const targets = collectActiveTargets(anchor)\n targets.forEach((el) => {\n if (isActive) {\n el.classList.add('active')\n } else {\n el.classList.remove('active')\n }\n })\n if (isActive) {\n anchor.setAttribute('aria-current', 'page')\n } else if (anchor.getAttribute('aria-current') === 'page') {\n anchor.removeAttribute('aria-current')\n }\n })\n })\n } catch (err) {\n // Highlighting is best-effort \u2014 never let it break the page.\n }\n }\n\n apply()\n router.events.on('routeChangeComplete', apply)\n return () => {\n router.events.off('routeChangeComplete', apply)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [router.asPath])\n\n return null\n}\n\nexport default NavActiveLinks\n";
19
+ //
20
+ // On a multi-language site a link is current only when it leads to the page
21
+ // the visitor is on IN THE LANGUAGE they are on. `router.asPath` never carries
22
+ // the language prefix while a rendered href does (`/es/classes`), so the two
23
+ // are compared as { language, path } pairs. Comparing the bare strings marked
24
+ // no menu link on any translated page, and marked the default language's link
25
+ // in a language switcher as the current page on every one of them.
26
+ exports.NAV_ACTIVE_LINK_COMPONENT_SOURCE = "import { useEffect } from 'react'\nimport { useRouter } from 'next/router'\n\n// Containers whose <a> descendants are navigation links.\nconst NAV_CONTAINERS = 'nav, [role=\"navigation\"], [class*=\"navigation\"], [class*=\"sidebar\"], [class*=\"navbar\"]'\n// The visible element the CSS styles as active may be the <a> itself or an\n// inner wrapper carrying the shared base class (e.g. <a><div class=\"navigation-link\">).\nconst ACTIVE_TARGET_TOKENS = ['navigation-link', 'nav-link', 'sidebar-link', 'nav-item', 'menu-item']\n\nfunction normalizePath(path) {\n if (!path) return '/'\n const clean = path.split('#')[0].split('?')[0]\n const trimmed = clean.replace(/\\/+$/, '')\n return trimmed === '' ? '/' : trimmed\n}\n\n// '/es/classes' -> { locale: 'es', path: '/classes' }. A path with no language\n// prefix is in the default language (undefined on a single-language site).\nfunction splitLocale(path, locales, defaultLocale) {\n const segments = path.split('/')\n if (locales && segments.length > 1 && locales.indexOf(segments[1]) !== -1) {\n return { locale: segments[1], path: normalizePath('/' + segments.slice(2).join('/')) }\n }\n return { locale: defaultLocale, path: path }\n}\n\nfunction collectActiveTargets(anchor) {\n const targets = [anchor]\n const descendants = anchor.querySelectorAll('*')\n for (let i = 0; i < descendants.length; i++) {\n const el = descendants[i]\n const tokens = (el.getAttribute('class') || '').split(/\\s+/)\n for (let t = 0; t < tokens.length; t++) {\n if (ACTIVE_TARGET_TOKENS.indexOf(tokens[t]) !== -1) {\n targets.push(el)\n break\n }\n }\n }\n return targets\n}\n\nconst NavActiveLinks = () => {\n const router = useRouter()\n\n useEffect(() => {\n const apply = () => {\n try {\n const current = normalizePath(router.asPath)\n const seen = new Set()\n const containers = document.querySelectorAll(NAV_CONTAINERS)\n containers.forEach((container) => {\n const anchors = container.querySelectorAll('a[href]')\n anchors.forEach((anchor) => {\n if (seen.has(anchor)) return\n seen.add(anchor)\n const raw = anchor.getAttribute('href') || ''\n const linkable = raw && raw.charAt(0) !== '#' && !/^(https?:|mailto:|tel:)/i.test(raw)\n const target = linkable\n ? splitLocale(normalizePath(raw), router.locales, router.defaultLocale)\n : null\n const isActive = !!target && target.path === current && target.locale === router.locale\n const targets = collectActiveTargets(anchor)\n targets.forEach((el) => {\n if (isActive) {\n el.classList.add('active')\n } else {\n el.classList.remove('active')\n }\n })\n if (isActive) {\n anchor.setAttribute('aria-current', 'page')\n } else if (anchor.getAttribute('aria-current') === 'page') {\n anchor.removeAttribute('aria-current')\n }\n })\n })\n } catch (err) {\n // Highlighting is best-effort \u2014 never let it break the page.\n }\n }\n\n apply()\n router.events.on('routeChangeComplete', apply)\n\n // Links can be put on the page after this ran: a page that is built again\n // when the visitor reaches it again (a language switch, another item of the\n // same page), a menu drawn only when it opens. Whenever links are added,\n // mark them, once per frame at most. Marking changes classes and attributes\n // only, never the elements, so it cannot call itself.\n let frame = 0\n const addsLinks = (records) => {\n for (let r = 0; r < records.length; r++) {\n const added = records[r].addedNodes\n for (let n = 0; n < added.length; n++) {\n const node = added[n]\n if (node.nodeType === 1 && (node.tagName === 'A' || node.querySelector('a[href]'))) {\n return true\n }\n }\n }\n return false\n }\n const observer =\n typeof MutationObserver === 'function'\n ? new MutationObserver((records) => {\n if (!frame && addsLinks(records)) {\n frame = requestAnimationFrame(() => {\n frame = 0\n apply()\n })\n }\n })\n : null\n if (observer) {\n observer.observe(document.body, { childList: true, subtree: true })\n }\n\n return () => {\n router.events.off('routeChangeComplete', apply)\n if (observer) {\n observer.disconnect()\n }\n if (frame) {\n cancelAnimationFrame(frame)\n }\n }\n // A language switch keeps asPath and changes only the locale; the links it\n // re-renders must be marked again once they are on the page.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [router.asPath, router.locale])\n\n return null\n}\n\nexport default NavActiveLinks\n";
19
27
  //# sourceMappingURL=nav-active-link-component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-active-link-component.js","sourceRoot":"","sources":["../../../src/nav-active-link/nav-active-link-component.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,wCAAwC;AACxC,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,0EAA0E;AAC1E,2EAA2E;AAC3E,+EAA+E;AAC/E,6EAA6E;AAC7E,6EAA6E;AAC7E,EAAE;AACF,8EAA8E;AAC9E,0DAA0D;AAC7C,QAAA,gCAAgC,GAAG,izFAiF/C,CAAA"}
1
+ {"version":3,"file":"nav-active-link-component.js","sourceRoot":"","sources":["../../../src/nav-active-link/nav-active-link-component.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,wCAAwC;AACxC,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,0EAA0E;AAC1E,2EAA2E;AAC3E,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,qCAAqC;AACrC,EAAE;AACF,8EAA8E;AAC9E,0DAA0D;AAC1D,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,mEAAmE;AACtD,QAAA,gCAAgC,GAAG,w7JAwI/C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"page-transition-component.d.ts","sourceRoot":"","sources":["../../../src/page-transition/page-transition-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAS5D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,oBAAoB,CAAA;AAatE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,eAAO,MAAM,mCAAmC,WAAY,oBAAoB,KAAG,MAylBlF,CAAA"}
1
+ {"version":3,"file":"page-transition-component.d.ts","sourceRoot":"","sources":["../../../src/page-transition/page-transition-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAS5D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,oBAAoB,CAAA;AAatE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,eAAO,MAAM,mCAAmC,WAAY,oBAAoB,KAAG,MAumBlF,CAAA"}
@@ -110,7 +110,7 @@ var generatePageTransitionComponentCode = function (config) {
110
110
  var fadeIn = "opacity ".concat(duration, "s cubic-bezier(").concat(curve.join(', '), ")");
111
111
  var latePictureCss = "[".concat(LATE_PICTURE_ATTR, "=\"loading\"] { opacity: 0 !important; }\n") +
112
112
  "[".concat(LATE_PICTURE_ATTR, "=\"in\"] { transition: ").concat(fadeIn, " !important; }");
113
- return "import React from 'react'\nimport { useRouter } from 'next/router'\nimport { AnimatePresence, motion, usePresence } from 'framer-motion'\n\n".concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.reversePageTransitionPreset, "\n\n").concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.pageTransitionVariants, "\n\n").concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.pageTransitionCover, "\n\n").concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.pageTransitionSkipPattern, "\n\n").concat(reveal_on_screen_source_generated_1.REVEAL_ON_SCREEN_SOURCES.revealOnScreen, "\n\n").concat(morphHelpersSource(), "\n\nconst PRESET = '").concat(preset, "'\n// The preset's choices, resolved to words the variants understand.\nconst OPTIONS = ").concat(JSON.stringify(options), "\nconst CUSTOM = ").concat(JSON.stringify(custom), "\nconst ORIGIN_FROM_POINTER = ").concat(options.origin !== 'center', "\nconst DURATION = ").concat(duration, "\nconst EASE = [").concat(curve.join(', '), "]\nconst SLIDE_PX = ").concat(page_transition_variants_1.PAGE_TRANSITION_SLIDE_PX, "\nconst CENTER = { reverse: false, skip: false, originX: '50%', originY: '50%' }\nconst PANELS = pageTransitionCover(PRESET)\n// Pages that opted out: they appear instantly; leaving them still plays.\nconst SKIP_ROUTES = ").concat(JSON.stringify(skipRoutes), "\nconst INSTANT = { initial: {}, animate: {}, exit: {} }\n// A reveal (Circle, the Wipes): the arriving page opens over the leaving one.\nconst REVEAL = (() => {\n const variants = pageTransitionVariants(PRESET, SLIDE_PX, CENTER, OPTIONS, CUSTOM || undefined)\n return !!(variants && variants.animate.clipPath)\n})()\n// Every page change plays frame by frame, framer writing each value onto the\n// page. Run by the browser (framer's default for opacity, clip-path and\n// filter), an animation ends one frame before framer writes its last value,\n// and for that frame the page shows where it started: a reveal blinks away as\n// it completes, a page faded in over the leaving one turns clear and the\n// leaving page flashes back, a page that has left shows again. An onUpdate\n// handler, even one that does nothing, keeps the animation in framer's own loop.\nconst stepByFrame = () => {}\n// A dissolve (Fade, Crossfade): the arriving page fades in over the leaving\n// one, which has no exit of its own \u2014 it holds still until the arrival is in.\nconst DISSOLVE = ").concat(dissolves, "\nconst dissolveOver = (variants) => (DISSOLVE && variants ? Object.assign({}, variants, { exit: {} }) : variants)\n// The two pages overlap for a dissolve, and for a reveal without View\n// Transitions: the arriving page is laid above the frozen one (a positioned box\n// would paint on top of it), at least a screen tall and on the site's ground.\nconst OVERLAP = REVEAL || DISSOLVE\nconst OVER = { position: 'relative', zIndex: 1, minHeight: '100vh' }\n// Until it plays, the arriving page lies unseen over the leaving one: a click\n// there must not land on it.\nconst UNSEEN = { pointerEvents: 'none' }\nconst SKIP_PATTERNS = SKIP_ROUTES.map(pageTransitionSkipPattern)\nconst isSkippedRoute = (key) => SKIP_PATTERNS.some((pattern) => pattern.test(key))\n// The cover family paints its panels in the theme colour the editor chose.\nconst PANEL_COLOR = '").concat((0, page_transition_variants_1.pageTransitionCoverColor)(options.color), "'\nconst PANEL_BASE = { position: 'fixed', top: 0, bottom: 0, zIndex: 2147483000, pointerEvents: 'none', background: PANEL_COLOR }\nconst panelBounds = (panel) =>\n panel.side === 'left' ? { left: 0, right: '50%' } : panel.side === 'right' ? { left: '50%', right: 0 } : { left: 0, right: 0 }\n\nconst routeKeyOf = (url) => String(url || '').split(/[?#]/)[0]\n\n// The page changes played as a View Transition (a reveal; a flying picture), as\n// the static export plays them.\nconst VT_CSS = ").concat(JSON.stringify(vtCss), "\nconst FLIES = ").concat(flies, "\n// A page that takes longer than this to arrive switches without the transition.\nconst ARRIVAL_WAIT_MS = 3000\n// An arriving picture still loading is waited for this long, so the flight lands on it.\nconst MORPH_DECODE_MS = 300\n// The arriving page waits this long at most for the pictures on its first\n// screen while the leaving page still holds the screen (the two overlap, or the\n// browser holds its picture for a View Transition)...\nconst PICTURE_WAIT_MS = 1200\n// ...and this long once the leaving page has gone: the screen is bare meanwhile.\nconst BARE_PICTURE_WAIT_MS = 300\n// A picture still loading when its page plays fades in once it has loaded\n// (fadeInWhenLoaded); one still loading after this is shown as it is.\nconst LATE_PICTURE_WAIT_MS = 5000\nconst LATE_PICTURE_ATTR = '").concat(LATE_PICTURE_ATTR, "'\nconst LATE_PICTURE_CSS = ").concat(JSON.stringify(latePictureCss), "\nconst prefersLessMotion = () =>\n !!(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches)\n// A scrollbar that takes room (Windows, a Mac with a mouse) stays while the\n// leaving page is frozen. Frozen, that page no longer gives the document a\n// height, so its scrollbar vanished at the click and came back when the\n// arriving page mounted: the page jolted sideways by the scrollbar's width, and\n// back. Held with overflow-y: scroll, which keeps the scrollbar's track on\n// screen in every browser. Measured before the freeze; returns what puts <html>\n// back exactly as it was, or null when the scrollbar takes no room.\nconst holdScrollbarGutter = () => {\n const root = document.documentElement\n if (window.innerWidth - root.clientWidth <= 0) {\n return null\n }\n const own = root.style.getPropertyValue('overflow-y')\n const ownPriority = root.style.getPropertyPriority('overflow-y')\n root.style.setProperty('overflow-y', 'scroll', 'important')\n return () => {\n if (own) {\n root.style.setProperty('overflow-y', own, ownPriority)\n } else {\n root.style.removeProperty('overflow-y')\n }\n }\n}\n// Sets one property of an element's own style; returns what puts it back\n// exactly as it was.\nconst holdStyle = (element, name, value) => {\n const own = element.style.getPropertyValue(name)\n const ownPriority = element.style.getPropertyPriority(name)\n element.style.setProperty(name, value, 'important')\n return () => {\n if (own) {\n element.style.setProperty(name, own, ownPriority)\n } else {\n element.style.removeProperty(name)\n }\n }\n}\n// The colour the site paints behind its pages: <html>'s background, else\n// <body>'s (the browser paints the canvas with it), else the browser's own. A\n// page laid over a leaving one is painted on it, so its transparent parts show\n// what they will show once the page is alone, not the page underneath.\nconst siteGround = () => {\n const painted = (element) => {\n const color = element ? window.getComputedStyle(element).backgroundColor : ''\n return color && color !== 'transparent' && color !== 'rgba(0, 0, 0, 0)' ? color : ''\n }\n return painted(document.documentElement) || painted(document.body) || 'Canvas'\n}\n// The page in the document for a route key, if any (a leaving page stays in it\n// while the two pages overlap).\nconst pageIn = (key) =>\n Array.prototype.find.call(\n document.querySelectorAll('[data-tq-page-transition]'),\n (node) => node.getAttribute('data-tq-page-transition') === key\n ) || null\n// A page held under the one laid over it takes no input and is hidden from\n// assistive technology: inert, or aria-hidden where the browser has no inert.\nconst setLeaving = (node, leaving) => {\n if (!node) {\n return\n }\n if ('inert' in node) {\n node.inert = leaving\n } else if (leaving) {\n node.setAttribute('aria-hidden', 'true')\n } else {\n node.removeAttribute('aria-hidden')\n }\n}\n// Runs before the browser paints; the server, which paints nothing, gets the\n// ordinary effect (React warns about a layout effect there).\nconst useBeforePaintEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect\n// Settles once the pictures on the arriving page's first screen are decoded, or\n// after waitMs (an image the page asks to decode off the main thread paints a\n// few frames after the rest of the page), with the pictures still loading.\nconst picturesReady = (node, waitMs) => {\n const pictures = Array.prototype.filter.call(node.querySelectorAll('img'), (image) => {\n const box = image.getBoundingClientRect()\n return box.bottom > 0 && box.top < window.innerHeight && typeof image.decode === 'function'\n })\n return Promise.race([\n Promise.all(pictures.map((image) => image.decode().catch(() => {}))),\n new Promise((resolve) => setTimeout(resolve, waitMs)),\n ]).then(() => pictures.filter((image) => !image.complete))\n}\n// A picture still loading when its page plays stays unseen until it has\n// loaded, then fades in: shown as it loaded, it snapped in over the page in a\n// single frame. One that fails is shown at once, as it would be anyway, and\n// none stays unseen past LATE_PICTURE_WAIT_MS.\nconst fadeInWhenLoaded = (image) => {\n image.setAttribute(LATE_PICTURE_ATTR, 'loading')\n const show = (event) => {\n image.removeEventListener('load', show)\n image.removeEventListener('error', show)\n clearTimeout(giveUp)\n if (event && event.type === 'load') {\n image.setAttribute(LATE_PICTURE_ATTR, 'in')\n setTimeout(() => image.removeAttribute(LATE_PICTURE_ATTR), DURATION * 1000 + 100)\n } else {\n image.removeAttribute(LATE_PICTURE_ATTR)\n }\n }\n const giveUp = setTimeout(show, LATE_PICTURE_WAIT_MS)\n image.addEventListener('load', show)\n image.addEventListener('error', show)\n}\n\n// Keeps the leaving page in the document while it is still needed: until the\n// browser has pictured it (a View Transition), or until the page laid over it\n// has fully come in (the two pages overlap) \u2014 or, should that arrival never\n// complete, a little after its time.\nconst HoldPage = ({ pageKey, changeRef, overlapRef }) => {\n const [isPresent, safeToRemove] = usePresence()\n React.useEffect(() => {\n if (isPresent) {\n return\n }\n const change = changeRef.current\n const overlap = overlapRef.current\n if (change && change.leavingKey === pageKey) {\n change.captured.then(safeToRemove)\n } else if (overlap && overlap.leavingKey === pageKey) {\n setLeaving(pageIn(pageKey), true)\n overlap.opened.then(safeToRemove)\n setTimeout(overlap.finish, DURATION * 1000 + PICTURE_WAIT_MS + 1000)\n } else {\n safeToRemove()\n }\n }, [isPresent])\n return null\n}\n\nconst TqPageTransition = ({ children }) => {\n const router = useRouter()\n const routeKey = routeKeyOf(router.asPath)\n const routeKeyRef = React.useRef(routeKey)\n routeKeyRef.current = routeKey\n const [frozen, setFrozen] = React.useState(null)\n const [context, setContext] = React.useState(CENTER)\n const [panelPhase, setPanelPhase] = React.useState('idle')\n // The page laid over the leaving one while the two overlap, and the ground it is painted on.\n const [over, setOver] = React.useState(null)\n // The page whose arrival may play: the first page at once, every later one\n // once its first screen's pictures are ready.\n const [readyKey, setReadyKey] = React.useState(routeKey)\n const readyKeyRef = React.useRef(routeKey)\n const pageRef = React.useRef(null)\n const popRef = React.useRef(false)\n const pointerRef = React.useRef(null)\n const clickedRef = React.useRef(null)\n const changeRef = React.useRef(null)\n const overlapRef = React.useRef(null)\n // Puts back the scrollbar room held for the frozen page (holdScrollbarGutter).\n const gutterRef = React.useRef(null)\n // Puts back <html>'s scroll-behavior, held instant through a View Transition's page change.\n const scrollRef = React.useRef(null)\n const variants = React.useMemo(\n () =>\n context.skip || context.morph\n ? INSTANT\n : dissolveOver(\n revealOnScreen(pageTransitionVariants(PRESET, SLIDE_PX, context, OPTIONS, CUSTOM || undefined), context.screen)\n ),\n [context]\n )\n\n // The arriving page is in the document: wait for the pictures on its first\n // screen (and, in a View Transition, for its twin of the flying picture),\n // then let it play \u2014 or let the browser picture the new state.\n const setPage = React.useCallback((node) => {\n // A page that goes after the next one has mounted (the two overlapped)\n // leaves the ref to the page still in the document, not to nothing.\n pageRef.current = node || pageIn(routeKeyRef.current)\n const key = node ? node.getAttribute('data-tq-page-transition') : null\n if (key === null || key === readyKeyRef.current) {\n return\n }\n readyKeyRef.current = key\n const change = changeRef.current\n const landing = change && !change.landed && node !== change.leaving ? change : null\n let twin = null\n if (landing) {\n landing.landed = true\n tqMorphClear()\n twin = landing.src ? tqMorphTarget(landing.src) : null\n if (twin) {\n twin.style.viewTransitionName = TQ_MORPH_NAME\n }\n }\n const twinReady =\n twin && !twin.complete && typeof twin.decode === 'function'\n ? Promise.race([\n twin.decode().catch(() => {}),\n new Promise((resolve) => setTimeout(resolve, MORPH_DECODE_MS)),\n ])\n : Promise.resolve()\n const overlap = overlapRef.current\n const held = !!landing || !!(overlap && overlap.arrivingKey === key)\n Promise.all([picturesReady(node, held ? PICTURE_WAIT_MS : BARE_PICTURE_WAIT_MS), twinReady]).then(([loading]) => {\n // A later page may have arrived meanwhile; this one's turn has passed.\n if (readyKeyRef.current === key) {\n // The flight lands on its twin as it is; a page shown at once shows its pictures at once.\n if (!prefersLessMotion() && !isSkippedRoute(key)) {\n loading.filter((image) => image !== twin).forEach(fadeInWhenLoaded)\n }\n setReadyKey(key)\n setPanelPhase((phase) => (phase === 'covered' ? 'uncovering' : phase))\n }\n if (landing) {\n landing.arrive()\n }\n })\n }, [])\n\n React.useEffect(() => {\n const onPointerDown = (event) => {\n pointerRef.current = { x: event.clientX, y: event.clientY }\n }\n const onClick = (event) => {\n clickedRef.current = event.target && event.target.closest ? event.target.closest('a[href]') : null\n }\n window.addEventListener('pointerdown', onPointerDown, true)\n window.addEventListener('click', onClick, true)\n return () => {\n window.removeEventListener('pointerdown', onPointerDown, true)\n window.removeEventListener('click', onClick, true)\n }\n }, [])\n\n React.useEffect(() => {\n router.beforePopState(() => {\n popRef.current = true\n return true\n })\n const root = document.documentElement\n const abandon = (change) => {\n if (!change.landed) {\n change.landed = true\n change.transition.skipTransition()\n change.arrive()\n }\n }\n // A change that does not overlap lets a page still held from the last one\n // go at once, instead of leaving it over the page that appears.\n const letHeldPageGo = () => {\n if (overlapRef.current) {\n overlapRef.current.finish()\n }\n }\n // The page change as a View Transition: every reveal, and a picture in the\n // followed link that the next page shows too (going forward only).\n const startViewChange = (url, pointer, reverse) => {\n if (!VT_CSS || !pageRef.current || typeof document.startViewTransition !== 'function' || prefersLessMotion()) {\n return false\n }\n const image = FLIES && !reverse ? tqMorphSource(url, clickedRef.current) : null\n if (!image && !REVEAL) {\n return false\n }\n const change = { leavingKey: routeKeyRef.current, leaving: pageRef.current, src: image ? image.currentSrc || image.src : null, landed: false }\n change.captured = new Promise((resolve) => {\n change.onCaptured = resolve\n })\n const arrived = new Promise((resolve) => {\n change.arrive = resolve\n })\n tqMorphClear()\n if (image) {\n image.style.viewTransitionName = TQ_MORPH_NAME\n }\n if (reverse) {\n root.setAttribute('").concat(BACK_ATTR, "', 'back')\n }\n if (pointer) {\n root.style.setProperty('").concat(ORIGIN_X, "', pointer.x + 'px')\n root.style.setProperty('").concat(ORIGIN_Y, "', pointer.y + 'px')\n }\n // Nothing is frozen here, so Next's scroll to the arriving page's top\n // follows the site's smooth scrolling (kept for its in-page anchors): the\n // page arrived at the leaving one's offset and glided up through itself.\n // A change replacing one still playing finds the scroll already held.\n if (!scrollRef.current) {\n scrollRef.current = holdStyle(root, 'scroll-behavior', 'auto')\n }\n const settle = () => {\n if (changeRef.current === change) {\n changeRef.current = null\n tqMorphClear()\n root.removeAttribute('").concat(BACK_ATTR, "')\n root.style.removeProperty('").concat(ORIGIN_X, "')\n root.style.removeProperty('").concat(ORIGIN_Y, "')\n if (scrollRef.current) {\n scrollRef.current()\n scrollRef.current = null\n }\n }\n }\n changeRef.current = change\n try {\n change.transition = document.startViewTransition(() => {\n change.onCaptured()\n return arrived\n })\n } catch (error) {\n settle()\n return false\n }\n change.transition.ready.catch(() => {})\n change.transition.finished.then(settle, settle)\n setTimeout(() => abandon(change), ARRIVAL_WAIT_MS)\n return true\n }\n const onRouteChangeStart = (url) => {\n if (routeKeyOf(url) === routeKeyRef.current) {\n return\n }\n const reverse = popRef.current\n popRef.current = false\n // A skipped page appears instantly; leaving it still plays the site's transition.\n // A visitor who asks for less motion gets every page that way. It is read\n // here, never while rendering: the server cannot know it, and a first render\n // that differs from the server's makes React throw the page away.\n const skip = prefersLessMotion() || isSkippedRoute(routeKeyOf(url))\n const pointer = reverse || !ORIGIN_FROM_POINTER ? null : pointerRef.current\n // A reveal is measured on this screen (revealOnScreen); without a press it\n // grows from the screen's centre, not the page's.\n const screen = { width: window.innerWidth, height: window.innerHeight }\n const origin = pointer || { x: screen.width / 2, y: screen.height / 2 }\n const next = { reverse, skip, originX: origin.x + 'px', originY: origin.y + 'px', screen }\n // Back to a page that has not gone yet (the two pages overlapped): it is\n // still in the document, pictures and all, so it plays at once and takes\n // input again.\n const returning = pageIn(routeKeyOf(url))\n if (returning) {\n setLeaving(returning, false)\n readyKeyRef.current = routeKeyOf(url)\n setReadyKey(readyKeyRef.current)\n }\n if (!skip && startViewChange(url, pointer, reverse)) {\n letHeldPageGo()\n setContext(Object.assign({}, next, { morph: true }))\n return\n }\n setContext(next)\n if (PANELS && !skip) {\n setPanelPhase('covering')\n }\n if (OVERLAP && !skip) {\n // The two pages overlap: the leaving page is held under the arriving\n // one until that has fully come in (HoldPage).\n const overlap = { leavingKey: routeKeyRef.current, arrivingKey: routeKeyOf(url) }\n overlap.opened = new Promise((resolve) => {\n overlap.open = resolve\n })\n overlap.finish = () => {\n overlap.open()\n if (overlapRef.current === overlap) {\n overlapRef.current = null\n setOver(null)\n }\n }\n overlapRef.current = overlap\n setOver({ key: overlap.arrivingKey, ground: siteGround() })\n } else {\n letHeldPageGo()\n }\n // A change replacing a cancelled one finds the page still frozen and the\n // room still held: held again, the hold would take the first hold's\n // overflow-y for the page's own and leave it on <html>.\n if (!gutterRef.current) {\n gutterRef.current = holdScrollbarGutter()\n }\n setFrozen({ key: routeKeyRef.current, top: window.scrollY || 0 })\n }\n const onRouteChangeError = () => {\n if (changeRef.current) {\n abandon(changeRef.current)\n }\n }\n router.events.on('routeChangeStart', onRouteChangeStart)\n router.events.on('routeChangeError', onRouteChangeError)\n return () => {\n router.events.off('routeChangeStart', onRouteChangeStart)\n router.events.off('routeChangeError', onRouteChangeError)\n router.beforePopState(() => true)\n }\n }, [router])\n\n // The room goes back before the paint of the commit that ends the freeze: that\n // commit mounts the arriving page (when the two overlap, lets the leaving page go), so\n // the scrollbar passes straight to the page left in the document. A cancelled\n // change leaves its page frozen until the change replacing it has played, so\n // the room stays with it: Next starts that change a few awaits after the error.\n const releaseGutter = () => {\n if (gutterRef.current) {\n gutterRef.current()\n gutterRef.current = null\n }\n }\n useBeforePaintEffect(() => {\n if (!frozen) {\n releaseGutter()\n }\n }, [frozen])\n React.useEffect(() => releaseGutter, [])\n\n if (!variants) {\n return children\n }\n\n const frozenStyle =\n frozen && frozen.key === routeKey\n ? { position: 'fixed', top: -frozen.top, left: 0, right: 0 }\n : undefined\n const overStyle =\n over && over.key === routeKey\n ? Object.assign({ backgroundColor: over.ground }, OVER, readyKey === routeKey ? null : UNSEEN)\n : undefined\n const pageStyle = frozenStyle || overStyle\n\n const onExitComplete = () => {\n setFrozen(null)\n // The panels open once the arriving page's pictures are ready (setPage).\n if (PANELS && panelPhase === 'covering') {\n setPanelPhase('covered')\n }\n }\n // The page laid over the leaving one has fully come in: let the leaving page go.\n const onPageAnimationComplete = (definition) => {\n const overlap = overlapRef.current\n if (definition === 'animate' && overlap && overlap.arrivingKey === routeKey) {\n overlap.finish()\n }\n }\n\n return (\n <>\n <AnimatePresence mode={context.morph || !OVERLAP ? 'wait' : 'sync'} initial={false} onExitComplete={onExitComplete}>\n <motion.div\n key={routeKey}\n ref={setPage}\n initial=\"initial\"\n animate={readyKey === routeKey ? 'animate' : 'initial'}\n exit=\"exit\"\n variants={variants}\n transition={{ duration: DURATION, ease: EASE }}\n onUpdate={stepByFrame}\n onAnimationComplete={onPageAnimationComplete}\n style={pageStyle}\n data-tq-page-transition={routeKey}\n >\n {children}\n {VT_CSS || OVERLAP ? <HoldPage pageKey={routeKey} changeRef={changeRef} overlapRef={overlapRef} /> : null}\n </motion.div>\n </AnimatePresence>\n {PANELS\n ? PANELS.map((panel, index) => (\n <motion.div\n key={index}\n aria-hidden=\"true\"\n data-tq-page-transition-panel={index}\n style={Object.assign({}, PANEL_BASE, panelBounds(panel))}\n initial={panel.from}\n animate={panelPhase === 'covering' || panelPhase === 'covered' ? panel.cover : panelPhase === 'uncovering' ? panel.away : panel.from}\n transition={panelPhase === 'idle' ? { duration: 0 } : { duration: DURATION, ease: EASE }}\n onAnimationComplete={() => {\n if (panelPhase === 'uncovering') {\n setPanelPhase('idle')\n }\n }}\n />\n ))\n : null}\n {VT_CSS ? <style dangerouslySetInnerHTML={{ __html: VT_CSS }} /> : null}\n <style dangerouslySetInnerHTML={{ __html: LATE_PICTURE_CSS }} />\n </>\n )\n}\n\nexport default TqPageTransition\n");
113
+ return "import React from 'react'\nimport { useRouter } from 'next/router'\nimport { AnimatePresence, motion, usePresence } from 'framer-motion'\n\n".concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.reversePageTransitionPreset, "\n\n").concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.pageTransitionVariants, "\n\n").concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.pageTransitionCover, "\n\n").concat(teleport_shared_1.PageTransition.PAGE_TRANSITION_HELPER_SOURCES.pageTransitionSkipPattern, "\n\n").concat(reveal_on_screen_source_generated_1.REVEAL_ON_SCREEN_SOURCES.revealOnScreen, "\n\n").concat(morphHelpersSource(), "\n\nconst PRESET = '").concat(preset, "'\n// The preset's choices, resolved to words the variants understand.\nconst OPTIONS = ").concat(JSON.stringify(options), "\nconst CUSTOM = ").concat(JSON.stringify(custom), "\nconst ORIGIN_FROM_POINTER = ").concat(options.origin !== 'center', "\nconst DURATION = ").concat(duration, "\nconst EASE = [").concat(curve.join(', '), "]\nconst SLIDE_PX = ").concat(page_transition_variants_1.PAGE_TRANSITION_SLIDE_PX, "\nconst CENTER = { reverse: false, skip: false, originX: '50%', originY: '50%' }\nconst PANELS = pageTransitionCover(PRESET)\n// Pages that opted out: they appear instantly; leaving them still plays.\nconst SKIP_ROUTES = ").concat(JSON.stringify(skipRoutes), "\nconst INSTANT = { initial: {}, animate: {}, exit: {} }\n// A reveal (Circle, the Wipes): the arriving page opens over the leaving one.\nconst REVEAL = (() => {\n const variants = pageTransitionVariants(PRESET, SLIDE_PX, CENTER, OPTIONS, CUSTOM || undefined)\n return !!(variants && variants.animate.clipPath)\n})()\n// Every page change plays frame by frame, framer writing each value onto the\n// page. Run by the browser (framer's default for opacity, clip-path and\n// filter), an animation ends one frame before framer writes its last value,\n// and for that frame the page shows where it started: a reveal blinks away as\n// it completes, a page faded in over the leaving one turns clear and the\n// leaving page flashes back, a page that has left shows again. An onUpdate\n// handler, even one that does nothing, keeps the animation in framer's own loop.\nconst stepByFrame = () => {}\n// A dissolve (Fade, Crossfade): the arriving page fades in over the leaving\n// one, which has no exit of its own \u2014 it holds still until the arrival is in.\nconst DISSOLVE = ").concat(dissolves, "\nconst dissolveOver = (variants) => (DISSOLVE && variants ? Object.assign({}, variants, { exit: {} }) : variants)\n// The two pages overlap for a dissolve, and for a reveal without View\n// Transitions: the arriving page is laid above the frozen one (a positioned box\n// would paint on top of it), at least a screen tall and on the site's ground.\nconst OVERLAP = REVEAL || DISSOLVE\nconst OVER = { position: 'relative', zIndex: 1, minHeight: '100vh' }\n// Until it plays, the arriving page lies unseen over the leaving one: a click\n// there must not land on it.\nconst UNSEEN = { pointerEvents: 'none' }\nconst SKIP_PATTERNS = SKIP_ROUTES.map(pageTransitionSkipPattern)\nconst isSkippedRoute = (key) => SKIP_PATTERNS.some((pattern) => pattern.test(key))\n// The cover family paints its panels in the theme colour the editor chose.\nconst PANEL_COLOR = '").concat((0, page_transition_variants_1.pageTransitionCoverColor)(options.color), "'\nconst PANEL_BASE = { position: 'fixed', top: 0, bottom: 0, zIndex: 2147483000, pointerEvents: 'none', background: PANEL_COLOR }\nconst panelBounds = (panel) =>\n panel.side === 'left' ? { left: 0, right: '50%' } : panel.side === 'right' ? { left: '50%', right: 0 } : { left: 0, right: 0 }\n\nconst routeKeyOf = (url) => String(url || '').split(/[?#]/)[0]\n// A route event names its address with the language in front (/es/classes); a\n// page's key, made from router.asPath, never carries it. Read without it, the\n// two meet. Compared as they came, a language switch looked like a move to\n// another page: the page was frozen to let the next one in, and no next one\n// ever arrived, so it stayed frozen and could not be scrolled.\nconst arrivingKeyOf = (url, locales) => {\n const key = routeKeyOf(url)\n const segments = key.split('/')\n if (locales && segments.length > 1 && locales.indexOf(segments[1]) !== -1) {\n return '/' + segments.slice(2).join('/')\n }\n return key\n}\n\n// The page changes played as a View Transition (a reveal; a flying picture), as\n// the static export plays them.\nconst VT_CSS = ").concat(JSON.stringify(vtCss), "\nconst FLIES = ").concat(flies, "\n// A page that takes longer than this to arrive switches without the transition.\nconst ARRIVAL_WAIT_MS = 3000\n// An arriving picture still loading is waited for this long, so the flight lands on it.\nconst MORPH_DECODE_MS = 300\n// The arriving page waits this long at most for the pictures on its first\n// screen while the leaving page still holds the screen (the two overlap, or the\n// browser holds its picture for a View Transition)...\nconst PICTURE_WAIT_MS = 1200\n// ...and this long once the leaving page has gone: the screen is bare meanwhile.\nconst BARE_PICTURE_WAIT_MS = 300\n// A picture still loading when its page plays fades in once it has loaded\n// (fadeInWhenLoaded); one still loading after this is shown as it is.\nconst LATE_PICTURE_WAIT_MS = 5000\nconst LATE_PICTURE_ATTR = '").concat(LATE_PICTURE_ATTR, "'\nconst LATE_PICTURE_CSS = ").concat(JSON.stringify(latePictureCss), "\nconst prefersLessMotion = () =>\n !!(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches)\n// A scrollbar that takes room (Windows, a Mac with a mouse) stays while the\n// leaving page is frozen. Frozen, that page no longer gives the document a\n// height, so its scrollbar vanished at the click and came back when the\n// arriving page mounted: the page jolted sideways by the scrollbar's width, and\n// back. Held with overflow-y: scroll, which keeps the scrollbar's track on\n// screen in every browser. Measured before the freeze; returns what puts <html>\n// back exactly as it was, or null when the scrollbar takes no room.\nconst holdScrollbarGutter = () => {\n const root = document.documentElement\n if (window.innerWidth - root.clientWidth <= 0) {\n return null\n }\n const own = root.style.getPropertyValue('overflow-y')\n const ownPriority = root.style.getPropertyPriority('overflow-y')\n root.style.setProperty('overflow-y', 'scroll', 'important')\n return () => {\n if (own) {\n root.style.setProperty('overflow-y', own, ownPriority)\n } else {\n root.style.removeProperty('overflow-y')\n }\n }\n}\n// Sets one property of an element's own style; returns what puts it back\n// exactly as it was.\nconst holdStyle = (element, name, value) => {\n const own = element.style.getPropertyValue(name)\n const ownPriority = element.style.getPropertyPriority(name)\n element.style.setProperty(name, value, 'important')\n return () => {\n if (own) {\n element.style.setProperty(name, own, ownPriority)\n } else {\n element.style.removeProperty(name)\n }\n }\n}\n// The colour the site paints behind its pages: <html>'s background, else\n// <body>'s (the browser paints the canvas with it), else the browser's own. A\n// page laid over a leaving one is painted on it, so its transparent parts show\n// what they will show once the page is alone, not the page underneath.\nconst siteGround = () => {\n const painted = (element) => {\n const color = element ? window.getComputedStyle(element).backgroundColor : ''\n return color && color !== 'transparent' && color !== 'rgba(0, 0, 0, 0)' ? color : ''\n }\n return painted(document.documentElement) || painted(document.body) || 'Canvas'\n}\n// The page in the document for a route key, if any (a leaving page stays in it\n// while the two pages overlap).\nconst pageIn = (key) =>\n Array.prototype.find.call(\n document.querySelectorAll('[data-tq-page-transition]'),\n (node) => node.getAttribute('data-tq-page-transition') === key\n ) || null\n// A page held under the one laid over it takes no input and is hidden from\n// assistive technology: inert, or aria-hidden where the browser has no inert.\nconst setLeaving = (node, leaving) => {\n if (!node) {\n return\n }\n if ('inert' in node) {\n node.inert = leaving\n } else if (leaving) {\n node.setAttribute('aria-hidden', 'true')\n } else {\n node.removeAttribute('aria-hidden')\n }\n}\n// Runs before the browser paints; the server, which paints nothing, gets the\n// ordinary effect (React warns about a layout effect there).\nconst useBeforePaintEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect\n// Settles once the pictures on the arriving page's first screen are decoded, or\n// after waitMs (an image the page asks to decode off the main thread paints a\n// few frames after the rest of the page), with the pictures still loading.\nconst picturesReady = (node, waitMs) => {\n const pictures = Array.prototype.filter.call(node.querySelectorAll('img'), (image) => {\n const box = image.getBoundingClientRect()\n return box.bottom > 0 && box.top < window.innerHeight && typeof image.decode === 'function'\n })\n return Promise.race([\n Promise.all(pictures.map((image) => image.decode().catch(() => {}))),\n new Promise((resolve) => setTimeout(resolve, waitMs)),\n ]).then(() => pictures.filter((image) => !image.complete))\n}\n// A picture still loading when its page plays stays unseen until it has\n// loaded, then fades in: shown as it loaded, it snapped in over the page in a\n// single frame. One that fails is shown at once, as it would be anyway, and\n// none stays unseen past LATE_PICTURE_WAIT_MS.\nconst fadeInWhenLoaded = (image) => {\n image.setAttribute(LATE_PICTURE_ATTR, 'loading')\n const show = (event) => {\n image.removeEventListener('load', show)\n image.removeEventListener('error', show)\n clearTimeout(giveUp)\n if (event && event.type === 'load') {\n image.setAttribute(LATE_PICTURE_ATTR, 'in')\n setTimeout(() => image.removeAttribute(LATE_PICTURE_ATTR), DURATION * 1000 + 100)\n } else {\n image.removeAttribute(LATE_PICTURE_ATTR)\n }\n }\n const giveUp = setTimeout(show, LATE_PICTURE_WAIT_MS)\n image.addEventListener('load', show)\n image.addEventListener('error', show)\n}\n\n// Keeps the leaving page in the document while it is still needed: until the\n// browser has pictured it (a View Transition), or until the page laid over it\n// has fully come in (the two pages overlap) \u2014 or, should that arrival never\n// complete, a little after its time.\nconst HoldPage = ({ pageKey, changeRef, overlapRef }) => {\n const [isPresent, safeToRemove] = usePresence()\n React.useEffect(() => {\n if (isPresent) {\n return\n }\n const change = changeRef.current\n const overlap = overlapRef.current\n if (change && change.leavingKey === pageKey) {\n change.captured.then(safeToRemove)\n } else if (overlap && overlap.leavingKey === pageKey) {\n setLeaving(pageIn(pageKey), true)\n overlap.opened.then(safeToRemove)\n setTimeout(overlap.finish, DURATION * 1000 + PICTURE_WAIT_MS + 1000)\n } else {\n safeToRemove()\n }\n }, [isPresent])\n return null\n}\n\nconst TqPageTransition = ({ children }) => {\n const router = useRouter()\n const routeKey = routeKeyOf(router.asPath)\n const routeKeyRef = React.useRef(routeKey)\n routeKeyRef.current = routeKey\n const [frozen, setFrozen] = React.useState(null)\n const [context, setContext] = React.useState(CENTER)\n const [panelPhase, setPanelPhase] = React.useState('idle')\n // The page laid over the leaving one while the two overlap, and the ground it is painted on.\n const [over, setOver] = React.useState(null)\n // The page whose arrival may play: the first page at once, every later one\n // once its first screen's pictures are ready.\n const [readyKey, setReadyKey] = React.useState(routeKey)\n const readyKeyRef = React.useRef(routeKey)\n const pageRef = React.useRef(null)\n const popRef = React.useRef(false)\n const pointerRef = React.useRef(null)\n const clickedRef = React.useRef(null)\n const changeRef = React.useRef(null)\n const overlapRef = React.useRef(null)\n // Puts back the scrollbar room held for the frozen page (holdScrollbarGutter).\n const gutterRef = React.useRef(null)\n // Puts back <html>'s scroll-behavior, held instant through a View Transition's page change.\n const scrollRef = React.useRef(null)\n const variants = React.useMemo(\n () =>\n context.skip || context.morph\n ? INSTANT\n : dissolveOver(\n revealOnScreen(pageTransitionVariants(PRESET, SLIDE_PX, context, OPTIONS, CUSTOM || undefined), context.screen)\n ),\n [context]\n )\n\n // The arriving page is in the document: wait for the pictures on its first\n // screen (and, in a View Transition, for its twin of the flying picture),\n // then let it play \u2014 or let the browser picture the new state.\n const setPage = React.useCallback((node) => {\n // A page that goes after the next one has mounted (the two overlapped)\n // leaves the ref to the page still in the document, not to nothing.\n pageRef.current = node || pageIn(routeKeyRef.current)\n const key = node ? node.getAttribute('data-tq-page-transition') : null\n if (key === null || key === readyKeyRef.current) {\n return\n }\n readyKeyRef.current = key\n const change = changeRef.current\n const landing = change && !change.landed && node !== change.leaving ? change : null\n let twin = null\n if (landing) {\n landing.landed = true\n tqMorphClear()\n twin = landing.src ? tqMorphTarget(landing.src) : null\n if (twin) {\n twin.style.viewTransitionName = TQ_MORPH_NAME\n }\n }\n const twinReady =\n twin && !twin.complete && typeof twin.decode === 'function'\n ? Promise.race([\n twin.decode().catch(() => {}),\n new Promise((resolve) => setTimeout(resolve, MORPH_DECODE_MS)),\n ])\n : Promise.resolve()\n const overlap = overlapRef.current\n const held = !!landing || !!(overlap && overlap.arrivingKey === key)\n Promise.all([picturesReady(node, held ? PICTURE_WAIT_MS : BARE_PICTURE_WAIT_MS), twinReady]).then(([loading]) => {\n // A later page may have arrived meanwhile; this one's turn has passed.\n if (readyKeyRef.current === key) {\n // The flight lands on its twin as it is; a page shown at once shows its pictures at once.\n if (!prefersLessMotion() && !isSkippedRoute(key)) {\n loading.filter((image) => image !== twin).forEach(fadeInWhenLoaded)\n }\n setReadyKey(key)\n setPanelPhase((phase) => (phase === 'covered' ? 'uncovering' : phase))\n }\n if (landing) {\n landing.arrive()\n }\n })\n }, [])\n\n React.useEffect(() => {\n const onPointerDown = (event) => {\n pointerRef.current = { x: event.clientX, y: event.clientY }\n }\n const onClick = (event) => {\n clickedRef.current = event.target && event.target.closest ? event.target.closest('a[href]') : null\n }\n window.addEventListener('pointerdown', onPointerDown, true)\n window.addEventListener('click', onClick, true)\n return () => {\n window.removeEventListener('pointerdown', onPointerDown, true)\n window.removeEventListener('click', onClick, true)\n }\n }, [])\n\n React.useEffect(() => {\n router.beforePopState(() => {\n popRef.current = true\n return true\n })\n const root = document.documentElement\n const abandon = (change) => {\n if (!change.landed) {\n change.landed = true\n change.transition.skipTransition()\n change.arrive()\n }\n }\n // A change that does not overlap lets a page still held from the last one\n // go at once, instead of leaving it over the page that appears.\n const letHeldPageGo = () => {\n if (overlapRef.current) {\n overlapRef.current.finish()\n }\n }\n // The page change as a View Transition: every reveal, and a picture in the\n // followed link that the next page shows too (going forward only).\n const startViewChange = (url, pointer, reverse) => {\n if (!VT_CSS || !pageRef.current || typeof document.startViewTransition !== 'function' || prefersLessMotion()) {\n return false\n }\n const image = FLIES && !reverse ? tqMorphSource(url, clickedRef.current) : null\n if (!image && !REVEAL) {\n return false\n }\n const change = { leavingKey: routeKeyRef.current, leaving: pageRef.current, src: image ? image.currentSrc || image.src : null, landed: false }\n change.captured = new Promise((resolve) => {\n change.onCaptured = resolve\n })\n const arrived = new Promise((resolve) => {\n change.arrive = resolve\n })\n tqMorphClear()\n if (image) {\n image.style.viewTransitionName = TQ_MORPH_NAME\n }\n if (reverse) {\n root.setAttribute('").concat(BACK_ATTR, "', 'back')\n }\n if (pointer) {\n root.style.setProperty('").concat(ORIGIN_X, "', pointer.x + 'px')\n root.style.setProperty('").concat(ORIGIN_Y, "', pointer.y + 'px')\n }\n // Nothing is frozen here, so Next's scroll to the arriving page's top\n // follows the site's smooth scrolling (kept for its in-page anchors): the\n // page arrived at the leaving one's offset and glided up through itself.\n // A change replacing one still playing finds the scroll already held.\n if (!scrollRef.current) {\n scrollRef.current = holdStyle(root, 'scroll-behavior', 'auto')\n }\n const settle = () => {\n if (changeRef.current === change) {\n changeRef.current = null\n tqMorphClear()\n root.removeAttribute('").concat(BACK_ATTR, "')\n root.style.removeProperty('").concat(ORIGIN_X, "')\n root.style.removeProperty('").concat(ORIGIN_Y, "')\n if (scrollRef.current) {\n scrollRef.current()\n scrollRef.current = null\n }\n }\n }\n changeRef.current = change\n try {\n change.transition = document.startViewTransition(() => {\n change.onCaptured()\n return arrived\n })\n } catch (error) {\n settle()\n return false\n }\n change.transition.ready.catch(() => {})\n change.transition.finished.then(settle, settle)\n setTimeout(() => abandon(change), ARRIVAL_WAIT_MS)\n return true\n }\n const onRouteChangeStart = (url) => {\n const arrivingKey = arrivingKeyOf(url, router.locales)\n if (arrivingKey === routeKeyRef.current) {\n return\n }\n const reverse = popRef.current\n popRef.current = false\n // A skipped page appears instantly; leaving it still plays the site's transition.\n // A visitor who asks for less motion gets every page that way. It is read\n // here, never while rendering: the server cannot know it, and a first render\n // that differs from the server's makes React throw the page away.\n const skip = prefersLessMotion() || isSkippedRoute(arrivingKey)\n const pointer = reverse || !ORIGIN_FROM_POINTER ? null : pointerRef.current\n // A reveal is measured on this screen (revealOnScreen); without a press it\n // grows from the screen's centre, not the page's.\n const screen = { width: window.innerWidth, height: window.innerHeight }\n const origin = pointer || { x: screen.width / 2, y: screen.height / 2 }\n const next = { reverse, skip, originX: origin.x + 'px', originY: origin.y + 'px', screen }\n // Back to a page that has not gone yet (the two pages overlapped): it is\n // still in the document, pictures and all, so it plays at once and takes\n // input again.\n const returning = pageIn(arrivingKey)\n if (returning) {\n setLeaving(returning, false)\n readyKeyRef.current = arrivingKey\n setReadyKey(readyKeyRef.current)\n }\n if (!skip && startViewChange(url, pointer, reverse)) {\n letHeldPageGo()\n setContext(Object.assign({}, next, { morph: true }))\n return\n }\n setContext(next)\n if (PANELS && !skip) {\n setPanelPhase('covering')\n }\n if (OVERLAP && !skip) {\n // The two pages overlap: the leaving page is held under the arriving\n // one until that has fully come in (HoldPage).\n const overlap = { leavingKey: routeKeyRef.current, arrivingKey }\n overlap.opened = new Promise((resolve) => {\n overlap.open = resolve\n })\n overlap.finish = () => {\n overlap.open()\n if (overlapRef.current === overlap) {\n overlapRef.current = null\n setOver(null)\n }\n }\n overlapRef.current = overlap\n setOver({ key: overlap.arrivingKey, ground: siteGround() })\n } else {\n letHeldPageGo()\n }\n // A change replacing a cancelled one finds the page still frozen and the\n // room still held: held again, the hold would take the first hold's\n // overflow-y for the page's own and leave it on <html>.\n if (!gutterRef.current) {\n gutterRef.current = holdScrollbarGutter()\n }\n setFrozen({ key: routeKeyRef.current, top: window.scrollY || 0 })\n }\n const onRouteChangeError = () => {\n if (changeRef.current) {\n abandon(changeRef.current)\n }\n }\n router.events.on('routeChangeStart', onRouteChangeStart)\n router.events.on('routeChangeError', onRouteChangeError)\n return () => {\n router.events.off('routeChangeStart', onRouteChangeStart)\n router.events.off('routeChangeError', onRouteChangeError)\n router.beforePopState(() => true)\n }\n }, [router])\n\n // The room goes back before the paint of the commit that ends the freeze: that\n // commit mounts the arriving page (when the two overlap, lets the leaving page go), so\n // the scrollbar passes straight to the page left in the document. A cancelled\n // change leaves its page frozen until the change replacing it has played, so\n // the room stays with it: Next starts that change a few awaits after the error.\n const releaseGutter = () => {\n if (gutterRef.current) {\n gutterRef.current()\n gutterRef.current = null\n }\n }\n useBeforePaintEffect(() => {\n if (!frozen) {\n releaseGutter()\n }\n }, [frozen])\n React.useEffect(() => releaseGutter, [])\n\n if (!variants) {\n return children\n }\n\n const frozenStyle =\n frozen && frozen.key === routeKey\n ? { position: 'fixed', top: -frozen.top, left: 0, right: 0 }\n : undefined\n const overStyle =\n over && over.key === routeKey\n ? Object.assign({ backgroundColor: over.ground }, OVER, readyKey === routeKey ? null : UNSEEN)\n : undefined\n const pageStyle = frozenStyle || overStyle\n\n const onExitComplete = () => {\n setFrozen(null)\n // The panels open once the arriving page's pictures are ready (setPage).\n if (PANELS && panelPhase === 'covering') {\n setPanelPhase('covered')\n }\n }\n // The page laid over the leaving one has fully come in: let the leaving page go.\n const onPageAnimationComplete = (definition) => {\n const overlap = overlapRef.current\n if (definition === 'animate' && overlap && overlap.arrivingKey === routeKey) {\n overlap.finish()\n }\n }\n\n return (\n <>\n <AnimatePresence mode={context.morph || !OVERLAP ? 'wait' : 'sync'} initial={false} onExitComplete={onExitComplete}>\n <motion.div\n key={routeKey}\n ref={setPage}\n initial=\"initial\"\n animate={readyKey === routeKey ? 'animate' : 'initial'}\n exit=\"exit\"\n variants={variants}\n transition={{ duration: DURATION, ease: EASE }}\n onUpdate={stepByFrame}\n onAnimationComplete={onPageAnimationComplete}\n style={pageStyle}\n data-tq-page-transition={routeKey}\n >\n {children}\n {VT_CSS || OVERLAP ? <HoldPage pageKey={routeKey} changeRef={changeRef} overlapRef={overlapRef} /> : null}\n </motion.div>\n </AnimatePresence>\n {PANELS\n ? PANELS.map((panel, index) => (\n <motion.div\n key={index}\n aria-hidden=\"true\"\n data-tq-page-transition-panel={index}\n style={Object.assign({}, PANEL_BASE, panelBounds(panel))}\n initial={panel.from}\n animate={panelPhase === 'covering' || panelPhase === 'covered' ? panel.cover : panelPhase === 'uncovering' ? panel.away : panel.from}\n transition={panelPhase === 'idle' ? { duration: 0 } : { duration: DURATION, ease: EASE }}\n onAnimationComplete={() => {\n if (panelPhase === 'uncovering') {\n setPanelPhase('idle')\n }\n }}\n />\n ))\n : null}\n {VT_CSS ? <style dangerouslySetInnerHTML={{ __html: VT_CSS }} /> : null}\n <style dangerouslySetInnerHTML={{ __html: LATE_PICTURE_CSS }} />\n </>\n )\n}\n\nexport default TqPageTransition\n");
114
114
  };
115
115
  exports.generatePageTransitionComponentCode = generatePageTransitionComponentCode;
116
116
  //# sourceMappingURL=page-transition-component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-transition-component.js","sourceRoot":"","sources":["../../../src/page-transition/page-transition-component.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,uEAKmC;AACnC,yFAA8E;AAI9E,IAAM,aAAa,GAAG,gCAAc,CAAC,6BAA6B,CAAA;AAClE,IAAM,iBAAiB,GAAG,sBAAsB,CAAA;AAE9C,IAAA,SAAS,GAMP,gCAAc,UANP,EACT,QAAQ,GAKN,gCAAc,SALR,EACR,QAAQ,GAIN,gCAAc,SAJR,EACR,kBAAkB,GAGhB,gCAAc,mBAHE,EAClB,uBAAuB,GAErB,gCAAc,wBAFO,EACvB,kBAAkB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,2CACT,OAAO,CAAC,MAAM,KAAK,QAAQ,gCACtC,QAAQ,6BACX,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,iCACb,mDAAwB,0OAIrB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,ikCAiB7B,SAAS,s2BAaL,IAAA,mDAAwB,EAAC,OAAO,CAAC,KAAK,CAAC,0fAS7C,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,6BACtB,KAAK,izBAcQ,iBAAiB,yCACnB,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,88WAkR5B,SAAS,wFAGJ,QAAQ,mEACR,QAAQ,soBAaR,SAAS,sDACJ,QAAQ,sDACR,QAAQ,wlOA8L9C,CAAA;AACD,CAAC,CAAA;AAzlBY,QAAA,mCAAmC,uCAylB/C"}
1
+ {"version":3,"file":"page-transition-component.js","sourceRoot":"","sources":["../../../src/page-transition/page-transition-component.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,uEAKmC;AACnC,yFAA8E;AAI9E,IAAM,aAAa,GAAG,gCAAc,CAAC,6BAA6B,CAAA;AAClE,IAAM,iBAAiB,GAAG,sBAAsB,CAAA;AAE9C,IAAA,SAAS,GAMP,gCAAc,UANP,EACT,QAAQ,GAKN,gCAAc,SALR,EACR,QAAQ,GAIN,gCAAc,SAJR,EACR,kBAAkB,GAGhB,gCAAc,mBAHE,EAClB,uBAAuB,GAErB,gCAAc,wBAFO,EACvB,kBAAkB,GAChB,gCAAc,mBADE,CACF;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACI,IAAM,mCAAmC,GAAG,UAAC,MAA4B;;IAC9E,IAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACvE,IAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,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AAc,CAAC,88WAkR5B,SAAS,wFAGJ,QAAQ,mEACR,QAAQ,soBAaR,SAAS,sDACJ,QAAQ,sDACR,QAAQ,qnOA+L9C,CAAA;AACD,CAAC,CAAA;AAvmBY,QAAA,mCAAmC,uCAumB/C"}
@@ -1,3 +1,30 @@
1
1
  import { ComponentPluginFactory } from '@teleporthq/teleport-types';
2
2
  export declare const createStateDataSourcePlugin: ComponentPluginFactory<{}>;
3
+ /**
4
+ * Fills a COMPONENT's states bound to a data source.
5
+ *
6
+ * A page's bound states arrive as props from its own server-side fetch (the
7
+ * plugin above). A component has no such fetch, and the page that renders it
8
+ * knows nothing of its states — so every state of a component declared as
9
+ * `useState(props.<state> !== undefined ? props.<state> : <default>)` kept its
10
+ * default on the generated site, and a list over it stayed empty.
11
+ *
12
+ * The component now reads for itself once it is on screen:
13
+ *
14
+ * - a state filled from a TABLE, through the table's own read route
15
+ * (`/api/<source>-<table>-<id>`) — the route a list bound straight to the
16
+ * table reads inside a component. That route already counts a state filled
17
+ * from the table among the table's readers
18
+ * (`DataExposure.resolveDataExposure`), answers the rows a page's state is
19
+ * given, and is asked for them in the page's language;
20
+ * - a state filled by an SQL STATEMENT of its own, through a route of the
21
+ * component's (`/api/component-state/<route>`) that holds the statement — a
22
+ * browser may hand a read route none — and admits whoever may open a page
23
+ * that renders the component (`generateComponentStateRoute`).
24
+ *
25
+ * A statement that names the signed-in visitor or the page's row
26
+ * (`{{Current User.…}}`, `{{Current Page Entity.id}}`) is left to a workflow:
27
+ * it is resolved for a page's states only.
28
+ */
29
+ export declare const createComponentStateDataSourcePlugin: ComponentPluginFactory<{}>;
3
30
  //# sourceMappingURL=state-data-source-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state-data-source-plugin.d.ts","sourceRoot":"","sources":["../../src/state-data-source-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAQvB,MAAM,4BAA4B,CAAA;AA2lCnC,eAAO,MAAM,2BAA2B,EAAE,sBAAsB,CAAC,EAAE,CAkMlE,CAAA"}
1
+ {"version":3,"file":"state-data-source-plugin.d.ts","sourceRoot":"","sources":["../../src/state-data-source-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAQvB,MAAM,4BAA4B,CAAA;AAsmCnC,eAAO,MAAM,2BAA2B,EAAE,sBAAsB,CAAC,EAAE,CAkMlE,CAAA;AAySD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,oCAAoC,EAAE,sBAAsB,CAAC,EAAE,CA0F3E,CAAA"}