@primer/primitives 7.17.0 → 8.0.0-rc.473cfc21

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.
Files changed (2) hide show
  1. package/package.json +3 -11
  2. package/src/utils-v1.ts +0 -36
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@primer/primitives",
3
- "version": "7.17.0",
3
+ "version": "8.0.0-rc.473cfc21",
4
4
  "description": "Typography, spacing, and color primitives for Primer design system",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/**/*",
8
8
  "!src/**/*.test.ts"
9
9
  ],
10
- "main": "dist/js/index.js",
11
- "types": "dist/js/index.d.ts",
12
10
  "repository": "https://github.com/primer/primitives",
13
11
  "keywords": [
14
12
  "primitives",
@@ -25,7 +23,6 @@
25
23
  },
26
24
  "homepage": "https://github.com/primer/primitives#readme",
27
25
  "scripts": {
28
- "build": "ts-node ./scripts/build.ts && tsc --project tsconfig.build.json",
29
26
  "build:next": "npm run build:v8 && npm run build:fallbacks && npm run build:figma",
30
27
  "build:v8": "ts-node ./scripts/buildTokens.ts",
31
28
  "build:fallbacks": "ts-node ./scripts/buildFallbacks.ts",
@@ -40,10 +37,10 @@
40
37
  "lint:tokens": "ts-node ./scripts/validateTokenJson.ts",
41
38
  "prebuild": "rm -rf dist",
42
39
  "prebuild:next": "rm -rf dist",
43
- "prepack": "npm run build && npm run build:next",
40
+ "prepack": "npm run build:next",
44
41
  "prepare": "husky",
45
42
  "release": "changeset publish",
46
- "start:storybook": "npm run build && npm run build:next && cd docs/storybook && npm run storybook",
43
+ "start:storybook": "npm run build:next && cd docs/storybook && npm run storybook",
47
44
  "test": "jest --verbose --coverage"
48
45
  },
49
46
  "prettier": "@github/prettier-config",
@@ -53,9 +50,7 @@
53
50
  "@changesets/cli": "^2.27.1",
54
51
  "@github/prettier-config": "^0.0.6",
55
52
  "@playwright/test": "^1.43.0",
56
- "@types/flat": "^5.0.1",
57
53
  "@types/jest": "^29.5.2",
58
- "@types/lodash": "^4.14.195",
59
54
  "@types/node": "^20.4.0",
60
55
  "@typescript-eslint/eslint-plugin": "^5.61.0",
61
56
  "@typescript-eslint/parser": "^5.61.0",
@@ -74,13 +69,10 @@
74
69
  "eslint-plugin-react": "^7.29.4",
75
70
  "eslint-plugin-react-hooks": "^4.4.0",
76
71
  "eslint-plugin-storybook": "^0.6.15",
77
- "flat": "^5.0.2",
78
72
  "husky": "^9.0.11",
79
73
  "jest": "^29.6.1",
80
74
  "json5": "^2.2.1",
81
- "lodash": "^4.17.20",
82
75
  "markdown-table-ts": "^1.0.3",
83
- "mkdirp": "^3.0.1",
84
76
  "prettier": "^2.7.1",
85
77
  "style-dictionary": "^3.9.2",
86
78
  "ts-jest": "^29.1.2",
package/src/utils-v1.ts DELETED
@@ -1,36 +0,0 @@
1
- import {lighten as _lighten, transparentize, darken as _darken} from 'color2k'
2
- import deepmerge from 'deepmerge'
3
- import _get from 'lodash/get'
4
- import isFunction from 'lodash/isFunction'
5
-
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
- type Value = string | ((obj: any) => string)
8
-
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- export function resolveValue(value: Value, obj: any): string {
11
- return isFunction(value) ? resolveValue(value(obj), obj) : value
12
- }
13
-
14
- export function merge(...objects: object[]) {
15
- return deepmerge.all(objects, {arrayMerge: (target, source) => source})
16
- }
17
-
18
- export function get(path: string) {
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- return (obj: any) => _get(obj, path)
21
- }
22
-
23
- export function alpha(value: Value, amount: number) {
24
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
- return (obj: any) => transparentize(resolveValue(value, obj), 1 - amount).replace(/ /g, '')
26
- }
27
-
28
- export function lighten(value: Value, amount: number) {
29
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
- return (obj: any) => _lighten(resolveValue(value, obj), amount).replace(/ /g, '')
31
- }
32
-
33
- export function darken(value: Value, amount: number) {
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- return (obj: any) => _darken(resolveValue(value, obj), amount).replace(/ /g, '')
36
- }