@sesionario/blocks 1.39.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.cjs +813 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -2
- package/dist/index.d.ts +32 -2
- package/dist/index.js +812 -58
- package/dist/index.js.map +1 -1
- package/dist/livo.cjs +8 -0
- package/dist/livo.cjs.map +1 -1
- package/dist/livo.js +8 -0
- package/dist/livo.js.map +1 -1
- package/dist/office.cjs +310 -0
- package/dist/office.cjs.map +1 -0
- package/dist/office.d.cts +53 -0
- package/dist/office.d.ts +53 -0
- package/dist/office.js +282 -0
- package/dist/office.js.map +1 -0
- package/dist/theme-chrome.cjs +127 -0
- package/dist/theme-chrome.cjs.map +1 -0
- package/dist/theme-chrome.d.cts +8 -0
- package/dist/theme-chrome.d.ts +8 -0
- package/dist/theme-chrome.js +125 -0
- package/dist/theme-chrome.js.map +1 -0
- package/dist/theme.cjs +138 -0
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +47 -1
- package/dist/theme.d.ts +47 -1
- package/dist/theme.js +133 -1
- package/dist/theme.js.map +1 -1
- package/package.json +22 -2
package/README.md
CHANGED
|
@@ -101,12 +101,21 @@ main entry:
|
|
|
101
101
|
```tsx
|
|
102
102
|
import {
|
|
103
103
|
THEME_STORAGE_KEY,
|
|
104
|
+
brandAppleWebApp,
|
|
105
|
+
brandIcons,
|
|
106
|
+
brandViewport,
|
|
104
107
|
htmlThemeClass,
|
|
105
108
|
themeBootScript,
|
|
106
109
|
themeColorSchemeCss,
|
|
107
110
|
} from "@sesionario/blocks/theme";
|
|
111
|
+
import { ThemeChrome } from "@sesionario/blocks/theme-chrome";
|
|
108
112
|
```
|
|
109
113
|
|
|
114
|
+
`brandViewport` is the document `viewport` export (`theme-color` follows the page
|
|
115
|
+
background). `ThemeChrome` is client-only: mount it inside `next-themes` and pass
|
|
116
|
+
the light and dark icon URLs. An explicit light or dark choice overrides the OS
|
|
117
|
+
media queries; `system` leaves them in place.
|
|
118
|
+
|
|
110
119
|
The top progress bar is a separate client subpath so `loading.tsx` does not
|
|
111
120
|
pull the main barrel. It does not import Next.js: pass `pathname` and
|
|
112
121
|
`search`, and wrap `useSearchParams` in `<Suspense>`. Keyframes are inlined
|
|
@@ -132,6 +141,18 @@ import { useDismissSidebarOnLink } from "@sesionario/blocks/sidebar-dismiss";
|
|
|
132
141
|
useDismissSidebarOnLink(isMobile && openMobile, () => setOpenMobile(false));
|
|
133
142
|
```
|
|
134
143
|
|
|
144
|
+
Scroll restoration lives on the main client entry. Pass a route key from the
|
|
145
|
+
app (`pathname` + search). Fresh navigations start at the top; back and
|
|
146
|
+
forward restore the offset of the port that actually moved (the window, or
|
|
147
|
+
a nested overflow pane registered with `useRegisterScrollContainer`).
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
import {
|
|
151
|
+
ScrollRestorationProvider,
|
|
152
|
+
useRegisterScrollContainer,
|
|
153
|
+
} from "@sesionario/blocks";
|
|
154
|
+
```
|
|
155
|
+
|
|
135
156
|
Peer dependencies (install in the consuming app as needed):
|
|
136
157
|
|
|
137
158
|
- `react`, `react-dom`
|