@htmlplus/element 2.12.0 → 2.13.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/README.md +2 -2
- package/bundlers.d.ts +20 -0
- package/{bundlers/vite.js → bundlers.js} +39 -3
- package/client-5FqNUiuz.d.ts +309 -0
- package/client-Dse96R-O.js +1805 -0
- package/client.d.ts +1 -0
- package/client.js +3 -0
- package/constants.d.ts +48 -0
- package/constants.js +60 -0
- package/internal.d.ts +1 -0
- package/internal.js +3 -0
- package/package.json +8 -4
- package/transformer.d.ts +139 -0
- package/transformer.js +1277 -0
- package/bundlers/rollup.d.ts +0 -7
- package/bundlers/rollup.js +0 -23
- package/bundlers/vite.d.ts +0 -8
- package/client/decorators/bind.d.ts +0 -8
- package/client/decorators/bind.js +0 -21
- package/client/decorators/context.d.ts +0 -3
- package/client/decorators/context.js +0 -121
- package/client/decorators/direction.d.ts +0 -5
- package/client/decorators/direction.js +0 -8
- package/client/decorators/element.d.ts +0 -7
- package/client/decorators/element.js +0 -65
- package/client/decorators/event.d.ts +0 -35
- package/client/decorators/event.js +0 -53
- package/client/decorators/host.d.ts +0 -4
- package/client/decorators/host.js +0 -7
- package/client/decorators/index.d.ts +0 -15
- package/client/decorators/index.js +0 -15
- package/client/decorators/isRTL.d.ts +0 -4
- package/client/decorators/isRTL.js +0 -7
- package/client/decorators/listen.d.ts +0 -52
- package/client/decorators/listen.js +0 -37
- package/client/decorators/method.d.ts +0 -6
- package/client/decorators/method.js +0 -15
- package/client/decorators/property.d.ts +0 -25
- package/client/decorators/property.js +0 -94
- package/client/decorators/query.d.ts +0 -9
- package/client/decorators/query.js +0 -12
- package/client/decorators/queryAll.d.ts +0 -12
- package/client/decorators/queryAll.js +0 -15
- package/client/decorators/slots.d.ts +0 -4
- package/client/decorators/slots.js +0 -7
- package/client/decorators/state.d.ts +0 -6
- package/client/decorators/state.js +0 -23
- package/client/decorators/watch.d.ts +0 -11
- package/client/decorators/watch.js +0 -31
- package/client/index.d.ts +0 -2
- package/client/index.js +0 -2
- package/client/utils/appendToMethod.d.ts +0 -1
- package/client/utils/appendToMethod.js +0 -15
- package/client/utils/attributes.d.ts +0 -2
- package/client/utils/attributes.js +0 -33
- package/client/utils/call.d.ts +0 -1
- package/client/utils/call.js +0 -3
- package/client/utils/classes.d.ts +0 -4
- package/client/utils/classes.js +0 -45
- package/client/utils/config.d.ts +0 -39
- package/client/utils/config.js +0 -28
- package/client/utils/defineProperty.d.ts +0 -1
- package/client/utils/defineProperty.js +0 -1
- package/client/utils/direction.d.ts +0 -6
- package/client/utils/direction.js +0 -8
- package/client/utils/event.d.ts +0 -13
- package/client/utils/event.js +0 -48
- package/client/utils/getFramework.d.ts +0 -2
- package/client/utils/getFramework.js +0 -20
- package/client/utils/getStyles.d.ts +0 -2
- package/client/utils/getStyles.js +0 -4
- package/client/utils/getTag.d.ts +0 -2
- package/client/utils/getTag.js +0 -4
- package/client/utils/host.d.ts +0 -5
- package/client/utils/host.js +0 -12
- package/client/utils/index.d.ts +0 -32
- package/client/utils/index.js +0 -32
- package/client/utils/isCSSColor.d.ts +0 -5
- package/client/utils/isCSSColor.js +0 -9
- package/client/utils/isEvent.d.ts +0 -1
- package/client/utils/isEvent.js +0 -3
- package/client/utils/isRTL.d.ts +0 -5
- package/client/utils/isRTL.js +0 -5
- package/client/utils/isServer.d.ts +0 -4
- package/client/utils/isServer.js +0 -6
- package/client/utils/merge.d.ts +0 -1
- package/client/utils/merge.js +0 -22
- package/client/utils/query.d.ts +0 -5
- package/client/utils/query.js +0 -7
- package/client/utils/queryAll.d.ts +0 -5
- package/client/utils/queryAll.js +0 -7
- package/client/utils/request.d.ts +0 -9
- package/client/utils/request.js +0 -106
- package/client/utils/shadowRoot.d.ts +0 -2
- package/client/utils/shadowRoot.js +0 -4
- package/client/utils/slots.d.ts +0 -9
- package/client/utils/slots.js +0 -18
- package/client/utils/styles.d.ts +0 -4
- package/client/utils/styles.js +0 -10
- package/client/utils/task.d.ts +0 -6
- package/client/utils/task.js +0 -34
- package/client/utils/toBoolean.d.ts +0 -1
- package/client/utils/toBoolean.js +0 -3
- package/client/utils/toDecorator.d.ts +0 -2
- package/client/utils/toDecorator.js +0 -10
- package/client/utils/toEvent.d.ts +0 -1
- package/client/utils/toEvent.js +0 -3
- package/client/utils/toProperty.d.ts +0 -1
- package/client/utils/toProperty.js +0 -55
- package/client/utils/toUnit.d.ts +0 -4
- package/client/utils/toUnit.js +0 -10
- package/client/utils/typeOf.d.ts +0 -3
- package/client/utils/typeOf.js +0 -6
- package/client/utils/uhtml.d.ts +0 -22
- package/client/utils/uhtml.js +0 -703
- package/client/utils/updateAttribute.d.ts +0 -2
- package/client/utils/updateAttribute.js +0 -10
- package/constants/index.d.ts +0 -48
- package/constants/index.js +0 -60
- package/transformer/index.d.ts +0 -3
- package/transformer/index.js +0 -3
- package/transformer/plugins/assets.d.ts +0 -7
- package/transformer/plugins/assets.js +0 -26
- package/transformer/plugins/copy.d.ts +0 -9
- package/transformer/plugins/copy.js +0 -29
- package/transformer/plugins/customElement.d.ts +0 -7
- package/transformer/plugins/customElement.js +0 -392
- package/transformer/plugins/document.d.ts +0 -7
- package/transformer/plugins/document.js +0 -206
- package/transformer/plugins/extract.d.ts +0 -2
- package/transformer/plugins/extract.js +0 -22
- package/transformer/plugins/index.d.ts +0 -12
- package/transformer/plugins/index.js +0 -12
- package/transformer/plugins/parse.d.ts +0 -6
- package/transformer/plugins/parse.js +0 -13
- package/transformer/plugins/read.d.ts +0 -7
- package/transformer/plugins/read.js +0 -19
- package/transformer/plugins/readme.d.ts +0 -6
- package/transformer/plugins/readme.js +0 -24
- package/transformer/plugins/style.d.ts +0 -6
- package/transformer/plugins/style.js +0 -42
- package/transformer/plugins/validate.d.ts +0 -2
- package/transformer/plugins/validate.js +0 -40
- package/transformer/plugins/visualStudioCode.d.ts +0 -8
- package/transformer/plugins/visualStudioCode.js +0 -73
- package/transformer/plugins/webTypes.d.ts +0 -10
- package/transformer/plugins/webTypes.js +0 -74
- package/transformer/transformer.d.ts +0 -8
- package/transformer/transformer.js +0 -78
- package/transformer/transformer.types.d.ts +0 -52
- package/transformer/transformer.types.js +0 -1
- package/transformer/utils/addDependency.d.ts +0 -7
- package/transformer/utils/addDependency.js +0 -64
- package/transformer/utils/extractAttribute.d.ts +0 -2
- package/transformer/utils/extractAttribute.js +0 -10
- package/transformer/utils/extractFromComment.d.ts +0 -4
- package/transformer/utils/extractFromComment.js +0 -51
- package/transformer/utils/getInitializer.d.ts +0 -2
- package/transformer/utils/getInitializer.js +0 -3
- package/transformer/utils/getType.d.ts +0 -2
- package/transformer/utils/getType.js +0 -89
- package/transformer/utils/getTypeReference.d.ts +0 -2
- package/transformer/utils/getTypeReference.js +0 -33
- package/transformer/utils/hasDecorator.d.ts +0 -1
- package/transformer/utils/hasDecorator.js +0 -5
- package/transformer/utils/index.d.ts +0 -10
- package/transformer/utils/index.js +0 -10
- package/transformer/utils/print.d.ts +0 -2
- package/transformer/utils/print.js +0 -5
- package/transformer/utils/printType.d.ts +0 -1
- package/transformer/utils/printType.js +0 -69
- package/transformer/utils/visitor.d.ts +0 -2
- package/transformer/utils/visitor.js +0 -5
- package/types/index.d.ts +0 -2
- package/types/index.js +0 -1
package/client.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { B as Bind, C as Config, k as ConfigOptions, l as Consumer, D as Direction, E as Element, p as Event, m as EventEmitter, n as EventOptions, H as Host, I as IsRTL, r as Listen, L as ListenOptions, M as Method, v as Property, u as PropertyOptions, P as Provider, Q as Query, w as QueryAll, S as Slots, x as State, W as Watch, c as classes, d as direction, a as dispatch, g as getConfig, h as host, i as isCSSColor, b as isRTL, f as off, o as on, q as query, e as queryAll, j as setConfig, s as slots, t as toUnit } from './client-5FqNUiuz.js';
|
package/client.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { B as Bind, C as Consumer, D as Direction, E as Element, k as Event, H as Host, I as IsRTL, L as Listen, M as Method, l as Property, P as Provider, Q as Query, m as QueryAll, S as Slots, n as State, W as Watch, c as classes, d as direction, a as dispatch, g as getConfig, h as host, i as isCSSColor, b as isRTL, f as off, o as on, q as query, e as queryAll, j as setConfig, s as slots, t as toUnit } from './client-Dse96R-O.js';
|
|
2
|
+
import 'change-case';
|
|
3
|
+
import './constants.js';
|
package/constants.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare const PACKAGE_NAME = "@htmlplus/element";
|
|
2
|
+
declare const MAPPER: unique symbol;
|
|
3
|
+
declare const API_CONNECTED: unique symbol;
|
|
4
|
+
declare const API_HOST: unique symbol;
|
|
5
|
+
declare const API_INSTANCE: unique symbol;
|
|
6
|
+
declare const API_REQUEST: unique symbol;
|
|
7
|
+
declare const API_RENDER_COMPLETED: unique symbol;
|
|
8
|
+
declare const API_STACKS: unique symbol;
|
|
9
|
+
declare const API_STYLE: unique symbol;
|
|
10
|
+
declare const COMMENT_AUTO_ADDED = " THIS IS AUTO-ADDED, DO NOT EDIT MANUALY";
|
|
11
|
+
declare const DECORATOR_CSS_VARIABLE = "@Property()";
|
|
12
|
+
declare const DECORATOR_ELEMENT = "Element";
|
|
13
|
+
declare const DECORATOR_EVENT = "Event";
|
|
14
|
+
declare const DECORATOR_PROPERTY = "Property";
|
|
15
|
+
declare const DECORATOR_PROPERTY_TYPE = "type";
|
|
16
|
+
declare const DECORATOR_STATE = "State";
|
|
17
|
+
declare const DECORATOR_METHOD = "Method";
|
|
18
|
+
declare const ELEMENT_HOST_NAME = "host";
|
|
19
|
+
declare const LIFECYCLE_ADOPTED = "adoptedCallback";
|
|
20
|
+
declare const LIFECYCLE_CONNECTED = "connectedCallback";
|
|
21
|
+
declare const LIFECYCLE_CONSTRUCTED = "constructedCallback";
|
|
22
|
+
declare const LIFECYCLE_DISCONNECTED = "disconnectedCallback";
|
|
23
|
+
declare const LIFECYCLE_LOADED = "loadedCallback";
|
|
24
|
+
declare const LIFECYCLE_UPDATE = "updateCallback";
|
|
25
|
+
declare const LIFECYCLE_UPDATED = "updatedCallback";
|
|
26
|
+
declare const METHOD_RENDER = "render";
|
|
27
|
+
declare const STATIC_STYLE = "style";
|
|
28
|
+
declare const STATIC_TAG = "tag";
|
|
29
|
+
declare const STYLE_IMPORTED = "STYLE_IMPORTED";
|
|
30
|
+
declare const TYPE_ARRAY: number;
|
|
31
|
+
declare const TYPE_BOOLEAN: number;
|
|
32
|
+
declare const TYPE_DATE: number;
|
|
33
|
+
declare const TYPE_ENUM: number;
|
|
34
|
+
declare const TYPE_FUNCTION: number;
|
|
35
|
+
declare const TYPE_NULL: number;
|
|
36
|
+
declare const TYPE_NUMBER: number;
|
|
37
|
+
declare const TYPE_OBJECT: number;
|
|
38
|
+
declare const TYPE_STRING: number;
|
|
39
|
+
declare const TYPE_UNDEFINED: number;
|
|
40
|
+
declare const UTILS_ATTRIBUTES_IMPORTED = "attributes";
|
|
41
|
+
declare const UTILS_ATTRIBUTES_LOCAL = "UTILS_ATTRIBUTES";
|
|
42
|
+
declare const UTILS_HTML_IMPORTED = "html";
|
|
43
|
+
declare const UTILS_HTML_LOCAL = "UTILS_HTML";
|
|
44
|
+
declare const UTILS_STYLES_IMPORTED = "styles";
|
|
45
|
+
declare const UTILS_STYLES_LOCAL = "UTILS_STYLES";
|
|
46
|
+
declare const UTILS_PATH = "@htmlplus/element/internal.js";
|
|
47
|
+
|
|
48
|
+
export { API_CONNECTED, API_HOST, API_INSTANCE, API_RENDER_COMPLETED, API_REQUEST, API_STACKS, API_STYLE, COMMENT_AUTO_ADDED, DECORATOR_CSS_VARIABLE, DECORATOR_ELEMENT, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_PROPERTY, DECORATOR_PROPERTY_TYPE, DECORATOR_STATE, ELEMENT_HOST_NAME, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_LOADED, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, MAPPER, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BOOLEAN, TYPE_DATE, TYPE_ENUM, TYPE_FUNCTION, TYPE_NULL, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING, TYPE_UNDEFINED, UTILS_ATTRIBUTES_IMPORTED, UTILS_ATTRIBUTES_LOCAL, UTILS_HTML_IMPORTED, UTILS_HTML_LOCAL, UTILS_PATH, UTILS_STYLES_IMPORTED, UTILS_STYLES_LOCAL };
|
package/constants.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const PACKAGE_NAME = '@htmlplus/element';
|
|
2
|
+
// TODO
|
|
3
|
+
const MAPPER = Symbol();
|
|
4
|
+
// APIs
|
|
5
|
+
const API_CONNECTED = Symbol();
|
|
6
|
+
const API_HOST = Symbol();
|
|
7
|
+
const API_INSTANCE = Symbol();
|
|
8
|
+
const API_REQUEST = Symbol();
|
|
9
|
+
const API_RENDER_COMPLETED = Symbol();
|
|
10
|
+
const API_STACKS = Symbol();
|
|
11
|
+
const API_STYLE = Symbol();
|
|
12
|
+
// comments
|
|
13
|
+
const COMMENT_AUTO_ADDED = ' THIS IS AUTO-ADDED, DO NOT EDIT MANUALY';
|
|
14
|
+
// CSS decorators
|
|
15
|
+
const DECORATOR_CSS_VARIABLE = '@Property()';
|
|
16
|
+
// decorators
|
|
17
|
+
const DECORATOR_ELEMENT = 'Element';
|
|
18
|
+
const DECORATOR_EVENT = 'Event';
|
|
19
|
+
const DECORATOR_PROPERTY = 'Property';
|
|
20
|
+
const DECORATOR_PROPERTY_TYPE = 'type';
|
|
21
|
+
const DECORATOR_STATE = 'State';
|
|
22
|
+
const DECORATOR_METHOD = 'Method';
|
|
23
|
+
// element
|
|
24
|
+
const ELEMENT_HOST_NAME = 'host';
|
|
25
|
+
// lifecycle
|
|
26
|
+
const LIFECYCLE_ADOPTED = 'adoptedCallback';
|
|
27
|
+
const LIFECYCLE_CONNECTED = 'connectedCallback';
|
|
28
|
+
const LIFECYCLE_CONSTRUCTED = 'constructedCallback';
|
|
29
|
+
const LIFECYCLE_DISCONNECTED = 'disconnectedCallback';
|
|
30
|
+
const LIFECYCLE_LOADED = 'loadedCallback';
|
|
31
|
+
const LIFECYCLE_UPDATE = 'updateCallback';
|
|
32
|
+
const LIFECYCLE_UPDATED = 'updatedCallback';
|
|
33
|
+
// methods
|
|
34
|
+
const METHOD_RENDER = 'render';
|
|
35
|
+
// statics
|
|
36
|
+
const STATIC_STYLE = 'style';
|
|
37
|
+
const STATIC_TAG = 'tag';
|
|
38
|
+
// style
|
|
39
|
+
const STYLE_IMPORTED = 'STYLE_IMPORTED';
|
|
40
|
+
// types
|
|
41
|
+
const TYPE_ARRAY = 2 ** 0;
|
|
42
|
+
const TYPE_BOOLEAN = 2 ** 1;
|
|
43
|
+
const TYPE_DATE = 2 ** 2;
|
|
44
|
+
const TYPE_ENUM = 2 ** 3;
|
|
45
|
+
const TYPE_FUNCTION = 2 ** 4;
|
|
46
|
+
const TYPE_NULL = 2 ** 5;
|
|
47
|
+
const TYPE_NUMBER = 2 ** 6;
|
|
48
|
+
const TYPE_OBJECT = 2 ** 7;
|
|
49
|
+
const TYPE_STRING = 2 ** 8;
|
|
50
|
+
const TYPE_UNDEFINED = 2 ** 9;
|
|
51
|
+
// utils
|
|
52
|
+
const UTILS_ATTRIBUTES_IMPORTED = 'attributes';
|
|
53
|
+
const UTILS_ATTRIBUTES_LOCAL = 'UTILS_ATTRIBUTES';
|
|
54
|
+
const UTILS_HTML_IMPORTED = 'html';
|
|
55
|
+
const UTILS_HTML_LOCAL = 'UTILS_HTML';
|
|
56
|
+
const UTILS_STYLES_IMPORTED = 'styles';
|
|
57
|
+
const UTILS_STYLES_LOCAL = 'UTILS_STYLES';
|
|
58
|
+
const UTILS_PATH = '@htmlplus/element/internal.js';
|
|
59
|
+
|
|
60
|
+
export { API_CONNECTED, API_HOST, API_INSTANCE, API_RENDER_COMPLETED, API_REQUEST, API_STACKS, API_STYLE, COMMENT_AUTO_ADDED, DECORATOR_CSS_VARIABLE, DECORATOR_ELEMENT, DECORATOR_EVENT, DECORATOR_METHOD, DECORATOR_PROPERTY, DECORATOR_PROPERTY_TYPE, DECORATOR_STATE, ELEMENT_HOST_NAME, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_LOADED, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, MAPPER, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BOOLEAN, TYPE_DATE, TYPE_ENUM, TYPE_FUNCTION, TYPE_NULL, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING, TYPE_UNDEFINED, UTILS_ATTRIBUTES_IMPORTED, UTILS_ATTRIBUTES_LOCAL, UTILS_HTML_IMPORTED, UTILS_HTML_LOCAL, UTILS_PATH, UTILS_STYLES_IMPORTED, UTILS_STYLES_LOCAL };
|
package/internal.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { y as attributes, z as html, A as styles } from './client-5FqNUiuz.js';
|
package/internal.js
ADDED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlplus/element",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"author": "Masood Abdolian <m.abdolian@gmail.com>",
|
|
7
7
|
"description": "A powerful library for building scalable, reusable, fast, tastable and lightweight design system for any web technologies. Powerd by Web Component.",
|
|
8
8
|
"type": "module",
|
|
9
|
-
"main": "client
|
|
10
|
-
"types": "client
|
|
9
|
+
"main": "client.js",
|
|
10
|
+
"types": "client.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"**/*.*"
|
|
13
13
|
],
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"typescript": "^5.5.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
49
50
|
"@semantic-release/changelog": "^6.0.3",
|
|
50
51
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
51
52
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -56,8 +57,11 @@
|
|
|
56
57
|
"cpy": "^11.0.1",
|
|
57
58
|
"prettier": "^3.3.3",
|
|
58
59
|
"rimraf": "^6.0.1",
|
|
60
|
+
"rollup": "^4.20.0",
|
|
61
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
62
|
+
"rollup-plugin-node-externals": "^7.1.2",
|
|
59
63
|
"semantic-release": "^24.0.0",
|
|
60
|
-
"
|
|
64
|
+
"tslib": "^2.6.3",
|
|
61
65
|
"vite": "^5.3.4"
|
|
62
66
|
}
|
|
63
67
|
}
|
package/transformer.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { ClassDeclaration, ClassProperty, ClassBody, ClassMethod, File } from '@babel/types';
|
|
2
|
+
import { ParserOptions } from '@babel/parser';
|
|
3
|
+
|
|
4
|
+
type Return<T> = void | T | Promise<void | T>;
|
|
5
|
+
interface TransformerPluginContext {
|
|
6
|
+
skipped?: boolean;
|
|
7
|
+
script?: string;
|
|
8
|
+
assetsDestination?: string;
|
|
9
|
+
assetsSource?: string;
|
|
10
|
+
class?: ClassDeclaration;
|
|
11
|
+
classEvents?: Array<ClassProperty>;
|
|
12
|
+
classMembers?: ClassBody['body'];
|
|
13
|
+
classMethods?: Array<ClassMethod>;
|
|
14
|
+
className?: string;
|
|
15
|
+
classProperties?: Array<ClassProperty>;
|
|
16
|
+
classStates?: Array<ClassProperty>;
|
|
17
|
+
directoryName?: string;
|
|
18
|
+
directoryPath?: string;
|
|
19
|
+
elementKey?: string;
|
|
20
|
+
elementInterfaceName?: string;
|
|
21
|
+
elementTagName?: string;
|
|
22
|
+
fileAST?: File;
|
|
23
|
+
fileContent?: string;
|
|
24
|
+
fileExtension?: string;
|
|
25
|
+
fileName?: string;
|
|
26
|
+
filePath?: string;
|
|
27
|
+
metadata?: {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
};
|
|
30
|
+
readmeContent?: string;
|
|
31
|
+
readmeExtension?: string;
|
|
32
|
+
readmeName?: string;
|
|
33
|
+
readmePath?: string;
|
|
34
|
+
styleContent?: string;
|
|
35
|
+
styleContentTransformed?: string;
|
|
36
|
+
styleExtension?: string;
|
|
37
|
+
styleName?: string;
|
|
38
|
+
stylePath?: string;
|
|
39
|
+
}
|
|
40
|
+
interface TransformerPluginGlobal {
|
|
41
|
+
contexts: Array<TransformerPluginContext>;
|
|
42
|
+
metadata?: {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
interface TransformerPlugin {
|
|
47
|
+
name: string;
|
|
48
|
+
options?: any;
|
|
49
|
+
start?: (global: TransformerPluginGlobal) => Return<TransformerPluginGlobal>;
|
|
50
|
+
run?: (context: TransformerPluginContext, global: TransformerPluginGlobal) => Return<TransformerPluginContext>;
|
|
51
|
+
finish?: (global: TransformerPluginGlobal) => Return<TransformerPluginGlobal>;
|
|
52
|
+
write?: (global: TransformerPluginGlobal) => Return<TransformerPluginGlobal>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare const transformer: (...plugins: TransformerPlugin[]) => {
|
|
56
|
+
global: TransformerPluginGlobal;
|
|
57
|
+
start: () => Promise<void>;
|
|
58
|
+
run: (filePath: string) => Promise<TransformerPluginContext>;
|
|
59
|
+
finish: () => Promise<void>;
|
|
60
|
+
write: () => Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
declare const ASSETS_OPTIONS: Partial<AssetsOptions>;
|
|
64
|
+
interface AssetsOptions {
|
|
65
|
+
destination?: (context: TransformerPluginContext) => string;
|
|
66
|
+
source?: (context: TransformerPluginContext) => string;
|
|
67
|
+
}
|
|
68
|
+
declare const assets: (options?: AssetsOptions) => TransformerPlugin;
|
|
69
|
+
|
|
70
|
+
declare const COPY_OPTIONS: Partial<CopyOptions>;
|
|
71
|
+
interface CopyOptions {
|
|
72
|
+
at?: 'start' | 'run' | 'finish';
|
|
73
|
+
destination: string;
|
|
74
|
+
source: string;
|
|
75
|
+
transformer?: (content: string) => string;
|
|
76
|
+
}
|
|
77
|
+
declare const copy: (options: CopyOptions) => TransformerPlugin;
|
|
78
|
+
|
|
79
|
+
declare const CUSTOM_ELEMENT_OPTIONS: Partial<CustomElementOptions>;
|
|
80
|
+
interface CustomElementOptions {
|
|
81
|
+
prefix?: string;
|
|
82
|
+
typings?: boolean;
|
|
83
|
+
}
|
|
84
|
+
declare const customElement: (options?: CustomElementOptions) => TransformerPlugin;
|
|
85
|
+
|
|
86
|
+
declare const DOCUMENT_OPTIONS: Partial<DocumentOptions>;
|
|
87
|
+
interface DocumentOptions {
|
|
88
|
+
destination: string;
|
|
89
|
+
transformer?: (context: TransformerPluginContext, element: any) => any;
|
|
90
|
+
}
|
|
91
|
+
declare const document: (options?: DocumentOptions) => TransformerPlugin;
|
|
92
|
+
|
|
93
|
+
declare const extract: () => TransformerPlugin;
|
|
94
|
+
|
|
95
|
+
declare const PARSE_OPTIONS: Partial<ParseOptions>;
|
|
96
|
+
interface ParseOptions extends ParserOptions {
|
|
97
|
+
}
|
|
98
|
+
declare const parse: (options?: ParseOptions) => TransformerPlugin;
|
|
99
|
+
|
|
100
|
+
declare const READ_OPTIONS: Partial<ReadOptions>;
|
|
101
|
+
interface ReadOptions {
|
|
102
|
+
encoding: 'utf8' | 'ascii' | 'utf-8' | 'utf16le' | 'utf-16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
103
|
+
flag?: string | undefined;
|
|
104
|
+
}
|
|
105
|
+
declare const read: (options?: ReadOptions) => TransformerPlugin;
|
|
106
|
+
|
|
107
|
+
declare const README_OPTIONS: Partial<ReadmeOptions>;
|
|
108
|
+
interface ReadmeOptions {
|
|
109
|
+
source?: (context: TransformerPluginContext) => string;
|
|
110
|
+
}
|
|
111
|
+
declare const readme: (options?: ReadmeOptions) => TransformerPlugin;
|
|
112
|
+
|
|
113
|
+
declare const STYLE_OPTIONS: Partial<StyleOptions>;
|
|
114
|
+
interface StyleOptions {
|
|
115
|
+
source?: (context: TransformerPluginContext) => string | string[];
|
|
116
|
+
}
|
|
117
|
+
declare const style: (options?: StyleOptions) => TransformerPlugin;
|
|
118
|
+
|
|
119
|
+
declare const validate: () => TransformerPlugin;
|
|
120
|
+
|
|
121
|
+
declare const VISUAL_STUDIO_CODE_OPTIONS: Partial<VisualStudioCodeOptions>;
|
|
122
|
+
interface VisualStudioCodeOptions {
|
|
123
|
+
destination?: string;
|
|
124
|
+
reference?: (context: TransformerPluginContext) => string;
|
|
125
|
+
transformer?: (context: TransformerPluginContext, element: any) => any;
|
|
126
|
+
}
|
|
127
|
+
declare const visualStudioCode: (options?: VisualStudioCodeOptions) => TransformerPlugin;
|
|
128
|
+
|
|
129
|
+
declare const WEB_TYPES_OPTIONS: Partial<WebTypesOptions>;
|
|
130
|
+
interface WebTypesOptions {
|
|
131
|
+
destination?: string;
|
|
132
|
+
packageName?: string;
|
|
133
|
+
packageVersion?: string;
|
|
134
|
+
reference?: (context: TransformerPluginContext) => string;
|
|
135
|
+
transformer?: (context: TransformerPluginContext, element: any) => any;
|
|
136
|
+
}
|
|
137
|
+
declare const webTypes: (options?: WebTypesOptions) => TransformerPlugin;
|
|
138
|
+
|
|
139
|
+
export { ASSETS_OPTIONS, type AssetsOptions, COPY_OPTIONS, CUSTOM_ELEMENT_OPTIONS, type CopyOptions, type CustomElementOptions, DOCUMENT_OPTIONS, type DocumentOptions, PARSE_OPTIONS, type ParseOptions, README_OPTIONS, READ_OPTIONS, type ReadOptions, type ReadmeOptions, STYLE_OPTIONS, type StyleOptions, type TransformerPlugin, type TransformerPluginContext, type TransformerPluginGlobal, VISUAL_STUDIO_CODE_OPTIONS, type VisualStudioCodeOptions, WEB_TYPES_OPTIONS, type WebTypesOptions, assets, copy, customElement, document, extract, parse, read, readme, style, transformer, validate, visualStudioCode, webTypes };
|