@mtdt/observeops-ds-spec 0.1.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 +102 -0
- package/README.md +73 -0
- package/components/index.json +1270 -0
- package/components/recipes/README.md +41 -0
- package/components/recipes/recipes.json +922 -0
- package/components/registry/README.md +44 -0
- package/components/registry/_schema.json +47 -0
- package/components/registry/button.json +368 -0
- package/components/registry/checkbox.json +177 -0
- package/components/registry/data-viz-tooltips.json +409 -0
- package/components/registry/date-time-pickers.json +296 -0
- package/components/registry/drawer.json +222 -0
- package/components/registry/dropdown-picker.json +388 -0
- package/components/registry/filters.json +155 -0
- package/components/registry/form-item.json +281 -0
- package/components/registry/input.json +277 -0
- package/components/registry/link.json +186 -0
- package/components/registry/loose-tags.json +196 -0
- package/components/registry/menu.json +145 -0
- package/components/registry/modal.json +265 -0
- package/components/registry/navigation.json +425 -0
- package/components/registry/popover.json +216 -0
- package/components/registry/radio.json +238 -0
- package/components/registry/scheduler.json +188 -0
- package/components/registry/select.json +247 -0
- package/components/registry/severity.json +179 -0
- package/components/registry/switch.json +177 -0
- package/components/registry/table.json +275 -0
- package/components/registry/tabs.json +264 -0
- package/components/registry/tag.json +345 -0
- package/components/registry/tags-list.json +115 -0
- package/components/registry/toolbars.json +240 -0
- package/components/registry/tooltip.json +175 -0
- package/components/specs/README.md +72 -0
- package/components/specs/button.md +230 -0
- package/components/specs/checkbox.md +162 -0
- package/components/specs/data-viz-tooltips.md +93 -0
- package/components/specs/date-time-pickers.md +161 -0
- package/components/specs/drawer.md +162 -0
- package/components/specs/dropdown-picker.md +161 -0
- package/components/specs/filters.md +118 -0
- package/components/specs/form-item.md +130 -0
- package/components/specs/input.md +130 -0
- package/components/specs/link.md +131 -0
- package/components/specs/loose-tags.md +139 -0
- package/components/specs/menu.md +88 -0
- package/components/specs/modal.md +176 -0
- package/components/specs/navigation.md +181 -0
- package/components/specs/popover.md +118 -0
- package/components/specs/radio.md +144 -0
- package/components/specs/scheduler.md +133 -0
- package/components/specs/select.md +118 -0
- package/components/specs/switch.md +124 -0
- package/components/specs/table.md +115 -0
- package/components/specs/tabs.md +136 -0
- package/components/specs/tag.md +196 -0
- package/components/specs/tags-list.md +105 -0
- package/components/specs/toolbars.md +108 -0
- package/components/specs/tooltip.md +112 -0
- package/foundation/README.md +39 -0
- package/foundation/layout-shells.md +67 -0
- package/foundation/page-templates.md +69 -0
- package/foundation/panel-behaviours.md +61 -0
- package/foundation/screen-regions.md +62 -0
- package/index.js +75 -0
- package/layout/grid.json +34 -0
- package/layout/layouts.json +310 -0
- package/llms.txt +60 -0
- package/package.json +42 -0
- package/spec.manifest.json +407 -0
- package/tokens/README.md +125 -0
- package/tokens/component.json +34 -0
- package/tokens/kit-accents.json +14 -0
- package/tokens/primitive.json +130 -0
- package/tokens/purpose-map.json +67 -0
- package/tokens/semantic.dark.json +90 -0
- package/tokens/semantic.light.json +90 -0
- package/tokens/structural.json +35 -0
- package/tokens/variables.json +2018 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# ObserveOps Design System — AI Operating Contract
|
|
2
|
+
|
|
3
|
+
**Read this first.** Any AI tool building UI for Motadata ObserveOps (pages, layouts, flows,
|
|
4
|
+
prototypes, components) MUST follow this contract. It points you at the machine-readable spec and sets
|
|
5
|
+
the rules. The goal: output that looks and behaves like ObserveOps, built **only** from this design
|
|
6
|
+
system — never guessed.
|
|
7
|
+
|
|
8
|
+
## How to load the spec (read order)
|
|
9
|
+
|
|
10
|
+
1. **`components/index.json`** — the entry point. Lists every component (family, `selectHint`,
|
|
11
|
+
`summary`, `variants`), the token pointers, `recipes`, and `layout`. Start here.
|
|
12
|
+
2. **`components/registry/<name>.json`** — the machine spec for a component: `props` / `events` /
|
|
13
|
+
`slots` / `apis`, `decisionFlow`, `variants`, `sizes`, `states`, `do` / `dont`, `tokensUsed`,
|
|
14
|
+
`a11y`, `knownIssues`.
|
|
15
|
+
3. **Tokens** — `tokens/variables.json` (runtime `--vars`, light/dark) + `tokens/structural.json`
|
|
16
|
+
(LESS `@vars`: spacing/sizing/radius/type) + `tokens/kit-accents.json` (`@primary-color`).
|
|
17
|
+
For a NEW element, use **`tokens/purpose-map.json`** (purpose → token).
|
|
18
|
+
4. **Composition** — `components/recipes/recipes.json` (7 page templates + 5 flows, region →
|
|
19
|
+
component) and `layout/layouts.json` (shells, screen regions, content layouts, panel behaviours) +
|
|
20
|
+
`layout/grid.json` (the 12-col grid).
|
|
21
|
+
5. **Product coverage** — `foundation/*.md` (which product pages/flows use each layout element) when
|
|
22
|
+
you need real-world grounding.
|
|
23
|
+
|
|
24
|
+
## Hard rules (MUST)
|
|
25
|
+
|
|
26
|
+
1. **Components:** use only catalogued components (`index.json`). Pick with `selectHint` /
|
|
27
|
+
`decisionFlow`. Do not invent a component or pull one from another library.
|
|
28
|
+
2. **Configuration:** configure only with the documented `props` / `events` / `slots` / `apis` in the
|
|
29
|
+
registry. Do not invent prop names.
|
|
30
|
+
3. **Colour & spacing:** resolve every colour/space from tokens — `variables.json` /
|
|
31
|
+
`purpose-map.json` / `structural.json`. **Never hardcode a hex, rgb, rgba, or hsl.** Brand / primary
|
|
32
|
+
action = `--primary` (navy, NOT cyan). The cyan `@primary-color` (#099dd9) is the Ant form-control
|
|
33
|
+
accent only (radio dot, checkbox check, select).
|
|
34
|
+
4. **Token system:** emit only runtime `--vars` (from `variables.json` / `structural.json` /
|
|
35
|
+
`kit-accents.json`). **Do NOT emit `mds-*` tokens** — that layer is future/portable and not wired to
|
|
36
|
+
the running product.
|
|
37
|
+
5. **Composition:** build pages from `recipes` (templates + flows) and `layout` (pick the right shell,
|
|
38
|
+
screen regions, content layout, panel behaviour). Forms use the 12-col `MRow`/`MCol` grid (6 = half,
|
|
39
|
+
12 = full, gutter 16). Recipes are **examples**, not an allow-list — if no recipe matches, compose
|
|
40
|
+
the screen from catalogued components + tokens + layout (see "Compose by default" below).
|
|
41
|
+
6. **Theme:** never branch on light/dark — every token is already theme-aware.
|
|
42
|
+
7. **Accessibility:** honour each component's `a11y` field (keyboard, naming/aria, the known gaps).
|
|
43
|
+
|
|
44
|
+
## Compose by default — ASK only for a missing building block
|
|
45
|
+
|
|
46
|
+
The DS gives you **building blocks** (components in `index.json`, tokens, layout primitives) and
|
|
47
|
+
**example recipes** (common compositions). Recipes are EXAMPLES, not an allow-list of permitted
|
|
48
|
+
screens. Two very different situations — don't confuse them:
|
|
49
|
+
|
|
50
|
+
**1. A screen/flow with no matching recipe → just BUILD it (compose).**
|
|
51
|
+
Signup, change-password, a custom settings page, a new wizard, any page we never documented — build
|
|
52
|
+
it by composing catalogued components + tokens + layout. A missing recipe is **not** a reason to
|
|
53
|
+
stop; composing existing parts into new screens is exactly what the DS is for, and is always allowed.
|
|
54
|
+
You may briefly note your assumptions for transparency ("no documented recipe for signup; composed
|
|
55
|
+
from LoginLayout + input + form-item + button + checkbox + link"), then build. Do not ask permission
|
|
56
|
+
to compose.
|
|
57
|
+
|
|
58
|
+
**2. You'd need a building block that ISN'T in the DS → STOP and ASK.**
|
|
59
|
+
Only when building would force you to use something **not catalogued** — a component archetype absent
|
|
60
|
+
from `index.json` (e.g. a chart/graph/topology canvas), a colour/token outside the palette
|
|
61
|
+
(`variables.json` / `purpose-map.json`), or any primitive the DS lacks. Then **do not substitute,
|
|
62
|
+
invent, or import from another library.** Ask first, stating:
|
|
63
|
+
|
|
64
|
+
1. what you are building,
|
|
65
|
+
2. the missing building block you needed,
|
|
66
|
+
3. what you checked in the DS (which `index.json` families / `decisionFlow` / `purpose-map`),
|
|
67
|
+
4. why no catalogued block covers it,
|
|
68
|
+
5. the external thing you propose to use instead.
|
|
69
|
+
|
|
70
|
+
Then wait for approval. **The line:** never pick a component or colour from OUTSIDE the DS without
|
|
71
|
+
asking — but never ask permission to combine parts already INSIDE it. Silent use of a non-DS building
|
|
72
|
+
block is the contract violation; composing DS parts into an undocumented screen is not.
|
|
73
|
+
|
|
74
|
+
## Known gaps — missing building blocks (these DO require an ASK)
|
|
75
|
+
|
|
76
|
+
- **Charts / data-viz / widget tiles / topology graph** — only the *tooltips* are catalogued
|
|
77
|
+
(`data-viz-tooltips`). The chart/graph components themselves are **not** in the DS yet. A
|
|
78
|
+
dashboard/chart/topology task → ask before improvising. Recipes self-flag these: any region with a
|
|
79
|
+
**`$gap`** field (and `recipes.json` → `$knownGaps`) marks a layer not in the DS — treat it as a
|
|
80
|
+
hard STOP-and-ASK.
|
|
81
|
+
- **Figma library** — not built. Figma-native generation isn't supported yet.
|
|
82
|
+
|
|
83
|
+
## Output rules
|
|
84
|
+
|
|
85
|
+
- Real component usage: `@motadata/ui` (`M*`), Floto wrappers (`Floto*`), Ant Design Vue 1.x (`a-*`),
|
|
86
|
+
`_base-*` globals — Vue 2.6.
|
|
87
|
+
- Colours via `var(--token)`; layout via `MRow`/`MCol`; forms via `FlotoForm` / `FlotoFormItem`.
|
|
88
|
+
- **Cite your sources:** for each part, name the DS component / recipe / token you used (e.g.
|
|
89
|
+
"list-view recipe · Organisms/Table · `--page-text-color`").
|
|
90
|
+
- **Storybook is the VISUAL reference, not a data source:** the live catalogue (URL in `llms.txt`)
|
|
91
|
+
shows the pixel-accurate look to match and is for human/visual verification — but take ALL specs from
|
|
92
|
+
these JSON/MD files. Do NOT scrape the Storybook site for props/tokens (it's a gated JS app; the
|
|
93
|
+
structured spec here is the source of truth).
|
|
94
|
+
|
|
95
|
+
## Self-check before you finish
|
|
96
|
+
|
|
97
|
+
- [ ] Every component is from `index.json` (none invented / from another library).
|
|
98
|
+
- [ ] Every colour/space is a token — zero hardcoded hex/rgba.
|
|
99
|
+
- [ ] No `mds-*` tokens emitted.
|
|
100
|
+
- [ ] The page is composed from a recipe + the right layout shell/regions.
|
|
101
|
+
- [ ] a11y honoured (labels, keyboard, aria).
|
|
102
|
+
- [ ] Any deviation was **asked**, not guessed.
|
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @mtdt/observeops-ds-spec
|
|
2
|
+
|
|
3
|
+
The **machine-readable spec + AI operating contract** for the Motadata ObserveOps design system.
|
|
4
|
+
Install it so any AI tool (Cursor, Claude Code, Windsurf, Copilot, Cline, …) can build ObserveOps UI
|
|
5
|
+
from the real components, tokens, recipes and layout — instead of guessing.
|
|
6
|
+
|
|
7
|
+
This package is the **machine-readable truth**. The companion **Storybook** is the **visual truth**
|
|
8
|
+
(see the catalogue link below) — use it to *match* the look; get all specs from the files here.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @mtdt/observeops-ds-spec
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## For an AI tool — read in this order
|
|
17
|
+
|
|
18
|
+
1. [`AGENTS.md`](./AGENTS.md) — the **operating contract** (read first): use only catalogued
|
|
19
|
+
components, resolve every colour to a token, compose pages from recipes/layout, and STOP-and-ASK
|
|
20
|
+
before using anything not in this DS.
|
|
21
|
+
2. [`llms.txt`](./llms.txt) — discovery entry point (links every part of the spec).
|
|
22
|
+
3. `components/index.json` — the machine index (all components, families, token pointers).
|
|
23
|
+
4. `components/registry/<id>.json` — per-component props/events/slots/apis, variants, tokens, a11y.
|
|
24
|
+
5. `components/recipes/recipes.json` — page templates + flows (how to compose whole screens).
|
|
25
|
+
6. `layout/` + `tokens/` + `foundation/` — structure, the token crosswalk, and product coverage.
|
|
26
|
+
|
|
27
|
+
Point your tool's rules file at the contract, e.g. in `.cursor/rules` or your project `AGENTS.md`:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
Follow node_modules/@mtdt/observeops-ds-spec/AGENTS.md when building any ObserveOps UI.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## For code — the thin loader
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
const ds = require('@mtdt/observeops-ds-spec')
|
|
37
|
+
|
|
38
|
+
ds.version // spec version
|
|
39
|
+
ds.index // components/index.json (parsed)
|
|
40
|
+
ds.getComponent('button') // index entry + full registry spec
|
|
41
|
+
ds.resolveToken('--primary') // { light: '#111c2c', dark: '#e3e8f2', ... }
|
|
42
|
+
ds.resolveToken('@btn-radius') // '4px'
|
|
43
|
+
ds.listRecipes() // [{ id, name, whenToUse }, ...]
|
|
44
|
+
ds.specPath('llms.txt') // absolute path, for tools that read raw files
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Deep imports work too: `require('@mtdt/observeops-ds-spec/components/registry/drawer.json')`.
|
|
48
|
+
|
|
49
|
+
## What's inside
|
|
50
|
+
|
|
51
|
+
- `components/` — `index.json`, `registry/` (26 components), `recipes/recipes.json`, `specs/` (prose).
|
|
52
|
+
- `tokens/` — the **live** layer (`variables.json` 336 themed CSS vars, `structural.json` LESS vars,
|
|
53
|
+
`kit-accents.json`, `purpose-map.json`) **+** a **future/portable** DTCG layer
|
|
54
|
+
(`primitive` / `semantic.*` / `component.json`, `mds-*`) flagged `$status: future` — **do not emit
|
|
55
|
+
`mds-*` for live output**; use the runtime `--vars`.
|
|
56
|
+
- `layout/` — `grid.json` (12-col MRow/MCol) + `layouts.json` (shells, regions, content layouts, panels).
|
|
57
|
+
- `foundation/` — page-by-page product coverage per layout element.
|
|
58
|
+
- `spec.manifest.json` — file list + sizes + checksums.
|
|
59
|
+
|
|
60
|
+
## Known gaps (the AI will STOP-and-ASK here)
|
|
61
|
+
|
|
62
|
+
Charts / data-viz / widget tiles / topology graph are **not** catalogued yet (only the chart
|
|
63
|
+
*tooltips* are). Recipes flag these with a `$gap` marker.
|
|
64
|
+
|
|
65
|
+
## Live visual catalogue
|
|
66
|
+
|
|
67
|
+
Storybook: <https://niravbhatt1317.github.io/motadata-design-system/> — the pixel-accurate visual
|
|
68
|
+
reference. It is **not** a data source; do not scrape it. The specs in this package are authoritative.
|
|
69
|
+
|
|
70
|
+
## Versioning
|
|
71
|
+
|
|
72
|
+
Semver. Minor = added components/recipes/tokens · patch = fixes/clarifications · major = breaking
|
|
73
|
+
spec-shape change. Pin a version to keep AI output reproducible.
|