Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/showcase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@feugene/granularity-editor": "^0.3.1",
"@feugene/granularity-forms-schema": "^0.4.0",
"@feugene/granularity-media": "^0.7.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@floating-ui/dom": "^1.8.0",
"vue": "^3.5.42",
"vue-router": "^4.6.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"@feugene/fint-i18n": "^0.7.0",
"@feugene/granularity": "^0.38.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@feugene/unplugin-granularity": "^0.7.0",
"@types/node": "^26.4.0",
"@vitejs/plugin-vue": "^6.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-chrono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"@feugene/fint-i18n": "^0.7.0",
"@feugene/granularity": "^0.38.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@feugene/unplugin-granularity": "^0.7.0",
"@types/node": "^26.4.0",
"@vitejs/plugin-vue": "^6.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"@feugene/fint-i18n": "^0.7.0",
"@feugene/granularity": "^0.38.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@feugene/unplugin-granularity": "^0.7.0",
"@types/node": "^26.4.0",
"@vitejs/plugin-vue": "^6.0.8",
Expand Down
14 changes: 14 additions & 0 deletions packages/granularity-devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [v0.3.1] 2026-08-28

### Changed

- The rationale for "tokens resolving to nothing" is corrected in the README. Preset `0.15.0` closed the
`themes.tokensFile` blind spot the section was justified by — the fix landed on the feedback this package
filed. Swapping the token file on `apps/playground` now moves `doctor` from 8 findings to 52.

What the panel adds is no longer "the static check is blind here" but "the static check answers a different
question": not «does any layer define this token in this configuration» but «is it empty right now, on this
element». Measured on the same stand — healthy: `doctor` 8, panel 0; swapped: `doctor` 52, panel 11. The eight
on a healthy stand are tokens `GrAlert` assigns itself with an inline style, which static analysis cannot tell
apart from undefined.

## [v0.3.0] 2026-08-28

### Added
Expand Down
26 changes: 19 additions & 7 deletions packages/granularity-devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,25 @@
**Токены, разрешающиеся в пустоту** — отдельной секцией: `--gr-*`, который
правило компонента читает **без запасного значения**, а браузер отдаёт пустым.
Такое объявление отбраковывается на этапе вычисления, и компонент выходит без
фона, без рамки, с прямыми углами — при зелёной сборке и валидном CSS. Смежную
проверку делает `granular doctor` (диагностика `token-undefined` с 0.14.0), но
она статическая и слепа ровно там, где ошибаются чаще всего: `themes.tokensFile`
**заменяет** `tokens.css` пакета, а доктор считает заданным объединение обоих
файлов. В `0.14.1` ту же дыру закрыли для `themes.themeFiles`, но не для
`themes.tokensFile`: стенд с такой подменой доктор по-прежнему проходит молча —
панель показывает одиннадцать пустых токенов типографики и анимации.
фона, без рамки, с прямыми углами — при зелёной сборке и валидном CSS.

Смежную проверку делает `granular doctor` (диагностика `token-undefined`), и с
пресета `0.15.0` она этот класс ловит: подмена `tokens.css` через
`themes.tokensFile` поднимает на стенде `apps/playground` число находок с 8 до
52. Панель отвечает на другой вопрос — не «задаёт ли токен хоть один слой в этой
конфигурации», а «пуст ли он **сейчас, на этом элементе**». Замеры на том же
стенде:

| | `doctor` | панель |
| --- | --- | --- |
| штатный конфиг | 8 находок | 0 |
| подмена `tokensFile` | 52 | 11 |

Расхождения не противоречие. Восемь находок на здоровом стенде — токены,
которые `GrAlert` выставляет себе сам инлайновым стилем: статикой такое не
отличить от незаданного, а браузер их видит заданными. Пятьдесят две против
одиннадцати — это весь замкнутый набор выбранных компонентов против того, что
реально на экране, с именем класса, который токен читает.

**Issues** — все предупреждения пакета одним списком со счётчиком повторов,
вместо тонущих в консоли строк. Сюда же попадают **недостающие обязательные
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@feugene/granularity-devtools",
"description": "Vue DevTools panel for @feugene/granularity — where a prop value came from, the overlay layer stack and design-system warnings.",
"version": "0.3.0",
"version": "0.3.1",
"license": "SEE LICENSE IN LICENSE",
"author": {
"name": "Evgeniy Fureev",
Expand Down
10 changes: 5 additions & 5 deletions packages/granularity-devtools/src/resolve/emptyTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* свойство отбраковывается на этапе вычисления, и компонент выходит без фона,
* без рамки, с прямыми углами. Сборка при этом зелёная — CSS валиден.
*
* Статический `granular doctor` отвечает на смежный вопрос («какой токен не
* задаёт ни один granular-слой») и слеп ровно там, где ошибаются чаще всего:
* `themes.tokensFile` **заменяет** `tokens.css` пакета, но доктор считает
* заданным объединение обоих файлов — и подмену базовых токенов приложением не
* замечает. Здесь источник истины — сам браузер: читается то, что получилось.
* Статический `granular doctor` отвечает на смежный вопрос — «задаёт ли токен
* хоть один granular-слой в этой конфигурации». Здесь вопрос другой: «пуст ли он
* сейчас, на этом элементе». Разница видна на живом стенде: токен, который
* компонент выставляет себе сам инлайновым стилем, статике неотличим от
* незаданного, а браузеру — заданный.
*
* Секция `unset` из `tokenUsage` отвечает на другой вопрос: там объявленные
* токены компонента, и пустота в них — норма (`kind: 'hook'`, состояния
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"@feugene/fint-i18n": "^0.7.0",
"@feugene/granularity": "^0.38.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@feugene/unplugin-granularity": "^0.7.0",
"@tiptap/core": "^3.30.5",
"@tiptap/extensions": "^3.30.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-forms-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"@feugene/granularity": "^0.38.0",
"@feugene/granularity-chrono": "^0.10.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@feugene/unplugin-granularity": "^0.7.0",
"@types/node": "^26.4.0",
"@vitejs/plugin-vue": "^6.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-media/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"@feugene/fint-i18n": "^0.7.0",
"@feugene/granularity": "^0.38.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@feugene/unplugin-granularity": "^0.7.0",
"@types/node": "^26.4.0",
"@vitejs/plugin-vue": "^6.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity-test-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"devDependencies": {
"@antfu/eslint-config": "^9.3.0",
"@axe-core/playwright": "^4.13.0",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@playwright/test": "^1.62.1",
"@types/node": "^26.4.0",
"@vue/test-utils": "^2.4.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/granularity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
"@antfu/eslint-config": "^9.3.0",
"@feugene/fint-i18n": "^0.7.0",
"@feugene/granularity-test-kit": "^0.8.1",
"@feugene/unocss-preset-granular": "^0.14.1",
"@feugene/unocss-preset-granular": "^0.15.0",
"@floating-ui/dom": "^1.8.0",
"@iconify-json/lucide": "^1.2.126",
"@types/node": "^25.9.5",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@
"@unocss/preset-mini" "^66.7.5"
"@unocss/rule-utils" "^66.7.5"

"@feugene/unocss-preset-granular@^0.14.1":
version "0.14.1"
resolved "https://registry.yarnpkg.com/@feugene/unocss-preset-granular/-/unocss-preset-granular-0.14.1.tgz#a9359fdbab9ad10d5af6b3db18c11e4adb551aa3"
integrity sha512-eNoY01qUwIPnal1cfVJCJO0wZzSYMjISJkJ148yOeqdH+pWkmLXQlhnC/Orv+IEIAVSjExOULLrSmsa0/dhiNA==
"@feugene/unocss-preset-granular@^0.15.0":
version "0.15.0"
resolved "https://registry.yarnpkg.com/@feugene/unocss-preset-granular/-/unocss-preset-granular-0.15.0.tgz#f4706af3152a310dc108d658fcdac51dc484a9ac"
integrity sha512-mXejPG3H5nwgKPkxLeaQoD/G1l714refIZqnEsSkoJ6SARcoCcEmi2iO55zwNppHz54Q+5RK7ljCHhRCo2v2aQ==
dependencies:
"@feugene/unocss-mini-extra-rules" "^0.8.1"

Expand Down
Loading