@crvouga/atlas 1.12.0 → 1.14.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/CHANGELOG.md +13 -1
- package/dist/critics/src/contract.d.ts +113 -0
- package/dist/critics/src/contract.js +48 -0
- package/dist/critics/src/credentials.d.ts +72 -0
- package/dist/critics/src/credentials.js +136 -0
- package/dist/critics/src/critique.d.ts +128 -0
- package/dist/critics/src/critique.js +163 -0
- package/dist/critics/src/index.d.ts +21 -0
- package/dist/critics/src/index.js +21 -0
- package/dist/critics/src/judging.d.ts +153 -0
- package/dist/critics/src/judging.js +145 -0
- package/dist/critics/src/publish.d.ts +23 -0
- package/dist/critics/src/publish.js +21 -0
- package/dist/critics/src/runner.d.ts +104 -0
- package/dist/critics/src/runner.js +202 -0
- package/dist/critics/src/scope.d.ts +8 -0
- package/dist/critics/src/scope.js +26 -0
- package/dist/playwright/src/index.d.ts +4 -0
- package/dist/playwright/src/index.js +4 -0
- package/dist/playwright/src/ui-catalog.d.ts +51 -0
- package/dist/playwright/src/ui-catalog.js +44 -0
- package/dist/reports/src/compose.d.ts +2 -2
- package/dist/reports/src/compose.js +6 -5
- package/dist/reports/src/evidence-types.d.ts +3 -0
- package/dist/reports/src/evidence-view.d.ts +2 -1
- package/dist/reports/src/evidence-view.js +5 -2
- package/dist/reports/src/layer-merge.d.ts +16 -4
- package/dist/reports/src/layer-merge.js +23 -5
- package/dist/reports/src/report-index.js +9 -5
- package/dist/reports/src/report-status.d.ts +1 -1
- package/dist/reports/src/report-status.js +6 -4
- package/dist/reports/src/ui-catalog-publish.d.ts +92 -0
- package/dist/reports/src/ui-catalog-publish.js +68 -0
- package/dist/reports/src/ui-catalog.d.ts +229 -0
- package/dist/reports/src/ui-catalog.js +273 -0
- package/dist/reports/src/ui-state.d.ts +70 -0
- package/dist/reports/src/ui-state.js +66 -0
- package/dist/schema/src/api.d.ts +351 -0
- package/dist/schema/src/api.js +72 -1
- package/dist/schema/src/critique.d.ts +144 -0
- package/dist/schema/src/critique.js +96 -0
- package/dist/schema/src/index.d.ts +2 -1
- package/dist/schema/src/index.js +2 -1
- package/dist/schema/src/server-config.d.ts +7 -1
- package/dist/schema/src/server-config.js +6 -3
- package/dist/server/src/app.js +15 -0
- package/dist/server/src/auth.d.ts +1 -1
- package/dist/server/src/auth.js +2 -2
- package/dist/server/src/config.js +2 -2
- package/dist/server/src/openapi.d.ts +3 -3
- package/dist/server/src/openapi.js +29 -6
- package/dist/server/src/store-api.js +39 -1
- package/docs/agents.md +1 -0
- package/docs/critics.md +190 -0
- package/docs/extending.md +1 -0
- package/docs/reference/critics.md +840 -0
- package/docs/reference/http-api.md +52 -2
- package/docs/reference/playwright.md +63 -0
- package/docs/reference/reports.md +608 -8
- package/docs/reference/schema.md +152 -2
- package/docs/reference/server.md +3 -3
- package/docs/report-contract.md +6 -2
- package/docs/rich-evidence.md +5 -0
- package/docs/server.md +8 -4
- package/docs/ui-catalog.md +173 -0
- package/docs/ui.md +15 -0
- package/llms-full.txt +457 -8
- package/llms.txt +3 -0
- package/package.json +8 -2
- package/packages/critics/README.md +18 -0
- package/packages/schema/schemas/critique.schema.json +254 -0
- package/packages/schema/schemas/effective-delta.schema.json +73 -0
- package/packages/schema/schemas/effective-evidence.schema.json +73 -0
- package/packages/schema/schemas/layer-rows.schema.json +73 -0
- package/packages/schema/schemas/server-config.schema.json +2 -1
- package/packages/schema/schemas/server-info.schema.json +1 -0
- package/packages/server/openapi.json +1443 -80
- package/packages/visualizer/src/app/AppShell.tsx +36 -30
- package/packages/visualizer/src/app/router.tsx +10 -1
- package/packages/visualizer/src/catalog/UiCatalogFilters.tsx +65 -0
- package/packages/visualizer/src/catalog/UiCatalogPage.tsx +342 -0
- package/packages/visualizer/src/catalog/provider.tsx +25 -0
- package/packages/visualizer/src/catalog/search.ts +68 -0
- package/packages/visualizer/src/catalog/words.ts +26 -0
- package/packages/visualizer/src/components/Header.tsx +17 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SpecLogo } from './SpecLogo';
|
|
2
|
-
import { IconDots } from '@tabler/icons-react';
|
|
2
|
+
import { IconDots, IconLayoutGrid } from '@tabler/icons-react';
|
|
3
|
+
import { isUiKind } from '@crvouga/atlas/reports/ui-state';
|
|
3
4
|
import { isStatechartFile } from '@crvouga/atlas/schema';
|
|
4
5
|
import { ActionIcon, Anchor, Badge, Box, Button, Group, Menu, NativeSelect, Popover, Stack, Tooltip } from '@mantine/core';
|
|
5
6
|
import { Link, useLocation, useNavigate, useSearch } from '@tanstack/react-router';
|
|
@@ -137,6 +138,9 @@ export function Header() {
|
|
|
137
138
|
[evidence.files, evidence.view, kind]
|
|
138
139
|
);
|
|
139
140
|
const project = currentProject();
|
|
141
|
+
const catalogOpen = pathname === '/catalog';
|
|
142
|
+
// The catalog is offered once the report holds a state or a plan for one.
|
|
143
|
+
const hasCatalog = useMemo(() => evidence.evidence.some((layer) => layer.rows.some((row) => isUiKind(row.kind))), [evidence.evidence]);
|
|
140
144
|
return (
|
|
141
145
|
<Group flex={1} miw={0} justify="space-between" wrap="nowrap" gap="xs">
|
|
142
146
|
<Group gap="xs" wrap="nowrap" miw={0}>
|
|
@@ -151,13 +155,13 @@ export function Header() {
|
|
|
151
155
|
leftSection={kind ? <SpecLogo kind={kind} /> : undefined}
|
|
152
156
|
rightSection={<ChevronDownIcon aria-hidden="true" size={12} />}
|
|
153
157
|
>
|
|
154
|
-
{kind?.label ?? (hasCharts ? 'Statecharts' : evidence.ready && !tabs.length ? 'Tests' : 'Specs')}
|
|
158
|
+
{catalogOpen ? 'UI catalog' : (kind?.label ?? (hasCharts ? 'Statecharts' : evidence.ready && !tabs.length ? 'Tests' : 'Specs'))}
|
|
155
159
|
</Button>
|
|
156
160
|
</Menu.Target>
|
|
157
161
|
<Menu.Dropdown>
|
|
158
162
|
<Box component="nav" aria-label="Spec type">
|
|
159
163
|
<Menu.Item
|
|
160
|
-
aria-current={pathname.startsWith('/specs/') ? undefined : 'page'}
|
|
164
|
+
aria-current={pathname.startsWith('/specs/') || catalogOpen ? undefined : 'page'}
|
|
161
165
|
renderRoot={(props) => <Link {...props} to="/" search={(prev) => runOnly(prev)} />}
|
|
162
166
|
>
|
|
163
167
|
{hasCharts || !evidence.ready ? 'Statecharts' : 'Tests'}
|
|
@@ -179,6 +183,15 @@ export function Header() {
|
|
|
179
183
|
{tab.kind.label}
|
|
180
184
|
</Menu.Item>
|
|
181
185
|
))}
|
|
186
|
+
{(hasCatalog || catalogOpen) && (
|
|
187
|
+
<Menu.Item
|
|
188
|
+
leftSection={<IconLayoutGrid size={16} aria-hidden="true" />}
|
|
189
|
+
aria-current={catalogOpen ? 'page' : undefined}
|
|
190
|
+
renderRoot={(props) => <Link {...props} to="/catalog" search={{}} />}
|
|
191
|
+
>
|
|
192
|
+
UI catalog
|
|
193
|
+
</Menu.Item>
|
|
194
|
+
)}
|
|
182
195
|
</Box>
|
|
183
196
|
</Menu.Dropdown>
|
|
184
197
|
</Menu>
|
|
@@ -250,7 +263,7 @@ function SpecBreadcrumb() {
|
|
|
250
263
|
name: item.name,
|
|
251
264
|
running: (evidence.view.specs.get(outlinePath(item.file))?.summary.counts.running ?? 0) > 0
|
|
252
265
|
}));
|
|
253
|
-
if (!options.length) return null;
|
|
266
|
+
if (!options.length || pathname === '/catalog') return null;
|
|
254
267
|
return (
|
|
255
268
|
<NativeSelect
|
|
256
269
|
data-running={options.some((option) => option.running) || undefined}
|