wcz-layout 10.1.2 → 10.1.7

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 (85) hide show
  1. package/dist/{AggregatedCell-C7nAQyMO.mjs → AggregatedCell-CqGptV6i.mjs} +199 -150
  2. package/dist/AggregatedCell-CqGptV6i.mjs.map +1 -0
  3. package/dist/Approval-DoD-GRRH.mjs.map +1 -1
  4. package/dist/DialogsContext-DLqA8RJ_.mjs.map +1 -1
  5. package/dist/Email-BzQQkbe9.mjs.map +1 -1
  6. package/dist/FileMeta-DDqUju1Y.mjs.map +1 -1
  7. package/dist/{LayoutTable-DX9IaO8V.d.mts → LayoutTable-CRo43iWr.d.mts} +7 -3
  8. package/dist/{RouterListItemButton-ULMlaQh6.mjs → RouterListItemButton-ke6iPKkL.mjs} +9 -9
  9. package/dist/RouterListItemButton-ke6iPKkL.mjs.map +1 -0
  10. package/dist/{approval-DiNOXd4B.mjs → approval-L09uPzTU.mjs} +2 -2
  11. package/dist/approval-L09uPzTU.mjs.map +1 -0
  12. package/dist/auth.d.mts +1 -0
  13. package/dist/auth.mjs +15 -12
  14. package/dist/auth.mjs.map +1 -1
  15. package/dist/components.d.mts +1 -1
  16. package/dist/components.mjs +594 -361
  17. package/dist/components.mjs.map +1 -1
  18. package/dist/{createApi-DGJJ4I_R.mjs → createApi-BhNkG4jz.mjs} +3 -3
  19. package/dist/createApi-BhNkG4jz.mjs.map +1 -0
  20. package/dist/data/client.mjs +3 -3
  21. package/dist/data/client.mjs.map +1 -1
  22. package/dist/data/server.mjs +4 -4
  23. package/dist/data/server.mjs.map +1 -1
  24. package/dist/{file-C14fhUeg.mjs → file-Chlljz3o.mjs} +4 -4
  25. package/dist/file-Chlljz3o.mjs.map +1 -0
  26. package/dist/{file-C5BOj1q8.mjs → file-Dl8JCcqy.mjs} +4 -4
  27. package/dist/file-Dl8JCcqy.mjs.map +1 -0
  28. package/dist/hooks.d.mts +2 -1
  29. package/dist/hooks.mjs +541 -591
  30. package/dist/hooks.mjs.map +1 -1
  31. package/dist/index.d.mts +9 -0
  32. package/dist/index.mjs +438 -428
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/middleware.mjs +2 -2
  35. package/dist/middleware.mjs.map +1 -1
  36. package/dist/models.mjs.map +1 -1
  37. package/dist/{peoplesoft-BkJMCcHb.mjs → peoplesoft-BhintHQz.mjs} +3 -3
  38. package/dist/peoplesoft-BhintHQz.mjs.map +1 -0
  39. package/dist/{providers-DrairEO2.mjs → providers-BvuZWkpD.mjs} +2 -2
  40. package/dist/providers-BvuZWkpD.mjs.map +1 -0
  41. package/dist/{tokens-BLRreL1j.mjs → tokens-XuFhVbh5.mjs} +9 -6
  42. package/dist/tokens-XuFhVbh5.mjs.map +1 -0
  43. package/dist/{utils-BUpDoqme.mjs → utils-CaeVFWF-.mjs} +18 -7
  44. package/dist/utils-CaeVFWF-.mjs.map +1 -0
  45. package/dist/utils.mjs +1 -1
  46. package/dist/vite.mjs +11 -0
  47. package/dist/vite.mjs.map +1 -1
  48. package/package.json +131 -130
  49. package/skills/client-db/SKILL.md +136 -136
  50. package/skills/db-schema/SKILL.md +98 -98
  51. package/skills/dialogs/SKILL.md +74 -74
  52. package/skills/forms/SKILL.md +122 -122
  53. package/skills/general/SKILL.md +127 -127
  54. package/skills/general/references/exports.md +6 -1
  55. package/skills/migrations/SKILL.md +57 -57
  56. package/skills/migrations/versions/migrate-v10-to-v11.md +2 -1
  57. package/skills/migrations/versions/migrate-v9-to-v10.md +582 -582
  58. package/skills/routing/SKILL.md +87 -87
  59. package/skills/server-functions/SKILL.md +95 -95
  60. package/skills/services/SKILL.md +34 -34
  61. package/skills/services/docs/email.md +32 -32
  62. package/skills/services/docs/file.md +108 -108
  63. package/skills/services/docs/peoplesoft.md +114 -114
  64. package/skills/start/SKILL.md +52 -52
  65. package/skills/start/steps/01-git-setup.md +10 -10
  66. package/skills/start/steps/02-project-name-setup.md +19 -19
  67. package/skills/start/steps/03-apm-setup.md +97 -208
  68. package/skills/start/steps/04-wicop-setup.md +105 -105
  69. package/skills/start/steps/05-database-setup.md +52 -52
  70. package/skills/start/steps/06-entra-setup.md +96 -96
  71. package/skills/start/steps/07-vault-setup.md +115 -115
  72. package/skills/start/steps/08-generate-favicon.md +8 -8
  73. package/skills/start/steps/09-gitlab-ci.md +25 -25
  74. package/skills/start/steps/10-commit.md +15 -15
  75. package/skills/table/SKILL.md +266 -264
  76. package/dist/AggregatedCell-C7nAQyMO.mjs.map +0 -1
  77. package/dist/RouterListItemButton-ULMlaQh6.mjs.map +0 -1
  78. package/dist/approval-DiNOXd4B.mjs.map +0 -1
  79. package/dist/createApi-DGJJ4I_R.mjs.map +0 -1
  80. package/dist/file-C14fhUeg.mjs.map +0 -1
  81. package/dist/file-C5BOj1q8.mjs.map +0 -1
  82. package/dist/peoplesoft-BkJMCcHb.mjs.map +0 -1
  83. package/dist/providers-DrairEO2.mjs.map +0 -1
  84. package/dist/tokens-BLRreL1j.mjs.map +0 -1
  85. package/dist/utils-BUpDoqme.mjs.map +0 -1
@@ -1,127 +1,127 @@
1
- ---
2
- name: general
3
- description: "Use ALWAYS, before any other skill here, for every code change in this project. Defines the approved stack (TanStack, Vite+, MUI), TypeScript and naming conventions, date formatting, light/dark theming, testing and the validation command, and the src/ and tests/ folder layout that decides where each new file goes."
4
- metadata:
5
- type: convention
6
- library: wcz-layout
7
- ---
8
-
9
- > This is the default skill. Reference it in combination with more specific skills (e.g., `forms`, `table`, `dialogs`, etc.) for targeted tasks. For the full catalogue of every `wcz-layout` import subpath and what it exports, read [references/exports.md](references/exports.md).
10
-
11
- ## Preferred Technology Stack
12
-
13
- Favor the established platform before introducing custom code or a new dependency:
14
-
15
- - **TanStack ecosystem:** Reach for the TanStack library that owns the problem instead of hand-rolling it — Start for the full-stack app and server functions, Router for routing and route-level data loading, DB for client-side collections and live queries, AI for LLM-backed chat and streaming, Form for form state and validation, Hotkeys for keyboard shortcuts, Virtual for long lists and grids, Pacer for debouncing, throttling, rate limiting and queueing or Charts for data visualization.
16
- - **Vite+:** Use Vite+ for the development server, formatting, linting and testing.
17
- - **Material UI:** Use Material UI for interface components and icons.
18
-
19
- When the requirement is not covered above, look for an existing library before writing any logic. Prefer a well-maintained, widely adopted, typed library over custom implementations, even for seemingly simple functionality where a library can reduce edge cases and bugs. If a suitable library exists, install it and use it. Only implement the functionality yourself when it takes a few lines or no suitable library exists.
20
-
21
- ## Coding Conventions
22
-
23
- - Write strict ES2023 TypeScript. Preserve local inference, type public boundaries and never use explicit `any`.
24
- - Stick to double quotes, semicolons, and the `~/` alias for `src/` imports.
25
- - Avoid `useMemo` / `useCallback`; the React Compiler handles memoization.
26
- - Keep code self-documenting; only add comments to clarify non-obvious intent.
27
- - Run the narrow relevant test, then `vp check --fix`. It formats, lints and type-checks.
28
-
29
- ## User Interface
30
-
31
- - Translate every user-facing string via `useTranslation` (or `t` outside components).
32
- - Format all client-side dates with `"L LT"` or `"L"`.
33
- - When building UI, always design for both light and dark mode; this app uses `colorSchemeSelector: "data-mui-color-scheme"`, so prefer `theme.applyStyles("dark", ...)` for mode-specific styling.
34
- - Always design for desktop and mobile, using responsive layouts and breakpoints to keep the UI usable on any screen.
35
- - Build skeletons for loading states.
36
- - Success has no message. Animate the changed item where it lives: created enters, deleted collapses out, edited briefly tints. If the change isn't visible (e.g. before navigating), morph the trigger button to a check for ~400ms.
37
-
38
- ## Testing
39
-
40
- - `vp test` runs `tests/unit` and `tests/integration`; import the test API from `vite-plus/test`.
41
- - Server functions need a request context to run, so integration tests cover what they build on: the schema and constraints against the `DATABASE_URL` Postgres, and collections with the server function mocked.
42
- - `npm run test:e2e` runs Playwright against the dev server, signed in as admin by `tests/e2e/auth.setup.ts`.
43
- - Add or update tests for any new functionality or bug fixes where it matters, don't write tests just for the sake of having them.
44
-
45
- ## File Organization
46
-
47
- Use this ownership model for new application code. Keep feature-specific code close to its route; promote it to a root directory only when it is shared across multiple features.
48
-
49
- ```txt
50
- src/ # client-first architecture
51
- ├── components/ # shared components across multiple routes
52
- ├── db/ # TanStack DB
53
- │ ├── collections/ # collection descriptors
54
- │ │ └── <table>.ts
55
- │ └── queries/ # live query option objects
56
- │ └── <table>.ts
57
- ├── env.ts # clientEnv + serverEnv via createEnv
58
- ├── hooks/ # shared hooks across multiple routes
59
- │ └── useTheme.ts # MUI theme + color schemes
60
- ├── lib/ # isomorphic/shared logic usable by client and server
61
- │ ├── auth/
62
- │ │ ├── permissions.ts # as const satisfies Permissions
63
- │ │ └── scopes.ts # as const satisfies Scopes
64
- │ ├── locales/
65
- │ │ ├── cs.json
66
- │ │ └── en.json
67
- │ └── schemas/ # shared Zod schemas
68
- │ └── <table>.ts
69
- ├── router.tsx # QueryClient, DbClient, router options
70
- ├── routes/ # TanStack Router file-based routing
71
- │ ├── __root.tsx
72
- │ ├── index.tsx
73
- │ ├── login.tsx # required by requireAuth
74
- │ ├── health.ts # Docker HEALTHCHECK, pings the database
75
- │ ├── auth/ # OAuth handlers
76
- │ │ ├── login.ts
77
- │ │ ├── callback.ts
78
- │ │ └── logout.ts
79
- │ ├── api/ # REST API routes (only when a public API is required)
80
- │ │ └── features/
81
- │ │ ├── index.ts
82
- │ │ └── $id.ts
83
- │ └── features/ # feature folder with multiple routes (kebab-case, plural)
84
- │ ├── -components/ # route-specific components
85
- │ ├── -hooks/ # route-specific hooks
86
- │ ├── index.tsx
87
- │ ├── create.tsx
88
- │ ├── $id.tsx
89
- │ └── edit.$id.tsx
90
- ├── server/ # server-only code, never imported from a component
91
- │ ├── actions/
92
- │ │ └── <table>.ts
93
- │ ├── db/
94
- │ │ ├── migrations/
95
- │ │ ├── schemas/ # Drizzle schemas
96
- │ │ │ ├── <table>.ts
97
- │ │ │ └── relations.ts
98
- │ │ └── index.ts # pool, search_path, auto-migrate
99
- │ └── middleware/
100
- │ └── databaseMiddleware.ts # app-local, not a library export
101
- ├── types/
102
- │ ├── i18next.d.ts # types t() against en.json
103
- │ └── wcz-layout.d.ts # declares virtual:wcz-layout
104
- tests/
105
- ├── unit/
106
- │ ├── lib/
107
- │ │ └── schemas/
108
- │ │ └── <table>.test.ts
109
- │ ├── hooks/
110
- │ │ └── useX.test.ts
111
- │ └── routes/
112
- │ └── features/
113
- │ └── -components/
114
- │ └── XCard.test.tsx
115
- ├── integration/
116
- │ ├── server/
117
- │ │ └── db/ # real Postgres from DATABASE_URL
118
- │ │ └── <table>.test.ts
119
- │ └── db/
120
- │ └── collections/ # server function mocked
121
- │ └── <table>.test.ts
122
- └── e2e/ # Playwright
123
- ├── auth.setup.ts # signs in as admin, no Microsoft login
124
- ├── utils.ts # gotoHydrated
125
- └── features/
126
- └── crud.spec.ts
127
- ```
1
+ ---
2
+ name: general
3
+ description: "Use ALWAYS, before any other skill here, for every code change in this project. Defines the approved stack (TanStack, Vite+, MUI), TypeScript and naming conventions, date formatting, light/dark theming, testing and the validation command, and the src/ and tests/ folder layout that decides where each new file goes."
4
+ metadata:
5
+ type: convention
6
+ library: wcz-layout
7
+ ---
8
+
9
+ > This is the default skill. Reference it in combination with more specific skills (e.g., `forms`, `table`, `dialogs`, etc.) for targeted tasks. For the full catalogue of every `wcz-layout` import subpath and what it exports, read [references/exports.md](references/exports.md).
10
+
11
+ ## Preferred Technology Stack
12
+
13
+ Favor the established platform before introducing custom code or a new dependency:
14
+
15
+ - **TanStack ecosystem:** Reach for the TanStack library that owns the problem instead of hand-rolling it — Start for the full-stack app and server functions, Router for routing and route-level data loading, DB for client-side collections and live queries, AI for LLM-backed chat and streaming, Form for form state and validation, Hotkeys for keyboard shortcuts, Virtual for long lists and grids, Pacer for debouncing, throttling, rate limiting and queueing or Charts for data visualization.
16
+ - **Vite+:** Use Vite+ for the development server, formatting, linting and testing.
17
+ - **Material UI:** Use Material UI for interface components and icons.
18
+
19
+ When the requirement is not covered above, look for an existing library before writing any logic. Prefer a well-maintained, widely adopted, typed library over custom implementations, even for seemingly simple functionality where a library can reduce edge cases and bugs. If a suitable library exists, install it and use it. Only implement the functionality yourself when it takes a few lines or no suitable library exists.
20
+
21
+ ## Coding Conventions
22
+
23
+ - Write strict ES2023 TypeScript. Preserve local inference, type public boundaries and never use explicit `any`.
24
+ - Stick to double quotes, semicolons, and the `~/` alias for `src/` imports.
25
+ - Avoid `useMemo` / `useCallback`; the React Compiler handles memoization.
26
+ - Keep code self-documenting; only add comments to clarify non-obvious intent.
27
+ - Run the narrow relevant test, then `vp check --fix`. It formats, lints and type-checks.
28
+
29
+ ## User Interface
30
+
31
+ - Translate every user-facing string via `useTranslation` (or `t` outside components).
32
+ - Format all client-side dates with `"L LT"` or `"L"`.
33
+ - When building UI, always design for both light and dark mode; this app uses `colorSchemeSelector: "data-mui-color-scheme"`, so prefer `theme.applyStyles("dark", ...)` for mode-specific styling.
34
+ - Always design for desktop and mobile, using responsive layouts and breakpoints to keep the UI usable on any screen.
35
+ - Build skeletons for loading states.
36
+ - Success has no message. Animate the changed item where it lives: created enters, deleted collapses out, edited briefly tints. If the change isn't visible (e.g. before navigating), morph the trigger button to a check for ~400ms.
37
+
38
+ ## Testing
39
+
40
+ - `vp test` runs `tests/unit` and `tests/integration`; import the test API from `vite-plus/test`.
41
+ - Server functions need a request context to run, so integration tests cover what they build on: the schema and constraints against the `DATABASE_URL` Postgres, and collections with the server function mocked.
42
+ - `npm run test:e2e` runs Playwright against the dev server, signed in as admin by `tests/e2e/auth.setup.ts`.
43
+ - Add or update tests for any new functionality or bug fixes where it matters, don't write tests just for the sake of having them.
44
+
45
+ ## File Organization
46
+
47
+ Use this ownership model for new application code. Keep feature-specific code close to its route; promote it to a root directory only when it is shared across multiple features.
48
+
49
+ ```txt
50
+ src/ # client-first architecture
51
+ ├── components/ # shared components across multiple routes
52
+ ├── db/ # TanStack DB
53
+ │ ├── collections/ # collection descriptors
54
+ │ │ └── <table>.ts
55
+ │ └── queries/ # live query option objects
56
+ │ └── <table>.ts
57
+ ├── env.ts # clientEnv + serverEnv via createEnv
58
+ ├── hooks/ # shared hooks across multiple routes
59
+ │ └── useTheme.ts # MUI theme + color schemes
60
+ ├── lib/ # isomorphic/shared logic usable by client and server
61
+ │ ├── auth/
62
+ │ │ ├── permissions.ts # as const satisfies Permissions
63
+ │ │ └── scopes.ts # as const satisfies Scopes
64
+ │ ├── locales/
65
+ │ │ ├── cs.json
66
+ │ │ └── en.json
67
+ │ └── schemas/ # shared Zod schemas
68
+ │ └── <table>.ts
69
+ ├── router.tsx # QueryClient, DbClient, router options
70
+ ├── routes/ # TanStack Router file-based routing
71
+ │ ├── __root.tsx
72
+ │ ├── index.tsx
73
+ │ ├── login.tsx # required by requireAuth
74
+ │ ├── health.ts # Docker HEALTHCHECK, pings the database
75
+ │ ├── auth/ # OAuth handlers
76
+ │ │ ├── login.ts
77
+ │ │ ├── callback.ts
78
+ │ │ └── logout.ts
79
+ │ ├── api/ # REST API routes (only when a public API is required)
80
+ │ │ └── features/
81
+ │ │ ├── index.ts
82
+ │ │ └── $id.ts
83
+ │ └── features/ # feature folder with multiple routes (kebab-case, plural)
84
+ │ ├── -components/ # route-specific components
85
+ │ ├── -hooks/ # route-specific hooks
86
+ │ ├── index.tsx
87
+ │ ├── create.tsx
88
+ │ ├── $id.tsx
89
+ │ └── edit.$id.tsx
90
+ ├── server/ # server-only code, never imported from a component
91
+ │ ├── actions/
92
+ │ │ └── <table>.ts
93
+ │ ├── db/
94
+ │ │ ├── migrations/
95
+ │ │ ├── schemas/ # Drizzle schemas
96
+ │ │ │ ├── <table>.ts
97
+ │ │ │ └── relations.ts
98
+ │ │ └── index.ts # pool, search_path, auto-migrate
99
+ │ └── middleware/
100
+ │ └── databaseMiddleware.ts # app-local, not a library export
101
+ ├── types/
102
+ │ ├── i18next.d.ts # types t() against en.json
103
+ │ └── wcz-layout.d.ts # declares virtual:wcz-layout
104
+ tests/
105
+ ├── unit/
106
+ │ ├── lib/
107
+ │ │ └── schemas/
108
+ │ │ └── <table>.test.ts
109
+ │ ├── hooks/
110
+ │ │ └── useX.test.ts
111
+ │ └── routes/
112
+ │ └── features/
113
+ │ └── -components/
114
+ │ └── XCard.test.tsx
115
+ ├── integration/
116
+ │ ├── server/
117
+ │ │ └── db/ # real Postgres from DATABASE_URL
118
+ │ │ └── <table>.test.ts
119
+ │ └── db/
120
+ │ └── collections/ # server function mocked
121
+ │ └── <table>.test.ts
122
+ └── e2e/ # Playwright
123
+ ├── auth.setup.ts # signs in as admin, no Microsoft login
124
+ ├── utils.ts # gotoHydrated
125
+ └── features/
126
+ └── crud.spec.ts
127
+ ```
@@ -10,7 +10,9 @@ The root subpath. Everything the application shell needs.
10
10
  - `LayoutProvider` — root shell provider. Props: `theme` (required), `navigation?`,
11
11
  `options?`. Installs the Emotion cache, MUI `ThemeProvider`, `LocalizationProvider`
12
12
  (dayjs), i18next and the dialogs provider. Wrap `{children}` with it inside `<body>` in
13
- `__root.tsx`. Do not install any of those yourself.
13
+ `__root.tsx`. Do not install any of those yourself. Render `<html lang={i18n.language}>`
14
+ in the shell: the browser starts i18next in that language before hydrating, so the
15
+ server-rendered page is kept rather than rebuilt in another language.
14
16
  - `Navigation` — the type for the sidebar tree. Items are
15
17
  `{ kind: "item" | "header" | "group" | "divider" }`; an item takes `to` or `href`,
16
18
  `title`, `icon` and optional `search`; groups take `title`, `icon` and `children`; headers
@@ -19,6 +21,9 @@ The root subpath. Everything the application shell needs.
19
21
  - `getUser({ queryClient })` — resolves the signed-in user. Call it in the root
20
22
  `beforeLoad` and return `{ user }`; that is what makes `Route.useRouteContext().user`
21
23
  available on every route.
24
+ - `setLanguageFromRequest()` — on the server, switches i18next to the request's language (the
25
+ `i18next` cookie, then `Accept-Language`) so pages server-render in it; a no-op in the
26
+ browser. `await` it first in the root `beforeLoad`, before `getUser`.
22
27
  - `loginProvidersQueryOptions` — query options for the configured OAuth providers. The
23
28
  `/login` route loads it so the buttons server-render.
24
29
  - `WISTRON_PRIMARY_COLOR`, `WISTRON_SECONDARY_COLOR` — brand colors for the app's theme.
@@ -1,57 +1,57 @@
1
- ---
2
- name: migrations
3
- description: "Use when upgrading the wcz-layout package to a newer major version. Each major ships only its own inbound guide, versions/migrate-v<N-1>-to-v<N>.md, delivered by installing it. One major per pass."
4
- metadata:
5
- type: lifecycle
6
- library: wcz-layout
7
- disable-model-invocation: "true"
8
- ---
9
-
10
- # Upgrading wcz-layout
11
-
12
- ## 1. Find the source major
13
-
14
- ```bash
15
- node -p "require('wcz-layout/package.json').version" # installed
16
- npm view wcz-layout version # latest published
17
- ls node_modules/wcz-layout/skills/migrations/versions/
18
- ```
19
-
20
- `package.json` names the installed major, not the one `src/` is written against.
21
- Open the guide on disk and grep `src/` for the symbols on its `from` side —
22
- `requirePermission`, `authenticationMiddleware`, `DataGridPremium`,
23
- `useNotification` and the rest of the left-hand columns.
24
-
25
- - Hits → `src/` is on that guide's `from` major. Apply that guide now, install nothing.
26
- - No hits → the source major is the installed one. Go to step 2.
27
-
28
- ## 2. One pass per major
29
-
30
- For each major from source + 1 up to the latest, in order:
31
-
32
- ```bash
33
- npm install wcz-layout@<major>
34
- ls node_modules/wcz-layout/skills/migrations/versions/
35
- ```
36
-
37
- Re-list after every install — it replaced `versions/` and this skill. Read the
38
- whole `migrate-v<from>-to-v<major>.md` it delivered, and whatever that guide says
39
- to read first, before editing anything. Then work through it top to bottom.
40
-
41
- Never skip a major: only `@10` carries the v9→v10 guide, so v9 → v11 is two
42
- passes — install 10, apply, verify, install 11, apply, verify.
43
-
44
- ## 3. Verify before the next pass
45
-
46
- ```bash
47
- npx vp check --fix
48
- ```
49
-
50
- Formats, lints and type-checks. Fix everything it leaves behind, then:
51
-
52
- ```bash
53
- npx vp dev
54
- ```
55
-
56
- The app must start and render. Stop the dev server, then start the next pass.
57
- Done when no guide is left unapplied and the installed version is the latest.
1
+ ---
2
+ name: migrations
3
+ description: "Use when upgrading the wcz-layout package to a newer major version. Each major ships only its own inbound guide, versions/migrate-v<N-1>-to-v<N>.md, delivered by installing it. One major per pass."
4
+ metadata:
5
+ type: lifecycle
6
+ library: wcz-layout
7
+ disable-model-invocation: "true"
8
+ ---
9
+
10
+ # Upgrading wcz-layout
11
+
12
+ ## 1. Find the source major
13
+
14
+ ```bash
15
+ node -p "require('wcz-layout/package.json').version" # installed
16
+ npm view wcz-layout version # latest published
17
+ ls node_modules/wcz-layout/skills/migrations/versions/
18
+ ```
19
+
20
+ `package.json` names the installed major, not the one `src/` is written against.
21
+ Open the guide on disk and grep `src/` for the symbols on its `from` side —
22
+ `requirePermission`, `authenticationMiddleware`, `DataGridPremium`,
23
+ `useNotification` and the rest of the left-hand columns.
24
+
25
+ - Hits → `src/` is on that guide's `from` major. Apply that guide now, install nothing.
26
+ - No hits → the source major is the installed one. Go to step 2.
27
+
28
+ ## 2. One pass per major
29
+
30
+ For each major from source + 1 up to the latest, in order:
31
+
32
+ ```bash
33
+ npm install wcz-layout@<major>
34
+ ls node_modules/wcz-layout/skills/migrations/versions/
35
+ ```
36
+
37
+ Re-list after every install — it replaced `versions/` and this skill. Read the
38
+ whole `migrate-v<from>-to-v<major>.md` it delivered, and whatever that guide says
39
+ to read first, before editing anything. Then work through it top to bottom.
40
+
41
+ Never skip a major: only `@10` carries the v9→v10 guide, so v9 → v11 is two
42
+ passes — install 10, apply, verify, install 11, apply, verify.
43
+
44
+ ## 3. Verify before the next pass
45
+
46
+ ```bash
47
+ npx vp check --fix
48
+ ```
49
+
50
+ Formats, lints and type-checks. Fix everything it leaves behind, then:
51
+
52
+ ```bash
53
+ npx vp dev
54
+ ```
55
+
56
+ The app must start and render. Stop the dev server, then start the next pass.
57
+ Done when no guide is left unapplied and the installed version is the latest.
@@ -1 +1,2 @@
1
- https://mui.com/material-ui/react-number-field/
1
+ https://mui.com/material-ui/react-number-field/
2
+ https://tanstack.com/router/latest/docs/guide/internationalization-i18n