UNPKG

@patreon/studio

Version:

Patreon Studio Design System

308 lines (307 loc) 11.1 kB
{ "name": "@patreon/studio", "version": "12.50.1", "description": "Patreon Studio Design System", "repository": { "type": "git", "url": "git+https://github.com/Patreon/studio.git" }, "keywords": [ "patreon", "studio", "design-system" ], "author": "Patreon <fe-core@patreon.com>", "bugs": { "url": "https://github.com/Patreon/studio/issues" }, "module": "module/index.js", "browser": "module/index.js", "types": "module/index.d.ts", "sideEffects": false, "moduleRoots": [ "src" ], "files": [ "module", "styles", "css-config", "manifest", "!/**/__docs__", "!/**/__fixtures__", "!/**/__stories__", "!/**/__tests__", "!/**/tests", "!/**/*.test.*" ], "scripts": { "build:clean": "rm -rf module/", "build:module": "tsc --project tsconfig.module.json", "build:module:watch": "npm run build:module -- --watch", "build:css-modules": "postcss \"src/**/*.module.css\" --dir module --base src", "build:manifest": "NODE_ENV=export tsx --require ./scripts/build-manifest/ignore-css.js scripts/build-manifest/index.ts", "build": "npm run build:clean && npm run copy:assets && npm run build:module && npm run build:css-modules && npm run build:manifest", "copy:assets": "./scripts/copy-assets.sh", "sync:breakpoints": "ts-node scripts/design-tokens/sync-breakpoints.ts", "sync:icons": "ts-node scripts/design-tokens/sync-icons.ts", "sync:tokens-defs": "ts-node scripts/design-tokens/sync-tokens.ts", "sync:token-unions": "ts-node scripts/design-tokens/sync-token-unions.ts", "sync:tokens": "npm run sync:tokens-defs && prettier --write src/types/tokens && npm run sync:token-unions", "sync:token-styles": "ts-node scripts/design-tokens/sync-token-styles.ts", "calc:palette-contrast": "ts-node scripts/design-tokens/palette-contrast.ts", "dev": "npm run docs:server", "docs:build": "npm run copy:assets && NODE_ENV=production storybook build", "docs:server": "npm run copy:assets && storybook dev -p 6006", "format": "prettier --write \"**/*.{js,jsx,ts,tsx}\"", "prf:link": "ts-node scripts/prf/link.ts", "prf:unlink": "ts-node scripts/prf/unlink.ts", "lint": "eslint --report-unused-disable-directives './src/**/*.{ts,tsx}'", "lint:fix": "npm run lint -- --fix", "stylelint": "stylelint \"src/**/*.css\"", "stylelint:fix": "npm run stylelint -- --fix", "prepublishOnly": "npm run build", "test": "jest", "test:ci": "jest --runInBand --coverageProvider=v8", "test:coverage": "npm test -- --coverage", "test:watch": "npm test -- --watch", "test:watch:coverage": "npm test -- --watch --coverage", "type-check": "tsc --noEmit", "happo": "happo" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "homepage": "https://github.com/Patreon/studio#readme", "dependencies": { "@floating-ui/react-dom": "^2.0.8", "classnames": "^2.5.1", "color": "^4.2.3", "eslint-plugin-react-server-components": "^1.2.0", "known-css-properties": "^0.18.0", "lodash": "^4.17.15", "react-focus-lock": "^2.9.2", "react-measure": "^2.5.2", "react-scrolllock": "^5.0.1", "w3c-keys": "^0.3.6" }, "devDependencies": { "@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4", "@babel/plugin-proposal-optional-chaining": "^7.6.0", "@babel/preset-env": "^7.22.15", "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.22.15", "@csstools/postcss-global-data": "^3.0.0", "@octokit/rest": "^19.0.7", "@storybook/addon-essentials": "^7.4.0", "@storybook/addon-interactions": "^7.4.0", "@storybook/addon-links": "^7.4.0", "@storybook/addon-mdx-gfm": "^8.5.3", "@storybook/addon-onboarding": "^1.0.8", "@storybook/addon-postcss": "^2.0.0", "@storybook/blocks": "^7.4.0", "@storybook/react": "^7.4.0", "@storybook/react-webpack5": "^7.4.0", "@storybook/testing-library": "^0.2.0", "@svgr/core": "^6.2.1", "@svgr/plugin-jsx": "^6.2.1", "@svgr/plugin-prettier": "^6.1.2", "@svgr/plugin-svgo": "^6.2.0", "@testing-library/jest-dom": "^6.2.0", "@testing-library/react": "^14.3.1", "@testing-library/user-event": "^14.5.2", "@types/apca-w3": "^0.1.3", "@types/cli-progress": "^3.11.6", "@types/color": "^3.0.6", "@types/decompress": "^4.2.4", "@types/eslint": "^8.4.5", "@types/flat": "^5.0.2", "@types/get-value": "^3.0.5", "@types/history": "^4.7.2", "@types/humps": "^2.0.3", "@types/invariant": "^2.2.29", "@types/jest": "^27.0.0", "@types/lodash": "^4.14.165", "@types/mime-types": "^2.1.1", "@types/node": "^14.14.31", "@types/prop-types": "^15.5.5", "@types/react": "^18.3.3", "@types/react-color": "^3.0.1", "@types/react-dom": "^18.3.0", "@types/react-measure": "^2.0.12", "@types/set-value": "^4.0.3", "@types/styled-components": "^5.1.25", "@typescript-eslint/eslint-plugin": "^5.16.0", "@typescript-eslint/parser": "^5.16.0", "a11y-color-contrast": "^0.2.0", "apca-w3": "^0.1.9", "babel-loader": "^8.0.6", "cli-progress": "^3.12.0", "color-blend": "^4.0.0", "css-loader": "^7.1.2", "csstype": "^2.6.8", "decompress": "^4.2.1", "dotenv": "^6.0.0", "eslint": "^8.21.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jest": "^27.6.3", "eslint-plugin-jsx-a11y": "^6.6.0", "eslint-plugin-local-rules": "^1.1.0", "eslint-plugin-no-only-tests": "^2.6.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-prefer-function-component": "^3.0.0", "eslint-plugin-storybook": "^0.6.13", "eslint-plugin-testing-library": "^6.2.0", "flat": "^5.0.2", "get-value": "^4.0.1", "happo-plugin-storybook": "^4.4.0", "happo-plugin-typescript": "^1.0.0", "happo.io": "^7.3.0", "humps": "^2.0.1", "husky": "^1.1.3", "identity-obj-proxy": "^3.0.0", "jest": "^27.5.1", "jest-cli": "^27.5.1", "jest-environment-jsdom": "^27.5.1", "jest-junit": "^16.0.0", "jest-styled-components": "^7.0.8", "jscodeshift": "^0.12.0", "jsdom": "^19.0.0", "jsdom-global": "^3.0.2", "lint-staged": "^7.3.0", "minimatch": "^10.0.1", "path-browserify": "^1.0.1", "postcss": "^8.4.49", "postcss-cli": "^11.0.0", "postcss-flexbugs-fixes": "^5.0.2", "postcss-functions": "^4.0.2", "postcss-js": "^4.0.1", "postcss-loader": "^8.1.1", "postcss-preset-env": "^10.1.1", "postcss-sort-media-queries": "^5.2.0", "postcss-value-parser": "^4.2.0", "prettier": "^2.6.1", "raf": "^3.4.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-use-measure": "^2.1.1", "set-value": "^4.1.0", "storybook": "^7.4.0", "storybook-css-modules": "^1.0.8", "storybook-dark-mode": "^3.0.1", "stream-browserify": "^3.0.0", "style-loader": "^4.0.0", "styled-components": "^5.3.3", "stylelint": "^16.14.1", "stylelint-config-standard": "^36.0.1", "stylelint-order": "^6.0.4", "ts-jest": "^27.1.4", "ts-loader": "^9.5.1", "ts-morph": "^25.0.1", "ts-node": "^10.8.1", "tsx": "^4.19.3", "type-fest": "^3.13.1", "typescript": "4.7.4", "typescript-plugin-css-modules": "^5.1.0", "typescript-styled-plugin": "^0.18.2", "webpack": "^5.88.2" }, "peerDependencies": { "react": "^18.3.1", "react-dom": "^18.3.1", "react-use-measure": "^2.1.1", "styled-components": "^5.0.1" }, "jest": { "automock": false, "reporters": [ "default", "jest-junit" ], "collectCoverageFrom": [ "src/components/**/*.{ts,tsx}", "src/hooks/**/*.{ts,tsx}", "src/utilities/**/*.{ts,tsx}", "!**/__docs__/**", "!**/__fixtures__/**", "!**/__stories__/**", "!**/*-happo.{ts,tsx}", "!src/components/Icon/svgs/**", "!src/components/StudioProvider/plugins.ts", "!src/components/KitchenSink/**", "!src/utilities/**/dev-*.{ts,tsx}", "!src/utilities/**/testing-*.{ts,tsx}", "!src/utilities/get-document.ts", "!src/utilities/renderWrapper.tsx", "!src/utilities/shallowEqual.ts", "!src/utilities/color-mods.ts", "!src/components/Icon/catalog.ts" ], "coverageThreshold": { "./src/components/": { "branches": 85, "functions": 85, "lines": 85, "statements": 85 } }, "globals": { "ts-jest": { "tsconfig": "<rootDir>/tsconfig.json" } }, "moduleDirectories": [ "node_modules", "src" ], "moduleFileExtensions": [ "js", "jsx", "ts", "tsx" ], "roots": [ "src", "scripts", "css-config" ], "setupFiles": [ "<rootDir>/test/setup.js" ], "setupFilesAfterEnv": [ "<rootDir>/test/setup-framework.js" ], "testEnvironment": "jest-environment-jsdom", "testMatch": [ "**/__tests__/**/*.js?(x)", "**/?(*.)+(test).(j|t)s?(x)" ], "transform": { "^.+\\.(ts|tsx)?$": "ts-jest" }, "unmockedModulePathPatterns": [ "<rootDir>/node_modules/react" ], "moduleNameMapper": { "\\.module\\.css$": "identity-obj-proxy", "\\.(css)$": "<rootDir>/test/mocks/styleMock.js" }, "verbose": true }, "jest-junit": { "addFileAttribute": "true" }, "lint-staged": { "*.{ts,tsx}": [ "prettier --write", "git add" ] } }