@rhtml/component 0.0.127 → 0.0.129
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/dist/index.d.ts +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import '@rhtml/renderer';
|
|
2
2
|
import { CustomElementConfig, LitElement, TemplateResult } from '@rxdi/lit-html';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type Without<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
5
|
+
export type Injection = {
|
|
6
6
|
has: <T>(d: T) => boolean;
|
|
7
7
|
get: <T>(d: T) => T;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type Constructor<T = any> = new (...args: any[]) => T;
|
|
10
|
+
export type InstanceTypes<T> = {
|
|
11
11
|
[P in keyof T]: T[P] extends Constructor<infer U> ? U : never;
|
|
12
12
|
};
|
|
13
13
|
export declare const DefineDependencies: <T extends Constructor<any>[]>(...deps: T) => (injection: Injection) => InstanceTypes<T>;
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
14
|
+
export type StateToRender<S, D, K extends LitElement> = (this: K, deps: D) => Observable<S> | S | Promise<S>;
|
|
15
|
+
export type PossibleRender = TemplateResult | string | number | unknown;
|
|
16
|
+
export type RenderResult<S, D, K extends LitElement> = (deps: D) => (this: K, state: S, setState: (s: S) => void) => TemplateResult | string | number | unknown;
|
|
17
17
|
export interface Options extends Without<CustomElementConfig<never>, 'template'> {
|
|
18
18
|
deepCloneState?: boolean;
|
|
19
19
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2BAAyB;AAEzB,6CAMwB;AA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AAI,CAAC;YACxC,OAAO;YACP,KAAK;YACL,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,MAAM,EAAE,CACN,KAAQ,EACR,QAAwB,EACxB,UAAsB,EACtB,EAAE;gBACF,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACnC,OAAO,MAAM,CAAC,IAAI,CAAC;qBAChB,IAAI,CAAC,IAAI,CAAC;qBACV,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;YAC7C,CAAC;SACO;;SAEb,CAAC;IACJ,CAAC,IACD,CAAC;AA/BM,QAAA,OAAO,WA+Bb;AAEP,SAAgB,SAAS,CAA0C,EACjE,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,OAAO,EACP,KAAK,GAQN;IACC,OAAO,IAAA,eAAO,EAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC;AAhBD,8BAgBC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhtml/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.129",
|
|
4
4
|
"description": "Reactive HyperText Markup Language",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "npx parcel ./examples/index.html --out-dir build/examples",
|
|
7
7
|
"patch": "npm run build && npm version patch && npm publish --update-readme --access public && npm run delete-dist",
|
|
8
8
|
"delete-dist": "rm -rf dist",
|
|
9
9
|
"clean": "git clean -dxf",
|
|
10
|
+
"test": "echo 'missing tests'",
|
|
10
11
|
"lint": "npx eslint . --ext .ts",
|
|
11
12
|
"lint-fix": "npx eslint . --fix --ext .ts",
|
|
12
13
|
"build": "rm -rf dist && tsc"
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"@rxdi/lit-html": "^0.7.178",
|
|
20
|
-
"@rhtml/renderer": "0.0.
|
|
21
|
+
"@rhtml/renderer": "0.0.129"
|
|
21
22
|
},
|
|
22
23
|
"peerDependencies": {
|
|
23
24
|
"rxjs": "^7.8.0"
|