rockin 0.0.14 → 0.0.16
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/README.md +21 -3
- package/dist/{chunk-5LE4X3CW.js → chunk-5QSYZSVL.js} +7 -1
- package/dist/chunk-7ZCRGTLA.js +209 -0
- package/dist/chunk-FYFBWCMJ.js +65 -0
- package/dist/{chunk-BDQJCK4S.js → chunk-M5NHRP6W.js} +1 -5
- package/dist/chunk-RT2YVQ2Y.js +33 -0
- package/dist/hooks/index.d.ts +5 -1
- package/dist/hooks/index.js +7 -14
- package/dist/icon/index.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -2
- package/dist/loader.d.ts +2 -2
- package/dist/provider.d.ts +17 -0
- package/dist/provider.js +13 -0
- package/dist/ui/index.d.ts +10 -1
- package/dist/ui/index.js +392 -397
- package/dist/utils/parms-client.js +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -18,6 +18,24 @@ import { cn } from "rockin/lib"
|
|
|
18
18
|
import "rockin/styles.css"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
The root entry also exports the client-side theme provider:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import type { ReactNode } from "react"
|
|
25
|
+
import { Provider } from "rockin"
|
|
26
|
+
|
|
27
|
+
export function AppProviders({ children }: { children: ReactNode }) {
|
|
28
|
+
return (
|
|
29
|
+
<Provider light="#ffffff" dark="#000000" fullscreen={false}>
|
|
30
|
+
{children}
|
|
31
|
+
</Provider>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`light` and `dark` override the browser theme colors. `fullscreen` controls the
|
|
37
|
+
`F`-key fullscreen shortcut and defaults to `true`.
|
|
38
|
+
|
|
21
39
|
Focused entry points are also available:
|
|
22
40
|
|
|
23
41
|
```tsx
|
|
@@ -33,7 +51,7 @@ import * as Gravity from "rockin/gravity"
|
|
|
33
51
|
## Development
|
|
34
52
|
|
|
35
53
|
```bash
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
bun install
|
|
55
|
+
bun run typecheck
|
|
56
|
+
bun run build
|
|
39
57
|
```
|
|
@@ -140,7 +140,13 @@ var BellIcon = forwardRef(
|
|
|
140
140
|
variants: bellVariants,
|
|
141
141
|
style: { transformOrigin: "top center" },
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */ jsx(
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
m.path,
|
|
145
|
+
{
|
|
146
|
+
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
147
|
+
variants: clapperVariants
|
|
148
|
+
}
|
|
149
|
+
),
|
|
144
150
|
/* @__PURE__ */ jsx("path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" })
|
|
145
151
|
]
|
|
146
152
|
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFullscreen,
|
|
3
|
+
useNative
|
|
4
|
+
} from "./chunk-RT2YVQ2Y.js";
|
|
5
|
+
import {
|
|
6
|
+
TopLoader
|
|
7
|
+
} from "./chunk-3ZGQJTWY.js";
|
|
8
|
+
import {
|
|
9
|
+
TooltipProvider
|
|
10
|
+
} from "./chunk-FYFBWCMJ.js";
|
|
11
|
+
|
|
12
|
+
// src/provider.tsx
|
|
13
|
+
import { usePathname } from "next/navigation";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { useHotkeys } from "react-hotkeys-hook";
|
|
16
|
+
import { GooeyToaster } from "goey-toast";
|
|
17
|
+
import { ThemeProvider, useTheme } from "next-themes";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var browserThemeColors = {
|
|
20
|
+
light: "#ffffff",
|
|
21
|
+
dark: "#000000"
|
|
22
|
+
};
|
|
23
|
+
function syncBrowserChrome(theme, colors) {
|
|
24
|
+
const themeColor = colors[theme];
|
|
25
|
+
const statusBarStyle = theme === "dark" ? "black-translucent" : "default";
|
|
26
|
+
const themeColorMetas = document.querySelectorAll(
|
|
27
|
+
'meta[name="theme-color"]'
|
|
28
|
+
);
|
|
29
|
+
if (themeColorMetas.length) {
|
|
30
|
+
themeColorMetas.forEach((meta) => {
|
|
31
|
+
if (meta.content !== themeColor) {
|
|
32
|
+
meta.content = themeColor;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
const meta = document.createElement("meta");
|
|
37
|
+
meta.name = "theme-color";
|
|
38
|
+
meta.content = themeColor;
|
|
39
|
+
document.head.appendChild(meta);
|
|
40
|
+
}
|
|
41
|
+
const statusBarMetas = document.querySelectorAll(
|
|
42
|
+
'meta[name="apple-mobile-web-app-status-bar-style"]'
|
|
43
|
+
);
|
|
44
|
+
if (statusBarMetas.length) {
|
|
45
|
+
statusBarMetas.forEach((meta) => {
|
|
46
|
+
if (meta.content !== statusBarStyle) {
|
|
47
|
+
meta.content = statusBarStyle;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
const meta = document.createElement("meta");
|
|
52
|
+
meta.name = "apple-mobile-web-app-status-bar-style";
|
|
53
|
+
meta.content = statusBarStyle;
|
|
54
|
+
document.head.appendChild(meta);
|
|
55
|
+
}
|
|
56
|
+
if (document.documentElement.style.colorScheme !== theme) {
|
|
57
|
+
document.documentElement.style.colorScheme = theme;
|
|
58
|
+
}
|
|
59
|
+
if (document.documentElement.style.backgroundColor !== themeColor) {
|
|
60
|
+
document.documentElement.style.backgroundColor = themeColor;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function observeBrowserChrome(theme, colors) {
|
|
64
|
+
const observer = new MutationObserver(() => {
|
|
65
|
+
syncBrowserChrome(theme, colors);
|
|
66
|
+
});
|
|
67
|
+
observer.observe(document.head, {
|
|
68
|
+
childList: true,
|
|
69
|
+
subtree: true,
|
|
70
|
+
attributes: true,
|
|
71
|
+
attributeFilter: ["content"]
|
|
72
|
+
});
|
|
73
|
+
return observer;
|
|
74
|
+
}
|
|
75
|
+
function useBrowserTheme() {
|
|
76
|
+
const { resolvedTheme } = useTheme();
|
|
77
|
+
return resolvedTheme === "dark" ? "dark" : "light";
|
|
78
|
+
}
|
|
79
|
+
function BrowserThemeSync({ light, dark }) {
|
|
80
|
+
const pathname = usePathname();
|
|
81
|
+
const theme = useBrowserTheme();
|
|
82
|
+
const colors = React.useMemo(() => ({ light, dark }), [dark, light]);
|
|
83
|
+
React.useLayoutEffect(() => {
|
|
84
|
+
syncBrowserChrome(theme, colors);
|
|
85
|
+
}, [colors, pathname, theme]);
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
const observer = observeBrowserChrome(theme, colors);
|
|
88
|
+
return () => {
|
|
89
|
+
observer.disconnect();
|
|
90
|
+
};
|
|
91
|
+
}, [colors, theme]);
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function Provider({
|
|
95
|
+
children,
|
|
96
|
+
light = browserThemeColors.light,
|
|
97
|
+
dark = browserThemeColors.dark,
|
|
98
|
+
fullscreen = true,
|
|
99
|
+
...props
|
|
100
|
+
}) {
|
|
101
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(
|
|
102
|
+
ThemeProvider,
|
|
103
|
+
{
|
|
104
|
+
attribute: "class",
|
|
105
|
+
defaultTheme: "system",
|
|
106
|
+
enableSystem: true,
|
|
107
|
+
disableTransitionOnChange: true,
|
|
108
|
+
...props,
|
|
109
|
+
children: /* @__PURE__ */ jsxs(TopLoader, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(AppToaster, {}),
|
|
111
|
+
/* @__PURE__ */ jsx(AppStatusBarBackground, {}),
|
|
112
|
+
/* @__PURE__ */ jsx(NativeThemeEventSync, {}),
|
|
113
|
+
/* @__PURE__ */ jsx(BrowserThemeSync, { light, dark }),
|
|
114
|
+
/* @__PURE__ */ jsx(ThemeHotkey, {}),
|
|
115
|
+
fullscreen ? /* @__PURE__ */ jsx(FullscreenHotkey, {}) : null,
|
|
116
|
+
children
|
|
117
|
+
] })
|
|
118
|
+
}
|
|
119
|
+
) });
|
|
120
|
+
}
|
|
121
|
+
function AppToaster() {
|
|
122
|
+
const { resolvedTheme } = useTheme();
|
|
123
|
+
const toasterTheme = resolvedTheme === "dark" ? "dark" : "light";
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
GooeyToaster,
|
|
126
|
+
{
|
|
127
|
+
theme: toasterTheme,
|
|
128
|
+
position: "bottom-right",
|
|
129
|
+
closeButton: "top-left"
|
|
130
|
+
},
|
|
131
|
+
toasterTheme
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function AppStatusBarBackground() {
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
"aria-hidden": true,
|
|
139
|
+
className: "fixed inset-x-0 top-0 z-50 hidden h-(--app-safe-top) bg-background/80 backdrop-blur-xl standalone:block native:block"
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function NativeThemeEventSync() {
|
|
144
|
+
const { resolvedTheme } = useTheme();
|
|
145
|
+
React.useEffect(() => {
|
|
146
|
+
if (!resolvedTheme) return;
|
|
147
|
+
window.dispatchEvent(
|
|
148
|
+
new CustomEvent("kdpower:theme-change", {
|
|
149
|
+
detail: {
|
|
150
|
+
theme: resolvedTheme
|
|
151
|
+
}
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
}, [resolvedTheme]);
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
function isTypingTarget(target) {
|
|
158
|
+
if (!(target instanceof HTMLElement)) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
return target.isContentEditable || target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT";
|
|
162
|
+
}
|
|
163
|
+
function ThemeHotkey() {
|
|
164
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
165
|
+
React.useEffect(() => {
|
|
166
|
+
function onKeyDown(event) {
|
|
167
|
+
if (event.defaultPrevented || event.repeat) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (event.metaKey || event.ctrlKey || event.altKey) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (typeof event.key !== "string" || event.key.toLowerCase() !== "d") {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (isTypingTarget(event.target)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
|
180
|
+
}
|
|
181
|
+
window.addEventListener("keydown", onKeyDown);
|
|
182
|
+
return () => {
|
|
183
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
184
|
+
};
|
|
185
|
+
}, [resolvedTheme, setTheme]);
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
function FullscreenHotkey() {
|
|
189
|
+
const isNative = useNative();
|
|
190
|
+
const { toggleFullscreen } = useFullscreen();
|
|
191
|
+
useHotkeys(
|
|
192
|
+
"f",
|
|
193
|
+
() => {
|
|
194
|
+
void toggleFullscreen();
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
enabled: !isNative,
|
|
198
|
+
enableOnContentEditable: false,
|
|
199
|
+
enableOnFormTags: false,
|
|
200
|
+
preventDefault: true
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
browserThemeColors,
|
|
208
|
+
Provider
|
|
209
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// src/ui/tooltip.tsx
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function TooltipProvider({
|
|
6
|
+
delay = 0,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
TooltipPrimitive.Provider,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "tooltip-provider",
|
|
13
|
+
delay,
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function Tooltip({ ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
20
|
+
}
|
|
21
|
+
function TooltipTrigger({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
23
|
+
}
|
|
24
|
+
function TooltipContent({
|
|
25
|
+
className,
|
|
26
|
+
side = "top",
|
|
27
|
+
sideOffset = 4,
|
|
28
|
+
align = "center",
|
|
29
|
+
alignOffset = 0,
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
34
|
+
TooltipPrimitive.Positioner,
|
|
35
|
+
{
|
|
36
|
+
align,
|
|
37
|
+
alignOffset,
|
|
38
|
+
side,
|
|
39
|
+
sideOffset,
|
|
40
|
+
className: "isolate z-50",
|
|
41
|
+
children: /* @__PURE__ */ jsxs(
|
|
42
|
+
TooltipPrimitive.Popup,
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "tooltip-content",
|
|
45
|
+
className: cn(
|
|
46
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
children,
|
|
52
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
TooltipProvider,
|
|
62
|
+
Tooltip,
|
|
63
|
+
TooltipTrigger,
|
|
64
|
+
TooltipContent
|
|
65
|
+
};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// src/utils/parms-client.ts
|
|
2
|
-
import {
|
|
3
|
-
createParser,
|
|
4
|
-
parseAsString,
|
|
5
|
-
parseAsStringLiteral
|
|
6
|
-
} from "nuqs";
|
|
2
|
+
import { createParser, parseAsString, parseAsStringLiteral } from "nuqs";
|
|
7
3
|
var parseAsPage = createParser({
|
|
8
4
|
parse(value) {
|
|
9
5
|
const page = Number(value);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isNativeApp
|
|
3
|
+
} from "./chunk-ATPUW3SQ.js";
|
|
4
|
+
|
|
5
|
+
// src/hooks/useFullscreen.ts
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
function useFullscreen() {
|
|
8
|
+
const toggleFullscreen = React.useCallback(async () => {
|
|
9
|
+
if (document.fullscreenElement) {
|
|
10
|
+
await document.exitFullscreen();
|
|
11
|
+
} else {
|
|
12
|
+
await document.documentElement.requestFullscreen();
|
|
13
|
+
}
|
|
14
|
+
}, []);
|
|
15
|
+
return {
|
|
16
|
+
toggleFullscreen
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// src/hooks/useNative.ts
|
|
21
|
+
import { useEffect, useState } from "react";
|
|
22
|
+
function useNative() {
|
|
23
|
+
const [native, setNative] = useState(void 0);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setNative(isNativeApp());
|
|
26
|
+
}, []);
|
|
27
|
+
return native;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
useFullscreen,
|
|
32
|
+
useNative
|
|
33
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { NuqsAdapter } from 'nuqs/adapters/next/app';
|
|
2
2
|
|
|
3
|
+
declare function useFullscreen(): {
|
|
4
|
+
toggleFullscreen: () => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
|
|
3
7
|
declare function useMediaQuery(query: string): boolean;
|
|
4
8
|
|
|
5
9
|
declare function useMounted(): {
|
|
@@ -50,4 +54,4 @@ declare function useSearchParams(): {
|
|
|
50
54
|
transactionPage: number;
|
|
51
55
|
};
|
|
52
56
|
|
|
53
|
-
export { searchFocus, useMediaQuery, useMounted, useNative, useSearchParams };
|
|
57
|
+
export { searchFocus, useFullscreen, useMediaQuery, useMounted, useNative, useSearchParams };
|
package/dist/hooks/index.js
CHANGED
|
@@ -4,24 +4,16 @@ import {
|
|
|
4
4
|
hasFlagSearchParam,
|
|
5
5
|
searchParamKeys,
|
|
6
6
|
searchParams
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-M5NHRP6W.js";
|
|
8
|
+
import {
|
|
9
|
+
useFullscreen,
|
|
10
|
+
useNative
|
|
11
|
+
} from "../chunk-RT2YVQ2Y.js";
|
|
8
12
|
import {
|
|
9
13
|
useMediaQuery,
|
|
10
14
|
useMounted
|
|
11
15
|
} from "../chunk-C3RGHTDI.js";
|
|
12
|
-
import
|
|
13
|
-
isNativeApp
|
|
14
|
-
} from "../chunk-ATPUW3SQ.js";
|
|
15
|
-
|
|
16
|
-
// src/hooks/useNative.ts
|
|
17
|
-
import { useEffect, useState } from "react";
|
|
18
|
-
function useNative() {
|
|
19
|
-
const [native, setNative] = useState(void 0);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
setNative(isNativeApp());
|
|
22
|
-
}, []);
|
|
23
|
-
return native;
|
|
24
|
-
}
|
|
16
|
+
import "../chunk-ATPUW3SQ.js";
|
|
25
17
|
|
|
26
18
|
// src/hooks/useSearchParams.ts
|
|
27
19
|
import {
|
|
@@ -265,6 +257,7 @@ function useSearchParams() {
|
|
|
265
257
|
export {
|
|
266
258
|
NuqsAdapter,
|
|
267
259
|
searchFocus,
|
|
260
|
+
useFullscreen,
|
|
268
261
|
useMediaQuery,
|
|
269
262
|
useMounted,
|
|
270
263
|
useNative,
|
package/dist/icon/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from 'goey-toast';
|
|
|
4
4
|
export * from 'motion/react';
|
|
5
5
|
export * from 'next-themes';
|
|
6
6
|
export { TopLoader, TopLoaderProps } from './loader.js';
|
|
7
|
+
export { BrowserTheme, BrowserThemeColors, Provider, ProviderProps, browserThemeColors } from './provider.js';
|
|
7
8
|
import 'react';
|
|
8
9
|
import '@bprogress/next/app';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Provider,
|
|
4
|
+
browserThemeColors
|
|
5
|
+
} from "./chunk-7ZCRGTLA.js";
|
|
6
|
+
import "./chunk-RT2YVQ2Y.js";
|
|
1
7
|
import {
|
|
2
8
|
TopLoader
|
|
3
9
|
} from "./chunk-3ZGQJTWY.js";
|
|
10
|
+
import "./chunk-FYFBWCMJ.js";
|
|
11
|
+
import "./chunk-ATPUW3SQ.js";
|
|
4
12
|
import {
|
|
5
13
|
BellIcon,
|
|
6
14
|
IconSwap,
|
|
7
15
|
Loader
|
|
8
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5QSYZSVL.js";
|
|
9
17
|
|
|
10
18
|
// src/index.ts
|
|
11
19
|
import { default as default2 } from "@number-flow/react";
|
|
@@ -17,5 +25,7 @@ export {
|
|
|
17
25
|
IconSwap,
|
|
18
26
|
Loader,
|
|
19
27
|
default2 as NumberFlow,
|
|
20
|
-
|
|
28
|
+
Provider,
|
|
29
|
+
TopLoader,
|
|
30
|
+
browserThemeColors
|
|
21
31
|
};
|
package/dist/loader.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ComponentProps, ReactNode } from 'react';
|
|
|
3
3
|
import { ProgressProvider } from '@bprogress/next/app';
|
|
4
4
|
|
|
5
5
|
type ProgressProviderProps = ComponentProps<typeof ProgressProvider>;
|
|
6
|
-
type TopLoaderProps = Omit<ProgressProviderProps,
|
|
6
|
+
type TopLoaderProps = Omit<ProgressProviderProps, "children" | "color" | "height" | "options"> & {
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
/** Progress bar color. Accepts any valid CSS color, including a token. */
|
|
9
9
|
color?: string;
|
|
@@ -12,7 +12,7 @@ type TopLoaderProps = Omit<ProgressProviderProps, 'children' | 'color' | 'height
|
|
|
12
12
|
/** Show the provider's spinner alongside the top progress bar. */
|
|
13
13
|
showSpinner?: boolean;
|
|
14
14
|
/** Additional BProgress options. These override the component defaults. */
|
|
15
|
-
options?: ProgressProviderProps[
|
|
15
|
+
options?: ProgressProviderProps["options"];
|
|
16
16
|
};
|
|
17
17
|
declare function TopLoader({ children, color, height, options, showSpinner, ...props }: TopLoaderProps): React.JSX.Element;
|
|
18
18
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeProvider } from 'next-themes';
|
|
3
|
+
|
|
4
|
+
declare const browserThemeColors: {
|
|
5
|
+
readonly light: "#ffffff";
|
|
6
|
+
readonly dark: "#000000";
|
|
7
|
+
};
|
|
8
|
+
type BrowserTheme = keyof typeof browserThemeColors;
|
|
9
|
+
type BrowserThemeColors = Record<BrowserTheme, string>;
|
|
10
|
+
type ProviderProps = React.ComponentProps<typeof ThemeProvider> & {
|
|
11
|
+
light?: string;
|
|
12
|
+
dark?: string;
|
|
13
|
+
fullscreen?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function Provider({ children, light, dark, fullscreen, ...props }: ProviderProps): React.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { type BrowserTheme, type BrowserThemeColors, Provider, type ProviderProps, browserThemeColors };
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Provider,
|
|
4
|
+
browserThemeColors
|
|
5
|
+
} from "./chunk-7ZCRGTLA.js";
|
|
6
|
+
import "./chunk-RT2YVQ2Y.js";
|
|
7
|
+
import "./chunk-3ZGQJTWY.js";
|
|
8
|
+
import "./chunk-FYFBWCMJ.js";
|
|
9
|
+
import "./chunk-ATPUW3SQ.js";
|
|
10
|
+
export {
|
|
11
|
+
Provider,
|
|
12
|
+
browserThemeColors
|
|
13
|
+
};
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { Select as Select$1 } from '@base-ui/react/select';
|
|
|
41
41
|
import { GooeyToasterProps } from 'goey-toast';
|
|
42
42
|
import { DndContextProps, UniqueIdentifier, DragEndEvent, DragOverlay } from '@dnd-kit/core';
|
|
43
43
|
import { SortableContextProps } from '@dnd-kit/sortable';
|
|
44
|
+
import * as SwipeActionsPrimitive from '@ncdai/react-swipe-actions';
|
|
44
45
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
45
46
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
46
47
|
|
|
@@ -976,6 +977,14 @@ interface SortableOverlayProps extends Omit<React$1.ComponentProps<typeof DragOv
|
|
|
976
977
|
}
|
|
977
978
|
declare function SortableOverlay(props: SortableOverlayProps): React$1.ReactPortal | null;
|
|
978
979
|
|
|
980
|
+
type SwipeSide = SwipeActionsPrimitive.SwipeSide;
|
|
981
|
+
type SwipeState = SwipeActionsPrimitive.SwipeState;
|
|
982
|
+
declare const SwipeRoot: typeof SwipeActionsPrimitive.SwipeRoot;
|
|
983
|
+
declare const SwipeItem: typeof SwipeActionsPrimitive.SwipeItem;
|
|
984
|
+
declare const SwipeActions: typeof SwipeActionsPrimitive.SwipeActions;
|
|
985
|
+
declare function SwipeAction({ className, children, ...props }: ComponentProps<typeof SwipeActionsPrimitive.SwipeAction>): React$1.JSX.Element;
|
|
986
|
+
declare function SwipeContent({ className, ...props }: ComponentProps<typeof SwipeActionsPrimitive.SwipeContent>): React$1.JSX.Element;
|
|
987
|
+
|
|
979
988
|
declare function Switch({ className, size, ...props }: Switch$1.Root.Props & {
|
|
980
989
|
size?: "sm" | "default";
|
|
981
990
|
}): React$1.JSX.Element;
|
|
@@ -993,4 +1002,4 @@ declare function Tooltip({ ...props }: Tooltip$1.Root.Props): React$1.JSX.Elemen
|
|
|
993
1002
|
declare function TooltipTrigger({ ...props }: Tooltip$1.Trigger.Props): React$1.JSX.Element;
|
|
994
1003
|
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React$1.JSX.Element;
|
|
995
1004
|
|
|
996
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedDiv, type AnimatedTAGProps, Apple, AppleHelloEffectEnglish, AppleHelloEffectHindi, AppleHelloEffectSpanish, Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BlogCardAnimation, Bottom, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CodeBlock, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CustomRendererProps, DEFAULT_I18N, DEFAULT_OPERATORS, DashedSeparator, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dock, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EASE_DRAWER, EASE_IN_OUT, EASE_OUT, EASE_OUT_CSS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FadeContainer, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type Filter, type FilterFieldConfig, type FilterFieldGroup, type FilterFieldsConfig, type FilterGroup, type FilterI18nConfig, type FilterOperator, type FilterOption, type FilterOptionListRenderProps, Filters, FiltersContent, Image, type ImageProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, JellyAction, JellyBlob, JellyEmpty, type JellyEmptyProps, JellyGroup, JellyLink, JellyMascot, type JellyMascotConfig, JellyMini, type JellySize, Kbd, KbdGroup, Label, ListItemVariant, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeAppBridge, NumberStepper, OTPInput, type OTPInputProps, type OTPStatus, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, QuantityInput, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RollingNumber, SPRING_LAYOUT, SPRING_MOUSE, SPRING_PANEL, SPRING_PRESS, SPRING_SWAP, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShimmerSkeleton, type SkeletonProps as ShimmerSkeletonProps, Skeleton, SkeletonAvatar, SkeletonButton, type SkeletonProps, type SkeletonRounded, SkeletonText, type SkeletonVariant, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type SortableProps, Switch, Textarea, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Top, activityItemAnimation, badgeVariants, buttonGroupVariants, buttonVariants, createFilter, createFilterGroup, fromLeftChildren, fromLeftVariant, fromRightVariant, fromTopVariant, getSkeletonVariantDuration, hamFastFadeContainer, headingFromLeft, kanbanOrderCardAnimation, kanbanOrderCardLayoutTransition, kanbanOrderCardReducedMotionAnimation, mobileNavItemSideways, opacityVariant, popUp, popUpFromBottomForText, resolveSkeletonA11yProps, searchBarSlideAnimation, skeletonRoundedClasses, skeletonVariantDefaultDuration, svgVariant, useAutocompleteFilter, useCarousel, useComboboxAnchor, useJellyMood };
|
|
1005
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedDiv, type AnimatedTAGProps, Apple, AppleHelloEffectEnglish, AppleHelloEffectHindi, AppleHelloEffectSpanish, Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BlogCardAnimation, Bottom, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CodeBlock, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CustomRendererProps, DEFAULT_I18N, DEFAULT_OPERATORS, DashedSeparator, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dock, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EASE_DRAWER, EASE_IN_OUT, EASE_OUT, EASE_OUT_CSS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FadeContainer, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type Filter, type FilterFieldConfig, type FilterFieldGroup, type FilterFieldsConfig, type FilterGroup, type FilterI18nConfig, type FilterOperator, type FilterOption, type FilterOptionListRenderProps, Filters, FiltersContent, Image, type ImageProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, JellyAction, JellyBlob, JellyEmpty, type JellyEmptyProps, JellyGroup, JellyLink, JellyMascot, type JellyMascotConfig, JellyMini, type JellySize, Kbd, KbdGroup, Label, ListItemVariant, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeAppBridge, NumberStepper, OTPInput, type OTPInputProps, type OTPStatus, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, QuantityInput, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RollingNumber, SPRING_LAYOUT, SPRING_MOUSE, SPRING_PANEL, SPRING_PRESS, SPRING_SWAP, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShimmerSkeleton, type SkeletonProps as ShimmerSkeletonProps, Skeleton, SkeletonAvatar, SkeletonButton, type SkeletonProps, type SkeletonRounded, SkeletonText, type SkeletonVariant, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type SortableProps, SwipeAction, SwipeActions, SwipeContent, SwipeItem, SwipeRoot, type SwipeSide, type SwipeState, Switch, Textarea, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Top, activityItemAnimation, badgeVariants, buttonGroupVariants, buttonVariants, createFilter, createFilterGroup, fromLeftChildren, fromLeftVariant, fromRightVariant, fromTopVariant, getSkeletonVariantDuration, hamFastFadeContainer, headingFromLeft, kanbanOrderCardAnimation, kanbanOrderCardLayoutTransition, kanbanOrderCardReducedMotionAnimation, mobileNavItemSideways, opacityVariant, popUp, popUpFromBottomForText, resolveSkeletonA11yProps, searchBarSlideAnimation, skeletonRoundedClasses, skeletonVariantDefaultDuration, svgVariant, useAutocompleteFilter, useCarousel, useComboboxAnchor, useJellyMood };
|