lucent-ui 0.34.0 → 0.36.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.
Files changed (26) hide show
  1. package/dist/{LucentProvider-BoiXYqA4.js → LucentProvider-F0EN_7TD.js} +292 -269
  2. package/dist/LucentProvider-LqNc0AxD.cjs +109 -0
  3. package/dist/devtools.cjs +3 -3
  4. package/dist/devtools.js +423 -405
  5. package/dist/index.cjs +34 -32
  6. package/dist/index.d.ts +16 -13
  7. package/dist/index.js +947 -922
  8. package/dist-cli/cli/entry.js +0 -0
  9. package/dist-cli/cli/index.js +0 -0
  10. package/dist-server/server/index.js +0 -0
  11. package/dist-server/src/components/atoms/CodeBlock/CodeBlock.manifest.js +14 -0
  12. package/dist-server/src/components/molecules/Card/Card.manifest.js +1 -1
  13. package/dist-server/src/components/molecules/PageLayout/PageLayout.manifest.js +6 -5
  14. package/package.json +13 -15
  15. package/dist/LucentProvider-we0nRXn-.cjs +0 -109
  16. package/dist-server/server/recipe-registry.js +0 -18
  17. package/dist-server/src/manifest/recipes/action-bar.recipe.js +0 -91
  18. package/dist-server/src/manifest/recipes/collapsible-card.recipe.js +0 -100
  19. package/dist-server/src/manifest/recipes/empty-state-card.recipe.js +0 -72
  20. package/dist-server/src/manifest/recipes/form-layout.recipe.js +0 -98
  21. package/dist-server/src/manifest/recipes/index.js +0 -8
  22. package/dist-server/src/manifest/recipes/profile-card.recipe.js +0 -101
  23. package/dist-server/src/manifest/recipes/search-filter-bar.recipe.js +0 -122
  24. package/dist-server/src/manifest/recipes/settings-panel.recipe.js +0 -167
  25. package/dist-server/src/manifest/recipes/stats-row.recipe.js +0 -106
  26. package/dist-server/src/manifest/validate.test.js +0 -28
@@ -1,106 +0,0 @@
1
- export const RECIPE = {
2
- id: 'stats-row',
3
- name: 'Stats Row',
4
- description: 'Row of individual stat cards with label, large display-font value, and trend chip with comparison.',
5
- category: 'dashboard',
6
- components: ['card', 'text', 'chip', 'avatar', 'stack', 'row'],
7
- structure: `
8
- Row gap="3" wrap
9
- ├── Card (outline, padding="md", flex=1)
10
- │ └── Stack gap="3"
11
- │ ├── Text (xs, secondary, medium) ← metric label
12
- │ ├── Text (2xl, bold, display) ← value
13
- │ └── Row gap="2" align="center"
14
- │ ├── Chip (success/danger, sm) ← trend %
15
- │ └── Text (xs, secondary) ← comparison
16
- ├── Card ...
17
- └── Card ...
18
- `.trim(),
19
- code: `<Row gap="3" wrap>
20
- <Card variant="outline" padding="md" style={{ flex: 1, minWidth: 180 }}>
21
- <Stack gap="3">
22
- <Text size="xs" color="secondary" weight="medium">Total Events</Text>
23
- <Text size="2xl" weight="bold" family="display">32</Text>
24
- <Row gap="2" align="center">
25
- <Chip variant="success" size="sm" borderless>+20%</Chip>
26
- <Text size="xs" color="secondary">25 last week</Text>
27
- </Row>
28
- </Stack>
29
- </Card>
30
- <Card variant="outline" padding="md" style={{ flex: 1, minWidth: 180 }}>
31
- <Stack gap="3">
32
- <Text size="xs" color="secondary" weight="medium">Total Hours</Text>
33
- <Text size="2xl" weight="bold" family="display">38.2 hr</Text>
34
- <Row gap="2" align="center">
35
- <Chip variant="danger" size="sm" borderless>-8%</Chip>
36
- <Text size="xs" color="secondary">42.0 hr last week</Text>
37
- </Row>
38
- </Stack>
39
- </Card>
40
- <Card variant="outline" padding="md" style={{ flex: 1, minWidth: 180 }}>
41
- <Stack gap="3">
42
- <Text size="xs" color="secondary" weight="medium">Focus Time</Text>
43
- <Text size="2xl" weight="bold" family="display">16.8 hr</Text>
44
- <Row gap="2" align="center">
45
- <Chip variant="success" size="sm" borderless>+12%</Chip>
46
- <Text size="xs" color="secondary">14.4 hr last week</Text>
47
- </Row>
48
- </Stack>
49
- </Card>
50
- </Row>`,
51
- variants: [
52
- {
53
- title: 'Revenue cards with avatar header',
54
- code: `<Row gap="3" wrap>
55
- <Card variant="filled" padding="md" style={{ flex: 1, minWidth: 180 }}>
56
- <Stack gap="3">
57
- <Row gap="2" align="center">
58
- <Avatar alt="Airbnb" size="sm" />
59
- <Stack gap="0">
60
- <Text size="sm" weight="semibold">Airbnb</Text>
61
- <Text size="xs" color="secondary">Travel and tourism</Text>
62
- </Stack>
63
- </Row>
64
- <Row justify="between" align="end">
65
- <Stack gap="1">
66
- <Row gap="2" align="baseline">
67
- <Text size="lg" weight="bold" family="display">$33.2k</Text>
68
- <Chip variant="success" size="sm" borderless>+37%</Chip>
69
- </Row>
70
- <Text size="xs" color="secondary">Recurring Revenue</Text>
71
- </Stack>
72
- </Row>
73
- </Stack>
74
- </Card>
75
- <Card variant="filled" padding="md" style={{ flex: 1, minWidth: 180 }}>
76
- <Stack gap="3">
77
- <Row gap="2" align="center">
78
- <Avatar alt="MailChimp" size="sm" />
79
- <Stack gap="0">
80
- <Text size="sm" weight="semibold">MailChimp</Text>
81
- <Text size="xs" color="secondary">Email Marketing</Text>
82
- </Stack>
83
- </Row>
84
- <Row justify="between" align="end">
85
- <Stack gap="1">
86
- <Row gap="2" align="baseline">
87
- <Text size="lg" weight="bold" family="display">$3.2k</Text>
88
- <Chip variant="danger" size="sm" borderless>-23%</Chip>
89
- </Row>
90
- <Text size="xs" color="secondary">Recurring Revenue</Text>
91
- </Stack>
92
- </Row>
93
- </Stack>
94
- </Card>
95
- </Row>`,
96
- },
97
- ],
98
- designNotes: 'Each stat lives in its own Card so it reads as a discrete metric. flex: 1 with ' +
99
- 'minWidth ensures equal sizing that wraps gracefully. gap="3" in the Stack creates ' +
100
- 'three clear visual tiers: label (top), value (middle), trend context (bottom). ' +
101
- 'Display font on the value creates instant hierarchy. The trend row pairs a ' +
102
- 'color-coded Chip (success/danger) with a secondary comparison value so the user ' +
103
- 'gets both relative change and absolute context. The revenue variant adds an ' +
104
- 'Avatar + name header for entity-scoped metrics — align="baseline" on the ' +
105
- 'value + chip row keeps the trend visually anchored to the number.',
106
- };
@@ -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
- });