@micha.bigler/ui-core-micha 3.14.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +7 -0
- package/dist/auth/UserMenu.js +1 -1
- package/dist/auth/apiClient.js +7 -6
- package/dist/chat/ChatList.js +1 -1
- package/dist/chat/ChatThread.js +2 -1
- package/dist/chat/ChatWorkspace.js +1 -1
- package/dist/chat/ModelPicker.js +2 -5
- package/dist/chat/kitSxRegistry.js +9 -0
- package/dist/chat/useChatSocket.js +1 -1
- package/dist/components/LoginForm.js +1 -1
- package/dist/components/SecurityComponent.js +1 -1
- package/dist/components/UserListComponent.js +2 -8
- package/dist/components/charts/ChartFrame.js +1 -1
- package/dist/components/charts/ScatterChart.js +2 -1
- package/dist/components/charts/kitSxRegistry.js +6 -0
- package/dist/entries/charts.js +6 -0
- package/dist/entries/chat.js +8 -0
- package/dist/entries/markdown.js +1 -0
- package/dist/index.js +0 -14
- package/dist/layout/SectionNav.js +1 -1
- package/dist/messaging/AttachmentList.js +2 -2
- package/dist/messaging/Composer.js +2 -1
- package/dist/messaging/ConversationLaunchers.js +1 -4
- package/dist/messaging/ConversationList.js +1 -1
- package/dist/messaging/DirectMessageLauncher.js +1 -1
- package/dist/messaging/MessagingProvider.js +0 -0
- package/dist/messaging/PollCard.js +7 -5
- package/dist/messaging/ReadTicks.js +2 -2
- package/dist/messaging/Thread.js +5 -3
- package/dist/notifications/NotificationBell.js +4 -7
- package/dist/notifications/NotificationSettings.js +1 -1
- package/dist/onboarding/OnboardingProvider.js +3 -6
- package/dist/pages/AccountPage.js +1 -2
- package/dist/pages/LoginPage.js +2 -3
- package/dist/pages/PasswordChangePage.js +2 -3
- package/dist/pages/PasswordInvitePage.js +2 -3
- package/dist/pages/PasswordResetRequestPage.js +2 -3
- package/dist/pages/SignUpPage.js +2 -3
- package/dist/pages/SignupConfirmPage.js +2 -3
- package/dist/theme/createAppTheme.js +5 -4
- package/dist/theme/kitSxEntry.js +11 -0
- package/dist/theme/kitSxRegistry.js +2 -15
- package/dist/theme/themeCompleteness.js +3 -12
- package/dist/utils/auth-errors.js +4 -3
- package/package.json +41 -16
- package/.github/workflows/publish.yml +0 -126
- package/DESIGN.md +0 -60
- package/WORK_ORDERS.md +0 -148
- package/dev/entries.jsx +0 -721
- package/dev/fixtures.js +0 -26
- package/dev/main.jsx +0 -75
- package/dev/mockTransport.jsx +0 -128
- package/docs/CHART-LAYOUT.md +0 -157
- package/docs/DARK-TOKENS.md +0 -140
- package/docs/TYPE-SCALE.md +0 -111
- package/docs/messaging-deviations.md +0 -118
- package/index.html +0 -12
- package/renovate.json +0 -10
- package/scripts/chart-api-census.mjs +0 -415
- package/src/auth/AuthContext.jsx +0 -158
- package/src/auth/ReauthModal.jsx +0 -82
- package/src/auth/UserMenu.jsx +0 -121
- package/src/auth/apiClient.jsx +0 -232
- package/src/auth/authApi.jsx +0 -539
- package/src/auth/authConfig.jsx +0 -34
- package/src/auth/reauth.js +0 -47
- package/src/chat/ChatComposer.jsx +0 -36
- package/src/chat/ChatList.jsx +0 -87
- package/src/chat/ChatThread.jsx +0 -128
- package/src/chat/ChatWorkspace.jsx +0 -244
- package/src/chat/MarkdownReply.jsx +0 -22
- package/src/chat/ModelPicker.jsx +0 -85
- package/src/chat/api.js +0 -18
- package/src/chat/useChatSocket.js +0 -32
- package/src/chat/wire.js +0 -7
- package/src/components/AccessCodeManager.jsx +0 -288
- package/src/components/AccessCodeSingleUseToggle.jsx +0 -92
- package/src/components/AllowedEmailDomainsManager.jsx +0 -92
- package/src/components/AuthFactorRequirementCard.jsx +0 -95
- package/src/components/BulkInviteCsvTab.jsx +0 -198
- package/src/components/EmptyState.jsx +0 -38
- package/src/components/LoginForm.jsx +0 -159
- package/src/components/MFAComponent.jsx +0 -350
- package/src/components/MfaLoginComponent.jsx +0 -252
- package/src/components/MobileBottomNav.jsx +0 -82
- package/src/components/PasskeysComponent.jsx +0 -252
- package/src/components/PasswordChangeForm.jsx +0 -87
- package/src/components/PasswordResetRequestForm.jsx +0 -43
- package/src/components/PasswordSetForm.jsx +0 -97
- package/src/components/ProfileComponent.jsx +0 -348
- package/src/components/QrSignupManager.jsx +0 -404
- package/src/components/QrSignupValidityManager.jsx +0 -106
- package/src/components/RegistrationMethodsManager.jsx +0 -150
- package/src/components/SecurityComponent.jsx +0 -141
- package/src/components/SocialLoginButtons.jsx +0 -83
- package/src/components/SoftChip.jsx +0 -93
- package/src/components/StatTile.jsx +0 -39
- package/src/components/SupportRecoveryRequestsTab.jsx +0 -482
- package/src/components/TurnstileWidget.jsx +0 -99
- package/src/components/UserInviteComponent.jsx +0 -76
- package/src/components/UserListComponent.jsx +0 -618
- package/src/components/charts/BarChart.jsx +0 -102
- package/src/components/charts/ChartFrame.jsx +0 -214
- package/src/components/charts/LineChart.jsx +0 -126
- package/src/components/charts/ScatterChart.jsx +0 -299
- package/src/components/charts/TimeSeriesChart.jsx +0 -300
- package/src/components/charts/chartDefaults.js +0 -644
- package/src/components/charts/chartLabels.js +0 -36
- package/src/components/charts/exportChart.js +0 -258
- package/src/components/charts/formatters.js +0 -39
- package/src/components/charts/palette.js +0 -33
- package/src/components/charts/yearTickInterval.js +0 -7
- package/src/i18n/authTranslations.ts +0 -2651
- package/src/i18n/chartsTranslations.ts +0 -91
- package/src/i18n/chatTranslations.ts +0 -55
- package/src/i18n/messagingTranslations.ts +0 -120
- package/src/i18n/notificationsTranslations.ts +0 -32
- package/src/i18n/onboardingTranslations.ts +0 -29
- package/src/i18n/sectionNavTranslations.ts +0 -20
- package/src/i18n/uiCoreTranslations.js +0 -29
- package/src/i18n/userMenuTranslations.ts +0 -5
- package/src/index.js +0 -158
- package/src/layout/PageLayout.jsx +0 -36
- package/src/layout/SectionNav.jsx +0 -320
- package/src/messaging/AttachmentList.jsx +0 -145
- package/src/messaging/Composer.jsx +0 -197
- package/src/messaging/ConversationLaunchers.jsx +0 -51
- package/src/messaging/ConversationList.jsx +0 -109
- package/src/messaging/DirectMessageLauncher.jsx +0 -112
- package/src/messaging/MessageBubble.jsx +0 -183
- package/src/messaging/MessagingProvider.jsx +0 -0
- package/src/messaging/MessagingScopeConfig.jsx +0 -24
- package/src/messaging/PollCard.jsx +0 -163
- package/src/messaging/ReactionBar.jsx +0 -43
- package/src/messaging/ReadTicks.jsx +0 -82
- package/src/messaging/Thread.jsx +0 -195
- package/src/messaging/api.js +0 -48
- package/src/messaging/composerImageCompression.js +0 -35
- package/src/messaging/linkifyText.jsx +0 -37
- package/src/notifications/NotificationBell.jsx +0 -84
- package/src/notifications/NotificationSettings.jsx +0 -330
- package/src/notifications/NotificationsProvider.jsx +0 -224
- package/src/notifications/PopupSurface.jsx +0 -105
- package/src/notifications/api.js +0 -55
- package/src/notifications/feedApi.js +0 -18
- package/src/notifications/realtime.jsx +0 -138
- package/src/notifications/serviceWorker/sw.js +0 -50
- package/src/onboarding/OnboardingProvider.jsx +0 -326
- package/src/onboarding/OnboardingWizard.jsx +0 -61
- package/src/onboarding/WizardDialogShell.jsx +0 -51
- package/src/onboarding/api.js +0 -13
- package/src/onboarding/stepSelection.js +0 -16
- package/src/onboarding/steps/BrowserPushStep.jsx +0 -121
- package/src/onboarding/steps/CompleteNameStep.jsx +0 -46
- package/src/onboarding/steps/CookieConsentStep.jsx +0 -133
- package/src/onboarding/steps/PwaInstallStep.jsx +0 -47
- package/src/pages/AccountPage.jsx +0 -394
- package/src/pages/LoginPage.jsx +0 -343
- package/src/pages/PasswordChangePage.jsx +0 -62
- package/src/pages/PasswordInvitePage.jsx +0 -177
- package/src/pages/PasswordResetRequestPage.jsx +0 -68
- package/src/pages/SignUpPage.jsx +0 -268
- package/src/pages/SignupConfirmPage.jsx +0 -155
- package/src/testing/checkKitIntegration.js +0 -233
- package/src/theme/createAppTheme.js +0 -423
- package/src/theme/fonts.js +0 -3
- package/src/theme/index.js +0 -21
- package/src/theme/kitSxRegistry.js +0 -285
- package/src/theme/themeCompleteness.js +0 -1045
- package/src/theme/tokens.js +0 -478
- package/src/utils/auth-errors.js +0 -76
- package/src/utils/authService.js +0 -223
- package/src/utils/resolveErrorText.js +0 -28
- package/src/utils/webauthn.js +0 -51
- package/tests/AccountPage.profileStatements.test.jsx +0 -162
- package/tests/AccountPage.test.jsx +0 -200
- package/tests/AuthContext.test.jsx +0 -129
- package/tests/BarChart.test.jsx +0 -112
- package/tests/BrowserPushStep.test.jsx +0 -110
- package/tests/ChartFrame.test.jsx +0 -336
- package/tests/ConversationList.test.jsx +0 -144
- package/tests/CookieConsentStep.test.jsx +0 -69
- package/tests/EmptyState.test.jsx +0 -62
- package/tests/LineChart.test.jsx +0 -80
- package/tests/MessagingProvider.test.jsx +0 -50
- package/tests/MobileBottomNav.test.jsx +0 -319
- package/tests/NotificationBell.test.jsx +0 -60
- package/tests/NotificationSettings.test.jsx +0 -276
- package/tests/NotificationsProvider.test.jsx +0 -240
- package/tests/OnboardingProvider.test.jsx +0 -294
- package/tests/OnboardingWizard.test.jsx +0 -143
- package/tests/PasswordChangeForm.test.jsx +0 -70
- package/tests/PasswordInvitePage.test.jsx +0 -142
- package/tests/PasswordSetForm.test.jsx +0 -70
- package/tests/PopupSurface.test.jsx +0 -142
- package/tests/ProfileComponent.refresh.test.jsx +0 -194
- package/tests/QrSignupManager.registrationContext.test.jsx +0 -106
- package/tests/QrSignupManagerInfoBox.test.jsx +0 -49
- package/tests/ScatterChart.test.jsx +0 -270
- package/tests/SectionNav.test.jsx +0 -363
- package/tests/SignUpPage.test.jsx +0 -208
- package/tests/SoftChip.test.jsx +0 -105
- package/tests/StatTile.test.jsx +0 -57
- package/tests/Thread.test.jsx +0 -151
- package/tests/TimeSeriesChart.test.jsx +0 -367
- package/tests/UserListComponent.test.jsx +0 -192
- package/tests/UserMenu.test.jsx +0 -171
- package/tests/apiClientLanguage.test.js +0 -33
- package/tests/apiClientPublicPaths.test.js +0 -178
- package/tests/authApiLogin.test.js +0 -42
- package/tests/authApiRegistration.test.js +0 -31
- package/tests/authErrorCodeRendering.test.jsx +0 -77
- package/tests/authErrors.test.js +0 -74
- package/tests/authTranslations.test.js +0 -74
- package/tests/chart-api-census.test.js +0 -366
- package/tests/chartAxisTickBand.test.jsx +0 -95
- package/tests/chartDefaults.test.js +0 -902
- package/tests/chartLabels.test.js +0 -50
- package/tests/chartsPalette.test.js +0 -99
- package/tests/chatApi.test.js +0 -48
- package/tests/chatDriverNames.test.jsx +0 -71
- package/tests/chatExports.test.js +0 -3
- package/tests/chatList.test.jsx +0 -84
- package/tests/chatPicker.test.jsx +0 -82
- package/tests/chatSocket.test.jsx +0 -26
- package/tests/chatThread.test.jsx +0 -116
- package/tests/chatTranslations.test.js +0 -47
- package/tests/chatWorkspace.test.jsx +0 -234
- package/tests/checkKitIntegration.test.jsx +0 -219
- package/tests/createAppTheme.test.js +0 -132
- package/tests/createAppThemeDark.test.js +0 -127
- package/tests/createAppThemeLightGuard.test.js +0 -40
- package/tests/createAppThemePageContrast.test.js +0 -108
- package/tests/createAppThemeTypography.test.js +0 -53
- package/tests/errorCallSiteGuard.test.js +0 -32
- package/tests/exportChart.test.js +0 -313
- package/tests/feedApi.test.js +0 -46
- package/tests/fixtures/light-theme-baseline.json +0 -2234
- package/tests/i18nAggregate.test.js +0 -120
- package/tests/i18nGermanVariant.test.js +0 -65
- package/tests/loginPageErrorResolution.test.jsx +0 -102
- package/tests/messagingApi.test.js +0 -32
- package/tests/messagingChunk6.test.jsx +0 -116
- package/tests/messagingCompactBubble.test.jsx +0 -64
- package/tests/messagingComposer.test.jsx +0 -136
- package/tests/messagingComposerChunk5.test.jsx +0 -113
- package/tests/messagingContractConformance.test.js +0 -69
- package/tests/messagingDirectMessageLauncher.test.jsx +0 -151
- package/tests/messagingExports.test.js +0 -21
- package/tests/messagingInteractions.test.jsx +0 -136
- package/tests/messagingLastMessagePreview.test.jsx +0 -93
- package/tests/messagingLinkify.test.jsx +0 -51
- package/tests/messagingMessageActions.test.jsx +0 -163
- package/tests/messagingMsg6.test.jsx +0 -105
- package/tests/messagingMsg6f.test.jsx +0 -155
- package/tests/messagingMsg6g.test.jsx +0 -166
- package/tests/messagingMsg6h.test.jsx +0 -136
- package/tests/messagingMsg6i.test.jsx +0 -129
- package/tests/messagingPollRendering.test.jsx +0 -142
- package/tests/messagingReactionMerge.test.jsx +0 -77
- package/tests/messagingReadTicksTooltip.test.jsx +0 -36
- package/tests/messagingThreadReceipts.test.jsx +0 -178
- package/tests/messagingThreadingQuoting.test.jsx +0 -87
- package/tests/messagingUnreadLifecycle.test.jsx +0 -78
- package/tests/notificationsApi.test.js +0 -41
- package/tests/notificationsExports.test.js +0 -34
- package/tests/onboardingDescriptors.test.js +0 -132
- package/tests/packageTreeShaking.test.js +0 -126
- package/tests/realtime.test.jsx +0 -219
- package/tests/resolveErrorText.test.js +0 -72
- package/tests/stepSelection.test.js +0 -53
- package/tests/themeCompleteness.test.js +0 -626
- package/tests/timeSeriesLegend.test.js +0 -99
- package/tests/userScreenTranslations.test.jsx +0 -218
- package/tsconfig.build.json +0 -18
- package/vite.config.mjs +0 -6
- package/work-orders/AUTH-1.md +0 -74
- package/work-orders/AUTH-2.md +0 -74
- package/work-orders/AUTH-4.md +0 -183
- package/work-orders/AUTH-5.md +0 -154
- package/work-orders/AUTH-7.md +0 -181
- package/work-orders/AUTH-8.md +0 -184
- package/work-orders/CHART-1.md +0 -285
- package/work-orders/CHART-2.md +0 -222
- package/work-orders/CHART-3.md +0 -163
- package/work-orders/CHART-4.md +0 -203
- package/work-orders/CHART-5.md +0 -226
- package/work-orders/CHART-6.md +0 -428
- package/work-orders/CHART-7.md +0 -175
- package/work-orders/DX-1.md +0 -169
- package/work-orders/DX-2.md +0 -188
- package/work-orders/DX-3.md +0 -195
- package/work-orders/I18N-1.md +0 -254
- package/work-orders/I18N-3.md +0 -207
- package/work-orders/MSG-3.md +0 -375
- package/work-orders/MSG-3b.md +0 -1002
- package/work-orders/MSG-3c.md +0 -378
- package/work-orders/MSG-3d.md +0 -268
- package/work-orders/MSG-3e.md +0 -164
- package/work-orders/MSG-3f.md +0 -391
- package/work-orders/MSG-6e.md +0 -308
- package/work-orders/MSG-6f.md +0 -214
- package/work-orders/MSG-6g.md +0 -244
- package/work-orders/MSG-6h.md +0 -238
- package/work-orders/MSG-6i.md +0 -271
- package/work-orders/MSG-6j.md +0 -117
- package/work-orders/NOTIF-12.md +0 -214
- package/work-orders/NOTIF-13.md +0 -142
- package/work-orders/NOTIF-14.md +0 -151
- package/work-orders/PRIM-1.md +0 -177
- package/work-orders/SHELL-1.md +0 -255
- package/work-orders/SHELL-2.md +0 -197
- package/work-orders/SHELL-3.md +0 -359
- package/work-orders/SHELL-4.md +0 -351
- package/work-orders/SHELL-5.md +0 -345
- package/work-orders/SHELL-6.md +0 -210
- package/work-orders/THEME-1.md +0 -587
- package/work-orders/THEME-10.md +0 -303
- package/work-orders/THEME-11.md +0 -208
- package/work-orders/THEME-2.md +0 -339
- package/work-orders/THEME-3.md +0 -210
- package/work-orders/THEME-4.md +0 -271
- package/work-orders/THEME-5.md +0 -341
- package/work-orders/THEME-6.md +0 -247
- package/work-orders/THEME-7.md +0 -82
- package/work-orders/THEME-8.md +0 -211
- package/work-orders/THEME-9.md +0 -194
- package/work-orders/UCM-AUTH-10.md +0 -490
- package/work-orders/UCM-AUTH-11.md +0 -185
- package/work-orders/UCM-AUTH-12.md +0 -98
- package/work-orders/UCM-AUTH-13.md +0 -47
- package/work-orders/UCM-AUTH-9.md +0 -207
- package/work-orders/UCM-CHART-10.md +0 -150
- package/work-orders/UCM-CHART-11.md +0 -132
- package/work-orders/UCM-CHART-12.md +0 -348
- package/work-orders/UCM-CHART-13.md +0 -122
- package/work-orders/UCM-CHART-14.md +0 -198
- package/work-orders/UCM-CHART-15.md +0 -187
- package/work-orders/UCM-CHART-16.md +0 -169
- package/work-orders/UCM-CHART-17.md +0 -195
- package/work-orders/UCM-CHART-18.md +0 -200
- package/work-orders/UCM-CHART-8.md +0 -147
- package/work-orders/UCM-CHART-9.md +0 -265
- package/work-orders/UCM-CHAT-1.md +0 -190
- package/work-orders/UCM-CHAT-2.md +0 -75
- package/work-orders/UCM-DEP-1.md +0 -63
- package/work-orders/UCM-I18N-4.md +0 -226
- package/work-orders/UCM-I18N-5.md +0 -211
- package/work-orders/UCM-MSG-20.md +0 -192
- package/work-orders/UCM-PRIM-2.md +0 -114
- package/work-orders/UCM-SHELL-7.md +0 -134
- package/work-orders/UCM-SHELL-8.md +0 -125
- package/work-orders/UCM-TEST-1.md +0 -304
- package/work-orders/UCM-THEME-13.md +0 -69
- package/work-orders/UCM-THEME-14.md +0 -312
- package/work-orders/UCM-THEME-15.md +0 -356
- package/work-orders/UCM-THEME-16.md +0 -80
- package/work-orders/UCM-THEME-17.md +0 -111
- package/work-orders/UCM-THEME-18.md +0 -184
- package/work-orders/assets/AUTH-4-user-list-card.html +0 -407
- package/work-orders/assets/PRIM-1-dashboard-primitives.html +0 -624
- package/work-orders/assets/SHELL-2-account-navigation.html +0 -1159
- package/work-orders/assets/THEME-1-baseline-reference-sheet.html +0 -1352
- package/work-orders/assets/UCM-CHAT-1-ai-chat.html +0 -447
- package/work-orders/assets/UCM-THEME-13-dark-prototype.html +0 -390
- package/work-orders/assets/UCM-THEME-17-type-scale.html +0 -391
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
# UCM-THEME-14: Dark mode in `createAppTheme`, from the central token file
|
|
2
|
-
|
|
3
|
-
# A. Envelope, authored by the Expertenchat
|
|
4
|
-
|
|
5
|
-
## Goal & expected outcome
|
|
6
|
-
|
|
7
|
-
`createAppTheme({ palette: { mode: 'dark', primary }, ... })` builds a complete dark theme whose
|
|
8
|
-
mode-dependent values come from a dark baseline palette in `src/theme/tokens.js`, next to the light
|
|
9
|
-
one. `assertThemeComplete` judges a dark theme against its own surfaces. **The light output does not
|
|
10
|
-
change by a single value.**
|
|
11
|
-
|
|
12
|
-
Afterwards an app with a light/dark switch (today only `webshop-guenter`, `WSG-THEME-1`) can compose
|
|
13
|
-
both of its themes through the factory.
|
|
14
|
-
|
|
15
|
-
## Value source
|
|
16
|
-
|
|
17
|
-
**`docs/DARK-TOKENS.md`, frozen by the operator in `UCM-THEME-13` (2026-10-02, `7330f91`).** Every dark
|
|
18
|
-
value in code comes from that sheet. A value the implementation needs that the sheet does not carry is a
|
|
19
|
-
stop-and-report. Do not improvise it.
|
|
20
|
-
|
|
21
|
-
## Decided rules (operator, 2026-10-01 and 2026-10-02; amended into this order 2026-10-02)
|
|
22
|
-
|
|
23
|
-
1. **Complete baseline.** Every mode-dependent token class has its dark value from the sheet, including
|
|
24
|
-
`ink.*`, `text.*`, `background.default/paper/subtle`, `divider`, `controlBorder.*`, all five status keys
|
|
25
|
-
(`main/light/dark/contrastText` via `withMainShades`, plus `text/fill/fillText/bg`), `dataSeries` and
|
|
26
|
-
`shadow.*`.
|
|
27
|
-
2. **Outlined first, as in light.** Resting surfaces keep `shadow.rest: none`. **Overlays get their own,
|
|
28
|
-
lighter surface in dark**: the sheet's overlay surface (`#232A31`) is the paper of `MuiDialog`,
|
|
29
|
-
`MuiMenu`, `MuiPopover` and `MuiDrawer` in dark, with the sheet's overlay shadow; the modal backdrop
|
|
30
|
-
(`MuiBackdrop`) uses the sheet's scrim. Light has no such surface and does not change.
|
|
31
|
-
3. **Primary in dark: derived only when it fails.** An app always passes `palette.primary` (the factory
|
|
32
|
-
requires it). In dark, that value is kept if it clears 4.5:1 on the dark page, and otherwise lightened in
|
|
33
|
-
0.05 steps until it does. Its `contrastText` is whichever of `#FFFFFF` and the dark page colour
|
|
34
|
-
contrasts more. This is how "derived unless the app sets its own" is expressed in an API where every
|
|
35
|
-
app sets one: an app that wants a particular dark primary passes one that already clears the floor
|
|
36
|
-
(webshop-guenter `#D49040`, 7.35:1, stays). Worked examples are in the sheet.
|
|
37
|
-
4. **Status safety net, the dark counterpart of `UCM-THEME-15`.** On a dark page other than the baseline
|
|
38
|
-
page, a **baseline-supplied** status `main` (and `controlBorder.error`) that would fail against the page or
|
|
39
|
-
its own `bg` is lightened until it passes. App-supplied values are never altered (`UCM-THEME-15` rule 3,
|
|
40
|
-
read per key off `appConfig.palette`). Never throws; capped like the darkening.
|
|
41
|
-
5. **Data series follow a rule, not only a list.** In dark, each light series colour is lightened until it
|
|
42
|
-
clears 3:1 on the theme's own `background.paper`. On the baseline paper that yields exactly the sheet's
|
|
43
|
-
list; on an app's own paper (webshop-guenter `#171209`) it adapts.
|
|
44
|
-
6. **Contrast surfaces are the theme's own.** In dark, every derivation and `contrastFindings` judge against
|
|
45
|
-
the theme's page and paper, never a fixed `#FFFFFF`. Light keeps today's pair.
|
|
46
|
-
7. **Autofill needs no new code path.** The palette-aware block (`src/theme/createAppTheme.js:97-108`)
|
|
47
|
-
already resolves from `background.paper` and `ink.primary` and wins over the static light block in
|
|
48
|
-
`tokens.js`. It is correct in dark once the dark palette is in place; confirm it in a test.
|
|
49
|
-
|
|
50
|
-
## Context the operator established
|
|
51
|
-
|
|
52
|
-
- `createAppTheme` (`src/theme/createAppTheme.js`) resolves the palette in three layers: the app's
|
|
53
|
-
palette, then `BASELINE_PALETTE`, then the app's palette again. It then derives
|
|
54
|
-
`controlBorder.focus`, builds the palette-aware component slots, and merges `BASELINE_STATIC`, those
|
|
55
|
-
components and the app config. `palette.mode` is not read anywhere today.
|
|
56
|
-
- **Two places assume a white page:**
|
|
57
|
-
- `deriveFocusColour` checks 3:1 against `'#FFFFFF'` and `background.default`, and only ever
|
|
58
|
-
**darkens** the primary. On a dark page it would have to lighten.
|
|
59
|
-
- `contrastFindings` in `src/theme/themeCompleteness.js` checks against a fixed
|
|
60
|
-
`white: '#FFFFFF'` (line 298) plus `page: background.default`.
|
|
61
|
-
- `BASELINE_INTENTIONAL_DEFAULT_EXEMPTIONS` includes `palette.background.paper` with the reason "The
|
|
62
|
-
canonical surface is deliberately MUI white". That reason is false for a dark theme.
|
|
63
|
-
- The palette-aware slots use palette values (for example the autofill inset uses `background.paper`),
|
|
64
|
-
so they follow the resolved palette once it is right. `tokens.js` also carries a static light `autofill`
|
|
65
|
-
block (`#FFFFFF`, `#212529`); it is shadowed by the palette-aware one (measured 2026-10-02).
|
|
66
|
-
- `UCM-THEME-15` (3.8.0) added `deriveDarkenedPageColour`/`deriveAlphaPageColour` next to
|
|
67
|
-
`deriveFocusColour`; the dark branch extends those, it does not add a parallel set.
|
|
68
|
-
- The kit has components registered against the baseline (`src/theme/kitSxRegistry.js`, `THEME-4`/
|
|
69
|
-
`THEME-5`). A kit component that hard-codes a light value would show that value only in dark mode.
|
|
70
|
-
|
|
71
|
-
## Scope + non-goals
|
|
72
|
-
|
|
73
|
-
In scope:
|
|
74
|
-
1. `tokens.js`: a dark baseline palette with the sheet's values, and whatever exemption entries a
|
|
75
|
-
dark theme needs, each with a true reason.
|
|
76
|
-
2. `createAppTheme`: select the baseline palette by `palette.mode`. Make the focus derivation work in
|
|
77
|
-
both directions against the mode's surfaces. Rules 2 to 6 above: the overlay surface, scrim and overlay
|
|
78
|
-
shadow on the four overlay components in dark; the primary derivation; the status safety net; the
|
|
79
|
-
series rule.
|
|
80
|
-
3. `themeCompleteness.js`: contrast checks against the theme's own surfaces, not a fixed white. Mode-
|
|
81
|
-
specific exemptions.
|
|
82
|
-
4. Kit components that resolve a hard-coded light value instead of a token: **list** every one.
|
|
83
|
-
Switching one to an existing token is in scope. Anything that needs a new token is a finding.
|
|
84
|
-
5. `DESIGN.md` (a dark-mode section), `CHANGELOG.md`, and a **minor** version bump. The change is
|
|
85
|
-
additive: light output is unchanged, and dark is new.
|
|
86
|
-
|
|
87
|
-
Non-goals:
|
|
88
|
-
- No change to any light value or light behaviour.
|
|
89
|
-
- No automatic `prefers-color-scheme` switching and no toggle component.
|
|
90
|
-
- No consumer adoption. `WSG-THEME-1` does that in its own repo, after its own pin bump.
|
|
91
|
-
- No change to chart components beyond reading palette tokens they already read.
|
|
92
|
-
|
|
93
|
-
## Tier · precondition / gate
|
|
94
|
-
|
|
95
|
-
- **Tier 3 · tests: light-output regression guard, dark completeness, focus contrast in both modes,
|
|
96
|
-
and the kit's existing theme tests.** A change inside shared-core (`AGENTS.md` -> Tiering).
|
|
97
|
-
- Precondition: **`UCM-THEME-13` frozen**, and **`UCM-THEME-15` landed**. 15 generalises the focus
|
|
98
|
-
derivation into page-derived status and border colours on the same surface pair; build the dark
|
|
99
|
-
branch on top of it, not beside it.
|
|
100
|
-
- Downstream: `webshop-guenter`/`WSG-THEME-1` waits for this release and for its own pin bump.
|
|
101
|
-
|
|
102
|
-
## Risks
|
|
103
|
-
|
|
104
|
-
- **Ten adopted apps consume the light path.** A light regression reaches all of them on their next
|
|
105
|
-
bump. That is why the regression guard is a required test, not a nice-to-have.
|
|
106
|
-
- **The three-layer palette merge interacts with augmentation** (the comment at the top of `tokens.js`:
|
|
107
|
-
only the first `createTheme` argument is augmented). A dark status entry missing
|
|
108
|
-
`main`/`contrastText` would silently keep MUI's light hue.
|
|
109
|
-
- **Contrast in the other direction.** Light status tints (`bg`) over a dark page, and a focus colour
|
|
110
|
-
derived by darkening, both fail on dark.
|
|
111
|
-
- **The `background.paper` exemption reason is currently mode-blind.** Leaving it would record a false
|
|
112
|
-
statement as the reason in every dark theme.
|
|
113
|
-
- **Rule 3 cannot keep a dark primary that fails the floor.** An app that deliberately wants one gets it
|
|
114
|
-
lightened. That is intended (an accessibility floor), not a defect.
|
|
115
|
-
- **Two sheet values sit close to their threshold** (`controlBorder.main` 3.14:1 on paper, series slot 1
|
|
116
|
-
3.07:1). Build them from the rules, not as literals, so a later paper change re-derives instead of
|
|
117
|
-
silently failing.
|
|
118
|
-
|
|
119
|
-
## Required tests to WRITE (you write them and run YOUR OWN new ones; the Orchestrator's run is the gate)
|
|
120
|
-
|
|
121
|
-
Kit test suite, narrow, next to the existing theme tests:
|
|
122
|
-
|
|
123
|
-
1. **Light regression guard.** For a fixed light app config, the fully resolved theme (palette,
|
|
124
|
-
typography, shape, components, exemptions) equals the output from before this change. Show that the
|
|
125
|
-
test fails when one light value is altered by hand. A structural test that cannot fail is
|
|
126
|
-
decoration.
|
|
127
|
-
2. **Dark completeness.** `assertThemeComplete(createAppTheme({ palette: { mode: 'dark', primary } }))`
|
|
128
|
-
has zero findings, or only exemptions with a true reason. The same check with a primary that has to be
|
|
129
|
-
**lightened** to clear contrast.
|
|
130
|
-
3. **Focus contrast.** `controlBorder.focus` clears 3:1 against both page surfaces in each mode.
|
|
131
|
-
4. **Status family on dark.** Each status key resolves `main/light/dark/contrastText` from the dark
|
|
132
|
-
baseline, not MUI's defaults.
|
|
133
|
-
5. **Primary in dark (rule 3).** On the baseline dark page: `#468AB2` stays, `#2F4F96` resolves to
|
|
134
|
-
`#6D84B6`, `#432CA1` to `#8576C2`, each with `#14181B` as `contrastText`; `#D49040` stays.
|
|
135
|
-
6. **Status net (rule 4).** On webshop-guenter's page `#0E0B08` no baseline status colour moves; on a
|
|
136
|
-
page chosen so that one fails, that one is lightened and passes; an app-supplied status `main` that
|
|
137
|
-
fails stays exactly as supplied.
|
|
138
|
-
7. **Overlay surface (rule 2).** In dark, the paper of `MuiDialog`, `MuiMenu`, `MuiPopover` and `MuiDrawer`
|
|
139
|
-
resolves to the sheet's overlay surface and `MuiBackdrop` to its scrim; the light theme's values for
|
|
140
|
-
the same slots are unchanged (covered by test 1).
|
|
141
|
-
8. **Series rule (rule 5).** On the baseline paper the dark series equal the sheet's list; on
|
|
142
|
-
`#171209` every slot clears 3:1.
|
|
143
|
-
9. **Autofill (rule 7).** In dark, the resolved autofill inset is the dark paper and the text is
|
|
144
|
-
`ink.primary`.
|
|
145
|
-
|
|
146
|
-
Run, do not write: the kit's existing theme and `kitSxRegistry` tests.
|
|
147
|
-
|
|
148
|
-
## Parity guardrail
|
|
149
|
-
|
|
150
|
-
No light-mode change of any kind. No behaviour, API or data-contract change beyond the new `mode`
|
|
151
|
-
branch.
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
# B. Implementation map, filled by the Orchestrator and ADDRESSED TO THE IMPLEMENTER
|
|
156
|
-
|
|
157
|
-
Work from this package; do not explore broadly from scratch; open only the named files to verify. If
|
|
158
|
-
you must dig deeper, delegate to a read-only Explore sub-agent.
|
|
159
|
-
|
|
160
|
-
## Target working directory (absolute)
|
|
161
|
-
|
|
162
|
-
`C:\Users\biglmi\Documents\webapps\ui-core-micha` (branch `main`). Never the workspace root.
|
|
163
|
-
|
|
164
|
-
## Context package
|
|
165
|
-
|
|
166
|
-
Value source for every dark value: `docs/DARK-TOKENS.md` (read it fully first). Do not invent a value;
|
|
167
|
-
one the sheet lacks is `RESULT: BLOCKED <value>`.
|
|
168
|
-
|
|
169
|
-
**`src/theme/tokens.js`**
|
|
170
|
-
- `BASELINE_PALETTE` (l.~52-123) is the light baseline. Add `BASELINE_PALETTE_DARK` next to it with the
|
|
171
|
-
same shape, every key from the sheet: `ink`, `text`, `background`, `divider`, `controlBorder`
|
|
172
|
-
(`main`/`hover`/`error`), the five status keys (use `withMainShades(main, '#14181B')` for
|
|
173
|
-
success/warning/error/info, plus `text`/`fill`/`fillText`/`bg`; `stale` has no `main`, as in light),
|
|
174
|
-
`dataSeries.categorical`. Do NOT hardcode series slots 1 and 5, `controlBorder.main/hover`, or the
|
|
175
|
-
primary as literals: those are rule-derived (see below); the sheet's numbers are the expected OUTPUT.
|
|
176
|
-
The dark `dataSeries` base is the light `SERIES_COLOURS`, lightened by the factory.
|
|
177
|
-
- Export a dark overlay surface (`#232A31`), a dark overlay shadow (`0 8px 28px rgba(0,0,0,.45)`) and the
|
|
178
|
-
scrim (`rgba(0,0,0,.55)`) as named constants.
|
|
179
|
-
- `BASELINE_STATIC.shadow` (~l.200) carries `rest`/`overlay`; the dark theme needs the dark overlay value
|
|
180
|
-
there. `BASELINE_STATIC.components` has static `MuiDialog.paper`/`MuiDrawer.paper`/`MuiMenu.paper`
|
|
181
|
-
boxShadow `OVERLAY_SHADOW` (~l.340-355): in dark these are overridden, never edited for light.
|
|
182
|
-
- The static light `autofill` block (~l.147) is shadowed by the palette-aware one; leave it, confirm by test.
|
|
183
|
-
- `BASELINE_INTENTIONAL_DEFAULT_EXEMPTIONS` (end of file): the `palette.background.paper` entry says "MUI
|
|
184
|
-
white". Provide the list by mode: in dark, drop that entry (the dark paper differs from MUI's default, so
|
|
185
|
-
no exemption is needed), keep the others. The light list stays byte-identical.
|
|
186
|
-
|
|
187
|
-
**`src/theme/createAppTheme.js`**
|
|
188
|
-
- `createAppTheme` (l.~176): the three-layer `createTheme(app, BASELINE_PALETTE, app)` resolution. Read
|
|
189
|
-
`appConfig.palette.mode`; `'dark'` selects `BASELINE_PALETTE_DARK` and passes `mode: 'dark'` through to the
|
|
190
|
-
theme; anything else is the unchanged light path. Do not read `prefers-color-scheme`.
|
|
191
|
-
- `contrastSurfaces = ['#FFFFFF', background.default]` (l.~186): in dark this must be the theme's own
|
|
192
|
-
`[background.default, background.paper]`; light stays exactly `['#FFFFFF', default]`.
|
|
193
|
-
- `deriveFocusColour`/`clearsContrast` (l.~48-60) only darken and use MUI `getContrastRatio`. In dark add a
|
|
194
|
-
lightening counterpart (lighten in 0.05 steps, same 0.9 cap) alongside, not a rewrite. Same for
|
|
195
|
-
`deriveDarkenedPageColour`: add a lightened sibling next to it. For dark `controlBorder.main/hover`:
|
|
196
|
-
`rgba(230, 235, 239, a)` from `ink.primary`, `a` = the smallest alpha (0.01 steps) that clears 3:1 on
|
|
197
|
-
page and paper, hover = main + 0.15; the sheet's 0.38 / 0.53 are the expected result.
|
|
198
|
-
- Rule 3 (primary), rule 4 (status net: baseline-supplied status `main` and `controlBorder.error`, judged
|
|
199
|
-
against page AND its own `bg`, lightened; per-key check off `appConfig.palette` exactly as the existing
|
|
200
|
-
light loops do), rule 5 (series: each baseline light series colour lightened in 0.05 steps until it clears
|
|
201
|
-
3:1 on the theme's own `background.paper`; app-supplied series untouched, the final merge argument already
|
|
202
|
-
lets them win), rule 6 (own surfaces) are all computed here, dark branch only. Primary `contrastText` =
|
|
203
|
-
whichever of `#FFFFFF` / `background.default` contrasts more. The app may pass `primary` as `{ main }`.
|
|
204
|
-
- `createPaletteAwareComponents(palette)` (l.~84): add dark-only overlay slots: `MuiDialog`, `MuiMenu`,
|
|
205
|
-
`MuiPopover`, `MuiDrawer` `paper` -> background colour = overlay surface `#232A31`, `boxShadow` = dark
|
|
206
|
-
overlay shadow; `MuiBackdrop.root` -> scrim. Keep the overlay surface a local constant unless a palette
|
|
207
|
-
key is clearly cleaner and trips no completeness check. Emitted only when mode is dark, so the light
|
|
208
|
-
component tree is untouched.
|
|
209
|
-
- Preserve the final merge order (BASELINE_STATIC, palette-aware components, `appConfig`, the dataSeries
|
|
210
|
-
re-merge). The dark theme's `shadow.overlay` = the dark value.
|
|
211
|
-
|
|
212
|
-
**`src/theme/themeCompleteness.js`**
|
|
213
|
-
- `contrastFindings` (l.~268-345): `backgrounds = { white: '#FFFFFF', page: default }` (~l.298). In dark use
|
|
214
|
-
the theme's own page and paper instead of a fixed white. Light keeps the exact same keys
|
|
215
|
-
(`...-on-white`, `...-on-page`) and values; existing tests assert those surface names. For dark name them
|
|
216
|
-
`...-on-paper` / `...-on-page`.
|
|
217
|
-
- `assertThemeComplete` (~l.620): `MUI_DEFAULT_THEME` is the light MUI default. Verify a dark theme neither
|
|
218
|
-
produces a false "still MUI default" finding nor a false pass; fix only what is wrong.
|
|
219
|
-
|
|
220
|
-
**Kit components with hard-coded light values:** `src/components/QrSignupManager.jsx` has an inline CSS
|
|
221
|
-
block (l.~225-274: `#f5f7fb`, `#122033`, `#d9e2f2`, `#ffffff`, `#e8f0ff`, `#23408e`, `#f8faff`) and
|
|
222
|
-
`bgcolor: '#ffffff'` at l.361. **The l.361 white is a QR quiet zone and stays.** List every hard-coded
|
|
223
|
-
light colour under `src/` outside `src/theme/` and tests in your final report. Switching one to an existing
|
|
224
|
-
palette token is in scope (check its consumers and `tests/QrSignupManager.registrationContext.test.jsx`
|
|
225
|
-
first); a spot that would need a new token is reported, not built. `src/auth/UserMenu.jsx:44` and
|
|
226
|
-
`src/components/charts/chartLabels.js` only mention colours in comments.
|
|
227
|
-
|
|
228
|
-
**Docs / release:** `DESIGN.md` gets a concise dark-mode section (how to opt in, primary rule, status net,
|
|
229
|
-
overlay surface, series rule, what an app owns in dark). `CHANGELOG.md` entry. `package.json` version
|
|
230
|
-
`3.10.0` -> `3.11.0` (and `package-lock.json` where the version appears for this package).
|
|
231
|
-
|
|
232
|
-
**Existing tests to follow** (style, imports): `tests/createAppTheme.test.js`,
|
|
233
|
-
`tests/createAppThemePageContrast.test.js` (imports `assertThemeComplete`, `createAppTheme` from
|
|
234
|
-
`../src/theme`), `tests/themeCompleteness.test.js`. New dark tests go in `tests/createAppThemeDark.test.js`,
|
|
235
|
-
the light guard in `tests/createAppThemeLightGuard.test.js`.
|
|
236
|
-
|
|
237
|
-
**Light regression guard (required test 1):** BEFORE editing any source, capture the output of
|
|
238
|
-
`createAppTheme({ palette: { primary: { main: '#0F62FE' } } })` and of one overriding app config (fontFamily,
|
|
239
|
-
a custom page background, an app-supplied status main) as a JSON fixture
|
|
240
|
-
(`tests/fixtures/light-theme-baseline.json`, stable serialization, functions as strings), from the
|
|
241
|
-
unmodified code, and assert equality afterwards. Prove it can fail: one test mutates a light value in a
|
|
242
|
-
clone of the snapshot and asserts the comparison reports a difference.
|
|
243
|
-
|
|
244
|
-
**Invariants / pitfalls**
|
|
245
|
-
- Light output byte-identical: no key-order change that alters serialization, no new keys on the light theme.
|
|
246
|
-
- Only the first `createTheme` argument is augmented (comment at the top of `tokens.js`): every status
|
|
247
|
-
entry needs explicit `main/light/dark/contrastText`.
|
|
248
|
-
- MUI `getContrastRatio` vs the kit's alpha-aware `calculateContrastRatio`: use the kit's for anything with
|
|
249
|
-
alpha, as THEME-15 did.
|
|
250
|
-
- Build `controlBorder.main/hover`, the series and the primary from the rules, not literals; the tests
|
|
251
|
-
assert the rules reproduce the sheet's values.
|
|
252
|
-
- Do not touch auth, CI, dependencies, `WORK_ORDERS.md`, or `docs/DARK-TOKENS.md` (read-only here).
|
|
253
|
-
|
|
254
|
-
## Required tests, restated
|
|
255
|
-
|
|
256
|
-
The nine tests of Part A, in the new files named above. Run only the tests you wrote.
|
|
257
|
-
|
|
258
|
-
## Preamble
|
|
259
|
-
|
|
260
|
-
The text above is the COMPLETE spec: the committed WO file's content, not a plan to refine; there is no
|
|
261
|
-
separate plan file. Read the nearest `AGENTS.md`, the relevant `.codex/skills/<role>/SKILL.md`, and the app
|
|
262
|
-
`MEMORY.md` ONLY for conventions. Stay in scope; do not touch auth/permissions/deps/schema/CI unless the
|
|
263
|
-
spec says so; do not update `MEMORY.md`. **Do NOT edit `WORK_ORDERS.md`: the register row and the review
|
|
264
|
-
verdicts are the orchestrator's alone.** **Your tools are for editing source and test files and for running
|
|
265
|
-
the tests you wrote, nothing else.** Do NOT install dependencies, touch a lockfile (the version line in
|
|
266
|
-
`package-lock.json` is the one exception, a plain text edit), run a package manager, or tidy up stray
|
|
267
|
-
files; if something in the repo state blocks you, stop and report it as `RESULT: BLOCKED <reason>` instead
|
|
268
|
-
of fixing it. Do NOT `git add`/`commit`/`push`: leave every change uncommitted in the working tree for the
|
|
269
|
-
orchestrator's independent review. WRITE the tests the `Required tests` section calls for AND **RUN the
|
|
270
|
-
tests you just wrote** to confirm they execute and pass: that is the ONLY test run you do (NOT the
|
|
271
|
-
affected/full suite, NOT any review). Run them with `npx vitest run <your test files>`. The orchestrator
|
|
272
|
-
re-runs the authoritative set and does the independent review after you finish; those are the gate.
|
|
273
|
-
|
|
274
|
-
Narrate continuously: a `PLAN: <step1> | <step2> | ...` line up front, then a single-line
|
|
275
|
-
`PROGRESS: [<n>/<total>] <present-tense action>` before every relevant action (and `... done` on
|
|
276
|
-
completion), spaced so no gap exceeds ~2 min, stdout unbuffered, plus exactly one final
|
|
277
|
-
`RESULT: DONE|BLOCKED <reason>`. Your final report must also list every hard-coded light colour found under
|
|
278
|
-
`src/` outside the theme folder.
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
# C. Orchestrator only, NOT ADDRESSED TO THE IMPLEMENTER
|
|
283
|
-
|
|
284
|
-
> **If you are the implementer reading this work order as your own specification: STOP at this line.**
|
|
285
|
-
> Everything below describes what the Orchestrator does AFTER you finish. You do none of it: no
|
|
286
|
-
> reviewers, no verification run, no register edit, no `git add`/`commit`/`push`.
|
|
287
|
-
|
|
288
|
-
### Execution directive
|
|
289
|
-
|
|
290
|
-
Check `.claude/codex-status.md` first (newest-first; read it with `head`). No line for today means use
|
|
291
|
-
Codex.
|
|
292
|
-
|
|
293
|
-
### Review routing
|
|
294
|
-
|
|
295
|
-
Tier 3: independent `reviewer` (all configured lenses) and `ui_reviewer`, concurrent, one batch,
|
|
296
|
-
before the commit. No `sec_reviewer`.
|
|
297
|
-
|
|
298
|
-
### Verification
|
|
299
|
-
|
|
300
|
-
Render a kit demo surface in both modes at 375 px and 1280 px (`dev/`), and name the screenshots in
|
|
301
|
-
the register Notiz. No prototype is in scope.
|
|
302
|
-
|
|
303
|
-
### Register + commit + release
|
|
304
|
-
|
|
305
|
-
Row -> `done` with the review Notiz in the `AGENTS.md` shape. The publish runs on push to `main` when
|
|
306
|
-
`package.json`/`src/**` change (`.github/workflows/publish.yml`). Then add a planned row in
|
|
307
|
-
`webshop-guenter/WORK_ORDERS.md` for the pin bump to this version, and unblock `WSG-THEME-1`.
|
|
308
|
-
|
|
309
|
-
### Mini-handover
|
|
310
|
-
|
|
311
|
-
`Orchestrator: implement work-orders/UCM-THEME-14.md in ui-core-micha (main). git pull first, confirm
|
|
312
|
-
UCM-THEME-13 is frozen, read the WO, then follow orchestrate-codex.`
|