@pakdul/style 0.0.1
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/dul-style.d.ts +2 -0
- package/dul-style.d.ts.map +1 -0
- package/dul-style.js +21 -0
- package/dul-style.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +21 -0
- package/src/dul-style.ts +20 -0
- package/src/index.ts +0 -0
- package/tsconfig.json +53 -0
package/dul-style.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dul-style.d.ts","sourceRoot":"","sources":["src/dul-style.ts"],"names":[],"mappings":""}
|
package/dul-style.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class DulStyle extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
const el = this;
|
|
4
|
+
if (el.firstElementChild) {
|
|
5
|
+
const tmpl = document.createElement('template');
|
|
6
|
+
tmpl.content.appendChild(el.firstElementChild);
|
|
7
|
+
const shadyCSS = window.ShadyCSS;
|
|
8
|
+
if (shadyCSS) {
|
|
9
|
+
shadyCSS.prepareTemplate(tmpl, el.localName);
|
|
10
|
+
shadyCSS.styleElement(this);
|
|
11
|
+
}
|
|
12
|
+
document.head.appendChild(tmpl.content);
|
|
13
|
+
}
|
|
14
|
+
if (this.parentNode) {
|
|
15
|
+
this.parentNode.removeChild(this);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
window.customElements.define('dul-style', DulStyle);
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=dul-style.js.map
|
package/dul-style.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dul-style.js","sourceRoot":"","sources":["src/dul-style.ts"],"names":[],"mappings":"AAAA,MAAM,QAAS,SAAQ,WAAW;IAC9B,iBAAiB;QACb,MAAM,EAAE,GAAG,IAA8B,CAAC;QAC1C,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,GAAyB,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;YAC/C,MAAM,QAAQ,GAAI,MAAc,CAAC,QAAQ,CAAC;YAC1C,IAAI,QAAQ,EAAE,CAAC;gBACX,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;gBAC7C,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAChC,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;IACL,CAAC;CACJ;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC"}
|
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":""}
|
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pakdul/style",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "web component style",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"build": "tsc && tsc-alias"
|
|
9
|
+
},
|
|
10
|
+
"author": "Abdul Yadi",
|
|
11
|
+
"license": "BSD-2-Clause",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"tsc-alias": "^1.9.2",
|
|
15
|
+
"typescript": "^7.0.2"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@webcomponents/shadycss": "^1.11.2",
|
|
19
|
+
"@webcomponents/webcomponentsjs": "^2.8.0"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/dul-style.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class DulStyle extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
const el = this as unknown as HTMLElement;
|
|
4
|
+
if (el.firstElementChild) {
|
|
5
|
+
const tmpl: HTMLTemplateElement = document.createElement('template');
|
|
6
|
+
tmpl.content.appendChild(el.firstElementChild);
|
|
7
|
+
const shadyCSS = (window as any).ShadyCSS;
|
|
8
|
+
if (shadyCSS) {
|
|
9
|
+
shadyCSS.prepareTemplate(tmpl, el.localName);
|
|
10
|
+
shadyCSS.styleElement(this);
|
|
11
|
+
}
|
|
12
|
+
document.head.appendChild(tmpl.content);
|
|
13
|
+
}
|
|
14
|
+
if (this.parentNode) {
|
|
15
|
+
this.parentNode.removeChild(this);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
window.customElements.define('dul-style', DulStyle);
|
package/src/index.ts
ADDED
|
File without changes
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": ".",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "es6",
|
|
11
|
+
"target": "es6",
|
|
12
|
+
"types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
"verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
"paths": {
|
|
44
|
+
"@pakdul/style/*": ["./src/*"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"include": [
|
|
48
|
+
"src/**/*"
|
|
49
|
+
],
|
|
50
|
+
"exclude": [
|
|
51
|
+
"style"
|
|
52
|
+
]
|
|
53
|
+
}
|