lucent-ui 0.21.0 → 0.22.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/dist/index.cjs +45 -41
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1402 -1371
- package/dist-cli/cli/entry.js +0 -0
- package/dist-cli/cli/index.js +0 -0
- package/dist-server/server/index.js +0 -0
- package/dist-server/src/components/atoms/Chip/Chip.manifest.js +15 -3
- package/package.json +13 -15
- package/dist-server/src/manifest/validate.test.js +0 -28
package/dist-cli/cli/entry.js
CHANGED
|
File without changes
|
package/dist-cli/cli/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -10,26 +10,38 @@ export const COMPONENT_MANIFEST = {
|
|
|
10
10
|
'Use `onDismiss` for removable chips (filters, multi-select values). ' +
|
|
11
11
|
'Use `onClick` for clickable/selectable chips (filter toggles, category navigation). ' +
|
|
12
12
|
'Use `dot` for status indicators (online/offline). ' +
|
|
13
|
+
'Use `dot` + `pulse` to show in-progress or live states (deploying, syncing, live incident). ' +
|
|
14
|
+
'Use `ghost` + `dot` for subtle inline status that blends into surrounding text or table rows. ' +
|
|
15
|
+
'Omit `children` with `dot` for a minimal dot-only indicator — great for table cells or avatar badges. ' +
|
|
13
16
|
'Use `swatch` for color-coded categories. ' +
|
|
14
17
|
'Use `leftIcon` for chips with leading icons (folders, file types, flags). ' +
|
|
15
18
|
'Use `borderless` for a softer, filled-only appearance in dense UIs. ' +
|
|
16
19
|
'Variant conveys semantic meaning — default to neutral for user-generated content.',
|
|
17
20
|
props: [
|
|
18
|
-
{ name: 'children', type: 'ReactNode', required:
|
|
21
|
+
{ name: 'children', type: 'ReactNode', required: false, description: 'Chip label content. When omitted with dot=true, renders as a compact dot-only indicator.' },
|
|
19
22
|
{ name: 'variant', type: 'enum', required: false, default: 'neutral', description: 'Colour scheme conveying semantic meaning.', enumValues: ['neutral', 'accent', 'success', 'warning', 'danger', 'info'] },
|
|
20
23
|
{ name: 'size', type: 'enum', required: false, default: 'md', description: 'Controls height, font size, and icon size.', enumValues: ['sm', 'md', 'lg'] },
|
|
21
24
|
{ name: 'onDismiss', type: 'function', required: false, description: 'Renders an x button that calls this handler. Use for removable filters and multi-select values.' },
|
|
22
25
|
{ name: 'onClick', type: 'function', required: false, description: 'Makes the chip clickable (renders as <button>). Use for filter toggles and category links.' },
|
|
23
26
|
{ name: 'leftIcon', type: 'ReactNode', required: false, description: 'Icon or element rendered before the label (emoji, flag, avatar).' },
|
|
24
27
|
{ name: 'swatch', type: 'string', required: false, description: 'Hex color string. Renders a small color dot before the label.' },
|
|
25
|
-
{ name: 'dot', type: 'boolean', required: false, default: 'false', description: 'Renders a status dot using the variant colour.
|
|
28
|
+
{ name: 'dot', type: 'boolean', required: false, default: 'false', description: 'Renders a status dot using the variant colour. Omit children for a compact dot-only indicator.' },
|
|
29
|
+
{ name: 'pulse', type: 'boolean', required: false, default: 'false', description: 'Adds a pulsing ring animation to the status dot. Only applies when dot=true. Use for running, deploying, or live states.' },
|
|
26
30
|
{ name: 'borderless', type: 'boolean', required: false, default: 'false', description: 'Removes the border for a filled-only look.' },
|
|
31
|
+
{ name: 'ghost', type: 'boolean', required: false, default: 'false', description: 'Transparent background with text color only. Pairs well with dot for subtle inline statuses in tables or lists.' },
|
|
27
32
|
{ name: 'disabled', type: 'boolean', required: false, default: 'false', description: 'Dims the chip and prevents interaction.' },
|
|
28
33
|
{ name: 'style', type: 'object', required: false, description: 'Inline style overrides.' },
|
|
29
34
|
],
|
|
30
35
|
usageExamples: [
|
|
36
|
+
// Status indicators — subtle ways to show state
|
|
37
|
+
{ title: 'Status dot', code: `<Chip variant="success" dot>Online</Chip>` },
|
|
38
|
+
{ title: 'Pulsing status (in-progress)', code: `<Chip variant="warning" dot pulse>Deploying</Chip>` },
|
|
39
|
+
{ title: 'Ghost status (inline/table)', code: `<Chip variant="success" ghost dot>Active</Chip>` },
|
|
40
|
+
{ title: 'Ghost pulsing', code: `<Chip variant="danger" ghost dot pulse>Live incident</Chip>` },
|
|
41
|
+
{ title: 'Dot only (minimal)', code: `<Chip variant="success" dot />` },
|
|
42
|
+
{ title: 'Dot only pulsing', code: `<Chip variant="danger" dot pulse />` },
|
|
43
|
+
// Filters, tags, and categories
|
|
31
44
|
{ title: 'Dismissible filter', code: `<Chip onDismiss={() => removeFilter('react')}>React</Chip>` },
|
|
32
|
-
{ title: 'Status with dot', code: `<Chip variant="success" dot>Online</Chip>` },
|
|
33
45
|
{ title: 'Color swatch', code: `<Chip swatch="#6366f1" onDismiss={() => {}}>Indigo</Chip>` },
|
|
34
46
|
{ title: 'With icon', code: `<Chip leftIcon={<FolderIcon />} onDismiss={() => {}}>Documents</Chip>` },
|
|
35
47
|
{ title: 'Clickable category', code: `<Chip variant="accent" onClick={() => navigate('/ux')}>UX</Chip>` },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lucent-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.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,18 +25,6 @@
|
|
|
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
|
-
},
|
|
40
28
|
"keywords": [
|
|
41
29
|
"react",
|
|
42
30
|
"component-library",
|
|
@@ -51,7 +39,6 @@
|
|
|
51
39
|
},
|
|
52
40
|
"author": "Rozina Szogyenyi",
|
|
53
41
|
"license": "MIT",
|
|
54
|
-
"packageManager": "pnpm@10.30.3",
|
|
55
42
|
"peerDependencies": {
|
|
56
43
|
"react": "^18.0.0 || ^19.0.0",
|
|
57
44
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -73,5 +60,16 @@
|
|
|
73
60
|
"dependencies": {
|
|
74
61
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
75
62
|
"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"
|
|
76
74
|
}
|
|
77
|
-
}
|
|
75
|
+
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
});
|