@atomazing-org/design-system 2.0.1 → 3.7.2
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/AGENTS.md +92 -0
- package/README.MD +263 -335
- package/dist/index.d.ts +11 -15
- package/dist/index.js +22 -22
- package/dist/presets/index.d.ts +15 -2
- package/dist/presets/index.js +315 -313
- package/dist/themePresets-CwgG5XEL.d.ts +65 -0
- package/dist/themePresets-CwgG5XEL.js +1 -0
- package/migrations/README.UPDATE.md +34 -20
- package/migrations/docs/migrations/design-system/README.md +48 -17
- package/migrations/docs/migrations/design-system/routes/adopt-existing/AEROCRM-EXAMPLE.md +197 -0
- package/migrations/docs/migrations/design-system/routes/adopt-existing/RUNBOOK.md +185 -25
- package/migrations/docs/migrations/design-system/routes/adopt-existing/migration.spec.json +84 -20
- package/migrations/docs/migrations/design-system/routes/greenfield/RUNBOOK.md +57 -25
- package/migrations/docs/migrations/design-system/routes/greenfield/migration.spec.json +37 -14
- package/migrations/docs/migrations/design-system/routes/mui4-to-latest/RUNBOOK.md +136 -77
- package/migrations/docs/migrations/design-system/routes/mui4-to-latest/migration.spec.json +104 -29
- package/migrations/docs/migrations/design-system/shared/WORKING-RULES.md +194 -0
- package/migrations/docs/migrations/design-system/shared/acceptance.md +76 -20
- package/migrations/docs/migrations/design-system/shared/common-regressions.md +218 -0
- package/migrations/docs/migrations/design-system/shared/gates.md +39 -3
- package/migrations/docs/migrations/design-system/shared/manual-qa-matrix.md +70 -0
- package/migrations/docs/migrations/design-system/shared/phase-exit-criteria.md +129 -0
- package/migrations/docs/migrations/design-system/shared/phases.md +377 -0
- package/migrations/skills/design-system-consumer-agent/SKILL.md +84 -0
- package/migrations/skills/design-system-migration-agent/SKILL.md +75 -9
- package/package.json +14 -4
- package/dist/typography-B-BeIk0v.d.ts +0 -120
package/AGENTS.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# @atomazing-org/design-system Agent Rules
|
|
2
|
+
|
|
3
|
+
These instructions apply when a repository depends on `@atomazing-org/design-system`
|
|
4
|
+
or when an AI agent is asked to integrate, upgrade, or refactor work around this library.
|
|
5
|
+
|
|
6
|
+
## Source Of Truth
|
|
7
|
+
|
|
8
|
+
- `README.MD`
|
|
9
|
+
- `migrations/docs/migrations/design-system/shared/WORKING-RULES.md`
|
|
10
|
+
- `migrations/skills/design-system-consumer-agent/SKILL.md`
|
|
11
|
+
- `migrations/skills/design-system-migration-agent/SKILL.md`
|
|
12
|
+
|
|
13
|
+
If you are working inside `examples/next-app-router`, load
|
|
14
|
+
`examples/next-app-router/AGENTS.md` and treat it as the local source of truth for
|
|
15
|
+
that starter.
|
|
16
|
+
|
|
17
|
+
## Default Integration Rules
|
|
18
|
+
|
|
19
|
+
1. Use only public imports:
|
|
20
|
+
- `@atomazing-org/design-system`
|
|
21
|
+
- `@atomazing-org/design-system/presets`
|
|
22
|
+
2. Do not deep-import internal files from `src/*`, `dist/*`, or private folders.
|
|
23
|
+
3. Use `ThemeProviderWrapper` as the app-level design-system entrypoint.
|
|
24
|
+
4. Use `useThemeSettings()` for theme and dark-mode UI state instead of parallel custom state.
|
|
25
|
+
5. Prefer:
|
|
26
|
+
- `defaultThemes` for standard application surfaces
|
|
27
|
+
- `landingPageThemes` for landing and marketing surfaces
|
|
28
|
+
- `allBuiltInThemes` only when the consumer intentionally wants both packs
|
|
29
|
+
6. Custom presets must use the `ThemePreset` contract with both light and dark schemes.
|
|
30
|
+
7. Do not create a competing root `ThemeProvider` unless it is a thin wrapper around the design system.
|
|
31
|
+
8. For SSR and Next.js:
|
|
32
|
+
- keep the provider in a client boundary
|
|
33
|
+
- do not access `window`, `document`, or `localStorage` at module scope
|
|
34
|
+
9. After dependency, provider, or theme-state changes, the app must still boot in a real browser without startup console errors.
|
|
35
|
+
10. Fix duplicated runtime singleton warnings for `react`, `react-dom`, `@emotion/react`, or `@emotion/styled` before closing migration work.
|
|
36
|
+
11. The active preset must own the application background.
|
|
37
|
+
12. Do not hardcode page-level backgrounds on app shells, route layouts, or page wrappers when that overrides the preset background.
|
|
38
|
+
13. Prefer direct MUI primitives or thin wrappers around them for base controls.
|
|
39
|
+
14. Do not preserve consumer-owned substitute atoms for stock MUI controls unless they carry real custom behavior.
|
|
40
|
+
15. Visible application text should be rendered through `Typography` with an explicit semantic variant.
|
|
41
|
+
16. When MUI interactive controls render visible text, wrap that text in `Typography component="span"` instead of leaving raw text nodes in place.
|
|
42
|
+
17. Shared dialogs, drawers, and bottom sheets must expose stable `aria-labelledby` and `aria-describedby`.
|
|
43
|
+
18. Shared overlay close actions must have explicit accessible labels.
|
|
44
|
+
19. Search overlays that own keyboard-filtered results should use `combobox` and `listbox` semantics.
|
|
45
|
+
20. Browser event listeners belong in effects with cleanup, not render paths or module scope.
|
|
46
|
+
21. Keep preset selection explicit in one app-owned theme module.
|
|
47
|
+
22. Remove zero-value wrappers that only rename a stock MUI primitive or surface.
|
|
48
|
+
23. Use theme helpers such as `alpha()` instead of palette-string alpha suffix hacks.
|
|
49
|
+
24. Decorative gradients and shadow styling do not belong in normal consumer surfaces.
|
|
50
|
+
25. If several app pages share the same workflow shell, extract one shared layout contract.
|
|
51
|
+
26. If local app barrel exports introduce circular chunk warnings, use direct local imports instead.
|
|
52
|
+
27. Fix consumer-owned build warnings with config changes, not warning suppression.
|
|
53
|
+
|
|
54
|
+
## Generic Landing Principles
|
|
55
|
+
|
|
56
|
+
Apply these rules when working on landing-style consumers in general:
|
|
57
|
+
|
|
58
|
+
1. Use `landingPageThemes` intentionally for landing and marketing surfaces.
|
|
59
|
+
2. Let the active preset own the page background.
|
|
60
|
+
3. Keep one primary focus per major section.
|
|
61
|
+
4. Keep scroll natural; avoid forced snap or automatic section scrolling.
|
|
62
|
+
5. Prefer product-facing labels over template-facing labels in visible UI.
|
|
63
|
+
6. Do not recreate preset-owned surface styling in app components.
|
|
64
|
+
7. Prefer MUI-native composition over custom decorative UI logic.
|
|
65
|
+
8. Do not build nested rectangular surface hierarchies.
|
|
66
|
+
9. Keep landing content concise and easy to scan.
|
|
67
|
+
|
|
68
|
+
## When To Propose A Migration
|
|
69
|
+
|
|
70
|
+
Propose a route-based migration before making piecemeal edits if any of the following are true:
|
|
71
|
+
|
|
72
|
+
- the app uses `@material-ui/*`
|
|
73
|
+
- the app already has a custom theme or token layer
|
|
74
|
+
- the app has widespread hardcoded UI tokens that should move to theme values
|
|
75
|
+
- the user asks to adopt, align, standardize, upgrade, or replace the current UI foundation
|
|
76
|
+
- partial integration would leave two competing sources of truth for theme state
|
|
77
|
+
- the app hardcodes root-level page backgrounds that should instead come from the active preset
|
|
78
|
+
|
|
79
|
+
## Route Selection
|
|
80
|
+
|
|
81
|
+
- `@material-ui/*` found in dependencies or imports: use `mui4-to-latest`
|
|
82
|
+
- no existing theme or token migration is needed: use `greenfield`
|
|
83
|
+
- otherwise: use `adopt-existing`
|
|
84
|
+
|
|
85
|
+
## Required Migration Response
|
|
86
|
+
|
|
87
|
+
When migration is the correct path, the agent should:
|
|
88
|
+
|
|
89
|
+
1. Say that route-based migration is recommended instead of ad hoc edits.
|
|
90
|
+
2. Name the selected route and why it applies.
|
|
91
|
+
3. Load `migrations/skills/design-system-migration-agent/SKILL.md`.
|
|
92
|
+
4. Use the runbook and shared gates from `migrations/docs/migrations/design-system/`.
|