@alexandregme/zljs 3.1.0 → 3.2.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/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ A change that needs action in an app has a **Migration** note. When updating, re
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [3.2.0] - 2026-11-10
12
+
13
+ ### Added
14
+
15
+ - `PageWrapper`, in `@alexandregme/zljs/next`, the frame of a page with a single block in the middle, such as a sign-in card: it takes the height of the screen, centers its children and keeps them narrow
16
+
11
17
  ## [3.1.0] - 2026-11-10
12
18
 
13
19
  ### Added
@@ -417,7 +423,8 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
417
423
 
418
424
  The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
419
425
 
420
- [Unreleased]: https://github.com/alexandregme/zljs/compare/v3.1.0...HEAD
426
+ [Unreleased]: https://github.com/alexandregme/zljs/compare/v3.2.0...HEAD
427
+ [3.2.0]: https://github.com/alexandregme/zljs/compare/v3.1.0...v3.2.0
421
428
  [3.1.0]: https://github.com/alexandregme/zljs/compare/v3.0.0...v3.1.0
422
429
  [3.0.0]: https://github.com/alexandregme/zljs/compare/v2.3.0...v3.0.0
423
430
  [2.3.0]: https://github.com/alexandregme/zljs/compare/v2.2.0...v2.3.0
@@ -18,6 +18,13 @@ interface NotFoundProps {
18
18
 
19
19
  declare const NotFound: ({ title, message, backHref, backLabel, }: NotFoundProps) => react.JSX.Element;
20
20
 
21
+ interface PageWrapperProps {
22
+ /** The content of the page, such as a sign-in card. */
23
+ children: ReactNode;
24
+ }
25
+
26
+ declare const PageWrapper: ({ children }: PageWrapperProps) => react.JSX.Element;
27
+
21
28
  interface LinkProps {
22
29
  children: ReactNode;
23
30
  href: string;
@@ -40,5 +47,5 @@ interface PageConfigProps {
40
47
 
41
48
  declare const PageConfig: ({ children, title, reducers, initPage, }: PageConfigProps) => react.JSX.Element;
42
49
 
43
- export { AppProviders, Link, NotFound, PageConfig, RootLayout };
44
- export type { AppProvidersProps, InitPageFunction, LinkProps, NotFoundProps, PageConfigProps, RootLayoutProps };
50
+ export { AppProviders, Link, NotFound, PageConfig, PageWrapper, RootLayout };
51
+ export type { AppProvidersProps, InitPageFunction, LinkProps, NotFoundProps, PageConfigProps, PageWrapperProps, RootLayoutProps };
@@ -79,10 +79,26 @@ var NotFound = ({
79
79
  ] });
80
80
  };
81
81
 
82
+ // core/next/page-wrapper/page-wrapper.styles.ts
83
+ import { tv as tv4 } from "tailwind-variants";
84
+ var pageWrapper = tv4({
85
+ slots: {
86
+ base: "flex items-center justify-center min-h-dvh p-4",
87
+ content: "w-full max-w-sm"
88
+ }
89
+ });
90
+
91
+ // core/next/page-wrapper/page-wrapper.tsx
92
+ import { jsx as jsx4 } from "react/jsx-runtime";
93
+ var PageWrapper = ({ children }) => {
94
+ const { base, content } = pageWrapper();
95
+ return /* @__PURE__ */ jsx4("div", { className: base(), children: /* @__PURE__ */ jsx4("div", { className: content(), children }) });
96
+ };
97
+
82
98
  // core/next/app-providers/app-providers.tsx
83
99
  import { useEffect } from "react";
84
100
  import { usePathname } from "next/navigation.js";
85
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
101
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
86
102
  var RouteSync = () => {
87
103
  const pathname = usePathname();
88
104
  const setRoute = useRouterStore((s) => s.setRoute);
@@ -94,14 +110,14 @@ var RouteSync = () => {
94
110
  return null;
95
111
  };
96
112
  var AppProviders = ({ children, ...store }) => /* @__PURE__ */ jsxs2(ReduxProvider, { ...store, children: [
97
- /* @__PURE__ */ jsx4(RouteSync, {}),
98
- /* @__PURE__ */ jsx4(ZustandProviders, { children })
113
+ /* @__PURE__ */ jsx5(RouteSync, {}),
114
+ /* @__PURE__ */ jsx5(ZustandProviders, { children })
99
115
  ] });
100
116
 
101
117
  // core/next/page-config/page-config.tsx
102
118
  import { useEffect as useEffect2 } from "react";
103
119
  import { useDispatch, useStore } from "react-redux";
104
- import { Fragment, jsx as jsx5 } from "react/jsx-runtime";
120
+ import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
105
121
  var PageConfig = ({
106
122
  children,
107
123
  title,
@@ -124,12 +140,13 @@ var PageConfig = ({
124
140
  initPage(dispatch);
125
141
  }
126
142
  }, []);
127
- return /* @__PURE__ */ jsx5(Fragment, { children });
143
+ return /* @__PURE__ */ jsx6(Fragment, { children });
128
144
  };
129
145
  export {
130
146
  AppProviders,
131
147
  Link,
132
148
  NotFound,
133
149
  PageConfig,
150
+ PageWrapper,
134
151
  RootLayout
135
152
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexandregme/zljs",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).",
5
5
  "keywords": [
6
6
  "react",