medesign 0.0.0-stage → 1.4.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/LICENSE +21 -0
- package/README.md +223 -3
- package/bin/medesign.js +691 -0
- package/integrations/claude-code/SKILL.md +20 -0
- package/integrations/cursor/medesign.mdc +26 -0
- package/medesign.config.js +46 -0
- package/package.json +69 -6
- package/presets/apple/design-tokens.css +115 -0
- package/presets/apple/guidelines.md +19 -0
- package/presets/apple/preset.json +53 -0
- package/presets/metha/design-tokens.css +127 -0
- package/presets/metha/guidelines.md +23 -0
- package/presets/metha/preset.json +53 -0
- package/presets/schema.json +102 -0
- package/presets/tesla/design-tokens.css +112 -0
- package/presets/tesla/guidelines.md +17 -0
- package/presets/tesla/preset.json +53 -0
- package/references/ai-tells.md +127 -0
- package/references/appendices.md +220 -0
- package/references/architecture.md +39 -0
- package/references/argon-design-archetypes.md +317 -0
- package/references/banner-sizes-and-styles.md +118 -0
- package/references/block-library.md +61 -0
- package/references/brand-design-tokens.md +42 -0
- package/references/catalog.json +1023 -0
- package/references/cip-deliverable-guide.md +95 -0
- package/references/cip-design.md +121 -0
- package/references/cip-prompt-engineering.md +84 -0
- package/references/cip-style-guide.md +68 -0
- package/references/cli-architecture.md +146 -0
- package/references/components.md +240 -0
- package/references/dark-mode.md +23 -0
- package/references/design-core.md +42 -0
- package/references/design-md-protocol.md +75 -0
- package/references/design-routing.md +207 -0
- package/references/eng-imagery-content.md +71 -0
- package/references/eng-layout.md +28 -0
- package/references/eng-other.md +26 -0
- package/references/eng-states-theme.md +22 -0
- package/references/eng-type-color.md +44 -0
- package/references/icon-design.md +122 -0
- package/references/image-mockup-direction.md +53 -0
- package/references/image-to-code.md +46 -0
- package/references/impeccable-polish.md +85 -0
- package/references/intake.md +90 -0
- package/references/logo-color-psychology.md +101 -0
- package/references/logo-design.md +110 -0
- package/references/logo-prompt-engineering.md +158 -0
- package/references/logo-style-guide.md +109 -0
- package/references/mesurv-dna.md +104 -0
- package/references/micro-interactions-and-auto-animate.md +71 -0
- package/references/modern-craft-invariants.md +332 -0
- package/references/motion-tokens.md +99 -0
- package/references/preflight.md +110 -0
- package/references/proactive-motion.md +167 -0
- package/references/quality-gate.md +147 -0
- package/references/redesign-audit.md +38 -0
- package/references/redesign.md +52 -0
- package/references/slides-copywriting-formulas.md +84 -0
- package/references/slides-create.md +4 -0
- package/references/slides-html-template.md +295 -0
- package/references/slides-layout-patterns.md +137 -0
- package/references/slides-strategies.md +94 -0
- package/references/slides.md +42 -0
- package/references/social-photos-design.md +329 -0
- package/references/spatial-canvas-engine.md +160 -0
- package/references/stitch-system.md +184 -0
- package/references/style-extraction.md +17 -0
- package/references/styles/brutalist.md +88 -0
- package/references/styles/minimalist.md +81 -0
- package/references/styles/soft.md +94 -0
- package/references/threeui-spatial-engine.md +224 -0
- package/references/ui-styling-shadcn.md +336 -0
- package/references/ui-ux-vocabulary-vault.json +1223 -0
- package/references/ui-ux-vocabulary-vault.md +438 -0
- package/references/vocab-protocol.md +52 -0
- package/references/vocabulary.md +78 -0
- package/scripts/export-tokens.js +403 -0
- package/tests/browser-audit.js +442 -0
- package/tests/linter.js +412 -0
- package/tests/schemas/sarif-2.1.0.schema.json +2915 -0
- package/tests/visual-testbed.html +681 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: medesign
|
|
3
|
+
description: Curated UI/UX & High-Signal Engineering Design Engine with 5-Engine Architecture and 4-Tier Quality Governance.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ME-DESIGN for Claude Code
|
|
7
|
+
|
|
8
|
+
When designing, auditing, or writing frontend code:
|
|
9
|
+
|
|
10
|
+
1. **Routing:** Follow the 38 Archetypes (30 Visual + 8 Engineering ISA-101 / GIS).
|
|
11
|
+
2. **Hard Invariants:**
|
|
12
|
+
- WCAG AA/AAA contrast on both Light and Dark themes.
|
|
13
|
+
- Visible `:focus-visible` ring on all interactive elements.
|
|
14
|
+
- Touch target $\ge 44\text{px}$ (HIG compliant).
|
|
15
|
+
- Reduced-motion gate: respect `@media (prefers-reduced-motion: reduce)`.
|
|
16
|
+
- Zero em-dash (`—`) or en-dash (`–`) in visible UI copy.
|
|
17
|
+
3. **5-Axis Decoupling:**
|
|
18
|
+
- Operational Archetype × Visual Language × Spatial Model × Motion Profile × Governance Tier.
|
|
19
|
+
4. **Verification:**
|
|
20
|
+
- Verify code against `tests/linter.js` before completing tasks.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce ME-DESIGN vNext Optical Craft, 5-Engine Architecture, and 4-Tier Quality Governance.
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ME-DESIGN vNext Quality Guidelines (Cursor Rules)
|
|
7
|
+
|
|
8
|
+
When generating or refactoring UI components, web pages, or engineering dashboards:
|
|
9
|
+
|
|
10
|
+
1. **Optical Geometry:**
|
|
11
|
+
- Use Safe Concentric Radius formula: `border-radius: max(0px, calc(var(--r-outer) - var(--border-w, 0px) - var(--pad)))`.
|
|
12
|
+
- Area-Proportional scaling on press: preserve 44px hit-target container, transform only inner `.visual-surface`.
|
|
13
|
+
2. **Perceptual Color Science:**
|
|
14
|
+
- Use `in oklch shorter hue` for vibrant gradient paths, and `in oklab` for neutral/white/black blends.
|
|
15
|
+
- Use `color-mix(in oklch, ...)` for token derivations instead of raw static hex codes.
|
|
16
|
+
- Respect Dark Mode functional tokens (`--surface-canvas`, `--surface-raised`, `--surface-inset`, `--border-subtle`, `--border-focus`).
|
|
17
|
+
3. **Motion Profiles:**
|
|
18
|
+
- Choose from 4 profiles: `precision` (0-100ms no overshoot), `soft-settle` (240-280ms), `spring-settle` (linear/spring), `instant` (0ms).
|
|
19
|
+
- Mandatory `@media (prefers-reduced-motion: reduce)` bypass.
|
|
20
|
+
4. **Typography & Script:**
|
|
21
|
+
- Enforce dual-context line-height: UI Chrome `1.25` (EN) / `1.38` (TH), Prose `1.60` (EN) / `1.70-1.75` (TH).
|
|
22
|
+
- Provide 2-4px optical headroom for Thai tone marks and top vowels.
|
|
23
|
+
5. **Anti-AI Tells:**
|
|
24
|
+
- Zero em-dash (`—`) or en-dash (`–`) in visible UI text.
|
|
25
|
+
- Zero decisionless 3-card uniformity.
|
|
26
|
+
- All interactive controls must satisfy `:focus-visible` outline.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ME-DESIGN Configuration File
|
|
3
|
+
* Customize rule severities, score weights, and browser verification thresholds.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
// Quality Score Component Weights (sum = 1.0)
|
|
8
|
+
weights: {
|
|
9
|
+
H: 0.30, // Visual Hierarchy & Dominance
|
|
10
|
+
I: 0.25, // Information Density & Accessibility
|
|
11
|
+
G: 0.20, // Optical Geometry & Spatial Rhythm
|
|
12
|
+
R: 0.15, // Responsive Fluidity & Device Stability
|
|
13
|
+
V: 0.10 // Visual Polish & Perceptual Color
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// Minimum passing Q-Score threshold (0-100)
|
|
17
|
+
minQScore: 75.0,
|
|
18
|
+
|
|
19
|
+
// Rule severity overrides ('error', 'warning', 'info', 'off')
|
|
20
|
+
// Note: MD001-MD005 are Hard Invariants and are required for production gating.
|
|
21
|
+
rules: {
|
|
22
|
+
MD001: 'error', // Focus Visibility (:focus-visible)
|
|
23
|
+
MD002: 'error', // Reduced Motion Compliance (@media prefers-reduced-motion)
|
|
24
|
+
MD003: 'error', // Isolated Hit-Target Area (No raw scale-95 crushing)
|
|
25
|
+
MD004: 'error', // Interactive State Contract (No dead buttons)
|
|
26
|
+
MD005: 'error', // High Contrast Focus Ring (forced-colors: active)
|
|
27
|
+
MD101: 'warning', // Dense Grid Tab Sequence
|
|
28
|
+
MD102: 'warning', // Perceptual Color Interpolation (oklch/oklab)
|
|
29
|
+
MD103: 'info', // Concentric Radius Math
|
|
30
|
+
MD104: 'warning', // Mobile Viewport Dynamic Units (100dvh)
|
|
31
|
+
MD105: 'warning', // Visual/DOM Sequence Scrambling
|
|
32
|
+
MD201: 'info' // Editorial Punctuation (hyphen vs em-dash)
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// Headless Browser Verification Settings
|
|
36
|
+
browser: {
|
|
37
|
+
minTouchTargetPx: 44,
|
|
38
|
+
minContrastRatio: 4.5,
|
|
39
|
+
viewports: [
|
|
40
|
+
{ name: 'Mobile', width: 390, height: 844, isMobile: true },
|
|
41
|
+
{ name: 'Tablet', width: 820, height: 1180, isMobile: true },
|
|
42
|
+
{ name: 'Desktop', width: 1440, height: 900, isMobile: false }
|
|
43
|
+
],
|
|
44
|
+
colorModes: ['dark', 'light']
|
|
45
|
+
}
|
|
46
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "medesign",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "medesign",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Autonomous Design Engineering Toolkit & Automated Linter for AI Coding Assistants",
|
|
5
|
+
"main": "bin/medesign.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"medesign": "bin/medesign.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"presets",
|
|
12
|
+
"references",
|
|
13
|
+
"integrations",
|
|
14
|
+
"scripts/export-tokens.js",
|
|
15
|
+
"tests/linter.js",
|
|
16
|
+
"tests/browser-audit.js",
|
|
17
|
+
"tests/schemas",
|
|
18
|
+
"tests/visual-testbed.html",
|
|
19
|
+
"medesign.config.js"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node tests/runner.js && node tests/validate-sarif.js && node tests/test-tokens.js && node tests/test-cli.js",
|
|
23
|
+
"test:unit": "node tests/runner.js",
|
|
24
|
+
"test:sarif": "node tests/validate-sarif.js",
|
|
25
|
+
"test:tokens": "node tests/test-tokens.js",
|
|
26
|
+
"test:cli": "node tests/test-cli.js",
|
|
27
|
+
"test:browser": "node tests/runner.js --browser",
|
|
28
|
+
"search": "node bin/medesign.js search",
|
|
29
|
+
"polish": "node bin/medesign.js polish",
|
|
30
|
+
"bolder": "node bin/medesign.js bolder",
|
|
31
|
+
"quiet": "node bin/medesign.js quiet",
|
|
32
|
+
"lint": "node bin/medesign.js lint",
|
|
33
|
+
"audit": "node bin/medesign.js audit",
|
|
34
|
+
"tokens": "node bin/medesign.js tokens",
|
|
35
|
+
"doctor": "node bin/medesign.js doctor",
|
|
36
|
+
"prepublishOnly": "npm test"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/methastrategy/medesign.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/methastrategy/medesign#readme",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/methastrategy/medesign/issues"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"design-tokens",
|
|
51
|
+
"linter",
|
|
52
|
+
"accessibility",
|
|
53
|
+
"design-systems",
|
|
54
|
+
"oklch",
|
|
55
|
+
"tailwind",
|
|
56
|
+
"dtcg",
|
|
57
|
+
"sarif",
|
|
58
|
+
"ai-coding-assistant",
|
|
59
|
+
"antigravity",
|
|
60
|
+
"claude-code"
|
|
61
|
+
],
|
|
62
|
+
"author": "Metha Tripraphankit (Survey Engineering & Geoinformatics, Kasetsart University)",
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=18.0.0"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {},
|
|
68
|
+
"devDependencies": {}
|
|
69
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ME-DESIGN Preset: Apple Human Interface & Product Showcase
|
|
3
|
+
* Version: 1.0.0
|
|
4
|
+
* Architecture: 3-Layer Design Tokens (Global -> Semantic -> Component)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
/* 01. Typography */
|
|
9
|
+
--font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
|
|
10
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
|
|
11
|
+
--font-mono: "SF Mono", "Menlo", "Fira Code", monospace;
|
|
12
|
+
--tracking-heading: -0.022em;
|
|
13
|
+
--leading-ui: 1.28;
|
|
14
|
+
--leading-prose: 1.65;
|
|
15
|
+
--thai-headroom: 3px;
|
|
16
|
+
|
|
17
|
+
/* 02. Color Tokens (OKLCH / P3 Ready) */
|
|
18
|
+
--color-canvas: #000000;
|
|
19
|
+
--color-surface-raised: #1c1c1e;
|
|
20
|
+
--color-surface-inset: #161618;
|
|
21
|
+
--color-surface-glass: rgba(28, 28, 30, 0.72);
|
|
22
|
+
--color-text-primary: #f5f5f7;
|
|
23
|
+
--color-text-secondary: #86868b;
|
|
24
|
+
--color-text-tertiary: #6e6e73;
|
|
25
|
+
--color-border-subtle: rgba(255, 255, 255, 0.12);
|
|
26
|
+
--color-border-strong: rgba(255, 255, 255, 0.24);
|
|
27
|
+
--color-border-focus: oklch(0.62 0.22 255);
|
|
28
|
+
|
|
29
|
+
--color-accent: oklch(0.58 0.22 255);
|
|
30
|
+
--color-accent-hover: oklch(0.64 0.22 255);
|
|
31
|
+
--color-accent-fg: #ffffff;
|
|
32
|
+
|
|
33
|
+
--color-status-info: oklch(0.65 0.18 245);
|
|
34
|
+
--color-status-success: oklch(0.70 0.19 145);
|
|
35
|
+
--color-status-warning: oklch(0.78 0.18 70);
|
|
36
|
+
--color-status-critical: oklch(0.62 0.22 25);
|
|
37
|
+
|
|
38
|
+
/* 03. Optical Geometry */
|
|
39
|
+
--radius-outer: 24px;
|
|
40
|
+
--radius-inner: calc(var(--radius-outer) - 8px);
|
|
41
|
+
--radius-pill: 9999px;
|
|
42
|
+
--hit-target-min: 44px;
|
|
43
|
+
|
|
44
|
+
/* 04. Motion Tokens */
|
|
45
|
+
--duration-entry: 240ms;
|
|
46
|
+
--duration-exit: 160ms;
|
|
47
|
+
--ease-entry: cubic-bezier(0.16, 1, 0.3, 1);
|
|
48
|
+
--ease-exit: cubic-bezier(0.4, 0, 0.7, 0.2);
|
|
49
|
+
|
|
50
|
+
/* 05. Blur & Vibrancy */
|
|
51
|
+
--backdrop-blur: blur(20px) saturate(180%);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Light Mode Overrides */
|
|
55
|
+
@media (prefers-color-scheme: light) {
|
|
56
|
+
:root {
|
|
57
|
+
--color-canvas: #ffffff;
|
|
58
|
+
--color-surface-raised: #f5f5f7;
|
|
59
|
+
--color-surface-inset: #e8e8ed;
|
|
60
|
+
--color-surface-glass: rgba(255, 255, 255, 0.72);
|
|
61
|
+
--color-text-primary: #1d1d1f;
|
|
62
|
+
--color-text-secondary: #6e6e73;
|
|
63
|
+
--color-text-tertiary: #86868b;
|
|
64
|
+
--color-border-subtle: rgba(0, 0, 0, 0.08);
|
|
65
|
+
--color-border-strong: rgba(0, 0, 0, 0.18);
|
|
66
|
+
--color-accent: oklch(0.55 0.22 255);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Core Component Utilities */
|
|
71
|
+
.apple-card {
|
|
72
|
+
background: var(--color-surface-raised);
|
|
73
|
+
border: 1px solid var(--color-border-subtle);
|
|
74
|
+
border-radius: var(--radius-outer);
|
|
75
|
+
padding: 24px;
|
|
76
|
+
backdrop-filter: var(--backdrop-blur);
|
|
77
|
+
transition: transform var(--duration-entry) var(--ease-entry),
|
|
78
|
+
border-color var(--duration-entry) var(--ease-entry);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.apple-btn {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
min-height: var(--hit-target-min);
|
|
86
|
+
padding: 0 20px;
|
|
87
|
+
border-radius: var(--radius-pill);
|
|
88
|
+
font-family: var(--font-sans);
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
font-weight: 500;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
background: var(--color-accent);
|
|
93
|
+
color: var(--color-accent-fg);
|
|
94
|
+
border: none;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
outline-offset: 3px;
|
|
97
|
+
transition: transform var(--duration-entry) var(--ease-entry),
|
|
98
|
+
background var(--duration-entry) var(--ease-entry);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.apple-btn:focus-visible {
|
|
102
|
+
outline: 2px solid var(--color-border-focus);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.apple-btn:active .visual-surface {
|
|
106
|
+
transform: scale(0.97);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (prefers-reduced-motion: reduce) {
|
|
110
|
+
*, *::before, *::after {
|
|
111
|
+
animation-duration: 0.01ms !important;
|
|
112
|
+
animation-iteration-count: 1 !important;
|
|
113
|
+
transition-duration: 0.01ms !important;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Apple Preset Guidelines (`/medesign apple`)
|
|
2
|
+
|
|
3
|
+
## Archetype Mapping
|
|
4
|
+
- **Primary Archetype:** Archetype 02 (High-End Hardware Showcase)
|
|
5
|
+
- **Secondary Archetype:** Archetype 01 (Minimalist Editorial)
|
|
6
|
+
|
|
7
|
+
## Invariants & Design Principles
|
|
8
|
+
1. **Concentric Geometry:**
|
|
9
|
+
Outer card radius `24px`, inner nested radius calculated via `r_outer - padding - border = 24 - 8 - 1 = 15px`.
|
|
10
|
+
2. **Pill Action Surfaces:**
|
|
11
|
+
Action buttons use `border-radius: 9999px` with minimum 44px hit-target padding.
|
|
12
|
+
3. **Motion Profile:**
|
|
13
|
+
`soft-settle` (240ms entry cubic-bezier(0.16, 1, 0.3, 1), 160ms exit). Never use linear or bouncy springs.
|
|
14
|
+
4. **Typography Hierarchy:**
|
|
15
|
+
- Display/Headlines: SF Pro Display / Inter with `-0.022em` letter-spacing.
|
|
16
|
+
- Body/UI Chrome: SF Pro Text / Inter with `1.28` line-height for buttons, `1.65` for editorial copy.
|
|
17
|
+
- Diacritic headroom: minimum 3px padding-top for Thai vowel marks (`่ ้ ๊ ๋ ์`).
|
|
18
|
+
5. **Color & Vibrancy:**
|
|
19
|
+
OLED Pure Black `#000000` canvas in dark mode, frosted blur `backdrop-filter: blur(20px) saturate(180%)`, Cupertino Blue accent `oklch(0.58 0.22 255)`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../schema.json",
|
|
3
|
+
"id": "apple",
|
|
4
|
+
"name": "Apple Human Interface & Product Showcase",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"archetype": "Archetype 02: High-End Hardware Showcase",
|
|
7
|
+
"description": "Cupertino optical precision: generous negative space, concentric squircles, frosted vibrancy glass, and restrained typographic hierarchy.",
|
|
8
|
+
"typography": {
|
|
9
|
+
"display": "-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif",
|
|
10
|
+
"sans": "-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif",
|
|
11
|
+
"mono": "'SF Mono', 'Menlo', 'Fira Code', monospace",
|
|
12
|
+
"headingTracking": "-0.022em",
|
|
13
|
+
"uiLineHeight": "1.28",
|
|
14
|
+
"proseLineHeight": "1.65",
|
|
15
|
+
"thaiHeadroom": "3px"
|
|
16
|
+
},
|
|
17
|
+
"color": {
|
|
18
|
+
"canvas": "#000000",
|
|
19
|
+
"surfaceRaised": "#1c1c1e",
|
|
20
|
+
"surfaceInset": "#161618",
|
|
21
|
+
"borderSubtle": "rgba(255, 255, 255, 0.12)",
|
|
22
|
+
"borderFocus": "oklch(0.62 0.22 255)",
|
|
23
|
+
"accent": "oklch(0.58 0.22 255)",
|
|
24
|
+
"accentForeground": "#ffffff",
|
|
25
|
+
"status": {
|
|
26
|
+
"info": "oklch(0.65 0.18 245)",
|
|
27
|
+
"success": "oklch(0.70 0.19 145)",
|
|
28
|
+
"warning": "oklch(0.78 0.18 70)",
|
|
29
|
+
"critical": "oklch(0.62 0.22 25)"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"geometry": {
|
|
33
|
+
"radiusBase": "16px",
|
|
34
|
+
"radiusOuter": "24px",
|
|
35
|
+
"concentricFormula": "max(0px, 24px - 1px - 8px) = 15px",
|
|
36
|
+
"scalingFormula": "clamp(0.96, 1 - 2.5/max(W, H), 0.995)",
|
|
37
|
+
"hitTargetMinTouch": "44px"
|
|
38
|
+
},
|
|
39
|
+
"motion": {
|
|
40
|
+
"profile": "soft-settle",
|
|
41
|
+
"durationEntry": "240ms",
|
|
42
|
+
"durationExit": "160ms",
|
|
43
|
+
"easingEntry": "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
44
|
+
"easingExit": "cubic-bezier(0.4, 0, 0.7, 0.2)"
|
|
45
|
+
},
|
|
46
|
+
"rules": [
|
|
47
|
+
"MD001_FOCUS_RING",
|
|
48
|
+
"MD002_REDUCED_MOTION",
|
|
49
|
+
"MD003_HIT_TARGET_ISOLATION",
|
|
50
|
+
"MD004_DEAD_BUTTON_CONTRACT",
|
|
51
|
+
"MD101_BENTO_ROW_FLOW"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ME-DESIGN Preset: Metha Engineering & Geoinformatics Cockpit
|
|
3
|
+
* Author: เมธา ตรีประพันธ์กิจ (Survey Engineering, Kasetsart University)
|
|
4
|
+
* Version: 1.0.0
|
|
5
|
+
* Architecture: 3-Layer Design Tokens (Global -> Semantic -> Component)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
/* 01. Typography */
|
|
10
|
+
--font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
|
|
11
|
+
--font-sans: "Inter", "Sukhumvit Set", sans-serif;
|
|
12
|
+
--font-mono: "IBM Plex Mono", "Fira Code", monospace;
|
|
13
|
+
--tracking-heading: -0.020em;
|
|
14
|
+
--tracking-coord: 0.04em;
|
|
15
|
+
--leading-ui: 1.25;
|
|
16
|
+
--leading-prose: 1.60;
|
|
17
|
+
--thai-headroom: 4px;
|
|
18
|
+
|
|
19
|
+
/* 02. Color Tokens (Deep Slate / Geodetic Field Rig) */
|
|
20
|
+
--color-canvas: #0c0e14;
|
|
21
|
+
--color-surface-raised: #141721;
|
|
22
|
+
--color-surface-inset: #090a0f;
|
|
23
|
+
--color-surface-dock: rgba(20, 23, 33, 0.88);
|
|
24
|
+
--color-text-primary: #e6edf3;
|
|
25
|
+
--color-text-secondary: #8b949e;
|
|
26
|
+
--color-text-tertiary: #545d68;
|
|
27
|
+
--color-border-subtle: rgba(255, 255, 255, 0.09);
|
|
28
|
+
--color-border-strong: rgba(255, 255, 255, 0.18);
|
|
29
|
+
--color-border-focus: oklch(0.68 0.20 250);
|
|
30
|
+
|
|
31
|
+
/* Brand Accents (Survey Electric Indigo & Geodetic Green) */
|
|
32
|
+
--color-accent: oklch(0.65 0.20 250);
|
|
33
|
+
--color-accent-hover: oklch(0.70 0.20 250);
|
|
34
|
+
--color-accent-fg: #ffffff;
|
|
35
|
+
|
|
36
|
+
--color-status-info: oklch(0.68 0.20 250);
|
|
37
|
+
--color-status-success: oklch(0.72 0.18 145);
|
|
38
|
+
--color-status-warning: oklch(0.78 0.16 75);
|
|
39
|
+
--color-status-critical: oklch(0.62 0.22 25);
|
|
40
|
+
|
|
41
|
+
/* 03. Optical Geometry (Engineering Grid) */
|
|
42
|
+
--radius-outer: 8px;
|
|
43
|
+
--radius-inner: 4px;
|
|
44
|
+
--hit-target-min: 44px;
|
|
45
|
+
|
|
46
|
+
/* 04. Motion Tokens (Sub-second Field Precision) */
|
|
47
|
+
--duration-entry: 140ms;
|
|
48
|
+
--duration-exit: 90ms;
|
|
49
|
+
--ease-entry: cubic-bezier(0.16, 1, 0.3, 1);
|
|
50
|
+
--ease-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
51
|
+
|
|
52
|
+
/* 05. Blur & Glass */
|
|
53
|
+
--backdrop-blur: blur(12px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Light Mode Overrides */
|
|
57
|
+
@media (prefers-color-scheme: light) {
|
|
58
|
+
:root {
|
|
59
|
+
--color-canvas: #f8f9fa;
|
|
60
|
+
--color-surface-raised: #ffffff;
|
|
61
|
+
--color-surface-inset: #f1f3f5;
|
|
62
|
+
--color-surface-dock: rgba(255, 255, 255, 0.90);
|
|
63
|
+
--color-text-primary: #1a1e24;
|
|
64
|
+
--color-text-secondary: #57606a;
|
|
65
|
+
--color-text-tertiary: #8c959f;
|
|
66
|
+
--color-border-subtle: rgba(0, 0, 0, 0.10);
|
|
67
|
+
--color-border-strong: rgba(0, 0, 0, 0.22);
|
|
68
|
+
--color-accent: oklch(0.55 0.20 250);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Core Component Utilities */
|
|
73
|
+
.metha-workbench-card {
|
|
74
|
+
background: var(--color-surface-raised);
|
|
75
|
+
border: 1px solid var(--color-border-subtle);
|
|
76
|
+
border-radius: var(--radius-outer);
|
|
77
|
+
padding: 16px;
|
|
78
|
+
transition: border-color var(--duration-entry) var(--ease-entry);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.metha-telemetry-dock {
|
|
82
|
+
background: var(--color-surface-dock);
|
|
83
|
+
backdrop-filter: var(--backdrop-blur);
|
|
84
|
+
border: 1px solid var(--color-border-strong);
|
|
85
|
+
border-radius: var(--radius-outer);
|
|
86
|
+
padding: 12px 16px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.metha-btn {
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
min-height: var(--hit-target-min);
|
|
94
|
+
padding: 0 16px;
|
|
95
|
+
border-radius: var(--radius-inner);
|
|
96
|
+
font-family: var(--font-sans);
|
|
97
|
+
font-size: 13px;
|
|
98
|
+
font-weight: 500;
|
|
99
|
+
background: var(--color-accent);
|
|
100
|
+
color: var(--color-accent-fg);
|
|
101
|
+
border: 1px solid transparent;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
outline-offset: 2px;
|
|
104
|
+
transition: background var(--duration-entry) var(--ease-entry);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.metha-btn:focus-visible {
|
|
108
|
+
outline: 2px solid var(--color-border-focus);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.metha-btn:active .visual-surface {
|
|
112
|
+
transform: scale(0.98);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.geodetic-coord {
|
|
116
|
+
font-family: var(--font-mono);
|
|
117
|
+
font-variant-numeric: tabular-nums;
|
|
118
|
+
letter-spacing: var(--tracking-coord);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (prefers-reduced-motion: reduce) {
|
|
122
|
+
*, *::before, *::after {
|
|
123
|
+
animation-duration: 0.01ms !important;
|
|
124
|
+
animation-iteration-count: 1 !important;
|
|
125
|
+
transition-duration: 0.01ms !important;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Metha Preset Guidelines (`/medesign metha`)
|
|
2
|
+
|
|
3
|
+
## Designer & Domain Context
|
|
4
|
+
- **Creator:** เมธา ตรีประพันธ์กิจ (Survey Engineering & Geoinformatics, Kasetsart University)
|
|
5
|
+
- **Primary Archetype:** Archetype 32 (GIS Situation Awareness & Telemetry)
|
|
6
|
+
- **Secondary Archetype:** Archetype 38 (Cadastral Survey & QA/QC Workbench)
|
|
7
|
+
|
|
8
|
+
## Invariants & Design Principles
|
|
9
|
+
1. **Engineering Precision & 8pt Spatial Rhythm:**
|
|
10
|
+
Outer card radius `8px`, inner component radius `4px`. All geometry, paddings, and data cell heights align to an 8pt baseline grid (16px, 24px, 32px, 48px).
|
|
11
|
+
2. **Geodetic Coordinates & Tabular Typography:**
|
|
12
|
+
- Coordinate, Distance, Azimuth, and Traverse Closure readouts MUST use monospace (`IBM Plex Mono` / `Fira Code`) with `tabular-nums` and `letter-spacing: 0.04em`.
|
|
13
|
+
- UI chrome uses `Inter` or `Sukhumvit Set` with `1.25` line-height.
|
|
14
|
+
- Thai diacritic headroom: minimum `4px` top padding to prevent tone mark clipping (`่ ้ ๊ ๋ ์`) on compact table headers.
|
|
15
|
+
3. **Cockpit Color Palette & ISA-101 Situational Awareness:**
|
|
16
|
+
- Dark Slate `#0c0e14` background prevents eye fatigue during 8+ hour surveying shifts.
|
|
17
|
+
- Survey Electric Cyan `oklch(0.65 0.20 250)` for selected cadastral parcel or primary action.
|
|
18
|
+
- Survey Precision Green `oklch(0.72 0.18 145)` strictly reserved for verified closures / fixed GPS solutions ($1\sigma < 5\text{mm}$).
|
|
19
|
+
- Warning Amber `oklch(0.78 0.16 75)` for float solutions or high HDOP.
|
|
20
|
+
4. **Motion Profile:**
|
|
21
|
+
`precision` motion profile (140ms entry, 90ms exit). Map selection and point inspection must respond instantly without distracting physics bounces.
|
|
22
|
+
5. **Layout Architecture:**
|
|
23
|
+
100dvh viewport canvas layout with floating telemetry docks, collapsible side inspectors, and non-scrambled Bento row grids (`grid-auto-flow: row`).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../schema.json",
|
|
3
|
+
"id": "metha",
|
|
4
|
+
"name": "Metha Engineering & Geoinformatics Cockpit",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"archetype": "Archetype 32: GIS Situation Awareness & Archetype 38: Cadastral Survey & QA/QC Workbench",
|
|
7
|
+
"description": "Metha's personal engineering design signature: high-density cadastral tables, 8pt optical grid, Inter + IBM Plex Mono tabular coordinates, charcoal/deep slate dark canvas, and survey electric cyan/precision green accents.",
|
|
8
|
+
"typography": {
|
|
9
|
+
"display": "'Inter', 'SF Pro Display', sans-serif",
|
|
10
|
+
"sans": "'Inter', 'Sukhumvit Set', sans-serif",
|
|
11
|
+
"mono": "'IBM Plex Mono', 'Fira Code', monospace",
|
|
12
|
+
"headingTracking": "-0.020em",
|
|
13
|
+
"uiLineHeight": "1.25",
|
|
14
|
+
"proseLineHeight": "1.60",
|
|
15
|
+
"thaiHeadroom": "4px"
|
|
16
|
+
},
|
|
17
|
+
"color": {
|
|
18
|
+
"canvas": "#0c0e14",
|
|
19
|
+
"surfaceRaised": "#141721",
|
|
20
|
+
"surfaceInset": "#090a0f",
|
|
21
|
+
"borderSubtle": "rgba(255, 255, 255, 0.09)",
|
|
22
|
+
"borderFocus": "oklch(0.68 0.20 250)",
|
|
23
|
+
"accent": "oklch(0.65 0.20 250)",
|
|
24
|
+
"accentForeground": "#ffffff",
|
|
25
|
+
"status": {
|
|
26
|
+
"info": "oklch(0.68 0.20 250)",
|
|
27
|
+
"success": "oklch(0.72 0.18 145)",
|
|
28
|
+
"warning": "oklch(0.78 0.16 75)",
|
|
29
|
+
"critical": "oklch(0.62 0.22 25)"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"geometry": {
|
|
33
|
+
"radiusBase": "6px",
|
|
34
|
+
"radiusOuter": "8px",
|
|
35
|
+
"concentricFormula": "max(0px, 8px - 1px - 4px) = 3px",
|
|
36
|
+
"scalingFormula": "clamp(0.97, 1 - 2.2/max(W, H), 0.995)",
|
|
37
|
+
"hitTargetMinTouch": "44px"
|
|
38
|
+
},
|
|
39
|
+
"motion": {
|
|
40
|
+
"profile": "precision",
|
|
41
|
+
"durationEntry": "140ms",
|
|
42
|
+
"durationExit": "90ms",
|
|
43
|
+
"easingEntry": "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
44
|
+
"easingExit": "cubic-bezier(0.4, 0, 1, 1)"
|
|
45
|
+
},
|
|
46
|
+
"rules": [
|
|
47
|
+
"MD001_FOCUS_RING",
|
|
48
|
+
"MD002_REDUCED_MOTION",
|
|
49
|
+
"MD003_HIT_TARGET_ISOLATION",
|
|
50
|
+
"MD004_DEAD_BUTTON_CONTRACT",
|
|
51
|
+
"MD101_BENTO_ROW_FLOW"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "MEDesignPreset",
|
|
4
|
+
"description": "Schema for ME-DESIGN reusable style and engineering presets",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"id",
|
|
8
|
+
"name",
|
|
9
|
+
"version",
|
|
10
|
+
"archetype",
|
|
11
|
+
"description",
|
|
12
|
+
"typography",
|
|
13
|
+
"color",
|
|
14
|
+
"geometry",
|
|
15
|
+
"motion",
|
|
16
|
+
"rules"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[a-z0-9_-]+$"
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"archetype": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Reference to one of the 38 ME-DESIGN Archetypes (e.g. Archetype 02, Archetype 32)"
|
|
32
|
+
},
|
|
33
|
+
"description": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"typography": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["display", "sans", "mono", "headingTracking", "uiLineHeight", "proseLineHeight"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"display": { "type": "string" },
|
|
41
|
+
"sans": { "type": "string" },
|
|
42
|
+
"mono": { "type": "string" },
|
|
43
|
+
"headingTracking": { "type": "string" },
|
|
44
|
+
"uiLineHeight": { "type": "string" },
|
|
45
|
+
"proseLineHeight": { "type": "string" },
|
|
46
|
+
"thaiHeadroom": { "type": "string" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"color": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["canvas", "surfaceRaised", "surfaceInset", "borderSubtle", "borderFocus", "accent", "accentForeground", "status"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"canvas": { "type": "string" },
|
|
54
|
+
"surfaceRaised": { "type": "string" },
|
|
55
|
+
"surfaceInset": { "type": "string" },
|
|
56
|
+
"borderSubtle": { "type": "string" },
|
|
57
|
+
"borderFocus": { "type": "string" },
|
|
58
|
+
"accent": { "type": "string" },
|
|
59
|
+
"accentForeground": { "type": "string" },
|
|
60
|
+
"status": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"required": ["info", "success", "warning", "critical"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"info": { "type": "string" },
|
|
65
|
+
"success": { "type": "string" },
|
|
66
|
+
"warning": { "type": "string" },
|
|
67
|
+
"critical": { "type": "string" }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"geometry": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"required": ["radiusBase", "radiusOuter", "concentricFormula", "scalingFormula", "hitTargetMinTouch"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"radiusBase": { "type": "string" },
|
|
77
|
+
"radiusOuter": { "type": "string" },
|
|
78
|
+
"concentricFormula": { "type": "string" },
|
|
79
|
+
"scalingFormula": { "type": "string" },
|
|
80
|
+
"hitTargetMinTouch": { "type": "string" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"motion": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": ["profile", "durationEntry", "durationExit", "easingEntry", "easingExit"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"profile": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": ["precision", "soft-settle", "spring-settle", "instant"]
|
|
90
|
+
},
|
|
91
|
+
"durationEntry": { "type": "string" },
|
|
92
|
+
"durationExit": { "type": "string" },
|
|
93
|
+
"easingEntry": { "type": "string" },
|
|
94
|
+
"easingExit": { "type": "string" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"rules": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "type": "string" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|