@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 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`