@stackoverflow/stacks 2.8.3 → 2.8.5

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/package.json CHANGED
@@ -1,11 +1,7 @@
1
1
  {
2
2
  "name": "@stackoverflow/stacks",
3
3
  "description": "Stack Overflow’s CSS and Design Pattern Library. Stacks is an atomic CSS library with classes and components for rapidly building Stack Overflow.",
4
- "repository": {
5
- "type": "git",
6
- "url": "https://github.com/StackExchange/Stacks.git"
7
- },
8
- "version": "2.8.3",
4
+ "version": "2.8.5",
9
5
  "files": [
10
6
  "dist",
11
7
  "lib",
@@ -17,105 +13,23 @@
17
13
  "less": "./lib/stacks.less",
18
14
  "unpkg": "dist/css/stacks.min.css",
19
15
  "scripts": {
20
- "start": "concurrently -n w: npm:start:*",
21
- "build": "concurrently -n w: npm:build:*",
22
- "build:bundle": "webpack --mode=production",
23
- "build:docs": "webpack --mode=production --config ./docs/webpack.config.js && cd ./docs && eleventy",
24
- "start:webpack": "webpack --watch --config ./docs/webpack.config.js",
25
- "start:eleventy": "cd ./docs && eleventy --serve",
16
+ "build": "webpack --mode=production",
26
17
  "test": "npm run test:less && npm run test:unit && npm run test:a11y && npm run test:visual",
27
18
  "test:a11y": "web-test-runner --group=a11y",
28
19
  "test:unit": "web-test-runner --group=unit",
29
20
  "test:unit:watch": "web-test-runner --group=unit --watch",
30
- "test:visual": "pwsh run-test-visual.ps1 npx web-test-runner --group=visual",
21
+ "test:visual:ci": "pwsh run-test-visual.ps1 npx web-test-runner --group=visual",
22
+ "test:visual": "npm run test:visual:ci -- --config ./visual-runner/stacks-classic-runner-config/web-test-runner.config.mjs",
31
23
  "test:less": "vitest run .less.test.ts",
32
24
  "test:less:update": "npm run test:less -- -u",
33
- "prepublishOnly": "npm run build",
34
- "version": "changeset version && npm install --package-lock-only",
35
- "release": "npm run build && changeset publish",
36
- "format": "prettier --write ./lib",
25
+ "format": "prettier ./lib --write --config ../../.prettierrc --ignore-path ../../.prettierignore",
37
26
  "lint": "concurrently -n w: npm:lint:*",
38
27
  "lint:ts": "eslint ./lib",
39
- "lint:css": "stylelint ./lib",
40
- "lint:format": "prettier --check ./lib"
28
+ "lint:css": "stylelint ./lib --config ../../.stylelintrc --ignore-path ../../.stylelintignore",
29
+ "lint:format": "prettier ./lib --check --config ../../.prettierrc --ignore-path ../../.prettierignore"
41
30
  },
42
- "license": "MIT",
43
31
  "dependencies": {
44
- "@hotwired/stimulus": "^3.2.2",
45
- "@popperjs/core": "^2.11.8"
46
- },
47
- "devDependencies": {
48
- "@11ty/eleventy": "^3.1.0",
49
- "@changesets/changelog-github": "^0.5.1",
50
- "@changesets/cli": "^2.29.5",
51
- "@eslint/js": "^9.30.0",
52
- "@highlightjs/cdn-assets": "^11.11.1",
53
- "@open-wc/testing": "^4.0.0",
54
- "@rollup/plugin-commonjs": "^26.0.1",
55
- "@rollup/plugin-replace": "^6.0.2",
56
- "@stackoverflow/stacks-editor": "^0.15.2",
57
- "@stackoverflow/stacks-icons": "^6.6.1",
58
- "@testing-library/dom": "^10.4.0",
59
- "@testing-library/user-event": "^14.6.1",
60
- "@types/cssbeautify": "^0.3.5",
61
- "@types/less": "^3.0.8",
62
- "@types/mocha": "^10.0.10",
63
- "@web/dev-server-esbuild": "^1.0.4",
64
- "@web/dev-server-rollup": "^0.6.4",
65
- "@web/test-runner": "^0.20.1",
66
- "@web/test-runner-playwright": "^0.11.0",
67
- "@web/test-runner-visual-regression": "^0.10.0",
68
- "apca-check": "^0.1.1",
69
- "colorjs.io": "^0.5.2",
70
- "concurrently": "^9.2.0",
71
- "css-loader": "^7.1.2",
72
- "cssbeautify": "^0.3.1",
73
- "cssnano": "^7.0.7",
74
- "docsearch.js": "^2.6.3",
75
- "eleventy-plugin-highlightjs": "^1.1.0",
76
- "eleventy-plugin-llms-txt": "^1.2.0",
77
- "eleventy-plugin-nesting-toc": "^1.3.0",
78
- "eslint": "^9.31.0",
79
- "eslint-config-prettier": "^10.1.5",
80
- "eslint-plugin-no-unsanitized": "^4.1.2",
81
- "jquery": "^3.7.1",
82
- "less-loader": "^12.3.0",
83
- "list.js": "^2.3.1",
84
- "markdown-it": "^14.1.0",
85
- "mini-css-extract-plugin": "^2.9.2",
86
- "postcss-less": "^6.0.0",
87
- "postcss-loader": "^8.1.1",
88
- "prettier": "^3.6.2",
89
- "rollup-plugin-postcss": "^4.0.2",
90
- "stylelint": "^16.21.1",
91
- "stylelint-config-recommended": "^16.0.0",
92
- "stylelint-config-standard": "^38.0.0",
93
- "terser-webpack-plugin": "^5.3.14",
94
- "ts-loader": "^9.5.2",
95
- "typescript": "^5.8.3",
96
- "typescript-eslint": "^8.35.1",
97
- "vitest": "^3.1.3",
98
- "webpack": "^5.99.9",
99
- "webpack-cli": "^6.0.1",
100
- "webpack-merge": "^6.0.1"
101
- },
102
- "browserslist": [
103
- "last 2 versions",
104
- "not dead",
105
- "not ie > 0",
106
- "not op_mini all",
107
- "not baidu > 0",
108
- "not and_ff > 0",
109
- "not and_qq > 0",
110
- "not kaios > 0",
111
- "not op_mob > 0",
112
- "not ie_mob > 0",
113
- "not and_uc > 0",
114
- "not Samsung > 0",
115
- "not Android > 0"
116
- ],
117
- "overrides": {
118
- "aria-query": "~5.0.0",
119
- "@web/dev-server-core": "0.7.1"
32
+ "@popperjs/core": "^2.11.8",
33
+ "@hotwired/stimulus": "^3.2.2"
120
34
  }
121
- }
35
+ }
package/LICENSE.MD DELETED
@@ -1,9 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright 2017-2024 Stack Exchange Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md DELETED
@@ -1,163 +0,0 @@
1
- # Stacks
2
-
3
- [![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]
4
-
5
- Stacks is Stack Overflow’s design system. It includes the resources needed to create consistent, predictable interfaces and workflows that conform to Stack Overflow’s principles, design language, and best practices.
6
-
7
- Our documentation is built with Stacks itself, using its [immutable, atomic classes](http://johnpolacek.com/rethinking/) and components.
8
-
9
- The Stacks website documents:
10
-
11
- ### Product
12
- - Semantic and accessible component markup
13
- - Cross-browser compatible Less / CSS
14
- - An [icon library](https://github.com/StackExchange/Stacks-Icons)
15
-
16
- ### Email
17
- - Email templates & components
18
-
19
- Stacks documentation can be found at https://stackoverflow.design/
20
-
21
- ## Table of contents
22
-
23
- - [Using Stacks](#using-stacks)
24
- - [Migrating from v1 to v2](#migrating-from-v1-to-v2)
25
- - [Local Development](#local-development)
26
- - [Format Stacks](#format-stacks)
27
- - [Linting Stacks](#linting-stacks)
28
- - [Testing Stacks](#testing-stacks)
29
- - [Releasing Stacks](#releasing-a-new-version-of-stacks)
30
- - [Bugs and feature requests](#bugs-and-feature-requests)
31
- - [Contributing](#contributing)
32
- - [License](#license)
33
-
34
- ## Using Stacks
35
- Using Stacks is outlined in our [usage guidelines](https://stackoverflow.design/product/develop/using-stacks).
36
-
37
- ## Migrating from v1 to v2
38
-
39
- To migrate from Stacks v1 to v2, see our [migration guide](/MIGRATION_GUIDE.md).
40
-
41
- ## Local Development
42
-
43
- To contribute to Stacks documentation or its CSS library, you’ll need to build Stacks locally:
44
- ```sh
45
- npm start
46
- ```
47
- This command will pull up the local dev server at http://localhost:8000. You can also view our [building guidelines](https://stackoverflow.design/product/develop/building).
48
-
49
- Having trouble getting these steps to work? Open [an issue](https://github.com/StackExchange/Stacks/issues/new) with a `setup` label.
50
-
51
- ## Format Stacks
52
-
53
- Format the source code with prettier via running:
54
- ```sh
55
- npm run format
56
- ```
57
-
58
- ## Linting Stacks
59
-
60
- Run all lint suites by running:
61
- ```sh
62
- npm run lint
63
- ```
64
-
65
- Lint the styles (stylelint) by running:
66
- ```sh
67
- npm run lint:css
68
- ```
69
- Lint the typescript source code (eslint) via running:
70
- ```sh
71
- npm run lint:ts
72
- ```
73
- Lint the source code format (prettier) via running:
74
- ```sh
75
- npm run lint:format
76
- ```
77
-
78
- ## Testing Stacks
79
-
80
- Run all test suites by running:
81
- ```sh
82
- npm test
83
- ```
84
- ### Unit/Component Tests
85
-
86
- Unit/Component tests are written with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
87
- Please follow the library's principles and documentation to write tests.
88
-
89
- Stacks uses [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) and [Playwright](https://modern-web.dev/docs/test-runner/browser-launchers/playwright/) to run tests in a real browser context.
90
-
91
- Execute the unit/component tests suite by running:
92
- ```sh
93
- npm run test:unit
94
- ```
95
- or if you prefer watch mode run:
96
- ```sh
97
- npm run test:unit:watch
98
- ```
99
-
100
- ### Visual Regression Tests
101
-
102
- **Prerequisites:**
103
- - `git lfs` ([installation docs](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage))
104
- - `docker` ([installation docs](https://docs.docker.com/engine/install/))
105
- - `pwsh` ([Installation docs](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.3))
106
- - Run `git config diff.lfs.textconv cat` to make sure image diff works as expected ([More info](https://github.com/microsoft/vscode/issues/86611#issuecomment-875894108))
107
-
108
- This [Web Test Runner plugin](https://www.npmjs.com/package/@web/test-runner-visual-regression) is used to run visual regression tests.
109
- Visual regression tests end with this suffix `*.visual.test.ts`.
110
-
111
- Execute the visual regression tests suite by running:
112
- ```sh
113
- npm run test:visual
114
- ```
115
- After the first run, if there are failing snapshots, they end up overriding the baseline ones in the filesystem (e.g. `/screenshots/<browser>/baseline/<name>.png`).
116
- We do this for easier comparison of the dif directly in vscode and to make sure only the failing snapshots get regenerated (see [this GH discussion](https://github.com/modernweb-dev/web/discussions/427#discussioncomment-3543771) that inspired the approach).
117
-
118
- We also recommend to install [this vscode extension](https://marketplace.visualstudio.com/items?itemName=RayWiis.png-image-diff) for getting better diffs.
119
-
120
- ### Less Tests
121
-
122
- This is an experimental suite to test the generation of CSS from Less files.
123
- Less tests end with this suffix `*.less.test.ts`.
124
-
125
- Execute the less tests suite by running:
126
- ```sh
127
- npm run test:less
128
- ```
129
-
130
- Update the css snapshots via:
131
- ```sh
132
- npm run test:less:update
133
- ```
134
-
135
- ## Releasing a new version of Stacks
136
- Stacks uses [Semantic Versioning](https://semver.org/), is distributed via [npm](https://www.npmjs.com/package/@stackoverflow/stacks), and publishes [release notes on Github](https://github.com/StackExchange/Stacks/releases).
137
-
138
- We use [changesets](https://github.com/changesets/changesets) to automatize the steps necessary to publish to NPM, create GH releases and a changelog.
139
-
140
- - Every time you do work that requires a new release to be published, [add a changesets entry](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) by running `npx chageset` and follow the instrcutions on screen. (changes that do not require a new release - e.g. changing a test file - don't need a changeset).
141
- - When opening a PR without a corresponding changeset the [changesets-bot](https://github.com/apps/changeset-bot) will remind you to do so. It generally makes sense to have one changeset for PR (if the PR changes do not require a new release to be published the bot message can be safely ignored)
142
- - The [release github workflow](.github/workflows/release.yml) continuosly check if there are new pending changesets in the main branch, if there are it creates a GH PR (`chore(release)` [see example](https://github.com/StackExchange/apca-check/pull/2)) and continue updating it as more changesets are potentially pushed/merged to the main branch.
143
- - When we are ready to cut a release we need to simply merge the `chore(release)` PR back to main and the release github workflow will take care of publishing the changes to NPM and create a GH release for us. The `chore(release)` PR also give us an opportunity to adjust the automatically generated changelog when necessary (the entry in the changelog file is also what will end up in the GH release notes).
144
-
145
- _The release github workflow only run if the CI workflow (running linter, formatter and tests) is successful: CI is blocking accidental releases_.
146
-
147
- _Despite using changesets to communicate the intent of creating releases in a more explicit way, we still follow [conventional commits standards](https://www.conventionalcommits.org/en/v1.0.0/) for keeping our git history easily parseable by the human eye._
148
-
149
- Successful releases trigger automatically a new deployment to stackoverflow.design by merging the `develop` branch into the `production` branch.
150
-
151
- ## Bugs and feature requests
152
- Have a bug or feature request? First search existing or closed issues to make sure the issue hasn’t been noted yet. If not, review our [issue guidelines](/CONTRIBUTING.md#open-an-issue) for submitting [a bug report](/CONTRIBUTING.md#reporting-bugs) or [feature request](/CONTRIBUTING.md#feature-requests).
153
-
154
- ## Contributing
155
- If you’d like to contribute to Stacks, please read through our [contribution guidelines](/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
156
-
157
- ## License
158
- Code and documentation copyright 2017-2024 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).
159
-
160
- [gh-action-url]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml
161
- [gh-action-badge]: https://github.com/StackExchange/Stacks/actions/workflows/workflow.yml/badge.svg?branch=develop
162
- [npm-url]: https://npmjs.org/package/@stackoverflow/stacks
163
- [npm-badge]: https://img.shields.io/npm/v/@stackoverflow/stacks.svg