From 7c0fd4c6a8cc67302e0491595ba15153d0338112 Mon Sep 17 00:00:00 2001 From: Vlad Moroz Date: Mon, 3 Jun 2024 12:04:29 +0200 Subject: [PATCH] RSC compatibility (#2923) * RSC compatibility and more SSR tests * Track version changes * Track version changes --- .yarn/versions/1f1ba8b4.yml | 47 ++++ packages/react/accordion/src/index.ts | 1 + packages/react/alert-dialog/src/index.ts | 1 + packages/react/announce/src/index.ts | 1 + packages/react/avatar/src/index.ts | 1 + packages/react/checkbox/src/index.ts | 1 + packages/react/collapsible/src/index.ts | 1 + packages/react/collection/src/index.ts | 1 + packages/react/context-menu/src/index.ts | 1 + packages/react/dialog/src/index.ts | 1 + packages/react/dismissable-layer/src/index.ts | 1 + packages/react/dropdown-menu/src/index.ts | 1 + packages/react/focus-guards/src/index.ts | 1 + packages/react/focus-scope/src/index.ts | 1 + packages/react/form/src/index.ts | 1 + packages/react/hover-card/src/index.ts | 1 + packages/react/label/src/index.ts | 1 + packages/react/menu/src/index.ts | 1 + packages/react/menubar/src/index.ts | 1 + packages/react/navigation-menu/src/index.ts | 1 + packages/react/popover/src/index.ts | 1 + packages/react/popper/src/index.ts | 1 + packages/react/portal/src/Portal.tsx | 8 +- packages/react/portal/src/index.ts | 1 + packages/react/presence/src/index.ts | 1 + packages/react/primitive/src/Primitive.tsx | 4 +- packages/react/progress/src/index.ts | 1 + packages/react/radio-group/src/index.ts | 1 + packages/react/roving-focus/src/index.ts | 1 + packages/react/scroll-area/src/index.ts | 1 + packages/react/select/src/index.ts | 1 + packages/react/slider/src/index.ts | 1 + packages/react/switch/src/index.ts | 1 + packages/react/tabs/src/index.ts | 1 + packages/react/toast/src/index.ts | 1 + packages/react/toggle-group/src/index.ts | 1 + packages/react/toggle/src/index.ts | 1 + packages/react/toolbar/src/index.ts | 1 + packages/react/tooltip/src/index.ts | 1 + ssr-testing/app/accessible-icon/page.tsx | 12 + .../accordion.tsx => app/accordion/page.tsx} | 2 +- ssr-testing/app/alert-dialog/page.tsx | 31 +++ ssr-testing/app/aspect-ratio/page.tsx | 16 ++ ssr-testing/app/avatar/page.tsx | 10 + ssr-testing/app/checkbox/page.tsx | 10 + .../collapsible/page.tsx} | 2 +- ssr-testing/app/context-menu/page.tsx | 20 ++ .../{pages/dialog.tsx => app/dialog/page.tsx} | 2 +- .../dropdown-menu/page.tsx} | 14 +- ssr-testing/app/form/page.tsx | 15 ++ .../hover-card/page.tsx} | 2 +- ssr-testing/{pages/id.tsx => app/id/page.tsx} | 3 +- .../{pages/label.tsx => app/label/page.tsx} | 2 +- ssr-testing/app/layout.tsx | 57 +++++ ssr-testing/app/menubar/page.tsx | 21 ++ ssr-testing/app/navigation-menu/page.tsx | 21 ++ ssr-testing/app/page.tsx | 3 + .../popover.tsx => app/popover/page.tsx} | 2 +- ssr-testing/app/portal/conditional-portal.tsx | 20 ++ .../app/portal/custom-portal-container.tsx | 16 ++ ssr-testing/app/portal/page.tsx | 40 ++++ ssr-testing/app/progress/page.tsx | 10 + ssr-testing/app/radio-group/page.tsx | 36 +++ .../roving-focus-group/page.tsx} | 3 +- .../scroll-area/page.tsx} | 2 +- .../{pages/select.tsx => app/select/page.tsx} | 2 +- ssr-testing/app/separator/page.tsx | 6 + .../{pages/slider.tsx => app/slider/page.tsx} | 2 +- ssr-testing/app/slot/page.tsx | 13 + ssr-testing/app/switch/page.tsx | 10 + .../{pages/tabs.tsx => app/tabs/page.tsx} | 2 +- ssr-testing/app/toast/page.tsx | 17 ++ ssr-testing/app/toggle-group/page.tsx | 11 + ssr-testing/app/toolbar/page.tsx | 12 + .../tooltip.tsx => app/tooltip/page.tsx} | 2 +- ssr-testing/app/visually-hidden/page.tsx | 11 + ssr-testing/package.json | 2 +- ssr-testing/pages/_app.tsx | 14 -- ssr-testing/pages/alert-dialog.tsx | 28 --- ssr-testing/pages/index.tsx | 54 ----- ssr-testing/tsconfig.json | 5 +- yarn.lock | 225 +++++++++--------- 82 files changed, 646 insertions(+), 237 deletions(-) create mode 100644 .yarn/versions/1f1ba8b4.yml create mode 100644 ssr-testing/app/accessible-icon/page.tsx rename ssr-testing/{pages/accordion.tsx => app/accordion/page.tsx} (97%) create mode 100644 ssr-testing/app/alert-dialog/page.tsx create mode 100644 ssr-testing/app/aspect-ratio/page.tsx create mode 100644 ssr-testing/app/avatar/page.tsx create mode 100644 ssr-testing/app/checkbox/page.tsx rename ssr-testing/{pages/collapsible.tsx => app/collapsible/page.tsx} (87%) create mode 100644 ssr-testing/app/context-menu/page.tsx rename ssr-testing/{pages/dialog.tsx => app/dialog/page.tsx} (93%) rename ssr-testing/{pages/dropdown-menu.tsx => app/dropdown-menu/page.tsx} (50%) create mode 100644 ssr-testing/app/form/page.tsx rename ssr-testing/{pages/hover-card.tsx => app/hover-card/page.tsx} (90%) rename ssr-testing/{pages/id.tsx => app/id/page.tsx} (86%) rename ssr-testing/{pages/label.tsx => app/label/page.tsx} (74%) create mode 100644 ssr-testing/app/layout.tsx create mode 100644 ssr-testing/app/menubar/page.tsx create mode 100644 ssr-testing/app/navigation-menu/page.tsx create mode 100644 ssr-testing/app/page.tsx rename ssr-testing/{pages/popover.tsx => app/popover/page.tsx} (90%) create mode 100644 ssr-testing/app/portal/conditional-portal.tsx create mode 100644 ssr-testing/app/portal/custom-portal-container.tsx create mode 100644 ssr-testing/app/portal/page.tsx create mode 100644 ssr-testing/app/progress/page.tsx create mode 100644 ssr-testing/app/radio-group/page.tsx rename ssr-testing/{pages/roving-focus-group.tsx => app/roving-focus-group/page.tsx} (99%) rename ssr-testing/{pages/scroll-area.tsx => app/scroll-area/page.tsx} (98%) rename ssr-testing/{pages/select.tsx => app/select/page.tsx} (98%) create mode 100644 ssr-testing/app/separator/page.tsx rename ssr-testing/{pages/slider.tsx => app/slider/page.tsx} (96%) create mode 100644 ssr-testing/app/slot/page.tsx create mode 100644 ssr-testing/app/switch/page.tsx rename ssr-testing/{pages/tabs.tsx => app/tabs/page.tsx} (96%) create mode 100644 ssr-testing/app/toast/page.tsx create mode 100644 ssr-testing/app/toggle-group/page.tsx create mode 100644 ssr-testing/app/toolbar/page.tsx rename ssr-testing/{pages/tooltip.tsx => app/tooltip/page.tsx} (91%) create mode 100644 ssr-testing/app/visually-hidden/page.tsx delete mode 100644 ssr-testing/pages/_app.tsx delete mode 100644 ssr-testing/pages/alert-dialog.tsx delete mode 100644 ssr-testing/pages/index.tsx diff --git a/.yarn/versions/1f1ba8b4.yml b/.yarn/versions/1f1ba8b4.yml new file mode 100644 index 000000000..731f25169 --- /dev/null +++ b/.yarn/versions/1f1ba8b4.yml @@ -0,0 +1,47 @@ +releases: + "@radix-ui/react-accessible-icon": patch + "@radix-ui/react-accordion": patch + "@radix-ui/react-alert-dialog": patch + "@radix-ui/react-announce": patch + "@radix-ui/react-arrow": patch + "@radix-ui/react-aspect-ratio": patch + "@radix-ui/react-avatar": patch + "@radix-ui/react-checkbox": patch + "@radix-ui/react-collapsible": patch + "@radix-ui/react-collection": patch + "@radix-ui/react-context-menu": patch + "@radix-ui/react-dialog": patch + "@radix-ui/react-dismissable-layer": patch + "@radix-ui/react-dropdown-menu": patch + "@radix-ui/react-focus-guards": patch + "@radix-ui/react-focus-scope": patch + "@radix-ui/react-form": patch + "@radix-ui/react-hover-card": patch + "@radix-ui/react-label": patch + "@radix-ui/react-menu": patch + "@radix-ui/react-menubar": patch + "@radix-ui/react-navigation-menu": patch + "@radix-ui/react-popover": patch + "@radix-ui/react-popper": patch + "@radix-ui/react-portal": minor + "@radix-ui/react-presence": patch + "@radix-ui/react-primitive": patch + "@radix-ui/react-progress": patch + "@radix-ui/react-radio-group": patch + "@radix-ui/react-roving-focus": patch + "@radix-ui/react-scroll-area": patch + "@radix-ui/react-select": patch + "@radix-ui/react-separator": patch + "@radix-ui/react-slider": patch + "@radix-ui/react-switch": patch + "@radix-ui/react-tabs": patch + "@radix-ui/react-toast": patch + "@radix-ui/react-toggle": patch + "@radix-ui/react-toggle-group": patch + "@radix-ui/react-toolbar": patch + "@radix-ui/react-tooltip": patch + "@radix-ui/react-visually-hidden": patch + +declined: + - primitives + - ssr-testing diff --git a/packages/react/accordion/src/index.ts b/packages/react/accordion/src/index.ts index 21d76c77a..a4277104b 100644 --- a/packages/react/accordion/src/index.ts +++ b/packages/react/accordion/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createAccordionScope, // diff --git a/packages/react/alert-dialog/src/index.ts b/packages/react/alert-dialog/src/index.ts index 8c9eab7e3..a5b51b612 100644 --- a/packages/react/alert-dialog/src/index.ts +++ b/packages/react/alert-dialog/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createAlertDialogScope, // diff --git a/packages/react/announce/src/index.ts b/packages/react/announce/src/index.ts index 64cc48f73..d34fdf047 100644 --- a/packages/react/announce/src/index.ts +++ b/packages/react/announce/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Announce, // diff --git a/packages/react/avatar/src/index.ts b/packages/react/avatar/src/index.ts index 22a6d8b1b..3895189ac 100644 --- a/packages/react/avatar/src/index.ts +++ b/packages/react/avatar/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createAvatarScope, // diff --git a/packages/react/checkbox/src/index.ts b/packages/react/checkbox/src/index.ts index 1ff2e64b7..28294e063 100644 --- a/packages/react/checkbox/src/index.ts +++ b/packages/react/checkbox/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createCheckboxScope, // diff --git a/packages/react/collapsible/src/index.ts b/packages/react/collapsible/src/index.ts index 7a4df678f..6a6afeca9 100644 --- a/packages/react/collapsible/src/index.ts +++ b/packages/react/collapsible/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createCollapsibleScope, // diff --git a/packages/react/collection/src/index.ts b/packages/react/collection/src/index.ts index f4981a190..0e67bde09 100644 --- a/packages/react/collection/src/index.ts +++ b/packages/react/collection/src/index.ts @@ -1,2 +1,3 @@ +'use client'; export { createCollection } from './Collection'; export type { CollectionProps } from './Collection'; diff --git a/packages/react/context-menu/src/index.ts b/packages/react/context-menu/src/index.ts index aa7b898a3..85ba23794 100644 --- a/packages/react/context-menu/src/index.ts +++ b/packages/react/context-menu/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createContextMenuScope, // diff --git a/packages/react/dialog/src/index.ts b/packages/react/dialog/src/index.ts index ba4e95447..43d68ee2d 100644 --- a/packages/react/dialog/src/index.ts +++ b/packages/react/dialog/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createDialogScope, // diff --git a/packages/react/dismissable-layer/src/index.ts b/packages/react/dismissable-layer/src/index.ts index 88eb2be10..1112313bf 100644 --- a/packages/react/dismissable-layer/src/index.ts +++ b/packages/react/dismissable-layer/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { DismissableLayer, DismissableLayerBranch, diff --git a/packages/react/dropdown-menu/src/index.ts b/packages/react/dropdown-menu/src/index.ts index 0ccbed560..497344708 100644 --- a/packages/react/dropdown-menu/src/index.ts +++ b/packages/react/dropdown-menu/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createDropdownMenuScope, // diff --git a/packages/react/focus-guards/src/index.ts b/packages/react/focus-guards/src/index.ts index 37679122e..e5566b7b8 100644 --- a/packages/react/focus-guards/src/index.ts +++ b/packages/react/focus-guards/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { FocusGuards, // diff --git a/packages/react/focus-scope/src/index.ts b/packages/react/focus-scope/src/index.ts index 5bd3a43b3..c61038d19 100644 --- a/packages/react/focus-scope/src/index.ts +++ b/packages/react/focus-scope/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { FocusScope, // diff --git a/packages/react/form/src/index.ts b/packages/react/form/src/index.ts index 3da481251..03f9e313c 100644 --- a/packages/react/form/src/index.ts +++ b/packages/react/form/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createFormScope, // diff --git a/packages/react/hover-card/src/index.ts b/packages/react/hover-card/src/index.ts index ab02bf023..c8930bf26 100644 --- a/packages/react/hover-card/src/index.ts +++ b/packages/react/hover-card/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createHoverCardScope, // diff --git a/packages/react/label/src/index.ts b/packages/react/label/src/index.ts index b96a08542..c3ce6cd92 100644 --- a/packages/react/label/src/index.ts +++ b/packages/react/label/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Label, // diff --git a/packages/react/menu/src/index.ts b/packages/react/menu/src/index.ts index 7a9ab885e..95e43ad57 100644 --- a/packages/react/menu/src/index.ts +++ b/packages/react/menu/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createMenuScope, // diff --git a/packages/react/menubar/src/index.ts b/packages/react/menubar/src/index.ts index 617b3b9e3..10531a022 100644 --- a/packages/react/menubar/src/index.ts +++ b/packages/react/menubar/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createMenubarScope, // diff --git a/packages/react/navigation-menu/src/index.ts b/packages/react/navigation-menu/src/index.ts index 638468ae5..3183133ff 100644 --- a/packages/react/navigation-menu/src/index.ts +++ b/packages/react/navigation-menu/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createNavigationMenuScope, // diff --git a/packages/react/popover/src/index.ts b/packages/react/popover/src/index.ts index e365e9910..c6e78c62c 100644 --- a/packages/react/popover/src/index.ts +++ b/packages/react/popover/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createPopoverScope, // diff --git a/packages/react/popper/src/index.ts b/packages/react/popper/src/index.ts index 871fec263..135356f9f 100644 --- a/packages/react/popper/src/index.ts +++ b/packages/react/popper/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createPopperScope, // diff --git a/packages/react/portal/src/Portal.tsx b/packages/react/portal/src/Portal.tsx index fbe22b423..05c8fa0a8 100644 --- a/packages/react/portal/src/Portal.tsx +++ b/packages/react/portal/src/Portal.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import ReactDOM from 'react-dom'; import { Primitive } from '@radix-ui/react-primitive'; +import { useLayoutEffect } from '@radix-ui/react-use-layout-effect'; import type * as Radix from '@radix-ui/react-primitive'; @@ -16,11 +17,14 @@ interface PortalProps extends PrimitiveDivProps { /** * An optional container where the portaled content should be appended. */ - container?: HTMLElement | null; + container?: Element | null; } const Portal = React.forwardRef((props, forwardedRef) => { - const { container = globalThis?.document?.body, ...portalProps } = props; + const { container: containerProp, ...portalProps } = props; + const [mounted, setMounted] = React.useState(false); + useLayoutEffect(() => setMounted(true), []); + const container = containerProp || (mounted && globalThis?.document?.body); return container ? ReactDOM.createPortal(, container) : null; diff --git a/packages/react/portal/src/index.ts b/packages/react/portal/src/index.ts index d69622f68..b9ed50375 100644 --- a/packages/react/portal/src/index.ts +++ b/packages/react/portal/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Portal, // diff --git a/packages/react/presence/src/index.ts b/packages/react/presence/src/index.ts index 63a93b76b..29fabf5ec 100644 --- a/packages/react/presence/src/index.ts +++ b/packages/react/presence/src/index.ts @@ -1,2 +1,3 @@ +'use client'; export { Presence } from './Presence'; export type { PresenceProps } from './Presence'; diff --git a/packages/react/primitive/src/Primitive.tsx b/packages/react/primitive/src/Primitive.tsx index 16d5aa854..265f22af1 100644 --- a/packages/react/primitive/src/Primitive.tsx +++ b/packages/react/primitive/src/Primitive.tsx @@ -46,9 +46,9 @@ const Primitive = NODES.reduce((primitive, node) => { const { asChild, ...primitiveProps } = props; const Comp: any = asChild ? Slot : node; - React.useEffect(() => { + if (typeof window !== 'undefined') { (window as any)[Symbol.for('radix-ui')] = true; - }, []); + } return ; }); diff --git a/packages/react/progress/src/index.ts b/packages/react/progress/src/index.ts index 99a5c978c..a3ba1f147 100644 --- a/packages/react/progress/src/index.ts +++ b/packages/react/progress/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createProgressScope, // diff --git a/packages/react/radio-group/src/index.ts b/packages/react/radio-group/src/index.ts index 2bdd29e80..5aa451e50 100644 --- a/packages/react/radio-group/src/index.ts +++ b/packages/react/radio-group/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createRadioGroupScope, // diff --git a/packages/react/roving-focus/src/index.ts b/packages/react/roving-focus/src/index.ts index 2b1cba276..9d2528ab4 100644 --- a/packages/react/roving-focus/src/index.ts +++ b/packages/react/roving-focus/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createRovingFocusGroupScope, // diff --git a/packages/react/scroll-area/src/index.ts b/packages/react/scroll-area/src/index.ts index 0e73b9815..eb826ce59 100644 --- a/packages/react/scroll-area/src/index.ts +++ b/packages/react/scroll-area/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createScrollAreaScope, // diff --git a/packages/react/select/src/index.ts b/packages/react/select/src/index.ts index 025a0f1ef..3fcc9e384 100644 --- a/packages/react/select/src/index.ts +++ b/packages/react/select/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createSelectScope, // diff --git a/packages/react/slider/src/index.ts b/packages/react/slider/src/index.ts index 2139226d0..a6485fe8f 100644 --- a/packages/react/slider/src/index.ts +++ b/packages/react/slider/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createSliderScope, // diff --git a/packages/react/switch/src/index.ts b/packages/react/switch/src/index.ts index e665d8641..20ff411a8 100644 --- a/packages/react/switch/src/index.ts +++ b/packages/react/switch/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createSwitchScope, // diff --git a/packages/react/tabs/src/index.ts b/packages/react/tabs/src/index.ts index 8bef435b3..903d14aee 100644 --- a/packages/react/tabs/src/index.ts +++ b/packages/react/tabs/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createTabsScope, // diff --git a/packages/react/toast/src/index.ts b/packages/react/toast/src/index.ts index 3821c489f..b1f425a06 100644 --- a/packages/react/toast/src/index.ts +++ b/packages/react/toast/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createToastScope, // diff --git a/packages/react/toggle-group/src/index.ts b/packages/react/toggle-group/src/index.ts index 46b8c75a5..8405d397d 100644 --- a/packages/react/toggle-group/src/index.ts +++ b/packages/react/toggle-group/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createToggleGroupScope, // diff --git a/packages/react/toggle/src/index.ts b/packages/react/toggle/src/index.ts index 7e98c54e1..36548f003 100644 --- a/packages/react/toggle/src/index.ts +++ b/packages/react/toggle/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { Toggle, // diff --git a/packages/react/toolbar/src/index.ts b/packages/react/toolbar/src/index.ts index 8a9b7c55a..e3bcdd210 100644 --- a/packages/react/toolbar/src/index.ts +++ b/packages/react/toolbar/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createToolbarScope, // diff --git a/packages/react/tooltip/src/index.ts b/packages/react/tooltip/src/index.ts index 21c9550cc..55ddb1da5 100644 --- a/packages/react/tooltip/src/index.ts +++ b/packages/react/tooltip/src/index.ts @@ -1,3 +1,4 @@ +'use client'; export { createTooltipScope, // diff --git a/ssr-testing/app/accessible-icon/page.tsx b/ssr-testing/app/accessible-icon/page.tsx new file mode 100644 index 000000000..dd6e5ec8b --- /dev/null +++ b/ssr-testing/app/accessible-icon/page.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { AccessibleIcon } from '@radix-ui/react-accessible-icon'; + +export default function Page() { + return ( + + ); +} diff --git a/ssr-testing/pages/accordion.tsx b/ssr-testing/app/accordion/page.tsx similarity index 97% rename from ssr-testing/pages/accordion.tsx rename to ssr-testing/app/accordion/page.tsx index 28f11c423..1ab9d8a30 100644 --- a/ssr-testing/pages/accordion.tsx +++ b/ssr-testing/app/accordion/page.tsx @@ -7,7 +7,7 @@ import { AccordionContent, } from '@radix-ui/react-accordion'; -export default function AccordionPage() { +export default function Page() { return ( diff --git a/ssr-testing/app/alert-dialog/page.tsx b/ssr-testing/app/alert-dialog/page.tsx new file mode 100644 index 000000000..4bae41155 --- /dev/null +++ b/ssr-testing/app/alert-dialog/page.tsx @@ -0,0 +1,31 @@ +import * as React from 'react'; +import { + AlertDialog, + AlertDialogTrigger, + AlertDialogOverlay, + AlertDialogContent, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, + AlertDialogPortal, +} from '@radix-ui/react-alert-dialog'; + +export default function Page() { + return ( + + delete everything + + + + Are you sure? + + This will do a very dangerous thing. Thar be dragons! + + yolo, do it + maybe not + + + + ); +} diff --git a/ssr-testing/app/aspect-ratio/page.tsx b/ssr-testing/app/aspect-ratio/page.tsx new file mode 100644 index 000000000..e37787dae --- /dev/null +++ b/ssr-testing/app/aspect-ratio/page.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; +import { AspectRatio } from '@radix-ui/react-aspect-ratio'; + +export default function Page() { + return ( +
+ + A house in a forest + +
+ ); +} diff --git a/ssr-testing/app/avatar/page.tsx b/ssr-testing/app/avatar/page.tsx new file mode 100644 index 000000000..599d6e200 --- /dev/null +++ b/ssr-testing/app/avatar/page.tsx @@ -0,0 +1,10 @@ +import * as React from 'react'; +import * as Avatar from '@radix-ui/react-avatar'; + +export default function Page() { + return ( + + A + + ); +} diff --git a/ssr-testing/app/checkbox/page.tsx b/ssr-testing/app/checkbox/page.tsx new file mode 100644 index 000000000..363287443 --- /dev/null +++ b/ssr-testing/app/checkbox/page.tsx @@ -0,0 +1,10 @@ +import * as React from 'react'; +import * as Checkbox from '@radix-ui/react-checkbox'; + +export default function Page() { + return ( + + [ ] + + ); +} diff --git a/ssr-testing/pages/collapsible.tsx b/ssr-testing/app/collapsible/page.tsx similarity index 87% rename from ssr-testing/pages/collapsible.tsx rename to ssr-testing/app/collapsible/page.tsx index 9e669d1cd..d03b1b09f 100644 --- a/ssr-testing/pages/collapsible.tsx +++ b/ssr-testing/app/collapsible/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible'; -export default function CollapsiblePage() { +export default function Page() { return ( Trigger diff --git a/ssr-testing/app/context-menu/page.tsx b/ssr-testing/app/context-menu/page.tsx new file mode 100644 index 000000000..6acac09e0 --- /dev/null +++ b/ssr-testing/app/context-menu/page.tsx @@ -0,0 +1,20 @@ +import * as React from 'react'; +import * as ContextMenu from '@radix-ui/react-context-menu'; + +export default function Page() { + return ( + + Right click here + + + Undo + Redo + + Cut + Copy + Paste + + + + ); +} diff --git a/ssr-testing/pages/dialog.tsx b/ssr-testing/app/dialog/page.tsx similarity index 93% rename from ssr-testing/pages/dialog.tsx rename to ssr-testing/app/dialog/page.tsx index 9a3d143c5..3e355d86e 100644 --- a/ssr-testing/pages/dialog.tsx +++ b/ssr-testing/app/dialog/page.tsx @@ -10,7 +10,7 @@ import { DialogClose, } from '@radix-ui/react-dialog'; -export default function DialogPage() { +export default function Page() { return ( open diff --git a/ssr-testing/pages/dropdown-menu.tsx b/ssr-testing/app/dropdown-menu/page.tsx similarity index 50% rename from ssr-testing/pages/dropdown-menu.tsx rename to ssr-testing/app/dropdown-menu/page.tsx index 980a4bc95..ecfded106 100644 --- a/ssr-testing/pages/dropdown-menu.tsx +++ b/ssr-testing/app/dropdown-menu/page.tsx @@ -9,20 +9,18 @@ import { DropdownMenuArrow, } from '@radix-ui/react-dropdown-menu'; -export default function DropdownMenuPage() { +export default function Page() { return ( Open - console.log('undo')}>Undo - console.log('redo')}>Redo + Undo + Redo - console.log('cut')}> - Cut - - console.log('copy')}>Copy - console.log('paste')}>Paste + Cut + Copy + Paste diff --git a/ssr-testing/app/form/page.tsx b/ssr-testing/app/form/page.tsx new file mode 100644 index 000000000..b3c90cde0 --- /dev/null +++ b/ssr-testing/app/form/page.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import * as Form from '@radix-ui/react-form'; + +export default function Page() { + return ( + + + Email + + Value is missing + Email is invalid + + + ); +} diff --git a/ssr-testing/pages/hover-card.tsx b/ssr-testing/app/hover-card/page.tsx similarity index 90% rename from ssr-testing/pages/hover-card.tsx rename to ssr-testing/app/hover-card/page.tsx index 71766ddd1..2d73479f7 100644 --- a/ssr-testing/pages/hover-card.tsx +++ b/ssr-testing/app/hover-card/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as HoverCard from '@radix-ui/react-hover-card'; -export default function HoverCardPage() { +export default function Page() { return ( Hover me diff --git a/ssr-testing/pages/id.tsx b/ssr-testing/app/id/page.tsx similarity index 86% rename from ssr-testing/pages/id.tsx rename to ssr-testing/app/id/page.tsx index 2a8901184..334bb0011 100644 --- a/ssr-testing/pages/id.tsx +++ b/ssr-testing/app/id/page.tsx @@ -1,7 +1,8 @@ +'use client'; import * as React from 'react'; import { useId } from '@radix-ui/react-id'; -export default function IdPage() { +export default function Page() { return ( <> diff --git a/ssr-testing/pages/label.tsx b/ssr-testing/app/label/page.tsx similarity index 74% rename from ssr-testing/pages/label.tsx rename to ssr-testing/app/label/page.tsx index 8eb72357e..e8f3084d3 100644 --- a/ssr-testing/pages/label.tsx +++ b/ssr-testing/app/label/page.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { Label } from '@radix-ui/react-label'; -export default function LabelPage() { +export default function Page() { return ; } diff --git a/ssr-testing/app/layout.tsx b/ssr-testing/app/layout.tsx new file mode 100644 index 000000000..8cda635d4 --- /dev/null +++ b/ssr-testing/app/layout.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import type { Metadata } from 'next'; +import Link from 'next/link'; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + + + +

SSR / RSC testing

+
+
+ AccessibleIcon + Accordion + AlertDialog + Avatar + Checkbox + Collapsible + ContextMenu + Dialog + DropdownMenu + Form + HoverCard + Id + Label + Menubar + NavigationMenu + Popover + Portal + Progress + RadioGroup + RovingFocusGroup + ScrollArea + Select + Separator + Slider + Slot + Switch + Tabs + Toast + ToggleGroup + Toolbar + Tooltip + VisuallyHidden +
+ +
{children}
+
+ + +
+ ); +} + +export const metadata: Metadata = { + title: 'SSR testing', +}; diff --git a/ssr-testing/app/menubar/page.tsx b/ssr-testing/app/menubar/page.tsx new file mode 100644 index 000000000..e2f2c1982 --- /dev/null +++ b/ssr-testing/app/menubar/page.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import * as Menubar from '@radix-ui/react-menubar'; + +export default function Page() { + return ( + + + Open + + + Menu + Item 1 + Item 2 + Item 3 + + + + + + ); +} diff --git a/ssr-testing/app/navigation-menu/page.tsx b/ssr-testing/app/navigation-menu/page.tsx new file mode 100644 index 000000000..ac46ce71a --- /dev/null +++ b/ssr-testing/app/navigation-menu/page.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import * as NavigationMenu from '@radix-ui/react-navigation-menu'; + +export default function Page() { + return ( + + + + Nav Menu Item 1 + + Link + + + + + Nav Menu Item 2 + + + + ); +} diff --git a/ssr-testing/app/page.tsx b/ssr-testing/app/page.tsx new file mode 100644 index 000000000..67e085913 --- /dev/null +++ b/ssr-testing/app/page.tsx @@ -0,0 +1,3 @@ +export default function Page() { + return null; +} diff --git a/ssr-testing/pages/popover.tsx b/ssr-testing/app/popover/page.tsx similarity index 90% rename from ssr-testing/pages/popover.tsx rename to ssr-testing/app/popover/page.tsx index 1a403ac91..53ef87949 100644 --- a/ssr-testing/pages/popover.tsx +++ b/ssr-testing/app/popover/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as Popover from '@radix-ui/react-popover'; -export default function PopoverPage() { +export default function Page() { return ( open diff --git a/ssr-testing/app/portal/conditional-portal.tsx b/ssr-testing/app/portal/conditional-portal.tsx new file mode 100644 index 000000000..9649977ec --- /dev/null +++ b/ssr-testing/app/portal/conditional-portal.tsx @@ -0,0 +1,20 @@ +'use client'; + +import * as React from 'react'; +import { Portal } from '@radix-ui/react-portal'; + +export const ConditionalPortal = () => { + const [container, setContainer] = React.useState(null); + const [open, setOpen] = React.useState(false); + return ( +
+ + + {open && ( + + This content is rendered in a custom container + + )} +
+ ); +}; diff --git a/ssr-testing/app/portal/custom-portal-container.tsx b/ssr-testing/app/portal/custom-portal-container.tsx new file mode 100644 index 000000000..98e4fe154 --- /dev/null +++ b/ssr-testing/app/portal/custom-portal-container.tsx @@ -0,0 +1,16 @@ +'use client'; + +import * as React from 'react'; +import { Portal } from '@radix-ui/react-portal'; + +export const CustomPortalContainer = () => { + const [container, setContainer] = React.useState(null); + return ( +
+ + + This content is rendered in a custom container + +
+ ); +}; diff --git a/ssr-testing/app/portal/page.tsx b/ssr-testing/app/portal/page.tsx new file mode 100644 index 000000000..569d716c7 --- /dev/null +++ b/ssr-testing/app/portal/page.tsx @@ -0,0 +1,40 @@ +import * as React from 'react'; +import { Portal } from '@radix-ui/react-portal'; +import { CustomPortalContainer } from './custom-portal-container'; +import { ConditionalPortal } from './conditional-portal'; + +export default function Page() { + return ( +
+
+

This content is rendered in the main DOM tree

+

+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos porro, est ex quia itaque + facere fugit necessitatibus aut enim. Nisi rerum quae, repellat in perspiciatis explicabo + laboriosam necessitatibus eius pariatur. +

+ + +

This content is rendered in a portal (another DOM tree)

+

+ Because of the portal, it can appear in a different DOM tree from the main one (by + default a new element inside the body), even though it is part of the same React tree. +

+
+
+ +
+ + +
+ +
+ ); +} diff --git a/ssr-testing/app/progress/page.tsx b/ssr-testing/app/progress/page.tsx new file mode 100644 index 000000000..69987cf2b --- /dev/null +++ b/ssr-testing/app/progress/page.tsx @@ -0,0 +1,10 @@ +import * as React from 'react'; +import * as Progress from '@radix-ui/react-progress'; + +export default function Page() { + return ( + + Progress + + ); +} diff --git a/ssr-testing/app/radio-group/page.tsx b/ssr-testing/app/radio-group/page.tsx new file mode 100644 index 000000000..d8f533a80 --- /dev/null +++ b/ssr-testing/app/radio-group/page.tsx @@ -0,0 +1,36 @@ +import * as React from 'react'; +import * as RadioGroup from '@radix-ui/react-radio-group'; +import { Label } from '@radix-ui/react-label'; + +export default function Page() { + return ( + + ); +} diff --git a/ssr-testing/pages/roving-focus-group.tsx b/ssr-testing/app/roving-focus-group/page.tsx similarity index 99% rename from ssr-testing/pages/roving-focus-group.tsx rename to ssr-testing/app/roving-focus-group/page.tsx index f9e05894a..558fcaf07 100644 --- a/ssr-testing/pages/roving-focus-group.tsx +++ b/ssr-testing/app/roving-focus-group/page.tsx @@ -1,10 +1,11 @@ +'use client'; import * as React from 'react'; import { composeEventHandlers } from '@radix-ui/primitive'; import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; type RovingFocusGroupProps = React.ComponentProps; -export default function RovingFocusGroupPage() { +export default function Page() { const [dir, setDir] = React.useState('ltr'); return ( diff --git a/ssr-testing/pages/scroll-area.tsx b/ssr-testing/app/scroll-area/page.tsx similarity index 98% rename from ssr-testing/pages/scroll-area.tsx rename to ssr-testing/app/scroll-area/page.tsx index 0aecb2c2b..ff5d77893 100644 --- a/ssr-testing/pages/scroll-area.tsx +++ b/ssr-testing/app/scroll-area/page.tsx @@ -7,7 +7,7 @@ import { ScrollAreaThumb, } from '@radix-ui/react-scroll-area'; -export default function ScrollAreaPage() { +export default function Page() { return ( diff --git a/ssr-testing/pages/select.tsx b/ssr-testing/app/select/page.tsx similarity index 98% rename from ssr-testing/pages/select.tsx rename to ssr-testing/app/select/page.tsx index fc57e0809..19f42b398 100644 --- a/ssr-testing/pages/select.tsx +++ b/ssr-testing/app/select/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as Select from '@radix-ui/react-select'; -export default function SelectPage() { +export default function Page() { return ( <> diff --git a/ssr-testing/app/separator/page.tsx b/ssr-testing/app/separator/page.tsx new file mode 100644 index 000000000..bdd82f34a --- /dev/null +++ b/ssr-testing/app/separator/page.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import { Separator } from '@radix-ui/react-separator'; + +export default function Page() { + return ***; +} diff --git a/ssr-testing/pages/slider.tsx b/ssr-testing/app/slider/page.tsx similarity index 96% rename from ssr-testing/pages/slider.tsx rename to ssr-testing/app/slider/page.tsx index c5d62a264..468150ef9 100644 --- a/ssr-testing/pages/slider.tsx +++ b/ssr-testing/app/slider/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Root, Track, Range, Thumb } from '@radix-ui/react-slider'; -export default function SliderPage() { +export default function Page() { return ( + I'm in a + + Slot!? + + + ); +} diff --git a/ssr-testing/app/switch/page.tsx b/ssr-testing/app/switch/page.tsx new file mode 100644 index 000000000..72066fb4f --- /dev/null +++ b/ssr-testing/app/switch/page.tsx @@ -0,0 +1,10 @@ +import * as React from 'react'; +import * as Switch from '@radix-ui/react-switch'; + +export default function Page() { + return ( + + Switch + + ); +} diff --git a/ssr-testing/pages/tabs.tsx b/ssr-testing/app/tabs/page.tsx similarity index 96% rename from ssr-testing/pages/tabs.tsx rename to ssr-testing/app/tabs/page.tsx index 1f4f420d3..5f43a9cd8 100644 --- a/ssr-testing/pages/tabs.tsx +++ b/ssr-testing/app/tabs/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Tabs, TabsList, TabsTrigger, TabsContent } from '@radix-ui/react-tabs'; -export default function TabsPage() { +export default function Page() { return ( diff --git a/ssr-testing/app/toast/page.tsx b/ssr-testing/app/toast/page.tsx new file mode 100644 index 000000000..7b8afa843 --- /dev/null +++ b/ssr-testing/app/toast/page.tsx @@ -0,0 +1,17 @@ +import * as React from 'react'; +import * as Toast from '@radix-ui/react-toast'; + +export default function Page() { + return ( + + + Toast + This is a toast message. + Do something + Close + + + + + ); +} diff --git a/ssr-testing/app/toggle-group/page.tsx b/ssr-testing/app/toggle-group/page.tsx new file mode 100644 index 000000000..69d2ce10c --- /dev/null +++ b/ssr-testing/app/toggle-group/page.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; +import * as ToggleGroup from '@radix-ui/react-toggle-group'; + +export default function Page() { + return ( + + Item 1 + Item 2 + + ); +} diff --git a/ssr-testing/app/toolbar/page.tsx b/ssr-testing/app/toolbar/page.tsx new file mode 100644 index 000000000..cb087c701 --- /dev/null +++ b/ssr-testing/app/toolbar/page.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import * as Toolbar from '@radix-ui/react-toolbar'; + +export default function Page() { + return ( + + Button + *** + Link + + ); +} diff --git a/ssr-testing/pages/tooltip.tsx b/ssr-testing/app/tooltip/page.tsx similarity index 91% rename from ssr-testing/pages/tooltip.tsx rename to ssr-testing/app/tooltip/page.tsx index 512e5f652..5f4af9a15 100644 --- a/ssr-testing/pages/tooltip.tsx +++ b/ssr-testing/app/tooltip/page.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import * as Tooltip from '@radix-ui/react-tooltip'; -export default function TooltipPage() { +export default function Page() { return ( diff --git a/ssr-testing/app/visually-hidden/page.tsx b/ssr-testing/app/visually-hidden/page.tsx new file mode 100644 index 000000000..9401d4d6f --- /dev/null +++ b/ssr-testing/app/visually-hidden/page.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { VisuallyHidden } from '@radix-ui/react-visually-hidden'; + +export default function Page() { + return ( +
+ You won't see this: + 🙈 +
+ ); +} diff --git a/ssr-testing/package.json b/ssr-testing/package.json index 528a16020..bd58fdddc 100644 --- a/ssr-testing/package.json +++ b/ssr-testing/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "next": "^12.1.6", + "next": "14.2.3", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/ssr-testing/pages/_app.tsx b/ssr-testing/pages/_app.tsx deleted file mode 100644 index f01b28955..000000000 --- a/ssr-testing/pages/_app.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from 'react'; -import Head from 'next/head'; - -export default function App({ Component, pageProps }: any) { - return ( - - - SSR testing - - - - - ); -} diff --git a/ssr-testing/pages/alert-dialog.tsx b/ssr-testing/pages/alert-dialog.tsx deleted file mode 100644 index f899c2cbb..000000000 --- a/ssr-testing/pages/alert-dialog.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from 'react'; -import { - AlertDialog, - AlertDialogTrigger, - AlertDialogOverlay, - AlertDialogContent, - AlertDialogTitle, - AlertDialogDescription, - AlertDialogAction, - AlertDialogCancel, -} from '@radix-ui/react-alert-dialog'; - -export default function AlertDialogPage() { - return ( - - delete everything - - - Are you sure? - - This will do a very dangerous thing. Thar be dragons! - - yolo, do it - maybe not - - - ); -} diff --git a/ssr-testing/pages/index.tsx b/ssr-testing/pages/index.tsx deleted file mode 100644 index 265e47926..000000000 --- a/ssr-testing/pages/index.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import * as React from 'react'; -import Link from 'next/link'; - -export default function HomePage() { - return ( -
-

SSR testing

-
    -
  • - Id -
  • -
  • - Accordion -
  • -
  • - AlertDialog -
  • -
  • - Collapsible -
  • -
  • - Dialog -
  • -
  • - HoverCard -
  • -
  • - Label -
  • -
  • - Popover -
  • -
  • - RovingFocusGroup -
  • -
  • - ScrollArea -
  • -
  • - Select -
  • -
  • - Slider -
  • -
  • - Tabs -
  • -
  • - Tooltip -
  • -
-
- ); -} diff --git a/ssr-testing/tsconfig.json b/ssr-testing/tsconfig.json index 877367dc5..ec63d6fe5 100644 --- a/ssr-testing/tsconfig.json +++ b/ssr-testing/tsconfig.json @@ -7,8 +7,9 @@ "module": "esnext", "isolatedModules": true, "jsx": "preserve", - "incremental": true + "incremental": true, + "plugins": [{ "name": "next" }] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] } diff --git a/yarn.lock b/yarn.lock index 37a3257d9..2b942ca21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2925,93 +2925,72 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:12.1.6": - version: 12.1.6 - resolution: "@next/env@npm:12.1.6" - checksum: 10/3c34af62765d44a62ff1854b8c66604090304cd82bd0ca8d797fdcb52b28ceecad2849093f40d23eaf6f9dbc8225754141f877da8dfc25f04119f7c2787ea508 +"@next/env@npm:14.2.3": + version: 14.2.3 + resolution: "@next/env@npm:14.2.3" + checksum: 10/82b445331d46b4896dc86c0e33a7eaaa6f6abfd2408d49e1cb90fbfd6b26c698ea8e69c911ffe597e30fd8294db4e3445cde44b0771eabbfcd13663a9832a397 languageName: node linkType: hard -"@next/swc-android-arm-eabi@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-android-arm-eabi@npm:12.1.6" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@next/swc-android-arm64@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-android-arm64@npm:12.1.6" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@next/swc-darwin-arm64@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-darwin-arm64@npm:12.1.6" +"@next/swc-darwin-arm64@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-darwin-arm64@npm:14.2.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-darwin-x64@npm:12.1.6" +"@next/swc-darwin-x64@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-darwin-x64@npm:14.2.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm-gnueabihf@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-linux-arm-gnueabihf@npm:12.1.6" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@next/swc-linux-arm64-gnu@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-linux-arm64-gnu@npm:12.1.6" +"@next/swc-linux-arm64-gnu@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-linux-arm64-gnu@npm:14.2.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-linux-arm64-musl@npm:12.1.6" +"@next/swc-linux-arm64-musl@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-linux-arm64-musl@npm:14.2.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-linux-x64-gnu@npm:12.1.6" +"@next/swc-linux-x64-gnu@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-linux-x64-gnu@npm:14.2.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-linux-x64-musl@npm:12.1.6" +"@next/swc-linux-x64-musl@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-linux-x64-musl@npm:14.2.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-win32-arm64-msvc@npm:12.1.6" +"@next/swc-win32-arm64-msvc@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-win32-arm64-msvc@npm:14.2.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-win32-ia32-msvc@npm:12.1.6" +"@next/swc-win32-ia32-msvc@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-win32-ia32-msvc@npm:14.2.3" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:12.1.6": - version: 12.1.6 - resolution: "@next/swc-win32-x64-msvc@npm:12.1.6" +"@next/swc-win32-x64-msvc@npm:14.2.3": + version: 14.2.3 + resolution: "@next/swc-win32-x64-msvc@npm:14.2.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -6001,6 +5980,16 @@ __metadata: languageName: node linkType: hard +"@swc/helpers@npm:0.5.5": + version: 0.5.5 + resolution: "@swc/helpers@npm:0.5.5" + dependencies: + "@swc/counter": "npm:^0.1.3" + tslib: "npm:^2.4.0" + checksum: 10/1c5ef04f642542212df28c669438f3e0f459dcde7b448a5b1fcafb2e9e4f13e76d8428535a270e91ed123dd2a21189dbed34086b88a8cf68baf84984d6d0e39b + languageName: node + linkType: hard + "@swc/types@npm:^0.1.5": version: 0.1.5 resolution: "@swc/types@npm:0.1.5" @@ -8257,6 +8246,15 @@ __metadata: languageName: node linkType: hard +"busboy@npm:1.6.0": + version: 1.6.0 + resolution: "busboy@npm:1.6.0" + dependencies: + streamsearch: "npm:^1.1.0" + checksum: 10/bee10fa10ea58e7e3e7489ffe4bda6eacd540a17de9f9cd21cc37e297b2dd9fe52b2715a5841afaec82900750d810d01d7edb4b2d456427f449b92b417579763 + languageName: node + linkType: hard + "bytes@npm:3.0.0": version: 3.0.0 resolution: "bytes@npm:3.0.0" @@ -8372,10 +8370,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001332": - version: 1.0.30001335 - resolution: "caniuse-lite@npm:1.0.30001335" - checksum: 10/713e56e3f981aa447c64b0dda237d9b7a5b3ef710d4f5f288ba2e640295c297cdbfaf95eb3f95fa5fd8e0010f8701f25ecf749a04becdfe72dd8b8dc7b7f5ecd +"caniuse-lite@npm:^1.0.30001579": + version: 1.0.30001623 + resolution: "caniuse-lite@npm:1.0.30001623" + checksum: 10/5bb1f007314d1b21f7fb65a3a05e11ed09b34d673ddef0040097e7be68180cb3f8e74acee0d8a30a086ad56fdd081a8ebe467d4ad727b7e7a3d2ce0a0ef67f75 languageName: node linkType: hard @@ -8631,6 +8629,13 @@ __metadata: languageName: node linkType: hard +"client-only@npm:0.0.1": + version: 0.0.1 + resolution: "client-only@npm:0.0.1" + checksum: 10/0c16bf660dadb90610553c1d8946a7fdfb81d624adea073b8440b7d795d5b5b08beb3c950c6a2cf16279365a3265158a236876d92bce16423c485c322d7dfaf8 + languageName: node + linkType: hard + "cliui@npm:^7.0.2": version: 7.0.4 resolution: "cliui@npm:7.0.4" @@ -11590,7 +11595,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.4": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 @@ -14315,16 +14320,7 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.1.30": - version: 3.3.2 - resolution: "nanoid@npm:3.3.2" - bin: - nanoid: bin/nanoid.cjs - checksum: 10/b6934bad3c4b5126f4011734b9e5675e1516dbd690916c27e09b3644e5e6736453e101fdc59131c277fab9ac1acbaf9f23ed91355aa9a66212e6947e66436519 - languageName: node - linkType: hard - -"nanoid@npm:^3.3.7": +"nanoid@npm:^3.3.6, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" bin: @@ -14354,43 +14350,37 @@ __metadata: languageName: node linkType: hard -"next@npm:^12.1.6": - version: 12.1.6 - resolution: "next@npm:12.1.6" - dependencies: - "@next/env": "npm:12.1.6" - "@next/swc-android-arm-eabi": "npm:12.1.6" - "@next/swc-android-arm64": "npm:12.1.6" - "@next/swc-darwin-arm64": "npm:12.1.6" - "@next/swc-darwin-x64": "npm:12.1.6" - "@next/swc-linux-arm-gnueabihf": "npm:12.1.6" - "@next/swc-linux-arm64-gnu": "npm:12.1.6" - "@next/swc-linux-arm64-musl": "npm:12.1.6" - "@next/swc-linux-x64-gnu": "npm:12.1.6" - "@next/swc-linux-x64-musl": "npm:12.1.6" - "@next/swc-win32-arm64-msvc": "npm:12.1.6" - "@next/swc-win32-ia32-msvc": "npm:12.1.6" - "@next/swc-win32-x64-msvc": "npm:12.1.6" - caniuse-lite: "npm:^1.0.30001332" - postcss: "npm:8.4.5" - styled-jsx: "npm:5.0.2" - peerDependencies: - fibers: ">= 3.1.0" - node-sass: ^6.0.0 || ^7.0.0 - react: ^17.0.2 || ^18.0.0-0 - react-dom: ^17.0.2 || ^18.0.0-0 +"next@npm:14.2.3": + version: 14.2.3 + resolution: "next@npm:14.2.3" + dependencies: + "@next/env": "npm:14.2.3" + "@next/swc-darwin-arm64": "npm:14.2.3" + "@next/swc-darwin-x64": "npm:14.2.3" + "@next/swc-linux-arm64-gnu": "npm:14.2.3" + "@next/swc-linux-arm64-musl": "npm:14.2.3" + "@next/swc-linux-x64-gnu": "npm:14.2.3" + "@next/swc-linux-x64-musl": "npm:14.2.3" + "@next/swc-win32-arm64-msvc": "npm:14.2.3" + "@next/swc-win32-ia32-msvc": "npm:14.2.3" + "@next/swc-win32-x64-msvc": "npm:14.2.3" + "@swc/helpers": "npm:0.5.5" + busboy: "npm:1.6.0" + caniuse-lite: "npm:^1.0.30001579" + graceful-fs: "npm:^4.2.11" + postcss: "npm:8.4.31" + styled-jsx: "npm:5.1.1" + peerDependencies: + "@opentelemetry/api": ^1.1.0 + "@playwright/test": ^1.41.2 + react: ^18.2.0 + react-dom: ^18.2.0 sass: ^1.3.0 dependenciesMeta: - "@next/swc-android-arm-eabi": - optional: true - "@next/swc-android-arm64": - optional: true "@next/swc-darwin-arm64": optional: true "@next/swc-darwin-x64": optional: true - "@next/swc-linux-arm-gnueabihf": - optional: true "@next/swc-linux-arm64-gnu": optional: true "@next/swc-linux-arm64-musl": @@ -14406,15 +14396,15 @@ __metadata: "@next/swc-win32-x64-msvc": optional: true peerDependenciesMeta: - fibers: + "@opentelemetry/api": optional: true - node-sass: + "@playwright/test": optional: true sass: optional: true bin: next: dist/bin/next - checksum: 10/a5dcd817cad1a6c9e5925690e34064f056fca1468b19e1767824883aec01b78442c1d07ae4834a52adcb2de9ee6cc9e4ab10b7e3e5367ff20df19ea3531596ef + checksum: 10/666c9770206ce693732a6d772297f1ddb3ce72f59862fa4cd104c5536da596026f758c4c9256ea790cf22d1bb8a15e27e5ea9455c948f72a9e3ca61fb745b0f5 languageName: node linkType: hard @@ -15335,14 +15325,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.5": - version: 8.4.5 - resolution: "postcss@npm:8.4.5" +"postcss@npm:8.4.31": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: - nanoid: "npm:^3.1.30" + nanoid: "npm:^3.3.6" picocolors: "npm:^1.0.0" - source-map-js: "npm:^1.0.1" - checksum: 10/7be2beec751727cf6c629360b6465364f200311c4a02d8471f48db2a07713b8cf104f86b1894b9d09356e1079aa88e921145f0cbb3c901977230753dbdf3933d + source-map-js: "npm:^1.0.2" + checksum: 10/1a6653e72105907377f9d4f2cd341d8d90e3fde823a5ddea1e2237aaa56933ea07853f0f2758c28892a1d70c53bbaca200eb8b80f8ed55f13093003dbec5afa0 languageName: node linkType: hard @@ -16832,7 +16822,7 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2": +"source-map-js@npm:^1.0.2": version: 1.0.2 resolution: "source-map-js@npm:1.0.2" checksum: 10/38e2d2dd18d2e331522001fc51b54127ef4a5d473f53b1349c5cca2123562400e0986648b52e9407e348eaaed53bce49248b6e2641e6d793ca57cb2c360d6d51 @@ -16973,7 +16963,7 @@ __metadata: dependencies: "@types/react": "npm:^18" "@types/react-dom": "npm:^18" - next: "npm:^12.1.6" + next: "npm:14.2.3" react: "npm:^18.0.0" react-dom: "npm:^18.0.0" typescript: "npm:^4.6.3" @@ -17075,6 +17065,13 @@ __metadata: languageName: node linkType: hard +"streamsearch@npm:^1.1.0": + version: 1.1.0 + resolution: "streamsearch@npm:1.1.0" + checksum: 10/612c2b2a7dbcc859f74597112f80a42cbe4d448d03da790d5b7b39673c1197dd3789e91cd67210353e58857395d32c1e955a9041c4e6d5bae723436b3ed9ed14 + languageName: node + linkType: hard + "string-argv@npm:0.3.1": version: 0.3.1 resolution: "string-argv@npm:0.3.1" @@ -17269,9 +17266,11 @@ __metadata: languageName: node linkType: hard -"styled-jsx@npm:5.0.2": - version: 5.0.2 - resolution: "styled-jsx@npm:5.0.2" +"styled-jsx@npm:5.1.1": + version: 5.1.1 + resolution: "styled-jsx@npm:5.1.1" + dependencies: + client-only: "npm:0.0.1" peerDependencies: react: ">= 16.8.0 || 17.x.x || ^18.0.0-0" peerDependenciesMeta: @@ -17279,7 +17278,7 @@ __metadata: optional: true babel-plugin-macros: optional: true - checksum: 10/96b4507d411bc13f92c70cbc84dabadd96e6539f9932c6b250cbc1af6910aca40957d1168b2c53a62c66ead988293e97c62a2e9612e0aa8727629b5ca3cd7634 + checksum: 10/4f6a5d0010770fdeea1183d919d528fd46c484e23c0535ef3e1dd49488116f639c594f3bd4440e3bc8a8686c9f8d53c5761599870ff039ede11a5c3bfe08a4be languageName: node linkType: hard