viewer
/viewer
Pracuje nad przeglądarką grafu Konstruct w Svelte 5 i TypeScript, czyli wyglądem i zachowaniem grafu, panelu i wyszukiwarki.
- Autor
- kodexlabsio ↗
- Repozytorium
- konstruct ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Pracuje nad przeglądarką grafu Konstruct w Svelte 5 i TypeScript, czyli wyglądem i zachowaniem grafu, panelu i wyszukiwarki.
Oryginalny opis (EN)
Work on graph.html, the Konstruct graph viewer (Svelte 5 and TypeScript in viewer/, built into konstruct/outputs/viewer.html). Use for any change to how the graph, panel, search or styling looks or behaves.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 41 linii, 322 słów
Podgląd SKILL.md
---
name: viewer
description: Work on graph.html, the Konstruct graph viewer (Svelte 5 and TypeScript in viewer/, built into konstruct/outputs/viewer.html). Use for any change to how the graph, panel, search or styling looks or behaves.
---
# Working on the viewer
The viewer is `viewer/` (Svelte 5, strict TypeScript, Vite, pnpm, Node from `.nvmrc`), with its
`package.json` and toolchain configs at the repository root, where every `pnpm` command runs.
`pnpm build` writes one self-contained `konstruct/outputs/viewer.html`; Konstruct fills its
`__KONSTRUCT_DATA__` and `__KONSTRUCT_EXPLAIN__` placeholders when it writes `graph.html`.
1. **Run it with real data:**
```bash
uv run konstruct build examples/jaffle_shop
pnpm install
mkdir -p viewer/dev && cp examples/jaffle_shop/konstruct-out/graph.json viewer/dev/
pnpm dev # http://localhost:5173/viewer.html
```
2. **Where things are.** Pure logic with unit tests in `tests/`: `src/lib/model.ts` (graph indexes,
lineage), `selector.ts` (dbt selectors), `route.ts` (hash routes), `search.ts` (fuzzy search),
`layout.ts`, `focus.ts`, `tree.ts`, `stats.ts`, `transform.ts`, `sql.ts`, `export.ts`, `icu.ts` and
`locale.ts`. State: `src/lib/viewer.svelte.ts` (runes) and `i18n.svelte.ts`. Interface:
`src/components/` (TopBar, Nav, Palette, Lineage, Inspector, Help) and `src/components/pages/`.
Messages: `src/locales/` (en-GB is the source; every UI string goes through `t()`). Styles:
`src/app.css`, following `../kodexlabs.io/DESIGN.md` (slate and sky, Manrope and JetBrains Mono,
nothing below 14px), with logical properties so right-to-left languages work.
Loading the graph (inlined, or fetched when a server marks the page with
`<meta name="konstruct-serve">`) is all in `src/lib/source.ts`. For dev, `viewer/dev/explain.json`
(the second placeholder's data) is read if present. The build adds a hash-based CSP
(`vite.config.ts`): no inline handlers, no `{@html}`, no eval, no static `style` attributes.
3. **Keep the contract.** Element ids and classes (`#nodes [data-id]`, `.row[data-col]`, `#page h1`,
`#select`, `#palette-input`, `#tree`, ...) are what `tests/test_browser.py` drives, with an axe-core
check for WCAG 2.2 AA. Insert text only as text;
never use `{@html}`. The page must make no network requests.
4. **Check and build:**
```bash
pnpm format && pnpm check && pnpm test && pnpm build
cd .. && uv run pytest tests/test_browser.py tests/test_html.py
```
5. **Commit the rebuilt `konstruct/outputs/viewer.html` with the source.** The pre-commit hook
rebuilds it and CI fails if it differs from a fresh build.
6. If the change is visible, refresh the screenshots in `docs/images/` (dark theme, 1600 by 900 at
2x) and the viewer page in `docs/guide/viewer.md`.
Wersje
W bazie nie ma innych skilli o nazwie viewer.
Migawka bazy z 13.11.2026 · wersja paczki d2800d0cb442 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 96change
Wprowadza i kończy zmianę w projekcie Konstruct tak, by przeszła wszystkie kontrole CI, z dokumentacją, plikami wzorcowymi i poprawnym commitem. - 100dev-viewer
Opisuje, jak rozwijać aplikację viewer w pakiecie archbook: komponenty, układ, wyszukiwanie, odtwarzanie i testy e2e. - 86new-input
Dodaje nowe źródło wejścia do Konstruktu, np. orkiestrator, konektor magazynu albo format pliku, z testami i dokumentacją. - 100graph-viewer
Integruje wielokrotnego użytku przeglądarkę grafów CDF (useGraphViewer) w aplikacji Flows przez skopiowanie lokalnego pakietu kodu, do wizualizacji modeli danych i instancji. - 100install-learning-graph-viewer
Instaluje interaktywną przeglądarkę grafu uczenia w projekcie inteligentnego podręcznika z plikiem learning-graph.json, z wyszukiwaniem, filtrami i statystykami. - 100svelte-code-writer
Dostarcza narzędzia CLI do wyszukiwania dokumentacji Svelte 5 i analizy kodu przy każdej edycji komponentów oraz modułów Svelte.