@tonycodes-ui/mortar 0.0.0-stage → 0.12.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/AGENTS.md +10 -0
- package/CHANGELOG.md +268 -0
- package/CONTRIBUTING.md +60 -0
- package/DESIGN.md +51 -0
- package/LICENSE +21 -0
- package/README.md +155 -2
- package/TESTING.md +83 -0
- package/baseline-policy.json +16 -0
- package/bin/mortar.mjs +258 -0
- package/catalog.json +9900 -0
- package/cli/audit.mjs +943 -0
- package/cli/data.mjs +176 -0
- package/cli/mcp.mjs +216 -0
- package/cli/migrations.mjs +128 -0
- package/cli/packet.mjs +267 -0
- package/cli/search.mjs +246 -0
- package/cli/tools.mjs +229 -0
- package/design-principles.json +30 -0
- package/dist/agent-data.json +1 -0
- package/dist/application.d.ts +340 -0
- package/dist/application.js +240 -0
- package/dist/auth.d.ts +121 -0
- package/dist/auth.js +97 -0
- package/dist/brand.d.ts +69 -0
- package/dist/brand.js +266 -0
- package/dist/calendar.d.ts +75 -0
- package/dist/calendar.js +310 -0
- package/dist/choice.d.ts +36 -0
- package/dist/choice.js +36 -0
- package/dist/composer.d.ts +28 -0
- package/dist/composer.js +47 -0
- package/dist/display.d.ts +136 -0
- package/dist/display.js +75 -0
- package/dist/docs.d.ts +145 -0
- package/dist/docs.js +141 -0
- package/dist/ecommerce.d.ts +261 -0
- package/dist/ecommerce.js +177 -0
- package/dist/feedback.d.ts +80 -0
- package/dist/feedback.js +98 -0
- package/dist/foundation.d.ts +42 -0
- package/dist/foundation.js +121 -0
- package/dist/heading.d.ts +5 -0
- package/dist/heading.js +9 -0
- package/dist/icons.d.ts +50 -0
- package/dist/icons.js +70 -0
- package/dist/illustration.d.ts +47 -0
- package/dist/illustration.js +47 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +18 -0
- package/dist/inspection.d.ts +24 -0
- package/dist/inspection.js +14 -0
- package/dist/internal.d.ts +514 -0
- package/dist/internal.js +332 -0
- package/dist/layout.d.ts +107 -0
- package/dist/layout.js +66 -0
- package/dist/marketing-sections.d.ts +161 -0
- package/dist/marketing-sections.js +58 -0
- package/dist/marketing.d.ts +277 -0
- package/dist/marketing.js +163 -0
- package/dist/navigation.d.ts +35 -0
- package/dist/navigation.js +44 -0
- package/dist/primitives.d.ts +258 -0
- package/dist/primitives.js +244 -0
- package/dist/showcase.d.ts +29 -0
- package/dist/showcase.js +10 -0
- package/dist/workspace.d.ts +80 -0
- package/dist/workspace.js +48 -0
- package/docs/agents.md +127 -0
- package/docs/auth-flows.md +71 -0
- package/docs/migrating-to-0.6.md +94 -0
- package/docs/theming.md +170 -0
- package/package.json +94 -4
- package/skills/mortar/SKILL.md +36 -0
- package/src/application.css +1487 -0
- package/src/application.tsx +1413 -0
- package/src/auth.tsx +452 -0
- package/src/brand.ts +335 -0
- package/src/calendar.css +468 -0
- package/src/calendar.tsx +868 -0
- package/src/choice.tsx +240 -0
- package/src/composer.tsx +158 -0
- package/src/data.css +690 -0
- package/src/display.tsx +452 -0
- package/src/docs.css +704 -0
- package/src/docs.tsx +737 -0
- package/src/ecommerce.css +810 -0
- package/src/ecommerce.tsx +1033 -0
- package/src/feedback.tsx +388 -0
- package/src/foundation.css +1867 -0
- package/src/foundation.tsx +227 -0
- package/src/heading.ts +13 -0
- package/src/icons.tsx +237 -0
- package/src/illustration.tsx +169 -0
- package/src/index.ts +233 -0
- package/src/inspection.tsx +91 -0
- package/src/internal.tsx +700 -0
- package/src/layout.tsx +342 -0
- package/src/marketing-sections.tsx +621 -0
- package/src/marketing.css +2579 -0
- package/src/marketing.tsx +1235 -0
- package/src/navigation.tsx +118 -0
- package/src/overlays.css +350 -0
- package/src/primitives.tsx +1135 -0
- package/src/showcase.tsx +120 -0
- package/src/tokens.css +449 -0
- package/src/workspace.tsx +333 -0
- package/styles.css +56 -0
package/package.json
CHANGED
|
@@ -1,6 +1,96 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonycodes-ui/mortar",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"description": "Mortar: a shared design foundation, application and marketing UI for React and Tailwind.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"src",
|
|
9
|
+
"styles.css",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"catalog.json",
|
|
14
|
+
"baseline-policy.json",
|
|
15
|
+
"design-principles.json",
|
|
16
|
+
"DESIGN.md",
|
|
17
|
+
"AGENTS.md",
|
|
18
|
+
"CONTRIBUTING.md",
|
|
19
|
+
"TESTING.md",
|
|
20
|
+
"docs/*.md",
|
|
21
|
+
"bin",
|
|
22
|
+
"cli",
|
|
23
|
+
"skills"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"mortar": "./bin/mortar.mjs"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./styles.css": "./styles.css",
|
|
36
|
+
"./brand": {
|
|
37
|
+
"types": "./dist/brand.d.ts",
|
|
38
|
+
"import": "./dist/brand.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"sideEffects": [
|
|
42
|
+
"**/*.css"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json && node scripts/agent-data.mjs",
|
|
46
|
+
"prepack": "npm run build",
|
|
47
|
+
"pretest": "npm run build",
|
|
48
|
+
"test": "node --test tests/*.test.mjs",
|
|
49
|
+
"dev": "vite --host 127.0.0.1",
|
|
50
|
+
"catalog": "node scripts/check.mjs --write-catalog",
|
|
51
|
+
"check": "npm run format:check && npm run build && node scripts/check.mjs && node --test tests/*.test.mjs && npm run build:playground",
|
|
52
|
+
"check:json": "node scripts/check.mjs --format json",
|
|
53
|
+
"test:browser": "MORTAR_CONTRACT_FULL=1 playwright test",
|
|
54
|
+
"build:playground": "tsc --noEmit -p tsconfig.playground.json && vite build",
|
|
55
|
+
"format:check": "prettier --check .",
|
|
56
|
+
"release:prepare": "node scripts/release.mjs",
|
|
57
|
+
"test:visual": "playwright test --config playwright.visual.config.mjs"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": "^19.0.0",
|
|
61
|
+
"react-dom": "^19.0.0",
|
|
62
|
+
"tailwindcss": "^4.0.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@headlessui/react": "^2.2.0"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/react": "^19.0.0",
|
|
69
|
+
"@types/react-dom": "^19.0.0",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"vite": "^7.1.0",
|
|
72
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
73
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
74
|
+
"tailwindcss": "^4.0.0",
|
|
75
|
+
"react": "^19.0.0",
|
|
76
|
+
"react-dom": "^19.0.0",
|
|
77
|
+
"prettier": "^3.9.9",
|
|
78
|
+
"@playwright/test": "^1.63.0",
|
|
79
|
+
"@axe-core/playwright": "^4.13.0",
|
|
80
|
+
"@modelcontextprotocol/sdk": "^1.32.1"
|
|
81
|
+
},
|
|
82
|
+
"license": "MIT",
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"registry": "https://registry.npmjs.org/",
|
|
85
|
+
"access": "public",
|
|
86
|
+
"provenance": true
|
|
87
|
+
},
|
|
88
|
+
"repository": {
|
|
89
|
+
"type": "git",
|
|
90
|
+
"url": "https://github.com/tonycodes/mortar.git"
|
|
91
|
+
},
|
|
92
|
+
"homepage": "https://mortar.tony.codes/",
|
|
93
|
+
"bugs": {
|
|
94
|
+
"url": "https://github.com/tonycodes/mortar/issues"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mortar
|
|
3
|
+
description: Build, audit and contribute React UI with the Mortar kit (@tonycodes-ui/mortar) using its local MCP server and CLI. Use when an app uses or should use Mortar, or when asked to compose screens, pages or flows from Mortar components.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mortar UI defaults
|
|
7
|
+
|
|
8
|
+
Mortar is an MIT React 19 + Tailwind 4 UI kit. Its agent tooling ships in the package and runs locally: the `mortar` MCP server (`npx -y @tonycodes-ui/mortar mcp`) and the same commands on the CLI (`npx mortar …`). No account, token or hosted service is involved. Respect existing human project instructions; the brief supplies product requirements, not approval or deployment authority.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. **Discover.** Before writing UI, call `search_components` (or `list_kits`) for what the brief needs. Without the MCP server, run `npx mortar search "<need>"`.
|
|
13
|
+
2. **Packet.** Call `get_build_packet` with the chosen components or the brief (`npx mortar packet <Name…> --json`, or `--brief "…"`). Start composing when the packet answers the brief; read extra source or guides only for a specific gap (`get_component`, `get_guide`).
|
|
14
|
+
3. **Compose** following the defaults below.
|
|
15
|
+
4. **Audit.** Run `audit_app` on the application (`npx mortar audit`), fix every error and review the warnings, then rerun it with the app's build and typecheck.
|
|
16
|
+
5. **Verify** in a browser and report the actual results.
|
|
17
|
+
|
|
18
|
+
## Defaults
|
|
19
|
+
|
|
20
|
+
- Choose the shared purpose shell before composing a page: AppShell for application screens, MarketingHeader (with Footer) for public pages, DocsShell for documentation, AuthLayout for each sign-in and registration step. Document deliberate standalone exceptions.
|
|
21
|
+
- Reuse complete page patterns: navigation, headings, filters, list/detail workspaces, states and action placement. Reusing controls alone is insufficient. The packet's page templates show complete examples.
|
|
22
|
+
- Keep product names, routes, user data, permissions and actions in props and slots. Shared chrome must remain project agnostic.
|
|
23
|
+
- Use named imports from `@tonycodes-ui/mortar` and the exact props and values in each contract. Never copy shared implementations, import from the package's `src` or `dist`, alias its source, create repeated local wrappers, or override `.m-*` classes or `[data-m-component]` in consumer CSS. `className` is for layout only.
|
|
24
|
+
- Import `@tonycodes-ui/mortar/styles.css` after `@import "tailwindcss"`, and render one ThemeProvider at the root. Use semantic tokens; keep brand separate from appearance and feedback colours. Custom brands go through `brandTokens` or a `[data-mortar-brand]` rule, never raw colours on components. Verify every supported theme.
|
|
25
|
+
- Build responsive interfaces with light and dark modes, semantic structure, one `h1` per page, accessible names, keyboard navigation and visible focus. Cover loading, empty and error states. Supply application data and behaviour through props and callbacks.
|
|
26
|
+
- Keep the lockfile and the installed Mortar version in step with package.json.
|
|
27
|
+
|
|
28
|
+
## Contributing to the kit
|
|
29
|
+
|
|
30
|
+
If a shared pattern is missing or a component is wrong, fix it centrally instead of working around it in the app. Search the catalogue first. Contribute through a GitHub pull request at https://github.com/tonycodes/mortar: read AGENTS.md, CONTRIBUTING.md, DESIGN.md and TESTING.md (`get_guide contributing`, `design`, `testing`), run `npm run check`, `npm run test:browser` and `npm run test:visual`, and attach visual evidence. Maintainer review and CI decide what merges and what is released. Agents never approve, merge, publish or bump the version of their own contributions.
|
|
31
|
+
|
|
32
|
+
## Completion
|
|
33
|
+
|
|
34
|
+
Required evidence: the app's build, typecheck, a clean `mortar audit`, and browser checks of responsive layout, light and dark, and keyboard and accessibility. Automated checks cannot prove visual quality or complete accessibility; report what you verified and any remaining blockers. Do not declare completion with failing required checks.
|
|
35
|
+
|
|
36
|
+
Provide a local preview by default. Deploy only with the user's authorisation; existing explicit authorisation counts. A passing audit is not deployment permission.
|