dothtml 6.0.0-beta.26 → 6.0.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FrameworkItems, IComponent } from "dothtml-interfaces";
|
|
2
|
-
export declare function useStyles(styleCallback: any): (Base: new (...args: Array<any>) => IComponent) => {
|
|
2
|
+
export declare function useStyles(styleCallback: any, document?: Document): (Base: new (...args: Array<any>) => IComponent) => {
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
_: FrameworkItems;
|
|
5
5
|
build(): import("dothtml-interfaces").IDotDocument;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import renderCss from "../helpers/render-css";
|
|
2
|
-
export function useStyles(styleCallback) {
|
|
3
|
-
let sharedStyles = renderCss(styleCallback);
|
|
2
|
+
export function useStyles(styleCallback, document = window.document) {
|
|
3
|
+
let sharedStyles = renderCss(styleCallback, document);
|
|
4
4
|
return function (Base) {
|
|
5
5
|
return class extends Base {
|
|
6
6
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-styles.js","sourceRoot":"","sources":["../../src/decoration/use-styles.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-styles.js","sourceRoot":"","sources":["../../src/decoration/use-styles.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAK9C,MAAM,UAAU,SAAS,CAAC,aAAa,EAAE,WAAqB,MAAM,CAAC,QAAQ;IAE5E,IAAI,YAAY,GAAG,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAEtD,OAAO,UAAS,IAAyC;QAGxD,OAAO,KAAM,SAAQ,IAAI;YAIxB,YAAY,GAAG,IAAW;gBACzB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;gBACf,IAAG,CAAC,IAAI,CAAC,CAAC,EAAC;oBACT,IAAI,CAAC,CAAS,GAAG,EAAC,KAAK,EAAE,EAAE,EAAC,CAAC;iBAC9B;gBACD,IAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,EAAC;oBAC5B,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAoB,GAAG,EAAE,CAAC;iBACxC;gBACD,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC9C,CAAC;SACD,CAAA;IACF,CAAC,CAAA;AACF,CAAC"}
|
package/package.json
CHANGED