{"_id":"@crowdin/themes-converter","_rev":"6-a4cff94b4625c7b7a2758ddb53044be5","name":"@crowdin/themes-converter","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@crowdin/themes-converter","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@crowdin/themes-converter@1.0.0","maintainers":[{"name":"taras.prosvirov","email":"taras@crowdin.com"},{"name":"serhiydmytryshyn","email":"sergey@crowdin.com"},{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"}],"dist":{"shasum":"9671277facc9a6828230a17dc50184192daee847","tarball":"https://registry.npmjs.org/@crowdin/themes-converter/-/themes-converter-1.0.0.tgz","fileCount":8,"integrity":"sha512-cMqCeIWVEzujtRXrkogrNbhnwqCfKSbunfHOe8l6yClMUxlT9zelttjtCxMUeqYXsEBKsiR+aPyppAY/Mxo2xw==","signatures":[{"sig":"MEUCIQCjuCo51Y0121fHKveN6U/JAOUZRDUv7O8m5bKlNg0RKwIgEqXSe3hfeYcBmWioUSsRTngMzvyQB/8nmXc/wRKAueA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29494},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2392bf4edaadf9e684771681a85fb166e12020de","scripts":{"lint":"eslint \"{src,tests}/**/*.{js,ts}\"","test":"jest","build":"tsc","lint-fix":"eslint --fix \"{src,tests}/**/*.{js,ts}\"","prettier":"prettier --config .prettierrc src/**/*.ts","prettier-fix":"prettier --config .prettierrc src/**/*.ts --write","test-coverage":"jest --collectCoverage --coverageDirectory=\\\"./coverage\\\" --ci --reporters=default --reporters=jest-junit --watchAll=false"},"_npmUser":{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"},"_npmVersion":"9.5.1","description":"Converting json theme declaration to css variables","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"18.16.1","dependencies":{"color":"^4.2.3","polished":"^4.2.2"},"publishConfig":{"access":"restricted"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","eslint":"^8.56.0","ts-jest":"^29.1.1","prettier":"^3.1.1","jest-junit":"^16.0.0","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.5","lint-staged":"^15.2.0","@types/color":"^3.0.6","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","@typescript-eslint/parser":"^6.16.0","@typescript-eslint/eslint-plugin":"^6.16.0"},"_npmOperationalInternal":{"tmp":"tmp/themes-converter_1.0.0_1703760059871_0.8097170531817213","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@crowdin/themes-converter","version":"1.0.1","keywords":[],"author":"","license":"ISC","_id":"@crowdin/themes-converter@1.0.1","maintainers":[{"name":"taras.prosvirov","email":"taras@crowdin.com"},{"name":"serhiydmytryshyn","email":"sergey@crowdin.com"},{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"}],"dist":{"shasum":"9d3853796a9c1b5ed006a546a385cae34dde26e1","tarball":"https://registry.npmjs.org/@crowdin/themes-converter/-/themes-converter-1.0.1.tgz","fileCount":8,"integrity":"sha512-6tuXJ5nxfOJ0DqcNRT2lmf12M50tgSUgU0EQGUdhQkfQtreKYsGuKtHznHh+nUfSIQvGz2OTIFFVE0SccxSHog==","signatures":[{"sig":"MEYCIQC1IZacdB/DgHm6eRiC62noOrxA//Dh4pLOlIijssv+kgIhAO3c9CBdr3XBV80oZu9ov1Jv5vtirqLMhzm5+O6V5oXt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30702},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b367ac0a3a490d4c74c28118f21c3f32145853cb","scripts":{"lint":"eslint \"{src,tests}/**/*.{js,ts}\"","test":"jest","build":"tsc","lint-fix":"eslint --fix \"{src,tests}/**/*.{js,ts}\"","prettier":"prettier --config .prettierrc src/**/*.ts","prettier-fix":"prettier --config .prettierrc src/**/*.ts --write","test-coverage":"jest --collectCoverage --coverageDirectory=\\\"./coverage\\\" --ci --reporters=default --reporters=jest-junit --watchAll=false"},"_npmUser":{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"},"_npmVersion":"9.5.1","description":"Converting json theme declaration to css variables","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"18.16.1","dependencies":{"color":"^4.2.3","polished":"^4.2.2"},"publishConfig":{"access":"restricted"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","eslint":"^8.56.0","ts-jest":"^29.1.1","prettier":"^3.1.1","jest-junit":"^16.0.0","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.5","lint-staged":"^15.2.0","@types/color":"^3.0.6","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","@typescript-eslint/parser":"^6.16.0","@typescript-eslint/eslint-plugin":"^6.16.0"},"_npmOperationalInternal":{"tmp":"tmp/themes-converter_1.0.1_1703763536551_0.49218450607886743","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@crowdin/themes-converter","version":"1.0.2","keywords":[],"author":"","license":"ISC","_id":"@crowdin/themes-converter@1.0.2","maintainers":[{"name":"taras.prosvirov","email":"taras@crowdin.com"},{"name":"serhiydmytryshyn","email":"sergey@crowdin.com"},{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"}],"dist":{"shasum":"2a1b4453106758f88fc1fd3c96a3b66968e1c98a","tarball":"https://registry.npmjs.org/@crowdin/themes-converter/-/themes-converter-1.0.2.tgz","fileCount":8,"integrity":"sha512-woPaDtzIx8cHWe28qbh5wwE/wrOy7AYfxVZ6uF4qc4GRThL/KxEhgDBIrH6SzHs7FeE+onzTKALCMzvWFNZKhw==","signatures":[{"sig":"MEUCIQCIVEp6YUG/DIMNDx/+c05kvchnMZgZp49YvnryF2FCCwIgU1xJI9Uidxk9tUTIEuWRasODletC+3AAhCOzfn0QsI0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34034},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4e61f67bc79b4707ef44f1c427653001728cef6c","scripts":{"lint":"eslint \"{src,tests}/**/*.{js,ts}\"","test":"jest","build":"tsc","lint-fix":"eslint --fix \"{src,tests}/**/*.{js,ts}\"","prettier":"prettier --config .prettierrc src/**/*.ts","prettier-fix":"prettier --config .prettierrc src/**/*.ts --write","test-coverage":"jest --collectCoverage --coverageDirectory=\\\"./coverage\\\" --ci --reporters=default --reporters=jest-junit --watchAll=false"},"_npmUser":{"name":"andrii.bodnar","email":"andrii.bodnar@crowdin.com"},"_npmVersion":"9.5.1","description":"Converting json theme declaration to css variables","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"18.16.1","dependencies":{"color":"^4.2.3","polished":"^4.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","eslint":"^8.56.0","ts-jest":"^29.1.1","prettier":"^3.1.1","jest-junit":"^16.0.0","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.5","lint-staged":"^15.2.0","@types/color":"^3.0.6","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","@typescript-eslint/parser":"^6.16.0","@typescript-eslint/eslint-plugin":"^6.16.0"},"_npmOperationalInternal":{"tmp":"tmp/themes-converter_1.0.2_1711447408473_0.8264984097032848","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-12-28T10:40:59.704Z","modified":"2025-05-21T13:41:17.896Z","1.0.0":"2023-12-28T10:41:00.056Z","1.0.1":"2023-12-28T11:38:56.708Z","1.0.2":"2024-03-26T10:03:28.634Z"},"license":"ISC","keywords":[],"description":"Converting json theme declaration to css variables","maintainers":[{"email":"taras@crowdin.com","name":"taras.prosvirov"},{"email":"sergey@crowdin.com","name":"serhiydmytryshyn"},{"email":"andrii.bodnar@crowdin.com","name":"andrii.bodnar"}],"readme":"# Crowdin theme converter\n\nThis module is designed to generate styles for Crowdin Editor themes.\n\n```\nconst { convert } = require('@crowdin/themes-converter');\n\nconst theme = {\n    primaryAccent: \"#6494ed\", \n    base: {\n        baseBackground: \"#21252b\", \n        stringStatus: {\n            translated: \"#5b89c6\",\n            approved: \"#6dc271\",\n        },\n        highlights: {\n            placeholderColor: \"#afff8a\", \n            placeholderBg: \"#74827A\", \n            tagColor: \"#bfc3a0\", \n            tagBg: \"#626550\", \n            nonePrintableCharacterColor: \"#3eb17f\", \n            findAndReplaceHighlightBg: \"#8A6800\", \n        },\n    },\n    accents: {\n        info: {\n            accentColor: \"#35a1ff\", \n        },\n        danger: {\n            accentColor: \"#fa644a\", \n        },\n        warning: {\n            accentColor: \"#cc9a06\", \n        },\n        success: {\n            accentColor: \"#74bb02\", \n        },\n    },\n};\n\nconst styles =  convert(theme);\n```\n\n## Full theme config:\n```\n{\n    'primaryAccent': '', // Links, Primary buttons, Inputs, radio, checkbox and textarea focuses,\n    'base': {\n        'baseBackground': '', // base background color for all ui elements\n        'cardsBackground': '', // Cards backgrounds, shadows, Popovers, borders etc\n        'typeface': {\n            'baseColor': '', // Fonts, Icons, if empty - generated from automaticaly based on baseBackgroundColor\n            'bodyColor': '', \n            'mutedColor': '',\n            'disabledColor': '',\n            'iconsColor': '',\n        },\n        'commonUi': {\n            'headerBackground': '', // header background color\n            'subHeaderBackground': '', // subheader background color\n            'mainContentBackground': '', // area under source strings (e.g. left panel in Comfortale View)\n            'checkedStringBackground': '', // background for checked strings in mainContentBackground\n            'mainMenuBackground': '', // main menu background color\n        },\n        'stringStatus': { // progresses, string statuses\n            'translated': '',\n            'approved': '',\n            'notTranslated': '',\n            'hidden': '',\n        },\n        'highlights': {\n            'placeholderColor': '',\n            'placeholderBg': '',\n            'tagColor': '',\n            'tagColorHover': '',\n            'tagBg': '',\n            'tagBgHover': '',\n            'nonePrintableCharacterColor': '',\n            'findAndReplaceHighlightBg': '', // --crowdin-find-replace-highlight-bg  highlight for found items\n        },\n    },\n    'accents': {\n        'info': {\n            'accentColor': '', // Info typeface and borders color\n            'backgroundColor': '', // --crowdin-info: Info alerts, badges, tips etc\n        },\n        'danger': {\n            'accentColor': '', // Danger typeface and borders color\n            'backgroundColor': '', // --crowdin-danger: Danger alerts, badges, tips etc\n        },\n        'warning': {\n            'accentColor': '', // Warning typeface and borders color\n            'backgroundColor': '', // --crowdin-warning: Warning alerts, badges, tips etc\n        },\n        'success': {\n            'accentColor': '', // Success typeface and borders color\n            'backgroundColor': '', // --crowdin-success: Success alerts, badges, tips etc\n        },\n    },\n    'button': {\n        'default': {\n            'btnColor': '',\n            'btnHoverColor': '',\n            'btnBorder': '',\n            'btnHoverBorder': '',\n            'btnActiveBorder': '',\n            'btnDisabledBorder': '',\n            'btnBg': '',\n            'btnHoverBg': '',\n            'btnActiveBg': '',\n            'btnDisabledBg': '',\n            'btnModalBorder': '', // modal buttons may have different borders\n        },\n        'primary': {\n            'btnColor': '',\n            'btnBorder': '',\n            'btnBg': '',\n            'btnHoverBg': '',\n            'btnActiveBg': '',\n        },\n        'danger': {\n            'btnBg': '',\n            'btnHoverBg': '', //hover & active\n            'btnBorder': '',\n            'btnHoverBorder': '',\n        },\n        'icon': {\n            'btnBg': '',\n            'btnBorder': '',\n            'btnHoverBorder': '',\n            'btnActiveBorder': '',\n        },\n    }\n}\n```\n\n## Advanced Background Customization\n\nCertain properties within our theming configuration are designed to support a wide array of CSS background values. This includes not only standard and custom colors but also more complex definitions such as gradients, images, and other CSS background properties.\n\n```\n  'base.commonUi.headerBackground',\n  'base.commonUi.subHeaderBackground',\n  'base.commonUi.mainContentBackground',\n  'base.commonUi.mainMenuBackground',\n```","readmeFilename":"README.md"}