lucent-ui 0.15.0 → 0.16.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.
File without changes
File without changes
File without changes
@@ -34,6 +34,20 @@ export const COMPONENT_MANIFEST = {
34
34
  required: false,
35
35
  description: 'Array of hex color strings shown as clickable swatches. Defaults to a 16-color palette.',
36
36
  },
37
+ {
38
+ name: 'size',
39
+ type: 'string',
40
+ required: false,
41
+ default: '"md"',
42
+ description: 'Swatch trigger size. "sm" renders a 24px swatch, "md" renders 40px.',
43
+ },
44
+ {
45
+ name: 'inline',
46
+ type: 'boolean',
47
+ required: false,
48
+ default: 'false',
49
+ description: 'Places the label beside the swatch instead of above it. Useful for compact layouts.',
50
+ },
37
51
  {
38
52
  name: 'disabled',
39
53
  type: 'boolean',
@@ -44,6 +44,14 @@ export const COMPONENT_MANIFEST = {
44
44
  default: 'false',
45
45
  description: 'Disables interaction and renders muted text. Removes href and onClick.',
46
46
  },
47
+ {
48
+ name: 'inverse',
49
+ type: 'boolean',
50
+ required: false,
51
+ default: 'false',
52
+ description: 'Uses surface background with primary text instead of accent for the active state. ' +
53
+ 'Ideal for sidebar navigation on tinted chrome where the accent highlight would be too heavy.',
54
+ },
47
55
  {
48
56
  name: 'onClick',
49
57
  type: 'function',
@@ -5,7 +5,9 @@ export const COMPONENT_MANIFEST = {
5
5
  domain: 'neutral',
6
6
  specVersion: '0.1',
7
7
  description: 'Full-viewport shell layout with optional header, left sidebar, right panel, and footer slots arranged in a flex column/row structure.',
8
- designIntent: 'PageLayout owns the outermost chrome of an application page. The body row is a flex row containing ' +
8
+ designIntent: 'PageLayout owns the outermost chrome of an application page. Chrome regions (header, sidebar, footer) ' +
9
+ 'default to bgBase so the main content card feels elevated against the page canvas — especially ' +
10
+ 'noticeable with tinted bgBase values. The body row is a flex row containing ' +
9
11
  'an optional left sidebar, a bordered main content card, and an optional right panel — all as structural ' +
10
12
  'siblings so they share the same vertical space. The header and footer sit outside the body row as ' +
11
13
  'flex children of the outer column, ensuring they span the full width. Sidebars collapse to zero width ' +
@@ -87,6 +89,16 @@ export const COMPONENT_MANIFEST = {
87
89
  default: '28',
88
90
  description: 'Footer height in px (number) or any CSS value (string). Default: 28 — sized for a compact status bar.',
89
91
  },
92
+ {
93
+ name: 'chromeBackground',
94
+ type: 'string',
95
+ required: false,
96
+ default: '"bgBase"',
97
+ description: 'Background token for chrome regions (header, sidebar, footer). ' +
98
+ '"bgBase" uses the page canvas color so the main content card feels elevated; ' +
99
+ '"bgSubtle" uses a subtle shade of bgBase for chrome distinction; ' +
100
+ '"surface" matches the old behavior where chrome and content share the same background.',
101
+ },
90
102
  {
91
103
  name: 'mainStyle',
92
104
  type: 'object',
@@ -0,0 +1,28 @@
1
+ import { describe, test, expect } from 'vitest';
2
+ import { validateManifest } from './validate.js';
3
+ // Auto-discover all component manifests
4
+ const manifestModules = import.meta.glob('../components/**/*.manifest.ts', { eager: true });
5
+ const manifests = Object.entries(manifestModules).map(([path, mod]) => {
6
+ const m = mod;
7
+ const manifest = m['COMPONENT_MANIFEST'];
8
+ return { path, manifest };
9
+ });
10
+ describe('Component manifests', () => {
11
+ test('at least one manifest was discovered', () => {
12
+ expect(manifests.length).toBeGreaterThan(0);
13
+ });
14
+ for (const { path, manifest } of manifests) {
15
+ const label = path.replace('../components/', '').replace('.manifest.ts', '');
16
+ test(`${label} — exports COMPONENT_MANIFEST`, () => {
17
+ expect(manifest).toBeDefined();
18
+ });
19
+ test(`${label} — passes schema validation`, () => {
20
+ const result = validateManifest(manifest);
21
+ if (!result.valid) {
22
+ const messages = result.errors.map(e => ` ${e.field}: ${e.message}`).join('\n');
23
+ throw new Error(`Invalid manifest:\n${messages}`);
24
+ }
25
+ expect(result.valid).toBe(true);
26
+ });
27
+ }
28
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucent-ui",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "An AI-first React component library with machine-readable manifests.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -25,6 +25,18 @@
25
25
  "dist-server",
26
26
  "dist-cli"
27
27
  ],
28
+ "scripts": {
29
+ "dev": "vite --config vite.dev.config.ts",
30
+ "build": "vite build",
31
+ "build:server": "tsc -p server/tsconfig.json",
32
+ "build:cli": "tsc -p cli/tsconfig.json && cp cli/template.manifest.json dist-cli/cli/template.manifest.json",
33
+ "test": "vitest run",
34
+ "test:watch": "vitest",
35
+ "prepublishOnly": "tsc --noEmit && pnpm build && pnpm build:server && pnpm build:cli",
36
+ "changeset": "changeset",
37
+ "version-packages": "changeset version",
38
+ "release": "pnpm prepublishOnly && changeset publish"
39
+ },
28
40
  "keywords": [
29
41
  "react",
30
42
  "component-library",
@@ -39,6 +51,7 @@
39
51
  },
40
52
  "author": "Rozina Szogyenyi",
41
53
  "license": "MIT",
54
+ "packageManager": "pnpm@10.30.3",
42
55
  "peerDependencies": {
43
56
  "react": "^18.0.0 || ^19.0.0",
44
57
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -60,16 +73,5 @@
60
73
  "dependencies": {
61
74
  "@modelcontextprotocol/sdk": "^1.27.1",
62
75
  "zod": "^4.3.6"
63
- },
64
- "scripts": {
65
- "dev": "vite --config vite.dev.config.ts",
66
- "build": "vite build",
67
- "build:server": "tsc -p server/tsconfig.json",
68
- "build:cli": "tsc -p cli/tsconfig.json && cp cli/template.manifest.json dist-cli/cli/template.manifest.json",
69
- "test": "vitest run",
70
- "test:watch": "vitest",
71
- "changeset": "changeset",
72
- "version-packages": "changeset version",
73
- "release": "pnpm prepublishOnly && changeset publish"
74
76
  }
75
- }
77
+ }