@knkcs/anker 1.10.4 → 1.12.0
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.
- package/CLAUDE-ANKER.md +3 -0
- package/dist/chunk-ZLQ3RBAF.js +3 -0
- package/dist/chunk-ZLQ3RBAF.js.map +1 -0
- package/dist/primitives/index.js +2 -1
- package/dist/primitives/index.js.map +1 -1
- package/dist/templates/index.d.ts +55 -19
- package/dist/templates/index.js +94 -10
- package/dist/templates/index.js.map +1 -1
- package/package.json +1 -1
package/CLAUDE-ANKER.md
CHANGED
|
@@ -62,6 +62,9 @@ The full human-facing spec lives at the anker GitHub Pages docs site (linked fro
|
|
|
62
62
|
- **No animations over 300ms.** Outside marketing/onboarding. Why: long animations slow down power users; the design language values immediacy.
|
|
63
63
|
- **No Chakra v2 patterns.** No `extendTheme`, `colorScheme`, `useColorMode` from `@chakra-ui/react`. Use `createSystem`, `colorPalette`, `next-themes`. Why: anker is built on Chakra v3 throughout; v2 patterns either error at build time or silently no-op.
|
|
64
64
|
- **No new color introductions.** If a color isn't in `colors.ts`, it doesn't exist. Why: the palette is closed by design — adding ad-hoc colors fragments the system.
|
|
65
|
+
- **No `maxW` on a Card inside a settings/detail template body.** The template controls width; per-card overrides break visual rhythm and produce orphaned narrow cards on full-width pages. Why: the template is the contract for body width — cards are the contract for content surfacing.
|
|
66
|
+
- **No inline create-forms above a DataTable.** Use a header-action button (or `usePageActions` from a tab) that opens a `Modal`. Why: inline forms steal vertical space, drift from the master pattern, and split form state from the rest of the page.
|
|
67
|
+
- **Don't own `<Tabs.Root>` for an owned-panels tab page.** Use `SettingsPageTemplate.bodyTabs` or `DetailPageTemplate.bodyTabs`. Why: the template enforces `lazyMount unmountOnExit` so `usePageActions` registrations from inactive tabs can't collide with the active tab's. Consumer-owned `<Tabs.Root>` was the cause of the "stuck Add button" bug fixed in anker 1.12. The `tabs` prop on those templates is for nav-mode/filter-mode strips only (Tabs.List, no Tabs.Content).
|
|
65
68
|
|
|
66
69
|
---
|
|
67
70
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-ZLQ3RBAF.js","sourcesContent":[]}
|
package/dist/primitives/index.js
CHANGED
|
@@ -6,10 +6,11 @@ export { LeavePageConfirmation, NativeSelect, NumberInputField, NumberInputLabel
|
|
|
6
6
|
export { Popover, PopoverBody, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger, Switch } from '../chunk-WQIEF5N3.js';
|
|
7
7
|
export { Textarea } from '../chunk-NFZMG6ZL.js';
|
|
8
8
|
export { Progress, ProgressCircle } from '../chunk-WEP2AIQ5.js';
|
|
9
|
+
export { Tabs } from '../chunk-ZLQ3RBAF.js';
|
|
9
10
|
export { Spinner } from '../chunk-5YDCDC4B.js';
|
|
10
11
|
export { Box, Center, Code, Container, Flex, Grid, GridItem, HStack, Heading, Link, Spacer, Stack, Text, VStack } from '../chunk-G4QMIXLC.js';
|
|
11
12
|
import { Accordion, Breadcrumb, Stat, createToaster, Portal, Toaster as Toaster$1, Toast, Spinner, Stack, Alert as Alert$1, ClientOnly, IconButton, Skeleton, Span, HoverCard as HoverCard$1, PinInput as PinInput$1, ChakraProvider, SegmentGroup, Slider as Slider$1, Popover, FormatNumber, Badge } from '@chakra-ui/react';
|
|
12
|
-
export { List
|
|
13
|
+
export { List } from '@chakra-ui/react';
|
|
13
14
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
15
|
import { Moon, Sun, Info } from 'lucide-react';
|
|
15
16
|
import { ThemeProvider, useTheme } from 'next-themes';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/primitives/accordion.tsx","../../src/primitives/alert.tsx","../../src/primitives/breadcrumb.tsx","../../src/primitives/color-mode.tsx","../../src/primitives/hover-card.tsx","../../src/primitives/pin-input.tsx","../../src/primitives/provider.tsx","../../src/primitives/segmented-control.tsx","../../src/primitives/slider.tsx","../../src/primitives/toggle-tip.tsx","../../src/primitives/stat.tsx","../../src/primitives/toaster.tsx"],"names":["AccordionItem","ChakraAccordion","Alert","jsxs","ChakraAlert","jsx","ChakraBreadcrumb","ColorModeButton","Skeleton","LightMode","DarkMode","HoverCard","ChakraHoverCard","PinInput","ChakraPinInput","SegmentedControl","ChakraSegmentGroup","Slider","ChakraSlider","ToggleTip","ChakraPopover","Portal","InfoTip","IconButton","StatLabel","ChakraStat","StatValueText","StatUpTrend","Badge","StatDownTrend","toaster","ChakraToaster","Spinner","Stack"],"mappings":";;;;;;;;;;;;;;;;AAUO,IAAM,aAAA,GAAgB,SAASA,cAAAA,CAAc;AAAA,EACnD,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA6D;AAC5D,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AACrC,EAAA,4BACEC,SAAA,CAAgB,IAAA,EAAhB,EAAqB,GAAA,EAAW,GAAG,IAAA,EACnC,QAAA,EAAA;AAAA,oBAAA,IAAA,CAACA,SAAA,CAAgB,aAAhB,EACC,QAAA,EAAA;AAAA,MAAA,KAAA;AAAA,sBACD,GAAA,CAACA,SAAA,CAAgB,aAAA,EAAhB,EAA8B;AAAA,KAAA,EAChC,CAAA;AAAA,oBACA,GAAA,CAACA,UAAgB,WAAA,EAAhB,EACA,8BAACA,SAAA,CAAgB,QAAA,EAAhB,EAA0B,QAAA,EAAS,CAAA,EACrC;AAAA,GAAA,EACD,CAAA;AAEF;AACA,aAAA,CAAc,WAAA,GAAc,eAAA;AAGrB,IAAM,gBAAgBA,SAAA,CAAgB;AAC7C,aAAA,CAAc,WAAA,GAAc,eAAA;ACrBrB,IAAM,KAAA,GAAQ,SAASC,MAAAA,CAAM;AAAA,EACnC,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAqD;AACpD,EAAA,MAAM,EAAE,OAAO,QAAA,EAAU,IAAA,EAAM,cAAc,UAAA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AA,MACC,KAAA,CAAM,0BACNA,GAAAA,CAAC,MAAM,aAAA,EAAN,EAAqB,QAAA,EAAA,KAAA,CAAM,MAAA,CAAO,KAAA,EAAM,CAAA;AAAA,MAEzC,MAAM,QAAA,oBAAYA,GAAAA,CAAC,KAAA,CAAM,cAAN,EAAmB;AAAA,KAAA,EACxC,GAEF,CAAA,EACD,CAAA;AAAA,EAEF,CAAA;AAEA,EAAA,OAAO,EAAE,OAAA,EAAAyB,QAAAA,EAAS,OAAA,EAAS,gBAAA,EAAiB;AAC7C;AAGA,IAAM,EAAE,OAAA,EAAS,OAAA,EAAQ,GAAI,kBAAA;AAE5B,OAAA,CAAqC,WAAA,GAAc,SAAA","file":"index.js","sourcesContent":["import { Accordion as ChakraAccordion } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface AccordionItemProps extends ChakraAccordion.ItemProps {\n\t/** The trigger label shown in the accordion header. */\n\tlabel: React.ReactNode;\n\t/** Content revealed when the item is expanded. */\n\tchildren: React.ReactNode;\n}\n\nexport const AccordionItem = function AccordionItem({\n\tref,\n\t...props\n}: AccordionItemProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { label, children, ...rest } = props;\n\treturn (\n\t\t<ChakraAccordion.Item ref={ref} {...rest}>\n\t\t\t<ChakraAccordion.ItemTrigger>\n\t\t\t\t{label}\n\t\t\t\t<ChakraAccordion.ItemIndicator />\n\t\t\t</ChakraAccordion.ItemTrigger>\n\t\t\t<ChakraAccordion.ItemContent>\n\t\t\t\t<ChakraAccordion.ItemBody>{children}</ChakraAccordion.ItemBody>\n\t\t\t</ChakraAccordion.ItemContent>\n\t\t</ChakraAccordion.Item>\n\t);\n};\nAccordionItem.displayName = \"AccordionItem\";\n\n// Pass-through exports for composition\nexport const AccordionRoot = ChakraAccordion.Root;\nAccordionRoot.displayName = \"AccordionRoot\";\n\nexport type AccordionRootProps = ChakraAccordion.RootProps;\n","import { Alert as ChakraAlert } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface AlertProps extends Omit<ChakraAlert.RootProps, \"title\"> {\n\tstartElement?: React.ReactNode;\n\tendElement?: React.ReactNode;\n\ttitle?: React.ReactNode;\n\ticon?: React.ReactElement;\n}\n\nexport const Alert = function Alert({\n\tref,\n\t...props\n}: AlertProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { title, children, icon, startElement, endElement, ...rest } = props;\n\treturn (\n\t\t<ChakraAlert.Root ref={ref} {...rest}>\n\t\t\t{startElement || <ChakraAlert.Indicator>{icon}</ChakraAlert.Indicator>}\n\t\t\t{children ? (\n\t\t\t\t<ChakraAlert.Content>\n\t\t\t\t\t<ChakraAlert.Title>{title}</ChakraAlert.Title>\n\t\t\t\t\t<ChakraAlert.Description>{children}</ChakraAlert.Description>\n\t\t\t\t</ChakraAlert.Content>\n\t\t\t) : (\n\t\t\t\t<ChakraAlert.Title flex=\"1\">{title}</ChakraAlert.Title>\n\t\t\t)}\n\t\t\t{endElement}\n\t\t</ChakraAlert.Root>\n\t);\n};\nAlert.displayName = \"Alert\";\n","import { Breadcrumb as ChakraBreadcrumb } from \"@chakra-ui/react\";\n\n// Pass-through exports with stable API\nexport const BreadcrumbRoot = ChakraBreadcrumb.Root;\nBreadcrumbRoot.displayName = \"BreadcrumbRoot\";\n\nexport const BreadcrumbList = ChakraBreadcrumb.List;\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nexport const BreadcrumbItem = ChakraBreadcrumb.Item;\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nexport const BreadcrumbLink = ChakraBreadcrumb.Link;\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nexport const BreadcrumbCurrentLink = ChakraBreadcrumb.CurrentLink;\nBreadcrumbCurrentLink.displayName = \"BreadcrumbCurrentLink\";\n\nexport const BreadcrumbSeparator = ChakraBreadcrumb.Separator;\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nexport const BreadcrumbEllipsis = ChakraBreadcrumb.Ellipsis;\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\n\nexport type BreadcrumbRootProps = ChakraBreadcrumb.RootProps;\nexport type BreadcrumbLinkProps = ChakraBreadcrumb.LinkProps;\n","import type { IconButtonProps, SpanProps } from \"@chakra-ui/react\";\nimport { ClientOnly, IconButton, Skeleton, Span } from \"@chakra-ui/react\";\nimport { Moon, Sun } from \"lucide-react\";\nimport type { ThemeProviderProps } from \"next-themes\";\nimport { ThemeProvider, useTheme } from \"next-themes\";\nimport type * as React from \"react\";\n\nexport interface ColorModeProviderProps extends ThemeProviderProps {}\n\nexport function ColorModeProvider(props: ColorModeProviderProps) {\n\treturn (\n\t\t<ThemeProvider attribute=\"class\" disableTransitionOnChange {...props} />\n\t);\n}\nColorModeProvider.displayName = \"ColorModeProvider\";\n\nexport type ColorMode = \"light\" | \"dark\";\n\nexport interface UseColorModeReturn {\n\tcolorMode: ColorMode;\n\tsetColorMode: (colorMode: ColorMode) => void;\n\ttoggleColorMode: () => void;\n}\n\nexport function useColorMode(): UseColorModeReturn {\n\tconst { resolvedTheme, setTheme, forcedTheme } = useTheme();\n\tconst colorMode = forcedTheme || resolvedTheme;\n\tconst toggleColorMode = () => {\n\t\tsetTheme(resolvedTheme === \"dark\" ? \"light\" : \"dark\");\n\t};\n\treturn {\n\t\tcolorMode: colorMode as ColorMode,\n\t\tsetColorMode: setTheme,\n\t\ttoggleColorMode,\n\t};\n}\n\nexport function useColorModeValue<T>(light: T, dark: T) {\n\tconst { colorMode } = useColorMode();\n\treturn colorMode === \"dark\" ? dark : light;\n}\n\nexport function ColorModeIcon() {\n\tconst { colorMode } = useColorMode();\n\treturn colorMode === \"dark\" ? <Moon /> : <Sun />;\n}\nColorModeIcon.displayName = \"ColorModeIcon\";\n\ninterface ColorModeButtonProps extends Omit<IconButtonProps, \"aria-label\"> {\n\t/** Accessible label for the color mode toggle button. @default \"Toggle color mode\" */\n\tlabel?: string;\n}\n\nexport const ColorModeButton = function ColorModeButton({\n\tref,\n\tlabel = \"Toggle color mode\",\n\t...props\n}: ColorModeButtonProps & { ref?: React.Ref<HTMLButtonElement> }) {\n\tconst { toggleColorMode } = useColorMode();\n\treturn (\n\t\t<ClientOnly fallback={<Skeleton boxSize=\"9\" />}>\n\t\t\t<IconButton\n\t\t\t\tonClick={toggleColorMode}\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\taria-label={label}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t\tcss={{\n\t\t\t\t\t_icon: {\n\t\t\t\t\t\twidth: \"5\",\n\t\t\t\t\t\theight: \"5\",\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<ColorModeIcon />\n\t\t\t</IconButton>\n\t\t</ClientOnly>\n\t);\n};\nColorModeButton.displayName = \"ColorModeButton\";\n\nexport const LightMode = function LightMode({\n\tref,\n\t...props\n}: SpanProps & { ref?: React.Ref<HTMLSpanElement> }) {\n\treturn (\n\t\t<Span\n\t\t\tcolor=\"fg\"\n\t\t\tdisplay=\"contents\"\n\t\t\tclassName=\"chakra-theme light\"\n\t\t\tcolorPalette=\"gray\"\n\t\t\tdata-theme=\"light\"\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nLightMode.displayName = \"LightMode\";\n\nexport const DarkMode = function DarkMode({\n\tref,\n\t...props\n}: SpanProps & { ref?: React.Ref<HTMLSpanElement> }) {\n\treturn (\n\t\t<Span\n\t\t\tcolor=\"fg\"\n\t\t\tdisplay=\"contents\"\n\t\t\tclassName=\"chakra-theme dark\"\n\t\t\tcolorPalette=\"gray\"\n\t\t\tdata-theme=\"dark\"\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDarkMode.displayName = \"DarkMode\";\n","import { HoverCard as ChakraHoverCard, Portal } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface HoverCardProps extends ChakraHoverCard.RootProps {\n\t/** Content displayed in the hover card. */\n\tcontent: React.ReactNode;\n\t/** Whether to show an arrow. @default false */\n\tshowArrow?: boolean;\n\t/** Whether to render in a portal. @default true */\n\tportalled?: boolean;\n\t/** Container ref for portal. */\n\tportalRef?: React.RefObject<HTMLElement | null>;\n\t/** Props passed to the content element. */\n\tcontentProps?: ChakraHoverCard.ContentProps;\n}\n\nexport const HoverCard = function HoverCard(props: HoverCardProps) {\n\tconst {\n\t\tcontent,\n\t\tshowArrow,\n\t\tchildren,\n\t\tportalled = true,\n\t\tportalRef,\n\t\tcontentProps,\n\t\t...rest\n\t} = props;\n\treturn (\n\t\t<ChakraHoverCard.Root {...rest}>\n\t\t\t<ChakraHoverCard.Trigger asChild>{children}</ChakraHoverCard.Trigger>\n\t\t\t<Portal disabled={!portalled} container={portalRef}>\n\t\t\t\t<ChakraHoverCard.Positioner>\n\t\t\t\t\t<ChakraHoverCard.Content {...contentProps}>\n\t\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t\t<ChakraHoverCard.Arrow>\n\t\t\t\t\t\t\t\t<ChakraHoverCard.ArrowTip />\n\t\t\t\t\t\t\t</ChakraHoverCard.Arrow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</ChakraHoverCard.Content>\n\t\t\t\t</ChakraHoverCard.Positioner>\n\t\t\t</Portal>\n\t\t</ChakraHoverCard.Root>\n\t);\n};\nHoverCard.displayName = \"HoverCard\";\n","import { PinInput as ChakraPinInput } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface PinInputProps\n\textends Omit<ChakraPinInput.RootProps, \"children\"> {\n\t/** Number of input fields. @default 4 */\n\tlength?: number;\n}\n\nexport const PinInput = function PinInput({\n\tref,\n\t...props\n}: PinInputProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { length = 4, ...rest } = props;\n\treturn (\n\t\t<ChakraPinInput.Root ref={ref} {...rest}>\n\t\t\t<ChakraPinInput.HiddenInput />\n\t\t\t<ChakraPinInput.Control>\n\t\t\t\t{Array.from({ length }).map((_, i) => (\n\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: index is the stable identity for pin input fields\n\t\t\t\t\t<ChakraPinInput.Input key={i} index={i} />\n\t\t\t\t))}\n\t\t\t</ChakraPinInput.Control>\n\t\t</ChakraPinInput.Root>\n\t);\n};\nPinInput.displayName = \"PinInput\";\n","import type { SystemContext } from \"@chakra-ui/react\";\nimport { ChakraProvider } from \"@chakra-ui/react\";\nimport defaultSystem from \"../theme\";\nimport { ColorModeProvider, type ColorModeProviderProps } from \"./color-mode\";\n\nexport interface ProviderProps extends ColorModeProviderProps {\n\t/** Override the default anker theme system. */\n\tsystem?: SystemContext;\n}\n\nexport function Provider({ system, ...props }: ProviderProps) {\n\treturn (\n\t\t<ChakraProvider value={system ?? defaultSystem}>\n\t\t\t<ColorModeProvider {...props} />\n\t\t</ChakraProvider>\n\t);\n}\nProvider.displayName = \"Provider\";\n","import { SegmentGroup as ChakraSegmentGroup } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface SegmentedControlItem {\n\tvalue: string;\n\tlabel: React.ReactNode;\n\tdisabled?: boolean;\n}\n\nexport interface SegmentedControlProps\n\textends Omit<ChakraSegmentGroup.RootProps, \"children\"> {\n\t/** Items to render as segments. */\n\titems: Array<string | SegmentedControlItem>;\n}\n\nexport const SegmentedControl = function SegmentedControl({\n\tref,\n\t...props\n}: SegmentedControlProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { items, ...rest } = props;\n\treturn (\n\t\t<ChakraSegmentGroup.Root ref={ref} {...rest}>\n\t\t\t<ChakraSegmentGroup.Indicator />\n\t\t\t{items.map((item) => {\n\t\t\t\tconst value = typeof item === \"string\" ? item : item.value;\n\t\t\t\tconst label = typeof item === \"string\" ? item : item.label;\n\t\t\t\tconst disabled = typeof item === \"string\" ? false : item.disabled;\n\t\t\t\treturn (\n\t\t\t\t\t<ChakraSegmentGroup.Item\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChakraSegmentGroup.ItemText>{label}</ChakraSegmentGroup.ItemText>\n\t\t\t\t\t\t<ChakraSegmentGroup.ItemHiddenInput />\n\t\t\t\t\t</ChakraSegmentGroup.Item>\n\t\t\t\t);\n\t\t\t})}\n\t\t</ChakraSegmentGroup.Root>\n\t);\n};\nSegmentedControl.displayName = \"SegmentedControl\";\n","import { Slider as ChakraSlider } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface SliderProps extends ChakraSlider.RootProps {\n\t/** Whether to show the current value label. @default false */\n\tshowValue?: boolean;\n\t/** Label text displayed alongside the slider. */\n\tlabel?: React.ReactNode;\n\t/** Marks to display on the track. */\n\tmarks?: Array<number | { value: number; label: React.ReactNode }>;\n}\n\nexport const Slider = function Slider({\n\tref,\n\t...props\n}: SliderProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { showValue, label, marks, ...rest } = props;\n\treturn (\n\t\t<ChakraSlider.Root ref={ref} {...rest}>\n\t\t\t{(label || showValue) && (\n\t\t\t\t<ChakraSlider.Label>\n\t\t\t\t\t{label}\n\t\t\t\t\t{showValue && <ChakraSlider.ValueText />}\n\t\t\t\t</ChakraSlider.Label>\n\t\t\t)}\n\t\t\t<ChakraSlider.Control>\n\t\t\t\t<ChakraSlider.Track>\n\t\t\t\t\t<ChakraSlider.Range />\n\t\t\t\t</ChakraSlider.Track>\n\t\t\t\t<ChakraSlider.Thumbs />\n\t\t\t</ChakraSlider.Control>\n\t\t\t{marks && <ChakraSlider.Marks marks={marks} />}\n\t\t</ChakraSlider.Root>\n\t);\n};\nSlider.displayName = \"Slider\";\n","import {\n\tPopover as ChakraPopover,\n\tIconButton,\n\ttype IconButtonProps,\n\tPortal,\n} from \"@chakra-ui/react\";\nimport { Info } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport interface ToggleTipProps extends ChakraPopover.RootProps {\n\tshowArrow?: boolean;\n\tportalled?: boolean;\n\tportalRef?: React.RefObject<HTMLElement | null>;\n\tcontent?: React.ReactNode;\n\tcontentProps?: ChakraPopover.ContentProps;\n}\n\nexport const ToggleTip = function ToggleTip({\n\tref,\n\t...props\n}: ToggleTipProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst {\n\t\tshowArrow,\n\t\tchildren,\n\t\tportalled = true,\n\t\tcontent,\n\t\tcontentProps,\n\t\tportalRef,\n\t\t...rest\n\t} = props;\n\n\treturn (\n\t\t<ChakraPopover.Root\n\t\t\t{...rest}\n\t\t\tpositioning={{ ...rest.positioning, gutter: 4 }}\n\t\t>\n\t\t\t<ChakraPopover.Trigger asChild>{children}</ChakraPopover.Trigger>\n\t\t\t<Portal disabled={!portalled} container={portalRef}>\n\t\t\t\t<ChakraPopover.Positioner>\n\t\t\t\t\t<ChakraPopover.Content\n\t\t\t\t\t\twidth=\"auto\"\n\t\t\t\t\t\tpx=\"2\"\n\t\t\t\t\t\tpy=\"1\"\n\t\t\t\t\t\ttextStyle=\"xs\"\n\t\t\t\t\t\trounded=\"sm\"\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t{...contentProps}\n\t\t\t\t\t>\n\t\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t\t<ChakraPopover.Arrow>\n\t\t\t\t\t\t\t\t<ChakraPopover.ArrowTip />\n\t\t\t\t\t\t\t</ChakraPopover.Arrow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</ChakraPopover.Content>\n\t\t\t\t</ChakraPopover.Positioner>\n\t\t\t</Portal>\n\t\t</ChakraPopover.Root>\n\t);\n};\nToggleTip.displayName = \"ToggleTip\";\n\nexport interface InfoTipProps extends Partial<ToggleTipProps> {\n\tbuttonProps?: IconButtonProps | undefined;\n\t/** Accessible label for the info tip button. @default \"info\" */\n\tlabel?: string;\n}\n\nexport const InfoTip = function InfoTip({\n\tref,\n\t...props\n}: InfoTipProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { children, buttonProps, label = \"info\", ...rest } = props;\n\treturn (\n\t\t<ToggleTip content={children} {...rest} ref={ref}>\n\t\t\t<IconButton\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\taria-label={label}\n\t\t\t\tsize=\"2xs\"\n\t\t\t\tcolorPalette=\"gray\"\n\t\t\t\tminWidth=\"44px\"\n\t\t\t\tminHeight=\"44px\"\n\t\t\t\t{...buttonProps}\n\t\t\t>\n\t\t\t\t<Info />\n\t\t\t</IconButton>\n\t\t</ToggleTip>\n\t);\n};\nInfoTip.displayName = \"InfoTip\";\n","import {\n\tBadge,\n\ttype BadgeProps,\n\tStat as ChakraStat,\n\tFormatNumber,\n} from \"@chakra-ui/react\";\nimport type * as React from \"react\";\nimport { InfoTip } from \"./toggle-tip\";\n\nexport interface StatLabelProps extends ChakraStat.LabelProps {\n\tinfo?: React.ReactNode;\n}\n\nexport const StatLabel = function StatLabel({\n\tref,\n\t...props\n}: StatLabelProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { info, children, ...rest } = props;\n\treturn (\n\t\t<ChakraStat.Label {...rest} ref={ref}>\n\t\t\t{children}\n\t\t\t{info && <InfoTip>{info}</InfoTip>}\n\t\t</ChakraStat.Label>\n\t);\n};\nStatLabel.displayName = \"StatLabel\";\n\nexport interface StatValueTextProps extends ChakraStat.ValueTextProps {\n\tvalue?: number;\n\tformatOptions?: Intl.NumberFormatOptions;\n}\n\nexport const StatValueText = function StatValueText({\n\tref,\n\t...props\n}: StatValueTextProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { value, formatOptions, children, ...rest } = props;\n\treturn (\n\t\t<ChakraStat.ValueText {...rest} ref={ref}>\n\t\t\t{children ||\n\t\t\t\t(value != null && <FormatNumber value={value} {...formatOptions} />)}\n\t\t</ChakraStat.ValueText>\n\t);\n};\nStatValueText.displayName = \"StatValueText\";\n\nexport const StatUpTrend = function StatUpTrend({\n\tref,\n\t...props\n}: BadgeProps & { ref?: React.Ref<HTMLDivElement> }) {\n\treturn (\n\t\t<Badge colorPalette=\"green\" gap=\"0\" {...props} ref={ref}>\n\t\t\t<ChakraStat.UpIndicator />\n\t\t\t{props.children}\n\t\t</Badge>\n\t);\n};\nStatUpTrend.displayName = \"StatUpTrend\";\n\nexport const StatDownTrend = function StatDownTrend({\n\tref,\n\t...props\n}: BadgeProps & { ref?: React.Ref<HTMLDivElement> }) {\n\treturn (\n\t\t<Badge colorPalette=\"red\" gap=\"0\" {...props} ref={ref}>\n\t\t\t<ChakraStat.DownIndicator />\n\t\t\t{props.children}\n\t\t</Badge>\n\t);\n};\nStatDownTrend.displayName = \"StatDownTrend\";\n\nexport const StatRoot = ChakraStat.Root;\nStatRoot.displayName = \"StatRoot\";\nexport const StatHelpText = ChakraStat.HelpText;\nStatHelpText.displayName = \"StatHelpText\";\nexport const StatValueUnit = ChakraStat.ValueUnit;\nStatValueUnit.displayName = \"StatValueUnit\";\n","import {\n\tToaster as ChakraToaster,\n\tcreateToaster,\n\tPortal,\n\tSpinner,\n\tStack,\n\tToast,\n} from \"@chakra-ui/react\";\n\nexport interface CreateToasterOptions {\n\tplacement?:\n\t\t| \"top\"\n\t\t| \"top-start\"\n\t\t| \"top-end\"\n\t\t| \"bottom\"\n\t\t| \"bottom-start\"\n\t\t| \"bottom-end\";\n\tpauseOnPageIdle?: boolean;\n}\n\nexport function createAnkerToaster(options: CreateToasterOptions = {}) {\n\tconst { placement = \"bottom-end\", pauseOnPageIdle = true } = options;\n\n\tconst toaster = createToaster({\n\t\tplacement,\n\t\tpauseOnPageIdle,\n\t});\n\n\tconst ToasterComponent = () => {\n\t\treturn (\n\t\t\t<Portal>\n\t\t\t\t<ChakraToaster toaster={toaster} insetInline={{ mdDown: \"4\" }}>\n\t\t\t\t\t{(toast) => (\n\t\t\t\t\t\t<Toast.Root width={{ md: \"sm\" }}>\n\t\t\t\t\t\t\t{toast.type === \"loading\" ? (\n\t\t\t\t\t\t\t\t<Spinner size=\"sm\" color=\"accent\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Toast.Indicator />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Stack gap=\"1\" flex=\"1\" maxWidth=\"100%\">\n\t\t\t\t\t\t\t\t{toast.title && <Toast.Title>{toast.title}</Toast.Title>}\n\t\t\t\t\t\t\t\t{toast.description && (\n\t\t\t\t\t\t\t\t\t<Toast.Description>{toast.description}</Toast.Description>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t{toast.action && (\n\t\t\t\t\t\t\t\t<Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{toast.closable && <Toast.CloseTrigger />}\n\t\t\t\t\t\t</Toast.Root>\n\t\t\t\t\t)}\n\t\t\t\t</ChakraToaster>\n\t\t\t</Portal>\n\t\t);\n\t};\n\n\treturn { toaster, Toaster: ToasterComponent };\n}\n\n// Default instance for convenience\nconst { toaster, Toaster } = createAnkerToaster();\n\n(Toaster as { displayName?: string }).displayName = \"Toaster\";\n\nexport { toaster, Toaster };\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/primitives/accordion.tsx","../../src/primitives/alert.tsx","../../src/primitives/breadcrumb.tsx","../../src/primitives/color-mode.tsx","../../src/primitives/hover-card.tsx","../../src/primitives/pin-input.tsx","../../src/primitives/provider.tsx","../../src/primitives/segmented-control.tsx","../../src/primitives/slider.tsx","../../src/primitives/toggle-tip.tsx","../../src/primitives/stat.tsx","../../src/primitives/toaster.tsx"],"names":["AccordionItem","ChakraAccordion","Alert","jsxs","ChakraAlert","jsx","ChakraBreadcrumb","ColorModeButton","Skeleton","LightMode","DarkMode","HoverCard","ChakraHoverCard","PinInput","ChakraPinInput","SegmentedControl","ChakraSegmentGroup","Slider","ChakraSlider","ToggleTip","ChakraPopover","Portal","InfoTip","IconButton","StatLabel","ChakraStat","StatValueText","StatUpTrend","Badge","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EAAiB;AAC7C;AAGA,IAAM,EAAE,OAAA,EAAS,OAAA,EAAQ,GAAI,kBAAA;AAE5B,OAAA,CAAqC,WAAA,GAAc,SAAA","file":"index.js","sourcesContent":["import { Accordion as ChakraAccordion } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface AccordionItemProps extends ChakraAccordion.ItemProps {\n\t/** The trigger label shown in the accordion header. */\n\tlabel: React.ReactNode;\n\t/** Content revealed when the item is expanded. */\n\tchildren: React.ReactNode;\n}\n\nexport const AccordionItem = function AccordionItem({\n\tref,\n\t...props\n}: AccordionItemProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { label, children, ...rest } = props;\n\treturn (\n\t\t<ChakraAccordion.Item ref={ref} {...rest}>\n\t\t\t<ChakraAccordion.ItemTrigger>\n\t\t\t\t{label}\n\t\t\t\t<ChakraAccordion.ItemIndicator />\n\t\t\t</ChakraAccordion.ItemTrigger>\n\t\t\t<ChakraAccordion.ItemContent>\n\t\t\t\t<ChakraAccordion.ItemBody>{children}</ChakraAccordion.ItemBody>\n\t\t\t</ChakraAccordion.ItemContent>\n\t\t</ChakraAccordion.Item>\n\t);\n};\nAccordionItem.displayName = \"AccordionItem\";\n\n// Pass-through exports for composition\nexport const AccordionRoot = ChakraAccordion.Root;\nAccordionRoot.displayName = \"AccordionRoot\";\n\nexport type AccordionRootProps = ChakraAccordion.RootProps;\n","import { Alert as ChakraAlert } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface AlertProps extends Omit<ChakraAlert.RootProps, \"title\"> {\n\tstartElement?: React.ReactNode;\n\tendElement?: React.ReactNode;\n\ttitle?: React.ReactNode;\n\ticon?: React.ReactElement;\n}\n\nexport const Alert = function Alert({\n\tref,\n\t...props\n}: AlertProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { title, children, icon, startElement, endElement, ...rest } = props;\n\treturn (\n\t\t<ChakraAlert.Root ref={ref} {...rest}>\n\t\t\t{startElement || <ChakraAlert.Indicator>{icon}</ChakraAlert.Indicator>}\n\t\t\t{children ? (\n\t\t\t\t<ChakraAlert.Content>\n\t\t\t\t\t<ChakraAlert.Title>{title}</ChakraAlert.Title>\n\t\t\t\t\t<ChakraAlert.Description>{children}</ChakraAlert.Description>\n\t\t\t\t</ChakraAlert.Content>\n\t\t\t) : (\n\t\t\t\t<ChakraAlert.Title flex=\"1\">{title}</ChakraAlert.Title>\n\t\t\t)}\n\t\t\t{endElement}\n\t\t</ChakraAlert.Root>\n\t);\n};\nAlert.displayName = \"Alert\";\n","import { Breadcrumb as ChakraBreadcrumb } from \"@chakra-ui/react\";\n\n// Pass-through exports with stable API\nexport const BreadcrumbRoot = ChakraBreadcrumb.Root;\nBreadcrumbRoot.displayName = \"BreadcrumbRoot\";\n\nexport const BreadcrumbList = ChakraBreadcrumb.List;\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nexport const BreadcrumbItem = ChakraBreadcrumb.Item;\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nexport const BreadcrumbLink = ChakraBreadcrumb.Link;\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nexport const BreadcrumbCurrentLink = ChakraBreadcrumb.CurrentLink;\nBreadcrumbCurrentLink.displayName = \"BreadcrumbCurrentLink\";\n\nexport const BreadcrumbSeparator = ChakraBreadcrumb.Separator;\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nexport const BreadcrumbEllipsis = ChakraBreadcrumb.Ellipsis;\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\n\nexport type BreadcrumbRootProps = ChakraBreadcrumb.RootProps;\nexport type BreadcrumbLinkProps = ChakraBreadcrumb.LinkProps;\n","import type { IconButtonProps, SpanProps } from \"@chakra-ui/react\";\nimport { ClientOnly, IconButton, Skeleton, Span } from \"@chakra-ui/react\";\nimport { Moon, Sun } from \"lucide-react\";\nimport type { ThemeProviderProps } from \"next-themes\";\nimport { ThemeProvider, useTheme } from \"next-themes\";\nimport type * as React from \"react\";\n\nexport interface ColorModeProviderProps extends ThemeProviderProps {}\n\nexport function ColorModeProvider(props: ColorModeProviderProps) {\n\treturn (\n\t\t<ThemeProvider attribute=\"class\" disableTransitionOnChange {...props} />\n\t);\n}\nColorModeProvider.displayName = \"ColorModeProvider\";\n\nexport type ColorMode = \"light\" | \"dark\";\n\nexport interface UseColorModeReturn {\n\tcolorMode: ColorMode;\n\tsetColorMode: (colorMode: ColorMode) => void;\n\ttoggleColorMode: () => void;\n}\n\nexport function useColorMode(): UseColorModeReturn {\n\tconst { resolvedTheme, setTheme, forcedTheme } = useTheme();\n\tconst colorMode = forcedTheme || resolvedTheme;\n\tconst toggleColorMode = () => {\n\t\tsetTheme(resolvedTheme === \"dark\" ? \"light\" : \"dark\");\n\t};\n\treturn {\n\t\tcolorMode: colorMode as ColorMode,\n\t\tsetColorMode: setTheme,\n\t\ttoggleColorMode,\n\t};\n}\n\nexport function useColorModeValue<T>(light: T, dark: T) {\n\tconst { colorMode } = useColorMode();\n\treturn colorMode === \"dark\" ? dark : light;\n}\n\nexport function ColorModeIcon() {\n\tconst { colorMode } = useColorMode();\n\treturn colorMode === \"dark\" ? <Moon /> : <Sun />;\n}\nColorModeIcon.displayName = \"ColorModeIcon\";\n\ninterface ColorModeButtonProps extends Omit<IconButtonProps, \"aria-label\"> {\n\t/** Accessible label for the color mode toggle button. @default \"Toggle color mode\" */\n\tlabel?: string;\n}\n\nexport const ColorModeButton = function ColorModeButton({\n\tref,\n\tlabel = \"Toggle color mode\",\n\t...props\n}: ColorModeButtonProps & { ref?: React.Ref<HTMLButtonElement> }) {\n\tconst { toggleColorMode } = useColorMode();\n\treturn (\n\t\t<ClientOnly fallback={<Skeleton boxSize=\"9\" />}>\n\t\t\t<IconButton\n\t\t\t\tonClick={toggleColorMode}\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\taria-label={label}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t\tcss={{\n\t\t\t\t\t_icon: {\n\t\t\t\t\t\twidth: \"5\",\n\t\t\t\t\t\theight: \"5\",\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<ColorModeIcon />\n\t\t\t</IconButton>\n\t\t</ClientOnly>\n\t);\n};\nColorModeButton.displayName = \"ColorModeButton\";\n\nexport const LightMode = function LightMode({\n\tref,\n\t...props\n}: SpanProps & { ref?: React.Ref<HTMLSpanElement> }) {\n\treturn (\n\t\t<Span\n\t\t\tcolor=\"fg\"\n\t\t\tdisplay=\"contents\"\n\t\t\tclassName=\"chakra-theme light\"\n\t\t\tcolorPalette=\"gray\"\n\t\t\tdata-theme=\"light\"\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nLightMode.displayName = \"LightMode\";\n\nexport const DarkMode = function DarkMode({\n\tref,\n\t...props\n}: SpanProps & { ref?: React.Ref<HTMLSpanElement> }) {\n\treturn (\n\t\t<Span\n\t\t\tcolor=\"fg\"\n\t\t\tdisplay=\"contents\"\n\t\t\tclassName=\"chakra-theme dark\"\n\t\t\tcolorPalette=\"gray\"\n\t\t\tdata-theme=\"dark\"\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDarkMode.displayName = \"DarkMode\";\n","import { HoverCard as ChakraHoverCard, Portal } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface HoverCardProps extends ChakraHoverCard.RootProps {\n\t/** Content displayed in the hover card. */\n\tcontent: React.ReactNode;\n\t/** Whether to show an arrow. @default false */\n\tshowArrow?: boolean;\n\t/** Whether to render in a portal. @default true */\n\tportalled?: boolean;\n\t/** Container ref for portal. */\n\tportalRef?: React.RefObject<HTMLElement | null>;\n\t/** Props passed to the content element. */\n\tcontentProps?: ChakraHoverCard.ContentProps;\n}\n\nexport const HoverCard = function HoverCard(props: HoverCardProps) {\n\tconst {\n\t\tcontent,\n\t\tshowArrow,\n\t\tchildren,\n\t\tportalled = true,\n\t\tportalRef,\n\t\tcontentProps,\n\t\t...rest\n\t} = props;\n\treturn (\n\t\t<ChakraHoverCard.Root {...rest}>\n\t\t\t<ChakraHoverCard.Trigger asChild>{children}</ChakraHoverCard.Trigger>\n\t\t\t<Portal disabled={!portalled} container={portalRef}>\n\t\t\t\t<ChakraHoverCard.Positioner>\n\t\t\t\t\t<ChakraHoverCard.Content {...contentProps}>\n\t\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t\t<ChakraHoverCard.Arrow>\n\t\t\t\t\t\t\t\t<ChakraHoverCard.ArrowTip />\n\t\t\t\t\t\t\t</ChakraHoverCard.Arrow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</ChakraHoverCard.Content>\n\t\t\t\t</ChakraHoverCard.Positioner>\n\t\t\t</Portal>\n\t\t</ChakraHoverCard.Root>\n\t);\n};\nHoverCard.displayName = \"HoverCard\";\n","import { PinInput as ChakraPinInput } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface PinInputProps\n\textends Omit<ChakraPinInput.RootProps, \"children\"> {\n\t/** Number of input fields. @default 4 */\n\tlength?: number;\n}\n\nexport const PinInput = function PinInput({\n\tref,\n\t...props\n}: PinInputProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { length = 4, ...rest } = props;\n\treturn (\n\t\t<ChakraPinInput.Root ref={ref} {...rest}>\n\t\t\t<ChakraPinInput.HiddenInput />\n\t\t\t<ChakraPinInput.Control>\n\t\t\t\t{Array.from({ length }).map((_, i) => (\n\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: index is the stable identity for pin input fields\n\t\t\t\t\t<ChakraPinInput.Input key={i} index={i} />\n\t\t\t\t))}\n\t\t\t</ChakraPinInput.Control>\n\t\t</ChakraPinInput.Root>\n\t);\n};\nPinInput.displayName = \"PinInput\";\n","import type { SystemContext } from \"@chakra-ui/react\";\nimport { ChakraProvider } from \"@chakra-ui/react\";\nimport defaultSystem from \"../theme\";\nimport { ColorModeProvider, type ColorModeProviderProps } from \"./color-mode\";\n\nexport interface ProviderProps extends ColorModeProviderProps {\n\t/** Override the default anker theme system. */\n\tsystem?: SystemContext;\n}\n\nexport function Provider({ system, ...props }: ProviderProps) {\n\treturn (\n\t\t<ChakraProvider value={system ?? defaultSystem}>\n\t\t\t<ColorModeProvider {...props} />\n\t\t</ChakraProvider>\n\t);\n}\nProvider.displayName = \"Provider\";\n","import { SegmentGroup as ChakraSegmentGroup } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface SegmentedControlItem {\n\tvalue: string;\n\tlabel: React.ReactNode;\n\tdisabled?: boolean;\n}\n\nexport interface SegmentedControlProps\n\textends Omit<ChakraSegmentGroup.RootProps, \"children\"> {\n\t/** Items to render as segments. */\n\titems: Array<string | SegmentedControlItem>;\n}\n\nexport const SegmentedControl = function SegmentedControl({\n\tref,\n\t...props\n}: SegmentedControlProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { items, ...rest } = props;\n\treturn (\n\t\t<ChakraSegmentGroup.Root ref={ref} {...rest}>\n\t\t\t<ChakraSegmentGroup.Indicator />\n\t\t\t{items.map((item) => {\n\t\t\t\tconst value = typeof item === \"string\" ? item : item.value;\n\t\t\t\tconst label = typeof item === \"string\" ? item : item.label;\n\t\t\t\tconst disabled = typeof item === \"string\" ? false : item.disabled;\n\t\t\t\treturn (\n\t\t\t\t\t<ChakraSegmentGroup.Item\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChakraSegmentGroup.ItemText>{label}</ChakraSegmentGroup.ItemText>\n\t\t\t\t\t\t<ChakraSegmentGroup.ItemHiddenInput />\n\t\t\t\t\t</ChakraSegmentGroup.Item>\n\t\t\t\t);\n\t\t\t})}\n\t\t</ChakraSegmentGroup.Root>\n\t);\n};\nSegmentedControl.displayName = \"SegmentedControl\";\n","import { Slider as ChakraSlider } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface SliderProps extends ChakraSlider.RootProps {\n\t/** Whether to show the current value label. @default false */\n\tshowValue?: boolean;\n\t/** Label text displayed alongside the slider. */\n\tlabel?: React.ReactNode;\n\t/** Marks to display on the track. */\n\tmarks?: Array<number | { value: number; label: React.ReactNode }>;\n}\n\nexport const Slider = function Slider({\n\tref,\n\t...props\n}: SliderProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { showValue, label, marks, ...rest } = props;\n\treturn (\n\t\t<ChakraSlider.Root ref={ref} {...rest}>\n\t\t\t{(label || showValue) && (\n\t\t\t\t<ChakraSlider.Label>\n\t\t\t\t\t{label}\n\t\t\t\t\t{showValue && <ChakraSlider.ValueText />}\n\t\t\t\t</ChakraSlider.Label>\n\t\t\t)}\n\t\t\t<ChakraSlider.Control>\n\t\t\t\t<ChakraSlider.Track>\n\t\t\t\t\t<ChakraSlider.Range />\n\t\t\t\t</ChakraSlider.Track>\n\t\t\t\t<ChakraSlider.Thumbs />\n\t\t\t</ChakraSlider.Control>\n\t\t\t{marks && <ChakraSlider.Marks marks={marks} />}\n\t\t</ChakraSlider.Root>\n\t);\n};\nSlider.displayName = \"Slider\";\n","import {\n\tPopover as ChakraPopover,\n\tIconButton,\n\ttype IconButtonProps,\n\tPortal,\n} from \"@chakra-ui/react\";\nimport { Info } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport interface ToggleTipProps extends ChakraPopover.RootProps {\n\tshowArrow?: boolean;\n\tportalled?: boolean;\n\tportalRef?: React.RefObject<HTMLElement | null>;\n\tcontent?: React.ReactNode;\n\tcontentProps?: ChakraPopover.ContentProps;\n}\n\nexport const ToggleTip = function ToggleTip({\n\tref,\n\t...props\n}: ToggleTipProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst {\n\t\tshowArrow,\n\t\tchildren,\n\t\tportalled = true,\n\t\tcontent,\n\t\tcontentProps,\n\t\tportalRef,\n\t\t...rest\n\t} = props;\n\n\treturn (\n\t\t<ChakraPopover.Root\n\t\t\t{...rest}\n\t\t\tpositioning={{ ...rest.positioning, gutter: 4 }}\n\t\t>\n\t\t\t<ChakraPopover.Trigger asChild>{children}</ChakraPopover.Trigger>\n\t\t\t<Portal disabled={!portalled} container={portalRef}>\n\t\t\t\t<ChakraPopover.Positioner>\n\t\t\t\t\t<ChakraPopover.Content\n\t\t\t\t\t\twidth=\"auto\"\n\t\t\t\t\t\tpx=\"2\"\n\t\t\t\t\t\tpy=\"1\"\n\t\t\t\t\t\ttextStyle=\"xs\"\n\t\t\t\t\t\trounded=\"sm\"\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t{...contentProps}\n\t\t\t\t\t>\n\t\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t\t<ChakraPopover.Arrow>\n\t\t\t\t\t\t\t\t<ChakraPopover.ArrowTip />\n\t\t\t\t\t\t\t</ChakraPopover.Arrow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</ChakraPopover.Content>\n\t\t\t\t</ChakraPopover.Positioner>\n\t\t\t</Portal>\n\t\t</ChakraPopover.Root>\n\t);\n};\nToggleTip.displayName = \"ToggleTip\";\n\nexport interface InfoTipProps extends Partial<ToggleTipProps> {\n\tbuttonProps?: IconButtonProps | undefined;\n\t/** Accessible label for the info tip button. @default \"info\" */\n\tlabel?: string;\n}\n\nexport const InfoTip = function InfoTip({\n\tref,\n\t...props\n}: InfoTipProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { children, buttonProps, label = \"info\", ...rest } = props;\n\treturn (\n\t\t<ToggleTip content={children} {...rest} ref={ref}>\n\t\t\t<IconButton\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\taria-label={label}\n\t\t\t\tsize=\"2xs\"\n\t\t\t\tcolorPalette=\"gray\"\n\t\t\t\tminWidth=\"44px\"\n\t\t\t\tminHeight=\"44px\"\n\t\t\t\t{...buttonProps}\n\t\t\t>\n\t\t\t\t<Info />\n\t\t\t</IconButton>\n\t\t</ToggleTip>\n\t);\n};\nInfoTip.displayName = \"InfoTip\";\n","import {\n\tBadge,\n\ttype BadgeProps,\n\tStat as ChakraStat,\n\tFormatNumber,\n} from \"@chakra-ui/react\";\nimport type * as React from \"react\";\nimport { InfoTip } from \"./toggle-tip\";\n\nexport interface StatLabelProps extends ChakraStat.LabelProps {\n\tinfo?: React.ReactNode;\n}\n\nexport const StatLabel = function StatLabel({\n\tref,\n\t...props\n}: StatLabelProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { info, children, ...rest } = props;\n\treturn (\n\t\t<ChakraStat.Label {...rest} ref={ref}>\n\t\t\t{children}\n\t\t\t{info && <InfoTip>{info}</InfoTip>}\n\t\t</ChakraStat.Label>\n\t);\n};\nStatLabel.displayName = \"StatLabel\";\n\nexport interface StatValueTextProps extends ChakraStat.ValueTextProps {\n\tvalue?: number;\n\tformatOptions?: Intl.NumberFormatOptions;\n}\n\nexport const StatValueText = function StatValueText({\n\tref,\n\t...props\n}: StatValueTextProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { value, formatOptions, children, ...rest } = props;\n\treturn (\n\t\t<ChakraStat.ValueText {...rest} ref={ref}>\n\t\t\t{children ||\n\t\t\t\t(value != null && <FormatNumber value={value} {...formatOptions} />)}\n\t\t</ChakraStat.ValueText>\n\t);\n};\nStatValueText.displayName = \"StatValueText\";\n\nexport const StatUpTrend = function StatUpTrend({\n\tref,\n\t...props\n}: BadgeProps & { ref?: React.Ref<HTMLDivElement> }) {\n\treturn (\n\t\t<Badge colorPalette=\"green\" gap=\"0\" {...props} ref={ref}>\n\t\t\t<ChakraStat.UpIndicator />\n\t\t\t{props.children}\n\t\t</Badge>\n\t);\n};\nStatUpTrend.displayName = \"StatUpTrend\";\n\nexport const StatDownTrend = function StatDownTrend({\n\tref,\n\t...props\n}: BadgeProps & { ref?: React.Ref<HTMLDivElement> }) {\n\treturn (\n\t\t<Badge colorPalette=\"red\" gap=\"0\" {...props} ref={ref}>\n\t\t\t<ChakraStat.DownIndicator />\n\t\t\t{props.children}\n\t\t</Badge>\n\t);\n};\nStatDownTrend.displayName = \"StatDownTrend\";\n\nexport const StatRoot = ChakraStat.Root;\nStatRoot.displayName = \"StatRoot\";\nexport const StatHelpText = ChakraStat.HelpText;\nStatHelpText.displayName = \"StatHelpText\";\nexport const StatValueUnit = ChakraStat.ValueUnit;\nStatValueUnit.displayName = \"StatValueUnit\";\n","import {\n\tToaster as ChakraToaster,\n\tcreateToaster,\n\tPortal,\n\tSpinner,\n\tStack,\n\tToast,\n} from \"@chakra-ui/react\";\n\nexport interface CreateToasterOptions {\n\tplacement?:\n\t\t| \"top\"\n\t\t| \"top-start\"\n\t\t| \"top-end\"\n\t\t| \"bottom\"\n\t\t| \"bottom-start\"\n\t\t| \"bottom-end\";\n\tpauseOnPageIdle?: boolean;\n}\n\nexport function createAnkerToaster(options: CreateToasterOptions = {}) {\n\tconst { placement = \"bottom-end\", pauseOnPageIdle = true } = options;\n\n\tconst toaster = createToaster({\n\t\tplacement,\n\t\tpauseOnPageIdle,\n\t});\n\n\tconst ToasterComponent = () => {\n\t\treturn (\n\t\t\t<Portal>\n\t\t\t\t<ChakraToaster toaster={toaster} insetInline={{ mdDown: \"4\" }}>\n\t\t\t\t\t{(toast) => (\n\t\t\t\t\t\t<Toast.Root width={{ md: \"sm\" }}>\n\t\t\t\t\t\t\t{toast.type === \"loading\" ? (\n\t\t\t\t\t\t\t\t<Spinner size=\"sm\" color=\"accent\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Toast.Indicator />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Stack gap=\"1\" flex=\"1\" maxWidth=\"100%\">\n\t\t\t\t\t\t\t\t{toast.title && <Toast.Title>{toast.title}</Toast.Title>}\n\t\t\t\t\t\t\t\t{toast.description && (\n\t\t\t\t\t\t\t\t\t<Toast.Description>{toast.description}</Toast.Description>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t{toast.action && (\n\t\t\t\t\t\t\t\t<Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{toast.closable && <Toast.CloseTrigger />}\n\t\t\t\t\t\t</Toast.Root>\n\t\t\t\t\t)}\n\t\t\t\t</ChakraToaster>\n\t\t\t</Portal>\n\t\t);\n\t};\n\n\treturn { toaster, Toaster: ToasterComponent };\n}\n\n// Default instance for convenience\nconst { toaster, Toaster } = createAnkerToaster();\n\n(Toaster as { displayName?: string }).displayName = \"Toaster\";\n\nexport { toaster, Toaster };\n"]}
|
|
@@ -103,23 +103,49 @@ declare namespace DashboardPageTemplate {
|
|
|
103
103
|
var displayName: string;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
interface BodyTabsItem {
|
|
107
|
+
value: string;
|
|
108
|
+
label: ReactNode;
|
|
109
|
+
content: ReactNode;
|
|
110
|
+
}
|
|
111
|
+
type BodyTabsProp = {
|
|
112
|
+
items: BodyTabsItem[];
|
|
113
|
+
defaultValue: string;
|
|
114
|
+
value?: never;
|
|
115
|
+
onValueChange?: never;
|
|
116
|
+
} | {
|
|
117
|
+
items: BodyTabsItem[];
|
|
118
|
+
value: string;
|
|
119
|
+
onValueChange: (next: string) => void;
|
|
120
|
+
defaultValue?: never;
|
|
121
|
+
};
|
|
106
122
|
interface DetailPageTemplateProps extends Pick<PageHeaderProps, "breadcrumbs" | "title" | "subtitle" | "eyebrow"> {
|
|
107
123
|
actions?: ReactNode;
|
|
108
124
|
/**
|
|
109
|
-
* Tab strip rendered immediately under the PageHeader
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
125
|
+
* Tab strip rendered immediately under the PageHeader / subheader.
|
|
126
|
+
* Use this for nav-mode/filter-mode tabs (Tabs.List, no Tabs.Content);
|
|
127
|
+
* the body comes from `children`. For owned-panel tabs, use `bodyTabs`
|
|
128
|
+
* instead. Mutually exclusive with `bodyTabs`.
|
|
113
129
|
*/
|
|
114
130
|
tabs?: ReactNode;
|
|
115
131
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* `children`
|
|
132
|
+
* Owned-panel tabs. Template renders Tabs.Root with `lazyMount
|
|
133
|
+
* unmountOnExit`; only the active item's `content` mounts. Mutually
|
|
134
|
+
* exclusive with `tabs` and `children` is ignored when this is set.
|
|
119
135
|
*/
|
|
120
|
-
|
|
136
|
+
bodyTabs?: BodyTabsProp;
|
|
137
|
+
/**
|
|
138
|
+
* ReactNode rendered between the PageHeader and the tabs (or the body
|
|
139
|
+
* if no tabs). Use for identity-card-style summaries.
|
|
140
|
+
*/
|
|
141
|
+
subheader?: ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Page body — rendered when `bodyTabs` is not set. Flush against the
|
|
144
|
+
* canvas; add internal padding inside `children` if you need it.
|
|
145
|
+
*/
|
|
146
|
+
children?: ReactNode;
|
|
121
147
|
}
|
|
122
|
-
declare function DetailPageTemplate({ breadcrumbs, title, subtitle, eyebrow, actions, tabs, children, }: DetailPageTemplateProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
declare function DetailPageTemplate({ breadcrumbs, title, subtitle, eyebrow, actions, tabs, bodyTabs, subheader, children, }: DetailPageTemplateProps): react_jsx_runtime.JSX.Element;
|
|
123
149
|
declare namespace DetailPageTemplate {
|
|
124
150
|
var displayName: string;
|
|
125
151
|
}
|
|
@@ -269,22 +295,32 @@ declare namespace MarketingPageTemplate {
|
|
|
269
295
|
interface SettingsPageTemplateProps extends Pick<PageHeaderProps, "breadcrumbs" | "title" | "subtitle" | "eyebrow"> {
|
|
270
296
|
actions?: ReactNode;
|
|
271
297
|
/**
|
|
272
|
-
* Tab strip.
|
|
273
|
-
*
|
|
298
|
+
* Tab strip (consumer-owned). Mutually exclusive with `bodyTabs`.
|
|
299
|
+
* Settings pages should always have at least two tabs — if you only
|
|
300
|
+
* have one section, use DetailPageTemplate instead.
|
|
274
301
|
*/
|
|
275
|
-
tabs
|
|
276
|
-
/** Page body — typically Card-wrapped forms or DataLists. */
|
|
277
|
-
children: ReactNode;
|
|
302
|
+
tabs?: ReactNode;
|
|
278
303
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
|
|
304
|
+
* Owned-panel tabs. Template renders Tabs.Root with `lazyMount
|
|
305
|
+
* unmountOnExit`; only the active item's `content` mounts. Mutually
|
|
306
|
+
* exclusive with `tabs`.
|
|
307
|
+
*/
|
|
308
|
+
bodyTabs?: BodyTabsProp;
|
|
309
|
+
/** Page body when `bodyTabs` is not set. */
|
|
310
|
+
children?: ReactNode;
|
|
311
|
+
/**
|
|
312
|
+
* Constrain the body width for readability. @default "3xl" (= 768px).
|
|
283
313
|
* Pass `"full"` to disable the constraint entirely.
|
|
284
314
|
*/
|
|
285
315
|
maxBodyWidth?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Padding applied to the body between the tab strip and the page
|
|
318
|
+
* content. @default "default" (`px="8" pt="6"`). Pass `"none"` to
|
|
319
|
+
* render flush.
|
|
320
|
+
*/
|
|
321
|
+
bodyPadding?: "default" | "none";
|
|
286
322
|
}
|
|
287
|
-
declare function SettingsPageTemplate({ breadcrumbs, title, subtitle, eyebrow, actions, tabs, children, maxBodyWidth, }: SettingsPageTemplateProps): react_jsx_runtime.JSX.Element;
|
|
323
|
+
declare function SettingsPageTemplate({ breadcrumbs, title, subtitle, eyebrow, actions, tabs, bodyTabs, children, maxBodyWidth, bodyPadding, }: SettingsPageTemplateProps): react_jsx_runtime.JSX.Element;
|
|
288
324
|
declare namespace SettingsPageTemplate {
|
|
289
325
|
var displayName: string;
|
|
290
326
|
}
|
package/dist/templates/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Tabs } from '../chunk-ZLQ3RBAF.js';
|
|
1
2
|
import { AuthCard, PageHeader } from '../chunk-D5ICTOCW.js';
|
|
2
3
|
import { Spinner } from '../chunk-5YDCDC4B.js';
|
|
3
4
|
import { Grid, Box, Flex, Text, Heading } from '../chunk-G4QMIXLC.js';
|
|
@@ -129,7 +130,7 @@ function AppShellInner({ sidebar, rail, children }) {
|
|
|
129
130
|
direction: "column",
|
|
130
131
|
minW: "0",
|
|
131
132
|
minH: "100vh",
|
|
132
|
-
bg: "bg-
|
|
133
|
+
bg: "bg-canvas",
|
|
133
134
|
borderLeftWidth: "1px",
|
|
134
135
|
borderColor: "border",
|
|
135
136
|
children
|
|
@@ -211,10 +212,49 @@ function DetailPageTemplate({
|
|
|
211
212
|
eyebrow,
|
|
212
213
|
actions,
|
|
213
214
|
tabs,
|
|
215
|
+
bodyTabs,
|
|
216
|
+
subheader,
|
|
214
217
|
children
|
|
215
218
|
}) {
|
|
219
|
+
if (tabs && bodyTabs) {
|
|
220
|
+
throw new Error(
|
|
221
|
+
"DetailPageTemplate: `tabs` and `bodyTabs` are mutually exclusive \u2014 use `bodyTabs` for owned panels, `tabs` for nav/filter strips."
|
|
222
|
+
);
|
|
223
|
+
}
|
|
216
224
|
const registered = useRegisteredPageActions();
|
|
217
225
|
const resolvedActions = actions ?? registered;
|
|
226
|
+
if (bodyTabs) {
|
|
227
|
+
const tabsRootProps = bodyTabs.value !== void 0 ? {
|
|
228
|
+
value: bodyTabs.value,
|
|
229
|
+
onValueChange: (d) => bodyTabs.onValueChange(d.value)
|
|
230
|
+
} : { defaultValue: bodyTabs.defaultValue };
|
|
231
|
+
return /* @__PURE__ */ jsxs(
|
|
232
|
+
Flex,
|
|
233
|
+
{
|
|
234
|
+
"data-testid": "detail-page-template",
|
|
235
|
+
direction: "column",
|
|
236
|
+
flex: "1",
|
|
237
|
+
minH: "0",
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ jsx(
|
|
240
|
+
PageHeader,
|
|
241
|
+
{
|
|
242
|
+
breadcrumbs,
|
|
243
|
+
title,
|
|
244
|
+
subtitle,
|
|
245
|
+
eyebrow,
|
|
246
|
+
actions: resolvedActions
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
subheader ? /* @__PURE__ */ jsx(Box, { children: subheader }) : null,
|
|
250
|
+
/* @__PURE__ */ jsxs(Tabs.Root, { lazyMount: true, unmountOnExit: true, ...tabsRootProps, children: [
|
|
251
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Tabs.List, { children: bodyTabs.items.map((item) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: item.value, children: item.label }, item.value)) }) }),
|
|
252
|
+
/* @__PURE__ */ jsx(Box, { flex: "1", minH: "0", children: bodyTabs.items.map((item) => /* @__PURE__ */ jsx(Tabs.Content, { value: item.value, children: item.content }, item.value)) })
|
|
253
|
+
] })
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
218
258
|
return /* @__PURE__ */ jsxs(
|
|
219
259
|
Flex,
|
|
220
260
|
{
|
|
@@ -233,6 +273,7 @@ function DetailPageTemplate({
|
|
|
233
273
|
actions: resolvedActions
|
|
234
274
|
}
|
|
235
275
|
),
|
|
276
|
+
subheader ? /* @__PURE__ */ jsx(Box, { children: subheader }) : null,
|
|
236
277
|
tabs ? /* @__PURE__ */ jsx(Box, { children: tabs }) : null,
|
|
237
278
|
/* @__PURE__ */ jsx(Box, { flex: "1", minH: "0", children })
|
|
238
279
|
]
|
|
@@ -527,11 +568,61 @@ function SettingsPageTemplate({
|
|
|
527
568
|
eyebrow,
|
|
528
569
|
actions,
|
|
529
570
|
tabs,
|
|
571
|
+
bodyTabs,
|
|
530
572
|
children,
|
|
531
|
-
maxBodyWidth = "3xl"
|
|
573
|
+
maxBodyWidth = "3xl",
|
|
574
|
+
bodyPadding = "default"
|
|
532
575
|
}) {
|
|
576
|
+
if (tabs && bodyTabs) {
|
|
577
|
+
throw new Error(
|
|
578
|
+
"SettingsPageTemplate: `tabs` and `bodyTabs` are mutually exclusive \u2014 use `bodyTabs` for owned panels, `tabs` for consumer-owned tab strips."
|
|
579
|
+
);
|
|
580
|
+
}
|
|
533
581
|
const registered = useRegisteredPageActions();
|
|
534
582
|
const resolvedActions = actions ?? registered;
|
|
583
|
+
const bodyPx = bodyPadding === "none" ? "0" : "8";
|
|
584
|
+
const bodyPt = bodyPadding === "none" ? "0" : "6";
|
|
585
|
+
const renderBody = (node) => /* @__PURE__ */ jsx(Box, { flex: "1", minH: "0", px: bodyPx, pt: bodyPt, children: /* @__PURE__ */ jsx(
|
|
586
|
+
Box,
|
|
587
|
+
{
|
|
588
|
+
maxW: maxBodyWidth,
|
|
589
|
+
marginInline: maxBodyWidth === "full" ? "0" : "auto",
|
|
590
|
+
children: node
|
|
591
|
+
}
|
|
592
|
+
) });
|
|
593
|
+
if (bodyTabs) {
|
|
594
|
+
const tabsRootProps = bodyTabs.value !== void 0 ? {
|
|
595
|
+
value: bodyTabs.value,
|
|
596
|
+
onValueChange: (d) => bodyTabs.onValueChange(d.value)
|
|
597
|
+
} : { defaultValue: bodyTabs.defaultValue };
|
|
598
|
+
return /* @__PURE__ */ jsxs(
|
|
599
|
+
Flex,
|
|
600
|
+
{
|
|
601
|
+
"data-testid": "settings-page-template",
|
|
602
|
+
direction: "column",
|
|
603
|
+
flex: "1",
|
|
604
|
+
minH: "0",
|
|
605
|
+
children: [
|
|
606
|
+
/* @__PURE__ */ jsx(
|
|
607
|
+
PageHeader,
|
|
608
|
+
{
|
|
609
|
+
breadcrumbs,
|
|
610
|
+
title,
|
|
611
|
+
subtitle,
|
|
612
|
+
eyebrow,
|
|
613
|
+
actions: resolvedActions
|
|
614
|
+
}
|
|
615
|
+
),
|
|
616
|
+
/* @__PURE__ */ jsxs(Tabs.Root, { lazyMount: true, unmountOnExit: true, ...tabsRootProps, children: [
|
|
617
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Tabs.List, { children: bodyTabs.items.map((item) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: item.value, children: item.label }, item.value)) }) }),
|
|
618
|
+
renderBody(
|
|
619
|
+
bodyTabs.items.map((item) => /* @__PURE__ */ jsx(Tabs.Content, { value: item.value, children: item.content }, item.value))
|
|
620
|
+
)
|
|
621
|
+
] })
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
}
|
|
535
626
|
return /* @__PURE__ */ jsxs(
|
|
536
627
|
Flex,
|
|
537
628
|
{
|
|
@@ -551,14 +642,7 @@ function SettingsPageTemplate({
|
|
|
551
642
|
}
|
|
552
643
|
),
|
|
553
644
|
/* @__PURE__ */ jsx(Box, { children: tabs }),
|
|
554
|
-
|
|
555
|
-
Box,
|
|
556
|
-
{
|
|
557
|
-
maxW: maxBodyWidth,
|
|
558
|
-
marginInline: maxBodyWidth === "full" ? "0" : "auto",
|
|
559
|
-
children
|
|
560
|
-
}
|
|
561
|
-
) })
|
|
645
|
+
renderBody(children)
|
|
562
646
|
]
|
|
563
647
|
}
|
|
564
648
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/templates/app-shell.tsx","../../src/templates/auth-page-template.tsx","../../src/templates/dashboard-page-template.tsx","../../src/templates/detail-page-template.tsx","../../src/templates/error-page.tsx","../../src/templates/index-page-template.tsx","../../src/templates/loading-page.tsx","../../src/templates/maintenance-page.tsx","../../src/templates/marketing-page-template.tsx","../../src/templates/settings-page-template.tsx"],"names":["jsx","jsxs"],"mappings":";;;;;;AAsDA,SAAS,eAAA,GAA6B;AACrC,EAAA,MAAM,MAAA,GAAsC;AAAA,IAC3C,OAAA,EAAS,IAAA;AAAA,IACT,IAAA,EAAM;AAAA,GACP;AACA,EAAA,MAAM,SAAA,GAA+C;AAAA,IACpD,OAAA,sBAAa,GAAA,EAAI;AAAA,IACjB,IAAA,sBAAU,GAAA;AAAI,GACf;AAEA,EAAA,SAAS,OAAO,IAAA,EAAgB;AAC/B,IAAA,KAAA,MAAW,QAAA,IAAY,SAAA,CAAU,IAAI,CAAA,EAAG,QAAA,EAAS;AAAA,EAClD;AAEA,EAAA,OAAO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AAC,GAAA,EAAA,EAAI,IAAA,EAAK,GAAA,EAAI,IAAA,EAAK,GAAA,EAAI,EAAA,EAAG,GAAA,EAAI,EAAA,EAAG,GAAA,EAChC,QAAA,kBAAAA,GAAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACA,IAAA,EAAM,YAAA;AAAA,YACN,YAAA,EAAc,YAAA,KAAiB,MAAA,GAAS,GAAA,GAAM,MAAA;AAAA,YAE7C;AAAA;AAAA,SACF,EACD;AAAA;AAAA;AAAA,GACD;AAEF;AACA,oBAAA,CAAqB,WAAA,GAAc,sBAAA","file":"index.js","sourcesContent":["// src/templates/app-shell.tsx\n//\n// AppShell — top-level layout for authenticated knkCMS pages.\n//\n// Composition: a 3-column CSS grid with a fixed-width sidebar, a fluid main\n// content column, and an optional fixed-width context rail.\n//\n// ┌─────────┬───────────────────────────┬─────────┐\n// │ │ │ │\n// │ sidebar │ children │ rail │\n// │ │ (page header / content) │ │\n// │ │ │ │\n// └─────────┴───────────────────────────┴─────────┘\n//\n// Slot mechanism\n// --------------\n// AppShell installs an external slot store on its descendants via context.\n// Two named slots are exposed:\n//\n// - \"actions\" — registered via `usePageActions(node)` — surfaced by page\n// templates inside their <PageHeader actions=…> slot.\n// - \"rail\" — registered via `usePageRail(node)` — surfaced by AppShell\n// as the content of the right rail column.\n//\n// The store uses `useSyncExternalStore` so that producers (deep child\n// components rendered after the consumer) and consumers (AppShell, the page\n// templates) stay decoupled. A naive `useState`-based context would force the\n// consumer to render in the same React commit as the producer, which causes\n// the actions/rail to flicker on route changes (the Path-B fix originally\n// shipped in odon as PR #115). The external-store pattern lets the producer\n// register its content in a `useEffect`, the consumer re-reads on the next\n// browser frame, and React's concurrent renderer is happy.\n\nimport {\n\tcreateContext,\n\ttype ReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseSyncExternalStore,\n} from \"react\";\nimport { Box, Flex, Grid } from \"../primitives/layout\";\n\ntype SlotName = \"actions\" | \"rail\";\n\ninterface SlotStore {\n\tget(slot: SlotName): ReactNode;\n\tset(slot: SlotName, node: ReactNode): void;\n\tclear(slot: SlotName): void;\n\tsubscribe(slot: SlotName, listener: () => void): () => void;\n}\n\nfunction createSlotStore(): SlotStore {\n\tconst values: Record<SlotName, ReactNode> = {\n\t\tactions: null,\n\t\trail: null,\n\t};\n\tconst listeners: Record<SlotName, Set<() => void>> = {\n\t\tactions: new Set(),\n\t\trail: new Set(),\n\t};\n\n\tfunction notify(slot: SlotName) {\n\t\tfor (const listener of listeners[slot]) listener();\n\t}\n\n\treturn {\n\t\tget(slot) {\n\t\t\treturn values[slot];\n\t\t},\n\t\tset(slot, node) {\n\t\t\tif (values[slot] === node) return;\n\t\t\tvalues[slot] = node;\n\t\t\tnotify(slot);\n\t\t},\n\t\tclear(slot) {\n\t\t\tif (values[slot] === null) return;\n\t\t\tvalues[slot] = null;\n\t\t\tnotify(slot);\n\t\t},\n\t\tsubscribe(slot, listener) {\n\t\t\tlisteners[slot].add(listener);\n\t\t\treturn () => {\n\t\t\t\tlisteners[slot].delete(listener);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst SlotStoreContext = createContext<SlotStore | null>(null);\n\n/**\n * Read-side hook used internally by AppShell and the page templates to\n * subscribe to a named slot's currently-registered ReactNode. Returns `null`\n * when no producer has registered content (or when called outside an AppShell).\n */\nfunction useSlotValue(slot: SlotName): ReactNode {\n\tconst store = useContext(SlotStoreContext);\n\tconst subscribe = useCallback(\n\t\t(listener: () => void) => {\n\t\t\tif (!store) return () => undefined;\n\t\t\treturn store.subscribe(slot, listener);\n\t\t},\n\t\t[store, slot],\n\t);\n\tconst getSnapshot = useCallback(() => {\n\t\tif (!store) return null;\n\t\treturn store.get(slot);\n\t}, [store, slot]);\n\treturn useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\n/**\n * Register page-action content (typically buttons rendered to the right of\n * the page title) from any descendant of `<AppShell>`. The content is\n * surfaced by the active page template inside its `<PageHeader>` actions\n * slot.\n *\n * Pass `null` (or omit) to clear the registration. The hook is a no-op when\n * called outside an AppShell, which keeps it safe to use in stories and\n * isolated component tests.\n */\nexport function usePageActions(content: ReactNode): void {\n\tconst store = useContext(SlotStoreContext);\n\t// Stash the most recent content in a ref so the effect can run on every\n\t// render without forcing a fresh effect-cleanup cycle for unstable nodes.\n\tconst latest = useRef<ReactNode>(content);\n\tlatest.current = content;\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"actions\", latest.current);\n\t\treturn () => {\n\t\t\tstore.clear(\"actions\");\n\t\t};\n\t}, [store]);\n\t// Re-register on every change of `content` (effect above only runs once\n\t// per mount; this second effect re-pushes the latest value).\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"actions\", content);\n\t}, [store, content]);\n}\n\n/**\n * Register context-rail content from any descendant of `<AppShell>`. The\n * content is rendered in the rail column (assuming the AppShell has a rail\n * slot enabled).\n *\n * Pass `null` (or omit) to clear the registration. The hook is a no-op when\n * called outside an AppShell.\n */\nexport function usePageRail(content: ReactNode): void {\n\tconst store = useContext(SlotStoreContext);\n\tconst latest = useRef<ReactNode>(content);\n\tlatest.current = content;\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"rail\", latest.current);\n\t\treturn () => {\n\t\t\tstore.clear(\"rail\");\n\t\t};\n\t}, [store]);\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"rail\", content);\n\t}, [store, content]);\n}\n\n/**\n * Internal hook used by page templates to read the currently-registered\n * page-actions ReactNode. Page templates fall back to a locally-passed\n * `actions` prop when nothing is registered.\n */\nexport function useRegisteredPageActions(): ReactNode {\n\treturn useSlotValue(\"actions\");\n}\n\nexport interface AppShellProps {\n\t/**\n\t * Sidebar element — the navigation column. Required. Typically an instance\n\t * of `<Sidebar>` from `@knkcs/anker/components`. AppShell does not own the\n\t * sidebar's collapsed-state — pass it through the Sidebar's own props.\n\t */\n\tsidebar: ReactNode;\n\t/**\n\t * Context rail element. Acts as a *fallback* for the rail column: it\n\t * renders when no descendant has registered rail content via\n\t * `usePageRail`. Registered content always wins over the prop.\n\t *\n\t * The rail column is enabled — and a grid track is reserved — when *either*\n\t * a `rail` prop is supplied *or* a descendant has registered rail content.\n\t * Omit both (or pass `null`) to drop the rail column entirely.\n\t */\n\trail?: ReactNode;\n\t/** Page content. */\n\tchildren: ReactNode;\n}\n\n/**\n * AppShell is the top-level layout for authenticated knkCMS pages. It owns\n * the slot context that powers `usePageActions` and `usePageRail`, and\n * arranges sidebar / main / rail in a 3-column CSS grid.\n *\n * AppShell is layout-only — it does not render a PageHeader, and it does not\n * inject any business chrome. Pages compose `<IndexPageTemplate>`,\n * `<DetailPageTemplate>`, etc. inside `children`.\n *\n * Rail precedence: content registered by a descendant via `usePageRail` wins\n * over the static `rail` prop. The prop is the fallback when no descendant\n * has registered content. Rationale: a descendant explicitly registering\n * content is signaling \"show this here\", which should trump the static prop.\n */\nexport function AppShell({ sidebar, rail, children }: AppShellProps) {\n\t// AppShell is split into an outer Provider and an inner Renderer so the\n\t// renderer's `useContext(SlotStoreContext)` resolves to *our* store rather\n\t// than the parent context. (A naive single component that both provides\n\t// and consumes the context at the same level reads the parent context —\n\t// the Provider only takes effect for descendants.)\n\tconst store = useMemo(() => createSlotStore(), []);\n\treturn (\n\t\t<SlotStoreContext.Provider value={store}>\n\t\t\t<AppShellInner sidebar={sidebar} rail={rail}>\n\t\t\t\t{children}\n\t\t\t</AppShellInner>\n\t\t</SlotStoreContext.Provider>\n\t);\n}\nAppShell.displayName = \"AppShell\";\n\nfunction AppShellInner({ sidebar, rail, children }: AppShellProps) {\n\tconst railNode = useSlotValue(\"rail\");\n\n\t// Precedence: registered rail content wins, fall back to the `rail` prop.\n\t// The rail column is enabled when *either* the consumer passed a `rail`\n\t// element *or* a descendant registered content via `usePageRail`.\n\tconst renderedRail = railNode ?? rail;\n\tconst showRailColumn =\n\t\trenderedRail !== undefined &&\n\t\trenderedRail !== null &&\n\t\trenderedRail !== false;\n\n\treturn (\n\t\t<Grid\n\t\t\tdata-testid=\"app-shell\"\n\t\t\tdata-rail={showRailColumn ? \"true\" : \"false\"}\n\t\t\ttemplateColumns={showRailColumn ? \"auto 1fr auto\" : \"auto 1fr\"}\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t>\n\t\t\t<Box\n\t\t\t\tdata-testid=\"app-shell-sidebar\"\n\t\t\t\tgridColumn=\"1\"\n\t\t\t\tminW=\"0\"\n\t\t\t\tposition=\"sticky\"\n\t\t\t\ttop=\"0\"\n\t\t\t\talignSelf=\"start\"\n\t\t\t\tmaxH=\"100vh\"\n\t\t\t\toverflowY=\"auto\"\n\t\t\t>\n\t\t\t\t{sidebar}\n\t\t\t</Box>\n\t\t\t<Flex\n\t\t\t\tdata-testid=\"app-shell-main\"\n\t\t\t\tgridColumn=\"2\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\tminW=\"0\"\n\t\t\t\tminH=\"100vh\"\n\t\t\t\tbg=\"bg-surface\"\n\t\t\t\tborderLeftWidth=\"1px\"\n\t\t\t\tborderColor=\"border\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Flex>\n\t\t\t{showRailColumn ? (\n\t\t\t\t<Box\n\t\t\t\t\tdata-testid=\"app-shell-rail\"\n\t\t\t\t\tgridColumn=\"3\"\n\t\t\t\t\tminW=\"0\"\n\t\t\t\t\tposition=\"sticky\"\n\t\t\t\t\ttop=\"0\"\n\t\t\t\t\talignSelf=\"start\"\n\t\t\t\t\tmaxH=\"100vh\"\n\t\t\t\t\toverflowY=\"auto\"\n\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\tborderLeftWidth=\"1px\"\n\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t>\n\t\t\t\t\t{renderedRail}\n\t\t\t\t</Box>\n\t\t\t) : null}\n\t\t</Grid>\n\t);\n}\nAppShellInner.displayName = \"AppShellInner\";\n","// src/templates/auth-page-template.tsx\n//\n// AuthPageTemplate — full-bleed centered card on a neutral canvas. No app\n// shell, no sidebar, no rail. Used for login, register, MFA challenge,\n// forgot/reset password, and email-verification screens.\n//\n// Internally this is a thin wrapper around `<AuthCard>` (in\n// `@knkcs/anker/components`) — surfaced under the templates module so\n// consumers can import their layout chrome from one entry point.\n//\n// We re-expose the wrapper rather than re-implementing it because AuthCard\n// is already battle-tested and stable; the templates module is the consumer\n// contract, AuthCard is the implementation.\n\nimport type { ReactNode } from \"react\";\nimport { AuthCard, type AuthCardProps } from \"../components/auth-card\";\n\nexport interface AuthPageTemplateProps extends AuthCardProps {\n\t/**\n\t * Page body — typically a form or a verification CTA. Inherits all\n\t * AuthCard slots (logo, topBarRight, eyebrow, title, subtitle, footer).\n\t */\n\tchildren: ReactNode;\n}\n\n/**\n * Auth-flow page layout. Use for any pre-authentication screen (login,\n * register, MFA, forgot-password, reset-password) and for short\n * confirmation flows (email-verify, account-deleted). For consent\n * dialogs, prefer `<OAuthConsentPageTemplate>` (denser layout).\n *\n * The template supplies a centered card with a dot-grid background, an\n * optional topbar with logo + locale switcher, and a footer slot. To hide\n * the topbar (rare — embedded preview, printable receipts) pass\n * `hideTopBar`. To hide the dot-grid (printable) pass `hideBackground`.\n */\nexport function AuthPageTemplate(props: AuthPageTemplateProps) {\n\treturn <AuthCard {...props} />;\n}\nAuthPageTemplate.displayName = \"AuthPageTemplate\";\n","// src/templates/dashboard-page-template.tsx\n//\n// DashboardPageTemplate — for at-a-glance overview pages composed of a grid\n// of widgets (Stat cards, mini-charts, recent-activity panes, etc.).\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (greeting · range picker) │\n// ├─────────────────────────────────────────┤\n// │ ┌──────┬──────┬──────┬──────┐ │\n// │ │ stat │ stat │ stat │ stat │ │\n// │ ├──────┴──────┼──────┴──────┤ │\n// │ │ widget │ widget │ │\n// │ │ │ │ │\n// │ ├─────────────┴─────────────┤ │\n// │ │ wide widget │ │\n// │ └───────────────────────────┘ │\n// └─────────────────────────────────────────┘\n//\n// The template provides the page chrome and a 12-column responsive grid.\n// Widgets opt into the column count via Chakra's `gridColumn` prop on each\n// child. Inspired by Linear's \"All issues\" overview and GitHub's repo\n// insights — calm surfaces, dense info, clear hierarchy.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex, Grid } from \"../primitives/layout\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface DashboardPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\tactions?: ReactNode;\n\t/**\n\t * Dashboard widgets. Children are placed inside a 12-column responsive\n\t * CSS grid with `gap=\"4\"`. Each child should set `gridColumn` (e.g.\n\t * `\"span 3\"` for a quarter-width tile, `\"span 6\"` for half, `\"span 12\"`\n\t * for full-width). The default per-child column span is `\"span 12\"`.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * Override the grid `gap` between widgets. @default \"4\" (= 16px)\n\t */\n\tgap?: string;\n}\n\nexport function DashboardPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\tchildren,\n\tgap = \"4\",\n}: DashboardPageTemplateProps) {\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"dashboard-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t<Box flex=\"1\" minH=\"0\" px=\"8\" py=\"6\">\n\t\t\t\t<Grid\n\t\t\t\t\tdata-testid=\"dashboard-grid\"\n\t\t\t\t\ttemplateColumns=\"repeat(12, minmax(0, 1fr))\"\n\t\t\t\t\tgap={gap}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Grid>\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nDashboardPageTemplate.displayName = \"DashboardPageTemplate\";\n","// src/templates/detail-page-template.tsx\n//\n// DetailPageTemplate — the canonical \"single entity\" page layout.\n//\n// Composition:\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (breadcrumbs · title · …) │\n// ├─────────────────────────────────────────┤\n// │ Tabs (optional — pinned beneath header) │\n// ├─────────────────────────────────────────┤\n// │ children (identity card · panes · …) │\n// └─────────────────────────────────────────┘\n//\n// Use for pages that show one entity: a single user, a single OAuth client,\n// a single audit-event detail. Detail pages often have an identity Card at\n// the top followed by tabbed sections — DetailPageTemplate is intentionally\n// thin so consumers can compose those freely under `children`.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface DetailPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\tactions?: ReactNode;\n\t/**\n\t * Tab strip rendered immediately under the PageHeader. Typically a\n\t * `<Tabs.Root>` containing a `<Tabs.List>` and one `<Tabs.Content>` per\n\t * pane. The template does not render `<Tabs.Content>` separately —\n\t * consumers control the tab body composition entirely.\n\t */\n\ttabs?: ReactNode;\n\t/**\n\t * Page body — the entity's identity card, tab bodies, edit forms, etc.\n\t * Rendered flush against the canvas. Add internal padding inside\n\t * `children` if you need it.\n\t */\n\tchildren: ReactNode;\n}\n\nexport function DetailPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\ttabs,\n\tchildren,\n}: DetailPageTemplateProps) {\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"detail-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t{tabs ? <Box>{tabs}</Box> : null}\n\t\t\t<Box flex=\"1\" minH=\"0\">\n\t\t\t\t{children}\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nDetailPageTemplate.displayName = \"DetailPageTemplate\";\n","// src/templates/error-page.tsx\n//\n// ErrorPage — full-bleed error layout for 404 / 403 / 500 / generic\n// failures. Centered status code + message + suggested next step. No app\n// shell, no sidebar.\n//\n// We keep it deliberately spare — an enterprise B2B error screen does not\n// need a 404-illustration of an astronaut. The optional `illustration`\n// slot is there for the rare case where a product wants to reach for one\n// (e.g. a dedicated brand \"OOPS\" SVG).\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface ErrorPageProps {\n\t/**\n\t * Status code (404, 500, 403, …) shown as the page's largest piece of\n\t * type. Pass any string — non-numeric codes like \"OOPS\" work too.\n\t */\n\tstatusCode: ReactNode;\n\t/** Short headline — e.g. \"Page not found\" or \"Something went wrong\". */\n\ttitle: ReactNode;\n\t/**\n\t * One-paragraph explanation. Keep it short — the user is already in a\n\t * frustrated state.\n\t */\n\tdescription?: ReactNode;\n\t/**\n\t * Action(s) — typically one solid button (back home / retry) plus an\n\t * optional secondary link.\n\t */\n\tactions?: ReactNode;\n\t/**\n\t * Optional illustration rendered above the status code. Use sparingly.\n\t */\n\tillustration?: ReactNode;\n\t/**\n\t * Logo or wordmark rendered top-left. Useful for branded error pages\n\t * served from the root domain.\n\t */\n\tlogo?: ReactNode;\n}\n\nexport function ErrorPage({\n\tstatusCode,\n\ttitle,\n\tdescription,\n\tactions,\n\tillustration,\n\tlogo,\n}: ErrorPageProps) {\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"error-page\"\n\t\t\tdirection=\"column\"\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t>\n\t\t\t{logo && (\n\t\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t\t{logo}\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t\t<Flex\n\t\t\t\tflex=\"1\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tpx=\"8\"\n\t\t\t\tpb=\"16\"\n\t\t\t\ttextAlign=\"center\"\n\t\t\t>\n\t\t\t\t{illustration && <Box mb=\"8\">{illustration}</Box>}\n\t\t\t\t<Text\n\t\t\t\t\tfontSize=\"7xl\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\tletterSpacing=\"-0.04em\"\n\t\t\t\t\tlineHeight=\"1\"\n\t\t\t\t\tmb=\"4\"\n\t\t\t\t>\n\t\t\t\t\t{statusCode}\n\t\t\t\t</Text>\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h1\"\n\t\t\t\t\tfontSize=\"2xl\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\tmb=\"3\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</Heading>\n\t\t\t\t{description && (\n\t\t\t\t\t<Text fontSize=\"md\" color=\"muted\" lineHeight=\"1.6\" maxW=\"lg\" mb=\"8\">\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{actions && (\n\t\t\t\t\t<Flex gap=\"3\" align=\"center\" justify=\"center\">\n\t\t\t\t\t\t{actions}\n\t\t\t\t\t</Flex>\n\t\t\t\t)}\n\t\t\t</Flex>\n\t\t</Flex>\n\t);\n}\nErrorPage.displayName = \"ErrorPage\";\n","// src/templates/index-page-template.tsx\n//\n// IndexPageTemplate — the canonical \"list of items\" page layout.\n//\n// Composition (top to bottom):\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (breadcrumbs · title · …) │\n// ├─────────────────────────────────────────┤\n// │ Tabs (optional — under header) │\n// ├─────────────────────────────────────────┤\n// │ Toolbar (search · filters · count) │\n// ├─────────────────────────────────────────┤\n// │ children (DataTable, list, empty state) │\n// └─────────────────────────────────────────┘\n//\n// Use this template for any \"browse a list\" page: users index, OAuth-clients\n// index, audit-log, etc. The template flushes its content (no horizontal\n// padding) so a full-bleed DataTable sits cleanly under the toolbar. Pages\n// that need padded content should wrap children in a `<Box px=\"8\" py=\"6\">`.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface IndexPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\t/**\n\t * Optional explicit page-action content (rendered inside the PageHeader's\n\t * actions slot). When omitted, the template falls back to whatever a\n\t * descendant has registered via `usePageActions`.\n\t */\n\tactions?: ReactNode;\n\t/**\n\t * Optional tab strip rendered between the PageHeader and the toolbar.\n\t * Pass an instance of `<Tabs.Root>` (with its own `<Tabs.List>` and\n\t * `<Tabs.Content>`s). When omitted, no tab strip is rendered.\n\t */\n\ttabs?: ReactNode;\n\t/**\n\t * Toolbar element rendered between the tabs (if any) and the page body.\n\t * Typically an instance of `<Toolbar>` from `@knkcs/anker/components`.\n\t * Pass `null` to omit the toolbar entirely (rare).\n\t */\n\ttoolbar?: ReactNode;\n\t/**\n\t * Page body — DataTable, list, empty state, or error/loading content.\n\t * Rendered flush against the canvas. Add internal padding inside\n\t * `children` if you need it.\n\t */\n\tchildren: ReactNode;\n}\n\n/**\n * Canonical list-page layout. Renders PageHeader → optional Tabs → optional\n * Toolbar → children, full-bleed against the canvas.\n *\n * Page actions are sourced from (in priority order): `actions` prop →\n * registered slot via `usePageActions`. This lets a tab-pane component deep\n * inside `children` register its own actions without prop-drilling.\n */\nexport function IndexPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\ttabs,\n\ttoolbar,\n\tchildren,\n}: IndexPageTemplateProps) {\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"index-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t{tabs ? <Box>{tabs}</Box> : null}\n\t\t\t{toolbar ? <Box>{toolbar}</Box> : null}\n\t\t\t<Box flex=\"1\" minH=\"0\">\n\t\t\t\t{children}\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nIndexPageTemplate.displayName = \"IndexPageTemplate\";\n","// src/templates/loading-page.tsx\n//\n// LoadingPage — full-bleed initial-boot loading screen. Used while the\n// authenticated app shell is being hydrated (auth check, theme loading,\n// initial data fetch). For in-page loading states (e.g. tab switch),\n// prefer a centered <Spinner /> inside the page body — this template is\n// only for the very first frame of the app.\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Spinner } from \"../primitives/spinner\";\nimport { Text } from \"../primitives/typography\";\n\nexport interface LoadingPageProps {\n\t/** Optional logo rendered above the spinner. */\n\tlogo?: ReactNode;\n\t/**\n\t * Optional message rendered below the spinner. Keep it short\n\t * (e.g. \"Loading your workspace…\").\n\t */\n\tmessage?: ReactNode;\n}\n\nexport function LoadingPage({ logo, message }: LoadingPageProps) {\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"loading-page\"\n\t\t\tdirection=\"column\"\n\t\t\talign=\"center\"\n\t\t\tjustify=\"center\"\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t\tgap=\"6\"\n\t\t\ttextAlign=\"center\"\n\t\t>\n\t\t\t{logo && <Box>{logo}</Box>}\n\t\t\t<Spinner size=\"lg\" color=\"accent\" />\n\t\t\t{message && (\n\t\t\t\t<Text fontSize=\"sm\" color=\"muted\">\n\t\t\t\t\t{message}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</Flex>\n\t);\n}\nLoadingPage.displayName = \"LoadingPage\";\n","// src/templates/maintenance-page.tsx\n//\n// MaintenancePage — full-bleed maintenance/down-for-upgrade screen. No app\n// shell. Surfaces a clear message, an optional ETA, and an optional link\n// to a status page. Operators serve this from a static asset or a\n// fallback handler when the app is offline.\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface MaintenancePageProps {\n\t/** Logo rendered top-left. */\n\tlogo?: ReactNode;\n\t/** Headline — e.g. \"We'll be right back\". */\n\ttitle?: ReactNode;\n\t/**\n\t * One-paragraph message explaining what's happening and what users\n\t * should do (typically \"wait, we'll be back shortly\").\n\t */\n\tdescription?: ReactNode;\n\t/**\n\t * Estimated-time-of-restoration banner. Pass a string like\n\t * \"Estimated back online: 14:30 UTC\". Rendered below the description.\n\t */\n\teta?: ReactNode;\n\t/**\n\t * Optional link to a status page or twitter status. Pass a fully-\n\t * styled `<Link>` or an `<a>` element.\n\t */\n\tstatusLink?: ReactNode;\n}\n\nexport function MaintenancePage({\n\tlogo,\n\ttitle = \"We'll be right back\",\n\tdescription = \"We're upgrading the service. Please refresh in a few minutes.\",\n\teta,\n\tstatusLink,\n}: MaintenancePageProps) {\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"maintenance-page\"\n\t\t\tdirection=\"column\"\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t>\n\t\t\t{logo && (\n\t\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t\t{logo}\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t\t<Flex\n\t\t\t\tflex=\"1\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tpx=\"8\"\n\t\t\t\tpb=\"16\"\n\t\t\t\ttextAlign=\"center\"\n\t\t\t>\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h1\"\n\t\t\t\t\tfontSize=\"3xl\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\tmb=\"4\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</Heading>\n\t\t\t\t{description && (\n\t\t\t\t\t<Text fontSize=\"md\" color=\"muted\" lineHeight=\"1.6\" maxW=\"lg\" mb=\"6\">\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{eta && (\n\t\t\t\t\t<Box\n\t\t\t\t\t\tpx=\"4\"\n\t\t\t\t\t\tpy=\"2\"\n\t\t\t\t\t\tborderWidth=\"1px\"\n\t\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t\t\tborderRadius=\"md\"\n\t\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\t\tmb=\"6\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Text fontSize=\"sm\" fontWeight=\"medium\" color=\"emphasized\">\n\t\t\t\t\t\t\t{eta}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\t\t\t\t{statusLink && <Box>{statusLink}</Box>}\n\t\t\t</Flex>\n\t\t</Flex>\n\t);\n}\nMaintenancePage.displayName = \"MaintenancePage\";\n","// src/templates/marketing-page-template.tsx\n//\n// MarketingPageTemplate — full-bleed landing-page chrome. No app shell, no\n// sidebar, no rail. Used for product landing pages, \"about us\", coming-\n// soon teasers, and other unauthenticated marketing surfaces.\n//\n// Composition (top to bottom):\n//\n// ┌──────────────────────────────────────────┐\n// │ topbar (logo · nav · CTA) │\n// ├──────────────────────────────────────────┤\n// │ hero (eyebrow · title · subtitle · CTAs) │\n// ├──────────────────────────────────────────┤\n// │ children (feature sections, testimonials) │\n// ├──────────────────────────────────────────┤\n// │ footer (copyright, links) │\n// └──────────────────────────────────────────┘\n//\n// The template aims for the same refined-minimalism aesthetic as the rest\n// of anker — calm surfaces, generous spacing on the hero only, brand\n// colors used as accents rather than full backgrounds. No carousels, no\n// animated parallax, no auto-rotating testimonials.\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface MarketingPageTemplateProps {\n\t/** Logo or wordmark, far-left of the topbar. */\n\tlogo?: ReactNode;\n\t/** Navigation links and/or sign-in CTA, far-right of the topbar. */\n\ttopBarRight?: ReactNode;\n\t/** Hide the topbar (rare). */\n\thideTopBar?: boolean;\n\t/** Eyebrow above the hero title (uppercase, muted). */\n\theroEyebrow?: ReactNode;\n\t/** Hero title — large display text. */\n\theroTitle?: ReactNode;\n\t/** Hero subtitle — one-paragraph value statement. */\n\theroSubtitle?: ReactNode;\n\t/** Hero CTAs — typically one solid button + one ghost link. */\n\theroActions?: ReactNode;\n\t/** Optional visual rendered to the right of the hero copy on wide viewports. */\n\theroVisual?: ReactNode;\n\t/**\n\t * Feature sections, testimonials, etc. Rendered with `maxW=\"6xl\"` and\n\t * `marginInline=\"auto\"` so content tracks a consistent reading column.\n\t */\n\tchildren?: ReactNode;\n\t/** Footer content — copyright, secondary nav, contact. */\n\tfooter?: ReactNode;\n}\n\nexport function MarketingPageTemplate({\n\tlogo,\n\ttopBarRight,\n\thideTopBar,\n\theroEyebrow,\n\theroTitle,\n\theroSubtitle,\n\theroActions,\n\theroVisual,\n\tchildren,\n\tfooter,\n}: MarketingPageTemplateProps) {\n\treturn (\n\t\t<Box data-testid=\"marketing-page-template\" minH=\"100vh\" bg=\"bg-canvas\">\n\t\t\t{!hideTopBar && (\n\t\t\t\t<Flex\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t\tpx=\"8\"\n\t\t\t\t\tpy=\"4\"\n\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\tborderBottomWidth=\"1px\"\n\t\t\t\t\tborderBottomColor=\"border\"\n\t\t\t\t>\n\t\t\t\t\t<Box>{logo}</Box>\n\t\t\t\t\t<Flex gap=\"6\" align=\"center\" fontSize=\"sm\" color=\"emphasized\">\n\t\t\t\t\t\t{topBarRight}\n\t\t\t\t\t</Flex>\n\t\t\t\t</Flex>\n\t\t\t)}\n\n\t\t\t{(heroEyebrow || heroTitle || heroSubtitle || heroActions) && (\n\t\t\t\t<Box px=\"8\" py=\"20\" bg=\"bg-canvas\">\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tmaxW=\"6xl\"\n\t\t\t\t\t\tmarginInline=\"auto\"\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tgap=\"12\"\n\t\t\t\t\t\tdirection={{ base: \"column\", md: \"row\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Box flex=\"1\" minW=\"0\">\n\t\t\t\t\t\t\t{heroEyebrow && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tfontSize=\"2xs\"\n\t\t\t\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\t\t\t\tletterSpacing=\"wider\"\n\t\t\t\t\t\t\t\t\ttextTransform=\"uppercase\"\n\t\t\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\t\t\tmb=\"3\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heroEyebrow}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{heroTitle && (\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tas=\"h1\"\n\t\t\t\t\t\t\t\t\tfontSize={{ base: \"4xl\", md: \"6xl\" }}\n\t\t\t\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\t\t\t\t\tlineHeight=\"1.05\"\n\t\t\t\t\t\t\t\t\tmb=\"5\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heroTitle}\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{heroSubtitle && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tfontSize=\"lg\"\n\t\t\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\t\t\tlineHeight=\"1.6\"\n\t\t\t\t\t\t\t\t\tmaxW=\"2xl\"\n\t\t\t\t\t\t\t\t\tmb=\"8\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heroSubtitle}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{heroActions && (\n\t\t\t\t\t\t\t\t<Flex gap=\"3\" align=\"center\">\n\t\t\t\t\t\t\t\t\t{heroActions}\n\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t{heroVisual && (\n\t\t\t\t\t\t\t<Box flex=\"1\" minW=\"0\" display={{ base: \"none\", md: \"block\" }}>\n\t\t\t\t\t\t\t\t{heroVisual}\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Flex>\n\t\t\t\t</Box>\n\t\t\t)}\n\n\t\t\t{children && (\n\t\t\t\t<Box px=\"8\" py=\"16\">\n\t\t\t\t\t<Box maxW=\"6xl\" marginInline=\"auto\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Box>\n\t\t\t\t</Box>\n\t\t\t)}\n\n\t\t\t{footer && (\n\t\t\t\t<Box\n\t\t\t\t\tpx=\"8\"\n\t\t\t\t\tpy=\"8\"\n\t\t\t\t\tbg=\"bg-subtle\"\n\t\t\t\t\tborderTopWidth=\"1px\"\n\t\t\t\t\tborderTopColor=\"border\"\n\t\t\t\t>\n\t\t\t\t\t<Box maxW=\"6xl\" marginInline=\"auto\">\n\t\t\t\t\t\t{footer}\n\t\t\t\t\t</Box>\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t</Box>\n\t);\n}\nMarketingPageTemplate.displayName = \"MarketingPageTemplate\";\n","// src/templates/settings-page-template.tsx\n//\n// SettingsPageTemplate — for any \"preferences / configuration\" page that\n// uses a tabbed split between mixed form / list content. Visually identical\n// to DetailPageTemplate today, but exposed as a separate template so its\n// authoring rules (tabs are required, body is padded, max-width on forms)\n// can evolve independently.\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (breadcrumbs · title · …) │\n// ├─────────────────────────────────────────┤\n// │ Tabs (required for settings) │\n// ├─────────────────────────────────────────┤\n// │ children (form cards · lists · …) │\n// └─────────────────────────────────────────┘\n//\n// Use this template for: personal-settings (profile, password, MFA tabs),\n// organization settings, identity-provider settings, admin → general.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface SettingsPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\tactions?: ReactNode;\n\t/**\n\t * Tab strip. Settings pages should always have at least two tabs — if\n\t * you only have one section, use DetailPageTemplate instead.\n\t */\n\ttabs: ReactNode;\n\t/** Page body — typically Card-wrapped forms or DataLists. */\n\tchildren: ReactNode;\n\t/**\n\t * Constrain the body width for readability. Settings forms read better\n\t * at ~720px even on wide viewports. Pass a Chakra width token (`\"3xl\"`,\n\t * `\"4xl\"`) or any CSS length. @default \"3xl\" (= 768px)\n\t *\n\t * Pass `\"full\"` to disable the constraint entirely.\n\t */\n\tmaxBodyWidth?: string;\n}\n\nexport function SettingsPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\ttabs,\n\tchildren,\n\tmaxBodyWidth = \"3xl\",\n}: SettingsPageTemplateProps) {\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"settings-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t<Box>{tabs}</Box>\n\t\t\t<Box flex=\"1\" minH=\"0\" px=\"8\" pt=\"6\">\n\t\t\t\t<Box\n\t\t\t\t\tmaxW={maxBodyWidth}\n\t\t\t\t\tmarginInline={maxBodyWidth === \"full\" ? \"0\" : \"auto\"}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Box>\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nSettingsPageTemplate.displayName = \"SettingsPageTemplate\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/templates/app-shell.tsx","../../src/templates/auth-page-template.tsx","../../src/templates/dashboard-page-template.tsx","../../src/templates/detail-page-template.tsx","../../src/templates/error-page.tsx","../../src/templates/index-page-template.tsx","../../src/templates/loading-page.tsx","../../src/templates/maintenance-page.tsx","../../src/templates/marketing-page-template.tsx","../../src/templates/settings-page-template.tsx"],"names":["jsx","jsxs"],"mappings":";;;;;;;AAsDA,SAAS,eAAA,GAA6B;AACrC,EAAA,MAAM,MAAA,GAAsC;AAAA,IAC3C,OAAA,EAAS,IAAA;AAAA,IACT,IAAA,EAAM;AAAA,GACP;AACA,EAAA,MAAM,SAAA,GAA+C;AAAA,IACpD,OAAA,sBAAa,GAAA,EAAI;AAAA,IACjB,IAAA,sBAAU,GAAA;AAAI,GACf;AAEA,EAAA,SAAS,OAAO,IAAA,EAAgB;AAC/B,IAAA,KAAA,MAAW,QAAA,IAAY,SAAA,CAAU,IAAI,CAAA,EAAG,QAAA,EAAS;AAAA,EAClD;AAEA,EAAA,OAAO;AAAA,IACN,IAAI,IAAA,EAAM;AACT,MAAA,OAAO,OAAO,IAAI,CAAA;AAAA,IACnB,CAAA;AAAA,IACA,GAAA,CAAI,MAAM,IAAA,EAAM;AACf,MAAA,IAAI,MAAA,CAAO,IAAI,CAAA,KAAM,IAAA,EAAM;AAC3B,MAAA,MAAA,CAAO,IAAI,CAAA,GAAI,IAAA;AACf,MAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IACZ,CAAA;AAAA,IACA,MAAM,IAAA,EAAM;AACX,MAAA,IAAI,MAAA,CAAO,IAAI,CAAA,KAAM,IAAA,EAAM;AAC3B,MAAA,MAAA,CAAO,IAAI,CAAA,GAAI,IAAA;AACf,MAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IACZ,CAAA;AAAA,IACA,SAAA,CAAU,MAAM,QAAA,EAAU;AACzB,MAAA,SAAA,CAAU,IAAI,CAAA,CAAE,GAAA,CAAI,QAAQ,CAAA;AAC5B,MAAA,OAAO,MAAM;AACZ,QAAA,SAAA,CAAU,IAAI,CAAA,CAAE,MAAA,CAAO,QAAQ,CAAA;AAAA,MA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AAO,IAAA,CAAK,KAAA,EACzC,eAAK,OAAA,EAAA,EADY,IAAA,CAAK,KAExB,CACA;AAAA;AACF,WAAA,EACD;AAAA;AAAA;AAAA,KACD;AAAA,EAEF;AAEA,EAAA,uBACCC,IAAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACA,aAAA,EAAY,wBAAA;AAAA,MACZ,SAAA,EAAU,QAAA;AAAA,MACV,IAAA,EAAK,GAAA;AAAA,MACL,IAAA,EAAK,GAAA;AAAA,MAEL,QAAA,EAAA;AAAA,wBAAAD,GAAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACA,WAAA;AAAA,YACA,KAAA;AAAA,YACA,QAAA;AAAA,YACA,OAAA;AAAA,YACA,OAAA,EAAS;AAAA;AAAA,SACV;AAAA,wBACAA,GAAAA,CAAC,GAAA,EAAA,EAAK,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,QACV,WAAW,QAAQ;AAAA;AAAA;AAAA,GACrB;AAEF;AACA,oBAAA,CAAqB,WAAA,GAAc,sBAAA","file":"index.js","sourcesContent":["// src/templates/app-shell.tsx\n//\n// AppShell — top-level layout for authenticated knkCMS pages.\n//\n// Composition: a 3-column CSS grid with a fixed-width sidebar, a fluid main\n// content column, and an optional fixed-width context rail.\n//\n// ┌─────────┬───────────────────────────┬─────────┐\n// │ │ │ │\n// │ sidebar │ children │ rail │\n// │ │ (page header / content) │ │\n// │ │ │ │\n// └─────────┴───────────────────────────┴─────────┘\n//\n// Slot mechanism\n// --------------\n// AppShell installs an external slot store on its descendants via context.\n// Two named slots are exposed:\n//\n// - \"actions\" — registered via `usePageActions(node)` — surfaced by page\n// templates inside their <PageHeader actions=…> slot.\n// - \"rail\" — registered via `usePageRail(node)` — surfaced by AppShell\n// as the content of the right rail column.\n//\n// The store uses `useSyncExternalStore` so that producers (deep child\n// components rendered after the consumer) and consumers (AppShell, the page\n// templates) stay decoupled. A naive `useState`-based context would force the\n// consumer to render in the same React commit as the producer, which causes\n// the actions/rail to flicker on route changes (the Path-B fix originally\n// shipped in odon as PR #115). The external-store pattern lets the producer\n// register its content in a `useEffect`, the consumer re-reads on the next\n// browser frame, and React's concurrent renderer is happy.\n\nimport {\n\tcreateContext,\n\ttype ReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseSyncExternalStore,\n} from \"react\";\nimport { Box, Flex, Grid } from \"../primitives/layout\";\n\ntype SlotName = \"actions\" | \"rail\";\n\ninterface SlotStore {\n\tget(slot: SlotName): ReactNode;\n\tset(slot: SlotName, node: ReactNode): void;\n\tclear(slot: SlotName): void;\n\tsubscribe(slot: SlotName, listener: () => void): () => void;\n}\n\nfunction createSlotStore(): SlotStore {\n\tconst values: Record<SlotName, ReactNode> = {\n\t\tactions: null,\n\t\trail: null,\n\t};\n\tconst listeners: Record<SlotName, Set<() => void>> = {\n\t\tactions: new Set(),\n\t\trail: new Set(),\n\t};\n\n\tfunction notify(slot: SlotName) {\n\t\tfor (const listener of listeners[slot]) listener();\n\t}\n\n\treturn {\n\t\tget(slot) {\n\t\t\treturn values[slot];\n\t\t},\n\t\tset(slot, node) {\n\t\t\tif (values[slot] === node) return;\n\t\t\tvalues[slot] = node;\n\t\t\tnotify(slot);\n\t\t},\n\t\tclear(slot) {\n\t\t\tif (values[slot] === null) return;\n\t\t\tvalues[slot] = null;\n\t\t\tnotify(slot);\n\t\t},\n\t\tsubscribe(slot, listener) {\n\t\t\tlisteners[slot].add(listener);\n\t\t\treturn () => {\n\t\t\t\tlisteners[slot].delete(listener);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst SlotStoreContext = createContext<SlotStore | null>(null);\n\n/**\n * Read-side hook used internally by AppShell and the page templates to\n * subscribe to a named slot's currently-registered ReactNode. Returns `null`\n * when no producer has registered content (or when called outside an AppShell).\n */\nfunction useSlotValue(slot: SlotName): ReactNode {\n\tconst store = useContext(SlotStoreContext);\n\tconst subscribe = useCallback(\n\t\t(listener: () => void) => {\n\t\t\tif (!store) return () => undefined;\n\t\t\treturn store.subscribe(slot, listener);\n\t\t},\n\t\t[store, slot],\n\t);\n\tconst getSnapshot = useCallback(() => {\n\t\tif (!store) return null;\n\t\treturn store.get(slot);\n\t}, [store, slot]);\n\treturn useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\n/**\n * Register page-action content (typically buttons rendered to the right of\n * the page title) from any descendant of `<AppShell>`. The content is\n * surfaced by the active page template inside its `<PageHeader>` actions\n * slot.\n *\n * Pass `null` (or omit) to clear the registration. The hook is a no-op when\n * called outside an AppShell, which keeps it safe to use in stories and\n * isolated component tests.\n */\nexport function usePageActions(content: ReactNode): void {\n\tconst store = useContext(SlotStoreContext);\n\t// Stash the most recent content in a ref so the effect can run on every\n\t// render without forcing a fresh effect-cleanup cycle for unstable nodes.\n\tconst latest = useRef<ReactNode>(content);\n\tlatest.current = content;\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"actions\", latest.current);\n\t\treturn () => {\n\t\t\tstore.clear(\"actions\");\n\t\t};\n\t}, [store]);\n\t// Re-register on every change of `content` (effect above only runs once\n\t// per mount; this second effect re-pushes the latest value).\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"actions\", content);\n\t}, [store, content]);\n}\n\n/**\n * Register context-rail content from any descendant of `<AppShell>`. The\n * content is rendered in the rail column (assuming the AppShell has a rail\n * slot enabled).\n *\n * Pass `null` (or omit) to clear the registration. The hook is a no-op when\n * called outside an AppShell.\n */\nexport function usePageRail(content: ReactNode): void {\n\tconst store = useContext(SlotStoreContext);\n\tconst latest = useRef<ReactNode>(content);\n\tlatest.current = content;\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"rail\", latest.current);\n\t\treturn () => {\n\t\t\tstore.clear(\"rail\");\n\t\t};\n\t}, [store]);\n\tuseEffect(() => {\n\t\tif (!store) return;\n\t\tstore.set(\"rail\", content);\n\t}, [store, content]);\n}\n\n/**\n * Internal hook used by page templates to read the currently-registered\n * page-actions ReactNode. Page templates fall back to a locally-passed\n * `actions` prop when nothing is registered.\n */\nexport function useRegisteredPageActions(): ReactNode {\n\treturn useSlotValue(\"actions\");\n}\n\nexport interface AppShellProps {\n\t/**\n\t * Sidebar element — the navigation column. Required. Typically an instance\n\t * of `<Sidebar>` from `@knkcs/anker/components`. AppShell does not own the\n\t * sidebar's collapsed-state — pass it through the Sidebar's own props.\n\t */\n\tsidebar: ReactNode;\n\t/**\n\t * Context rail element. Acts as a *fallback* for the rail column: it\n\t * renders when no descendant has registered rail content via\n\t * `usePageRail`. Registered content always wins over the prop.\n\t *\n\t * The rail column is enabled — and a grid track is reserved — when *either*\n\t * a `rail` prop is supplied *or* a descendant has registered rail content.\n\t * Omit both (or pass `null`) to drop the rail column entirely.\n\t */\n\trail?: ReactNode;\n\t/** Page content. */\n\tchildren: ReactNode;\n}\n\n/**\n * AppShell is the top-level layout for authenticated knkCMS pages. It owns\n * the slot context that powers `usePageActions` and `usePageRail`, and\n * arranges sidebar / main / rail in a 3-column CSS grid.\n *\n * AppShell is layout-only — it does not render a PageHeader, and it does not\n * inject any business chrome. Pages compose `<IndexPageTemplate>`,\n * `<DetailPageTemplate>`, etc. inside `children`.\n *\n * Rail precedence: content registered by a descendant via `usePageRail` wins\n * over the static `rail` prop. The prop is the fallback when no descendant\n * has registered content. Rationale: a descendant explicitly registering\n * content is signaling \"show this here\", which should trump the static prop.\n */\nexport function AppShell({ sidebar, rail, children }: AppShellProps) {\n\t// AppShell is split into an outer Provider and an inner Renderer so the\n\t// renderer's `useContext(SlotStoreContext)` resolves to *our* store rather\n\t// than the parent context. (A naive single component that both provides\n\t// and consumes the context at the same level reads the parent context —\n\t// the Provider only takes effect for descendants.)\n\tconst store = useMemo(() => createSlotStore(), []);\n\treturn (\n\t\t<SlotStoreContext.Provider value={store}>\n\t\t\t<AppShellInner sidebar={sidebar} rail={rail}>\n\t\t\t\t{children}\n\t\t\t</AppShellInner>\n\t\t</SlotStoreContext.Provider>\n\t);\n}\nAppShell.displayName = \"AppShell\";\n\nfunction AppShellInner({ sidebar, rail, children }: AppShellProps) {\n\tconst railNode = useSlotValue(\"rail\");\n\n\t// Precedence: registered rail content wins, fall back to the `rail` prop.\n\t// The rail column is enabled when *either* the consumer passed a `rail`\n\t// element *or* a descendant registered content via `usePageRail`.\n\tconst renderedRail = railNode ?? rail;\n\tconst showRailColumn =\n\t\trenderedRail !== undefined &&\n\t\trenderedRail !== null &&\n\t\trenderedRail !== false;\n\n\treturn (\n\t\t<Grid\n\t\t\tdata-testid=\"app-shell\"\n\t\t\tdata-rail={showRailColumn ? \"true\" : \"false\"}\n\t\t\ttemplateColumns={showRailColumn ? \"auto 1fr auto\" : \"auto 1fr\"}\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t>\n\t\t\t<Box\n\t\t\t\tdata-testid=\"app-shell-sidebar\"\n\t\t\t\tgridColumn=\"1\"\n\t\t\t\tminW=\"0\"\n\t\t\t\tposition=\"sticky\"\n\t\t\t\ttop=\"0\"\n\t\t\t\talignSelf=\"start\"\n\t\t\t\tmaxH=\"100vh\"\n\t\t\t\toverflowY=\"auto\"\n\t\t\t>\n\t\t\t\t{sidebar}\n\t\t\t</Box>\n\t\t\t<Flex\n\t\t\t\tdata-testid=\"app-shell-main\"\n\t\t\t\tgridColumn=\"2\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\tminW=\"0\"\n\t\t\t\tminH=\"100vh\"\n\t\t\t\tbg=\"bg-canvas\"\n\t\t\t\tborderLeftWidth=\"1px\"\n\t\t\t\tborderColor=\"border\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Flex>\n\t\t\t{showRailColumn ? (\n\t\t\t\t<Box\n\t\t\t\t\tdata-testid=\"app-shell-rail\"\n\t\t\t\t\tgridColumn=\"3\"\n\t\t\t\t\tminW=\"0\"\n\t\t\t\t\tposition=\"sticky\"\n\t\t\t\t\ttop=\"0\"\n\t\t\t\t\talignSelf=\"start\"\n\t\t\t\t\tmaxH=\"100vh\"\n\t\t\t\t\toverflowY=\"auto\"\n\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\tborderLeftWidth=\"1px\"\n\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t>\n\t\t\t\t\t{renderedRail}\n\t\t\t\t</Box>\n\t\t\t) : null}\n\t\t</Grid>\n\t);\n}\nAppShellInner.displayName = \"AppShellInner\";\n","// src/templates/auth-page-template.tsx\n//\n// AuthPageTemplate — full-bleed centered card on a neutral canvas. No app\n// shell, no sidebar, no rail. Used for login, register, MFA challenge,\n// forgot/reset password, and email-verification screens.\n//\n// Internally this is a thin wrapper around `<AuthCard>` (in\n// `@knkcs/anker/components`) — surfaced under the templates module so\n// consumers can import their layout chrome from one entry point.\n//\n// We re-expose the wrapper rather than re-implementing it because AuthCard\n// is already battle-tested and stable; the templates module is the consumer\n// contract, AuthCard is the implementation.\n\nimport type { ReactNode } from \"react\";\nimport { AuthCard, type AuthCardProps } from \"../components/auth-card\";\n\nexport interface AuthPageTemplateProps extends AuthCardProps {\n\t/**\n\t * Page body — typically a form or a verification CTA. Inherits all\n\t * AuthCard slots (logo, topBarRight, eyebrow, title, subtitle, footer).\n\t */\n\tchildren: ReactNode;\n}\n\n/**\n * Auth-flow page layout. Use for any pre-authentication screen (login,\n * register, MFA, forgot-password, reset-password) and for short\n * confirmation flows (email-verify, account-deleted). For consent\n * dialogs, prefer `<OAuthConsentPageTemplate>` (denser layout).\n *\n * The template supplies a centered card with a dot-grid background, an\n * optional topbar with logo + locale switcher, and a footer slot. To hide\n * the topbar (rare — embedded preview, printable receipts) pass\n * `hideTopBar`. To hide the dot-grid (printable) pass `hideBackground`.\n */\nexport function AuthPageTemplate(props: AuthPageTemplateProps) {\n\treturn <AuthCard {...props} />;\n}\nAuthPageTemplate.displayName = \"AuthPageTemplate\";\n","// src/templates/dashboard-page-template.tsx\n//\n// DashboardPageTemplate — for at-a-glance overview pages composed of a grid\n// of widgets (Stat cards, mini-charts, recent-activity panes, etc.).\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (greeting · range picker) │\n// ├─────────────────────────────────────────┤\n// │ ┌──────┬──────┬──────┬──────┐ │\n// │ │ stat │ stat │ stat │ stat │ │\n// │ ├──────┴──────┼──────┴──────┤ │\n// │ │ widget │ widget │ │\n// │ │ │ │ │\n// │ ├─────────────┴─────────────┤ │\n// │ │ wide widget │ │\n// │ └───────────────────────────┘ │\n// └─────────────────────────────────────────┘\n//\n// The template provides the page chrome and a 12-column responsive grid.\n// Widgets opt into the column count via Chakra's `gridColumn` prop on each\n// child. Inspired by Linear's \"All issues\" overview and GitHub's repo\n// insights — calm surfaces, dense info, clear hierarchy.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex, Grid } from \"../primitives/layout\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface DashboardPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\tactions?: ReactNode;\n\t/**\n\t * Dashboard widgets. Children are placed inside a 12-column responsive\n\t * CSS grid with `gap=\"4\"`. Each child should set `gridColumn` (e.g.\n\t * `\"span 3\"` for a quarter-width tile, `\"span 6\"` for half, `\"span 12\"`\n\t * for full-width). The default per-child column span is `\"span 12\"`.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * Override the grid `gap` between widgets. @default \"4\" (= 16px)\n\t */\n\tgap?: string;\n}\n\nexport function DashboardPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\tchildren,\n\tgap = \"4\",\n}: DashboardPageTemplateProps) {\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"dashboard-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t<Box flex=\"1\" minH=\"0\" px=\"8\" py=\"6\">\n\t\t\t\t<Grid\n\t\t\t\t\tdata-testid=\"dashboard-grid\"\n\t\t\t\t\ttemplateColumns=\"repeat(12, minmax(0, 1fr))\"\n\t\t\t\t\tgap={gap}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Grid>\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nDashboardPageTemplate.displayName = \"DashboardPageTemplate\";\n","// src/templates/detail-page-template.tsx\n//\n// DetailPageTemplate — the canonical \"single entity\" page layout.\n//\n// Composition:\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (breadcrumbs · title · …) │\n// ├─────────────────────────────────────────┤\n// │ subheader (optional — e.g. identity card)│\n// ├─────────────────────────────────────────┤\n// │ Tabs (optional — pinned beneath subhead) │\n// ├─────────────────────────────────────────┤\n// │ children OR bodyTabs panes │\n// └─────────────────────────────────────────┘\n//\n// Two ways to render tabs:\n//\n// 1. `bodyTabs` — declarative panels owned by the template. Template wraps\n// Tabs.Root with `lazyMount unmountOnExit` so only the active panel\n// mounts. Use this for any case where each tab has its own body\n// component (Members, Security, Sessions panes).\n//\n// 2. `tabs` — ReactNode slot for nav-mode or filter-mode tab strips\n// (Tabs.List with no Tabs.Content; the body comes from `children`,\n// typically a route's outlet). Use this when each tab is a separate\n// route or when tab state is controlled externally.\n//\n// `bodyTabs` and `tabs` are mutually exclusive. Passing both throws.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Tabs } from \"../primitives/tabs\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface BodyTabsItem {\n\tvalue: string;\n\tlabel: ReactNode;\n\tcontent: ReactNode;\n}\n\nexport type BodyTabsProp =\n\t| {\n\t\t\titems: BodyTabsItem[];\n\t\t\tdefaultValue: string;\n\t\t\tvalue?: never;\n\t\t\tonValueChange?: never;\n\t }\n\t| {\n\t\t\titems: BodyTabsItem[];\n\t\t\tvalue: string;\n\t\t\tonValueChange: (next: string) => void;\n\t\t\tdefaultValue?: never;\n\t };\n\nexport interface DetailPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\tactions?: ReactNode;\n\t/**\n\t * Tab strip rendered immediately under the PageHeader / subheader.\n\t * Use this for nav-mode/filter-mode tabs (Tabs.List, no Tabs.Content);\n\t * the body comes from `children`. For owned-panel tabs, use `bodyTabs`\n\t * instead. Mutually exclusive with `bodyTabs`.\n\t */\n\ttabs?: ReactNode;\n\t/**\n\t * Owned-panel tabs. Template renders Tabs.Root with `lazyMount\n\t * unmountOnExit`; only the active item's `content` mounts. Mutually\n\t * exclusive with `tabs` and `children` is ignored when this is set.\n\t */\n\tbodyTabs?: BodyTabsProp;\n\t/**\n\t * ReactNode rendered between the PageHeader and the tabs (or the body\n\t * if no tabs). Use for identity-card-style summaries.\n\t */\n\tsubheader?: ReactNode;\n\t/**\n\t * Page body — rendered when `bodyTabs` is not set. Flush against the\n\t * canvas; add internal padding inside `children` if you need it.\n\t */\n\tchildren?: ReactNode;\n}\n\nexport function DetailPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\ttabs,\n\tbodyTabs,\n\tsubheader,\n\tchildren,\n}: DetailPageTemplateProps) {\n\tif (tabs && bodyTabs) {\n\t\tthrow new Error(\n\t\t\t\"DetailPageTemplate: `tabs` and `bodyTabs` are mutually exclusive — use `bodyTabs` for owned panels, `tabs` for nav/filter strips.\",\n\t\t);\n\t}\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\n\tif (bodyTabs) {\n\t\tconst tabsRootProps =\n\t\t\tbodyTabs.value !== undefined\n\t\t\t\t? {\n\t\t\t\t\t\tvalue: bodyTabs.value,\n\t\t\t\t\t\tonValueChange: (d: { value: string }) =>\n\t\t\t\t\t\t\tbodyTabs.onValueChange!(d.value),\n\t\t\t\t\t}\n\t\t\t\t: { defaultValue: bodyTabs.defaultValue };\n\t\treturn (\n\t\t\t<Flex\n\t\t\t\tdata-testid=\"detail-page-template\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\tflex=\"1\"\n\t\t\t\tminH=\"0\"\n\t\t\t>\n\t\t\t\t<PageHeader\n\t\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tsubtitle={subtitle}\n\t\t\t\t\teyebrow={eyebrow}\n\t\t\t\t\tactions={resolvedActions}\n\t\t\t\t/>\n\t\t\t\t{subheader ? <Box>{subheader}</Box> : null}\n\t\t\t\t<Tabs.Root lazyMount unmountOnExit {...tabsRootProps}>\n\t\t\t\t\t<Box>\n\t\t\t\t\t\t<Tabs.List>\n\t\t\t\t\t\t\t{bodyTabs.items.map((item) => (\n\t\t\t\t\t\t\t\t<Tabs.Trigger key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</Tabs.Trigger>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Tabs.List>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<Box flex=\"1\" minH=\"0\">\n\t\t\t\t\t\t{bodyTabs.items.map((item) => (\n\t\t\t\t\t\t\t<Tabs.Content key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t{item.content}\n\t\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Box>\n\t\t\t\t</Tabs.Root>\n\t\t\t</Flex>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"detail-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t{subheader ? <Box>{subheader}</Box> : null}\n\t\t\t{tabs ? <Box>{tabs}</Box> : null}\n\t\t\t<Box flex=\"1\" minH=\"0\">\n\t\t\t\t{children}\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nDetailPageTemplate.displayName = \"DetailPageTemplate\";\n","// src/templates/error-page.tsx\n//\n// ErrorPage — full-bleed error layout for 404 / 403 / 500 / generic\n// failures. Centered status code + message + suggested next step. No app\n// shell, no sidebar.\n//\n// We keep it deliberately spare — an enterprise B2B error screen does not\n// need a 404-illustration of an astronaut. The optional `illustration`\n// slot is there for the rare case where a product wants to reach for one\n// (e.g. a dedicated brand \"OOPS\" SVG).\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface ErrorPageProps {\n\t/**\n\t * Status code (404, 500, 403, …) shown as the page's largest piece of\n\t * type. Pass any string — non-numeric codes like \"OOPS\" work too.\n\t */\n\tstatusCode: ReactNode;\n\t/** Short headline — e.g. \"Page not found\" or \"Something went wrong\". */\n\ttitle: ReactNode;\n\t/**\n\t * One-paragraph explanation. Keep it short — the user is already in a\n\t * frustrated state.\n\t */\n\tdescription?: ReactNode;\n\t/**\n\t * Action(s) — typically one solid button (back home / retry) plus an\n\t * optional secondary link.\n\t */\n\tactions?: ReactNode;\n\t/**\n\t * Optional illustration rendered above the status code. Use sparingly.\n\t */\n\tillustration?: ReactNode;\n\t/**\n\t * Logo or wordmark rendered top-left. Useful for branded error pages\n\t * served from the root domain.\n\t */\n\tlogo?: ReactNode;\n}\n\nexport function ErrorPage({\n\tstatusCode,\n\ttitle,\n\tdescription,\n\tactions,\n\tillustration,\n\tlogo,\n}: ErrorPageProps) {\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"error-page\"\n\t\t\tdirection=\"column\"\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t>\n\t\t\t{logo && (\n\t\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t\t{logo}\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t\t<Flex\n\t\t\t\tflex=\"1\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tpx=\"8\"\n\t\t\t\tpb=\"16\"\n\t\t\t\ttextAlign=\"center\"\n\t\t\t>\n\t\t\t\t{illustration && <Box mb=\"8\">{illustration}</Box>}\n\t\t\t\t<Text\n\t\t\t\t\tfontSize=\"7xl\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\tletterSpacing=\"-0.04em\"\n\t\t\t\t\tlineHeight=\"1\"\n\t\t\t\t\tmb=\"4\"\n\t\t\t\t>\n\t\t\t\t\t{statusCode}\n\t\t\t\t</Text>\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h1\"\n\t\t\t\t\tfontSize=\"2xl\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\tmb=\"3\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</Heading>\n\t\t\t\t{description && (\n\t\t\t\t\t<Text fontSize=\"md\" color=\"muted\" lineHeight=\"1.6\" maxW=\"lg\" mb=\"8\">\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{actions && (\n\t\t\t\t\t<Flex gap=\"3\" align=\"center\" justify=\"center\">\n\t\t\t\t\t\t{actions}\n\t\t\t\t\t</Flex>\n\t\t\t\t)}\n\t\t\t</Flex>\n\t\t</Flex>\n\t);\n}\nErrorPage.displayName = \"ErrorPage\";\n","// src/templates/index-page-template.tsx\n//\n// IndexPageTemplate — the canonical \"list of items\" page layout.\n//\n// Composition (top to bottom):\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (breadcrumbs · title · …) │\n// ├─────────────────────────────────────────┤\n// │ Tabs (optional — under header) │\n// ├─────────────────────────────────────────┤\n// │ Toolbar (search · filters · count) │\n// ├─────────────────────────────────────────┤\n// │ children (DataTable, list, empty state) │\n// └─────────────────────────────────────────┘\n//\n// Use this template for any \"browse a list\" page: users index, OAuth-clients\n// index, audit-log, etc. The template flushes its content (no horizontal\n// padding) so a full-bleed DataTable sits cleanly under the toolbar. Pages\n// that need padded content should wrap children in a `<Box px=\"8\" py=\"6\">`.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { useRegisteredPageActions } from \"./app-shell\";\n\nexport interface IndexPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\t/**\n\t * Optional explicit page-action content (rendered inside the PageHeader's\n\t * actions slot). When omitted, the template falls back to whatever a\n\t * descendant has registered via `usePageActions`.\n\t */\n\tactions?: ReactNode;\n\t/**\n\t * Optional tab strip rendered between the PageHeader and the toolbar.\n\t * Pass an instance of `<Tabs.Root>` (with its own `<Tabs.List>` and\n\t * `<Tabs.Content>`s). When omitted, no tab strip is rendered.\n\t */\n\ttabs?: ReactNode;\n\t/**\n\t * Toolbar element rendered between the tabs (if any) and the page body.\n\t * Typically an instance of `<Toolbar>` from `@knkcs/anker/components`.\n\t * Pass `null` to omit the toolbar entirely (rare).\n\t */\n\ttoolbar?: ReactNode;\n\t/**\n\t * Page body — DataTable, list, empty state, or error/loading content.\n\t * Rendered flush against the canvas. Add internal padding inside\n\t * `children` if you need it.\n\t */\n\tchildren: ReactNode;\n}\n\n/**\n * Canonical list-page layout. Renders PageHeader → optional Tabs → optional\n * Toolbar → children, full-bleed against the canvas.\n *\n * Page actions are sourced from (in priority order): `actions` prop →\n * registered slot via `usePageActions`. This lets a tab-pane component deep\n * inside `children` register its own actions without prop-drilling.\n */\nexport function IndexPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\ttabs,\n\ttoolbar,\n\tchildren,\n}: IndexPageTemplateProps) {\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"index-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t{tabs ? <Box>{tabs}</Box> : null}\n\t\t\t{toolbar ? <Box>{toolbar}</Box> : null}\n\t\t\t<Box flex=\"1\" minH=\"0\">\n\t\t\t\t{children}\n\t\t\t</Box>\n\t\t</Flex>\n\t);\n}\nIndexPageTemplate.displayName = \"IndexPageTemplate\";\n","// src/templates/loading-page.tsx\n//\n// LoadingPage — full-bleed initial-boot loading screen. Used while the\n// authenticated app shell is being hydrated (auth check, theme loading,\n// initial data fetch). For in-page loading states (e.g. tab switch),\n// prefer a centered <Spinner /> inside the page body — this template is\n// only for the very first frame of the app.\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Spinner } from \"../primitives/spinner\";\nimport { Text } from \"../primitives/typography\";\n\nexport interface LoadingPageProps {\n\t/** Optional logo rendered above the spinner. */\n\tlogo?: ReactNode;\n\t/**\n\t * Optional message rendered below the spinner. Keep it short\n\t * (e.g. \"Loading your workspace…\").\n\t */\n\tmessage?: ReactNode;\n}\n\nexport function LoadingPage({ logo, message }: LoadingPageProps) {\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"loading-page\"\n\t\t\tdirection=\"column\"\n\t\t\talign=\"center\"\n\t\t\tjustify=\"center\"\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t\tgap=\"6\"\n\t\t\ttextAlign=\"center\"\n\t\t>\n\t\t\t{logo && <Box>{logo}</Box>}\n\t\t\t<Spinner size=\"lg\" color=\"accent\" />\n\t\t\t{message && (\n\t\t\t\t<Text fontSize=\"sm\" color=\"muted\">\n\t\t\t\t\t{message}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</Flex>\n\t);\n}\nLoadingPage.displayName = \"LoadingPage\";\n","// src/templates/maintenance-page.tsx\n//\n// MaintenancePage — full-bleed maintenance/down-for-upgrade screen. No app\n// shell. Surfaces a clear message, an optional ETA, and an optional link\n// to a status page. Operators serve this from a static asset or a\n// fallback handler when the app is offline.\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface MaintenancePageProps {\n\t/** Logo rendered top-left. */\n\tlogo?: ReactNode;\n\t/** Headline — e.g. \"We'll be right back\". */\n\ttitle?: ReactNode;\n\t/**\n\t * One-paragraph message explaining what's happening and what users\n\t * should do (typically \"wait, we'll be back shortly\").\n\t */\n\tdescription?: ReactNode;\n\t/**\n\t * Estimated-time-of-restoration banner. Pass a string like\n\t * \"Estimated back online: 14:30 UTC\". Rendered below the description.\n\t */\n\teta?: ReactNode;\n\t/**\n\t * Optional link to a status page or twitter status. Pass a fully-\n\t * styled `<Link>` or an `<a>` element.\n\t */\n\tstatusLink?: ReactNode;\n}\n\nexport function MaintenancePage({\n\tlogo,\n\ttitle = \"We'll be right back\",\n\tdescription = \"We're upgrading the service. Please refresh in a few minutes.\",\n\teta,\n\tstatusLink,\n}: MaintenancePageProps) {\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"maintenance-page\"\n\t\t\tdirection=\"column\"\n\t\t\tminH=\"100vh\"\n\t\t\tbg=\"bg-canvas\"\n\t\t>\n\t\t\t{logo && (\n\t\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t\t{logo}\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t\t<Flex\n\t\t\t\tflex=\"1\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tpx=\"8\"\n\t\t\t\tpb=\"16\"\n\t\t\t\ttextAlign=\"center\"\n\t\t\t>\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h1\"\n\t\t\t\t\tfontSize=\"3xl\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\tmb=\"4\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</Heading>\n\t\t\t\t{description && (\n\t\t\t\t\t<Text fontSize=\"md\" color=\"muted\" lineHeight=\"1.6\" maxW=\"lg\" mb=\"6\">\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{eta && (\n\t\t\t\t\t<Box\n\t\t\t\t\t\tpx=\"4\"\n\t\t\t\t\t\tpy=\"2\"\n\t\t\t\t\t\tborderWidth=\"1px\"\n\t\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t\t\tborderRadius=\"md\"\n\t\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\t\tmb=\"6\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Text fontSize=\"sm\" fontWeight=\"medium\" color=\"emphasized\">\n\t\t\t\t\t\t\t{eta}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Box>\n\t\t\t\t)}\n\t\t\t\t{statusLink && <Box>{statusLink}</Box>}\n\t\t\t</Flex>\n\t\t</Flex>\n\t);\n}\nMaintenancePage.displayName = \"MaintenancePage\";\n","// src/templates/marketing-page-template.tsx\n//\n// MarketingPageTemplate — full-bleed landing-page chrome. No app shell, no\n// sidebar, no rail. Used for product landing pages, \"about us\", coming-\n// soon teasers, and other unauthenticated marketing surfaces.\n//\n// Composition (top to bottom):\n//\n// ┌──────────────────────────────────────────┐\n// │ topbar (logo · nav · CTA) │\n// ├──────────────────────────────────────────┤\n// │ hero (eyebrow · title · subtitle · CTAs) │\n// ├──────────────────────────────────────────┤\n// │ children (feature sections, testimonials) │\n// ├──────────────────────────────────────────┤\n// │ footer (copyright, links) │\n// └──────────────────────────────────────────┘\n//\n// The template aims for the same refined-minimalism aesthetic as the rest\n// of anker — calm surfaces, generous spacing on the hero only, brand\n// colors used as accents rather than full backgrounds. No carousels, no\n// animated parallax, no auto-rotating testimonials.\n\nimport type { ReactNode } from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface MarketingPageTemplateProps {\n\t/** Logo or wordmark, far-left of the topbar. */\n\tlogo?: ReactNode;\n\t/** Navigation links and/or sign-in CTA, far-right of the topbar. */\n\ttopBarRight?: ReactNode;\n\t/** Hide the topbar (rare). */\n\thideTopBar?: boolean;\n\t/** Eyebrow above the hero title (uppercase, muted). */\n\theroEyebrow?: ReactNode;\n\t/** Hero title — large display text. */\n\theroTitle?: ReactNode;\n\t/** Hero subtitle — one-paragraph value statement. */\n\theroSubtitle?: ReactNode;\n\t/** Hero CTAs — typically one solid button + one ghost link. */\n\theroActions?: ReactNode;\n\t/** Optional visual rendered to the right of the hero copy on wide viewports. */\n\theroVisual?: ReactNode;\n\t/**\n\t * Feature sections, testimonials, etc. Rendered with `maxW=\"6xl\"` and\n\t * `marginInline=\"auto\"` so content tracks a consistent reading column.\n\t */\n\tchildren?: ReactNode;\n\t/** Footer content — copyright, secondary nav, contact. */\n\tfooter?: ReactNode;\n}\n\nexport function MarketingPageTemplate({\n\tlogo,\n\ttopBarRight,\n\thideTopBar,\n\theroEyebrow,\n\theroTitle,\n\theroSubtitle,\n\theroActions,\n\theroVisual,\n\tchildren,\n\tfooter,\n}: MarketingPageTemplateProps) {\n\treturn (\n\t\t<Box data-testid=\"marketing-page-template\" minH=\"100vh\" bg=\"bg-canvas\">\n\t\t\t{!hideTopBar && (\n\t\t\t\t<Flex\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t\tpx=\"8\"\n\t\t\t\t\tpy=\"4\"\n\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\tborderBottomWidth=\"1px\"\n\t\t\t\t\tborderBottomColor=\"border\"\n\t\t\t\t>\n\t\t\t\t\t<Box>{logo}</Box>\n\t\t\t\t\t<Flex gap=\"6\" align=\"center\" fontSize=\"sm\" color=\"emphasized\">\n\t\t\t\t\t\t{topBarRight}\n\t\t\t\t\t</Flex>\n\t\t\t\t</Flex>\n\t\t\t)}\n\n\t\t\t{(heroEyebrow || heroTitle || heroSubtitle || heroActions) && (\n\t\t\t\t<Box px=\"8\" py=\"20\" bg=\"bg-canvas\">\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tmaxW=\"6xl\"\n\t\t\t\t\t\tmarginInline=\"auto\"\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tgap=\"12\"\n\t\t\t\t\t\tdirection={{ base: \"column\", md: \"row\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Box flex=\"1\" minW=\"0\">\n\t\t\t\t\t\t\t{heroEyebrow && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tfontSize=\"2xs\"\n\t\t\t\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\t\t\t\tletterSpacing=\"wider\"\n\t\t\t\t\t\t\t\t\ttextTransform=\"uppercase\"\n\t\t\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\t\t\tmb=\"3\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heroEyebrow}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{heroTitle && (\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tas=\"h1\"\n\t\t\t\t\t\t\t\t\tfontSize={{ base: \"4xl\", md: \"6xl\" }}\n\t\t\t\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\t\t\t\t\tlineHeight=\"1.05\"\n\t\t\t\t\t\t\t\t\tmb=\"5\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heroTitle}\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{heroSubtitle && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tfontSize=\"lg\"\n\t\t\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\t\t\tlineHeight=\"1.6\"\n\t\t\t\t\t\t\t\t\tmaxW=\"2xl\"\n\t\t\t\t\t\t\t\t\tmb=\"8\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heroSubtitle}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{heroActions && (\n\t\t\t\t\t\t\t\t<Flex gap=\"3\" align=\"center\">\n\t\t\t\t\t\t\t\t\t{heroActions}\n\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t{heroVisual && (\n\t\t\t\t\t\t\t<Box flex=\"1\" minW=\"0\" display={{ base: \"none\", md: \"block\" }}>\n\t\t\t\t\t\t\t\t{heroVisual}\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Flex>\n\t\t\t\t</Box>\n\t\t\t)}\n\n\t\t\t{children && (\n\t\t\t\t<Box px=\"8\" py=\"16\">\n\t\t\t\t\t<Box maxW=\"6xl\" marginInline=\"auto\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Box>\n\t\t\t\t</Box>\n\t\t\t)}\n\n\t\t\t{footer && (\n\t\t\t\t<Box\n\t\t\t\t\tpx=\"8\"\n\t\t\t\t\tpy=\"8\"\n\t\t\t\t\tbg=\"bg-subtle\"\n\t\t\t\t\tborderTopWidth=\"1px\"\n\t\t\t\t\tborderTopColor=\"border\"\n\t\t\t\t>\n\t\t\t\t\t<Box maxW=\"6xl\" marginInline=\"auto\">\n\t\t\t\t\t\t{footer}\n\t\t\t\t\t</Box>\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t</Box>\n\t);\n}\nMarketingPageTemplate.displayName = \"MarketingPageTemplate\";\n","// src/templates/settings-page-template.tsx\n//\n// SettingsPageTemplate — for any \"preferences / configuration\" page that\n// uses a tabbed split between mixed form / list content.\n//\n// ┌─────────────────────────────────────────┐\n// │ PageHeader (breadcrumbs · title · …) │\n// ├─────────────────────────────────────────┤\n// │ Tabs (required for settings) │\n// ├─────────────────────────────────────────┤\n// │ children OR bodyTabs panes │\n// └─────────────────────────────────────────┘\n//\n// Two ways to render tabs (mutually exclusive):\n//\n// 1. `bodyTabs` — declarative panels owned by the template. Template\n// wraps Tabs.Root with `lazyMount unmountOnExit`. Prefer this for\n// settings pages.\n//\n// 2. `tabs` + `children` — consumer owns Tabs.Root and Tabs.Content.\n// Retained for back-compat / advanced cases.\n\nimport type { ReactNode } from \"react\";\nimport { PageHeader, type PageHeaderProps } from \"../components/page-header\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Tabs } from \"../primitives/tabs\";\nimport { useRegisteredPageActions } from \"./app-shell\";\nimport type { BodyTabsProp } from \"./detail-page-template\";\n\nexport type { BodyTabsItem, BodyTabsProp } from \"./detail-page-template\";\n\nexport interface SettingsPageTemplateProps\n\textends Pick<\n\t\tPageHeaderProps,\n\t\t\"breadcrumbs\" | \"title\" | \"subtitle\" | \"eyebrow\"\n\t> {\n\tactions?: ReactNode;\n\t/**\n\t * Tab strip (consumer-owned). Mutually exclusive with `bodyTabs`.\n\t * Settings pages should always have at least two tabs — if you only\n\t * have one section, use DetailPageTemplate instead.\n\t */\n\ttabs?: ReactNode;\n\t/**\n\t * Owned-panel tabs. Template renders Tabs.Root with `lazyMount\n\t * unmountOnExit`; only the active item's `content` mounts. Mutually\n\t * exclusive with `tabs`.\n\t */\n\tbodyTabs?: BodyTabsProp;\n\t/** Page body when `bodyTabs` is not set. */\n\tchildren?: ReactNode;\n\t/**\n\t * Constrain the body width for readability. @default \"3xl\" (= 768px).\n\t * Pass `\"full\"` to disable the constraint entirely.\n\t */\n\tmaxBodyWidth?: string;\n\t/**\n\t * Padding applied to the body between the tab strip and the page\n\t * content. @default \"default\" (`px=\"8\" pt=\"6\"`). Pass `\"none\"` to\n\t * render flush.\n\t */\n\tbodyPadding?: \"default\" | \"none\";\n}\n\nexport function SettingsPageTemplate({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\teyebrow,\n\tactions,\n\ttabs,\n\tbodyTabs,\n\tchildren,\n\tmaxBodyWidth = \"3xl\",\n\tbodyPadding = \"default\",\n}: SettingsPageTemplateProps) {\n\tif (tabs && bodyTabs) {\n\t\tthrow new Error(\n\t\t\t\"SettingsPageTemplate: `tabs` and `bodyTabs` are mutually exclusive — use `bodyTabs` for owned panels, `tabs` for consumer-owned tab strips.\",\n\t\t);\n\t}\n\tconst registered = useRegisteredPageActions();\n\tconst resolvedActions = actions ?? registered;\n\tconst bodyPx = bodyPadding === \"none\" ? \"0\" : \"8\";\n\tconst bodyPt = bodyPadding === \"none\" ? \"0\" : \"6\";\n\n\tconst renderBody = (node: ReactNode) => (\n\t\t<Box flex=\"1\" minH=\"0\" px={bodyPx} pt={bodyPt}>\n\t\t\t<Box\n\t\t\t\tmaxW={maxBodyWidth}\n\t\t\t\tmarginInline={maxBodyWidth === \"full\" ? \"0\" : \"auto\"}\n\t\t\t>\n\t\t\t\t{node}\n\t\t\t</Box>\n\t\t</Box>\n\t);\n\n\tif (bodyTabs) {\n\t\tconst tabsRootProps =\n\t\t\tbodyTabs.value !== undefined\n\t\t\t\t? {\n\t\t\t\t\t\tvalue: bodyTabs.value,\n\t\t\t\t\t\tonValueChange: (d: { value: string }) =>\n\t\t\t\t\t\t\tbodyTabs.onValueChange!(d.value),\n\t\t\t\t\t}\n\t\t\t\t: { defaultValue: bodyTabs.defaultValue };\n\t\treturn (\n\t\t\t<Flex\n\t\t\t\tdata-testid=\"settings-page-template\"\n\t\t\t\tdirection=\"column\"\n\t\t\t\tflex=\"1\"\n\t\t\t\tminH=\"0\"\n\t\t\t>\n\t\t\t\t<PageHeader\n\t\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tsubtitle={subtitle}\n\t\t\t\t\teyebrow={eyebrow}\n\t\t\t\t\tactions={resolvedActions}\n\t\t\t\t/>\n\t\t\t\t<Tabs.Root lazyMount unmountOnExit {...tabsRootProps}>\n\t\t\t\t\t<Box>\n\t\t\t\t\t\t<Tabs.List>\n\t\t\t\t\t\t\t{bodyTabs.items.map((item) => (\n\t\t\t\t\t\t\t\t<Tabs.Trigger key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</Tabs.Trigger>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Tabs.List>\n\t\t\t\t\t</Box>\n\t\t\t\t\t{renderBody(\n\t\t\t\t\t\tbodyTabs.items.map((item) => (\n\t\t\t\t\t\t\t<Tabs.Content key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t{item.content}\n\t\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t)),\n\t\t\t\t\t)}\n\t\t\t\t</Tabs.Root>\n\t\t\t</Flex>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Flex\n\t\t\tdata-testid=\"settings-page-template\"\n\t\t\tdirection=\"column\"\n\t\t\tflex=\"1\"\n\t\t\tminH=\"0\"\n\t\t>\n\t\t\t<PageHeader\n\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\ttitle={title}\n\t\t\t\tsubtitle={subtitle}\n\t\t\t\teyebrow={eyebrow}\n\t\t\t\tactions={resolvedActions}\n\t\t\t/>\n\t\t\t<Box>{tabs}</Box>\n\t\t\t{renderBody(children)}\n\t\t</Flex>\n\t);\n}\nSettingsPageTemplate.displayName = \"SettingsPageTemplate\";\n"]}
|