next 15.2.0-canary.29 → 15.2.0-canary.30

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.

Potentially problematic release.


This version of next might be problematic. Click here for more details.

Files changed (42) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +2 -2
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/webpack-config.js +2 -2
  5. package/dist/client/app-bootstrap.js +1 -1
  6. package/dist/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js +6 -1
  7. package/dist/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js.map +1 -1
  8. package/dist/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.d.ts +1 -1
  9. package/dist/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.js +11 -6
  10. package/dist/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.js.map +1 -1
  11. package/dist/client/index.js +1 -1
  12. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +2 -2
  13. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
  14. package/dist/compiled/next-server/app-page.runtime.dev.js +2 -2
  15. package/dist/compiled/next-server/app-page.runtime.dev.js.map +1 -1
  16. package/dist/compiled/next-server/pages-turbo.runtime.prod.js +2 -2
  17. package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
  18. package/dist/compiled/next-server/pages.runtime.prod.js +2 -2
  19. package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
  20. package/dist/esm/build/index.js +2 -2
  21. package/dist/esm/build/swc/index.js +1 -1
  22. package/dist/esm/build/webpack-config.js +2 -2
  23. package/dist/esm/client/app-bootstrap.js +1 -1
  24. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js +6 -1
  25. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js.map +1 -1
  26. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.js +11 -6
  27. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.js.map +1 -1
  28. package/dist/esm/client/index.js +1 -1
  29. package/dist/esm/server/config.js +1 -1
  30. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  31. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  32. package/dist/esm/server/lib/app-info-log.js +1 -1
  33. package/dist/esm/server/lib/start-server.js +1 -1
  34. package/dist/server/config.js +1 -1
  35. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  36. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  37. package/dist/server/lib/app-info-log.js +1 -1
  38. package/dist/server/lib/start-server.js +1 -1
  39. package/dist/telemetry/anonymous-meta.js +1 -1
  40. package/dist/telemetry/events/session-stopped.js +2 -2
  41. package/dist/telemetry/events/version.js +2 -2
  42. package/package.json +15 -15
@@ -294,7 +294,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
294
294
  const nextBuildSpan = trace('next-build', undefined, {
295
295
  buildMode: experimentalBuildMode,
296
296
  isTurboBuild: String(turboNextBuild),
297
- version: "15.2.0-canary.29"
297
+ version: "15.2.0-canary.30"
298
298
  });
299
299
  NextBuildContext.nextBuildSpan = nextBuildSpan;
300
300
  NextBuildContext.dir = dir;
@@ -654,7 +654,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
654
654
  // Files outside of the distDir can be "type": "module"
655
655
  await writeFileUtf8(path.join(distDir, 'package.json'), '{"type": "commonjs"}');
656
656
  // These are written to distDir, so they need to come after creating and cleaning distDr.
657
- await recordFrameworkVersion("15.2.0-canary.29");
657
+ await recordFrameworkVersion("15.2.0-canary.30");
658
658
  await updateBuildDiagnostics({
659
659
  buildStage: 'start'
660
660
  });
@@ -11,7 +11,7 @@ import { isDeepStrictEqual } from 'util';
11
11
  import { getDefineEnv } from '../webpack/plugins/define-env-plugin';
12
12
  import { getReactCompilerLoader } from '../get-babel-loader-config';
13
13
  import { TurbopackInternalError } from '../../shared/lib/turbopack/utils';
14
- const nextVersion = "15.2.0-canary.29";
14
+ const nextVersion = "15.2.0-canary.30";
15
15
  const ArchName = arch();
16
16
  const PlatformName = platform();
17
17
  function infoLog(...args) {
@@ -1411,7 +1411,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
1411
1411
  isClient && new CopyFilePlugin({
1412
1412
  // file path to build output of `@next/polyfill-nomodule`
1413
1413
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1414
- cacheKey: "15.2.0-canary.29",
1414
+ cacheKey: "15.2.0-canary.30",
1415
1415
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1416
1416
  minimize: false,
1417
1417
  info: {
@@ -1644,7 +1644,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
1644
1644
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1645
1645
  // - Next.js version
1646
1646
  // - next.config.js keys that affect compilation
1647
- version: `${__dirname}|${"15.2.0-canary.29"}|${configVars}`,
1647
+ version: `${__dirname}|${"15.2.0-canary.30"}|${configVars}`,
1648
1648
  cacheDirectory: path.join(distDir, 'cache', 'webpack'),
1649
1649
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1650
1650
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -3,7 +3,7 @@
3
3
  * sure the following scripts are executed in the correct order:
4
4
  * - Polyfills
5
5
  * - next/script with `beforeInteractive` strategy
6
- */ const version = "15.2.0-canary.29";
6
+ */ const version = "15.2.0-canary.30";
7
7
  window.next = {
8
8
  version,
9
9
  appDir: true
@@ -1,6 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useOnClickOutside } from '../../hooks/use-on-click-outside';
4
+ const CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE = [
5
+ '[data-next-mark]',
6
+ '[data-issues-open]',
7
+ '#nextjs-dev-tools-menu'
8
+ ];
4
9
  const Dialog = function Dialog(param) {
5
10
  let { children, type, className, onClose, ...props } = param;
6
11
  const [dialog, setDialog] = React.useState(null);
@@ -8,7 +13,7 @@ const Dialog = function Dialog(param) {
8
13
  const onDialog = React.useCallback((node)=>{
9
14
  setDialog(node);
10
15
  }, []);
11
- useOnClickOutside(dialog, (e)=>{
16
+ useOnClickOutside(dialog, CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE, (e)=>{
12
17
  e.preventDefault();
13
18
  return onClose == null ? void 0 : onClose();
14
19
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useOnClickOutside } from '../../hooks/use-on-click-outside'\n\nexport type DialogProps = {\n children?: React.ReactNode\n type: 'error' | 'warning'\n 'aria-labelledby': string\n 'aria-describedby': string\n className?: string\n onClose?: () => void\n}\n\nconst Dialog: React.FC<DialogProps> = function Dialog({\n children,\n type,\n className,\n onClose,\n ...props\n}) {\n const [dialog, setDialog] = React.useState<HTMLDivElement | null>(null)\n const [role, setRole] = React.useState<string | undefined>(\n typeof document !== 'undefined' && document.hasFocus()\n ? 'dialog'\n : undefined\n )\n const onDialog = React.useCallback((node: HTMLDivElement | null) => {\n setDialog(node)\n }, [])\n useOnClickOutside(dialog, (e) => {\n e.preventDefault()\n return onClose?.()\n })\n\n // Make HTMLElements with `role=link` accessible to be triggered by the\n // keyboard, i.e. [Enter].\n React.useEffect(() => {\n if (dialog == null) {\n return\n }\n\n const root = dialog.getRootNode()\n // Always true, but we do this for TypeScript:\n if (!(root instanceof ShadowRoot)) {\n return\n }\n const shadowRoot = root\n function handler(e: KeyboardEvent) {\n const el = shadowRoot.activeElement\n if (\n e.key === 'Enter' &&\n el instanceof HTMLElement &&\n el.getAttribute('role') === 'link'\n ) {\n e.preventDefault()\n e.stopPropagation()\n\n el.click()\n }\n }\n\n function handleFocus() {\n // safari will force itself as the active application when a background page triggers any sort of autofocus\n // this is a workaround to only set the dialog role if the document has focus\n setRole(document.hasFocus() ? 'dialog' : undefined)\n }\n\n shadowRoot.addEventListener('keydown', handler as EventListener)\n window.addEventListener('focus', handleFocus)\n window.addEventListener('blur', handleFocus)\n return () => {\n shadowRoot.removeEventListener('keydown', handler as EventListener)\n window.removeEventListener('focus', handleFocus)\n window.removeEventListener('blur', handleFocus)\n }\n }, [dialog])\n\n return (\n <div\n ref={onDialog}\n data-nextjs-dialog\n tabIndex={-1}\n role={role}\n aria-labelledby={props['aria-labelledby']}\n aria-describedby={props['aria-describedby']}\n aria-modal=\"true\"\n className={className}\n >\n {children}\n </div>\n )\n}\n\nexport { Dialog }\n"],"names":["React","useOnClickOutside","Dialog","children","type","className","onClose","props","dialog","setDialog","useState","role","setRole","document","hasFocus","undefined","onDialog","useCallback","node","e","preventDefault","useEffect","root","getRootNode","ShadowRoot","shadowRoot","handler","el","activeElement","key","HTMLElement","getAttribute","stopPropagation","click","handleFocus","addEventListener","window","removeEventListener","div","ref","data-nextjs-dialog","tabIndex","aria-labelledby","aria-describedby","aria-modal"],"mappings":";AAAA,YAAYA,WAAW,QAAO;AAC9B,SAASC,iBAAiB,QAAQ,mCAAkC;AAWpE,MAAMC,SAAgC,SAASA,OAAO,KAMrD;IANqD,IAAA,EACpDC,QAAQ,EACRC,IAAI,EACJC,SAAS,EACTC,OAAO,EACP,GAAGC,OACJ,GANqD;IAOpD,MAAM,CAACC,QAAQC,UAAU,GAAGT,MAAMU,QAAQ,CAAwB;IAClE,MAAM,CAACC,MAAMC,QAAQ,GAAGZ,MAAMU,QAAQ,CACpC,OAAOG,aAAa,eAAeA,SAASC,QAAQ,KAChD,WACAC;IAEN,MAAMC,WAAWhB,MAAMiB,WAAW,CAAC,CAACC;QAClCT,UAAUS;IACZ,GAAG,EAAE;IACLjB,kBAAkBO,QAAQ,CAACW;QACzBA,EAAEC,cAAc;QAChB,OAAOd,2BAAAA;IACT;IAEA,uEAAuE;IACvE,0BAA0B;IAC1BN,MAAMqB,SAAS,CAAC;QACd,IAAIb,UAAU,MAAM;YAClB;QACF;QAEA,MAAMc,OAAOd,OAAOe,WAAW;QAC/B,8CAA8C;QAC9C,IAAI,CAAED,CAAAA,gBAAgBE,UAAS,GAAI;YACjC;QACF;QACA,MAAMC,aAAaH;QACnB,SAASI,QAAQP,CAAgB;YAC/B,MAAMQ,KAAKF,WAAWG,aAAa;YACnC,IACET,EAAEU,GAAG,KAAK,WACVF,cAAcG,eACdH,GAAGI,YAAY,CAAC,YAAY,QAC5B;gBACAZ,EAAEC,cAAc;gBAChBD,EAAEa,eAAe;gBAEjBL,GAAGM,KAAK;YACV;QACF;QAEA,SAASC;YACP,2GAA2G;YAC3G,6EAA6E;YAC7EtB,QAAQC,SAASC,QAAQ,KAAK,WAAWC;QAC3C;QAEAU,WAAWU,gBAAgB,CAAC,WAAWT;QACvCU,OAAOD,gBAAgB,CAAC,SAASD;QACjCE,OAAOD,gBAAgB,CAAC,QAAQD;QAChC,OAAO;YACLT,WAAWY,mBAAmB,CAAC,WAAWX;YAC1CU,OAAOC,mBAAmB,CAAC,SAASH;YACpCE,OAAOC,mBAAmB,CAAC,QAAQH;QACrC;IACF,GAAG;QAAC1B;KAAO;IAEX,qBACE,KAAC8B;QACCC,KAAKvB;QACLwB,oBAAkB;QAClBC,UAAU,CAAC;QACX9B,MAAMA;QACN+B,mBAAiBnC,KAAK,CAAC,kBAAkB;QACzCoC,oBAAkBpC,KAAK,CAAC,mBAAmB;QAC3CqC,cAAW;QACXvC,WAAWA;kBAEVF;;AAGP;AAEA,SAASD,MAAM,GAAE"}
1
+ {"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useOnClickOutside } from '../../hooks/use-on-click-outside'\n\nexport type DialogProps = {\n children?: React.ReactNode\n type: 'error' | 'warning'\n 'aria-labelledby': string\n 'aria-describedby': string\n className?: string\n onClose?: () => void\n}\n\nconst CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE = [\n '[data-next-mark]',\n '[data-issues-open]',\n '#nextjs-dev-tools-menu',\n]\n\nconst Dialog: React.FC<DialogProps> = function Dialog({\n children,\n type,\n className,\n onClose,\n ...props\n}) {\n const [dialog, setDialog] = React.useState<HTMLDivElement | null>(null)\n const [role, setRole] = React.useState<string | undefined>(\n typeof document !== 'undefined' && document.hasFocus()\n ? 'dialog'\n : undefined\n )\n const onDialog = React.useCallback((node: HTMLDivElement | null) => {\n setDialog(node)\n }, [])\n useOnClickOutside(dialog, CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE, (e) => {\n e.preventDefault()\n return onClose?.()\n })\n\n // Make HTMLElements with `role=link` accessible to be triggered by the\n // keyboard, i.e. [Enter].\n React.useEffect(() => {\n if (dialog == null) {\n return\n }\n\n const root = dialog.getRootNode()\n // Always true, but we do this for TypeScript:\n if (!(root instanceof ShadowRoot)) {\n return\n }\n const shadowRoot = root\n function handler(e: KeyboardEvent) {\n const el = shadowRoot.activeElement\n if (\n e.key === 'Enter' &&\n el instanceof HTMLElement &&\n el.getAttribute('role') === 'link'\n ) {\n e.preventDefault()\n e.stopPropagation()\n\n el.click()\n }\n }\n\n function handleFocus() {\n // safari will force itself as the active application when a background page triggers any sort of autofocus\n // this is a workaround to only set the dialog role if the document has focus\n setRole(document.hasFocus() ? 'dialog' : undefined)\n }\n\n shadowRoot.addEventListener('keydown', handler as EventListener)\n window.addEventListener('focus', handleFocus)\n window.addEventListener('blur', handleFocus)\n return () => {\n shadowRoot.removeEventListener('keydown', handler as EventListener)\n window.removeEventListener('focus', handleFocus)\n window.removeEventListener('blur', handleFocus)\n }\n }, [dialog])\n\n return (\n <div\n ref={onDialog}\n data-nextjs-dialog\n tabIndex={-1}\n role={role}\n aria-labelledby={props['aria-labelledby']}\n aria-describedby={props['aria-describedby']}\n aria-modal=\"true\"\n className={className}\n >\n {children}\n </div>\n )\n}\n\nexport { Dialog }\n"],"names":["React","useOnClickOutside","CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE","Dialog","children","type","className","onClose","props","dialog","setDialog","useState","role","setRole","document","hasFocus","undefined","onDialog","useCallback","node","e","preventDefault","useEffect","root","getRootNode","ShadowRoot","shadowRoot","handler","el","activeElement","key","HTMLElement","getAttribute","stopPropagation","click","handleFocus","addEventListener","window","removeEventListener","div","ref","data-nextjs-dialog","tabIndex","aria-labelledby","aria-describedby","aria-modal"],"mappings":";AAAA,YAAYA,WAAW,QAAO;AAC9B,SAASC,iBAAiB,QAAQ,mCAAkC;AAWpE,MAAMC,4CAA4C;IAChD;IACA;IACA;CACD;AAED,MAAMC,SAAgC,SAASA,OAAO,KAMrD;IANqD,IAAA,EACpDC,QAAQ,EACRC,IAAI,EACJC,SAAS,EACTC,OAAO,EACP,GAAGC,OACJ,GANqD;IAOpD,MAAM,CAACC,QAAQC,UAAU,GAAGV,MAAMW,QAAQ,CAAwB;IAClE,MAAM,CAACC,MAAMC,QAAQ,GAAGb,MAAMW,QAAQ,CACpC,OAAOG,aAAa,eAAeA,SAASC,QAAQ,KAChD,WACAC;IAEN,MAAMC,WAAWjB,MAAMkB,WAAW,CAAC,CAACC;QAClCT,UAAUS;IACZ,GAAG,EAAE;IACLlB,kBAAkBQ,QAAQP,2CAA2C,CAACkB;QACpEA,EAAEC,cAAc;QAChB,OAAOd,2BAAAA;IACT;IAEA,uEAAuE;IACvE,0BAA0B;IAC1BP,MAAMsB,SAAS,CAAC;QACd,IAAIb,UAAU,MAAM;YAClB;QACF;QAEA,MAAMc,OAAOd,OAAOe,WAAW;QAC/B,8CAA8C;QAC9C,IAAI,CAAED,CAAAA,gBAAgBE,UAAS,GAAI;YACjC;QACF;QACA,MAAMC,aAAaH;QACnB,SAASI,QAAQP,CAAgB;YAC/B,MAAMQ,KAAKF,WAAWG,aAAa;YACnC,IACET,EAAEU,GAAG,KAAK,WACVF,cAAcG,eACdH,GAAGI,YAAY,CAAC,YAAY,QAC5B;gBACAZ,EAAEC,cAAc;gBAChBD,EAAEa,eAAe;gBAEjBL,GAAGM,KAAK;YACV;QACF;QAEA,SAASC;YACP,2GAA2G;YAC3G,6EAA6E;YAC7EtB,QAAQC,SAASC,QAAQ,KAAK,WAAWC;QAC3C;QAEAU,WAAWU,gBAAgB,CAAC,WAAWT;QACvCU,OAAOD,gBAAgB,CAAC,SAASD;QACjCE,OAAOD,gBAAgB,CAAC,QAAQD;QAChC,OAAO;YACLT,WAAWY,mBAAmB,CAAC,WAAWX;YAC1CU,OAAOC,mBAAmB,CAAC,SAASH;YACpCE,OAAOC,mBAAmB,CAAC,QAAQH;QACrC;IACF,GAAG;QAAC1B;KAAO;IAEX,qBACE,KAAC8B;QACCC,KAAKvB;QACLwB,oBAAkB;QAClBC,UAAU,CAAC;QACX9B,MAAMA;QACN+B,mBAAiBnC,KAAK,CAAC,kBAAkB;QACzCoC,oBAAkBpC,KAAK,CAAC,mBAAmB;QAC3CqC,cAAW;QACXvC,WAAWA;kBAEVF;;AAGP;AAEA,SAASD,MAAM,GAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export function useOnClickOutside(el, handler) {
2
+ export function useOnClickOutside(el, cssSelectorsToExclude, handler) {
3
3
  React.useEffect(()=>{
4
4
  if (el == null || handler == null) {
5
5
  return;
@@ -9,20 +9,25 @@ export function useOnClickOutside(el, handler) {
9
9
  if (!el || el.contains(e.target)) {
10
10
  return;
11
11
  }
12
+ if (// Do nothing if clicking on an element that is excluded by the CSS selector(s)
13
+ cssSelectorsToExclude.some((cssSelector)=>e.target.closest(cssSelector))) {
14
+ return;
15
+ }
12
16
  handler(e);
13
17
  };
14
18
  const root = el.getRootNode();
15
- root.addEventListener('mousedown', listener);
16
- root.addEventListener('touchstart', listener, {
19
+ root.addEventListener('mouseup', listener);
20
+ root.addEventListener('touchend', listener, {
17
21
  passive: false
18
22
  });
19
23
  return function() {
20
- root.removeEventListener('mousedown', listener);
21
- root.removeEventListener('touchstart', listener);
24
+ root.removeEventListener('mouseup', listener);
25
+ root.removeEventListener('touchend', listener);
22
26
  };
23
27
  }, [
24
28
  handler,
25
- el
29
+ el,
30
+ cssSelectorsToExclude
26
31
  ]);
27
32
  }
28
33
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.ts"],"sourcesContent":["import * as React from 'react'\n\nexport function useOnClickOutside(\n el: Node | null,\n handler: ((e: MouseEvent | TouchEvent) => void) | undefined\n) {\n React.useEffect(() => {\n if (el == null || handler == null) {\n return\n }\n\n const listener = (e: MouseEvent | TouchEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(e.target as Element)) {\n return\n }\n\n handler(e)\n }\n\n const root = el.getRootNode()\n root.addEventListener('mousedown', listener as EventListener)\n root.addEventListener('touchstart', listener as EventListener, {\n passive: false,\n })\n return function () {\n root.removeEventListener('mousedown', listener as EventListener)\n root.removeEventListener('touchstart', listener as EventListener)\n }\n }, [handler, el])\n}\n"],"names":["React","useOnClickOutside","el","handler","useEffect","listener","e","contains","target","root","getRootNode","addEventListener","passive","removeEventListener"],"mappings":"AAAA,YAAYA,WAAW,QAAO;AAE9B,OAAO,SAASC,kBACdC,EAAe,EACfC,OAA2D;IAE3DH,MAAMI,SAAS,CAAC;QACd,IAAIF,MAAM,QAAQC,WAAW,MAAM;YACjC;QACF;QAEA,MAAME,WAAW,CAACC;YAChB,8DAA8D;YAC9D,IAAI,CAACJ,MAAMA,GAAGK,QAAQ,CAACD,EAAEE,MAAM,GAAc;gBAC3C;YACF;YAEAL,QAAQG;QACV;QAEA,MAAMG,OAAOP,GAAGQ,WAAW;QAC3BD,KAAKE,gBAAgB,CAAC,aAAaN;QACnCI,KAAKE,gBAAgB,CAAC,cAAcN,UAA2B;YAC7DO,SAAS;QACX;QACA,OAAO;YACLH,KAAKI,mBAAmB,CAAC,aAAaR;YACtCI,KAAKI,mBAAmB,CAAC,cAAcR;QACzC;IACF,GAAG;QAACF;QAASD;KAAG;AAClB"}
1
+ {"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/_experimental/internal/hooks/use-on-click-outside.ts"],"sourcesContent":["import * as React from 'react'\n\nexport function useOnClickOutside(\n el: Node | null,\n cssSelectorsToExclude: string[],\n handler: ((e: MouseEvent | TouchEvent) => void) | undefined\n) {\n React.useEffect(() => {\n if (el == null || handler == null) {\n return\n }\n\n const listener = (e: MouseEvent | TouchEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(e.target as Element)) {\n return\n }\n\n if (\n // Do nothing if clicking on an element that is excluded by the CSS selector(s)\n cssSelectorsToExclude.some((cssSelector) =>\n (e.target as Element).closest(cssSelector)\n )\n ) {\n return\n }\n\n handler(e)\n }\n\n const root = el.getRootNode()\n root.addEventListener('mouseup', listener as EventListener)\n root.addEventListener('touchend', listener as EventListener, {\n passive: false,\n })\n return function () {\n root.removeEventListener('mouseup', listener as EventListener)\n root.removeEventListener('touchend', listener as EventListener)\n }\n }, [handler, el, cssSelectorsToExclude])\n}\n"],"names":["React","useOnClickOutside","el","cssSelectorsToExclude","handler","useEffect","listener","e","contains","target","some","cssSelector","closest","root","getRootNode","addEventListener","passive","removeEventListener"],"mappings":"AAAA,YAAYA,WAAW,QAAO;AAE9B,OAAO,SAASC,kBACdC,EAAe,EACfC,qBAA+B,EAC/BC,OAA2D;IAE3DJ,MAAMK,SAAS,CAAC;QACd,IAAIH,MAAM,QAAQE,WAAW,MAAM;YACjC;QACF;QAEA,MAAME,WAAW,CAACC;YAChB,8DAA8D;YAC9D,IAAI,CAACL,MAAMA,GAAGM,QAAQ,CAACD,EAAEE,MAAM,GAAc;gBAC3C;YACF;YAEA,IACE,+EAA+E;YAC/EN,sBAAsBO,IAAI,CAAC,CAACC,cAC1B,AAACJ,EAAEE,MAAM,CAAaG,OAAO,CAACD,eAEhC;gBACA;YACF;YAEAP,QAAQG;QACV;QAEA,MAAMM,OAAOX,GAAGY,WAAW;QAC3BD,KAAKE,gBAAgB,CAAC,WAAWT;QACjCO,KAAKE,gBAAgB,CAAC,YAAYT,UAA2B;YAC3DU,SAAS;QACX;QACA,OAAO;YACLH,KAAKI,mBAAmB,CAAC,WAAWX;YACpCO,KAAKI,mBAAmB,CAAC,YAAYX;QACvC;IACF,GAAG;QAACF;QAASF;QAAIC;KAAsB;AACzC"}
@@ -27,7 +27,7 @@ import { onRecoverableError } from './react-client-callbacks/on-recoverable-erro
27
27
  import tracer from './tracing/tracer';
28
28
  import reportToSocket from './tracing/report-to-socket';
29
29
  import { isNextRouterError } from './components/is-next-router-error';
30
- export const version = "15.2.0-canary.29";
30
+ export const version = "15.2.0-canary.30";
31
31
  export let router;
32
32
  export const emitter = mitt();
33
33
  const looseToArray = (input)=>[].slice.call(input);
@@ -177,7 +177,7 @@ function assignDefaults(dir, userConfig, silent) {
177
177
  enumerable: false
178
178
  });
179
179
  }
180
- if (!((_process_env___NEXT_VERSION = "15.2.0-canary.29") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV) {
180
+ if (!((_process_env___NEXT_VERSION = "15.2.0-canary.30") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV) {
181
181
  var _result_experimental8, _result_experimental9, _result_experimental_turbo3, _result_experimental10;
182
182
  // Prevents usage of certain experimental features outside of canary
183
183
  if ((_result_experimental8 = result.experimental) == null ? void 0 : _result_experimental8.ppr) {
@@ -80,7 +80,7 @@ export async function createHotReloaderTurbopack(opts, serverFields, distDir, re
80
80
  }
81
81
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
82
82
  const hotReloaderSpan = trace('hot-reloader', undefined, {
83
- version: "15.2.0-canary.29"
83
+ version: "15.2.0-canary.30"
84
84
  });
85
85
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
86
86
  // of the current `next dev` invocation.
@@ -178,7 +178,7 @@ export default class HotReloaderWebpack {
178
178
  this.previewProps = previewProps;
179
179
  this.rewrites = rewrites;
180
180
  this.hotReloaderSpan = trace('hot-reloader', undefined, {
181
- version: "15.2.0-canary.29"
181
+ version: "15.2.0-canary.30"
182
182
  });
183
183
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
184
184
  // of the current `next dev` invocation.
@@ -4,7 +4,7 @@ import { bold, purple } from '../../lib/picocolors';
4
4
  import { PHASE_DEVELOPMENT_SERVER, PHASE_PRODUCTION_BUILD } from '../../shared/lib/constants';
5
5
  import loadConfig, { getConfiguredExperimentalFeatures } from '../config';
6
6
  export function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, maxExperimentalFeatures = Infinity }) {
7
- Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.2.0-canary.29"}`))}${process.env.TURBOPACK ? ' (Turbopack)' : ''}`);
7
+ Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.2.0-canary.30"}`))}${process.env.TURBOPACK ? ' (Turbopack)' : ''}`);
8
8
  if (appUrl) {
9
9
  Log.bootstrap(`- Local: ${appUrl}`);
10
10
  }
@@ -43,7 +43,7 @@ export async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup,
43
43
  export async function startServer(serverOptions) {
44
44
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
45
45
  let { port } = serverOptions;
46
- process.title = `next-server (v${"15.2.0-canary.29"})`;
46
+ process.title = `next-server (v${"15.2.0-canary.30"})`;
47
47
  let handlersReady = ()=>{};
48
48
  let handlersError = ()=>{};
49
49
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -256,7 +256,7 @@ function assignDefaults(dir, userConfig, silent) {
256
256
  enumerable: false
257
257
  });
258
258
  }
259
- if (!((_process_env___NEXT_VERSION = "15.2.0-canary.29") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV) {
259
+ if (!((_process_env___NEXT_VERSION = "15.2.0-canary.30") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV) {
260
260
  var _result_experimental8, _result_experimental9, _result_experimental_turbo3, _result_experimental10;
261
261
  // Prevents usage of certain experimental features outside of canary
262
262
  if ((_result_experimental8 = result.experimental) == null ? void 0 : _result_experimental8.ppr) {
@@ -136,7 +136,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
136
136
  }
137
137
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
138
138
  const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
139
- version: "15.2.0-canary.29"
139
+ version: "15.2.0-canary.30"
140
140
  });
141
141
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
142
142
  // of the current `next dev` invocation.
@@ -254,7 +254,7 @@ class HotReloaderWebpack {
254
254
  this.previewProps = previewProps;
255
255
  this.rewrites = rewrites;
256
256
  this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
257
- version: "15.2.0-canary.29"
257
+ version: "15.2.0-canary.30"
258
258
  });
259
259
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
260
260
  // of the current `next dev` invocation.
@@ -67,7 +67,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
67
67
  return newObj;
68
68
  }
69
69
  function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, maxExperimentalFeatures = Infinity }) {
70
- _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.2.0-canary.29"}`))}${process.env.TURBOPACK ? ' (Turbopack)' : ''}`);
70
+ _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.2.0-canary.30"}`))}${process.env.TURBOPACK ? ' (Turbopack)' : ''}`);
71
71
  if (appUrl) {
72
72
  _log.bootstrap(`- Local: ${appUrl}`);
73
73
  }
@@ -111,7 +111,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
111
111
  async function startServer(serverOptions) {
112
112
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
113
113
  let { port } = serverOptions;
114
- process.title = `next-server (v${"15.2.0-canary.29"})`;
114
+ process.title = `next-server (v${"15.2.0-canary.30"})`;
115
115
  let handlersReady = ()=>{};
116
116
  let handlersError = ()=>{};
117
117
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -81,7 +81,7 @@ function getAnonymousMeta() {
81
81
  isWsl: _iswsl.default,
82
82
  isCI: _ciinfo.isCI,
83
83
  ciName: _ciinfo.isCI && _ciinfo.name || null,
84
- nextVersion: "15.2.0-canary.29"
84
+ nextVersion: "15.2.0-canary.30"
85
85
  };
86
86
  return traits;
87
87
  }
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
11
11
  const EVENT_VERSION = 'NEXT_CLI_SESSION_STOPPED';
12
12
  function eventCliSessionStopped(event) {
13
13
  // This should be an invariant, if it fails our build tooling is broken.
14
- if (typeof "15.2.0-canary.29" !== 'string') {
14
+ if (typeof "15.2.0-canary.30" !== 'string') {
15
15
  return [];
16
16
  }
17
17
  const payload = {
18
- nextVersion: "15.2.0-canary.29",
18
+ nextVersion: "15.2.0-canary.30",
19
19
  nodeVersion: process.version,
20
20
  cliCommand: event.cliCommand,
21
21
  durationMilliseconds: event.durationMilliseconds,
@@ -36,12 +36,12 @@ function hasBabelConfig(dir) {
36
36
  function eventCliSession(dir, nextConfig, event) {
37
37
  var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1;
38
38
  // This should be an invariant, if it fails our build tooling is broken.
39
- if (typeof "15.2.0-canary.29" !== 'string') {
39
+ if (typeof "15.2.0-canary.30" !== 'string') {
40
40
  return [];
41
41
  }
42
42
  const { images, i18n } = nextConfig || {};
43
43
  const payload = {
44
- nextVersion: "15.2.0-canary.29",
44
+ nextVersion: "15.2.0-canary.30",
45
45
  nodeVersion: process.version,
46
46
  cliCommand: event.cliCommand,
47
47
  isSrcDir: event.isSrcDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next",
3
- "version": "15.2.0-canary.29",
3
+ "version": "15.2.0-canary.30",
4
4
  "description": "The React Framework",
5
5
  "main": "./dist/server/next.js",
6
6
  "license": "MIT",
@@ -99,7 +99,7 @@
99
99
  ]
100
100
  },
101
101
  "dependencies": {
102
- "@next/env": "15.2.0-canary.29",
102
+ "@next/env": "15.2.0-canary.30",
103
103
  "@swc/counter": "0.1.3",
104
104
  "@swc/helpers": "0.5.15",
105
105
  "busboy": "1.6.0",
@@ -131,14 +131,14 @@
131
131
  },
132
132
  "optionalDependencies": {
133
133
  "sharp": "^0.33.5",
134
- "@next/swc-darwin-arm64": "15.2.0-canary.29",
135
- "@next/swc-darwin-x64": "15.2.0-canary.29",
136
- "@next/swc-linux-arm64-gnu": "15.2.0-canary.29",
137
- "@next/swc-linux-arm64-musl": "15.2.0-canary.29",
138
- "@next/swc-linux-x64-gnu": "15.2.0-canary.29",
139
- "@next/swc-linux-x64-musl": "15.2.0-canary.29",
140
- "@next/swc-win32-arm64-msvc": "15.2.0-canary.29",
141
- "@next/swc-win32-x64-msvc": "15.2.0-canary.29"
134
+ "@next/swc-darwin-arm64": "15.2.0-canary.30",
135
+ "@next/swc-darwin-x64": "15.2.0-canary.30",
136
+ "@next/swc-linux-arm64-gnu": "15.2.0-canary.30",
137
+ "@next/swc-linux-arm64-musl": "15.2.0-canary.30",
138
+ "@next/swc-linux-x64-gnu": "15.2.0-canary.30",
139
+ "@next/swc-linux-x64-musl": "15.2.0-canary.30",
140
+ "@next/swc-win32-arm64-msvc": "15.2.0-canary.30",
141
+ "@next/swc-win32-x64-msvc": "15.2.0-canary.30"
142
142
  },
143
143
  "devDependencies": {
144
144
  "@ampproject/toolbox-optimizer": "2.8.3",
@@ -172,11 +172,11 @@
172
172
  "@jest/types": "29.5.0",
173
173
  "@mswjs/interceptors": "0.23.0",
174
174
  "@napi-rs/triples": "1.2.0",
175
- "@next/font": "15.2.0-canary.29",
176
- "@next/polyfill-module": "15.2.0-canary.29",
177
- "@next/polyfill-nomodule": "15.2.0-canary.29",
178
- "@next/react-refresh-utils": "15.2.0-canary.29",
179
- "@next/swc": "15.2.0-canary.29",
175
+ "@next/font": "15.2.0-canary.30",
176
+ "@next/polyfill-module": "15.2.0-canary.30",
177
+ "@next/polyfill-nomodule": "15.2.0-canary.30",
178
+ "@next/react-refresh-utils": "15.2.0-canary.30",
179
+ "@next/swc": "15.2.0-canary.30",
180
180
  "@opentelemetry/api": "1.6.0",
181
181
  "@playwright/test": "1.41.2",
182
182
  "@rspack/core": "1.2.2",