@ngrok/mantle 0.82.0 → 0.82.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.
Files changed (86) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/agent.json +1 -1
  3. package/dist/alert-center.d.ts +217 -19
  4. package/dist/alert-center.js +1 -1
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/{alert-QMs0PqMq.js → alert-vwFd7qdp.js} +1 -1
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-DvbNsphX.js → anchor-3OGK2UKU.js} +1 -1
  9. package/dist/anchor.js +1 -1
  10. package/dist/app-layout.d.ts +296 -213
  11. package/dist/app-layout.js +1 -1
  12. package/dist/area-chart.js +1 -1
  13. package/dist/badge.js +1 -1
  14. package/dist/bar-chart.js +1 -1
  15. package/dist/breadcrumb.js +1 -1
  16. package/dist/{button-BUospUB3.js → button-Cnja9Bsr.js} +1 -1
  17. package/dist/{button-BO2CKsz6.js → button-DmJkYfyl.js} +1 -1
  18. package/dist/{button-C0S8RbaJ.js → button-IlxHhjPK.js} +1 -1
  19. package/dist/button.js +1 -1
  20. package/dist/card.js +1 -1
  21. package/dist/centered-layout.js +1 -1
  22. package/dist/{chart-DdBQ3xwx.js → chart-B3pAvmkk.js} +1 -1
  23. package/dist/{choice-C9gLKECf.js → choice-CnwfjSEu.js} +1 -1
  24. package/dist/choice.js +1 -1
  25. package/dist/code-block.js +1 -1
  26. package/dist/code.js +1 -1
  27. package/dist/combobox.js +1 -1
  28. package/dist/command.js +1 -1
  29. package/dist/cookie-ca4g5CKp.js +1 -0
  30. package/dist/data-table.js +1 -1
  31. package/dist/description-list.js +1 -1
  32. package/dist/{dialog-Bsj_dX6r.js → dialog-DozL6n-F.js} +1 -1
  33. package/dist/dialog.js +1 -1
  34. package/dist/{dropdown-menu-fUMqjRC0.js → dropdown-menu-BRH0Wd_z.js} +1 -1
  35. package/dist/dropdown-menu.js +1 -1
  36. package/dist/empty.js +1 -1
  37. package/dist/field.d.ts +1 -1
  38. package/dist/field.js +1 -1
  39. package/dist/{icons-CPbOq7cF.js → icons-Bb_zF2OV.js} +1 -1
  40. package/dist/icons.js +1 -1
  41. package/dist/line-chart.js +1 -1
  42. package/dist/{list-CQFWx6Z8.js → list-CJABVHwi.js} +1 -1
  43. package/dist/list.js +1 -1
  44. package/dist/llms.txt +1 -1
  45. package/dist/main.d.ts +32 -1
  46. package/dist/media-object.js +1 -1
  47. package/dist/multi-select.js +1 -1
  48. package/dist/otp-input.js +1 -1
  49. package/dist/pagination.js +1 -1
  50. package/dist/platform-BVD3gpKD.js +1 -0
  51. package/dist/{primitive-Dv-3snU3.js → primitive-D-9GIFWb.js} +1 -1
  52. package/dist/qr-code.js +1 -1
  53. package/dist/radio-group.js +1 -1
  54. package/dist/sandboxed-on-click.js +1 -1
  55. package/dist/scatter-plot.js +1 -1
  56. package/dist/{select-B-9yWrif.js → select-BReznXaw.js} +1 -1
  57. package/dist/select.js +1 -1
  58. package/dist/selectable-list.js +1 -1
  59. package/dist/{separator-BepAcFFy.js → separator-D0D6VyyM.js} +1 -1
  60. package/dist/separator.js +1 -1
  61. package/dist/{sheet-_fXLjiq2.js → sheet-BxvTfPLM.js} +1 -1
  62. package/dist/sheet.js +1 -1
  63. package/dist/sidebar.d.ts +534 -60
  64. package/dist/sidebar.js +1 -1
  65. package/dist/{skeleton-DsHXIa9j.js → skeleton-BhcJMpem.js} +1 -1
  66. package/dist/skeleton.js +1 -1
  67. package/dist/skip-to-main-link.js +1 -1
  68. package/dist/slot-DdgxmuI5.d.ts +67 -0
  69. package/dist/slot-DpNWVci8.js +1 -0
  70. package/dist/slot.d.ts +1 -1
  71. package/dist/slot.js +1 -1
  72. package/dist/split-button.js +1 -1
  73. package/dist/theme-BorfgnNh.js +1 -0
  74. package/dist/theme-switcher.d.ts +1 -1
  75. package/dist/theme-switcher.js +1 -1
  76. package/dist/theme.js +1 -1
  77. package/dist/toast.js +1 -1
  78. package/dist/tooltip-Dnu35cjU.js +1 -0
  79. package/dist/tooltip-mrpLz4DZ.d.ts +218 -0
  80. package/dist/tooltip.d.ts +1 -217
  81. package/dist/tooltip.js +1 -1
  82. package/dist/well.js +1 -1
  83. package/package.json +1 -1
  84. package/dist/slot-BtwKJTLq.d.ts +0 -25
  85. package/dist/slot-Dpsqz16D.js +0 -1
  86. package/dist/theme-IAnQ35bd.js +0 -1
package/dist/tooltip.d.ts CHANGED
@@ -1,218 +1,2 @@
1
- import { ComponentProps, ComponentPropsWithoutRef } from "react";
2
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
- //#region src/components/tooltip/tooltip.d.ts
4
- /**
5
- * Wraps your app to provide shared global behavior for your tooltips, such
6
- * as consistent delay and hover settings. Mount one instance at the root of
7
- * your app when you want app-wide tooltip defaults. Children render
8
- * `Tooltip.Root` / `Tooltip.Trigger` / `Tooltip.Content` trees as usual.
9
- *
10
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltipprovider
11
- *
12
- * @example
13
- * ```tsx
14
- * <TooltipProvider>
15
- * <Tooltip.Root>
16
- * <Tooltip.Trigger asChild>
17
- * <Button type="button" appearance="outlined" intent="neutral">
18
- * Hover me
19
- * </Button>
20
- * </Tooltip.Trigger>
21
- * <Tooltip.Content>
22
- * This is a tooltip
23
- * </Tooltip.Content>
24
- * </Tooltip.Root>
25
- * </TooltipProvider>
26
- * ```
27
- */
28
- declare const TooltipProvider: ({ delayDuration, ...props }: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => import("react").JSX.Element;
29
- /**
30
- * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
31
- * This is the root, stateful component that manages the open/closed state of
32
- * the tooltip. Wrap your app in `TooltipProvider` when you want shared
33
- * app-wide delay and hover settings.
34
- *
35
- * `Tooltip.Content` renders at Tailwind `z-50`, Mantle's shared floating
36
- * z-index. When multiple shared layers are open, the most recently mounted
37
- * layer renders on top.
38
- *
39
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltiproot
40
- *
41
- * @example
42
- * ```tsx
43
- * <Tooltip.Root>
44
- * <Tooltip.Trigger asChild>
45
- * <Button type="button" appearance="outlined" intent="neutral">
46
- * Hover me
47
- * </Button>
48
- * </Tooltip.Trigger>
49
- * <Tooltip.Content>
50
- * This is a tooltip
51
- * </Tooltip.Content>
52
- * </Tooltip.Root>
53
- * ```
54
- */
55
- declare function Root(props: ComponentProps<typeof TooltipPrimitive.Root>): import("react").JSX.Element;
56
- /**
57
- * The trigger button that opens the tooltip.
58
- *
59
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltiptrigger
60
- *
61
- * @example
62
- * ```tsx
63
- * <Tooltip.Root>
64
- * <Tooltip.Trigger asChild>
65
- * <Button type="button" appearance="outlined" intent="neutral">
66
- * Hover me
67
- * </Button>
68
- * </Tooltip.Trigger>
69
- * <Tooltip.Content>
70
- * This is a tooltip
71
- * </Tooltip.Content>
72
- * </Tooltip.Root>
73
- * ```
74
- */
75
- declare function Trigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react").JSX.Element;
76
- /**
77
- * The content to render inside the tooltip.
78
- *
79
- * `Tooltip.Content` renders at Tailwind `z-50`, Mantle's shared floating
80
- * z-index. When multiple shared layers are open, the most recently mounted
81
- * layer renders on top.
82
- *
83
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltipcontent
84
- *
85
- * @example
86
- * ```tsx
87
- * <Tooltip.Root>
88
- * <Tooltip.Trigger asChild>
89
- * <Button type="button" appearance="outlined" intent="neutral">
90
- * Hover me
91
- * </Button>
92
- * </Tooltip.Trigger>
93
- * <Tooltip.Content>
94
- * This is a tooltip
95
- * </Tooltip.Content>
96
- * </Tooltip.Root>
97
- * ```
98
- */
99
- declare const Content: ({ children, className, ref, sideOffset, ...props }: ComponentProps<typeof TooltipPrimitive.Content>) => import("react").JSX.Element;
100
- /**
101
- * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
102
- *
103
- * Use `Tooltip` to show a short, non-essential label or hint when the user
104
- * hovers or focuses an element — e.g., the meaning of an icon button, a
105
- * keyboard shortcut, or a brief explanation. Tooltips are NON-INTERACTIVE:
106
- * do not put buttons, links, or form controls inside one. Per the WAI-ARIA
107
- * tooltip pattern, tooltips never receive focus, so interactive content
108
- * inside them is unreachable for keyboard users. For interactive overlay
109
- * content (forms, settings, color pickers), use `Popover`. For non-essential
110
- * preview cards (user/repo previews, link previews), use `HoverCard`.
111
- *
112
- * Mount a `<TooltipProvider>` once at the app root when you want shared
113
- * tooltip behavior such as consistent delay and hover settings.
114
- *
115
- * `Tooltip.Content` renders at Tailwind `z-50`, Mantle's shared floating
116
- * z-index. When multiple shared layers are open, the most recently mounted
117
- * layer renders on top.
118
- *
119
- * @see https://mantle.ngrok.com/components/overlays/tooltip
120
- * @see https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/
121
- *
122
- * @example
123
- * Composition:
124
- * ```
125
- * Tooltip.Root
126
- * ├── Tooltip.Trigger
127
- * └── Tooltip.Content
128
- * ```
129
- *
130
- * @example
131
- * ```tsx
132
- * <Tooltip.Root>
133
- * <Tooltip.Trigger asChild>
134
- * <Button type="button" appearance="outlined" intent="neutral">
135
- * Hover me
136
- * </Button>
137
- * </Tooltip.Trigger>
138
- * <Tooltip.Content>
139
- * This is a tooltip
140
- * </Tooltip.Content>
141
- * </Tooltip.Root>
142
- * ```
143
- */
144
- declare const Tooltip: {
145
- /**
146
- * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
147
- * This is the root, stateful component that manages the open/closed state of
148
- * the tooltip. Wrap your app in `TooltipProvider` when you want shared
149
- * app-wide delay and hover settings.
150
- *
151
- * `Tooltip.Content` renders at Tailwind `z-50`, Mantle's shared floating
152
- * z-index. When multiple shared layers are open, the most recently mounted
153
- * layer renders on top.
154
- *
155
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltiproot
156
- *
157
- * @example
158
- * ```tsx
159
- * <Tooltip.Root>
160
- * <Tooltip.Trigger asChild>
161
- * <Button type="button" appearance="outlined" intent="neutral">
162
- * Hover me
163
- * </Button>
164
- * </Tooltip.Trigger>
165
- * <Tooltip.Content>
166
- * This is a tooltip
167
- * </Tooltip.Content>
168
- * </Tooltip.Root>
169
- * ```
170
- */
171
- readonly Root: typeof Root;
172
- /**
173
- * The content to render inside the tooltip.
174
- *
175
- * `Tooltip.Content` renders at Tailwind `z-50`, Mantle's shared floating
176
- * z-index. When multiple shared layers are open, the most recently mounted
177
- * layer renders on top.
178
- *
179
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltipcontent
180
- *
181
- * @example
182
- * ```tsx
183
- * <Tooltip.Root>
184
- * <Tooltip.Trigger asChild>
185
- * <Button type="button" appearance="outlined" intent="neutral">
186
- * Hover me
187
- * </Button>
188
- * </Tooltip.Trigger>
189
- * <Tooltip.Content>
190
- * This is a tooltip
191
- * </Tooltip.Content>
192
- * </Tooltip.Root>
193
- * ```
194
- */
195
- readonly Content: typeof Content;
196
- /**
197
- * The trigger button that opens the tooltip.
198
- *
199
- * @see https://mantle.ngrok.com/components/overlays/tooltip#tooltiptrigger
200
- *
201
- * @example
202
- * ```tsx
203
- * <Tooltip.Root>
204
- * <Tooltip.Trigger asChild>
205
- * <Button type="button" appearance="outlined" intent="neutral">
206
- * Hover me
207
- * </Button>
208
- * </Tooltip.Trigger>
209
- * <Tooltip.Content>
210
- * This is a tooltip
211
- * </Tooltip.Content>
212
- * </Tooltip.Root>
213
- * ```
214
- */
215
- readonly Trigger: typeof Trigger;
216
- };
217
- //#endregion
1
+ import { n as TooltipProvider, t as Tooltip } from "./tooltip-mrpLz4DZ.js";
218
2
  export { Tooltip, TooltipProvider };
package/dist/tooltip.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import*as r from"@radix-ui/react-tooltip";const i=({delayDuration:e=0,...n})=>t(r.Provider,{"data-slot":`tooltip-provider`,delayDuration:e??0,...n});function a(e){return t(r.Root,{"data-slot":`tooltip`,...e})}function o(e){return t(r.Trigger,{"data-slot":`tooltip-trigger`,...e})}const s={Root:a,Content:({children:i,className:a,ref:o,sideOffset:s=4,...c})=>t(r.Portal,{children:n(r.Content,{className:e(`bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow`,a),"data-slot":`tooltip-content`,ref:o,sideOffset:s,...c,children:[i,t(r.Arrow,{asChild:!0,children:t(`div`,{className:`bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs`})})]})}),Trigger:o};export{s as Tooltip,i as TooltipProvider};
1
+ import{n as e,t}from"./tooltip-Dnu35cjU.js";export{t as Tooltip,e as TooltipProvider};
package/dist/well.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-Dpsqz16D.js";import{jsx as n}from"react/jsx-runtime";const r=({asChild:r=!1,className:i,ref:a,...o})=>n(r?t:`div`,{ref:a,"data-slot":`well`,className:e(`border-card-muted bg-base relative rounded-md border shadow-inner`,i),...o});export{r as Well};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DpNWVci8.js";import{jsx as n}from"react/jsx-runtime";const r=({asChild:r=!1,className:i,ref:a,...o})=>n(r?t:`div`,{ref:a,"data-slot":`well`,className:e(`border-card-muted bg-base relative rounded-md border shadow-inner`,i),...o});export{r as Well};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.82.0",
3
+ "version": "0.82.1",
4
4
  "description": "mantle is ngrok's UI library and design system.",
5
5
  "homepage": "https://mantle.ngrok.com",
6
6
  "license": "MIT",
@@ -1,25 +0,0 @@
1
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
- import { ComponentProps } from "react";
3
- import { Slot } from "@radix-ui/react-slot";
4
- //#region src/components/slot/slot.d.ts
5
- type Props = ComponentProps<typeof Slot> & WithDataSlot;
6
- /**
7
- * Merges its props onto its immediate child. This is useful for creating
8
- * components that can be rendered as different elements. Automatically merges
9
- * className props using `cx` for proper Tailwind class handling, and
10
- * concatenates `data-slot` values in DOM order (the composing parent's slot
11
- * chain first, then the child's own) so `asChild` composition accumulates the
12
- * whole slot chain instead of one side clobbering the other.
13
- *
14
- * @see https://mantle.ngrok.com/components/primitives/slot
15
- *
16
- * @example
17
- * ```tsx
18
- * <Slot className="custom-class">
19
- * <a href="/">Home</a>
20
- * </Slot>
21
- * ```
22
- */
23
- declare const Slot$1: ({ children, className, "data-slot": dataSlot, ref, ...props }: Props) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
24
- //#endregion
25
- export { Slot$1 as t };
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{Children as n,cloneElement as r,isValidElement as i}from"react";import{jsx as a}from"react/jsx-runtime";import{Slot as o}from"@radix-ui/react-slot";const s=({children:s,className:c,"data-slot":l,ref:u,...d})=>i(s)?a(o,{ref:u,...d,children:r(s,{...s.props,className:e(c,s.props.className),"data-slot":t(l,s.props[`data-slot`])})}):n.only(s);export{s as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{n as t}from"./browser-only-CmEEzfU3.js";import{t as n}from"./use-matches-media-query-CMSxHR9n.js";import{createContext as r,useContext as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";const d=[`light`,`dark`,`light-high-contrast`,`dark-high-contrast`],f=[`system`,...d],p=e=>e;function m(e){return typeof e==`string`&&f.includes(e)}const h=e=>e;function g(e){return typeof e==`string`&&d.includes(e)}const _=`(prefers-color-scheme: dark)`,v=`(prefers-contrast: more)`,y=`mantle-ui-theme`,b=`system`,x=r([`system`,()=>null]);function S({children:e}){let[n,r]=c(()=>{let e=N({cookie:t()?document.cookie:null});return w(e),e}),i=s(null);a(()=>{function e(e){let t=e??N({cookie:document.cookie});r(t),w(t)}e();try{`BroadcastChannel`in window&&(i.current=new BroadcastChannel(y),i.current.addEventListener(`message`,t=>{let n=t?.data?.theme;m(n)&&e(n)}))}catch{}function t(t){t.key===`${y}__ping`&&e()}window.addEventListener(`storage`,t);let n=window.matchMedia(_),a=window.matchMedia(v);function o(){e()}function s(){document.visibilityState===`visible`&&e()}return n.addEventListener(`change`,o),a.addEventListener(`change`,o),window.addEventListener(`pageshow`,o),document.addEventListener(`visibilitychange`,s),()=>{window.removeEventListener(`storage`,t),n.removeEventListener(`change`,o),a.removeEventListener(`change`,o),window.removeEventListener(`pageshow`,o),document.removeEventListener(`visibilitychange`,s);try{i.current?.close()}catch{}i.current=null}},[]);let l=o(()=>[n,e=>{L(e),r(e),w(e),F(e,{broadcastChannel:i.current,pingKey:`${y}__ping`})}],[n]);return u(x.Provider,{value:l,children:e})}function C(){let e=i(x);return l(e,`useTheme must be used within a ThemeProvider`),e}function w(e){if(!t())return;let n=window.document.documentElement,r=window.matchMedia(_).matches,i=window.matchMedia(v).matches,a=E(e,{prefersDarkMode:r,prefersHighContrast:i}),o=n.dataset.theme,s=n.dataset.appliedTheme,c=m(o)?o:void 0,l=g(s)?s:void 0;(c!==e||l!==a)&&(n.classList.remove(...d),n.classList.add(a),n.dataset.theme=e,n.dataset.appliedTheme=a)}function T(){if(!t())return{appliedTheme:void 0,theme:void 0};let e=window.document.documentElement,n=m(e.dataset.theme)?e.dataset.theme:void 0;return{appliedTheme:g(e.dataset.appliedTheme)?e.dataset.appliedTheme:void 0,theme:n}}function E(e,{prefersDarkMode:t,prefersHighContrast:n}){return e===`system`?O({prefersDarkMode:t,prefersHighContrast:n}):e}function D(){let e=i(x);return E(e==null?`system`:e[0],{prefersDarkMode:n(_),prefersHighContrast:n(v)})}function O({prefersDarkMode:e,prefersHighContrast:t}){return t?e?`dark-high-contrast`:`light-high-contrast`:e?`dark`:`light`}function k(e){let{storageKey:t,defaultTheme:n,themes:r,resolvedThemes:i,prefersDarkModeMediaQuery:a,prefersHighContrastMediaQuery:o}=e;function s(e){return typeof e==`string`&&r.includes(e)}function c(e){let t=document.cookie;if(!t)return null;try{let n=t.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1];return n?decodeURIComponent(n):null}catch{return null}}function l(e,t){let n=new Date;n.setFullYear(n.getFullYear()+1);let r=window.location.hostname,i=window.location.protocol,a=r===`ngrok.com`||r.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,o=i===`https:`?`; Secure`:``;return`${e}=${encodeURIComponent(t)}; expires=${n.toUTCString()}; path=/${a}; SameSite=Lax${o}`}function u(e,t){try{document.cookie=l(e,t)}catch{}}function d(e,t,n){return e===`system`?n?t?`dark-high-contrast`:`light-high-contrast`:t?`dark`:`light`:e}let f=null,p=null,m=null;try{f=c(t)}catch{}if(s(f))m=f;else{try{p=window.localStorage?.getItem(t)??null}catch{}s(p)&&(m=p)}let h=s(m)?m:n,g=matchMedia(a).matches,_=matchMedia(o).matches,v=d(h,g,_),y=document.documentElement;if(y.dataset.appliedTheme!==v||y.dataset.theme!==h){for(let e of i)y.classList.remove(e);y.classList.add(v),y.dataset.theme=h,y.dataset.appliedTheme=v}let b=s(f);try{if(s(p)&&!b){u(t,p);try{window.localStorage.removeItem(t)}catch{}}else b||u(t,h)}catch{}}function A(){let e={storageKey:y,defaultTheme:b,themes:f,resolvedThemes:d,prefersDarkModeMediaQuery:_,prefersHighContrastMediaQuery:v};return`(${k.toString()})(${JSON.stringify(e)})`}const j=({nonce:e})=>u(`script`,{dangerouslySetInnerHTML:{__html:A()},nonce:e,suppressHydrationWarning:!0});function M(n={}){let{className:r=``,ssrCookie:i}=n??{};return o(()=>{let n,a;if(!t())n=N({cookie:i}),a=E(n,{prefersDarkMode:!1,prefersHighContrast:!1});else{let e=window.matchMedia(_).matches,t=window.matchMedia(v).matches;n=N({cookie:document.cookie}),a=E(n,{prefersDarkMode:e,prefersHighContrast:t})}return{className:e(r,a),"data-applied-theme":a,"data-theme":n}},[r,i])}function N({cookie:e}){if(!e)return b;try{let t=e.split(`;`).find(e=>e.trim().startsWith(`${y}=`))?.split(`=`)[1],n=t?globalThis.decodeURIComponent(t):null;return m(n)?n:b}catch{return b}}function P(e){if(e)return e.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(`${y}=`))}function F(e,t){let{broadcastChannel:n,pingKey:r}=t;try{if(n){n.postMessage({theme:e,timestamp:Date.now()});return}}catch{}try{localStorage.setItem(r,JSON.stringify({theme:e,timestamp:Date.now()}))}catch{}}function I(e){let t=new Date;t.setFullYear(t.getFullYear()+1);let{hostname:n,protocol:r}=window.location,i=n===`ngrok.com`||n.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,a=r===`https:`?`; Secure`:``;return`${y}=${encodeURIComponent(e)}; expires=${t.toUTCString()}; path=/${i}; SameSite=Lax${a}`}function L(e){if(t())try{document.cookie=I(e)}catch{}}export{A as a,M as c,p as d,g as f,f as h,N as i,C as l,d as m,S as n,T as o,m as p,P as r,D as s,j as t,h as u};