@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.
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1 -1
- package/dist/alert-center.d.ts +217 -19
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/{alert-QMs0PqMq.js → alert-vwFd7qdp.js} +1 -1
- package/dist/alert.js +1 -1
- package/dist/{anchor-DvbNsphX.js → anchor-3OGK2UKU.js} +1 -1
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +296 -213
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{button-BUospUB3.js → button-Cnja9Bsr.js} +1 -1
- package/dist/{button-BO2CKsz6.js → button-DmJkYfyl.js} +1 -1
- package/dist/{button-C0S8RbaJ.js → button-IlxHhjPK.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/centered-layout.js +1 -1
- package/dist/{chart-DdBQ3xwx.js → chart-B3pAvmkk.js} +1 -1
- package/dist/{choice-C9gLKECf.js → choice-CnwfjSEu.js} +1 -1
- package/dist/choice.js +1 -1
- package/dist/code-block.js +1 -1
- package/dist/code.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/command.js +1 -1
- package/dist/cookie-ca4g5CKp.js +1 -0
- package/dist/data-table.js +1 -1
- package/dist/description-list.js +1 -1
- package/dist/{dialog-Bsj_dX6r.js → dialog-DozL6n-F.js} +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-fUMqjRC0.js → dropdown-menu-BRH0Wd_z.js} +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +1 -1
- package/dist/field.js +1 -1
- package/dist/{icons-CPbOq7cF.js → icons-Bb_zF2OV.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/line-chart.js +1 -1
- package/dist/{list-CQFWx6Z8.js → list-CJABVHwi.js} +1 -1
- package/dist/list.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main.d.ts +32 -1
- package/dist/media-object.js +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/platform-BVD3gpKD.js +1 -0
- package/dist/{primitive-Dv-3snU3.js → primitive-D-9GIFWb.js} +1 -1
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.js +1 -1
- package/dist/{select-B-9yWrif.js → select-BReznXaw.js} +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-BepAcFFy.js → separator-D0D6VyyM.js} +1 -1
- package/dist/separator.js +1 -1
- package/dist/{sheet-_fXLjiq2.js → sheet-BxvTfPLM.js} +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +534 -60
- package/dist/sidebar.js +1 -1
- package/dist/{skeleton-DsHXIa9j.js → skeleton-BhcJMpem.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slot-DdgxmuI5.d.ts +67 -0
- package/dist/slot-DpNWVci8.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.js +1 -1
- package/dist/theme-BorfgnNh.js +1 -0
- package/dist/theme-switcher.d.ts +1 -1
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip-Dnu35cjU.js +1 -0
- package/dist/tooltip-mrpLz4DZ.d.ts +218 -0
- package/dist/tooltip.d.ts +1 -217
- package/dist/tooltip.js +1 -1
- package/dist/well.js +1 -1
- package/package.json +1 -1
- package/dist/slot-BtwKJTLq.d.ts +0 -25
- package/dist/slot-Dpsqz16D.js +0 -1
- package/dist/theme-IAnQ35bd.js +0 -1
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,218 +1,2 @@
|
|
|
1
|
-
import {
|
|
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{
|
|
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-
|
|
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
package/dist/slot-BtwKJTLq.d.ts
DELETED
|
@@ -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 };
|
package/dist/slot-Dpsqz16D.js
DELETED
|
@@ -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};
|
package/dist/theme-IAnQ35bd.js
DELETED
|
@@ -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};
|