@joist/element 2.0.1-next.1637807849.0
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/LICENSE +21 -0
- package/README.md +120 -0
- package/observable/package.json +4 -0
- package/package.json +46 -0
- package/styled/package.json +4 -0
- package/target/build/lib/observable.d.ts +324 -0
- package/target/build/lib/observable.js +73 -0
- package/target/build/lib/observable.js.map +1 -0
- package/target/build/lib/styled.d.ts +310 -0
- package/target/build/lib/styled.js +45 -0
- package/target/build/lib/styled.js.map +1 -0
- package/target/build/lib.d.ts +2 -0
- package/target/build/lib.js +3 -0
- package/target/build/lib.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-2020 Danny Blue
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Di
|
|
2
|
+
|
|
3
|
+
Dependency Injection in ~800 bytes. Can be used with and without decorators.
|
|
4
|
+
|
|
5
|
+
#### Installation:
|
|
6
|
+
|
|
7
|
+
```BASH
|
|
8
|
+
npm i @joist/di
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
#### Example:
|
|
12
|
+
|
|
13
|
+
```TS
|
|
14
|
+
import { Injector } from '@joist/di';
|
|
15
|
+
|
|
16
|
+
class FooService {
|
|
17
|
+
sayHello() {
|
|
18
|
+
return 'Hello From FooService';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class BarService {
|
|
23
|
+
static deps = [FooService];
|
|
24
|
+
|
|
25
|
+
constructor(private foo: FooService) {}
|
|
26
|
+
|
|
27
|
+
sayHello() {
|
|
28
|
+
return 'Hello From BarService and ' + this.foo.sayHello();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const app = new Injector();
|
|
33
|
+
|
|
34
|
+
app.get(BarService).sayHello(); // Hello from BarService and Hello from FooService
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```TS
|
|
38
|
+
import { Injector } from '@joist/di';
|
|
39
|
+
import { inject } from '@joist/di/decorators';
|
|
40
|
+
|
|
41
|
+
class FooService {
|
|
42
|
+
sayHello() {
|
|
43
|
+
return 'Hello From FooService';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
class BarService {
|
|
48
|
+
constructor(@inject(FooService) private foo: FooService) {}
|
|
49
|
+
|
|
50
|
+
sayHello() {
|
|
51
|
+
return 'Hello From BarService and ' + this.foo.sayHello();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const app = new Injector();
|
|
56
|
+
|
|
57
|
+
app.get(BarService).sayHello(); // Hello from BarService and Hello from FooService
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Override A Service:
|
|
61
|
+
|
|
62
|
+
```TS
|
|
63
|
+
import { Injector } from '@joist/di';
|
|
64
|
+
import { inject } from '@joist/di/decorators';
|
|
65
|
+
|
|
66
|
+
class FooService {
|
|
67
|
+
sayHello() {
|
|
68
|
+
return 'Hello From FooService';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
class BarService {
|
|
73
|
+
constructor(@inject(FooService) private foo: FooService) {}
|
|
74
|
+
|
|
75
|
+
sayHello() {
|
|
76
|
+
return 'Hello From BarService and ' + this.foo.sayHello();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Override FooService with an alternate implementation
|
|
81
|
+
const app = new Injector({
|
|
82
|
+
providers: [
|
|
83
|
+
{
|
|
84
|
+
provide: FooService,
|
|
85
|
+
use: class extends FooService {
|
|
86
|
+
sayHello() {
|
|
87
|
+
return 'IT HAS BEEN OVERRIDEN'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
app.get(BarService).sayHello(); // Hello from BarService and IT HAS BEEN OVERRIDEN
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### Root Service
|
|
98
|
+
|
|
99
|
+
If you have nested injectors and you still want singleton instances mark your service as shown or decorate with `@service()`
|
|
100
|
+
|
|
101
|
+
```TS
|
|
102
|
+
class FooService {
|
|
103
|
+
static providedInRoot = true;
|
|
104
|
+
|
|
105
|
+
sayHello() {
|
|
106
|
+
return 'Hello From FooService';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
```TS
|
|
112
|
+
import { service } from '@joist/di/decorators';
|
|
113
|
+
|
|
114
|
+
@service()
|
|
115
|
+
class FooService {
|
|
116
|
+
sayHello() {
|
|
117
|
+
return 'Hello From FooService';
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@joist/element",
|
|
3
|
+
"version": "2.0.1-next.1637807849.0+b8e14a4",
|
|
4
|
+
"main": "./target/build/lib.js",
|
|
5
|
+
"module": "./target/build/lib.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./target/build/lib.js"
|
|
9
|
+
},
|
|
10
|
+
"./observable": {
|
|
11
|
+
"import": "./target/build/lib/observable.js"
|
|
12
|
+
},
|
|
13
|
+
"./styled": {
|
|
14
|
+
"import": "./target/build/lib/styled.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"target/build",
|
|
19
|
+
"observable/package.json",
|
|
20
|
+
"styled/package.json"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"description": "Dependency Injection in ~800 bytes",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/deebloo/joist.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"TypeScript",
|
|
30
|
+
"DI",
|
|
31
|
+
"Dependency Injection"
|
|
32
|
+
],
|
|
33
|
+
"author": "deebloo",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/deebloo/joist/issues"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"test": "tsc -p tsconfig.test.json && wtr --config ../../wtr.config.mjs --port 8000",
|
|
43
|
+
"build": "tsc -p tsconfig.build.json"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "b8e14a42021f05d089c7dfe17fc426e10b1a50f0"
|
|
46
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
export declare class PropChange<T = any> {
|
|
2
|
+
key: string | symbol;
|
|
3
|
+
newValue: T;
|
|
4
|
+
oldValue?: T | undefined;
|
|
5
|
+
constructor(key: string | symbol, newValue: T, oldValue?: T | undefined);
|
|
6
|
+
}
|
|
7
|
+
export declare type PropChanges = Record<string | symbol, PropChange>;
|
|
8
|
+
export interface OnChange {
|
|
9
|
+
onChange(changes: PropChanges): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function readPropertyDefs(c: any): Record<string | symbol, {}>;
|
|
12
|
+
export interface ObservableBase {
|
|
13
|
+
propChanges: PropChanges;
|
|
14
|
+
propChange: Promise<void> | null;
|
|
15
|
+
definePropChange(propChange: PropChange): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare function observe(): (target: any, key: string) => void;
|
|
18
|
+
export declare function observable(): <T extends new (...args: any[]) => HTMLElement & OnChange>(CustomElement: T) => {
|
|
19
|
+
new (...args: any[]): {
|
|
20
|
+
propChanges: PropChanges;
|
|
21
|
+
propChange: Promise<void> | null;
|
|
22
|
+
onChange(e: PropChanges): void;
|
|
23
|
+
definePropChange(propChange: PropChange): Promise<void>;
|
|
24
|
+
accessKey: string;
|
|
25
|
+
readonly accessKeyLabel: string;
|
|
26
|
+
autocapitalize: string;
|
|
27
|
+
dir: string;
|
|
28
|
+
draggable: boolean;
|
|
29
|
+
hidden: boolean;
|
|
30
|
+
innerText: string;
|
|
31
|
+
lang: string;
|
|
32
|
+
readonly offsetHeight: number;
|
|
33
|
+
readonly offsetLeft: number;
|
|
34
|
+
readonly offsetParent: Element | null;
|
|
35
|
+
readonly offsetTop: number;
|
|
36
|
+
readonly offsetWidth: number;
|
|
37
|
+
outerText: string;
|
|
38
|
+
spellcheck: boolean;
|
|
39
|
+
title: string;
|
|
40
|
+
translate: boolean;
|
|
41
|
+
attachInternals(): ElementInternals;
|
|
42
|
+
click(): void;
|
|
43
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
44
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
45
|
+
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
46
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
47
|
+
readonly attributes: NamedNodeMap;
|
|
48
|
+
readonly classList: DOMTokenList;
|
|
49
|
+
className: string;
|
|
50
|
+
readonly clientHeight: number;
|
|
51
|
+
readonly clientLeft: number;
|
|
52
|
+
readonly clientTop: number;
|
|
53
|
+
readonly clientWidth: number;
|
|
54
|
+
id: string;
|
|
55
|
+
readonly localName: string;
|
|
56
|
+
readonly namespaceURI: string | null;
|
|
57
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
58
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
59
|
+
outerHTML: string;
|
|
60
|
+
readonly ownerDocument: Document;
|
|
61
|
+
readonly part: DOMTokenList;
|
|
62
|
+
readonly prefix: string | null;
|
|
63
|
+
readonly scrollHeight: number;
|
|
64
|
+
scrollLeft: number;
|
|
65
|
+
scrollTop: number;
|
|
66
|
+
readonly scrollWidth: number;
|
|
67
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
68
|
+
slot: string;
|
|
69
|
+
readonly tagName: string;
|
|
70
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
71
|
+
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
|
|
72
|
+
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
|
|
73
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
74
|
+
getAttribute(qualifiedName: string): string | null;
|
|
75
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
76
|
+
getAttributeNames(): string[];
|
|
77
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
78
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
79
|
+
getBoundingClientRect(): DOMRect;
|
|
80
|
+
getClientRects(): DOMRectList;
|
|
81
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
82
|
+
getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
|
|
83
|
+
getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
|
|
84
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
85
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
86
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
87
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
88
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
89
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
90
|
+
hasAttributes(): boolean;
|
|
91
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
92
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
93
|
+
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
94
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
95
|
+
matches(selectors: string): boolean;
|
|
96
|
+
releasePointerCapture(pointerId: number): void;
|
|
97
|
+
removeAttribute(qualifiedName: string): void;
|
|
98
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
99
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
100
|
+
requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
|
|
101
|
+
requestPointerLock(): void;
|
|
102
|
+
scroll(options?: ScrollToOptions | undefined): void;
|
|
103
|
+
scroll(x: number, y: number): void;
|
|
104
|
+
scrollBy(options?: ScrollToOptions | undefined): void;
|
|
105
|
+
scrollBy(x: number, y: number): void;
|
|
106
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
|
|
107
|
+
scrollTo(options?: ScrollToOptions | undefined): void;
|
|
108
|
+
scrollTo(x: number, y: number): void;
|
|
109
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
110
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
111
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
112
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
113
|
+
setPointerCapture(pointerId: number): void;
|
|
114
|
+
toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
|
|
115
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
116
|
+
readonly baseURI: string;
|
|
117
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
118
|
+
readonly firstChild: ChildNode | null;
|
|
119
|
+
readonly isConnected: boolean;
|
|
120
|
+
readonly lastChild: ChildNode | null;
|
|
121
|
+
readonly nextSibling: ChildNode | null;
|
|
122
|
+
readonly nodeName: string;
|
|
123
|
+
readonly nodeType: number;
|
|
124
|
+
nodeValue: string | null;
|
|
125
|
+
readonly parentElement: HTMLElement | null;
|
|
126
|
+
readonly parentNode: ParentNode | null;
|
|
127
|
+
readonly previousSibling: ChildNode | null;
|
|
128
|
+
textContent: string | null;
|
|
129
|
+
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
130
|
+
cloneNode(deep?: boolean | undefined): Node;
|
|
131
|
+
compareDocumentPosition(other: Node): number;
|
|
132
|
+
contains(other: Node | null): boolean;
|
|
133
|
+
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
134
|
+
hasChildNodes(): boolean;
|
|
135
|
+
insertBefore<T_2 extends Node>(node: T_2, child: Node | null): T_2;
|
|
136
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
137
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
138
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
139
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
140
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
141
|
+
normalize(): void;
|
|
142
|
+
removeChild<T_3 extends Node>(child: T_3): T_3;
|
|
143
|
+
replaceChild<T_4 extends Node>(node: Node, child: T_4): T_4;
|
|
144
|
+
readonly ATTRIBUTE_NODE: number;
|
|
145
|
+
readonly CDATA_SECTION_NODE: number;
|
|
146
|
+
readonly COMMENT_NODE: number;
|
|
147
|
+
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
148
|
+
readonly DOCUMENT_NODE: number;
|
|
149
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
150
|
+
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
151
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
152
|
+
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
153
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
154
|
+
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
155
|
+
readonly DOCUMENT_TYPE_NODE: number;
|
|
156
|
+
readonly ELEMENT_NODE: number;
|
|
157
|
+
readonly ENTITY_NODE: number;
|
|
158
|
+
readonly ENTITY_REFERENCE_NODE: number;
|
|
159
|
+
readonly NOTATION_NODE: number;
|
|
160
|
+
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
161
|
+
readonly TEXT_NODE: number;
|
|
162
|
+
dispatchEvent(event: Event): boolean;
|
|
163
|
+
ariaAtomic: string;
|
|
164
|
+
ariaAutoComplete: string;
|
|
165
|
+
ariaBusy: string;
|
|
166
|
+
ariaChecked: string;
|
|
167
|
+
ariaColCount: string;
|
|
168
|
+
ariaColIndex: string;
|
|
169
|
+
ariaColSpan: string;
|
|
170
|
+
ariaCurrent: string;
|
|
171
|
+
ariaDisabled: string;
|
|
172
|
+
ariaExpanded: string;
|
|
173
|
+
ariaHasPopup: string;
|
|
174
|
+
ariaHidden: string;
|
|
175
|
+
ariaKeyShortcuts: string;
|
|
176
|
+
ariaLabel: string;
|
|
177
|
+
ariaLevel: string;
|
|
178
|
+
ariaLive: string;
|
|
179
|
+
ariaModal: string;
|
|
180
|
+
ariaMultiLine: string;
|
|
181
|
+
ariaMultiSelectable: string;
|
|
182
|
+
ariaOrientation: string;
|
|
183
|
+
ariaPlaceholder: string;
|
|
184
|
+
ariaPosInSet: string;
|
|
185
|
+
ariaPressed: string;
|
|
186
|
+
ariaReadOnly: string;
|
|
187
|
+
ariaRequired: string;
|
|
188
|
+
ariaRoleDescription: string;
|
|
189
|
+
ariaRowCount: string;
|
|
190
|
+
ariaRowIndex: string;
|
|
191
|
+
ariaRowSpan: string;
|
|
192
|
+
ariaSelected: string;
|
|
193
|
+
ariaSetSize: string;
|
|
194
|
+
ariaSort: string;
|
|
195
|
+
ariaValueMax: string;
|
|
196
|
+
ariaValueMin: string;
|
|
197
|
+
ariaValueNow: string;
|
|
198
|
+
ariaValueText: string;
|
|
199
|
+
animate(keyframes: PropertyIndexedKeyframes | Keyframe[] | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
|
|
200
|
+
getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
|
|
201
|
+
after(...nodes: (string | Node)[]): void;
|
|
202
|
+
before(...nodes: (string | Node)[]): void;
|
|
203
|
+
remove(): void;
|
|
204
|
+
replaceWith(...nodes: (string | Node)[]): void;
|
|
205
|
+
innerHTML: string;
|
|
206
|
+
readonly nextElementSibling: Element | null;
|
|
207
|
+
readonly previousElementSibling: Element | null;
|
|
208
|
+
readonly childElementCount: number;
|
|
209
|
+
readonly children: HTMLCollection;
|
|
210
|
+
readonly firstElementChild: Element | null;
|
|
211
|
+
readonly lastElementChild: Element | null;
|
|
212
|
+
append(...nodes: (string | Node)[]): void;
|
|
213
|
+
prepend(...nodes: (string | Node)[]): void;
|
|
214
|
+
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
215
|
+
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
216
|
+
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
217
|
+
querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
|
|
218
|
+
querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
|
|
219
|
+
querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
|
|
220
|
+
replaceChildren(...nodes: (string | Node)[]): void;
|
|
221
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
222
|
+
oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
223
|
+
oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
224
|
+
onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
225
|
+
readonly style: CSSStyleDeclaration;
|
|
226
|
+
contentEditable: string;
|
|
227
|
+
enterKeyHint: string;
|
|
228
|
+
inputMode: string;
|
|
229
|
+
readonly isContentEditable: boolean;
|
|
230
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
231
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
232
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
233
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
234
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
235
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
236
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
237
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
238
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
239
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
240
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
241
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
242
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
243
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
244
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
245
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
246
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
247
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
248
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
249
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
250
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
251
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
252
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
253
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
254
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
255
|
+
onerror: OnErrorEventHandler;
|
|
256
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
257
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
258
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
259
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
260
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
261
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
262
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
263
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
264
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
265
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
266
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
267
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
269
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
270
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
271
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
272
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
273
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
274
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
275
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
276
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
277
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
280
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
281
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
282
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
283
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
284
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
285
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
286
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
287
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
|
|
288
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
289
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
290
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
291
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
292
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
293
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
294
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
297
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
298
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
299
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
300
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
303
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
304
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
305
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
306
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
307
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
308
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
309
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
310
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
311
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
312
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
315
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
316
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
317
|
+
autofocus: boolean;
|
|
318
|
+
readonly dataset: DOMStringMap;
|
|
319
|
+
nonce?: string | undefined;
|
|
320
|
+
tabIndex: number;
|
|
321
|
+
blur(): void;
|
|
322
|
+
focus(options?: FocusOptions | undefined): void;
|
|
323
|
+
};
|
|
324
|
+
} & T;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export class PropChange {
|
|
2
|
+
key;
|
|
3
|
+
newValue;
|
|
4
|
+
oldValue;
|
|
5
|
+
constructor(key, newValue, oldValue) {
|
|
6
|
+
this.key = key;
|
|
7
|
+
this.newValue = newValue;
|
|
8
|
+
this.oldValue = oldValue;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function readPropertyDefs(c) {
|
|
12
|
+
return c.properties || c.prototype.properties || {};
|
|
13
|
+
}
|
|
14
|
+
const PROPERTY_KEY = 'properties';
|
|
15
|
+
export function observe() {
|
|
16
|
+
return function (target, key) {
|
|
17
|
+
target[PROPERTY_KEY] = target[PROPERTY_KEY] || {};
|
|
18
|
+
target[PROPERTY_KEY][key] = {};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function observable() {
|
|
22
|
+
return (CustomElement) => {
|
|
23
|
+
const defs = readPropertyDefs(CustomElement);
|
|
24
|
+
const props = {};
|
|
25
|
+
for (let def in defs) {
|
|
26
|
+
const privateKey = createPrivateKey(def);
|
|
27
|
+
props[def] = {
|
|
28
|
+
set(val) {
|
|
29
|
+
const prevVal = Reflect.get(this, privateKey);
|
|
30
|
+
this.definePropChange(new PropChange(def, val, prevVal));
|
|
31
|
+
Reflect.set(this, privateKey, val);
|
|
32
|
+
},
|
|
33
|
+
get() {
|
|
34
|
+
return Reflect.get(this, privateKey);
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return class ObservableElement extends CustomElement {
|
|
39
|
+
propChanges = {};
|
|
40
|
+
propChange = null;
|
|
41
|
+
constructor(...args) {
|
|
42
|
+
super(...args);
|
|
43
|
+
for (let def in defs) {
|
|
44
|
+
Reflect.set(this, createPrivateKey(def), Reflect.get(this, def));
|
|
45
|
+
Object.defineProperties(this, props);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
onChange(e) {
|
|
49
|
+
if (!!super.onChange) {
|
|
50
|
+
super.onChange(e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
definePropChange(propChange) {
|
|
54
|
+
this.propChanges[propChange.key] = propChange;
|
|
55
|
+
if (!this.propChange) {
|
|
56
|
+
// If there is no previous change defined set it up
|
|
57
|
+
this.propChange = Promise.resolve().then(() => {
|
|
58
|
+
// run onPropChanges here. This makes sure we capture all changes
|
|
59
|
+
this.onChange(this.propChanges);
|
|
60
|
+
// reset for next time
|
|
61
|
+
this.propChanges = {};
|
|
62
|
+
this.propChange = null;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return this.propChange;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function createPrivateKey(key) {
|
|
71
|
+
return `__${key}`;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=observable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../lib/observable.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAU;IACF;IAA6B;IAAoB;IAApE,YAAmB,GAAoB,EAAS,QAAW,EAAS,QAAY;QAA7D,QAAG,GAAH,GAAG,CAAiB;QAAS,aAAQ,GAAR,QAAQ,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAI;IAAG,CAAC;CACrF;AAQD,MAAM,UAAU,gBAAgB,CAAC,CAAM;IACrC,OAAO,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,SAAS,CAAC,UAAU,IAAI,EAAE,CAAC;AACtD,CAAC;AAQD,MAAM,YAAY,GAAG,YAAY,CAAC;AAElC,MAAM,UAAU,OAAO;IACrB,OAAO,UAAU,MAAW,EAAE,GAAW;QACvC,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAClD,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,CAA2D,aAAgB,EAAE,EAAE;QACpF,MAAM,IAAI,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAE7C,MAAM,KAAK,GAAuC,EAAE,CAAC;QAErD,KAAK,IAAI,GAAG,IAAI,IAAI,EAAE;YACpB,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAEzC,KAAK,CAAC,GAAG,CAAC,GAAG;gBACX,GAAG,CAAuB,GAAG;oBAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;oBAE9C,IAAI,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;oBAEzD,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC;gBACrC,CAAC;gBACD,GAAG;oBACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;gBACvC,CAAC;aACF,CAAC;SACH;QAED,OAAO,MAAM,iBAAkB,SAAQ,aAAa;YAClD,WAAW,GAAgB,EAAE,CAAC;YAC9B,UAAU,GAAyB,IAAI,CAAC;YAExC,YAAY,GAAG,IAAW;gBACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;gBAEf,KAAK,IAAI,GAAG,IAAI,IAAI,EAAE;oBACpB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;oBAEjE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBACtC;YACH,CAAC;YAED,QAAQ,CAAC,CAAc;gBACrB,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE;oBACpB,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACnB;YACH,CAAC;YAED,gBAAgB,CAAC,UAAsB;gBACrC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC;gBAE9C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;oBACpB,mDAAmD;oBACnD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;wBAC5C,iEAAiE;wBAEjE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAEhC,sBAAsB;wBACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;wBACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;oBACzB,CAAC,CAAC,CAAC;iBACJ;gBAED,OAAO,IAAI,CAAC,UAAU,CAAC;YACzB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAW;IACnC,OAAO,KAAK,GAAG,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
export interface StyledOptons {
|
|
2
|
+
styles: string[];
|
|
3
|
+
}
|
|
4
|
+
export declare function styled({ styles }: StyledOptons): <T extends new (...args: any[]) => HTMLElement>(CustomElement: T) => {
|
|
5
|
+
new (...args: any[]): {
|
|
6
|
+
/**
|
|
7
|
+
* Apply styles using Constructable StyleSheets if supported.
|
|
8
|
+
*/
|
|
9
|
+
applyStyles(): void;
|
|
10
|
+
accessKey: string;
|
|
11
|
+
readonly accessKeyLabel: string;
|
|
12
|
+
autocapitalize: string;
|
|
13
|
+
dir: string;
|
|
14
|
+
draggable: boolean;
|
|
15
|
+
hidden: boolean;
|
|
16
|
+
innerText: string;
|
|
17
|
+
lang: string;
|
|
18
|
+
readonly offsetHeight: number;
|
|
19
|
+
readonly offsetLeft: number;
|
|
20
|
+
readonly offsetParent: Element | null;
|
|
21
|
+
readonly offsetTop: number;
|
|
22
|
+
readonly offsetWidth: number;
|
|
23
|
+
outerText: string;
|
|
24
|
+
spellcheck: boolean;
|
|
25
|
+
title: string;
|
|
26
|
+
translate: boolean;
|
|
27
|
+
attachInternals(): ElementInternals;
|
|
28
|
+
click(): void;
|
|
29
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
30
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
31
|
+
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
32
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
33
|
+
readonly attributes: NamedNodeMap;
|
|
34
|
+
readonly classList: DOMTokenList;
|
|
35
|
+
className: string;
|
|
36
|
+
readonly clientHeight: number;
|
|
37
|
+
readonly clientLeft: number;
|
|
38
|
+
readonly clientTop: number;
|
|
39
|
+
readonly clientWidth: number;
|
|
40
|
+
id: string;
|
|
41
|
+
readonly localName: string;
|
|
42
|
+
readonly namespaceURI: string | null;
|
|
43
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
44
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
45
|
+
outerHTML: string;
|
|
46
|
+
readonly ownerDocument: Document;
|
|
47
|
+
readonly part: DOMTokenList;
|
|
48
|
+
readonly prefix: string | null;
|
|
49
|
+
readonly scrollHeight: number;
|
|
50
|
+
scrollLeft: number;
|
|
51
|
+
scrollTop: number;
|
|
52
|
+
readonly scrollWidth: number;
|
|
53
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
54
|
+
slot: string;
|
|
55
|
+
readonly tagName: string;
|
|
56
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
57
|
+
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
|
|
58
|
+
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
|
|
59
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
60
|
+
getAttribute(qualifiedName: string): string | null;
|
|
61
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
62
|
+
getAttributeNames(): string[];
|
|
63
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
64
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
65
|
+
getBoundingClientRect(): DOMRect;
|
|
66
|
+
getClientRects(): DOMRectList;
|
|
67
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
68
|
+
getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
|
|
69
|
+
getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
|
|
70
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
71
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
72
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
73
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
74
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
75
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
76
|
+
hasAttributes(): boolean;
|
|
77
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
78
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
79
|
+
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
80
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
81
|
+
matches(selectors: string): boolean;
|
|
82
|
+
releasePointerCapture(pointerId: number): void;
|
|
83
|
+
removeAttribute(qualifiedName: string): void;
|
|
84
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
85
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
86
|
+
requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
|
|
87
|
+
requestPointerLock(): void;
|
|
88
|
+
scroll(options?: ScrollToOptions | undefined): void;
|
|
89
|
+
scroll(x: number, y: number): void;
|
|
90
|
+
scrollBy(options?: ScrollToOptions | undefined): void;
|
|
91
|
+
scrollBy(x: number, y: number): void;
|
|
92
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
|
|
93
|
+
scrollTo(options?: ScrollToOptions | undefined): void;
|
|
94
|
+
scrollTo(x: number, y: number): void;
|
|
95
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
96
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
97
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
98
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
99
|
+
setPointerCapture(pointerId: number): void;
|
|
100
|
+
toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
|
|
101
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
102
|
+
readonly baseURI: string;
|
|
103
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
104
|
+
readonly firstChild: ChildNode | null;
|
|
105
|
+
readonly isConnected: boolean;
|
|
106
|
+
readonly lastChild: ChildNode | null;
|
|
107
|
+
readonly nextSibling: ChildNode | null;
|
|
108
|
+
readonly nodeName: string;
|
|
109
|
+
readonly nodeType: number;
|
|
110
|
+
nodeValue: string | null;
|
|
111
|
+
readonly parentElement: HTMLElement | null;
|
|
112
|
+
readonly parentNode: ParentNode | null;
|
|
113
|
+
readonly previousSibling: ChildNode | null;
|
|
114
|
+
textContent: string | null;
|
|
115
|
+
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
116
|
+
cloneNode(deep?: boolean | undefined): Node;
|
|
117
|
+
compareDocumentPosition(other: Node): number;
|
|
118
|
+
contains(other: Node | null): boolean;
|
|
119
|
+
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
120
|
+
hasChildNodes(): boolean;
|
|
121
|
+
insertBefore<T_2 extends Node>(node: T_2, child: Node | null): T_2;
|
|
122
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
123
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
124
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
125
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
126
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
127
|
+
normalize(): void;
|
|
128
|
+
removeChild<T_3 extends Node>(child: T_3): T_3;
|
|
129
|
+
replaceChild<T_4 extends Node>(node: Node, child: T_4): T_4;
|
|
130
|
+
readonly ATTRIBUTE_NODE: number;
|
|
131
|
+
readonly CDATA_SECTION_NODE: number;
|
|
132
|
+
readonly COMMENT_NODE: number;
|
|
133
|
+
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
134
|
+
readonly DOCUMENT_NODE: number;
|
|
135
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
136
|
+
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
137
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
138
|
+
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
139
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
140
|
+
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
141
|
+
readonly DOCUMENT_TYPE_NODE: number;
|
|
142
|
+
readonly ELEMENT_NODE: number;
|
|
143
|
+
readonly ENTITY_NODE: number;
|
|
144
|
+
readonly ENTITY_REFERENCE_NODE: number;
|
|
145
|
+
readonly NOTATION_NODE: number;
|
|
146
|
+
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
147
|
+
readonly TEXT_NODE: number;
|
|
148
|
+
dispatchEvent(event: Event): boolean;
|
|
149
|
+
ariaAtomic: string;
|
|
150
|
+
ariaAutoComplete: string;
|
|
151
|
+
ariaBusy: string;
|
|
152
|
+
ariaChecked: string;
|
|
153
|
+
ariaColCount: string;
|
|
154
|
+
ariaColIndex: string;
|
|
155
|
+
ariaColSpan: string;
|
|
156
|
+
ariaCurrent: string;
|
|
157
|
+
ariaDisabled: string;
|
|
158
|
+
ariaExpanded: string;
|
|
159
|
+
ariaHasPopup: string;
|
|
160
|
+
ariaHidden: string;
|
|
161
|
+
ariaKeyShortcuts: string;
|
|
162
|
+
ariaLabel: string;
|
|
163
|
+
ariaLevel: string;
|
|
164
|
+
ariaLive: string;
|
|
165
|
+
ariaModal: string;
|
|
166
|
+
ariaMultiLine: string;
|
|
167
|
+
ariaMultiSelectable: string;
|
|
168
|
+
ariaOrientation: string;
|
|
169
|
+
ariaPlaceholder: string;
|
|
170
|
+
ariaPosInSet: string;
|
|
171
|
+
ariaPressed: string;
|
|
172
|
+
ariaReadOnly: string;
|
|
173
|
+
ariaRequired: string;
|
|
174
|
+
ariaRoleDescription: string;
|
|
175
|
+
ariaRowCount: string;
|
|
176
|
+
ariaRowIndex: string;
|
|
177
|
+
ariaRowSpan: string;
|
|
178
|
+
ariaSelected: string;
|
|
179
|
+
ariaSetSize: string;
|
|
180
|
+
ariaSort: string;
|
|
181
|
+
ariaValueMax: string;
|
|
182
|
+
ariaValueMin: string;
|
|
183
|
+
ariaValueNow: string;
|
|
184
|
+
ariaValueText: string;
|
|
185
|
+
animate(keyframes: PropertyIndexedKeyframes | Keyframe[] | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
|
|
186
|
+
getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
|
|
187
|
+
after(...nodes: (string | Node)[]): void;
|
|
188
|
+
before(...nodes: (string | Node)[]): void;
|
|
189
|
+
remove(): void;
|
|
190
|
+
replaceWith(...nodes: (string | Node)[]): void;
|
|
191
|
+
innerHTML: string;
|
|
192
|
+
readonly nextElementSibling: Element | null;
|
|
193
|
+
readonly previousElementSibling: Element | null;
|
|
194
|
+
readonly childElementCount: number;
|
|
195
|
+
readonly children: HTMLCollection;
|
|
196
|
+
readonly firstElementChild: Element | null;
|
|
197
|
+
readonly lastElementChild: Element | null;
|
|
198
|
+
append(...nodes: (string | Node)[]): void;
|
|
199
|
+
prepend(...nodes: (string | Node)[]): void;
|
|
200
|
+
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
201
|
+
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
202
|
+
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
203
|
+
querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
|
|
204
|
+
querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
|
|
205
|
+
querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
|
|
206
|
+
replaceChildren(...nodes: (string | Node)[]): void;
|
|
207
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
208
|
+
oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
209
|
+
oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
210
|
+
onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
211
|
+
readonly style: CSSStyleDeclaration;
|
|
212
|
+
contentEditable: string;
|
|
213
|
+
enterKeyHint: string;
|
|
214
|
+
inputMode: string;
|
|
215
|
+
readonly isContentEditable: boolean;
|
|
216
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
217
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
218
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
219
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
220
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
221
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
222
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
223
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
224
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
225
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
226
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
227
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
228
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
229
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
230
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
231
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
232
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
233
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
234
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
235
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
236
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
237
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
238
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
239
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
240
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
241
|
+
onerror: OnErrorEventHandler;
|
|
242
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
243
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
244
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
245
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
246
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
247
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
248
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
249
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
250
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
251
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
252
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
253
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
254
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
255
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
256
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
257
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
258
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
259
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
260
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
261
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
262
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
263
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
264
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
265
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
266
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
267
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
268
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
269
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
270
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
271
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
272
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
273
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
|
|
274
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
275
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
277
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
282
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
283
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
284
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
285
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
286
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
287
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
288
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
289
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
290
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
291
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
292
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
293
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
294
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
295
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
296
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
297
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
298
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
299
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
300
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
303
|
+
autofocus: boolean;
|
|
304
|
+
readonly dataset: DOMStringMap;
|
|
305
|
+
nonce?: string | undefined;
|
|
306
|
+
tabIndex: number;
|
|
307
|
+
blur(): void;
|
|
308
|
+
focus(options?: FocusOptions | undefined): void;
|
|
309
|
+
};
|
|
310
|
+
} & T;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Cache computed constructable stylesheets
|
|
2
|
+
const ccStyleCache = new Map();
|
|
3
|
+
export function styled({ styles }) {
|
|
4
|
+
return (CustomElement) => {
|
|
5
|
+
return class StyledElement extends CustomElement {
|
|
6
|
+
constructor(...args) {
|
|
7
|
+
super(...args);
|
|
8
|
+
this.applyStyles();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Apply styles using Constructable StyleSheets if supported.
|
|
12
|
+
*/
|
|
13
|
+
applyStyles() {
|
|
14
|
+
if (styles && this.shadowRoot) {
|
|
15
|
+
if (this.shadowRoot.adoptedStyleSheets) {
|
|
16
|
+
// adoptedStyleSheets are available
|
|
17
|
+
if (!ccStyleCache.has(this.tagName)) {
|
|
18
|
+
// if styles have not previously been computed do so now
|
|
19
|
+
ccStyleCache.set(this.tagName, styles.map(createStyleSheet));
|
|
20
|
+
}
|
|
21
|
+
// adpot calculated stylesheets
|
|
22
|
+
this.shadowRoot.adoptedStyleSheets = ccStyleCache.get(this.tagName) || [];
|
|
23
|
+
console.log('###', this.shadowRoot.adoptedStyleSheets);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// styles are defined but Constructable stylesheets not supported
|
|
27
|
+
const styleEls = styles.map(createStyleElement);
|
|
28
|
+
this.shadowRoot.prepend(...styleEls);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function createStyleSheet(styleString) {
|
|
36
|
+
const sheet = new CSSStyleSheet();
|
|
37
|
+
sheet.replaceSync(styleString);
|
|
38
|
+
return sheet;
|
|
39
|
+
}
|
|
40
|
+
function createStyleElement(styles) {
|
|
41
|
+
const el = document.createElement('style');
|
|
42
|
+
el.append(document.createTextNode(styles));
|
|
43
|
+
return el;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../lib/styled.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,YAAY,GAAG,IAAI,GAAG,EAA2B,CAAC;AAMxD,MAAM,UAAU,MAAM,CAAC,EAAE,MAAM,EAAgB;IAC7C,OAAO,CAAgD,aAAgB,EAAE,EAAE;QACzE,OAAO,MAAM,aAAc,SAAQ,aAAa;YAC9C,YAAY,GAAG,IAAW;gBACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;gBAEf,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;YAED;;eAEG;YACH,WAAW;gBACT,IAAI,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE;oBAC7B,IAAI,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE;wBACtC,mCAAmC;wBACnC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;4BACnC,wDAAwD;4BACxD,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;yBAC9D;wBAED,+BAA+B;wBAC/B,IAAI,CAAC,UAAU,CAAC,kBAAkB,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;wBAE1E,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;qBACxD;yBAAM;wBACL,iEAAiE;wBACjE,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;wBAEhD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;qBACtC;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB;IAC3C,MAAM,KAAK,GAAG,IAAI,aAAa,EAAE,CAAC;IAElC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAE/B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAc;IACxC,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAE3C,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3C,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAY,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
|