dothtml-interfaces 0.1.35 → 0.1.36
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.
- package/package.json +1 -1
- package/src/i-dot.d.ts +9 -4
package/package.json
CHANGED
package/src/i-dot.d.ts
CHANGED
|
@@ -225,9 +225,10 @@ export interface IDotDocument
|
|
|
225
225
|
wbr(content?: DotContent): IDotElementDocument<IDotGenericElement>;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
type Styles = string|((css: IDotCss) => IDotcssProp|string);
|
|
228
229
|
interface IComponentFactory {
|
|
229
|
-
<T extends IComponent>(Base: new (...args: Parameters<T['build']>) => T): new (...args: Parameters<T['build']>) => T;
|
|
230
|
-
useStyles<T extends IComponent>(styles:
|
|
230
|
+
<T extends IComponent>(Base: new (...args: Parameters<T['build']>) => T, styles?: Styles[]): new (...args: Parameters<T['build']>) => T;
|
|
231
|
+
useStyles<T extends IComponent>(styles: Styles): (Base: new (...args: Parameters<T['build']>) => T) => new (...args: Parameters<T['build']>) => T;
|
|
231
232
|
}
|
|
232
233
|
|
|
233
234
|
|
|
@@ -239,17 +240,21 @@ export interface IDotCore extends IDotDocument
|
|
|
239
240
|
(targetSelector: string|Element|Node|NodeList|Array<Node|Element>): IDotElementDocument<IDotGenericElement>;
|
|
240
241
|
|
|
241
242
|
version: string;
|
|
243
|
+
styleMode: "sync"|"async";
|
|
242
244
|
|
|
243
245
|
navigate(path: string, noHistory?: boolean, force?: boolean): void;
|
|
244
246
|
css: IDotCss;
|
|
245
247
|
bus: IEventBus;
|
|
246
|
-
window: IDotWindowBuilder;
|
|
248
|
+
// window: IDotWindowBuilder;
|
|
247
249
|
|
|
248
250
|
watch<Ti = IReactive|Array<any>|{[key: string|number]: any}|string|number|boolean, To = Ti>(props?: {value: Ti, key?: string, transformer?: (value: Ti)=>To}): IReactive<Ti, To>;
|
|
249
251
|
|
|
250
|
-
|
|
252
|
+
// Keep these around for a bit to show how it was done before in case I need to change anything prior to the v6 launch.
|
|
251
253
|
// component<T extends IComponent>(Base: new (...args: Parameters<T['build']>) => T): new (...args: Parameters<T['build']>) => T;
|
|
252
254
|
// useStyles<T extends IComponent>(styles: string|((css: IDotCss)=>IDotcssProp|string)): ((Base: new (...args: Parameters<T['build']>) => T) => new (...args: Parameters<T['build']>) => T);
|
|
255
|
+
|
|
256
|
+
component: IComponentFactory;
|
|
257
|
+
useStyles(document: Document, styles: Styles): HTMLStyleElement;
|
|
253
258
|
}
|
|
254
259
|
|
|
255
260
|
export interface IDotWindowBuilder{
|