weg-shared-layout 0.0.40 → 0.0.41

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.
Files changed (37) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/weg-footer_2.cjs.entry.js +187 -22
  4. package/dist/cjs/weg-shared-layout.cjs.js +1 -1
  5. package/dist/collection/components/weg-footer/icons/instagram.svg +5 -5
  6. package/dist/collection/components/weg-footer/icons/linkedin.svg +3 -3
  7. package/dist/collection/components/weg-footer/icons/tiktok.svg +3 -3
  8. package/dist/collection/components/weg-footer/icons/youtube.svg +4 -4
  9. package/dist/collection/components/weg-footer/weg-footer.css +263 -263
  10. package/dist/collection/components/weg-footer/weg-footer.js +2 -2
  11. package/dist/collection/components/weg-header/weg-header.css +508 -483
  12. package/dist/collection/components/weg-header/weg-header.js +84 -21
  13. package/dist/collection/styles/shared.css +104 -103
  14. package/dist/collection/utils/nav-active.js +121 -0
  15. package/dist/components/weg-footer.js +1 -1
  16. package/dist/components/weg-header.js +1 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/weg-footer_2.entry.js +187 -22
  19. package/dist/esm/weg-shared-layout.js +1 -1
  20. package/dist/types/components/weg-header/weg-header.d.ts +9 -0
  21. package/dist/types/components.d.ts +9 -0
  22. package/dist/types/utils/nav-active.d.ts +20 -0
  23. package/dist/weg-shared-layout/p-3362febf.entry.js +1 -0
  24. package/dist/weg-shared-layout/weg-shared-layout.esm.js +1 -1
  25. package/docs/README.md +51 -49
  26. package/docs/angular.md +451 -400
  27. package/docs/nextjs.md +312 -302
  28. package/docs/publishing.md +65 -65
  29. package/docs/react.md +287 -257
  30. package/docs/vanilla.md +155 -124
  31. package/package.json +81 -81
  32. package/readme.md +108 -97
  33. package/src/constants/breakpoints.ts +7 -7
  34. package/src/styles/container.css +60 -60
  35. package/dist/weg-shared-layout/p-6f83b24a.entry.js +0 -1
  36. /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/axe.d.ts +0 -0
  37. /package/dist/types/Users/{tan/Documents/code → rakin/Documents/WEG/repos}/weg-shared-layout/.stencil/test-utils/viewport.d.ts +0 -0
package/docs/react.md CHANGED
@@ -1,257 +1,287 @@
1
- # React (SPA)
2
-
3
- Guide for **client-rendered** React apps (Vite, Create React App, etc.). If you use **Next.js App Router**, see **[Next.js](./nextjs.md)** — SSR and Server Components require a different integration.
4
-
5
- ## Components
6
-
7
- | Tag | Purpose |
8
- | --- | --- |
9
- | `<weg-header>` | Site header — bundled logo, CMS nav (signed out), built-in nav (signed in), Sign in / Manage Account / Sign out |
10
- | `<weg-footer>` | Site footer — social links, menu, credits, copyright |
11
-
12
- Both are **presentational** [Stencil](https://stenciljs.com/) Web Components. They **do not fetch data** — your app passes a **`layout`** payload (API, CMS, or [`dummy-data.json`](../src/assets/dummy-data.json)).
13
-
14
- `<weg-header>` additionally accepts **`signed-in`**, **`user-name`**, **`account-base-url`**, and emits **`wegAuthClick`**.
15
-
16
- ## Requirements
17
-
18
- | Requirement | Notes |
19
- | --- | --- |
20
- | **React 19+** | React 19 maps custom-element props to DOM **properties** when possible. Older React often sets props as string **attributes**, which breaks object payloads. |
21
- | **Bundler** | Must resolve `node_modules` ESM/CJS from `weg-shared-layout`. |
22
- | **TypeScript (optional)** | `resolveJsonModule` + `moduleResolution` `bundler` / `node16` for JSON/subpath imports; module augmentation below. |
23
-
24
- ## Install
25
-
26
- ```bash
27
- npm i weg-shared-layout
28
- # or
29
- pnpm add weg-shared-layout
30
- ```
31
-
32
- ## 1. Register custom elements (once)
33
-
34
- Call `defineCustomElements()` **once** before the first render — typically in `main.tsx` / `index.tsx`:
35
-
36
- ```ts
37
- import { defineCustomElements } from 'weg-shared-layout/loader';
38
-
39
- defineCustomElements();
40
- ```
41
-
42
- **Alternative** — side-effect imports per tag (requires modern `moduleResolution`; see [angular.md § Troubleshooting](./angular.md#troubleshooting)):
43
-
44
- ```ts
45
- import 'weg-shared-layout/weg-header';
46
- import 'weg-shared-layout/weg-footer';
47
- ```
48
-
49
- ## 2. Layout shell
50
-
51
- ### Recommended: pass `layout` as an object (React 19+)
52
-
53
- ```tsx
54
- import 'weg-shared-layout/weg-header';
55
- import 'weg-shared-layout/weg-footer';
56
- import layout from 'weg-shared-layout/dummy-data.json';
57
-
58
- export function SiteLayout({ children }: { children: React.ReactNode }) {
59
- return (
60
- <>
61
- <weg-header layout={layout} />
62
- {children}
63
- <weg-footer layout={layout} />
64
- </>
65
- );
66
- }
67
- ```
68
-
69
- ### Fallback: `JSON.stringify` (React 18 or empty components)
70
-
71
- ```tsx
72
- <weg-header layout={JSON.stringify(layout)} />
73
- <weg-footer layout={JSON.stringify(layout)} />
74
- ```
75
-
76
- ## 3. Header auth
77
-
78
- Sign-in is a normal `header.menu` link — add it in your CMS like Register. The header recognizes **Sign in** by label or login URL and navigates to `href`.
79
-
80
- ### Signed in
81
-
82
- Set **`signed-in`** and optionally **`user-name`**. The component **ignores CMS nav** and shows built-in links: Find a job, Dashboard, Manage Account, Sign out. Pass **`account-base-url`** when account links should use a non-production portal.
83
-
84
- Handle **`wegAuthClick`** for sign-out (call your logout API, then redirect):
85
-
86
- ```tsx
87
- import { useCallback, useState } from 'react';
88
- import 'weg-shared-layout/weg-header';
89
- import layout from 'weg-shared-layout/dummy-data.json';
90
-
91
- export function SiteHeader() {
92
- const [signedIn, setSignedIn] = useState(false);
93
- const userName = signedIn ? 'Alex' : undefined;
94
-
95
- const onAuthClick = useCallback(async (event: CustomEvent<{ action: 'sign-in' | 'sign-out' }>) => {
96
- if (event.detail.action !== 'sign-out') return;
97
-
98
- event.preventDefault();
99
- await logout();
100
- setSignedIn(false);
101
- window.location.assign('/');
102
- }, []);
103
-
104
- return (
105
- <weg-header
106
- layout={layout}
107
- signedIn={signedIn}
108
- {...(userName ? { userName } : {})}
109
- onWegAuthClick={onAuthClick}
110
- />
111
- );
112
- }
113
- ```
114
-
115
- | Prop / event | Purpose |
116
- | --- | --- |
117
- | `signedIn={boolean}` | Switches to signed-in nav when `true` |
118
- | `userName={string}` | First name beside profile icon on Manage Account |
119
- | `accountBaseUrl={string}` | Account portal origin for signed-in links (optional) |
120
- | `onWegAuthClick` | Required for sign-out — call logout API and redirect; sign-in follows link `href` |
121
-
122
- **Ref fallback for the event** (if `onWegAuthClick` does not bind in your React version):
123
-
124
- ```tsx
125
- import { useEffect, useRef } from 'react';
126
-
127
- const ref = useRef<HTMLWegHeaderElement>(null);
128
-
129
- useEffect(() => {
130
- const el = ref.current;
131
- if (!el) return;
132
-
133
- const handler = (event: Event) => {
134
- const e = event as CustomEvent<{ action: 'sign-in' | 'sign-out' }>;
135
- e.preventDefault();
136
- // ...
137
- };
138
-
139
- el.addEventListener('wegAuthClick', handler);
140
- return () => el.removeEventListener('wegAuthClick', handler);
141
- }, []);
142
-
143
- return <weg-header ref={ref} layout={layout} signedIn={signedIn} userName="Alex" />;
144
- ```
145
-
146
- ## 4. Production: fetch layout from your API
147
-
148
- ```tsx
149
- import { useEffect, useState } from 'react';
150
- import 'weg-shared-layout/weg-header';
151
- import 'weg-shared-layout/weg-footer';
152
- import layoutFixture from 'weg-shared-layout/dummy-data.json';
153
-
154
- type LayoutData = typeof layoutFixture;
155
-
156
- const LAYOUT_URL = 'https://weg-payload-test.vercel.app/api/layout';
157
-
158
- export function SiteLayout({ children }: { children: React.ReactNode }) {
159
- const [layout, setLayout] = useState<LayoutData | null>(null);
160
-
161
- useEffect(() => {
162
- let cancelled = false;
163
- fetch(LAYOUT_URL)
164
- .then((res) => {
165
- if (!res.ok) throw new Error(`layout fetch failed: ${res.status}`);
166
- return res.json() as Promise<LayoutData>;
167
- })
168
- .then((data) => {
169
- if (!cancelled) setLayout(data);
170
- })
171
- .catch(console.error);
172
- return () => {
173
- cancelled = true;
174
- };
175
- }, []);
176
-
177
- if (!layout) return null;
178
-
179
- return (
180
- <>
181
- <weg-header layout={layout} />
182
- {children}
183
- <weg-footer layout={layout} />
184
- </>
185
- );
186
- }
187
- ```
188
-
189
- Replace the URL with your CMS/API. Keep the object shape aligned with `dummy-data.json`.
190
-
191
- ## TypeScript
192
-
193
- ### JSON + package subpaths
194
-
195
- ```json
196
- {
197
- "compilerOptions": {
198
- "resolveJsonModule": true,
199
- "moduleResolution": "bundler"
200
- }
201
- }
202
- ```
203
-
204
- ```ts
205
- import layoutFixture from 'weg-shared-layout/dummy-data.json';
206
- export type LayoutData = typeof layoutFixture;
207
- ```
208
-
209
- Or types only: `import type { LayoutData } from 'weg-shared-layout/layout-data'`.
210
-
211
- ### JSX module augmentation
212
-
213
- Add once (e.g. `src/types/weg-shared-layout-jsx.d.ts`):
214
-
215
- ```ts
216
- import type { JSX as WegSharedLayoutJSX } from 'weg-shared-layout';
217
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
218
-
219
- declare module 'react' {
220
- namespace JSX {
221
- interface IntrinsicElements extends WegSharedLayoutJSX.IntrinsicElements {
222
- 'weg-header': WegSharedLayoutJSX.IntrinsicElements['weg-header'] &
223
- DetailedHTMLProps<HTMLAttributes<HTMLWegHeaderElement>, HTMLWegHeaderElement>;
224
- 'weg-footer': WegSharedLayoutJSX.IntrinsicElements['weg-footer'] &
225
- DetailedHTMLProps<HTMLAttributes<HTMLWegFooterElement>, HTMLWegFooterElement>;
226
- }
227
- }
228
- }
229
- ```
230
-
231
- ## `layout` prop vs attribute
232
-
233
- | How data is set | Works with object? |
234
- | --- | --- |
235
- | **Property** `el.layout = obj` / React 19 `layout={obj}` | Yes |
236
- | **Attribute** `layout="[object Object]"` / React 18 `layout={obj}` | No — components stay empty |
237
- | **Attribute** `layout={JSON.stringify(obj)}` | Yes — component parses JSON |
238
-
239
- ## Troubleshooting
240
-
241
- | Symptom | Likely cause | Fix |
242
- | --- | --- | --- |
243
- | Empty header/footer | Loader/tag import missing | `defineCustomElements()` + tag imports. |
244
- | Empty despite correct data | React set `layout` as attribute | React 19+, or `JSON.stringify`, or ref assignment. |
245
- | Logo missing on header | Old build without inlined logo | Upgrade package; logo is bundled in `logo-data.ts`. |
246
- | Auth always Sign in | `signed-in` not set | Bind `signedIn={!!session}`. |
247
- | Manage Account shows label not name | `user-name` not set | Pass `userName` when signed in. |
248
- | `onWegAuthClick` not firing | React CE event binding | Use `addEventListener` on a ref. |
249
- | TS: unknown element | No augmentation | Add `weg-shared-layout-jsx.d.ts`. |
250
-
251
- ## See also
252
-
253
- - **[Documentation index](./README.md)**
254
- - **[Next.js App Router](./nextjs.md)**
255
- - **[Angular](./angular.md)** · **[Angular 16 demo](../demo/angular16/README.md)**
256
- - **[Plain HTML / vanilla JS](./vanilla.md)**
257
- - **[Package readme](../readme.md)**
1
+ # React (SPA)
2
+
3
+ Guide for **client-rendered** React apps (Vite, Create React App, etc.). If you use **Next.js App Router**, see **[Next.js](./nextjs.md)** — SSR and Server Components require a different integration.
4
+
5
+ ## Components
6
+
7
+ | Tag | Purpose |
8
+ | --- | --- |
9
+ | `<weg-header>` | Site header — bundled logo, CMS nav (signed out), built-in nav (signed in), Sign in / Manage Account / Sign out |
10
+ | `<weg-footer>` | Site footer — social links, menu, credits, copyright |
11
+
12
+ Both are **presentational** [Stencil](https://stenciljs.com/) Web Components. They **do not fetch data** — your app passes a **`layout`** payload (API, CMS, or [`dummy-data.json`](../src/assets/dummy-data.json)).
13
+
14
+ `<weg-header>` additionally accepts **`signed-in`**, **`user-name`**, **`account-base-url`**, **`current-path`**, and emits **`wegAuthClick`**.
15
+
16
+ ## Requirements
17
+
18
+ | Requirement | Notes |
19
+ | --- | --- |
20
+ | **React 19+** | React 19 maps custom-element props to DOM **properties** when possible. Older React often sets props as string **attributes**, which breaks object payloads. |
21
+ | **Bundler** | Must resolve `node_modules` ESM/CJS from `weg-shared-layout`. |
22
+ | **TypeScript (optional)** | `resolveJsonModule` + `moduleResolution` `bundler` / `node16` for JSON/subpath imports; module augmentation below. |
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm i weg-shared-layout
28
+ # or
29
+ pnpm add weg-shared-layout
30
+ ```
31
+
32
+ ## 1. Register custom elements (once)
33
+
34
+ Call `defineCustomElements()` **once** before the first render — typically in `main.tsx` / `index.tsx`:
35
+
36
+ ```ts
37
+ import { defineCustomElements } from 'weg-shared-layout/loader';
38
+
39
+ defineCustomElements();
40
+ ```
41
+
42
+ **Alternative** — side-effect imports per tag (requires modern `moduleResolution`; see [angular.md § Troubleshooting](./angular.md#troubleshooting)):
43
+
44
+ ```ts
45
+ import 'weg-shared-layout/weg-header';
46
+ import 'weg-shared-layout/weg-footer';
47
+ ```
48
+
49
+ ## 2. Layout shell
50
+
51
+ ### Recommended: pass `layout` as an object (React 19+)
52
+
53
+ ```tsx
54
+ import 'weg-shared-layout/weg-header';
55
+ import 'weg-shared-layout/weg-footer';
56
+ import layout from 'weg-shared-layout/dummy-data.json';
57
+
58
+ export function SiteLayout({ children }: { children: React.ReactNode }) {
59
+ return (
60
+ <>
61
+ <weg-header layout={layout} />
62
+ {children}
63
+ <weg-footer layout={layout} />
64
+ </>
65
+ );
66
+ }
67
+ ```
68
+
69
+ ### Fallback: `JSON.stringify` (React 18 or empty components)
70
+
71
+ ```tsx
72
+ <weg-header layout={JSON.stringify(layout)} />
73
+ <weg-footer layout={JSON.stringify(layout)} />
74
+ ```
75
+
76
+ ## 3. Header auth
77
+
78
+ Sign-in is a normal `header.menu` link — add it in your CMS like Register. The header recognizes **Sign in** by label or login URL and navigates to `href`.
79
+
80
+ ### Signed in
81
+
82
+ Set **`signed-in`** and optionally **`user-name`**. The component **ignores CMS nav** and shows built-in links: Find a job, Dashboard, Manage Account, Sign out. Pass **`account-base-url`** when account links should use a non-production portal.
83
+
84
+ Handle **`wegAuthClick`** for sign-out (call your logout API, then redirect):
85
+
86
+ ```tsx
87
+ import { useCallback, useState } from 'react';
88
+ import { useLocation } from 'react-router-dom';
89
+ import 'weg-shared-layout/weg-header';
90
+ import layout from 'weg-shared-layout/dummy-data.json';
91
+
92
+ export function SiteHeader() {
93
+ const { pathname, search } = useLocation();
94
+ const currentPath = search ? `${pathname}${search}` : pathname;
95
+ const [signedIn, setSignedIn] = useState(false);
96
+ const userName = signedIn ? 'Alex' : undefined;
97
+
98
+ const onAuthClick = useCallback(async (event: CustomEvent<{ action: 'sign-in' | 'sign-out' }>) => {
99
+ if (event.detail.action !== 'sign-out') return;
100
+
101
+ event.preventDefault();
102
+ await logout();
103
+ setSignedIn(false);
104
+ window.location.assign('/');
105
+ }, []);
106
+
107
+ return (
108
+ <weg-header
109
+ layout={layout}
110
+ signedIn={signedIn}
111
+ currentPath={currentPath}
112
+ {...(userName ? { userName } : {})}
113
+ onWegAuthClick={onAuthClick}
114
+ />
115
+ );
116
+ }
117
+ ```
118
+
119
+ Without React Router, pass `window.location.pathname` (+ `search` when needed) or your router’s equivalent.
120
+
121
+ | Prop / event | Purpose |
122
+ | --- | --- |
123
+ | `signedIn={boolean}` | Switches to signed-in nav when `true` |
124
+ | `userName={string}` | First name beside profile icon on Manage Account |
125
+ | `accountBaseUrl={string}` | Account portal origin for signed-in links (optional) |
126
+ | `currentPath={string}` | Current path — highlights active nav (e.g. `/career-advice/foo`) |
127
+ | `onWegAuthClick` | Required for sign-out — call logout API and redirect; sign-in follows link `href` |
128
+
129
+ **Ref fallback for the event** (if `onWegAuthClick` does not bind in your React version):
130
+
131
+ ```tsx
132
+ import { useEffect, useRef } from 'react';
133
+
134
+ const ref = useRef<HTMLWegHeaderElement>(null);
135
+
136
+ useEffect(() => {
137
+ const el = ref.current;
138
+ if (!el) return;
139
+
140
+ const handler = (event: Event) => {
141
+ const e = event as CustomEvent<{ action: 'sign-in' | 'sign-out' }>;
142
+ e.preventDefault();
143
+ // ...
144
+ };
145
+
146
+ el.addEventListener('wegAuthClick', handler);
147
+ return () => el.removeEventListener('wegAuthClick', handler);
148
+ }, []);
149
+
150
+ return <weg-header ref={ref} layout={layout} signedIn={signedIn} userName="Alex" />;
151
+ ```
152
+
153
+ ## 4. Nav active state
154
+
155
+ Pass **`currentPath`** so the header highlights the current page. Use your router’s pathname; include the query string when matching dropdown links with search params (e.g. `/search?category=graduates`).
156
+
157
+ | Link type | Match rule |
158
+ | --- | --- |
159
+ | Flat nav link | Prefix — `/career-advice` matches `/career-advice/foo` |
160
+ | Dropdown child | Exact pathname (+ query when href includes `?`) |
161
+ | Dropdown parent | Active background when any child matches |
162
+ | Sign in / Sign out | Never highlighted |
163
+
164
+ Active links use **`weg-purple-200`** (`#CDCFF8`). Omit `currentPath` to disable active styling.
165
+
166
+ ```tsx
167
+ import { useLocation } from 'react-router-dom';
168
+
169
+ const { pathname, search } = useLocation();
170
+ const currentPath = search ? `${pathname}${search}` : pathname;
171
+
172
+ <weg-header layout={layout} currentPath={currentPath} />
173
+ ```
174
+
175
+ ## 5. Production: fetch layout from your API
176
+
177
+ ```tsx
178
+ import { useEffect, useState } from 'react';
179
+ import 'weg-shared-layout/weg-header';
180
+ import 'weg-shared-layout/weg-footer';
181
+ import layoutFixture from 'weg-shared-layout/dummy-data.json';
182
+
183
+ type LayoutData = typeof layoutFixture;
184
+
185
+ const LAYOUT_URL = 'https://weg-payload-test.vercel.app/api/layout';
186
+
187
+ export function SiteLayout({ children }: { children: React.ReactNode }) {
188
+ const [layout, setLayout] = useState<LayoutData | null>(null);
189
+
190
+ useEffect(() => {
191
+ let cancelled = false;
192
+ fetch(LAYOUT_URL)
193
+ .then((res) => {
194
+ if (!res.ok) throw new Error(`layout fetch failed: ${res.status}`);
195
+ return res.json() as Promise<LayoutData>;
196
+ })
197
+ .then((data) => {
198
+ if (!cancelled) setLayout(data);
199
+ })
200
+ .catch(console.error);
201
+ return () => {
202
+ cancelled = true;
203
+ };
204
+ }, []);
205
+
206
+ if (!layout) return null;
207
+
208
+ return (
209
+ <>
210
+ <weg-header layout={layout} />
211
+ {children}
212
+ <weg-footer layout={layout} />
213
+ </>
214
+ );
215
+ }
216
+ ```
217
+
218
+ Replace the URL with your CMS/API. Keep the object shape aligned with `dummy-data.json`.
219
+
220
+ ## TypeScript
221
+
222
+ ### JSON + package subpaths
223
+
224
+ ```json
225
+ {
226
+ "compilerOptions": {
227
+ "resolveJsonModule": true,
228
+ "moduleResolution": "bundler"
229
+ }
230
+ }
231
+ ```
232
+
233
+ ```ts
234
+ import layoutFixture from 'weg-shared-layout/dummy-data.json';
235
+ export type LayoutData = typeof layoutFixture;
236
+ ```
237
+
238
+ Or types only: `import type { LayoutData } from 'weg-shared-layout/layout-data'`.
239
+
240
+ ### JSX module augmentation
241
+
242
+ Add once (e.g. `src/types/weg-shared-layout-jsx.d.ts`):
243
+
244
+ ```ts
245
+ import type { JSX as WegSharedLayoutJSX } from 'weg-shared-layout';
246
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react';
247
+
248
+ declare module 'react' {
249
+ namespace JSX {
250
+ interface IntrinsicElements extends WegSharedLayoutJSX.IntrinsicElements {
251
+ 'weg-header': WegSharedLayoutJSX.IntrinsicElements['weg-header'] &
252
+ DetailedHTMLProps<HTMLAttributes<HTMLWegHeaderElement>, HTMLWegHeaderElement>;
253
+ 'weg-footer': WegSharedLayoutJSX.IntrinsicElements['weg-footer'] &
254
+ DetailedHTMLProps<HTMLAttributes<HTMLWegFooterElement>, HTMLWegFooterElement>;
255
+ }
256
+ }
257
+ }
258
+ ```
259
+
260
+ ## `layout` prop vs attribute
261
+
262
+ | How data is set | Works with object? |
263
+ | --- | --- |
264
+ | **Property** `el.layout = obj` / React 19 `layout={obj}` | Yes |
265
+ | **Attribute** `layout="[object Object]"` / React 18 `layout={obj}` | No — components stay empty |
266
+ | **Attribute** `layout={JSON.stringify(obj)}` | Yes — component parses JSON |
267
+
268
+ ## Troubleshooting
269
+
270
+ | Symptom | Likely cause | Fix |
271
+ | --- | --- | --- |
272
+ | Empty header/footer | Loader/tag import missing | `defineCustomElements()` + tag imports. |
273
+ | Empty despite correct data | React set `layout` as attribute | React 19+, or `JSON.stringify`, or ref assignment. |
274
+ | Logo missing on header | Old build without inlined logo | Upgrade package; logo is bundled in `logo-data.ts`. |
275
+ | Auth always Sign in | `signed-in` not set | Bind `signedIn={!!session}`. |
276
+ | Manage Account shows label not name | `user-name` not set | Pass `userName` when signed in. |
277
+ | Nav never highlights active page | `current-path` not set | Pass `currentPath` from your router (pathname + query when needed). |
278
+ | `onWegAuthClick` not firing | React CE event binding | Use `addEventListener` on a ref. |
279
+ | TS: unknown element | No augmentation | Add `weg-shared-layout-jsx.d.ts`. |
280
+
281
+ ## See also
282
+
283
+ - **[Documentation index](./README.md)**
284
+ - **[Next.js App Router](./nextjs.md)**
285
+ - **[Angular](./angular.md)** · **[Angular 16 demo](../demo/angular16/README.md)**
286
+ - **[Plain HTML / vanilla JS](./vanilla.md)**
287
+ - **[Package readme](../readme.md)**