@lonik/prestige 0.13.0 → 0.13.1

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/dist/client.d.ts CHANGED
@@ -92,16 +92,12 @@ declare module "virtual:prestige/config" {
92
92
  url: string;
93
93
  }
94
94
 
95
- interface PrestigeShellProps {
96
- github?: string;
97
- algolia?: AlgoliaOptions;
98
- license?: LicenseOptions;
99
- }
100
-
101
95
  interface PrestigeConfig {
102
96
  title: string;
103
97
  collections: unknown[];
104
- prestigeShellProps?: PrestigeShellProps;
98
+ github?: string;
99
+ algolia?: AlgoliaOptions;
100
+ license?: LicenseOptions;
105
101
  markdown?: {
106
102
  gfmOptions?: unknown;
107
103
  rehypePlugins?: unknown;
package/dist/ui.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as SidebarType } from "./content.types-Iwprk4Pj.js";
2
2
  import { TocItem } from "remark-flexible-toc";
3
3
  import React, { PropsWithChildren, ReactNode } from "react";
4
- import * as react_jsx_runtime4 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
6
6
  import { ErrorComponentProps } from "@tanstack/react-router";
7
7
 
@@ -18,7 +18,7 @@ declare function Aside({
18
18
  children,
19
19
  className,
20
20
  ...props
21
- }: AsideProps): react_jsx_runtime4.JSX.Element;
21
+ }: AsideProps): react_jsx_runtime0.JSX.Element;
22
22
  //#endregion
23
23
  //#region src/ui/components/code/code.d.ts
24
24
  interface CodeProps {
@@ -28,7 +28,7 @@ interface CodeProps {
28
28
  declare function Code({
29
29
  code,
30
30
  language
31
- }: CodeProps): react_jsx_runtime4.JSX.Element;
31
+ }: CodeProps): react_jsx_runtime0.JSX.Element;
32
32
  //#endregion
33
33
  //#region src/ui/components/package-managers/package-managers.d.ts
34
34
  type CommandType = "add" | "create" | "exec" | "run";
@@ -49,7 +49,7 @@ declare function PackageManagers({
49
49
  dev,
50
50
  args,
51
51
  className
52
- }: PackageManagersProps): react_jsx_runtime4.JSX.Element;
52
+ }: PackageManagersProps): react_jsx_runtime0.JSX.Element;
53
53
  //#endregion
54
54
  //#region src/ui/components/steps/step-item.d.ts
55
55
  type StepItemProps = PropsWithChildren<{
@@ -60,50 +60,36 @@ declare function StepItem({
60
60
  children,
61
61
  label,
62
62
  index
63
- }: StepItemProps): react_jsx_runtime4.JSX.Element;
63
+ }: StepItemProps): react_jsx_runtime0.JSX.Element;
64
64
  //#endregion
65
65
  //#region src/ui/components/steps/steps.d.ts
66
66
  type StepsProps = PropsWithChildren;
67
67
  declare function Steps({
68
68
  children
69
- }: StepsProps): react_jsx_runtime4.JSX.Element;
69
+ }: StepsProps): react_jsx_runtime0.JSX.Element;
70
70
  //#endregion
71
71
  //#region src/ui/components/tabs/tabs.d.ts
72
72
  declare function Tabs({
73
73
  orientation,
74
74
  className,
75
75
  ...props
76
- }: Tabs$1.Root.Props): react_jsx_runtime4.JSX.Element;
76
+ }: Tabs$1.Root.Props): react_jsx_runtime0.JSX.Element;
77
77
  declare function TabsList({
78
78
  className,
79
79
  ...props
80
- }: Tabs$1.List.Props): react_jsx_runtime4.JSX.Element;
80
+ }: Tabs$1.List.Props): react_jsx_runtime0.JSX.Element;
81
81
  declare function TabsTrigger({
82
82
  className,
83
83
  ...props
84
- }: Tabs$1.Tab.Props): react_jsx_runtime4.JSX.Element;
84
+ }: Tabs$1.Tab.Props): react_jsx_runtime0.JSX.Element;
85
85
  declare function TabsContent({
86
86
  className,
87
87
  ...props
88
- }: Tabs$1.Panel.Props): react_jsx_runtime4.JSX.Element;
88
+ }: Tabs$1.Panel.Props): react_jsx_runtime0.JSX.Element;
89
89
  //#endregion
90
90
  //#region src/ui/routes/prestige-shell.d.ts
91
91
  type RenderNode = () => ReactNode;
92
- interface AlgoliaOptions {
93
- appId: string;
94
- apiKey: string;
95
- indices: string[];
96
- }
97
- interface LicenseOptions {
98
- label: string;
99
- url: string;
100
- }
101
- interface PrestigeSerializableShellProps {
102
- github?: string | undefined;
103
- algolia?: AlgoliaOptions | undefined;
104
- license?: LicenseOptions | undefined;
105
- }
106
- interface PrestigeShellProps extends PrestigeSerializableShellProps {
92
+ interface PrestigeShellProps {
107
93
  customHeaderTitle?: RenderNode | undefined;
108
94
  copyright?: RenderNode | undefined;
109
95
  }
@@ -113,7 +99,7 @@ declare function PrestigeShell({
113
99
  }: {
114
100
  children: ReactNode;
115
101
  options?: PrestigeShellProps;
116
- }): react_jsx_runtime4.JSX.Element;
102
+ }): react_jsx_runtime0.JSX.Element;
117
103
  //#endregion
118
104
  //#region src/ui/core/header/header.d.ts
119
105
  type HeaderProps = Pick<PrestigeShellProps, "customHeaderTitle" | "algolia" | "github">;
@@ -121,7 +107,7 @@ declare function Header({
121
107
  customHeaderTitle,
122
108
  algolia,
123
109
  github
124
- }: HeaderProps): react_jsx_runtime4.JSX.Element;
110
+ }: HeaderProps): react_jsx_runtime0.JSX.Element;
125
111
  //#endregion
126
112
  //#region src/ui/core/prestige-page.d.ts
127
113
  interface PrestigePageProps {
@@ -131,11 +117,11 @@ interface PrestigePageProps {
131
117
  declare function PrestigePage({
132
118
  children,
133
119
  toc
134
- }: PrestigePageProps): react_jsx_runtime4.JSX.Element;
120
+ }: PrestigePageProps): react_jsx_runtime0.JSX.Element;
135
121
  //#endregion
136
122
  //#region src/ui/routes/collection/collection.route.d.ts
137
123
  declare function CollectionRoute(sidebar: SidebarType, id: string): {
138
- component: () => react_jsx_runtime4.JSX.Element;
124
+ component: () => react_jsx_runtime0.JSX.Element;
139
125
  };
140
126
  //#endregion
141
127
  //#region src/ui/routes/content/content.route.d.ts
@@ -143,12 +129,12 @@ declare function ContentRoute(inlineData: any): any;
143
129
  declare function LazyContentRoute(inlineData: any): any;
144
130
  //#endregion
145
131
  //#region src/ui/routes/not-found.d.ts
146
- declare function PrestigeNotFoundComponent(): react_jsx_runtime4.JSX.Element;
132
+ declare function PrestigeNotFoundComponent(): react_jsx_runtime0.JSX.Element;
147
133
  //#endregion
148
134
  //#region src/ui/routes/prestige-error.d.ts
149
135
  declare function PrestigeErrorComponent({
150
136
  error
151
- }: ErrorComponentProps): react_jsx_runtime4.JSX.Element;
137
+ }: ErrorComponentProps): react_jsx_runtime0.JSX.Element;
152
138
  //#endregion
153
- export { Aside, type AsideProps, type AsideType, Code, type CodeProps, CollectionRoute, ContentRoute, Header, LazyContentRoute, PackageManagers, type PackageManagersProps, PrestigeErrorComponent, PrestigeNotFoundComponent, PrestigePage, type PrestigePageProps, type PrestigeSerializableShellProps, PrestigeShell, type PrestigeShellProps, StepItem, type StepItemProps, Steps, type StepsProps, Tabs, TabsContent, TabsList, TabsTrigger };
139
+ export { Aside, type AsideProps, type AsideType, Code, type CodeProps, CollectionRoute, ContentRoute, Header, LazyContentRoute, PackageManagers, type PackageManagersProps, PrestigeErrorComponent, PrestigeNotFoundComponent, PrestigePage, type PrestigePageProps, PrestigeShell, type PrestigeShellProps, StepItem, type StepItemProps, Steps, type StepsProps, Tabs, TabsContent, TabsList, TabsTrigger };
154
140
  //# sourceMappingURL=ui.d.ts.map
package/dist/ui.js CHANGED
@@ -778,26 +778,22 @@ function Footer({ copyright, license }) {
778
778
  //#endregion
779
779
  //#region src/ui/routes/prestige-shell.tsx
780
780
  function PrestigeShell({ children, options }) {
781
- const resolvedOptions = {
782
- ...config.prestigeShellProps,
783
- ...options
784
- };
785
781
  return /* @__PURE__ */ jsxs(ThemeProvider, {
786
782
  attribute: "data-theme",
787
783
  defaultTheme: "system",
788
784
  children: [
789
785
  /* @__PURE__ */ jsx(Header, {
790
- algolia: resolvedOptions.algolia,
791
- customHeaderTitle: resolvedOptions.customHeaderTitle,
792
- ...resolvedOptions
786
+ algolia: config.algolia,
787
+ customHeaderTitle: options?.customHeaderTitle,
788
+ github: config.github
793
789
  }),
794
790
  /* @__PURE__ */ jsx("main", {
795
791
  className: "min-h-[calc(100vh-var(--spacing-header))]",
796
792
  children
797
793
  }),
798
794
  /* @__PURE__ */ jsx(Footer, {
799
- license: resolvedOptions.license,
800
- copyright: resolvedOptions.copyright
795
+ license: config.license,
796
+ copyright: options?.copyright
801
797
  })
802
798
  ]
803
799
  });
package/dist/ui.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","names":["typeMap: Record<AsideType, string>","defaultTitles: Record<AsideType, string>","TabsPrimitive","MANAGERS: PackageManager[]","parts: string[]","currentTheme: ThemeValue","metas: Array<\n | { name?: string; content?: string; title?: string }\n | Record<string, any>\n >","resolvedOptions: PrestigeShellProps"],"sources":["../src/ui/components/aside/aside.tsx","../src/ui/components/code/code.tsx","../src/ui/components/tabs/tabs.tsx","../src/ui/components/package-managers/package-managers.tsx","../src/ui/components/steps/step-item.tsx","../src/ui/components/steps/steps.tsx","../src/ui/core/github/github.tsx","../src/ui/core/search/search.tsx","../src/ui/core/theme/theme.tsx","../src/ui/core/header/header.tsx","../src/ui/routes/content/table-of-contents/use-table-of-contents.ts","../src/ui/routes/content/table-of-contents/mobile-table-of-contents.tsx","../src/ui/routes/content/table-of-contents/web-table-of-contents.tsx","../src/ui/core/prestige-page.tsx","../src/ui/routes/content/content-navigations.tsx","../src/ui/utils.ts","../src/ui/routes/collection/sidebar.tsx","../src/ui/routes/collection/mobile-sidebar.tsx","../src/ui/routes/collection/collection.route.tsx","../src/ui/routes/content/content.route.tsx","../src/ui/routes/not-found.tsx","../src/ui/routes/prestige-error.tsx","../src/ui/core/footer/footer.tsx","../src/ui/routes/prestige-shell.tsx"],"sourcesContent":["import React from \"react\";\n\nexport type AsideType = \"note\" | \"tip\" | \"caution\" | \"danger\";\n\nexport interface AsideProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n type?: AsideType;\n title?: React.ReactNode;\n children: React.ReactNode;\n}\n\nconst typeMap: Record<AsideType, string> = {\n note: \"bg-blue-50/50 dark:bg-blue-900/20 border-blue-500 text-blue-900 dark:text-blue-200\",\n tip: \"bg-purple-50/50 dark:bg-purple-900/20 border-purple-500 text-purple-900 dark:text-purple-200\",\n caution:\n \"bg-yellow-50/50 dark:bg-yellow-900/20 border-yellow-500 text-yellow-900 dark:text-yellow-200\",\n danger:\n \"bg-red-50/50 dark:bg-red-900/20 border-red-500 text-red-900 dark:text-red-200\",\n};\n\nconst defaultTitles: Record<AsideType, string> = {\n note: \"Note\",\n tip: \"Tip\",\n caution: \"Caution\",\n danger: \"Danger\",\n};\n\nexport function Aside({\n type = \"note\",\n title,\n children,\n className,\n ...props\n}: AsideProps) {\n const iconProps = {\n className: \"w-5 h-5 flex-shrink-0\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n };\n\n const Icon = () => {\n switch (type) {\n case \"note\":\n return (\n <svg {...iconProps}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n case \"tip\":\n return (\n <svg {...iconProps}>\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\" />\n <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n </svg>\n );\n case \"caution\":\n return (\n <svg {...iconProps}>\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n case \"danger\":\n return (\n <svg {...iconProps}>\n <polygon points=\"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n );\n default:\n return null;\n }\n };\n\n return (\n <aside\n aria-label={defaultTitles[type]}\n className={`relative my-6 px-4 py-3 border-l-4 rounded-lg ${typeMap[type]} ${className || \"\"}`}\n {...props}\n >\n <p className=\"flex items-center gap-2 mb-2 mt-0 font-bold text-lg\">\n <span>\n <Icon />\n </span>\n {title || defaultTitles[type]}\n </p>\n <section className=\"[&>p]:mt-0 [&>p]:mb-2 [&>p:last-child]:mb-0\">\n {children}\n </section>\n </aside>\n );\n}\n","import clsx from \"clsx\";\nimport { Highlight } from \"prism-react-renderer\";\n\nexport interface CodeProps {\n code: string;\n language?: string;\n}\n\nexport function Code({ code, language = \"tsx\" }: CodeProps) {\n // Use a fragment or div, but ensure `render` actually exists before injecting\n return (\n <Highlight code={code} language={language}>\n {({ className, tokens, getLineProps, getTokenProps }) => (\n <pre className={clsx(\"not-prose\", className)}>\n <code className={clsx(\"code-highlight\", className)}>\n {tokens.map((line, i) => (\n <div key={i} {...getLineProps({ line })} style={undefined}>\n {line.map((token, key) => (\n <span\n key={key}\n {...getTokenProps({ token })}\n style={undefined}\n />\n ))}\n </div>\n ))}\n </code>\n </pre>\n )}\n </Highlight>\n );\n}\n","import { Tabs as TabsPrimitive } from \"@base-ui/react/tabs\";\n\nfunction Tabs({\n orientation = \"horizontal\",\n className,\n ...props\n}: TabsPrimitive.Root.Props) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n className={`w-full ${className || \"\"}`}\n {...props}\n />\n );\n}\n\nfunction TabsList({ className, ...props }: TabsPrimitive.List.Props) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={`flex w-full overflow-x-auto border-b border-default-200 no-scrollbar ${\n className || \"\"\n }`}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n <TabsPrimitive.Tab\n data-slot=\"tabs-trigger\"\n className={`\n -mb-px flex items-center justify-center whitespace-nowrap border-b-2 border-transparent \n px-4 py-2.5 text-sm font-medium transition-colors cursor-pointer\n text-default-600 hover:text-default-900 hover:border-default-300\n aria-selected:border-primary-500 aria-selected:text-primary-500 \n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2\n disabled:pointer-events-none disabled:opacity-50\n ${className || \"\"}\n `}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return (\n <TabsPrimitive.Panel\n data-slot=\"tabs-content\"\n className={`mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 ${\n className || \"\"\n }`}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import { Code } from \"../code/code\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"../tabs/tabs\"; // Adjust import path\n\ntype PackageManager = \"npm\" | \"pnpm\" | \"yarn\" | \"bun\";\ntype CommandType = \"add\" | \"create\" | \"exec\" | \"run\";\n\nexport interface PackageManagersProps {\n /** The name of the package (e.g., \"@lonik/themer\") */\n pkg?: string;\n /** The type of command to generate. Defaults to \"add\" */\n type?: CommandType;\n /** Whether this is a development dependency (-D) */\n dev?: boolean;\n /** Additional arguments to append to the command */\n args?: string;\n className?: string;\n}\n\nconst MANAGERS: PackageManager[] = [\"npm\", \"pnpm\", \"yarn\", \"bun\"];\n\nfunction generateCommand(\n pm: PackageManager,\n type: CommandType,\n pkg?: string,\n dev?: boolean,\n args?: string,\n) {\n const parts: string[] = [];\n\n switch (type) {\n case \"add\":\n parts.push(pm === \"npm\" ? \"npm install\" : `${pm} add`);\n if (dev) parts.push(\"-D\");\n if (pkg) parts.push(pkg);\n break;\n case \"create\":\n parts.push(`${pm} create`);\n if (pkg) parts.push(pkg);\n break;\n case \"exec\":\n if (pm === \"npm\") parts.push(\"npx\");\n else if (pm === \"bun\") parts.push(\"bun x\");\n else parts.push(`${pm} dlx`);\n if (pkg) parts.push(pkg);\n break;\n case \"run\":\n parts.push(pm === \"yarn\" ? \"yarn\" : `${pm} run`);\n if (pkg) parts.push(pkg);\n break;\n }\n\n if (args) {\n // If it's npm and we are passing args to an exec/run script, we often need '--'\n if (pm === \"npm\" && (type === \"exec\" || type === \"run\")) {\n parts.push(\"--\");\n }\n parts.push(args);\n }\n\n return parts.join(\" \");\n}\n\nexport function PackageManagers({\n pkg,\n type = \"add\",\n dev = false,\n args,\n className,\n}: PackageManagersProps) {\n return (\n <Tabs defaultValue=\"npm\" className={`my-6 ${className || \"\"}`}>\n <TabsList>\n {MANAGERS.map((pm) => (\n <TabsTrigger key={pm} value={pm}>\n {pm.toLowerCase()}\n </TabsTrigger>\n ))}\n </TabsList>\n\n {MANAGERS.map((pm) => {\n const command = generateCommand(pm, type, pkg, dev, args);\n\n return (\n <TabsContent keepMounted={true} key={pm} value={pm}>\n <Code code={command} language=\"bash\"></Code>\n </TabsContent>\n );\n })}\n </Tabs>\n );\n}\n","import { PropsWithChildren } from \"react\";\n\nexport type StepItemProps = PropsWithChildren<{\n index: number | string;\n label: string;\n}>;\n\nexport function StepItem({ children, label, index }: StepItemProps) {\n return (\n <li className=\"group list-none\">\n <div className=\"flex items-start gap-2\">\n <div className=\"rounded-full flex justify-center items-center text-base font-medium w-8 h-8 bg-primary-50 text-primary-400 border-2 border-primary-400\">\n {index}\n </div>\n <h3 className=\"text-default-600 mt-1\">{label}</h3>\n </div>\n <div className=\"pb-6 group-last:pb-0 border-l-2 border-l-default-200 pl-6 ml-4 mt-1 mb-4 text-default-600\">\n {children}\n </div>\n </li>\n );\n}\n","import { PropsWithChildren } from \"react\";\n\nexport type StepsProps = PropsWithChildren;\n\nexport function Steps({ children }: StepsProps) {\n return <ul>{children}</ul>;\n}\n","import { Github } from \"lucide-react\";\n\nexport function GitHub({ github }: { github: string | undefined }) {\n if (!github) {\n return null;\n }\n\n return (\n <a\n href={github}\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"GitHub repository\"\n title=\"GitHub repository\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded border border-default-200 bg-default-50 text-default-500 hover:bg-default-100\"\n >\n <Github size={16} />\n </a>\n );\n}\n","import \"@docsearch/css\";\nimport { DocSearch } from \"@docsearch/react\";\nimport { AlgoliaOptions } from \"../../routes/prestige-shell\";\n\nexport function Search({\n algolia,\n}: {\n // 2. Add 'typeof' to extract the type from the value\n algolia: AlgoliaOptions | undefined;\n}) {\n if (!algolia) {\n return null;\n }\n\n return (\n <div className=\"prestige-search\">\n <DocSearch\n appId={algolia.appId}\n apiKey={algolia.apiKey}\n indices={algolia.indices}\n />\n </div>\n );\n}\n","import { useTheme } from \"@lonik/themer\";\nimport { useHydrated } from \"@tanstack/react-router\";\nimport { Moon, Sun, SunMoon } from \"lucide-react\";\n\nconst themeOrder = [\"system\", \"light\", \"dark\"] as const;\ntype ThemeValue = (typeof themeOrder)[number];\n\nexport function Theme() {\n const { theme, setTheme } = useTheme();\n const currentTheme: ThemeValue = (theme as ThemeValue) ?? \"system\";\n const hydrated = useHydrated();\n\n const nextTheme = (value: ThemeValue): ThemeValue => {\n const index = themeOrder.indexOf(value);\n return themeOrder[(index + 1) % themeOrder.length]!;\n };\n\n const icon =\n currentTheme === \"light\" ? (\n <Sun size={16} />\n ) : currentTheme === \"dark\" ? (\n <Moon size={16} />\n ) : (\n <SunMoon size={16} />\n );\n\n return (\n <button\n suppressHydrationWarning\n type=\"button\"\n aria-label={`Theme: ${currentTheme}. Click to switch theme`}\n title={`Theme: ${currentTheme}`}\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md border border-default-200 bg-default-50 text-default-500 hover:bg-default-100 cursor-pointer\"\n onClick={() => setTheme(nextTheme(currentTheme))}\n >\n {hydrated && icon}\n </button>\n );\n}\n","import { Link, useLocation } from \"@tanstack/react-router\";\nimport collections from \"virtual:prestige/collection-all\";\nimport config from \"virtual:prestige/config\";\nimport { PrestigeShellProps } from \"../../routes/prestige-shell\";\nimport { GitHub } from \"../github/github\";\nimport { Search } from \"../search/search\";\nimport { Theme } from \"../theme/theme\";\n\nexport type HeaderProps = Pick<\n PrestigeShellProps,\n \"customHeaderTitle\" | \"algolia\" | \"github\"\n>;\n\nexport default function Header({\n customHeaderTitle,\n algolia,\n github,\n}: HeaderProps) {\n const location = useLocation();\n\n return (\n <header className=\"sticky top-0 z-40 flex h-header border-b border-default-200 bg-default-50/80 px-4 backdrop-blur-md\">\n <div className=\"container mx-auto flex items-center justify-between\">\n <div className=\"flex gap-4 items-center\">\n <Link\n activeProps={{\n className: \"border-default-800 text-default-800 font-medium\",\n }}\n className=\"text-sm rounded hover:bg-default-100 text-default-500\"\n to={\"/\"}\n >\n {customHeaderTitle ? (\n customHeaderTitle()\n ) : (\n <span>{config.title}</span>\n )}\n </Link>\n {collections.map((collection) => {\n const isActive =\n location.pathname === `/${collection.id}` ||\n location.pathname.startsWith(`/${collection.id}/`);\n\n return (\n <Link\n key={collection.id}\n to={`/${collection.defaultLink}` as any}\n className={`border-b-2 text-sm rounded hover:bg-default-100 active:bg-default-200 capitalize ${\n isActive\n ? \"border-default-800 text-default-800 font-medium\"\n : \"border-b-transparent text-default-500\"\n }`}\n >\n {collection.label}\n </Link>\n );\n })}\n </div>\n <div className=\"flex items-center gap-2\">\n <Search algolia={algolia} />\n <GitHub github={github} />\n <Theme />\n </div>\n </div>\n </header>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\n\nexport function useTableOfContents(toc: TocItem[]) {\n const [activeId, setActiveId] = useState<string>(\"\");\n\n useEffect(() => {\n if (toc.length === 0) return;\n\n const handleScroll = () => {\n const headingElements = toc\n .map((item) => {\n const id = item.href.startsWith(\"#\") ? item.href.slice(1) : item.href;\n return document.getElementById(id);\n })\n .filter((el): el is HTMLElement => el !== null);\n\n // Add a slight offset to account for sticky headers or top padding\n const scrollPosition = window.scrollY + 100;\n\n let currentActiveId = \"\";\n for (let i = headingElements.length - 1; i >= 0; i--) {\n const element = headingElements[i];\n if (element && element.offsetTop <= scrollPosition) {\n currentActiveId = element.id;\n break;\n }\n }\n\n // If we haven't scrolled past the first heading, highlight the first one\n if (!currentActiveId && headingElements.length > 0 && headingElements[0]) {\n currentActiveId = headingElements[0].id;\n }\n\n setActiveId(currentActiveId ? `#${currentActiveId}` : \"\");\n };\n\n window.addEventListener(\"scroll\", handleScroll, { passive: true });\n // setTimeout to ensure DOM is fully rendered when checking initial offsets\n setTimeout(handleScroll, 100);\n\n return () => window.removeEventListener(\"scroll\", handleScroll);\n }, [toc]);\n\n const handleLinkClick = (e: React.MouseEvent<HTMLAnchorElement>, href: string) => {\n e.preventDefault();\n const id = href.startsWith(\"#\") ? href.slice(1) : href;\n const element = document.getElementById(id);\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\" });\n // Update URL hash without jumping\n window.history.pushState(null, \"\", href.startsWith(\"#\") ? href : `#${href}`);\n }\n };\n\n return { activeId, handleLinkClick };\n}\n","import clsx from \"clsx\";\nimport { ChevronRight } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport { useTableOfContents } from \"./use-table-of-contents\";\n\nexport function MobileTableOfContent({ toc }: { toc: TocItem[] }) {\n const [isOpen, setIsOpen] = useState(false);\n const { activeId, handleLinkClick } = useTableOfContents(toc);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n if (\n containerRef.current &&\n !containerRef.current.contains(event.target as Node)\n ) {\n setIsOpen(false);\n }\n }\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, []);\n\n const activeItem = toc.find((item) => {\n const itemHref = item.href.startsWith(\"#\") ? item.href : `#${item.href}`;\n return itemHref === activeId;\n });\n\n /* pl-12 is needed for mobile sidebar, because sidebar button is fixed position */\n return (\n <div\n ref={containerRef}\n className=\"sticky top-header z-30 bg-default-50/95 backdrop-blur border-b border-default-200 dark:border-default-800 lg:hidden px-6 pl-12\"\n >\n <div className=\"relative\">\n <button\n onClick={() => setIsOpen((prev) => !prev)}\n className=\"flex w-full items-center justify-between gap-4 px-6 py-3 text-sm text-default-500 font-medium cursor-pointer\"\n >\n <div className=\"flex items-center gap-2\">\n <span>On this page</span>\n <ChevronRight\n className={clsx(\n \"w-4 h-4 transition-transform duration-200\",\n isOpen && \"rotate-90\",\n )}\n />\n </div>\n {activeItem && (\n <span className=\"truncate font-normal max-w-[50%] text-right\">\n {activeItem.value}\n </span>\n )}\n </button>\n\n {isOpen && (\n <div className=\"absolute left-6 right-6 top-full mt-2 max-h-[60vh] overflow-y-auto rounded-lg border border-default-200 bg-default-50 shadow-xl\">\n <ul className=\"p-4 space-y-2.5 text-sm\">\n {toc.map((item) => {\n const itemHref = item.href.startsWith(\"#\")\n ? item.href\n : `#${item.href}`;\n const isActive = activeId === itemHref;\n return (\n <li\n key={itemHref}\n style={{ paddingLeft: `${(item.depth - 1) * 0.75}rem` }}\n >\n <a\n href={itemHref}\n className={clsx(\n \"block transition-colors duration-200 line-clamp-2\",\n isActive\n ? \"text-primary-600 font-medium\"\n : \"text-default-600\",\n )}\n onClick={(e) => {\n handleLinkClick(e, item.href);\n setIsOpen(false);\n }}\n >\n {item.value}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import clsx from \"clsx\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport { useTableOfContents } from \"./use-table-of-contents\";\n\nexport function WebTableOfContent({ toc }: { toc: TocItem[] }) {\n const { activeId, handleLinkClick } = useTableOfContents(toc);\n\n return (\n <nav className=\"sticky top-header pt-4 overflow-y-auto w-web-table-of-content hidden lg:block\">\n <span className=\"text-xs font-mono tracking-widest\">ON THIS PAGE</span>\n <ul className=\"text-sm my-4\">\n {toc.map((item) => (\n <li key={item.href}>\n <a\n style={{ paddingLeft: `${(item.depth - 1) * 0.75}rem` }}\n href={`${item.href}`}\n className={clsx(\n \"border-l py-1 px-4 block hover:text-default-700 dark:hover:text-slate-100 transition-colors duration-200 line-clamp-2\",\n activeId === item.href\n ? \"text-default-700 border-default-600 font-medium\"\n : \"text-default-500 border-default-200 \",\n )}\n onClick={(e) => handleLinkClick(e, item.href)}\n >\n {item.value}\n </a>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n","import React from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport { MobileTableOfContent } from \"../routes/content/table-of-contents/mobile-table-of-contents\";\nimport { WebTableOfContent } from \"../routes/content/table-of-contents/web-table-of-contents\";\n\nexport interface PrestigePageProps {\n children: React.ReactNode;\n toc?: TocItem[];\n}\n\nexport function PrestigePage({ children, toc = [] }: PrestigePageProps) {\n return (\n <div className=\"flex lg:gap-6 items-start max-w-[100vw]\">\n <div className=\"flex-1 min-w-0\">\n <MobileTableOfContent toc={toc} />\n <article className=\"prose wrap-break-word py-15 px-6 max-w-none lg:w-web-content\">\n {children}\n </article>\n </div>\n <WebTableOfContent toc={toc} />\n </div>\n );\n}\n","import { Link } from \"@tanstack/react-router\";\nimport clsx from \"clsx\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\nimport { SiblingNavigationType } from \"../../../vite/core/content/content.types\";\n\nfunction ContentNavigation({\n isNext,\n navigation,\n}: {\n isNext?: boolean;\n navigation: SiblingNavigationType;\n}) {\n const label = isNext ? \"Next\" : \"Previous\";\n return (\n <Link\n to={navigation.link}\n className={clsx(\n \" flex-1 h-20 mb-4 border border-default-200 hover:bg-default-50 rounded-md cursor-pointer flex items-center px-4\",\n isNext ? \"justify-end\" : \"justify-start\",\n )}\n >\n <div\n className={clsx(\n \"flex items-center gap-4\",\n isNext && \"flex-row-reverse\",\n )}\n >\n {isNext ? (\n <ArrowRight className=\"text-default-400\" />\n ) : (\n <ArrowLeft className=\"text-default-400\" />\n )}\n <div className={clsx(\"flex flex-col\", isNext && \"items-end\")}>\n <span className=\"text-xs tracking-widest font-mono\">\n {label.toLocaleUpperCase()}\n </span>\n <span className=\"text-2xl font-li text-default-700\">\n {navigation.label}\n </span>\n </div>\n </div>\n </Link>\n );\n}\n\nexport default function ContentNavigations({\n prev,\n next,\n}: {\n prev: SiblingNavigationType | null | undefined;\n next: SiblingNavigationType | null | undefined;\n}) {\n // width of content navigation must match with content route content width, so we manually\n // add empty div with table-of-content width and add proper gap to match the size\n return (\n <div className=\"flex gap-6\">\n <div className=\"lg:flex flex-row items-center gap-2 mt-2 lg:mt-8 lg:w-web-content w-full\">\n {prev ? (\n <ContentNavigation navigation={prev} />\n ) : (\n <div className=\"flex-1 hidden lg:block \"></div>\n )}\n {next ? (\n <ContentNavigation navigation={next} isNext />\n ) : (\n <div className=\"flex-1 hidden lg:block\"></div>\n )}\n </div>\n <div className=\"lg:w-web-table-of-content h-1\"></div>\n </div>\n );\n}\n","export function isExternalURL(str: string) {\n try {\n const url = new URL(str);\n // This ensures it starts with http or https, filtering out\n // things like 'javascript:alert(1)' or 'mailto:test@test.com'\n return url.protocol === \"http:\" || url.protocol === \"https:\";\n } catch {\n return false;\n }\n}\n","import { Link } from \"@tanstack/react-router\";\nimport clsx from \"clsx\";\nimport { BookOpen, ChevronRight, ExternalLink } from \"lucide-react\";\nimport { useState } from \"react\";\nimport {\n ExternalSidebarLinkType,\n InternalSidebarLinkType,\n SidebarGroupType,\n SidebarType,\n} from \"../../../vite/core/content/content.types\";\nimport { isExternalURL } from \"../../utils\";\n\nexport interface SidebarProps {\n sidebar: SidebarType;\n onLinkClick?: (() => void) | undefined;\n}\n\nfunction SidebarGroup({\n group,\n onLinkClick,\n}: {\n group: SidebarGroupType;\n onLinkClick?: (() => void) | undefined;\n}) {\n const [open, setIsOpen] = useState(!group.collapsed);\n return (\n <div className=\"mt-4 flex flex-col gap-1\">\n <button\n className=\"flex items-center w-full gap-2\"\n onClick={() => setIsOpen((prev) => !prev)}\n >\n <ChevronRight\n size={18}\n className={clsx(\n \"transform transition cursor-pointer ml-1\",\n open && \"rotate-90\",\n )}\n />\n <span className=\"font-mono text-xs tracking-widest\">\n {group.label.toUpperCase()}\n </span>\n </button>\n {open && (\n <div className=\"mb-2 pl-5\">\n {group.items.map((item) => {\n if (\"slug\" in item || \"link\" in item) {\n const key = \"slug\" in item ? item.slug : item.link;\n return (\n <SidebarLink\n showIcon={false}\n key={key}\n link={item}\n onLinkClick={onLinkClick}\n />\n );\n }\n return <SidebarGroup key={item.label} group={item} onLinkClick={onLinkClick} />;\n })}\n </div>\n )}\n </div>\n );\n}\n\nfunction SidebarLink({\n link,\n onLinkClick,\n showIcon,\n}: {\n link: InternalSidebarLinkType | ExternalSidebarLinkType;\n onLinkClick?: (() => void) | undefined;\n showIcon: boolean;\n}) {\n if (\"slug\" in link || !isExternalURL(link.link)) {\n const slug = \"slug\" in link ? `/${link.slug}` : link.link;\n return (\n <div className=\"flex items-center \">\n <Link\n onClick={onLinkClick}\n activeProps={{ className: \"text-default-700 font-medium\" }}\n className=\"w-full inline-flex gap-2 py-1 px-2 rounded hover:bg-default-100 text-sm mr-2 items-center text-default-500\"\n to={slug}\n >\n {showIcon && <BookOpen className=\"w-4\" />}\n {link.label}\n </Link>\n </div>\n );\n } else {\n return (\n <div className=\"flex items-center \">\n <a\n className=\"w-full inline-flex gap-2 py-1 px-2 rounded hover:bg-default-100 text-sm mr-2 items-center text-default-500\"\n href={link.link}\n target=\"_blank\"\n onClick={onLinkClick}\n rel=\"noreferrer\"\n >\n {showIcon && <ExternalLink className=\"w-4\" />}\n {link.label}\n </a>\n </div>\n );\n }\n}\n\nexport default function Sidebar({ sidebar, onLinkClick }: SidebarProps) {\n return (\n <div className=\"w-full lg:w-sidebar border-r border-default-200 h-full overflow-auto lg:h-main lg:sticky top-header pt-4 pb-10\">\n {sidebar.items.map((item) => {\n if (\"slug\" in item || \"link\" in item) {\n const key = \"slug\" in item ? item.slug : item.link;\n return (\n <SidebarLink\n showIcon={true}\n onLinkClick={onLinkClick}\n key={key}\n link={item}\n />\n );\n }\n return <SidebarGroup key={item.label} group={item} onLinkClick={onLinkClick} />;\n })}\n </div>\n );\n}\n","import { Menu, X } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { SidebarType } from \"../../../vite/core/content/content.types\";\nimport Sidebar from \"./sidebar\";\n\nfunction SidebarOverlay({ sidebar }: { sidebar: SidebarType }) {\n const [isOpen, setIsOpen] = useState(false);\n return (\n <div className=\"lg:hidden\">\n {/* Mobile sidebar button is placed on the start of mobile of content tab, we have to position is via fixed because table of content lives inside content.route */}\n <button\n className=\"bg-transparent p-3 -mt-[2px] text-default-700 top-header left-0 fixed z-50\"\n onClick={() => setIsOpen((prev) => !prev)}\n >\n {isOpen ? <X /> : <Menu />}\n </button>\n {isOpen && (\n <div className=\"fixed top-[calc(var(--spacing-header)+44 )] shadow-xl left-0 overflow-auto z-10 bg-default-50 w-full h-screen\">\n <Sidebar onLinkClick={() => setIsOpen(false)} sidebar={sidebar} />\n </div>\n )}\n </div>\n );\n}\n\nexport default function MobileSidebar({ sidebar }: { sidebar: SidebarType }) {\n return <SidebarOverlay sidebar={sidebar} />;\n}\n","import { Outlet, useLocation } from \"@tanstack/react-router\";\nimport { SidebarType } from \"../../../vite/core/content/content.types\";\nimport ContentNavigations from \"../content/content-navigations\";\nimport MobileSidebar from \"./mobile-sidebar\";\nimport Sidebar from \"./sidebar\";\n\nexport function CollectionRoute(sidebar: SidebarType, id: string) {\n return {\n component: () => {\n const location = useLocation();\n const navigation = sidebar?.navigation?.[location.pathname] || {\n prev: null,\n next: null,\n };\n const { prev, next } = navigation;\n\n return (\n <div className=\"mx-auto flex container lg:gap-6\">\n <MobileSidebar sidebar={sidebar} />\n <div className=\"hidden lg:block\">\n {sidebar && <Sidebar sidebar={sidebar} />}\n </div>\n <div className=\"flex-1 pb-20\">\n <Outlet />\n <div className=\"mt-8 px-6 lg:px-0\">\n <ContentNavigations prev={prev} next={next} />\n </div>\n </div>\n </div>\n );\n },\n };\n}\n","import { type AnyRouteMatch } from \"@tanstack/react-router\";\nimport { FunctionComponent } from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport config from \"virtual:prestige/config\";\nimport { ContentFrontmatterType } from \"../../../vite/core/content/content.types\";\nimport { PrestigePage } from \"../../core/prestige-page\";\nfunction resolveContentData(inlineData: any) {\n return inlineData as {\n toc: TocItem[];\n default: FunctionComponent;\n frontmatter: ContentFrontmatterType;\n error: Error | undefined;\n };\n}\n\nexport function ContentRoute(inlineData: any): any {\n const { frontmatter, error } = resolveContentData(inlineData);\n\n return {\n beforeLoad: () => {\n if (error) {\n throw error;\n }\n },\n head: () => {\n const metas: Array<\n | { name?: string; content?: string; title?: string }\n | Record<string, any>\n > = [];\n const description = frontmatter.description;\n const title = frontmatter.title;\n const head = frontmatter.head;\n\n if (title) {\n metas.push({\n title: title + \" | \" + config.title,\n });\n }\n\n if (description) {\n metas.push({\n name: \"description\",\n content: description,\n });\n }\n\n const mergedMeta = head?.meta ? [...metas, ...head.meta] : metas;\n return {\n meta: mergedMeta.length > 0 ? mergedMeta : undefined,\n links: head?.links,\n styles: head?.styles,\n scripts: head?.scripts,\n } as { scripts: AnyRouteMatch[\"scripts\"] };\n },\n };\n}\n\nexport function LazyContentRoute(inlineData: any): any {\n const { toc, default: Component } = resolveContentData(inlineData);\n\n return {\n component: () => {\n return (\n <PrestigePage toc={toc}>\n <Component />\n </PrestigePage>\n );\n },\n };\n}\n","export function PrestigeNotFoundComponent() {\n return (\n <div className=\"w-full h-full flex justify-center pt-15 lg:pt-30 \">\n <div className=\"flex flex-col gap-3 items-center\">\n <h1 className=\"text-3xl lg:text-7xl\">404</h1>\n <h2 className=\"text-3xl lg:text-5xl\">Page Not Found</h2>\n </div>\n </div>\n );\n}\n","import { ErrorComponentProps } from \"@tanstack/react-router\";\n\nexport function PrestigeErrorComponent({ error }: ErrorComponentProps) {\n if (!import.meta.env.DEV) {\n return (\n <div className=\"text-xl my-10 font-bold text-red-500\">\n <p>An unexpected error has occurred. Please try refreshing the page.</p>\n <p>If the issue persists, please report it to our repo.</p>\n </div>\n );\n }\n\n const err = error as any;\n const message = err.message || String(error);\n const file = err.file || \"Unknown file\";\n const snippet = err.snippet;\n\n return (\n <div className=\"h-screen w-screen fixed z-[99999] left-0 top-0 bottom-0 right-0 bg-gray-50 dark:bg-gray-950 flex flex-col items-center justify-center p-4 lg:p-8 overflow-y-auto\">\n <div className=\"max-w-4xl w-full bg-white dark:bg-gray-900 border border-red-200 dark:border-red-900/50 rounded-lg shadow-xl overflow-hidden\">\n <div className=\"px-6 py-4 bg-red-50 dark:bg-red-900/20 border-b border-red-200 dark:border-red-900/50\">\n <h1 className=\"text-lg font-semibold text-red-600 dark:text-red-400 flex items-center gap-2\">\n Compile Error\n </h1>\n </div>\n <div className=\"p-6 flex flex-col gap-6\">\n <div>\n <span className=\"text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400\">File</span>\n <p className=\"font-mono text-sm text-gray-800 dark:text-gray-200 mt-1\">{file}</p>\n </div>\n <div>\n <span className=\"text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400\">Message</span>\n <p className=\"text-gray-800 dark:text-gray-200 mt-1\">{message}</p>\n </div>\n {snippet && (\n <pre className=\"bg-gray-900 text-red-400 p-4 rounded-md overflow-x-auto text-sm font-mono leading-relaxed\">\n <code>{snippet}</code>\n </pre>\n )}\n </div>\n </div>\n </div>\n );\n}\n","import {\n LicenseOptions,\n PrestigeShellProps,\n} from \"../../routes/prestige-shell\";\n\nfunction License({ license }: { license: LicenseOptions | undefined }) {\n if (!license) {\n return null;\n }\n return (\n <a target=\"_blank\" href={license.url}>\n Released under: {license.label}\n </a>\n );\n}\n\nfunction Copyright({ copyright }: Pick<PrestigeShellProps, \"copyright\">) {\n if (!copyright) {\n return null;\n }\n return copyright();\n}\n\nexport default function Footer({\n copyright,\n license,\n}: Pick<PrestigeShellProps, \"copyright\" | \"license\">) {\n return (\n <footer className=\"flex items-center justify-center flex-col gap-2 px-4 border-t border-t-default-100 pt-10 bg-default-50 text-sm py-10 text-default-700\">\n <License license={license} />\n <Copyright copyright={copyright} />\n </footer>\n );\n}\n","import { ThemeProvider } from \"@lonik/themer\";\nimport { ReactNode } from \"react\";\nimport config from \"virtual:prestige/config\";\nimport Footer from \"../core/footer/footer\";\nimport Header from \"../core/header/header\";\n\ntype RenderNode = () => ReactNode;\n\nexport interface AlgoliaOptions {\n appId: string;\n apiKey: string;\n indices: string[];\n}\nexport interface LicenseOptions {\n label: string;\n url: string;\n}\nexport interface PrestigeSerializableShellProps {\n github?: string | undefined;\n algolia?: AlgoliaOptions | undefined;\n license?: LicenseOptions | undefined;\n}\nexport interface PrestigeShellProps extends PrestigeSerializableShellProps {\n customHeaderTitle?: RenderNode | undefined;\n copyright?: RenderNode | undefined;\n}\nexport function PrestigeShell({\n children,\n options,\n}: {\n children: ReactNode;\n options?: PrestigeShellProps;\n}) {\n const resolvedOptions: PrestigeShellProps = {\n ...config.prestigeShellProps,\n ...options,\n };\n\n return (\n <ThemeProvider attribute=\"data-theme\" defaultTheme=\"system\">\n <Header\n algolia={resolvedOptions.algolia}\n customHeaderTitle={resolvedOptions.customHeaderTitle}\n {...resolvedOptions}\n />\n <main className=\"min-h-[calc(100vh-var(--spacing-header))]\">\n {children}\n </main>\n <Footer\n license={resolvedOptions.license}\n copyright={resolvedOptions.copyright}\n />\n </ThemeProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,MAAMA,UAAqC;CACzC,MAAM;CACN,KAAK;CACL,SACE;CACF,QACE;CACH;AAED,MAAMC,gBAA2C;CAC/C,MAAM;CACN,KAAK;CACL,SAAS;CACT,QAAQ;CACT;AAED,SAAgB,MAAM,EACpB,OAAO,QACP,OACA,UACA,WACA,GAAG,SACU;CACb,MAAM,YAAY;EAChB,WAAW;EACX,OAAO;EACP,OAAO;EACP,QAAQ;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AI,WAAU;cACb,oBAAC;IAAI,WAAU;cACb,oBAAC;KAAG,WAAU;eAA+E;MAExF;KACD,EACN,qBAAC;IAAI,WAAU;;KACb,qBAAC,oBACC,oBAAC;MAAK,WAAU;gBAAkF;OAAW,EAC7G,oBAAC;MAAE,WAAU;gBAA2D;OAAS,IAC7E;KACN,qBAAC,oBACC,oBAAC;MAAK,WAAU;gBAAkF;OAAc,EAChH,oBAAC;MAAE,WAAU;gBAAyC;OAAY,IAC9D;KACL,WACC,oBAAC;MAAI,WAAU;gBACb,oBAAC,oBAAM,UAAe;OAClB;;KAEJ;IACF;GACF;;;;;ACpCV,SAAS,QAAQ,EAAE,WAAoD;AACrE,KAAI,CAAC,QACH,QAAO;AAET,QACE,qBAAC;EAAE,QAAO;EAAS,MAAM,QAAQ;aAAK,oBACnB,QAAQ;GACvB;;AAIR,SAAS,UAAU,EAAE,aAAoD;AACvE,KAAI,CAAC,UACH,QAAO;AAET,QAAO,WAAW;;AAGpB,SAAwB,OAAO,EAC7B,WACA,WACoD;AACpD,QACE,qBAAC;EAAO,WAAU;aAChB,oBAAC,WAAiB,UAAW,EAC7B,oBAAC,aAAqB,YAAa;GAC5B;;;;;ACLb,SAAgB,cAAc,EAC5B,UACA,WAIC;CACD,MAAMC,kBAAsC;EAC1C,GAAG,OAAO;EACV,GAAG;EACJ;AAED,QACE,qBAAC;EAAc,WAAU;EAAa,cAAa;;GACjD,oBAAC;IACC,SAAS,gBAAgB;IACzB,mBAAmB,gBAAgB;IACnC,GAAI;KACJ;GACF,oBAAC;IAAK,WAAU;IACb;KACI;GACP,oBAAC;IACC,SAAS,gBAAgB;IACzB,WAAW,gBAAgB;KAC3B;;GACY"}
1
+ {"version":3,"file":"ui.js","names":["typeMap: Record<AsideType, string>","defaultTitles: Record<AsideType, string>","TabsPrimitive","MANAGERS: PackageManager[]","parts: string[]","currentTheme: ThemeValue","metas: Array<\n | { name?: string; content?: string; title?: string }\n | Record<string, any>\n >"],"sources":["../src/ui/components/aside/aside.tsx","../src/ui/components/code/code.tsx","../src/ui/components/tabs/tabs.tsx","../src/ui/components/package-managers/package-managers.tsx","../src/ui/components/steps/step-item.tsx","../src/ui/components/steps/steps.tsx","../src/ui/core/github/github.tsx","../src/ui/core/search/search.tsx","../src/ui/core/theme/theme.tsx","../src/ui/core/header/header.tsx","../src/ui/routes/content/table-of-contents/use-table-of-contents.ts","../src/ui/routes/content/table-of-contents/mobile-table-of-contents.tsx","../src/ui/routes/content/table-of-contents/web-table-of-contents.tsx","../src/ui/core/prestige-page.tsx","../src/ui/routes/content/content-navigations.tsx","../src/ui/utils.ts","../src/ui/routes/collection/sidebar.tsx","../src/ui/routes/collection/mobile-sidebar.tsx","../src/ui/routes/collection/collection.route.tsx","../src/ui/routes/content/content.route.tsx","../src/ui/routes/not-found.tsx","../src/ui/routes/prestige-error.tsx","../src/ui/core/footer/footer.tsx","../src/ui/routes/prestige-shell.tsx"],"sourcesContent":["import React from \"react\";\n\nexport type AsideType = \"note\" | \"tip\" | \"caution\" | \"danger\";\n\nexport interface AsideProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n type?: AsideType;\n title?: React.ReactNode;\n children: React.ReactNode;\n}\n\nconst typeMap: Record<AsideType, string> = {\n note: \"bg-blue-50/50 dark:bg-blue-900/20 border-blue-500 text-blue-900 dark:text-blue-200\",\n tip: \"bg-purple-50/50 dark:bg-purple-900/20 border-purple-500 text-purple-900 dark:text-purple-200\",\n caution:\n \"bg-yellow-50/50 dark:bg-yellow-900/20 border-yellow-500 text-yellow-900 dark:text-yellow-200\",\n danger:\n \"bg-red-50/50 dark:bg-red-900/20 border-red-500 text-red-900 dark:text-red-200\",\n};\n\nconst defaultTitles: Record<AsideType, string> = {\n note: \"Note\",\n tip: \"Tip\",\n caution: \"Caution\",\n danger: \"Danger\",\n};\n\nexport function Aside({\n type = \"note\",\n title,\n children,\n className,\n ...props\n}: AsideProps) {\n const iconProps = {\n className: \"w-5 h-5 flex-shrink-0\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n };\n\n const Icon = () => {\n switch (type) {\n case \"note\":\n return (\n <svg {...iconProps}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n case \"tip\":\n return (\n <svg {...iconProps}>\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\" />\n <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n </svg>\n );\n case \"caution\":\n return (\n <svg {...iconProps}>\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n case \"danger\":\n return (\n <svg {...iconProps}>\n <polygon points=\"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n );\n default:\n return null;\n }\n };\n\n return (\n <aside\n aria-label={defaultTitles[type]}\n className={`relative my-6 px-4 py-3 border-l-4 rounded-lg ${typeMap[type]} ${className || \"\"}`}\n {...props}\n >\n <p className=\"flex items-center gap-2 mb-2 mt-0 font-bold text-lg\">\n <span>\n <Icon />\n </span>\n {title || defaultTitles[type]}\n </p>\n <section className=\"[&>p]:mt-0 [&>p]:mb-2 [&>p:last-child]:mb-0\">\n {children}\n </section>\n </aside>\n );\n}\n","import clsx from \"clsx\";\nimport { Highlight } from \"prism-react-renderer\";\n\nexport interface CodeProps {\n code: string;\n language?: string;\n}\n\nexport function Code({ code, language = \"tsx\" }: CodeProps) {\n // Use a fragment or div, but ensure `render` actually exists before injecting\n return (\n <Highlight code={code} language={language}>\n {({ className, tokens, getLineProps, getTokenProps }) => (\n <pre className={clsx(\"not-prose\", className)}>\n <code className={clsx(\"code-highlight\", className)}>\n {tokens.map((line, i) => (\n <div key={i} {...getLineProps({ line })} style={undefined}>\n {line.map((token, key) => (\n <span\n key={key}\n {...getTokenProps({ token })}\n style={undefined}\n />\n ))}\n </div>\n ))}\n </code>\n </pre>\n )}\n </Highlight>\n );\n}\n","import { Tabs as TabsPrimitive } from \"@base-ui/react/tabs\";\n\nfunction Tabs({\n orientation = \"horizontal\",\n className,\n ...props\n}: TabsPrimitive.Root.Props) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n className={`w-full ${className || \"\"}`}\n {...props}\n />\n );\n}\n\nfunction TabsList({ className, ...props }: TabsPrimitive.List.Props) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={`flex w-full overflow-x-auto border-b border-default-200 no-scrollbar ${\n className || \"\"\n }`}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n <TabsPrimitive.Tab\n data-slot=\"tabs-trigger\"\n className={`\n -mb-px flex items-center justify-center whitespace-nowrap border-b-2 border-transparent \n px-4 py-2.5 text-sm font-medium transition-colors cursor-pointer\n text-default-600 hover:text-default-900 hover:border-default-300\n aria-selected:border-primary-500 aria-selected:text-primary-500 \n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2\n disabled:pointer-events-none disabled:opacity-50\n ${className || \"\"}\n `}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return (\n <TabsPrimitive.Panel\n data-slot=\"tabs-content\"\n className={`mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 ${\n className || \"\"\n }`}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import { Code } from \"../code/code\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"../tabs/tabs\"; // Adjust import path\n\ntype PackageManager = \"npm\" | \"pnpm\" | \"yarn\" | \"bun\";\ntype CommandType = \"add\" | \"create\" | \"exec\" | \"run\";\n\nexport interface PackageManagersProps {\n /** The name of the package (e.g., \"@lonik/themer\") */\n pkg?: string;\n /** The type of command to generate. Defaults to \"add\" */\n type?: CommandType;\n /** Whether this is a development dependency (-D) */\n dev?: boolean;\n /** Additional arguments to append to the command */\n args?: string;\n className?: string;\n}\n\nconst MANAGERS: PackageManager[] = [\"npm\", \"pnpm\", \"yarn\", \"bun\"];\n\nfunction generateCommand(\n pm: PackageManager,\n type: CommandType,\n pkg?: string,\n dev?: boolean,\n args?: string,\n) {\n const parts: string[] = [];\n\n switch (type) {\n case \"add\":\n parts.push(pm === \"npm\" ? \"npm install\" : `${pm} add`);\n if (dev) parts.push(\"-D\");\n if (pkg) parts.push(pkg);\n break;\n case \"create\":\n parts.push(`${pm} create`);\n if (pkg) parts.push(pkg);\n break;\n case \"exec\":\n if (pm === \"npm\") parts.push(\"npx\");\n else if (pm === \"bun\") parts.push(\"bun x\");\n else parts.push(`${pm} dlx`);\n if (pkg) parts.push(pkg);\n break;\n case \"run\":\n parts.push(pm === \"yarn\" ? \"yarn\" : `${pm} run`);\n if (pkg) parts.push(pkg);\n break;\n }\n\n if (args) {\n // If it's npm and we are passing args to an exec/run script, we often need '--'\n if (pm === \"npm\" && (type === \"exec\" || type === \"run\")) {\n parts.push(\"--\");\n }\n parts.push(args);\n }\n\n return parts.join(\" \");\n}\n\nexport function PackageManagers({\n pkg,\n type = \"add\",\n dev = false,\n args,\n className,\n}: PackageManagersProps) {\n return (\n <Tabs defaultValue=\"npm\" className={`my-6 ${className || \"\"}`}>\n <TabsList>\n {MANAGERS.map((pm) => (\n <TabsTrigger key={pm} value={pm}>\n {pm.toLowerCase()}\n </TabsTrigger>\n ))}\n </TabsList>\n\n {MANAGERS.map((pm) => {\n const command = generateCommand(pm, type, pkg, dev, args);\n\n return (\n <TabsContent keepMounted={true} key={pm} value={pm}>\n <Code code={command} language=\"bash\"></Code>\n </TabsContent>\n );\n })}\n </Tabs>\n );\n}\n","import { PropsWithChildren } from \"react\";\n\nexport type StepItemProps = PropsWithChildren<{\n index: number | string;\n label: string;\n}>;\n\nexport function StepItem({ children, label, index }: StepItemProps) {\n return (\n <li className=\"group list-none\">\n <div className=\"flex items-start gap-2\">\n <div className=\"rounded-full flex justify-center items-center text-base font-medium w-8 h-8 bg-primary-50 text-primary-400 border-2 border-primary-400\">\n {index}\n </div>\n <h3 className=\"text-default-600 mt-1\">{label}</h3>\n </div>\n <div className=\"pb-6 group-last:pb-0 border-l-2 border-l-default-200 pl-6 ml-4 mt-1 mb-4 text-default-600\">\n {children}\n </div>\n </li>\n );\n}\n","import { PropsWithChildren } from \"react\";\n\nexport type StepsProps = PropsWithChildren;\n\nexport function Steps({ children }: StepsProps) {\n return <ul>{children}</ul>;\n}\n","import { Github } from \"lucide-react\";\n\nexport function GitHub({ github }: { github: string | undefined }) {\n if (!github) {\n return null;\n }\n\n return (\n <a\n href={github}\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"GitHub repository\"\n title=\"GitHub repository\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded border border-default-200 bg-default-50 text-default-500 hover:bg-default-100\"\n >\n <Github size={16} />\n </a>\n );\n}\n","import \"@docsearch/css\";\nimport { DocSearch } from \"@docsearch/react\";\nimport { AlgoliaOptions } from \"../../routes/prestige-shell\";\n\nexport function Search({\n algolia,\n}: {\n // 2. Add 'typeof' to extract the type from the value\n algolia: AlgoliaOptions | undefined;\n}) {\n if (!algolia) {\n return null;\n }\n\n return (\n <div className=\"prestige-search\">\n <DocSearch\n appId={algolia.appId}\n apiKey={algolia.apiKey}\n indices={algolia.indices}\n />\n </div>\n );\n}\n","import { useTheme } from \"@lonik/themer\";\nimport { useHydrated } from \"@tanstack/react-router\";\nimport { Moon, Sun, SunMoon } from \"lucide-react\";\n\nconst themeOrder = [\"system\", \"light\", \"dark\"] as const;\ntype ThemeValue = (typeof themeOrder)[number];\n\nexport function Theme() {\n const { theme, setTheme } = useTheme();\n const currentTheme: ThemeValue = (theme as ThemeValue) ?? \"system\";\n const hydrated = useHydrated();\n\n const nextTheme = (value: ThemeValue): ThemeValue => {\n const index = themeOrder.indexOf(value);\n return themeOrder[(index + 1) % themeOrder.length]!;\n };\n\n const icon =\n currentTheme === \"light\" ? (\n <Sun size={16} />\n ) : currentTheme === \"dark\" ? (\n <Moon size={16} />\n ) : (\n <SunMoon size={16} />\n );\n\n return (\n <button\n suppressHydrationWarning\n type=\"button\"\n aria-label={`Theme: ${currentTheme}. Click to switch theme`}\n title={`Theme: ${currentTheme}`}\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md border border-default-200 bg-default-50 text-default-500 hover:bg-default-100 cursor-pointer\"\n onClick={() => setTheme(nextTheme(currentTheme))}\n >\n {hydrated && icon}\n </button>\n );\n}\n","import { Link, useLocation } from \"@tanstack/react-router\";\nimport collections from \"virtual:prestige/collection-all\";\nimport config from \"virtual:prestige/config\";\nimport { PrestigeShellProps } from \"../../routes/prestige-shell\";\nimport { GitHub } from \"../github/github\";\nimport { Search } from \"../search/search\";\nimport { Theme } from \"../theme/theme\";\n\nexport type HeaderProps = Pick<\n PrestigeShellProps,\n \"customHeaderTitle\" | \"algolia\" | \"github\"\n>;\n\nexport default function Header({\n customHeaderTitle,\n algolia,\n github,\n}: HeaderProps) {\n const location = useLocation();\n\n return (\n <header className=\"sticky top-0 z-40 flex h-header border-b border-default-200 bg-default-50/80 px-4 backdrop-blur-md\">\n <div className=\"container mx-auto flex items-center justify-between\">\n <div className=\"flex gap-4 items-center\">\n <Link\n activeProps={{\n className: \"border-default-800 text-default-800 font-medium\",\n }}\n className=\"text-sm rounded hover:bg-default-100 text-default-500\"\n to={\"/\"}\n >\n {customHeaderTitle ? (\n customHeaderTitle()\n ) : (\n <span>{config.title}</span>\n )}\n </Link>\n {collections.map((collection) => {\n const isActive =\n location.pathname === `/${collection.id}` ||\n location.pathname.startsWith(`/${collection.id}/`);\n\n return (\n <Link\n key={collection.id}\n to={`/${collection.defaultLink}` as any}\n className={`border-b-2 text-sm rounded hover:bg-default-100 active:bg-default-200 capitalize ${\n isActive\n ? \"border-default-800 text-default-800 font-medium\"\n : \"border-b-transparent text-default-500\"\n }`}\n >\n {collection.label}\n </Link>\n );\n })}\n </div>\n <div className=\"flex items-center gap-2\">\n <Search algolia={algolia} />\n <GitHub github={github} />\n <Theme />\n </div>\n </div>\n </header>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\n\nexport function useTableOfContents(toc: TocItem[]) {\n const [activeId, setActiveId] = useState<string>(\"\");\n\n useEffect(() => {\n if (toc.length === 0) return;\n\n const handleScroll = () => {\n const headingElements = toc\n .map((item) => {\n const id = item.href.startsWith(\"#\") ? item.href.slice(1) : item.href;\n return document.getElementById(id);\n })\n .filter((el): el is HTMLElement => el !== null);\n\n // Add a slight offset to account for sticky headers or top padding\n const scrollPosition = window.scrollY + 100;\n\n let currentActiveId = \"\";\n for (let i = headingElements.length - 1; i >= 0; i--) {\n const element = headingElements[i];\n if (element && element.offsetTop <= scrollPosition) {\n currentActiveId = element.id;\n break;\n }\n }\n\n // If we haven't scrolled past the first heading, highlight the first one\n if (!currentActiveId && headingElements.length > 0 && headingElements[0]) {\n currentActiveId = headingElements[0].id;\n }\n\n setActiveId(currentActiveId ? `#${currentActiveId}` : \"\");\n };\n\n window.addEventListener(\"scroll\", handleScroll, { passive: true });\n // setTimeout to ensure DOM is fully rendered when checking initial offsets\n setTimeout(handleScroll, 100);\n\n return () => window.removeEventListener(\"scroll\", handleScroll);\n }, [toc]);\n\n const handleLinkClick = (e: React.MouseEvent<HTMLAnchorElement>, href: string) => {\n e.preventDefault();\n const id = href.startsWith(\"#\") ? href.slice(1) : href;\n const element = document.getElementById(id);\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\" });\n // Update URL hash without jumping\n window.history.pushState(null, \"\", href.startsWith(\"#\") ? href : `#${href}`);\n }\n };\n\n return { activeId, handleLinkClick };\n}\n","import clsx from \"clsx\";\nimport { ChevronRight } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport { useTableOfContents } from \"./use-table-of-contents\";\n\nexport function MobileTableOfContent({ toc }: { toc: TocItem[] }) {\n const [isOpen, setIsOpen] = useState(false);\n const { activeId, handleLinkClick } = useTableOfContents(toc);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n if (\n containerRef.current &&\n !containerRef.current.contains(event.target as Node)\n ) {\n setIsOpen(false);\n }\n }\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, []);\n\n const activeItem = toc.find((item) => {\n const itemHref = item.href.startsWith(\"#\") ? item.href : `#${item.href}`;\n return itemHref === activeId;\n });\n\n /* pl-12 is needed for mobile sidebar, because sidebar button is fixed position */\n return (\n <div\n ref={containerRef}\n className=\"sticky top-header z-30 bg-default-50/95 backdrop-blur border-b border-default-200 dark:border-default-800 lg:hidden px-6 pl-12\"\n >\n <div className=\"relative\">\n <button\n onClick={() => setIsOpen((prev) => !prev)}\n className=\"flex w-full items-center justify-between gap-4 px-6 py-3 text-sm text-default-500 font-medium cursor-pointer\"\n >\n <div className=\"flex items-center gap-2\">\n <span>On this page</span>\n <ChevronRight\n className={clsx(\n \"w-4 h-4 transition-transform duration-200\",\n isOpen && \"rotate-90\",\n )}\n />\n </div>\n {activeItem && (\n <span className=\"truncate font-normal max-w-[50%] text-right\">\n {activeItem.value}\n </span>\n )}\n </button>\n\n {isOpen && (\n <div className=\"absolute left-6 right-6 top-full mt-2 max-h-[60vh] overflow-y-auto rounded-lg border border-default-200 bg-default-50 shadow-xl\">\n <ul className=\"p-4 space-y-2.5 text-sm\">\n {toc.map((item) => {\n const itemHref = item.href.startsWith(\"#\")\n ? item.href\n : `#${item.href}`;\n const isActive = activeId === itemHref;\n return (\n <li\n key={itemHref}\n style={{ paddingLeft: `${(item.depth - 1) * 0.75}rem` }}\n >\n <a\n href={itemHref}\n className={clsx(\n \"block transition-colors duration-200 line-clamp-2\",\n isActive\n ? \"text-primary-600 font-medium\"\n : \"text-default-600\",\n )}\n onClick={(e) => {\n handleLinkClick(e, item.href);\n setIsOpen(false);\n }}\n >\n {item.value}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import clsx from \"clsx\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport { useTableOfContents } from \"./use-table-of-contents\";\n\nexport function WebTableOfContent({ toc }: { toc: TocItem[] }) {\n const { activeId, handleLinkClick } = useTableOfContents(toc);\n\n return (\n <nav className=\"sticky top-header pt-4 overflow-y-auto w-web-table-of-content hidden lg:block\">\n <span className=\"text-xs font-mono tracking-widest\">ON THIS PAGE</span>\n <ul className=\"text-sm my-4\">\n {toc.map((item) => (\n <li key={item.href}>\n <a\n style={{ paddingLeft: `${(item.depth - 1) * 0.75}rem` }}\n href={`${item.href}`}\n className={clsx(\n \"border-l py-1 px-4 block hover:text-default-700 dark:hover:text-slate-100 transition-colors duration-200 line-clamp-2\",\n activeId === item.href\n ? \"text-default-700 border-default-600 font-medium\"\n : \"text-default-500 border-default-200 \",\n )}\n onClick={(e) => handleLinkClick(e, item.href)}\n >\n {item.value}\n </a>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n","import React from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport { MobileTableOfContent } from \"../routes/content/table-of-contents/mobile-table-of-contents\";\nimport { WebTableOfContent } from \"../routes/content/table-of-contents/web-table-of-contents\";\n\nexport interface PrestigePageProps {\n children: React.ReactNode;\n toc?: TocItem[];\n}\n\nexport function PrestigePage({ children, toc = [] }: PrestigePageProps) {\n return (\n <div className=\"flex lg:gap-6 items-start max-w-[100vw]\">\n <div className=\"flex-1 min-w-0\">\n <MobileTableOfContent toc={toc} />\n <article className=\"prose wrap-break-word py-15 px-6 max-w-none lg:w-web-content\">\n {children}\n </article>\n </div>\n <WebTableOfContent toc={toc} />\n </div>\n );\n}\n","import { Link } from \"@tanstack/react-router\";\nimport clsx from \"clsx\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\nimport { SiblingNavigationType } from \"../../../vite/core/content/content.types\";\n\nfunction ContentNavigation({\n isNext,\n navigation,\n}: {\n isNext?: boolean;\n navigation: SiblingNavigationType;\n}) {\n const label = isNext ? \"Next\" : \"Previous\";\n return (\n <Link\n to={navigation.link}\n className={clsx(\n \" flex-1 h-20 mb-4 border border-default-200 hover:bg-default-50 rounded-md cursor-pointer flex items-center px-4\",\n isNext ? \"justify-end\" : \"justify-start\",\n )}\n >\n <div\n className={clsx(\n \"flex items-center gap-4\",\n isNext && \"flex-row-reverse\",\n )}\n >\n {isNext ? (\n <ArrowRight className=\"text-default-400\" />\n ) : (\n <ArrowLeft className=\"text-default-400\" />\n )}\n <div className={clsx(\"flex flex-col\", isNext && \"items-end\")}>\n <span className=\"text-xs tracking-widest font-mono\">\n {label.toLocaleUpperCase()}\n </span>\n <span className=\"text-2xl font-li text-default-700\">\n {navigation.label}\n </span>\n </div>\n </div>\n </Link>\n );\n}\n\nexport default function ContentNavigations({\n prev,\n next,\n}: {\n prev: SiblingNavigationType | null | undefined;\n next: SiblingNavigationType | null | undefined;\n}) {\n // width of content navigation must match with content route content width, so we manually\n // add empty div with table-of-content width and add proper gap to match the size\n return (\n <div className=\"flex gap-6\">\n <div className=\"lg:flex flex-row items-center gap-2 mt-2 lg:mt-8 lg:w-web-content w-full\">\n {prev ? (\n <ContentNavigation navigation={prev} />\n ) : (\n <div className=\"flex-1 hidden lg:block \"></div>\n )}\n {next ? (\n <ContentNavigation navigation={next} isNext />\n ) : (\n <div className=\"flex-1 hidden lg:block\"></div>\n )}\n </div>\n <div className=\"lg:w-web-table-of-content h-1\"></div>\n </div>\n );\n}\n","export function isExternalURL(str: string) {\n try {\n const url = new URL(str);\n // This ensures it starts with http or https, filtering out\n // things like 'javascript:alert(1)' or 'mailto:test@test.com'\n return url.protocol === \"http:\" || url.protocol === \"https:\";\n } catch {\n return false;\n }\n}\n","import { Link } from \"@tanstack/react-router\";\nimport clsx from \"clsx\";\nimport { BookOpen, ChevronRight, ExternalLink } from \"lucide-react\";\nimport { useState } from \"react\";\nimport {\n ExternalSidebarLinkType,\n InternalSidebarLinkType,\n SidebarGroupType,\n SidebarType,\n} from \"../../../vite/core/content/content.types\";\nimport { isExternalURL } from \"../../utils\";\n\nexport interface SidebarProps {\n sidebar: SidebarType;\n onLinkClick?: (() => void) | undefined;\n}\n\nfunction SidebarGroup({\n group,\n onLinkClick,\n}: {\n group: SidebarGroupType;\n onLinkClick?: (() => void) | undefined;\n}) {\n const [open, setIsOpen] = useState(!group.collapsed);\n return (\n <div className=\"mt-4 flex flex-col gap-1\">\n <button\n className=\"flex items-center w-full gap-2\"\n onClick={() => setIsOpen((prev) => !prev)}\n >\n <ChevronRight\n size={18}\n className={clsx(\n \"transform transition cursor-pointer ml-1\",\n open && \"rotate-90\",\n )}\n />\n <span className=\"font-mono text-xs tracking-widest\">\n {group.label.toUpperCase()}\n </span>\n </button>\n {open && (\n <div className=\"mb-2 pl-5\">\n {group.items.map((item) => {\n if (\"slug\" in item || \"link\" in item) {\n const key = \"slug\" in item ? item.slug : item.link;\n return (\n <SidebarLink\n showIcon={false}\n key={key}\n link={item}\n onLinkClick={onLinkClick}\n />\n );\n }\n return <SidebarGroup key={item.label} group={item} onLinkClick={onLinkClick} />;\n })}\n </div>\n )}\n </div>\n );\n}\n\nfunction SidebarLink({\n link,\n onLinkClick,\n showIcon,\n}: {\n link: InternalSidebarLinkType | ExternalSidebarLinkType;\n onLinkClick?: (() => void) | undefined;\n showIcon: boolean;\n}) {\n if (\"slug\" in link || !isExternalURL(link.link)) {\n const slug = \"slug\" in link ? `/${link.slug}` : link.link;\n return (\n <div className=\"flex items-center \">\n <Link\n onClick={onLinkClick}\n activeProps={{ className: \"text-default-700 font-medium\" }}\n className=\"w-full inline-flex gap-2 py-1 px-2 rounded hover:bg-default-100 text-sm mr-2 items-center text-default-500\"\n to={slug}\n >\n {showIcon && <BookOpen className=\"w-4\" />}\n {link.label}\n </Link>\n </div>\n );\n } else {\n return (\n <div className=\"flex items-center \">\n <a\n className=\"w-full inline-flex gap-2 py-1 px-2 rounded hover:bg-default-100 text-sm mr-2 items-center text-default-500\"\n href={link.link}\n target=\"_blank\"\n onClick={onLinkClick}\n rel=\"noreferrer\"\n >\n {showIcon && <ExternalLink className=\"w-4\" />}\n {link.label}\n </a>\n </div>\n );\n }\n}\n\nexport default function Sidebar({ sidebar, onLinkClick }: SidebarProps) {\n return (\n <div className=\"w-full lg:w-sidebar border-r border-default-200 h-full overflow-auto lg:h-main lg:sticky top-header pt-4 pb-10\">\n {sidebar.items.map((item) => {\n if (\"slug\" in item || \"link\" in item) {\n const key = \"slug\" in item ? item.slug : item.link;\n return (\n <SidebarLink\n showIcon={true}\n onLinkClick={onLinkClick}\n key={key}\n link={item}\n />\n );\n }\n return <SidebarGroup key={item.label} group={item} onLinkClick={onLinkClick} />;\n })}\n </div>\n );\n}\n","import { Menu, X } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { SidebarType } from \"../../../vite/core/content/content.types\";\nimport Sidebar from \"./sidebar\";\n\nfunction SidebarOverlay({ sidebar }: { sidebar: SidebarType }) {\n const [isOpen, setIsOpen] = useState(false);\n return (\n <div className=\"lg:hidden\">\n {/* Mobile sidebar button is placed on the start of mobile of content tab, we have to position is via fixed because table of content lives inside content.route */}\n <button\n className=\"bg-transparent p-3 -mt-[2px] text-default-700 top-header left-0 fixed z-50\"\n onClick={() => setIsOpen((prev) => !prev)}\n >\n {isOpen ? <X /> : <Menu />}\n </button>\n {isOpen && (\n <div className=\"fixed top-[calc(var(--spacing-header)+44 )] shadow-xl left-0 overflow-auto z-10 bg-default-50 w-full h-screen\">\n <Sidebar onLinkClick={() => setIsOpen(false)} sidebar={sidebar} />\n </div>\n )}\n </div>\n );\n}\n\nexport default function MobileSidebar({ sidebar }: { sidebar: SidebarType }) {\n return <SidebarOverlay sidebar={sidebar} />;\n}\n","import { Outlet, useLocation } from \"@tanstack/react-router\";\nimport { SidebarType } from \"../../../vite/core/content/content.types\";\nimport ContentNavigations from \"../content/content-navigations\";\nimport MobileSidebar from \"./mobile-sidebar\";\nimport Sidebar from \"./sidebar\";\n\nexport function CollectionRoute(sidebar: SidebarType, id: string) {\n return {\n component: () => {\n const location = useLocation();\n const navigation = sidebar?.navigation?.[location.pathname] || {\n prev: null,\n next: null,\n };\n const { prev, next } = navigation;\n\n return (\n <div className=\"mx-auto flex container lg:gap-6\">\n <MobileSidebar sidebar={sidebar} />\n <div className=\"hidden lg:block\">\n {sidebar && <Sidebar sidebar={sidebar} />}\n </div>\n <div className=\"flex-1 pb-20\">\n <Outlet />\n <div className=\"mt-8 px-6 lg:px-0\">\n <ContentNavigations prev={prev} next={next} />\n </div>\n </div>\n </div>\n );\n },\n };\n}\n","import { type AnyRouteMatch } from \"@tanstack/react-router\";\nimport { FunctionComponent } from \"react\";\nimport { TocItem } from \"remark-flexible-toc\";\nimport config from \"virtual:prestige/config\";\nimport { ContentFrontmatterType } from \"../../../vite/core/content/content.types\";\nimport { PrestigePage } from \"../../core/prestige-page\";\nfunction resolveContentData(inlineData: any) {\n return inlineData as {\n toc: TocItem[];\n default: FunctionComponent;\n frontmatter: ContentFrontmatterType;\n error: Error | undefined;\n };\n}\n\nexport function ContentRoute(inlineData: any): any {\n const { frontmatter, error } = resolveContentData(inlineData);\n\n return {\n beforeLoad: () => {\n if (error) {\n throw error;\n }\n },\n head: () => {\n const metas: Array<\n | { name?: string; content?: string; title?: string }\n | Record<string, any>\n > = [];\n const description = frontmatter.description;\n const title = frontmatter.title;\n const head = frontmatter.head;\n\n if (title) {\n metas.push({\n title: title + \" | \" + config.title,\n });\n }\n\n if (description) {\n metas.push({\n name: \"description\",\n content: description,\n });\n }\n\n const mergedMeta = head?.meta ? [...metas, ...head.meta] : metas;\n return {\n meta: mergedMeta.length > 0 ? mergedMeta : undefined,\n links: head?.links,\n styles: head?.styles,\n scripts: head?.scripts,\n } as { scripts: AnyRouteMatch[\"scripts\"] };\n },\n };\n}\n\nexport function LazyContentRoute(inlineData: any): any {\n const { toc, default: Component } = resolveContentData(inlineData);\n\n return {\n component: () => {\n return (\n <PrestigePage toc={toc}>\n <Component />\n </PrestigePage>\n );\n },\n };\n}\n","export function PrestigeNotFoundComponent() {\n return (\n <div className=\"w-full h-full flex justify-center pt-15 lg:pt-30 \">\n <div className=\"flex flex-col gap-3 items-center\">\n <h1 className=\"text-3xl lg:text-7xl\">404</h1>\n <h2 className=\"text-3xl lg:text-5xl\">Page Not Found</h2>\n </div>\n </div>\n );\n}\n","import { ErrorComponentProps } from \"@tanstack/react-router\";\n\nexport function PrestigeErrorComponent({ error }: ErrorComponentProps) {\n if (!import.meta.env.DEV) {\n return (\n <div className=\"text-xl my-10 font-bold text-red-500\">\n <p>An unexpected error has occurred. Please try refreshing the page.</p>\n <p>If the issue persists, please report it to our repo.</p>\n </div>\n );\n }\n\n const err = error as any;\n const message = err.message || String(error);\n const file = err.file || \"Unknown file\";\n const snippet = err.snippet;\n\n return (\n <div className=\"h-screen w-screen fixed z-[99999] left-0 top-0 bottom-0 right-0 bg-gray-50 dark:bg-gray-950 flex flex-col items-center justify-center p-4 lg:p-8 overflow-y-auto\">\n <div className=\"max-w-4xl w-full bg-white dark:bg-gray-900 border border-red-200 dark:border-red-900/50 rounded-lg shadow-xl overflow-hidden\">\n <div className=\"px-6 py-4 bg-red-50 dark:bg-red-900/20 border-b border-red-200 dark:border-red-900/50\">\n <h1 className=\"text-lg font-semibold text-red-600 dark:text-red-400 flex items-center gap-2\">\n Compile Error\n </h1>\n </div>\n <div className=\"p-6 flex flex-col gap-6\">\n <div>\n <span className=\"text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400\">File</span>\n <p className=\"font-mono text-sm text-gray-800 dark:text-gray-200 mt-1\">{file}</p>\n </div>\n <div>\n <span className=\"text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400\">Message</span>\n <p className=\"text-gray-800 dark:text-gray-200 mt-1\">{message}</p>\n </div>\n {snippet && (\n <pre className=\"bg-gray-900 text-red-400 p-4 rounded-md overflow-x-auto text-sm font-mono leading-relaxed\">\n <code>{snippet}</code>\n </pre>\n )}\n </div>\n </div>\n </div>\n );\n}\n","import {\n LicenseOptions,\n PrestigeShellProps,\n} from \"../../routes/prestige-shell\";\n\nfunction License({ license }: { license: LicenseOptions | undefined }) {\n if (!license) {\n return null;\n }\n return (\n <a target=\"_blank\" href={license.url}>\n Released under: {license.label}\n </a>\n );\n}\n\nfunction Copyright({ copyright }: Pick<PrestigeShellProps, \"copyright\">) {\n if (!copyright) {\n return null;\n }\n return copyright();\n}\n\nexport default function Footer({\n copyright,\n license,\n}: Pick<PrestigeShellProps, \"copyright\" | \"license\">) {\n return (\n <footer className=\"flex items-center justify-center flex-col gap-2 px-4 border-t border-t-default-100 pt-10 bg-default-50 text-sm py-10 text-default-700\">\n <License license={license} />\n <Copyright copyright={copyright} />\n </footer>\n );\n}\n","import { ThemeProvider } from \"@lonik/themer\";\nimport { ReactNode } from \"react\";\nimport config from \"virtual:prestige/config\";\nimport Footer from \"../core/footer/footer\";\nimport Header from \"../core/header/header\";\ntype RenderNode = () => ReactNode;\n\nexport interface AlgoliaOptions {\n appId: string;\n apiKey: string;\n indices: string[];\n}\nexport interface LicenseOptions {\n label: string;\n url: string;\n}\n\nexport interface PrestigeShellProps {\n customHeaderTitle?: RenderNode | undefined;\n copyright?: RenderNode | undefined;\n}\nexport function PrestigeShell({\n children,\n options,\n}: {\n children: ReactNode;\n options?: PrestigeShellProps;\n}) {\n return (\n <ThemeProvider attribute=\"data-theme\" defaultTheme=\"system\">\n <Header\n algolia={config.algolia}\n customHeaderTitle={options?.customHeaderTitle}\n github={config.github}\n />\n <main className=\"min-h-[calc(100vh-var(--spacing-header))]\">\n {children}\n </main>\n <Footer license={config.license} copyright={options?.copyright} />\n </ThemeProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,MAAMA,UAAqC;CACzC,MAAM;CACN,KAAK;CACL,SACE;CACF,QACE;CACH;AAED,MAAMC,gBAA2C;CAC/C,MAAM;CACN,KAAK;CACL,SAAS;CACT,QAAQ;CACT;AAED,SAAgB,MAAM,EACpB,OAAO,QACP,OACA,UACA,WACA,GAAG,SACU;CACb,MAAM,YAAY;EAChB,WAAW;EACX,OAAO;EACP,OAAO;EACP,QAAQ;EACR,SAAS;EACT,MAAM;EACN,QAAQ;EACR,aAAa;EACb,eAAe;EACf,gBAAgB;EACjB;CAED,MAAM,aAAa;AACjB,UAAQ,MAAR;GACE,KAAK,OACH,QACE,qBAAC;IAAI,GAAI;;KACP,oBAAC;MAAO,IAAG;MAAK,IAAG;MAAK,GAAE;OAAO;KACjC,oBAAC,UAAK,GAAE,cAAc;KACtB,oBAAC,UAAK,GAAE,cAAc;;KAClB;GAEV,KAAK,MACH,QACE,qBAAC;IAAI,GAAI;;KACP,oBAAC,UAAK,GAAE,8FAA8F;KACtG,oBAAC,UAAK,GAAE,oGAAoG;KAC5G,oBAAC,UAAK,GAAE,2CAA2C;KACnD,oBAAC,UAAK,GAAE,4CAA4C;;KAChD;GAEV,KAAK,UACH,QACE,qBAAC;IAAI,GAAI;;KACP,oBAAC,UAAK,GAAE,8EAA8E;KACtF,oBAAC,UAAK,GA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vE,KAAI,CAAC,UACH,QAAO;AAET,QAAO,WAAW;;AAGpB,SAAwB,OAAO,EAC7B,WACA,WACoD;AACpD,QACE,qBAAC;EAAO,WAAU;aAChB,oBAAC,WAAiB,UAAW,EAC7B,oBAAC,aAAqB,YAAa;GAC5B;;;;;ACVb,SAAgB,cAAc,EAC5B,UACA,WAIC;AACD,QACE,qBAAC;EAAc,WAAU;EAAa,cAAa;;GACjD,oBAAC;IACC,SAAS,OAAO;IAChB,mBAAmB,SAAS;IAC5B,QAAQ,OAAO;KACf;GACF,oBAAC;IAAK,WAAU;IACb;KACI;GACP,oBAAC;IAAO,SAAS,OAAO;IAAS,WAAW,SAAS;KAAa;;GACpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lonik/prestige",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Static Site Generator for Tanstack Start",
5
5
  "homepage": "https://github.com/lukonik/prestige#readme",
6
6
  "bugs": {