@feugene/granularity 0.28.2 → 0.28.3

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
@@ -32,16 +32,16 @@ strategies.
32
32
 
33
33
  - root export: `@feugene/granularity`;
34
34
  - component subpath exports: `@feugene/granularity/components/<ComponentName>`;
35
- - ready-made CSS entrypoints:
36
- - `@feugene/granularity/foundation.css` — `tokens` + built-in `light`/`dark` themes + `base`;
37
- - `@feugene/granularity/styles.css` `foundation` plus styles for all components;
38
- - `@feugene/granularity/components/<ComponentName>/styles.css` `foundation` plus styles for a specific component and its dependencies;
39
- - low-level foundation exports: `@feugene/granularity/styles/tokens.css`, `@feugene/granularity/styles/base.css`, `@feugene/granularity/styles/themes/light.css`, `@feugene/granularity/styles/themes/dark.css`;
35
+ - ready-made CSS entrypoint: `@feugene/granularity/styles.css` — tokens, base layer, preflight and the
36
+ built-in `light`/`dark` themes in one file, for consumers who do not run the `UnoCSS` preset. A
37
+ component's own CSS is not there and does not need to be: the component's chunk imports it itself;
38
+ - low-level foundation exports: `@feugene/granularity/styles/tokens.css`, `@feugene/granularity/styles/base.css`, `@feugene/granularity/styles/preflight.css`, `@feugene/granularity/styles/themes/light.css`, `@feugene/granularity/styles/themes/dark.css`;
40
39
  - package-level API: `@feugene/granularity/directives`, `@feugene/granularity/fileValidation`;
41
40
  - design tokens as data: `@feugene/granularity/tokens` (typed registry) and the raw `@feugene/granularity/tokens/*.json` source the CSS is generated from;
42
- - two `UnoCSS` integration scenarios:
43
- - `@feugene/granularity/uno` — browser-safe preset;
44
- - `@feugene/granularity/uno-node` — node-oriented preset with CSS/preflight helpers.
41
+ - two `UnoCSS` integration scenarios, both through the granular provider:
42
+ - `@feugene/granularity/granular-provider` — browser-safe registry of components;
43
+ - `@feugene/granularity/granular-provider/node` — the node-side counterpart, which reads CSS and
44
+ preflight from the file system.
45
45
 
46
46
  ## Limitations
47
47
 
@@ -74,11 +74,15 @@ yarn add -D unocss
74
74
  import '@feugene/granularity/styles.css'
75
75
  ```
76
76
 
77
- That's enough to quickly get a working base: `styles.css` already includes `foundation.css` (`tokens`, `base`,
78
- built-in `light`/`dark` themes) and the styles for all components.
77
+ That's enough to get a working base: the file carries the tokens, the base layer, the preflight and the
78
+ built-in `light`/`dark` themes. What it does not carry is the utility classes the components are built
79
+ from — those are generated by the `UnoCSS` preset for the components you actually select. Without the preset
80
+ a component renders with its own CSS but without layout utilities.
79
81
 
80
- If you need a more precise CSS setup, use `@feugene/granularity/foundation.css` together with
81
- `@feugene/granularity/components/<ComponentName>/styles.css`, or assemble styles via the `UnoCSS` preset.
82
+ For a finer setup take the layers apart `@feugene/granularity/styles/tokens.css`,
83
+ `styles/base.css`, `styles/preflight.css`, `styles/themes/<name>.css` — or assemble everything with the
84
+ preset. There is no per-component stylesheet to import: a component that has CSS of its own imports it
85
+ from its own chunk, so a granular import already brings everything it needs.
82
86
 
83
87
  ## Documentation
84
88
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@feugene/granularity",
4
- "version": "0.28.2",
4
+ "version": "0.28.3",
5
5
  "framework": "vue",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@feugene/granularity",
3
3
  "description": "Granularity design system package with Vue 3 components, consumed via the `@feugene/unocss-preset-granular` preset.",
4
- "version": "0.28.2",
4
+ "version": "0.28.3",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
7
7
  "name": "Evgeniy Fureev",
@@ -53,6 +53,7 @@
53
53
  "default": "./dist/index.js"
54
54
  },
55
55
  "./styles/*": "./dist/styles/*",
56
+ "./styles.css": "./dist/styles/index.css",
56
57
  "./composables/useAnnouncer": {
57
58
  "types": "./dist/types/composables/useAnnouncer.d.ts",
58
59
  "import": "./dist/composables/useAnnouncer.js"
@@ -529,6 +530,9 @@
529
530
  "types": "./dist/types/directives/dropzone.d.ts",
530
531
  "import": "./dist/directives/dropzone.js"
531
532
  },
533
+ "./directives/globalDirectives": {
534
+ "types": "./dist/types/directives/globalDirectives.d.ts"
535
+ },
532
536
  "./directives/hotkey": {
533
537
  "types": "./dist/types/directives/hotkey.d.ts",
534
538
  "import": "./dist/directives/hotkey.js"
@@ -625,7 +629,7 @@
625
629
  "vue-tsc": "^3.3.7"
626
630
  },
627
631
  "scripts": {
628
- "build": "vite build && gr-check-dist-dev-guard && node scripts/check-dist-no-tests.mjs && node scripts/generate-web-types.mjs && vue-tsc -p tsconfig.build.json",
632
+ "build": "vite build && gr-check-dist-dev-guard && node scripts/check-dist-no-tests.mjs && node scripts/generate-web-types.mjs && vue-tsc -p tsconfig.build.json && node scripts/check-dist-exports.mjs",
629
633
  "check:messages": "fint-i18n-check-messages src/i18n/locales",
630
634
  "dev": "vite build --watch",
631
635
  "doctor": "granular doctor ./granular.options.mjs --strict",