diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a26d985ac..90d12cca54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,15 +88,25 @@ jobs: run: yarn workspace ${{ matrix.package }} depcheck - name: Audit dependencies + if: matrix.package != '@slicemachine/e2e' run: yarn workspace ${{ matrix.package }} audit - name: Lint run: yarn workspace ${{ matrix.package }} lint + - name: Stylelint + if: matrix.package == 'slice-machine-ui' + run: yarn workspace ${{ matrix.package }} stylelint + + - name: Generate TypeScript definition files from CSS Modules + if: matrix.package == 'slice-machine-ui' + run: yarn workspace ${{ matrix.package }} typed-css-modules + - name: Types run: yarn workspace ${{ matrix.package }} types - name: Unit + if: matrix.package != '@slicemachine/e2e' run: yarn workspace ${{ matrix.package }} unit env: EMAIL: ${{ secrets.EMAIL }} @@ -125,7 +135,7 @@ jobs: - "@slicemachine/adapter-nuxt" - "@slicemachine/adapter-nuxt2" - "@slicemachine/adapter-sveltekit" - - "@slicemachine/e2e" + # - "@slicemachine/e2e" # Commented as there are no unit tests for `@slicemachine/e2e`. steps: - name: Checkout diff --git a/.prettierignore b/.prettierignore index b0a3cf71d6..8534ad8f04 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ # Ignore artifacts: .github/ /.yarn +/packages/*/src/**/*.module.css.d.ts /packages/*/storybook-static /.pnp.* packages/slice-machine/.next diff --git a/package.json b/package.json index 1e69ed1dbc..ad2fa765f5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ }, "packageManager": "yarn@3.6.0", "scripts": { - "clean": "rimraf --glob '{e2e-projects/*/{.next,.svelte-kit},packages/*/{.next,.svelte-kit,build,coverage,dist,out,package.tgz,storybook-static},playwright/{playwright-report,test-results}}'", + "clean": "rimraf --glob '{e2e-projects/*/{.next,.svelte-kit},packages/*/{.next,.svelte-kit,build,coverage,dist,out,package.tgz,src/**/*.module.css.d.ts,storybook-static},playwright/{playwright-report,test-results}}'", "dev": "concurrently --prefix-colors auto \"yarn:dev:*\"", "dev:manager": "yarn workspace @slicemachine/manager dev", "dev:start-slicemachine": "yarn workspace start-slicemachine dev", @@ -20,6 +20,7 @@ "build-essential": "yarn workspace @slicemachine/plugin-kit build && yarn workspace @slicemachine/manager build", "audit": "yarn workspaces foreach --parallel --verbose run audit", "lint": "yarn workspaces foreach --verbose run lint", + "stylelint": "yarn workspaces foreach --verbose run stylelint", "lint-staged": "lint-staged", "prettier:fix": "prettier --write .", "prettier:check": "prettier --check .", @@ -65,6 +66,10 @@ "**/packages/slice-machine/**/*.@(js|jsx|ts|tsx|)": [ "prettier --write --ignore-unknown", "yarn workspace slice-machine-ui lint:precommit" + ], + "**/packages/slice-machine/**/*.module.css": [ + "prettier --write --ignore-unknown", + "yarn workspace slice-machine-ui stylelint:precommit" ] }, "resolutions": { diff --git a/packages/slice-machine/.depcheckrc b/packages/slice-machine/.depcheckrc index 024f6b4061..fd04674ed5 100644 --- a/packages/slice-machine/.depcheckrc +++ b/packages/slice-machine/.depcheckrc @@ -7,6 +7,8 @@ ignores: "monocle-ts", "newtype-ts", "semver", - "start-slicemachine" + "start-slicemachine", + "stylelint-config-css-modules", + "stylelint-config-recommended" ] skip - missing: true diff --git a/packages/slice-machine/.eslintignore b/packages/slice-machine/.eslintignore index 2934173b89..9efe47d9ab 100644 --- a/packages/slice-machine/.eslintignore +++ b/packages/slice-machine/.eslintignore @@ -1,3 +1,4 @@ +/src/**/*.module.css.d.ts /storybook-static !/.storybook build diff --git a/packages/slice-machine/.gitignore b/packages/slice-machine/.gitignore index a1a29695f2..b1d4009e5b 100644 --- a/packages/slice-machine/.gitignore +++ b/packages/slice-machine/.gitignore @@ -27,6 +27,7 @@ yarn-error.log* .vercel # typescript +/src/**/*.module.css.d.ts *.tsbuildinfo next-env.d.ts diff --git a/packages/slice-machine/package.json b/packages/slice-machine/package.json index d9494d3bf0..37395ea515 100644 --- a/packages/slice-machine/package.json +++ b/packages/slice-machine/package.json @@ -12,18 +12,22 @@ "node": ">=14" }, "scripts": { - "build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 next build && next export", - "dev": "next dev", - "dev-cypress": "concurrently \"next dev\" \"npm run dev --prefix ../../e2e-projects/cypress-next-app\"", + "build": "yarn typed-css-modules && cross-env NODE_OPTIONS=--max_old_space_size=8192 next build && next export", + "dev": "concurrently \"yarn typed-css-modules:watch\" \"next dev\" --names \"typed-css-modules,next\" --prefix-colors auto", + "dev-cypress": "concurrently \"yarn typed-css-modules:watch\" \"next dev\" \"npm run dev --prefix ../../e2e-projects/cypress-next-app\" --names \"typed-css-modules,next,cypress-next-app\" --prefix-colors auto", "lint": "eslint --max-warnings 0 --ext .ts,.tsx,.js,.jsx .", + "stylelint": "stylelint --max-warnings 0 \"src/**/*.module.css\"", "prepack": "$npm_execpath run build", "storybook": "storybook dev --no-open --port 6006", "storybook-build": "storybook build", - "test": "yarn lint && yarn types && yarn unit && yarn build", + "test": "yarn lint && yarn stylelint && yarn typed-css-modules && yarn types && yarn unit && yarn build", "types": "tsc --noEmit", + "typed-css-modules": "tcm --pattern \"src/**/*.module.css\" .", + "typed-css-modules:watch": "yarn typed-css-modules --watch", "unit": "vitest run --coverage", "unit:watch": "vitest watch", "lint:precommit": "eslint --max-warnings 0", + "stylelint:precommit": "stylelint --max-warnings 0", "depcheck": "depcheck --config=.depcheckrc", "audit": "yarn npm audit --environment production --severity high" }, @@ -38,9 +42,9 @@ "devDependencies": { "@emotion/react": "11.11.1", "@extractus/oembed-extractor": "3.1.8", - "@prismicio/editor-fields": "0.4.19", - "@prismicio/editor-support": "0.4.19", - "@prismicio/editor-ui": "0.4.19", + "@prismicio/editor-fields": "0.4.20", + "@prismicio/editor-support": "0.4.20", + "@prismicio/editor-ui": "0.4.20", "@prismicio/mocks": "2.0.0-alpha.2", "@prismicio/simulator": "0.1.4", "@prismicio/types-internal": "2.2.0", @@ -123,8 +127,12 @@ "remark-gfm": "3.0.1", "semver": "7.3.8", "storybook": "7.0.10", + "stylelint": "16.2.0", + "stylelint-config-css-modules": "4.4.0", + "stylelint-config-recommended": "14.0.0", "swr": "1.3.0", "theme-ui": "0.15.5", + "typed-css-modules": "0.8.1", "typesafe-actions": "5.1.0", "typescript": "4.9.5", "vite": "4.3.9", diff --git a/packages/slice-machine/postcss.config.js b/packages/slice-machine/postcss.config.js deleted file mode 100644 index f0c7c55ef6..0000000000 --- a/packages/slice-machine/postcss.config.js +++ /dev/null @@ -1,2 +0,0 @@ -// Disable all PostCSS plugins to avoid warnings on `@prismicio/editor-ui/style.css`. -module.exports = { plugins: {} }; diff --git a/packages/slice-machine/src/components/Kbd/Kbd.css.ts b/packages/slice-machine/src/components/Kbd/Kbd.css.ts deleted file mode 100644 index 9a53f0bf16..0000000000 --- a/packages/slice-machine/src/components/Kbd/Kbd.css.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { style } from "@vanilla-extract/css"; -import { colors, sprinkles } from "@prismicio/editor-ui"; - -export const root = style([ - sprinkles({ - paddingInline: 4, - color: colors.grey11, - backgroundColor: colors.grey2, - borderColor: colors.grey6, - borderStyle: "solid", - borderWidth: 1, - }), - { - borderRadius: "3px", - }, -]); diff --git a/packages/slice-machine/src/components/Kbd/Kbd.module.css b/packages/slice-machine/src/components/Kbd/Kbd.module.css new file mode 100644 index 0000000000..e5932c37fe --- /dev/null +++ b/packages/slice-machine/src/components/Kbd/Kbd.module.css @@ -0,0 +1,10 @@ +.root { + background-color: var(--grey2); + border-color: var(--grey6); + /* stylelint-disable-next-line declaration-property-value-allowed-list -- The component has a border radius of 3 px in Figma. */ + border-radius: 3px; + border-style: solid; + border-width: 1px; + color: var(--grey11); + padding-inline: 4px; +} diff --git a/packages/slice-machine/src/components/Kbd/Kbd.tsx b/packages/slice-machine/src/components/Kbd/Kbd.tsx index 4920e32bca..9e8d0d9108 100644 --- a/packages/slice-machine/src/components/Kbd/Kbd.tsx +++ b/packages/slice-machine/src/components/Kbd/Kbd.tsx @@ -1,6 +1,6 @@ import { FC, PropsWithChildren } from "react"; -import * as styles from "./Kbd.css"; +import styles from "./Kbd.module.css"; export const Kbd: FC = ({ children }) => ( {children} diff --git a/packages/slice-machine/stylelint.config.js b/packages/slice-machine/stylelint.config.js new file mode 100644 index 0000000000..7dd07149a1 --- /dev/null +++ b/packages/slice-machine/stylelint.config.js @@ -0,0 +1,13 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { cssTheme } = require("@prismicio/editor-ui"); + +module.exports = { + defaultSeverity: "warning", + reportNeedlessDisables: true, + reportInvalidScopeDisables: true, + reportDescriptionlessDisables: true, + rules: { + "declaration-property-value-allowed-list": cssTheme, + }, + extends: ["stylelint-config-recommended", "stylelint-config-css-modules"], +}; diff --git a/playwright/package.json b/playwright/package.json index 0da38956e7..62325a8965 100644 --- a/playwright/package.json +++ b/playwright/package.json @@ -4,15 +4,13 @@ "description": "E2E tests for Slice Machine", "author": "Prismic (https://prismic.io)", "scripts": { - "audit": "echo \"No audit for playwright\" && true", "depcheck": "depcheck --config=.depcheckrc", "lint": "eslint --max-warnings 0 --ext .js,.ts .", "test:e2e:install": "playwright install --with-deps chromium", "test:e2e:report": "playwright show-report", "test:e2e": "playwright test", "types": "tsc --noEmit", - "test:e2e:merge-reports": "playwright merge-reports", - "unit": "echo \"No unit tests for playwright\" && true" + "test:e2e:merge-reports": "playwright merge-reports" }, "devDependencies": { "@msgpack/msgpack": "2.8.0", diff --git a/yarn.lock b/yarn.lock index cfb5104bb4..f3e07bf6c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2004,6 +2004,15 @@ __metadata: languageName: node linkType: hard +"@csstools/css-parser-algorithms@npm:^2.5.0": + version: 2.5.0 + resolution: "@csstools/css-parser-algorithms@npm:2.5.0" + peerDependencies: + "@csstools/css-tokenizer": ^2.2.3 + checksum: 6bfbdb4052acca48de9db0806a1b18458709103390656634ebe3cf0390048a6e9b304b78173fbcd524e03669dacb5cc3bedbe8008c354ff9511aed4935dcfc6f + languageName: node + linkType: hard + "@csstools/css-tokenizer@npm:^2.1.1": version: 2.1.1 resolution: "@csstools/css-tokenizer@npm:2.1.1" @@ -2011,6 +2020,13 @@ __metadata: languageName: node linkType: hard +"@csstools/css-tokenizer@npm:^2.2.3": + version: 2.2.3 + resolution: "@csstools/css-tokenizer@npm:2.2.3" + checksum: a2a69f0de516046f85b8f47916879780f9712bdda8166ab01dd47613515ff5a0771555c78badd220686bc1dae3cb0eea5de6896e1e326247a276cc8965520aa6 + languageName: node + linkType: hard + "@csstools/media-query-list-parser@npm:^2.1.0": version: 2.1.0 resolution: "@csstools/media-query-list-parser@npm:2.1.0" @@ -2021,6 +2037,16 @@ __metadata: languageName: node linkType: hard +"@csstools/media-query-list-parser@npm:^2.1.7": + version: 2.1.7 + resolution: "@csstools/media-query-list-parser@npm:2.1.7" + peerDependencies: + "@csstools/css-parser-algorithms": ^2.5.0 + "@csstools/css-tokenizer": ^2.2.3 + checksum: f910d9c29c84e828d121f451607fe9c275297041f317075ede935ffacdd7fd53fcbc0dd4993585e405b5337b7f991b864d101dff3cb8fc400e8c32a9aedbfe69 + languageName: node + linkType: hard + "@csstools/postcss-cascade-layers@npm:^3.0.1": version: 3.0.1 resolution: "@csstools/postcss-cascade-layers@npm:3.0.1" @@ -2309,6 +2335,15 @@ __metadata: languageName: node linkType: hard +"@csstools/selector-specificity@npm:^3.0.1": + version: 3.0.1 + resolution: "@csstools/selector-specificity@npm:3.0.1" + peerDependencies: + postcss-selector-parser: ^6.0.13 + checksum: e4b5aac3bd3ca1f824cb9578f52b16046a519aa8050ce291da37e611976a83cd3b2b2f908d2678dd4cbbe00bbde8ec28c34fffc40dbbf9a13608dfcaf382ee80 + languageName: node + linkType: hard + "@cypress/request@npm:^2.88.10": version: 2.88.11 resolution: "@cypress/request@npm:2.88.11" @@ -4820,12 +4855,12 @@ __metadata: languageName: node linkType: hard -"@prismicio/editor-fields@npm:0.4.19": - version: 0.4.19 - resolution: "@prismicio/editor-fields@npm:0.4.19" +"@prismicio/editor-fields@npm:0.4.20": + version: 0.4.20 + resolution: "@prismicio/editor-fields@npm:0.4.20" dependencies: "@floating-ui/react-dom-interactions": 0.9.3 - "@prismicio/editor-support": 0.4.19 + "@prismicio/editor-support": 0.4.20 "@prismicio/richtext": 2.1.1 "@prismicio/types-internal": 2.3.1 "@tiptap/core": 2.0.3 @@ -4856,16 +4891,16 @@ __metadata: uuid: 9.0.0 zod: 3.21.4 peerDependencies: - "@prismicio/editor-ui": ^0.4.19 + "@prismicio/editor-ui": ^0.4.20 react: 18 react-dom: 18 - checksum: e45ed8792844a12d0932ed1cf7ddaf346b7a7de5fb542c7b580210e3e02a588dca77c5237da90e220e64d83c25f8f2ab5b8a21aff567a34e357c2d0037bcb1c1 + checksum: e61f5c1d7de94992bc8a147d9828c9b6bb76fc7293fdbae62477cd42285056106dfe3ed352c4c05735c98f3fc2836842ae2172d885697ad3d7047918d5b8200c languageName: node linkType: hard -"@prismicio/editor-support@npm:0.4.19": - version: 0.4.19 - resolution: "@prismicio/editor-support@npm:0.4.19" +"@prismicio/editor-support@npm:0.4.20": + version: 0.4.20 + resolution: "@prismicio/editor-support@npm:0.4.20" dependencies: "@prismicio/types-internal": 2.3.1 fp-ts: 2.12.3 @@ -4882,16 +4917,16 @@ __metadata: optional: true zod: optional: true - checksum: 66c2ca45f2b967cb90ff443b36b21d3a04f591ed5c368abe1330917fc9cb65ec121a190866733f690cedb30d1649b9a3cb000bbc2c0fd95471858e2242fc102b + checksum: 65ca73a5c1168ed86b3ee3357402561941f3fe0ad93da57f98f29ac662bc1da292f94ea4f2d2a8448ceb92f8ea6c37b4cb39144829223dd04bb01cab5319bf60 languageName: node linkType: hard -"@prismicio/editor-ui@npm:0.4.19": - version: 0.4.19 - resolution: "@prismicio/editor-ui@npm:0.4.19" +"@prismicio/editor-ui@npm:0.4.20": + version: 0.4.20 + resolution: "@prismicio/editor-ui@npm:0.4.20" dependencies: "@internationalized/date": 3.5.0 - "@prismicio/editor-support": 0.4.19 + "@prismicio/editor-support": 0.4.20 "@radix-ui/react-avatar": 1.0.4 "@radix-ui/react-checkbox": 1.0.4 "@radix-ui/react-dialog": 1.0.5 @@ -4932,7 +4967,7 @@ __metadata: peerDependencies: react: 17 || 18 react-dom: 17 || 18 - checksum: 9d7d6751cb73ee2a6596029bb9ab2faac37c636b842b03298056582ad449f97bda46f4093c260d2f09a1b170465a91b2840faf8115c3e8ed69629d328a40887f + checksum: fef232f472b29ac0cbf0f4a2951a9a0e7875042b052a5eead66953c3fe1e37772868dba94230de01a3391d630f705d36ae928b24ebc86990305a8d57e7124eeb languageName: node linkType: hard @@ -12515,7 +12550,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.0, ajv@npm:^8.9.0": +"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.9.0": version: 8.12.0 resolution: "ajv@npm:8.12.0" dependencies: @@ -13314,6 +13349,13 @@ __metadata: languageName: node linkType: hard +"balanced-match@npm:^2.0.0": + version: 2.0.0 + resolution: "balanced-match@npm:2.0.0" + checksum: 9a5caad6a292c5df164cc6d0c38e0eedf9a1413f42e5fece733640949d74d0052cfa9587c1a1681f772147fb79be495121325a649526957fd75b3a216d1fbc68 + languageName: node + linkType: hard + "base64-js@npm:^1.0.2, base64-js@npm:^1.3.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" @@ -14237,7 +14279,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.1, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": +"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.1, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -14646,7 +14688,7 @@ __metadata: languageName: node linkType: hard -"colord@npm:^2.9.1": +"colord@npm:^2.9.1, colord@npm:^2.9.3": version: 2.9.3 resolution: "colord@npm:2.9.3" checksum: 95d909bfbcfd8d5605cbb5af56f2d1ce2b323990258fd7c0d2eb0e6d3bb177254d7fb8213758db56bb4ede708964f78c6b992b326615f81a18a6aaf11d64c650 @@ -15110,6 +15152,23 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:^9.0.0": + version: 9.0.0 + resolution: "cosmiconfig@npm:9.0.0" + dependencies: + env-paths: ^2.2.1 + import-fresh: ^3.3.0 + js-yaml: ^4.1.0 + parse-json: ^5.2.0 + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: a30c424b53d442ea0bdd24cb1b3d0d8687c8dda4a17ab6afcdc439f8964438801619cdb66e8e79f63b9caa3e6586b60d8bab9ce203e72df6c5e80179b971fe8f + languageName: node + linkType: hard + "crc-32@npm:^1.2.0": version: 1.2.2 resolution: "crc-32@npm:1.2.2" @@ -15279,6 +15338,13 @@ __metadata: languageName: node linkType: hard +"css-functions-list@npm:^3.2.1": + version: 3.2.1 + resolution: "css-functions-list@npm:3.2.1" + checksum: 57d7deb3b05e84d95b88ba9b3244cf60d33b40652b3357f084c805b24a9febda5987ade44ef25a56be41e73249a7dcc157abd704d8a0e998b2c1c2e2d5de6461 + languageName: node + linkType: hard + "css-has-pseudo@npm:^5.0.2": version: 5.0.2 resolution: "css-has-pseudo@npm:5.0.2" @@ -16712,7 +16778,7 @@ __metadata: languageName: node linkType: hard -"env-paths@npm:^2.2.0": +"env-paths@npm:^2.2.0, env-paths@npm:^2.2.1": version: 2.2.1 resolution: "env-paths@npm:2.2.1" checksum: 65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e @@ -18156,6 +18222,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -18170,6 +18249,13 @@ __metadata: languageName: node linkType: hard +"fastest-levenshtein@npm:^1.0.16": + version: 1.0.16 + resolution: "fastest-levenshtein@npm:1.0.16" + checksum: a78d44285c9e2ae2c25f3ef0f8a73f332c1247b7ea7fb4a191e6bb51aa6ee1ef0dfb3ed113616dcdc7023e18e35a8db41f61c8d88988e877cf510df8edafbc71 + languageName: node + linkType: hard + "fastq@npm:^1.6.0": version: 1.15.0 resolution: "fastq@npm:1.15.0" @@ -18277,6 +18363,15 @@ __metadata: languageName: node linkType: hard +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" + dependencies: + flat-cache: ^4.0.0 + checksum: f67802d3334809048c69b3d458f672e1b6d26daefda701761c81f203b80149c35dea04d78ea4238969dd617678e530876722a0634c43031a0957f10cc3ed190f + languageName: node + linkType: hard + "file-loader@npm:^6.2.0": version: 6.2.0 resolution: "file-loader@npm:6.2.0" @@ -18455,6 +18550,17 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^4.0.0": + version: 4.0.0 + resolution: "flat-cache@npm:4.0.0" + dependencies: + flatted: ^3.2.9 + keyv: ^4.5.4 + rimraf: ^5.0.5 + checksum: 744d5f111aeecdfb963faab7089230c737a90c325137251b4fe144fd76932e19738a861e356c5ee828bb310592b42a1da667912d74d0403f1f4ef75be8bfdbac + languageName: node + linkType: hard + "flat@npm:^5.0.2": version: 5.0.2 resolution: "flat@npm:5.0.2" @@ -18471,6 +18577,13 @@ __metadata: languageName: node linkType: hard +"flatted@npm:^3.2.9": + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 + languageName: node + linkType: hard + "flow-parser@npm:0.*": version: 0.208.1 resolution: "flow-parser@npm:0.208.1" @@ -19192,7 +19305,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.3.7": +"glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.3.10 resolution: "glob@npm:10.3.10" dependencies: @@ -19243,6 +19356,26 @@ __metadata: languageName: node linkType: hard +"global-modules@npm:^2.0.0": + version: 2.0.0 + resolution: "global-modules@npm:2.0.0" + dependencies: + global-prefix: ^3.0.0 + checksum: d6197f25856c878c2fb5f038899f2dca7cbb2f7b7cf8999660c0104972d5cfa5c68b5a0a77fa8206bb536c3903a4615665acb9709b4d80846e1bb47eaef65430 + languageName: node + linkType: hard + +"global-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "global-prefix@npm:3.0.0" + dependencies: + ini: ^1.3.5 + kind-of: ^6.0.2 + which: ^1.3.1 + checksum: 8a82fc1d6f22c45484a4e34656cc91bf021a03e03213b0035098d605bfc612d7141f1e14a21097e8a0413b4884afd5b260df0b6a25605ce9d722e11f1df2881d + languageName: node + linkType: hard + "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -19302,6 +19435,13 @@ __metadata: languageName: node linkType: hard +"globjoin@npm:^0.1.4": + version: 0.1.4 + resolution: "globjoin@npm:0.1.4" + checksum: 0a47d88d566122d9e42da946453ee38b398e0021515ac6a95d13f980ba8c1e42954e05ee26cfcbffce1ac1ee094d0524b16ce1dd874ca52408d6db5c6d39985b + languageName: node + linkType: hard + "globrex@npm:^0.1.2": version: 0.1.2 resolution: "globrex@npm:0.1.2" @@ -19923,7 +20063,7 @@ __metadata: languageName: node linkType: hard -"html-tags@npm:^3.1.0": +"html-tags@npm:^3.1.0, html-tags@npm:^3.3.1": version: 3.3.1 resolution: "html-tags@npm:3.3.1" checksum: b4ef1d5a76b678e43cce46e3783d563607b1d550cab30b4f511211564574770aa8c658a400b100e588bc60b8234e59b35ff72c7851cc28f3b5403b13a2c6cbce @@ -20142,6 +20282,13 @@ __metadata: languageName: node linkType: hard +"icss-replace-symbols@npm:^1.1.0": + version: 1.1.0 + resolution: "icss-replace-symbols@npm:1.1.0" + checksum: 24575b2c2f7e762bfc6f4beee31be9ba98a01cad521b5aa9954090a5de2b5e1bf67814c17e22f9e51b7d798238db8215a173d6c2b4726ce634ce06b68ece8045 + languageName: node + linkType: hard + "icss-utils@npm:^5.0.0, icss-utils@npm:^5.1.0": version: 5.1.0 resolution: "icss-utils@npm:5.1.0" @@ -20179,6 +20326,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^5.3.0": + version: 5.3.0 + resolution: "ignore@npm:5.3.0" + checksum: 2736da6621f14ced652785cb05d86301a66d70248597537176612bd0c8630893564bd5f6421f8806b09e8472e75c591ef01672ab8059c07c6eb2c09cefe04bf9 + languageName: node + linkType: hard + "imgix-url-builder@npm:^0.0.3": version: 0.0.3 resolution: "imgix-url-builder@npm:0.0.3" @@ -20207,7 +20361,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -21004,7 +21158,7 @@ __metadata: languageName: node linkType: hard -"is-plain-object@npm:5.0.0": +"is-plain-object@npm:5.0.0, is-plain-object@npm:^5.0.0": version: 5.0.0 resolution: "is-plain-object@npm:5.0.0" checksum: e32d27061eef62c0847d303125440a38660517e586f2f3db7c9d179ae5b6674ab0f469d519b2e25c147a1a3bc87156d0d5f4d8821e0ce4a9ee7fe1fcf11ce45c @@ -21133,6 +21287,13 @@ __metadata: languageName: node linkType: hard +"is-there@npm:^4.4.2": + version: 4.5.1 + resolution: "is-there@npm:4.5.1" + checksum: 763240c846c85b516271c747d675bae1f49efdfb252556c946e9940cb0d5d9953a50610d6f2a1ee9827da7ac1f8e74157c0f02a6ab17e86aaf319c56ba4652c2 + languageName: node + linkType: hard + "is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.9": version: 1.1.10 resolution: "is-typed-array@npm:1.1.10" @@ -21642,6 +21803,13 @@ __metadata: languageName: node linkType: hard +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + "json-parse-better-errors@npm:^1.0.1, json-parse-better-errors@npm:^1.0.2": version: 1.0.2 resolution: "json-parse-better-errors@npm:1.0.2" @@ -21765,6 +21933,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:^4.5.4": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: 3.0.1 + checksum: 74a24395b1c34bd44ad5cb2b49140d087553e170625240b86755a6604cd65aa16efdbdeae5cdb17ba1284a0fbb25ad06263755dbc71b8d8b06f74232ce3cdd72 + languageName: node + linkType: hard + "kind-of@npm:^3.0.2, kind-of@npm:^3.0.3, kind-of@npm:^3.2.0": version: 3.2.2 resolution: "kind-of@npm:3.2.2" @@ -21832,6 +22009,13 @@ __metadata: languageName: node linkType: hard +"known-css-properties@npm:^0.29.0": + version: 0.29.0 + resolution: "known-css-properties@npm:0.29.0" + checksum: daa6562e907f856cbfd58a00c42f532c9bba283388984da6a3bffb494e56612e5f23c52f30b0d9885f0ea07ad5d88bfa0470ee65017a6ce6c565289a1afd78af + languageName: node + linkType: hard + "language-subtag-registry@npm:~0.3.2": version: 0.3.22 resolution: "language-subtag-registry@npm:0.3.22" @@ -22325,6 +22509,13 @@ __metadata: languageName: node linkType: hard +"lodash.truncate@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.truncate@npm:4.4.2" + checksum: b463d8a382cfb5f0e71c504dcb6f807a7bd379ff1ea216669aa42c52fc28c54e404bfbd96791aa09e6df0de2c1d7b8f1b7f4b1a61f324d38fe98bc535aeee4f5 + languageName: node + linkType: hard + "lodash.union@npm:^4.6.0": version: 4.6.0 resolution: "lodash.union@npm:4.6.0" @@ -22724,6 +22915,13 @@ __metadata: languageName: node linkType: hard +"mathml-tag-names@npm:^2.1.3": + version: 2.1.3 + resolution: "mathml-tag-names@npm:2.1.3" + checksum: 1201a25a137d6b9e328facd67912058b8b45b19a6c4cc62641c9476195da28a275ca6e0eca070af5378b905c2b11abc1114676ba703411db0b9ce007de921ad0 + languageName: node + linkType: hard + "md5-hex@npm:^3.0.1": version: 3.0.1 resolution: "md5-hex@npm:3.0.1" @@ -23098,6 +23296,13 @@ __metadata: languageName: node linkType: hard +"meow@npm:^13.1.0": + version: 13.1.0 + resolution: "meow@npm:13.1.0" + checksum: 78270d501c9f77c38c4d2b8d7a191396f4c4a9ea35710221f16cb21c30869f0c866a038b704fe0782d22ae2ca254cac159bc0c478b4c2f3dd72b26afc9ff2383 + languageName: node + linkType: hard + "merge-descriptors@npm:1.0.1": version: 1.0.1 resolution: "merge-descriptors@npm:1.0.1" @@ -24046,6 +24251,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^3.0.0": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d + languageName: node + linkType: hard + "mlly@npm:^1.1.0, mlly@npm:^1.2.0, mlly@npm:^1.3.0": version: 1.3.0 resolution: "mlly@npm:1.3.0" @@ -26510,6 +26724,13 @@ __metadata: languageName: node linkType: hard +"postcss-media-query-parser@npm:^0.2.3": + version: 0.2.3 + resolution: "postcss-media-query-parser@npm:0.2.3" + checksum: 8000d4d95b912994928ff86137f5ab0ed4c4ee1498af2336e93d708ae8827a690cd7acbaed55d14684cf44d82c8d44b031c1c69ae6bcd2f9620ea67573888090 + languageName: node + linkType: hard + "postcss-merge-longhand@npm:^5.1.7": version: 5.1.7 resolution: "postcss-merge-longhand@npm:5.1.7" @@ -27118,6 +27339,13 @@ __metadata: languageName: node linkType: hard +"postcss-resolve-nested-selector@npm:^0.1.1": + version: 0.1.1 + resolution: "postcss-resolve-nested-selector@npm:0.1.1" + checksum: b08fb76ab092a09ee01328bad620a01dcb445ac5eb02dd0ed9ed75217c2f779ecb3bf99a361c46e695689309c08c09f1a1ad7354c8d58c2c2c40d364657fcb08 + languageName: node + linkType: hard + "postcss-safe-parser@npm:^6.0.0": version: 6.0.0 resolution: "postcss-safe-parser@npm:6.0.0" @@ -27127,6 +27355,15 @@ __metadata: languageName: node linkType: hard +"postcss-safe-parser@npm:^7.0.0": + version: 7.0.0 + resolution: "postcss-safe-parser@npm:7.0.0" + peerDependencies: + postcss: ^8.4.31 + checksum: dba4d782393e6f07339c24bdb8b41166e483d5e7b8f34174c35c64065aef36aadef94b53e0501d7a630d42f51bbd824671e8fb1c2b417333b08b71c9b0066c76 + languageName: node + linkType: hard + "postcss-scss@npm:^4.0.6, postcss-scss@npm:^4.0.7": version: 4.0.7 resolution: "postcss-scss@npm:4.0.7" @@ -27157,6 +27394,16 @@ __metadata: languageName: node linkType: hard +"postcss-selector-parser@npm:^6.0.13, postcss-selector-parser@npm:^6.0.15": + version: 6.0.15 + resolution: "postcss-selector-parser@npm:6.0.15" + dependencies: + cssesc: ^3.0.0 + util-deprecate: ^1.0.2 + checksum: 57decb94152111004f15e27b9c61131eb50ee10a3288e7fcf424cebbb4aba82c2817517ae718f8b5d704ee9e02a638d4a2acff8f47685c295a33ecee4fd31055 + languageName: node + linkType: hard + "postcss-svgo@npm:^5.1.0": version: 5.1.0 resolution: "postcss-svgo@npm:5.1.0" @@ -27274,6 +27521,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.0.0, postcss@npm:^8.4.33": + version: 8.4.33 + resolution: "postcss@npm:8.4.33" + dependencies: + nanoid: ^3.3.7 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 6f98b2af4b76632a3de20c4f47bf0e984a1ce1a531cf11adcb0b1d63a6cbda0aae4165e578b66c32ca4879038e3eaad386a6be725a8fb4429c78e3c1ab858fe9 + languageName: node + linkType: hard + "postcss@npm:^8.1.10, postcss@npm:^8.2.1, postcss@npm:^8.2.15, postcss@npm:^8.3.6, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.6": version: 8.4.24 resolution: "postcss@npm:8.4.24" @@ -29342,7 +29600,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:5.0.5": +"rimraf@npm:5.0.5, rimraf@npm:^5.0.5": version: 5.0.5 resolution: "rimraf@npm:5.0.5" dependencies: @@ -30214,9 +30472,9 @@ __metadata: dependencies: "@emotion/react": 11.11.1 "@extractus/oembed-extractor": 3.1.8 - "@prismicio/editor-fields": 0.4.19 - "@prismicio/editor-support": 0.4.19 - "@prismicio/editor-ui": 0.4.19 + "@prismicio/editor-fields": 0.4.20 + "@prismicio/editor-support": 0.4.20 + "@prismicio/editor-ui": 0.4.20 "@prismicio/mocks": 2.0.0-alpha.2 "@prismicio/simulator": 0.1.4 "@prismicio/types-internal": 2.2.0 @@ -30302,8 +30560,12 @@ __metadata: semver: 7.3.8 start-slicemachine: "workspace:*" storybook: 7.0.10 + stylelint: 16.2.0 + stylelint-config-css-modules: 4.4.0 + stylelint-config-recommended: 14.0.0 swr: 1.3.0 theme-ui: 0.15.5 + typed-css-modules: 0.8.1 typesafe-actions: 5.1.0 typescript: 4.9.5 vite: 4.3.9 @@ -31038,7 +31300,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^7.0.1": +"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": version: 7.1.0 resolution: "strip-ansi@npm:7.1.0" dependencies: @@ -31219,6 +31481,92 @@ __metadata: languageName: node linkType: hard +"stylelint-config-css-modules@npm:4.4.0": + version: 4.4.0 + resolution: "stylelint-config-css-modules@npm:4.4.0" + dependencies: + stylelint-scss: ^6.0.0 + peerDependencies: + stylelint: ^14.5.1 || ^15.0.0 || ^16.0.0 + dependenciesMeta: + stylelint-scss: + optional: true + checksum: 2a085528dde5e06737a6a62722b3ba531dbd07d0d209bca8da78bffc7ccc0d8f24fc8c6b50e5e6a898086aace4f306144ff8bdd3530562364e189db4b31e5785 + languageName: node + linkType: hard + +"stylelint-config-recommended@npm:14.0.0": + version: 14.0.0 + resolution: "stylelint-config-recommended@npm:14.0.0" + peerDependencies: + stylelint: ^16.0.0 + checksum: 36511115b06d9f51aa0edc05f6064a7aae98cc990da14dd03629951f63a029d9e66a4d5b1ca678cce699e24413a62c2cd608cc07413ca5026f9680ddb8993858 + languageName: node + linkType: hard + +"stylelint-scss@npm:^6.0.0": + version: 6.0.0 + resolution: "stylelint-scss@npm:6.0.0" + dependencies: + known-css-properties: ^0.29.0 + postcss-media-query-parser: ^0.2.3 + postcss-resolve-nested-selector: ^0.1.1 + postcss-selector-parser: ^6.0.13 + postcss-value-parser: ^4.2.0 + peerDependencies: + stylelint: ^16.0.2 + checksum: 89d86fee3929ae30c456beae20b6ca1035c96f916e14a68f72d91f69c4458e1973f3b65314d7abed6955f1c4d1db74fe76df4ff13ef3d77ed4e6b0d7c7473104 + languageName: node + linkType: hard + +"stylelint@npm:16.2.0": + version: 16.2.0 + resolution: "stylelint@npm:16.2.0" + dependencies: + "@csstools/css-parser-algorithms": ^2.5.0 + "@csstools/css-tokenizer": ^2.2.3 + "@csstools/media-query-list-parser": ^2.1.7 + "@csstools/selector-specificity": ^3.0.1 + balanced-match: ^2.0.0 + colord: ^2.9.3 + cosmiconfig: ^9.0.0 + css-functions-list: ^3.2.1 + css-tree: ^2.3.1 + debug: ^4.3.4 + fast-glob: ^3.3.2 + fastest-levenshtein: ^1.0.16 + file-entry-cache: ^8.0.0 + global-modules: ^2.0.0 + globby: ^11.1.0 + globjoin: ^0.1.4 + html-tags: ^3.3.1 + ignore: ^5.3.0 + imurmurhash: ^0.1.4 + is-plain-object: ^5.0.0 + known-css-properties: ^0.29.0 + mathml-tag-names: ^2.1.3 + meow: ^13.1.0 + micromatch: ^4.0.5 + normalize-path: ^3.0.0 + picocolors: ^1.0.0 + postcss: ^8.4.33 + postcss-resolve-nested-selector: ^0.1.1 + postcss-safe-parser: ^7.0.0 + postcss-selector-parser: ^6.0.15 + postcss-value-parser: ^4.2.0 + resolve-from: ^5.0.0 + string-width: ^4.2.3 + strip-ansi: ^7.1.0 + supports-hyperlinks: ^3.0.0 + svg-tags: ^1.0.0 + table: ^6.8.1 + write-file-atomic: ^5.0.1 + bin: + stylelint: bin/stylelint.mjs + checksum: dbc9ef12d3e1027ba1daf2f0d413e16127d32ea128b47d2c273be1476b329926f4698dc390eea56beb25fc8ebd9e2a7664a868df706d4e12e94ad6a4d1697d77 + languageName: node + linkType: hard + "stylis@npm:4.2.0": version: 4.2.0 resolution: "stylis@npm:4.2.0" @@ -31260,6 +31608,16 @@ __metadata: languageName: node linkType: hard +"supports-hyperlinks@npm:^3.0.0": + version: 3.0.0 + resolution: "supports-hyperlinks@npm:3.0.0" + dependencies: + has-flag: ^4.0.0 + supports-color: ^7.0.0 + checksum: 41021305de5255b10d821bf93c7a781f783e1693d0faec293d7fc7ccf17011b90bde84b0295fa92ba75c6c390351fe84fdd18848cad4bf656e464a958243c3e7 + languageName: node + linkType: hard + "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" @@ -31532,6 +31890,19 @@ __metadata: languageName: node linkType: hard +"table@npm:^6.8.1": + version: 6.8.1 + resolution: "table@npm:6.8.1" + dependencies: + ajv: ^8.0.1 + lodash.truncate: ^4.4.2 + slice-ansi: ^4.0.0 + string-width: ^4.2.3 + strip-ansi: ^6.0.1 + checksum: 08249c7046125d9d0a944a6e96cfe9ec66908d6b8a9db125531be6eb05fa0de047fd5542e9d43b4f987057f00a093b276b8d3e19af162a9c40db2681058fd306 + languageName: node + linkType: hard + "tailwindcss@npm:3.0.23": version: 3.0.23 resolution: "tailwindcss@npm:3.0.23" @@ -32325,6 +32696,29 @@ __metadata: languageName: node linkType: hard +"typed-css-modules@npm:0.8.1": + version: 0.8.1 + resolution: "typed-css-modules@npm:0.8.1" + dependencies: + camelcase: ^6.0.0 + chalk: ^4.0.0 + chokidar: ^3.4.0 + glob: ^10.3.10 + icss-replace-symbols: ^1.1.0 + is-there: ^4.4.2 + mkdirp: ^3.0.0 + postcss: ^8.0.0 + postcss-modules-extract-imports: ^3.0.0 + postcss-modules-local-by-default: ^4.0.0 + postcss-modules-scope: ^3.0.0 + postcss-modules-values: ^4.0.0 + yargs: ^17.7.2 + bin: + tcm: lib/cli.js + checksum: 7a623f86fa49c78fde47c24342563b1fbbd56362c721d16f46933836e6979789e2be957b7440fc0bf75a201cce50fbb7af9cea22c644f1b65b512231b9ac4ffc + languageName: node + linkType: hard + "typedarray@npm:^0.0.6": version: 0.0.6 resolution: "typedarray@npm:0.0.6" @@ -34160,6 +34554,17 @@ __metadata: languageName: node linkType: hard +"which@npm:^1.3.1": + version: 1.3.1 + resolution: "which@npm:1.3.1" + dependencies: + isexe: ^2.0.0 + bin: + which: ./bin/which + checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04 + languageName: node + linkType: hard + "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -34295,6 +34700,16 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^5.0.1": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: ^0.1.4 + signal-exit: ^4.0.1 + checksum: 8dbb0e2512c2f72ccc20ccedab9986c7d02d04039ed6e8780c987dc4940b793339c50172a1008eed7747001bfacc0ca47562668a069a7506c46c77d7ba3926a9 + languageName: node + linkType: hard + "write-json-file@npm:^2.3.0": version: 2.3.0 resolution: "write-json-file@npm:2.3.0"