vscode-webview-tools
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,2 @@ | ||
export {}; | ||
//# sourceMappingURL=colors.js.map |
@@ -23,2 +23,2 @@ import { Color } from './colors'; | ||
*/ | ||
export declare const observeColors: (onChange: (colors: ColorMap) => void) => () => void; | ||
export declare const observeColors: (onChange: (colors: ColorMap) => void) => (() => void); |
@@ -17,9 +17,9 @@ export declare const enum Theme { | ||
* | ||
* const useCssVariables = () => { | ||
* const [vars, setVars] = useState<{ [key: string]: string }>({}); | ||
* useEffect(() => observeColors(setVars), []); | ||
* return vars; | ||
* } | ||
* const useTheme = () => { | ||
* const [theme, setTheme] = useState<{ [key: string]: string }>({}); | ||
* useEffect(() => observeTheme(setTheme), []); | ||
* return theme; | ||
* }; | ||
* ``` | ||
*/ | ||
export declare const observeTheme: (onChange: (theme: Theme) => void) => () => void; | ||
export declare const observeTheme: (onChange: (theme: Theme) => void) => (() => void); |
@@ -20,7 +20,7 @@ /** | ||
* | ||
* const useCssVariables = () => { | ||
* const [vars, setVars] = useState<{ [key: string]: string }>({}); | ||
* useEffect(() => observeColors(setVars), []); | ||
* return vars; | ||
* } | ||
* const useTheme = () => { | ||
* const [theme, setTheme] = useState<{ [key: string]: string }>({}); | ||
* useEffect(() => observeTheme(setTheme), []); | ||
* return theme; | ||
* }; | ||
* ``` | ||
@@ -27,0 +27,0 @@ */ |
{ | ||
"name": "vscode-webview-tools", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Miscellaneous tools for building things in VS Code webviews", | ||
@@ -36,15 +36,15 @@ "main": "dist/pkg/index.js", | ||
"devDependencies": { | ||
"@types/prettier": "^2.0.0", | ||
"@types/prettier": "^2.1.1", | ||
"@types/signale": "^1.4.1", | ||
"@types/wordwrap": "^1.0.0", | ||
"@typescript-eslint/eslint-plugin": "^2.31.0", | ||
"@typescript-eslint/parser": "^2.31.0", | ||
"eslint": "^7.0.0", | ||
"@typescript-eslint/eslint-plugin": "^4.2.0", | ||
"@typescript-eslint/parser": "^4.2.0", | ||
"eslint": "^7.9.0", | ||
"pascal-case": "^3.1.1", | ||
"prettier": "^2.0.5", | ||
"remark-cli": "^8.0.0", | ||
"prettier": "^2.1.2", | ||
"remark-cli": "^8.0.1", | ||
"remark-toc": "^7.0.0", | ||
"rimraf": "^3.0.2", | ||
"signale": "^1.4.0", | ||
"typescript": "^3.8.3", | ||
"typescript": "^4.0.3", | ||
"wordwrap": "^1.0.0" | ||
@@ -51,0 +51,0 @@ }, |
# vscode-webview-tools | ||
[![](https://badgen.net/bundlephobia/minzip/vscode-webview-tools)](https://bundlephobia.com/result?p=vscode-webview-tools) ![Run Tests](https://github.com/connor4312/vscode-webview-tools/workflows/Run%20Tests/badge.svg) ![](https://img.shields.io/badge/dependencies-none-green) | ||
Miscellaneous tools for building things in VS Code webviews. | ||
``` | ||
npm install --save vscode-webview-tools | ||
``` | ||
## Table of Contents | ||
@@ -118,3 +124,3 @@ | ||
const [theme, setTheme] = useState<{ [key: string]: string }>({}); | ||
useEffect(() => observeTheme(settheme), []); | ||
useEffect(() => observeTheme(setTheme), []); | ||
return theme; | ||
@@ -121,0 +127,0 @@ }; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95975
2244
133