@cssfn/cssfn
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -9,2 +9,4 @@ import type { ProductOrFactory } from '@cssfn/types'; | ||
id?: string; | ||
ssr?: boolean; | ||
lazyCsr?: boolean; | ||
} | ||
@@ -17,2 +19,4 @@ type StyleSheetUpdatedCallback<in TCssScopeName extends CssScopeName> = (styleSheet: StyleSheet<TCssScopeName>) => void; | ||
get id(): string; | ||
get ssr(): boolean; | ||
get lazyCsr(): boolean; | ||
get scopes(): ProductOrFactory<CssScopeList<TCssScopeName> | null>; | ||
@@ -19,0 +23,0 @@ get classes(): CssScopeMap<TCssScopeName>; |
@@ -18,2 +18,4 @@ import { generateId, } from './utilities.js'; | ||
id: '', | ||
ssr: true, | ||
lazyCsr: true, | ||
}; | ||
@@ -37,2 +39,4 @@ class StyleSheet { | ||
id: options?.id ?? defaultStyleSheetOptions.id, | ||
ssr: options?.ssr ?? defaultStyleSheetOptions.ssr, | ||
lazyCsr: options?.lazyCsr ?? defaultStyleSheetOptions.lazyCsr, | ||
}; | ||
@@ -117,2 +121,8 @@ this.#options = styleSheetOptions; | ||
} | ||
get ssr() { | ||
return this.#options.ssr; | ||
} | ||
get lazyCsr() { | ||
return this.#options.lazyCsr; | ||
} | ||
get scopes() { | ||
@@ -119,0 +129,0 @@ return this.#scopes; |
{ | ||
"name": "@cssfn/cssfn", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Writes, imports, and exports css stylesheets as javascript modules.", | ||
@@ -32,6 +32,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@cssfn/css-prop-auto-prefix": "^2.1.0", | ||
"@cssfn/css-selectors": "^2.1.0", | ||
"@cssfn/css-types": "^2.1.0", | ||
"@cssfn/types": "^2.0.1", | ||
"@cssfn/css-prop-auto-prefix": "^2.2.0", | ||
"@cssfn/css-selectors": "^2.2.0", | ||
"@cssfn/css-types": "^2.2.0", | ||
"@cssfn/types": "^2.2.0", | ||
"@types/hyphenate-style-name": "^1.0.0", | ||
@@ -50,3 +50,3 @@ "camel-case": "^4.1.2", | ||
}, | ||
"gitHead": "d34ea3aa8794a12f7f7d6f57e5c45cf308abc88b" | ||
"gitHead": "3fe2d79b8dfa4eda29929975d0dbf3fe19d4aeae" | ||
} |
@@ -52,2 +52,5 @@ // cssfn: | ||
id ?: string | ||
ssr ?: boolean | ||
lazyCsr ?: boolean | ||
} | ||
@@ -57,2 +60,5 @@ const defaultStyleSheetOptions : Required<StyleSheetOptions> = { | ||
id : '', | ||
ssr : true, | ||
lazyCsr : true, | ||
} | ||
@@ -83,2 +89,5 @@ | ||
id : options?.id ?? defaultStyleSheetOptions.id, | ||
ssr : options?.ssr ?? defaultStyleSheetOptions.ssr, | ||
lazyCsr : options?.lazyCsr ?? defaultStyleSheetOptions.lazyCsr, | ||
}; | ||
@@ -198,2 +207,10 @@ this.#options = styleSheetOptions; | ||
get ssr() { | ||
return this.#options.ssr; | ||
} | ||
get lazyCsr() { | ||
return this.#options.lazyCsr; | ||
} | ||
get scopes() { | ||
@@ -200,0 +217,0 @@ return this.#scopes; |
719120
18616
Updated@cssfn/css-selectors@^2.2.0
Updated@cssfn/css-types@^2.2.0
Updated@cssfn/types@^2.2.0