@postxl/generators 6.1.0 → 6.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/dist/backend-actions/generators/dispatcher-service.generator.js +6 -1
- package/dist/backend-actions/generators/dispatcher-service.generator.js.map +1 -1
- package/dist/backend-core/backend.generator.js +1 -1
- package/dist/backend-core/backend.generator.js.map +1 -1
- package/dist/backend-core/template/libs/xlport/README.md +5 -5
- package/dist/backend-excel-io/template/README.md +3 -3
- package/dist/backend-repositories/generators/model-repository.generator.js +11 -6
- package/dist/backend-repositories/generators/model-repository.generator.js.map +1 -1
- package/dist/base/base.generator.js +6 -16
- package/dist/base/base.generator.js.map +1 -1
- package/dist/base/generators/claudemd.generator.js +21 -1
- package/dist/base/generators/claudemd.generator.js.map +1 -1
- package/dist/base/template/.claude/commands/README.md +10 -1
- package/dist/base/template/.claude/commands/browser-observe.md +72 -72
- package/dist/base/template/.claude/commands/fix-ci.md +12 -7
- package/dist/base/template/.oxfmtrc.json +17 -0
- package/dist/base/template/.oxlintrc.json +1130 -0
- package/dist/base/template/.vscode/extensions.json +2 -4
- package/dist/base/template/.vscode/settings.json +7 -5
- package/dist/e2e/e2e.generator.js +2 -0
- package/dist/e2e/e2e.generator.js.map +1 -1
- package/dist/e2e/template/.claude/commands/run-e2e-tests.md +7 -1
- package/dist/e2e/template/e2e/package.json +1 -1
- package/dist/e2e/template/e2e/specs/example.spec.ts +2 -2
- package/dist/frontend-admin/generators/admin-global-actions.generator.js +3 -0
- package/dist/frontend-admin/generators/admin-global-actions.generator.js.map +1 -1
- package/dist/frontend-admin/generators/model-admin-page.generator.js +14 -7
- package/dist/frontend-admin/generators/model-admin-page.generator.js.map +1 -1
- package/dist/frontend-core/frontend.generator.js +5 -11
- package/dist/frontend-core/frontend.generator.js.map +1 -1
- package/dist/frontend-core/template/README.md +45 -10
- package/dist/frontend-core/template/src/components/ui/application-header/application-header.tsx +1 -1
- package/dist/frontend-core/template/src/stories/Configure.mdx +34 -26
- package/dist/frontend-core/template/vite.config.ts +2 -1
- package/package.json +4 -4
- package/dist/base/template/.prettierignore +0 -6
- package/dist/base/template/eslint.config.mjs +0 -207
- package/dist/base/template/prettier.config.js +0 -10
- package/dist/frontend-core/template/.prettierignore +0 -4
- package/dist/frontend-core/template/vitest.shims.d.ts +0 -1
|
@@ -4,8 +4,8 @@ This folder contains the frontend application for the PostXL template project. I
|
|
|
4
4
|
|
|
5
5
|
> **Note**: This is a code-generated project from PostXL. Most files are automatically generated from `postxl-schema.json` using the PostXL generator framework. See the main project [CLAUDE.md](../CLAUDE.md) for details on the generation workflow.
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
## Table of Contents
|
|
8
|
+
|
|
9
9
|
- [Overview](#overview)
|
|
10
10
|
- [Prerequisites](#prerequisites)
|
|
11
11
|
- [Getting Started](#getting-started)
|
|
@@ -25,10 +25,10 @@ This folder contains the frontend application for the PostXL template project. I
|
|
|
25
25
|
- [Development Conventions](#development-conventions)
|
|
26
26
|
- [Troubleshooting](#troubleshooting)
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
## Overview
|
|
30
29
|
|
|
31
30
|
**Key Technologies:**
|
|
31
|
+
|
|
32
32
|
- **React 19** with React 19 DOM for modern React features
|
|
33
33
|
- **Vite 7** for fast dev builds, HMR, and optimized production builds
|
|
34
34
|
- **TypeScript 5.8** with strict type checking (`pnpm run test:types`)
|
|
@@ -41,18 +41,18 @@ This folder contains the frontend application for the PostXL template project. I
|
|
|
41
41
|
- **Vitest** for unit and component testing with browser mode
|
|
42
42
|
- **Storybook 9** for component development and documentation
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
## Prerequisites
|
|
46
45
|
|
|
47
46
|
**Required:**
|
|
47
|
+
|
|
48
48
|
- **pnpm 10.14+** (package manager - also manages Node.js runtime automatically)
|
|
49
49
|
|
|
50
50
|
**Optional:**
|
|
51
|
+
|
|
51
52
|
- Backend API running (usually at `http://localhost:3001`)
|
|
52
53
|
- Keycloak instance for authentication (usually at `http://localhost:8080`)
|
|
53
54
|
- Docker and Docker Compose for running backend services
|
|
54
55
|
|
|
55
|
-
|
|
56
56
|
## Getting Started
|
|
57
57
|
|
|
58
58
|
### 1. Initial Setup
|
|
@@ -74,10 +74,12 @@ cd projects/template/frontend
|
|
|
74
74
|
The app is configured via Vite environment variables (see `src/lib/config.ts`). Create a `.env.local` file in the frontend directory with the following variables:
|
|
75
75
|
|
|
76
76
|
**Core Configuration:**
|
|
77
|
+
|
|
77
78
|
- `VITE_PUBLIC_API_URL` - Base API URL (default: `http://localhost:3001`)
|
|
78
79
|
- `VITE_PUBLIC_BASE_URL` - Public base URL of the frontend (default: `http://localhost:3000`)
|
|
79
80
|
|
|
80
81
|
**Authentication (Keycloak):**
|
|
82
|
+
|
|
81
83
|
- `VITE_PUBLIC_KEYCLOAK_URL` - Keycloak server URL (e.g., `http://localhost:8080`)
|
|
82
84
|
- `VITE_PUBLIC_KEYCLOAK_REALM` - Keycloak realm name
|
|
83
85
|
- `VITE_PUBLIC_KEYCLOAK_CLIENT_ID` - Keycloak client ID
|
|
@@ -85,9 +87,11 @@ The app is configured via Vite environment variables (see `src/lib/config.ts`).
|
|
|
85
87
|
- `VITE_AUTH` - Enable/disable authentication entirely (boolean, useful for local development)
|
|
86
88
|
|
|
87
89
|
**Development:**
|
|
90
|
+
|
|
88
91
|
- `VITE_ENABLE_DEV_TOOLS` - Enable TanStack Router and Query DevTools (boolean, auto-enabled with `pnpm dev`)
|
|
89
92
|
|
|
90
93
|
**Testing & E2E:**
|
|
94
|
+
|
|
91
95
|
- `VITE_PUBLIC_USE_TEST_ASSETS` - Use test assets instead of production assets (boolean)
|
|
92
96
|
|
|
93
97
|
**Example `.env.local`** (do not commit secrets):
|
|
@@ -135,35 +139,39 @@ pnpm build
|
|
|
135
139
|
pnpm preview
|
|
136
140
|
```
|
|
137
141
|
|
|
138
|
-
|
|
139
142
|
## Available Scripts
|
|
140
143
|
|
|
141
144
|
**Development:**
|
|
145
|
+
|
|
142
146
|
- `pnpm dev` - Start development server with DevTools enabled
|
|
143
147
|
- `pnpm dev:noAuth` - Start development server with authentication disabled
|
|
144
148
|
|
|
145
149
|
**Building:**
|
|
150
|
+
|
|
146
151
|
- `pnpm build` - Type-check and build for production
|
|
147
152
|
- `pnpm build:analyze` - Build with bundle analysis (skips type-check)
|
|
148
153
|
- `pnpm debug` - Build with Vite debug logging enabled
|
|
149
154
|
- `pnpm preview` - Preview production build locally
|
|
150
155
|
|
|
151
156
|
**Testing:**
|
|
157
|
+
|
|
152
158
|
- `pnpm test:types` - Run TypeScript type checking
|
|
153
159
|
- `pnpm test:storybook` - Run Storybook component tests with Vitest
|
|
154
160
|
|
|
155
161
|
**Linting:**
|
|
156
|
-
|
|
162
|
+
|
|
163
|
+
- `pnpm lint` - Run Oxlint on the codebase
|
|
157
164
|
|
|
158
165
|
**Storybook:**
|
|
166
|
+
|
|
159
167
|
- `pnpm storybook:start` - Start Storybook dev server on port 6006
|
|
160
168
|
- `pnpm storybook:build` - Build Storybook for production
|
|
161
169
|
|
|
162
170
|
**E2E Support:**
|
|
171
|
+
|
|
163
172
|
- `pnpm e2e:build` - Build for E2E tests with test-friendly configuration
|
|
164
173
|
- `pnpm e2e:ci` - Build for CI E2E tests
|
|
165
174
|
|
|
166
|
-
|
|
167
175
|
## Architecture & Libraries
|
|
168
176
|
|
|
169
177
|
### Routing (TanStack Router v1)
|
|
@@ -171,17 +179,20 @@ pnpm preview
|
|
|
171
179
|
This project uses **file-based routing** powered by `@tanstack/router-plugin`. Route modules live in `src/routes/` and the plugin automatically generates `routeTree.gen.ts` used by the router configuration.
|
|
172
180
|
|
|
173
181
|
**Key Concepts:**
|
|
182
|
+
|
|
174
183
|
- **File-based routing**: Routes are defined by the file structure in `src/routes/`
|
|
175
184
|
- **Lazy loading**: Use `.lazy.tsx` files for route components that should be code-split and loaded on-demand
|
|
176
185
|
- **Type-safe navigation**: Full TypeScript support for route paths, params, and search params
|
|
177
186
|
- **Nested layouts**: Support for nested route layouts with `_layout` files
|
|
178
187
|
|
|
179
188
|
**Important Files:**
|
|
189
|
+
|
|
180
190
|
- `src/lib/router.tsx` - Router configuration, context setup (auth), error/not-found components
|
|
181
191
|
- `src/routes/__root.tsx` - Root route with typed context and `<RootDocument>` shell component
|
|
182
192
|
- `src/routes/routeTree.gen.ts` - Auto-generated route tree (do not edit manually)
|
|
183
193
|
|
|
184
194
|
**Resources:**
|
|
195
|
+
|
|
185
196
|
- [File-based routing docs](https://tanstack.com/router/v1/docs/framework/react/routing/file-based-routing)
|
|
186
197
|
- [File naming conventions](https://tanstack.com/router/v1/docs/framework/react/routing/file-naming-conventions)
|
|
187
198
|
- [Code-splitting guide](https://tanstack.com/router/v1/docs/framework/react/guide/code-splitting)
|
|
@@ -191,15 +202,18 @@ This project uses **file-based routing** powered by `@tanstack/router-plugin`. R
|
|
|
191
202
|
This project uses **tRPC** for end-to-end type-safe API calls, integrated with **TanStack Query** for powerful data fetching, caching, and state management.
|
|
192
203
|
|
|
193
204
|
**Key Features:**
|
|
205
|
+
|
|
194
206
|
- **Type safety**: Full TypeScript inference from backend to frontend - no manual type definitions needed
|
|
195
207
|
- **Automatic serialization**: Uses `superjson` for handling complex types (Date, Map, Set, etc.)
|
|
196
208
|
- **Caching & optimistic updates**: Built on TanStack Query for intelligent caching and UI updates
|
|
197
209
|
- **Queries and mutations**: Colocated with components for easy data management
|
|
198
210
|
|
|
199
211
|
**Important Files:**
|
|
212
|
+
|
|
200
213
|
- `src/lib/trpc.ts` - tRPC client configuration and React hooks setup
|
|
201
214
|
|
|
202
215
|
**Usage Example:**
|
|
216
|
+
|
|
203
217
|
```typescript
|
|
204
218
|
import { trpc } from '@lib/trpc'
|
|
205
219
|
|
|
@@ -219,6 +233,7 @@ function MyComponent() {
|
|
|
219
233
|
```
|
|
220
234
|
|
|
221
235
|
**Resources:**
|
|
236
|
+
|
|
222
237
|
- [tRPC documentation](https://trpc.io/docs)
|
|
223
238
|
- [tRPC + TanStack Query integration](https://trpc.io/docs/client/react/integration/tanstack-query)
|
|
224
239
|
- [TanStack Query documentation](https://tanstack.com/query/latest)
|
|
@@ -228,12 +243,14 @@ function MyComponent() {
|
|
|
228
243
|
Authentication is handled by **Keycloak** using the `keycloak-js` library, wrapped in a custom React context for easy access throughout the application.
|
|
229
244
|
|
|
230
245
|
**Key Features:**
|
|
246
|
+
|
|
231
247
|
- **SSO support**: Single sign-on across multiple applications
|
|
232
248
|
- **Role-based access control**: User roles and permissions from Keycloak
|
|
233
249
|
- **Token management**: Automatic token refresh and session management
|
|
234
250
|
- **Optional auth**: Can be disabled via `VITE_AUTH=false` for local development
|
|
235
251
|
|
|
236
252
|
**Important Files:**
|
|
253
|
+
|
|
237
254
|
- `src/contextProviders/authContextProvider.tsx` - Authentication context and hooks
|
|
238
255
|
- `src/contextProviders/themeContextProvider.tsx` - Theme management (light/dark mode)
|
|
239
256
|
- `src/pages/login/login.page.tsx` - Login page and redirect handling
|
|
@@ -243,21 +260,25 @@ Authentication is handled by **Keycloak** using the `keycloak-js` library, wrapp
|
|
|
243
260
|
This project follows the **shadcn/ui** approach, using **Radix UI** primitives combined with **Tailwind CSS** and **class-variance-authority** for composable, accessible components.
|
|
244
261
|
|
|
245
262
|
**Key Characteristics:**
|
|
263
|
+
|
|
246
264
|
- **Copy-paste components**: Components are part of your codebase, not a package dependency
|
|
247
265
|
- **Radix primitives**: Built on Radix UI for accessibility and headless UI patterns
|
|
248
266
|
- **Tailwind styling**: Utility-first CSS with Tailwind v4
|
|
249
267
|
- **Variants**: Uses `class-variance-authority` (CVA) for component variants
|
|
250
268
|
|
|
251
269
|
**Component Location:**
|
|
270
|
+
|
|
252
271
|
- `src/components/ui/` - Base UI components (button, dialog, dropdown, etc.)
|
|
253
272
|
|
|
254
273
|
**Example Components:**
|
|
274
|
+
|
|
255
275
|
- `src/components/ui/button/Button.tsx` - Button component with variants
|
|
256
276
|
- `src/components/ui/dialog/Dialog.tsx` - Modal dialog
|
|
257
277
|
- `src/components/ui/checkbox/ShadcnCheckbox.tsx` - Checkbox with Radix
|
|
258
278
|
- `src/components/ui/calendar/Calendar.tsx` - Date picker calendar
|
|
259
279
|
|
|
260
280
|
**Resources:**
|
|
281
|
+
|
|
261
282
|
- [shadcn/ui documentation](https://ui.shadcn.com/docs)
|
|
262
283
|
- [Radix UI primitives](https://www.radix-ui.com/primitives)
|
|
263
284
|
- [class-variance-authority](https://cva.style/docs)
|
|
@@ -267,15 +288,18 @@ This project follows the **shadcn/ui** approach, using **Radix UI** primitives c
|
|
|
267
288
|
This project uses **Tailwind CSS v4** with the new **@tailwindcss/vite** plugin for utility-first styling.
|
|
268
289
|
|
|
269
290
|
**Key Features:**
|
|
291
|
+
|
|
270
292
|
- **Utility-first**: Compose designs using utility classes
|
|
271
293
|
- **Custom theme**: Extended theme in `tailwind.config.js` or CSS variables
|
|
272
294
|
- **Dark mode**: Built-in dark mode support with `class` strategy
|
|
273
295
|
- **Responsive design**: Mobile-first responsive utilities
|
|
274
296
|
|
|
275
297
|
**Utility Functions:**
|
|
298
|
+
|
|
276
299
|
- `src/lib/utils.ts` - Contains the `cn()` utility function that combines `clsx` and `tailwind-merge` for conditional class names
|
|
277
300
|
|
|
278
301
|
**Usage Example:**
|
|
302
|
+
|
|
279
303
|
```typescript
|
|
280
304
|
import { cn } from '@lib/utils'
|
|
281
305
|
|
|
@@ -289,6 +313,7 @@ import { cn } from '@lib/utils'
|
|
|
289
313
|
```
|
|
290
314
|
|
|
291
315
|
**Resources:**
|
|
316
|
+
|
|
292
317
|
- [Tailwind CSS documentation](https://tailwindcss.com/docs)
|
|
293
318
|
- [Utility classes reference](https://tailwindcss.com/docs/styling-with-utility-classes)
|
|
294
319
|
- [Responsive design guide](https://tailwindcss.com/docs/responsive-design)
|
|
@@ -298,27 +323,30 @@ import { cn } from '@lib/utils'
|
|
|
298
323
|
This project uses **Vitest** for unit and component testing, and **Storybook** for component development and documentation.
|
|
299
324
|
|
|
300
325
|
**Vitest:**
|
|
326
|
+
|
|
301
327
|
- **Browser mode**: Tests run in a real browser environment using Playwright
|
|
302
328
|
- **Component testing**: Test React components with `vitest-browser-react`
|
|
303
329
|
- **Coverage**: V8 coverage reports with `@vitest/coverage-v8`
|
|
304
330
|
- **Fast**: Powered by Vite for instant feedback
|
|
305
331
|
|
|
306
332
|
**Storybook:**
|
|
333
|
+
|
|
307
334
|
- **Component development**: Develop components in isolation
|
|
308
335
|
- **Documentation**: Auto-generated docs with `@storybook/addon-docs`
|
|
309
336
|
- **Testing**: Integration with Vitest via `@storybook/addon-vitest`
|
|
310
337
|
- **Visual testing**: Ready for Chromatic integration
|
|
311
338
|
|
|
312
339
|
**Configuration Files:**
|
|
340
|
+
|
|
313
341
|
- `vite.config.ts` - Vitest configuration
|
|
314
342
|
- `.storybook/main.ts` - Storybook configuration
|
|
315
343
|
- `.storybook/preview.ts` - Storybook preview settings
|
|
316
344
|
|
|
317
345
|
**Resources:**
|
|
346
|
+
|
|
318
347
|
- [Vitest documentation](https://vitest.dev/)
|
|
319
348
|
- [Storybook documentation](https://storybook.js.org/docs)
|
|
320
349
|
|
|
321
|
-
|
|
322
350
|
## Route Guards
|
|
323
351
|
|
|
324
352
|
Route guards are implemented via the `beforeLoad` hook in route files. Guards can redirect users, throw errors, or prevent navigation based on authentication state or user permissions.
|
|
@@ -326,6 +354,7 @@ Route guards are implemented via the `beforeLoad` hook in route files. Guards ca
|
|
|
326
354
|
**Authentication Guards:**
|
|
327
355
|
|
|
328
356
|
The main authentication guard is implemented in `src/routes/_authRoutes.tsx` and applies to all routes nested under it:
|
|
357
|
+
|
|
329
358
|
- If the user is not authenticated, they are redirected to `/login` with a `redirectUrl` search parameter to restore their location after login
|
|
330
359
|
- After successful login, users are automatically redirected back to their original destination
|
|
331
360
|
|
|
@@ -359,7 +388,6 @@ export const Route = createFileRoute('/admin')({
|
|
|
359
388
|
})
|
|
360
389
|
```
|
|
361
390
|
|
|
362
|
-
|
|
363
391
|
## Development Conventions
|
|
364
392
|
|
|
365
393
|
### File Organization
|
|
@@ -383,6 +411,7 @@ import { useAuth } from '@contextProviders/authContextProvider'
|
|
|
383
411
|
```
|
|
384
412
|
|
|
385
413
|
Available aliases:
|
|
414
|
+
|
|
386
415
|
- `@` - Points to `src/`
|
|
387
416
|
|
|
388
417
|
### Code Splitting
|
|
@@ -421,46 +450,52 @@ Available aliases:
|
|
|
421
450
|
- To force regeneration: `pnpm run generate -f`
|
|
422
451
|
- Generated files should not be manually edited unless you "eject" them (modify them to take ownership)
|
|
423
452
|
|
|
424
|
-
|
|
425
453
|
## Troubleshooting
|
|
426
454
|
|
|
427
455
|
### Common Issues
|
|
428
456
|
|
|
429
457
|
**Authentication redirect loop:**
|
|
458
|
+
|
|
430
459
|
- Ensure `VITE_PUBLIC_KEYCLOAK_URL`, `VITE_PUBLIC_KEYCLOAK_REALM`, and `VITE_PUBLIC_KEYCLOAK_CLIENT_ID` are correct
|
|
431
460
|
- Check that Keycloak is running and reachable at the specified URL
|
|
432
461
|
- For local development without auth, set `VITE_AUTH=false`
|
|
433
462
|
- Try clearing browser cookies and localStorage
|
|
434
463
|
|
|
435
464
|
**Type errors:**
|
|
465
|
+
|
|
436
466
|
- Run `pnpm test:types` to see all TypeScript errors
|
|
437
467
|
- Ensure all dependencies are installed: `pnpm install`
|
|
438
468
|
- If using tRPC, ensure the backend is built and types are generated
|
|
439
469
|
- Check that `routeTree.gen.ts` is up to date (generated automatically on dev server start)
|
|
440
470
|
|
|
441
471
|
**Build failures:**
|
|
472
|
+
|
|
442
473
|
- Ensure you're using pnpm 10.14+ (it manages Node.js automatically via `devEngines.runtime`)
|
|
443
474
|
- Clear build cache: `rm -rf node_modules/.vite`
|
|
444
475
|
- Rebuild from monorepo root: `pnpm run build`
|
|
445
476
|
- Check for TypeScript errors: `pnpm test:types`
|
|
446
477
|
|
|
447
478
|
**HMR (Hot Module Replacement) not working:**
|
|
479
|
+
|
|
448
480
|
- Check that no errors are logged in the browser console
|
|
449
481
|
- Try restarting the Vite dev server
|
|
450
482
|
- Clear browser cache and reload
|
|
451
483
|
- On macOS, you may need to increase file watch limits (see main project README)
|
|
452
484
|
|
|
453
485
|
**Storybook issues:**
|
|
486
|
+
|
|
454
487
|
- Ensure Storybook dependencies are installed: `pnpm install`
|
|
455
488
|
- Clear Storybook cache: `rm -rf node_modules/.cache/storybook`
|
|
456
489
|
- Restart Storybook: `pnpm storybook:start`
|
|
457
490
|
|
|
458
491
|
**Port already in use:**
|
|
492
|
+
|
|
459
493
|
- Frontend default port is 3000
|
|
460
494
|
- Change port with: `pnpm dev -- --port 3001`
|
|
461
495
|
- Or kill the process using the port: `lsof -ti:3000 | xargs kill -9` (macOS/Linux)
|
|
462
496
|
|
|
463
497
|
**Environment variables not loading:**
|
|
498
|
+
|
|
464
499
|
- Ensure `.env.local` is in the frontend directory (not the project root)
|
|
465
500
|
- Restart the dev server after changing environment variables
|
|
466
501
|
- Remember: Only `VITE_*` prefixed variables are exposed to the client
|
package/dist/frontend-core/template/src/components/ui/application-header/application-header.tsx
CHANGED
|
@@ -19,7 +19,7 @@ export const ApplicationHeader = () => {
|
|
|
19
19
|
const hasRightTabs = sidebarTabs['right']?.length > 0
|
|
20
20
|
|
|
21
21
|
const onToggleTheme = (nextMode: ColorMode) => {
|
|
22
|
-
toast.info(
|
|
22
|
+
toast.info('Switched to ' + nextMode + ' color mode')
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
return (
|
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
import { Meta } from
|
|
2
|
-
|
|
3
|
-
import Github from
|
|
4
|
-
import Discord from
|
|
5
|
-
import Youtube from
|
|
6
|
-
import Tutorials from
|
|
7
|
-
import Styling from
|
|
8
|
-
import Context from
|
|
9
|
-
import Assets from
|
|
10
|
-
import Docs from
|
|
11
|
-
import Share from
|
|
12
|
-
import FigmaPlugin from
|
|
13
|
-
import Testing from
|
|
14
|
-
import Accessibility from
|
|
15
|
-
import Theming from
|
|
16
|
-
import AddonLibrary from
|
|
17
|
-
|
|
18
|
-
export const RightArrow = () =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
import Github from './assets/github.svg'
|
|
4
|
+
import Discord from './assets/discord.svg'
|
|
5
|
+
import Youtube from './assets/youtube.svg'
|
|
6
|
+
import Tutorials from './assets/tutorials.svg'
|
|
7
|
+
import Styling from './assets/styling.png'
|
|
8
|
+
import Context from './assets/context.png'
|
|
9
|
+
import Assets from './assets/assets.png'
|
|
10
|
+
import Docs from './assets/docs.png'
|
|
11
|
+
import Share from './assets/share.png'
|
|
12
|
+
import FigmaPlugin from './assets/figma-plugin.png'
|
|
13
|
+
import Testing from './assets/testing.png'
|
|
14
|
+
import Accessibility from './assets/accessibility.png'
|
|
15
|
+
import Theming from './assets/theming.png'
|
|
16
|
+
import AddonLibrary from './assets/addon-library.png'
|
|
17
|
+
|
|
18
|
+
export const RightArrow = () => (
|
|
19
|
+
<svg
|
|
20
|
+
viewBox="0 0 14 14"
|
|
21
|
+
width="8px"
|
|
22
|
+
height="14px"
|
|
23
|
+
style={{
|
|
23
24
|
marginLeft: '4px',
|
|
24
25
|
display: 'inline-block',
|
|
25
26
|
shapeRendering: 'inherit',
|
|
26
27
|
verticalAlign: 'middle',
|
|
27
|
-
fill: 'currentColor'
|
|
28
|
+
fill: 'currentColor',
|
|
28
29
|
}}
|
|
29
|
-
>
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
>
|
|
31
|
+
<path
|
|
32
|
+
fill="currentColor"
|
|
33
|
+
d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
)
|
|
32
37
|
|
|
33
38
|
<Meta title="Configure your project" />
|
|
34
39
|
|
|
@@ -37,6 +42,7 @@ export const RightArrow = () => <svg
|
|
|
37
42
|
# Configure your project
|
|
38
43
|
|
|
39
44
|
Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
|
|
45
|
+
|
|
40
46
|
</div>
|
|
41
47
|
<div className="sb-section">
|
|
42
48
|
<div className="sb-section-item">
|
|
@@ -83,6 +89,7 @@ export const RightArrow = () => <svg
|
|
|
83
89
|
# Do more with Storybook
|
|
84
90
|
|
|
85
91
|
Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
|
|
92
|
+
|
|
86
93
|
</div>
|
|
87
94
|
|
|
88
95
|
<div className="sb-section">
|
|
@@ -202,6 +209,7 @@ export const RightArrow = () => <svg
|
|
|
202
209
|
target="_blank"
|
|
203
210
|
>Discover tutorials<RightArrow /></a>
|
|
204
211
|
</div>
|
|
212
|
+
|
|
205
213
|
</div>
|
|
206
214
|
|
|
207
215
|
<style>
|
|
@@ -6,6 +6,7 @@ import tailwindcss from '@tailwindcss/vite'
|
|
|
6
6
|
// import { devtools } from '@tanstack/devtools-vite'
|
|
7
7
|
import tanstackRouter from '@tanstack/router-plugin/vite'
|
|
8
8
|
import react from '@vitejs/plugin-react'
|
|
9
|
+
import { playwright } from '@vitest/browser-playwright'
|
|
9
10
|
import checker from 'vite-plugin-checker'
|
|
10
11
|
|
|
11
12
|
// https://vite.dev/config/
|
|
@@ -207,7 +208,7 @@ export default defineConfig({
|
|
|
207
208
|
browser: {
|
|
208
209
|
enabled: true,
|
|
209
210
|
headless: true,
|
|
210
|
-
provider:
|
|
211
|
+
provider: playwright(),
|
|
211
212
|
instances: [
|
|
212
213
|
{
|
|
213
214
|
browser: 'chromium',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postxl/generators",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Code generators for PXL - generates backend, frontend, Prisma schemas, and more",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@faker-js/faker": "9.9.0",
|
|
45
45
|
"@prisma/prisma-schema-wasm": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
|
|
46
46
|
"exceljs": "^4.4.0",
|
|
47
|
-
"@postxl/generator": "^2.
|
|
47
|
+
"@postxl/generator": "^2.2.0",
|
|
48
48
|
"@postxl/schema": "^2.5.0",
|
|
49
49
|
"@postxl/ui-components": "^1.11.0",
|
|
50
50
|
"@postxl/utils": "^1.4.3"
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"build": "tsc -b tsconfig.build.json && pnpm run copy:templates",
|
|
63
63
|
"copy:templates": "find dist -type d -name 'template' -exec rm -rf {} + 2>/dev/null || true && find src -type d -name 'template' -exec sh -c 'mkdir -p \"dist/$(dirname \"$1\" | sed \"s|^src/||\")\" && cp -r \"$1\" \"dist/$(dirname \"$1\" | sed \"s|^src/||\")\"' _ {} \\;",
|
|
64
64
|
"generate": "tsx src/frontend-core/scripts/generate-types.ts",
|
|
65
|
-
"lint": "
|
|
66
|
-
"
|
|
65
|
+
"lint": "oxlint --disable-nested-config",
|
|
66
|
+
"format:check": "oxfmt --check \"**/*.{ts,tsx}\"",
|
|
67
67
|
"test:jest": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
|
|
68
68
|
"test:coverage": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --coverage",
|
|
69
69
|
"test:watch": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --watch",
|