2015-06-27 18:07:27 -04:00
|
|
|
{
|
2022-07-07 16:00:56 -04:00
|
|
|
"name": "spectacle-monorepo",
|
2017-07-18 08:21:35 -04:00
|
|
|
"devDependencies": {
|
2022-09-30 16:51:50 -05:00
|
|
|
"@babel/cli": "^7.19.3",
|
2024-03-11 11:49:23 -07:00
|
|
|
"@babel/core": "^7.19.6",
|
2022-08-02 08:13:20 -07:00
|
|
|
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
|
|
|
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
2022-09-30 16:51:50 -05:00
|
|
|
"@babel/preset-env": "^7.19.3",
|
2022-08-02 08:13:20 -07:00
|
|
|
"@babel/preset-react": "^7.16.7",
|
|
|
|
|
"@babel/preset-typescript": "^7.16.0",
|
2022-09-30 16:51:50 -05:00
|
|
|
"@changesets/cli": "^2.24.4",
|
2022-07-26 10:06:43 -05:00
|
|
|
"@svitejs/changesets-changelog-github-compact": "^0.1.1",
|
2022-08-09 11:03:23 -07:00
|
|
|
"@testing-library/jest-dom": "^5.16.4",
|
|
|
|
|
"@testing-library/react": "^13.3.0",
|
2022-09-30 16:51:50 -05:00
|
|
|
"@types/jest": "^29.1.1",
|
2022-08-09 11:03:23 -07:00
|
|
|
"@types/testing-library__jest-dom": "^5.14.5",
|
2022-09-30 16:51:50 -05:00
|
|
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
|
|
|
"@typescript-eslint/parser": "^5.38.1",
|
2022-08-02 08:13:20 -07:00
|
|
|
"babel-loader": "^8.0.6",
|
2020-02-04 12:09:43 -08:00
|
|
|
"babel-plugin-transform-jsx-to-htm": "^2.0.0",
|
2022-09-30 16:51:50 -05:00
|
|
|
"concurrently": "^7.4.0",
|
2022-08-02 08:13:20 -07:00
|
|
|
"cross-env": "^7.0.3",
|
2022-09-30 16:51:50 -05:00
|
|
|
"eslint": "^8.24.0",
|
2022-02-22 07:22:23 -06:00
|
|
|
"eslint-config-prettier": "^8.3.0",
|
2022-09-30 16:51:50 -05:00
|
|
|
"eslint-plugin-prettier": "^4.2.1",
|
|
|
|
|
"eslint-plugin-react": "^7.31.8",
|
2022-02-22 07:22:23 -06:00
|
|
|
"eslint-plugin-react-hooks": "^4.3.0",
|
2022-08-02 08:13:20 -07:00
|
|
|
"html-webpack-plugin": "^5.5.0",
|
2022-09-30 16:51:50 -05:00
|
|
|
"jest": "^29.1.2",
|
|
|
|
|
"jest-environment-jsdom": "^29.1.2",
|
2022-08-09 11:03:23 -07:00
|
|
|
"jest-puppeteer": "^6.1.1",
|
|
|
|
|
"mkdirp": "^1.0.4",
|
2022-08-02 08:13:20 -07:00
|
|
|
"nps": "^5.10.0",
|
2022-02-22 07:22:23 -06:00
|
|
|
"prettier": "^2.4.1",
|
2022-09-30 16:51:50 -05:00
|
|
|
"puppeteer": "^18.0.5",
|
2022-08-02 08:13:20 -07:00
|
|
|
"raw-loader": "^4.0.0",
|
2022-07-26 10:06:43 -05:00
|
|
|
"rimraf": "^3.0.0",
|
2022-08-09 11:03:23 -07:00
|
|
|
"serve": "^14.0.1",
|
2024-03-11 11:49:23 -07:00
|
|
|
"ts-jest": "^29.1.2",
|
2022-09-30 16:51:50 -05:00
|
|
|
"typescript": "^4.8.4",
|
2022-08-09 11:03:23 -07:00
|
|
|
"wait-on": "^6.0.1",
|
2023-05-04 10:19:26 -05:00
|
|
|
"webpack": "5.76.0",
|
2022-08-02 08:13:20 -07:00
|
|
|
"webpack-cli": "^4.10.0",
|
2022-09-30 16:51:50 -05:00
|
|
|
"webpack-dev-server": "^4.11.1",
|
2025-04-17 13:06:56 -06:00
|
|
|
"wireit": "^0.14.12"
|
2022-08-02 08:13:20 -07:00
|
|
|
},
|
2022-08-09 11:03:23 -07:00
|
|
|
"pnpm": {
|
|
|
|
|
"neverBuiltDependencies": [
|
|
|
|
|
"puppeteer"
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-08-02 08:13:20 -07:00
|
|
|
"scripts": {
|
|
|
|
|
"version": "pnpm changeset version && pnpm install --no-frozen-lockfile",
|
|
|
|
|
"changeset": "changeset",
|
2023-05-08 11:44:34 -05:00
|
|
|
"start:js": "concurrently --raw pnpm:build:spectacle:watch \"pnpm run --filter ./examples/js start\"",
|
|
|
|
|
"start:md": "concurrently --raw pnpm:build:spectacle:watch \"pnpm run --filter ./examples/md start\"",
|
|
|
|
|
"start:mdx": "concurrently --raw pnpm:build:spectacle:watch \"pnpm run --filter ./examples/mdx start\"",
|
|
|
|
|
"start:ts": "concurrently --raw pnpm:build:spectacle:watch \"pnpm run --filter ./examples/typescript start\"",
|
2025-04-22 09:33:36 -07:00
|
|
|
"start:one-page": "concurrently --raw pnpm:build:spectacle:watch \"pnpm run --filter ./examples/one-page start\"",
|
2023-05-08 11:44:34 -05:00
|
|
|
"start:examples": "concurrently --raw pnpm:build:spectacle:watch \"pnpm run --parallel --filter \\\"./examples/*\\\" start\"",
|
2022-08-02 08:13:20 -07:00
|
|
|
"start:create-spectacle": "pnpm run --filter ./packages/create-spectacle build --watch",
|
2023-05-08 11:44:34 -05:00
|
|
|
"start:docs": "pnpm run --filter spectacle-docs start",
|
2022-08-02 08:13:20 -07:00
|
|
|
"clean:build": "rimraf \"{packages,examples}/*/{es,lib,dist}\" packages/create-spectacle/bin",
|
|
|
|
|
"clean:cache": "wireit",
|
|
|
|
|
"clean:cache:lint": "rimraf .eslintcache \"{packages,examples}/*/.eslintcache\"",
|
|
|
|
|
"clean:cache:wireit": "rimraf .wireit \"{packages,examples}/*/.wireit\"",
|
|
|
|
|
"clean:cache:modules": "rimraf node_modules/.cache \"{packages,examples}/*/node_modules/.cache\"",
|
|
|
|
|
"check": "wireit",
|
|
|
|
|
"check:ci": "wireit",
|
|
|
|
|
"build": "wireit",
|
2023-05-08 11:44:34 -05:00
|
|
|
"build:one-page": "pnpm run --filter ./examples/one-page build",
|
2022-08-02 08:13:20 -07:00
|
|
|
"build:one-page:watch": "pnpm run --filter ./examples/one-page build --watch",
|
2023-05-08 11:44:34 -05:00
|
|
|
"build:spectacle:watch": "pnpm run --filter ./packages/spectacle build:lib:watch --watch",
|
2022-08-02 08:13:20 -07:00
|
|
|
"lint": "wireit",
|
|
|
|
|
"lint:fix": "wireit",
|
|
|
|
|
"lint:root": "wireit",
|
|
|
|
|
"lint:root:fix": "wireit",
|
|
|
|
|
"lint:pkgs": "wireit",
|
|
|
|
|
"lint:pkgs:fix": "wireit",
|
2023-05-08 11:44:34 -05:00
|
|
|
"types:check": "wireit",
|
2022-08-02 08:13:20 -07:00
|
|
|
"prettier": "wireit",
|
|
|
|
|
"prettier:fix": "wireit",
|
|
|
|
|
"prettier:root": "wireit",
|
|
|
|
|
"prettier:root:fix": "wireit",
|
|
|
|
|
"prettier:pkgs": "wireit",
|
|
|
|
|
"prettier:pkgs:fix": "wireit",
|
2022-08-09 11:03:23 -07:00
|
|
|
"test": "wireit",
|
|
|
|
|
"puppeteer:install": "rimraf .puppeteer && cross-env PUPPETEER_DOWNLOAD_PATH=.puppeteer node ./node_modules/puppeteer/install.js"
|
2022-08-02 08:13:20 -07:00
|
|
|
},
|
|
|
|
|
"wireit": {
|
|
|
|
|
"clean:cache": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"clean:cache:wireit",
|
|
|
|
|
"clean:cache:lint",
|
|
|
|
|
"clean:cache:modules"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"check": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"prettier",
|
|
|
|
|
"lint",
|
|
|
|
|
"types:check",
|
|
|
|
|
"test"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"check:ci": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"check"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"build": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"./packages/create-spectacle:build",
|
|
|
|
|
"./packages/spectacle:build",
|
|
|
|
|
"./examples/js:build",
|
|
|
|
|
"./examples/md:build",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./examples/mdx:build",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/one-page:build",
|
|
|
|
|
"./examples/typescript:build"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"types:check": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"./packages/create-spectacle:types:check",
|
|
|
|
|
"./packages/spectacle:types:check",
|
2022-09-06 10:47:12 -04:00
|
|
|
"./website:types:check"
|
2022-08-02 08:13:20 -07:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"lint": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"lint:root",
|
|
|
|
|
"lint:pkgs"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"lint:fix": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"lint:root:fix",
|
|
|
|
|
"lint:pkgs:fix"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"lint:root": {
|
|
|
|
|
"command": "nps \"lint:base *.js\"",
|
|
|
|
|
"files": [
|
|
|
|
|
".eslintrc",
|
|
|
|
|
".eslintignore",
|
|
|
|
|
"*.js",
|
|
|
|
|
"!**/node_modules/**"
|
|
|
|
|
],
|
|
|
|
|
"output": [],
|
|
|
|
|
"packageLocks": [
|
|
|
|
|
"pnpm-lock.yaml"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"lint:root:fix": {
|
|
|
|
|
"command": "pnpm run lint:root || nps \"lint:base --fix *.js\"",
|
|
|
|
|
"files": [
|
|
|
|
|
".eslintrc",
|
|
|
|
|
".eslintignore",
|
|
|
|
|
"*.js",
|
|
|
|
|
"!**/node_modules/**"
|
|
|
|
|
],
|
|
|
|
|
"output": [],
|
|
|
|
|
"packageLocks": [
|
|
|
|
|
"pnpm-lock.yaml"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"lint:pkgs": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"./packages/spectacle:lint",
|
|
|
|
|
"./packages/create-spectacle:lint",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./packages/spectacle-mdx-loader:lint",
|
2022-08-23 20:57:10 -04:00
|
|
|
"./website:lint",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/js:lint",
|
|
|
|
|
"./examples/md:lint",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./examples/mdx:lint",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/one-page:lint",
|
|
|
|
|
"./examples/typescript:lint"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"lint:pkgs:fix": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"./packages/spectacle:lint:fix",
|
|
|
|
|
"./packages/create-spectacle:lint:fix",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./packages/spectacle-mdx-loader:lint:fix",
|
2022-08-23 20:57:10 -04:00
|
|
|
"./website:lint:fix",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/js:lint:fix",
|
|
|
|
|
"./examples/md:lint:fix",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./examples/mdx:lint:fix",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/one-page:lint:fix",
|
|
|
|
|
"./examples/typescript:lint:fix"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"prettier": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"prettier:root",
|
|
|
|
|
"prettier:pkgs"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"prettier:fix": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"prettier:root:fix",
|
|
|
|
|
"prettier:pkgs:fix"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"prettier:root": {
|
2022-08-09 11:03:23 -07:00
|
|
|
"command": "nps prettier:base -- -- \"*.{js,json,md}\"",
|
2022-08-02 08:13:20 -07:00
|
|
|
"files": [
|
|
|
|
|
".prettierrc",
|
|
|
|
|
".prettierignore",
|
2022-08-09 11:03:23 -07:00
|
|
|
"*.{js,json,md}",
|
2022-08-02 08:13:20 -07:00
|
|
|
"!**/node_modules/**"
|
|
|
|
|
],
|
|
|
|
|
"output": [],
|
|
|
|
|
"packageLocks": [
|
|
|
|
|
"pnpm-lock.yaml"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"prettier:root:fix": {
|
2022-08-09 11:03:23 -07:00
|
|
|
"command": "pnpm run prettier:root || nps prettier:base:fix -- -- \"*.{js,json,md}\"",
|
2022-08-02 08:13:20 -07:00
|
|
|
"files": [
|
|
|
|
|
".prettierrc",
|
|
|
|
|
".prettierignore",
|
2022-08-09 11:03:23 -07:00
|
|
|
"*.{js,json,md}",
|
2022-08-02 08:13:20 -07:00
|
|
|
"!**/node_modules/**"
|
|
|
|
|
],
|
|
|
|
|
"output": [],
|
|
|
|
|
"packageLocks": [
|
|
|
|
|
"pnpm-lock.yaml"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"prettier:pkgs": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"./packages/spectacle:prettier",
|
|
|
|
|
"./packages/create-spectacle:prettier",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./packages/spectacle-mdx-loader:prettier",
|
2022-08-23 20:57:10 -04:00
|
|
|
"./website:prettier",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/js:prettier",
|
|
|
|
|
"./examples/md:prettier",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./examples/mdx:prettier",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/one-page:prettier",
|
|
|
|
|
"./examples/typescript:prettier"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"prettier:pkgs:fix": {
|
|
|
|
|
"dependencies": [
|
|
|
|
|
"./packages/spectacle:prettier:fix",
|
|
|
|
|
"./packages/create-spectacle:prettier:fix",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./packages/spectacle-mdx-loader:prettier:fix",
|
2022-08-23 20:57:10 -04:00
|
|
|
"./website:prettier:fix",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/js:prettier:fix",
|
|
|
|
|
"./examples/md:prettier:fix",
|
2023-02-24 22:47:11 -05:00
|
|
|
"./examples/mdx:prettier:fix",
|
2022-08-02 08:13:20 -07:00
|
|
|
"./examples/one-page:prettier:fix",
|
|
|
|
|
"./examples/typescript:prettier:fix"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"test": {
|
|
|
|
|
"dependencies": [
|
2022-09-06 10:47:34 -04:00
|
|
|
"./packages/spectacle:test",
|
|
|
|
|
"./packages/create-spectacle:test"
|
2022-08-02 08:13:20 -07:00
|
|
|
]
|
|
|
|
|
}
|
2025-01-09 10:11:39 -07:00
|
|
|
},
|
|
|
|
|
"engines": {
|
fix: resolve React 19 compatibility by replacing defaultProps with attrs (#1351)
### Description
This PR fixes React 19 compatibility issues in Spectacle by replacing all usage of the deprecated `defaultProps` pattern with styled-components' `attrs` method.
React 19 removed support for `defaultProps` on function components, which was breaking components throughout the Spectacle codebase. While the issue was initially reported for the FullScreen component, investigation revealed that many other components (typography, table, and layout primitives) were also affected.
The solution follows the [recommended approach from styled-components](https://github.com/styled-components/styled-components/issues/3967) using the `attrs` method with function variant syntax, which allows props to override defaults while maintaining full backward compatibility.
**Key Changes:**
- Replaced `defaultProps` with `styled.component.attrs((props) => ({ ...defaults, ...props }))` pattern
- Fixed typography components: Text, Heading, Quote, OrderedList, UnorderedList, ListItem, Link, CodeSpan, ScalableText
- Fixed table components: Table, TableHeader, TableBody, TableRow, TableCell
- Fixed layout components: FlexBox, Grid
- Maintained all existing functionality and APIs
- Ensured props can still override defaults
Fixes #1350
2025-09-25 17:30:20 +01:00
|
|
|
"node": ">=22"
|
2018-04-11 11:49:28 +02:00
|
|
|
}
|
2025-04-17 13:06:56 -06:00
|
|
|
}
|