@htmlplus/element 0.3.0 → 0.3.3
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/README.md +5 -5
- package/{dist/client → client}/decorators/attributes.d.ts +0 -0
- package/{dist/client → client}/decorators/attributes.js +0 -0
- package/{dist/client → client}/decorators/bind.d.ts +0 -0
- package/{dist/client → client}/decorators/bind.js +0 -0
- package/{dist/client → client}/decorators/element.d.ts +0 -0
- package/{dist/client → client}/decorators/element.js +0 -0
- package/{dist/client → client}/decorators/event.d.ts +0 -0
- package/{dist/client → client}/decorators/event.js +0 -0
- package/{dist/client → client}/decorators/index.d.ts +0 -0
- package/{dist/client → client}/decorators/index.js +0 -0
- package/{dist/client → client}/decorators/listen.d.ts +0 -0
- package/{dist/client → client}/decorators/listen.js +0 -0
- package/{dist/client → client}/decorators/method.d.ts +0 -0
- package/{dist/client → client}/decorators/method.js +0 -0
- package/{dist/client → client}/decorators/property.d.ts +0 -0
- package/{dist/client → client}/decorators/property.js +0 -0
- package/{dist/client → client}/decorators/state.d.ts +0 -0
- package/{dist/client → client}/decorators/state.js +0 -0
- package/{dist/client → client}/decorators/watch.d.ts +0 -0
- package/{dist/client → client}/decorators/watch.js +0 -0
- package/{dist/client → client}/helpers/classes.d.ts +0 -0
- package/{dist/client → client}/helpers/classes.js +0 -0
- package/{dist/client → client}/helpers/direction.d.ts +0 -0
- package/{dist/client → client}/helpers/direction.js +0 -0
- package/{dist/client → client}/helpers/index.d.ts +0 -0
- package/{dist/client → client}/helpers/index.js +0 -0
- package/{dist/client → client}/helpers/is-rtl.d.ts +0 -0
- package/{dist/client → client}/helpers/is-rtl.js +0 -0
- package/{dist/client → client}/helpers/query-all.d.ts +0 -0
- package/{dist/client → client}/helpers/query-all.js +0 -0
- package/{dist/client → client}/helpers/query.d.ts +0 -0
- package/{dist/client → client}/helpers/query.js +0 -0
- package/{dist/client → client}/helpers/slots.d.ts +0 -0
- package/{dist/client → client}/helpers/slots.js +0 -0
- package/{dist/client → client}/helpers/styles.d.ts +0 -0
- package/{dist/client → client}/helpers/styles.js +0 -0
- package/{dist/client → client}/helpers/to-unit.d.ts +0 -0
- package/{dist/client → client}/helpers/to-unit.js +0 -0
- package/{dist/client → client}/index.d.ts +0 -0
- package/{dist/client → client}/index.js +0 -0
- package/{dist/client → client}/services/index.d.ts +0 -0
- package/{dist/client → client}/services/index.js +0 -0
- package/{dist/client → client}/services/link.d.ts +0 -0
- package/{dist/client → client}/services/link.js +0 -0
- package/{dist/client → client}/utils/append-to-method.d.ts +0 -0
- package/{dist/client → client}/utils/append-to-method.js +0 -0
- package/{dist/client → client}/utils/call.d.ts +0 -0
- package/{dist/client → client}/utils/call.js +0 -0
- package/{dist/client → client}/utils/define-property.d.ts +0 -0
- package/{dist/client → client}/utils/define-property.js +0 -0
- package/{dist/client → client}/utils/event.d.ts +0 -0
- package/{dist/client → client}/utils/event.js +0 -0
- package/{dist/client → client}/utils/get-members.d.ts +0 -0
- package/{dist/client → client}/utils/get-members.js +0 -0
- package/{dist/client → client}/utils/get-styles.d.ts +0 -0
- package/{dist/client → client}/utils/get-styles.js +0 -0
- package/{dist/client → client}/utils/host.d.ts +0 -0
- package/{dist/client → client}/utils/host.js +0 -0
- package/{dist/client → client}/utils/index.d.ts +0 -0
- package/{dist/client → client}/utils/index.js +0 -0
- package/{dist/client → client}/utils/is-event.d.ts +0 -0
- package/{dist/client → client}/utils/is-event.js +0 -0
- package/{dist/client → client}/utils/is-ready.d.ts +0 -0
- package/{dist/client → client}/utils/is-ready.js +0 -0
- package/{dist/client → client}/utils/is-server.d.ts +0 -0
- package/{dist/client → client}/utils/is-server.js +0 -0
- package/{dist/client → client}/utils/on-ready.d.ts +0 -0
- package/{dist/client → client}/utils/on-ready.js +0 -0
- package/{dist/client → client}/utils/parse-value.d.ts +0 -0
- package/{dist/client → client}/utils/parse-value.js +0 -0
- package/{dist/client → client}/utils/render.d.ts +0 -0
- package/{dist/client → client}/utils/render.js +0 -0
- package/{dist/client → client}/utils/request.d.ts +0 -0
- package/{dist/client → client}/utils/request.js +0 -0
- package/{dist/client → client}/utils/sync.d.ts +0 -0
- package/{dist/client → client}/utils/sync.js +0 -0
- package/{dist/client → client}/utils/task.d.ts +0 -0
- package/{dist/client → client}/utils/task.js +0 -0
- package/{dist/client → client}/utils/to-boolean.d.ts +0 -0
- package/{dist/client → client}/utils/to-boolean.js +0 -0
- package/{dist/client → client}/utils/to-event.d.ts +0 -0
- package/{dist/client → client}/utils/to-event.js +0 -0
- package/{dist/client → client}/utils/type-of.d.ts +0 -0
- package/{dist/client → client}/utils/type-of.js +0 -0
- package/{dist/client → client}/utils/update-attribute.d.ts +0 -0
- package/{dist/client → client}/utils/update-attribute.js +0 -0
- package/{dist/compiler → compiler}/compiler.d.ts +0 -0
- package/{dist/compiler → compiler}/compiler.js +0 -0
- package/{dist/compiler → compiler}/index.d.ts +0 -0
- package/{dist/compiler → compiler}/index.js +0 -0
- package/{dist/compiler → compiler}/plugins/componentDependencyResolver.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/componentDependencyResolver.js +0 -0
- package/{dist/compiler → compiler}/plugins/customElement.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/customElement.js +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/customElementReact.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/customElementReact.js +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/index.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/index.js +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/README.md.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/_.gitignore.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/package.json.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/rollup.config.js.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/src/components/index.ts.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/src/components/{{fileName}}.compact.ts.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/src/components/{{fileName}}.ts.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/src/index.ts.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/src/proxy.ts.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/customElementReact/templates/tsconfig.json.hbs +0 -0
- package/{dist/compiler → compiler}/plugins/docs.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/docs.js +0 -0
- package/{dist/compiler → compiler}/plugins/extract.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/extract.js +0 -0
- package/{dist/compiler → compiler}/plugins/index.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/index.js +0 -0
- package/{dist/compiler → compiler}/plugins/parse.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/parse.js +0 -0
- package/{dist/compiler → compiler}/plugins/read.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/read.js +0 -0
- package/{dist/compiler → compiler}/plugins/style.d.ts +1 -3
- package/{dist/compiler → compiler}/plugins/style.js +2 -8
- package/{dist/compiler → compiler}/plugins/validate.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/validate.js +0 -0
- package/{dist/compiler → compiler}/plugins/vscode.d.ts +0 -0
- package/{dist/compiler → compiler}/plugins/vscode.js +0 -0
- package/{dist/compiler → compiler}/utils/__dirname.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/__dirname.js +0 -0
- package/{dist/compiler → compiler}/utils/get-initializer.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/get-initializer.js +0 -0
- package/{dist/compiler → compiler}/utils/get-tags.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/get-tags.js +0 -0
- package/{dist/compiler → compiler}/utils/get-type.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/get-type.js +0 -0
- package/{dist/compiler → compiler}/utils/has-decorator.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/has-decorator.js +0 -0
- package/{dist/compiler → compiler}/utils/index.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/index.js +0 -0
- package/{dist/compiler → compiler}/utils/is-directory-empty.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/is-directory-empty.js +0 -0
- package/{dist/compiler → compiler}/utils/print-type.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/print-type.js +0 -0
- package/{dist/compiler → compiler}/utils/print.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/print.js +0 -0
- package/{dist/compiler → compiler}/utils/render-template.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/render-template.js +0 -0
- package/{dist/compiler → compiler}/utils/visitor.d.ts +0 -0
- package/{dist/compiler → compiler}/utils/visitor.js +0 -0
- package/{dist/constants → constants}/index.d.ts +0 -0
- package/{dist/constants → constants}/index.js +0 -0
- package/package.json +8 -45
- /package/{dist/runtime → runtime}/index.d.ts +0 -0
- /package/{dist/runtime → runtime}/index.js +0 -0
- /package/{dist/types → types}/context.d.ts +0 -0
- /package/{dist/types → types}/context.js +0 -0
- /package/{dist/types → types}/global.d.ts +0 -0
- /package/{dist/types → types}/global.js +0 -0
- /package/{dist/types → types}/index.d.ts +0 -0
- /package/{dist/types → types}/index.js +0 -0
- /package/{dist/types → types}/plugin.d.ts +0 -0
- /package/{dist/types → types}/plugin.js +0 -0
- /package/{dist/types → types}/plus-element.d.ts +0 -0
- /package/{dist/types → types}/plus-element.js +0 -0
package/README.md
CHANGED
|
@@ -941,16 +941,16 @@ const { start, next, finish } = compiler(...plugins);
|
|
|
941
941
|
TODO
|
|
942
942
|
|
|
943
943
|
```js
|
|
944
|
-
import compiler from '@htmlplus/element/compiler';
|
|
945
|
-
import {
|
|
944
|
+
import compiler from '@htmlplus/element/compiler/index.js';
|
|
945
|
+
import { customElement, extract, parse, read, style, validate } from '@htmlplus/element/compiler/index.js';
|
|
946
946
|
|
|
947
947
|
const { start, next, finish } = compiler(
|
|
948
948
|
read(),
|
|
949
949
|
parse(),
|
|
950
|
+
validate(),
|
|
950
951
|
extract(),
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
print(),
|
|
952
|
+
style(),
|
|
953
|
+
customElement(),
|
|
954
954
|
);
|
|
955
955
|
|
|
956
956
|
await start();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{dist/compiler → compiler}/plugins/customElementReact/templates/rollup.config.js.hbs
RENAMED
|
File without changes
|
package/{dist/compiler → compiler}/plugins/customElementReact/templates/src/components/index.ts.hbs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Options } from 'sass';
|
|
2
1
|
import { Context } from '../../types/index.js';
|
|
3
2
|
export declare type StyleOptions = {
|
|
4
|
-
extensions?: Array<
|
|
3
|
+
extensions?: Array<string>;
|
|
5
4
|
directory?: (context: Context) => string;
|
|
6
5
|
filename?: (context: Context) => string;
|
|
7
|
-
sass?: Options<'sync'>;
|
|
8
6
|
};
|
|
9
7
|
export declare const style: (options: StyleOptions) => {
|
|
10
8
|
name: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import t from '@babel/types';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
|
-
import core from 'sass';
|
|
5
4
|
import * as CONSTANTS from '../../constants/index.js';
|
|
6
5
|
const defaults = {
|
|
7
6
|
extensions: ['scss', 'css'],
|
|
@@ -27,13 +26,8 @@ export const style = (options) => {
|
|
|
27
26
|
}
|
|
28
27
|
if (!context.stylePath)
|
|
29
28
|
return;
|
|
30
|
-
|
|
31
|
-
context.
|
|
32
|
-
// TODO loadedUrls;
|
|
33
|
-
context.styleDependencies = [];
|
|
34
|
-
if (!context.styleParsed)
|
|
35
|
-
return;
|
|
36
|
-
context.class.body.body.unshift(t.classProperty(t.identifier(CONSTANTS.STATIC_STYLES), t.stringLiteral(context.styleParsed), undefined, null, undefined, true));
|
|
29
|
+
context.fileAST.program.body.unshift(t.importDeclaration([t.importDefaultSpecifier(t.identifier('AUTO_IMPORT_STYLE'))], t.stringLiteral(context.stylePath + '?inline')));
|
|
30
|
+
context.class.body.body.unshift(t.classProperty(t.identifier(CONSTANTS.STATIC_STYLES), t.identifier('AUTO_IMPORT_STYLE'), undefined, null, undefined, true));
|
|
37
31
|
};
|
|
38
32
|
return {
|
|
39
33
|
name,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlplus/element",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Masood Abdolian <m.abdolian@gmail.com>",
|
|
6
6
|
"description": "Compiler of HTMLPlus",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"main": "./client/index.js",
|
|
9
|
+
"types": "./client/index.d.ts",
|
|
8
10
|
"scripts": {
|
|
9
11
|
"prebuild": "npm run clean",
|
|
10
12
|
"build": "tsc",
|
|
@@ -15,50 +17,12 @@
|
|
|
15
17
|
"dev:start": "node src/dev/scripts/start.js",
|
|
16
18
|
"dev:build": "node src/dev/scripts/build.js"
|
|
17
19
|
},
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"default": "./dist/client/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./compiler": {
|
|
23
|
-
"default": "./dist/compiler/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./decorators": {
|
|
26
|
-
"default": "./dist/client/decorators/index.js"
|
|
27
|
-
},
|
|
28
|
-
"./helpers": {
|
|
29
|
-
"default": "./dist/client/helpers/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./runtime": {
|
|
32
|
-
"default": "./dist/runtime/index.js"
|
|
33
|
-
},
|
|
34
|
-
"./services": {
|
|
35
|
-
"default": "./dist/client/services/index.js"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"typesVersions": {
|
|
39
|
-
"*": {
|
|
40
|
-
"*": [
|
|
41
|
-
"./dist/client/index.d.ts"
|
|
42
|
-
],
|
|
43
|
-
"compiler": [
|
|
44
|
-
"./dist/compiler/index.d.ts"
|
|
45
|
-
],
|
|
46
|
-
"decorators": [
|
|
47
|
-
"./dist/client/decorators/index.d.ts"
|
|
48
|
-
],
|
|
49
|
-
"helpers": [
|
|
50
|
-
"./dist/client/helpers/index.d.ts"
|
|
51
|
-
],
|
|
52
|
-
"runtime": [
|
|
53
|
-
"./dist/runtime/index.d.ts"
|
|
54
|
-
],
|
|
55
|
-
"services": [
|
|
56
|
-
"./dist/client/services/index.d.ts"
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
20
|
"files": [
|
|
61
|
-
"
|
|
21
|
+
"client",
|
|
22
|
+
"compiler",
|
|
23
|
+
"constants",
|
|
24
|
+
"runtime",
|
|
25
|
+
"types",
|
|
62
26
|
"package.json",
|
|
63
27
|
"README.md"
|
|
64
28
|
],
|
|
@@ -84,7 +48,6 @@
|
|
|
84
48
|
"fast-glob": "^3.2.11",
|
|
85
49
|
"handlebars": "^4.7.7",
|
|
86
50
|
"log-update": "^5.0.0",
|
|
87
|
-
"sass": "^1.43.4",
|
|
88
51
|
"ts-node": "^10.4.0",
|
|
89
52
|
"typescript": "^4.5.2",
|
|
90
53
|
"uhtml": "^2.7.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|