{"_id":"@dlgshi/cypress-plugin-designtokens","_rev":"3-67b0edc90ae8589cdb7096995919ab63","name":"@dlgshi/cypress-plugin-designtokens","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.7":{"name":"@dlgshi/cypress-plugin-designtokens","version":"1.0.7","keywords":["cypress","testing","css","designToken","qa","types","plugin"],"author":{"name":"Igor Dlugosh"},"license":"MIT","_id":"@dlgshi/cypress-plugin-designtokens@1.0.7","maintainers":[{"name":"dlgshi","email":"dlugosh.igor@gmail.com"}],"homepage":"https://github.com/DlgSHi/cypress-plugin-designTokens#readme","bugs":{"url":"https://github.com/DlgSHi/cypress-plugin-designTokens/issues"},"dist":{"shasum":"5ff362d7b380cbebdda989f063a912afc03a4bdb","tarball":"https://registry.npmjs.org/@dlgshi/cypress-plugin-designtokens/-/cypress-plugin-designtokens-1.0.7.tgz","fileCount":4,"integrity":"sha512-0giVX5T4V6ak0pdWGwAbz1wLFYGUkmjYtAzyrfnHS5685yYPbwhUN/ZdwRvMEZP9GtbbuUw/Km5O9WnoUvgmrA==","signatures":[{"sig":"MEUCIApd9L+EJ98tgErUWPELE385nE0WYKYw1+0T0vkCrt+KAiEAqfuQWp0B/1B4tkZPAkqd12TcuzVp5XvNEdv1oB+NnoE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQPnlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZeQ//UBsQuzkxXGh1O5u0XZoONHG6DcCpL+hgtlw2gKG8sJD3/nJr\r\nUkj5N65qQFgQl+I7fD6wLgHzF6fr6UfUpl9xFq86RBldP3UjrbPHLJAqrT2I\r\nNg/hMsW6sR+XOxWALEzyh3+YweSSUeLpT+ItQpO4+Wrx4LtH4edcxLGRS4tM\r\nTX5inLQjTh2YJDvbJ7hBVIq3DqYsNBtxA+jujJJl00z3LK2ADmzmeCcxP6sV\r\n7Sj97sluLTZjvqhEghLPAYR6LkmYXy0eQxe784tZfgGyrAu/VA5ddUFjieVy\r\nkeun0pdfscxKXaosUDMPoGP29XfuUdxUoJ3TvxPNmFLddR0cVUticSMA+aMC\r\nAERR2zQ6coRadwnjHZxiFFudIm9PkvM3Bs/GtACPRkccl0X5pLJdEEpQfskm\r\nZ4F+cnM9BF9alo5zp4mxF8o+9osgjpWSOv51VXZ8oMyc2EwXXXRpCg6sGYAm\r\nxaqJYp5B/RYzzl/D19b8NAceaQNKqmGBwNJNjiRTn7AtkZYKVaJqTkaif9LT\r\n3aFZfEjwsPjqNjkgwVW3otkfWSoDMUSLE2Z7nLAyELPr+y9p/eblKgzomu2+\r\nmcW3LsSU9y8spdxn2RUCNa98qWzmm14l6OjbVlqJW84oNkKwQN79DXQhRBcq\r\nOMs3rsl74VXRnrjO7tohUFmlV5t98VF1haY=\r\n=Uc3F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/global.d.ts","gitHead":"3cbab7b31c51a26809abdca7858b5faf1ba3b717","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/github","@semantic-release/npm"]},"scripts":{"lint":"eslint . --max-warnings=15 --quiet","build":"tsc -p tsconfig.json","cy:run":"npx cypress run --component --browser chrome","cy:open":"npx cypress open --component --browser chrome","semantic-release":"semantic-release"},"_npmUser":{"name":"dlgshi","email":"dlugosh.igor@gmail.com"},"pre-commit":["lint"],"repository":{"url":"git+https://github.com/DlgSHi/cypress-plugin-designTokens.git","type":"git"},"_npmVersion":"8.19.3","description":"This project will allow you to check / verify designTokens assigned to css properties in the project","directories":{},"_nodeVersion":"18.13.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.2","react":"^17.0.2","eslint":"^8.38.0","jquery":"^3.6.4","cypress":"^12.6.0","postcss":"^8.4.17","webpack":"^5.78.0","react-dom":"^17.0.2","pre-commit":"^1.2.2","typescript":"^5.0.3","@babel/core":"^7.21.4","@types/node":"^18.11.8","@types/react":"^17.0.2","babel-loader":"^9.1.2","carbon-react":"^117.3.0","@types/jquery":"^3.5.16","@commitlint/cli":"^17.2.0","@types/react-dom":"^17.0.2","semantic-release":"^21.0.1","standard-version":"^9.5.0","@babel/preset-env":"^7.21.4","eslint-plugin-vue":"^9.7.0","styled-components":"^4.4.1","generate-changelog":"^1.8.0","@babel/preset-react":"^7.18.6","@sage/design-tokens":"^2.65.0","@babel/eslint-parser":"^7.21.3","@babel/preset-typescript":"^7.21.4","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^5.42.1","@semantic-release/changelog":"^6.0.1","@commitlint/config-conventional":"^17.2.0","@typescript-eslint/eslint-plugin":"^5.58.0","@babel/plugin-transform-react-jsx":"^7.21.0"},"_npmOperationalInternal":{"tmp":"tmp/cypress-plugin-designtokens_1.0.7_1681979876814_0.7125441750168648","host":"s3://npm-registry-packages"}},"0.0.0-development":{"name":"@dlgshi/cypress-plugin-designtokens","version":"0.0.0-development","keywords":["cypress","testing","css","designToken","qa","types","plugin"],"author":{"name":"Igor Dlugosh"},"license":"MIT","_id":"@dlgshi/cypress-plugin-designtokens@0.0.0-development","maintainers":[{"name":"dlgshi","email":"dlugosh.igor@gmail.com"}],"homepage":"https://github.com/DlgSHi/cypress-plugin-designTokens#readme","bugs":{"url":"https://github.com/DlgSHi/cypress-plugin-designTokens/issues"},"dist":{"shasum":"dab76e953e5abc1a91818bf03280fa2daa0bcd07","tarball":"https://registry.npmjs.org/@dlgshi/cypress-plugin-designtokens/-/cypress-plugin-designtokens-0.0.0-development.tgz","fileCount":4,"integrity":"sha512-Vr4Kz+TjvXvojsABuMsw45FL6f9rChsldzBzz9uUdIpZSw7rFOVo7HpP+kEzW+foIKsRmRFgITs7pi65NWUb9Q==","signatures":[{"sig":"MEYCIQCffOxnh9Sgh3UC/ax+/g7jKgoMezdwAA2E1n9mNvnK6wIhAOH/e9V57DmyWh8c+WElUfm3yU9NmSINzP0FaaYfSLjO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkRil5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwpQ/+PITJZIwvmNmlUdeFycttTKQzuFP0bM4msXCm+oraepo3Qr56\r\n+/F3nRduvn4MzTaKv2j16io0TkdZrWBILjVhbgcy1sGd8ric2Kv1g2GlxNZU\r\nshqyQy1qJ7f1Nz7jJkLYzva1tD5AiKk1/o9J+Sj4YvuijLkSZQvgFdWgdyD9\r\na3mHAGSG3WXbXW71e/TmB4d31Np8jGUHWHh/K869bBE96aKrZrGL1k7SoBS6\r\nwuBgRT9Mbw8ufBA7sDq0PRQtIinQrE2E/LaWD7j5Dw2BmqFNqD5TvHCSSefn\r\nm6a1CSaKR3JY9iPAmBmMfY6InGsBAf9SqfePJinhTdjIeXvaPlZml6gwSRff\r\nHRhSKwLESE6Sdwc75r6sXJ6ADh35NOIeIOaTTZv+sv9fWvySKQ/mMHQywA3c\r\n9hXf8gBBXQ9kxp9UvgNaQFSMvp+wToj5WQSpMRx5CHg3P3PSI0sK4xye+U4L\r\nf82r36fW5ePIJNr0g5kYuTSp2hqJSITi6J0Vud6yNZCq9OsqKAlZNbSTEmfO\r\nBPzOE2Qkaqv5rbFR5KFucwTghrBHVqvyOouRBKgsQYEx4zT+ddAqHa+lny9O\r\nCy5eEnDBV4v7w7JFz1DNUARQmyfFV2/cvLwEMeV01ckIeD4gNt1liiXSzOcI\r\n11JGi/xc7jcx+7oCejjz9b4E0AJ6nCU683I=\r\n=wpQd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/global.d.ts","gitHead":"9cc4fec9a9444f6fb53d1c4eaa0c25ae46a71371","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/github","@semantic-release/npm"],"branches":["main"]},"scripts":{"lint":"eslint . --max-warnings=15 --quiet","build":"tsc -p tsconfig.json","cy:run":"npx cypress run --component --browser chrome","cy:open":"npx cypress open --component --browser chrome","prepublish":"npm run lint && npm run build","semantic-release":"semantic-release"},"_npmUser":{"name":"dlgshi","email":"dlugosh.igor@gmail.com"},"pre-commit":["lint"],"repository":{"url":"git+https://github.com/DlgSHi/cypress-plugin-designTokens.git","type":"git"},"_npmVersion":"8.19.3","description":"This project will allow you to check / verify designTokens assigned to css properties in the project","directories":{},"_nodeVersion":"18.13.0","publishConfig":{"registry":"https://npm.pkg.github.com/"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.2","react":"^17.0.2","eslint":"^8.38.0","jquery":"^3.6.4","cypress":"^12.6.0","postcss":"^8.4.17","webpack":"^5.78.0","react-dom":"^17.0.2","pre-commit":"^1.2.2","typescript":"^5.0.3","@babel/core":"^7.21.4","@types/node":"^18.11.8","@types/react":"^17.0.2","babel-loader":"^9.1.2","carbon-react":"^117.3.0","@types/jquery":"^3.5.16","@commitlint/cli":"^17.2.0","@types/react-dom":"^17.0.2","semantic-release":"^21.0.1","standard-version":"^9.5.0","@babel/preset-env":"^7.21.4","styled-components":"^4.4.1","generate-changelog":"^1.8.0","@babel/preset-react":"^7.18.6","@sage/design-tokens":"^2.65.0","@babel/eslint-parser":"^7.21.3","@babel/preset-typescript":"^7.21.4","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^5.42.1","@semantic-release/changelog":"^6.0.1","@commitlint/config-conventional":"^17.2.0","@typescript-eslint/eslint-plugin":"^5.58.0","@babel/plugin-transform-react-jsx":"^7.21.0"},"_npmOperationalInternal":{"tmp":"tmp/cypress-plugin-designtokens_0.0.0-development_1682319737373_0.8759133791477633","host":"s3://npm-registry-packages"}},"0.0.1-development":{"name":"@dlgshi/cypress-plugin-designtokens","version":"0.0.1-development","keywords":["cypress","testing","css","designToken","qa","types","plugin"],"author":{"name":"Igor Dlugosh"},"license":"MIT","_id":"@dlgshi/cypress-plugin-designtokens@0.0.1-development","maintainers":[{"name":"dlgshi","email":"dlugosh.igor@gmail.com"}],"homepage":"https://github.com/DlgSHi/cypress-plugin-designTokens#readme","bugs":{"url":"https://github.com/DlgSHi/cypress-plugin-designTokens/issues"},"dist":{"shasum":"ab982a9ab5e563013645443b0eb92789f525b050","tarball":"https://registry.npmjs.org/@dlgshi/cypress-plugin-designtokens/-/cypress-plugin-designtokens-0.0.1-development.tgz","fileCount":4,"integrity":"sha512-+8GAg9SEgdm/7H4Xl8kzkC0g2MYeeGjwSZtu3itikgtUJhw0hU+ts6vDBXFagHpAtJjAOHKFlbtj9ZRt04QvIg==","signatures":[{"sig":"MEUCIG8adbgUdcWspFMROeDi5gNmv3522ZmWjx5wih16yKmBAiEAvvH6xmnRXzbmkTpEE5kkPn/VQ03dJ8JhExft/8MkWis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkRio7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrISQ/8CGF8MO6Ufb0NE7qJ24S7sj2iSK169xt9vxr//gjLWVR4ucE2\r\nYl8PEizQdYmjaMNYACkwNGsxQm/3jJFGLlBZxZQ9FnIe6idio70gFr+eLbmE\r\nwY5b8hukPWEoz9aoNZYqKqx25/sejO9F/eVdGR6qwF8IAcHMf6jx0j0F+kfu\r\nCwTcUKU6Yh7Zntzj12M8Qdu1Pyw/XFSVgHJ+oiaebaRjEd+O9ENBtoaX7+mo\r\nyuCr203Y6/WVcFsQhZtNM5Y9N3dZilfk/YAtJSIDAtdnuMzKtJ7Zx14Fq/dA\r\nFU07UV9k7j85uiMR9x0yJXnaHJJfnDiHvJkow6++XH10O2ruZBTdhN6RmfVA\r\nxINXl50L5xr8NiIzht5kRnrK19EyM8fTCubVniibXHKgTxaDqLF2GQ+uyfon\r\nIU+nl4al+YFyDI4Yo+dUklRQHHUQssxkCn3Bif1jJNs5AIuNLOOL6/5cU8sD\r\nnQq2CA8uV3QT+JsaOMGO2ogz3/8StbpUbpqcCnoKPHTTCJbnMDPRMwT4RRUx\r\nPYgEKN8Rnpkdr5Uvp00WSLkfaMoUcmEDuWc1rEHQAAH+rt2FqRf1YAV67NCe\r\nq0KrlglE5UCsmzrHF7bRVpjyAVtVdJTa+3pDg3LSfUzkPxmAIBh0ws/ovAd9\r\nbsKU4Wyc7cJh5s2xM17M+8Juw585A//tFfE=\r\n=o1+S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/global.d.ts","gitHead":"9cc4fec9a9444f6fb53d1c4eaa0c25ae46a71371","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/github","@semantic-release/npm"],"branches":["main"]},"scripts":{"lint":"eslint . --max-warnings=15 --quiet","build":"tsc -p tsconfig.json","cy:run":"npx cypress run --component --browser chrome","cy:open":"npx cypress open --component --browser chrome","prepublish":"npm run lint && npm run build","semantic-release":"semantic-release"},"_npmUser":{"name":"dlgshi","email":"dlugosh.igor@gmail.com"},"pre-commit":["lint"],"repository":{"url":"git+https://github.com/DlgSHi/cypress-plugin-designTokens.git","type":"git"},"_npmVersion":"8.19.3","description":"This project will allow you to check / verify designTokens assigned to css properties in the project","directories":{},"_nodeVersion":"18.13.0","publishConfig":{"registry":"https://npm.pkg.github.com/"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.2","react":"^17.0.2","eslint":"^8.38.0","jquery":"^3.6.4","cypress":"^12.6.0","postcss":"^8.4.17","webpack":"^5.78.0","react-dom":"^17.0.2","pre-commit":"^1.2.2","typescript":"^5.0.3","@babel/core":"^7.21.4","@types/node":"^18.11.8","@types/react":"^17.0.2","babel-loader":"^9.1.2","carbon-react":"^117.3.0","@types/jquery":"^3.5.16","@commitlint/cli":"^17.2.0","@types/react-dom":"^17.0.2","semantic-release":"^21.0.1","standard-version":"^9.5.0","@babel/preset-env":"^7.21.4","styled-components":"^4.4.1","generate-changelog":"^1.8.0","@babel/preset-react":"^7.18.6","@sage/design-tokens":"^2.65.0","@babel/eslint-parser":"^7.21.3","@babel/preset-typescript":"^7.21.4","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^5.42.1","@semantic-release/changelog":"^6.0.1","@commitlint/config-conventional":"^17.2.0","@typescript-eslint/eslint-plugin":"^5.58.0","@babel/plugin-transform-react-jsx":"^7.21.0"},"_npmOperationalInternal":{"tmp":"tmp/cypress-plugin-designtokens_0.0.1-development_1682319931187_0.21968679315393014","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@dlgshi/cypress-plugin-designtokens","version":"1.1.0","description":"This project will allow you to check / verify designTokens assigned to css properties in the project","main":"dist/index.js","types":"dist/global.d.ts","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"scripts":{"cy:open":"npx cypress open --component --browser chrome","cy:run":"npx cypress run --component --browser chrome","build":"tsc -p tsconfig.json","lint":"eslint . --max-warnings=15 --quiet","prepublish":"npm run lint && npm run build","semantic-release":"semantic-release"},"repository":{"type":"git","url":"git+https://github.com/DlgSHi/cypress-plugin-designTokens.git"},"keywords":["cypress","testing","css","designToken","qa","types","plugin"],"author":{"name":"Igor Dlugosh"},"license":"MIT","bugs":{"url":"https://github.com/DlgSHi/cypress-plugin-designTokens/issues"},"homepage":"https://github.com/DlgSHi/cypress-plugin-designTokens#readme","pre-commit":["lint"],"release":{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/github","@semantic-release/npm"]},"devDependencies":{"@babel/core":"^7.21.4","@babel/eslint-parser":"^7.21.3","@babel/plugin-transform-react-jsx":"^7.21.0","@babel/preset-env":"^7.21.4","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.4","@commitlint/cli":"^17.2.0","@commitlint/config-conventional":"^17.2.0","@rollup/plugin-typescript":"^11.0.0","@sage/design-tokens":"^2.65.0","@semantic-release/changelog":"^6.0.1","@types/jquery":"^3.5.16","@types/node":"^18.11.8","@types/react":"^17.0.2","@types/react-dom":"^17.0.2","@typescript-eslint/eslint-plugin":"^5.58.0","@typescript-eslint/parser":"^5.42.1","babel-loader":"^9.1.2","carbon-react":"^117.3.0","cypress":"^12.6.0","eslint":"^8.38.0","generate-changelog":"^1.8.0","husky":"^8.0.2","jquery":"^3.6.4","postcss":"^8.4.17","pre-commit":"^1.2.2","react":"^17.0.2","react-dom":"^17.0.2","semantic-release":"^21.0.1","standard-version":"^9.5.0","styled-components":"^4.4.1","typescript":"^5.0.3","webpack":"^5.78.0"},"_id":"@dlgshi/cypress-plugin-designtokens@1.1.0","gitHead":"4fbef4ead563bc8b3d153ae093734c1fdd173ff6","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-dQVdvFK3R681/1zQaNapKvk9Kt76nzrq3XRaAnVTFlUvK9/HmwUlzh6YobO5k12O2mVRC5jF6C4Nw8MlJ4r+5Q==","shasum":"c99d76572afa15772dde6c890990162c764454fd","tarball":"https://registry.npmjs.org/@dlgshi/cypress-plugin-designtokens/-/cypress-plugin-designtokens-1.1.0.tgz","fileCount":4,"unpackedSize":9999,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCaN29UiMky2oON9eqnLIDZmg5/nGBcDR8bogayWSm5UgIgSNR6ozB5W7uPdgoPqNvNjygMZfPYU6KI8vaSx40jQK8="}]},"_npmUser":{"name":"dlgshi","email":"dlugosh.igor@gmail.com"},"directories":{},"maintainers":[{"name":"dlgshi","email":"dlugosh.igor@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cypress-plugin-designtokens_1.1.0_1740737715600_0.9307923060460777"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-20T08:37:56.713Z","modified":"2025-02-28T10:15:15.935Z","1.0.7":"2023-04-20T08:37:57.067Z","0.0.0-development":"2023-04-24T07:02:17.547Z","0.0.1-development":"2023-04-24T07:05:31.348Z","1.1.0":"2025-02-28T10:15:15.783Z"},"bugs":{"url":"https://github.com/DlgSHi/cypress-plugin-designTokens/issues"},"author":{"name":"Igor Dlugosh"},"license":"MIT","homepage":"https://github.com/DlgSHi/cypress-plugin-designTokens#readme","keywords":["cypress","testing","css","designToken","qa","types","plugin"],"repository":{"type":"git","url":"git+https://github.com/DlgSHi/cypress-plugin-designTokens.git"},"description":"This project will allow you to check / verify designTokens assigned to css properties in the project","maintainers":[{"name":"dlgshi","email":"dlugosh.igor@gmail.com"}],"readme":"# cypress-plugin-designTokens\nThis project will allow you to check / verify designTokens assigned to css properties in the project\n\n\n# Description\n\nThis is a custom Cypress command that allows you to get the design tokens used for a specific CSS property on a given element. It searches through all the stylesheets in the document and returns an array of the design tokens used for the given CSS property on the element.\n\nThe `cy.getDesignTokensByCssProperty` command takes two arguments:\n\n- subject: A jQuery element that you want to search for design tokens on.\n- cssProperty: The name of the CSS property that you want to get design tokens for.\nNote - If no design tokens are found for the given CSS property on the element, an error will be thrown.\n\n# Installation\n\nTo use `cy.getDesignTokensByCssProperty`, you can copy the code for the command into your project's Cypress commands file (cypress/support/commands.{js|ts} by default). Alternatively, you can import the command from a separate JavaScript module.\n\n# Usage\nYou can then use the command like this:\n## Examples\n\n```typescript\nimport \"@dlgshi/cypress-plugin-designtokens\";\n```\n\n```typescript\ncy.get(\"#my-element\").getDesignTokensByCssProperty(\"color\").then((tokens) => {\n  // Do something with the tokens\n});\n```\n\nGet the design tokens for the color property on an element with ID `my-element`:\n\n```typescript\ncy.get(\"#my-element\").getDesignTokensByCssProperty(\"color\").then((tokens) => {\n  // Do something with the tokens\n});\n```\n\nGet the design tokens for the margin property on all button elements:\n\n```typescript\ncy.get(\"button\").getDesignTokensByCssProperty(\"margin\").then((tokens) => {\n  // Do something with the tokens\n});\n```\n\nGet the design tokens for the background-color property on an element with class `my-class`:\n\n```typescript\ncy.get(\".my-class\").getDesignTokensByCssProperty(\"background-color\").then((tokens) => {\n  // Do something with the tokens\n});\n```\n\nIf the matching CSS rules use only one design token, the command returns a single-element array. If the rules use more than one token, the command returns an array of all the token names.\n\n```typescript\ncy.get('button').getDesignTokensByCssProperty('color').then((tokens) => {\n  // `tokens` is an array of design token names, or an empty array if no tokens were found\n  console.log('Design tokens used in button color:', tokens);\n});\n```\n\nTo retrieve the first token name in the array, you can use array destructuring like this:\n\n```typescript\ncy.get('button').getDesignTokensByCssProperty('color').then(([token]) => {\n  // `token` is the first design token name used in the matching CSS rules, or `undefined` if no tokens were found\n  console.log('First design token used in button color:', token);\n});\n```\n\nIf you're using `TypeScript`, you can import the `DesignToken` type from the `@your-org/design-tokens` package and use it to annotate the return type of the `getDesignTokensByCssProperty` command:\n\n\n```typescript\nimport type { DesignToken } from '@your-org/design-tokens';\n\ndeclare global {\n  namespace Cypress {\n    interface Chainable {\n      getDesignTokensByCssProperty(\n        cssProperty: string\n      ): Chainable<DesignToken[] | [DesignToken] | []>;\n    }\n  }\n}\n```\n\nExample usage\n```typescript\ncy.get('button').getDesignTokensByCssProperty('color').then((tokens) => {\n  // `tokens` is an array of `DesignToken` objects, or an empty array if no tokens were found\n  console.log('Design tokens used in button color:', tokens);\n});\n```\n\n# TypeScript support\n\nIn most cases, types work just by installing plugin, but you can add the types to your tsconfig.json\n\n```typescript\n{\n  \"types\": [\"@dlgshi/cypress-plugin-designtokens\"]\n}\n```\n\n# Dependencies\n\n`cy.getDesignTokensByCssProperty` depends on the jQuery and Cypress libraries, and assumes that the design tokens used in the CSS styles are defined as CSS variables in the document's stylesheets.","readmeFilename":"README.md"}