@filipgutica/design-system 1.0.13 → 1.0.15
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/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Filip's design language for any framework: the spec, the tokens, the component catalogue, and the editor themes. It ships as the npm package `@filipgutica/design-system`.
|
|
4
4
|
|
|
5
|
-
- **Agents** get `language/` at `~/design-
|
|
5
|
+
- **Agents** get `language/` at `~/design-system` through filip-stack host config, or by copying it from the package; the site's [Agents](https://filipgutica.github.io/design-system/#agents) section has both.
|
|
6
6
|
- **Vue apps** can use [`@filipgutica/ui`](https://github.com/filipgutica/ui), a Vue component library built on this design system.
|
|
7
7
|
- **Site:** <https://filipgutica.github.io/design-system/> has the Overview, Foundations, and Components pages, with `index.json` and `llms.txt` for agents.
|
|
8
8
|
|
package/language/components.html
CHANGED
|
@@ -1481,10 +1481,10 @@
|
|
|
1481
1481
|
<div class="state wide"><p class="folio-h2">Install</p><span class="caption">Section heading with its <code>##</code> mark</span></div>
|
|
1482
1482
|
</div></div>
|
|
1483
1483
|
<div class="row"><h4>Steps</h4><div class="states">
|
|
1484
|
-
<div class="state wide"><ol class="steps"><li><h4>Install the CLI</h4><p>Homebrew installs the launcher.</p></li><li><h4>Apply host config</h4><p>It copies the guidance and the design
|
|
1484
|
+
<div class="state wide"><ol class="steps"><li><h4>Install the CLI</h4><p>Homebrew installs the launcher.</p></li><li><h4>Apply host config</h4><p>It copies the guidance and the design system.</p></li></ol><span class="caption">Rest: two steps</span></div>
|
|
1485
1485
|
</div></div>
|
|
1486
1486
|
<div class="row"><h4>Facts</h4><div class="states">
|
|
1487
|
-
<div class="state wide"><dl class="facts"><div><dt>Installed to</dt><dd>~/design-
|
|
1487
|
+
<div class="state wide"><dl class="facts"><div><dt>Installed to</dt><dd>~/design-system</dd></div><div><dt>Source</dt><dd>@filipgutica/design-system</dd></div></dl><span class="caption">Rest: two facts</span></div>
|
|
1488
1488
|
</div></div>
|
|
1489
1489
|
<div class="row"><h4>Definitions</h4><div class="states">
|
|
1490
1490
|
<div class="state wide"><dl class="definitions"><dt><code>--all</code></dt><dd>Apply every target, including skipped ones.</dd><dt><code>--home</code></dt><dd>Install into another home directory.</dd></dl><span class="caption">Rest: two terms</span></div>
|
|
@@ -1805,10 +1805,13 @@
|
|
|
1805
1805
|
});
|
|
1806
1806
|
});
|
|
1807
1807
|
|
|
1808
|
-
// Project switcher: Escape closes it and returns focus to the summary.
|
|
1808
|
+
// Project switcher: Escape closes it and returns focus to the summary. Focus moving to an element outside it
|
|
1809
|
+
// closes it, and so does a press outside it. Safari does not focus a link on a click or tap, so a press on a
|
|
1810
|
+
// link moves focus to no element; closing then would hide the link before it gets its click.
|
|
1809
1811
|
document.querySelectorAll('.projects:not(.is-open)').forEach((menu) => {
|
|
1810
1812
|
menu.addEventListener('keydown', (e) => { if (e.key === 'Escape' && menu.open) { menu.open = false; menu.querySelector('summary').focus(); } });
|
|
1811
|
-
menu.addEventListener('focusout', (e) => { if (!menu.contains(e.relatedTarget)) menu.open = false; });
|
|
1813
|
+
menu.addEventListener('focusout', (e) => { if (e.relatedTarget && !menu.contains(e.relatedTarget)) menu.open = false; });
|
|
1814
|
+
document.addEventListener('pointerdown', (e) => { if (menu.open && !menu.contains(e.target)) menu.open = false; });
|
|
1812
1815
|
});
|
|
1813
1816
|
|
|
1814
1817
|
// ---------- Catalogue shell: header strip, rail, Find, shortcuts, location, phone drawer ----------
|
package/language/components.md
CHANGED
|
@@ -473,7 +473,7 @@ Layer: Identity.
|
|
|
473
473
|
- **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
|
|
474
474
|
- **Don't.** The site header on an application screen. An application keeps its own navigation.
|
|
475
475
|
- **Phone.** At `max-width: 800px` the header is static, with `--space-2` above, below, and between its rows. The first row holds the switcher at the start and the picker at the end. Where both do not fit, as at 320px, the picker wraps to its own row at the start; the project name never truncates. With three or more links, the links take the next row, as a strip that scrolls with its fades. Where the strip clips a link, at least 16px of that link stays in view under the fade: on the narrowest phones (a strip 340px wide or less, by container query) the strip's rows take 6px (`0.375rem`) side padding. One or two links stay on the first row, beside the picker; at `max-width: 640px` they become plain text links after the switcher, 12px (`--space-3`) apart, and the current link takes `--color-accent` text in medium weight, with no fill. A documentation page hides them at that width, because its [footer](#page-type-and-helpers) carries them. A page with a [section rail](#section-rail) puts the rail's labelled trigger `--space-2` below the header.
|
|
476
|
-
- **Keyboard and screen reader.** The summary is named "Project: <name>". Escape closes the menu and returns focus to the summary; moving focus
|
|
476
|
+
- **Keyboard and screen reader.** The summary is named "Project: <name>". Escape closes the menu and returns focus to the summary; moving focus to an element outside it, or a press outside it, closes it. A press on a link inside keeps it open, though Safari does not focus the link.
|
|
477
477
|
- **Motion.** The chevron turns 180° while the menu is open, over `--duration-fast` with `--ease-out`. The menu itself opens at once.
|
|
478
478
|
- **Forced colors.** The rule below the header takes the system text colour, and the menu and the site links follow the navigation list rules. A current text link on a phone takes an underline instead of the system border.
|
|
479
479
|
|
|
@@ -125,7 +125,7 @@ function buildView({ snapshot, windowKey, region, percent, escape }) {
|
|
|
125
125
|
export async function renderReport(snapshot, { mode = 'inline', tokens = '' } = {}) {
|
|
126
126
|
validateSnapshot(snapshot)
|
|
127
127
|
if (!['inline', 'standalone'].includes(mode)) fail('mode must be inline or standalone')
|
|
128
|
-
if (mode === 'standalone' && !tokens.trim()) fail('Standalone mode requires design-
|
|
128
|
+
if (mode === 'standalone' && !tokens.trim()) fail('Standalone mode requires design-system CSS tokens')
|
|
129
129
|
const css = await readFile(new URL('./report.css', import.meta.url), 'utf8')
|
|
130
130
|
const regions = [...new Set(snapshot.windows.flatMap((w) => w.rows.map((r) => r.region)))].sort()
|
|
131
131
|
const view = buildView({ snapshot, windowKey: snapshot.defaultWindow, region: '', percent: formatPercent, escape: escapeHtml })
|
|
@@ -8,7 +8,7 @@ The renderer's `--mode inline` output has a transparent outer surface and host t
|
|
|
8
8
|
|
|
9
9
|
## Standalone / Claude attachment
|
|
10
10
|
|
|
11
|
-
Use `--mode standalone --tokens ~/design-
|
|
11
|
+
Use `--mode standalone --tokens ~/design-system/tokens.css` to inline the installed design system tokens. This keeps the export readable without host CSS, a Vue runtime, an npm install, or network access. The same normalized snapshot and view function drive both modes.
|
|
12
12
|
|
|
13
13
|
The HTML file is an uploadable, self-contained snapshot: embed its dataset, styles and JavaScript; keep filters local. It must work without `window.openai`, a connector, a server or a fetch request. Open the actual standalone file without host-provided styles before calling it portable. Describe it as ready to attach to Claude, not as uploaded or proven compatible with a particular Claude deployment unless that was verified.
|
|
14
14
|
|
|
@@ -12,7 +12,7 @@ Proceed when the source and scope are explicit and the retrieved coverage suppor
|
|
|
12
12
|
|
|
13
13
|
## Build the view
|
|
14
14
|
|
|
15
|
-
Follow the repository's design system, or `~/design-
|
|
15
|
+
Follow the repository's design system, or `~/design-system/DESIGN.md` when present. Inline views inherit host fonts and theme; standalone exports use the same design system's tokens. Use semantic success/warning/error colors with text labels. Preserve readability when fitting overview and detail together; relax height before shrinking table text below 12px or hiding requested rows.
|
|
16
16
|
|
|
17
17
|
- For additive count breakdowns with a group filter and a time picker, use the bundled renderer and [snapshot contract](visualizations/count-snapshots.md). It derives totals and percentages from the same cells, rejects incomplete or inconsistent input, and uses one render function for initial and interactive states.
|
|
18
18
|
- For latency, distributions, time series, or non-additive estimates, choose the appropriate chart and retain the same measurement and delivery checks. Do not force these into the count renderer or add percentile values together.
|
|
@@ -20,8 +20,8 @@ Follow the repository's design system, or `~/design-language/DESIGN.md` when pre
|
|
|
20
20
|
The count renderer accepts a normalized JSON snapshot; it does not query a provider:
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
node ~/design-
|
|
24
|
-
node ~/design-
|
|
23
|
+
node ~/design-system/visualizations/build-count-report.mjs snapshot.json report-inline.html --mode inline
|
|
24
|
+
node ~/design-system/visualizations/build-count-report.mjs snapshot.json report.html --mode standalone --tokens ~/design-system/tokens.css
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Choose readable density for the actual number of items. Keep the overview and requested detail together without hiding important categories on narrow screens. The count-table layout and responsive behavior are described in the snapshot contract. Exact codes and category classes must have different labels.
|