weg-shared-layout 0.0.45 → 0.0.47

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/docs/react.md CHANGED
@@ -1,287 +1,291 @@
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)**
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 from the WEG CMS WEG21 API (via [`fetchWeg21Layout`](../src/utils/menus.ts)) or [`weg21-bootstrap.json`](../src/assets/weg21-bootstrap.json) and [`weg21-menus.json`](../src/assets/weg21-menus.json) as offline fallback.
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 { dummyWeg21LayoutData } from 'weg-shared-layout/menus';
57
+ const layout = dummyWeg21LayoutData();
58
+
59
+ export function SiteLayout({ children }: { children: React.ReactNode }) {
60
+ return (
61
+ <>
62
+ <weg-header layout={layout} />
63
+ {children}
64
+ <weg-footer layout={layout} />
65
+ </>
66
+ );
67
+ }
68
+ ```
69
+
70
+ ### Fallback: `JSON.stringify` (React 18 or empty components)
71
+
72
+ ```tsx
73
+ <weg-header layout={JSON.stringify(layout)} />
74
+ <weg-footer layout={JSON.stringify(layout)} />
75
+ ```
76
+
77
+ ## 3. Header auth
78
+
79
+ 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`.
80
+
81
+ ### Signed in
82
+
83
+ 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.
84
+
85
+ Handle **`wegAuthClick`** for sign-out (call your logout API, then redirect):
86
+
87
+ ```tsx
88
+ import { useCallback, useState } from 'react';
89
+ import { useLocation } from 'react-router-dom';
90
+ import 'weg-shared-layout/weg-header';
91
+ import { dummyWeg21LayoutData } from 'weg-shared-layout/menus';
92
+ const layout = dummyWeg21LayoutData();
93
+
94
+ export function SiteHeader() {
95
+ const { pathname, search } = useLocation();
96
+ const currentPath = search ? `${pathname}${search}` : pathname;
97
+ const [signedIn, setSignedIn] = useState(false);
98
+ const userName = signedIn ? 'Alex' : undefined;
99
+
100
+ const onAuthClick = useCallback(async (event: CustomEvent<{ action: 'sign-in' | 'sign-out' }>) => {
101
+ if (event.detail.action !== 'sign-out') return;
102
+
103
+ event.preventDefault();
104
+ await logout();
105
+ setSignedIn(false);
106
+ window.location.assign('/');
107
+ }, []);
108
+
109
+ return (
110
+ <weg-header
111
+ layout={layout}
112
+ signedIn={signedIn}
113
+ currentPath={currentPath}
114
+ {...(userName ? { userName } : {})}
115
+ onWegAuthClick={onAuthClick}
116
+ />
117
+ );
118
+ }
119
+ ```
120
+
121
+ Without React Router, pass `window.location.pathname` (+ `search` when needed) or your router’s equivalent.
122
+
123
+ | Prop / event | Purpose |
124
+ | --- | --- |
125
+ | `signedIn={boolean}` | Switches to signed-in nav when `true` |
126
+ | `userName={string}` | First name beside profile icon on Manage Account |
127
+ | `accountBaseUrl={string}` | Account portal origin for signed-in links (optional) |
128
+ | `currentPath={string}` | Current path — highlights active nav (e.g. `/career-advice/foo`) |
129
+ | `onWegAuthClick` | Required for sign-out — call logout API and redirect; sign-in follows link `href` |
130
+
131
+ **Ref fallback for the event** (if `onWegAuthClick` does not bind in your React version):
132
+
133
+ ```tsx
134
+ import { useEffect, useRef } from 'react';
135
+
136
+ const ref = useRef<HTMLWegHeaderElement>(null);
137
+
138
+ useEffect(() => {
139
+ const el = ref.current;
140
+ if (!el) return;
141
+
142
+ const handler = (event: Event) => {
143
+ const e = event as CustomEvent<{ action: 'sign-in' | 'sign-out' }>;
144
+ e.preventDefault();
145
+ // ...
146
+ };
147
+
148
+ el.addEventListener('wegAuthClick', handler);
149
+ return () => el.removeEventListener('wegAuthClick', handler);
150
+ }, []);
151
+
152
+ return <weg-header ref={ref} layout={layout} signedIn={signedIn} userName="Alex" />;
153
+ ```
154
+
155
+ ## 4. Nav active state
156
+
157
+ 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`).
158
+
159
+ | Link type | Match rule |
160
+ | --- | --- |
161
+ | Flat nav link | Prefix — `/career-advice` matches `/career-advice/foo` |
162
+ | Dropdown child | Exact pathname (+ query when href includes `?`) |
163
+ | Dropdown parent | Active background when any child matches |
164
+ | Sign in / Sign out | Never highlighted |
165
+
166
+ Active links use **`weg-purple-200`** (`#CDCFF8`). Omit `currentPath` to disable active styling.
167
+
168
+ ```tsx
169
+ import { useLocation } from 'react-router-dom';
170
+
171
+ const { pathname, search } = useLocation();
172
+ const currentPath = search ? `${pathname}${search}` : pathname;
173
+
174
+ <weg-header layout={layout} currentPath={currentPath} />
175
+ ```
176
+
177
+ ## 5. Production: fetch layout from your API
178
+
179
+ ```tsx
180
+ import { useEffect, useState } from 'react';
181
+ import 'weg-shared-layout/weg-header';
182
+ import 'weg-shared-layout/weg-footer';
183
+ import { dummyWeg21LayoutData } from 'weg-shared-layout/menus';
184
+ const layoutFixture = dummyWeg21LayoutData();
185
+
186
+ type LayoutData = typeof layoutFixture;
187
+
188
+ const WEG21_API = 'https://warwickemploymentgroup.com/api/v1/weg21';
189
+
190
+ export function SiteLayout({ children }: { children: React.ReactNode }) {
191
+ const [layout, setLayout] = useState<LayoutData | null>(null);
192
+
193
+ useEffect(() => {
194
+ let cancelled = false;
195
+ fetch(LAYOUT_URL)
196
+ .then((res) => {
197
+ if (!res.ok) throw new Error(`layout fetch failed: ${res.status}`);
198
+ return res.json() as Promise<LayoutData>;
199
+ })
200
+ .then((data) => {
201
+ if (!cancelled) setLayout(data);
202
+ })
203
+ .catch(console.error);
204
+ return () => {
205
+ cancelled = true;
206
+ };
207
+ }, []);
208
+
209
+ if (!layout) return null;
210
+
211
+ return (
212
+ <>
213
+ <weg-header layout={layout} />
214
+ {children}
215
+ <weg-footer layout={layout} />
216
+ </>
217
+ );
218
+ }
219
+ ```
220
+
221
+ Keep the mapped object shape aligned with `menusToLayoutData` output.
222
+
223
+ ## TypeScript
224
+
225
+ ### JSON + package subpaths
226
+
227
+ ```json
228
+ {
229
+ "compilerOptions": {
230
+ "resolveJsonModule": true,
231
+ "moduleResolution": "bundler"
232
+ }
233
+ }
234
+ ```
235
+
236
+ ```ts
237
+ import { dummyWeg21LayoutData } from 'weg-shared-layout/menus';
238
+ const layoutFixture = dummyWeg21LayoutData();
239
+ export type LayoutData = typeof layoutFixture;
240
+ ```
241
+
242
+ Or types only: `import type { LayoutData } from 'weg-shared-layout/layout-data'`.
243
+
244
+ ### JSX module augmentation
245
+
246
+ Add once (e.g. `src/types/weg-shared-layout-jsx.d.ts`):
247
+
248
+ ```ts
249
+ import type { JSX as WegSharedLayoutJSX } from 'weg-shared-layout';
250
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react';
251
+
252
+ declare module 'react' {
253
+ namespace JSX {
254
+ interface IntrinsicElements extends WegSharedLayoutJSX.IntrinsicElements {
255
+ 'weg-header': WegSharedLayoutJSX.IntrinsicElements['weg-header'] &
256
+ DetailedHTMLProps<HTMLAttributes<HTMLWegHeaderElement>, HTMLWegHeaderElement>;
257
+ 'weg-footer': WegSharedLayoutJSX.IntrinsicElements['weg-footer'] &
258
+ DetailedHTMLProps<HTMLAttributes<HTMLWegFooterElement>, HTMLWegFooterElement>;
259
+ }
260
+ }
261
+ }
262
+ ```
263
+
264
+ ## `layout` prop vs attribute
265
+
266
+ | How data is set | Works with object? |
267
+ | --- | --- |
268
+ | **Property** `el.layout = obj` / React 19 `layout={obj}` | Yes |
269
+ | **Attribute** `layout="[object Object]"` / React 18 `layout={obj}` | No — components stay empty |
270
+ | **Attribute** `layout={JSON.stringify(obj)}` | Yes — component parses JSON |
271
+
272
+ ## Troubleshooting
273
+
274
+ | Symptom | Likely cause | Fix |
275
+ | --- | --- | --- |
276
+ | Empty header/footer | Loader/tag import missing | `defineCustomElements()` + tag imports. |
277
+ | Empty despite correct data | React set `layout` as attribute | React 19+, or `JSON.stringify`, or ref assignment. |
278
+ | Logo missing on header | Old build without inlined logo | Upgrade package; logo is bundled in `logo-data.ts`. |
279
+ | Auth always Sign in | `signed-in` not set | Bind `signedIn={!!session}`. |
280
+ | Manage Account shows label not name | `user-name` not set | Pass `userName` when signed in. |
281
+ | Nav never highlights active page | `current-path` not set | Pass `currentPath` from your router (pathname + query when needed). |
282
+ | `onWegAuthClick` not firing | React CE event binding | Use `addEventListener` on a ref. |
283
+ | TS: unknown element | No augmentation | Add `weg-shared-layout-jsx.d.ts`. |
284
+
285
+ ## See also
286
+
287
+ - **[Documentation index](./README.md)**
288
+ - **[Next.js App Router](./nextjs.md)**
289
+ - **[Angular](./angular.md)** · **[Angular 16 demo](../demo/angular16/README.md)**
290
+ - **[Plain HTML / vanilla JS](./vanilla.md)**
291
+ - **[Package readme](../readme.md)**