@feugene/granularity-media
Releases of @feugene/granularity-media from its CHANGELOG: the latest 8 in full, the earlier ones as a list of versions.
v1.1.02026-10-16
Changed
- Peer
@feugene/granum—>=2.0.0 <3.0.0. Пакет собран granum 2.0:distне импортирует granum — контракт встроен вdist/granum/contract.js, и SSR-сервер с внешними пакетами, задеплоенный с--omit=dev, больше не падает сERR_MODULE_NOT_FOUND. Приложению —@feugene/granumи@feugene/granum-engine-wind^2.0.0. - Компонент из корня пакета —
ComponentRootImportErrorу приложения на granum 2.0. Компоненты берут из<пакет>/components/<Имя>. - Авто-импорт — один
GranularityResolver()из@feugene/unplugin-granularity1.1: он находит пакет вpackage.jsonприложения сам, порядок резолверов больше не важен. Собственный./resolverостаётся для уже написанных конфигов. - Необязательный peer
@feugene/fint-i18n—>=0.9.0 <1.0.0. Пакет тестируется на 0.9 вместе с ядром; на 0.7 и 0.8 он не проверялся.
v1.0.62026-10-13
Fixed
- Пустая рамка
GrImageCropдержит соотношение кадра. Без картинки рамка стояла на своей минимальной высоте (min-h-48, 192px), аaspect-ratioполучала только вместе с ней: фото, пришедшее после монтирования, растягивало рамку до высоты кадра и сдвигало всё под ней. Теперь соотношение у рамки с самого начала, слот#emptyстоит по её центру, а слишком высокое его содержимое обрезается, а не растягивает рамку. Это заметно меняет раскладку пустого кропа: при умолчательномaspectRatio = 1в широкой колонке пустая рамка теперь квадрат во всю ширину, а не полоса в 192px, иsizeна её высоту больше не влияет — высоту задаёт только соотношение. - Кадр
GrImageCrop— ровно в соотношении рамки. Область считалась от окна, измеренного в дробных CSS-пикселях внутри бордера, и расходилась сaspectRatioна долю пикселя: картинка 1600×1200 в рамке 4:3 без увеличения давалаsh = 1199.4со сдвигомsy = 0.6, аoutput: { width: 1200 }при3 / 4— JPEG 1200×1602. Теперь кадр считается от рамки, доведённой до точного соотношения, и привязан к пикселям исходника: такая картинка уходит в кадр целиком, а вторая сторона результата равнаround(width / aspectRatio).
v1.0.52026-10-07
Fixed
GrVideoPlayerпосле гидрации знает длительность и сбой. Серверный HTML уже несёт<video>сsrc: браузер читает метаданные — или ломается — раньше, чем плеер вешает слушатели вonMounted, иloadedmetadata/errorтерялись. Плеер оставался без длительности, а битый источник — без слоя ошибки. Теперь после монтирования плеер сверяется с элементом:readyStateиerrorпомнят то, что события уже сказали.
v1.0.42026-10-06
Fixed
- Гидрация
GrCodeScannerбез расхождений. Решение «нативногоBarcodeDetectorнет» принималось в рендере: сервер писал «This browser cannot read codes» без кнопки, Chrome — «The camera is off.» с кнопкой «Start scanning», и гидрация расходилась на каждой странице со сканером, а до неё мелькало ложное сообщение. Теперь поддержка проверяется после монтирования: первый рендер везде — нейтральное состояние покоя. - Со слотом
#controlsв рамке нет второй кнопки «Start scanning». Слот владеет действиями; в рамке остаётся только текст состояния. GrCameraStatusэкспортируется из входаGrCodeScanner. Слот#controlsотдаётstatus: GrCameraStatus, а тип был только у входаGrCameraCapture.
Documentation
- Появились описания у методов
GrCameraCapture,GrCodeScanner,GrImageCropиGrVideoPlayer, которые в API и на портале были пустыми.
v1.0.32026-10-06
Fixed
- Появились описания у пропов, которые в API, подсказках IDE и на портале были
пустыми: у
GrCameraCapture—output(и полейGrCameraCaptureOutput),size,disabled,ariaLabel; уGrCodeScanner—deviceId,size,disabled,ariaLabel; уGrImageCrop—shape,maxZoom,output,size,disabled,ariaLabel; уGrVideoPlayer—src,autoplay,loop,size,disabled,ariaLabel. Описаны и события всех четырёх.
v1.0.22026-10-06
Changed
- Safelist компонентов пуст. Все записи лежали в коде целыми литералами —
в шаблонах и
.ts-хелперах. granum извлекает такие классы сам, обходя от входа компонента все его чанки, общие включительно, и вычищал записи из манифеста как уже извлечённые. Списки пережили UnoCSS-пресет, который общий чанк не сканировал. Набор классов не изменился — проверено сверкой манифестов по селекции каждого компонента; расходятся только случайные токены, которые экстрактор выхватывает из минифицированного кода. - Удалён
internal/classTokens.ts: он служил только спискам. - Подключён гейт
defineSafelistGateиз test-kit: запись safelist, которая лежит целым литералом в коде компонента, он называет лишней. Нужен safelist только классу, собранному в рантайме из частей.
v1.0.12026-09-29
Гигиена сборки. Артефакт пакета не изменился — проверено побайтно.
Changed
-
libInjectCssубран из конфига сборки. Плагин вписывал в JS-чанк компонентаimport '../styles.css'; до granum это был единственный канал доставки стилей, а с granum тот же файл приезжает приложению через манифест — и потребитель получал два экземпляра, причём второй вне слоёвgranum.*и потому сильнее всей библиотеки.У этого пакета компонентного CSS нет, и плагин стоял вхолостую: сборка с ним и без него совпадает побайтно, числа в
docs/entry-sizes.mdне сдвинулись. Убран до того, как появится первый компонент со стилями — тогда ловушка захлопнулась бы молча.Ядро сняло плагин при переезде на granum,
granularity-editorиgranularity-code— в 1.0.1, где он уже стрелял. Диагностикаcss-double-delivery, которая обязана была это назвать, не работала вовсе; починена в@feugene/granum1.0.2. -
vite-plugin-lib-inject-cssубран из devDependencies: больше не импортируется.
v1.0.02026-09-28
Переезд на @feugene/granum 1.0 и первый мажор пакета.
Публичная поверхность не менялась — ломающий тут сам конвейер: peer-зависимость
уезжает с @feugene/unocss-preset-granular на @feugene/granum
(>=1.0.0 <2.0.0), а приложение переходит с uno.config.ts на
granum.config.ts. Версия выровнена с ядром: @feugene/granularity 1.0.0.
Перед обновлением стоит прочитать руководство по переезду в granum — в частности про каскадные слои и сброс браузерных стилей, который теперь нужно импортировать в слой.
Changed
yarn doctorisgranum doctor --strict, without a wrapper script.scripts/granum-doctor.mjsexisted for two reasons and both are gone. It mutedtoken-undefinedthrough the monorepo’s token registry — granum 0.4.0 derives the same verdict from the code itself (a use with a fallback, a token the component assigns itself anddynamicTokensare not findings), so the registry is unnecessary. And it kept recorded debt from failing the gate — that is now--allow=<codes>. Findings across the eight packages went from 861 to 1, and that one is the deliberate!importanton the drag cursor inGrTransfer, recorded through--allow.- Safelists in the manifests shrank from 3479 entries to 430 (zero in every companion): granum drops entries that static extraction already covers. Nothing in the sources changed and the CSS is byte-for-byte identical — the safelist there is derived from the component’s own class constants, and whether extraction sees a given class is decided by chunking, not by the author.
- The utility engine changed:
@feugene/granum-engine-wind^0.4.0instead of@feugene/granum-engine-mini. It vendorspreset-wind3rather thanpreset-mini, so the vocabulary gainedborder-collapse,list-none,touch-none,table-fixedandscroll-p*— utilities that existed neither inpreset-mininor in the former extra rules, which is why a class in the markup silently produced no CSS. The package dialect is nowunocss/preset-wind3+granum@66, and the peer on the core moved to>=0.3.0 <1.0.0. A consumer swaps the pair in dev dependencies and replacesminiEngine()withwindEngine()ingranum.config.*. - The package is built by
@feugene/granum, not by the@feugene/unocss-preset-granularpreset. Thedistlayout and the component entries are driven by thegranumProvider({ provider, engine: miniEngine(), entries })plugin: it builds them from the provider registry, extracts the classes and the consumed tokens by walking the bundle graph, and writes a machine-generatedgranum.manifest.jsonnext todist. The package’s ownbuild.lib,granularChunkFileNamesand hand-written component entries are gone fromvite.config.ts. - The manifest is exported as
./granum.manifest.json. An application resolves it through exactly that subpath — without the export the package’s provider cannot be wired up. granum never scansnode_modules: the component classes are computed when the package is built. - The peer changed:
@feugene/granum>=0.2.0 <1.0.0instead of the preset. The utility engine comes from the application (@feugene/granum-engine-minisits in the package’s dev dependencies), while the package declares a vocabulary dialect in the manifest —unocss/preset-mini+granum@66, the vocabulary its component classes are written against. An application running an engine of a different vocabulary getsprovider-dialect-mismatchand every lost class listed by name instead of silently half-drawn components. - The descriptor contract was renamed without a change of meaning.
defineGranularComponent→defineGranumComponent,defineGranularProvider→defineGranumProvider, imported from@feugene/granum/contract. Donors are declared as strings (dependencies: ['@feugene/granularity']) rather than instances: an instance would pull the donor into the graph in object form and make the application scan itsdistinstead of reading the manifest.packageBaseUrlis gone — the manifest’s directory is the base — sogranular-provider/nodeis now a plain alias of the browser entry. granular.options.mjswas replaced bygranum.config.mjs, andyarn doctorrunsgranum doctoragainst the package’s manifests.cameraState.tsmoved fromcomponents/GrCameraCapture/tocomponents/shared/. The scanner reads it too, through the shareduseCameraStream, and an import from another component’s directory counts as a declared edge — declaring it would have made a consumer of the scanner pay for the camera’s CSS and safelist in full. The public surface is unchanged:GrCameraCapture/index.tsre-exports from there.
Earlier versions
The bodies of these releases are not shown: the full feed weighs more than a page is allowed to. The file in the repository is always complete.
v0.7.12026-08-27v0.7.02026-08-27v0.6.12026-08-25v0.6.02026-08-24v0.5.02026-08-24v0.4.02026-08-24v0.3.02026-08-23v0.2.22026-08-23v0.2.12026-08-23v0.2.02026-08-23v0.1.02026-08-23