@manjunathhk/design-tokens 1.0.0 → 1.1.0-rc.1

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
@@ -169,6 +169,32 @@ font-src 'self' https://design.manjunathhk.in;
169
169
  Add `https://cdn.jsdelivr.net` to both directives only on a site that is
170
170
  actively using the jsDelivr fallback above.
171
171
 
172
+ ## Optional: shareable stylelint config
173
+
174
+ This package exports `@manjunathhk/design-tokens/stylelint` for consumer CSS.
175
+ Install `stylelint` in your own project, then extend this config:
176
+
177
+ ```sh
178
+ npm install --save-dev stylelint
179
+ ```
180
+
181
+ ```json
182
+ {
183
+ "extends": ["stylelint-config-standard", "@manjunathhk/design-tokens/stylelint"]
184
+ }
185
+ ```
186
+
187
+ The shared rules reject:
188
+
189
+ - hex literals (`color-no-hex`);
190
+ - named colours (`color-named: "never"`);
191
+ - colour functions case-insensitively via `function-disallowed-list`:
192
+ `rgb`, `rgba`, `hsl`, `hsla`, `hwb`, `lab`, `lch`, `oklab`, `oklch`,
193
+ `color`, `color-mix`.
194
+
195
+ `color-mix()` is banned even with token arguments: derived colours belong in
196
+ tokens. `transparent`, `currentcolor` and system colours stay allowed.
197
+
172
198
  ## Versioning policy
173
199
 
174
200
  Semantic versioning is what makes "change once, reflect everywhere" safe:
package/dist/_tokens.scss CHANGED
@@ -1,4 +1,4 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
2
  @use "sass:map";
3
3
 
4
4
  $mk-color-accent: var(--mk-color-accent);
package/dist/base.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
2
  /*
3
3
  * Opt-in base built only on the tokens. Selectors sit inside :where() so they
4
4
  * carry zero specificity and any site rule overrides them.
package/dist/fonts.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
2
  @font-face {
3
3
  font-family: "IBM Plex Sans";
4
4
  font-style: normal;
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
2
  @font-face {
3
3
  font-family: "IBM Plex Sans";
4
4
  font-style: normal;
@@ -0,0 +1,5 @@
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
+ import type { Config } from "stylelint";
3
+
4
+ declare const config: Config;
5
+ export default config;
@@ -0,0 +1,8 @@
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
+ export default {
3
+ rules: {
4
+ "color-no-hex": true,
5
+ "color-named": "never",
6
+ "function-disallowed-list": ["/^(rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)$/i"]
7
+ }
8
+ };
package/dist/tokens.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
2
  :root {
3
3
  --mk-color-accent: #2A5AA8;
4
4
  --mk-color-accent-subtle: rgba(42, 90, 168, 0.13);
package/dist/tokens.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
2
  /** Colour tokens; light and dark share these keys. */
3
3
  export interface ColorTokens {
4
4
  readonly "color.accent": string;
package/dist/tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.1.0-rc.1",
3
3
  "light": {
4
4
  "color.accent": "#2A5AA8",
5
5
  "color.accent-subtle": "rgba(42, 90, 168, 0.13)",
package/dist/tokens.mjs CHANGED
@@ -1,5 +1,5 @@
1
- /*! @manjunathhk/design-tokens v1.0.0 */
2
- export const version = "1.0.0";
1
+ /*! @manjunathhk/design-tokens v1.1.0-rc.1 */
2
+ export const version = "1.1.0-rc.1";
3
3
  export const light = {
4
4
  "color.accent": "#2A5AA8",
5
5
  "color.accent-subtle": "rgba(42, 90, 168, 0.13)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manjunathhk/design-tokens",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-rc.1",
4
4
  "description": "Design tokens and a small opt-in base stylesheet shared by Manjunath's websites.",
5
5
  "license": "MIT",
6
6
  "author": "Manjunath Krishnasa",
@@ -28,12 +28,24 @@
28
28
  "types": "./dist/tokens.d.ts",
29
29
  "default": "./dist/tokens.mjs"
30
30
  },
31
+ "./stylelint": {
32
+ "types": "./dist/stylelint.d.ts",
33
+ "default": "./dist/stylelint.mjs"
34
+ },
31
35
  "./_tokens.scss": "./dist/_tokens.scss",
32
36
  "./package.json": "./package.json"
33
37
  },
34
38
  "sideEffects": [
35
39
  "*.css"
36
40
  ],
41
+ "peerDependencies": {
42
+ "stylelint": ">=16"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "stylelint": {
46
+ "optional": true
47
+ }
48
+ },
37
49
  "publishConfig": {
38
50
  "access": "public",
39
51
  "provenance": true